Imported Upstream version 4.5.10 upstream/4.5.10
authorAnas Nashif <anas.nashif@intel.com>
Mon, 5 Nov 2012 02:04:16 +0000 (18:04 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Mon, 5 Nov 2012 02:04:16 +0000 (18:04 -0800)
1493 files changed:
ABOUT-NLS [new file with mode: 0644]
AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
GNUmakefile [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
README-alpha [new file with mode: 0644]
README-hacking [new file with mode: 0644]
THANKS [new file with mode: 0644]
TODO [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
build-aux/Makefile.am [new file with mode: 0644]
build-aux/Makefile.in [new file with mode: 0644]
build-aux/arg-nonnull.h [new file with mode: 0644]
build-aux/c++defs.h [new file with mode: 0644]
build-aux/check-testfiles.sh [new file with mode: 0755]
build-aux/compile [new file with mode: 0755]
build-aux/config.guess [new file with mode: 0755]
build-aux/config.rpath [new file with mode: 0755]
build-aux/config.sub [new file with mode: 0755]
build-aux/depcomp [new file with mode: 0755]
build-aux/install-sh [new file with mode: 0755]
build-aux/man-lint.sh [new file with mode: 0755]
build-aux/mdate-sh [new file with mode: 0755]
build-aux/missing [new file with mode: 0755]
build-aux/mkinstalldirs [new file with mode: 0755]
build-aux/texinfo.tex [new file with mode: 0644]
build-aux/unused-parameter.h [new file with mode: 0644]
build-aux/update-copyright [new file with mode: 0755]
build-aux/useless-if-before-free [new file with mode: 0755]
build-aux/vc-list-files [new file with mode: 0755]
build-aux/warn-on-use.h [new file with mode: 0644]
build-aux/ylwrap [new file with mode: 0755]
config.h.in [new file with mode: 0644]
configure [new file with mode: 0755]
configure.ac [new file with mode: 0644]
doc/Makefile.am [new file with mode: 0644]
doc/Makefile.in [new file with mode: 0644]
doc/fdl.texi [new file with mode: 0644]
doc/find-maint.info [new file with mode: 0644]
doc/find-maint.texi [new file with mode: 0644]
doc/find.info [new file with mode: 0644]
doc/find.info-1 [new file with mode: 0644]
doc/find.info-2 [new file with mode: 0644]
doc/find.texi [new file with mode: 0644]
doc/mdate-sh [new file with mode: 0755]
doc/parse-datetime.texi [new file with mode: 0644]
doc/perm.texi [new file with mode: 0644]
doc/regexprops.texi [new file with mode: 0644]
doc/stamp-1 [new file with mode: 0644]
doc/stamp-vti [new file with mode: 0644]
doc/version.texi [new file with mode: 0644]
doc/versionmaint.texi [new file with mode: 0644]
find/Makefile.am [new file with mode: 0644]
find/Makefile.in [new file with mode: 0644]
find/defs.h [new file with mode: 0644]
find/find.1 [new file with mode: 0644]
find/find.c [new file with mode: 0644]
find/finddata.c [new file with mode: 0644]
find/fstype.c [new file with mode: 0644]
find/ftsfind.c [new file with mode: 0644]
find/parser.c [new file with mode: 0644]
find/pred.c [new file with mode: 0644]
find/sharefile.c [new file with mode: 0644]
find/sharefile.h [new file with mode: 0644]
find/testsuite/Makefile.am [new file with mode: 0644]
find/testsuite/Makefile.in [new file with mode: 0644]
find/testsuite/config/unix.exp [new file with mode: 0644]
find/testsuite/find.gnu/access.exp [new file with mode: 0644]
find/testsuite/find.gnu/access.xo [new file with mode: 0644]
find/testsuite/find.gnu/comma.exp [new file with mode: 0644]
find/testsuite/find.gnu/comma.xo [new file with mode: 0644]
find/testsuite/find.gnu/delete.exp [new file with mode: 0644]
find/testsuite/find.gnu/delete.xo [new file with mode: 0644]
find/testsuite/find.gnu/deletedir.exp [new file with mode: 0644]
find/testsuite/find.gnu/deletedir.xo [new file with mode: 0644]
find/testsuite/find.gnu/deletefile.exp [new file with mode: 0644]
find/testsuite/find.gnu/deletefile.xo [new file with mode: 0644]
find/testsuite/find.gnu/depth-d.exp [new file with mode: 0644]
find/testsuite/find.gnu/depth-d.xo [new file with mode: 0644]
find/testsuite/find.gnu/depth.exp [new file with mode: 0644]
find/testsuite/find.gnu/depth.xo [new file with mode: 0644]
find/testsuite/find.gnu/empty.exp [new file with mode: 0644]
find/testsuite/find.gnu/empty.xo [new file with mode: 0644]
find/testsuite/find.gnu/exec-many-rtn-failure.exp [new file with mode: 0644]
find/testsuite/find.gnu/exec-many-rtn-failure.xo [new file with mode: 0644]
find/testsuite/find.gnu/exec-many-rtn-success.exp [new file with mode: 0644]
find/testsuite/find.gnu/exec-many-rtn-success.xo [new file with mode: 0644]
find/testsuite/find.gnu/exec-one-rtn-fail.exp [new file with mode: 0644]
find/testsuite/find.gnu/exec-one-rtn-fail.xo [new file with mode: 0644]
find/testsuite/find.gnu/exec-one-rtn-success.exp [new file with mode: 0644]
find/testsuite/find.gnu/exec-one-rtn-success.xo [new file with mode: 0644]
find/testsuite/find.gnu/execdir-hier.exp [new file with mode: 0644]
find/testsuite/find.gnu/execdir-hier.xo [new file with mode: 0644]
find/testsuite/find.gnu/execdir-in-unreadable.exp [new file with mode: 0644]
find/testsuite/find.gnu/execdir-multiple.exp [new file with mode: 0644]
find/testsuite/find.gnu/execdir-multiple.xo [new file with mode: 0644]
find/testsuite/find.gnu/execdir-one.exp [new file with mode: 0644]
find/testsuite/find.gnu/execdir-one.xo [new file with mode: 0644]
find/testsuite/find.gnu/execdir-pwd.exp [new file with mode: 0644]
find/testsuite/find.gnu/execdir-pwd1.exp [new file with mode: 0644]
find/testsuite/find.gnu/execdir-root-only.exp [new file with mode: 0644]
find/testsuite/find.gnu/execdir-root-only.xo [new file with mode: 0644]
find/testsuite/find.gnu/false.exp [new file with mode: 0644]
find/testsuite/find.gnu/false.xo [new file with mode: 0644]
find/testsuite/find.gnu/follow-arg-parent-symlink.exp [new file with mode: 0644]
find/testsuite/find.gnu/follow-arg-parent-symlink.xo [new file with mode: 0644]
find/testsuite/find.gnu/follow-basic.exp [new file with mode: 0644]
find/testsuite/find.gnu/follow-basic.xo [new file with mode: 0644]
find/testsuite/find.gnu/fprint-unwritable.exp [new file with mode: 0644]
find/testsuite/find.gnu/fprint0_stdout.exp [new file with mode: 0644]
find/testsuite/find.gnu/fprint0_stdout.xo [new file with mode: 0644]
find/testsuite/find.gnu/fprintf-samefile.exp [new file with mode: 0644]
find/testsuite/find.gnu/gnu-or.exp [new file with mode: 0644]
find/testsuite/find.gnu/gnu-or.xo [new file with mode: 0644]
find/testsuite/find.gnu/gnuand.exp [new file with mode: 0644]
find/testsuite/find.gnu/gnuand.xo [new file with mode: 0644]
find/testsuite/find.gnu/gnunot.exp [new file with mode: 0644]
find/testsuite/find.gnu/gnunot.xo [new file with mode: 0644]
find/testsuite/find.gnu/ilname.exp [new file with mode: 0644]
find/testsuite/find.gnu/ilname.xo [new file with mode: 0644]
find/testsuite/find.gnu/iname.exp [new file with mode: 0644]
find/testsuite/find.gnu/iname.xo [new file with mode: 0644]
find/testsuite/find.gnu/inum.exp [new file with mode: 0644]
find/testsuite/find.gnu/inum.xo [new file with mode: 0644]
find/testsuite/find.gnu/ipath.exp [new file with mode: 0644]
find/testsuite/find.gnu/ipath.xo [new file with mode: 0644]
find/testsuite/find.gnu/iregex1.exp [new file with mode: 0644]
find/testsuite/find.gnu/iregex1.xo [new file with mode: 0644]
find/testsuite/find.gnu/iwholename.exp [new file with mode: 0644]
find/testsuite/find.gnu/iwholename.xo [new file with mode: 0644]
find/testsuite/find.gnu/lname.exp [new file with mode: 0644]
find/testsuite/find.gnu/lname.xo [new file with mode: 0644]
find/testsuite/find.gnu/mindepth-arg.exp [new file with mode: 0644]
find/testsuite/find.gnu/mindepth-arg.xo [new file with mode: 0644]
find/testsuite/find.gnu/mindepth-badarg.exp [new file with mode: 0644]
find/testsuite/find.gnu/name-opt.exp [new file with mode: 0644]
find/testsuite/find.gnu/name-opt.xo [new file with mode: 0644]
find/testsuite/find.gnu/name-period.exp [new file with mode: 0644]
find/testsuite/find.gnu/name-period.xo [new file with mode: 0644]
find/testsuite/find.gnu/name-slash.exp [new file with mode: 0644]
find/testsuite/find.gnu/name-slash.xo [new file with mode: 0644]
find/testsuite/find.gnu/no-fdleak-test.exp [new file with mode: 0644]
find/testsuite/find.gnu/no-fdleak-test.xo [new file with mode: 0644]
find/testsuite/find.gnu/path.exp [new file with mode: 0644]
find/testsuite/find.gnu/path.xo [new file with mode: 0644]
find/testsuite/find.gnu/perm-slash.exp [new file with mode: 0644]
find/testsuite/find.gnu/perm-slash.xo [new file with mode: 0644]
find/testsuite/find.gnu/perm.exp [new file with mode: 0644]
find/testsuite/find.gnu/perm.xo [new file with mode: 0644]
find/testsuite/find.gnu/perm000.exp [new file with mode: 0644]
find/testsuite/find.gnu/perm000.xo [new file with mode: 0644]
find/testsuite/find.gnu/posix-dflt.exp [new file with mode: 0644]
find/testsuite/find.gnu/posix-dflt.xo [new file with mode: 0644]
find/testsuite/find.gnu/posix-h.exp [new file with mode: 0644]
find/testsuite/find.gnu/posix-h.xo [new file with mode: 0644]
find/testsuite/find.gnu/posix-l.exp [new file with mode: 0644]
find/testsuite/find.gnu/posix-l.xo [new file with mode: 0644]
find/testsuite/find.gnu/posix-perminvalid.exp [new file with mode: 0644]
find/testsuite/find.gnu/print0.exp [new file with mode: 0644]
find/testsuite/find.gnu/print0.xo [new file with mode: 0644]
find/testsuite/find.gnu/print_stdout.exp [new file with mode: 0644]
find/testsuite/find.gnu/print_stdout.xo [new file with mode: 0644]
find/testsuite/find.gnu/printf-h.exp [new file with mode: 0644]
find/testsuite/find.gnu/printf-h.xo [new file with mode: 0644]
find/testsuite/find.gnu/printf-nonlocal-symlink.exp [new file with mode: 0644]
find/testsuite/find.gnu/printf-nonlocal-symlink.xo [new file with mode: 0644]
find/testsuite/find.gnu/printf-slash.exp [new file with mode: 0644]
find/testsuite/find.gnu/printf-slash.xo [new file with mode: 0644]
find/testsuite/find.gnu/printf-symlink.exp [new file with mode: 0644]
find/testsuite/find.gnu/printf-symlink.xo [new file with mode: 0644]
find/testsuite/find.gnu/printf.exp [new file with mode: 0644]
find/testsuite/find.gnu/printf.xo [new file with mode: 0644]
find/testsuite/find.gnu/printfHdfl.exp [new file with mode: 0644]
find/testsuite/find.gnu/printfHdfl.xo [new file with mode: 0644]
find/testsuite/find.gnu/prune-default-print.exp [new file with mode: 0644]
find/testsuite/find.gnu/prune-default-print.xo [new file with mode: 0644]
find/testsuite/find.gnu/quit.exp [new file with mode: 0644]
find/testsuite/find.gnu/quit.xo [new file with mode: 0644]
find/testsuite/find.gnu/regex1.exp [new file with mode: 0644]
find/testsuite/find.gnu/regex1.xo [new file with mode: 0644]
find/testsuite/find.gnu/regex2.exp [new file with mode: 0644]
find/testsuite/find.gnu/regex2.xo [new file with mode: 0644]
find/testsuite/find.gnu/samefile-copy.exp [new file with mode: 0644]
find/testsuite/find.gnu/samefile-copy.xo [new file with mode: 0644]
find/testsuite/find.gnu/samefile-link.exp [new file with mode: 0644]
find/testsuite/find.gnu/samefile-link.xo [new file with mode: 0644]
find/testsuite/find.gnu/samefile-missing.exp [new file with mode: 0644]
find/testsuite/find.gnu/samefile-p-brokenlink.exp [new file with mode: 0644]
find/testsuite/find.gnu/samefile-p-brokenlink.xo [new file with mode: 0644]
find/testsuite/find.gnu/samefile-same.exp [new file with mode: 0644]
find/testsuite/find.gnu/samefile-same.xo [new file with mode: 0644]
find/testsuite/find.gnu/samefile-symlink.exp [new file with mode: 0644]
find/testsuite/find.gnu/samefile-symlink.xo [new file with mode: 0644]
find/testsuite/find.gnu/sv-bug-12230.exp [new file with mode: 0644]
find/testsuite/find.gnu/sv-bug-17477.exp [new file with mode: 0644]
find/testsuite/find.gnu/sv-bug-17490.exp [new file with mode: 0644]
find/testsuite/find.gnu/sv-bug-17782.exp [new file with mode: 0644]
find/testsuite/find.gnu/sv-bug-17782.xo [new file with mode: 0644]
find/testsuite/find.gnu/sv-bug-18222.exp [new file with mode: 0644]
find/testsuite/find.gnu/sv-bug-18222.xo [new file with mode: 0644]
find/testsuite/find.gnu/sv-bug-24169.exp [new file with mode: 0644]
find/testsuite/find.gnu/sv-bug-27563-execdir.exp [new file with mode: 0644]
find/testsuite/find.gnu/sv-bug-27563-execdir.xo [new file with mode: 0644]
find/testsuite/find.gnu/true.exp [new file with mode: 0644]
find/testsuite/find.gnu/true.xo [new file with mode: 0644]
find/testsuite/find.gnu/used-invarg.exp [new file with mode: 0644]
find/testsuite/find.gnu/used-missing.exp [new file with mode: 0644]
find/testsuite/find.gnu/user-invalid.exp [new file with mode: 0644]
find/testsuite/find.gnu/wholename.exp [new file with mode: 0644]
find/testsuite/find.gnu/wholename.xo [new file with mode: 0644]
find/testsuite/find.gnu/xtype-symlink.exp [new file with mode: 0644]
find/testsuite/find.gnu/xtype-symlink.xo [new file with mode: 0644]
find/testsuite/find.gnu/xtype.exp [new file with mode: 0644]
find/testsuite/find.gnu/xtype.xo [new file with mode: 0644]
find/testsuite/find.posix/and.exp [new file with mode: 0644]
find/testsuite/find.posix/and.xo [new file with mode: 0644]
find/testsuite/find.posix/bracket-depth.exp [new file with mode: 0644]
find/testsuite/find.posix/depth1.exp [new file with mode: 0644]
find/testsuite/find.posix/depth1.xo [new file with mode: 0644]
find/testsuite/find.posix/empty-parens.exp [new file with mode: 0644]
find/testsuite/find.posix/exec-nogaps.exp [new file with mode: 0644]
find/testsuite/find.posix/exec-nogaps.xo [new file with mode: 0644]
find/testsuite/find.posix/exec-one.exp [new file with mode: 0644]
find/testsuite/find.posix/exec-one.xo [new file with mode: 0644]
find/testsuite/find.posix/files-not-expressions1.exp [new file with mode: 0644]
find/testsuite/find.posix/files-not-expressions1.xo [new file with mode: 0644]
find/testsuite/find.posix/files-not-expressions2.exp [new file with mode: 0644]
find/testsuite/find.posix/files-not-expressions2.xo [new file with mode: 0644]
find/testsuite/find.posix/files-not-expressions3.exp [new file with mode: 0644]
find/testsuite/find.posix/files-not-expressions3.xo [new file with mode: 0644]
find/testsuite/find.posix/group-empty.exp [new file with mode: 0644]
find/testsuite/find.posix/group-missing.exp [new file with mode: 0644]
find/testsuite/find.posix/grouping.exp [new file with mode: 0644]
find/testsuite/find.posix/grouping.xo [new file with mode: 0644]
find/testsuite/find.posix/links.exp [new file with mode: 0644]
find/testsuite/find.posix/links.xo [new file with mode: 0644]
find/testsuite/find.posix/mtime0.exp [new file with mode: 0644]
find/testsuite/find.posix/mtime0.xo [new file with mode: 0644]
find/testsuite/find.posix/name-missing.exp [new file with mode: 0644]
find/testsuite/find.posix/name.exp [new file with mode: 0644]
find/testsuite/find.posix/name.xo [new file with mode: 0644]
find/testsuite/find.posix/nameslash.exp [new file with mode: 0644]
find/testsuite/find.posix/nameslash.xo [new file with mode: 0644]
find/testsuite/find.posix/parent.exp [new file with mode: 0644]
find/testsuite/find.posix/parent.xo [new file with mode: 0644]
find/testsuite/find.posix/perm-X.exp [new file with mode: 0644]
find/testsuite/find.posix/perm-X.xo [new file with mode: 0644]
find/testsuite/find.posix/perm-vanilla.exp [new file with mode: 0644]
find/testsuite/find.posix/perm-vanilla.xo [new file with mode: 0644]
find/testsuite/find.posix/posixnot.exp [new file with mode: 0644]
find/testsuite/find.posix/posixnot.xo [new file with mode: 0644]
find/testsuite/find.posix/prune-result.exp [new file with mode: 0644]
find/testsuite/find.posix/prune-result.xo [new file with mode: 0644]
find/testsuite/find.posix/prune-stat.exp [new file with mode: 0644]
find/testsuite/find.posix/prune-stat.xo [new file with mode: 0644]
find/testsuite/find.posix/prune.exp [new file with mode: 0644]
find/testsuite/find.posix/prune.xo [new file with mode: 0644]
find/testsuite/find.posix/size-invalid.exp [new file with mode: 0644]
find/testsuite/find.posix/size-missing.exp [new file with mode: 0644]
find/testsuite/find.posix/sizes.exp [new file with mode: 0644]
find/testsuite/find.posix/sizes.xo [new file with mode: 0644]
find/testsuite/find.posix/sizetype.exp [new file with mode: 0644]
find/testsuite/find.posix/sizetype.xo [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-11175.exp [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-11175.xo [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-12181.exp [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-12181.xo [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-15235.exp [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-15235.xo [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-19605.exp [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-19613.exp [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-19613.xo [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-19617.exp [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-25359.exp [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-25359.xo [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-27563-exec.exp [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-27563-exec.xo [new file with mode: 0644]
find/testsuite/find.posix/sv-bug-30777.exp [new file with mode: 0644]
find/testsuite/find.posix/typearg.exp [new file with mode: 0644]
find/testsuite/find.posix/typesize.exp [new file with mode: 0644]
find/testsuite/find.posix/typesize.xo [new file with mode: 0644]
find/testsuite/find.posix/user-empty.exp [new file with mode: 0644]
find/testsuite/find.posix/user-missing.exp [new file with mode: 0644]
find/tree.c [new file with mode: 0644]
find/util.c [new file with mode: 0644]
gnulib/Makefile.am [new file with mode: 0644]
gnulib/Makefile.in [new file with mode: 0644]
gnulib/lib/Makefile.am [new file with mode: 0644]
gnulib/lib/Makefile.in [new file with mode: 0644]
gnulib/lib/alloca.c [new file with mode: 0644]
gnulib/lib/alloca.in.h [new file with mode: 0644]
gnulib/lib/areadlink-with-size.c [new file with mode: 0644]
gnulib/lib/areadlink.c [new file with mode: 0644]
gnulib/lib/areadlink.h [new file with mode: 0644]
gnulib/lib/areadlinkat.c [new file with mode: 0644]
gnulib/lib/argmatch.c [new file with mode: 0644]
gnulib/lib/argmatch.h [new file with mode: 0644]
gnulib/lib/asnprintf.c [new file with mode: 0644]
gnulib/lib/at-func.c [new file with mode: 0644]
gnulib/lib/basename-lgpl.c [new file with mode: 0644]
gnulib/lib/basename.c [new file with mode: 0644]
gnulib/lib/bitrotate.h [new file with mode: 0644]
gnulib/lib/btowc.c [new file with mode: 0644]
gnulib/lib/c-ctype.c [new file with mode: 0644]
gnulib/lib/c-ctype.h [new file with mode: 0644]
gnulib/lib/c-strcase.h [new file with mode: 0644]
gnulib/lib/c-strcasecmp.c [new file with mode: 0644]
gnulib/lib/c-strcasestr.c [new file with mode: 0644]
gnulib/lib/c-strcasestr.h [new file with mode: 0644]
gnulib/lib/c-strncasecmp.c [new file with mode: 0644]
gnulib/lib/c-strstr.c [new file with mode: 0644]
gnulib/lib/c-strstr.h [new file with mode: 0644]
gnulib/lib/canonicalize.c [new file with mode: 0644]
gnulib/lib/canonicalize.h [new file with mode: 0644]
gnulib/lib/chdir-long.c [new file with mode: 0644]
gnulib/lib/chdir-long.h [new file with mode: 0644]
gnulib/lib/chown.c [new file with mode: 0644]
gnulib/lib/cloexec.c [new file with mode: 0644]
gnulib/lib/cloexec.h [new file with mode: 0644]
gnulib/lib/close-hook.c [new file with mode: 0644]
gnulib/lib/close-hook.h [new file with mode: 0644]
gnulib/lib/close-stream.c [new file with mode: 0644]
gnulib/lib/close-stream.h [new file with mode: 0644]
gnulib/lib/close.c [new file with mode: 0644]
gnulib/lib/closein.c [new file with mode: 0644]
gnulib/lib/closein.h [new file with mode: 0644]
gnulib/lib/closeout.c [new file with mode: 0644]
gnulib/lib/closeout.h [new file with mode: 0644]
gnulib/lib/config.charset [new file with mode: 0644]
gnulib/lib/creat-safer.c [new file with mode: 0644]
gnulib/lib/ctype.in.h [new file with mode: 0644]
gnulib/lib/cycle-check.c [new file with mode: 0644]
gnulib/lib/cycle-check.h [new file with mode: 0644]
gnulib/lib/dev-ino.h [new file with mode: 0644]
gnulib/lib/dirent--.h [new file with mode: 0644]
gnulib/lib/dirent-safer.h [new file with mode: 0644]
gnulib/lib/dirent.in.h [new file with mode: 0644]
gnulib/lib/dirfd.c [new file with mode: 0644]
gnulib/lib/dirname-lgpl.c [new file with mode: 0644]
gnulib/lib/dirname.c [new file with mode: 0644]
gnulib/lib/dirname.h [new file with mode: 0644]
gnulib/lib/dosname.h [new file with mode: 0644]
gnulib/lib/dup-safer.c [new file with mode: 0644]
gnulib/lib/dup2.c [new file with mode: 0644]
gnulib/lib/errno.in.h [new file with mode: 0644]
gnulib/lib/error.c [new file with mode: 0644]
gnulib/lib/error.h [new file with mode: 0644]
gnulib/lib/euidaccess.c [new file with mode: 0644]
gnulib/lib/exitfail.c [new file with mode: 0644]
gnulib/lib/exitfail.h [new file with mode: 0644]
gnulib/lib/faccessat.c [new file with mode: 0644]
gnulib/lib/fchdir.c [new file with mode: 0644]
gnulib/lib/fchmodat.c [new file with mode: 0644]
gnulib/lib/fchown-stub.c [new file with mode: 0644]
gnulib/lib/fchownat.c [new file with mode: 0644]
gnulib/lib/fclose.c [new file with mode: 0644]
gnulib/lib/fcntl--.h [new file with mode: 0644]
gnulib/lib/fcntl-safer.h [new file with mode: 0644]
gnulib/lib/fcntl.c [new file with mode: 0644]
gnulib/lib/fcntl.in.h [new file with mode: 0644]
gnulib/lib/fd-safer.c [new file with mode: 0644]
gnulib/lib/fdopendir.c [new file with mode: 0644]
gnulib/lib/fflush.c [new file with mode: 0644]
gnulib/lib/file-set.c [new file with mode: 0644]
gnulib/lib/file-set.h [new file with mode: 0644]
gnulib/lib/fileblocks.c [new file with mode: 0644]
gnulib/lib/filemode.c [new file with mode: 0644]
gnulib/lib/filemode.h [new file with mode: 0644]
gnulib/lib/float+.h [new file with mode: 0644]
gnulib/lib/float.in.h [new file with mode: 0644]
gnulib/lib/fnmatch.c [new file with mode: 0644]
gnulib/lib/fnmatch.in.h [new file with mode: 0644]
gnulib/lib/fnmatch_loop.c [new file with mode: 0644]
gnulib/lib/fopen-safer.c [new file with mode: 0644]
gnulib/lib/fopen.c [new file with mode: 0644]
gnulib/lib/fpending.c [new file with mode: 0644]
gnulib/lib/fpending.h [new file with mode: 0644]
gnulib/lib/fpurge.c [new file with mode: 0644]
gnulib/lib/freadahead.c [new file with mode: 0644]
gnulib/lib/freadahead.h [new file with mode: 0644]
gnulib/lib/freading.c [new file with mode: 0644]
gnulib/lib/freading.h [new file with mode: 0644]
gnulib/lib/fseeko.c [new file with mode: 0644]
gnulib/lib/fstatat.c [new file with mode: 0644]
gnulib/lib/ftello.c [new file with mode: 0644]
gnulib/lib/fts-cycle.c [new file with mode: 0644]
gnulib/lib/fts.c [new file with mode: 0644]
gnulib/lib/fts_.h [new file with mode: 0644]
gnulib/lib/getcwd.c [new file with mode: 0644]
gnulib/lib/getdelim.c [new file with mode: 0644]
gnulib/lib/getdtablesize.c [new file with mode: 0644]
gnulib/lib/getfilecon.c [new file with mode: 0644]
gnulib/lib/getgroups.c [new file with mode: 0644]
gnulib/lib/getline.c [new file with mode: 0644]
gnulib/lib/getopt.c [new file with mode: 0644]
gnulib/lib/getopt.in.h [new file with mode: 0644]
gnulib/lib/getopt1.c [new file with mode: 0644]
gnulib/lib/getopt_int.h [new file with mode: 0644]
gnulib/lib/gettext.h [new file with mode: 0644]
gnulib/lib/gettime.c [new file with mode: 0644]
gnulib/lib/gettimeofday.c [new file with mode: 0644]
gnulib/lib/group-member.c [new file with mode: 0644]
gnulib/lib/group-member.h [new file with mode: 0644]
gnulib/lib/hash-pjw.c [new file with mode: 0644]
gnulib/lib/hash-pjw.h [new file with mode: 0644]
gnulib/lib/hash-triple.c [new file with mode: 0644]
gnulib/lib/hash-triple.h [new file with mode: 0644]
gnulib/lib/hash.c [new file with mode: 0644]
gnulib/lib/hash.h [new file with mode: 0644]
gnulib/lib/human.c [new file with mode: 0644]
gnulib/lib/human.h [new file with mode: 0644]
gnulib/lib/i-ring.c [new file with mode: 0644]
gnulib/lib/i-ring.h [new file with mode: 0644]
gnulib/lib/idcache.c [new file with mode: 0644]
gnulib/lib/idcache.h [new file with mode: 0644]
gnulib/lib/intprops.h [new file with mode: 0644]
gnulib/lib/inttypes.in.h [new file with mode: 0644]
gnulib/lib/isblank.c [new file with mode: 0644]
gnulib/lib/iswblank.c [new file with mode: 0644]
gnulib/lib/langinfo.in.h [new file with mode: 0644]
gnulib/lib/lchown.c [new file with mode: 0644]
gnulib/lib/localcharset.c [new file with mode: 0644]
gnulib/lib/localcharset.h [new file with mode: 0644]
gnulib/lib/locale.in.h [new file with mode: 0644]
gnulib/lib/lseek.c [new file with mode: 0644]
gnulib/lib/lstat.c [new file with mode: 0644]
gnulib/lib/malloc.c [new file with mode: 0644]
gnulib/lib/malloca.c [new file with mode: 0644]
gnulib/lib/malloca.h [new file with mode: 0644]
gnulib/lib/malloca.valgrind [new file with mode: 0644]
gnulib/lib/math.in.h [new file with mode: 0644]
gnulib/lib/mbchar.c [new file with mode: 0644]
gnulib/lib/mbchar.h [new file with mode: 0644]
gnulib/lib/mbrtowc.c [new file with mode: 0644]
gnulib/lib/mbscasestr.c [new file with mode: 0644]
gnulib/lib/mbsinit.c [new file with mode: 0644]
gnulib/lib/mbslen.c [new file with mode: 0644]
gnulib/lib/mbsrtowcs-impl.h [new file with mode: 0644]
gnulib/lib/mbsrtowcs-state.c [new file with mode: 0644]
gnulib/lib/mbsrtowcs.c [new file with mode: 0644]
gnulib/lib/mbsstr.c [new file with mode: 0644]
gnulib/lib/mbtowc-impl.h [new file with mode: 0644]
gnulib/lib/mbtowc.c [new file with mode: 0644]
gnulib/lib/mbuiter.h [new file with mode: 0644]
gnulib/lib/memchr.c [new file with mode: 0644]
gnulib/lib/memchr.valgrind [new file with mode: 0644]
gnulib/lib/mempcpy.c [new file with mode: 0644]
gnulib/lib/memrchr.c [new file with mode: 0644]
gnulib/lib/mkdir.c [new file with mode: 0644]
gnulib/lib/mkdirat.c [new file with mode: 0644]
gnulib/lib/mktime-internal.h [new file with mode: 0644]
gnulib/lib/mktime.c [new file with mode: 0644]
gnulib/lib/modechange.c [new file with mode: 0644]
gnulib/lib/modechange.h [new file with mode: 0644]
gnulib/lib/mountlist.c [new file with mode: 0644]
gnulib/lib/mountlist.h [new file with mode: 0644]
gnulib/lib/nl_langinfo.c [new file with mode: 0644]
gnulib/lib/open-safer.c [new file with mode: 0644]
gnulib/lib/open.c [new file with mode: 0644]
gnulib/lib/openat-die.c [new file with mode: 0644]
gnulib/lib/openat-priv.h [new file with mode: 0644]
gnulib/lib/openat-proc.c [new file with mode: 0644]
gnulib/lib/openat-safer.c [new file with mode: 0644]
gnulib/lib/openat.c [new file with mode: 0644]
gnulib/lib/openat.h [new file with mode: 0644]
gnulib/lib/opendir-safer.c [new file with mode: 0644]
gnulib/lib/parse-datetime.c [new file with mode: 0644]
gnulib/lib/parse-datetime.h [new file with mode: 0644]
gnulib/lib/parse-datetime.y [new file with mode: 0644]
gnulib/lib/pathmax.h [new file with mode: 0644]
gnulib/lib/perror.c [new file with mode: 0644]
gnulib/lib/pipe-safer.c [new file with mode: 0644]
gnulib/lib/printf-args.c [new file with mode: 0644]
gnulib/lib/printf-args.h [new file with mode: 0644]
gnulib/lib/printf-parse.c [new file with mode: 0644]
gnulib/lib/printf-parse.h [new file with mode: 0644]
gnulib/lib/progname.c [new file with mode: 0644]
gnulib/lib/progname.h [new file with mode: 0644]
gnulib/lib/quote.c [new file with mode: 0644]
gnulib/lib/quote.h [new file with mode: 0644]
gnulib/lib/quotearg.c [new file with mode: 0644]
gnulib/lib/quotearg.h [new file with mode: 0644]
gnulib/lib/readlink.c [new file with mode: 0644]
gnulib/lib/readlinkat.c [new file with mode: 0644]
gnulib/lib/realloc.c [new file with mode: 0644]
gnulib/lib/ref-add.sin [new file with mode: 0644]
gnulib/lib/ref-del.sin [new file with mode: 0644]
gnulib/lib/regcomp.c [new file with mode: 0644]
gnulib/lib/regex.c [new file with mode: 0644]
gnulib/lib/regex.h [new file with mode: 0644]
gnulib/lib/regex_internal.c [new file with mode: 0644]
gnulib/lib/regex_internal.h [new file with mode: 0644]
gnulib/lib/regexec.c [new file with mode: 0644]
gnulib/lib/rmdir.c [new file with mode: 0644]
gnulib/lib/rpmatch.c [new file with mode: 0644]
gnulib/lib/same-inode.h [new file with mode: 0644]
gnulib/lib/same.c [new file with mode: 0644]
gnulib/lib/same.h [new file with mode: 0644]
gnulib/lib/save-cwd.c [new file with mode: 0644]
gnulib/lib/save-cwd.h [new file with mode: 0644]
gnulib/lib/savedir.c [new file with mode: 0644]
gnulib/lib/savedir.h [new file with mode: 0644]
gnulib/lib/se-context.in.h [new file with mode: 0644]
gnulib/lib/se-selinux.in.h [new file with mode: 0644]
gnulib/lib/selinux-at.c [new file with mode: 0644]
gnulib/lib/selinux-at.h [new file with mode: 0644]
gnulib/lib/setenv.c [new file with mode: 0644]
gnulib/lib/size_max.h [new file with mode: 0644]
gnulib/lib/snprintf.c [new file with mode: 0644]
gnulib/lib/stat-macros.h [new file with mode: 0644]
gnulib/lib/stat-time.h [new file with mode: 0644]
gnulib/lib/stat.c [new file with mode: 0644]
gnulib/lib/stdarg.in.h [new file with mode: 0644]
gnulib/lib/stdbool.in.h [new file with mode: 0644]
gnulib/lib/stddef.in.h [new file with mode: 0644]
gnulib/lib/stdint.in.h [new file with mode: 0644]
gnulib/lib/stdio--.h [new file with mode: 0644]
gnulib/lib/stdio-impl.h [new file with mode: 0644]
gnulib/lib/stdio-safer.h [new file with mode: 0644]
gnulib/lib/stdio.in.h [new file with mode: 0644]
gnulib/lib/stdlib.in.h [new file with mode: 0644]
gnulib/lib/stpcpy.c [new file with mode: 0644]
gnulib/lib/str-kmp.h [new file with mode: 0644]
gnulib/lib/str-two-way.h [new file with mode: 0644]
gnulib/lib/strcasecmp.c [new file with mode: 0644]
gnulib/lib/strcasestr.c [new file with mode: 0644]
gnulib/lib/strdup.c [new file with mode: 0644]
gnulib/lib/streq.h [new file with mode: 0644]
gnulib/lib/strerror.c [new file with mode: 0644]
gnulib/lib/strftime.c [new file with mode: 0644]
gnulib/lib/strftime.h [new file with mode: 0644]
gnulib/lib/string.in.h [new file with mode: 0644]
gnulib/lib/strings.in.h [new file with mode: 0644]
gnulib/lib/stripslash.c [new file with mode: 0644]
gnulib/lib/strncasecmp.c [new file with mode: 0644]
gnulib/lib/strndup.c [new file with mode: 0644]
gnulib/lib/strnlen.c [new file with mode: 0644]
gnulib/lib/strnlen1.c [new file with mode: 0644]
gnulib/lib/strnlen1.h [new file with mode: 0644]
gnulib/lib/strstr.c [new file with mode: 0644]
gnulib/lib/strtoimax.c [new file with mode: 0644]
gnulib/lib/strtol.c [new file with mode: 0644]
gnulib/lib/strtoll.c [new file with mode: 0644]
gnulib/lib/strtoul.c [new file with mode: 0644]
gnulib/lib/strtoull.c [new file with mode: 0644]
gnulib/lib/strtoumax.c [new file with mode: 0644]
gnulib/lib/sys_stat.in.h [new file with mode: 0644]
gnulib/lib/sys_time.in.h [new file with mode: 0644]
gnulib/lib/sys_wait.in.h [new file with mode: 0644]
gnulib/lib/time.in.h [new file with mode: 0644]
gnulib/lib/time_r.c [new file with mode: 0644]
gnulib/lib/timespec.h [new file with mode: 0644]
gnulib/lib/unistd--.h [new file with mode: 0644]
gnulib/lib/unistd-safer.h [new file with mode: 0644]
gnulib/lib/unistd.in.h [new file with mode: 0644]
gnulib/lib/unitypes.in.h [new file with mode: 0644]
gnulib/lib/uniwidth.in.h [new file with mode: 0644]
gnulib/lib/uniwidth/cjk.h [new file with mode: 0644]
gnulib/lib/uniwidth/width.c [new file with mode: 0644]
gnulib/lib/unlink.c [new file with mode: 0644]
gnulib/lib/unlinkat.c [new file with mode: 0644]
gnulib/lib/unsetenv.c [new file with mode: 0644]
gnulib/lib/vasnprintf.c [new file with mode: 0644]
gnulib/lib/vasnprintf.h [new file with mode: 0644]
gnulib/lib/verify.h [new file with mode: 0644]
gnulib/lib/version-etc-fsf.c [new file with mode: 0644]
gnulib/lib/version-etc.c [new file with mode: 0644]
gnulib/lib/version-etc.h [new file with mode: 0644]
gnulib/lib/wchar.in.h [new file with mode: 0644]
gnulib/lib/wcrtomb.c [new file with mode: 0644]
gnulib/lib/wctype.in.h [new file with mode: 0644]
gnulib/lib/wcwidth.c [new file with mode: 0644]
gnulib/lib/xalloc-die.c [new file with mode: 0644]
gnulib/lib/xalloc.h [new file with mode: 0644]
gnulib/lib/xgetcwd.c [new file with mode: 0644]
gnulib/lib/xgetcwd.h [new file with mode: 0644]
gnulib/lib/xmalloc.c [new file with mode: 0644]
gnulib/lib/xsize.h [new file with mode: 0644]
gnulib/lib/xstrndup.c [new file with mode: 0644]
gnulib/lib/xstrndup.h [new file with mode: 0644]
gnulib/lib/xstrtod.c [new file with mode: 0644]
gnulib/lib/xstrtod.h [new file with mode: 0644]
gnulib/lib/xstrtol-error.c [new file with mode: 0644]
gnulib/lib/xstrtol.c [new file with mode: 0644]
gnulib/lib/xstrtol.h [new file with mode: 0644]
gnulib/lib/xstrtoul.c [new file with mode: 0644]
gnulib/lib/xstrtoumax.c [new file with mode: 0644]
gnulib/lib/yesno.c [new file with mode: 0644]
gnulib/lib/yesno.h [new file with mode: 0644]
gnulib/m4/00gnulib.m4 [new file with mode: 0644]
gnulib/m4/alloca.m4 [new file with mode: 0644]
gnulib/m4/argmatch.m4 [new file with mode: 0644]
gnulib/m4/assert.m4 [new file with mode: 0644]
gnulib/m4/bison.m4 [new file with mode: 0644]
gnulib/m4/btowc.m4 [new file with mode: 0644]
gnulib/m4/canonicalize.m4 [new file with mode: 0644]
gnulib/m4/chdir-long.m4 [new file with mode: 0644]
gnulib/m4/chown.m4 [new file with mode: 0644]
gnulib/m4/clock_time.m4 [new file with mode: 0644]
gnulib/m4/cloexec.m4 [new file with mode: 0644]
gnulib/m4/close-stream.m4 [new file with mode: 0644]
gnulib/m4/close.m4 [new file with mode: 0644]
gnulib/m4/closein.m4 [new file with mode: 0644]
gnulib/m4/closeout.m4 [new file with mode: 0644]
gnulib/m4/codeset.m4 [new file with mode: 0644]
gnulib/m4/configmake.m4 [new file with mode: 0644]
gnulib/m4/ctype.m4 [new file with mode: 0644]
gnulib/m4/cycle-check.m4 [new file with mode: 0644]
gnulib/m4/d-ino.m4 [new file with mode: 0644]
gnulib/m4/d-type.m4 [new file with mode: 0644]
gnulib/m4/dirent-safer.m4 [new file with mode: 0644]
gnulib/m4/dirent_h.m4 [new file with mode: 0644]
gnulib/m4/dirfd.m4 [new file with mode: 0644]
gnulib/m4/dirname.m4 [new file with mode: 0644]
gnulib/m4/double-slash-root.m4 [new file with mode: 0644]
gnulib/m4/dup2.m4 [new file with mode: 0644]
gnulib/m4/eealloc.m4 [new file with mode: 0644]
gnulib/m4/environ.m4 [new file with mode: 0644]
gnulib/m4/errno_h.m4 [new file with mode: 0644]
gnulib/m4/error.m4 [new file with mode: 0644]
gnulib/m4/euidaccess.m4 [new file with mode: 0644]
gnulib/m4/extensions.m4 [new file with mode: 0644]
gnulib/m4/faccessat.m4 [new file with mode: 0644]
gnulib/m4/fchdir.m4 [new file with mode: 0644]
gnulib/m4/fclose.m4 [new file with mode: 0644]
gnulib/m4/fcntl-o.m4 [new file with mode: 0644]
gnulib/m4/fcntl-safer.m4 [new file with mode: 0644]
gnulib/m4/fcntl.m4 [new file with mode: 0644]
gnulib/m4/fcntl_h.m4 [new file with mode: 0644]
gnulib/m4/fdopendir.m4 [new file with mode: 0644]
gnulib/m4/fflush.m4 [new file with mode: 0644]
gnulib/m4/fileblocks.m4 [new file with mode: 0644]
gnulib/m4/filemode.m4 [new file with mode: 0644]
gnulib/m4/flexmember.m4 [new file with mode: 0644]
gnulib/m4/float_h.m4 [new file with mode: 0644]
gnulib/m4/fnmatch.m4 [new file with mode: 0644]
gnulib/m4/fopen.m4 [new file with mode: 0644]
gnulib/m4/fpending.m4 [new file with mode: 0644]
gnulib/m4/fpurge.m4 [new file with mode: 0644]
gnulib/m4/freading.m4 [new file with mode: 0644]
gnulib/m4/fseeko.m4 [new file with mode: 0644]
gnulib/m4/fstypename.m4 [new file with mode: 0644]
gnulib/m4/ftell.m4 [new file with mode: 0644]
gnulib/m4/ftello.m4 [new file with mode: 0644]
gnulib/m4/fts.m4 [new file with mode: 0644]
gnulib/m4/getcwd-abort-bug.m4 [new file with mode: 0644]
gnulib/m4/getcwd-path-max.m4 [new file with mode: 0644]
gnulib/m4/getcwd.m4 [new file with mode: 0644]
gnulib/m4/getdelim.m4 [new file with mode: 0644]
gnulib/m4/getdtablesize.m4 [new file with mode: 0644]
gnulib/m4/getgroups.m4 [new file with mode: 0644]
gnulib/m4/getline.m4 [new file with mode: 0644]
gnulib/m4/getopt.m4 [new file with mode: 0644]
gnulib/m4/getpagesize.m4 [new file with mode: 0644]
gnulib/m4/gettext.m4 [new file with mode: 0644]
gnulib/m4/gettime.m4 [new file with mode: 0644]
gnulib/m4/gettimeofday.m4 [new file with mode: 0644]
gnulib/m4/getugroups.m4 [new file with mode: 0644]
gnulib/m4/glibc21.m4 [new file with mode: 0644]
gnulib/m4/gnulib-cache.m4 [new file with mode: 0644]
gnulib/m4/gnulib-common.m4 [new file with mode: 0644]
gnulib/m4/gnulib-comp.m4 [new file with mode: 0644]
gnulib/m4/group-member.m4 [new file with mode: 0644]
gnulib/m4/hash.m4 [new file with mode: 0644]
gnulib/m4/human.m4 [new file with mode: 0644]
gnulib/m4/i-ring.m4 [new file with mode: 0644]
gnulib/m4/iconv.m4 [new file with mode: 0644]
gnulib/m4/idcache.m4 [new file with mode: 0644]
gnulib/m4/include_next.m4 [new file with mode: 0644]
gnulib/m4/inline.m4 [new file with mode: 0644]
gnulib/m4/intlmacosx.m4 [new file with mode: 0644]
gnulib/m4/intmax_t.m4 [new file with mode: 0644]
gnulib/m4/inttostr.m4 [new file with mode: 0644]
gnulib/m4/inttypes-pri.m4 [new file with mode: 0644]
gnulib/m4/inttypes.m4 [new file with mode: 0644]
gnulib/m4/inttypes_h.m4 [new file with mode: 0644]
gnulib/m4/isblank.m4 [new file with mode: 0644]
gnulib/m4/iswblank.m4 [new file with mode: 0644]
gnulib/m4/langinfo_h.m4 [new file with mode: 0644]
gnulib/m4/lchown.m4 [new file with mode: 0644]
gnulib/m4/lcmessage.m4 [new file with mode: 0644]
gnulib/m4/lib-ld.m4 [new file with mode: 0644]
gnulib/m4/lib-link.m4 [new file with mode: 0644]
gnulib/m4/lib-prefix.m4 [new file with mode: 0644]
gnulib/m4/libunistring-base.m4 [new file with mode: 0644]
gnulib/m4/localcharset.m4 [new file with mode: 0644]
gnulib/m4/locale-fr.m4 [new file with mode: 0644]
gnulib/m4/locale-ja.m4 [new file with mode: 0644]
gnulib/m4/locale-tr.m4 [new file with mode: 0644]
gnulib/m4/locale-zh.m4 [new file with mode: 0644]
gnulib/m4/locale_h.m4 [new file with mode: 0644]
gnulib/m4/localename.m4 [new file with mode: 0644]
gnulib/m4/lock.m4 [new file with mode: 0644]
gnulib/m4/longlong.m4 [new file with mode: 0644]
gnulib/m4/ls-mntd-fs.m4 [new file with mode: 0644]
gnulib/m4/lseek.m4 [new file with mode: 0644]
gnulib/m4/lstat.m4 [new file with mode: 0644]
gnulib/m4/malloc.m4 [new file with mode: 0644]
gnulib/m4/malloca.m4 [new file with mode: 0644]
gnulib/m4/math_h.m4 [new file with mode: 0644]
gnulib/m4/mathfunc.m4 [new file with mode: 0644]
gnulib/m4/mbchar.m4 [new file with mode: 0644]
gnulib/m4/mbiter.m4 [new file with mode: 0644]
gnulib/m4/mbrtowc.m4 [new file with mode: 0644]
gnulib/m4/mbsinit.m4 [new file with mode: 0644]
gnulib/m4/mbslen.m4 [new file with mode: 0644]
gnulib/m4/mbsrtowcs.m4 [new file with mode: 0644]
gnulib/m4/mbstate_t.m4 [new file with mode: 0644]
gnulib/m4/mbtowc.m4 [new file with mode: 0644]
gnulib/m4/memchr.m4 [new file with mode: 0644]
gnulib/m4/mempcpy.m4 [new file with mode: 0644]
gnulib/m4/memrchr.m4 [new file with mode: 0644]
gnulib/m4/mgetgroups.m4 [new file with mode: 0644]
gnulib/m4/mkdir.m4 [new file with mode: 0644]
gnulib/m4/mktime.m4 [new file with mode: 0644]
gnulib/m4/mmap-anon.m4 [new file with mode: 0644]
gnulib/m4/mode_t.m4 [new file with mode: 0644]
gnulib/m4/modechange.m4 [new file with mode: 0644]
gnulib/m4/mountlist.m4 [new file with mode: 0644]
gnulib/m4/multiarch.m4 [new file with mode: 0644]
gnulib/m4/nl_langinfo.m4 [new file with mode: 0644]
gnulib/m4/nls.m4 [new file with mode: 0644]
gnulib/m4/onceonly.m4 [new file with mode: 0644]
gnulib/m4/open.m4 [new file with mode: 0644]
gnulib/m4/openat.m4 [new file with mode: 0644]
gnulib/m4/parse-datetime.m4 [new file with mode: 0644]
gnulib/m4/pathmax.m4 [new file with mode: 0644]
gnulib/m4/perror.m4 [new file with mode: 0644]
gnulib/m4/po.m4 [new file with mode: 0644]
gnulib/m4/printf.m4 [new file with mode: 0644]
gnulib/m4/priv-set.m4 [new file with mode: 0644]
gnulib/m4/progtest.m4 [new file with mode: 0644]
gnulib/m4/putenv.m4 [new file with mode: 0644]
gnulib/m4/quote.m4 [new file with mode: 0644]
gnulib/m4/quotearg.m4 [new file with mode: 0644]
gnulib/m4/readlink.m4 [new file with mode: 0644]
gnulib/m4/readlinkat.m4 [new file with mode: 0644]
gnulib/m4/realloc.m4 [new file with mode: 0644]
gnulib/m4/regex.m4 [new file with mode: 0644]
gnulib/m4/rmdir.m4 [new file with mode: 0644]
gnulib/m4/rpmatch.m4 [new file with mode: 0644]
gnulib/m4/same.m4 [new file with mode: 0644]
gnulib/m4/save-cwd.m4 [new file with mode: 0644]
gnulib/m4/savedir.m4 [new file with mode: 0644]
gnulib/m4/selinux-context-h.m4 [new file with mode: 0644]
gnulib/m4/selinux-selinux-h.m4 [new file with mode: 0644]
gnulib/m4/setenv.m4 [new file with mode: 0644]
gnulib/m4/setlocale.m4 [new file with mode: 0644]
gnulib/m4/size_max.m4 [new file with mode: 0644]
gnulib/m4/sleep.m4 [new file with mode: 0644]
gnulib/m4/snprintf.m4 [new file with mode: 0644]
gnulib/m4/ssize_t.m4 [new file with mode: 0644]
gnulib/m4/st_dm_mode.m4 [new file with mode: 0644]
gnulib/m4/stat-time.m4 [new file with mode: 0644]
gnulib/m4/stat.m4 [new file with mode: 0644]
gnulib/m4/stdarg.m4 [new file with mode: 0644]
gnulib/m4/stdbool.m4 [new file with mode: 0644]
gnulib/m4/stddef_h.m4 [new file with mode: 0644]
gnulib/m4/stdint.m4 [new file with mode: 0644]
gnulib/m4/stdint_h.m4 [new file with mode: 0644]
gnulib/m4/stdio-safer.m4 [new file with mode: 0644]
gnulib/m4/stdio_h.m4 [new file with mode: 0644]
gnulib/m4/stdlib_h.m4 [new file with mode: 0644]
gnulib/m4/stpcpy.m4 [new file with mode: 0644]
gnulib/m4/strcase.m4 [new file with mode: 0644]
gnulib/m4/strcasestr.m4 [new file with mode: 0644]
gnulib/m4/strdup.m4 [new file with mode: 0644]
gnulib/m4/strerror.m4 [new file with mode: 0644]
gnulib/m4/strftime.m4 [new file with mode: 0644]
gnulib/m4/string_h.m4 [new file with mode: 0644]
gnulib/m4/strings_h.m4 [new file with mode: 0644]
gnulib/m4/strndup.m4 [new file with mode: 0644]
gnulib/m4/strnlen.m4 [new file with mode: 0644]
gnulib/m4/strstr.m4 [new file with mode: 0644]
gnulib/m4/strtoimax.m4 [new file with mode: 0644]
gnulib/m4/strtol.m4 [new file with mode: 0644]
gnulib/m4/strtoll.m4 [new file with mode: 0644]
gnulib/m4/strtoul.m4 [new file with mode: 0644]
gnulib/m4/strtoull.m4 [new file with mode: 0644]
gnulib/m4/strtoumax.m4 [new file with mode: 0644]
gnulib/m4/symlink.m4 [new file with mode: 0644]
gnulib/m4/symlinkat.m4 [new file with mode: 0644]
gnulib/m4/sys_stat_h.m4 [new file with mode: 0644]
gnulib/m4/sys_time_h.m4 [new file with mode: 0644]
gnulib/m4/sys_wait_h.m4 [new file with mode: 0644]
gnulib/m4/thread.m4 [new file with mode: 0644]
gnulib/m4/threadlib.m4 [new file with mode: 0644]
gnulib/m4/time_h.m4 [new file with mode: 0644]
gnulib/m4/time_r.m4 [new file with mode: 0644]
gnulib/m4/timespec.m4 [new file with mode: 0644]
gnulib/m4/tm_gmtoff.m4 [new file with mode: 0644]
gnulib/m4/ungetc.m4 [new file with mode: 0644]
gnulib/m4/unistd-safer.m4 [new file with mode: 0644]
gnulib/m4/unistd_h.m4 [new file with mode: 0644]
gnulib/m4/unlink.m4 [new file with mode: 0644]
gnulib/m4/unlinkdir.m4 [new file with mode: 0644]
gnulib/m4/usleep.m4 [new file with mode: 0644]
gnulib/m4/vasnprintf.m4 [new file with mode: 0644]
gnulib/m4/version-etc.m4 [new file with mode: 0644]
gnulib/m4/warn-on-use.m4 [new file with mode: 0644]
gnulib/m4/warnings.m4 [new file with mode: 0644]
gnulib/m4/wchar_h.m4 [new file with mode: 0644]
gnulib/m4/wchar_t.m4 [new file with mode: 0644]
gnulib/m4/wcrtomb.m4 [new file with mode: 0644]
gnulib/m4/wctob.m4 [new file with mode: 0644]
gnulib/m4/wctomb.m4 [new file with mode: 0644]
gnulib/m4/wctype_h.m4 [new file with mode: 0644]
gnulib/m4/wcwidth.m4 [new file with mode: 0644]
gnulib/m4/wint_t.m4 [new file with mode: 0644]
gnulib/m4/xalloc.m4 [new file with mode: 0644]
gnulib/m4/xgetcwd.m4 [new file with mode: 0644]
gnulib/m4/xsize.m4 [new file with mode: 0644]
gnulib/m4/xstrndup.m4 [new file with mode: 0644]
gnulib/m4/xstrtod.m4 [new file with mode: 0644]
gnulib/m4/xstrtol.m4 [new file with mode: 0644]
gnulib/m4/yesno.m4 [new file with mode: 0644]
gnulib/m4/yield.m4 [new file with mode: 0644]
import-gnulib.config [new file with mode: 0644]
import-gnulib.sh [new file with mode: 0755]
lib/Makefile.am [new file with mode: 0644]
lib/Makefile.in [new file with mode: 0644]
lib/arg-max.h [new file with mode: 0644]
lib/buildcmd.c [new file with mode: 0644]
lib/buildcmd.h [new file with mode: 0644]
lib/check-regexprops.sh [new file with mode: 0755]
lib/dircallback.c [new file with mode: 0644]
lib/dircallback.h [new file with mode: 0644]
lib/extendbuf.c [new file with mode: 0644]
lib/extendbuf.h [new file with mode: 0644]
lib/fdleak.c [new file with mode: 0644]
lib/fdleak.h [new file with mode: 0644]
lib/findutils-version.c [new file with mode: 0644]
lib/findutils-version.h [new file with mode: 0644]
lib/forcefindlib.c [new file with mode: 0644]
lib/gnulib-version.c [new file with mode: 0644]
lib/gnulib-version.h [new file with mode: 0644]
lib/listfile.c [new file with mode: 0644]
lib/listfile.h [new file with mode: 0644]
lib/nextelem.c [new file with mode: 0644]
lib/nextelem.h [new file with mode: 0644]
lib/printquoted.c [new file with mode: 0644]
lib/printquoted.h [new file with mode: 0644]
lib/qmark.c [new file with mode: 0644]
lib/regexprops.c [new file with mode: 0644]
lib/regextype.c [new file with mode: 0644]
lib/regextype.h [new file with mode: 0644]
lib/safe-atoi.c [new file with mode: 0644]
lib/safe-atoi.h [new file with mode: 0644]
lib/savedirinfo.c [new file with mode: 0644]
lib/savedirinfo.h [new file with mode: 0644]
lib/unused-result.h [new file with mode: 0644]
lib/waitpid.c [new file with mode: 0644]
locate/Makefile.am [new file with mode: 0644]
locate/Makefile.in [new file with mode: 0644]
locate/bigram.c [new file with mode: 0644]
locate/code.c [new file with mode: 0644]
locate/dblocation.texi [new file with mode: 0644]
locate/frcode.c [new file with mode: 0644]
locate/locate.1 [new file with mode: 0644]
locate/locate.c [new file with mode: 0644]
locate/locatedb.5 [new file with mode: 0644]
locate/locatedb.h [new file with mode: 0644]
locate/testsuite/Makefile.am [new file with mode: 0644]
locate/testsuite/Makefile.in [new file with mode: 0644]
locate/testsuite/config/unix.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/bigendian.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/bigendian.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/bigprefix1.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/exceedshort.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/exists1.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/exists1.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/exists2.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/exists2.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/exists3.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/exists3.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/ignore_case1.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/ignore_case1.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/ignore_case2.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/ignore_case2.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/ignore_case3.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/ignore_case3.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/littleendian.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/littleendian.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/locateddb.old.powerpc.xi [new file with mode: 0644]
locate/testsuite/locate.gnu/locateddb.old.x86.xi [new file with mode: 0644]
locate/testsuite/locate.gnu/notexists1.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/notexists1.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/notexists2.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/notexists2.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/notexists3.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/notexists3.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/old_prefix.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/old_prefix.xo [new file with mode: 0644]
locate/testsuite/locate.gnu/regex1.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/space1st.exp [new file with mode: 0644]
locate/testsuite/locate.gnu/sv-bug-14535.exp [new file with mode: 0644]
locate/updatedb.1 [new file with mode: 0644]
locate/updatedb.sh [new file with mode: 0644]
locate/word_io.c [new file with mode: 0644]
m4/Makefile.am [new file with mode: 0644]
m4/Makefile.in [new file with mode: 0644]
m4/findlib.m4 [new file with mode: 0644]
m4/mkinstalldirs.m4 [new file with mode: 0644]
m4/noreturn.m4 [new file with mode: 0644]
m4/nullsort.m4 [new file with mode: 0644]
m4/order-bad.bin [new file with mode: 0644]
m4/order-good.bin [new file with mode: 0644]
m4/withfts.m4 [new file with mode: 0644]
maint.mk [new file with mode: 0644]
po/Makefile.in.in [new file with mode: 0644]
po/Makevars [new file with mode: 0644]
po/POTFILES.in [new file with mode: 0644]
po/Rules-quot [new file with mode: 0644]
po/be.gmo [new file with mode: 0644]
po/be.po [new file with mode: 0644]
po/bg.gmo [new file with mode: 0644]
po/bg.po [new file with mode: 0644]
po/boldquot.sed [new file with mode: 0644]
po/ca.gmo [new file with mode: 0644]
po/ca.po [new file with mode: 0644]
po/cs.gmo [new file with mode: 0644]
po/cs.po [new file with mode: 0644]
po/da.gmo [new file with mode: 0644]
po/da.po [new file with mode: 0644]
po/de.gmo [new file with mode: 0644]
po/de.po [new file with mode: 0644]
po/el.gmo [new file with mode: 0644]
po/el.po [new file with mode: 0644]
po/en@boldquot.header [new file with mode: 0644]
po/en@quot.header [new file with mode: 0644]
po/eo.gmo [new file with mode: 0644]
po/eo.po [new file with mode: 0644]
po/es.gmo [new file with mode: 0644]
po/es.po [new file with mode: 0644]
po/et.gmo [new file with mode: 0644]
po/et.po [new file with mode: 0644]
po/fi.gmo [new file with mode: 0644]
po/fi.po [new file with mode: 0644]
po/findutils.pot [new file with mode: 0644]
po/fr.gmo [new file with mode: 0644]
po/fr.po [new file with mode: 0644]
po/ga.gmo [new file with mode: 0644]
po/ga.po [new file with mode: 0644]
po/gl.gmo [new file with mode: 0644]
po/gl.po [new file with mode: 0644]
po/hr.gmo [new file with mode: 0644]
po/hr.po [new file with mode: 0644]
po/hu.gmo [new file with mode: 0644]
po/hu.po [new file with mode: 0644]
po/id.gmo [new file with mode: 0644]
po/id.po [new file with mode: 0644]
po/insert-header.sin [new file with mode: 0644]
po/it.gmo [new file with mode: 0644]
po/it.po [new file with mode: 0644]
po/ja.gmo [new file with mode: 0644]
po/ja.po [new file with mode: 0644]
po/ko.gmo [new file with mode: 0644]
po/ko.po [new file with mode: 0644]
po/lg.gmo [new file with mode: 0644]
po/lg.po [new file with mode: 0644]
po/lt.gmo [new file with mode: 0644]
po/lt.po [new file with mode: 0644]
po/ms.gmo [new file with mode: 0644]
po/ms.po [new file with mode: 0644]
po/nl.gmo [new file with mode: 0644]
po/nl.po [new file with mode: 0644]
po/pl.gmo [new file with mode: 0644]
po/pl.po [new file with mode: 0644]
po/pt.gmo [new file with mode: 0644]
po/pt.po [new file with mode: 0644]
po/pt_BR.gmo [new file with mode: 0644]
po/pt_BR.po [new file with mode: 0644]
po/quot.sed [new file with mode: 0644]
po/remove-potcdate.sin [new file with mode: 0644]
po/ro.gmo [new file with mode: 0644]
po/ro.po [new file with mode: 0644]
po/ru.gmo [new file with mode: 0644]
po/ru.po [new file with mode: 0644]
po/rw.gmo [new file with mode: 0644]
po/rw.po [new file with mode: 0644]
po/sk.gmo [new file with mode: 0644]
po/sk.po [new file with mode: 0644]
po/sl.gmo [new file with mode: 0644]
po/sl.po [new file with mode: 0644]
po/sr.gmo [new file with mode: 0644]
po/sr.po [new file with mode: 0644]
po/stamp-po [new file with mode: 0644]
po/sv.gmo [new file with mode: 0644]
po/sv.po [new file with mode: 0644]
po/tr.gmo [new file with mode: 0644]
po/tr.po [new file with mode: 0644]
po/uk.gmo [new file with mode: 0644]
po/uk.po [new file with mode: 0644]
po/vi.gmo [new file with mode: 0644]
po/vi.po [new file with mode: 0644]
po/zh_CN.gmo [new file with mode: 0644]
po/zh_CN.po [new file with mode: 0644]
po/zh_TW.gmo [new file with mode: 0644]
po/zh_TW.po [new file with mode: 0644]
stamp-h.in [new file with mode: 0644]
tests/Makefile.am [new file with mode: 0644]
tests/Makefile.in [new file with mode: 0644]
tests/anytostr.c [new file with mode: 0644]
tests/binary-io.h [new file with mode: 0644]
tests/dup-safer-flag.c [new file with mode: 0644]
tests/fd-safer-flag.c [new file with mode: 0644]
tests/ftell.c [new file with mode: 0644]
tests/getpagesize.c [new file with mode: 0644]
tests/getugroups.c [new file with mode: 0644]
tests/getugroups.h [new file with mode: 0644]
tests/glthread/lock.c [new file with mode: 0644]
tests/glthread/lock.h [new file with mode: 0644]
tests/glthread/thread.c [new file with mode: 0644]
tests/glthread/thread.h [new file with mode: 0644]
tests/glthread/threadlib.c [new file with mode: 0644]
tests/glthread/yield.h [new file with mode: 0644]
tests/ignore-value.h [new file with mode: 0644]
tests/imaxtostr.c [new file with mode: 0644]
tests/init.sh [new file with mode: 0644]
tests/inttostr.c [new file with mode: 0644]
tests/inttostr.h [new file with mode: 0644]
tests/localename.c [new file with mode: 0644]
tests/localename.h [new file with mode: 0644]
tests/macros.h [new file with mode: 0644]
tests/mgetgroups.c [new file with mode: 0644]
tests/mgetgroups.h [new file with mode: 0644]
tests/nap.h [new file with mode: 0644]
tests/offtostr.c [new file with mode: 0644]
tests/priv-set.c [new file with mode: 0644]
tests/priv-set.h [new file with mode: 0644]
tests/putenv.c [new file with mode: 0644]
tests/setlocale.c [new file with mode: 0644]
tests/signature.h [new file with mode: 0644]
tests/sleep.c [new file with mode: 0644]
tests/symlink.c [new file with mode: 0644]
tests/symlinkat.c [new file with mode: 0644]
tests/test-alloca-opt.c [new file with mode: 0644]
tests/test-areadlink-with-size.c [new file with mode: 0644]
tests/test-areadlink.c [new file with mode: 0644]
tests/test-areadlink.h [new file with mode: 0644]
tests/test-areadlinkat.c [new file with mode: 0644]
tests/test-argmatch.c [new file with mode: 0644]
tests/test-binary-io.c [new file with mode: 0644]
tests/test-binary-io.sh [new file with mode: 0755]
tests/test-bitrotate.c [new file with mode: 0644]
tests/test-btowc.c [new file with mode: 0644]
tests/test-btowc1.sh [new file with mode: 0755]
tests/test-btowc2.sh [new file with mode: 0755]
tests/test-c-ctype.c [new file with mode: 0644]
tests/test-c-strcase.sh [new file with mode: 0755]
tests/test-c-strcasecmp.c [new file with mode: 0644]
tests/test-c-strcasestr.c [new file with mode: 0644]
tests/test-c-strncasecmp.c [new file with mode: 0644]
tests/test-c-strstr.c [new file with mode: 0644]
tests/test-canonicalize.c [new file with mode: 0644]
tests/test-chown.c [new file with mode: 0644]
tests/test-chown.h [new file with mode: 0644]
tests/test-cloexec.c [new file with mode: 0644]
tests/test-closein.c [new file with mode: 0644]
tests/test-closein.sh [new file with mode: 0755]
tests/test-ctype.c [new file with mode: 0644]
tests/test-dirent-safer.c [new file with mode: 0644]
tests/test-dirent.c [new file with mode: 0644]
tests/test-dirname.c [new file with mode: 0644]
tests/test-dup-safer.c [new file with mode: 0644]
tests/test-dup2.c [new file with mode: 0644]
tests/test-environ.c [new file with mode: 0644]
tests/test-errno.c [new file with mode: 0644]
tests/test-fchdir.c [new file with mode: 0644]
tests/test-fchownat.c [new file with mode: 0644]
tests/test-fcntl-h.c [new file with mode: 0644]
tests/test-fcntl-safer.c [new file with mode: 0644]
tests/test-fcntl.c [new file with mode: 0644]
tests/test-fdopendir.c [new file with mode: 0644]
tests/test-fflush.c [new file with mode: 0644]
tests/test-fflush2.c [new file with mode: 0644]
tests/test-fflush2.sh [new file with mode: 0755]
tests/test-fnmatch.c [new file with mode: 0644]
tests/test-fopen-safer.c [new file with mode: 0644]
tests/test-fopen.c [new file with mode: 0644]
tests/test-fopen.h [new file with mode: 0644]
tests/test-fpending.c [new file with mode: 0644]
tests/test-fpending.sh [new file with mode: 0755]
tests/test-fpurge.c [new file with mode: 0644]
tests/test-freadahead.c [new file with mode: 0644]
tests/test-freadahead.sh [new file with mode: 0755]
tests/test-freading.c [new file with mode: 0644]
tests/test-fseeko.c [new file with mode: 0644]
tests/test-fseeko.sh [new file with mode: 0755]
tests/test-fseeko2.sh [new file with mode: 0755]
tests/test-fstatat.c [new file with mode: 0644]
tests/test-ftell.c [new file with mode: 0644]
tests/test-ftell.sh [new file with mode: 0755]
tests/test-ftell2.sh [new file with mode: 0755]
tests/test-ftell3.c [new file with mode: 0644]
tests/test-ftello.c [new file with mode: 0644]
tests/test-ftello.sh [new file with mode: 0755]
tests/test-ftello2.sh [new file with mode: 0755]
tests/test-ftello3.c [new file with mode: 0644]
tests/test-getcwd.c [new file with mode: 0644]
tests/test-getdelim.c [new file with mode: 0644]
tests/test-getdtablesize.c [new file with mode: 0644]
tests/test-getgroups.c [new file with mode: 0644]
tests/test-getline.c [new file with mode: 0644]
tests/test-getopt.c [new file with mode: 0644]
tests/test-getopt.h [new file with mode: 0644]
tests/test-getopt_long.h [new file with mode: 0644]
tests/test-gettimeofday.c [new file with mode: 0644]
tests/test-hash.c [new file with mode: 0644]
tests/test-i-ring.c [new file with mode: 0644]
tests/test-ignore-value.c [new file with mode: 0644]
tests/test-inttostr.c [new file with mode: 0644]
tests/test-inttypes.c [new file with mode: 0644]
tests/test-isblank.c [new file with mode: 0644]
tests/test-iswblank.c [new file with mode: 0644]
tests/test-langinfo.c [new file with mode: 0644]
tests/test-lchown.c [new file with mode: 0644]
tests/test-lchown.h [new file with mode: 0644]
tests/test-locale.c [new file with mode: 0644]
tests/test-localename.c [new file with mode: 0644]
tests/test-lock.c [new file with mode: 0644]
tests/test-lseek.c [new file with mode: 0644]
tests/test-lseek.sh [new file with mode: 0755]
tests/test-lstat.c [new file with mode: 0644]
tests/test-lstat.h [new file with mode: 0644]
tests/test-malloc-gnu.c [new file with mode: 0644]
tests/test-malloca.c [new file with mode: 0644]
tests/test-math.c [new file with mode: 0644]
tests/test-mbrtowc-w32-1.sh [new file with mode: 0755]
tests/test-mbrtowc-w32-2.sh [new file with mode: 0755]
tests/test-mbrtowc-w32-3.sh [new file with mode: 0755]
tests/test-mbrtowc-w32-4.sh [new file with mode: 0755]
tests/test-mbrtowc-w32-5.sh [new file with mode: 0755]
tests/test-mbrtowc-w32.c [new file with mode: 0644]
tests/test-mbrtowc.c [new file with mode: 0644]
tests/test-mbrtowc1.sh [new file with mode: 0755]
tests/test-mbrtowc2.sh [new file with mode: 0755]
tests/test-mbrtowc3.sh [new file with mode: 0755]
tests/test-mbrtowc4.sh [new file with mode: 0755]
tests/test-mbscasestr1.c [new file with mode: 0644]
tests/test-mbscasestr2.c [new file with mode: 0644]
tests/test-mbscasestr2.sh [new file with mode: 0755]
tests/test-mbscasestr3.c [new file with mode: 0644]
tests/test-mbscasestr3.sh [new file with mode: 0755]
tests/test-mbscasestr4.c [new file with mode: 0644]
tests/test-mbscasestr4.sh [new file with mode: 0755]
tests/test-mbsinit.c [new file with mode: 0644]
tests/test-mbsinit.sh [new file with mode: 0755]
tests/test-mbsrtowcs.c [new file with mode: 0644]
tests/test-mbsrtowcs1.sh [new file with mode: 0755]
tests/test-mbsrtowcs2.sh [new file with mode: 0755]
tests/test-mbsrtowcs3.sh [new file with mode: 0755]
tests/test-mbsrtowcs4.sh [new file with mode: 0755]
tests/test-mbsstr1.c [new file with mode: 0644]
tests/test-mbsstr2.c [new file with mode: 0644]
tests/test-mbsstr2.sh [new file with mode: 0755]
tests/test-mbsstr3.c [new file with mode: 0644]
tests/test-mbsstr3.sh [new file with mode: 0755]
tests/test-memchr.c [new file with mode: 0644]
tests/test-memrchr.c [new file with mode: 0644]
tests/test-mkdir.c [new file with mode: 0644]
tests/test-mkdir.h [new file with mode: 0644]
tests/test-mkdirat.c [new file with mode: 0644]
tests/test-modf.c [new file with mode: 0644]
tests/test-nl_langinfo.c [new file with mode: 0644]
tests/test-nl_langinfo.sh [new file with mode: 0755]
tests/test-open.c [new file with mode: 0644]
tests/test-open.h [new file with mode: 0644]
tests/test-openat-safer.c [new file with mode: 0644]
tests/test-openat.c [new file with mode: 0644]
tests/test-parse-datetime.c [new file with mode: 0644]
tests/test-perror.c [new file with mode: 0644]
tests/test-perror.sh [new file with mode: 0755]
tests/test-priv-set.c [new file with mode: 0644]
tests/test-quotearg-simple.c [new file with mode: 0644]
tests/test-quotearg.h [new file with mode: 0644]
tests/test-readlink.c [new file with mode: 0644]
tests/test-readlink.h [new file with mode: 0644]
tests/test-readlinkat.c [new file with mode: 0644]
tests/test-realloc-gnu.c [new file with mode: 0644]
tests/test-rmdir.c [new file with mode: 0644]
tests/test-rmdir.h [new file with mode: 0644]
tests/test-setenv.c [new file with mode: 0644]
tests/test-setlocale1.c [new file with mode: 0644]
tests/test-setlocale1.sh [new file with mode: 0755]
tests/test-setlocale2.c [new file with mode: 0644]
tests/test-setlocale2.sh [new file with mode: 0755]
tests/test-sleep.c [new file with mode: 0644]
tests/test-snprintf.c [new file with mode: 0644]
tests/test-stat-time.c [new file with mode: 0644]
tests/test-stat.c [new file with mode: 0644]
tests/test-stat.h [new file with mode: 0644]
tests/test-stdbool.c [new file with mode: 0644]
tests/test-stddef.c [new file with mode: 0644]
tests/test-stdint.c [new file with mode: 0644]
tests/test-stdio.c [new file with mode: 0644]
tests/test-stdlib.c [new file with mode: 0644]
tests/test-strcasestr.c [new file with mode: 0644]
tests/test-strerror.c [new file with mode: 0644]
tests/test-strftime.c [new file with mode: 0644]
tests/test-string.c [new file with mode: 0644]
tests/test-strings.c [new file with mode: 0644]
tests/test-strnlen.c [new file with mode: 0644]
tests/test-strstr.c [new file with mode: 0644]
tests/test-symlink.c [new file with mode: 0644]
tests/test-symlink.h [new file with mode: 0644]
tests/test-symlinkat.c [new file with mode: 0644]
tests/test-sys_stat.c [new file with mode: 0644]
tests/test-sys_time.c [new file with mode: 0644]
tests/test-sys_wait.c [new file with mode: 0644]
tests/test-sys_wait.h [new file with mode: 0644]
tests/test-time.c [new file with mode: 0644]
tests/test-unistd.c [new file with mode: 0644]
tests/test-unlink.c [new file with mode: 0644]
tests/test-unlink.h [new file with mode: 0644]
tests/test-unlinkat.c [new file with mode: 0644]
tests/test-unsetenv.c [new file with mode: 0644]
tests/test-update-copyright.sh [new file with mode: 0755]
tests/test-usleep.c [new file with mode: 0644]
tests/test-vasnprintf.c [new file with mode: 0644]
tests/test-vc-list-files-cvs.sh [new file with mode: 0755]
tests/test-vc-list-files-git.sh [new file with mode: 0755]
tests/test-verify.c [new file with mode: 0644]
tests/test-verify.sh [new file with mode: 0755]
tests/test-version-etc.c [new file with mode: 0644]
tests/test-version-etc.sh [new file with mode: 0755]
tests/test-wchar.c [new file with mode: 0644]
tests/test-wcrtomb-w32-1.sh [new file with mode: 0755]
tests/test-wcrtomb-w32-2.sh [new file with mode: 0755]
tests/test-wcrtomb-w32-3.sh [new file with mode: 0755]
tests/test-wcrtomb-w32-4.sh [new file with mode: 0755]
tests/test-wcrtomb-w32-5.sh [new file with mode: 0755]
tests/test-wcrtomb-w32.c [new file with mode: 0644]
tests/test-wcrtomb.c [new file with mode: 0644]
tests/test-wcrtomb.sh [new file with mode: 0755]
tests/test-wctype-h.c [new file with mode: 0644]
tests/test-wcwidth.c [new file with mode: 0644]
tests/test-xalloc-die.c [new file with mode: 0644]
tests/test-xalloc-die.sh [new file with mode: 0755]
tests/test-xstrtol.c [new file with mode: 0644]
tests/test-xstrtol.sh [new file with mode: 0755]
tests/test-xstrtoul.c [new file with mode: 0644]
tests/test-xstrtoumax.c [new file with mode: 0644]
tests/test-xstrtoumax.sh [new file with mode: 0755]
tests/test-yesno.c [new file with mode: 0644]
tests/test-yesno.sh [new file with mode: 0755]
tests/uinttostr.c [new file with mode: 0644]
tests/umaxtostr.c [new file with mode: 0644]
tests/uniwidth/test-uc_width.c [new file with mode: 0644]
tests/uniwidth/test-uc_width2.c [new file with mode: 0644]
tests/uniwidth/test-uc_width2.sh [new file with mode: 0755]
tests/unlinkdir.c [new file with mode: 0644]
tests/unlinkdir.h [new file with mode: 0644]
tests/usleep.c [new file with mode: 0644]
tests/wctob.c [new file with mode: 0644]
tests/wctomb-impl.h [new file with mode: 0644]
tests/wctomb.c [new file with mode: 0644]
tests/zerosize-ptr.h [new file with mode: 0644]
tool-versions.txt [new file with mode: 0644]
xargs/Makefile.am [new file with mode: 0644]
xargs/Makefile.in [new file with mode: 0644]
xargs/testsuite/Makefile.am [new file with mode: 0644]
xargs/testsuite/Makefile.in [new file with mode: 0644]
xargs/testsuite/config/unix.exp [new file with mode: 0644]
xargs/testsuite/inputs/16383-ys.xi [new file with mode: 0644]
xargs/testsuite/inputs/32767-ys.xi [new file with mode: 0644]
xargs/testsuite/inputs/EOF.xi [new file with mode: 0644]
xargs/testsuite/inputs/EOFb.xi [new file with mode: 0644]
xargs/testsuite/inputs/EOFe.xi [new file with mode: 0644]
xargs/testsuite/inputs/Pdata.xi [new file with mode: 0644]
xargs/testsuite/inputs/blank.xi [new file with mode: 0644]
xargs/testsuite/inputs/empty.xi [new file with mode: 0644]
xargs/testsuite/inputs/eof1.xi [new file with mode: 0644]
xargs/testsuite/inputs/eof_-0.xi [new file with mode: 0644]
xargs/testsuite/inputs/eof_.xi [new file with mode: 0644]
xargs/testsuite/inputs/eofstr.xi [new file with mode: 0644]
xargs/testsuite/inputs/ett.xi [new file with mode: 0644]
xargs/testsuite/inputs/files.xi [new file with mode: 0644]
xargs/testsuite/inputs/files0.xi [new file with mode: 0644]
xargs/testsuite/inputs/foobar.xi [new file with mode: 0644]
xargs/testsuite/inputs/formfeeds.xi [new file with mode: 0644]
xargs/testsuite/inputs/ftt.xi [new file with mode: 0644]
xargs/testsuite/inputs/helloworld.xi [new file with mode: 0644]
xargs/testsuite/inputs/items-0.xi [new file with mode: 0644]
xargs/testsuite/inputs/items.xi [new file with mode: 0644]
xargs/testsuite/inputs/ldata-0.xi [new file with mode: 0644]
xargs/testsuite/inputs/ldata.xi [new file with mode: 0644]
xargs/testsuite/inputs/ldatab-0.xi [new file with mode: 0644]
xargs/testsuite/inputs/ldatab.xi [new file with mode: 0644]
xargs/testsuite/inputs/lines.xi [new file with mode: 0644]
xargs/testsuite/inputs/noeof-0.xi [new file with mode: 0644]
xargs/testsuite/inputs/noeof.xi [new file with mode: 0644]
xargs/testsuite/inputs/quotes.xi [new file with mode: 0644]
xargs/testsuite/inputs/space.xi [new file with mode: 0644]
xargs/testsuite/inputs/stairs-0.xi [new file with mode: 0644]
xargs/testsuite/inputs/stairs.xi [new file with mode: 0644]
xargs/testsuite/inputs/stairs2-0.xi [new file with mode: 0644]
xargs/testsuite/inputs/stairs2.xi [new file with mode: 0644]
xargs/testsuite/inputs/stt.xi [new file with mode: 0644]
xargs/testsuite/inputs/sv-bug-20273.xi [new file with mode: 0644]
xargs/testsuite/inputs/unmatched.xi [new file with mode: 0644]
xargs/testsuite/inputs/unmatched2.xi [new file with mode: 0644]
xargs/testsuite/inputs/verticaltabs.xi [new file with mode: 0644]
xargs/testsuite/xargs.gnu/0n3.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/0n3.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/E_-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/E_-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/L2-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/L2-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/L2_2-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/L2_2-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/L3-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/L3-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/P3-n1-IARG.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/P3-n1-IARG.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/delim-o.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/delim-o.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/empty-r.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/empty_def-r.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/idef-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/idef-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/idef-s26-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/idef-s26-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/l1-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/l1-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/l1_2-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/l1_2-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n1-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n1-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n2-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n2-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n2-s26-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n2-s26-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n2-s26-x-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n2-s26-x-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n3-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n3-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n3-s36-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/n3-s36-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/noeof-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/noeof-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/nothing.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/nothing.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/r.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/r.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/s118-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/s118-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/s19-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/s19-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/s19_2-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/s20-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/s20-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/s30-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/s30-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/space-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/space-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.gnu/space-r.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/space-t-0.exp [new file with mode: 0644]
xargs/testsuite/xargs.gnu/space-t-0.xe [new file with mode: 0644]
xargs/testsuite/xargs.gnu/space-t-0.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/EEOF.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/EEOF.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/EEOFb.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/EEOFb.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/EEOFe.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/EEOFe.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/E_-IARG.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/E_-IARG.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/E_.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/E_.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/IARG-E_.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/IARG-E_.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/IARG-s15.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/IARG-s15.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/IARG.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/IARG.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/L2-n2.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/L2-n2.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/L2_2.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/L2_2.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/L3.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/L3.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/childfail.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/empty.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/empty.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/empty_def.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/empty_def.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/hithere.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/hithere.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/n1.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/n1.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/n2-s26-x.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/n2-s26-x.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/n2-s26.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/n2-s26.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/n2.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/n2.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/n3-s36.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/n3-s36.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/n3.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/n3.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/noeof.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/noeof.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/quotes.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/quotes.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/rc-123.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/rc-123.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/rc-124.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/rc-125.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/rc-126.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/rc-127.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/s118.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/s118.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/s19.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/s19.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/s19_2.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/s20.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/s20.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/s30.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/s30.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/s47.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/s47.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/s470.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/s470.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/s48.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/s48.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/s6.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/savannah-11865.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/savannah-11865.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/space-I.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/space.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/space.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/sv-bug-18714.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/sv-bug-18714.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/sv-bug-18714b.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/sv-bug-18714b.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/sv-bug-20273.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/sv-bug-20273.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/uc_L2.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/uc_L2.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/unmatched-n2-x.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/unmatched.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/unmatched.xo [new file with mode: 0644]
xargs/testsuite/xargs.posix/unmatched2.exp [new file with mode: 0644]
xargs/testsuite/xargs.posix/unmatched2.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/e.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/e.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/eEOF.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/eEOF.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/empty-t.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/empty-t.xe [new file with mode: 0644]
xargs/testsuite/xargs.sysv/empty-t.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/empty_def-t.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/empty_def-t.xe [new file with mode: 0644]
xargs/testsuite/xargs.sysv/empty_def-t.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/eof1.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/eof1.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/iARG.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/iARG.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/idef-s26.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/idef-s26.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/idef.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/idef.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/iquotes.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/iquotes.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/l1.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/l1.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/l1_2.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/l1_2.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/l1n4.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/l1n4.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/lc_l2.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/lc_l2.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/s30-t.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/s30-t.xe [new file with mode: 0644]
xargs/testsuite/xargs.sysv/s30-t.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/space-t.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/space-t.xe [new file with mode: 0644]
xargs/testsuite/xargs.sysv/space-t.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/sv-bug-18713.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/sv-bug-18713.xo [new file with mode: 0644]
xargs/testsuite/xargs.sysv/trace.exp [new file with mode: 0644]
xargs/testsuite/xargs.sysv/trace.xe [new file with mode: 0644]
xargs/testsuite/xargs.sysv/trace.xo [new file with mode: 0644]
xargs/xargs.1 [new file with mode: 0644]
xargs/xargs.c [new file with mode: 0644]

diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644 (file)
index 0000000..b1de1b6
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,1282 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international!  The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages.  A few packages already provide translations for their
+messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+1.1 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU `gettext'.  Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU `gettext' functions.  Installers may use special
+options at configuration time for changing the default behaviour.  The
+command:
+
+     ./configure --disable-nls
+
+will _totally_ disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl' library
+and will decide to use it.  If not, you may have to to use the
+`--with-libintl-prefix' option to tell `configure' where to look for it.
+
+   Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.2 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination.  If you happen to have the `LC_ALL' or some other
+`LC_xxx' environment variables set, you should unset them before
+setting `LANG', otherwise the setting of `LANG' will not have the
+desired effect.  Here `LL' is an ISO 639 two-letter language code, and
+`CC' is an ISO 3166 two-letter country code.  For example, let's
+suppose that you speak German and live in Germany.  At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
+locales supported by your system for your language by running the
+command `locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+   In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect.  For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.3 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://translationproject.org/', in the "Teams" area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `coordinator@translationproject.org' to
+reach the coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skills are praised more than
+programming skills, here.
+
+1.4 Available Packages
+======================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of June
+2010.  The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am an ar as ast az be be@latin bg bn_IN bs ca
+                        +--------------------------------------------------+
+     a2ps               |                       []                      [] |
+     aegis              |                                                  |
+     ant-phone          |                                                  |
+     anubis             |                                                  |
+     aspell             |                []                             [] |
+     bash               |                                                  |
+     bfd                |                                                  |
+     bibshelf           |                []                                |
+     binutils           |                                                  |
+     bison              |                                                  |
+     bison-runtime      |                []                                |
+     bluez-pin          | []             []                                |
+     bombono-dvd        |                                                  |
+     buzztard           |                                                  |
+     cflow              |                                                  |
+     clisp              |                                                  |
+     coreutils          |                                   []          [] |
+     cpio               |                                                  |
+     cppi               |                                                  |
+     cpplib             |                                               [] |
+     cryptsetup         |                                                  |
+     dfarc              |                                                  |
+     dialog             |                             []                [] |
+     dico               |                                                  |
+     diffutils          |                                               [] |
+     dink               |                                                  |
+     doodle             |                                                  |
+     e2fsprogs          |                                               [] |
+     enscript           |                                               [] |
+     exif               |                                                  |
+     fetchmail          |                                               [] |
+     findutils          |                                   []             |
+     flex               |                                               [] |
+     freedink           |                                                  |
+     gas                |                                                  |
+     gawk               |                []                             [] |
+     gcal               |                                               [] |
+     gcc                |                                                  |
+     gettext-examples   | []             []                 []          [] |
+     gettext-runtime    |                                   []          [] |
+     gettext-tools      |                                   []          [] |
+     gip                |                                   []             |
+     gjay               |                                                  |
+     gliv               |                                   []             |
+     glunarclock        |                []                 []             |
+     gnubiff            |                                                  |
+     gnucash            |                                               [] |
+     gnuedu             |                                                  |
+     gnulib             |                                                  |
+     gnunet             |                                                  |
+     gnunet-gtk         |                                                  |
+     gnutls             |                                                  |
+     gold               |                                                  |
+     gpe-aerial         |                                                  |
+     gpe-beam           |                                                  |
+     gpe-bluetooth      |                                                  |
+     gpe-calendar       |                                                  |
+     gpe-clock          |                []                                |
+     gpe-conf           |                                                  |
+     gpe-contacts       |                                                  |
+     gpe-edit           |                                                  |
+     gpe-filemanager    |                                                  |
+     gpe-go             |                                                  |
+     gpe-login          |                                                  |
+     gpe-ownerinfo      |                []                                |
+     gpe-package        |                                                  |
+     gpe-sketchbook     |                                                  |
+     gpe-su             |                []                                |
+     gpe-taskmanager    |                []                                |
+     gpe-timesheet      |                []                                |
+     gpe-today          |                []                                |
+     gpe-todo           |                                                  |
+     gphoto2            |                                                  |
+     gprof              |                                   []             |
+     gpsdrive           |                                                  |
+     gramadoir          |                                                  |
+     grep               |                                                  |
+     grub               |                []                             [] |
+     gsasl              |                                                  |
+     gss                |                                                  |
+     gst-plugins-bad    |                                   []             |
+     gst-plugins-base   |                                   []             |
+     gst-plugins-good   |                                   []             |
+     gst-plugins-ugly   |                                   []             |
+     gstreamer          | []                                []          [] |
+     gtick              |                                                  |
+     gtkam              |                       []                         |
+     gtkorphan          |                                   []             |
+     gtkspell           | []             []     []                         |
+     gutenprint         |                                                  |
+     hello              |                                   []             |
+     help2man           |                                                  |
+     hylafax            |                                                  |
+     idutils            |                                                  |
+     indent             |                                   []          [] |
+     iso_15924          |                                                  |
+     iso_3166           | []          []        []          []  []   [] [] |
+     iso_3166_2         |                                                  |
+     iso_4217           |                                                  |
+     iso_639            |             [] []     []              []         |
+     iso_639_3          |                                                  |
+     jwhois             |                                                  |
+     kbd                |                                                  |
+     keytouch           |                                               [] |
+     keytouch-editor    |                                                  |
+     keytouch-keyboa... |                                               [] |
+     klavaro            |          []                                      |
+     latrine            |                                                  |
+     ld                 |                                   []             |
+     leafpad            |                                   []          [] |
+     libc               |                                   []          [] |
+     libexif            |                       ()                         |
+     libextractor       |                                                  |
+     libgnutls          |                                                  |
+     libgpewidget       |                                                  |
+     libgpg-error       |                                                  |
+     libgphoto2         |                                                  |
+     libgphoto2_port    |                                                  |
+     libgsasl           |                                                  |
+     libiconv           |                                   []             |
+     libidn             |                                                  |
+     lifelines          |                                                  |
+     liferea            |                             []                [] |
+     lilypond           |                                                  |
+     linkdr             |          []                                      |
+     lordsawar          |                                                  |
+     lprng              |                                                  |
+     lynx               |                                               [] |
+     m4                 |                                                  |
+     mailfromd          |                                                  |
+     mailutils          |                                                  |
+     make               |                                                  |
+     man-db             |                                                  |
+     man-db-manpages    |                                                  |
+     minicom            |                                                  |
+     mkisofs            |                                                  |
+     myserver           |                                                  |
+     nano               |                                   []          [] |
+     opcodes            |                                                  |
+     parted             |                                                  |
+     pies               |                                                  |
+     popt               |                                                  |
+     psmisc             |                                                  |
+     pspp               |                                               [] |
+     pwdutils           |                                                  |
+     radius             |                                               [] |
+     recode             |                       []                      [] |
+     rosegarden         |                                                  |
+     rpm                |                                                  |
+     rush               |                                                  |
+     sarg               |                                                  |
+     screem             |                                                  |
+     scrollkeeper       |                    [] []                      [] |
+     sed                |                []                             [] |
+     sharutils          |                                   []          [] |
+     shishi             |                                                  |
+     skencil            |                                                  |
+     solfege            |                                                  |
+     solfege-manual     |                                                  |
+     soundtracker       |                                                  |
+     sp                 |                                                  |
+     sysstat            |                                                  |
+     tar                |                                   []             |
+     texinfo            |                                                  |
+     tin                |                                                  |
+     unicode-han-tra... |                                                  |
+     unicode-transla... |                                                  |
+     util-linux-ng      |                                               [] |
+     vice               |                                                  |
+     vmm                |                                                  |
+     vorbis-tools       |                                                  |
+     wastesedge         |                                                  |
+     wdiff              |                                                  |
+     wget               |                       []                      [] |
+     wyslij-po          |                                                  |
+     xchat              |                []     []          []          [] |
+     xdg-user-dirs      | []    []    [] []     []    []    []  []      [] |
+     xkeyboard-config   |                                   []          [] |
+                        +--------------------------------------------------+
+                          af am an ar as ast az be be@latin bg bn_IN bs ca
+                           6  0  1  2  3 19   1 10     3    28   3    1 38
+
+                          crh cs da  de  el en en_GB en_ZA eo es et eu fa
+                        +-------------------------------------------------+
+     a2ps               |     [] []  []  []     []            [] []       |
+     aegis              |        []  []                       []          |
+     ant-phone          |        []  ()                                   |
+     anubis             |        []  []                                   |
+     aspell             |     [] []  []         []            []          |
+     bash               |     []                           [] []          |
+     bfd                |                                     []          |
+     bibshelf           |        []  []                       []          |
+     binutils           |                                     []          |
+     bison              |            []  []                               |
+     bison-runtime      |        []  []  []                      []       |
+     bluez-pin          |     [] []  []  []                [] []          |
+     bombono-dvd        |        []                                       |
+     buzztard           |     [] []  []                                   |
+     cflow              |        []  []                                   |
+     clisp              |        []  []     []                []          |
+     coreutils          |     [] []  []                          []       |
+     cpio               |                                                 |
+     cppi               |                                                 |
+     cpplib             |        []  []                       []          |
+     cryptsetup         |            []                                   |
+     dfarc              |        []  []                       []          |
+     dialog             |        []  []                    [] []    []    |
+     dico               |                                                 |
+     diffutils          |     [] []  []  []                [] []          |
+     dink               |        []  []                       []          |
+     doodle             |            []                                   |
+     e2fsprogs          |     []     []                       []          |
+     enscript           |        []  []         []                        |
+     exif               |     () []  []                                   |
+     fetchmail          |     [] []  ()  []     []            []          |
+     findutils          |     [] []  []                                   |
+     flex               |            []                       []          |
+     freedink           |        []  []                       []          |
+     gas                |                                     []          |
+     gawk               |        []  []                       []          |
+     gcal               |                                     []          |
+     gcc                |            []                       []          |
+     gettext-examples   |            []  []                [] []          |
+     gettext-runtime    |        []  []                    [] []          |
+     gettext-tools      |            []                       []    []    |
+     gip                |        []  []                       []    []    |
+     gjay               |            []                                   |
+     gliv               |     [] []  []                                   |
+     glunarclock        |        []  []                                   |
+     gnubiff            |            ()                                   |
+     gnucash            |     []     ()  ()     ()            ()          |
+     gnuedu             |        []                           []          |
+     gnulib             |            []                       []          |
+     gnunet             |                                                 |
+     gnunet-gtk         |        []                                       |
+     gnutls             |     []     []                                   |
+     gold               |                                     []          |
+     gpe-aerial         |     [] []  []                       []          |
+     gpe-beam           |     [] []  []                       []          |
+     gpe-bluetooth      |        []  []                                   |
+     gpe-calendar       |        []                                       |
+     gpe-clock          |     [] []  []                       []          |
+     gpe-conf           |     [] []  []                                   |
+     gpe-contacts       |        []  []                       []          |
+     gpe-edit           |        []  []                                   |
+     gpe-filemanager    |        []  []                       []          |
+     gpe-go             |     [] []  []                       []          |
+     gpe-login          |        []  []                                   |
+     gpe-ownerinfo      |     [] []  []                       []          |
+     gpe-package        |        []  []                       []          |
+     gpe-sketchbook     |     [] []  []                       []          |
+     gpe-su             |     [] []  []                       []          |
+     gpe-taskmanager    |     [] []  []                       []          |
+     gpe-timesheet      |     [] []  []                       []          |
+     gpe-today          |     [] []  []                       []          |
+     gpe-todo           |        []  []                       []          |
+     gphoto2            |     [] []  ()         []            []    []    |
+     gprof              |        []  []                       []          |
+     gpsdrive           |        []                           [] []       |
+     gramadoir          |        []  []                    []             |
+     grep               |     []                                          |
+     grub               |        []  []                                   |
+     gsasl              |            []                                   |
+     gss                |                                                 |
+     gst-plugins-bad    |     [] []  []                       []    []    |
+     gst-plugins-base   |     [] []  []                       []    []    |
+     gst-plugins-good   |     [] []  []  []                   []    []    |
+     gst-plugins-ugly   |     [] []  []  []                   []    []    |
+     gstreamer          |     [] []  []                       []    []    |
+     gtick              |        []  ()                    []             |
+     gtkam              |     [] []  ()                    [] []          |
+     gtkorphan          |     [] []  []                    []             |
+     gtkspell           |     [] []  []  []                [] []    []    |
+     gutenprint         |        []  []         []                        |
+     hello              |        []  []                    [] []          |
+     help2man           |            []                                   |
+     hylafax            |            []                       []          |
+     idutils            |        []  []                                   |
+     indent             |     [] []  []                    [] [] [] []    |
+     iso_15924          |        []      ()                [] []          |
+     iso_3166           | []  [] []  []  ()                [] [] [] ()    |
+     iso_3166_2         |                ()                               |
+     iso_4217           |     [] []  []  ()                   [] []       |
+     iso_639            | []  [] []  []  ()                [] []          |
+     iso_639_3          | []                                              |
+     jwhois             |                                     []          |
+     kbd                |     [] []  []  []                   []          |
+     keytouch           |        []  []                                   |
+     keytouch-editor    |        []  []                                   |
+     keytouch-keyboa... |        []                                       |
+     klavaro            |     [] []  []                    []             |
+     latrine            |        []  ()                                   |
+     ld                 |        []                           []          |
+     leafpad            |     [] []  []  []                   []    []    |
+     libc               |     [] []  []                       []          |
+     libexif            |        []  []         ()                        |
+     libextractor       |                                                 |
+     libgnutls          |     []                                          |
+     libgpewidget       |        []  []                                   |
+     libgpg-error       |     []     []                                   |
+     libgphoto2         |        []  ()                                   |
+     libgphoto2_port    |        []  ()                             []    |
+     libgsasl           |                                                 |
+     libiconv           |     [] []  []                    []    []       |
+     libidn             |     []     []                    []             |
+     lifelines          |        []  ()                                   |
+     liferea            |     []     []  []                   []    []    |
+     lilypond           |     []     []                       []          |
+     linkdr             |        []  []                       []          |
+     lordsawar          |        []                                       |
+     lprng              |                                                 |
+     lynx               |     [] []  []                          []       |
+     m4                 |     [] []  []  []                               |
+     mailfromd          |                                                 |
+     mailutils          |                                     []          |
+     make               |        []  []                       []          |
+     man-db             |                                                 |
+     man-db-manpages    |                                                 |
+     minicom            |     [] []  []                       []          |
+     mkisofs            |                                                 |
+     myserver           |                                                 |
+     nano               |            []                       []    []    |
+     opcodes            |            []                       []          |
+     parted             |     []     []                                   |
+     pies               |                                                 |
+     popt               |     [] []  []                    [] []          |
+     psmisc             |     []     []                             []    |
+     pspp               |                                     []          |
+     pwdutils           |        []                                       |
+     radius             |                                     []          |
+     recode             |     [] []  []  []                [] []          |
+     rosegarden         |     ()     ()                       ()          |
+     rpm                |        []  []                       []          |
+     rush               |                                                 |
+     sarg               |                                                 |
+     screem             |                                                 |
+     scrollkeeper       |     [] []  []         []            []          |
+     sed                |     []     []  []                [] [] []       |
+     sharutils          |        []  []                       [] []       |
+     shishi             |                                                 |
+     skencil            |        []  ()                       []          |
+     solfege            |            []                    []    []       |
+     solfege-manual     |                                  []    []       |
+     soundtracker       |        []  []                       []          |
+     sp                 |            []                                   |
+     sysstat            |        []  []                             []    |
+     tar                |     []     []                          [] []    |
+     texinfo            |            []                    [] []          |
+     tin                |            []                          []       |
+     unicode-han-tra... |                                                 |
+     unicode-transla... |                                                 |
+     util-linux-ng      |     [] []  []                       []          |
+     vice               |        ()  ()                                   |
+     vmm                |            []                                   |
+     vorbis-tools       |     []                           []             |
+     wastesedge         |        []                                       |
+     wdiff              |            []                       []          |
+     wget               |     []     []                          []       |
+     wyslij-po          |                                                 |
+     xchat              |     []     []  []                   [] []       |
+     xdg-user-dirs      | []  [] []  []  []                [] [] [] []    |
+     xkeyboard-config   | []  [] []  []                    [] []          |
+                        +-------------------------------------------------+
+                          crh cs da  de  el en en_GB en_ZA eo es et eu fa
+                           5  64 105 117 18  1   8     0   28 89 18 19  0
+
+                          fi  fr  ga gl gu he hi hr hu hy id  is it ja ka kn
+                        +----------------------------------------------------+
+     a2ps               | []  []                          []        []       |
+     aegis              |     []                                 []          |
+     ant-phone          |     []                                 []          |
+     anubis             | []  []                          []     []          |
+     aspell             |     []  []                      []     []          |
+     bash               | []  []                          []        []       |
+     bfd                | []  []                          []                 |
+     bibshelf           | []  []  []                      []     []          |
+     binutils           | []  []                          []                 |
+     bison              | []  []  []                      []                 |
+     bison-runtime      | []  []  []                      []     [] []       |
+     bluez-pin          | []  []  []                [] [] []  []    []       |
+     bombono-dvd        | []                                                 |
+     buzztard           |                                 []                 |
+     cflow              | []      []                      []                 |
+     clisp              |     []                                             |
+     coreutils          |     []  []                []    []     []          |
+     cpio               | []  []  []                      []                 |
+     cppi               | []  []                                             |
+     cpplib             | []  []                          []                 |
+     cryptsetup         |     []                          []     []          |
+     dfarc              | []  []                                 []          |
+     dialog             |     []  [] []                   []  [] [] []       |
+     dico               |                                                    |
+     diffutils          | []  []  [] []    []       []    []     [] []       |
+     dink               |     []                                             |
+     doodle             |         []                             []          |
+     e2fsprogs          |     []                          []                 |
+     enscript           |     []  []             []       []                 |
+     exif               | []  []                          []  [] [] []       |
+     fetchmail          |     []                          []     [] []       |
+     findutils          | []  []  []                []    []     []          |
+     flex               | []  []  []                                         |
+     freedink           | []  []                          []                 |
+     gas                |     []                          []                 |
+     gawk               |     []  []       []             []     () []       |
+     gcal               |     []                                             |
+     gcc                |                                 []                 |
+     gettext-examples   | []  []  []                []    []     [] []       |
+     gettext-runtime    | []  []  []                      []     [] []       |
+     gettext-tools      |     []                          []     [] []       |
+     gip                | []  []  [] []                   []        []       |
+     gjay               | []                                                 |
+     gliv               | []  ()                                             |
+     glunarclock        | []      []                []    []                 |
+     gnubiff            |     ()                          []     ()          |
+     gnucash            | ()  ()           ()       ()           () []       |
+     gnuedu             |     []                                 []          |
+     gnulib             | []  []  []                []           [] []       |
+     gnunet             |                                                    |
+     gnunet-gtk         |     []                                             |
+     gnutls             |     []                                 []          |
+     gold               | []                              []                 |
+     gpe-aerial         | []  []                          []                 |
+     gpe-beam           | []  []                          []        []       |
+     gpe-bluetooth      | []                              []     [] []       |
+     gpe-calendar       | []                                        []       |
+     gpe-clock          | []  []                    []    []        []       |
+     gpe-conf           | []  []                          []        []       |
+     gpe-contacts       | []  []                          []        []       |
+     gpe-edit           | []                              []        []       |
+     gpe-filemanager    | []                        []    []        []       |
+     gpe-go             | []  []                    []    []        []       |
+     gpe-login          | []                              []        []       |
+     gpe-ownerinfo      | []  []                    []    []        []       |
+     gpe-package        | []                              []        []       |
+     gpe-sketchbook     | []  []                          []        []       |
+     gpe-su             | []  []     []             []    []        []       |
+     gpe-taskmanager    | []  []                    []    []        []       |
+     gpe-timesheet      | []  []  []                      []        []       |
+     gpe-today          | []  []  [] []             []    []        []       |
+     gpe-todo           | []                              []        []       |
+     gphoto2            | []  []                    []    []     [] []       |
+     gprof              | []  []  []                      []                 |
+     gpsdrive           |            []                   []     []          |
+     gramadoir          |     []  []                      []                 |
+     grep               | []                                     []          |
+     grub               | []                        []    []     []          |
+     gsasl              | []  []  []                      []     []          |
+     gss                | []  []  []                      []     []          |
+     gst-plugins-bad    | []  []                    []    []     [] []       |
+     gst-plugins-base   | []  []                    []    []     [] []       |
+     gst-plugins-good   | []  []                    []    []     [] []       |
+     gst-plugins-ugly   | []  []                    []    []     [] []       |
+     gstreamer          | []  []                    []    []     []          |
+     gtick              | []  []  []                      []     []          |
+     gtkam              |     []                    []    []     [] []       |
+     gtkorphan          |     []                          []     []          |
+     gtkspell           | []  []  [] []             [] [] []     [] []       |
+     gutenprint         | []  []                    []           []          |
+     hello              | []      []                      []                 |
+     help2man           | []  []                                             |
+     hylafax            |                                 []                 |
+     idutils            | []  []  []                []    []     []          |
+     indent             | []  []  [] []             []    []     [] []       |
+     iso_15924          | []  ()                          []     []          |
+     iso_3166           | []  ()  [] [] [] [] [] [] []    []     [] []       |
+     iso_3166_2         |     ()                    []    []     []          |
+     iso_4217           | []  ()                    []    []     [] []       |
+     iso_639            | []  ()  []    []          []    []     [] []    [] |
+     iso_639_3          |     ()                                 []       [] |
+     jwhois             | []  []                    []    []     []          |
+     kbd                |     []                          []                 |
+     keytouch           | []  []  []                []    []     []          |
+     keytouch-editor    | []      []                []    []     []          |
+     keytouch-keyboa... | []      []                []    []     []          |
+     klavaro            |            []             []                       |
+     latrine            | []                              []     []          |
+     ld                 | []  []  []                      []                 |
+     leafpad            | []  []  []       []       []    []     [] ()       |
+     libc               | []  []     []                   []        []       |
+     libexif            |                                        []          |
+     libextractor       |                                                    |
+     libgnutls          |     []                                 []          |
+     libgpewidget       | []      []                      []        []       |
+     libgpg-error       |     []                                 []          |
+     libgphoto2         |     []                                 [] []       |
+     libgphoto2_port    |     []                                 [] []       |
+     libgsasl           | []  []  []                      []     []          |
+     libiconv           | []  []  []                      []     [] []       |
+     libidn             | []  []                          []     []          |
+     lifelines          |     ()                                             |
+     liferea            |     []                    []           [] []       |
+     lilypond           | []  []                                             |
+     linkdr             | []               []    [] []           []          |
+     lordsawar          |                                                    |
+     lprng              |                                 []                 |
+     lynx               |     []                    []    []     [] []       |
+     m4                 | []  []  [] []                   []        []       |
+     mailfromd          |                                                    |
+     mailutils          |     []                          []                 |
+     make               | []  []  [] []    []    []       []     [] []       |
+     man-db             |                                 []     []          |
+     man-db-manpages    |                                 []                 |
+     minicom            | []  []                    []    []        []       |
+     mkisofs            | []  []                          []     []          |
+     myserver           |                                                    |
+     nano               | []  []  [] []             []           []          |
+     opcodes            | []  []  []                      []                 |
+     parted             |     []                          []     [] []       |
+     pies               |                                                    |
+     popt               | []  []  [] []             []    []  [] [] []       |
+     psmisc             | []  []                          []                 |
+     pspp               |                                                    |
+     pwdutils           |     []                          []                 |
+     radius             |     []                          []                 |
+     recode             | []  []  [] []    []       []    []     []          |
+     rosegarden         | ()  ()                          ()     () ()       |
+     rpm                |                                 []        []       |
+     rush               |                                                    |
+     sarg               |     []                                             |
+     screem             |                                        [] []       |
+     scrollkeeper       | []                        []    []     []          |
+     sed                | []  []  [] []             []    []     [] []       |
+     sharutils          | []  []  []                []    []     [] []       |
+     shishi             |     []                                             |
+     skencil            |     []                                             |
+     solfege            | []  []     []                          []          |
+     solfege-manual     |     []     []                                      |
+     soundtracker       |     []                                 []          |
+     sp                 |     []                                    ()       |
+     sysstat            | []  []                          []     [] []       |
+     tar                | []  []  []                []    []     [] []       |
+     texinfo            |     []                          []     [] []       |
+     tin                |     []                                             |
+     unicode-han-tra... |                                                    |
+     unicode-transla... |     []  []                                         |
+     util-linux-ng      | []  []                    []    []     [] []       |
+     vice               |     ()                    ()           ()          |
+     vmm                |     []                                             |
+     vorbis-tools       |                                 []                 |
+     wastesedge         |     ()                                 ()          |
+     wdiff              | []                                                 |
+     wget               | []  []  []             [] []    []     [] []       |
+     wyslij-po          | []  []                          []                 |
+     xchat              | []  []        []    []    []    []     [] []    [] |
+     xdg-user-dirs      | []  []  [] [] [] [] []    []    []  [] [] []    [] |
+     xkeyboard-config   | []  []                    []    []     []          |
+                        +----------------------------------------------------+
+                          fi  fr  ga gl gu he hi hr hu hy id  is it ja ka kn
+                          105 121 53 20  4  8  3  5 53  2 120  5 84 67  0  4
+
+                          ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
+                        +-----------------------------------------------+
+     a2ps               |                               []              |
+     aegis              |                                               |
+     ant-phone          |                                               |
+     anubis             |                               []    []        |
+     aspell             |                         []                    |
+     bash               |                                               |
+     bfd                |                                               |
+     bibshelf           |                []             []              |
+     binutils           |                                               |
+     bison              |                               []              |
+     bison-runtime      |       []    [] []             []    []        |
+     bluez-pin          |    [] []    [] []             []              |
+     bombono-dvd        |                                               |
+     buzztard           |                                               |
+     cflow              |                                               |
+     clisp              |                                               |
+     coreutils          |          []                                   |
+     cpio               |                                               |
+     cppi               |                                               |
+     cpplib             |                                               |
+     cryptsetup         |                                               |
+     dfarc              |                   []                          |
+     dialog             |    []       [] []             []    []        |
+     dico               |                                               |
+     diffutils          |                []             []              |
+     dink               |                                               |
+     doodle             |                                               |
+     e2fsprogs          |                                               |
+     enscript           |                                               |
+     exif               |                []                             |
+     fetchmail          |                                               |
+     findutils          |                                               |
+     flex               |                                               |
+     freedink           |                                     []        |
+     gas                |                                               |
+     gawk               |                                               |
+     gcal               |                                               |
+     gcc                |                                               |
+     gettext-examples   |       []       []             [] []           |
+     gettext-runtime    | []                                            |
+     gettext-tools      | []                                            |
+     gip                |                []             []              |
+     gjay               |                                               |
+     gliv               |                                               |
+     glunarclock        |                []                             |
+     gnubiff            |                                               |
+     gnucash            | ()          ()                      ()     () |
+     gnuedu             |                                               |
+     gnulib             |                                               |
+     gnunet             |                                               |
+     gnunet-gtk         |                                               |
+     gnutls             |                               []              |
+     gold               |                                               |
+     gpe-aerial         |                []                             |
+     gpe-beam           |                []                             |
+     gpe-bluetooth      |                []                []           |
+     gpe-calendar       |                []                             |
+     gpe-clock          | []    []       []             [] []           |
+     gpe-conf           | []             []                             |
+     gpe-contacts       | []             []                             |
+     gpe-edit           |                []                             |
+     gpe-filemanager    | []             []                             |
+     gpe-go             | []             []                []           |
+     gpe-login          |                []                             |
+     gpe-ownerinfo      |                []             []              |
+     gpe-package        | []             []                             |
+     gpe-sketchbook     | []             []                             |
+     gpe-su             | []    []       []             [] [] []        |
+     gpe-taskmanager    | [] [] []       []             [] []           |
+     gpe-timesheet      |                []             []              |
+     gpe-today          |       []       []             [] []           |
+     gpe-todo           |                []                   []        |
+     gphoto2            |                                               |
+     gprof              |                               []              |
+     gpsdrive           |                                               |
+     gramadoir          |                                               |
+     grep               |                                               |
+     grub               |                                               |
+     gsasl              |                                               |
+     gss                |                                               |
+     gst-plugins-bad    |             [] []                [] []        |
+     gst-plugins-base   |             [] []                             |
+     gst-plugins-good   |                []                []           |
+     gst-plugins-ugly   |             [] []             [] [] []        |
+     gstreamer          |                                               |
+     gtick              |                                               |
+     gtkam              |                                     []        |
+     gtkorphan          |                []                      []     |
+     gtkspell           |       []    [] []       []    []    [] []     |
+     gutenprint         |                                               |
+     hello              | []             []             []              |
+     help2man           |                                               |
+     hylafax            |                                               |
+     idutils            |                                               |
+     indent             |                                               |
+     iso_15924          |             [] []                             |
+     iso_3166           | [] []       () [] [] []    []       []        |
+     iso_3166_2         |                                               |
+     iso_4217           |             []                      []        |
+     iso_639            |                      []    []                 |
+     iso_639_3          |                            []                 |
+     jwhois             |                []                             |
+     kbd                |                                               |
+     keytouch           |                []                             |
+     keytouch-editor    |                []                             |
+     keytouch-keyboa... |                []                             |
+     klavaro            |                                     []        |
+     latrine            |                []                             |
+     ld                 |                                               |
+     leafpad            | []          [] []                             |
+     libc               | []                                            |
+     libexif            |                                               |
+     libextractor       |                                               |
+     libgnutls          |                               []              |
+     libgpewidget       |                []             []              |
+     libgpg-error       |                                               |
+     libgphoto2         |                                               |
+     libgphoto2_port    |                                               |
+     libgsasl           |                                               |
+     libiconv           |                                               |
+     libidn             |                                               |
+     lifelines          |                                               |
+     liferea            |                                               |
+     lilypond           |                                               |
+     linkdr             |                                               |
+     lordsawar          |                                               |
+     lprng              |                                               |
+     lynx               |                                               |
+     m4                 |                                               |
+     mailfromd          |                                               |
+     mailutils          |                                               |
+     make               | []                                            |
+     man-db             |                                               |
+     man-db-manpages    |                                               |
+     minicom            |                                     []        |
+     mkisofs            |                                               |
+     myserver           |                                               |
+     nano               |                               []    []        |
+     opcodes            |                                               |
+     parted             |                                               |
+     pies               |                                               |
+     popt               | []             []                   []        |
+     psmisc             |                                               |
+     pspp               |                                               |
+     pwdutils           |                                               |
+     radius             |                                               |
+     recode             |                                               |
+     rosegarden         |                                               |
+     rpm                |                                               |
+     rush               |                                               |
+     sarg               |                                               |
+     screem             |                                               |
+     scrollkeeper       |                                     []     [] |
+     sed                |                                               |
+     sharutils          |                                               |
+     shishi             |                                               |
+     skencil            |                                               |
+     solfege            |                                     []        |
+     solfege-manual     |                                               |
+     soundtracker       |                                               |
+     sp                 |                                               |
+     sysstat            |                []                             |
+     tar                |       []                                      |
+     texinfo            |                                     []        |
+     tin                |                                               |
+     unicode-han-tra... |                                               |
+     unicode-transla... |                                               |
+     util-linux-ng      |                                               |
+     vice               |                                               |
+     vmm                |                                               |
+     vorbis-tools       |                                               |
+     wastesedge         |                                               |
+     wdiff              |                                               |
+     wget               |             []                                |
+     wyslij-po          |                                               |
+     xchat              | []             [] []                          |
+     xdg-user-dirs      | [] []       [] [] []       []       [] []     |
+     xkeyboard-config   | []    []    []                                |
+                        +-----------------------------------------------+
+                          ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
+                          20  5 10  1 13 48  4  2  2  4 24 10 20  3   1
+
+                          nl  nn or pa pl  ps pt pt_BR ro ru rw sk sl sq sr
+                        +---------------------------------------------------+
+     a2ps               | []           []     []  []   [] []       []    [] |
+     aegis              | []                      []      []                |
+     ant-phone          |                         []   []                   |
+     anubis             | []           []                 []                |
+     aspell             | []                           [] []    [] []       |
+     bash               | []                                    []          |
+     bfd                |                                 []                |
+     bibshelf           | []  []                                            |
+     binutils           |                                 []    []          |
+     bison              | []           []                 []                |
+     bison-runtime      | []           []     []  []   [] []       []       |
+     bluez-pin          | []           []         []   [] []    [] []    [] |
+     bombono-dvd        |     []                          ()                |
+     buzztard           | []  []                                            |
+     cflow              |              []                                   |
+     clisp              | []                              []                |
+     coreutils          | []           []     []  []      []       []       |
+     cpio               | []           []                 []                |
+     cppi               |              []                                   |
+     cpplib             | []                                                |
+     cryptsetup         | []                                                |
+     dfarc              |              []                                   |
+     dialog             | []           []         []      []                |
+     dico               |              []                                   |
+     diffutils          | []           []         []   [] []             [] |
+     dink               | ()                                                |
+     doodle             | []                                          []    |
+     e2fsprogs          | []           []                                   |
+     enscript           | []                      []   [] []       []       |
+     exif               | []           []              [] ()    []          |
+     fetchmail          | []           []                 []          []    |
+     findutils          | []           []     []          []       []       |
+     flex               | []           []         []   [] []                |
+     freedink           | []           []                                   |
+     gas                |                                                   |
+     gawk               | []           []         []   []                   |
+     gcal               |                                                   |
+     gcc                |                                                [] |
+     gettext-examples   | []           []     []       [] []    [] []    [] |
+     gettext-runtime    | []  []       []     []       [] []    [] []    [] |
+     gettext-tools      |              []              [] []    [] []    [] |
+     gip                | []           []                 []    []       [] |
+     gjay               |                                                   |
+     gliv               | []           []         []   [] []    []          |
+     glunarclock        | []                      []   []       []       [] |
+     gnubiff            | []                           ()                   |
+     gnucash            | []           ()         ()      ()                |
+     gnuedu             | []                                                |
+     gnulib             | []           []                 []       []       |
+     gnunet             |                                                   |
+     gnunet-gtk         |                                                   |
+     gnutls             | []           []                                   |
+     gold               |                                                   |
+     gpe-aerial         | []                  []  []   [] []       []    [] |
+     gpe-beam           | []                  []  []   [] []       []    [] |
+     gpe-bluetooth      | []                      []                        |
+     gpe-calendar       |                         []      []       []    [] |
+     gpe-clock          | []                  []  []   [] []    [] []    [] |
+     gpe-conf           | []                  []  []   [] []    [] []       |
+     gpe-contacts       |                         []   [] []       []    [] |
+     gpe-edit           | []           []                          []       |
+     gpe-filemanager    | []                              []       []       |
+     gpe-go             | []           []         []   [] []    [] []    [] |
+     gpe-login          | []                      []                        |
+     gpe-ownerinfo      | []                  []  []   [] []    [] []    [] |
+     gpe-package        | []                                       []       |
+     gpe-sketchbook     | []                  []  []   [] []       []    [] |
+     gpe-su             | []                  []  []   [] []    [] []    [] |
+     gpe-taskmanager    | []                  []  []   [] []    [] []    [] |
+     gpe-timesheet      | []                  []  []   [] []    [] []    [] |
+     gpe-today          | []                  []  []   [] []    [] []    [] |
+     gpe-todo           | []                      []      []       []    [] |
+     gphoto2            | []        [] []         []   [] []    []       [] |
+     gprof              | []                      []   []                   |
+     gpsdrive           | []                              []                |
+     gramadoir          | []                                    []          |
+     grep               | []           []                 []    []          |
+     grub               | []           []                 []                |
+     gsasl              | []           []                       []       [] |
+     gss                |              []              []       []          |
+     gst-plugins-bad    | []           []         []      []    []    []    |
+     gst-plugins-base   | []           []         []      []    []          |
+     gst-plugins-good   | []           []         []      []    []          |
+     gst-plugins-ugly   | []           []         []      []    [] []       |
+     gstreamer          | []           []         []      []    []          |
+     gtick              | []                              []    []          |
+     gtkam              | []        [] []         []      []    []          |
+     gtkorphan          | []                                                |
+     gtkspell           | []           []     []  []   [] []    [] [] [] [] |
+     gutenprint         | []                              []                |
+     hello              | []           []                       [] []       |
+     help2man           |              []                 []                |
+     hylafax            | []                                                |
+     idutils            | []           []         []   [] []                |
+     indent             | []           []         []   [] []    []       [] |
+     iso_15924          | []           []                 []       []       |
+     iso_3166           | []  [] [] [] []     ()  []   [] [] [] [] [] [] [] |
+     iso_3166_2         | []           []                          []       |
+     iso_4217           | []  []       []     []          [] []    []    [] |
+     iso_639            | []     [] [] []                 [] [] [] []    [] |
+     iso_639_3          |        [] []                                      |
+     jwhois             | []           []         []   []                   |
+     kbd                | []           []              []                   |
+     keytouch           | []           []                       []          |
+     keytouch-editor    | []           []                       []          |
+     keytouch-keyboa... | []           []                       []          |
+     klavaro            | []                      []                        |
+     latrine            |              []                 []                |
+     ld                 |                                                   |
+     leafpad            | []  []       []     []  []      []    [] []    [] |
+     libc               | []           []                 []    []          |
+     libexif            | []           []         ()            []          |
+     libextractor       |                                                   |
+     libgnutls          | []           []                                   |
+     libgpewidget       | []           []                          []       |
+     libgpg-error       |              []              []                   |
+     libgphoto2         | []           []                                   |
+     libgphoto2_port    | []           []         []      []    []          |
+     libgsasl           | []           []              []       []       [] |
+     libiconv           | []           []                       [] []    [] |
+     libidn             | []           []                                   |
+     lifelines          | []           []                                   |
+     liferea            | []           []     []  []   [] ()    ()    []    |
+     lilypond           | []                                                |
+     linkdr             | []                  []          []                |
+     lordsawar          |                                                   |
+     lprng              |              []                                   |
+     lynx               | []                      []      []                |
+     m4                 | []           []         []   [] []                |
+     mailfromd          |              []                                   |
+     mailutils          |              []                                   |
+     make               | []           []         []      []                |
+     man-db             | []           []                 []                |
+     man-db-manpages    | []           []                 []                |
+     minicom            |              []         []   [] []                |
+     mkisofs            | []           []                 []                |
+     myserver           |                                                   |
+     nano               | []           []         []      []                |
+     opcodes            | []                           []                   |
+     parted             | []           []                 []    []          |
+     pies               |              []                                   |
+     popt               | []           []     []          []                |
+     psmisc             | []           []                 []                |
+     pspp               | []                      []                        |
+     pwdutils           |              []                                   |
+     radius             | []           []                 []                |
+     recode             | []           []     []  []   [] []    [] []       |
+     rosegarden         |              ()                 ()                |
+     rpm                | []           []     []                            |
+     rush               | []           []                                   |
+     sarg               |                                                   |
+     screem             |                                                   |
+     scrollkeeper       | []  []       []              [] []    []    [] [] |
+     sed                | []           []     []  []   [] []    [] []    [] |
+     sharutils          | []           []                 []             [] |
+     shishi             |              []                                   |
+     skencil            |                     []  []                        |
+     solfege            | []           []         []      []                |
+     solfege-manual     | []           []         []                        |
+     soundtracker       |                                       []          |
+     sp                 |                                                   |
+     sysstat            | []           []         []      []                |
+     tar                | []           []                 []       []       |
+     texinfo            | []           []              [] []                |
+     tin                |                                 []                |
+     unicode-han-tra... |                                                   |
+     unicode-transla... |                                                   |
+     util-linux-ng      | []           []         []      []       []       |
+     vice               | []                                                |
+     vmm                | []                                                |
+     vorbis-tools       | []           []                                   |
+     wastesedge         | []                                                |
+     wdiff              | []           []                                   |
+     wget               | []           []     []  []      []    [] []       |
+     wyslij-po          | []  []       []                                   |
+     xchat              | []        [] []     []          []    [] [] [] [] |
+     xdg-user-dirs      | []  [] [] [] []  [] []  []   [] []    [] [] [] [] |
+     xkeyboard-config   | []           []                 []                |
+                        +---------------------------------------------------+
+                          nl  nn or pa pl  ps pt pt_BR ro ru rw sk sl sq sr
+                          135 10  4  7 105  1 29  62   47 91  3 54 46  9 37
+
+                          sv  sw ta te tg th tr uk vi  wa zh_CN zh_HK zh_TW
+                        +---------------------------------------------------+
+     a2ps               | []              [] [] [] []                       | 27
+     aegis              |                          []                       |  9
+     ant-phone          | []                 []    []      []               |  9
+     anubis             | []                 [] [] []                       | 15
+     aspell             |                       [] []  []                   | 20
+     bash               | []                    [] []                       | 12
+     bfd                |                          []                       |  6
+     bibshelf           | []                       []      []               | 16
+     binutils           |                       [] []                       |  8
+     bison              | []                       []                       | 12
+     bison-runtime      | []              []    [] []      []          []   | 29
+     bluez-pin          | []              [] [] [] []  []  []          []   | 37
+     bombono-dvd        |                          []                       |  4
+     buzztard           |                          []                       |  7
+     cflow              |                       [] []      []               |  9
+     clisp              |                                                   | 10
+     coreutils          | []                    [] []      []               | 22
+     cpio               | []                 [] [] []      []          []   | 13
+     cppi               |                       [] []                       |  5
+     cpplib             | []                 [] [] []      []          []   | 14
+     cryptsetup         | []                       []                       |  7
+     dfarc              |                          []                       |  9
+     dialog             | []  []          []       []  []  []          []   | 30
+     dico               |                       []                          |  2
+     diffutils          | []                 [] [] []      []          []   | 30
+     dink               |                                                   |  4
+     doodle             | []                       []                       |  7
+     e2fsprogs          | []                 []    []                       | 11
+     enscript           | []                 [] [] []                       | 17
+     exif               | []                       []      []               | 16
+     fetchmail          |                    []    []      []               | 17
+     findutils          | []                 [] [] []      []               | 20
+     flex               | []                 []    []                  []   | 15
+     freedink           |                          []                       | 10
+     gas                |                    []                             |  4
+     gawk               | []                 []    []      []               | 18
+     gcal               | []                 []                             |  5
+     gcc                | []                 []            []               |  7
+     gettext-examples   | []                 [] [] []      []    []    []   | 34
+     gettext-runtime    | []                 [] [] []      []    []    []   | 29
+     gettext-tools      | []                 [] [] []      []          []   | 22
+     gip                | []                       []      []          []   | 22
+     gjay               |                          []                       |  3
+     gliv               | []                 []    []                       | 14
+     glunarclock        | []                       []  []  []          []   | 19
+     gnubiff            | []                       []                       |  4
+     gnucash            |                    () [] ()      []          ()   | 10
+     gnuedu             |                          []                  []   |  7
+     gnulib             | []                    [] []      []               | 16
+     gnunet             |                          []                       |  1
+     gnunet-gtk         | []                 []    []                       |  5
+     gnutls             | []                       []      []               | 10
+     gold               |                          []                       |  4
+     gpe-aerial         | []                       []      []               | 18
+     gpe-beam           | []                       []      []               | 19
+     gpe-bluetooth      | []                       []      []               | 13
+     gpe-calendar       | []                       []  []  []               | 12
+     gpe-clock          | []                 []    []  []  []               | 28
+     gpe-conf           | []                       []  []  []               | 20
+     gpe-contacts       | []                       []      []               | 17
+     gpe-edit           | []                       []      []               | 12
+     gpe-filemanager    | []                       []  []  []               | 16
+     gpe-go             | []                 []    []  []  []               | 25
+     gpe-login          | []                       []      []               | 11
+     gpe-ownerinfo      | []                 []    []      []          []   | 25
+     gpe-package        | []                       []      []               | 13
+     gpe-sketchbook     | []                       []      []               | 20
+     gpe-su             | []                 []    []  []  []               | 30
+     gpe-taskmanager    | []                 []    []  []  []               | 29
+     gpe-timesheet      | []                 []    []      []          []   | 25
+     gpe-today          | []                 []    []  []  []          []   | 30
+     gpe-todo           | []                       []  []  []               | 17
+     gphoto2            | []                    [] []      []          []   | 24
+     gprof              | []                 []    []                       | 15
+     gpsdrive           | []                       []      []               | 11
+     gramadoir          | []                       []      []               | 11
+     grep               |                 []       []      []               | 10
+     grub               | []                       []      []               | 14
+     gsasl              | []                       []      []          []   | 14
+     gss                | []                       []      []               | 11
+     gst-plugins-bad    | []                 []    []      []               | 26
+     gst-plugins-base   | []                 [] [] []      []               | 24
+     gst-plugins-good   | []                 []    []      []               | 24
+     gst-plugins-ugly   | []                 [] [] []      []               | 29
+     gstreamer          | []                    [] []      []               | 22
+     gtick              |                       [] []      []               | 13
+     gtkam              | []                       []      []               | 20
+     gtkorphan          | []                       []      []               | 14
+     gtkspell           | []              [] [] [] []  []  []    []    []   | 45
+     gutenprint         | []                                                | 10
+     hello              | []              [] []    []      []          []   | 21
+     help2man           | []                       []                       |  7
+     hylafax            |                          []                       |  5
+     idutils            | []                 []    []      []               | 17
+     indent             | []                 [] [] []      []          []   | 30
+     iso_15924          |                 ()    [] ()      []          []   | 16
+     iso_3166           | []        []    () [] [] ()  []  []    []    ()   | 53
+     iso_3166_2         |                 ()    [] ()      []               |  9
+     iso_4217           | []              () [] [] ()      []    []         | 26
+     iso_639            | []     [] []    ()    [] ()  []  []    []    []   | 38
+     iso_639_3          |        []                ()                       |  8
+     jwhois             | []                 []    []      []          []   | 16
+     kbd                | []                 [] [] []      []               | 15
+     keytouch           | []                       []      []               | 16
+     keytouch-editor    | []                       []      []               | 14
+     keytouch-keyboa... | []                       []      []               | 14
+     klavaro            |                          []                       | 11
+     latrine            |                    []    []      []               | 10
+     ld                 | []                 []    []                  []   | 11
+     leafpad            | []                 [] [] []      []          []   | 33
+     libc               | []                 []    []      []          []   | 21
+     libexif            |                          []      ()               |  7
+     libextractor       |                          []                       |  1
+     libgnutls          | []                       []      []               |  9
+     libgpewidget       | []                       []      []               | 14
+     libgpg-error       | []                       []      []               |  9
+     libgphoto2         |                       [] []                       |  8
+     libgphoto2_port    | []                    [] []                  []   | 14
+     libgsasl           | []                       []      []               | 13
+     libiconv           | []                       []  []  []               | 21
+     libidn             | ()                       []      []               | 11
+     lifelines          | []                                                |  4
+     liferea            | []                 []            []               | 21
+     lilypond           |                          []                       |  7
+     linkdr             | []                 []    []      []          []   | 17
+     lordsawar          |                                                   |  1
+     lprng              |                          []                       |  3
+     lynx               | []                 [] [] []                       | 17
+     m4                 | []                       []      []          []   | 19
+     mailfromd          |                       [] []                       |  3
+     mailutils          |                          []                       |  5
+     make               | []                 []    []      []               | 21
+     man-db             | []                       []      []               |  8
+     man-db-manpages    |                                                   |  4
+     minicom            | []                       []                       | 16
+     mkisofs            |                          []      []               |  9
+     myserver           |                                                   |  0
+     nano               | []                       []      []          []   | 21
+     opcodes            | []                 []    []                       | 11
+     parted             | []                 [] [] []                  []   | 15
+     pies               |                       [] []                       |  3
+     popt               | []              [] []    []      []          []   | 27
+     psmisc             | []                       []                       | 11
+     pspp               |                                                   |  4
+     pwdutils           | []                       []                       |  6
+     radius             |                       [] []                       |  9
+     recode             | []                 []    []      []               | 28
+     rosegarden         | ()                                                |  0
+     rpm                | []                       []                  []   | 11
+     rush               |                       [] []                       |  4
+     sarg               |                                                   |  1
+     screem             |                          []                       |  3
+     scrollkeeper       | []                 [] [] []                  []   | 27
+     sed                | []                 []    []      []          []   | 30
+     sharutils          | []                 []    []      []          []   | 22
+     shishi             |                          []                       |  3
+     skencil            | []                       []                       |  7
+     solfege            | []                 []    []      []               | 16
+     solfege-manual     |                    []                             |  8
+     soundtracker       | []                 []    []                       |  9
+     sp                 |                    []                             |  3
+     sysstat            |                          []      []               | 15
+     tar                | []                 [] [] []      []          []   | 23
+     texinfo            | []                 [] [] []      []               | 17
+     tin                |                                                   |  4
+     unicode-han-tra... |                                                   |  0
+     unicode-transla... |                                                   |  2
+     util-linux-ng      | []                 [] [] []                       | 20
+     vice               | ()                 ()                             |  1
+     vmm                |                          []                       |  4
+     vorbis-tools       |                          []                       |  6
+     wastesedge         |                                                   |  2
+     wdiff              | []                       []                       |  7
+     wget               | []                 []    []      []          []   | 26
+     wyslij-po          |                       [] []                       |  8
+     xchat              | []              []    [] []      []          []   | 36
+     xdg-user-dirs      | []     [] []    [] [] [] []      []    []    []   | 63
+     xkeyboard-config   | []                    [] []                       | 22
+                        +---------------------------------------------------+
+       85 teams           sv  sw ta te tg th tr uk vi  wa zh_CN zh_HK zh_TW
+      178 domains         119  1  3  3  0 10 65 51 155 17  98     7    41    2618
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If June 2010 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
+matrix with full percentage details can be found at
+`http://translationproject.org/extra/matrix.html'.
+
+1.5 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package.  Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library.  This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
+`coordinator@translationproject.org' to make the `.pot' files available
+to the translation teams.
+
diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..5038582
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,37 @@
+AUTHORS of findutils
+
+I do not know the name of the original author of the findutils
+package, but the authors of all the major components are known.  Eric
+B. Decker contributed GNU find and Michael Rendell contributed xargs.
+James A. Woods contributed locate.
+
+Here are the names of some authors culled from ChangeLog and
+miscellaneous other files.  The main criterion for whether your name
+ends up in this file or in THANKS is that the people with entries here
+donated code or documentation which was significant enough to require
+a copyright assignment.
+
+The locate program and its helper programs are derived (heavily
+modified) from James Woods' public domain fast-find code, which is
+also distributed with the 4.3BSD find.
+
+Eric B. Decker <cire@soe.ucsc.edu>, <cire831@gmail.com>
+Michael Rendell
+David J. MacKenzie
+Jim Meyering
+Tim Wood
+Kevin Dalley <kevind@rahul.net>
+Paul Eggert <eggert@cs.ucla.edu>
+James Youngman <jay@gnu.org>
+Jay Plett
+Paul Sheer
+Dmitry V. Levin
+Bas van Gompel
+Eric Blake <ebb9@byu.net>
+Andreas Metzler
+Kamil Dudka  <kdudka@redhat.com>
+
+The current maintainer of the findutils package is James Youngman.
+Questions about findutils should be addressed to the mailing list,
+<bug-findutils@gnu.org> which, contrary to the impression given by its
+name, is used for general discussion of the findutils package.
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..4432540
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,676 @@
+
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                      TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+  
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                    END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..9aaef49
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,9767 @@
+2011-05-11  James Youngman  <jay@gnu.org>
+
+       Prepare for release of findutils-4.5.10.
+       * NEWS: Update version number to 4.5.10 to prepare for that
+       release.  Add a release date (2011-05-11).
+       * configure.ac: Also update version number.
+       * po/*.po, po/findutils.pot: make dist changes these.
+
+       Savannah bug #30608 (Automagic dependency on selinux) is fixed.
+       * NEWS: Mention that Savannah bug #30608 (Automagic dependency on
+       selinux) is fixed.  The gnulib update on 2011-04-02 will have
+       included gnulib change 83e52ee5a420f8b552745a72e5869001b0f6da60
+       which fixes this problem.  The configure script now provides a
+       --without-selinux option.
+
+       Update Estonian translation.
+       * po/et.po: Update from the Translation Project.
+
+2010-05-24  Kamil Dudka  <kdudka@redhat.com>
+
+       Fix Savannah bug #29949, -execdir does not change working directory.
+       * find/pred.c (record_exec_dir): Do not throw the execdir when not
+       working in the cumulative mode.
+       * find/testsuite/find.gnu/execdir-multiple.exp: Add a test-case for
+       the bug #29949.
+       * NEWS: Mention this bugfix.
+
+2011-04-02  James Youngman  <jay@gnu.org>
+
+       Change "can not" to "cannot".
+       * lib/buildcmd.c (bc_push_arg): "can not" -> "cannot" in message.
+       * find/tree.c: Likewise in a comment.
+
+       Update Danish translation.
+       * po/da.po: Likewise.
+
+       Update Slovenian, German, Estonian, French, Japanese translations.
+       * po/sl.po: Updated from the Translation Project.
+       * po/de.po: Likewise.
+       * po/et.po: Likewise.
+       * po/fr.po: Likewise.
+       * po/ja.po: Likewise.
+
+       Update to the current version of gnulib.
+       * import-gnulib.config (gnulib_version): Update to the current
+       version of gnulib.
+       * configure.ac: Update to gettext 0.18.1.
+       * po/Rules-quot: Update this file from gettext.
+
+       Use parse-datetime instead of the obsolete module getdate.
+       * import-gnulib.config (modules): Import the gnulib module
+       parse-datetime instead of the obsolete module getdate.
+       * find/parser.c: Include parse-datetime.h instead of getdate.h.
+       * doc/find.texi: Include parse-datetime.texi instead of
+       getdate.texi.
+       * doc/Makefile.am (find_TEXINFOS): Use parse-datetime.texi instead
+       of getdate.texi.
+
+2010-10-23  James Youngman  <jay@gnu.org>
+
+       Savannah bug #31424: Work around Interix bug in _SC_ARG_MAX,
+       in which execve will fail with ENOMEM if we use a command line
+       somewhere between ARG_MAX and _SC_ARG_MAX.
+       * lib/arg-max.h: New file: undefine _SC_ARG_MAX if we cannot rely
+       on the value that sysconf produces.
+       * lib/Makefile.am (libfind_a_SOURCES): Add arg-max.h.
+       * lib/buildcmd.c: #include arg-max.h.
+       * xargs/xargs.c: Likewise.
+
+2010-10-21  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #31359: FAIL: test-strstr on alpha.
+       * import-gnulib.config (gnulib_version): Update the version of
+       gnulib.
+       * NEWS: Mention this bugfix.
+
+2010-10-11  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi (Further Reading on Security): Give some
+       references to further reading on security.
+       * NEWS: Mention this change.
+
+2010-08-16  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #30777.
+       * find/parser.c (insert_exec_ok): Fail if {} appears in an
+       argument between -exec ... \+ but it's not the whole argument
+       (that is, reject "FOO{}").  Previously the FOO prefix was accepted
+       but ignored, which is probably POSIX-incompliant and certainly
+       surprising.
+       * find/testsuite/find.posix/sv-bug-30777.exp: New test case for
+       Savannah bug #30777.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
+       find.posix/sv-bug-30777.exp.
+
+2010-08-15  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #30180, wrong error message for -size b300
+       * find/parser.c (parse_size): Don't print a suffix in the error
+       message if no suffix was specified.
+       * NEWS: Mention this change.
+
+       * po/da.po: Update Danish translation.
+
+2010-05-11  John Gilmore  <gnu@xargs.toad.com>
+
+       Fix bug arising when we receive SIGUSR2.
+       * xargs/xargs.c (xargs_do_exec): Don't assume that proc_max won't
+       decrease while we are waiting for a process to exit.  This happens
+       if we receive SIGUSR2.
+
+2010-05-09  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.1: Refer to signal(7) rather than signal(2).
+
+2010-05-08  John Gilmore  <gnu@xargs.toad.com>
+
+       Control xargs parallelism with SIGUSR1/SIGUSR2.
+       * xargs/xargs.c: Increase parallelism in mid-run with SIGUSR1;
+       decrease it with SIGUSR2.
+       * doc/find.texi, xargs/xargs.1, NEWS: Document SIGUSR1/2.
+
+2010-05-09  Sergei Golovan  <sgolovan@gmail.com> (tiny change)
+
+       Fix Savannah bug #29828, test suite deadlock on FreeBSD.
+       * find/testsuite/find.gnu/sv-bug-24169.exp: Read find output until
+       eof before calling wait, in order to avoid a deadlock on FreeBSD.
+
+2010-05-08  Andreas Metzler  <gnu@downhill.at.eu.org>
+
+       Fix a typo.  Use "\-" in nroff, rather than a naked "-".
+       * find/parser.c (check_option_combinations): Fix typo
+       "atomatically".
+       * find/find.1 (-name): protect nroff hyphens with backslashes.
+       * locate/locatedb.5: Likewise.
+
+2010-05-07  James Youngman  <jay@gnu.org>
+
+       * AUTHORS: Add Kamil Dudka.
+
+2010-05-07  Kamil Dudka  <kdudka@redhat.com>
+
+       * lib/dircallback.c (run_in_dir): Make sure that if the callback
+       doesn't get run, the return value is nonzero.  Make sure that if
+       the directory save/restore fails, we don't overwrite errno with a
+       random value (and hence report some unrelated and nonexistent
+       error, instead of the real problem).  Restore the previous current
+       directory.
+
+2010-05-04  James Youngman  <jay@gnu.org>
+
+       Bugfix: make sure make distdir works in VPATH directly after configure
+       * locate/Makefile.am (EXTRA_DIST): Add dblocation.texi.
+       (dblocation.texi): Always rebuild, but don't replace the existing
+       version if the content would not change.
+
+2010-04-30  James Youngman  <jay@gnu.org>
+
+       Update Finnish and Italian translations.
+       * po/fi.po: Updated Finnish translation.
+       * po/it.po: Updated Italian translation.
+       * NEWS: Mention these updates.
+
+       Move on from 4.5.9.
+       * NEWS: Bump the version number from 4.5.9 to 4.5.10-git.
+       * configure.ac: Likewise.
+
+2010-04-29  James Youngman  <jay@gnu.org>
+
+       Prepare for the release of findutils version 4.5.9.
+       * NEWS: Change the version number to 4.5.9.
+       * configure.ac: Likewise.
+
+       Preserve locate/dblocation.texi during 'make clean'.
+       * locate/Makefile.am (DISTCLEANFILES): Clean dblocation.texi for
+       'make distclean', but not 'make clean'.
+
+2010-04-18  James Youngman  <jay@gnu.org>
+
+       Remove redundant declarations.
+       * locate/frcode.c: Don't declare xmalloc, include xalloc.h instead.
+       * locate/code.c: Don't declare program_name, we already included
+       progname.h.
+
+       Remove support for compilers lacking prototypes.
+       * find/defs.h: Don't define or use the PARAMS macro.
+       * xargs/xargs.c: Likewise.
+       * locate/locatedb.h: Likewise.
+       * locate/frcode.c: Likewise.
+       * lib/buildcmd.c: Likewise.
+       * find/tree.c: Likewise.
+       * find/pred.c: Likewise.
+       * find/parser.c: Likewise.
+       * find/fstype.c: Likewise.
+       * find/find.c: Likewise.
+
+2010-04-21  James Youngman  <jay@gnu.org>
+
+       Update Chinese (simplified) translation.
+       * po/zh_CN.po: Updated from the Translation Project.
+       * NEWS: Mention this change.
+
+2010-04-18  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #29593: Make import-gnulib.sh work under a POSIX shell.
+       * import-gnulib.sh: Remove bash-specific '[[...]]' tests; instead
+       use '[...]'.
+       * NEWS: Mention this bugfix.
+
+2010-04-17  James Youngman  <jay@gnu.org>
+
+       Remove obsolete module strpbrk.
+       * import-gnulib.config (modules): Remove strpbrk.
+
+       * locate/Makefile.am (locate_TEXINFOS): Add dblocation.texi.
+
+2010-04-13  James Youngman  <jay@gnu.org>
+
+       Correct some test file names.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP):
+       find.gnu/sv-bug-25359-execdir.exp should in fact be
+       find.gnu/sv-bug-27563-execdir.exp and
+       find.posix/sv-bug-25359-exec.exp should be
+       find.posix/sv-bug-27563-exec.exp.
+
+       * .x-sc_prohibit_test_minus_ao: Condense the file (since the
+       entries are regular expressions anyway).
+
+       * .x-sc_prohibit_empty_lines_at_EOF: New file; exceptions for the
+       sc_prohibit_empty_lines_at_EOF syntax check.
+
+2010-04-11  James Youngman  <jay@gnu.org>
+
+       Make sure we don't open a file on a standard fd (that is, 0/1/2).
+       * lib/fdleak.c: Include fcntl--.h to turn calls to open into calls
+       to open_safer.
+       * find/find.c: Likewise.
+
+       After-the-fact change to NEWS for 4.5.8: fixed bug 27974.
+       * NEWS: Mention that release 4.5.8 also fixed bug #27974 (Use
+       gnulib's xreadlinkat support), though the NEWS file in that
+       release omitted to say so.
+
+       Fix Savannah bug #29511: fails to build on kfreebsd-*
+       * lib/fdleak.c (get_max_fd): Don't use RLIM_SAVED_MAX or
+       RLIM_SAVED_CUR.  Not only are they non-portable, they aren't
+       useful.
+       * NEWS: Mention this bugfix.
+
+       Remove some unused or dead code.
+       * find/util.c (hook_fstatat): This has been disabled and unused
+       for a long time, delete it.
+       * find/find.c (process_dir): Remove some unused debug code.
+       * find/tree.c (predlist_insert): Remove some dead code.
+       * lib/fdleak.c (complain_about_leaky_fds): Remove some unused
+       debug code.
+
+       Add a test case for Savannah bug 27563 (-L breaks -execdir).
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
+       find.gnu/sv-bug-27563-execdir.exp and
+       find.posix/sv-bug-27563-exec.exp.
+       (EXTRA_DIST_XO): Add find.gnu/sv-bug-27563-execdir.xo and
+       find.posix/sv-bug-27563-exec.xo.
+       * find/testsuite/find.gnu/sv-bug-27563-execdir.exp: New test.
+       * find/testsuite/find.posix/sv-bug-27563-exec.exp: New test.
+       * find/testsuite/find.gnu/sv-bug-27563-execdir.xo: Expected output.
+       * find/testsuite/find.posix/sv-bug-27563-exec.xo: Expected output.
+
+       Fix Savannah bug #27563, -L breaks -execdir.
+       * find/pred.c (initialise_wd_for_exec): New function, factoring
+       out part of the body of record_exec_dir.
+       (record_exec_dir): If state.rel_pathname contains a /, extract the
+       directory part and initialise execp->wd_for_exec to point at that
+       directory.
+       (impl_pred_exec): Rename new_impl_pred_exec to impl_pred_exec.
+       Drop the prefix and pfxlen parameters.  Compute the base name of
+       the target and pass that to the bc_push_arg function instead of
+       state.rel_pathname.  Deal with state.rel_pathname being an
+       absolute path (e.g. find / -execdir...).  Introduce a new
+       variable, result, allowing us to free the buffer used for the base
+       name in the return path.
+       (pred_exec): Don't pass the prefix and the prefix length any more.
+       (pred_execdir): Likewise.
+       (pred_ok): Likewise.
+       (pred_okdir): Likewise.
+
+2010-04-10  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #19593, -execdir .... {} + has suboptimal performance
+       * find/ftsfind.c (consider_visiting): Don't call
+       complete_pending_execdirs for every file we visit.
+       (find): Instead, call complete_pending_execdirs every time we
+       see a file which isn't at the same nesting level as the previous
+       file we saw.  This is an improvement but not optimal (since
+       descending into a subdirectory will cause us to issue an exec
+       before we've finished with the current directory).
+       * NEWS: Mention this change.
+
+        Exec predicates now store which directory they want to run in.
+        * lib/dircallback.c (run_in_dirfd): New name for old run_in_dir
+        function.
+        (run_in_dir): Like the old function of the same name, but now
+        takes an argument const struct saved_cwd *.
+        * lib/dircallback.h: Update declarations of run_in_dirfd and
+        run_in_dir.
+        * find/util.c: Include dircallback.h, xalloc.h, save-cwd.h.
+        (do_complete_pending_execdirs): Remove dir_fd parameter, since the
+        per-predicate data structures now indicate what directory they
+        need to be run in.  Instead of calling bc_do_exec directly, use a
+        callback 'exec_cb' that uses run_in_dir (which now takes a
+        saved_cwd* parameter instead of a file descriptor).
+        (do_exec): Called by do_complete_pending_execdirs, and simply uses
+        run_in_dir to call exec_cb, restoring the working directory
+        afterward.
+        (record_initial_cwd): New function, initialises the global
+        variable initial_wd.
+        (cleanup_initial_cwd): New function, cleans up the global variable
+        initial_wd.
+        (cleanup): Call cleanup_initial_cwd.
+        (get_start_dirfd): Remove.
+        (is_exec_in_local_dir): New function; true for predicates -execdir
+        and -okdir.
+        * find/pred.c: Include cloexec.h and save-cwd.h.
+        (record_exec_dir): New function, sets the value of
+        execp->wd_for_exec if needed.
+        (new_impl_pred_exec): Remove the obsolete dir_fd parameter.  Call
+        record_exec_dir.
+        (pred_exec): Don't pass the dir_fd parameter.
+        (pred_execdir): Likewise.
+        (pred_ok): Likewise.
+        (pred_okdir): Likewise.
+        (can_access): Call run_in_dirfd rather than run_in_dir (the
+        function was renamed).
+        (prep_child_for_exec): Remove dir_fd parameter; don't fchdir to
+        that.  Call restore_cwd instead (passing a saved_cwd* parameter
+        which replaced dir_fd).
+        (launch): Remove references to execp->use_current_dir.
+        (launch): Change references to execp->dir_fd to execp->wd_for_exec.
+        * find/parser.c: Correct indentiation of declaration of
+        insert_exec_ok and remove the obsolete dir_fd parameter.
+        (parse_exec): Don't pass the dir_fd parameter to insert_exec_ok.
+        (parse_execdir): Likewise.
+        (parse_ok): Likewise.
+        (parse_okdir): Likewise.
+        (insert_exec_ok): Remove obsolete dir_fd paramter.  Initialise
+        execp->wd_for_exec, either to NULL (for -*dir) or to the
+        initial_wd.
+        * find/ftsfind.c: Remove get_current_dirfd.  Remove
+        complete_execdirs_cb.
+        (consider_visiting): Call complete_pending_execdirs directly.
+        (main): Call record_initial_cwd to record the initial working
+        directory, early on.  Don't initialise starting_dir or
+        starting_desc, they have been removed.
+        * find/finddata.c: Include save-cwd.h.  Remove starting_dir and
+        starting_desc. Add new global variable initial_wd.  It is a struct
+        saved_wd* and represents find's initial working directory.
+        * find/find.c: Include save-cwd.h.
+        (main): Call record_initial_cwd in order to initialise the
+        global variable initial_wd  Don't set starting_desc and
+        starting_dir, since those variables have been removed.
+        (safely_chdir): Don't pass an fd to complete_pending_execdirs.
+        (chdir_back): Remove the safety check (since we are using fchdir
+        and in any case no longer have all the data that the existing
+        wd_sanity_check function wants).
+        (do_process_top_dir): Don't pass an fd to
+        complete_pending_execdirs.
+        (process_dir): Likewise.
+        * find/defs.h (struct exec_val): Remove use_current_dir and
+        dir_fd.  Replace with wd_for_exec, which is a struct saved_wd*.
+        (get_start_dirfd): Remove prototype.
+        (get_current_dirfd): Remove prototype.
+        (complete_pending_execdirs): No longer takes dir_fd parameter.
+        (record_initial_cwd): Add prototype.
+        (is_exec_in_local_dir): Add prototype.
+        (options): Declare.
+        (initial_wd): Add declaration.  It is a struct saved_wd* and
+        represents find's initial working directory.
+        (starting_dir): Remove declaration of global variable.
+        (starting_desc): Remove declaration of global variable.
+        * import-gnulib.config (modules): Import module save-cwd.
+
+2010-04-10  James Youngman  <jay@gnu.org>
+
+       Add a test which checks $CWD for find -execdir {} +/;
+       * find/testsuite/find.gnu/execdir-multiple.exp: New test; verifies
+       that for -execdir +, all the execs occur with the correct working
+       directory.
+       * find/testsuite/find.gnu/execdir-multiple.xo: Expected output for
+       this test.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add the new test.
+       (EXTRA_DIST_XO): Add the expected output file.
+       * find/testsuite/config/unix.exp (mkdir): Create proc "mkdir"
+       which creates a directory.
+       * find/testsuite/find.gnu/execdir-pwd1.exp: New test.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
+       execdir-pwd1.exp.
+
+2010-04-11  James Youngman  <jay@gnu.org>
+
+       Fix syntax checks problems for check sc_unmarked_diagnostics.
+       * find/tree.c (get_pred_cost): Clarify an error message and mark
+       it for translation.
+
+       Fix false positives for syntax check sc_prohibit_test_minus_ao.
+       * .x-sc_prohibit_test_minus_ao: Add all the DejaGnu scripts to the
+       list of exceptions to the 'test C1 -a C2' syntax check, since they
+       are not actually shell scripts.
+
+       Remove trailing blank lines.
+       * .x-sc_prohibit_empty_lines_at_EOF: Add list of exceptions to the
+       no-blank-lines-at-EOF syntax check.
+       * doc/regexprops.texi: Remove empty lines at the end of the file.
+       * find/finddata.c: Likewise.
+       * find/fstype.c: Likewise.
+       * find/testsuite/excuses.txt: Likewise.
+       * find/testsuite/find.gnu/access.exp: Likewise.
+       * find/testsuite/find.gnu/exec-one-rtn-fail.exp: Likewise.
+       * find/testsuite/find.gnu/posix-perminvalid.exp: Likewise.
+       * find/testsuite/find.gnu/samefile-missing.exp: Likewise.
+       * find/testsuite/find.gnu/samefile-p-brokenlink.exp: Likewise.
+       * find/testsuite/find.gnu/sv-bug-17490.exp: Likewise.
+       * find/testsuite/find.gnu/sv-bug-18222.exp: Likewise.
+       * find/testsuite/find.posix/bracket-depth.exp: Likewise.
+       * find/testsuite/find.posix/empty-parens.exp: Likewise.
+       * find/testsuite/find.posix/files-not-expressions1.exp: Likewise.
+       * find/testsuite/find.posix/files-not-expressions2.exp: Likewise.
+       * find/testsuite/find.posix/files-not-expressions3.exp: Likewise.
+       * find/testsuite/find.posix/group-empty.exp: Likewise.
+       * find/testsuite/find.posix/user-empty.exp: Likewise.
+       * find/testsuite/find.posix/user-missing.exp: Likewise.
+       * lib/extendbuf.c: Likewise.
+       * lib/fdleak.c: Likewise.
+       * lib/fdleak.h: Likewise.
+       * lib/findutils-version.h: Likewise.
+       * lib/gnulib-version.h: Likewise.
+       * lib/printquoted.c: Likewise.
+       * lib/regextype.c: Likewise.
+       * lib/safe-atoi.c: Likewise.
+       * locate/testsuite/config/unix.exp: Likewise.
+       * locate/testsuite/locate.gnu/exists1.exp: Likewise.
+       * locate/testsuite/locate.gnu/exists2.exp: Likewise.
+       * locate/testsuite/locate.gnu/exists3.exp: Likewise.
+       * locate/testsuite/locate.gnu/ignore_case1.exp: Likewise.
+       * locate/testsuite/locate.gnu/ignore_case2.exp: Likewise.
+       * locate/testsuite/locate.gnu/ignore_case3.exp: Likewise.
+       * locate/testsuite/locate.gnu/notexists1.exp: Likewise.
+       * locate/testsuite/locate.gnu/notexists2.exp: Likewise.
+       * locate/testsuite/locate.gnu/notexists3.exp: Likewise.
+       * locate/testsuite/locate.gnu/sv-bug-14535.exp: Likewise.
+       * m4/Makefile.am: Likewise.
+       * m4/nullsort.m4: Likewise.
+       * xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp: Likewise.
+       * xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp: Likewise.
+
+       After-the-fact change to NEWS for 4.5.8: fixed bug 27221.
+       * NEWS: Mention that release 4.5.8 also fixed bug #27221
+       (symlink_loop check broken by FTS_CWDFD), though the NEWS file in
+       that release omitted to say so.
+
+       After-the-fact change to NEWS for 4.5.8: fixed bug 27974.
+       * NEWS: Mention that release 4.5.8 also fixed bug #27974 (Use
+       gnulib's xreadlinkat support), though the NEWS file in that
+       release omitted to say so.
+
+2010-04-10  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.config (gnulib_version): Update to current gnulib
+       head.
+
+2010-04-09  James Youngman  <jay@gnu.org>
+
+       * find/parser.c (parse_samefile): Use open_cloexec to open the
+       reference file, so that we don't leak a file descriptor.
+
+2010-04-09  Roberto Reale  <rreale@iol.it> (tiny change)
+
+       * find/parser.c (parse_samefile): Since collect_arg_stat_info
+       increments *arg_ptr, argv[*arg_ptr] is often NULL.   Use filename
+       instead, as that's the variable in which we store the name of our
+       file.  The purpose of the fd was only to attempt to keep the inode
+       number stable on systems that don't really have inode numbers, so
+       this change should have no functional effect on POSIX systems.
+
+2010-04-08  James Youngman  <jay@gnu.org>
+
+       Adopt the use of the gnulib module readlink.
+       * import-gnulib.config (modules): Add readlink.
+
+       Adopt the use of the gnulib module isblank.
+       (modules): Add isblank.
+
+       Adopt the use of the gnulib module faccessat.
+       * import-gnulib.config (modules): Add faccessat.
+       * find/pred.c (struct access_check_args): Delete.
+       (access_callback): Delete.
+       (can_access): Delete.
+       (pred_executable): Use faccessat.
+       (pred_readable): Likewise.
+       (pred_writable): Likewise.
+
+       Adopt (explicitly) the use of the gnulib module dirent-safer.
+       * import-gnulib.config (modules): Add dirent-safer; we were
+       previously transitively importing this module, but we are now
+       importing it directly.
+       * lib/savedirinfo.c: Include opendir-safer.h.
+       (xsavedir): Call opendir_safer instead of opendir.
+
+       Adopt the use of the gnulib module d-type.
+       * import-gnulib.config (modules): Import the d-type module.
+       * configure.ac: Remove old struct dirent.d_type detection logic
+       (since we now use the gnulib macro from the d-type module for
+       this).
+       * find/parser.c (parse_version): Use HAVE_STRUCT_DIRENT_D_TYPE
+       (since the d-ino module still defines it) but remove references to
+       the macro USE_STRUCT_DIRENT_D_TYPE, since it's not defined and not
+       needed.
+       * lib/savedirinfo.c: Use HAVE_STRUCT_DIRENT_D_TYPE but ignore
+       USE_STRUCT_DIRENT_D_TYPE.
+       (xsavedir): Unconditionally initialise
+       internal[result->size].type_info so that we don't have untested
+       code (HAVE_STRUCT_DIRENT_D_TYPE is defined on my system).
+
+       Move on from 4.5.8.
+       * configure.ac: Bump the version number to 4.5.9-git.
+       * NEWS: Likewise.
+
+2010-04-07  James Youngman  <jay@gnu.org>
+
+       Prepare to release findutils-4.5.8.
+       * configure.ac: Update version number in AC_INIT.
+       * NEWS: Update version number and release date.
+
+       Depend on gnulib modules appropriate to features we already use.
+       * import-gnulib.config (modules): Add c-casestr, errno, fdopendir,
+       fflush, getdelim, gettimeofday, locale, modf, perror, snprintf,
+       stat, stdarg, stddef, stdio, stdlib, string, strpbrk, sys_time,
+       sys_wait.
+       Also add comments about other modules we may also want to use
+       which would require other code changes (for example dirent-safer).
+       * find/Makefile.am (LDADD): Add  $(LIB_EACCESS) $(LIB_SELINUX)
+       $(MODF_LIBM) which are needed by gnulib modules we now depend on.
+
+       More stat/xstat cleanup.
+       * find/parser.c (estimate_fstype_success_rate): Change the name of
+       the variable "dir" to "the_root_dir" to emphasise that it doesn't
+       matter that we're calling stat rather than options.xstat.
+       * find/ftsfind.c (symlink_loop): Call options.xstat instead of
+       stat/lstat, because options.xstat takes account of
+       state.cwd_dir_fd.
+
+       Fix Savannah bug 29460, -printf %Y fails in $CWD-dependent way
+       * find/pred.c (do_fprintf): Use optionl_stat and optionp_stat
+       instead of stat and lstat, because the first two functions are
+       aware of state.cwd_dir_fd.
+       * find/testsuite/find.gnu/printf-nonlocal-symlink.exp: A new test
+       case for this bug.
+       * find/testsuite/find.gnu/printf-nonlocal-symlink.xo: Expected
+       output for this test.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add the new test
+       case.
+       (EXTRA_DIST_XO): Add the expected-output file.
+       * NEWS: Mention this fix.
+
+       * lib/strspn.c: Delete this unused file.
+
+       Update the maintenance manual.
+       * doc/find-maint.texi: Update the maintenance manual to take into
+       account the fact that we uniformly use git rather than CVS.  Point
+       out the new version tag format.  Mention "make coverage".
+       README-CVS is now called README-hacking.  Update the URL for the
+       Translation Project.
+
+       Eliminate some obsolete code.
+       * locate/locate.c (search_one_database): Remove obsolete code
+       (alternative size for procdata.pathsize).
+       * lib/buildcmd.c (get_line_max): Remove obsolete function.
+
+       Remove obsolete code from savedirinfo.c.
+       * lib/savedirinfo.c (new_savedirinfo): Rename new_savedirinfo to
+       savedirinfo.
+       (old_savedirinfo): Remove obsolete function body.
+
+       Support extendbuf buffers larger than SIZE_MAX/2.
+       * lib/extendbuf.c (xextendbuf): New function; extends the buffer,
+       but calls xalloc_die on failure.  On the the other hand, extendbuf
+       returns NULL on failure.
+       (decide_size): If wanted>SIZE_MAX/2, return wanted.  This means
+       that for very large buffers, performance on repeated extension
+       degrades from linear to quadratic (instead of just failing at that
+       point, as before).
+       * lib/savedirinfo.c (xsavedir): Use xextendbuf rather than
+       extendbuf, now that there is a difference in semantics.
+       * find/fstype.c (get_mounted_filesystems): If extendbuf returns
+       NULL, fail (by returning NULL ourselves).
+       (get_mounted_devices):  Likewise.
+
+       * po/vi.po: Update Vietnamese translation.
+       * NEWS: Mention this change.
+
+2010-04-05  James Youngman  <jay@gnu.org>
+
+       Use set_program_name in regexprops.
+       * lib/regexprops.c: Include "progname.h".  Update function
+       defintions to have a newline before the function name (to comply
+       with the GNU coding standard).  Use set_program_name.
+
+2010-04-06  James Youngman  <jay@gnu.org>
+
+       Fix several merge errors.
+       * find/defs.h (struct state): Correct type of
+       already_issued_stat_error_msg from boolean to bool.
+       * find/util.c (report_file_err): Likewise with parameter
+       is_target_file.
+       * find/pred.c: Include "areadlink.h".
+       (do_fprintf): nonfatal_file_error should be
+       nonfatal_target_file_error.
+       (match_lname): Likewise.
+
+       Update some translations.
+       * po/cs.po: Update Czech translation.
+       * po/nl.po: Update Dutch translation.
+       * po/pl.po: Update Polish translation.
+       * po/ru.po: Update Russian translation.
+
+       * import-gnulib.config (modules): Use the getopt-gnu module from
+       gnulib rather than the (obsolete) getopt module.
+
+       Remove form-feeds.
+       * find/find.c: Remove form-feed characters.
+       * find/ftsfind.c: Likewise.
+       * find/parser.c: Likewise.
+       * find/pred.c: Likewise.
+       * find/tree.c: Likewise.
+       * find/util.c: Likewise.
+       * locate/locate.c: Likewise.
+       * xargs/xargs.c: Likewise.
+
+2010-04-05  James Youngman  <jay@gnu.org>
+
+       Use bool instead of the previous typedef boolean.
+       * find/defs.h: Don't create typedef "boolean"; use the standard
+       type bool.  Update other declarations accordingly.
+       * find/find.c: Update declarations and function definitions to use
+       bool.
+       * find/ftsfind.c: Likewise.
+       * find/parser.c: Likewise.
+       * find/pred.c: Likewise.
+       * find/tree.c: Likewise.
+       * find/util.c: Likewise.
+       * locate/locate.c: Likewise.
+       * xargs/xargs.c: Likewise.
+
+       Make use of gnulib's areadlinkat.
+       * lib/listfile.c: #include "areadlink.h" but not "dircallback.h",
+       since we no longer need to use get_link_name_at.
+       Don't include xalloc.h, since we don't need it.
+       (get_link_name_at): Delete.
+       (get_link_name_cb): Delete.
+       (get_link_name): Delete.
+       * lib/listfile.h: Remove declaration of get_link_name_at.
+       * find/pred.c (match_lname): Use areadlinkat instead of
+       get_link_name_at.
+
+       Use bool instead of the previous typedef boolean.
+       * find/defs.h: Don't create typedef "boolean"; use the standard
+       type bool.  Update other declarations accordingly.
+       * find/find.c: Update declarations and function definitions to use
+       bool.
+       * find/ftsfind.c: Likewise.
+       * find/parser.c: Likewise.
+       * find/pred.c: Likewise.
+       * find/tree.c: Likewise.
+       * find/util.c: Likewise.
+       * locate/locate.c: Likewise.
+       * xargs/xargs.c: Likewise.
+
+       Don't issue an error message twice for the same target file.
+       * find/defs.h (struct state): New member,
+       already_issued_stat_error_msg, used to de-duplicate error
+       messages.  If it is true, we already issued an error message for
+       the current target file.
+       Declare fatal_target_file_error, fatal_nontarget_file_error,
+       nonfatal_target_file_error, nonfatal_nontarget_file_error.
+       Between them, they replace fatal_file_error and
+       nonfatal_file_error.  The *target_file_error versions are
+       de-duplicated and the nontarget_file_error_versions are not.
+       * find/util.c (nonfatal_nontarget_file_error): Implement.
+       (fatal_nontarget_file_error): Implement.
+       (nonfatal_target_file_error): Implement.
+       (fatal_target_file_error): Implement.
+       (fatal_file_error): Remove.
+       (nonfatal_file_error): Remove.
+       (error_severity): Define error_severity (moved from ftsfind.c)
+       (get_statinfo): Call nonfatal_target_file_error in order to avoid
+       a duplicate message.  ALso call error_severity after a different
+       call to error to preserve the constraint that we exit with a
+       nonzero status if we issue a diagnostic.
+       (cleanup): Call nonfatal_nontarget_file_error instead of
+       nonfatal_file_error.
+       * find/tree.c (build_expression_tree): Initialise
+       state.already_issued_stat_error_msg.
+       * find/find.c (main): Initialise state.already_issued_stat_error_msg.
+       (wd_sanity_check): Call fatal_target_file_error instead of
+       fatal_file_error.
+       (chdir_back): Call fatal_nontarget_file_error instead of
+       fatal_file_error.
+       (process_path): Initialise state.already_issued_stat_error_msg.
+       * find/ftsfind.c (consider_visiting): Call
+       nonfatal_target_file_error instead of calling error directly.
+       (find): Call error_severity to ensure exit status is nonzero after
+       a call to error.
+       (main): Initialise state.already_issued_stat_error_msg.
+       (error_severity): Move to util.c.
+       * find/parser.c (collect_arg_stat_info): Call
+       fatal_target_file_error instead of fatal_file_error.
+       (parse_newerXY): Likewise.
+       (parse_samefile): Likewise.
+       (parse_samefile): Likewise.
+       (open_output_file): Call fatal_nontarget_file_error instead of
+       fatal_file_error.
+       * find/pred.c (checked_fprintf): Likewise.
+       (checked_print_quoted): Likewise.
+       (checked_fwrite): Likewise.
+       (checked_fflush): Likewise.
+       * find/sharefile.c (entry_free): Likewise.
+
+2010-04-04  Martin von Gagern  <Martin.vGagern@gmx.net>
+
+       Fix Savannah bug #27213: avoid failed assertions for
+       non-executable directories.
+       (consider_visiting): Continue (after issuing an error message)
+       even if ent->fts_info == FTS_NS.
+       * find/util.c (get_statinfo): If we cannot stat the file, issue a
+       diagnostic, but continue anyway.
+       * find/ftsfind.c (consider_visiting): Don't assert-fail if
+       ent->fts_info == FTS_NSOK.  Don't assert-fail if state.type is
+       nonzero.
+
+2010-04-04  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #29435: fd_is_cloexec does not work on Fedora
+       buildhosts.
+       Fix open_cloexec on hosts which ignore O_CLOEXEC (i.e. old kernels).
+       * lib/fdleak.c (o_cloexec_works): New function, detects whether
+       the open flag O_CLOEXEC has any effect.
+       (open_cloexec): Call o_cloexec_works, just once, to find out
+       whether O_CLOEXEC is effective.  If not, set the close-on-exec
+       flag on fds by calling set_cloexec_flag.
+       * NEWS: Mention this bugfix.
+
+       Use bool instead of the previous typedef boolean.
+       * find/defs.h: Don't create typedef "boolean"; use the standard
+       type bool.  Update other declarations accordingly.
+       * find/find.c: Update declarations and function definitions to use
+       bool.
+       * find/ftsfind.c: Likewise.
+       * find/parser.c: Likewise.
+       * find/pred.c: Likewise.
+       * find/tree.c: Likewise.
+       * find/util.c: Likewise.
+       * locate/locate.c: Likewise.
+       * xargs/xargs.c: Likewise.
+
+2010-04-05  Jim Meyering  <meyering@redhat.com>
+
+       frcode: avoid link failure due to multiple program_name definition
+       * locate/frcode.c: Include "progname.h".
+       (program_name): Remove two declarations.
+       Now the definition comes from gnulib.
+
+2010-04-04  James Youngman  <jay@gnu.org>
+
+       Don't return int to represent a boolean value.
+       * find/defs.h: fd_leak_check_is_enabled should return boolean, not
+       int.  Likewise following_links and digest_mode.
+       * lib/buildcmd.h: Likewise for bc_args_exceed_testing_limit.
+       Also #include <stdbool.h>.
+       * find/util.c (fd_leak_check_is_enabled): Now returns boolean.
+       * find/util.c (following_links): Likewise.
+       * find/util.c (digest_mode): Likewise.
+       * lib/buildcmd.c (bc_args_exceed_testing_limit): Likewise.
+       * find/find.c (get_current_dirfd): Indent definition correctly.
+       * find/util.c (get_start_dirfd): Likewise.
+
+       Fix Savannah bug #29435: fd_is_cloexec does not work on Fedora
+       buildhosts.
+       Fix open_cloexec on hosts which ignore O_CLOEXEC (i.e. old kernels).
+       * lib/fdleak.c (o_cloexec_works): New function, detects whether
+       the open flag O_CLOEXEC has any effect.
+       (open_cloexec): Call o_cloexec_works, just once, to find out
+       whether O_CLOEXEC is effective.  If not, set the close-on-exec
+       flag on fds by calling set_cloexec_flag.
+       * NEWS: Mention this bugfix.
+
+2010-04-03  James Youngman  <jay@gnu.org>
+
+       Move on from 4.5.7.
+       * configure.ac: Update version number again, to 4.5.8-git.
+       * NEWS: Likewise.
+
+       Prepare for release of findutils-4.5.7.
+       * configure.ac: Update version number.
+       * NEWS: Mention the translation changes.  Update version number.
+
+       Accelerate find/testsuite/find.posix/exec-nogaps.exp.
+       * find/testsuite/config/unix.exp (optimisation_levels_to_test):
+       New function, decides which optimisation levels we shuld run find
+       at for the current test.  Set $OPTIMISATION_LEVELS to control
+       this.
+       (find_start): Call optimisation_levels_to_test to determine which
+       optimisation levels to run find at.
+       * find/testsuite/find.posix/exec-nogaps.exp: Run the test only at
+       -O3 (but for both oldfind and ftsfind).
+
+       Correct the format of copyright statements, and add 2010.
+       * lib/fdleak.h: Correct the format of the copyright statement.
+       * po/vi.po: Likewise.
+       * lib/safe-atoi.h: Likewise.
+       * locate/locate.c: Likewise.
+       * po/ca.po: Likewise.
+       * po/gl.po: Likewise.
+       * po/fi.po: Likewise.
+       * po/it.po: Likewise.
+       * po/findutils.pot: Fill in the boilerplate in the header.
+
+       Update copyright years.
+       * find/defs.h: Update copyright years.
+       * find/finddata.c: Likewise.
+       * find/sharefile.h: Likewise.
+       * lib/buildcmd.h: Likewise.
+       * lib/dircallback.h: Likewise.
+       * lib/extendbuf.h: Likewise.
+       * lib/findutils-version.h: Likewise.
+       * lib/gnulib-version.h: Likewise.
+       * lib/listfile.h: Likewise.
+       * lib/nextelem.c: Likewise.
+       * lib/nextelem.h: Likewise.
+       * lib/printquoted.h: Likewise.
+       * lib/regextype.h: Likewise.
+       * lib/savedirinfo.h: Likewise.
+       * lib/strspn.c: Likewise.
+       * lib/waitpid.c: Likewise.
+       * locate/locatedb.h: Likewise.
+       * m4/mkinstalldirs.m4: Likewise.
+       * m4/noreturn.m4: Likewise.
+       * build-aux/check-testfiles.sh: Likewise.
+       * build-aux/src-sniff.py: Likewise.
+       * import-gnulib.sh: Likewise.
+       * locate/testsuite/config/unix.exp: Likewise.
+       * locate/updatedb.sh: Likewise.
+       * xargs/testsuite/config/unix.exp: Likewise.
+
+       Add the update-copyright gnulib module.
+       * import-gnulib.config (maintainer_modules): Separate out the
+       modules primarily useful for maintainer activities.  Add
+       'update-copyright' to this.
+       * build-aux/.cvsignore: Ignore update-copyright, since it's
+       installed by gnulib.
+       * build-aux/.gitignore: Likewise.
+
+       Ignore generated files for the convenience of non-VPATH users.
+       * lib/.gitignore: Ignore object and archive files.
+       * find/.gitignore: Likewise.
+       * locate/.gitignore: Ignore object files.
+
+2010-04-02  James Youngman  <jay@gnu.org>
+
+       Check for accidental modifications to the wrong section of the
+       NEWS file.
+       * cfg.mk (local-checks-to-skip): Remove sc_immutable_news.
+       (old_NEWS_hash): add existing hash (from "make update-NEWS-hash").
+
+       * cfg.mk: Append the names of checks to skip to
+       local-checks-to-skip rather than inventing 7 new variables.
+
+       Don't include quote.h/quotearg.h where it is not used.
+       * find/find.c: Don't include "quote.h", it's not used.
+       * find/ftsfind.c: Likewise.
+       * find/parser.c: Likewise.
+       * locate/locate.c: Likewise.
+       * locate/word_io.c: Likewise.
+       * cfg.mk (skip_dunno): Enable check sc_prohibit_quote_without_use.
+       * find/find.c: Don't include "quotearg.h", it's not used.
+       * lib/fdleak.c: Likewise.
+
+       Use set_program_name() to remember the programs' names.
+       * cfg.mk *skip(defer): Enable sc_program_name.  Remove the
+       now-unused variable skip_defer.
+       * find/ftsfind.c: Include "program_name.h".
+       (main): Call set_program_name.
+       * find/find.c: Include "program_name.h".
+       (main): Call set_program_name.
+       * locate/locate.c: Include "program_name.h".
+       (dolocate): Call set_program_name.
+       Remove global variable program_name.
+       * locate/bigram.c: Include "program_name.h".
+       Remove global variable "program_name".
+       (main): Call set_program_name.
+       * locate/frcode.c: Include "program_name.h".
+       (main): Call set_program_name.
+       * xargs/xargs.c (main): Call set_program_name.
+       Include "program_name.h".
+       Remove global variable program_name.
+       * find/finddata.c: Remove global variable program_name.
+       * find/defs.h: No longer need declaration of program_name.
+       * find/util.c: Include "program_name.h".
+
+       Use named constants for xargs exit codes.
+       * xargs/xargs.c (child_error): Use EXIT_SUCCESS instead of 0.
+       (enum XargsStatusValues): introduce named constants for the
+       various things that cause speicific exit codes.
+       (enum  ClientStatusValues): Also introduce named constants for the
+       child's exit status.
+       (get_char_oct_or_hex_escape): Use EXIT_FAILURE instead of 1.
+       (get_input_delimiter): Likewise.
+       (main): Likewise.
+       (read_line): Likewise.
+       (read_string): Likewise.
+       (print_args): Likewise.
+       (xargs_do_exec): Likewise.
+       (wait_for_proc): Likewise.
+       (wait_for_proc): Use enum XargsStatusValues for exit codes.
+       (parse_num): Use EXIT_FAILURE instead of 1.
+
+       Avoid using magic numbers as exit statuses.
+       * cfg.mk (skip_defer): Enable sc_prohibit_magic_number_exit.
+       * doc/find-maint.texi (Security): Avoid error (1, ...) in the
+       example patch.
+       * find/find.c (main): Use exit status EXIT_FAILURE instead of 1.
+       (wd_sanity_check): Likewise.
+       (safely_chdir_lstat): Likewise.
+       (process_dir): Likewise.
+       * find/fstype.c (must_read_fs_list): Likewise.
+       * find/ftsfind.c (main): Likewise.
+       (main): Likewise.
+       * find/parser.c (check_option_combinations): Use exit status
+       EXIT_FAILURE instead of 1.
+       (parse_group): Likewise.
+       (parse_help): Use exit status EXIT_SUCCESS instead of 0.
+       (parse_version): Likewise.
+       (fnmatch_sanitycheck): Use exit status EXIT_FAILURE instead of 1.
+       (insert_depthspec): Likewise.
+       (parse_newerXY): Likewise.
+       (non_posix_mode): Likewise.
+       (parse_perm): Likewise.
+       (insert_regex): Likewise.
+       (parse_size): Likewise.
+       (parse_show_control_chars): Likewise.
+       (parse_used): Likewise.
+       (parse_user): Likewise.
+       (parse_context): Likewise.
+       (insert_type): Likewise.
+       (insert_fprintf): Likewise.
+       (make_segment): Likewise.
+       (check_path_safety): Likewise.
+       (new_insert_exec_ok): Likewise.
+       (get_relative_timestamp): Likewise.
+       (parse_time): Likewise.
+       * find/tree.c (get_expr): Use exit status EXIT_FAILURE instead of 1.
+       (scan_rest): Likewise.
+       (get_pred_cost): Likewise.
+       (get_pred_cost): Likewise.
+       (build_expression_tree): Likewise.
+       (get_new_pred_chk_op): Likewise.
+       * find/pred.c (launch): Use exit status EXIT_FAILURE instead of 1.
+       * find/util.c (process_debug_options): Use exit status
+       EXIT_SUCCESS instead of 0.
+       (process_optimisation_option): Use exit status EXIT_FAILURE
+       instead of 1.
+       (set_option_defaults): Likewise.
+       * lib/buildcmd.c (exceeds): Likewise.
+       (bc_do_exec): Likewise.
+       (bc_push_arg): Likewise.
+       * lib/nextelem.c: Remove test code.
+       * lib/safe-atoi.c (safe_atoi): Use exit status EXIT_FAILURE
+       instead of 1.
+       * lib/regextype.c (get_regex_type): Use exit status EXIT_FAILURE
+       instead of 1.  Include <stdlib.h>, for EXIT_FAILURE.
+       * locate/locate.c (set_max_db_age): Use exit status EXIT_FAILURE
+       instead of 1.
+       (set_max_db_age): Likewise.
+       (toolong): Likewise.
+       (visit_locate02_format): Likewise.
+       (search_one_database): Likewise.
+       (drop_privs): Likewise.
+       * locate/frcode.c (get_seclevel): Use exit status EXIT_FAILURE
+       instead of 1.
+       (outerr): Likewise.
+       (main): Likewise.
+       * locate/code.c (inerr): Use exit status EXIT_FAILURE instead of
+       1.
+       (outerr): Likewise.
+       * locate/word_io.c (getword): Use exit status EXIT_FAILURE instead of 1.
+
+       Avoid sc_prohibit_stat_st_blocks check, since it is broken.
+       * cfg.mk (skip_broken_checks): Skip sc_prohibit_stat_st_blocks.
+
+       Enable syntax checker sc_the_the, detecting doubled 'the'.
+       * cfg.mk (false_positives): Enable syntax checker sc_the_the
+       * build-aux/src-sniff.py (checkers): Avoid false positive with
+       sc_the_the.
+
+       Avoid false positives for sc_prohibit_atoi_atof.
+       * find/util.c (set_option_defaults): Avoid false positive with
+       sc_prohibit_atoi_atof.
+       (check_nofollow): Likewise.
+
+       Avoid sscanf.
+       * lib/fdleak.c (get_proc_max_fd): Use safe_atoi to do string to
+       int conversion, instead of sscanf.  Skip '.' and '..'.
+       * cfg.mk (skip_defer): Enable the sc_prohibit_atoi_atof check.
+
+       * po/POTFILES.in: Remove source files we don't maintain any more.
+       Also remove files which exist but have no translated messages
+       (dircallback.c, listfile.c).
+       * lib/listfile.c: Don't include libintl, since there are no
+       translated messages in this file.
+       * lib/dircallback.c: Likewise.
+
+       Move safe_atoi out into a separate module.
+       * find/parser.c: Include "safe-atoi.h".  Remove the body of safe_atoi.
+       (parse_group): pass options.err_quoting_style to safe_atoi.
+       (insert_depthspec): Likewise.
+       (parse_user): Likewise.
+       * lib/safe-atoi.h: New file.
+       * lib/safe-atoi.c: New file.  Add parameter for quoting style (to
+       avoid an external reference to the "options"struct).
+       * lib/Makefile.am (libfind_a_SOURCES): Add safe-atoi.c and
+       safe-atoi.h.
+
+       Avoid false positives for the sc_prohibit_test_minus_ao syntax check.
+       * doc/find.texi (Updating A Timestamp File): Work around a syntax
+       check designed to prevent the use of "test X -a Y".
+       * find/find.1: Likewise.
+
+       * find/ftsfind.c: We don't use anything from xalloc.h, so don't
+       #include it.
+
+       Eliminate some unused function result warnings.
+       * lib/unused-result.h: New file, defines function attribute macro
+       __attribute_warn_unused_result__.
+       * lib/Makefile.am (EXTRA_DIST): Add unused-result.h.
+       * find/ftsfind.c (find): Issue a diagnostic if fts_close fails,
+       change return type to bool and return false for this case.  Add
+       __warn_unused_result__ attribute.
+       (process_all_startpoints): Likewise (except no need for second
+       diagnostic).
+       (main): If process_all_startpoints failed, don't do the cleanup
+       operations because we don't know what subdirectory we're in.
+
+       * find/util.c (fd_leak_check_is_enabled): Avoid implicit
+       pointer-to-int conversion.
+       * lib/buildcmd.c: #include <stdlib.h> for declaration of free.
+
+       Avoid false positives for the sc_prohibit_test_minus_ao syntax check.
+       * doc/find.texi (Updating A Timestamp File): Work around a syntax
+       check designed to prevent the use of "test X -a Y".
+       * find/find.1: Likewise.
+
+       * find/ftsfind.c: We don't use anything from xalloc.h, so don't
+       #include it.
+
+       Eliminate some unused function result warnings.
+       * lib/unused-result.h: New file, defines function attribute macro
+       __attribute_warn_unused_result__.
+       * lib/Makefile.am (EXTRA_DIST): Add unused-result.h.
+       * find/ftsfind.c (find): Issue a diagnostic if fts_close fails,
+       change return type to bool and return false for this case.  Add
+       __warn_unused_result__ attribute.
+       (process_all_startpoints): Likewise (except no need for second
+       diagnostic).
+       (main): If process_all_startpoints failed, don't do the cleanup
+       operations because we don't know what subdirectory we're in.
+
+       * find/util.c (fd_leak_check_is_enabled): Avoid implicit
+       pointer-to-int conversion.
+       * lib/buildcmd.c: #include <stdlib.h> for declaration of free.
+
+       Fix some space-followed-by-tab sequences.
+       * NEWS: Change space-tab sequences to just spaces.
+       * build-aux/check-testfiles.sh (main): Likewise
+       * build-aux/src-sniff.py (checkers): Likewise.
+       * find/Makefile.am: Likewise.
+       * find/testsuite/find.posix/sv-bug-25359.exp: Likewise.
+       * import-gnulib.sh (check_merge_driver): Likewise.
+       * m4/withfts.m4 (FIND_WITH_FTS): Likewise.
+       * cfg.mk (false_positives): Explain why we can't enable the
+       sc_space_tab check (xargs .xo test files).
+
+       * cfg.mk: Explain that we cannot enable the sc_texinfo_acronym
+       syntax check right now, since the perm.texi file uses
+       @acronym{GNU} but we try to keep that in sync. with coreutils.
+
+       Mark error messages for translation.
+       * find/parser.c (safe_atoi): Likewise.
+       * find/pred.c (pred_context): Likewise.
+       (do_fprintf): Likewise.
+       * xargs/xargs.c (xargs_do_exec): Translate error message.
+       (xargs_do_exec): Likewise.
+       * lib/buildcmd.c (exceeds): Likewise.
+
+       Add customisation of the behaviour of "make syntax-check".
+       * cfg.mk: New file; configuration file for the maintainer-makefile
+       provided by gnulib.
+
+       * import-gnulib.config (modules): Add maintainer-makefile.
+
+       Various coding standard fixes.
+       * m4/withfts.m4: Quote the first argument of AC_DEFINE.
+       * lib/regextype.c: Don't use HAVE_CONFIG_H.
+       * doc/find-maint.texi: Remove RCS keywords (they were in an
+       example security vulnerability announcement).
+
+       Don't define S_IS*; include <sys/stat.h> instead.
+       * lib/modetype.h: Remove (all it does is define S_IS*).
+       * lib/Makefile.am (EXTRA_DIST): Remove modetype.h.
+       * lib/listfile.c: Don't define S_IS* macros.
+       * find/pred.c: Don't include "modetype.h".
+       * find/parser.c: Likewise.
+       * find/ftsfind.c: Likewise.
+       * find/fstype.c: Likewise.
+       * find/find.c: Likewise.
+
+       * m4/withfts.m4: Quote the first argument of AC_DEFINE.
+
+       Coding standard fix: "Warning" should be "WARNING".
+       * find/find.c (dirchange_is_fatal): Change "Warning" to "WARNING".
+       * find/ftsfind.c (consider_visiting): Likewise.
+       * find/pred.c (pred_newerXY): Likewise.
+       * find/util.c (get_statinfo): Likewise.
+       (hook_fstatat): Likewise.
+       * locate/word_io.c (decode_value): Likewise.
+       * xargs/xargs.c (main): Change "Warning" to "warning".
+       (read_line): Change "Warning" to "WARNING".
+       (wait_for_proc): Likewise.
+
+       Remove useless if conditionals before calls to 'free'.
+       * lib/nextelem.c (next_element): Remove useless if-before-free.
+       * lib/buildcmd.c (bc_do_exec): Likewise.
+       * find/find.c (process_dir): Likewise.
+
+       * import-gnulib.sh (usage): Defeat the simple GPL version check
+       of maint.mk, since it's trying to identify GPL2 licenses.  Since
+       the 'rehack' script converts v2 licenses into v3, we get a false
+       positive for v2.  So, amusingly, we use the same hack that
+       maint.mk uses to avoid a false positive on itself: spurious
+       quotes.
+
+       Switch from GNU Free Documentation License 1.2 to 1.3.
+       * NEWS: Update GFDL version.
+       * README-hacking: Likewise.
+       * doc/find-maint.texi: Likewise.
+       * lib/regexprops.c: Likewise (though the license being changed is
+       the license for the output).
+
+       * NEWS: Update copyright years.
+
+2010-04-01  James Youngman  <jay@gnu.org>
+
+       Change error (1, ...) to error (EXIT_FAILURE, ...).
+       * find/find.c: Change error (1, ...) to error (EXIT_FAILURE, ...).
+       * find/fstype.c: Likewise.
+       * find/ftsfind.c: Likewise.
+       * find/parser.c: Likewise.
+       * find/pred.c: Likewise.
+       * find/tree.c: Likewise.
+       * find/util.c: Likewise.
+       * locate/code.c: Likewise.
+       * locate/frcode.c: Likewise.
+       * locate/locate.c: Likewise.
+       * locate/word_io.c: Likewise.
+       * xargs/xargs.c: Likewise.
+       * lib/buildcmd.c: Likewise.  Also include <stdlib.h>.
+       * lib/regextype.c: Likewise (both).
+
+       Assume C89 (or C99) C headers.  Assume working <ctype.h>.
+       * xargs/xargs.c: Unconditionally include <ctype.h>.  Assume
+       isblank(c) is defined.  Assume memcpy() has a prototype in
+       <string.h>.
+       * import-gnulib.config (modules): Import gnulib's ctype module.
+
+       Optimise -fstype NOTUSED to -false at -O2.
+       * find/parser.c: Include mountlist.h.
+       (insert_false): New function, inserts a -false predicate.
+       (parse_false): Use insert_false.
+       (is_used_fs_type): New function, determines if any mounted
+       filesystem is of the named type.
+       (parse_fstype): At optimisation level 2 and above, -fstpe FOO
+       is converted to -false if no mounted filesytem is of type FOO.
+       * find/find.1: Document this optimisation.
+       * doc/find.texi (Optimisation Options): Likewise.
+       * NEWS: Mention this change.
+
+       Updated copyright years to add 2010.
+       * find/find.c: Add 2010.
+       * find/fstype.c: Add 2010.
+       * find/ftsfind.c: Add 2010.
+       * find/parser.c: Add 2010.
+       * find/pred.c: Add 2010.
+       * find/sharefile.c: Add 2010.
+       * find/testsuite/config/unix.exp: Add 2010.
+       * find/tree.c: Add 2010.
+       * find/util.c: Add 2010.
+       * locate/bigram.c: Add 2010.
+       * locate/frcode.c: Add 2010.
+       * xargs/xargs.c: Add 2010.
+
+       Coding style fixes: space after function names.
+       * lib/buildcmd.c: Insert a space between function name and open
+       parenthesis.
+       * lib/dircallback.c: Likewise.
+       * lib/extendbuf.c: Likewise.
+       * lib/fdleak.c: Likewise.
+       * lib/findutils-version.c: Likewise.
+       * lib/forcefindlib.c: Likewise.
+       * lib/listfile.c: Likewise.
+       * lib/printquoted.c: Likewise.
+       * lib/qmark.c: Likewise.
+       * lib/regexprops.c: Likewise.
+       * lib/regextype.c: Likewise.
+       * lib/savedirinfo.c: Likewise.
+       * locate/code.c: Likewise.
+       * locate/frcode.c: Likewise.
+       * locate/locate.c: Likewise.
+       * locate/word_io.c: Likewise.
+
+2010-03-31  James Youngman  <jay@gnu.org>
+
+       Coding style fixes: space after function names.
+       * find/util.c: Insert a space between function name and open
+       parenthesis.
+       * find/ftsfind.c: Likewise.
+       * find/fstype.c: Likewise.
+       * find/util.c: Likewise.
+       * find/tree.c: Likewise.
+       * find/sharefile.c: Likewise.
+       * find/pred.c: Likewise.
+       * find/parser.c: Likewise.
+       * xargs/xargs.c: Likewise.
+
+       Move version number on to 4.5.7-git, so that we can make test
+       releases.
+       * configure.ac: Update version number.
+       * NEWS: Likewise.
+       * Makefile.am (AUTOMAKE_OPTIONS): Return to "gnits" rules.
+
+       Mention additional bugfixes.
+       * NEWS: Mention that Savannah bug #29089 was also fixed in
+       4.5.6b.
+
+       Prepare for release of findutils-4.5.6b
+       This release is identical to 4.5.6 apart from the version number
+       and the fact that it was generated by automake version 1.11.1 in
+       order to avoid issues with CVE-2009-4029.
+       * configure.ac: Update version number.
+       * NEWS: Update version number.  Mention that Savannah bug #29089
+       was also fixed in 4.5.6b.
+       * Makefile.am: switch to 'gnu' option ('gnits' forbids the 'b'
+       suffix).
+
+2010-03-30  James Youngman  <jay@gnu.org>
+
+       Prepare for release of findutils-4.5.6
+       * configure.ac: Update version number.
+       * NEWS: Update version number.
+
+       Support O_CREAT in open_cloexec.
+       * lib/fdleak.c: Include <stdarg.h> and "cloexec.h".
+       (open_cloexec): Support O_CREAT.  Use O_CLOEXEC if it is available.
+       (O_CLOEXEC): #define to 0 if not already #defined.
+       * lib/fdleak.h: Update prototype of open_cloexec to allow mode to
+       be passed.
+
+       * import-gnulib.config (modules): Import modules open (for
+       PROMOTED_MODE_T) and stdbool (for 'true').
+
+       Tolerate the absence of getrusage.
+       * configure.ac: Check for <sys/resource.h> and the getrusage
+       function.
+       * lib/fdleak.c: Don't #include <sys/resource.h> if we don't have it.
+       (get_max_fd): If neither /proc/self/fd not getrusage is available,
+       return _POSIX_OPEN_MAX.
+
+       Detect leaks in file descriptors 0, 1, 2.
+       * lib/fdleak.c: (remember_non_cloexec_fds): Also check for leaks
+       in file descriptors 0, 1, 2, just in case the caller closed them.
+       (find_first_leaked_fd): Likewise.
+
+2009-08-16  James Youngman  <jay@gnu.org>
+
+       Bugfixes to the handling of %Z in the Red Hat SELinux patch.
+       * find/pred.c (do_fprintf): If getfilecon fails, print the
+       relevant segment anyway, with the file context expanding to an
+       empty string.
+       * find/parser.c (make_segment): For %Z, set the cost to
+       NeedsAccessInfo.
+
+2009-08-11  Kamil Dudka  <kdudka@redhat.com>
+
+       find: add SELinux support
+       * find/defs.h: Add SELinux related definitions.
+       * find/tree.c: Add -context predicate to lookup.
+       * find/pred.c: Handle %Z printf directive.
+       * find/parser.c: Parse -context predicate and %Z printf directive.
+       * find/find.1: Mention -context predicate and %Z printf directive.
+       * doc/find.texi: Mention -context predicate and %Z printf directive.
+       * find/Makefile.am: Add SELinux libraries.
+       * import-gnulib.config: Require module selinux-at and the corresponding
+       version of gnulib.
+
+2010-03-29  James Youngman  <jay@gnu.org>
+
+       Fix file descriptor leaks.  This fixes Savannah bug bug #27375.
+       * find/util.c (fd_leak_check_is_enabled): New function; returns
+       nonzero if the environment variable GNU_FINDUTILS_FD_LEAK_CHECK is
+       enabled.  Setting this variable enables the file descriptor leak
+       checker.
+       * find/defs.h: Declare fd_leak_check_is_enabled.
+       * import-gnulib.config (gnulib_version): Update to more recent
+       version of gnulib.  Import the cloexec module too.
+       * lib/fdleak.c: New file; a module for detecting file descriptor
+       leaks.   Also define an open_cloexec() function.
+       * lib/fdleak.h: Declare the global functions defined in fdleak.c.
+       * lib/Makefile.am (libfind_a_SOURCES): Add fdleak.c.
+       * find/find.c (main): Call remember_non_cloexec_fds in order to
+       detect file descriptor leaks.
+       (main): set FD_CLOEXEC on starting_desc.
+       (safely_chdir_lstat): Likewise for dotfd.
+       (safely_chdir_nofollow): Likewise for fd.
+       * find/ftsfind.c (inside_dir): set FD_CLOEXEC on curr_fd.
+       (main): Call remember_non_cloexec_fds in order to detect file
+       descriptor leaks.
+       (main): set FD_CLOEXEC on starting_desc.
+       * find/pred.c (launch): before we exec the child, call
+       complain_about_leaky_fds in order to complain about non-FD_CLOEXEC
+       file descriptors that weren't open when the program was run.
+       * find/sharefile.c (sharefile_fopen): Set FD_CLOEXEC on the files
+       we open.
+       * import-gnulib.sh (run_gnulib_tool): Pass the --local-dir option
+       in order to apply any required patches (none needed right now).
+       * find/testsuite/config/unix.exp: Set environment variable
+       $GNU_FINDUTILS_FD_LEAK_CHECK to enable the file descriptor leak
+       check for all tests.
+       * find/testsuite/find.gnu/no-fdleak-test.exp: New test; runs find
+       with the fd leak detector turned off, in order to make sure there
+       are no (e.g.) crashing bugs when that happens.
+       * find/testsuite/find.gnu/no-fdleak-test.xo: Expected output for
+       the new test.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add no-fdleak-test.exp
+       (EXTRA_DIST_XO): Add no-fdleak-test.xo.
+
+       * NEWS: Mention these changes.
+
+2010-03-30  James Youngman  <jay@gnu.org>
+
+       Add missing exec-nogaps.{exp,xo}.
+       * find/testsuite/Makefile.am (EXTRA_DIST_XO): Add exec-nogaps.xo.
+       (EXTRA_DIST_EXP): Add exec-nogaps.exp.
+
+2010-02-25  James Youngman  <jay@gnu.org>
+
+       Explain the problems with "-name a/b" and "-path foo/".
+       * find/find.1 (-iname): We already refer to -name, so duplicate
+       less text.
+       (-name): Explain that -name a/b will never match anything.
+       * doc/find.texi (Base Name Patterns): Explain that -name a/b will
+       never match anything.
+       (Full Name Patterns): Fix typo.
+
+2010-02-22  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.1: Simplify the wording in the description of "xargs
+       -i".
+
+2010-02-21  James Youngman  <jay@gnu.org>
+
+       Update #include directives for the openat module, to comply with
+       recent POSIX-compliance changes.
+       * find/find.c: Don't include <openat.h>.
+       * find./ftsfind.c: Likewise.
+       * find/pred.c: Likewise; include <unistd.h>.
+       * find/util.c: Don't include <openat.h>; include <sys/stat.h>.
+
+       * import-gnulib.config (gnulib_version): Update to current version
+       of gnulib.
+       * build-aux/.cvsignore: Ignore new files built by gnulib.
+       * build-aux/.gitignore: Likewise.
+
+2010-02-20  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #27846: assertion failure in xargs.c on AIX.
+       * xargs/xargs.c (smaller_of): New function, returns the smaller of
+       its two size_t arguments.
+       (main): Instead of asserting that the value of bc_ctl.arg_max is
+       smaller than some value, simply adjust the value if necessary.
+       * NEWS: Mention this change.
+
+       Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
+       * doc/find.texi (Problems with -exec and filenames): Add missing
+       $0 argument in example for sh -c 'something "$@" sh ...
+       * NEWS: Mention this change.
+
+       Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
+       `-ctime'".
+       * find/parser.c (parse_fls): If the argument is invalid, reverse
+       the change that collect_arg() made to *arg_ptr (that is, don't
+       consume the argument).
+       (parse_fprint0): Likewise.
+       (parse_gid): Likewise.
+       (parse_group): Likewise.
+       (parse_inum): Likewise.
+       (parse_links): Likewise.
+       (do_parse_xmin): Likewise.
+       (parse_name): Likewise.
+       (parse_printf): Likewise.
+       (parse_uid): Likewise.
+       (parse_used): Likewise.
+       (parse_time): Likewise.
+       * NEWS: mention this change.
+
+2009-12-04  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #26868: compilation error in pred.c on Solaris
+       x86_64.
+       * import-gnulib.config (modules): Include gnulib's math module, to
+       avoid a compilation error for "-HUGE_VAL" on Solaris x86_64.
+       * NEWS: Mention this change.
+
+2009-11-29  James Youngman  <jay@gnu.org>
+
+       * find/testsuite/find.posix/exec-nogaps.exp: New test for find
+       -exec   ... {} ; and find -exec ... {} +, both of which simply
+       ensure that all exec arguments are processed exactly once each.
+       * find/testsuite/find.posix/exec-nogaps.xo: Expected output file
+       for the test in exec-nogaps.exp.
+
+       Fix Savannah bug#27328, segfault if the initial exec for "find
+       -exec" fails.  Also Savennah bug #27975: Infinite loop
+       for -exec [..] {} +.
+       * lib/buildcmd.h (struct buildcmd_state): Introduce
+       largest_successful_arg_count and smallest_failed_arg_count in
+       order to avoid an assumption that we understand how the operatingn
+       system interprets ARG_MAX and the assumption that the compile-time
+       ARG_MAX value (or the equivalent from sysconf()) is avtually
+       correct.
+       (struct buildcmd_control): Change the calling convention of the
+       exec callback to allow us to pass the argument list separately.
+       (bc_args_exceed_testing_limit): declare this new function.
+       * lib/buildcmd.c (bc_args_complete): New function, NULL-terminates
+       the argv list.   We use this instead of passing NULL to
+       bc_push_arg().
+       (update_limit): New function.  Decides how many arguments to
+       pass to the invoked command on the next attempt.
+       (copy_args): Build an argument list containing all the initial
+       arguments plus some of the other args (the number to be used is
+       decided by update_limit).
+       (bc_do_exec): Avoid special-casing the first call to exec.  Use
+       update_limit to decide how many arguments to pass and copy_args to
+       build the argument list.  The new form of the loop should fix
+       Savannah bug #27328.
+       (bc_push_arg): Drop support for passing NULL as an argument (to
+       terminate the arg list we just pass in a special argument instead).
+       (bc_args_exceed_testing_limit): New function, returns nonzero if
+       the argument list exceeds a testing limit (used for failure
+       injection by tests).
+       (exceeds): New support function, implementing part of
+       bc_args_exceed_testing_limit.
+       (bc_init_state): Initialise largest_successful_arg_count and
+       smallest_failed_arg_count.
+       * find/defs.h (struct exec_val): New member last_child_status.
+       This stores the status of the most recently completed child.
+       * find/pred.c (new_impl_pred_exec): Use last_child_status.
+       (launch): Use the new calling convention for the exec callback.
+       Set last_child_status.  Call bc_args_exceed_testing_limit() to do
+       failure injection for unit tests.
+       * find/util.c (do_complete_pending_execdirs): Call bc_do_exec
+       rather than calling launch directly in order to allow for breaking
+       the argument list up if it's too long.
+       * xargs/xargs.c (xargs_do_exec): Update to use the new caling
+       convention for the exec callback.
+       * NEWS: Mention these fixes.
+
+2009-11-09  Jim Meyering  <meyering@redhat.com>
+
+       Adjust two xargs diagnostics.
+       * xargs/xargs.c (print_args): Give a better diagnostic when
+       failing to open /dev/tty.
+       (xargs_do_exec): Mark a diagnostic for translation.
+
+2009-11-08  James Youngman  <jay@gnu.org>
+
+       Localise some previously non-localised strings.
+       * find/find.c (init_mounted_dev_list): Pass translatable string
+       gettext.
+       (safely_chdir_lstat): Likewise.
+       * find/fstype.c (must_read_fs_list): Likewise.
+       * find/parser.c (safe_atoi): Likewise.
+
+       Updated a number of translation messages.
+       * po/it.po: Updated Italian translation.
+       * po/fi.po: Updated Finnish translation.
+       * po/vi.po: Updated Vietnamese translation.
+       * po/hu.po: Updated Hungarian translation.
+       * po/de.po: Updated German translation.
+       * po/ru.po: Updated Russian translation.
+
+2009-08-16  James Youngman  <jay@gnu.org>
+
+       * lib/check-regexprops.sh: Portability fixes for FreeBSD (mktemp
+       requires an argument, dialect differences in sed regexes).
+
+       Bugfixes to the handling of %Z in the Red Hat SELinux patch.
+       * find/pred.c (do_fprintf): If getfilecon fails, print the
+       relevant segment anyway, with the file context expanding to an
+       empty string.
+       * find/parser.c (make_segment): For %Z, set the cost to
+       NeedsAccessInfo.
+
+2009-08-15  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.config (gnulib_version): Update to the current
+       version of gnulib.
+
+2009-07-18  James Youngman  <jay@gnu.org>
+
+       Fix up some problems introduced in a manual conflict resolution.
+       * find/parser.c (insert_path_check): Add missing third argument to
+       insert_primary_withpred.
+       (parse_iwholename): Remove redundant extra definition.
+       (parse_ipath): Likewise.
+
+2009-07-14  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
+       coredumps.
+       * find/tree.c (set_new_parent): Initialise struct
+       predicate->arg_text to NULL (instead of leaving it uninitialised).
+       (get_new_pred_noarg): Likewise.
+       (get_new_pred): Initialise predicate->arg_text to
+       "ThisShouldBeSetToSomethingElse" to make it easier to notice
+       bugs.
+       (get_new_pred_chk_op): Use get_new_pred_noarg.
+       (print_predicate): Use an if statement instead of
+       two ternary operators.
+       * find/util.c (insert_primary_withpred): Accept new argument, arg,
+       being the argument (if any) of this predicate.  Pass it to
+       get_new_pred_chk_op.
+       (insert_primary): Likewise (pass arg to insert_primary_withpred).
+       (insert_primary_noarg): New function; calls insert_primary with
+       arg=NULL.
+       * find/parser.c (collect_arg_stat_info): Add an output parameter;
+       the filename from which we collected the stat information.
+       (parse_closeparen, parse_delete, parse_and, parse_or,
+       parse_comma): Use get_new_pred_noarg.
+       (parse_cnewer, parse_newer, parse_anewer): Use new
+       collect_arg_stat_info and insert_primary interface.
+       (parse_print, parse_prune, parse_nouser, parse_empty): Use
+       insert_primary_noarg.
+       (parse_accesscheck, parse_false): Use insert_primary_noarg.
+       (parse_used, parse_iname, parse_fprint, insert_fprint,
+       parse_fstype, parse_ilname): Use new collect_arg and
+       insert_primary interfaces.
+       (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
+       parse_perm, parse_size, parse_user, parse_time): Use new
+       collect_arg and insert_primary_withpred interface.
+       (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
+       (parse_newerXY, parse_nogroup): Use new insert_primary interface.
+       (insert_regex, parse_samefile): Use new insert_primary_withpred
+       interface.
+       (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
+       new insert_primary_withpred interface.
+       * find/defs.h (struct predicate.arg_text): make const.
+       Add declarations for new function get_new_pred_noarg and
+       insert_primary_noarg.  Add 'arg' parameter to get_new_pred_chk_op
+       and insert_primary_withpred.
+       * NEWS: Mention the bugfix.
+
+2009-07-12  James Youngman  <jay@gnu.org>
+
+       Savannah bug #23920: warn about -path arguments ending in /.
+       * find/parser.c (insert_path_check): new function; abstracts the
+       common functionality of parse_path, parse_ipath, parse_wholename,
+       parse_iwholename.  Also check for a trailing slash and warn about
+       it (unless $POSIXLY_CORRECT is set).  Don't warn if the pattern
+       also happens to be a start_point, because those could be matched.
+       (parse_path, parse_ipath, parse_wholename, parse_iwholename): Use
+       insert_path_check.
+       * find/tree.c (is_start_point): new function; returns true if the
+       indidated string matches a start point.
+       (num_start_points, start_points): new variables, storing the
+       starting points listed on the command line.
+       (build_expression_tree): Set num_start_points and start_points.
+       * find/defs.h: Declare is_start_point.
+       * doc/find.texi (Full Name Patterns): Explain that candidate names
+       for -path, -regex etc. will never end in a slash, so "-path /tmp/"
+       will never match anything.
+       * find/find.1: Likewise.
+
+       Fix Savannah bug #26327: xargs man page is vague about the number
+       of times command is executed.
+       * xargs/xargs.1 (DESCRIPTION): Explain more clearly that the
+       command will be executed many times.  Indicate that -L can also be
+       useful with -P.
+       * NEWS: Mention this change.
+
+2009-07-11  James Youngman  <jay@gnu.org>
+
+       * NEWS: Set the version to 4.5.6-git, so that we can make test
+       releases.
+
+2009-06-11  James Youngman  <jay@gnu.org>
+
+       Make import-gnulib.sh faster in the common case where neither
+       import-gnulib.config nor gnulib itself changed.
+       * import-gnulib.sh (gnulib_changed): New variable.
+       (do_checkout): set gnulib_changed=true if the gnulib code didn't
+       already correspond to our configured version.  Don't use a large
+       subshell, because we need to set $gnulib_changed and don't want
+       the value to be discarded.
+       (main): Run gnulib-tool if gnulib was not at the correct version
+       or the import-gnulib.config file has changed.
+
+2009-07-10  Reuben Thomas  <rrt@sc3d.org>
+
+    Fix quotation punctuation in find manual page, fixing bug #19120.
+    * find/find.1: Use ` instead of ' at the start of quoted text.  Use
+    \(aq instead of ' or \' in commands to get a literal straight quote.
+    Use ` and ' instead of `` and '' (for consistency).
+    * NEWS: mention this change.
+
+2009-07-10  James Youngman  <jay@gnu.org>
+
+    * import-gnulib.config (gnulib_version): Update to the current version
+    of gnulib.
+
+    Fix Savannah bug #24873, Duplicate fprint option corrupts output
+    by opening each output file only once.
+    * find/sharefile.c: New file; keeps a mapping from dev/inode to
+    FILE*, allowing us to determine when the file we just opened is
+    the same as something else we already opened.
+    * import-gnulib.config (modules): Import the hash module, used by
+    sharefile.c.
+    * find/sharefile.h: Function declarations for same.
+    * find/find.c (main): Call sharefile_init().
+    * find/ftsfind.c (main): Likewise.
+    * find/parser.c (open_output_file): Call sharfile_fopen to open an
+    output file, instead of fopen_safer.
+    * find/util.c (cleanup): Close any shared output files that are
+    open.  Also fflush stdout.
+    (undangle_file_pointers): Set the relevant FILE* pointers to
+    NULL.
+    (flush_and_close_output_files): Remove (since sharefile_destroy
+    has the desired effect).
+    * find/Makefile.am (libfindtools_a_SOURCES): Add sharefile.c.
+    (EXTRA_DIST): Add sharefile.h.
+    * find/defs.h: #include sharefile.h.
+    (struct state): Add member shared_files, holding a handle to the
+    shared-file hash table implemented in sharefile.[ch].
+    * find/testsuite/find.gnu/fprintf-samefile.exp: New test,
+    exercising -fprintf (though it is not able to detect bug #24873).
+    * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
+    find.gnu/fprintf-samefile.exp.
+    * NEWS: Mention the bugfix.
+
+2009-07-07  James Youngman  <jay@gnu.org>
+
+       * NEWS: Indicate that -wholename is no longer preferred over -ipath.
+
+2009-07-06  James Youngman  <jay@gnu.org>
+
+       Prepare for release of findutils version 4.5.5.
+       * configure.ac: Set version number to 4.5.5.
+       * NEWS: Likewise.
+
+2009-07-06  Andreas Metzler  <gnu@downhill.at.eu.org>
+
+       * doc/find.texi: Various typo fixes.
+
+2009-07-05  James Youngman  <jay@gnu.org>
+
+       Fix typo in -execdir documentation.
+       * doc/find.texi (Single File): Typo correction; we're describing
+       -execdir, not -exec.
+       * NEWS: Mention the bugfix.
+
+2009-05-12  James Youngman  <jay@gnu.org>
+
+       #26537: find -prune now makes sure it has valid stat() information.
+       * NEWS: Added Savannah bug number for Colin's bugfix.
+
+2009-05-07  Colin Watson  <cjwatson@ubuntu.com>
+
+       * find/parser.c (parse_prune): -prune needs stat information if
+       -depth is not in use.
+       * find/pred.c (pred_prune): Assert that stat information is
+       available if needed.
+       * find/testsuite/find.posix/prune-stat.exp: New test.
+       * find/testsuite/find.posix/prune-stat.xo: New test.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP, EXTRA_DIST_XO): Added
+       prune-stat.exp, prune-stat.xo.
+       * NEWS: Mention this bugfix.
+
+2009-07-05  James Youngman  <jay@gnu.org>
+
+       * lib/check-regexprops.sh: New test.  Run regexprops as a check,
+       and compare its output against the contents of doc/regexprops.texi.
+       * lib/Makefile.am: Run check-regexprops.sh for 'make check'.
+       * doc/Makefile.am: don't clean regexprops.texi, and don't generate
+       it automatically.
+       * doc/regexprops.texi: add into source control.
+       * doc/.gitignore: don't ignore regexprops.texi
+
+2009-07-04  James Youngman  <jay@gnu.org>
+
+       * configure.ac (AC_CONFIG_FILES): order the entries alphabetically
+       and remove duplicates.  Put po/Makefile.in before
+       po/Makefile, since the former is required in order to
+       config.status to generate the latter.
+
+2009-07-04  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * configure.ac (AC_CONFIG_FILES): Add po/Makefile.in.
+       (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
+
+2009-05-12  Eric Blake  <ebb9@byu.net>
+
+       xargs: fix compilation on cygwin
+       * xargs/xargs.c (main): Check that ARG_MAX is defined.
+
+       xargs: avoid compiler warning
+       * xargs/xargs.c (get_char_oct_or_hex_escape): Pass correct type to
+       ctype macro.
+
+2009-05-04  James Youngman  <jay@gnu.org>
+
+       * find/util.c (get_info): Don't fall off the end of the function
+       without returning a value.
+
+2009-04-25  James Youngman  <jay@gnu.org>
+
+       * AUTHORS: Add Andreas Metzler.
+
+2009-04-25  Andreas Metzler  <gnu@downhill.at.eu.org> (tiny change)
+
+       Correct a typo "diagnositcs".
+       * doc/find.texi (Environment Variables): Correct a typo.
+
+2009-04-24  A. Costa  <agcosta@gis.net> (tiny change)
+
+       Correct a typo "diagnositcs".
+       * find/find.1 (POSIXLY_CORRECT): Correct a typo.
+
+2009-04-24  James Youngman  <jay@gnu.org>
+
+       * find/ftsfind.c (consider_visiting): Print a message for "-D
+       search" both on entry to the function and at the point where we
+       have decided not to ignore this file.
+
+2009-04-12  James Youngman  <jay@gnu.org>
+
+       * NEWS: Mention the fix for bug #22708 in the correct section.
+
+       Avoid mixing declarations and statements.
+       * lib/buildcmd.c (bc_do_exec): Declare variables at the top of the
+       relevant block, in order to avoid mixing declarations and
+       statements.
+       * xargs/xargs.c (main): Likewise.
+
+2009-04-12  Leslie Polzer  <leslie.polzer@gmx.net>
+
+       Merge Leslie Polzer's ARG_MAX enhancements to xargs which were
+       produced as part of the Google Summer of Code 2007.
+       These changes fix Savannah bug #22708.
+       * find/pred.c (launch): The struct buildcmd_control* argument is
+       no longer const.
+       * find/defs.h: Likewise
+       * lib/buildcmd.c (bc_do_insert): The struct buildcmd_control*
+       argument is no longer const.
+       (bc_push_arg): Likewise.
+       (cb_exec_noop): Likewise.
+       (get_stringv_len): New function; measures the length of
+       a NULL-terminated argv sequence.
+       (bc_do_exec): Rename from do_exec, and make global.  Modify the
+       function to react to exec failing with E2BIG by trying again
+       with fewer arguments.
+       * xargs/xargs.1: Mention that xargs automatically adopts to the
+       situation where exec fails with E2BIG.
+       * xargs/xargs.c: (parent): New variable, the PID of the parent
+       process.
+       (main): initialise the variable 'parent'.   Don't fail immediately
+       due to lack of space when the environment is large.  Call
+       xargs_do_exec via bc_do_exec.
+       (xargs_do_exec): The struct buildcmd_control* argument is no
+       longer const.   When exec fails in the child, communicate the
+       errno value back to the parent through a pipe which is
+       close-on-exec; this allows us to accurately determine the cause of
+       the failure and also to distinguish exec failures from all
+       possible exit codes in the child.
+       (wait_for_proc): If the utility cannot be found or cannot be run,
+       we now find out about this by reading an errno value from the
+       pipe, so this means that exit codes 126 and 127 in the child no
+       longer have a special interpretation.
+       * NEWS: mention these changes.
+
+2009-04-13  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.config (gnulib_version): Update to current head
+       version.
+
+2009-04-13  Andreas Metzler <gnu@downhill.at.eu.org>
+
+       Fix Savannah bug# 26092: find.1 still marks -iwholename as prefered
+       * find/find.1 (-iwholename): Indicate that this option is no
+       longer preferred over -ipath.
+
+2009-03-07  James Youngman  <jay@gnu.org>
+
+       Update the code to better reflect the semantics of digest_mode().
+       * find/defs.h: Pass the file mode to digest_mode() by reference
+       (as a pointer) rather than by value to make it unnecessary for the
+       caller to know that the value passed should become dead.
+       * find/util.c (digest_mode): Change the implementation.
+       * find/find.c (process_path): Update caller.
+       * find/ftsfind.c (consider_visiting): Update caller.
+
+2009-03-10  James Youngman  <jay@gnu.org>
+
+       Remove "lib/wait.h", since gnulib provides <sys/wait.h>.
+       * lib/Makefile.am (EXTRA_DIST): Remove wait.h, since gnulib
+       provides it.
+       * lib/wait.h: Not needed.
+       * find/pred.c: Include <sys/wait.h> instead of "wait.h".
+       * lib/waitpid.c: Likewise.
+       * xargs/xargs.c: Likewise.
+
+       Remove unnecessary include guards.
+       * lib/dircallback.c: gnulib provides <locale.h>, so no need for
+       include guards.
+       * locate/locate.c: Likewise.
+       * lib/listfile.c: Likewise.
+       * lib/savedirinfo.c: Likewise with <sys/stat.h>
+       * find/defs.h: gnulib provides <inttypes.h>, so no need for
+       include guards.
+       * lib/nextelem.c: Likewise with <string.h> and <stdlib.h>.
+       * locate/bigram.c: Likewise.
+       * locate/frcode.c: Likewise.
+       * lib/buildcmd.c: Likewise with <locale.h> and <wchar.h>
+       * xargs/xargs.c: Likewise with <locale.h>, <wchar.h> and <stdlib.h>
+       * import-gnulib.config (modules): Import the mbrtowc and whchar
+       modules.
+       * lib/qmark.c (multibyte_qmark_chars):  Don't surround with
+       HAVE_MBRTOWC, since we now have a replacement for mbrtowc.
+       Likewise, don't protect inclusion of <string.h> with
+       HAVE_STRING_H.  Likewise with <wchar.h>.
+       (multibyte_qmark_chars): Rename to qmark_chars.
+       (qmark_chars): Remove old version (since it is replaced by the
+       function that used to be multibyte_qmark_chars).
+       * lib/printquoted.c: Don't include <wchar.h>, we don't need it.
+
+       Prepare for release of findutils-4.5.4.
+       * configure.ac (AC_INIT): Set version number to 4.5.4.
+       * NEWS: Likewise.
+
+       Remove obsolete regex.c copy fixup.
+       * Makefile.am (jy-regex-fix) Delete.
+       (dist-hook): Remove jy-regex-fix.
+
+       Update to version 0.17 of GNU gettext.
+       * configure.ac: Update to version 0.17 of gettext.
+       * import-gnulib.sh (refresh_output_files): Run autopoint too.
+       * ABOUT-NLS: Remove the file from source control, since gettext
+       produces it.
+       * .gitignore: Ignore ABOUT-NLS.
+       * po/Makefile.in.in: Likewise.
+       * po/.gitignore: Ignore po/Makefile.in.in.
+
+       Correct the changelog-driver argument list.
+       * import-gnulib.sh (check_merge_driver): Add the missing arguments
+       to the changelog driver.  Change the name of the merge driver from
+       cl-merge to merge-changelog, for consistency with gnulib,
+       coreutils, autoconf, libtool, and m4.
+
+2009-03-08  James Youngman  <jay@gnu.org>
+
+       Switch to using a merge driver for the ChangeLog file.
+       * import-gnulib.sh (check_merge_driver): New function; verifies
+       that we have a merge driver installed for the ChangeLog file (if
+       we're on the master or release branch, the check is skipped).
+       Also check that the .gitattributes file exists.
+       * README-hacking: Point out that using a merge driver for
+       ChangeLog is a good idea.
+       * .gitattributes: New file
+
+       Optimise away calls to stat if all we need is the inode number.
+       This fixes Savannah bug #24342.
+       * find/util.c (get_info): call get_statinfo if need_inum and we
+       don't already have the inode number.
+       (apply_predicate): Call get_info if need_inum.
+       * find/defs.h (enum EvaluationCost): Add NeedsInodeNumber.
+       (struct predicate): Add need_inum.
+       * find/tree.c (get_new_pred): Default need_inum to false.
+       (get_new_pred_chk_op): Likewise.
+       * find/ftsfind.c (consider_visiting): Copy the value of st_ino
+       into statbuf.st_ino.
+       * find/parser.c (parse_inum): Set need_inum=true.
+       (parse_samefile): Set need_inum=false, but add a comment
+       indicating that there is an optimisation opportunity.
+       (make_segment): For -printf %i, set NeedsInodeNumber rather than
+       NeedsStat.
+       * find/pred.c (pred_inum): assert that the inode number is known
+       (i.e. non-zero).
+       (print_optlist): Print "[need inum]" when need_inum is  true.
+       * find/tree.c (opt_expr): Also reorder expressions if the right
+       hand expression is -inum (that is, consider that test to be no
+       more expensive than -type).
+       (set_new_parent): Default need_inum to false.
+       (costlookup): Set pred_inum=NeedsInodeNumber.
+       (get_pred_cost): need_inum implies a data cost of
+       NeedsInodeNumber.
+       (cost_table): Add NeedsInodeNumber.
+       (print_tree): Handle need_inum.
+
+       For -samefile, skip stat if inode numbers differ.
+       * find/pred.c (pred_samefile): Skip stat if the inode numbers are
+       different.
+       Enable -Wall compiler warnings and fix them.
+       * configure.ac: Turn on -Wall warnings.
+       * find/find.c (process_dir): Print unsigned values of unspecified
+       width as uintmax_t.
+       * xargs/xargs.c: Include <inttypes.h> and <stdint.h>, but without
+       the include guards (since we assume an ISO C platform anyway).
+       * import-gnulib.config (modules): Add modules inttypes and stdint.
+
+2009-03-07  James Youngman  <jay@gnu.org>
+
+       Remove unused Debian files; the Debian package doesn't use them.
+       * debian.rules: Delete.
+       * debian/README.debian: Delete.
+       * debian/TODO: Delete.
+       * debian/changelog: Delete.
+       * debian/conffiles: Delete.
+       * debian/control: Delete.
+       * debian/copyright: Delete.
+       * debian/cron.find: Delete.
+       * debian/doc-base: Delete.
+       * debian/postinst: Delete.
+       * debian/preinst: Delete.
+       * debian/prerm: Delete.
+       * debian/rules: Delete.
+       * debian/substvars: Delete.
+       * debian/updatedb.conf: Delete.
+       * debian/.cvsignore: Delete.
+       * debian/.gitignore: Delete.
+
+2009-03-06  James Youngman  <jay@gnu.org>
+
+       Change suffix for non-release versions from -CVS to -git.
+       * configure.ac(AC_INIT): Change the suffix used to indicate that
+       the version number doesn't correspond to a source release from
+       -CVS to -git.
+       * NEWS: Likewise.
+
+       Delete the INSTALL file; rely on Autoconf providing it.
+       * INSTALL: Delete; this file can be copied/generated by Autoconf,
+       so do that rather than keeping it under source control.
+       * .gitignore: Ignore INSTALL.
+
+       Updated translation po files from translationproject.org.
+       * po/bg.po: Updated Bulgarian translation.
+       * po/de.po: Updated German translation.
+       * po/ga.po: Updated Irish translation.
+       * po/hu.po: Updated Hungarian translation.
+       * po/lt.po: Updated Lithuanian translation.
+       * po/nl.po: Updated Dutch translation.
+       * po/pl.po: Updated Polish translation.
+       * po/sl.po: Updated Slovenian translation.
+       * po/sv.po: Updated Swedish translation.
+       * po/tr.po: Updated Turkish translation.
+       * po/uk.po: Updated Ukranian translation.
+       * po/vi.po: Updated Vietnamese translation.
+       * NEWS: Mention these updates.
+
+2009-03-05  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #25764, duplicate entry for proc in PRUNEFS.
+       * locate/updatedb.sh (PRUNEFS): Remove duplicate entry for proc.
+       * locate/Makefile.am (updatedb): add dependency on Makefile, and
+       add a comment explaining why updatedb is generated by make, not
+       configure.
+       * NEWS: Mention this bugfix.
+
+       Provide more detailed help on how to work with the git sources.
+       * README-CVS: Rename to README-hacking.
+       * README-hacking: Add more specific information about using topic
+       branches, test cases, documentation, coding standards and how to
+       submit patches.   Much of this is adapted from the files
+       README-hacking and HACKING in the coreutils source tree.
+       * Makefile.am: Generate tool-versions.txt, which is a list of the
+       --version outputs of the tools that the maintainer used to build a
+       release.
+       * NEWS: Mention these improvements.
+
+2009-03-04  James Youngman  <jay@gnu.org>
+
+       Upgrade to gnulib version 86a37c05846ff3772afd1300f135866dd1d271c6.
+       * import-gnulib.config(gnulib_version): Update.
+       * xargs/Makefile.am: Add $(LIB_CLOSE) to $(LDADD), as suggested by
+       gnulib's unistd module.
+       * locate/Makefile.am: Likewise.
+       * find/Makefile.am: Likewise.
+
+       Removed trailing white space.
+       * Makefile.am: Removed trailing white space.
+       * NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
+       doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
+       find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
+       find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
+       import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
+       lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
+       lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
+       lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
+       lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
+       lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
+       lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
+       lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
+       locate/locate.c, locate/locatedb.5, locate/locatedb.h,
+       locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
+       m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1:
+       Likewise.
+       * m4/nullsort.m4: Removed occurrences of space followed by tab.
+
+       Enabled GCC warnings for declarations after statements.
+       * import-gnulib.config: Import the gnulib module 'warnings'
+       * configure.ac: Add GCC warning -Wdeclaration-after-statement.
+       * Makefile.am: Add AM_CFLAGS and set it to $(WARN_CFLAGS).
+       * find/Makefile.am, doc/Makefile.am, lib/Makefile.am: Likewise.
+       * locate/Makefile.am, xargs/Makefile.am: Likewise.
+
+2009-03-03  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #25359, more efficiently (suggestion by Nick Fortino).
+       * find/ftsfind.c (consider_visiting): revert the previous change
+       which discarded type information, and instead simply ensure that
+       state.curdepth holds the correct value before digest_mode() is
+       called.
+       (find): revert the previous change.
+       (visit): we no longer need to set state.curdepth here, since it
+       will have been set already in consider_visiting().
+
+2009-03-02  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #25359.
+       * find/ftsfind.c (consider_visiting): discard mode information
+       from fts when the -H option is in effect and the current file is a
+       symbolic link.
+       (find): don't decode the mode information that find is trying to
+       pass to us in that case, since we don't want to use it.
+       * find.posix/sv-bug-25359.exp: new test for this bug.
+       * find.posix/sv-bug-25359.xo: expected output for the test.
+       * NEWS: Mention this bugfix.
+
+2009-02-21  James Youngman  <jay@gnu.org>
+
+       Updated the email address for Eric B. Decker.
+       * ChangeLog: Updated Eric's address
+       * find/find.c: Likewise
+       * find/ftsfind.c: Likewise
+
+2009-02-21  Jim Meyering  <meyering@redhat.com>
+
+       find: take advantage of new gnulib/fts leaf-optimization
+       * find/ftsfind.c (ftsoptions): Set the FTS_CWDFD bit.
+       This is required in order to take advantage of fts' leaf-optimization.
+       * find/ftsfind.c (consider_visiting): Allow state.type to be 0
+       when fts_info is FTS_NSOK;
+
+       This allows find to process an fts entry for which fts_read returns
+       FTS_NSOK (no stat) but for which find requires only type info.
+       This happens on file systems that lack dirent.dtype information.
+       Currently, only reiserfs is handled this way.  Until the recent
+       gnulib/fts change, [97d5b66] "fts: arrange not to stat non-directories
+       in more cases" this change was not necessary, because fts would always
+       stat non-dir entries on a file system with no dirent.dtype information.
+
+       However, combined with the gnulib change, this change lets find
+       avoid many per-non-directory stat-like syscalls (i.e. fstatat)
+       in some very common cases, like "find . -print" on reiserfs --
+       which can be a huge performance savings.
+
+       find: avoid warning about unused local
+       * find/pred.c (scan_for_digit_differences): Remove declaration of
+       unused local, "ok". (second time, really applying that patch).
+
+2009-02-21  James Youngman  <jay@gnu.org>
+
+       Update gnulib version.
+       * import-gnulib.config (gnulib_version): Update from
+       d4b129b8e5f8a8d1198020fd6fc79310d305936c to
+       df70a4bf4a1e84171918db09b639ae1a14c2a9b2.  This pulls in the
+       following relevant changes:
+       fts: correct internal computation of nlinks (optimization-related)
+       fts: move a function definition "up" (no semantic change)
+       fts: arrange not to stat non-directories in more cases
+       fts: add #if guards so that the fts_lgpl module still builds
+       fts: avoid used-uninitialized error due to recent change
+       regex: avoid compilation failure with upcoming gcc-4.4
+       regex: fix glibc bug 697
+       regex: fix glibc bug 9697
+       Other changes may also be relevant; for details please check gnulib/ChangeLog.
+
+       Improvements to import-gnulib.config, import-gnulib.sh.
+       * import-gnulib.config (gpl3_update_files): No longer need to
+       update the licenses of build-aux/mdate-sh, build-aux/texinfo.tex
+       or build-aux/ylwrap as they are already GPLv3+.
+       (modules): Use the strdup-posix module instead of strdup, and stop
+       using the obsolete modules memcmp and memset, since we now assume
+       those functions will already be present on the host system.
+       * import-gnulib.sh (rehack): Be more verbose about which files
+       actually needed a license edit and which did not.
+
+       Follow gnulib-tool's Makefile.am edit suggestions.
+       * find/Makefile.am (LDADD): Use $(LIBINTL) instead of @INTLLIBS@
+       and use $(LIB_CLOCK_GETTIME) instead of @LIB_CLOCK_GETTIME@.
+       * lib/Makefile.am: Likewise.
+       * locate/Makefile.am: Likewise.
+       * xargs/Makefile.am: Likewise.
+       * import-gnulib.sh (hack_gnulib_tool_output): Add
+       m4/gnulib-cache.m4 to EXTRA_DIST in gnulib/Makefile.am, as
+       gnulib-tool suggests.
+
+2009-02-21  Jim Meyering  <meyering@redhat.com>
+
+       find: avoid warning about unused local, remove unnecessary include.
+       * find/pred.c (scan_for_digit_differences): Remove declaration of
+       unused local, "ok".
+       (do_time_format): Remove decl of "done"; replace sole use with a
+       constant, "true".  Initialize "i" and "n".
+       * lib/dircallback.c: Don't include unistd.h.  Not needed.
+
+2009-01-17  Thien-Thi Nguyen  <ttn@gnuvola.org>
+
+       find: Fix -regexptype parse specification bug: declare as POSOPT.
+       * find/parser.c (parse_table): Parse -regextype as POSOPT.
+
+2008-12-26  Jim Meyering  <meyering@redhat.com>
+
+       find: avoid using undefined statbuf
+       * /ftsfind.c (consider_visiting): Use local variable, mode,
+       rather than possibly undefined statbuf.st_mode.
+
+2008-12-23  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #25154: Failure to compile with GCC-2.95.4
+       * find/parser.c (do_parse_xmin): Move declaration of struct
+       timespec origin before the statements; declarations after
+       statements are a GCC extension we were accidentally relying on.
+
+2008-12-21  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #25144: Misleading message for find -user unknown.
+       * find/parser.c (parse_user): If there is no known group for the
+       specified user (and it does not appear to be a uid), issue a
+       fatal error message instead of returning false, because the error
+       message that results from a return of false is "invalid argument",
+       which is misleading in this case.  Similarly for a missing or an
+       empty argument.
+
+2008-12-01  James Youngman  <jay@gnu.org>
+
+       * po/fr.po: Updated French translation.
+
+       * po/id.po: Updated Indonesian translation.
+
+2008-12-01  Geoff Gole  <geoffgole@gmail.com>
+
+       * xargs/xargs.1 (STANDARDS CONFORMANCE): Fix typo.
+
+2008-11-30  Jim Meyering  <meyering@redhat.com>
+
+       Pass file type information in dirent.d_type from fts to find.
+       * find/ftsfind.c (consider_visiting): When fts provides usable
+       dirent.d_type information, and the only stat information required
+       by find's predicates is the file-type information normally found
+       in stat.st_mode (that is, not the permissions information), skip
+       the now-redundant stat calls.  This change is useful only with the
+       very latest version of fts.c from gnulib.  Requires gnulib version
+       d4b129b8e5f8a8d1198020fd6fc79310d305936c or later.
+       * find/ftsfind.c (find): Set state.have_type if fts returned type
+       information.
+
+2008-11-08  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.config (gnulib_version): Update version of gnulib,
+       mainly in order to pull in Jim Meyering's efficiency improvements
+       to fts.  See http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=2f2978ede97205c49d3e568ccffa5a04fb53326b
+       * lib/dircallback.c: gnulib's lstat.h is now gone, instead it
+       provides <sys/stat.h> where that is needed.
+
+2008-11-08  Jim Meyering <meyering@redhat.com>
+
+       * README-CVS: tiny typo fix (s/fileutils/findutils/).
+
+2008-09-07  James Youngman  <jay@gnu.org>
+
+       Fix bug #23996 (integer overflow when parsing "-used 3").
+       * find/parser.c (get_relative_timestamp): Check for overflow after
+       the fact by comparing the relative sizes of the result and the
+       operands.  This prevents an incorrect diagnosis of overflow when
+       the resulting tv_sec is correctly negative (as is normally the
+       case for -used).
+
+2008-08-31  James Youngman  <jay@gnu.org>
+
+       New Czech translation.
+       * po/cs.po: New Czech translation.
+       * configure.ac: Added cs (Czech) to ALL_LINGUAS.
+
+       Fix Savannah bug #24169 (-neweraa without following arg coredumps).
+       * find/parser.c (parse_newerXY): Issue a fatal error message if
+       there is no following argument.
+       * find/testsuite/find.gnu/sv-bug-24169.exp: Test case for this
+       bug.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Also distribute
+       this new test file.
+       * NEWS: Mention this change.
+
+2008-08-04  James Youngman  <jay@gnu.org>
+
+       * find/find.1: correct typo seach->seach (reported by Bobby
+       R. Ward).
+       * locate/updatedb.1: correct typo Any -> any (reported by Reuben
+       Thomas).
+
+2008-06-28  James Youngman  <jay@gnu.org>
+
+       Fix savannah bug #23070 (find.1 needs update for -perm /000)
+       * find/find.1 (-perm /mode): The all-bits-zero behaviour has
+       already changed.
+       * NEWS: Mention the fix.
+
+2008-06-21  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.config (gnulib_version): Updated to current HEAD
+       gnulib.
+
+       Fix Savannah bug #23663, crash in some locales for %AX.
+       * find/pred.c (do_time_format): Fix off-by-one error in handling
+       of the buffer used to print timestamps.   This caused a crash in
+       some locales when handling the %AX format specifier.
+       * NEWS: Mention this bugfix.
+
+2008-06-20  RB  <aoz.syn@gmail.com>
+
+       * doc/find.texi (Finding the Shallowest Instance): Add worked
+       example explaining how to efficiently locate the shallowest
+       instances of '.svn' or 'CVS' in a forest of project trees.
+       * find/find.1 (EXAMPLES): Add the same example here (with slightly
+       briefer wording).
+
+2008-06-19  Per Starbäck  <starback@stp.lingfil.uu.se> (tiny change)
+
+       * doc/find.texi (Unusual characters in filenames): Directory
+       separator is the slash, not the backslash.
+
+2008-06-19  James Youngman  <jay@gnu.org>
+
+       * po/zh_CN.po: Updated the Chinese (simplified) translation.
+       * NEWS: Mention this change.
+
+2008-06-19  Stepan Kasal  <skasal@redhat.com>
+
+       * doc/find.texi (Cleaning Up): Move the note about -depth up.
+
+2008-06-19  James Youngman  <jay@gnu.org>
+
+       * po/lt.po: New Lithuanian translation.
+       * NEWS: Mention this change.
+       * configure.ac: Add "lt" to ALL_LINGUAS.
+
+2008-05-28  James Youngman  <jay@gnu.org>
+
+       Bugfix to the code that was previously supposed to fix bug #22662
+       in 4.5.0.
+       * find/pred.c (scan_for_digit_differences): Remember that wesaw
+       the first differing digit and also get the order of the
+       subtractionoperands right.
+       (do_time_format): Off by one error on checking for a nondigit
+       after the sequence of changed digits.
+       * NEWS: Mention this change.
+
+2008-05-18  James Youngman  <jay@gnu.org>
+
+       Update gnulib.
+       * import-gnulib.config (gnulib_version): Update to current head
+       version of gnulib.
+
+       Document effect of gnulib update, mainly on yesno().
+       * doc/find.texi (Unusual Characters in File Names): Explain that
+       the LC_CTYPE variable affects which characters are considered to
+       be printable by -printf %p, -print and -fprint.
+       (Querying): Explain in more detail how environment variables
+       affect the interpretation of the response to -ok and -okdir.
+       (Regular Expressions): Indicate that the locale configuration
+       affects the interpretation of regular expressions.
+       (Environment Variables): Describe how LC_COLLATE and LC_CTYPE
+       affect the interpretation of regular expressions.  Indicate that
+       LC_MESSAGES affects the interpretation of the response to -ok.
+       * find/find.1 (-ok): Describe the effect of POSIXLY_CORRECT,
+       LC_CTYPE and LC_COLLATE.
+       (-okdir): Likewise.
+       (UNUSUAL FILENAMES): Describe how LC_CTYPE affects -printf %p,
+       -print, -fprint.
+       (STANDARDS CONFORMANCE): -ok and -okdir now obey the system's
+       defintion of yes/no if POSIXLY_CORRECT is set.  In any case,
+       LC_CTYPE and LC_COLLATE may have some effect.  Point out that
+       the setting of LC_MESSAGES deternmines what pattern is used to
+       interpret the user's response to -ok/-okdir.
+       * find/parser.c: Remove definition of ISUPPER, which we no longer
+       need.
+       * NEWS: mention these changes.
+
+2008-04-25  Eric Blake  <ebb9@byu.net>
+
+       Support cygwin 1.7.0.
+       * find/parser.c (parse_newerXY)
+       [HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC]: Add support for another
+       form of birthtime.
+       * import-gnulib.config (gnulib_version): Update to pick up change
+       necessary for cygwin fstatat.
+
+2008-03-21  James Youngman  <jay@gnu.org>
+
+       * find/testsuite/find.gnu/xtype-symlink.exp: Removed unnecessary
+       test code which created a insecure tempfile.
+
+2008-03-16  James Youngman  <jay@gnu.org>
+
+       Update gnulib.
+       * import-gnulib.config (gnulib_version): Update to a newer version
+       of gnulib.
+
+       Find optimises at -O2 by default.
+       * find/util.c (set_option_defaults): Use a default optimisation
+       level of 2 rather than 0.
+       * NEWS: Mention this change.
+
+       Begin work on findutils-4.5.x.
+       * configure.ac: We're now working on the 4.5.x release series, so
+       change the version number.
+       * NEWS: Likewise.
+
+2008-03-10  Justin Pryzby  <justinpryzby@users.sourceforge.net> (tiny change)
+
+       * doc/find.texi: Various typo corrections.
+
+2008-03-10  Eric Blake  <ebb9@byu.net>
+
+       Don't truncate printed ino values.  Fixes Savannah bug #15472.
+       * find/find.c (wd_sanity_check): Use PRIuMAX for platforms with
+       64-bit ino_t.
+       * NEWS: Document this.
+
+2008-03-10  Jim Meyering  <meyering@redhat.com>
+
+       Rename local and member "dirfd" to avoid shadowing the function.
+       This avoids many warnings from gcc -Wshadow:
+       * lib/buildcmd.h (struct buildcmd_state) [dir_fd]: Rename member
+       from dirfd.
+       * find/defs.h (struct exec_val) [dir_fd]: Likewise.
+       Rename parameter in prototype.
+       * find/ftsfind.c (inside_dir): Rename parameter: s/dirfd/dir_fd/
+       * find/parser.c (new_insert_exec_ok, insert_exec_ok): Likewise.
+       * find/pred.c (new_impl_pred_exec, prep_child_for_exec, launch):
+       s/dirfd/dir_fd/
+       * find/util.c (do_complete_pending_execdirs): Likewise.
+       (complete_pending_execdirs): Likewise
+       * lib/buildcmd.c (bc_init_state, bc_clear_args): Likewise.
+       * lib/dircallback.c (run_in_dir): Likewise.
+       * lib/dircallback.h (DIRCALLBACK_H): Likewise.
+       * lib/listfile.c (list_file, get_link_name_at): Likewise.
+       * lib/listfile.h (LISTFILE_H): Likewise.
+
+       Avoid link failure with -fno-common.
+       * locate/code.c (program_name): Declare "extern".
+
+2008-03-09  James Youngman  <jay@gnu.org>
+
+       Fix (documentation) bug #20873, / and . in file names for -path.
+       * doc/find.texi (Full Name Patterns): Mention that * in the "find
+       -path" pattern will match both / and leading dots.
+
+2008-03-08  Jim Meyering  <meyering@redhat.com>
+
+       Fix doc typos.
+       * doc/find-maint.texi (Security): s/ongest/longest/
+       (Making Releases): s/the the/the/
+
+       Avoid link failure with gcc -fno-common.
+       * find.c (program_name, starting_desc): Declare "extern".
+
+2008-02-15  Eric Blake  <ebb9@byu.net>
+
+       Avoid compiler warnings.
+       * find/pred.c (pred_name_common): Remove unused variable.
+       * locate/locate.c (print_stats): Avoid undefined format string.
+
+2008-02-15  James Youngman  <jay@gnu.org>
+
+       * README-CVS: Explain how to update the translations from the
+       translation project.
+
+       * NEWS, configure.ac: Change release number to 4.3.14-CVS.
+
+2008-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
+
+       * import-gnulib.config: Add progname.
+
+       * lib/Makefile.am (LDADD): Use @LIBINTL@ instead of @INTLLIBS@.
+
+       * xargs/xargs.1: Fix a couple of typos.
+
+2008-02-12  James Youngman  <jay@gnu.org>
+
+       Updated translations: German, Irish, Dutch, Polish, Vietnamese.
+       * po/de.po, po/ga.po, po/nl.po, po/pl.po, po/vi.po: Updated from
+       the Translation Project.
+
+       Fix Savannah bug #22056, -Xtime tests are off by one second.
+       * find/defs.h (struct options): Change cur_day_start from time_t
+       to strct timespec.
+       * find/util.c (set_option_defaults): Likewise.
+       * find/parser.c (get_relative_timestamp): Change the origin
+       argument from time_t to struct timespec.
+       (estimate_timestamp_success_rate): Ignore the nanoseconds field of
+       the timestamp when estimating the probable success rate.
+       (parse_daystart): Handle the nanoseconds field too.
+       (do_parse_xmin): The origin argument to get_relative_timestamp()
+       is of type struct timespec, not time_t.
+       (parse_used): Likewise.
+       (parse_time): Likewise.
+       * find/pred.c (pred_timewindow): in the COMP_EQ case, accept times
+       exactly at the end of the window and do not accept times exactly
+       at the start (reversing the previous treatment of the bounds).
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Added test for
+       -mtime 0; find.posix/mtime0.{exp,xo}.
+       * NEWS: mention this bugfix.
+
+2008-02-09  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi (xargs options): Moved documentation of xargs'
+       options into this new section.
+       (Invoking the shell from xargs): New section providing examples
+       about "xargs sh -c '...'".
+
+       * xargs/xargs.1: Indicate that the "sh -c" trick with xargs
+       achieves the same thing as BSD's "xargs -o", but in a more
+       flexible way.
+
+       * locate/updatedb.sh: Actually rename the old database to the new
+       one atomically, instead of just claiming the rename is atomic in a
+       comment :)  This fixes Savannah bug #22057.
+
+       * find/find.c (ngettext): Introduce a new macro to help with
+       internationalising plurals.   Use it to allow better
+       translations of format strings.
+       * locate/locate.c: Likewise.
+
+2008-01-07  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.c: (main): Standardise on "Warning" instead of
+       "warning" in messages.
+
+       * xargs/xargs.c: (add_proc): Use x2nrealloc to extend the pids
+       array, rather than doubling the size of the buffer (since the old
+       aproach was vulnerable to overflow).
+
+       Reap all available child processes before every fork.  This fixes
+       Savannah bug #21960.
+       * xargs/xargs.c: (proc_max): since this is a non-negative
+       quantity, make it unsigned.
+       (procs_executing): Likewise.
+       (pids_alloc): Likewise (using size_t).
+       (procs_executed): In order to prevent possible overflow, make this
+       a boolean, not a count.  We only cared if the previous counter was
+       zero or not, anwyay.
+       (add_proc): Set procs_executed to true rather than incrementing it.
+       (wait_for_proc): When called, always reap all available children.
+       Add an extra argument which is the minimum number of children we
+       must reap before returning.
+       (wait_for_proc_all): Pass the new extra argument.
+       (xargs_do_exec): Call wait_for_proc() to reap all available
+       children before forking a new child.  Modify other calls to
+       wait_for_proc to pass the new extra argument.
+       * NEWS: Mention this change.
+
+2007-12-20  James Youngman  <jay@gnu.org>
+
+       * find/fstype.c, find/ftsfind.c, find/parser.c, find/pred.c,
+       find/tree.c, lib/regextype.c, locate/locate.c, xargs/xargs.c,
+       find.c: Backed out positional paremeter change, as the use of
+       positional parameters was over-complex and unnecessary.  We'll
+       re-apply the pluralisation support change soon, but without the
+       positional parameters.
+
+2007-12-20  Jakub Bogusz <qboosh@pld-linux.org> (tiny change)
+
+       * xargs/xargs.c (parse_num): Corrected typo in format string
+       message.
+
+2007-12-20  Clytie Siddall <clytie@riverland.net.au> (tiny change)
+
+       * find/find.c (wd_sanity_check): Corrected typo in the format
+       string for an error message, which might cause a crash in
+       "oldfind" if a directory we moved into turned out to be a symbolic
+       link that moved while we were trying to change directory.
+
+2007-12-20  James Youngman  <jay@gnu.org>
+
+       * configure.ac: Advance the version number, as we are moving on
+       from 4.3.12.
+       * NEWS: Likewise
+
+2007-12-19  James Youngman  <jay@gnu.org>
+
+       * find/find.c (ngettext): Introduce a new macro to help with
+       internationalising plurals.   Use it with positional parameters in
+       order to allow better translations of format strings.
+       * find/fstype.c, find/ftsfind.c, find/parser.c, find/pred.c,
+       find/tree.c, lib/regextype.c, locate/locate.c, xargs/xargs.c: Likewise.
+
+2007-12-19  Benno Schulenberg <coordinator@translationproject.org> (tiny change)
+
+       * find/find.1: Corrected two typos.
+
+2007-12-19  James Youngman  <jay@gnu.org>
+
+       * po/nl.po: Updated Dutch translation from the Translation project.
+       * po/pl.po: Likewise for the Polish translation.
+       * po/sv.po: Likewise for the Swedish translation.
+       * po/vi.po: Likewise for the Vietnamese translation.
+
+2007-12-13  Eric Blake  <ebb9@byu.net>
+
+       Allow bootstrapping with autoconf 2.61a.
+       * configure.ac (AC_AIX, AC_ISC_POSIX): Delete, now that gnulib
+       takes care of this.
+       (jy_AC_TYPE_INTMAX_T): Delete, now that gnulib stdint module takes
+       care of this.
+
+2007-12-09  James Youngman  <jay@gnu.org>
+
+       * doc/perm.texi: Updated from the upstream source.
+
+       * po/nl.po, po/pt.po: Updated from the Translation Project.
+
+2007-12-08  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.1: Added examples on stdin handling and more
+       efficient core file deletion.
+       * NEWS: Mention this.
+
+       * doc/.cvsignore: Ignore regexprops-generic.texi.
+       * doc/.gitignore: ditto
+
+2007-12-04  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #15384, find misbehaves when parent directory is
+       not readable.
+       * find/testsuite/find.posix/parent.exp: New test
+       * find/testsuite/find.posix/parent.xo: New test
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP, EXTRA_DIST_XO):
+       Added parent.exp, parent.xo.
+       * find/find.c (safely_chdir): If safely_chdir_nofollow fails with
+       SafeChdirFailDestUnreadable, fall back on safely_chdir_lstat.
+
+       * find/find.1: Formatting fixes; options should be in bold.
+
+2007-12-02  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #20802, find -delete anomalies
+       * find/pred.c (pred_delete): Set find's exit status to nonzero if
+       -delete fails.
+       * find/find.1 (-delete): Document this.
+       * doc/find.texi (Delete Files): Document this.
+       * NEWS: Mention the fix.
+
+2007-11-30  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #20865 (-prune -delete without an explicit
+       -depth is now an error).
+       * find/parser.c (check_option_combinations): Diagnose the
+       situation where -delete and -prune are both used, because -delete
+       turns on -depth and -depth makes -prune do nothing.
+       * find/tree.c (build_expression_tree): call
+       check_option_combinations().
+       * find/defs.h (struct options): Add new boolean field
+       explicit_depth.
+       Also declare check_option_combinations.
+       * find/util.c (set_option_defaults): Initialise explicit_depth.
+       * NEWS: Mention this fix.
+
+2007-11-29  James Youngman  <jay@gnu.org>
+
+       Support the generation of regexprops-generic.texi.
+       * lib/regextype.h (get_regex_type_context): Used to indicate if a
+       particular type of regular expression is of interest for
+       regexprops.texi (which is findutils-specific) or
+       regexprops-generic.texi (which is not).   The "context" is simply
+       a flag set in a word.
+       * lib/regextype.c (get_regex_type_context): Implement this.
+       (regex_map): Assign a context to each regular expression type.
+       * lib/regexprops.c: Use the context information from regextype.c
+       to decide which regular expression types to docuemnt in the
+       output.  The selection is indicated on the command line; "generic"
+       and "findutils" are supported.
+       (copying): New function, which emits a copyright header into the
+       output.
+       (comment): New function for emitting a comment.
+       (ignore): New function which returns nonzero when the indicated
+       type of regular expression is not of interest for this version of
+       the document.
+       (menu): Miss out the non-interesteing regex types.
+       (get_next): Returns the regex type name for the "next" pointer,
+       taking into account which regex types are ignored.
+       (describe_all): Take into account which regex types are ignored,
+       and emit a copying header also.   Include a comment indicating
+       which "context" was of interest when generating the output.
+       * doc/Makefile.am: Add regexprops-generic.texi.  Generate this
+       file from regexprops.c.
+
+       Check gnulib out with native git, rather than git-cvspserver.
+       This fixes Savannah bug #21568, for the second time.
+       * import-gnulib.config (gnulib_version): Switch to using a git
+       commit id and native git, since git-cvspserver silently fails to
+       support "cvs update -D".
+       * import-gnulib.sh (do_checkout): Check gnulib out with git rather
+       than CVS.
+       (main): Require 'git' to be available.
+       (move_cvsdir): Remove any pre-existing gnulib-cvs directory.
+       * doc/find-maint.texi (Using the GNU Portability Library): Desribe
+       how we now obtain gnulib.  Update the instructions on how we patch
+       gnulib.
+       * .gitignore: Ignore gnulib-git, not gnulib-cvs
+       * .cvsignore: Ditto
+       * Makefile.am (findutils-check-smells): Change from gnulib-cvs to
+       gnulib-git.
+       * README-CVS: Mention the extra dependency on git.
+       * NEWS: Mention this change.
+
+       Add test case for Savannah bug #20803 (-prune return value).
+       * find/testsuite/find.posix/prune-result.exp: New test for
+       Savannah bug #20803.
+       * find/testsuite/find.posix/prune-result.xo: Expected otuput for
+       new test prune-result.exp.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Added
+       find.posix/prune-result.exp
+       (EXTRA_DIST_XO): Added find.posix/prune-result.xo
+
+2007-11-27  James Youngman  <jay@gnu.org>
+
+       * find/pred.c (pred_prune): Always return true.  This fixes
+       Savannah bug #20803.
+       * doc/find.texi (Directories): Document the change to -prune.
+       * find/find.1: Document the change.
+       * NEWS: Mention the fix.
+
+2007-11-26  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #20970, handling of trailing slashes with -name.
+       * find/pred.c (pred_name_common): Strip trailing slashes from the
+       pathname before applying fnmatch() to it.  This fixes Savannah bug
+       #20970.
+       * find/testsuite/find.posix/nameslash.exp: Test case for bug #20970.
+       * find/testsuite/find.posix/nameslash.xo: Expected output file for
+       same.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Added nameslash.exp.
+       (EXTRA_DIST_XO): Added nameslash.xo.
+
+       Fix Savannah bug #21634, No copy of FDL1.2 included in source
+       code.
+       * doc/find.texi: Change license to the GNU Free Documentation
+       License 1.2.
+       (GNU Free Documentation License): Include fdl.texi
+       * doc/find-maint.texi (GNU Free Documentation License): Include a
+       copy of the FDL (it was already under this license).
+       * doc/Makefile.am (find_maint_TEXINFOS): Include fdl.texi
+       (find_TEXINFOS): Include fdl.texi
+       * import-gnulib.config (modules): Include gpl-3.0 and fdl.
+
+       * doc/perm.texi: Added copyright license, following the license of
+       the original source document (perm.texi from coreutils).
+
+2007-11-25  James Youngman  <jay@gnu.org>
+
+       * Makefile.am (jy-regex-fix): Comment that the regex.c fix needs
+       to stay until we no longer support Automate-1.9.
+
+       * doc/perm.texi (Mode Structure): Fix setgid/setuid typo.
+
+2007-11-24  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi (Mode Bits): Correct the warning about the change
+       in behaviour of -perm /000 to indicate that the change has
+       happened now.  This fixes Savannah bug #21628.
+       * NEWS: Mention this.
+
+2007-11-22  James Youngman  <jay@gnu.org>
+
+       POSIXLY_CORRECT turns off warnings.
+       * find/defs.h (struct options): Added member posixly_correct.
+       This is set when the POSIXLY_CORRECT environment variable is set.
+       * find/util.c (set_option_defaults): Set options.posixly_correct
+       if the POSIXLY_CORRECT environment variable is set.
+       (set_option_defaults): Turn off warnings when POSIXLY_CORRECT is
+       in force.
+       * find/find.1: Document this.
+       (Environment Variables): Likewise.
+       (Warning Messages): Likewise.
+
+       Non-POSIX compliant arguments to -perm generate an error when
+       POSIXLY_CORRECT is set.
+       * find/parser.c (parse_table): Indicate which primaries are
+       defined by POSIX.
+       (non_posix_mode): New function; issues an error message when a
+       non-POSIX-compliant argument to -perm is used (and POSIXLY_CORRECT
+       is in force).
+       (parse_perm): Call non_posix_mode when a non-POSIX-compliant mode
+       argument is seen.
+       * find/testsuite/find.gnu/posix-perminvalid.exp: New file; tests
+       invalid arguments to -perm.
+       * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
+       posix-perminvalid.exp.
+       * find/find.1: Document this.
+       * doc/find.texi (Mode Bits): Likewise
+       (Environment Variables): Likewise
+
+
+       * xargs/xargs.1: Options should be bold, not italic; filenames
+       should also be italic.  OPTIONS should be a section, not a
+       subsection.  In the description of --max-lines, "max-args" was
+       corrected to "max-lines".  Turn off hyphenation in the SYNOPSIS
+       section.  This fixes Savannah bug #21270.
+
+2007-11-13  James Youngman  <jay@gnu.org>
+
+       * NEWS, configure.ac: Prepare for the release of findutils-4.3.10.
+
+       * import-gnulib.sh (usage): If the existing CVS working tree for
+       gnulib in the source tree does not yet point at the
+       git-cvs-pserver repository, move the old gnulib working tree out
+       of the way and do a fresh checkout.  This fixes Savannah bug
+       #21568.
+
+2007-11-11  James Youngman  <jay@gnu.org>
+
+
+       * configure.ac: Prepared for release of findutils-4.3.9.
+       * NEWS: Likewise.
+
+       * po/POTFILES.in: Use gnulib/lib/getdate.y rather than
+       gnulib/lib/getdate.c, because the former is the source file, and
+       because without this change the update-po target of po/Makefile
+       fails.
+
+       * import-gnulib.config (gnulib_version): Move to gnulib
+       2007-11-10.
+
+       * po/hu.po, po/nl.po: Updated from Translation Project.
+
+2007-09-08  James Youngman  <jay@gnu.org>
+
+       Better documentation on $PATH security checks.
+       * doc/find.texi (Single File): Better explanation of what makes
+       certain values of $PATH insecure.  This fixes Savannah bug
+       #20951.
+       * find/find.1 (-execdir): Likewise.
+
+       Document interaction of -depth/-delete/-prune.
+       * doc/find.texi (Directories): Mention that "-prune ... -delete"
+       will not do what you want and will cause the deletion of more
+       files than you probably intended.
+       (Delete Files): Likewise, suggest using "-depth" when testing
+       command lines you plan to eventually add "-delete" to.
+       (Cleaning Up): Add -depth explicitly to an example which uses
+       -delete.
+       * find/find.1 (-depth): Mention that -delete also implies -depth.
+       (-delete): Warn against putting -delete first.
+       (-prune): Also warn against -prune ... -delete.
+       NEWS: Mention these changes.
+
+2007-08-23  Eric Blake  <ebb9@byu.net>
+
+       Pick up gnulib change to getline module.
+       * import-gnulib.config (gnulib_version): Bump date.
+       * locate/bigram.c: Use <stdio.h>, not getline.h.
+       * locate/code.c: Likewise.
+       * locate/frcode.c: Likewise.
+       * locate/locate.c: Likewise.
+
+       * po/ChangeLog: Delete, merge into this file.
+
+2007-08-23  James Youngman  <jay@gnu.org>
+
+       * po/nl.po: Updated from Translation Project
+
+       * find/parser.c (check_path_safety): Assume the path is safe is
+       $PATH is not set.  This avoids a segfault in that situation
+       and thus fixes Savannah bug #20834.
+
+2007-08-22  James Youngman  <jay@gnu.org>
+
+       * find/parser.c (parse_path): This is the 'canonical' name once
+       again.
+       (parse_wholename): This is not.
+       (parse_ipath): No longer deprecated.
+       * NEWS: Mention this.
+
+2007-08-22  Eric Blake  <ebb9@byu.net>
+
+       Fix Savannah bug #20871.
+       * find/find.c (main): Remove bogus assertion.
+       * NEWS: Document the fix.
+
+       Update to recent gnulib addition of idcache.h.
+       * lib/listfile.c (getuser, getgroup): Use header rather than
+       declaring things ourself.
+       * po/POTFILES.in (locate/frcode.c): Add missing file.
+
+2007-08-21  Eric Blake  <ebb9@byu.net>
+
+       Fix for Savannah bug #20273, find -ok with seekable stdin.
+       * find/find.c (main): Use close_stdin, not close_stdout.
+       * import-gnulib.config (gnulib_version): Pick up yesno tests.
+       * NEWS: Document the change.
+       * build-aux/.cvsignore: Ignore compile.
+
+2007-08-20  Paul Eggert  <eggert@cs.ucla.edu>
+       and Eric Blake  <ebb9@byu.net>
+
+       Improve translation of xstrtol messages.
+       * import-gnulib.config (destdir): Upgrade gnulib to 2007-08-11.
+       * locate/locate.c (dolocate): Adjust to API change of xstrtol
+       gnulib module.
+       * po/POTFILES.in: Likewise.
+       * NEWS: Document the enhancement.
+
+2007-08-20  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi (Directories): Clarify that built commands which
+       have not been executed yet will be executed before find quits,
+       even with -quit.  Also clarify the difference between -prune and
+       -quit.
+
+2007-08-18  Eric Blake  <ebb9@byu.net>
+
+       Fix Savannah bug #20751.
+       * lib/listfile.c (list_file): Accomodate gnulib change of 3 Jul
+       2006.
+       * NEWS: Document this.
+       Reported by Nigel Stepp.
+       * THANKS: Sort and update.
+       * AUTHORS: Add myself.
+
+2007-08-05  Eric Blake  <ebb9@byu.net>
+
+       Fix Savannah bugs #20662, #20688.
+       * find/find.c (at_top): Avoid memory leak.
+       * find/pred.c (do_fprintf, pred_iname, pred_name): Likewise.
+       (pred_name_common): New function, factored from pred_iname and
+       pred_name.
+       * find/parser.c (check_name_arg): Let -nowarn silence -name /.
+       * locate/locate.c (visit_basename): Avoid memory leak.
+       * NEWS: Document the changes.
+       * doc/find.texi (Warning Messages): Document -nowarn's effect on
+       -name and -iname.
+       * find/testsuite/find.gnu/name-slash.exp: New test, to ensure
+       20662 doesn't regress on '-name /', and that 20688 silences the
+       warning.
+       * find/testsuite/find.gnu/printf-slash.exp: Likewise.
+       * find/testsuite/find.gnu/name-slash.xo: Expected results.
+       * find/testsuite/find.gnu/printf-slash.xo: Likewise.
+       * find/testsuite/Makefile.am (EXTRA_DIST_XO, EXTRA_DIST_EXP):
+       Distribute new tests.
+
+2007-07-31  Eric Blake  <ebb9@byu.net>
+
+       Allow choice of default arg size, Savannah bug #20594.
+       * configure.ac (DEFAULT_ARG_SIZE): Check environment for a default
+       size override.
+       * lib/buildcmd.c (bc_use_sensible_arg_max): Use default size from
+       configure, if requested.
+       * README (DEFAULT_ARG_SIZE): Mention the ability to tune this at
+       configure time.
+       * NEWS: Document the change.
+
+2007-07-29  James Youngman  <jay@gnu.org>
+
+       * po/tr.po: Updated from Translation Project.
+
+2007-07-26  Eric Blake  <ebb9@byu.net>
+
+       * doc/.cvsignore: Ignore more generated documentation.
+
+2007-07-23  Eric Blake  <ebb9@byu.net>
+
+       * find/parser.c (parse_version): Avoid compiler warning.
+       * locate/code.c (includes): Likewise.
+
+2007-07-22  Eric Blake  <ebb9@byu.net>
+
+       * po/POTFILES.in: Add lib/findutils-version.c.
+
+2007-07-22  James Youngman  <jay@gnu.org>
+
+       * find/find.1: Corrected a number of typos and fixed up the
+       alphabetical section ordering.  This fixes Savannah bug #20552.
+
+       Version banners now comply with the GNU coding standard.
+       * find/parser.c (parse_version): Use display_findutils_version()
+       instead of printing the information manually.  Don't include
+       gnulib-version.h since we no longer directly use that header.
+       * lib/findutils-version.c: Added
+       * lib/findutils-version.h: Added
+       * import-gnulib.config (modules): Added version-etc and
+       version-etc-fsf.
+       * lib/Makefile.am (libfind_a_SOURCES): added findutils-version.c.
+       * find/version.c: Removed
+       * find/Makefile.am: Remove version.c
+       * locate/Makefile.am: Don't link ../find/version.o
+       * xargs/Makefile.am: Ditto
+       * xargs/xargs.c (main): Use display_findutils_version()
+       * locate/code.c (main): Ditto
+       * locate/frcode.c (main): Ditto
+       * locate/locate.c (dolocate): Ditto
+       * locate/updatedb.sh (version): Display copyright information in
+       the right format.   Also ensure that we exit with a nonzero status
+       if there was an output error for --help and --version.
+       * find/testsuite/config/unix.exp (find_version): Adjust for
+       --version format change
+       * locate/testsuite/config/unix.exp (locate_version): Ditto
+       * xargs/testsuite/config/unix.exp (xargs_version): Ditto
+       * NEWS: Mention the change
+
+2007-07-19  Eric Blake  <ebb9@byu.net>
+
+       * po/POTFILES.in: Update to reflect current location of
+       translatable strings.
+
+2007-07-17  Eric Blake  <ebb9@byu.net>
+
+       Ensure 'make distcheck' can pass on cygwin.
+       * configure.in: Rename...
+       * configure.ac: ...to this, to match automake recommendations.
+       * NEWS: Add release dates.
+       * doc/find-maint.texi: Remove trailing whitespace.
+       (Documentation): Document where release dates are usefully
+       recorded.
+       * locate/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Be
+       aware of .exe.
+       * .cvsignore: Ignore 'make dist' files.
+       * po/.cvsignore: Ignore remove-potcdate.sed.
+
+2007-07-14  Eric Blake  <ebb9@byu.net>
+
+       * import-gnulib.config (gnulib_version): Bump date, to pick
+       up fix in canonicalize module testing.
+
+2007-07-06  James Youngman  <jay@gnu.org>
+
+       * po/uk.po, po/nl.po, po/vi.po: Updated from Translation Project.
+
+2007-07-04  James Youngman  <jay@gnu.org>
+
+       * NEWS: Fixed typos in description of bugfix for bug #20310.
+
+2007-07-03  James Youngman  <jay@gnu.org>
+
+       Fix Savannah bug #20310.
+       * m4/nullsort.m4: If we are cross compiling, assume "sort -z" does
+       not work on the target.
+
+       Manpage improvements.
+       * find/find.1: More consistent use of quotation marks.
+       *  locate/locate.1 (HISTORY): New section.
+
+2007-07-02  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.sh: (run_gnulib_tool): Don't pass --gpl3 to
+       gnulib-tool, since the program does not have that option (that was
+       a local change which proved not to be necessary).
+
+       GPL3 migration.
+       * COPYING: Migrate to version 3 of the GNU General Public license.
+       * Makefile.am: ditto
+       * build-aux/check-testfiles.sh: ditto
+       * build-aux/src-sniff.py: ditto
+       * debian/copyright: ditto
+       * doc/find-maint.texi: ditto
+       * find/defs.h: ditto
+       * find/find.c: ditto
+       * find/finddata.c: ditto
+       * find/fstype.c: ditto
+       * find/ftsfind.c: ditto
+       * find/parser.c: ditto
+       * find/pred.c: ditto
+       * find/testsuite/config/unix.exp: ditto
+       * find/tree.c: ditto
+       * find/util.c: ditto
+       * import-gnulib.config: ditto
+       * import-gnulib.sh: ditto
+       * lib/buildcmd.c: ditto
+       * lib/buildcmd.h: ditto
+       * lib/dircallback.c: ditto
+       * lib/dircallback.h: ditto
+       * lib/extendbuf.c: ditto
+       * lib/extendbuf.h: ditto
+       * lib/forcefindlib.c: ditto
+       * lib/gnulib-version.h: ditto
+       * lib/listfile.c: ditto
+       * lib/listfile.h: ditto
+       * lib/modetype.h: ditto
+       * lib/nextelem.c: ditto
+       * lib/nextelem.h: ditto
+       * lib/printquoted.c: ditto
+       * lib/printquoted.h: ditto
+       * lib/qmark.c: ditto
+       * lib/regexprops.c: ditto
+       * lib/regextype.c: ditto
+       * lib/regextype.h: ditto
+       * lib/savedirinfo.c: ditto
+       * lib/savedirinfo.h: ditto
+       * lib/strspn.c: ditto
+       * lib/wait.h: ditto
+       * lib/waitpid.c: ditto
+       * locate/bigram.c: ditto
+       * locate/code.c: ditto
+       * locate/frcode.c: ditto
+       * locate/locate.c: ditto
+       * locate/locatedb.h: ditto
+       * locate/testsuite/config/unix.exp: ditto
+       * locate/updatedb.sh: ditto
+       * locate/word_io.c: ditto
+       * po/fetch-po-files: ditto
+       * xargs/testsuite/config/unix.exp: ditto
+       * xargs/xargs.c: ditto
+
+       Typo fixes.
+       * doc/find.texi (Deleting Files): Fixed a typo.
+       (Deleting Files): Likewise.
+
+       New worked example for find.
+       * doc/find.texi (Copying A Subset of Files): Added a new worked
+       example.
+
+       * doc/find.texi (Updating A Timestamp File): Indicate that %A@ now
+       includes a sub-second part on many systems.
+
+       Include <fcntl.h> unconditionally.
+       * import-gnulib.config (modules): Also use the fcntl module.
+       * find/find.c: #include <fcntl.h> unconditionally, since
+       gnulib provides it if it is absent.
+       * find/fstype.c: Likewise.
+       * find/ftsfind.c: Likewise.
+       * find/parser.c: Likewise.
+       * find/util.c: Likewise.
+       * locate/locate.c: Likewise.
+
+2007-06-30  Eric Blake  <ebb9@byu.net>
+
+       * find/pred.c (pred_timewindow): Avoid gcc warnings.
+       (format_date): Likewise.
+       * find/tree.c (calculate_derived_rates): Likewise.
+       * locate/word_io.c (getword): Likewise.
+
+2007-06-30  James Youngman  <jay@gnu.org>
+
+       * find/find.1 (EXAMPLES): Added an example of using find and cpio -p
+       to copy a directory tree, with pruning and omitted files.
+
+       * find/pred.c (format_date): Use verify_true for constant
+       conditions rather than assert.
+       * xargs/xargs.c (main): Ditto.
+
+       Enhancements to the code smell detector.
+       * Makefile.am (findutils-check-smells): Automate the calling of
+       build-aux/src-sniff.py.
+       * build-aux/src-sniff.py: Rework to use a list of regex-based
+       sniffers, to allow checking types of file other than C.  Allow
+       file-based regex sniffers to give an indication of the line number
+       where they think the problem (or part of the problem) exists.
+       Added code smell detectors for a sample Bourne shell problem and
+       for out-of-date FSF addresses.
+
+       * find/tree.c (get_pred_cost): Eliminate unused variable.
+
+       Fix Savannah bug #20263 in a more portable way.
+       * find/tree.c (cost_table_comparison): Avoid casting function
+       pointers to poiter-to-object, since this is not portable (or
+       of course conforming).  Instead, use memcmp().
+
+2007-06-28  Eric Blake  <ebb9@byu.net>
+
+       * import-gnulib.sh (run_gnulib_tool): Speed operation when
+       updating an existing tree.
+
+       Allow 'make check' to work without prior 'make all'.
+       * find/Makefile.am (SUBDIRS): Build in . before testsuite.
+       * locate/Makefile.am (SUBDIRS): Likewise.
+       * xargs/Makefile.am (SUBDIRS): Likewise.
+
+       Fix Savannah bug #20273, xargs -E with seekable stdin.
+       * import-gnulib.config (modules): Sort, add closein.
+       * xargs/testsuite/Makefile.am (EXTRA_DIST_EXP, EXTRA_DIST_XO)
+       (EXTRA_DIST_XI): Add new test.
+       * xargs/testsuite/config/unix.exp (xargs_start): Support optional
+       argument to allow test to run a subshell.
+       * xargs/testsuite/inputs/sv-bug-20273.xi: New file.
+       * xargs/testsuite/xargs.posix/sv-bug-20273.xo: Likewise.
+       * xargs/testsuite/xargs.posix/sv-but-20273.exp: Likewise.
+       * xargs/xargs.c (main): Use close_stdin, not close_stdout.
+       * NEWS: Document the fix.
+
+2007-06-27  James Youngman  <jay@gnu.org>
+
+       Added a maintenance manual.
+       * doc/find-maint.texi: New file.
+       * doc/Makefile.am (info_TEXINFOS): Added doc/find-main.texi.
+       * doc/find.texi (Introduction): Fixed typo.
+
+2007-06-26  Eric Blake  <ebb9@byu.net>
+
+       * import-gnulib.config (modules): Allow ./configure
+       --disable-assert.
+
+2007-06-26  James Youngman  <jay@gnu.org>
+
+       * build-aux/src-sniff.py: Detect uses of struct stat where the
+       header file was not included.
+       * find/find.c: Fix this, and uses of assert without a following
+       space (the coding standard requires a space, but there are still
+       a number of cases where other functions are called with no
+       following space).
+       * find/fstype.c: Ditto.
+       * find/ftsfind.c: Ditto.
+       * find/parser.c: Ditto.
+       * find/pred.c: Ditto.
+       * find/tree.c: Ditto.
+       * find/util.c: Ditto.
+       * lib/buildcmd.c: Ditto.
+       * lib/buildcmd.h: Ditto.
+       * lib/extendbuf.c: Ditto.
+       * locate/frcode.c: Ditto.
+       * locate/locate.c: Ditto.
+       * locate/word_io.c: Ditto.
+       * xargs/xargs.c: Ditto.
+
+       * find/tree.c (cost_table_comparison): Avoid < comparison between
+       function pointer types.  Instead cast the function pointers to
+       (const void*).  Both alternatives are undefined C, but the former
+       actually fails to compile on some systems.   This fixes Savannah
+       bug #20263.
+       * NEWS: mention the fix
+
+       * find/tree.c (calculate_derived_rates): Removed assignment to
+       rate variable following an assert(0) call, which had been added to
+       silence a "used before initialised" warning, and replace it with a
+       call to abort, which (a) correctly halts execution if _NDEBUG is
+       defined and (b) more accurately documents what's happening.
+
+       * find/parser.c (get_stat_Ytime): Removed redundant call to abort.
+
+       * find/util.c (debug_stat): For consistency, use assert (0) rather
+       than assert (false).
+
+2007-06-26  James Youngman  <jay@gnu.org>
+
+       * README-alpha: Mention the findutils-patches mailng list and the
+       archives for findutils-patches and bug-findutils.
+
+       * po/bg.po: Updated from Translation Project.
+
+2007-06-25  James Youngman  <jay@gnu.org>
+
+       * po/sv.po: Updated Swedish translation.
+
+2007-06-24  James Youngman  <jay@gnu.org>
+
+       * build-aux/.gitignore, debian/.gitignore, doc/.gitignore,
+       find/.gitignore, find/testsuite/.gitignore, .gitignore,
+       lib/.gitignore, locate/.gitignore, locate/testsuite/.gitignore,
+       m4/.gitignore, po/.gitignore, xargs/.gitignore,
+       xargs/testsuite/.gitignore: New files to make it more painless to
+       track findutils sources with git.
+
+       * NEWS: Mention the previous change to doc/find.texi.
+
+2007-06-23  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi (Introduction): Recommend that people check they
+       are using the latest version before reporting a bug.
+
+2007-06-22  James Youngman  <jay@gnu.org>
+
+       Better documentation for the fractional part of seconds fields for
+       -printf and similar actions.
+       * doc/find.texi (Time Components): Point out that the seconds
+       field of the timestamp is often printed out with a fractional part
+       of unspecified length and precision.  The '%Tc' field has no
+       seconds part.
+       (Combined Time Formats): Point out the same thing for '%T@'.
+       * find/find.1 (%A): Point out the same thing.
+       * NEWS: Mention these changes.
+
+       Fix various lint-type complaints taken from the rules in the
+       coreutils Makefile.maint file (see build-aux/src-sniff.py).
+       * xargs/xargs.c: Removed unnecessary parentheses in "#if defined"
+       checks.
+       (main): Don't cast the return value of xmalloc.
+       (add_proc): Don't cast the return value of xmalloc.
+       * lib/regextype.c: Don't include quotearg.h, we don't need it.
+       * lib/dircallback.c, lib/nextelem.c, lib/prontquoted.c,
+       lib/qmark.c, lib/strspn.c, lib/waitpid.c: Assume config.h is available.
+       * lib/extendbuf.c: Ditto
+       * lib/listfile.c: Ditto.  Also removed unnecessary parentheses in
+       "#if defined" checks.
+       (get_link_name): Don't cast the result of xmalloc.
+       * lib/bigram.c: Removed unnecessary parentheses in "#if defined"
+       checks.
+       * lib/savedirinfo.c: Assume config.h is available.  Also removed
+       unnecessary parentheses in "#if defined" checks.
+       * lib/buildcmd.c (bc_do_insert): Don'tcast the result of xmalloc().
+       * find/tree.c (build_expression_tree): Don't cast the argument to free().
+       * find/ftsfind.c (set_close_on_exec): Removed unnecessary
+       parentheses in "#if defined" checks.  Also changed "filesystem" ->
+       "file system"
+       * find/util.c (check_nofollow): Removed unnecessary parentheses in
+       "#if defined" checks.
+       * find/parser.c (estimate_fstype_success_rate): ditto.
+       (insert_regex): Do not cast the result of xmaloc().  Removed unnecessary
+       parentheses in "#if defined" checks.  Also changed "filesystem" ->
+       "file system"
+       * find/pred.c: ditto
+       * find/find.c: "the the" -> "the", "filesystem" -> "file system"
+       * find/fstype.c: "filesystem" -> "file system" (in comments and
+       static functions)
+       * locate/frcode.c: Removed unnecessary parentheses in "#if
+       defined" checks.
+       * locate/locate.c (search_one_database): Don't cast the return
+       value of xmalloc.
+       (dolocate): Mark error message for translation.
+
+2007-06-21  Eric Blake  <ebb9@byu.net>
+
+       * locate/.cvsignore: Ignore dblocation.texi.
+       * build-aux/.cvsignore: Ignore Makefile.
+       * locate/locate.c (set_max_db_age): Fix typo in error message.
+
+2007-06-19  Eric Blake  <ebb9@byu.net>
+
+       Fix compilation on cygwin, Savannah bug #20210.
+       * import-gnulib.config (gnulib_version): Import strcasestr and
+       updated canonicalize-lgpl-tests.
+       * lib/dircallback.c (includes): Track gnulib changes.
+
+2007-06-14  James Youngman  <jay@gnu.org>
+
+       * find/parser.c (parse_time): Use the variable comp, which holds
+       the planned comparison type, rather than the structure tval, which
+       has not been initialised yet and contains a random value.  This
+       fixes Savannah bug #20139.
+       * NEWS: Mention the bugfix.
+
+2007-06-13  James Youngman  <jay@gnu.org>
+
+       * po/pl.po: Updated Polish translation.
+
+2007-06-12  James Youngman  <jay@gnu.org>
+
+       Release 4.3.8.
+
+       * find/find.1 (HISTORY): Document when the find tests -readable,
+       -writable, -executable and the option -regextype were introduced.
+
+2007-06-12  Nix  <nix@esperi.org.uk> (tiny change)
+
+       * locate/locate.c (drop_privs): Use groups[0] rather than
+       groups[1], since groups[] is a one-element array.  This is a
+       buffer overrun affecting root only.  In theory it could affect
+       setuid installations, but I (James Youngman) cannot find an explot
+       mechanism for it.  This fixes Savannah bug#20157.
+       * NEWS: Mention this fix.
+
+2007-06-12  James Youngman  <jay@gnu.org>
+
+       Make the test suite work when run as root.
+       * find/testsuite/config/unix.exp (fs_superuser): Abstract out the
+       check which discovers if we have superuser privileges on the
+       filesystem (taken from access.exp).
+       * find/testsuite/find.gnu/access.exp: Call fs_superuser.
+       * find/testsuite/find.gnu/fprint-unwritable.exp: Use fs_superuser.
+
+       * po/vi.po, ga.po, nl.po: Updated translations
+       * po/findutils.pot: Updated template file
+
+2007-06-09  James Youngman  <jay@gnu.org>
+
+       Release 4.3.7.
+
+       Check that we can correctly read old-format databases which are
+       big-endian or little endian.
+       * locate/testsuite/config/unix.exp (locate_from_db): New function;
+       supports testing locate against a provided database.
+       * locate/testsuite/locate.gnu/bigendian.exp: New test; make sure
+       we can read an old-format big-endian database.
+       * locate/testsuite/locate.gnu/bigendian.xo: Expected output from
+       bigendian.exp test.
+       * locate/testsuite/locate.gnu/littleendian.exp: New test; make sure
+       we can read an old-format little-endian database.
+       * locate/testsuite/locate.gnu/locateddb.old.powerpc.xi: Old format
+       big endian database file, for supporting bigendian.exp.
+       * locate/testsuite/locate.gnu/littleendian.xo: Expected output from
+       littleendian.exp test.
+       * locate/testsuite/locate.gnu/locateddb.old.x86.xi: Old format
+       little endian database file, for supporting littleendian.exp.
+       * locate/testsuite/Makefile.am: Distribute littleendian.exp,
+       bigendian.exp and related .xi and .xo files.
+
+
+       * doc/find.texi (Size Directives): Compare %b with %s/512, not
+       %s/1024.  This fixes (again) Savannah bug #19596.
+       * NEWS: mention the fix.
+
+       Avoid using the non-portable function putw().
+       * locate/locatedb.h: Declare putword().
+       * locate/frcode.c: Include <stdbool.h> as locatedb.h now requires
+       it.
+       * locate/code.c (main): Use putword() rather than putw(), because
+       the latter was removed from SUSv3. This fixes Savannah bug #19980.
+       Also include <stdbool.h> as locatedb.h now requires this.
+       * locate/word_io.c (putword): Define the new function putword.
+
+       Ensure that <config.h> is included before any system header
+       * find/defs.h: Do not include <config.h> from "defs.h".  Instead
+       just complain if it was not already included, since it needs  to
+       be included first of all, even before system headers (in case
+       gnulib had replaced a system header).  Check
+       ALREADY_INCLUDED_CONFIG_H to determine this.
+       * configure.in: Always define ALREADY_INCLUDED_CONFIG_H in
+       config.h.
+       * find/find.c: Include config.h before defs.h.
+       * find/finddata.c: ditto.
+       * find/fstfind.c: ditto.
+       * find/parser.c: ditto.
+       * find/pred.c: ditto.
+       * find/util.c: ditto
+       * find/tree.c: ditto (fixing Savannah bug #20128).
+
+       * m4/noreturn.m4 (jy_AC_ATTRIBUTE_NORETURN): Use AC_LANG_PROGRAM
+       inside AC_COMPILE_IFELSE.
+
+       * doc/find.texi (Security Considerations for locate): Discuss in
+       detail the buffer overrun when reading old-format locate
+       databases.  This is CVE reference CVE-2007-2452.
+
+2007-06-05  James Youngman  <jay@gnu.org>
+
+       Guess the byte-order of old-format locate databases.
+       * locate/word_io.c (getword): Make the endian_state_flag parameter
+       an enum rather than an int.  If we are in the initial ("don't
+       know") byte-order guessing state and the swapped value is out of
+       range, use this as evidence that the byte order is native.
+       * locate/locatedb.h: Declare getword accordingly.
+       * locate/locate.c (struct process_data): Added endian_state
+       member, which remembers for us what the big/little endian order
+       guessing state is when we read an old-format database.
+       (visit_old_format): Use the procdata.endian_state rather than a
+       local variable, so that the information can persist across calls.
+       (i_am_little_endian): Locate figures out if we needed to byteswap
+       the words in an old-format database, but that is an implementation
+       detail.  Therefore we figure out our own byte order so that we can
+       produce a more relevant message for --statistics.  The
+       i_am_little_endian() returns nonzero if the current host has
+       little-endian byte order.
+       (search_one_database): Report the byte-order of old-format
+       databases.
+
+2007-06-04  James Youngman  <jay@gnu.org>
+
+       * locate/testsuite/Makefile.am (EXTRA_DIST_XO, EXTRA_DIST_EXP):
+       Added old_prefix.exp and old_prefix.xo, a new test case for long
+       shared rpefixes with the old database format.
+
+       * locate/locate.c (visit_old_format): Use getword() from word_io.c
+       instead of getw(), because getw() is not in POSIX.
+       * locate/word_io.c: New file, providing replacement for getw().
+       * locate/locatedb.h: Declare getword()
+       * locate/Makefile.am (locate_SOURCES): Added word_io.c
+
+       * locate/testsuite/config/unix.exp (locate_start): Make the
+       failure messages slightly more explicit; indicate what went wrong
+       when a test fails.
+
+2007-06-03  James Youngman  <jay@gnu.org>
+
+       * locate/locate.c (visit_old_format, extend, toolong): Extend the
+       buffer used to build the current pathname when reading an
+       old-format database.  The new function extend is called to do
+       this.  The new function toolong is called to report a fatal error
+       when the buffer size would otherwise exceed SIZE_MAX.  This fixes
+       Savannah bug #20014, which is a security-related problem with the
+       CVE identifier CVE-2007-2452.
+
+       * configure.in: Determine if the setgroups function is available,
+       and set HAVE_SETGROUPS if so.
+       * locate/locate.c (drop_privs): Call setgroups() only if
+       HAVE_SETGROUPS indicates that it is available.  This fixes
+       Savannah bug #19981.
+
+       * po/vi.po: Updated Vietnamese translation
+
+2007-05-31  James Youngman  <jay@gnu.org>
+
+       * find/parser.c (parse_time): Once we have determined the
+       comparison type, restore the original time argument since
+       get_relative_timestamp() also wants to see it.  This fixes
+       Savannah bug #20005.
+
+       * po/findutils.pot, ga.po, pt.po, tr.po, pl.po: updated from the TP
+       website.
+
+2007-05-31  Jakub Bogusz <qboosh@pld-linux.org>  (tiny change)
+
+       * find/parser.c (parse_group): Correct typo in error message.
+       (check_path_safety): same
+
+2007-05-27  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.config (modules): Import sys_stat.
+       (gnulib_version): Update to 2007-05-26.  This fixes a compilation
+       error in stdlib.h with the DEC C compiler.  This fixes Savannah
+       bug# 19983.
+
+       * find/parser.c (safe_atoi): New function, like atoi, but which
+       calls error(1, ...) when the argument is invalid or out of range.
+       (parse_group): Use safe_atoi.
+       (insert_depthspec): Use safe_atoi
+       (parse_user): Use safe_atoi
+
+       * configure.in: Check for fabs in libm (fixing a compilation error
+       on Solaris).
+
+       * import-gnulib.config (modules): Import the wcwidth module to
+       provide it on those systems (such as BeOS) which lack it.
+
+       * find/pred.c (file_sparseness): If st_blocks is not present in
+       struct stat, the file has a sparseness of 1.0.
+
+       * doc/find.texi (Size Directives): Document the %S format
+       directive for -printf.
+
+       * find/pred.c (mode_to_filetype): Don't use S_IFSOCK on systems
+       which lack that macro.  POSIX systems are allowed to lack
+       sockets (it's an XSI extension).
+       (file_sparseness): If struct stat lacks st_blocks, assume all
+       files have a spearseness of 1.0.
+
+       * import-gnulib.config (modules): Import fchdir inorder to fix an
+       undefined-symbol error for fchdir on BeOS.
+
+2007-05-26  James Youngman  <jay@gnu.org>
+
+       Code refactoring in locate.
+       * locate/locate.c (visit): New function, into which we factor out
+       the traversal of the inspector list.
+       (process_simple): Use visit().
+       (process_or): Use visit().
+       (process_and): Use visit().
+
+       Speed improvements in locate for unibyte locales.
+       * locate/locate.c (visit_substring_match_nocasefold_wide): Renamed
+       from visit_substring_match_nocasefold.
+       (visit_substring_match_casefold_wide): Renamed from
+       visit_substring_match_casefold.
+       (visit_substring_match_casefold_narrow): Special case of
+       visit_substring_match_casefold_wide which we use for unibyte
+       locales; we use strcasestr() rather than mbscasestr().
+       (visit_substring_match_nocasefold_narrow): Ditto, using strstr()
+       instead of mbsstr().
+
+       * find/parser.c (parse_gid): Return an explicit boolean constant
+       rather than automatically converting from a pointer, because the
+       gnulib substitute for bool (or _Bool) in c89 environments lacking
+       bool does not support that conversion.  One affected system is Sun
+       WorkShop Compilers 5.0 98/12/15 C 5.0 on Solaris 7.  This is
+       Savannah bug #19970, reported by Nelson Beebe.
+       (parse_inum): Ditto.
+       (parse_links): Ditto.
+       (parse_uid): Ditto.
+       (check_path_safety): declarations need to go before code, not
+       interspersed.  Move declaration of char* s.
+
+       * xargs/testsuite/xargs.posix/rc-125.exp: Explain Savannah bug
+       #19969.   This bug is not yet fixed.
+
+       * find/defs.h: #include <stdint_.h>, for uintmax_t.  This should
+       fix a compilation error on DEC C V5.9-005 on Digital UNIX V4.0F
+       (Rev. 1229).  This is Savannah bug #19965, reported by Nelson
+       Beebe.
+
+       * find/defs.h: Don't include <errno.h>, since it is not needed in
+       the header file itself.  The "extern int errno;" declaration is
+       now obsolete.
+       * find/parser.c: Include <errno.h>
+       * find/pred.c: Dito
+       * find/util.c: Ditto
+
+2007-05-24  James Youngman  <jay@gnu.org>
+
+       * find/util.c (check_nofollow): If O_NOFOLLOW is defined but 0,
+       act as if it is undefined.  This should prevent a runtime
+       assertion failure on IRIX 6.5.  This fixes Savannah bug #19948,
+       reported by Nelson Beebe.
+
+       * m4/noreturn.m4: New file, testing for support of __attribute__
+       ((__noreturn__)).  Defines jy_AC_ATTRIBUTE_NORETURN and sets
+       HAVE_ATTRIBUTE_NORETURN.
+       * configure.in: Call jy_AC_ATTRIBUTE_NORETURN.
+       * find/defs.h (ATTRIBUTE_NORETURN): Define to nothing if
+       HAVE_ATTRIBUTE_NORETURN is not set in config.h.  This should fix a
+       compilation error with non-GCC compilers.   This is Savannah bug
+       #19967, reported by Nelson Beebe.
+
+       * configure.in (FINDLIBS): Update FINDLIBS to link against -lm for
+       modf.   This fixed a link error on HP-UX.   This fixes Savannah
+       bug #19966, reported by Nelson Beebe.
+       * find/Makefile.am (LDADD): Use @FINDLIBS@
+
+2007-05-21  James Youngman  <jay@gnu.org>
+
+       Release 4.3.6.
+
+       * build-aux/Makefile.am (EXTRA_DIST): Added man-lint.sh.
+
+       * locate/locate.c (drop_privs): pass the correct list of groups to
+       setgroups().  Previously, if root invoked locate, their group ID
+       would have been set to a random value.  The same bug also caused
+       an array overrun past the end of the local array groups[].  The
+       variable which gets overwritten by the buffer overrun on x86 is
+       'what'.  The value of that variable is always changed before it is
+       used, and so I believe that this buffer overrun will not cause a
+       crash.  The only effect of the bug therefore would be for locate
+       to change group to a random group ID since groups[0] is
+       uninitialised.  On my test system this random group ID is 0
+       anyway.  The effect does not depend on any externally-controllable
+       information, so it is unlikely this is exploitable.   This bug is
+       detailed as bug# 19923.
+
+2007-05-19  James Youngman  <jay@gnu.org>
+
+       * find/find.1: Spurious .R directives (.R is not a directive)
+       should be .B.   This fixes Savannah bug #19871.
+       * build-aux/man-lint.sh: New file; verifies that the specified
+       manual pages do not provoke error messages from troff.  This is
+       used to detect further occurrences of Savannah bug #19871.
+       * find/Makefile.am (dist-hook): Run findutils-check-manpages,
+       which invokes man-lint.sh.
+       * locate/Makefile.am (dist-hook): ditto
+       * xargs/Makefile.am (dist-hook): ditto
+
+       * .cvsignore: Ignore ylwrap, which automake-1.10 wants us to have
+       a copy of for some reason
+
+       * import-gnulib.sh (main): New option -a which just runs the
+       autotools without reimporting gnulib.
+
+       * Makefile.am (jy-regex-fix): The previous explanatory comment
+       refers to the jy-regex-fix target, not to dist-hook, so it has
+       been moved.
+
+2007-05-08  James Youngman  <jay@gnu.org>
+
+       * find/defs.h (struct predicate.args): str is now const.
+
+       * find/parser.c (get_comp_type): get_comp_type now takes a const
+       char* parameter.
+       (get_num): ditto
+       (get_relative_timestamp): ditto.  Also use collect_arg().
+       (collect_arg_stat_info): New function; collects a command-line
+       argument and returns its xstat information, in one go.
+       error(1,...)  is called if the stat fails.
+       (parse_anewer): Use collect_arg().
+       (parse_cnewer): ditto
+       (parse_fprint): ditto
+       (parse_fstype): ditto
+       (parse_group): ditto
+       (parse_ilname): ditto
+       (parse_iname): ditto
+       (parse_iwholename): ditto
+       (parse_lname): ditto
+       (insert_depthspec): ditto
+       (parse_name): ditto
+       (parse_newer): ditto
+       (parse_wholename): ditto
+       (parse_perm): ditto
+       (parse_regextype): ditto
+       (insert_regex): ditto
+       (parse_samefile): ditto
+       (parse_used): ditto
+       (parse_user): ditto
+       (insert_type): ditto
+       (parse_time): ditto
+       (parse_size): When the size argument is invalid but consists only
+       of a valid suffix char, avoid issuing an error message about a
+       blank argument.  Append the suffix letter again.
+       (parse_xdev, parse_ignore_race, parse_noignore_race, parse_warn,
+       parse_xtype): Remove casts to void for some function parameters
+       that were, in fact, used.
+
+       * find/testsuite/find.gnu/fprint-unwritable.exp: new test
+       * find/testsuite/find.gnu/fprint0_stdout.exp: new test
+       * find/testsuite/find.gnu/fprint0_stdout.xo: new test
+       * find/testsuite/find.gnu/mindepth-arg.exp: new test
+       * find/testsuite/find.gnu/mindepth-arg.xo: new test
+       * find/testsuite/find.gnu/mindepth-badarg.exp: new test
+       * find/testsuite/find.gnu/print_stdout.exp: new test
+       * find/testsuite/find.gnu/print_stdout.xo: new test
+       * find/testsuite/find.gnu/samefile-missing.exp: new test
+       * find/testsuite/find.gnu/samefile-p-brokenlink.exp: new test
+       * find/testsuite/find.gnu/samefile-p-brokenlink.xo: new test
+       * find/testsuite/find.gnu/used-invarg.exp: new test
+       * find/testsuite/find.gnu/used-missing.exp: new test
+       * find/testsuite/find.gnu/user-invalid.exp: new test
+       * find/testsuite/find.posix/group-empty.exp: new test
+       * find/testsuite/find.posix/group-missing.exp: new test
+       * find/testsuite/find.posix/name-missing.exp: new test
+       * find/testsuite/find.posix/size-invalid.exp: new test
+       * find/testsuite/find.posix/size-missing.exp: new test
+       * find/testsuite/find.posix/typearg.exp: new test
+       * find/testsuite/find.posix/user-empty.exp: new test
+       * find/testsuite/find.posix/user-missing.exp: new test
+
+2007-05-06  James Youngman  <jay@gnu.org>
+
+       * find/tree.c: (costlookup): Added pred_fls to the optimiser's
+       predicate cost lookup table.
+
+       * lib/printquoted.c (print_quoted): Change return value from void
+       to int, to allow the caller to detect failures.
+       * lib/printquoted.h (print_quoted): Change declaration
+       accordingly.
+
+       * find/defs.h (struct format_val): Incldue a 'filename' member so
+       that we can provide more useful error messages (e.g. when we fail
+       to flush or close an output file).
+       (nonfatal_file_error): declare new function.
+
+       * find/util.c (traverse_tree): Utility function which calls a
+       callback on every node of the parse tree.
+       (flush_and_close_output_files): Flush all output streams.  Close
+       all output files.  Report any errors.
+       (cleanup): Use traverse_tree() to invoke
+       complete_pending_execdirs().
+       (report_file_err): refactored error reporting function, extracted
+       from fatal_file_error.
+       (nonfatal_file_error): New function.
+
+       * find/pred.c (checked_fprintf): New function, which performa an
+       fprinf(), and checkes the result.  If the operation resulted in an
+       error, a nonfatal error message is issued.
+       (checked_print_quoted): Ditto, for print_quoted rather than
+       fprintf.
+       (checked_fwrite): Ditto for fwrite instead of fprintf.
+       (checked_fflush): Ditto for fflush
+       (do_fprintf): Use the checked_*() functions rather than their
+       direct counterparts, to ensure that I/O errors are detected.  This
+       fixes Savannah bug #19416.
+       (pred_fls): Use args.printf_vec instead of args.stream, which has
+       now been removed.
+       (pred_ls): just call pred_fls.
+       (pred_fprint0): use args.printf_vec, instead of the now removed
+       args.stream.
+       (pred_print0): just call pred_fprint0
+
+       * find/parser.c: (insert_fprintf): Make the caller collect the
+       format argument from the argument list.
+       (open_output_file): Enhance to set up defaults in
+       our_pred->args.printf_vec as well as opening the output file.
+       Also record the filename for possible later use in an error
+       message.
+       (collect_arg): Convenience function for collecting an argument
+       from the argument list.
+       (insert_fls): Refactored the body of parse_fls out so that
+       parse_ls can use it.
+       (parse_fls): call insert_fls.
+       (parse_ls): ditto
+       (parse_fprint): Instead of setting up our_pred->args.printf_vec
+       manually, call open_output_file() to do it.
+       (parse_print): Same, but by calling open_stdout().
+       (insert_fprint): Make the caller collect the filename argument,
+       and delegate the setup of our_pred->args.printf_vec to either
+       open_output_file() (for parse_fprint and parse_fprint0) or
+       open_stdout (parse_print0).
+       (parse_fprint0): Use collect_arg().
+       (parse_print0): Use insert_fprint(), just like parse_fprint0.
+       (parse_printf): Use collect_arg().
+       (parse_fprintf): Use collect_arg().
+
+2007-05-05  James Youngman  <jay@gnu.org>
+
+       Release 4.3.5.
+
+       * find/parser.c (parse_samefile): Hold a file descriptor open on
+       the reference file in order to prevent pred_samefile getting
+       fooled by inode reuse.  Pay attention to race conditions on
+       systems lacking O_NOFOLLOW when the -P option is in force.  This
+       fixes Savannah bug #19806.
+
+       * find/defs.h (struct samefile_file_id): New struct, like dir_id
+       but including a file descriptor on the reference file.
+
+       * find/pred.c (pred_type): -type should return false if the file
+       has mode 00000, as opposed to having an assertion failure.   This
+       fixes Savannah bug #16378.
+
+       * find/ftsfind.c (consider_visiting): Issue a warning message if
+       none of the mode bits are set for a file (i.e. st_mode==00000).
+       * find/util.c (get_statinfo): ditto
+       * find/util.c (hook_fstatat): Introduced debug code (normally
+       disabled) for testing Savannah bug #16378.
+
+2007-05-01  James Youngman  <jay@gnu.org>
+
+       * find/find.c (wd_sanity_check): corrected the type of %ld fprintf
+       arguments in error messages.
+       * find/fstype.c: include "error.h" for the declaratio of error().
+       * find/ftsfind.c: include "error.h" for the declaratio of
+       error().  Include dircallback.h for the correct declararion of
+       run_in_dir().
+       * find/parser.c: include getdate.h (for declaration of getdate)
+       and error.h (for the declaration of error).
+       (find_parser): Removed unused variable p.
+       * find/pred.c (pred_timewindow): Removed unused variable delta.
+       (do_fprintf): Removed unused variable cc.
+       * find/tree.c: Include error.h (for the declaration of error()).
+       (build_expression_tree): removed sourious extra arguments in call
+       to error().
+       * find/util.c: include error.h.
+       * lib/buildcmd.h (get_line_max): Comment out unused function.
+       * lib/listfile.c: Include dircallback.h.
+       * locate/code.c: Include errno.h, erorr.h, progname.h and
+       xlloc.h.
+       (inerr): New function for reporting read errors.
+       (outerr): New function for reporting output errors.
+       (main): Call inerror when fgets fails.  Call outerr when fwrite
+       or putc or putw fails.
+       * locate/frcode.c (put_short): Return boolean value indicating
+       success.
+       (outerr): New function for reporting write errors.
+       (main): Call outerr if call to putc() or puts() or put_short()
+       fails.
+       * locate/locate.c (search_one_database): diagnose corruption if a
+       traditional-style database is too short to include a complete
+       bigram table.
+
+2007-04-30  James Youngman  <jay@gnu.org>
+
+       * find/defs.h: Change all predicate functions to take a const
+       char* argument as the pathname, not a char*.  Modify the parser
+       table definition accordingly.
+       * find/parser.c: Ditto
+       * find/pred.c: Ditto
+       * find/pred.c (do_fprintf): copy the pathname string for the %H
+       and %h cases, since we can no longer modify the string in place.
+       * lib/listfile.c (print_name, list_file,
+       print_name_without_quoting, print_name_with_quoting): Use const
+       char * param for pathname.
+       * lib/listfile.h (list_file): Use const char * param for
+       pathname.
+
+2007-04-29  James Youngman  <jay@gnu.org>
+
+       * find/defs.h: Declare fatal_file_error(), a function for
+       reporting immediately-fatal file errors, which appropriately
+       quotes the file name.  The function does not return.  Also define
+       ATTRIBUTE_NORETURN.  Record the currently-required quoting style
+       in struct options.
+
+       * find/find.c, find/ftsfind.c, find/parser.c, find/pred.c,
+       find/util.c: Call fatal_file_error() for fatal file errors.  Use
+       quotearg_n_style() to quote filenames which are used in error
+       message that aren't fatal.  Use options.err_quoting_style as the
+       quoting style.  This fixes Savannah bug #18203.
+       * locate/locate.c: ditto
+       * xargs/xargs.c: ditto
+
+       * lib/listfile.c: To use alloca, just #include <alloca.h>.  Gnulib
+       handles the rest.  Also these days, <stdlib.h> and <string.h> can
+       just be included unconditionally.
+       * lib/qmark.c: Fixed comment on first line describing the module.
+
+2007-04-29  Michael Haubenwallner <michael.haubenwallner@salomon.at> (tiny change)
+
+       * find/defs.h (pred_open) Rename to pred_openparen to avoid
+       problems with the macrtos which build the parser tabnles on
+       platforms where 'open' is in fact a macro whcih expands to
+       open64.   The problem was that token pasting put pred_open64 into
+       the parser table, but the function was still defined as
+       parse_open.   This fixes Savannah bug #19371.
+       (pred_close): ditto
+       * find/parser.c (parse_open, parse_close): ditto.  Also change
+       repferences to pred_open and pred_close similarly.
+       * find/parser.c (parse_openparen, parse_closeparen): ditto
+
+2007-04-28  James Youngman  <jay@gnu.org>
+
+       * find/testsuite/find.gnu/deletedir.exp,
+       find/testsuite/find.gnu/deletedir.xo: New test.
+       * find/testsuite/find.gnu/deletefile.exp,
+       find/testsuite/find.gnu/deletefile.xo: New test.
+       * find/testsuite/Makefile.am: Distribute the new tests
+       deletefile.exp and deletedir,exp, with their expected-output (.xo)
+       files too.
+       * find/testsuite/config/unix.exp (find_start): Add a new "setup"
+       parameter called just before each time find is invoked.  This
+       allows last-minute tasks to be performed.  This feature is
+       essential for find commands that modify the filesystem, since
+       otherwise we cannot use our strategy of invoking both binaries at
+       each optimisation level.
+
+       * find/util.c (optionh_stat, optionp_stat, optionl_stat): Assert
+       that state.cwd_dir_fd is valid.
+
+       * find/parser.c (parse_delete): Set need_stat to false, since we
+       don't need the stat information in pred_delete.
+       * find/pred.c (pred_delete): If unlinkat() with a zero flags
+       parameter fails with errno==EISDIR, just try again with
+       flags=AT_REMOVEDIR.  That way we normally avoid the cost of a
+       stat.  If we happen to have the stat information to hand anyway,
+       we make sure we get it right the first time.
+
+       * lib/buildcmd.c (bc_init_controlinfo): Eliminate confusing extra
+       variable arg_max.  Add return value
+       BC_INIT_CANNOT_ACCOMODATE_HEADROOM for the case where the
+       environment itself is not too large, but the required headroom
+       cannot also be accomodated.  The caller now passes in the amount
+       of headroom required.
+       (bc_use_sensible_arg_max): Use the environment size consistently;
+       this is accounted for already in posix_arg_size_max, so there is
+       no need to re-measure the size of the environment.
+       * lib/buildcmd.h: Define BC_INIT_CANNOT_ACCOMODATE_HEADROOM and
+       add the headroom parameter to the prototype of bc_init_controlinfo().
+       * xargs/xargs.c (main): Define XARGS_POSIX_HEADROOM as 2048 and
+       use that symbolic value.  Pass XARGS_POSIX_HEADROOM to
+       bc_init_controlinfo().  Handle the case where
+       BC_INIT_CANNOT_ACCOMODATE_HEADROOM is returned by
+       bc_init_controlinfo().
+       * find/parser.c (new_insert_exec_ok): Pass the required headroom to
+       bc_init_controlinfo() and handle the error return
+       BC_INIT_CANNOT_ACCOMODATE_HEADROOM.
+
+       * xargs/xargs.1: Correct the description of the default value and
+       maximum value for the -s option of xargs.
+
+       * xargs/xargs.c (main): Modify the assertions not to assume that
+       bc_ctl.arg_max is 2KiB less than ARG_MAX, since sysconfig() may
+       have returned a value for _SC_ARG_MAX which is greater.  For
+       example, AIX 5.3 can do this.  This should fix Savannah bug
+       #19391.
+
+2007-04-25  James Youngman  <jay@gnu.org>
+
+       * find/tree.c (predlist_dump, predlist_merge_nosort): These
+       functions were unused and commented out.  Removed.
+       (mark_stat) No longer used.  Removed.
+       (mark_type) No longer used.  Removed.
+
+       * find/parser.c (new_insert_exec_ok): When checking for {} in the
+       arguments to -exec..., use mbsstr() rather than strstr() in order
+       to cope bettwe with multibyte locales.
+
+       * lib/buildcmd.c: Don't define mbsstr() locally.  Instead, call
+       gnulib's mbsstr().
+
+2007-04-24  James Youngman  <jay@gnu.org>
+
+       * lib/buildcmd.c: Added some comments outlining how we might
+       change the implementation to support figuring out the real ARG_MAX
+       limit.
+
+2007-04-23  James Youngman  <jay@gnu.org>
+
+       * find/defs.h (struct predicate_performance_info): New data
+       structure for holding perofmance statistics.
+       (struct predicate: include predicate_performance_info
+       (apply_predicate): change from macro to function
+       (pred_is): new macro, for predicate identity testing
+       (enum DebugOption): Added DebugSuccessRates
+       * find/find.1: Document option "-D rates" which turns on
+       DebugSuccessRates.
+       * doc/find.texi: ditto
+       * find.c (main): Call show_success_rates() before exiting.
+       (apply_predicate): remove the macro defintion, declare equivalent
+       function in defs.h.
+       * find/ftsfind.c (main): Call show_success_rates() before
+       exiting.  Use apply_predicate().
+       (show_outstanding_execdirs): use pred_is().
+
+
+
+2007-04-22  Eric Blake  <ebb9@byu.net>
+
+       * xargs/xargs.c (main): Don't assume LINE_MAX exists (i.e. is
+       #defined).
+
+       * locate/updatedb.sh (PRUNEPATHS): Exclude /proc by default.
+
+2007-04-22  James Youngman  <jay@gnu.org>
+
+       * doc/Makefile.am: When cross-compiling, 'make clean' should not
+       delete doc/regexprops.texi, becaue we can't regenerate it.  Fixes
+       Savannah bug #19658.
+
+       * locate/Makefile.am (BUILT_SOURCES): Automatically generate
+       dblocation.texi, which records the default database location.
+       * doc/find.texi: Collect the default database location from
+       ../locate/dblocation.texi, and use LOCATE_DB in various places.
+       Document the fact that updatedb can generate slocate-compatible
+       databases.  Document the --dbformat option of updatedb.
+       * locate/frcode.c (main): Implemented the -S option which allows the
+       generation of an slocate secure database.
+       * locate/updatedb.sh: New option --dbformat which selects which
+       database format to use.
+       * locate/updatedb.1 (--dbformat): Document the new option.
+
+
+       * find/testsuite/find.gnu/access.exp: fixed a typo which prevented
+       the test correctly being skipped when run as root.   This re-fixes
+       Savannah bug# 18414, I hope.
+
+2007-04-21  James Youngman  <jay@gnu.org>
+
+       Release 4.3.4.
+
+       * find/locate/locatedb.5: Clarifications to the description of the
+       LOCATE02 format.  Organised the material under a number of
+       headings.  Documented the slocate database format.
+
+2007-04-21  James Youngman  <jay@gnu.org>
+
+       * find/testuite/Makefile.am (EXTRA_DIST_EXP): added
+       find/testsuite/find.posix/sv-bug-19617.exp
+
+2007-04-20  Maxim V. Dziumanenko <dziumanenko@gmail.com>
+
+       * po/uk.po: New Ukranian translation.
+       * configure.in: Added "uk" for Ukranian.
+
+2007-04-19  Peter Breitenlohner <peb@mppmu.mpg.de> (tiny change)
+
+       * locate/bigram.c (main): Set the initial pathname to the empty
+       string, to avoid decompression problems if the initial pathname
+       begins with a space.  This fixes Savannah bug #19484.
+       * locate/code.c (main): ditto
+
+2007-04-19  James Youngman  <jay@gnu.org>
+
+       * locate/updatedb.1 (--help): Option name should be bold, not
+       italic.
+
+       * find/testsuite/find.gnu/execdir-hier.exp: Avoid running
+       -execdir based tests if "." is on $PATH.  Fixes Savannah bug
+       #19634.
+       * find/testsuite/find.gnu/execdir-in-unreadable.exp: ditto
+
+       * find/testsuite/config/unix.exp (touch): New procedure touch,
+       replacing "exec touch" for greater efficiency.
+       * find/testsuite/find.posix/depth1.exp: Change "exec touch" to
+       "touch".
+       * find/testsuite/find.posix/files-not-expressions1.exp: ditto
+       * find/testsuite/find.posix/files-not-expressions2.exp: ditto
+       * find/testsuite/find.posix/files-not-expressions3.exp: ditto
+       * find/testsuite/find.posix/links.exp: ditto
+       * find/testsuite/find.posix/perm-vanilla.exp: ditto
+       * find/testsuite/find.posix/sv-bug-15235.exp: ditto
+       * /find/testsuite/find.posix/sv-bug-19613.exp: ditto
+
+       * find/testsuite/find.gnu/access.exp: Fix savannah bug #18414 by
+       skipping the test if the user can read any file (e.g. is root or
+       is an Admin user under Cygwin).
+
+2007-04-17  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.config (gnulib_version): Use the 2007-04-17
+       version of gnulib to fix a compilation error on Cygwin.  This
+       fixes Savannah bug #19619.
+
+       * find/testsuite/find.posix/sv-bug-19605.exp: New test, for
+       Savannah bug #19605.
+       * find/testsuite/find.posix/sv-bug-19617.exp: New test, for
+       Savannah bug #19617.
+       * find/ftsfind.c (consider_visiting): if fts_read() returns
+       enf->fts_info==FTS_NS, check for and diagnose a symbolic link
+       loop.  This fixes Savannah bugs #19605 and #19617.
+
+       * find/find.c (process_path): collect the stat information for
+       directories even if we already have the mode information, because
+       we need to use the members st_nlink and st_rdev in for the leaf
+       optimisation and loop detection, respectively.  This fixes
+       Savannah bug #19616.
+
+       * find/ftsfind.c (is_fts_enabled): Return a copy of ftsoptions,
+       not a copy of the (uninitialised) input argument.  This fixes
+       Savannah bug #19615.
+
+       * find/ftsfind.c (consider_visiting): If fts_read() returned
+       FTS_NS, then remember that the stat information is not valid, and
+       therefore don't set state.have_type or state.have_stat.  This
+       fixes Savannah bug #19613.
+
+       * find/testsuite/find.posix/sv-bug-91613.exp,
+       * find/testsuite/find.posix/sv-bug-91613.xo: New test for Savannah
+       bug 19613 (assertion failure on symbolic link loop).
+
+       * find/testsuite/config/unix.exp: Correctly diagnose a test case
+       which fails because find was expected to fail and instead
+       succeeded.
+       * find/testsuite/find.gnu/exec-many-rtn-failure.exp: The child
+       process in this test should return non-zero, not zero.  Therefore
+       run "false" instead of "true".
+
+2007-04-15  James Youngman  <jay@gnu.org>
+
+       Release 4.3.3.
+
+       * find/find.1: "-printf %b": blocks are 512 bytes.   Fixes
+       Savannah bug #19596.
+
+       * doc/Makefile.am (regexprops.texi): Do not use $(RM) because many
+       versions od make do not set it, and so it expands to nothing.
+       This avoids suprious emission of the regexprops.texi file to stdout.
+
+       * find/find.c (main, safely_chdir_lstat, safely_chdir_nofollow):
+       Only use O_LARGEFILE if it is #defined (NetBSD-3.1 does not define
+       it).
+       * find/ftsfind.c (main): ditto
+       * find/pred.c (pred_empty, prep_child_for_exec): ditto
+
+
+       * import-gnulib.config: Update to gnuliv 2007-04-14.
+
+       * lib/Makefile.am, import-gnulib.sh: Create lib/gnulib-version.c
+       in import-gnulib.sh, not in lib/Makefile.
+
+       * build-aux/Makefile.am: New file; distribute check-tstfiles.sh.
+
+       * locate/Makefile.am: mkinstalldirs is now in build-aux.
+
+       * doc/Makefile.am: We also need getdate.texi.
+
+2007-04-14  James Youngman  <jay@gnu.org>
+
+       * doc/.cvsignore: Ignore getdate.texi
+
+       * find/defs.h: #include "buildcmd.h" near the top of the file, not
+       in the middle.
+
+       * all: Pass O_LARGEFILE when opening directories.
+
+       * all: Changes to allow us to use the FTS_CWDFD mode of fts().
+       These are quite extensive changes, and are detailed below.
+
+       * find/defs.h (struct exec_val): New member dirfd, the directory
+       in which the exec should take place.
+       (is_fts_enabled): Tell the caller which flags are passed to
+       fts_open().
+       (get_start_dirfd): New function.  Returns value of start_desc.
+       (get_current_dirfd): New function.  Returns the fd of the
+       directory fts is currently traversing.  If this is the current
+       directory, AT_FDCWD is returned.
+       (complete_pending_execdirs): takes a new argument, indicating
+       where the exec is to take place.  Ugh.
+       (get_info): the file name is taken from state.rel_pathname, so
+       we don't need it as a function argument.
+       (enum DebugOption): Added DebugExec ("-D exec").
+       (struct state): Added cwd_dir_fd, the directory we are examining
+       with fts().  If fts() is not in use, this is AT_FDCWD.  Also added
+       execdirs_outstanding, which is a boolean which tells us if there
+       are any not-yet-execed -execdir or -okdir actions (with +).  This
+       is not really used yet.
+       * find/ftsfind.c (set_close_on_exec): New function.
+       (get_current_dirfd): Return an fd open on the directory that fts()
+       is currently examining.
+       (left_dir): Signal that our previous ides of which dirctory fts is
+       searching is now out of date.
+       (inside_dir): Indicate which directory fts is now searching.
+       (complete_execdirs_cb): Callback for run_in_dir() to complete
+       pending execdirs in this directory.
+       (show_outstanding_execdirs): Supports "-D exec"
+       consider_visiting(): Do not allow building-up of pending execdirs,
+       as a workaround to Savannah bug #18466.
+       (ftsoptions): Make this a static module variable.
+       * find/parser.c (insert_exec_ok): New parameter describing which
+       directory the exec should occur in.
+       (parse_version): for FTS, add a list of options being used.
+       * find/pred.c (pred_and, pred_comma): No need to pass the relative
+       path name to get_info(), it can pull it from state.rel_pathname.
+       (pred_delete): use unlinkat().
+       (pred_empty): use openat().
+       (new_impl_pred_exec): Accept an fd parameter describing where the
+       exec is to take place.
+       (pred_executable, pred_writable, pred_readable): Use run_in_dir()
+       to ensure that access() is called in a working directory which is
+       suitable for the pathname we pass in.
+       (prep_child_for_exec): In the child process, change to the
+       appropriate directory becore the exec().
+       * find/util.c (debugassoc): Support "-D exec".
+       (get_info): No longer need to pass the relative path to
+       get_statinfo().
+       (do_complete_pending_execdirs): Refactored body of what used to be
+       complete_pending_execdirs().
+       (complete_pending_execdirs): Pull body out into
+       do_complete_pending_execdirs() and call that only if there is work
+       to do.
+       (fallback_stat, optionh_stat, optionp_stat, optionl_stat): Use fstatat().
+       (get_start_dirfd): New access function for starting_desc.
+       * find/testsuite/find.gnu/execdir-hier.exp: New test
+       * find/testsuite/find.gnu/execdir-hier.xo: Expected outut for new test
+       * lib/dircallback.c, lib/dircallback.h: New function,
+       run_in_dir(), which runs a callback function in a specified
+       directory.
+       * lib/listfile.c: Use run_in_dir() to call readlink() in the right
+       directory.
+       (get_link_name_at): Call get_link_name_cb via run_in_dir.
+       (get_link_name_cb): New callback function, wrappting
+       get_link_name().
+
+       * find/testsuite/find.gnu/execdir-pwd.exp: Since we have disabled
+       thebuilding-up of command lines for -execdir, Savannah bug #18466
+       has been neutralised (but not fixed - we just don't allow the
+       problem circumstance to occur).
+
+2007-04-09  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi: Change fully-specified @node directives to
+       single-argument @node directives in order to accomodate the
+       inclusion of getdate.texi.
+
+       * doc/find.texi: Document -newerXY.
+
+       * doc/find.texi (Security Considerations): updated to describe
+       differences in the fts-based implementation.
+
+       * find/find.1: Indicate that testing the birth time where this is
+       not supported produces a negative result for files where the birth
+       time is not known (or a fatal error if the file of interest is a
+       reference file).
+
+2007-04-08  James Youngman  <jay@gnu.org>
+
+       * configure.in: Set @AUXDIR@ (to the location of the build-aux
+       directory).
+       * build-aux/check-testfiles.sh: New script, which checks that all
+       the DejaGnu test files have been included in the distribution and
+       (more helpfully) lists any that are missing.
+       * Makefile.am (findutils-check-testfiles): Use
+       build-aux/check-testfiles.sh.
+       * locate/testsuite/Makefile.am (EXTRA_DIST_EXP): distribute
+       locate/testsuite/locate.gnu/sv-bug-14535.exp.
+
+       * config.rpath, depcomp, missing: Moved into build-aux/.
+       * configure.in(AC_CONFIG_AUX_DIR): Find aux files in $SRCDIR/build-aux,
+       not in $SRCDIR.
+
+2007-03-31  James Youngman  <jay@gnu.org>
+
+       * find/tree.c (build_expression_tree): Issue more specific error
+       messages; distinguish the case where the predicate is invalid from
+       the cases where a required argument is missing, and a supplied
+       argument is invalid.
+
+       * import-gnulib.config (gnulib_version): Update to 2007-03-30
+       version of gnulib.
+
+2007-03-28  James Youngman  <jay@gnu.org>
+
+       * find/defs.h (set_stat_placeholders): utility function for
+       initialising the sturct stat fields that NetBSD doesn't always set
+       (like st_birthtime where the file is on a filesystem not
+       supporting birthtime).
+       * find/util.c: set_stat_placeholders(): new function
+       (get_statinfo): Call set_stat_placeholders().
+       (optionh_stat, optionl_stat, optionp_stat): ditto
+       * find/find.c (main, wd_sanity_check, safely_chdir_lstat,
+       process_dir): use set_stat_placeholders().
+       * find/parser.c (parse_anewer, parse_cnewer, parse_newer,
+       parse_newerXY): ditto.
+       (get_stat_Ytime): Support birth time ('B').
+       (parse_newerXY): Support st_birthtime.
+       * find/fstype.c (set_fstype_devno): Use set_stat_placeholders().
+       * find/pred.c (pred_xtype): Use set_stat_placeholders().
+       (pred_newerXY): Support birth time.
+       (pred_fprintf, format_date): ditto ("%Bx").
+
+2007-03-25  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.c (main): For "xargs --show-limits" where stdin is a
+       terminal, warn the user that the program specified (or /bin/echo)
+       will be run at least once, if that is what will happen.
+
+2007-03-24  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.sh: Added option -d, allowing the user to use a
+       local version of gnulib, perhaps because they have local changes.
+
+2007-03-13  James Youngman  <jay@gnu.org>
+
+       * find/parser.c (parse_quit): Estimated success rate of -quit is
+       100%.
+
+2007-03-08  James Youngman  <jay@gnu.org>
+
+       * find/find.1 (TESTS): Document -newerXY, indicate that reference
+       files are only examined once.
+       (HISTORY): Indicate when various features were added
+       (BUGS): Indicate that -ok ignores LC_COLLATE.
+
+2007-03-07  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.config: (gnulib_version): Use gnulib version
+       2007-03-05
+       (modules): Added getdate
+
+       * find/Makefile.am (LDADD): Added @LIB_CLOCK_GETTIME@ for
+       clock_gettime(), if it is available.
+
+       * find/defs.h: (enum xval): New enumeration, representing the
+       value of X used in the -newerXY test.  It is stored in the reftime
+       member of 'union args'.
+       (struct predicate): reftime is also used by -newerXY.
+       (enum arg_type): Added ARG_SPECIAL_PARSE for -newerXY, because the
+       parsing function needs to look at the name of the test.
+       (struct options): start_time is now a struct timespec, not a
+       time_t.
+
+       * find/parser.c: (parse_newerXY): New parsing function for
+       -newerXY, a feature copied from FreeBSD (also present other BSD
+       implementations too)
+       (get_stat_Ytime): New function; returns st_atime, st_mtime or
+       st_ctime from struct stat, as a timespec, as required according to
+       the value of Y in -newerXY.
+       (found_parser): Factored the tail out of find_parser.
+       (find_parser): Moved tail into found_parser.  Add special handling
+       for -newerXY.
+       (do_parse_xmin): New argument xv, indicating the value to which
+       predicate->reftime.xval should be set.
+       (parse_amin): Pass XVAL_ATIME to do_parse_xmin.
+       (parse_cmin): Pass XVAL_CTIME to do_parse_xmin.
+       (parse_mmin): Pass XVAL_MTIME to do_parse_xmin.
+       (parse_newer): Set args.reftime.xval to XVAL_MTIME.
+
+       * find/pred.c (pred_table): added pred_XY.
+       (pred_fls): options.start_time is now a struct timespec, so just
+       pass the tv_sec member to list_file.
+       (pred_ls): ditto
+       (pred_newerXY): New function, implementing -newerXY.
+
+       * find/tree.c (costlookup): pred_newerXY needs stat information.
+       (build_expression_tree): For predicates of type ARG_SPECIAL_PARSE,
+       pass them in the name of the predicate (that is, don't advance
+       argc).
+
+       * find/util.c (now): New function for setting options.start_time.
+       Use nanoseconds where it is available.
+       (set_option_defaults): Use now() rather than time().
+
+2007-03-03  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.sh: Pass --with-tests to gnulib-tool so that relevant
+       gnulib unit tests are built and are run for "make check".
+
+       * configure.in (AC_CONFIG_FILES): Add tests/Makefile (the makefile
+       for the gnulib unit tests).
+
+       * Makefile.am: Add 'tests' to SUBDIRS.
+
+       * .cvsignore: Add 'tests'.
+
+       * import-gnulib.config (modules): Also use Gnulib modules
+       mbscasestr and mbsstr in order to perform correct string searching
+       in multibyte strings, in order to fix Savannah bug #14535.
+
+       * locate/testsuite/locate.gnu/sv-bug-14535.exp: new test case for
+       Savannah bug #14535.
+
+       * locale/locate.c (visit_substring_match_nocasefold): Use mbsstr
+       rather than strstr, in order to correctly support multibyte
+       strings.
+       (visit_substring_match_casefold): Use mbscasestr rather than
+       strstr in order to correctly support case-folding in a multibyte
+       environment (e.g. with UTF-8 characters outside the normal ASCII
+       range).  This fixes Savannah bug #14535.
+       (struct casefolder): No longer needed, removed
+       (visit_casefold): No longer needed, removed.
+       (lc_strcpy): No longer needed, removed.
+       (search_one_database): Removed redundant variable need_fold and
+       the code which used to set it.  It had controlled the adding of
+       the visitor function visit_casefold, but that function itself is
+       no longer required.  Also there is now no need to pass in a
+       lower-case argument to visit_substring_match_casefold, so don't
+       pass that in the context argument.
+
+       * locate/locate.c (usage): Fixed typo.
+
+2007-03-01  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi (Multiple Files): Document the construct
+       -exec sh -c 'cmd "$@" final-args' {} + - fixing Savannah bug
+       #18554.
+
+2007-02-28  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.config: New file.  Specifies which version of
+       Gnulib we need to check out and build from.
+
+       * import-gnulib.sh: Use import-gnulib.config.
+
+       * README-CVS: Describe the new method of building from CVS.
+
+       * lib/gnulib-version.h, lib/gnulib-version.sh: New files; code for
+       reporting which version of Gnulib we built findutils from.
+
+       * lib/Makefile.am: Build gnulib-version.c out of
+       ./gnulib-version.config by using lib/gnulib-version.sh.
+
+       * Makefile.am: Ship import-gnulib.config and import-gnulib.sh.
+
+       * .cvsignore: Ignore gnulib-cvs
+
+       * lib/.cvsignore: Ignore gnulib-version.c
+
+       * find/parser.c, locate/code.c, locate/locate.c, xargs/xargs.c:
+       Report which version of Gnulib we were built from.
+
+2007-02-25  James Youngman  <jay@gnu.org>
+
+       * find/find.c (process_dir): Removed duplicated (shadow)
+       declaration of did_stat.  Assert that we did not use subdirs_left
+       if subdirs_unreliable is true.
+
+       * find/parser.c (parse_size): Removed unused variable rate.
+       (parse_time): Removed unused variable num_days_approx.
+       (get_num): Removed unused variables ok and suffixes.
+
+       * find/pred.c (do_fprintf): Indicate that the function needs a
+       return value (referring to Savannah bug #19146).
+
+       * find/tree.c (predlist_dump): Commented out unused function
+       (predlist_merge_nosort): Commented out unused function
+       (getrate): Returns type is float, so return 1.0f not 1.0.
+       (calculate_derived_rates): Removed unused variable rate.  Use a
+       switch statement rater than ifs.
+
+       * find/util.c (usage): Removed unused variable i.
+
+       * lib/buildcmd.c (bc_do_insert): Removed unused variable
+       need_prefix.
+       (bc_init_controlinfo): annotate a line (with #warning) which is
+       probably a bug.
+
+       * locate/locate.c: #include <grp.h> for the benefit of the
+       setgroups() call in drop_privs.
+       (slocate_db_pathname): Commented out unused variable.
+       (set_max_db_age): error command has no format directive, so
+       remove the unused extra argument.
+       (looking_at_slocate_db): Removed unused variables magic and
+       lenwanted.  Fix bug where result is indeterminate (due to falling
+       off the end of the function) if the first character is a nondigit.
+       (search_one_database): Eliminate (spurious) compiler warning
+       rlating to possible use before initialisation of slocate_seclevel.
+
+       * xargs/xargs.c (get_char_oct_or_hex_escape): Eliminate spurious
+       compiler warning on variable p.
+       (main): Removed unused varible env_too_big
+
+
+2007-02-24  James Youngman  <jay@gnu.org>
+
+       * find/parser.c (pred_sanity_check): define this function even for
+       _NDEBUG, but do nothing in that case.
+       (estimate_timestamp_success_rate): correct (invert) the sense of
+       the subtraction used to find the file's age.
+
+       * import-gnulib.sh (findutils_modules): Import Gnulib modules
+       xstrtod and timespec.
+
+       * find/parser.c (get_comp_type): Refactored out of get_num.
+       (get_num): call get_comp_type to find the comparison type.
+       (get_relative_timestamp): new function replacing get_num_days.
+       (get_num_days): Remove.
+       (do_parse_xmin): Support fractional arguments and
+       nanosecond timestamps.
+       (parse_used): ditto
+       (parse_time): ditto
+
+       * xargs/xargs.c (read_line): Give a warning message if a NUL is
+       found in the input (this function is called only when -0 is not in
+       effect).
+
+       * xargs/xargs.c (nullwarning_given): New variable indicating if
+       the NULL character warning had already been issued.
+
+       * doc/find.texi (Multiple Files): Describe how trailing blanks are
+       handled when -L is in effect.
+
+       * xargs/xargs.c (read_line): Use an enum rather than
+       preprocessor macro values for the lexer state.
+
+       * lib/savedirinfo.c (free_dirinfo): Fixed memory leak (trivial
+       patch from Supriya Kannery)
+
+2007-01-22  James Youngman  <jay@gnu.org>
+
+       * .cvsignore (install-sh): Ignore, since the install-sh file is no
+       longer held in the findutils CVS repository.
+
+       * find/testsuite/config/unix.exp (find_start): allow a test to be
+       skipped for either the old or the new find executable.
+       * find/testsuite/find.gnu/execdir-pwd.exp,
+       find/testsuite/Makefile.am:
+       New test, covering Savannah bug #18466.  This test currently fails
+       for the ftsfind binary and passes for the oldfind binary.  Due to
+       a limitation in  the way that we perform the test, we can't tell
+       the test suite to expect a failure in the new binary but not the
+       old.  Therefore we skip the test for the old binary.
+
+       * lib/regeprops.c (describe_regex_syntax): fixed a typo in the text
+       * doc/find.texi (Multiple Files): fixed a typo
+
+2007-01-16  James Youngman  <jay@gnu.org>
+
+       (ctime_format): format the time manually (rather than using ctime)
+       in order to include the sub-second part of the time.
+       (weekdays, months): new static variables used by ctime_format.
+       (format_date): append a the sub-second part of the timestamp to
+       the seconds part of date/time output.
+
+2007-01-15  James Youngman  <jay@gnu.org>
+
+       * find/defs.h (time_val): define struct; use timespec to hold time
+       in the 'reftime' member.
+       (args): use struct timespec instead of time_t for predicates
+       -newer, -anewer, -cnewer.  * find/parser.c (includes): include
+       stat-time.h.
+       (parse_anewer, parse_cnewer, parse_newer): use struct timespec to
+       hold timestamps.  * find/pred.c (compare_ts): new function for
+       comparing timestamps in struct timespec.
+       (pred_anewer, pred_cnewer, pred_newer): use compare_ts() to
+       compare timestamps (hence takinng acoung of sub-second
+       granularity).
+       * find/ftsfind.c: Various improvements to comments.
+       (is_fts_enabled): Newline before function name to comply with GNU
+       coding standard.
+
+2007-01-13  James Youngman  <jay@gnu.org>
+
+       * lib/regexprops.c (describe_regex_syntax): fixed typo
+
+       * xargs/xargs.c (read_line): Fixed Savannah bug# 18714; VT and FF
+       are not separators, according to POSIX (in the POSIX locale).
+
+       * xargs/testsuite/Makefile.am,
+         xargs/testsuite/input/formfeeds.xi,
+         xargs/testsuite/input/verticaltabs.xi,
+         xargs/testsuite/xargs.posix/sv-bug-18714.exp,
+         xargs/testsuite/xargs.posix/sv-bug-18714.xo,
+         xargs/testsuite/xargs.posix/sv-bug-18714b.exp,
+         xargs/testsuite/xargs.posix/sv-bug-18714b.xo: Tests for Savannah
+         bug #18714.
+
+       * xargs/xargs.c (usage): Removed suprious "[" in --help output
+       (fixes Savannah bug #18384).
+
+       * locate/locate.c: Implement the option --max-database-age.
+       (main) Accept the option.
+       (set_max_db_age): Parse the argument.
+
+       * locate/locate.c (dolocate): If the database is more than N days
+       old, indicate its actual age in the warning message we produce.
+
+       * locate/locate.1, docs/find.texi: Document --max-database-age
+
+       * THANKS: Thank Dean Gaudet for the idea of -sparse.
+
+       * po/findutils.pot: Updated from Translation Project
+
+       * po/ga.po, po/pl.po, po/nl.po, po/tr.po, po/hu.po: Updated from
+       the Translation Project
+
+2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * doc/find.texi: Fix some typos. (tiny change)
+
+2007-01-07  James Youngman  <jay@gnu.org>
+
+       * find/parser.c (parse_perm), find/testsuite/find.gnu/perm000.exp,
+         find/testsuite/find.gnu/perm000.xo: -perm /000 is now quivalent
+         to -perm -000, as dscussed in Savannah bug #14748.  The warning
+         message we issue when the user does this now explains that the
+         defintion changed as we promised it would in 2005.
+
+       * xargs/xargs.c (read_line): Correctly handle quoted empty
+       arguments occurring first or last on a line (by adding an empty
+       argument to the output).  Fixes Savannah bug #18713.
+
+       * xargs/testsuite/xargs.sysv/sv-bug-18713.exp,
+       xargs/testsuite/xargs.sysv/sv-bug-18713.xo,
+       xargs/testsuite/input/empty.xi: Test case for Savannah bug #18713.
+
+
+2006-12-29  James Youngman  <jay@gnu.org>
+
+       * find/testsuite/config/unix.exp:
+       Verify that find_start is invoked with wither a p (pass) or an f
+       (fail) argument.
+
+       * lib/listfile.c, lib/listfile.h:
+       define find_blocksize() and provide a declaration for get_link_name()
+
+       * find/testsuite/config/unix.exp: Updated copyright years.
+
+       * find/testsuite/find.gnu/execdir-one.exp, find/testsuite/find.gnu/execdir-root-only.exp, find/testsuite/find.gnu/sv-bug-12230.exp, find/testsuite/find.gnu/sv-bug-17782.exp, find/testsuite/config/unix.exp:
+       Avoid tests using -execdir if $PATH contains a relative directory
+
+       * find/parser.c:
+       Also flag $PATH values containing relative directories as being dangerous.
+
+       * find/parser.c, find/defs.h, find/util.c:
+       Instead of selecting the old or new exec handling code with the NEW_EXEC macro, just use the new code all the time
+
+       * locate/testsuite/config/unix.exp:
+       Fixed Savannah bug #13252, test suite failure caused by the fact that 'file normalize' is not available in Tcl 8.3
+
+       * NEWS, find/pred.c:
+       Fixed Savannah bug #18433, compilation failure with configure --enable-debug
+
+2006-12-28  James Youngman  <jay@gnu.org>
+
+       * NEWS: Document addition of %S.
+
+       * find/defs.h, find/find.1, find/parser.c, find/pred.c:
+       Implemented %S (sparseness) printf format, and general refactoring and cleanup of printf predicate
+
+2006-12-01  James Youngman  <jay@gnu.org>
+
+       * NEWS, configure.in: Begin work on findutils 4.2.30
+
+       * find/find.c:
+       Fix compilation error for oldfind if --enable-debug was passed to configure
+
+       * NEWS, configure.in: Prepare for work on findutils-4.3.3
+
+2006-11-25  James Youngman  <jay@gnu.org>
+
+       Release 4.3.2.
+
+       * find/testsuite/Makefile.am: Added test case for Savannah bug #17782
+
+       * doc/textinfo.tex: Removed; we now use the version supplied
+       by automake.
+
+       * m4/mkinstalldirs.m4: Added this file.  It's an excerpt from an
+       old version of gnulib's m4/nls.po file.  The current version of
+       gnulib does not expand MKINSTALLDIRS, but gettext-0.14.6's version
+       of po/Makefile.in.in expects it to be expanded.  This m4 file
+       fills the gap.
+
+2006-11-20  James Youngman  <jay@gnu.org>
+
+       * po/et.po, po/bg.po, po/pl.po, po/nl.po, po/tr.po: Updated
+       translations for Bulgarian, Estonian, Dutch, Polish and Turkish.
+
+2006-11-08  James Youngman <jay@gnu.org>
+
+       * find/testsuite/Makefile.am:
+       Oops, indicate the right directory for the new test files
+
+       * ChangeLog, depcomp, doc/texinfo.tex, find/ftsfind.c, find/testsuite/Makefile.am, find/testsuite/find.gnu/sv-bug-18222.exp, find/testsuite/find.gnu/sv-bug-18222.xo, install-sh:
+       Savannah bug#18222 - test case
+
+       * ChangeLog, lib/buildcmd.c:
+       Fixed Svannah bug #17782 ('./' prefix added at start of arg while it should be added at the start of the expansion of {})
+
+       * find/ftsfind.c (process_all_startpoints): Set
+       state.starting_path_length for every pathname argument.
+       This fixes Savannah bug #18222.
+
+       * find/pred.c (pred_prune): -prune should have an effect only if we are
+        currently considering a directory (Savannah bug #15531).
+
+2006-10-15  James Youngman <jay@gnu.org>
+
+       * lib/buildcmd.c: Fixed Savannah bug #17782, in which "find
+       -execdir echo "foo {}" runs 'echo ./foo filename' instead of the
+       correct command 'echo foo ./filename'.
+
+       * po/hu.po, po/sl.po: Updated Hungarian and Slovenian po files
+
+2006-08-21  James Youngman <jay@gnu.org>
+
+       * find/parser.c, find/testsuite/Makefile.am, find/testsuite/find.gnu/sv-bug-17490.exp:
+       Fixed Savannah bug #17490, which was a coiredump when -regex ZZZ was the final test on the command line
+
+2006-08-20  James Youngman <jay@gnu.org>
+
+       * find/parser.c: Merged the fix for the trailing % in "find -printf".
+
+2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port recent fixes for symbolic modes involving X from gnulib,
+       and clarify the documentation in this area.
+       * doc/find.texi: Use "file mode bits" when talking about
+       all the file mode bits (including setuid, setgid, and sticky),
+       and "permissions" when talking only about permissions bits
+       (read, write, execute/search).  Use "execute/search" to
+       talk about the x bit, since it means both.  You do not need
+       permission to the linked-to file to follow a symlink for
+       syscalls like "stat", but you do need search permission for
+       the directories you traverse.  Clarify the explanation of
+       -perm.  Use "that" instead of "which" when "which" isn't
+       quite correct English.
+       (Mode Bits): Renamed from Permissions.  All uses changed.
+       * doc/perm.texi: Sync from coreutils 6.0.
+       * find/defs.h (struct perm_val.val): Now an array of two items,
+       one for non-directories, and one for directories.  This is
+       to handle symbolic modes like +X correctly.
+       * find/parser.c (parse_perm): Likewise.  Also, adjust to
+       latest gnulib interface for mode_adjust.
+       * find/pred.c (pred_perm): Likewise.
+       * find/testsuite/Makefile.am (EXTRA_DIST_XO): Add find.posix/perm-X.xo.
+       (EXTRA_DIST_EXP): Add find.posix/perm-X.exp.
+       * find/testsuite/find.posix/perm-X.exp: New file.
+       * find/testsuite/find.posix/perm-X.so: New file.
+
+2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port to latest gnulib, and simplify the bootstrapping procedure.
+       * intl: Remove this directory and everything in it.
+       * depcomp, install-sh, missing, mkinstalldirs, doc/texinfo.tex:
+       Remove these files from CVS, as they are now gotten from gnulib.
+       * README-CVS: Don't recommend "autoreconf -i", as it doesn't work
+       for us.
+       * import-gnulib.sh (findutils_files): New var.  Grab this stuff
+       from gnulib.
+       (findutils_modules): Add fopen-safer; remove stdio-safer.  This
+       adjusts to latest gnulib.
+       (modules): Remove obsolete reference to intl_modules.
+       * .cvsignore: Remove stamp-h; add stamp-h1.
+       * doc/.cvsignore: Add regexprops.texi.
+       * find/.cvsignore: Add oldfind.
+       * lib/.cvsignore: Add .deps, regexprops.
+       * m4/.cvsignore: Add Makefile.
+       * po/.cvsignore: Add stamp-po.
+
+2006-08-19  James Youngman <jay@gnu.org>
+
+       * locate/testsuite/config/unix.exp, locate/testsuite/locate.gnu/bigprefix1.exp:
+       Explicit checks for parefixes which are within range of a short, but outside the one-byte range
+
+       * locate/testsuite/locate.gnu/bigprefix1.exp, locate/testsuite/locate.gnu/exceedshort.exp, locate/testsuite/locate.gnu/space1st.exp:
+       New file.
+
+       * locate/testsuite/Makefile.am, locate/testsuite/locate.gnu/exceedshort.exp, locate/testsuite/locate.gnu/space1st.exp:
+       Patch from Tavis Ormandy; check frcode handles initial space end encodes paths with more than 2^16 characters in the common prefix (tiny change)
+
+       * locate/frcode.c: Changes to avoid overflows
+
+2006-08-11  James Youngman <jay@gnu.org>
+
+       * locate/frcode.c:
+       Avoid producing an invalid database if the first item begins with a space
+
+2006-08-10  James Youngman <jay@gnu.org>
+
+       * find/pred.c, import-gnulib.sh, lib/listfile.c:
+       Updated callers of the gnnulib filemode module so that they work with the 2006-07-09 version of gnulib
+
+       * config.rpath: Updated config.rpath from autotools
+
+2006-08-08  James Youngman <jay@gnu.org>
+
+       * locate/locatedb.h:
+       Automatically verify (at compile time) that the frcode datastream
+       cannot get desynchronised.
+
+       * find/ftsfind.c:
+       Fixed Savannah bug #10494 (-maxdepth does not yield the same stat savinf in ftsfind as oldfind)
+
+       * find/ftsfind.c: display fts_level for find -D search
+
+       * find/util.c: Support find -D search
+
+       * locate/locate.c:
+       If the user specified -E but the database is an slocate database, do
+       not produce a list of files they cannot stat.  Issue an error message
+       explaining the problem.
+
+       * locate/locate.c:
+       Issue states messages in a way which indicates more clearly what's
+       happening when the numbers are reduced because not every filename
+       matched the pattern.
+
+       * locate/locate.c: Better error checking in drop_privs().
+
+2006-08-07  James Youngman <jay@gnu.org>
+
+       * NEWS, locate/locate.c, locate/locatedb.h:
+       Added support for slocate database format
+
+       * xargs/xargs.c:
+       Removed unused code (tivial patch from Miloslav Trmac).
+
+       * xargs/xargs.c: Removed unused code.
+
+       * doc/find.texi:
+       Clarify that the output format for locate -S differs from BSD's.
+
+       * NEWS, find/find.1:
+       Savannah bug #15360: explain global vs. positional options more clearly in the manual page
+
+       * NEWS: Typo in subsection header (* should be **).
+
+       * NEWS, find/find.1:
+       Savannah bug #15360: explain global vs. positional options more clearly in the manual page
+
+       * doc/find.texi: Fixed some clumsy phrasing
+
+       * NEWS, configure.in:
+       Now diverging again from the released tarball, so change once more to -CVS version number suffixes
+
+2006-08-06  James Youngman <jay@gnu.org>
+
+       * locate/locate.c: Fixed a typo in a comment.
+
+       * NEWS, configure.in: Moving on towards 4.3.2...
+
+       Release 4.3.1.
+
+       * find/testsuite/config/unix.exp:
+       Check that we can see the find.o file in the right position relative
+       to $base_dir to ensure that we are indeed testing the program we just built.
+
+       * find/testsuite/config/unix.exp:
+       Be more paranoid about whether we're really checking the right version
+       of find.
+
+       * NEWS, configure.in: Prepare for release of 4.3.1
+
+       * doc/find.texi: Document the -O and -D options
+
+       * find/defs.h, find/find.1, find/util.c:
+       'find -D help' now explains the available debugging options
+
+       * po/be.po, po/bg.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po:
+       Make dist changed all the po files again
+
+2006-08-05  James Youngman <jay@gnu.org>
+
+       * NEWS: Described more changes in 4.3.1.
+
+       * locate/testsuite/config/unix.exp:
+       Set the  environment variable so that updatedb knows where to find it; it's not in BINDIR yet during 'make check'
+
+       * po/be.po, po/bg.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po:
+       Make dist changed all the po files again :)
+
+       * po/et.po, po/vi.po: UPdated the Estonian and Vietnamese translations
+
+       * NEWS, configure.in: Prepare for release of findutils-4.2.28
+
+       * po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po, po/be.po, po/bg.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po:
+       Make dist changed all the po files again :)
+
+       * configure.in: Added Bulgarian translation.
+
+       * po/bg.po: Include Bulgarian translation
+
+       * configure.in: Added Bulgarian translation.
+
+       * po/et.po, po/vi.po: Updated Estonian and Vietnamese translations
+
+       * NEWS: Removed spurious comma.
+
+       * NEWS: Listed the updated translations.
+
+       * find/parser.c, lib/buildcmd.c, lib/buildcmd.h, xargs/xargs.c:
+       Fixed Savannah bug#16738, find does not subtract environment size in find .. -exec {} +
+
+       * NEWS: Updated the list of bugfixes etc.
+
+2006-06-15  James Youngman <jay@gnu.org>
+
+       * NEWS: Described recent changes
+
+       * configure.in: fix to how we invoke the gnulib regex module
+
+       * find/find.1:
+       Savannah bug #16269: avoid confusion over what type of quotes to use
+       in an example.
+
+       * find/parser.c: Option -nowarn should not itself produce a warning
+
+       * find/defs.h: Remoevd useless declaration of last_pred
+
+2006-06-14  James Youngman <jay@gnu.org>
+
+       * po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po:
+       Updated translation files ga pl sv tr nl ca vi bg fr
+
+       * locate/updatedb.sh:
+       Fixed Savannah bug #16579 (su false should be su -c false)
+
+2006-04-01  James Youngman <jay@gnu.org>
+
+       * find/find.c:
+       Fixed Savannah bug #15800: "Hard link count is wrong" reports wrong
+       directory name.
+
+2006-03-31  James Youngman <jay@gnu.org>
+
+       * po/hu.po: Updated Hungarian translation
+
+2006-01-04  James Youngman <jay@gnu.org>
+
+       * find/testsuite/find.posix/sizetype.exp, find/testsuite/find.posix/sizetype.xo, find/testsuite/find.posix/typesize.exp, find/testsuite/find.posix/typesize.xo:
+       Additional tests for -type -size and -size -type
+
+       * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/ftsfind.c, find/parser.c, find/pred.c, find/testsuite/Makefile.am, find/testsuite/config/unix.exp, find/testsuite/find.gnu/depth-d.exp, find/tree.c, find/util.c, po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po:
+       Initial implementation of a cost-based optimiser
+
+2005-12-23  James Youngman <jay@gnu.org>
+
+       * find/parser.c: Refactor of parse_[acm]time
+
+       * find/defs.h, find/find.c, find/finddata.c, find/ftsfind.c, find/tree.c, find/util.c:
+       last_pred can be a static in tree.c rather than a global variable
+
+       * find/tree.c, find/finddata.c:
+       Moved some global data out of finddata.o and into static variables in tree.c
+
+       * NEWS, find/find.c, find/fstype.c, find/ftsfind.c, find/parser.c, find/pred.c, lib/buildcmd.c, lib/buildcmd.h, lib/regexprops.c, lib/regextype.c, lib/regextype.h, lib/savedirinfo.c, locate/locate.c, xargs/xargs.c:
+       Fixed many compilation warnings
+
+       * find/find.c, find/ftsfind.c, find/util.c:
+       Evaluating the predicates can change the contents of the data structure (for example to add another exec item)
+
+       * find/defs.h, find/find.c, find/ftsfind.c, find/tree.c, find/util.c:
+       Re-factored a lot of common expression-handling code out of find.c and ftsfind.c, mainly into tree.c
+
+       * find/find.c, find/ftsfind.c, find/tree.c:
+       Savannah bug #15271: more helpful error messages for cases where there is a missing expression
+
+2005-12-20  James Youngman <jay@gnu.org>
+
+       * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/ftsfind.c, find/testsuite/Makefile.am, find/testsuite/find.posix/sv-bug-15235.exp, find/testsuite/find.posix/sv-bug-15235.xo, find/tree.c, find/util.c:
+       Savannah bug #15195: more helpful error messages for 'find . ( )' or 'find . \!'
+
+       * ChangeLog: Added entries for recent changes.
+
+       * find/defs.h, find/find.c, find/ftsfind.c, find/testsuite/find.posix/bracket-depth.exp, find/util.c:
+       Further fix to bug# 15235: a leading comma is a filename not an expression
+
+       * find/defs.h, find/parser.c, find/testsuite/Makefile.am, find/testsuite/find.posix/empty-parens.exp, find/tree.c:
+       Accept 'find ( -depth )' but reject 'find ( )'
+
+       * po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po:
+       did make dist
+
+       * find/testsuite/find.gnu/delete.exp:
+       Use the new find program, and the new way of locating it (/ instead of )
+
+       * find/testsuite/Makefile.am: Added bracket-depth.exp.
+
+       * NEWS, configure.in: We have moved on from 4.3.0
+
+       * find/defs.h, find/find.c, find/ftsfind.c, find/testsuite/Makefile.am, find/testsuite/find.gnu/delete.exp, find/testsuite/find.posix/files-not-expressions1.exp, find/testsuite/find.posix/files-not-expressions1.xo, find/testsuite/find.posix/files-not-expressions2.exp, find/testsuite/find.posix/files-not-expressions2.xo, find/testsuite/find.posix/files-not-expressions3.exp, find/testsuite/find.posix/files-not-expressions3.xo, find/util.c:
+       Avoid getting confused by filename arguments of which the first
+       character looks like a predicate, for example ',x' or '!x' or
+       '(x' (Savannah bug #15235).
+
+2005-12-20  James Youngman <jay@gnu.org>
+
+       * find/defs.h, find/find.c, find/ftsfind.c,
+       find/testsuite/find.posix/bracket-depth.exp, find/util.c: Further
+       fix to bug# 15235: a leading comma is a filename not an expression
+
+       * find/defs.h, find/parser.c, find/testsuite/Makefile.am,
+       find/testsuite/find.posix/empty-parens.exp, find/tree.c: Accept
+       'find ( -depth )' but reject 'find ( )'
+
+       * find/testsuite/find.gnu/delete.exp: Use the new find program,
+       and the new way of locating it ($OLDFIND/$FTSFIND instead of $FIND)
+
+       * find/testsuite/Makefile.am: Added bracket-depth.exp.
+
+       * NEWS, configure.in: We have moved on from 4.3.0
+
+       * find/defs.h, find/find.c, find/ftsfind.c,
+       find/testsuite/Makefile.am, find/testsuite/find.gnu/delete.exp,
+       find/testsuite/find.posix/files-not-expressions1.exp,
+       find/testsuite/find.posix/files-not-expressions1.xo,
+       find/testsuite/find.posix/files-not-expressions2.exp,
+       find/testsuite/find.posix/files-not-expressions2.xo,
+       find/testsuite/find.posix/files-not-expressions3.exp,
+       find/testsuite/find.posix/files-not-expressions3.xo, find/util.c:
+       Avoid getting confused by filename arguments of which the first
+       character looks like a predicate, for example ',x' or '!x' or '(x'
+       (Savannah bug #15235).
+
+2005-12-19  James Youngman <jay@gnu.org>
+
+       * find/testsuite/config/unix.exp:
+       Run every test twice, once with the old (non-fts) binary and once with
+       the new (fts-enabled) binary.
+
+2005-12-19  Eric Blake <ebb9@byu.net>
+
+       * find/testsuite/Makefile.am,
+       find/testsuite/find.posix/sv-bug-15235.xo,
+       find/testsuite/find.posix/sv-bug-15235.exp: New tests for Savannah
+       bug 15235.
+
+       * NEWS, find/find.1, doc/find.texi (Invoking find): Document bug
+       fix for Savannah bug 15235.
+
+2005-12-16  James Youngman <jay@gnu.org>
+
+       * xargs/xargs.1, xargs/xargs.c: Fixed bug# 15211, that xargs
+       --show-limits is not documented in the manpage or in the usage
+       message
+
+2005-12-12  James Youngman <jay@gnu.org>
+
+       Release 4.3.0.
+
+       * find/testsuite/find.gnu/access.exp:
+       Don't leave junk files lying around the place
+
+       * README-CVS: Update the the instructions for getting gnulib; the
+       CVS arrangements at Savannah have changed.
+
+       * ChangeLog, NEWS, doc/find.texi, doc/perm.texi, find/defs.h, find/parser.c:
+       Merged changes from 4.2.x branch again
+
+       * NEWS, doc/find.texi, find/defs.h, find/find.c, find/ftsfind.c,
+       find/parser.c, find/pred.c, find/util.c, lib/listfile.c,
+       lib/listfile.h: Initial code to allow control over how -ls quote
+       (or does not quote) control characters; not enabled yet
+
+2005-12-11  James Youngman <jay@gnu.org>
+
+       * ChangeLog, THANKS, xargs/xargs.c:
+       Fixed spelling errors in Bob Proulx's name.  Sorry, Bob.
+
+2005-12-10  James Youngman <jay@gnu.org>
+
+       * doc/perm.texi:
+       Aaron Hawley: Updated perm.texi from the coreutils distribution
+
+       * find/parser.c:
+       Avoid using entries which have the same name as POSIX library
+       functions (fprintf, printf, exec) as the implementation is allowed to
+       #define these.  That generates hard-to-grok compilation errors.
+
+2005-12-10  Andreas Metzler <gnu@downhill.at.eu.org>
+
+       * ChangeLog, NEWS, configure.in, find/defs.h, find/parser.c:
+       Applied patch from Andreas Metzler fixing Savannah bug #15181:
+       implicit declaration of parse_openparen
+
+2005-12-08  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi: Typo and spelling corrections from Aaron Hawley
+
+2005-12-05  James Youngman  <jay@gnu.org>
+
+       * Released findutils-4.2.27
+
+2005-12-05  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi, find/find.1, locate/locate.1, xargs/xargs.1:
+       Savannah patch #3775 from Aaron Hawley: reconciling man pages
+       differences; did not apply the patch, but resolved all the
+       remaining issues manually by updating the documentation (mostly
+       the Texinfo documentation, which was missing a number of specific
+       technical statements about the behaviour of various options)
+
+2005-12-04  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi: Document --show-limits
+
+       * xargs/xargs.c:
+       Correctly display the size of the argument buffer we really allocated.
+
+       * doc/find.texi, find/find.1, find/parser.c, find/pred.c, NEWS:
+       Savannah bug #14748 (which this change does NOT fix): issue
+       warning of future changes in the behaviour of -perm /000
+
+2005-11-30  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.c:
+       Typo correction from Benno Schulenberg <benno@nietvergeten.nl>
+       (tiny change)
+
+2005-11-29  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.c:
+       Typo "Ilegal"; change to "Invalid" since this is not really illegal!
+       Bug report by Primoz Peterlin.
+
+       * lib/regexprops.c, xargs/xargs.c:
+       Prefer the word 'Invalid' or the phrase 'not allowed' over
+       'Illegal', as per the GNU coding standards, and as per the
+       suggestion from Benno Schulenberg
+
+2005-11-24  James Youngman  <jay@gnu.org>
+
+       * NEWS, lib/buildcmd.c, lib/buildcmd.h: Merge to trunk from 4.2.x fixes
+
+       * lib/buildcmd.h:
+       Deleted inaccurate comment about the default value of ctl->args_per_exec.
+
+       * NEWS, lib/buildcmd.c, lib/buildcmd.h:
+       Be more conservative about the total number of arguments we will
+       allow (to avoid exec limits on Linux/PPC)
+
+2005-11-23  James Youngman  <jay@gnu.org>
+
+       * NEWS: Bug #14921 has been fixed.
+
+       * find/fstype.c:
+       Savannah bug #14921: when a Linux bind filesystem is in use, find
+       would expand '-printf %F' to 'none' if a bind mount targetted the same
+       filesystem as the one containing the file to be described.
+
+       * NEWS: Updated to describe recent changes
+
+       * doc/find.texi, find/find.1: Documented find -printf %M
+
+       * lib/buildcmd.c, xargs/testsuite/Makefile.am,
+       xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp,
+       xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.xo,
+       xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp,
+       xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.xo:
+       Ensure that the test suite still passes even if the current
+       system's value of ARG_MAX is different from the development/test
+       system
+
+       * lib/buildcmd.c: reindent and untabify
+
+       * configure.in: The CVS code is moving on from the previous release.
+
+2005-11-22  James Youngman  <jay@gnu.org>
+
+       * ChangeLog: Updated with recent changes.
+
+2005-11-21  James Youngman  <jay@gnu.org>
+
+       * locate/testsuite/config/unix.exp:
+       Even if we expect locate to return a nonzero status, the test should
+       still fail if updatedb fails!
+
+       * locate/testsuite/locate.gnu/ignore_case2.exp:
+       Set the current directory for updatedb.  This test case is supposed to
+       fail because the filename is not matched, not because updatedb fails!
+
+       * locate/updatedb.sh:
+       Check the binaries actually exist in the place we expect.
+
+2005-11-20  James Youngman  <jay@gnu.org>
+
+       * locate/locate.1, xargs/xargs.1: Escape '-' as '\-' where appropriate.
+
+       * find/find.1:
+       Escape '-' as '\-' where appropriate.   Fixes last part of bug #14556.
+
+2005-11-19  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi, find/find.1:
+       Applied edited form of Andreas Metzler's -perm /mode documentation
+       patch resolving Savannah bug #14619.
+
+       * lib/extendbuf.c:
+       In the success case, extendbuf() should preserve the previous value of
+       errno.  Fixes Savannah bug #14842.
+
+       * xargs/testsuite/Makefile.am: Added new test files
+
+       * find/find.1:
+       Correctly indicate the default regular expression syntax (fixes
+       Savannah bug #14836).
+
+       * NEWS, configure.in: Released findutils-4.2.26
+
+       * ChangeLog, NEWS, lib/buildcmd.c,
+       xargs/testsuite/inputs/16383-ys.xi,
+       xargs/testsuite/inputs/32767-ys.xi,
+       xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp,
+       xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.xo,
+       xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp,
+       xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.xo: Applied
+       bugfix from Jim Meyering (tiny change), where many short arguments
+       would cause xargs (and probably find -exec .. {} +) to fail
+       because execve() returns E2BIG, which we should avoid
+
+       * xargs/testsuite/inputs/16383-ys.xi,
+       xargs/testsuite/inputs/32767-ys.xi,
+       xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp,
+       xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.xo,
+       xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp,
+       xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.xo: New file.
+
+       * po/be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, et.po, fi.po,
+       findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, it.po,
+       ja.po, ko.po, lg.po, ms.po, nl.po, pl.po, pt.po, pt_BR.po, ro.po,
+       ru.po, rw.po, sk.po, sl.po, sr.po, sv.po, tr.po, vi.po, zh_CN.po,
+       zh_TW.po: Updated Portuguese .po file and did update-po
+
+2005-11-18  Jim Meyering  <jim@meyering.net> (tiny change)
+
+       * lib/buildcmd.c (bc_push_arg): When exec'ing, don't exceed
+       Linux's limit on the maximum number of command line arguments.
+
+2005-11-11  James Youngman  <jay@gnu.org>
+
+       * NEWS, find/find.c, find/fstype.c: Savannah bug #14922: if we need the
+       list of mounted filesystems but it is not available, exit fatally
+       with a message.  If it is not available but we don't need it,
+       there is no need for an error.
+
+       * po/ro.po, ru.po, rw.po, sk.po, sl.po, sr.po, sv.po, tr.po, vi.po,
+       zh_CN.po, zh_TW.po, ko.po, lg.po, ms.po, nl.po, pl.po, pt.po,
+       pt_BR.po, be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, et.po,
+       fi.po, findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po,
+       it.po, ja.po: Updated Polish translation
+
+2005-10-31  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi:
+       Removed redundant additional description of "--regextype".
+
+2005-10-08  James Youngman  <jay@gnu.org>
+
+       * find/find.c, lib/regextype.c: Fixed Savannah bug #14616, which
+       was that c99 code had crept in and it didn't compile on c89
+       compilers
+
+       * doc/find.texi: Savannah patch #4371 from Andreas Metzler; the
+       argument of -I is mandatory
+
+2005-09-21  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.1, xargs/xargs.c: Clarified the -E option
+
+2005-09-20  James Youngman  <jay@gnu.org>
+
+       * NEWS, configure.in, doc/find.texi, xargs/xargs.1, xargs/xargs.c:
+       Documentation clarification: -L and -I take a mandatory argument;
+       -l and -i do not
+
+2005-09-17  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.c:
+       Fixed Savannah bug #14550 - if environment is too large to allow
+       exec() to work, we cannot even use "xargs --help".
+
+       * find/find.1:
+       Avoid the use of -perm +mode, using -perm /mode instead.  From comment
+       by Andreas Metzler (though I didn't read the patch).
+
+       * ChangeLog, doc/find.texi, find/find.1, xargs/xargs.1:
+       Typo fix from A Costa (tiny change)
+
+       * NEWS: Corrections for find manual page - symbolic permissions.
+
+       * find/find.1:
+       Corrected an inaccuracy in the EXAMPLES section - in symbolic modes,
+       'o' stands for 'others' and 'u' stands for 'user' (i.e. the owner).
+
+2005-09-17  A Costa <agcosta@gis.net>  (tiny change)
+
+       docs/find.texi: Fixed typo
+       find/find.1: Fixed typo
+       xargs/xargs.1: Fixed typo
+
+2005-09-17  James Youngman  <jay@gnu.org>
+
+       * NEWS: Corrections for find manual page - symbolic permissions.
+
+       * find/find.1:
+       Corrected an inaccuracy in the EXAMPLES section - in symbolic modes,
+       'o' stands for 'others' and 'u' stands for 'user' (i.e. the owner).
+
+2005-09-06  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.c: Typo in "IEEE" in a comment.
+
+2005-09-04  James Youngman  <jay@gnu.org>
+
+       * find/defs.h, find/find.c, find/parser.c, find/pred.c,
+       Work around compilation failure with GCC 4 and AIX 5.1, in which
+       open is #defined to open64
+
+       * po/be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, et.po, fi.po,
+       findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, it.po,
+       ja.po, ko.po, lg.po, ms.po, nl.po, pl.po, pt.po, pt_BR.po, ro.po,
+       ru.po, rw.po, sk.po, sl.po, sr.po, sv.po, tr.po, vi.po, zh_CN.po,
+       zh_TW.po: Work around compilation failure with GCC 4 and AIX 5.1,
+       in which open is #defined to open64
+
+2005-09-03  James Youngman  <jay@gnu.org>
+
+       * find/testsuite/find.gnu/quit.exp: Fixed Savannah bug#14390, by
+       avoiding an accidental assumption in quit.exp that directory
+       entries are returned by readir() in any particular order
+
+       * NEWS, configure.in, doc/find.texi, xargs/testsuite/Makefile.am,
+       xargs/testsuite/inputs/helloworld.xi,
+       xargs/testsuite/xargs.gnu/delim-o.exp,
+       xargs/testsuite/xargs.gnu/delim-o.xo, xargs/xargs.1,
+       xargs/xargs.c: Added the --delimiter option to xargs, resolving
+       Savannah support request sr #102914
+
+       * ChangeLog, NEWS, configure.in: Released findutils-4.2.25
+
+       * po/sr.po, sv.po, tr.po, vi.po, zh_CN.po, zh_TW.po, sl.po, be.po,
+       ca.po, da.po, de.po, el.po, eo.po, es.po, et.po, fi.po,
+       findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, it.po,
+       ja.po, ko.po, lg.po, ms.po, nl.po, pl.po, pt.po, pt_BR.po, ro.po,
+       ru.po, rw.po, sk.po: Did update-po
+
+2005-09-02  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi, find/find.1:
+       Improved documentation in response to Savannah bug #14376
+
+2005-09-01  James Youngman  <jay@gnu.org>
+
+       * po/ChangeLog, ChangeLog: Updated with recent changes.
+
+       * locate/locate.c: Removed unused struct stringbuf.soffs.
+
+       * doc/find.texi: Typo fix from Jim Meyering (tiny change)
+
+2005-09-01  Jim Meyering  <jim@meyering.net>
+
+       * locate/locate.c (struct stringbuf) [soffs]: Remove unused member.
+       (locate): Remove initialization, too.
+
+2005-09-01  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi: Typo fix from Jim Meyering (tiny change)
+
+2005-08-30  James Youngman  <jay@gnu.org>
+
+       * find/defs.h, find/find.c, find/fstype.c, find/pred.c:
+       Attempted fix for compilation when AFS is #defined
+
+2005-08-24  James Youngman  <jay@gnu.org>
+
+       * po/sl.po: Updated from Translation Project
+
+2005-08-13  James Youngman  <jay@gnu.org>
+
+       * find/find.1: Remind the user to quote the pattern argument to -iname.
+
+2005-08-12  James Youngman  <jay@gnu.org>
+
+       * NEWS: Corrected typo.
+
+2005-08-11  James Youngman  <jay@gnu.org>
+
+       * po/fr.po: Updated French translation and added new PO file zh_TW.po
+       for Chinese (traditional)
+
+2005-08-09  James Youngman  <jay@gnu.org>
+
+       * NEWS: Indicate that regexprops.texi is built on Cygin now that
+       Savannah bug #14025 has been fixed.
+
+       * lib/Makefile.am, lib/regexprops.c: Fixed compilation failure on
+       Cygwin - Savannah Bug #14025 (tiny change, three lines), reported
+       and fixed by Eric Blake
+
+       * find/testsuite/Makefile.am,
+       find/testsuite/find.posix/sv-bug-14070.exp,
+       find/testsuite/find.posix/sv-bug-14070.xo: Added new test case for
+       SourceForge bug #14070
+
+       * find/testsuite/find.posix/sv-bug-14070.exp,
+       find/testsuite/find.posix/sv-bug-14070.xo: New file.
+
+       * find/defs.h, find/ftsfind.c, find/pred.c, find/util.c:
+       Ensure we can still build with --enable-debug
+
+       * find/testsuite/config/unix.exp,
+       find/testsuite/find.gnu/execdir-one.exp,
+       find/testsuite/find.gnu/execdir-root-only.exp,
+       find/testsuite/find.gnu/sv-bug-12230.exp: If . is on $PATH,
+       indicate that the -execdir tests cannot be carried out, as opposed
+       to indicating that those tests fail
+
+2005-08-07  James Youngman  <jay@gnu.org>
+
+       * NEWS: Indicated that some test suite files have been renamed.
+
+       * xargs/testsuite/Makefile.am, xargs/testsuite/inputs/eof.xi,
+       xargs/testsuite/inputs/eof1.xi,
+       xargs/testsuite/xargs.sysv/eof.exp,
+       xargs/testsuite/xargs.sysv/eof.xo,
+       xargs/testsuite/xargs.sysv/eof1.exp,
+       xargs/testsuite/xargs.sysv/eof1.xo,
+       xargs/testsuite/xargs.posix/lc_l2.exp,
+       xargs/testsuite/xargs.posix/lc_l2.xo,
+       xargs/testsuite/xargs.sysv/l2.exp,
+       xargs/testsuite/xargs.sysv/l2.xo,
+       xargs/testsuite/xargs.sysv/lc_l2.exp,
+       xargs/testsuite/xargs.sysv/lc_l2.xo,
+       xargs/testsuite/xargs.posix/L2.exp,
+       xargs/testsuite/xargs.posix/l2.exp,
+       xargs/testsuite/xargs.posix/L2.xo,
+       xargs/testsuite/xargs.posix/l2.xo,
+       xargs/testsuite/xargs.posix/uc_L2.exp,
+       xargs/testsuite/xargs.posix/uc_L2.xo: Work around problems with
+       CVS clients on case-insentitive operating systems
+
+       * debian/Changelog: Removed Changelog file since changelog is the
+       one we should be using and having both files upsets Cygwin
+       systems which cannot tell the dirrerence between changelog and
+       Changelog
+
+       * find/ftsfind.c:
+       If DEBUG is defined, show the symbolic names fro fts_info values.
+
+       * find/ftsfind.c: Added additional diagnostics.
+
+2005-08-02  James Youngman  <jay@gnu.org>
+
+       * po/tr.po, vi.po:
+       Updated Vietnamese and Turkish translations from Translation Project
+
+       * po/sl.po, sr.po, sv.po, tr.po, vi.po, zh_CN.po, be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, fi.po, findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, it.po, ja.po, ko.po, lg.po, ms.po, pl.po, pt.po, pt_BR.po, ru.po, rw.po:
+       Did update-po
+
+       * po/et.po, sk.po, ro.po:
+       Updated Romanian, Slovak and Estonian translations from Translation Project
+
+2005-08-01  James Youngman  <jay@gnu.org>
+
+       * ABOUT-NLS, INSTALL, Makefile.am, configure.in, depcomp,
+       doc/texinfo.tex, install-sh, missing, mkinstalldirs: By adding the
+       missing AM_GNU_GETTEXT_VERSION call, allowed autopoint to update
+       those files of which it has updated copies.
+
+       * po/Makevars.template, po/Makefile.in.in, po/findutils.pot:
+       Using AM_GNU_GETTEXT_VERSION, allowed gettext to update the infrastructure
+
+       * po/Rules-quot, po/boldquot.sed, po/en@boldquot.header, po/en@quot.header, po/insert-header.sin, po/quot.sed:
+       Files added by autopoint now that we are using AM_GNU_GETTEXT_VERSION
+
+       * find/testsuite/Makefile.am: Added find.gnu./perm-slash.{exp,xo}.
+
+       * po/nl.po: Updated Dutch translation from Translation Project
+
+       * po/ga.po: Updated Irish translation from the Translation Project
+
+       * po/da.po: Updated Danish translation from the Translation Project
+
+       * po/ca.po: Updated Catalan translation from Translation Project
+
+2005-07-31  James Youngman  <jay@gnu.org>
+
+       * find/testsuite/excuses.txt: We now have tests for -perm.
+
+       * NEWS, configure.in, find/parser.c,
+       find/testsuite/find.gnu/perm-slash.exp,
+       find/testsuite/find.gnu/perm-slash.xo: Fixed bug which caused find
+       -perm /440 to be treated the same as find -perm 440
+
+       * find/testsuite/Makefile.am:
+       Generic tests for -perm -NNN and -perm NNN
+
+       * find/testsuite/excuses.txt: New file - list of test cases that
+       still need to be written, along with excuses why they haven't been
+       done yet
+
+       * find/testsuite/find.posix/perm-vanilla.exp,
+       find/testsuite/find.posix/perm-vanilla.xo: Generic tests for -perm
+       -NNN and -perm NNN
+
+       * find/testsuite/find.gnu/inum.exp:
+       Ensure that the test would fail if -inum just always returned true
+
+       * find/testsuite/Makefile.am, find/testsuite/find.gnu/ilname.exp,
+       find/testsuite/find.gnu/ilname.xo,
+       find/testsuite/find.gnu/inum.exp, find/testsuite/find.gnu/inum.xo,
+       find/testsuite/find.gnu/lname.exp,
+       find/testsuite/find.gnu/lname.xo,
+       find/testsuite/find.gnu/xtype.exp,
+       find/testsuite/find.gnu/xtype.xo,
+       find/testsuite/find.posix/links.exp,
+       find/testsuite/find.posix/links.xo: New test cases for -ilname,
+       -inum, -lname, -xtype
+
+       * find/testsuite/Makefile.am, find/testsuite/find.gnu/delete.exp,
+       find/testsuite/find.gnu/delete.xo,
+       find/testsuite/find.gnu/iregex1.exp,
+       find/testsuite/find.gnu/iregex1.xo,
+       find/testsuite/find.gnu/regex1.exp,
+       find/testsuite/find.gnu/regex1.xo,
+       find/testsuite/find.gnu/regex2.exp,
+       find/testsuite/find.gnu/regex2.xo,
+       find/testsuite/find.gnu/samefile-copy.exp,
+       find/testsuite/find.gnu/samefile-copy.xo,
+       find/testsuite/find.gnu/samefile-link.exp,
+       find/testsuite/find.gnu/samefile-link.xo,
+       find/testsuite/find.gnu/samefile-same.exp,
+       find/testsuite/find.gnu/samefile-same.xo,
+       find/testsuite/find.gnu/samefile-symlink.exp,
+       find/testsuite/find.gnu/samefile-symlink.xo: Further test cases
+
+       * find/find.1: Indicate that -delete implies -depth (find.texi
+       already mentioned this).
+
+       * find/testsuite/Makefile.am:
+       Brought the list of .exp and .xo files in Makefile.am into sync with
+       the actual contents of the CVS repository.
+
+       * find/testsuite/Makefile.am, find/testsuite/find.gnu/depth-d.exp,
+       find/testsuite/find.gnu/depth-d.xo,
+       find/testsuite/find.gnu/empty.exp,
+       find/testsuite/find.gnu/empty.xo,
+       find/testsuite/find.gnu/execdir-one.exp,
+       find/testsuite/find.gnu/execdir-one.xo,
+       find/testsuite/find.gnu/false.exp,
+       find/testsuite/find.gnu/false.xo,
+       find/testsuite/find.gnu/follow-basic.exp,
+       find/testsuite/find.gnu/follow-basic.xo,
+       find/testsuite/find.gnu/gnu-or.exp,
+       find/testsuite/find.gnu/gnu-or.xo,
+       find/testsuite/find.gnu/gnuand.exp,
+       find/testsuite/find.gnu/gnuand.xo,
+       find/testsuite/find.gnu/gnunot.exp,
+       find/testsuite/find.gnu/gnunot.xo,
+       find/testsuite/find.gnu/iname.exp,
+       find/testsuite/find.gnu/iname.xo,
+       find/testsuite/find.gnu/ipath.exp,
+       find/testsuite/find.gnu/ipath.xo,
+       find/testsuite/find.gnu/iwholename.exp,
+       find/testsuite/find.gnu/iwholename.xo,
+       find/testsuite/find.gnu/path.exp, find/testsuite/find.gnu/path.xo,
+       find/testsuite/find.gnu/print0.exp,
+       find/testsuite/find.gnu/print0.xo,
+       find/testsuite/find.gnu/quit.exp, find/testsuite/find.gnu/quit.xo,
+       find/testsuite/find.gnu/true.exp, find/testsuite/find.gnu/true.xo,
+       find/testsuite/find.gnu/wholename.exp,
+       find/testsuite/find.gnu/wholename.xo,
+       find/testsuite/find.posix/and.exp,
+       find/testsuite/find.posix/and.xo,
+       find/testsuite/find.posix/exec-one.exp,
+       find/testsuite/find.posix/exec-one.xo,
+       find/testsuite/find.posix/grouping.exp,
+       find/testsuite/find.posix/grouping.xo,
+       find/testsuite/find.posix/name.exp,
+       find/testsuite/find.posix/name.xo,
+       find/testsuite/find.posix/posixnot.exp,
+       find/testsuite/find.posix/posixnot.xo,
+       find/testsuite/find.posix/prune.exp,
+       find/testsuite/find.posix/prune.xo: Added new test cases for many
+       of the actions and tests of find
+
+       * find/find.c (default_prints):
+       not a static function, so do not declare it as one.
+
+       * m4/withfts.m4: Fixed underquoted definition of FIND_WITH_FTS.
+       [this change is currently on a branch only]
+
+2005-07-30  James Youngman  <jay@gnu.org>
+
+       * find/finddata.c, find/ftsfind.c, find/parser.c, find/pred.c,
+       find/util.c, m4/Makefile.am, m4/withfts.m4: Initial attempt to
+       convert find to use gnulib's fts()
+       [this change is currently on a branch only]
+
+       * find/finddata.c, find/ftsfind.c, m4/withfts.m4: New file.
+       [this change is currently on a branch only]
+
+       * NEWS, configure.in, find/Makefile.am, find/defs.h, find/find.c,
+       import-gnulib.sh: Initial attempt to convert find to use gnulib's
+       fts() [this change is currently on a branch only]
+
+2005-07-29  James Youngman  <jay@gnu.org>
+
+       * NEWS, configure.in
+       Prepared for the release of findutils-4.2.24
+
+       * ChangeLog: Updated with recent changes.
+
+       * NEWS, find/find.1, doc/find.texi:
+       Indicate that -ok and -okdir redirect stdin from /dev/null.
+
+       * NEWS: Explain the directory link count change more throroughly.
+
+       * NEWS: Fixed bug #13973.
+
+       * find/pred.c (pred_fprintf): Fix Savannah bug #13973: Modify the
+       handling of -printf %Y so that it no longer modifies stat_buf
+
+       * find/testsuite/find.gnu/printf-symlink.exp,
+       find/testsuite/find.gnu/printf-symlink.xo: Detect Savannah bug
+       #13973: pollution of stat_buf by the %Y directive (trivial change
+       from Andreas Metzler)
+
+       * INSTALL, depcomp, doc/texinfo.tex, install-sh, missing, mkinstalldirs:
+       Updated auxilliary files from the automake-1.9 distribution
+
+       * configure.in:
+       Introduce new Automake conditional, CROSS_COMPILING, true when we are corss compiling
+
+       * find/find.c:
+       If we decline to follow a symbolic link due to the safety check, issue a more self-explanatory warning message
+
+       * lib/Makefile.am: Don't build regexprops if we are cross compiling
+
+       * doc/Makefile.am:
+       Depend on the regex.h file rather than the 'regexprops' binary,
+       because the header file will always exist even if we are doing "make
+       dist".  Otherwise "make distcheck" fails because it tries to rebuild
+       find.info while the source-directory is read-only.
+
+2005-07-28  James Youngman  <jay@gnu.org>
+
+       * find/find.1:
+       Say "other users" rather than "rest of the world" when talking about
+       Unix permissions.  Fixes Savannah bug #4246.
+
+2005-07-27  James Youngman  <jay@gnu.org>
+
+       * xargs/testsuite/Makefile.am: Added new test case 'childfail.exp'.
+
+       * doc/find.texi:
+       Updated the description of the safe-dir-change operation to reflect
+       what find now does on systems that lack O_NOFOLLOW.
+
+       * NEWS, find/parser.c: Indicate in the output of find --version if
+       the leaf optimisation is enabled or not
+
+       * find/find.c: Fixed typo.
+
+       * find/find.c: If the link count of a directory starts off less
+       than two, disable the leaf optimisation for this directory.
+
+2005-07-26  James Youngman  <jay@gnu.org>
+
+       * lib/regexprops.c: Further small corrections from Karl.
+
+       * doc/find.texi:
+       Reordered the sections in the manual to put the "Common Tasks" and
+       "Worked Examples" chapters together.
+
+       * configure.in, find/find.c: Allow the leaf optimisation to be
+       disabled by default with the configure option
+       --disable-leaf-optimisation
+
+       * find/find.c: Removed old code for antuqie version of savedir().
+
+       * lib/regextype.c: Put the syntaxes in alphabetical order.
+
+       * lib/regexprops.c: Karl made some more readability suggestions.
+
+2005-07-24  James Youngman  <jay@gnu.org>
+
+       * doc/Makefile.am: If the regexprops program has changed we should
+       re-run it, since it will probably now produce different output
+
+       * lib/regextype.h:
+       Allow the caller to detect if one regex type is identical to another.
+
+       * configure.in:
+       Define the preprocessor macro FINDUTILS for that code int he lib/
+       directory can be slightly more reusable.
+
+       * lib/regextype.c:
+       Allow the caller to detect if one regex type is identical to another.
+
+       * lib/regexprops.c:
+       Made Texinfo style corrections suggested by Karl Berry.
+
+2005-07-22  James Youngman  <jay@gnu.org>
+
+       * xargs/testsuite/xargs.posix/childfail.exp, xargs/xargs.c: Fix
+       Savannah bug #13878, in which xargs deals incorrectly with child
+       failure, returning 0 when it should return 123
+
+2005-07-17  James Youngman  <jay@gnu.org>
+
+       * find/find.1: (tiny change) Corrections by Greg Wooledge
+
+2005-07-16  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi: Updates following comments by Dave Gilbert.
+
+       * NEWS: Corrected a typo.
+
+       * doc/find.texi:
+       Added in the example about updating an aggregate timestamp file.
+
+2005-07-15  James Youngman  <jay@gnu.org>
+
+       * po/da.po: Updated Danish translation from translation project
+
+2005-07-14  James Youngman  <jay@gnu.org>
+
+       * NEWS, doc/Makefile.am, doc/find.texi, lib/Makefile.am,
+       lib/regexprops.c, lib/regextype.c, lib/regextype.h: Added
+       --regextype and -regextype options to locate and find
+       respectively, and documented these
+
+       * doc/find.texi: We use GNU Emacs regexps by default now.
+
+       * doc/find.texi:
+       We require GNU sort in order for locate to handle newlines correctly,
+       not just GNU find.
+
+2005-07-10  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi:
+       Applied several documentation improvement patches from Aaron Hawley
+
+       * ChangeLog, NEWS: Updated with recent changes.
+
+       * NEWS: Recent gnulib changed have fixed -iregex
+
+       * doc/find.texi, xargs/xargs.1:
+       Tiny patch from Andreas Metzler: xargs -I is like xargs -i, but the latter is deprecated
+
+2005-07-06  James Youngman  <jay@gnu.org>
+
+       * find/defs.h, find/find.c, find/parser.c, find/pred.c:
+       Fixed Savannah bug #13650; programs run by -exec cannot read stdin
+
+2005-07-04  James Youngman  <jay@gnu.org>
+
+       * NEWS: *** empty log message ***
+
+       * doc/find.texi:
+       Added a "Worked Examples" section.   It currently only contains a
+       (long) example about deleting files.
+
+       * .cvsignore: Some extra stuff to ignore.
+
+2005-07-03  James Youngman  <jay@gnu.org>
+
+       * find/Makefile.am: Don't need regexprops.c really...
+
+       * lib/regextype.c, lib/regextype.h:
+       New files for selecting regex type based on a keyword
+
+       * locate/locate.1: Documented the fact that we now use Emacs-style
+       regexps, not POSIX EREs, for compatibility with find -regex.
+
+       * lib/Makefile.am, locate/locate.c, doc/find.texi,
+       find/Makefile.am, find/defs.h, find/find.1, find/find.c,
+       find/parser.c: Fixed Savannah bug #13495: find now uses
+       Emacs-style regexps by default
+
+2005-07-02  James Youngman  <jay@gnu.org>
+
+       * configure.in, find/defs.h, find/fstype.c, find/parser.c,
+       intl/dcigettext.c, lib/buildcmd.c, lib/listfile.c,
+       lib/savedirinfo.c, locate/locate.c, xargs/xargs.c: Assume unistd.h
+       is present - avoid using HAVE_UNISTD_H
+
+2005-07-01  Jim Meyering  <jim@meyering.net>
+
+       With `-fprint F' or `-fprintf F', don't write diagnostics
+       to F when stderr is closed.
+
+       * find/parser.c: Include "stdio-safer.h".
+       (open_output_file): Use fopen_safer, not fopen.
+       * import-gnulib.sh (findutils_modules): Add stdio-safer.
+
+2005-07-01  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi:
+       Aaron pointed out a potentially-confusing sentence.  I fixed it.
+
+       * find/defs.h, find/find.1, find/find.c, find/parser.c,
+       find/pred.c, find/util.c: Allow consistency-checking of the
+       predicates, checking for example that actions all have side
+       effects
+
+2005-06-29  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi: Applied patch from Aaron Hawley (Savannah patch
+       #3751: Typos and small suggestions to find.texi)
+
+2005-06-27  James Youngman  <jay@gnu.org>
+
+       * ChangeLog, locate/locate.c: Applied patch from Bas Van Gompel to
+       move match counting into a (new) visitor function
+
+       * NEWS, configure.in: No longer 4.2.23, as we're moving on now
+
+2005-06-24  Bas van Gompel  <patch-findutils.buzz@bavag.tmfweb.nl>
+
+       * locate/locate.c (visit_count, visit_limit): New functions.
+       (locate): Use visit_limit or visit_count. Simplify main loop.
+       (main) Bail out early when limit is reached.
+
+2005-06-20  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.c:
+       Removed some code which had already been disabled via the preprocessor.
+
+2005-06-19  Dmitry V. Levin <ldv@altlinux.org>
+
+       * lib/savedirinfo.c: Fix two compilation warnings (which would
+       prevent compilation if "-Wall -Werror" is in effect).
+
+2005-06-19  James Youngman  <jay@gnu.org>
+
+       * ChangeLog: Indicate that we made (are making) a release.
+
+       * ChangeLog, NEWS, configure.in: Preparing to release 4.2.23
+
+       * doc/find.texi: Fixed Texinfo syntax error in previous change
+
+       * doc/find.texi, xargs/xargs.1:
+       Document the fact that the -i and -L options are currently
+       incompatible (Savannah bug 13041).
+
+       * locate/updatedb.1, locate/updatedb.sh: Fix Savannah bug 13411 -
+       reject trailing slashes in updatedb's --prunepaths, bacsue these
+       will never be matched
+
+       * NEWS: Released findutils-4.2.23.
+
+       * doc/find.texi, xargs/xargs.1:
+       Document the fact that the -i and -L options are currently
+       incompatible (Savannah bug 13041).
+
+       * locate/updatedb.1, locate/updatedb.sh: Fix Savannah bug 13411 -
+       reject trailing slashes in updatedb's --prunepaths, because these
+       will never be matched.
+
+2005-06-18  James Youngman  <jay@gnu.org>
+
+       * po/ga.po, tr.po: Updated Irish and Turkish translations.
+
+       * po/pl.po: Did update-po
+
+       * po/pl.po:
+       Updated Polish translation file from the Translation Project
+
+       * po/ca.po, da.po, de.po, el.po, eo.po, es.po, et.po, fi.po, findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, it.po, ja.po, ko.po, lg.po, ms.po, nl.po, pl.po, pt.po, pt_BR.po, ro.po, ru.po, rw.po, sk.po, sl.po, sr.po, sv.po, tr.po, vi.po, zh_CN.po, be.po:
+       Did update-po
+
+2005-06-18  Martin Buchholz (tiny change)
+
+       * find/defs.h, find/find.c, find/parser.c, doc/find.texi: Fix
+       typos/spelling errors (mostly in source code comments).
+
+2005-06-18  Dmitry V. Levin  <ldv@altlinux.org>
+
+       Additional documentation tweaks for -execdir/-okdir actions.
+       * find/parser.c (parse_help): Mention -execdir and -ordir options.
+       * doc/find.texi, find/find.1: Additionally document new options.
+
+2005-06-12  Bas van Gompel  <patch-findutils.buzz@bavag.tmfweb.nl>
+
+       * locate/locate.c: Implement --all (-A).
+
+       * NEWS, doc/find.texi, locate/locate.1: Document locate --all (-A)
+
+2005-06-12  James Youngman  <jay@gnu.org>
+
+       * find/find.c, NEWS:
+       Savannah bug #13381 (Debian bug 313081): if we have O_NOFOLLOW,
+       safely_chdir() does not need to call stat().  However, process_dir()
+       used to rely on using that stat information.  To work around this
+       problem, there is now an output parameter in safely_chdir() which
+       indicates if the stat buffer is valid.
+       This bug has possible security implications.
+
+       * find/find.1, doc/find.texi:
+       Applied patch from Andreas Metzler, improving the wording for the
+       documentation of the %k and %b format directives.  This patch does
+       not require a copyright assignment as it consists of several
+       copies of the same small wording change.
+
+2005-06-11  James Youngman  <jay@gnu.org>
+
+       * find/find.1: Corrected spelling error 'writeable' to 'writable'.
+
+       * find/find.1, locate/locate.1:
+       Fixed Savannah bug #13363, typos in manpages (tiny change)
+
+2005-06-10  James Youngman  <jay@gnu.org>
+
+       * find/find.c, lib/savedirinfo.c, lib/savedirinfo.h: Switch to a
+       new scheme for saving directory entry data which is extensible to
+       allow additional data to be saved.
+
+2005-06-09  James Youngman  <jay@gnu.org>
+
+       * locate/testsuite/config/unix.exp:
+       Use the new normalize_dir procedure throughout.
+
+       * locate/testsuite/config/unix.exp: Move the normalisation into a
+       procedure.  Don't rely on the "file normalize" command being
+       available (it's new in Tcl 8.4).
+
+2005-06-08  James Youngman  <jay@gnu.org>
+
+       * ChangeLog, NEWS, configure.in: Updated for recent changes
+
+       * doc/find.texi:
+       Explain that you should put the argument of -name in quotes.
+
+       * find/find.1:
+       Added a new "NON-BUGS" section pointing out things that look like bugs
+       but are caused by mistakes or misunderstandings.
+
+       * doc/find.texi, locate/locate.1: Applied Bas van Gompel's patch
+       which allows the database to be read from stdin.
+
+       * locate/locate.c:
+       Read the database in by using the "visitor" pattern.  Modified file
+       header comment to indicate that we no longer use the efficient
+       algorith described in ;login:.  Emit an error message if the
+       LOCATE_PATH variable implies that we should read stdin twice.
+       Most of this code is from Bas van Gompel.
+
+       * AUTHORS: Credit Bas van Gompel for his work on locate.
+
+       * lib/printquoted.h: Appled patch from Bas - fixing compiler warning.
+
+2005-06-07  James Youngman  <jay@gnu.org>
+
+       * ChangeLog, NEWS, configure.in: Updates prior to release
+
+       * config.rpath: Added file required for 'make dist'
+
+       * po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po,
+       po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po,
+       po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po,
+       po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po,
+       po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po,
+       po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po:
+       updated the po files for release
+
+       * xargs/testsuite/Makefile.am:
+       Added in all the test files from Dmitry V. Levin.
+
+2005-06-08  Bas van Gompel  <patch-findutils.buzz@bavag.tmfweb.nl>
+
+       * NEWS, locate/locate.1, doc/find.texi: Document usage of `-'
+       to refer to stdin in database-path for locate.
+       * locate/locate.c: Change prototype for visitors and processors
+       throughout. Move reading the database and generating base_name
+       into visitors. Allow `-' to refer to stdin in database-path.
+
+       * lib/printquoted.h: Include stdio.h.
+
+2005-06-07  James Youngman  <jay@gnu.org>
+
+       * COPYING, debian/copyright, depcomp, doc/texinfo.tex,
+       find/defs.h, find/find.c, find/fstype.c, find/parser.c,
+       find/pred.c, find/testsuite/config/unix.exp, find/tree.c,
+       find/util.c, import-gnulib.sh, intl/Makefile.in,
+       intl/bindtextdom.c, intl/config.charset, intl/dcgettext.c,
+       intl/dcigettext.c, intl/dcngettext.c, intl/dgettext.c,
+       intl/dngettext.c, intl/explodename.c, intl/finddomain.c,
+       intl/gettext.c, intl/gettext.h, intl/gettextP.h,
+       intl/hash-string.h, intl/intl-compat.c, intl/l10nflist.c,
+       intl/libgettext.h, intl/libgnuintl.h, intl/loadinfo.h,
+       intl/loadmsgcat.c, intl/localcharset.c, intl/locale.alias,
+       intl/localealias.c, intl/ngettext.c, intl/plural.c, intl/plural.y,
+       intl/ref-add.sin, intl/ref-del.sin, intl/textdomain.c,
+       lib/buildcmd.c, lib/buildcmd.h, lib/extendbuf.c, lib/extendbuf.h,
+       lib/forcefindlib.c, lib/listfile.c, lib/listfile.h,
+       lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
+       lib/printquoted.h, lib/qmark.c, lib/savedirinfo.c,
+       lib/savedirinfo.h, lib/strspn.c, lib/wait.h, lib/waitpid.c,
+       locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c,
+       locate/locatedb.h, locate/testsuite/config/unix.exp,
+       locate/updatedb.sh, missing, po/fetch-po-files,
+       xargs/testsuite/config/unix.exp, xargs/xargs.c:
+       Updated the FSF's postal address
+
+       * ChangeLog: Corrected Bas's email address.
+
+       * locate/locate.c: Updated copyright years.
+
+2005-06-07  Bas van Gompel  <patch-findutils.buzz@bavag.tmfweb.nl>
+
+        * locate/locate.c: Fold case once, only when needed.
+
+2005-06-07  James Youngman  <jay@gnu.org>
+
+       * NEWS: Updated with recent changes.
+
+       * mdate-sh: Use the mdate-sh from automake
+
+       * find/parser.c, find/pred.c, find/tree.c, find/util.c,
+       lib/Makefile.am, lib/forcefindlib.c, lib/listfile.c,
+       lib/listfile.h, locate/code.c, locate/locate.c, find/defs.h,
+       find/find.c: Fix Savannah bug #13324: Fix compiler warnings for
+       GCC-3.4
+
+       * locate/locate.c:
+       Fixed Savannah bug #13325: Quoting of output filenames in locate
+       should match find.
+
+       * find/parser.c:
+       Fixed Savannah bug #13319: C9X-ism in parser.c (declaration after
+       statements).
+
+       * find/pred.c, lib/Makefile.am, lib/listfile.c, lib/nextelem.c,
+       lib/printquoted.c, lib/printquoted.h, lib/qmark.c, NEWS,
+       doc/find.texi, find/defs.h, find/find.1, find/parser.c: Fixed
+       Savannah bug #13303, find should filter out non-printable
+       characters if outputting to tty
+
+2005-05-30  James Youngman  <jay@gnu.org>
+
+       * locate/locate.c: rename new_locate() to locate() since
+         old_locate() has gone the way of the dodo.
+
+2005-05-29  Bas van Gompel  <patch-findutils.buzz@bavag.tmfweb.nl>
+
+       Add a ``--print'' (``-p'') option. (to cancel side-effects of -c/-S)
+       Allow ``--statistics'' in combination with non-options.
+       * doc/find.texi: Add documentation for locate --print (-p), and the
+       use of non-options with --statistics.
+       * locate/locate.1: ditto.
+       * locate/locate.c: Read each database only once.
+
+2005-05-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Adjust to recent gnulib changes.
+       * import-gnulib.sh: Get config.rpath from gnulib/build-aux,
+       not gnulib/config.
+       * find/parser.c (parse_perm): Ignore umask when parsing
+       symbolic permissions.  Adjust to new modechange API.
+
+2005-05-16  James Youngman  <jay@gnu.org>
+
+       * find/find.c, find/parser.c, find/pred.c, find/tree.c:
+       Trivial change: don't use i18n support for debug-only messages
+
+       * ChangeLog: Added ChangeLog entry crediting Dmitry
+
+2005-05-09  James Youngman  <jay@gnu.org>
+
+       * find/parser.c:
+       The previous change fixed Savannah bug #12999.  This change doesn't do
+       anything, it's only intended to be a place to record the Savannah bug
+       ID we've just fixed.
+
+       * find/parser.c:
+       Oops.  Initialise the variable which indicates which regex syntax to
+       use.  We use POSIX basic regular expressions.
+
+       * find/parser.c:
+       Suggestion by Ed Avis: point out that "-name foo/bar" will almost
+       always evaluate to false.   Suggest to the user what alternatives they
+       might find useful.
+
+2005-05-02  James Youngman  <jay@gnu.org>
+
+       * AUTHORS:
+       Added Dimitry (his new test suite contribution required a copyright
+       assignment).
+
+2005-05-03  Dmitry V. Levin
+
+       * Added xargs test suite tests by Dmitry V. Levin, together with
+         bugfixes which ensure that the tests pass.
+
+2005-04-18  James Youngman  <jay@gnu.org>
+
+       * Added test suite tests for Bas van Gompel's changes.
+
+2005-04-18  Bas van Gompel  <patch-findutils.buzz@bavag.tmfweb.nl>
+
+       * doc/find.texi: Document locate --non-existing (-E).
+       * locate/locate.1: Ditto.
+       * locate/locate.c: Implement --non-existing (-E).
+
+2005-04-04  James Youngman  <jay@gnu.org>
+
+       * configure.in, import-gnulib.sh:
+       We no longer need gnulib/m4/Makefile.am
+
+       * po/vi.po: Updated Vietnamese translation
+
+       * locate/updatedb.sh:
+       Savannah bug #12491: Only use the "-s" option to "su" if it is
+       supported.
+
+2005-04-01  James Youngman  <jay@gnu.org>
+
+       * locate/locate.1, locate/updatedb.1, xargs/xargs.1: Trivial
+       change from A Costa <agcosta@gis.net>, fixing typos in manual
+       pages for xargs, locate and updatedb; fixes Savannah bug #12500,
+       Debian bug #301934
+
+2005-03-22  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.sh: Include the new gnulib module stat-macros
+
+       * configure.in:
+       CVS code is (will shortly be) no longer identical to the 4.2.20 release
+
+2005-03-17  James Youngman  <jay@gnu.org>
+
+       * configure.in: Preprare for release of 4.2.20.
+
+       * NEWS: Updated prior to release of 4.2.20.
+
+       * ChangeLog: Updated with recent changes.
+
+       * THANKS: Thank Bas van Gompel, but only once.
+
+       * THANKS: Thank Bas van Gompel and Aaron S. Hawley.
+
+       * po/vi.po: Updated Vietnamese PO file
+
+2005-03-10  James Youngman  <jay@gnu.org>
+
+       * po/nl.po: Updated Dutch PO file
+
+2005-03-08  Bas van Gompel  <patch-findutils.buzz@bavag.tmfweb.nl>
+
+       * import-gnulib.sh: Re-enable creation of gnulib/m4/Makefile.am.
+
+2005-03-07  James Youngman  <jay@gnu.org>
+
+       * Released findutils-4.2.19.
+
+       * find/testsuite/find.posix/sizes.exp:
+       Use 2>/dev/null instead of 2>&1, because Tcl understands the former
+       but not the latter.
+
+       * find/testsuite/Makefile.am: Also distribute sv-bug-12181.xo.
+
+       * find/testsuite/Makefile.am: Distribute sv-bug-12181.
+
+       * find/testsuite/Makefile.am: Distribute sv-bug-12230.
+
+       * NEWS: Updated with new news.
+
+       * ChangeLog: Brought up to date.
+
+       * lib/buildcmd.c, find/testsuite/find.gnu/sv-bug-12230.exp: Fixed
+       Savannah bug #12230, in which '-exec echo == {} +' is always run,
+       even if there were no matched files.
+
+2005-03-06  James Youngman  <jay@gnu.org>
+
+       * ChangeLog: Added latest changes.
+
+       * po/pt.po, configure.in: Added Portuguese translation
+
+2005-03-04  James Youngman  <jay@gnu.org>
+
+       * configure.in: Modernized the way we call AC_INIT and
+       AM_INIT_AUTOMAKE
+
+       * locate/locate.c, find/pred.c, find/find.c:
+       Eliminated some compiler warnings
+
+       * find/pred.c: Clarified the meaning of a comment.
+
+       * find/testsuite/Makefile.am: Added sizes.exp, sizes.xo.
+
+       * find/testsuite/find.posix/sizes.xo,
+       find/testsuite/find.posix/sizes.exp: Added tests for -size
+       predicate
+
+2005-03-03  James Youngman  <jay@gnu.org>
+
+       * find/find.c:
+       safely_chdir_lstat(): if we didn't end up in the right place, and then
+       fchdir() fails, we can't return to the directory we started in.
+       Therefore, issue a fatal error message and exit.
+
+2005-03-01  James Youngman  <jay@gnu.org>
+
+       * find/find.c, find/testsuite/find.posix/sv-bug-12181.exp,
+       find/testsuite/find.posix/sv-bug-12181.xo: Fixed SourceForge bug
+       12181 (find -H symlink-to-dir reports 'Too many Symbolic links')
+       and bug 12044 (find still hangs on dead NFS filesystems on
+       Solaris)
+
+2005-02-28  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi: Typo: O_NOFOLLOW, not O_FOLLOW
+
+       * import-gnulib.sh:
+       Suggestion from Martin Buchholz; unset CDPATH to prevent "cd" echoing
+       the new directory.
+
+2005-02-27  James Youngman  <jay@gnu.org>
+
+       * README: Indicate how the reader can verify the release.
+
+2005-02-26  James Youngman  <jay@gnu.org>
+
+       * po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po,
+       po/zh_CN.po, po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po,
+       po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot,
+       po/fr.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po,
+       po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po,
+       po/pt_BR.po, po/ro.po, po/ru.po: Added new Vietnamese translation
+
+       * configure.in: Added new Vietnamese translation.
+
+2005-02-25  James Youngman  <jay@gnu.org>
+
+       * po/ga.po: Updated Irish po file
+
+2005-02-23  James Youngman  <jay@gnu.org>
+
+       * Makefile.am: Fix Savannah bug #12064 - 'make distclean' deletes
+       regex.c but should not.
+
+       * find/testsuite/Makefile.am,
+       find/testsuite/find.gnu/printf-h.exp,
+       find/testsuite/find.gnu/printf-h.xo: Added test case for Savannah
+       bug #12085 (-printf %h).
+
+       * NEWS, doc/find.texi, find/find.1, find/pred.c:
+       %h now expands to '.' instead of nothing.
+
+2005-02-22  James Youngman  <jay@gnu.org>
+
+       * find/find.c:
+       Fixed Savannah bug #12099 (misinterpretation of system versions
+       leading to possible incorrect disabling of O_NOFOLLOW).  Reported by
+       Dmitry V. Levin.
+
+       * find/pred.c:
+       For the %h format, don't bail out early as the format might contain
+       something else too.
+
+2005-02-21  James Youngman  <jay@gnu.org>
+
+       * find/find.c: Fixed accidental C99 dependency.
+
+2005-02-20  James Youngman  <jay@gnu.org>
+
+       * po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po,
+       po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po,
+       po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po,
+       po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po,
+       po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sl.po, po/sr.po,
+       po/sv.po, po/tr.po, po/zh_CN.po: Updated italian translation
+
+       * doc/find.texi: Corrected a typo.
+
+       * find/find.c:
+       Read the mounted device list afer parsing the command line, so that
+       for example "find --version" still works (in response to Savannah bug
+       #12044).
+
+       * configure.in: We've moved on from findutils-4.2.18.
+
+2005-02-19  James Youngman  <jay@gnu.org>
+
+       * NEWS: Corrected the summary of the "find -depth" bug.
+
+2005-02-16  James Youngman  <jay@gnu.org>
+
+       * NEWS, configure.in: Prepared for release of 4.2.18.
+
+       * ChangeLog: Updated prior to release of 4.2.18.
+
+       * find/testsuite/Makefile.am:
+       Distribute the test cases for the recent "find -depth" bug.
+
+       * find/testsuite/find.posix/depth1.exp, find/testsuite/find.posix/depth1.xo:
+       Added test case for find -depth bug reported by Joseph S. Myers
+
+       * find/find.c:
+       If -depth is in effect, processing of the subdirectories invalidates
+       the information in 'state'.  Therefore once we get around to
+       processing the predicates, restore the information that we keep in
+       'state' and in 'stat_buf'.
+
+2005-02-15  James Youngman  <jay@gnu.org>
+
+       * ChangeLog: Updated with recent changes
+
+       * find/find.1:
+       Emphasise that -L causes find to recurse into subdirectories pointed
+       to by symbolic links.
+
+       * find/find.1:
+       Patch to find.1 from Aaron Hawley <Aaron.Hawley@uvm.edu>:
+
+       * Notes about -H actually apply to -L.
+       * Said paragraph is duplicated two paragraphs later.
+       * Typos: nno, ibmue, surrpounding
+
+2005-02-15  Aaron Hawley  <Aaron.Hawley@uvm.edu>
+
+       * find/find.1: Notes about -H actually apply to -L.  Said
+       paragraph is duplicated two paragraphs later.  Also typos: nno,
+       ibmue, surrpounding
+
+2005-02-13  James Youngman  <jay@gnu.org>
+
+       * find/find.1: Miscellaneous small clarifications and improvements.
+
+       * doc/find.texi: Added Info nodes and menus under "Changing the
+       Current Working Directory" so that it doesn't generate such a huge
+       Info page.
+
+       * find/find.c: Parenthesise #if defined(...).
+
+2005-02-13  Dmitry V. Levin  <ldv@altlinux.org>
+
+       * find/find.c: remove test code snippet (time(NULL) was used to
+       place a marker for spotting with strace(), but was not actually
+       needed).
+
+       * find/find.c (safely_chdir_nofollow): must not fall back on
+       safely_chdir_lstat() because that will expose it to race condition
+       exploits, making it pointless.
+
+       * find/find.c (safely_chdir_lstat): Move
+       complete_pending_execdirs() up into safely_chdir(), because we
+       need to do that in either case.
+
+2005-02-12  James Youngman  <jay@gnu.org>
+
+       * configure.in, doc/find.texi, find/defs.h, find/find.c,
+       find/parser.c: Fix for Savannah bug #11879, that
+       init_mounted_dev_list() causes find to hang on systems which are
+       clients to dead NFS servers
+
+2005-02-10  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi: Talk about the problem where find will not work
+       if you have a filesystem mounted from an unresponsive NFS server.
+
+2005-02-09  James Youngman  <jay@gnu.org>
+
+       * find/find.1: Indicate that $TZ affects from printf-format
+       results, and add extra cross-references in the SEE ALSO section.
+
+2005-02-08  James Youngman  <jay@gnu.org>
+
+       * xargs/testsuite/Makefile.am: Distribute the .xe files also.
+
+       * Makefile.am: Check that we have the right number of .xe files in
+       the distribution also.
+
+       * ChangeLog, NEWS, configure.in
+       Preparing to release findutils-4.2.17
+
+2005-02-07  James Youngman  <jay@gnu.org>
+
+       * find/testsuite/config/unix.exp: Re-sort the .xo file using the
+       calling user's locale, because our 'pre-sorted' .so output file
+       may not be sorted with the same collating order as 'sort' used to
+       order the output of "find.  Bug spotted by Vin Shelton and Dimitry
+       V. Levin.
+
+       * find/testsuite/Makefile.am:
+       New test, find/testsuite/find.gnu/follow-arg-parent-symlink.exp.
+
+       * find/testsuite/find.gnu/follow-arg-parent-symlink.exp,
+       find/testsuite/find.gnu/follow-arg-parent-symlink.xo, find/find.c:
+       Fix for starting point /foo/bar/baz where bar is a symlink but baz
+       is not - we should chdir into bar there even if it is a symbolic
+       link
+
+2005-02-07  James Youngman  <jay@gnu.org>
+
+       * find/testsuite/Makefile.am:
+       New test, find/testsuite/find.gnu/follow-arg-parent-symlink.exp.
+
+       * find/testsuite/find.gnu/follow-arg-parent-symlink.exp,
+       find/testsuite/find.gnu/follow-arg-parent-symlink.xo, find/find.c:
+       Fix for starting point /foo/bar/baz where bar is a symlink but baz
+       is not - we should chdir into bar there even if it is a symbolic
+       link
+
+2005-02-06  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi:
+       -size: Clarification - -size gives a result consistent with 'wc -c'
+        for example.
+
+       * Makefile.am, find/testsuite/Makefile.am,
+       find/testsuite/find.gnu/execdir-root-only.exp,
+       find/testsuite/find.gnu/execdir-root-only.xo,
+       locate/testsuite/Makefile.am, xargs/testsuite/Makefile.am:
+       dist-hook: Ensure that we distribute all the .po files and all the
+       testsuite files
+
+       * po/pl.po: Updated Polish translation from TP website
+
+2005-02-05  Dmitry V. Levin  <ldv@altlinux.org>
+
+       * find/parser.c, find/pred.c: Additional tweaks for
+       -execdir/-okdir actions.
+
+       * find/parser.c (new_insert_exec_ok): Disable ignore_readdir_race
+       for -execdir/-okdir.
+
+       * find/pred.c (pred_execdir, pred_okdir): Use state.rel_pathname
+       instead of basename(pathname).  Do not add "./" prefix for
+       absolute pathnames.
+
+       * find/find.c (process_top_path): Treat "/" similarly to ".".
+
+       * xargs/testsuite/xargs.posix/savannah-11865.exp,
+       xargs/testsuite/xargs.posix/savannah-11865.xo, xargs/xargs.c:
+       Fixed Savannah bug #11866 (not resetting number of used chars in
+       the command buffer) - reported by Dimitry V. Levin
+
+2005-02-05  James Youngman  <jay@gnu.org>
+
+       * THANKS:
+       Added thanks for Dimitry - has produced many patches, bugfixes and
+       suggestions.
+
+       * find/pred.c:
+       Fixed Savannah bug #11866: typo in pred_okdir() renders it useless
+
+       * find/pred.c:
+       Savannah bug #11861: undefined symbol 'basename' on IRIX 5.3
+
+       * NEWS, configure.in, po/be.po, po/ca.po, po/el.po, po/eo.po,
+       po/fi.po, po/ga.po, po/hr.po, po/hu.po, po/ja.po, po/lg.po,
+       po/ms.po, po/ro.po, po/sl.po, po/sr.po, po/zh_CN.po: Added new
+       translations
+
+       * ChangeLog: Updated from CVS prior to release of 4.2.16.
+
+       * po/ChangeLog: Updated from CVS.
+
+       * NEWS, configure.in: Preparing to release 4.2.16
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot,
+       po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po,
+       po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sl.po, po/sv.po,
+       po/tr.po: make update-po prior to 'make distcheck'
+
+       * po/fetch-po-files: This is the first version we actually used.
+
+       * find/find.c: process_top_path() fixed compilation warning.
+
+       * find/find.c: process_top_path(): avoid processing this item if
+       we can't chdir to the basename of the named file.
+
+       * lib/Makefile.am: Always build forcefindlib.c
+
+       * locate/locate.c: Say 'base name' rather than 'basename' in comments
+
+       * find/pred.c, find/find.c: process_top_path(): Proper bugfix for
+       correct handling of items at depth 0 (i.e. specified on the
+       command line) - do an extra chdir to ensure that we're in the
+       directory containing the item before calling process_path().
+       Hnece also undo the previous 'quick fix' for the same problem
+
+       * doc/find.texi:
+       -execdir no longer has to treat anything as special, even at depth 0.
+
+2005-02-03  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi, find/pred.c: When state.curdepth is 0, our
+       working directory is not the directory containing the file we are
+       processing.
+
+2005-02-02  James Youngman  <jay@gnu.org>
+
+       * find/pred.c:
+       To allow compilation on cygwin, use base_name(), not basename().
+
+       * po/tr.po: Updated Turkish translation from TP
+
+       * po/ro.po: Updated Romanian translation from TP
+
+       * po/da.po, po/et.po: Updated translations from MT project website
+
+2005-02-01  James Youngman  <jay@gnu.org>
+
+       * ChangeLog: Updated from CVS log.
+
+2005-01-31  James Youngman  <jay@gnu.org>
+
+       * find/find.c, lib/nextelem.c, lib/nextelem.h, locate/code.c,
+       locate/frcode.c, locate/testsuite/config/unix.exp,
+       xargs/testsuite/config/unix.exp, xargs/xargs.c: Updated/corrected
+       the email address for David MacKenzie, one of the original authors
+       of findutils
+
+       * doc/Makefile.am: The HTML version of the manual generated for
+       the GNU project website has each node in a separate file, not each
+       chapter in a separate file; adjust filenames accordingly
+
+       * find/parser.c, find/pred.c, lib/savedirinfo.c:
+       Removed some unused variables (patch from Dmitry V. Levin)
+
+       * find/find.c:
+       Patch from Dmitry V. Levin <ldv@altlinux.org>: Add subfs to the list
+       of filesystems which are likely to be automounted.
+
+       * m4/findlib.m4: Corrected typo (pointed out by Dmitry V. Levin).
+
+       * find/testsuite/config/unix.exp,
+       find/testsuite/find.gnu/name-period.xo,
+       find/testsuite/find.gnu/posix-dflt.xo,
+       find/testsuite/find.gnu/posix-h.xo,
+       find/testsuite/find.gnu/posix-l.xo,
+       find/testsuite/find.gnu/printf.exp,
+       find/testsuite/find.gnu/printf.xo: Systems differ in the order in
+       which filenames are returned by readdir.  Hence sort the output of
+       'find' before comparing against the expected-output file.  We
+       therefore also have the lines in the .xo files ready-sorted.
+
+       * po/ca.po: Updated from Translation Project
+
+       * po/ChangeLog: Updated from CVS logs.
+
+       * po/de.po, es.po, et.po, fr.po, gl.po, id.po, it.po, ko.po, nl.po,
+       pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po, da.po: Ran update-po
+
+       * po/be.po, ca.po, el.po, eo.po, fi.po, hr.po, hu.po, ja.po, lg.po,
+       ms.po, ro.po, sl.po, sr.po, zh_CN.po: Added new translation files
+       from the Translation Project web site
+
+       * po/da.po, de.po, es.po, et.po, fr.po, ga.po, gl.po, id.po, it.po,
+       ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: Updated
+       .po files from the Translation Project site
+
+2005-01-30  James Youngman  <jay@gnu.org>
+
+       * doc/Makefile.am:
+       Added rules for extra targets that we buld to update the web site.
+
+2005-01-29  James Youngman  <jay@gnu.org>
+
+       * configure.in: No longer version 4.2.15 - we've changed the manual.
+
+       * doc/find.texi:
+       Clarified the txt about adding extra tests with post-processing via
+       xargs, and recommend -execdir instead for security reasons.
+
+       * doc/find.texi: Patch from Karl Berry:
+       - more entries for the dir file
+       - use @copying so the copyright ends up in the HTML etc. output.
+         (This is the only really important change.)
+       - put @contents after the title page, for conventional toc location.
+       - use @ifnottex to wrap the Top node instead of @ifinfo, for the sake of
+         HTML output, etc.
+
+       * NEWS, configure.in, po/da.po, po/de.po, po/es.po, po/et.po,
+       po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po,
+       po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po,
+       po/sv.po, po/tr.po: Prepared to release findutils-4.2.15
+
+       * ChangeLog: Updated from CVS log.
+
+2005-01-28  James Youngman  <jay@gnu.org>
+
+       * configure.in:
+       Make --enable-d_type-optimization and --enable-d_type-optimisation
+       both work.
+
+       * configure.in: Assume --enable-d_type-optimisation by default
+
+       * find/parser.c: Indicate which features are enabled/disabled
+
+       * locate/testsuite/config/unix.exp:
+       Clean up the files left behind by the locate_textonly test
+
+2005-01-27  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi: Documented --regex.
+
+       * NEWS, locate/locate.1, locate/locate.c, locate/testsuite/Makefile.am, locate/testsuite/config/unix.exp, locate/testsuite/locate.gnu/regex1.exp:
+       Implemented locate --regex - but needs documenting in Texinfo manual.
+
+2005-01-25  James Youngman  <jay@gnu.org>
+
+       * configure.in: Bumped version no.
+
+       * doc/find.texi:
+       Document --mmap and --stdio as being synonyms of -m and -s.
+
+       * locate/locate.1:
+       Document --mmap and --stdio as synonyms of -m and -s.
+
+       * locate/locate.c:
+       Document -m and -s (both no-ops) in the usage message.
+
+       * doc/find.texi, locate/locate.1: Document -m and -s as no-ops.
+
+       * ChangeLog: Updated for release of findutils-4.2.14.
+
+       * NEWS, configure.in, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       Preparing to release findutils-4.2.14
+
+2005-01-25  James Youngman  <jay@gnu.org>
+
+       * NEWS, configure.in, po/da.po, po/de.po, po/es.po, po/et.po,
+       po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po,
+       po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po,
+       po/sv.po, po/tr.po: Preparing to release findutils-4.2.14
+
+2005-01-24  James Youngman  <jay@gnu.org>
+
+       * Makefile.am: Work around the fact that automake-1.7 actually
+       works, and correctly distributes regex.c; hence dist-hook should
+       only copy gnulib/lib/regex.c if this has not already been done.
+
+       * find/defs.h, find/find.c, find/pred.c,
+       find/testsuite/Makefile.am,
+       find/testsuite/find.gnu/printf-symlink.exp,
+       find/testsuite/find.gnu/printf-symlink.xo,
+       find/testsuite/find.gnu/xtype-symlink.exp,
+       find/testsuite/find.gnu/xtype-symlink.xo: Fixes for -xtype and
+       -printf %Y, which had been the wrong way around.
+
+       * NEWS: Avoid including the find.gnu subdirectory in the
+       distributed file more than once
+
+       * locate/locate.c:
+       Move the printing of the statistics into a new function, print_stats()
+
+       * find/testsuite/Makefile.am: Avoid including the find.gnu
+       subdirectory in the distributed file more than once
+
+       * import-gnulib.sh:
+       We need the regex module anyway, to allow compilation on Solaris
+
+2005-01-23  James Youngman  <jay@gnu.org>
+
+       * configure.in:
+       Invoke gl_INCLUDED_REGEX directly to ensure successful compilation on
+       systems like Solaris, which lacks those functions in libc (fixes GNU
+       Savannah bug #11710).
+
+       * locate/locate.1: -S is a synonym for --statistics
+
+       * doc/find.texi: Documented the new -H, -L and -P options.
+
+       * locate/locate.1, locate/locate.c: Implement options -L
+       (default), -H and -P, which mean the same things as for find,
+       except for the fact that the default is -L rather than -P
+
+       * find/find.1: Corrected definition of the exit status for -quit.
+
+       * find/find.c, find/pred.c: If DEBUG_STAT is set, issue a debug
+       message when we call chdir() so that we can figure out what is
+       actually being stat()ed
+
+       * locate/updatedb.sh:
+       Removed spurious newline from help message (bug report from Karl
+       Berry).
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot,
+       po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po,
+       po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po,
+       Makefile.am, NEWS, configure.in, find/defs.h, find/find.c,
+       find/parser.c, find/pred.c, find/tree.c, find/util.c,
+       import-gnulib.sh, lib/savedirinfo.c: Merged the d_type
+       optimisation code; this is disabled by default, and can be enabled
+       with 'configure --enable-d_type-optimisation'
+
+       * NEWS:
+       Updated optimisation NEWS item to indicate the effect on runtime.
+
+2005-01-22  James Youngman  <jay@gnu.org>
+
+       * NEWS, configure.in: Prepare for release of findutils-4.2.12
+
+       * ChangeLog: Brought up to date with recent changes.
+
+       * Makefile.am, import-gnulib.sh, po/Makefile.in.in, po/Makevars,
+       po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot,
+       po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po,
+       po/pl.po, po/pt_BR.po, po/remove-potcdate.sin, po/ru.po, po/sk.po,
+       po/sv.po, po/tr.po: Switch to using the gnulib gettext module, to
+       ensure that 'make distcheck' works with current xgettext,
+       autoconf, etc.
+
+       * find/testsuite/config/unix.exp:
+       Oops, we do need to clean up after all.
+
+2005-01-21  James Youngman  <jay@gnu.org>
+
+       * xargs/testsuite/Makefile.am: Added name of missing input file.
+
+       * find/testsuite/Makefile.am:
+       Distribute a few files that we had forgotten about
+
+       * xargs/testsuite/Makefile.am: Added some missing files.
+
+       * lib/Makefile.am: Also need buildcmd.h.
+
+       * xargs/testsuite/Makefile.am: Fixed a typo.
+
+       * NEWS: Indicate the d_type performance improvement
+
+2005-01-18  James Youngman  <jay@gnu.org>
+
+       * lib/savedirinfo.h: Added on d_type_optimisation also
+
+       * lib/savedirinfo.c: Added on branch d_type_optimisation also.
+
+       * find/pred.c: Added assert that we actually know the file type by
+       the time pred_type() is called
+
+       * find/find.c: Always initialise state.have_stat = false when
+       starting to work with a new file
+
+2005-01-17  James Youngman  <jay@gnu.org>
+
+       * ChangeLog: Brought up to date with recent changes.
+
+       * NEWS: Documented the changes so far.
+
+       * find/testsuite/find.gnu/exec-many-rtn-success.xo:
+       Expected output for exec-many-rtn-success.exp
+
+       * find/find.1:
+       Indicate that -quit still ensures that pending commands are invoked
+
+       * doc/find.texi:
+       Indicate that -quit still causes partial command lines to be invoked,
+       but there are some types of fatal error which leave such commands
+       uninvoked.
+
+       * find/defs.h, find/find.c, find/pred.c, find/testsuite/Makefile.am, find/testsuite/config/unix.exp:
+       Fixed savannah bug  #11625 Wrong return status for -exec ... \; when command fails; also execute any pending commands when doing -quit
+
+       * find/testsuite/find.gnu/exec-many-rtn-failure.exp, find/testsuite/find.gnu/exec-many-rtn-failure.xo, find/testsuite/find.gnu/exec-many-rtn-success.exp, find/testsuite/find.gnu/exec-one-rtn-fail.exp, find/testsuite/find.gnu/exec-one-rtn-fail.xo, find/testsuite/find.gnu/exec-one-rtn-success.exp, find/testsuite/find.gnu/exec-one-rtn-success.xo:
+       Various test cases for succeeding and failing forms of -exec \; and -exec {} +
+
+       * find/pred.c: "-exec ... {} +" always returns "true".
+
+       * configure.in, find/defs.h, find/find.c, find/parser.c, find/pred.c, find/tree.c, find/util.c:
+       Implemented d_type optimisation but not working correctly, so currently disabled
+
+       * lib/savedirinfo.h, lib/savedirinfo.c:
+       Initial implementation (temporarily disabled).
+
+       * lib/Makefile.am: Resolved merge conflict.
+
+       * lib/Makefile.am:
+       Make sure nextelem.h is included in the list of sources.
+
+       * find/parser.c, lib/nextelem.c, lib/nextelem.h, locate/locate.c:
+       Use prototypes for next_element() to make sure it is called correctly.
+
+2005-01-16  James Youngman  <jay@gnu.org>
+
+       * find/find.c, find/pred.c:
+       When completing incomplete multiple execs, use 'eval_tree' not 'predicates'
+
+       * lib/buildcmd.c:
+       Oops, initialise state->cmd_initial_argv_chars to zero.
+
+       * find/find.1:
+       Document the way that -execdir and -okdir will refuse to wqork if ">"
+       is on $PATH.  Also document -okdir in the manpage.
+
+       * find/parser.c:
+       -execdir and -okdir are insecure if $PATH includes the current
+        directory, and so they refuse to work if the user has done that.
+
+       * find/pred.c:
+       Oops; for -exec ... {} +, pass arguments to bc_push_arg() in the right
+       order.   Problem spotted by Geoff Clare.
+
+       * TODO: Removed items which have now been done.
+
+       * lib/buildcmd.c: Tidied up formatting of arg list for bc_do_insert
+
+2005-01-15  James Youngman  <jay@gnu.org>
+
+       * find/testsuite/find.gnu/printf.exp, find/testsuite/find.gnu/printf.xo:
+       Added extra tests for more printf formats; patch by Andreas Metzler
+
+       * locate/locate.c:
+       Ensure that the new long options have a relevang short option too.
+       Also bring usage message into line with the options actually
+       supported.  Thanks to Bas van Gompel for noticing this defect.
+
+       * locate/locate.1:
+       Escape "-" in SYNOPSIS.  Thanks to Bas van Gompel for noticing this
+       defect.
+
+       * ChangeLog: Fixed typos.
+
+       * doc/find.texi:
+       Documented -execdir, and the "+" variants of -exec and -execdir.
+
+       * find/find.1: Documented -execdir.
+
+       * xargs/xargs.c:
+       Updated to bring into line with bc_*() interface changes
+
+       * ChangeLog: Updated with recent changes.
+
+       * find/defs.h, find/parser.c, find/pred.c, lib/buildcmd.c, lib/buildcmd.h:
+       Implemented -execdir and -okdir
+
+       * find/defs.h, find/find.c, find/fstype.c, find/parser.c, find/pred.c, lib/buildcmd.c, lib/buildcmd.h, xargs/xargs.c:
+       First working version of -exec ...+
+
+2005-01-09  James Youngman  <jay@gnu.org>
+
+       * find/defs.h, find/find.c, find/parser.c, find/pred.c, lib/buildcmd.c, lib/buildcmd.h, xargs/xargs.c:
+       Initial implementation of -exec ..{} +, but currently disabled since not yet working
+
+2005-01-08  James Youngman  <jay@gnu.org>
+
+       * find/find.c: Fixed typo in comment.
+
+       * find/defs.h, find/find.c, find/parser.c, find/pred.c:
+       We now understand but do not implement -execdir (a *BSD invention, and a very useful security enhancement) and -okdir (the obvious companion to it)
+
+       * locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, xargs/xargs.c:
+       The GNU coding standard requires a space between the function name and
+       its parenthesised argument list.
+
+       * find/defs.h:
+       Understand the -exec ... {} \+ construction (for multiple
+       replacement).  No support yet.
+
+       * locate/locate.1:
+       Indicate that empty elements in the dbpath are treated as synonyms for
+       the default database.
+
+       * locate/locate.c:
+       Support empty elements in the dbpath as synonyms for the default
+       database.  These colons can be leading, trailing or in the middle of
+       the string.  We no longer com,plain if the user does this.
+
+       * lib/nextelem.c:
+       If curdir_ok is 0 and an element is empty, return "" instead of NULL
+       so that the caller knows to keep calling us.
+
+       * find/find.c, find/pred.c, import-gnulib.sh, locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, xargs/xargs.c:
+       Savannah bug 11517: find, xargs, locate, etc. should not hide write failures; patch from Jim Meyering
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       changed .pot creation date
+
+       * THANKS, AUTHORS: Take into account the FSF copyright-assignments list
+
+       * doc/find.texi:
+       If -quit is used, the exit value can be nonzero if errors have occurred.
+
+       * find/find.1:
+       Removed incorrect comment about -H, -P and -follow in HISTORY.
+
+2005-01-07  James Youngman  <jay@gnu.org>
+
+       * lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h, xargs/xargs.c:
+       Refactored xargs to use an external library function from the new file buildcmd.c
+
+       * configure.in: no longer the same as the released 4.2.11 version
+
+2005-01-06  James Youngman  <jay@gnu.org>
+
+       * xargs/testsuite/inputs/lines.xi, xargs/testsuite/xargs.posix/l2.exp, xargs/testsuite/Makefile.am:
+       Tests for the -L option
+
+       * xargs/testsuite/config/unix.exp: When a test fails, show the diffs
+
+       * xargs/testsuite/xargs.posix/l2.exp, xargs/testsuite/xargs.posix/l2.xo:
+       tests for the -l option
+
+       * xargs/testsuite/Makefile.am: Added extra test files
+
+       * xargs/testsuite/xargs.sysv/trace.exp, xargs/testsuite/xargs.sysv/trace.xe, xargs/testsuite/xargs.sysv/trace.xo:
+       Added tests for the -t option
+
+       * xargs/testsuite/config/unix.exp, xargs/testsuite/inputs/foobar.xi, xargs/testsuite/xargs.gnu/r.exp, xargs/testsuite/xargs.gnu/r.xo, xargs/xargs.1:
+       Use a blanks-only input file for cases where there is supposed to be no output
+
+       * xargs/testsuite/inputs/blank.xi: Initial version.
+
+       * xargs/xargs.1:
+       Corrected a typo; also indicate that it's impossible to use xargs
+       securely due to the race condition.
+
+2005-01-05  James Youngman  <jay@gnu.org>
+
+       * find/parser.c:
+       Fixed Savannah bug 11495: fallthrough from -printf format processing
+       from 'n' case to 'd' case.
+
+2005-01-03  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi:
+       Oops.  Had duplicated an entire section.  Fortunately this was after
+       @bye, so there was no adverse effect.
+
+       * NEWS: locate -b.
+
+       * doc/find.texi, locate/locate.1: document locate -S
+
+       * configure.in, doc/find.texi, locate/locate.1, locate/locate.c:
+       Support locate -b as a synonym for locate --basename
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       distcheck
+
+       * find/testsuite/config/unix.exp:
+       Clean up (delete) find.out at at the end of the test.
+
+       * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/parser.c, find/pred.c:
+       Implemented the -samefile test for find
+
+2005-01-02  James Youngman  <jay@gnu.org>
+
+       * ChangeLog: Updated with recent changes.
+
+       * NEWS:
+       Bas van Gompel: two-line patch to locate.c to make locate's -i and -w
+       options work if -e is in use.
+
+       * THANKS: Added Bas van Gompel.
+
+       * locate/locate.c:
+       Bas van Gompel: (visit_exists) when testing for the existence of the
+       file, check the real filename [printname], not the case-converted
+       filename [testname].  Really these argument names are badly chosen.
+
+       * find/find.1, doc/find.texi:
+       Improved the documentation for -perm, with plenty of examples,
+       following a comment by Dan Jacobson that the comment "Symbolic modes
+       use mode 0 as a point of departure" is baffling and unhelpful.
+
+       * locate/locate.c:
+       Suggestion and patch from Bas van Gompel: (new_locate): Fix display of
+       negative compression ratios.
+
+2004-12-31  James Youngman  <jay@gnu.org>
+
+       * NEWS: Brought up to date with recent changes
+
+       * doc/find.texi:
+       Don't need to nest the "race conditions with..." sections so deeply.
+
+       * doc/find.texi: Corrected some spelling errors.
+
+       * doc/find.texi: Added new "Security Considerations" chapter.
+
+2004-12-23  James Youngman  <jay@gnu.org>
+
+       * locate/locate.c:
+       Applied bugfixes from Bas van Gompel <patch-findutils.buzz@bavag.tmfweb.nl>.
+       (lc_strcpy): Zero-terminate result.
+       (add_visitor): Update lastinspector.
+       (visit_substring_match_casefold): fix off-by-one error.
+       (new_locate): Move visit_exists down to improve performance.
+       (new_locate): Don't fold case when getting stats.
+
+2004-12-19  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi:
+       Indicate that "cd /; find tmp -wholename /tmp" will never match anything.
+
+       * doc/find.texi: Documented locate --statistics.
+
+       * locate/locate.1: Documented the --statistics option.
+
+       * locate/locate.c: Added support for the -S option.
+
+2004-12-12  James Youngman  <jay@gnu.org>
+
+       * NEWS: Added a summary of the changes so far.
+
+       * find/tree.c: Made some of the error messages more self-explanatory
+
+       * find/pred.c: Print pointers with %p, not %x.
+
+       * find/find.c: Moved option data into struct options.
+
+       * find/find.1: clarifications
+
+       * find/testsuite/find.gnu/comma.exp:
+       Limit the amount of searching with maxdepth.
+
+       * doc/find.texi: clearer description of how -prune works
+
+       * ChangeLog: Removed duplicate entry.
+
+       * configure.in, find/defs.h, find/find.c, find/fstype.c, find/parser.c, find/pred.c, find/tree.c, find/util.c:
+       Separated ariables representing current state from variable representing option information
+
+2004-12-11  James Youngman  <jay@gnu.org>
+
+       * find/parser.c: Readability improvement to the usage message.
+
+       * find/find.c: Oops.  Fixed unmatched #endif.
+
+       * find/testsuite/find.gnu/printf.exp, find/testsuite/find.gnu/printf.xo, THANKS, configure.in, find/testsuite/Makefile.am, find/testsuite/config/unix.exp:
+       Fixed Savannah bug #11280
+
+       * find/find.c:
+       Remember to set path_length and curdepth in process_top_path().
+
+2004-12-07  James Youngman  <jay@gnu.org>
+
+       * find/fstype.c: Use xstat() not stat() to examine things.
+
+       * find/find.c: Explain why #ifdef EOVERFLOW.
+
+       * find/find.c: EOVERFLOW is not defined on UNICOS.
+
+       * NEWS: Corrected typo.
+
+2004-12-06  James Youngman  <jay@gnu.org>
+
+       * ChangeLog: Brought up to date.
+
+       * NEWS, configure.in: releasing 4.2.10
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       distcheck
+
+       * ChangeLog: Updated prior to release of finsutils-4.2.10.
+
+       * import-gnulib.sh, find/fstype.c:
+       Use gnulib's mountlist module instead of grokking it ourselves.
+
+       * configure.in:
+       Removed all the out-of-date cruft for grokking getmntent().
+
+       * xargs/xargs.c:
+       Added the -I and -L options; also -E takes an argument which is not optional.
+
+2004-12-05  James Youngman  <jay@gnu.org>
+
+       * README, configure.in, find/defs.h, find/find.c, find/parser.c, find/pred.c, find/tree.c:
+       Allow debug output to be turned on or off by saying --enable-debug on the configure command line
+
+       * README:
+       Removed disparaging (it is now, it probably wasn't then) comment about
+       the production-readiness of Automake.
+
+       * README: Qualify remarks about POSIX compliance.
+
+       * NEWS, configure.in: Preparation for release 4.2.9
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       distcheck
+
+       * ChangeLog: Brought up to date.
+
+       * find/find.c:
+       Avoid duplicate error message when we cannot chdir() into a subdirectory.
+
+       * THANKS: Added recent thankees.
+
+       * NEWS:
+       Brought up to date with respect to the current set of fixed bugs.
+
+       * NEWS, xargs/xargs.1, xargs/xargs.c:
+       Implemented POSIX options -L, -I and -E
+
+2004-12-03  James Youngman  <jay@gnu.org>
+
+       * find/parser.c:
+       -xdev is an option, not a test.   Fixes Savannah bug 11192.
+
+       * find/find.1, xargs/xargs.1:
+       Escape dashes with a backslash (for fix Savannah bug 11189).
+
+2004-11-27  James Youngman  <jay@gnu.org>
+
+       * find/find.c:
+       More use of safely_chdir(). Also bugfix: -L should imply -noleaf.  Be more careful about when xstat should fall back on lstat() when stat() fails.
+
+       * find/find.1: "necessary" only has one "C".
+
+       * find/find.1:
+       If stat() fails with ELOOP, we issue a diagnostic message.
+
+2004-11-26  James Youngman  <jay@gnu.org>
+
+       * find/find.c: Removed some unused code.
+
+       * Makefile.am: Don't do anything in the 'intl' subdirectory
+
+       * find/find.c:
+       Enhanced safely_chdir() to the point where the test suite passes, and report infinite loops in the directory hierarchy
+
+       * find/defs.h:
+       belt and braces; ensure that SYMLINK_NEVER_DEREF has value zero
+
+       * find/find.1:
+       Describe our strategy for detecting and reporting infinite loops
+
+2004-11-24  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi:
+       Updated the discussion of th error messages for findutils-4.2.8.
+
+       * configure.in: Next version will be 4.2.9...
+
+       * find/find.c:
+       Don't issue a warning if we notice the mounting of a filesystem that's
+       likely just to be an automounter.
+
+       * doc/find.texi, find/find.1:
+       Explain how rounding is performed for -atime and friends.
+
+       * xargs/xargs.c:
+       Once we collect enough arguments (for the value specified by the -n
+       option) to do an exec(), do it immediaely instead of waiting for the
+       next one to arrive.  This fixes Savannah bug #7340.
+
+       * ChangeLog, configure.in, NEWS: Prepare to release 4.2.8.
+
+       * NEWS: Updates for 4.2.8.
+
+       * configure.in: check for  sys/types.h
+
+       * find/find.c:
+       If wd_sanity_check() discovers that the mount table has changed, remember the updated device number and inode so that we also consider these to be valid on the way back up.
+
+       * find/defs.h:
+       Declarations of xmalloc() and friends belong in xalloc.h, not in defs.h
+
+       * find/parser.c: avoid signed/unsigned warning, and #include xalloc.h
+
+       * find/fstype.c:
+       Changed to alloc get_mounted_devices() to compile on Solaris
+
+       * README-CVS:
+       Automake requires GNU m4, so point out that the reader needs that.
+
+       * find/defs.h, find/find.c, find/fstype.c:
+       When wd_sanity_check() fails, enumerate the mounted devices, rather than the mounted filesystem names
+
+       * NEWS: prepare for 4.2.8
+
+       * configure.in:
+       Look for some Solaris headers which are used by get_mounted_devices()
+
+       * lib/Makefile.am: don't build savedirtypes yet
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       updated po files
+
+       * m4/nullsort.m4:
+       Avoid suprious output of the test data when the tests fail.
+
+2004-11-21  James Youngman  <jay@gnu.org>
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       Messages changed again
+
+       * ChangeLog, configure.in: Preparing to release 4.2.7.
+
+       * NEWS: Updated for release of 4.2.7.
+
+       * import-gnulib.sh: Also need canonicalize module.
+
+       * find/find.c:
+       When checking to see if a filesystem has changed state, use an
+       absolute pathname.
+
+       * configure.in:
+       No need to pause to allow James to view his handiwork, it (allegedly)
+       works now.
+
+       * configure.in:
+       Oops.  Check for setlocale() to re-enable the i18n support which was
+       accidentally disabled in 4.2.5.
+
+       * find/find.c:
+       Check to see if the new directory is a transitioned mount point by
+       using its ABSOLUTE name, if we can figure it out.
+
+       * doc/find.texi:
+       Added guidance on some of the error messages.  Not the most common
+       ones, but the ones where the user might most benefit from some handy
+       hints or an explanation of what is going on.
+
+       * find/pred.c:
+       Actually emit an error message if we fail to stat a symlink (for
+       reasons other than nonexistence of the link and infinite loop).
+
+       * doc/texinfo.tex: Updated texinfo.tex
+
+       * NEWS, configure.in, find/find.c, find/fstype.c:
+       Enable the 'Warning: filesystem XXX has recently been mounted' check on Solaris, which prevents it exiting fatally when traversing an automount mount point
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       messages changed again
+
+       * NEWS: Implemented xargs --arg-file.
+
+       * doc/find.texi, xargs/xargs.1, xargs/xargs.c, NEWS:
+       Implemented xargs --arg-file
+
+       * find/find.c:
+       Where a filesystem was recently (un)mounted, try togive its full name
+
+       * configure.in:
+       Try to avoid requesting -lsun if we don't seem to need it (e.g. on
+       UNICOS where it is not present and trying to link against it produces
+       a warning).
+
+       * find/defs.h, lib/modetype.h: Guard against multiple inclusion
+
+       * find/fstype.c:
+       We now need <mntent.h> even if we are not using getmntent() to figure
+       out the type of a filesystem, because wd_sanity_check() needs to
+       enumerate the system mount points.
+
+       * configure.in: Next release will be 4.2.7.
+
+       * find/fstype.c:
+       get_mounted_filesystems() should use getmntent() if that function is
+       present, rather than just if configure didn't find anything better for
+       filesystem_type_uncached() to use than that.
+
+       * find/parser.c:
+       If -delete is the only action on a file, don't assume the default
+       -print action too.
+
+       * ChangeLog, configure.in, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       Preparation to release findutils-4.2.6.
+
+       * find/Makefile.am, xargs/Makefile.am:
+       Enable checking of support for --version and --help
+
+       * locate/Makefile.am:
+       Con't check command-line options for frcode, code or bigram
+
+       * locate/code.c: Support --version and --help.
+
+       * ChangeLog: *** empty log message ***
+
+       * find/defs.h, find/find.c, find/fstype.c, lib/Makefile.am, lib/extendbuf.c, lib/extendbuf.h, NEWS:
+       Avoid fatal error if automount mounts a filesystem on a directory because we chdir()ed into it
+
+       * configure.in: Next release will be 4.2.6.
+
+       * find/find.1:
+       Indicate that the '-' flag does work for most fields.   Also provide
+       an example of using the comma operator to traverse the filesystem just
+       once but search for more than one thing.
+
+       * doc/find.texi: Indicate that the '-' flag does work for most fields.
+
+2004-11-19  James Youngman <jay@gnu.org>
+
+       * configure.in: releaseing findutils-4.2.5
+
+       * find/testsuite/Makefile.am, locate/testsuite/Makefile.am, xargs/testsuite/Makefile.am:
+       If a directory has no Makefile.am, omit it from the parent's DIST_SUBDIRS - automake-1.9 requires this
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       updated by make distcheck
+
+       * ChangeLog, NEWS: Updated for release 4.2.5.
+
+       * find/find.1, doc/find.texi:
+       Tell the reader that format flags may not work as they expect.
+
+       * configure.in:
+       Use the correct name for the macro gl_AC_TYPE_LONG_LONG (not
+       jm_AC_TYPE_LONG_LONG).
+
+2004-11-15  James Youngman <jay@gnu.org>
+
+       * import-gnulib.sh:
+       Avoid test -e because not all systems are POSIX-compliant (bug
+       #11005).  Also don't need regex module any more if we're not building
+       in intl.
+
+       * Makefile.am, configure.in:
+       These days gnulib likes to include 'libintl.h' which our very old intl/ directory lacks.   For the moment, disable use of the internal intl/ directory
+
+       * doc/find.texi:
+       Use @ref not @xref for a reference at the beginning of a sentence.
+
+       * intl/Makefile.in:
+       Make sure gnulib.lib is on the #include path (Savannah bug #11002)
+
+       * locate/locate.c:
+       Use base_name instead of basename - fixes Savannah bug 11003.
+
+       * configure.in, find/defs.h, find/find.c, find/parser.c, find/pred.c, locate/bigram.c, locate/locate.c:
+       Don't need banner to emphasise the location of the call to jy_SORTZ
+
+2004-11-12  James Youngman <jay@gnu.org>
+
+       * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/parser.c, find/pred.c, find/testsuite/find.gnu/posix-dflt.exp, find/testsuite/find.gnu/posix-dflt.xo, find/testsuite/find.gnu/posix-h.exp, find/testsuite/find.gnu/posix-h.xo, find/testsuite/find.gnu/posix-l.exp, find/testsuite/find.gnu/posix-l.xo, find/util.c:
+       Implemented BSD option -P and also the correct default behaviour of find with respect to symlinks if neither -L nor -H is specified [i.e. same as -P]
+
+2004-11-11  James Youngman <jay@gnu.org>
+
+       * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/parser.c:
+       Implemented -H and -L options.
+
+       * find/util.c: Added in the -H and -L options on the usage message.
+
+2004-11-10  James Youngman <jay@gnu.org>
+
+       * doc/find.texi, find/find.1, find/parser.c, find/pred.c:
+       Implemented %M and %A+ format specifiers
+
+       * doc/find.texi, find/find.1, find/parser.c, find/pred.c:
+       Documented the fact that only %d and %m format specifiers honour the various formatting flags
+
+       * xargs/xargs.c:
+       Get the right number of bytes in a Kilobyte (hint: it's not 1048; that
+       was a typo, honest :)
+
+       * po/pl.po: Applied Polish translations
+
+2004-11-08  James Youngman <jay@gnu.org>
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po:
+       distcheck changed the po files again
+
+       * locate/Makefile.am:
+       Make install-data-hook honour the setting of DESTDIR so that "make
+       DESTDIR=/tmp/foo install" works and puts localstater in the right
+       place.
+
+       * configure.in: We're now working on findutils-4.2.5.
+
+       * doc/find.texi, xargs/xargs.1:
+       Point out that xargs -i only splits input items at newlines
+
+       * ChangeLog: Indicate that we released 4.2.4.
+
+       * ChangeLog: Updated for release 4.2.4
+
+       * NEWS, configure.in: Prepare for release of 4.2.4.
+
+       * NEWS: Brought up to date with latest changes.
+
+       * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/parser.c, po/da.po, po/de.po, po/es.po, po/findutils.pot, po/gl.po, po/id.po, po/ko.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po:
+       Turn warning messages off by default if stdin is not a tty; allow these to be controlled explicitly by options -warn and -nowarn
+
+       * po/et.po, po/it.po: Updated translation files
+
+       * po/sk.po: New translation file
+
+       * po/fr.po, po/nl.po, po/tr.po: Updated translation files
+
+       * configure.in: Added Slovak (sk) language.
+
+       * xargs/xargs.c:
+       Enforcing a lower limit on the value specified by -s makes the test
+       suite fail.  Removed that lower limit.
+
+       * locate/Makefile.am: Oops, multilocate doesn't exist yet.
+
+       * NEWS: *** empty log message ***
+
+       * doc/find.texi, locate/updatedb.1, locate/updatedb.sh:
+       Added option --findoptions to updatedb
+
+       * locate/Makefile.am, locate/locatedb.5, locate/updatedb.1, xargs/xargs.1:
+       Fixed section numbers in manpage titles and cross-references
+
+       * NEWS, doc/find.texi, xargs/xargs.1, xargs/xargs.c:
+       Increased the default argument length and improved POSIX compliance of the handling of out-of-range values for the -s option
+
+2004-11-07  James Youngman <jay@gnu.org>
+
+       * m4/Makefile.am:
+       Added in the extra files we need to distribute, nullsort.m4
+       order-bad.bin order-good.bin
+
+       * doc/find.texi: Documented locate's --limit option
+
+       * locate/locate.1, locate/locate.c:
+       Implmented --limit and corrected the implementation of the -i option.
+
+2004-11-06  James Youngman <jay@gnu.org>
+
+       * NEWS, doc/find.texi, locate/locate.1:
+       Documented --wholename and --basename and updated the NEWS file
+
+       * README-CVS:
+       Give the autogen commands in a form that you can usefully cut and paste into a shell
+
+       * NEWS: Options --null and --count) for locate
+
+       * lib/nextelem.c:
+       Don't return '.' for an empty path element, because the path we are splitting may not be intended to contain directories
+
+       * configure.in: we're working on findutils-4.2.4 now
+
+       * locate/Makefile.am: Substitute @SORT_SUPPORTS_Z@
+
+       * doc/find.texi:
+       Documented new locate option --null and newline handling
+
+       * locate/locate.1, locate/locate.c:
+       New locate options --null, --wholename, --basename, --count
+
+       * locate/frcode.c, locate/updatedb.1, locate/updatedb.sh:
+       correctly handle newlines in the file names
+
+       * configure.in: Determine if sort -z works
+
+       * m4/nullsort.m4, m4/order-bad.bin, m4/order-good.bin:
+       jy_SORTZ: a macro to determine if the system has a sort command with a working -z option
+
+2004-11-01  James Youngman <jay@gnu.org>
+
+       * NEWS: Fixed "find -printf '%H\n'".
+
+       * find/find.c:
+       Avoid segfault if -printf %H is used where the matched file was the default, unspecified starting point, the current directory
+
+2004-10-31  James Youngman <jay@gnu.org>
+
+       * find/find.1, find/parser.c: NetBSD also supports -d.
+
+       * find/find.1, doc/find.texi:
+       Documented the behaviour of -daystart and -follow in more detail
+
+       * find/parser.c: Corrected the usage message.
+
+       * find/parser.c:
+       When deciding whether to issue a warning about options following
+       non-options, ignore any options whose position affects the tests
+       (i.e. -daystart and -follow).
+
+       * find/parser.c: -daystart is a positional option like -follow.
+
+       * find/parser.c:
+       Issue a warning message if an option is specified after a test or an
+       action (because the user might have believed that the behaviour of the
+       option is in some way conditional on the preceding tests).
+
+       * locate/updatedb.sh:
+       Oops; removed some test code that I shouldn't have checked in.
+
+       * locate/updatedb.sh:
+       Indicate that the old locate database format will shortly be unsupported.
+
+       * doc/find.texi:
+       Use @direntry instead of hard-coding START-INFO-DIR-ENTRY inside @ifinfo.
+
+       * locate/updatedb.1: Updated default location of locatedb file.
+
+       * README-alpha:
+       Updated to give correct FTP location and to not talk about "test"
+       versions of automake, which are no longer required.
+
+       * locate/updatedb.sh:
+       Incorporated the default list of filesystems to avoid from the Debian
+       package.  Also added /afs and /sfs to the default pruned paths.
+
+       * configure.in: Released findutils 4.2.3
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po:
+       did make distcheck, which updates these files
+
+       * find/defs.h, find/fstype.c:
+       Use const qualifier in arguments to filesystem_type() to allow callers with const variables to use them
+
+       * ChangeLog: Updated.
+
+       * NEWS: Added new news.
+
+       * find/find.c:
+       Extra diagnositcs for the case where we have the error "%s changed
+       during execution of %s" - that is when we chdir back to the parent
+       directory only to find that it has changed.
+
+2004-10-30  James Youngman <jay@gnu.org>
+
+       * .cvsignore, NEWS, doc/find.texi, find/defs.h, find/find.1, find/parser.c, find/pred.c:
+       Implemented the -quit action
+
+       * NEWS, doc/find.texi, find/find.1, find/parser.c, find/pred.c:
+       Refactored time handling routines in preparation for support of absolute timestamp comparison predicates
+
+       * locate/locate.c:
+       Applied Savannah patch #2952 ("getline off-by-one bugfix").
+
+       * NEWS, doc/find.texi, find/defs.h, find/find.1, find/parser.c, find/pred.c:
+       Added -delete action (Savannah patch #3454 with additions)
+
+       * locate/locate.c:
+       Applied Savannah patch #2692 (allowing get_short to process negative integers).
+
+       * find/find.c:
+       If we are iossuing an error message because $FIND_BLOCK_SIZE is set,
+       ignore the setting of errno.
+
+       * find/parser.c: More fixes for pedantic compiler warnings
+
+       * NEWS, find/parser.c, find/tree.c: Eliminated some compiler warnings
+
+       * find/find.c, find/parser.c, find/pred.c:
+       Various fixes for compiler warninga sbout unreachable code or unused function arguments
+
+       * intl/plural.y: Silence compiler warning about unused argument.
+
+       * locate/testsuite/Makefile.am:
+       Subdirectory "inputs" does not exist, so remove it from DIST_SUBDIRS.
+
+       * locate/locate.c:
+       Corrected the explanation of why we have to use no parentheses around
+       the String argument to the N_ macro in its expansion.
+
+       * configure.in: Nextr release is 4.2.3.
+
+       * configure.in: IOndicate this is no longer the pristine release.
+
+       * NEWS:
+       Oops, comments for release 4.2.0 should have said 20480 bytes, not 2480.
+
+       * lib/listfile.c:
+       The -ls predicate should not truncate usernames.  Fixes Savannah bug #10800.
+
+       * find/fstype.c, locate/locate.c:
+       Fixes for Savannah bug #3727 (Intel icc compilation errors).
+
+2004-10-25  James Youngman <jay@gnu.org>
+
+       * doc/find.texi, find/find.1, find/parser.c, find/pred.c:
+       Support -printf %D, which prints the device number of the containing filesystem
+
+       * locate/updatedb.sh:
+       Avoid confusion between James Woods and James Youngman, by using the
+       disambiguating surname.
+
+       * find/parser.c: Use RE_ICASE instead of re->translate.
+
+       * configure.in, find/parser.c, find/pred.c, xargs/xargs.c:
+       No need to #define _GNU_SOURCE if we use gl_INIT.
+
+2004-10-24  James Youngman <jay@gnu.org>
+
+       * ChangeLog: Prepared to release findutils-4.2.2.
+
+       * ChangeLog, NEWS, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po:
+       Updates prior to release of 4.2.2
+
+       * NEWS: Updated with news for findutils-4.2.2.
+
+       * find/testsuite/config/unix.exp, lib/forcefindlib.c, lib/listfile.c, lib/modetype.h, lib/nextelem.c, locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, locate/locatedb.h, locate/testsuite/config/unix.exp, locate/updatedb.sh, xargs/testsuite/config/unix.exp, xargs/xargs.c, NEWS, find/defs.h, find/find.c, find/fstype.c, find/parser.c, find/pred.c, find/tree.c, find/util.c, import-gnulib.sh:
+       Corrected typo in the address of the FSF office
+
+       * lib/strspn.c: Updated FSF address.
+
+       * m4/.cvsignore: 'cvs status' should ignore Makefile.in
+
+       * m4/Makefile.am, Makefile.am, NEWS, README-CVS, configure.in, doc/texinfo.tex, find/defs.h, find/fstype.c, find/parser.c, find/pred.c, import-gnulib.sh, intl/bindtextdom.c, intl/dcgettext.c, intl/dcigettext.c, intl/dcngettext.c, intl/dgettext.c, intl/dngettext.c, intl/explodename.c, intl/finddomain.c, intl/gettext.c, intl/intl-compat.c, intl/l10nflist.c, intl/loadmsgcat.c, intl/localcharset.c, intl/localealias.c, intl/ngettext.c, intl/plural.y, intl/textdomain.c, lib/Makefile.am, lib/forcefindlib.c, lib/listfile.c, lib/nextelem.c, lib/strspn.c, lib/waitpid.c, locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, m4/findlib.m4, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po, xargs/xargs.c:
+       Use gnulib-tool --import to import the gnulib code, rather than the odd way we were doing it before
+
+       * find/find.c, find/fstype.c, find/parser.c, find/pred.c, find/tree.c, find/util.c, locate/code.c, locate/locate.c, xargs/xargs.c:
+       Work round an apparent compiler bug in HP-UX 11.23 for
+       ia64
+
+       * locate/locate.c:
+       Work around what appears to be a C compiler bug in HP-UX 11.23 for
+       ia64.
+
+       * INSTALL, depcomp, install-sh, missing, mkinstalldirs:
+       Updated from automake
+
+       * locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, xargs/xargs.c, find/find.c:
+       Avoid use of exit() within main, to silence warnings about unreachable code
+
+2004-10-22  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi: Syntax corrections.
+
+       * doc/find.texi: Indicate that "-exec {}+" is not yet supported.
+
+       * find/find.1: Indicate that "{}+" is not yet supported.
+
+       * find/testsuite/find.gnu/name-period.xo, find/testsuite/find.gnu/name-period.exp, find/find.1, doc/find.texi:
+       The -name predicate must allow '*' to match '.foo' as demanded by IEEE
+       Std 1003.2-1992 Interpretation #126.
+
+       * find/pred.c:
+       Remove use of FNM_PERIOD for -name as demanded by IEEE Std 1003.2-1992
+       Interpretation #126
+
+       * find/parser.c: Fix for compilation (on AIX 4.3) with GCC 2.x.
+
+       * xargs/xargs.c:
+       Changed the erorr message issued when there is an unmatched quote to
+       point out that the user might have wanted to use the -0 option instead.
+
+2004-10-17  James Youngman  <jay@gnu.org>
+
+       * configure.in:
+       Define intmax_t if it is not already defined - allows parser.c to compile on AIX 4.3
+
+       * configure.in:
+       Adjust version number to indicate that this s/w has moved on since the
+       4.2.1 release.
+
+       * configure.in: preparing to release 4.2.1
+
+       * ChangeLog: updated with current changes
+
+       * README-CVS: Updated to go with newer version of gnulib.
+
+       * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po:
+       preparation for release
+
+       * NEWS: Mention the changes to "trap".
+
+       * NEWS: Brought up to date.
+
+       * import-gnulib.sh:
+       Use xalloc-die module from gnulib, since that has now been split out
+
+       * find/parser.c:
+       Check fnmatch() when other predicates that rely on fnmatch() are used.
+
+       * find/parser.c: bug #10701: find needs fnmatch sanitycheck on startup
+
+2004-10-16  James Youngman <jay@gnu.org>
+
+       * import-gnulib.sh:
+       Switch to requirement for GNU fnmatch because it supports FNM_CASEFOLD.
+
+       * locate/updatedb.sh:
+       Bug #9465: use of signal numbers for 'trap' is deprecated.  Should use
+       names instead.  See
+       http://www.opengroup.org/onlinepubs/009695399/utilities/trap.html,
+       which indicates that support for signal numbers is optional, while
+       support for signal names is mandatory.
+
+       * configure.in:
+       Indicate that this is the CVS version (once again) now that findutils
+       4.2.0 has been released.
+
+       * ChangeLog, configure.in, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po:
+       findutils 4.1.20 check-in for tagging
+
+2004-10-02  James Youngman <jay@gnu.org>
+
+       * po/Makefile.in.in:
+       Search in $(top_srcdir) for mkinstalldirs, since that's where we keep it.
+
+       * NEWS: Brought up to date, organised more clearly, and tidied up.
+
+       * NEWS: brought up to date with recent changes
+
+       * locate/testsuite/config/unix.exp, locate/testsuite/locate.gnu/ignore_case1.exp, locate/testsuite/locate.gnu/ignore_case3.exp, locate/updatedb.sh:
+       Added new option --changecwd to updatedb so that the 'cd /' which it does can be compatible with the requirements of the test suite.  Specifically, the test suite relies on being able to use relative pathnames
+
+       * find/pred.c:
+       Fixed usage of human_readable() in '%k' format specifier to fix a bug
+       reported by Dmitry V. Levin (arguments to human_readable() were
+       specified in the wrong order, which resulted in a floating-point
+       error).
+
+2004-08-08  James Youngman <jay@gnu.org>
+
+       * locate/updatedb.sh:
+       cd to / to avoid inability to examine the current directory if we're
+       invoked via cron (and hence in root's home directory for example).
+
+       * doc/find.texi, find/find.1:
+       Deprecate -path and -ipath in favour of -wholename and -iwholename
+
+       * find/parser.c:
+       As per RMS's suggestion, deprecate -path and -ipath in favour of
+       -wholename and -iwholename.
+
+       * locate/locate.c:
+       Fixed Savannah bug #9923, in which get_short() returns large positive
+       ints when it should be returning negative shorts.
+
+       * xargs/xargs.1:
+       Applied documentation improvements suggested by Dan Jacobson
+       <jidanni@jidanni.org>.
+
+       * xargs/xargs.c:
+       Don't check size_of_environment against arg_max since that causes the
+       test suite to fail.
+
+       * xargs/xargs.1, xargs/xargs.c: Better documentation for the -i option
+
+2004-05-03  James Youngman <jay@gnu.org>
+
+       * find/find.1:
+       document the various suffixes for -size and also the new
+       option -ignore_readdir_race
+
+       * locate/locate.c:
+       Fixes Savannah bug #8623 (failure to check consistency of data
+       read from locate database)
+
+       * locate/updatedb.sh:
+       Resolves Savannah bug 4380, that updatedb generates an empty
+       database if one of the commands fails
+
+       * NEWS: Talk about -ignore_readdir_race
+
+       * doc/find.texi:
+       Documented -ignore_readdir_race and -noignore_readdir_race
+
+       * find/find.c:
+       -ignore_readdir_race should have no effect if the reason for the
+        failure of stat(2) was anything other than ENOENT.
+
+       * find/defs.h, find/find.c, find/parser.c:
+       Fixed Savannah bug 4391 (readdir race condition leading to
+       spurious error messages)
+
+2004-04-24  James Youngman <jay@gnu.org>
+
+       * README-CVS: Corrected the instructions for getting gnulib via CVS.
+
+2004-04-13  James Youngman <jay@gnu.org>
+
+       * doc/find.texi:
+       Actioned Savannah bug #8558 (find complains when it tries to recurse
+       into directories that it had removed).
+
+2004-03-13  James Youngman <jay@gnu.org>
+
+       * ChangeLog: Updated from checkin comments.
+
+       * find/find.c:
+       Oops, there is no access to the predicate name table if DEBUG is
+       not #defined.
+
+       * find/parser.c:
+       Detect arithmetic overflow (poorly) in insert_time(), which diagnoses
+       the failure to handle large arguments to -mtime.  The existing code
+       does careful computation and then bungs the value into a time_t, which
+       ruins all our careful effort.  The new code is not a great
+       improvement.  We just check the result to detect overflow, rather than
+       actually avoiding the overflow.
+
+       * find/find.c:
+       Fixed Debian bug #185202 by checking for any trailing predicates after
+       the top-level invocation of get_expr() has done its work.
+
+       * locate/locate.1, xargs/xargs.1:
+       Fixed Debian bug 175372, inappropriate 'L' suffixes on manual
+       page section indicators
+
+       * find/find.1:
+       Removed "L" suffixes from manual page section indicators, to fix
+       Debian bug 175372.
+
+       * debian/updatedb.conf:
+       Updated with list of filesystems from current Debian release.  This
+       includes devfs, for example.
+
+       * xargs/xargs.1:
+       Modified documentation of "-s" option to take into account the fix for
+       Debian bug #176201.
+
+       * xargs/xargs.c:
+       Fixed Debian bug #176201, "xargs enviroment size limited to 20k", by
+       reading a patch offered by Bob Proulx and implementing something
+       substantially similar myself.
+
+2004-01-03  James Youngman  <jay@gnu.org>
+
+       * xargs/xargs.c:
+       Indicate that prep_child_for_exec() fixes Savannah bug #3992.
+
+       * xargs/xargs.c:
+       Attach the stdin of xargs' child process to /dev/null so that if it
+       tries to read from its stdin it doesn't consume any of the list of
+       files that xargs is trying to use.
+
+       * find/find.1:
+       Documented that the -regex option follows Gnulib's re_match()
+       implementation.
+
+       * NEWS, locate/locate.c: Applied Savannah patch 2108
+
+       * xargs/xargs.c: Applied Savannah patch 1500
+
+       * find/find.1, doc/find.texi:
+       Improved the documentation for the %k and %b format specifiers to
+       -printf (Savannah bug #5034).  Also pointed out that this handling is
+       different to that used by the "b" and "k" suffixes with "-size".
+
+       * find/find.1: Improved the documentation for %k (Savannah bug #5034).
+
+       * find/find.1:
+       Improved the documentation for -print0 in the manpage, fixing Debian
+       bug 111143.
+
+       * README-CVS, find/pred.c, lib/listfile.c:
+       Brought up-to-date with change in gnulib's human.c - we no longer
+       use human_readable_inexact(), because it is no longer provided.
+
+2003-08-08  James Youngman  <jay@gnu.org>
+
+       * find/find.1:
+       Documented the fact that -printf also supports the '\0' escape code.
+       Added "STANDARDS CONFORMANCE" section.
+
+2003-08-02  James Youngman  <jay@gnu.org>
+
+       * find/find.1:
+       Explain that braces are not special when performing filename matching
+       with -name.
+
+       * find/find.1:
+       added example of the use of -exec to the EXAMPLES section
+
+       * find/fstype.c, locate/locate.c:
+       Savannah bug #4295 - implicit declarations of ctype.h functions
+
+       * locate/locate.c:
+       Savannah bug #4279 - missing newline on locate help message
+
+       * find/find.1, xargs/xargs.1:
+       Improved discussion of the -print0 option of find and the -0 option of xargs
+
+2003-06-26  James Youngman  <jay@gnu.org>
+
+       * import-gnulib.sh:
+       Remove reference to nonexistent module "basename" ("dirname" exists
+       and we already use that).
+
+2003-06-21  James Youngman  <jay@gnu.org>
+
+       * doc/find.texi:
+       Indicate that xargs stops immediately if a command exits with status 255
+
+       * xargs/xargs.1:
+       Document the fact that xargs exits immediately with an error message
+       if the command it executes exits with a status of 255.
+
+2003-06-18  James Youngman  <jay@gnu.org>
+
+       * find/find.1:
+       Indicate that -fls and friends always create their output file
+
+2003-06-16  James Youngman  <jay@gnu.org>
+
+       * ChangeLog, find/find.1, locate/locate.1, locate/locatedb.5, locate/updatedb.1, xargs/xargs.1:
+       Added BUGS section to manual pages.   This section includes information about known bugs and how to report new bugs.
+
+       * AUTHORS: Identify the current maintainer.
+
+       * TODO: Removed the TODO items which have now been done.
+
+       * THANKS: Added Bruno Haible and Bob Proulx.
+
+       * xargs/xargs.c: xargs/xargs.c (DO_MULTIBYTE): New macro.
+       (mbstrstr): New function.
+       (do_insert): Use it instead of strstr.
+
+       * config.guess, config.sub:
+       Use config.guess and config.sub from automake
+
+       * find/fstype.c:
+       Bruno Haible: (fstype_to_string) Don't define this function if
+       HAVE_F_FSTYPENAME_IN_STATFS is defined.
+
+       * configure.in:
+       Bruno Haible: Prefer the 4.4BSD API (if present) to the 4.3BSD API,
+       because some 4.4BSD systems have <mntent.h> but no /etc/mtab file.
+
+       * doc/find.texi, find/find.1:
+       Applied patch 1498 (documenting the backslash escape sequence)
+
+       * locate/updatedb.sh: Applied (my own version of) Savannah patch 1601.
+
+       * doc/find.texi:
+       Applied Savannah patch #1547 (document the fact that printf
+       field-width specifiers are supported).
+
+       * xargs/xargs.c:
+       Applied Savannah patch #1499 (adds final newline to usage message).
+
+2003-06-14  James Youngman  <jay@gnu.org>
+
+       * NEWS, configure.in:
+       Updated version number to 4.2.0-CVS [not ready for release yet]
+
+       * configure.in, doc/.cvsignore, doc/Makefile.in, find/.cvsignore, find/Makefile.am, find/Makefile.in, find/defs.h, find/find.c, find/fstype.c, find/parser.c, find/pred.c, find/testsuite/.cvsignore, find/testsuite/Makefile.in, find/testsuite/config/unix.exp, find/tree.c, find/util.c, import-gnulib.sh, intl/bindtextdom.c, intl/dcgettext.c, intl/dcigettext.c, intl/dcngettext.c, intl/dgettext.c, intl/dngettext.c, intl/explodename.c, intl/finddomain.c, intl/gettext.c, intl/intl-compat.c, intl/l10nflist.c, intl/loadmsgcat.c, intl/localcharset.c, intl/localealias.c, intl/ngettext.c, intl/plural.y, intl/textdomain.c, lib/.cvsignore
+       also need stpcpy (e.g. for Solaris)
+
+       * intl/dcigettext.c:
+       plural_lookup: don't use a variable called "index", because we may
+       have done "#define strchr index", in which case using a variable
+       called index will prevent us calling strchr(p, ch) in the same scope.
+
+       * find/defs.h, find/find.c, find/fstype.c, find/parser.c, find/pred.c, find/testsuite/config/unix.exp, find/tree.c, find/util.c, import-gnulib.sh, lib/Makefile.am, lib/listfile.c, lib/modetype.h, lib/nextelem.c, locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, locate/locatedb.h, locate/testsuite/config/unix.exp, locate/updatedb.sh, xargs/testsuite/config/unix.exp, xargs/xargs.c:
+       Updated copyright years and the address of the FSF
+
+       * aclocal.m4, config.h.in, configure:
+       Removed files that are generated from other files (e.g. configure)
+
+       * NEWS: Updated NEWS file for 4.1.20.
+
+       * configure.in, lib/Makefile.am, po/POTFILES.in, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po:
+       Updates to the i18n files to ensure that 'make dist' succeeds
+
+       * lib/posix/.cvsignore, lib/posix/Makefile.am,
+       lib/posix/Makefile.in, lib/posix/regex.h, lib/strftime.c,
+       lib/strncasecmp.c, lib/strspn.c, lib/strstr.c, lib/strtol.c,
+       lib/strtoul.c, lib/strtoull.c, lib/strtoumax.c, lib/wait.h,
+       lib/waitpid.c, lib/xalloc.h, lib/xgetcwd.c, lib/xmalloc.c,
+       lib/xstat.in, lib/xstrdup.c, lib/xstrtol.c, lib/xstrtol.h,
+       lib/xstrtoul.c, lib/xstrtoul.h, lib/xstrtoumax.c, lib/yesno.c,
+       locate/Makefile.am, locate/Makefile.in, locate/locate.c,
+       locate/testsuite/Makefile.in, m4/.cvsignore, m4/ChangeLog,
+       m4/Makefile.am, m4/Makefile.am.in, m4/Makefile.in, m4/README,
+       m4/afs.m4, m4/assert.m4, m4/c-bs-a.m4, m4/check-decl.m4,
+       m4/codeset.m4, m4/d-ino.m4, m4/d-type.m4, m4/error.m4,
+       m4/fnmatch.m4, m4/fnmatchcase.m4, m4/fstypename.m4, m4/getline.m4,
+       m4/gettext.m4, m4/glibc.m4, m4/glibc21.m4, m4/iconv.m4,
+       m4/inttypes_h.m4, m4/isc-posix.m4, m4/jm-glibc-io.m4,
+       m4/jm-macros.m4, m4/jm-mktime.m4, m4/lcmessage.m4, m4/libintl.m4,
+       m4/link-follow.m4, m4/ls-mntd-fs.m4, m4/lstat-slash.m4,
+       m4/lstat.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/memcmp.m4,
+       m4/prereq.m4, m4/progtest.m4, m4/readdir.m4, m4/realloc.m4,
+       m4/regex.m4, m4/st_dm_mode.m4, m4/st_mtim.m4, m4/stat.m4,
+       m4/strerror_r.m4, m4/strftime.m4, m4/timespec.m4, m4/uintmax_t.m4,
+       m4/ulonglong.m4, m4/xstrtoumax.m4, xargs/Makefile.am,
+       xargs/Makefile.in, xargs/testsuite/Makefile.in,
+       find/testsuite/Makefile.in, lib/.cvsignore, lib/Makefile.am,
+       lib/Makefile.in, lib/alloca.c, lib/ansi2knr.1, lib/ansi2knr.c,
+       lib/argmatch.c, lib/argmatch.h, lib/basename.c, lib/basename.h,
+       lib/dirname.c, lib/dirname.h, lib/error.c, lib/error.h,
+       lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/fnmatch.c,
+       lib/fnmatch.h, lib/getline.c, lib/getline.h, lib/getopt.c,
+       lib/getopt.h, lib/getopt1.c, lib/human.c, lib/human.h,
+       lib/idcache.c, lib/malloc.c, lib/memcmp.c, lib/memcpy.c,
+       lib/memset.c, lib/mktime.c, lib/modechange.c, lib/modechange.h,
+       lib/pathmax.h, lib/quotearg.c, lib/quotearg.h, lib/realloc.c,
+       lib/regex.c, lib/regex.h, lib/rpmatch.c, lib/savedir.c,
+       lib/savedir.h, lib/stpcpy.c, lib/strcasecmp.c, lib/strdup.c,
+       find/Makefile.am, find/Makefile.in, find/find.c, find/pred.c:
+       Updated to work with current version of gnulib
+
+       * import-gnulib.sh: New file.
+
+       * config.h.in, configure, configure.in, doc/Makefile.in, import-gnulib.sh:
+       Updated to work with current version of gnulib
+
+       * README-CVS: New file.
+
+       * Makefile.am, Makefile.in, README-CVS, aclocal.m4:
+       Updated to work with current version of gnulib
+
+2003-05-26  James Youngman <jay@gnu.org>
+
+       * po/pl.po, pt_BR.po, ru.po, sv.po, tr.po, da.po, de.po, es.po,
+       et.po, findutils.pot, fr.po, gl.po, id.po, it.po, ko.po, nl.po:
+       Changes to allow compilation on non-GNU systems (i.e. for the
+       macros that gnulib decides to #define to be effective)
+
+2003-05-24  James Youngman <jay@gnu.org>
+
+       * po/da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po,
+       id.po, it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sv.po, tr.po:
+       also need stpcpy (e.g. for Solaris)
+
+       * po/POTFILES.in, da.po, de.po, es.po, et.po, findutils.pot, fr.po,
+       gl.po, id.po, it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sv.po,
+       tr.po: Updates to the i18n files to ensure that 'make dist'
+       succeeds
+
+2001-06-09  Kevin Dalley  <kevin@seti.org>
+
+       * intl/plural.c:
+       Changes the location of bison.simple after running bison on local
+       machine
+
+       * ChangeLog: *** empty log message ***
+
+       * Makefile.in, aclocal.m4, config.h.in, configure,
+       doc/Makefile.in, find/Makefile.in, find/testsuite/Makefile.in,
+       lib/Makefile.in, lib/posix/Makefile.in, locate/Makefile.in,
+       locate/testsuite/Makefile.in, m4/Makefile.in, xargs/Makefile.in,
+       xargs/testsuite/Makefile.in: Updates mostly from gettext-0.10.38
+
+       * ABOUT-NLS: * ABOUT-NLS: updated from gettext-0.10.38.
+
+       * configure.in: * configure.in: add tr to ALL_LINGUAS.
+
+       * intl/config.charset, intl/dcigettext.c, intl/dcngettext.c,
+       intl/dngettext.c, intl/libgnuintl.h, intl/localcharset.c,
+       intl/locale.alias, intl/ngettext.c, intl/plural.y,
+       intl/ref-add.sin, intl/ref-del.sin: updated from gettext-0.10.38
+
+       * intl/cat-compat.c, intl/linux-msg.sed, intl/po2tbl.sed.in,
+       intl/xopen-msg.sed, m4/ChangeLog: *** empty log message ***
+
+       * m4/jm-macros.m4:
+       * jm-macros.m4 (jm_MACROS): remove jm_ICONV, which is replaced by
+       AM_ICONV, which is imported from gettext-0.10.38.  removed
+       jm_GLIBC21, which is required in AM_GNU_GETTEXT, which is
+       imported from gettext-0.10.38.
+
+       * po/stamp-cat-id:      * stamp-cat-id: Remove file.
+
+       * po/Makefile.in.in:    * Makefile.in.in: Upgrade to gettext-0.10.38.
+
+       * po/ChangeLog: * cat-id-tbl.c: Remove file.
+
+       * po/de.po, po/es.po, po/et.po, po/fr.po:
+       * fr.po, et.po, es.po, de.po: updated translations to
+       findutils-4.1.7.
+
+       * po/tr.po: * tr.po:  New Turkish translation.
+
+       * m4/ChangeLog: *** empty log message ***
+
+       * intl/dgettext.c, intl/explodename.c, intl/finddomain.c,
+       intl/gettext.c, intl/gettext.h, intl/gettextP.h,
+       intl/hash-string.h, intl/intl-compat.c, intl/l10nflist.c,
+       intl/libgettext.h, intl/loadinfo.h, intl/loadmsgcat.c,
+       intl/localealias.c, intl/plural.c, intl/textdomain.c,
+       intl/ChangeLog, intl/Makefile.in, intl/VERSION,
+       intl/bindtextdom.c, intl/dcgettext.c: Updated from gettext-0.10.38
+
+       * m4/Makefile.am:
+       reflects addition of codeset.m4 from gettext-0.10.38, automatically
+       generated.
+
+       * m4/codeset.m4, m4/gettext.m4, m4/glibc21.m4, m4/iconv.m4,
+               m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4: *
+               progtest.m4, lcmessage.m4, isc-posix.m4, iconv.m4,
+               glibc21.m4, gettext.m4, codeset.m4: updated from
+               gettext-0.10.38.
+
+       * ChangeLog: *** empty log message ***
+
+       * THANKS: added "Gerrit P. Haase" <gerrit.haase@t-online.de>
+
+       * m4/ChangeLog, locate/testsuite/.cvsignore,
+       xargs/testsuite/.cvsignore, config.h.in, configure, aclocal.m4,
+       doc/.cvsignore: *** empty log message ***
+
+       * m4/jm-macros.m4:      * jm-macros.m4 (jm_MACROS): add jm_FSTYPENAME
+
+       * doc/Makefile.in: *** empty log message ***
+
+       * doc/Makefile.am:
+       * doc/Makefile.am (MOSTLYCLEANFILES): add find.cps, which is
+       created by dvips.  This should be taken care of by automake, but
+       the code is commented out.
+
+2001-06-09  Kevin Dalley  <kevin@seti.org>
+
+       * ABOUT-NLS: updated from gettext-0.10.38.
+
+       * configure.in: add tr to ALL_LINGUAS.
+
+       * doc/Makefile.am (MOSTLYCLEANFILES): add find.cps, which is
+       created by dvips.  This should be taken care of by automake, but
+       the code is commented out.
+
+       * po/stamp-cat-id:      * stamp-cat-id: Remove file.
+
+       * po/Makefile.in.in:    * Makefile.in.in: Upgrade to gettext-0.10.38.
+
+       * po/ChangeLog: * cat-id-tbl.c: Remove file.
+
+       * po/de.po, es.po, et.po, fr.po:
+       * po/fr.po, et.po, es.po, de.po: updated translations to
+       findutils-4.1.7.
+
+       * po/tr.po: * tr.po:  New Turkish translation.
+
+2001-06-05  Kevin Dalley  <kevin@seti.org>
+
+       * locate/updatedb.sh: replace "whoami" with "id -u" when testing
+       for root.
+
+2001-06-04  Kevin Dalley  <kevin@seti.org>
+
+       * locate/testsuite/Makefile.am (DIST_SUBDIRS): remove second
+       instance of DIST_SUBDIRS.
+
+       * locate/Makefile.am (install-data-hook): changed install target
+       to install-data-hook, which still installs other files.
+
+       * doc/Makefile.am (MOSTLYCLEANFILES): added find.cps, which should
+       probably be handled by automake.
+
+       * doc/mdate-sh: removed file in doc directory.  It now exists only
+       in top_srcdir, but this changed required a patch to automake.
+
+2001-06-01  gettextize  <bug-gnu-utils@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.10.38.
+       * cat-id-tbl.c: Remove file.
+       * stamp-cat-id: Remove file.
+
+2001-05-20  Kevin Dalley  <kevin@seti.org>
+
+       * Version 4.1.7
+
+       * lib/Makefile.am (EXTRA_DIST): add strcasecmp.c
+
+       * find/testsuite/Makefile.am (EXTRA_DIST): new tests:
+       find.gnu/name-opt.exp find.gnu/perm.exp find.gnu/perm.xo
+       find.gnu/prune-default-print.exp find.gnu/prune-default-print.xo
+
+       * configure.in: update to 4.1.7
+
+       * config.sub, config.guess: upgraded to recent versions of
+       config.sub and config.guess.
+
+       * locate/updatedb.sh: Add space to "#! /bin/sh"
+
+       * configure.in: Add id to ALL_LINGUAS
+
+       * lib/Makefile.am (EXTRA_DIST):  getline.[ch] added
+       (libfind_a_SOURCES): getline.[ch] removed since getline.c is not
+       always needed.
+
+       * po/da.po, de.po, es.po, et.po, fr.po, gl.po, id.po, it.po, ko.po,
+       nl.po, pl.po, pt_BR.po, ru.po, sv.po: updated to reflect changes
+       in source code.
+
+       * po/id.po: New translation for Indonesia.
+
+2001-05-20  Lionel CONS <lionel.cons@cern.ch>
+
+       * find/find.c: Fixed security holes.  1.  There is a race
+       condition between the lstat() to detect a symbolic link and the
+       actual chdir().  2.  An attacker can move directories while find
+       is _inside_ so that chdir(..) goes out of the intended file tree.
+
+       * lib/modetype.h: support for Solaris door files is added.
+
+       * lib/filemode.c: S_ISDOOR is undef'ed if STAT_MACROS_BROKEN
+
+       * find/pred.c (pred_type): -D option (for Solaris door files) is
+       added.
+
+       * find/parser.c (insert_type):  -D option (for Solaris door files)
+       is added.
+
+       * find/find.1: -D option (for Solaris door files) is documented
+
+       * doc/find.texi (Type): -D option (for Solaris door files) is
+       documented
+
+2001-05-02  Kevin Dalley  <kevin@seti.org>
+
+       * configure.in: Change AC_CHECK_MEMBERS to conform to new
+       autoconf.  Add Danish.
+
+2001-04-28  Kevin Dalley  <kevind@rahul.net>
+
+       * po/sv.po, ru.po, pt_BR.po, pl.po, nl.po, ko.po, it.po, gl.po,
+       fr.po, et.po, es.po, de.po, findutils.pot:  new translations, and
+       new source code to translate.
+
+       * po/da.po: new Danish translation.
+
+2001-01-20  Kevin Dalley  <kevin@seti.org>
+
+       * doc/find.texi (Adding Tests): Place space in "#! /bin/sh".
+
+       * find/testsuite/find.gnu/prune-default-print.xo,
+       find/testsuite/find.gnu/prune-default-print.exp: test for "find
+       . -prune" which passes after changes.  Also see name-opt.exp.
+
+       * find/util.c (get_new_pred):
+       * find/tree.c (set_new_parent):
+       * find/parser.c (various parse functions):
+       * find/find.c (main):
+       (default_prints): new function
+       * find/defs.h (struct predicate): added no_default_print
+       side_effects are no separated from no_default_print.  predicates
+       which cause side effects should not be reordered (optimized).
+       predicates which cause printing should have printing turned off.
+       Printing statements also cause side effects.
+
+2000-10-29  Bruno Haible <haible@ilog.fr>
+
+       * locate/code.c (main), doc/find.texi: improve handling of
+       non-ASCII characters used old format.
+
+2000-10-21  Paul Eggert  <eggert@twinsun.com>
+
+       If open + fchdir fails, fall back on xgetcwd + chdir.
+       The old code tested for this at compile-time,
+       but SunOS 4.1.4 fchdir can fail at run-time.
+
+       * find/defs.h (fchdir): Define to -1 if not available.
+       * find/defs.h (starting_dir, starting_desc):
+       Always declare.  starting_dir now points to const.
+       * find/find.c (starting_dir, starting_desc): Likewise.
+       * find/find.c (starting_dir):
+       Now "." if starting_desc is nonnegative, for benefit of diagnostics.
+       (main, process_top_path, process_dir):
+       If open + fchdir fails, fall back on xgetcwd + chdir.
+       * find/pred.c (launch): Likewise.
+
+2000-10-20  Kevin Dalley  <kevin@seti.org>
+
+       * xargs/xargs.c, locate/updatedb.sh, locate/locate.c (usage),
+       find/parser.c (parse_help): add bug reporting address to help
+
+2000-10-13  Kevin Dalley  <kevin@seti.org>
+
+       * depcomp, lib/depcomp: depcomp moved from lib to .
+
+       * po/sv.po, ru.po, pt_BR.po, pl.po, nl.po, ko.po, it.po, gl.po,
+       fr.po, findutils.pot, et.po, es.po, de.po: updated after addition
+       of lib/rpmatch.c
+
+2000-10-11  Kevin Dalley  <kevind@rahul.net>
+
+       * Version 4.1.6
+
+       * locate/testsuite/config/unix.exp: set PRUNEFS to "" for the
+       testsuite.
+
+2000-10-10  Bruno Haible <haible@ilog.fr>
+
+       * lib/Makefile.am (libfind_a_SOURCES): added yesno.c
+
+       * lib/yesno.c, lib/rpmatch.c: new files.
+
+       * find/pred.c: use function yesno().
+
+2000-10-10  Kevin Dalley  <kevind@rahul.net>
+
+       * locate/testsuite/Makefile.am: Added missing \ at end of
+       EXTRA_DIST lines.
+
+       * locate/testsuite/locate.gnu/ignore_case3.xo,
+       locate/testsuite/locate.gnu/ignore_case3.exp,
+       locate/testsuite/locate.gnu/ignore_case2.exp,
+       locate/testsuite/locate.gnu/ignore_case1.xo,
+       locate/testsuite/locate.gnu/ignore_case1.exp: place locatedb
+       inside tmp directory, add subdir directory under tmp.
+
+       * locate/testsuite/config/unix.exp: clean up tmp after test is
+       finished.
+
+2000-10-10  Kevin Dalley  <kevind@rahul.net>
+
+       * locate/testsuite/config/unix.exp (Repository):
+
+       * po/POTFILES.in: added lib/rpmatch.c
+
+2000-10-09  Kevin Dalley  <kevind@rahul.net>
+
+       * lib/fnmatch.c, lib/fnmatch.h: reverted to older version of
+       fnmatch which works with Solaris.
+
+       * locate/testsuite/config/unix.exp: dejagnu unix.exp
+
+       * xargs/testsuite/config/unix.exp: remove temporary file
+
+       * xargs/xargs.c: spelling correction
+
+       * m4/prereq.m4: updated and changed some macros
+
+       * m4/jm-macros.m4: replaced jm_FUNC_FNMATCH with
+       kd_FUNC_FNMATCH_CASE_REPL
+
+       * m4/timespec.m4, m4/strerror_r.m4, m4/mbstate_t.m4,
+       m4/largefile.m4, m4/gettext.m4, m4/fnmatchcase.m4, m4/d-type.m4,
+       m4/d-ino.m4, m4/c-bs-a.m4: new m4 macros.
+
+       * m4/Makefile.am: add fnmatchcase.m4 and mbstate_t.m4
+
+       * locate/testsuite/locate.gnu/ignore_case3.xo,
+       locate/testsuite/locate.gnu/ignore_case3.exp,
+       locate/testsuite/locate.gnu/ignore_case2.xo,
+       locate/testsuite/locate.gnu/ignore_case2.exp,
+       locate/testsuite/locate.gnu/ignore_case1.xo,
+       locate/testsuite/locate.gnu/ignore_case1.exp,
+       locate/testsuite/config/unix.exp: tests related to "--ignore-case"
+       option.
+
+       * locate/testsuite/locate.gnu: testsuite directory
+
+       * locate/testsuite/Makefile.am (Repository):
+
+       * locate/testsuite: add directory for locate testsuite
+
+       * po/findutils.pot: updated file
+
+       * po/sv.po, po/ru.po, po/pt_BR.po, po/pl.po, po/nl.po, po/ko.po,
+       po/it.po, po/gl.po, po/fr.po, po/et.po, po/es.po, po/de.po:
+       updated various po files.
+
+       * locate/updatedb.sh: export TMPDIR, which is used by child
+       processes.
+
+       * locate/locate.1, locate/locate.c:  add "--ignore-case" option.
+
+       * locate/Makefile.am: add testsuite subdirectory
+
+       * find/testsuite/find.gnu/perm.xo,
+       find/testsuite/find.gnu/perm.exp,
+       find/testsuite/find.gnu/name-opt.xo,
+       find/testsuite/find.gnu/name-opt.exp: added test suites
+
+       * configure.in: add locate/testsuite/Makefile
+
+       * doc/find.info*: removed from repository
+
+       * doc/find.texi: add documentation for "-i" option.
+
+       * aclocal.m4: removed from repository, as it is generated.
+
+       * find/pred.c: fixes problem with "find -perm -0100".
+
+       * lib/lstat.c, lib/stat.c: removed from repository.  These files
+       are generated from lib/xstat.in.
+
+2000-08-24  Kevin Dalley  <kevind@rahul.net>
+
+       * doc/find.texi (Invoking xargs): changed @var{-s} to @samp{-s}.
+
+2000-05-13  Kevin Dalley  <kevind@rahul.net>
+
+       * find/tree.c (opt_expr): move iname and ipath to the front of the
+       list of arguments.
+
+       * doc/find.texi (Directories): changed wording for "-prune".
+
+       * find/parser.c (parse_prune): set side_effects to true, to
+       prevent prune from being moved in opt_expr.
+
+2000-04-12  Kevin Dalley  <kevind@rahul.net>
+
+       * doc/find.texi, doc/permi.texi: fix spellings, add LocalWords.
+
+       * lib/Makefile.am: put getline.c back into libfind_a_SOURCES,
+       since getstr is needed.
+
+       * Version 4.1.5
+
+       * po/POTFILES.in: updated list of files, updated po files.
+
+
+2000-04-02  Paul Eggert  <eggert@twinsun.com>
+
+       Add support for large files, and port to Solaris 8 and earlier
+       versions.
+
+       * lib/human.c (getenv): Depend on NEED_GETENV_DECL, not
+       HAVE_DECL_GETENV.
+
+       * lib/strftime.c (my_strftime): Make sure we call the system
+       strftime, not ourselves, when invoking the underlying strftime.
+
+       * m4/check-decl.m4 (jm_CHECK_DECLS): Remove memchr, nanosleep.
+
+       * m4/jm-macros.m4 (jm_MACROS): Don't check for utime.h.  Do not
+       require jm_BISON, jm_CHECK_TYPE_STRUCT_UTIMBUF, jm_FUNC_LCHOWN,
+       jm_FUNC_CHOWN, jm_FUNC_NANOSLEEP, jm_FUNC_GROUP_MEMBER,
+       jm_FUNC_PUTENV, jm_FUNC_GETGROUPS, AM_FUNC_GETLOADAVG,
+       jm_SYS_PROC_UPTIME, jm_FUNC_FTRUNCATE, jm_FUNC_UTIME.  Do not
+       replace strcasecmp, dup2, gethostname, getusershell, stime,
+       strcspn, strpbrk, euidaccess, mkdir, rmdir, rpmatch, strndup,
+       strverscmp, memchr, memmove.  Do not check for declaration of
+       lchown.  Remove invocations of AM_FUNC_OBSTACK, AM_FUNC_STRTOD,
+       POW_LIBM, jm_LANGINFO_CODESET, jm_ICONV.  Remove df tests.
+       (jm_CHECK_ALL_TYPES): Include <sys/stat.h> when checking for
+       struct stat.st_blksize.
+
+       * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set environment variable
+       in shell rather than using putenv, which isn't portable.
+
+       * COPYING, lib/alloca.c, lib/dirname.c, lib/error.c,
+       lib/savedir.c, lib/strstr.c, m4/check-decl.m4, m4/d-ino.m4,
+       m4/d-type.m4, m4/getline.m4, m4/jm-glibc-io.m4, m4/jm-macros.m4,
+       m4/jm-mktime.m4, m4/ls-mntd-fs.m4, m4/memcmp.m4, m4/prereq.m4,
+       m4/readdir.m4, m4/regex.m4, m4/strftime.m4, m4/uintmax_t.m4: Sync
+       to latest version from sh-utils-2.0g.
+
+       * config.guess, config.sub, lib/argmatch.c, lib/argmatch.h,
+       lib/human.c, lib/human.h, lib/memcpy.c, lib/quotearg.c,
+       lib/quotearg.h, lib/strtoull.c, lib/strtoumax.c,
+       lib/xstrtoumax.c, m4/c-bs-a.m4, m4/gettext.m4,
+       m4/largefile.m4, m4/lcmessage.m4, m4/link-follow.m4,
+       m4/progtest.m4, m4/strerror_r.m4, m4/timespec.m4,
+       m4/xstrtoumax.m4: New files, taken from sh-utils-2.0g.
+
+       * lib/ansi2knr.1, lib/ansi2knr.c, lib/basename.c, lib/getopt.h,
+       lib/fnmatch.c, lib/fnmatch.h, lib/modechange.c: Sync to latest
+       unreleased version of GNU tar (between 1.13.17 and 1.13.18).
+
+       * lib/basename.h, lib/waitpid.c: New files, taken from same
+       version of GNU tar.
+
+       * lib/regex.c, lib/regex.h: Sync to GNU grep 2.4.2.
+
+       * lib/posix/Makefile.am, lib/posix/regex.h: New files, taken from
+       GNU grep 2.4.2.
+
+       * lib/strftime.c: Sync to textutils 2.0e.
+
+       * acconfig.h, depcomp, lib/strcasecmp.c, m4/check-type.m4,
+       m4/const.m4, m4/decl.m4, m4/lfs.m4, m4/mktime.m4, m4/perl.m4,
+       m4/putenv.m4, m4/uptime.m4, m4/utimbuf.m4, m4/utime.m4,
+       m4/utimes.m4: Remove these files; no longer needed.
+
+       * configure.in (AC_CANONICAL_HOST, AC_SYS_LARGEFILE,
+       jm_AC_TYPE_UINTMAX_T): Add.
+       (CACHE_IDS, FSTYPE_STATVFS, FSTYPE_USG_STATFS, FSTYPE_AIX_STATFS,
+       FSTYPE_MNTENT, FSTYPE_STATFS, FSTYPE_GETMNT): Add comment, so that
+       we don't need acconfig.h.
+       (AC_CHECK_TYPE): Add ssize_t.
+       (AC_REPLACE_FUNCS): Add waitpid.
+       (AC_CHECK_FUNCS): Remove basename.
+       (AC_FUNC_MKTIME): Remove.
+       (LIBOBJS): Add no-ops to work around automake 1.4 bug.
+       (AC_OUTPUT): Add lib/posix/Makefile.
+
+       * find/defs.h: Include <config.h>, <sys/types.h>, <sys/stat.h>,
+       <stdio.h>, <limits.h>, <inttypes.h>.  All includers changed to not
+       include these files, and to include "defs.h" first (since config.h
+       must be included first).
+       (CHAR_BIT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
+       S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, MOD_WXUSR,
+       MODE_R, MODE_RW, MODE_RWX, MODE_ALL): New macros.
+       (enum permissions_type): New enum.
+       (struct long_val.negative): New member.
+       (struct long_val.l_val): Now uintmax_t, not unsigned long.
+       (struct size_val.size): Likewise.
+       (struct perm_val): New type.
+       (struct predicate.perm): Now struct perm_val, not unsigned long.
+       (struct predicate.type): Now mode_t, not unsigned long.
+       (list_file): New parameters current_time, output_block_size.
+       All callers changed.
+       (savedir, basename): Remove decls.
+       (output_block_size, start_time): New extern vars.
+
+       * find/find.c: Include <human.h>, <savedir.h>.
+       (output_block_size, start_time): New vars.
+       (main): Initialize them.  No need to check for negative st_size,
+       since savedir now does it for us.
+
+       * find/fstype.c: Include "dirname.h".
+       (xatoi): Remove.
+       (filesystem_type_uncached): Use xstrtoumax instead of xatoi.
+
+       * find/parser.c: Include "xstrtol.h".
+       (get_num_days, get_num, parse_amin, parse_cmin, parse_mmin,
+       parse_size, parse_used, insert_time, insert_num): Compute using
+       uintmax_t, not unsigned long.
+       (parse_amin, parse_cmin, parse_mmin, parse_used, insert_time):
+       Keep track of whether time was negative before converting it to an
+       unsigned type.
+       (parse_daystart): Don't assume that localtime succeeds; e.g. it
+       can fail with 64-bit time_t and 32-bit tm_year.
+       (parse_perm, insert_type): Compute using mode_t, not unsigned
+       long.
+       (insert_type): Use symbolic constants like MODE_ALL instead of
+       traditional ones like 07777.  Set new kind member to indicate
+       permissions type, instead of using unportable magic numbers.
+       (make_segment): We will use human_readable to convert most numeric
+       values, so simplify the cases.
+       (get_num_days): Write in terms of get_num, to avoid duplicated
+       code.
+       (insert_time, insert_num): When debugging, convert large values to
+       uintmax_t and output with %ju.
+       (get_num): Use xstrtoumax to do the real work.
+
+       * find/pred.c: Include "basename.h", "human.h".
+       (DEV_BSIZE, ST_BLKSIZE, ST_NBLOCKSIZE): New macros, taken from
+       fileutils.
+       (ST_NBLOCKS): Replace with fileutils defn.
+       (MAX): New macro.
+       (ctime_format): New function.
+       (pred_fprintf, format_date): Use human_readable to output large
+       numbers portably.
+       (pred_fprintf): Use ctime_format to output ctime-style dates.  Use
+       base_name to compute the base name of a path.  With %m, output the
+       mode portably using traditional numbers, even if the host uses
+       some other numbering scheme.
+       (pred_iname, pred_name): basename -> base_name.
+       (pred_perm): Use new kind member to deduce permissions type,
+       instead of relying on magic numbers.
+       (pred_size): Compute using uintmax_t, not unsigned long.  Avoid
+       overflow if file size is near the maximum.
+       (pred_type): Compute using mode_t, not unsigned long.
+       (launch): Use waitpid, not wait.  Check for EINTR.
+       (format_date): Don't assume that localtime succeeds.
+
+       * find/util.c (basename): Remove; we now use base_name.
+
+       * lib/Makefile.am (SUBDIRS): New macro.
+       (libfind_a_SOURCES): Add argmatch.h, argmatch.c, basename.h,
+       basename.c, human.c, human.h, quotearg.c, quotearg.h, xstrtoumax.c.
+       Remove error.h, error.c, getline.c.
+       (EXTRA_DIST): Add mktime.c, regex.c.
+
+       * lib/listfile.c: Include "human.h".
+       (alloca): Declare, or include appropriate files to declare.
+       (DEV_BSIZE, ST_NBLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE): New macros.
+       (convert_blocks): Remove.
+       (list_file): New current_time and output_block_size args.
+       Revamp quite a bit, to handle large numbers correctly
+       and to match GNU ls behavior more closely.
+
+       * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4, gettext.m4,
+       largefile.m4, lcmessage.m4, link-follow.m4, progtest.m4,
+       strerror_r.m4, xstrtoumax.m4.  Remove check-type.m4, const.m4,
+       decl.m4, lfs.m4, mktime.m4, perl.m4, putenv.m4, timespec.m4,
+       uptime.m4, utimbuf.m4, utime.m4, utimes.m4.
+
+       * xargs/xargs.c (wait_for_proc): Retry wait if it fails with
+       errno == EINTR.
+
+2000-04-05  Kevin Dalley  <kevind@rahul.net>
+
+       * xargs/Makefile.am:  add ansi2knr
+
+       * xargs/xargs.c: add macros PARAMS rather than P_.  Add
+       prototypes.
+
+       * po/POTFILES: new file listing all POFILES.
+
+       * m4/gl.po, m4/et.po: new files
+
+       * m4/Makefile.am.in:  updated file
+
+       * m4: update directory
+
+       * locate/Makefile.am: create updatedb from updatedb.sh
+
+       * locate/updatedb.sh, locate/updatedb.in: removed file.  Replaced
+       by updatedb.sh
+
+       * locate/frcode.c, locate/code.c, locate/bigram.c: add macros
+       PARAMS rather than P_.  Add prototypes.
+
+       * lib/xstat.in: new file
+
+       * lib/Makefile.am: update to latest versions of library files.
+
+       * find/testsuite/Makefile.am: add CLEANFILES
+
+       * find/util.c: remove definition of basename
+
+       * find/util.c, find/tree.c, find/pred.c, find/parser.c,
+       find/fstype.c, find/find.c, find/defs.h: add macros PARAMS rather
+       than P_, for consistency, change to prototypes
+
+       * find/Makefile.am: Add prototypes and ansi2knr
+
+       * configure.in: add Galition and Estonian languages.
+       Miscellaneous other fixes.
+
+
+2000-03-11  Kevin Dalley  <kevind@rahul.net>
+
+       * lib/basename.c: Add file from libit.
+       * lib/Makefile.am (libfind_a_SOURCES): add basename.c since it is
+       no longer replaceable.
+
+       * find/util.c: Remove definition of basename, which is now in
+       lib/basename.c (as base_name).
+       * find/pred.c: Use base_name, not basename.
+       * find/defs.h: Likewise.
+
+       * configure.in : Don't replace basename.  Now we use only
+       base_name.
+
+2000-02-26  Kevin Dalley  <kevind@rahul.net>
+
+       * Version 4.1.4
+
+       * lib/strtoul.c: added to distribution
+
+       * configure.in: added strtoul to AC_REPLACE_FUNCS
+
+       * configure.in: added jm_CHECK_ALL_TYPE
+
+2000-02-23  Kevin Dalley  <kevind@rahul.net>
+
+       * po/ChangeLog: removed, merged with top-level ChangeLog.
+
+       * po/de.po: new version of German file.
+
+       * po/gl.po, po/et.po: new languages, Estonian and Galician.
+
+       * locate/updatedb.sh (PRUNEFS): enclose paths in quotes
+
+2000-02-17  Kevin Dalley  <kevind@rahul.net>
+
+       * po/it.po: new version of Italian file.
+
+       * locate/updatedb.sh (prunefs_exp): have sed statement use '*'
+       rather than the often unsupported '+'.
+
+2000-02-13  Kevin Dalley  <kevind@rahul.net>
+
+       * configure.in: removed AC_ARG_PROGRAM, which is already in
+       AM_INIT_AUTOMAKE.
+
+       * locate/Makefile.am (updatedb), locate/updatedb.sh: add
+       transforms of find, frcode, bigram, and code back into
+       updatedb.sh, which were accidentally removed.
+
+2000-02-12  Kevin Dalley  <kevind@rahul.net>
+
+       * lib/wait.h: updated address.
+
+2000-01-26  Kevin Dalley  <kevind@rahul.net>
+
+       * Version 4.1.3
+
+       * acconfig.h: added internationalization.
+
+       * intl/*: copied from tar-1.13.17.
+
+       * locate/Makefile.am, locate/locate.c, locate/code.c:
+       internationalized file.
+
+       * locate/frcode.c, locate/bigram.c: include headers from ../lib
+       directory.
+
+       * xargs/Makefile.am, xargs/xargs.c: internationalized directory.
+
+2000-01-26  Kevin Dalley  <kevind@rahul.net>
+
+       * po/POTFILES.in: added list of files with translatable strings.
+
+       * de.po, es.po, fr.po, it.po, ko.po, nl.po, pl.po, pt_BR.po,
+       ru.po, sv.po: New, slightly out of date, files imported from the
+       Translation Project: http://www.iro.umontreal.ca/contrib/po/HTML/,
+       German, Spanish, French, Italian, Korean, Dutch, Polish, Brazilian
+       Portuguese.
+
+
+2000-01-24  Kevin Dalley  <kevind@rahul.net>
+
+       * lib/xmalloc.c, lib/regex.c, lib/getopt.c: internationalization
+       works with current version of gettext.
+
+       * lib/getline.h : added declaration of getstr.
+       * lib/Makefile.am (libfind_a_SOURCES): added getline.[ch] to
+       standard compilation. Added internationalization.
+       * find/Makefile.am (INCLUDES): corrected -I options for building
+       in other directories.
+       (LDADD): changes for internationalization.
+
+       * configure.in (ALL_LINGUAS): added internationalization.
+       getline.c is always compiled and linked, because of getstr.
+       AM_GNU_GETTEXT
+
+       * Makefile.am:
+       (DISTCLEANFILES): added intl/libintl.h
+       (AUTOMAKE_OPTIONS): added gnits to AUTOMAKE_OPTIONS
+       (SUBDIRS): added intl and po
+
+       * acconfig.h: added internationalization values
+
+       * THANKS: added thanks file for gnits compatibility.
+
+2000-01-22  Kevin Dalley  <kevind@rahul.net>
+
+       * added intl directory.
+       * created po directory and added existing po files from
+       http://www.iro.umontreal.ca/contrib/po/HTML
+
+       * Added internationalization, only with slightly out of date po
+       files for many locales.
+
+2000-01-18  Kevin Dalley  <kevind@rahul.net>
+
+       * Version 4.1.2
+
+       * locate/Makefile.am: remove creation of updatedb, since it is now
+       made by configure
+
+       * configure.in: updatedb is now created by configure.
+
+       * xargs/Makefile.am: added testsuite to xargs directory
+
+       * locate/updatedb.in: updatedb is now created by configure
+
+       * locate/frcode.c, locate/code.c, locate/bigram.c: change return
+       from main to int.  Replace getstr with getline, where possible.
+
+       * locate/Makefile.am: place frcode, code, bigram in
+       libexec_PROGRAMS
+
+       * lib/xstrdup.c, lib/xmalloc.c, lib/xgetcwd.c, lib/xalloc.h,
+       lib/strtol.c, lib/strstr.c, lib/strftime.c, lib/strdup.c,
+       lib/stpcpy.c, lib/stat.c, lib/savedir.h, lib/savedir.c,
+       lib/regex.h, lib/regex.c, lib/realloc.c, lib/pathmax.h,
+       lib/modechange.h, lib/modechange.c, lib/mktime.c, lib/memset.c,
+       lib/memcmp.c, lib/malloc.c, lib/lstat.c, lib/idcache.c,
+       lib/getopt1.c, lib/getopt.c, lib/getopt.h, lib/getline.c,
+       lib/getline.h, lib/fnmatch.c, lib/fnmatch.h, lib/filemode.c,
+       lib/filemode.h, lib/fileblocks.c, lib/error.c, lib/error.h,
+       lib/dirname.c, lib/alloca.c: updated to newer version of file from
+       fileutils.
+
+       * find/version.c: version number is now automatically generated by
+       configure.
+
+       * find/fstype.c (filesystem_type_uncached): fixes bug described as
+       follows:  When 'find' looks for a fstype, it parses the /etc/mtab
+       until it finds the good line. But, if there is, before the good
+       line, a line whose mountpoint is unreachable, it fails.
+
+       * doc/texinfo.tex: updated to newer version
+
+       * doc/find.texi: added version.texi, fixed a few documentation bugs.
+
+       * configure.in: new m4 features.
+
+       * Makefile.am: moved testsuite to below corresponding directories
+       find and xargs.
+
+       * acconfig.h: updated to match new m4 files.
+
+       * m4: added m4 directory, largely borrowed from Jim Meyering's
+       fileutils.
+
+2000-01-17  Kevin Dalley  <kevind@rahul.net>
+
+       * doc/find.texi (Multiple Files): placed missing xargs in examples
+
+       * find/testsuite/find.gnu/depth.exp: added find tests to test
+       "-depth" bug.
+
+       * doc/find.texi: include version.texi for automatic determination
+       of version number, update bug report email address to
+       bug-findutils@gnu.org.
+       (Combining Primaries With Operators): add indices for " ,", "()",
+       "-a", "-o", etc.
+
+2000-01-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * find/tree.c (opt_expr): Never rearrange the arguments of the
+       comma operator, since it is not commutative.  Remove useless
+       assignment.2
+
+2000-01-17  Jonathan R. Ferro <jferro@corwin.ece.cmu.edu>
+
+       * find/find.c (process_path): fix problem with "-depth" which is
+       tested in depth.exp test.
+
+1999-08-15  Kevin Dalley  <Kevin Dalley <kevin@seti.org>>
+
+       * find/fstype.c (filesystem_type_uncached): a stat failure with
+       EACCESS will ignore this file system keep on looking.  Patch
+       suggested by Vincent Danjean <vdanjean@ens-lyon.fr>.
+
+1999-08-15  Mark Kettenis  <kettenis@gnu.org>
+
+       * xargs/xargs.c (LONG_MAX): Define if necessary.
+       (main): If ARG_MAX is -1 (that is sysconf
+       (_SC_ARG_MAX) returns -1) the system does not impose a limit.  In
+       that case, use LONG_MAX as the limit.
+
+1999-08-15  Kevin Dalley  <Kevin Dalley <kevind@rahul.net>
+
+       * find/version.c: version string is now set by config.h
+
+1999-08-08  Kevin Dalley  <kevin@seti.org>
+
+       * Version 4.1.1
+
+       * README-alpha: added alpha README file
+
+       * find/defs.h: move lstat declarations into defs.h
+
+       * xargs/Makefile.am, testsuite/Makefile.am, locate/Makefile.am,
+       lib/Makefile.am, find/Makefile.am, doc/Makefile.am, configure.in,
+       Makefile.am: update for automake-1.4
+
+1999-08-02  Kevin Dalley  <kevind@rahul.net>
+
+       * AUTHORS: added file listing AUTHORS
+
+       * lib/Makefile.am: modified code for EXTRA sources
+
+1999-01-30  Kevin Dalley  <kevind@rahul.net>
+
+       * added const to declaration of basename, which should satisfy
+       Linux as well as Hurd (fixes bug #31325).
+
+1998-12-04  Kevin Dalley  <kevind@rahul.net>
+
+       * lib/nextelem.c: removed declaration of strdup and free, which
+       meets GNU coding standards and allows compilation on more
+       platforms.
+
+       * find.texi: corrected explanation of -amin option which described
+       hours instead of minutes
+
+1998-09-26  Kevin Dalley  <kevind@rahul.net>
+
+       * lib/getline.c: fix getstr so that it correctly handles long file
+       paths
+
+1998-09-20  Kevin Dalley  <kevind@rahul.net>
+
+       * removed more function declarations to meet GNU coding standards
+
+1998-08-30  Kevin Dalley  <kevind@rahul.net>
+
+       * lib/nextelem.c: removed declaration of strdup and free, which
+       meets GNU coding standards and allow compilation on sparc
+
+       * corrected explanation of -amin option which described hours
+       instead of minutes
+
+1998-02-27  Kevin Dalley  <kevind@rahul.net>
+
+       * locate/locate.c: add --existing option to locate, which only
+       prints the names of files which still exist
+
+1998-02-08  Kevin Dalley  <kevind@rahul.net>
+
+       * locate/locate.c: corrected get_short so that it correctly
+       returns negative numbers.
+
+       * remove declarations of various string functions.  Removing the
+       declarations almost matches the GNU Coding Standards.
+
+1997-03-03  Kevin Dalley  <kevind@rahul.net>
+
+       * xargs/xargs.c: xargs fixed to prevent occasional core dumping.
+
+1997-01-11  Kevin Dalley  <kevind@rahul.net>
+
+       * locate/updatedb.sh: add --localuser option to updatedb, which
+       allows find to be run as nobody, while allowing database file to
+       be created as root, change suggested by
+       <Bernd_Eckenfels@Wittumstrasse13.76646Bruchsal.de>
+
+1996-12-28  Kevin Dalley  <kevind@rahul.net>
+       * added PRUNEFS as variable in updatedb and --prunefs as option to
+       updatedb
+
+1996-05-27  Kevin Dalley  <kevind@rahul.net>
+
+       * updatedb.sh: when NETPATHS is used, only su to NETUSER if whoami
+       is root
+1996-04-27  Kevin Dalley  <kevind@rahul.net>
+
+       * lib/getline.c (getstr): verify that nchars_avail is *really*
+       greater than 0; set *n to a large enough number, stops some core
+       dumping
+
+1994-11-03  David J. MacKenzie  <djm@gnu.org>
+
+       * Version 4.1.
+
+       * locate/Makefile.am: Move updatedb from LIBSCRIPTS to SCRIPTS.
+
+       * Makefile.am (distname): Change distribution name from find to
+         findutils.
+
+       * testsuite/config/unix.exp: Don't abuse xfail; simulate it correctly.
+
+       * locate/Makefile.am (CLEANFILES): Fix typo.
+
+1994-11-02  David J. MacKenzie  <djm@gnu.org>
+
+       * The big 4 0.
+
+       * lib/listfile.c find/defs.h (list_file): Take a stream arg.
+       * find/pred.c (pred_ls): pass it.
+       * find/parser.c pred.c defs.h (parse_fls, pred_fls): New functions.
+
+1994-10-25  David J. MacKenzie  <djm@gnu.org>
+
+       * find/pred.c (pred_fprintf): Flush output after \c.  From Chapman
+       Flack.
+
+       * find/parser.c (insert_fprintf): Warn about unrecognized \ and %
+       sequences.
+
+1994-10-18  David J. MacKenzie  <djm@gnu.org>
+
+       * find/defs.h parser.c pred.c tree.c util.c: Globally change
+       "victim" to "primary".
+
+       * find/parser.c (insert_fprintf): For 'c' format, don't lose the
+       need_stat information.  From Chapman Flack.
+
+       * doc/find.texi perm.texi: New files.
+       * configure.in: Configure the doc directory.
+
+       * find/pred.c (pred_regex): Check that the regex matched the whole
+       file name.
+
+1994-10-12  David J. MacKenzie  (djm@gnu.org>
+
+       * find/parser.c: Add -mount as an alias for -xdev.
+       From Klaus.Steinberger@physik.uni-muenchen.de (Klaus Steinberger).
+
+       * lib/modechange.c: Make umask_value unsigned short.
+
+       * xargs/xargs.c: Use symbolic constants in longopts.
+       From Chapman Flack.
+
+1994-10-05  David MacKenzie  <djm@gnu.org>
+
+       * xargs/xargs.c (main, read_line, read_string, do_exec): Pass
+         along the lengths of the args.
+         (main): Calculate length of replace_pat.
+         (push_arg, do_insert): Use those lengths instead of calculating
+         them.
+
+1994-10-04  David MacKenzie  <djm@gnu.org>
+
+       * locate/updatedb.sh Makefile.in: Add substitutions to get
+         the transformed program names.
+
+       * xargs/xargs.c: Put back the global variables for now.
+       Rename some variables.  Increase default args_per_exec.
+       Use boolean where applicable.
+       (main): Reduce default arg_max by 2048 for POSIX.2.
+       (read_string): Don't check EOF string.
+       (read_line, read_string): Take initial args size into account.
+
+1994-10-01  David MacKenzie  <djm@gnu.org>
+
+       * find/pred.c (launch): Use pid_t.
+
+       * xargs/xargs.c (EOF_STR): Define and use.
+       [__STDC__]: Declare xrealloc and xmalloc using void *.
+       * find/defs.h: Likewise.
+
+       * find/defs.h: Only declare stpcpy if !HAVE_STPCPY.
+
+       * xargs/xargs.c: Replace most global variables with structure
+         pointers passed as arguments.  Use pid_t.
+       * lib/wait.h: Include sys/wait.h if HAVE_SYS_WAIT_H.
+       * configure.in: Call AC_TYPE_MODE_T and AC_HEADER_SYS_WAIT.
+
+       * xargs/xargs.c: Improve paging performance and memory
+         fragmentation by building command arguments in a pre-allocated
+         buffer and re-implementing the child pid list as an expandable
+         array.  From tsi@gpu.srv.ualberta.ca (Marc Aurele La France).
+
+1994-09-29  David J. MacKenzie  (djm@gnu.org>
+
+       * find/fstype.c (fstype_to_string): Add more cases.  Use
+         INITMOUNTNAMES if defined.
+       * find/defs.h: Change boolean typedef from char to int.
+       * configure.in: Check for mktime.
+
+1994-09-27  Kaveh R. Ghazi  (ghazi@noc.rutgers.edu)
+
+       * configure.in: Add AC_HEADER_STAT.
+       * lib/listfile.c, lib/modetype.h: Add STAT_MACROS_BROKEN.
+
+       * find/pred.c: Move the inclusion of defs.h ahead of the first
+         test of _POSIX_VERSION.
+
+       * lib/xgetcwd.c: Remove _POSIX_VERSION, rely only on HAVE_GETCWD.
+
+1994-09-26  David MacKenzie  <djm@gnu.org>
+
+       * configure.in: Add AC_CONFIG_HEADER.
+       * find/*.c locate/*.c xargs/*.c: Include config.h.
+       * locate/updatedb.sh: Add --version; --old -> --old-format.
+
+1994-09-25  David MacKenzie  <djm@gnu.org>
+
+       * find/* [__STDC__]: Prototype declarations.
+
+       * locate/updatedb.sh: Account for renaming code and frcode.
+
+       * find/find.c (process_path): Store dev and ino of directories in
+         current branch to avoid symlink loops.  From DJ Delorie
+         <dj@ctron.com>.
+         (process_dir): If following symlinks, don't cd to ..; instead,
+         cd to the starting directory and then to the parent directory.
+         (main) [HAVE_FCHDIR]: Save the dev, ino of the starting directory.
+         (process_top_path) [HAVE_FCHDIR]: Use it.
+       * find/pred.c (launch) [HAVE_FCHDIR]: Likewise.
+       * defs.h [HAVE_FCHDIR]: Declare starting_desc instead of starting_dir.
+       * configure.in: Check for dev_t, ino_t, fchdir, fcntl.h.
+
+1994-09-23  David MacKenzie  <djm@gnu.org>
+
+       * lib/listfile.c: Change #ifdef S_IFLNK to #ifdef S_ISLNK.
+       From Andreas Luik <luik@isa.de>.
+
+1994-09-22  David MacKenzie  <djm@gnu.org>
+
+       * locate/locate.c (last_literal_end): Dynamically allocate enough
+         memory for the subpattern.
+
+1994-09-21  David MacKenzie  <djm@gnu.org>
+
+       * locate/locate.c (locate): Warn if database is >8 days old.
+       From Ian Lance Taylor.
+
+       * xargs/xargs.c (do_exec), find/pred.c (launch): Set SIGCHLD to
+         default.  From tsi@gpu.srv.ualberta.ca (Marc Aurele La France).
+       * find/find.c pred.c util.c lib/listfile.c: Remove fflush(stdout)
+         calls before error.  error does it, and doesn't trash errno.
+         From tsi@gpu.srv.ualberta.ca (Marc Aurele La France).
+
+       * find/fstype.c (filesystem_type_uncached): Don't trust mtab dev
+         number on HPUX.  From Andreas Luik <luik@isa.de>.
+         (filesystem_type_uncached): Don't cache unknown file system
+         types.  From casper@fwi.uva.nl (Casper Dik).
+
+       * locate/updatedb.sh: Collect results in temp file and rename it
+         atomically.  From Andreas Luik <luik@isa.de>.
+
+       * xargs/xargs.c (parse_num): Print a long using %ld.  From Jim
+         Meyering.
+
+       * find/defs.h find.c parser.c pred.c util.c, lib/nextelem.c:
+         Emulate strchr and strrchr with index and rindex, not vice versa.
+
+       Remove man directory; move man pages to the directories of the
+       programs they document.
+
+       * locate/frcode.c: Renamed from code.c.
+       * locate/frcode.c (put_short): Renamed from puthalfword.
+       * locate/locate.c (get_short): Renamed from gethalfword.
+       (last_literal_end): Renamed from patprep.
+       (locate): Recognize old-format databases too.
+       * locate/locatedb.h: Add defines for old-format databases.
+       * locate/bigram.c locate/code.c: Put back programs to create
+       old-format databases.
+       * locate/updatedb.sh: Take --old option to use them.
+
+1994-09-20  David MacKenzie  <djm@gnu.org>
+
+       * configure.in: Update for Autoconf v2.
+       * find/pred.c lib/savedir.c: Use new symbols for dir header.
+       * locate/updatedb.sh: Add --help option.
+
+1994-02-13  Jim Meyering  (meyering@comco.com)
+
+       * man/Makefile.in [man1ext, man5ext]: Set man5ext (not man1ext) to 5.
+
+1993-08-01  David J. MacKenzie  (djm@gnu.org>.
+       (filesystem_type_uncached) [AFS]: Call it if the fs type is
+       otherwise unknown.
+
+       * parser.c (parse_size): Recognize b and w suffixes for dd
+       compatibility.
+
+       * code.c (puthalfword): New function.
+       (main): Call it.
+       * locate.c (gethalfword): New function.
+       (locate): Call it.
+       From ifado!wb@germany.eu.net (Wilhelm B. Kloke).
+
+       * listfile.c: Include pathmax.h.
+       (get_link_name): Always allocate PATH_MAX + 1 bytes for
+       readlink buffers.
+       * pred.c (pred_fprintf, insert_lname): Call get_link_name.
+
+       * fstype.c (filesystem_type, filesystem_type_uncached),
+       listfile.c (list_file): Take an arg for the path to access.
+       * pred.c (pred_ls, pred_fstype, pred_fprintf): Pass it.
+
+       * find.c (process_dir): Renamed from scan_directory.
+
+       Changes from jrs@world.std.com (Rick Sladkey) to chdir into
+       subdirectories instead of using string concatenation, for speed:
+       * find.c (process_top_path): New function.
+       (main): Call it, and xgetcwd.
+       (process_path, scan_directory): Take new arg, the pathname
+       relative to ".".  Use it and pass it on.
+       * pred.c (pred_and, pred_comma, pred_negate, pred_or,
+       pred_xtype, pred_fprintf, pred_empty, insert_lname):
+       access rel_pathname instead of pathname.
+       (launch): chdir to starting_dir.
+       * defs.h: Declare rel_pathname and starting_dir.
+       * find.c: Define them.
+
+       * xgetcwd.c: New file.
+
+       * updatedb.sh: Recognize -fstype NFS as well as nfs.
+       * locate.c (patprep): Skip trailing character classes correctly.
+       From luik@pharao.stgt.sub.org (Andreas Luik).
+
+       * parser.c (parse_group): Make gid a gid_t, not short or int.
+       (parse_nogroup): Cast gid to unsigned when using it as an array index.
+       (parse_user, parse_nouser): Similar changes for uid.
+       * defs.h: Use uid_t and gid_t.
+
+       * parser.c (parse_help): New function.
+       (parse_table):  Add --version, -help, and --help options.
+       Rename struct parser_table_t to struct parser_table.
+       (parse_version): Exit after printing message, on
+       stdout not stderr.
+
+       * xargs.c, locate.c (main, usage): Add --version and --help
+       options.
+
+1993-03-31  Jim Meyering  (meyering@comco.com)
+
+       * parser.c: Define isascii macro to be 1 also if STDC_HEADERS.
+       * xargs.c: Ditto.
+
+1993-03-31  David J. MacKenzie  (djm@gnu.org>text; nuke cp.
+
+1993-03-29  David J. MacKenzie  (djm@gnu.org>.
+
+       * parser.c (make_segment, insert_fprintf), pred.c
+       (pred_fprintf): Add '%F' to print filesystem type.
+
+       * parser.c (parse_fprintf): Check if second arg is missing.
+
+1993-03-23  David J. MacKenzie  (djm@gnu.org>
+
+       * defs.h, parser.c, pred.c: Rename some types that conflict
+       with reserved POSIX.1 namespace (ended in _t).
+
+
+
+1991-10-17  David J. MacKenzie  <djm@gnu.org>
+
+       * xargs.c: Don't determine memory.h based on POSIX, which
+       doesn't mention it.
+
+1991-10-05  Jim Meyering <meyering@churchy.gnu.ai.mit.edu>
+
+       * parser.c (parse_perm): Parse new `-perm +mode' notation.
+       * pred.c (pred_perm): Interpret same.
+
+1991-09-13  David J. MacKenzie  <djm@gnu.org>
+
+       * xargs.c [POSIX]: Always use sysconf to get ARG_MAX.
+
+1991-09-05  David J. MacKenzie  <djm@gnu.org>
+
+       * bigram.c, code.c (main): Make path_max int, not unsigned.
+       * locate.c (main): Check for pathconf failure.
+
+1991-09-05  Jim Meyering <meyering@churchy.gnu.ai.mit.edu>
+
+       * parser.c (insert_fprintf): Add `\\' escape and fixed `%%'
+       interpretation.
+       * pred.c (pred_fprintf): fixed off-by-one indexing problem
+       when handling [gGuU] printf formats.
+
+1991-08-28  David J. MacKenzie  <djm@gnu.org>
+
+       * Version 3.2.
+
+1991-08-26  David J. MacKenzie  <djm@gnu.org>
+
+       * bigram.c, code.c: Fix handling of PATH_MAX.
+       Check for anomalous input line lengths.
+       From Bruce Evans.
+
+1991-08-23  David J. MacKenzie  <djm@gnu.org>
+
+       * pred.c (pred_fprintf): Round block number up to get K.
+
+1991-08-22  David J. MacKenzie  <djm@gnu.org>
+
+       * pred.c (pred_fprintf, pred_lname) [_AIX]: Allocate PATH_MAX
+       byte for link object since st_size is wrong.
+
+       * listfile.c (list_file): Don't convert blocks to kilobytes if
+       env. var POSIX_ME_HARDER is defined.
+
+       * fstype.c [FS_AIX_STATFS]: New case.
+
+       * configure: Make sure the sys/mount.h is the 4.4BSD version
+       with grep instead of just testing whether it exists.
+
+       * listfile.c (list_file): Add 1 to number of 512-byte blocks
+       before dividing to get 1K blocks (so we round up, not down).
+
+1991-08-21  David J. MacKenzie  <djm@gnu.org>
+
+       * Version 3.1.
+
+       * parser.c (parse_fprintf), pred.c (pred_fprintf): Add %k
+       conversion to print 1K blocks.
+
+       * listfile.c: Print counts of 1K blocks, for consistency with
+       new fileutils release.  Bad timing, there.
+
+       * Version 3.0.
+
+       * pred.c [VOID_CLOSEDIR]: Fake a return value for closedir,
+       which returns void on some systems, like Sequents.
+       * configure: Check sys/dir.h for 'void closedir'.
+
+1991-08-15  David J. MacKenzie  <djm@gnu.org>
+
+       * modetype.h: Define POSIX.1 stat stuff if missing.
+       * pred.c, parser.c, find.c, fstype.c: Don't define it.
+       * updatedb.sh: Use a variable substitution method like configure's.
+       * Makefile.in: Add datadir variable to separate programs from
+       data file.
+
+       * parser.c, pred.c: Rename -fulldays to -daystart.
+
+       * defs.h, find.c, parser.c, pred.c: Add many new predicates
+       from Jay Plett (jay@princeton.edu).
+
+1991-08-14  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c (parse_size), pred.c (pred_size), defs.h (struct
+       size_t): Allow `k' to follow number to measure size in Kbytes.
+       * parser.c (parse_size, get_num, insert_num), defs.h (struct
+       size_t): Use enum comparison_type instead of short.
+
+1991-08-09  David J. MacKenzie  <djm@gnu.org>
+
+       * xargs.c (read_line): Use isblank, to support POSIX locales.
+
+       * fstype [FS_STATVFS]: New code for SVR4, from slootman@dri.nl
+       (Paul Slootman).
+       * configure: Figure out when to use it.
+
+       * configure: Check for st_blocks in struct stat.
+       * listfile.c (ST_NBLOCKS): New macro.
+       (list_file): Print file's block count.
+       Use S_ISLNK instead of S_IFLNK.
+       * fileblocks.c: New file, from fileutils.
+
+1991-08-08  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c, pred.c [CACHE_IDS]: Optional code to turn uid and
+       gid lookups into table lookups.
+
+1991-08-07  David J. MacKenzie  <djm@gnu.org>
+
+       * configure, Makefile.in's: Support +srcdir option via VPATH.
+       Clean up clean targets.
+
+1991-07-20  David J. MacKenzie  <djm@gnu.org>
+
+       * configure: Filter /etc and /usr/etc from path.
+
+       * xargs.c (wait_for_proc): Fix handling of child exit status.
+       (main): Exit with a nonzero status if any child did.
+
+       * pred.c (launch): Flush stdout and stderr before forking.
+
+       * fstype.c (filesystem_type) [FS_MNTENT]: Skip entries of
+       type "ignore".
+
+1991-07-19  David J. MacKenzie  <djm@gnu.org>
+
+       * pred.c, locate.c: Use fnmatch instead of glob_match.
+       * fnmatch.c, fnmatch.h: New files.
+
+       * Many files: Use string.h if STDC_HEADERS, as well as if USG.
+
+       * locate.c, code.c, bigram.c: Possibly use pathconf to get
+       PATH_MAX.  Use malloc to allocate path arrays.
+
+       * xargs.c: Possibly use sysconf to get ARG_MAX.
+       (env_size): Make definition unconditional.
+       (main): Do arg_max adjustment that can't be done with
+       preprocessor now that ARG_MAX might be a function call.
+       (do_exec): Exit with status 126 or 127 after failed exec, for
+       POSIX.2 draft 11.1.
+
+       * xargs.c, pred.c, listfile.c: Use POSIX, not UNISTD_MISSING.
+       * wait.h: Use POSIX, not WAIT_MACROS_MISSING.
+
+       * COPYING: Use version 2.  Update all files.
+
+       * Replace Makefile and lib/Makefile with Makefile.in,
+       lib/Makefile.in and configure.  Update README.
+
+1991-04-05  David J. MacKenzie  <djm@gnu.org>
+
+       * Version 2.2.
+
+1991-03-15  David J. MacKenzie  <djm@gnu.org>
+
+       * xargs.c (main): Always run the command if some args are left over.
+       Rename some variables.
+
+1991-01-18  David J. MacKenzie  <djm@gnu.org>
+
+       * bigram.c, code.c, locate.c: Use LIMITS_MISSING, not
+       _POSIX_SOURCE, to decide whether to include limits.h.
+
+       * parser.c, pred.c, listfile.c: Use POSIX, not _POSIX_SOURCE,
+       to decide whether to declare getpwuid and getgrgid.
+
+       * xargs.c: Use POSIX, not _POSIX_SOURCE, to determine whether
+       to include memory.h.
+
+1991-01-12  David J. MacKenzie  <djm@gnu.org>
+
+       * defs.h, find.c, parser.c, pred.c: Remove -permmask option.
+
+1991-01-10  David J. MacKenzie  <djm@gnu.org>
+
+       * wait.h: Include sys/types.h to get pid_t.
+
+       * xargs.c [USG && !STDC_HEADERS]: Only include memory.h if not
+       _POSIX_SOURCE.
+
+1991-01-01  David J. MacKenzie  <djm@gnu.org>
+
+       * Version 2.1.
+
+1990-12-26  David J. MacKenzie  <djm@gnu.org>
+
+       * locate.c, bigram.c, code.c: Attempt to get max. path length
+       on more kinds of systems, incl. POSIX.
+
+       * pred.c, listfile.c, xargs.c: Get some decls from unistd.h,
+       if available.
+
+       * find.c, defs.h: Make `cur_day_start' a time_t, not long.
+
+1990-12-21  David J. MacKenzie  <djm@gnu.org>
+
+       * defs.h, parser.c: Remove unused field from `struct exec_t'.
+
+       * xargs.c: Add +no-run-if-empty option to cause the command to
+       not be run if the input is empty.
+
+       * defs.h (struct exec_t): Change the array of offsets into an
+       array of `struct path_arg'.
+       * parser.c (insert_exec_ok): Fill in new fields, to allow "{}"
+       to be substituted (multiple times) anywhere in an arg to -exec
+       or -ok.
+       * pred.c (pred_exec): Add code to substitute "{}" within args.
+       (pred_ok): After prompting, just run pred_exec.
+
+1990-12-20  David J. MacKenzie  <djm@gnu.org>
+
+       * fstype.c (filesystem_type) [FS_MNTENT]: Allow for optional
+       "0x" at front of "dev=" mount option, which amd puts there but
+       Sun automounter doesn't.
+
+1990-12-15  David J. MacKenzie  <djm@gnu.org>
+
+       * find.c (main), util.c (usage): Make directory args optional,
+       defaulting to ".".
+
+1990-12-15  David J. MacKenzie  <djm@gnu.org>
+
+       * listfile.c: Define major and minor if not defined (as in POSIX).
+
+1990-12-03  David J. MacKenzie  <djm@gnu.org>
+
+       * find.c, fstype.c, parser.c, pred.c, util.c: Flush stdout before
+       writing to stderr, in case they have been redirected to the
+       same file descriptor.
+
+       * pred.c (launch): Use POSIX wait macros from wait.h.
+
+       * xargs.c (print_xargs): Read from tty_stream, not stdin.
+
+1990-11-20  David J. MacKenzie  <djm@gnu.org>
+
+       * Version 2.0.
+
+       * fstype.c [FS_USG_STATFS]: New code.
+       [FS_STATFS]: For symlinks, statfs the directory the link is in
+       instead of the link.
+       * Various files: Conditionalize some declarations on
+       STDC_HEADERS or _POSIX_SOURCE.
+
+1990-11-16  David J. MacKenzie  <djm@gnu.org>
+
+       * modetype.h: New file.
+       parser.c, pred.c: Use it.
+
+1990-11-15  David J. MacKenzie  <djm@gnu.org>
+
+       * xmalloc.c: New file from fileutils.
+
+       * fstype.c (fstype_to_string): Add case for MFS.
+       (filesystem_type): Take a pathname as a second arg.
+       [FS_STATFS] return "unknown" instead of exiting if statfs
+       fails because of ENOENT.
+       * pred.c (pred_fstype): Pass the pathname.  Set current_dev.
+       * find.c (process_path): Make root_dev local again.
+
+1990-11-12  David J. MacKenzie  <djm@gnu.org>
+
+       * pred.c (pred_fstype): Free old fs type.
+
+       * fstype.c, pred.c (pred_fstype), parser.c (parse_fstype):
+       Reread the file system type info. every time a filesystem
+       mount point is crossed, to allow for automounting.
+
+       * xstrdup.c: New file from fileutils.
+
+       * find.c (process_path): Rename root_dev to current_dev and
+       make it global, for -fstype.
+
+       * wait.h: New file taken from xargs.c.
+
+       * xargs.c: Make limits.h vs. sys/param.h conditional on
+       LIMITS_MISSING instead of USG, to accomodate SVR2.
+
+1990-11-08  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c, pred.c, listfile.c: If not _POSIX_SOURCE, declare
+       getpwuid and getgrgid.  Use them.
+
+       * listfile.c: If not _POSIX_SOURCE, define S_ISDIR and
+       S_ISBLK.  Use them.
+
+       * find.c: Use S_ISDIR instead of S_IFDIR, and define if not
+       _POSIX_SOURCE.
+
+       * Makefile: Define AR and RANLIB and pass to child makes.
+       lib/Makefile: Use them.
+
+       * xargs.c (WIFSIGNALED): Redefine so it works.
+
+1990-11-05  David J. MacKenzie  <djm@gnu.org>
+
+       * find.c (process_path): For -xdev, process filesystem
+       mountpoints (but don't descend them), instead of skipping them
+       entirely.
+
+       * find.c, parser.c, defs.h: Add -follow predicate.
+
+       * xargs.c: Change ifdefs to support STDC POSIX systems.
+
+1990-11-03  David J. MacKenzie  <djm@gnu.org>
+
+       * xargs.c (do_exec): Child process exits with status 255, not
+       127, if command can't be run.
+
+1990-11-02  David J. MacKenzie  <djm@gnu.org>
+
+       * xargs.c: Exit with status 127 if running commmand fails, as
+       required by POSIX.
+
+       * fstype.c: Support -fstype for Ultrix (-DFS_GETMNT).
+       Sun/BSD code is now -DFS_MNTENT.
+
+1990-11-01  David J. MacKenzie  <djm@gnu.org>
+
+       * Reorganize into subdirectories and add xargs.  Rewrite Makefiles.
+
+       * find.c (process_path, main): Allow a maxdepth of 0, meaning
+       only process command line args.
+
+       * parser.c, pred.c: Add -print0 predicate.
+
+       * xargs.c: Add -0 option and long options.  Move standard
+       library functions into separate files.  Use error instead of
+       fatal and fprintf/perror.  Use POSIX macros for examining exit
+       status from wait.
+       (read_string): New function.
+
+1990-09-21  David J. MacKenzie  <djm@gnu.org>
+
+       * find.c (process_path): Take DEPTH as an arg instead of ROOT,
+       and change callers.
+
+1990-09-20  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c (parse_maxdepth): New function.
+       * find.c (process_path): If -maxdepth was given, don't go
+       more than that many levels deep.
+       * defs.h: Declare maxdepth.
+
+1990-09-12  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c: Add -not as synonym for !.
+
+1990-08-26  Jim Kingdon  <kingdon@pogo.ai.mit.edu>
+
+       * Makefile (TAGS): New target.
+
+1990-08-12  David J. MacKenzie  <djm@gnu.org>
+
+       * xargs.c (main): Tell getopt to not permute.
+
+1990-08-04  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c (parse_perm), pred.c (pred_perm): Always compare
+       bits 07777.
+
+       * locate.c, Makefile: Rename 'fastfind' program to 'locate',
+       following comment in POSIX.2 draft 10 rationale for find.
+
+1990-07-25  David J. MacKenzie  <djm@gnu.org>
+
+       * listfile.c (getuser, getgroup): Make uid and gid unsigned
+       short, not int.
+
+1990-07-16  David J. MacKenzie  <djm@gnu.org>
+
+       * defs.h: Don't declare fprintf and printf, in case they have
+       prototypes in stdio.h (important for functions that use stdarg).
+
+1990-07-15  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c (parse_and): New function, for compatibility.
+
+1990-07-04  David J. MacKenzie  <djm@gnu.org>
+
+       * find.c (main): Only enclose expressions that produce no side
+       effects within `( ... )'.
+
+1990-07-03  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c (strspn): Stop when end of string reached.
+
+       * Version 1.2.
+
+       * Move version number from Makefile to new file version.c.
+       * parser.c: Recognize new -version predicate.
+
+       * find.c (main): If no predicates that produce output are
+       given, default to -print if the entire expression is true, not
+       just the last part of an alternation.
+       * Print the names of predicates with invalid arguments.
+
+1990-07-02  David J. MacKenzie  <djm@gnu.org>
+
+       * pred.c: Don't check for invalid comparison types in numeric
+       predicate functions.
+
+1990-06-28  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c (parse_regex): Set fastmap and translate before
+       compiling regex.
+
+1990-06-25  David J. MacKenzie  <djm@gnu.org>
+
+       * fastfind.c (fastfind): Initialize count to 0.
+
+       * lib/updatedb.sh: Only do regex comparison on directories,
+       for speed.
+
+       * listfile.c (list_file): Truncate user and group name to 8 chars.
+
+1990-06-24  David J. MacKenzie  <djm@gnu.org>
+
+       * Version 1.1.
+
+       * Makefile [DISTFILES]: Add COPYING.
+
+1990-06-22  David J. MacKenzie  <djm@gnu.org>
+
+       * Version 1.0.
+
+1990-06-19  David J. MacKenzie  <djm@gnu.org>
+
+       * lib/updatedb.sh: Prune entries that match PRUNEREGEX.
+       Split up finding files from computing bigrams.
+       Use redirection instead of nonportable grep -s to detect sort
+       failure.  Optionally search network filesystems as well as
+       local ones.
+
+       * pred.c (pred_regex): Match against full pathname instead of
+       just last element.
+       * util.c (basename): Return "/", not "", if given "/".
+
+       * find.c (process_path): Fix error in handling "/" directory.
+
+1990-06-18  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c [STRSPN_MISSING] (strspn): New function.
+
+1990-06-17  David J. MacKenzie  <djm@gnu.org>
+
+       * listfile.c: New file.
+       * parser.c (parse_ls): New function.
+       * pred.c (pred_ls): New function.
+
+       * find.c (main): Remove interface to fastfind, to prevent
+       conflict with POSIX syntax.
+       * util.c (usage): Remove fastfind syntax from message.
+       * fastfind.c (main): New function.
+       * Makefile: Make fastfind a separate program.
+
+       * find.c (main): Print correct message if a predicate arg is
+       missing.
+
+       * parser.c (insert_exec_ok): Make args that start with a ';' but
+       contain other characters not terminate the command.
+
+1990-06-15  David J. MacKenzie  <djm@gnu.org>
+
+       * fstype.c: If MOUNTED isn't defined but MNT_MNTTAB is, use it
+       instead.  True for HP/UX, at least.
+
+1990-06-14  David J. MacKenzie  <djm@gnu.org>
+
+       * savedir.c: New file; now find won't run out of file
+       descriptors in deep trees.
+       * find.c (process_path): Use savedir.
+
+1990-06-09  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c (parse_permmask): Allow symbolic mode masks.
+       (parse_perm): Free 'struct change' when done with it.
+       (get_oct): Function removed.
+
+       * find.c (process_path): Allow arbitrarily-long filenames.
+       More efficient string copying.  Initialize perm_mask to 07777
+       instead of -1.
+
+1990-06-07  David J. MacKenzie  <djm@gnu.org>
+
+       * Makefile, find.c: Use DIRENT to control whether <dirent.h>
+       is used.
+
+1990-05-31  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c (parse_regex): New function.
+       * pred.c (pred_regex): New function.
+
+       * fstype.c (read_mtab): If mtab entry has a "dev=" option
+       (like in SunOS 4.1), use it, so there is no need to stat the
+       special file later on.
+       (xatoi, strstr): New functions.
+
+1990-05-21  David J. MacKenzie  <djm@gnu.org>
+
+       * lib/updatedb.sh: Put BINDIR in PATH.
+
+       * fstype.c: Do nothing if MNTENT_MISSING is defined.
+
+       * fstype.c: New file.
+       * parser.c (parse_fstype): New function.
+       * pred.c (pred_fstype): New function.
+
+       * parser.c (parse_newer): Failure to stat -newer file is a
+       fatal error.
+
+       * pred.c (pred_ok): Flush output before reading.  Use getchar
+       instead of scanf.
+
+       * pred.c (pred_prune): Return false if -depth given.
+       * find.c: Apply the predicates to the dir when -depth and
+       -prune are given.
+
+1990-05-20  David J. MacKenzie  <djm@gnu.org>
+
+       * pred.c (pred_prune): Set new global var `stop_at_current_level'.
+       * find.c (process_path): Test and reset it.
+
+1990-05-18  David J. MacKenzie  <djm@gnu.org>
+
+       * modechange.c, modechange.h: New files.
+       * parser.c (parse_perm): Use mode_compile and mode_adjust to
+       parse arg, to allow symbolic mode for POSIX.
+
+1990-05-17  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c (get_oct): Don't consider an empty string a valid number.
+
+       * parser.c (parse_perm): If arg starts with '-', set flag bit
+       for special comparison (POSIX).
+       * pred.c (pred_perm): If flag bit set, compare s[ug]id &
+       sticky bits as well, and return true if the given perms are
+       set, ignoring other bits.
+
+       * find.c: New global var `exit_status'.  Use it.  (POSIX)
+       * parser.c: Set `exit_status' if lstat on -newer file fails.
+
+       * fastfind.c: New file.
+       * find.c (main): Call fastfind if given only 1 arg.
+       * util.c (usage): Update message.
+       * lib/{Makefile,updatedb.sh,bigram.c,code.c}: New files.
+       * Makefile: Add 'all' and 'install' targets.
+
+1990-05-16  David J. MacKenzie  <djm@gnu.org>
+
+       * parser.c (parse_nogroup, parse_nouser): Implement.
+       * pred.c (pred_nogroup, pred_nouser): Implement.
+
+1990-05-14  David J. MacKenzie  <djm@gnu.org>
+
+       * find.c: Add variable `stay_on_filesystem' for -xdev.
+       (process_path): Take an arg determining whether this call is
+       the root of a tree.  Use lstat instead of stat.  If
+       stay_on_filesystem, don't process a dir on a different
+       filesystem.
+
+       * parser.c (parse_newer): Use lstat instead of stat.  Is this right?
+       (parse_xdev): Set stay_on_filesystem.
+
+       * parser.c: Add dummy parse_nogroup, parse_nouser,
+       parse_prune, and parse_xdev; to be written later.
+       * pred.c: Add dummy pred_nogroup, pred_nouser, pred_prune.
+
+       * find.c: Support System V directory library/headers.
+
+       * find.c (process_path): Don't continue with a file that stat
+       fails on.
+
+       * defs.h, parser.c, pred.c: Change 'u_long' and 'u_short' to
+       'unsigned long' and 'unsigned short'.
+       * find.c, defs.h: Remove 'convert_glob' variable.
+       * parser.c (parse_fullregex): Function removed.
+       (parse_name): Remove regular expression code.
+       (parse_type): Recognize sockets.
+       Add code to check for missing arguments to many parse_* functions.
+       * pred.c (pred_name): Use glob_match instead of regex.
+
+1990-05-13  David J. MacKenzie  <djm@gnu.org>
+
+       * Replace fprintf, simple_error, and mem_error with error and
+       usage.
+
+       * Fix string header includes for USG.
+
+1990-03-27  David J. MacKenzie  <djm@gnu.org>
+
+       * defs.h: Change some #defines to enums.
+
+1990-03-25  David J. MacKenzie  <djm@gnu.org>
+
+       * find.c (main): Don't take basename of argv[0].
+
+       * util.c (xmalloc): New function.
+       * find.c, parser.c, utils.c: Use xmalloc instead of malloc.
+
+       * pred.c: Remove emulation of regex for BSD and use GNU
+       library version in regcmp.c instead.
+       * parser.c: Remove emulation of regcmp for BSD and use GNU
+       library version in regcmp.c instead.
+       * Makefile: Link with regex.o and regcmp.o.
+       Add a DISTFILES macro and dist target.
+
+       * Indent source code.  Move RCS logs to this file.
+
+1990-03-21  David J. MacKenzie  <djm@gnu.org>
+
+       * xargs.c: Indent.  Comment and rename some global variables.
+       (main): Use getopt to parse options.  Open new global var
+       `tty_stream' to /dev/tty if querying requested.
+       (print_args): Read response from tty_stream, not stdin.
+       (xmalloc): New function.
+       Global: Use xmalloc instead of malloc.
+       (usage): Revise message.
+
+1987-02-22  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * pred.c: added guts to pred_size
+
+1987-02-22  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * pred.c: added guts to perm and permmask.
+
+1987-02-21  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * pred.c: made pred_name only look at the last component of
+       the path.
+
+1987-02-21  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * pred.c: added guts to name.  useds regex and regcmp to do
+       regular expression handling.
+
+1987-02-21  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * pred.c: added predicate newer
+
+1987-02-20  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * pred.c: added guts to pred_ok
+
+1987-02-19  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * pred.c: finished exec.
+
+1987-02-22  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * parser.c: added guts to parse_size
+
+1987-02-22  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * parser.c: added guts of perm and permmask.  added getoct
+       routine for perm and permmask
+
+1987-02-21  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * parser.c: added -fre, -fullregex predicate to turn off
+       globbing conversion
+
+1987-02-21  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * parser.c: reworked name so the regexpr pattern includes $ at
+       the end to force globbing to work correctly.  End of the
+       pattern refers to the end of the filename.
+
+1987-02-21  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * parser.c: added guts to name.  uses a conversion from
+       globbing to regexp format.  uses regex and regcmp to actually
+       to the comparison.
+
+1987-02-21  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * parser.c: added predicate newer
+
+1987-02-20  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * parser.c: added ok guts.  consolidated exec and ok to using
+       insert_exec_ok
+
+1987-02-19  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * parser.c: minor bug in -fulldays predicate parser.  It
+       should have set the flag full_days to true.
+
+1987-02-22  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * find.c: changed where we are setting perm_mask to -1.  need
+       to make sure that this happens before every apply_predicate.
+
+1987-02-21  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * find.c: added error checking for no paths.  better error
+       message if illegal ordering.
+
+1987-02-21  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * find.c: added global convert_glob
+
+1987-02-22  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * defs.h: added definition of BLKSIZE for size
+
+1987-02-21  Eric B. Decker <cire@soe.ucsc.edu>
+
+       * defs.h: added global convert_glob for name
+
+       -----
+
+       Copyright (C) 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
+       1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008,
+       2009, 2010 Free Software Foundation, Inc.
+
+       Copying and distribution of this file, with or without
+       modification, are permitted provided the copyright notice
+       and this notice are preserved.
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644 (file)
index 0000000..6e00ec8
--- /dev/null
@@ -0,0 +1,131 @@
+# Having a separate GNUmakefile lets me `include' the dynamically
+# generated rules created via cfg.mk (package-local configuration)
+# as well as maint.mk (generic maintainer rules).
+# This makefile is used only if you run GNU Make.
+# It is necessary if you want to build targets usually of interest
+# only to the maintainer.
+
+# Copyright (C) 2001, 2003, 2006-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/>.
+
+# Systems where /bin/sh is not the default shell need this.  The $(shell)
+# command below won't work with e.g. stock DOS/Windows shells.
+ifeq ($(wildcard /bin/s[h]),/bin/sh)
+SHELL = /bin/sh
+else
+# will be used only with the next shell-test line, then overwritten
+# by a configured-in value
+SHELL = sh
+endif
+
+# If the user runs GNU make but has not yet run ./configure,
+# give them a diagnostic.
+_have-Makefile := $(shell test -f Makefile && echo yes)
+ifeq ($(_have-Makefile),yes)
+
+# Make tar archive easier to reproduce.
+export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
+
+# Allow the user to add to this in the Makefile.
+ALL_RECURSIVE_TARGETS =
+
+include Makefile
+
+# Some projects override e.g., _autoreconf here.
+-include $(srcdir)/cfg.mk
+include $(srcdir)/maint.mk
+
+# Allow cfg.mk to override these.
+_build-aux ?= build-aux
+_autoreconf ?= autoreconf -v
+
+# Ensure that $(VERSION) is up to date for dist-related targets, but not
+# for others: rerunning autoreconf and recompiling everything isn't cheap.
+_have-git-version-gen := \
+  $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
+ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
+  _is-dist-target ?= $(filter-out %clean, \
+    $(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS)))
+  _is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
+  ifneq (,$(_is-dist-target)$(_is-install-target))
+    _curr-ver := $(shell cd $(srcdir)                          \
+                   && $(_build-aux)/git-version-gen            \
+                         .tarball-version                      \
+                         $(git-version-gen-tag-sed-script))
+    ifneq ($(_curr-ver),$(VERSION))
+      ifeq ($(_curr-ver),UNKNOWN)
+        $(info WARNING: unable to verify if $(VERSION) is the correct version)
+      else
+        ifneq (,$(_is-install-target))
+          # GNU Coding Standards state that 'make install' should not cause
+          # recompilation after 'make all'.  But as long as changing the version
+          # string alters config.h, the cost of having 'make all' always have an
+          # up-to-date version is prohibitive.  So, as a compromise, we merely
+          # warn when installing a version string that is out of date; the user
+          # should run 'autoreconf' (or something like 'make distcheck') to
+          # fix the version, 'make all' to propagate it, then 'make install'.
+          $(info WARNING: version string $(VERSION) is out of date;)
+          $(info run '$(MAKE) _version' to fix it)
+        else
+          $(info INFO: running autoreconf for new version string: $(_curr-ver))
+GNUmakefile: _version
+       touch GNUmakefile
+        endif
+      endif
+    endif
+  endif
+endif
+
+.PHONY: _version
+_version:
+       cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
+       $(MAKE) $(AM_MAKEFLAGS) Makefile
+
+else
+
+.DEFAULT_GOAL := abort-due-to-no-makefile
+srcdir = .
+
+# The package can override .DEFAULT_GOAL to run actions like autoreconf.
+-include ./cfg.mk
+include ./maint.mk
+
+ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
+$(MAKECMDGOALS): abort-due-to-no-makefile
+endif
+
+abort-due-to-no-makefile:
+       @echo There seems to be no Makefile in this directory.   1>&2
+       @echo "You must run ./configure before running \`make'." 1>&2
+       @exit 1
+
+endif
+
+# Tell version 3.79 and up of GNU make to not build goals in this
+# directory in parallel, in case someone tries to build multiple
+# targets, and one of them can cause a recursive target to be invoked.
+
+# Only set this if Automake doesn't provide it.
+AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \
+  $(RECURSIVE_CLEAN_TARGETS:-recursive=) \
+  dist distcheck tags ctags
+
+ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS)
+
+ifneq ($(word 2, $(MAKECMDGOALS)), )
+ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), )
+.NOTPARALLEL:
+endif
+endif
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..7d1c323
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,365 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+   The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package, generally using the just-built uninstalled binaries.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..c7f8f39
--- /dev/null
@@ -0,0 +1,59 @@
+AUTOMAKE_OPTIONS=gnits
+# readme-alpha
+AM_CFLAGS = $(WARN_CFLAGS)
+
+EXTRA_DIST = COPYING ChangeLog TODO config.h.in stamp-h.in \
+               THANKS import-gnulib.sh import-gnulib.config \
+               tool-versions.txt README-hacking
+DISTCLEANFILES = tool-versions.txt
+
+
+# "tests" is the gnulib unit test dir.
+SUBDIRS = gnulib tests build-aux lib find xargs locate doc po m4
+
+ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4
+
+TESTFILE_SUFFIXES = .exp .xo .xe .xi
+
+# CONFIG_CLEAN_FILES = gnulib/lib/regex.c
+
+tool-versions.txt: Makefile
+       ( automake --version ; echo ; \
+       autoconf --version ; echo ; \
+       $(CC) --version ; echo ; \
+       m4 --version ; echo ; \
+       gettext --version ; echo ; \
+       runtest --version ; echo ; \
+       makeinfo --version ) > $@
+
+
+dist-hook: findutils-check-pofiles findutils-check-testfiles
+
+
+## Check that we actually shipped all the .po files.  If this rule fails,
+## check ALL_LINGUAS in configure.in against the po files in the source
+## directory (their names, not their contents)
+findutils-check-pofiles:
+       @echo ; echo Checking to see if we distributed the full set of .po files
+       distcount=`ls $(distdir)/po/*.po | wc -l` ; srccount=`ls $(srcdir)/po/*.po | wc -l` ; test $$distcount -eq $$srccount || ( echo FAILED: Please check the value of ALL_LINGUAS in configure.in against the actual set of ".po" files >&2 ; false )
+       @echo All .po files distributed OK.
+
+## Check that we actually shipped all the test files that exist in the source.
+## runtest will run all the .exp files it finds, and so if we don't ship all
+## of them, there will be some tests which people using the CVS code will be
+## running, but people using the source distribution will not.
+findutils-check-testfiles:
+       @echo
+       $(AUXDIR)/check-testfiles.sh "$(distdir)" "$(srcdir)" $(TESTFILE_SUFFIXES)
+
+
+findutils-check-smells:
+       find  $(srcdir) \( -path $(srcdir)/autom4te.cache -o  \
+                           -path $(srcdir)/gnulib-git     -o  \
+                           -name .git             -o  \
+                           \( -type d -name CVS \)  \
+                       \) -prune -o                  \
+       \( -type f -o -type l \)  \
+       \! \( -name '*~' -o -name '*.xo' -o -name '*.xi' \) \
+       -print0 | \
+       xargs -0 python $(AUXDIR)/src-sniff.py
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..a6b129f
--- /dev/null
@@ -0,0 +1,1754 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+       $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
+       INSTALL NEWS README-alpha THANKS TODO
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = @INCLUDES@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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 = gnits
+# readme-alpha
+AM_CFLAGS = $(WARN_CFLAGS)
+EXTRA_DIST = COPYING ChangeLog TODO config.h.in stamp-h.in \
+               THANKS import-gnulib.sh import-gnulib.config \
+               tool-versions.txt README-hacking
+
+DISTCLEANFILES = tool-versions.txt
+
+# "tests" is the gnulib unit test dir.
+SUBDIRS = gnulib tests build-aux lib find xargs locate doc po m4
+ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4
+TESTFILE_SUFFIXES = .exp .xo .xe .xi
+all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+       @:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --gnits'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --gnits \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           echo ' $(SHELL) ./config.status'; \
+           $(SHELL) ./config.status;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+       @if test ! -f $@; then \
+         rm -f stamp-h1; \
+         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+       else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+       @rm -f stamp-h1
+       cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in:  $(am__configure_deps) 
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+       rm -f stamp-h1
+       touch $@
+
+distclean-hdr:
+       -rm -f config.h stamp-h1
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @case `sed 15q $(srcdir)/NEWS` in \
+       *"$(VERSION)"*) : ;; \
+       *) \
+         echo "NEWS not updated; not releasing" 1>&2; \
+         exit 1;; \
+       esac
+       $(am__remove_distdir)
+       test -d "$(distdir)" || mkdir "$(distdir)"
+       @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
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
+         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+dist-bzip2: distdir
+       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
+dist-tarZ: distdir
+       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+       $(am__remove_distdir)
+
+dist-shar: distdir
+       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       $(am__remove_distdir)
+
+dist-zip: distdir
+       -rm -f $(distdir).zip
+       zip -rq $(distdir).zip $(distdir)
+       $(am__remove_distdir)
+
+dist dist-all: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       case '$(DIST_ARCHIVES)' in \
+       *.tar.gz*) \
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+       *.tar.bz2*) \
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+       *.tar.Z*) \
+         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+       *.shar.gz*) \
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+       *.zip*) \
+         unzip $(distdir).zip ;;\
+       esac
+       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       mkdir $(distdir)/_build
+       mkdir $(distdir)/_inst
+       chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
+       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
+         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(DISTCHECK_CONFIGURE_FLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+               distuninstallcheck \
+         && chmod -R a-w "$$dc_install_base" \
+         && ({ \
+              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+             } || { rm -rf "$$dc_destdir"; exit 1; }) \
+         && rm -rf "$$dc_destdir" \
+         && $(MAKE) $(AM_MAKEFLAGS) dist \
+         && rm -rf $(DIST_ARCHIVES) \
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
+       $(am__remove_distdir)
+       @(echo "$(distdir) archives ready for distribution: "; \
+         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+       @$(am__cd) '$(distuninstallcheck_dir)' \
+       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+          || { echo "ERROR: files left after uninstall:" ; \
+               if test -n "$(DESTDIR)"; then \
+                 echo "  (check DESTDIR support)"; \
+               fi ; \
+               $(distuninstallcheck_listfiles) ; \
+               exit 1; } >&2
+distcleancheck: distclean
+       @if test '$(srcdir)' = . ; then \
+         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+         exit 1 ; \
+       fi
+       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+         || { echo "ERROR: files left in build directory after distclean:" ; \
+              $(distcleancheck_listfiles) ; \
+              exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile config.h
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+       -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."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf $(top_srcdir)/autom4te.cache
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+       ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am am--refresh check check-am clean clean-generic \
+       ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+       dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+       distcheck distclean distclean-generic distclean-hdr \
+       distclean-tags distcleancheck distdir distuninstallcheck 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 installdirs-am \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am
+
+
+# CONFIG_CLEAN_FILES = gnulib/lib/regex.c
+
+tool-versions.txt: Makefile
+       ( automake --version ; echo ; \
+       autoconf --version ; echo ; \
+       $(CC) --version ; echo ; \
+       m4 --version ; echo ; \
+       gettext --version ; echo ; \
+       runtest --version ; echo ; \
+       makeinfo --version ) > $@
+
+dist-hook: findutils-check-pofiles findutils-check-testfiles
+
+findutils-check-pofiles:
+       @echo ; echo Checking to see if we distributed the full set of .po files
+       distcount=`ls $(distdir)/po/*.po | wc -l` ; srccount=`ls $(srcdir)/po/*.po | wc -l` ; test $$distcount -eq $$srccount || ( echo FAILED: Please check the value of ALL_LINGUAS in configure.in against the actual set of ".po" files >&2 ; false )
+       @echo All .po files distributed OK.
+
+findutils-check-testfiles:
+       @echo
+       $(AUXDIR)/check-testfiles.sh "$(distdir)" "$(srcdir)" $(TESTFILE_SUFFIXES)
+
+findutils-check-smells:
+       find  $(srcdir) \( -path $(srcdir)/autom4te.cache -o  \
+                           -path $(srcdir)/gnulib-git     -o  \
+                           -name .git             -o  \
+                           \( -type d -name CVS \)  \
+                       \) -prune -o                  \
+       \( -type f -o -type l \)  \
+       \! \( -name '*~' -o -name '*.xo' -o -name '*.xi' \) \
+       -print0 | \
+       xargs -0 python $(AUXDIR)/src-sniff.py
+
+# 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/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..700ccdf
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,1725 @@
+GNU findutils NEWS - User visible changes.      -*- outline -*- (allout)
+
+* Major changes in release 4.5.10, 2011-05-11
+
+** Documentation Changes
+
+The manual now includes a small number of references to further
+reading on security.
+
+** Bug Fixes
+
+#30608: Automagic dependency on selinux.  The configure script now
+provides a --without-selinux option.
+
+#29949: find -execdir does not change working directory
+
+#31359: test-strstr unit test fails on alpha.
+
+#30777: find -exec echo TURNIP{} \+ is accepted but TURNIP is eaten
+
+#30180: error message from incorrect -size option is off
+
+#29828: test suite deadlock on FreeBSD.
+
+** Translations
+
+Updated translations: Finnish, Italian, Danish, Slovenian, German,
+Estonian, French, Japanese, Danish.
+
+* Major changes in release 4.5.9, 2010-04-29
+
+** Bug Fixes
+
+#29593: Make import-gnulib.sh work under a POSIX shell.
+
+#29511: fails to build on kfreebsd-*
+
+#27563: -L breaks -execdir
+
+#19593: -execdir .... {} + has suboptimal performance (see below)
+
+** Translations
+
+Updated translations: Chinese (simplified).
+
+** Performance changes
+
+The find program will once again build argument lists longer than 1
+with "-execdir ...+".  The upper limit of 1 argument for execdir was
+introduced as a workaround in findutils-4.3.4.   The limit is now
+removed, but find still does not issue the maximum possible number of
+arguments, since an exec will occur each time find encounters a
+subdirectory (if at least one argument is pending).
+
+** Functional enhancements to xargs
+
+You can now increase the parallelism of xargs in mid-run by sending
+it SIGUSR1, and decrease the parallelism with SIGUSR2.
+
+* Major changes in release 4.5.8, 2010-04-07
+
+** Bug Fixes
+
+#29460: -printf %Y fails in $CWD-dependent way
+
+#27974: Use gnulib's xreadlinkat support
+
+#29435: fd_is_cloexec does not work on Fedora buildhosts
+
+#27221: symlink_loop check broken by FTS_CWDFD
+
+#27213: avoid failed assertions for non-executable directories.
+
+** Translations
+
+Updated Vietnamese, Czech, Dutch, Polish, Russian translations.
+
+* Major changes in release 4.5.7, 2010-04-03
+
+** Performance changes
+
+If you use the -fstype FOO predicate and specify a filsystem type FOO
+which is not known (e.g. present in /etc/mtab) at the time find
+starts, that predicate is now equivalent to -false.  This substitution
+currently occurs at optimisation level 2 and above.
+
+** Translations
+
+Copyright headers in the translation files have been updated.  Some
+additional messages have been marked for translation.  However, there
+have not been any changes to translation text.  The main purpose of
+this release is to provide a base for updated translations.
+
+* Major changes in release 4.5.6b, 2010-03-30
+
+This is a replacement release for 4.5.6, which is not available by FTP
+since it contains Makefiles which are vulnerable to CVE-2009-4029.
+
+* Major changes in release 4.5.6, 2010-03-30
+
+** Functional Enhancements to find
+
+patch #4848: Patch - Support for SELinux
+
+** Bug Fixes
+
+#29089: SELinux --context and %Z options
+
+#28872: Mistake in "#safer" example in "Problems with -exec and
+        filenames" section of the Texinfo manual.
+
+#28824: Corrected error message for "-ctime x".
+        Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
+        -uid, -used, -atime, -mtime, -ctime.
+
+#27975: Infinite loop for -exec [..] {} +.
+
+#27846: Assertion failure in xargs.c on AIX.
+
+#27375: Open file descriptors leak into child processes.
+
+#27017: find -D opt / -fstype ext3 -print , -quit coredumps
+
+#27328: segfault if the initial exec for "find -exec" fails.
+
+#27017: find -D opt / -fstype ext3 -print , -quit coredumps.
+
+#26868: compilation error in pred.c on Solaris x86_64
+
+#24873: Duplicate fprint option corrupts output
+
+#23920: warn about un-matchable -path arguments ending in /.
+
+#19120: Patch to fix single quotes in man page find(1)
+
+** Documentation Changes
+
+#26327: xargs man page is vague about the number of times command is executed.
+
+* Major changes in release 4.5.5, 2009-07-06
+
+xargs now handles the case where the system's actual exec limits are
+smaller than the value of ARG_MAX at compile time.  Very few platforms
+normally have this property, but it is possible to configure some Unix
+systems this way.
+
+** Bug Fixes
+
+#25359: files/testsuite/find.gnu/posix-h.exp tests fail
+
+#26587: Fix a typo in -execdir documentation (it says -exec by mistake
+in the text).
+
+#26537: find -prune now makes sure it has valid stat() information.
+
+#22708: Exit status 126 and 127 from the utility invoked from xargs
+now makes xargs return 123, meaning that exit status values 126 and
+127 now unambigously mean that the utility could not be run or could
+not be found, respectively.
+
+** Documentation Changes
+
+The -wholename option to find is no longer preferred over -ipath.
+
+
+* Major changes in release 4.5.4, 2009-03-10
+
+** Performance changes
+
+The ftsfind executable (which is built by default as "find") now calls
+fts() in such a way that it avoids calling stat() on directory
+entries, if it doesn't need the information.  This can produce a
+significant speedup on filesystems which don't populate the d_type
+element of struct dirent, for example reiserfs.  Anecdotal evidence
+suggests this can speed updatedb up from about 30 minutes to 3-4
+minutes.
+
+The ftsfind executable also now avoids calling stat() functions to
+discover the inode number of a file, if we already read this
+information from the directory.  This does provide a speed-up, but
+only for a restricted set of commands such as "find . -inum 4001".
+This fix is listed below as bug #24342.
+
+** Bug Fixes
+
+#25764: remove duplicate entry for 'proc' in updatedb's $PRUNEFS.
+
+#25359: find -H wrongly behaves like -L sometimes; this bug affects
+only filesystems which populate d_type and affects -type and -printf
+%y.   This does not affect the default behaviour of find or find -P.
+
+#25144: Misleading error message when argument to find -user is an
+unknown user or is missing.
+
+#25154: Allow compilation with C compilers that don't allow
+declarations to follow statements.
+
+#24342: -inum predicate shoud use dirent.d_ino instead of stat.st_ino
+(this is a performance bug).
+
+** Translations
+
+Updated translations for Bulgarian, German, Irish, Hungarian,
+Lithuanian, Dutch, Polish, Slovenian, Swedish, Turkish, Ukranian,
+Vietnamese.
+
+** Documentation Changes
+
+The file README-CVS has been renamed to README-hacking and improved.
+
+* Major changes in release 4.5.3, 2008-12-07
+
+** Bug Fixes
+
+#24283: find-4.5.2 -printf %TY causes NULL pointer dereference
+
+** Performance changes
+
+Changes to gnulib's fts code should provide performance improvements
+in find when processing very large directories (for example
+directories containing significantly more than 10000 filenames).
+Performance imporvements may only exist for some find command lines
+(performance testing was done for the fts implementation itself but
+we haven't done the analogous performance tests in find).
+
+File type information is also passed back from fts to find, saving
+calls to the stat system call for find command lines which don't need
+the stat information.  This provides a performance improvement for
+common cases like "find . -type d".
+
+* Major changes in release 4.5.2, 2008-09-07
+
+** Bug Fixes
+
+#24169: find would segfault if the -newerXY test was not followed by
+any argument.
+
+#23996: integer overflow on some platforms when parsing "-used 3".
+
+** Documentation Enhancements
+
+#23070: Corrected manpage description of find -perm /000 (the change
+was already made but the manpage indicated the change would happen
+"soon").
+
+** Translations
+
+Updated translation: French, Indonesian.
+New translation: Czech.
+
+* Major changes in release 4.5.1, 2008-06-21
+
+** Bug Fixes
+
+#22662: find -printf %AX appends nanoseconds in the right place now.
+
+#23663: crash in some locales for -printf %AX (this problem seems to
+have affected only the CVS code, and not any public releases).
+
+** Translations
+
+New translation: Lithuanian.
+
+Updated translations: Chinese (simplified).
+
+** Documentation Enhancements
+
+Added a worked example describing how to find the shallowest instances
+of a given directory name (or names) in a directory hierarchy.
+
+* Major changes in release 4.5.0, 2008-05-21
+
+** Functional Enhancements to find
+
+If the POSIXLY_CORRECT environment variable is set, the system's
+definition of "yes" and "no" responses are used to interpret the
+response to questions from -ok and -okdir.  The default is still to
+use information from the findutils message translations.
+
+** Enhancements
+
+If xargs find that exec fails because the argument size limit it
+calculated is larger than the system's actual maximum, it now adapts
+by passing fewer arguments (as opposed to failing).
+
+** Performance changes
+
+The default optimisation level for find is now -O2 instead of -O0,
+meaning that a number of additional optimisations are performed by
+default.   Current optimisations at each level are:
+
+0:      Perform -name, -path, -iname, -ipath before other checks.
+1:      Expressions containing only cost-free tests are evaluated
+        before expressions which contain more costly tests.
+2:      Bring forward all tests that need to know the type of a file
+        but don't need to stat it.
+3:      All tests are ordered by their estimated cost.
+
+Cost here is simply an estimate of how time consuming the I/O
+operations needed to make a test are.
+
+** Bug Fixes
+
+
+#22662: nanoseconds wrongly appended after "PM" for find -printf %AX
+in locale en_US.UTF-8.
+
+#15472: Error messages that print ino_t values are no longer truncated
+on platforms with 64-bit ino_t.
+
+On some systems without support for a boolean type (for example some
+versions of the AIX C compiler), find's regular expression
+implementation fails to support case-insensitive regular expression
+matching, causing -iregex to behave like -regex.  This is now fixed.
+
+** Documentation Changes
+
+#20873: Indicate that * matches / and leading dot in filenames for
+"find -path".
+
+Both the Texinfo manual and the find manual page now include a more
+precise description of how your locale configuration affects the
+interpretation of regular expressions and how your response to prompts
+from the -ok action are interpreted.
+
+* Major changes in release 4.3.13, 2008-02-14
+
+** Bug Fixes
+
+#22057: Actually rename the old locate database to the new one
+atomically, instead of just claiming the rename is atomic in a
+comment.
+
+#22056: -Xtime tests are off by one second (e.g. rm -f x; touch x;
+find x -mtime 0 should print x).
+
+#21960: xargs should collect the exit status of child processes even if
+the total count of unreaped children has not yet reached the maximum
+allowed.
+
+** Documentation Fixes
+
+Documented various useful techniques with invoking "sh -c" from
+xargs in the Texinfo documentation.
+
+** Translations
+
+Updated the German, Irish, Dutch, Polish and Vietnamese translations.
+
+
+* Major changes in release 4.3.12, 2007-12-19
+
+** Bug Fixes
+
+#15384: Find misbehaves when parent directory is not readable.
+
+** Documentation Fixes
+
+More examples in the xargs manual page, including a portable analogue
+for BSD's "xargs -o".
+
+** Translations
+
+Updated translations: Polish, Dutch, Portuguese, Swedish, Vietnamese.
+
+
+* Major changes in release 4.3.11, 2007-12-02
+
+** Functional changes
+
+When the POSIXLY_CORRECT environment variable is set, "find -perm
++a+w" is rejected as invalid.  Some other similar mode strings
+starting with '+' which are not valid in POSIX are also rejected.
+
+The -prune action now always evaluates as true (this is also a
+bugfix).
+
+
+** Bug Fixes
+
+#21568: Switch to checking the gnulib code out with native git, not
+CVS.  This affects mainly those who check findutils code out of CVS.
+This is not the first time this bug has been fixed (the previous fix
+used "cvs update -D", which git-cvspserver silently does not
+support).
+
+#21039: Setting the POSIXLY_CORRECT environment variable now turns off
+warnings by default, because POSIX requires that only diagnostic
+messages (and -ok prompts) are printed on STDERR, and diagnostic
+messages must also result in a nonzero exit status.
+
+#20970: Trailing slash on directory arguments breaks -name.  "find
+foo/ -name foo" now correctly matches foo and printf foo/.  See POSIX
+interp http://www.opengroup.org/austin/interps/uploads/40/14959/AI-186.txt
+
+#20865: Using both -delete and -prune without explicitly using -depth
+is now an error.  Traditionally, -delete has always turned -depth on
+anyway, so this is not a functional change.   However, using -depth
+(implicitly or explicitly) makes -prune a no-op.  This change is
+intended to avoid nasty surprises for people who test with
+"-print" and then change it to "-delete" when they are happy.
+
+#20803: POSIX requires that -prune always returns true.  Previously it
+returned false when -depth was in effect and true otherwise.
+
+#20802: If -delete fails, find's exit status will now be non-zero.
+However, find still skips trying to delete ".".
+
+** Documentation Fixes
+#21635: Some of the documentation files had missing copying
+conditions.   The missing files now have copying headers, and these
+are compatible with each other (GNU FDL 1.2).
+
+#21634: No copy of FDL 1.2 included with the source code
+
+#21633: Missing copyright/license header in some documentation.
+
+#21628: find -perm /000 matches all files rather than none, since
+findutils-4.3.3.  The Texinfo documentation is now consistent with the
+manual page on this point.
+
+#21270: Formatting fixes to the xargs.1 manual page, including making
+options bold instead of italic and making OPTIONS a section header
+rather than a subsection.
+
+* Major changes in release 4.3.10, 2007-11-13
+
+** Bug Fixes
+
+#21568: findutils gnulib code does not match the date in
+import-gnulib.config.  We now check out the gnulib code via
+git-cvs-pserver.
+
+* Major changes in release 4.3.9, 2007-11-11
+
+** Licensing
+
+Findutils version 4.3.9 is released under version 3 of the GNU General
+Public License.
+
+** Bug Fixes
+
+#20834: Avoid segmentation violation for -execdir when $PATH is
+unset.  Assume that the PATH is safe in this situation.
+
+#20310: configure uses hosts's support status for "sort -z" when
+generating the updatedb script for use on the target.  This is
+inappropriate when cross-compiling, so avoid doing that.
+
+#20263: Compilation fix for DEC Alpha OSF/1 cc, which forbids the
+ordering comparison of function pointers.
+
+#20139: find -[acm]time -N (wrongly) includes files from N days ago,
+as well as (correctly) from less than N days ago.
+
+#20273: When xargs is successful without consuming all of stdin (for
+example, with the -E option), and stdin is seekable, xargs now
+correctly restores the file position, even on platforms where exit()
+does not follow the POSIX rules of doing likewise.  Likewise for find
+(for example, with the -ok action).
+
+#20547: The version information printed by find, xargs, locate,
+updatedb, frcode and code now complies with the GNU Project's coding
+standards.
+
+#20662: Avoid memory leak in find -name and other places affected by
+gnulib dirname module.  The leak had been present since 4.3.1.
+
+#20751: Avoid memory corruption in find -ls that has been present
+since 4.3.1.
+
+#20871: Assertion failure introduced in 4.3.3, when oldfind is invoked
+in a directory where the parent directory lacks search permission.
+
+** Enhancements
+
+#20594: Allow fine-tuning of the default argument size used by xargs
+and find at ./configure time.
+
+#20688: The warning printed by -name or -iname when the pattern to
+match contains a slash can now be silenced by -nowarn.  This warning
+was originally introduced unconditionally in 4.2.21.
+
+Translation of locate --limit problems is improved.
+
+POSIX will standardise -path, so the documentation no longer claims
+that -wholename is the 'canonical' test, and -ipath no longer
+generates a warning.
+
+** Documentation Fixes
+
+Point out more explicitly that the subsecond timestamp support
+introduced by findutils-4.3.3 introduces a change in the format of
+several fields.
+
+Also explain that when reporting a bug, you should check the most
+recent findutils release first.
+
+Introduced doc/find-maint.texi, a maintenance manual for findutils.
+
+Added an extra worked example for find (copying a subset of files).
+
+The locate command's manual page now has a HISTORY section.
+
+#20951: Very bad/unclear/confusing documentation of security checks in
+find -execdir
+
+#20865: Better documentation on the fact that -delete implies -depth
+and that -delete interacts badly with -prune.
+
+#20552: Fixed typos, formatting and section ordering issues in the
+find manual page.
+
+#20529: removed spurious 'o' in description of "xargs -a" in
+doc/find.texi.
+
+#20232: The --max-database-age option of locate was added in release
+4.3.3, but this file (NEWS) did not previously mention this fact.
+
+** Translations
+
+Updated Dutch translation.
+
+
+* Major changes in release 4.3.8, 2007-06-12
+
+** Bug Fixes
+
+#20157: Avoid segfault in locate when run as root.  This is caused by
+a buffer overrun, but at this time no exploit mechanism is known.
+
+* Major changes in release 4.3.7, 2007-06-09
+
+** Functional changes
+
+Locate can now read old-format locate databases generated on machines
+with a different byte order.  It does this by guessing the byte order,
+so the result is not completely reliable.  If you need to share
+databases between machines of different architectures, you should use
+the LOCATE02 format (which has other advantages, as explained in the
+documentation).
+
+** Security Fixes
+
+#20014: Findutils-4.3.7 includes a patch for a potential security
+problem in locate.  When locate read an old-format database, it read
+file names into a fixed-length buffer allocated on the heap without
+checking for overflow.  Although overflowing a heap buffer is often
+somewhat safer than overflowing a buffer on the stack, this bug still
+has potential security implications.
+
+This bug also affected the following previous findutils releases:
+
+ - All releases prior to 4.2.31
+ - Findutils 4.3.0 to 4.3.6.
+
+This bug has been assigned CVE number CVE-2007-2452.
+
+** Bug Fixes
+
+#20128: Fix compilation error of find/tree.c on AIX with GCC.
+
+#20005: Tests -mtime -n and -mtime +n incorrectly treated like -mtime n.
+
+#19983: include_next causes compilation failure in findutils 4.3.6 on
+non-GCC compilers
+
+#19981: Don't call setgroups if the function isn't available.  This
+fixes Savannah bug# 19981.
+
+#19980: Don't use the functions putw() or getw() since these are not
+in current POSIX.  Use the gnulib version of wcwidth() where the
+system does not provide it.
+
+#19979: Compilation errors on BeOS
+
+#19970: Cannot cast from pointer to bool using gnulib's <stdbool.h>
+
+#19967: Use of __attribute((__noreturn__)) makes compilation fail with
+some non-GCC compilers
+
+#19966: find should link against -lm for modf() and fabs()
+
+#19965: Compilation failure on OSF/1 4.0; non-declaration of uintmax_t
+
+#19948: Assertion failure O_NOFOLLOW != 0 on IRIX 6.5
+
+#19871: Typos in find.1
+
+#19596: Fixed this bug again, this time in the Texinfo manual (the
+discussion should compare %b with %s/512, not %s/1024).
+
+#19416: _FORTIFY_SOURCE warn_unused_result warnings
+
+* Major changes in release 4.3.6, 2007-05-21
+
+** Bug Fixes
+
+#19948: Fixed an assertion failure on IRIX 6.5 (O_NOFOLLOW is defined
+to 0 there).
+
+#19923: Fixed an array overrun in groups[] array of 'locate' when run by
+or as root.  This bug appears not to be exploitable.  If locate is not
+installed setuid, the bug is not exploitable.  For setuid
+installations, it is concievable that there could be an information
+leak if the user uses the -d option or the -e option, though the
+maintainer has been unable to provoke this on an x86 system.
+
+#19871: Spurious .R directives in manpage produced error messages from
+GNU troff.  This is now fixed (they are corrected to .B).
+
+#19416: The result of I/O operations in print-related actions is now
+checked, and failures are reported.  Any failure will cause find's
+exit status to be nonzero.   The predicate itself will continue to
+return true.
+
+** Compilation Fixes
+
+A variety of changes were made to allow compilation to succeed on
+non-GNU systems.
+
+#19983: Now compiles on DEC C V5.9-005 on Digital UNIX V4.0 (or at
+least, should).
+
+#19970: Compile correctly on C89 systems where the "_Bool" type is not
+provided, taking into account the limitations of the gnulib
+replacement for stdbool.h.
+
+#19967: Build successfully with C compilers that don't support the GCC
+ construct __attribute__((__noreturn__)).
+
+#19966: Findutils should now build on systems which have the modf()
+and fabs() functions in the maths library, -lm.  This includes some
+versions of HP-UX and Solaris.
+
+#19965: Fixed a compilation failure on OSF/1 4.0 (no definition of the
+type uintmax_t).
+
+
+* Major changes in release 4.3.5, 2007-05-05
+
+** Functional changes
+
+Updatedb can now support he generation of file name databases which
+are compatible with slocate.  For some time, GNU locate has been able
+to read these.
+
+The /proc filesystem is excluded from the locate database (by
+default; change PRUNEPATHS to modify this behaviour).
+
+** Bug Fixes
+
+#19806: The -samefile predicate might get fooled by inode reuse.  We
+now hold open a file descriptor on the reference file to prevent this.
+
+#19768: Better detection of corrupted old-style locate databases
+(e.g. if the database is too short to include a complete bigram
+table).
+
+#19766: The frcode and code programs now detect write errors more
+reliably.
+
+#19371: Fix compilation failure on systems which #define open to
+open64 (and similarly with the close system call).  This fixes
+Savannah bug #19371, affecting AIX 5.3.
+
+#19658: When cross-compiling, "make clean" no longer deletes the
+generated file doc/regexprops.texi, because there is no way to
+regenerate it.
+
+#19391: When xargs knows that the system's actual exec limit is larger
+than the compiled-in ARG_MAX, use the system's limit without
+generating an assertion failure.
+
+#18203: A duplicate report of bug #17478.
+
+#17478: Error messages from find can garble the console.
+
+#16378: Assertion failure if stat() returns 00000 as the mode
+of a file.  This apparently can happen occasionally with broken NFS
+servers.
+
+#11668: FreeBSD extensions for time specification are now
+implemented.  In fact, these were included in findutils-4.3.3.  The
+change was listed as a functional change (whcih it is) and this bug
+report was not mentioned.
+
+** Documentation Fixes
+
+The locatedb.5 manpage now documents the (default) LOCATE02 format
+more clearly, and also documents the slocate database format.
+
+The maximum and default values applying to the -s option of xargs are
+now documented more clearly in the manual page.
+
+* Major changes in release 4.3.4, 2007-04-21
+
+** Bug Fixes
+
+#19634: Test suite now passes (again) if "." is on your $PATH.
+
+#19619: Findutils builds once again on Cygwin.
+
+#19617: Nonexistent start points are (once again) diagnosed in
+ftsfind.  This bug affected only findutils-4.3.3.
+
+#19616: Fix leaf optimisation and loop detection (which were
+unreliable in findutils 4.3.3).  This bug affected only
+findutils-4.3.3.
+
+#19615: find --version no longer claims to be using FTS_CWDFD when it
+isn't.  This bug affected only findutils-4.3.3.
+
+#19613: "find -L . -type f" no longer causes an assertion failure when
+it encounters a symbolic link loop.  This bug affected only
+findutils-4.3.3.
+
+#19605: Issue an error message (and later return nonzero exit status)
+ if a symbolic link loop was encountered during directory traversal.
+
+#19484: bigram.c and code.c fail if the first pathname recorded begins
+with a space
+
+#19483: Inconsistent option highlighting in updatedb manpage
+
+#18414: Tests for "find -readable" are skipped for the superuser, as
+ on some systems (e.g. Cygwin with an Administrative user) users can
+ read mode-000 files.
+
+** Translations
+
+Findutils 4.3.4 includes a translation for the Ukranian language.
+
+
+* Major changes in release 4.3.3, 2007-04-15
+
+Fiundutils-4.3.3 was released on 2007-04-15.
+
+** Bug Fixes
+
+#19596: Correct the comparison in the find manpage between %b and %s
+(the divisor is 512 not 1024).
+
+#18714: In the POSIX locale, vertical tabs and form feeds are not
+field separators.
+
+#18713: Quoted but empty arguments which occur last on an xargs input
+line are no longer ignored, but instead produce an empty argument.
+
+#18554: Documented the construct  -exec sh -c 'foo "$@" bar' {} +
+
+#18466: we now avoid this bug by limiting "-execdir ...+"
+to just one argument for the time being.  There is a performance
+penalty for doing this.  We hope to make a better fix in a later
+release.
+
+#18384: excess bracket in xargs --help
+
+#18320: Zero bytes in input should give warning
+
+#17437: Corrected the handling of X in symbolic permissions (such
+as-u+w,a+X).  This change actually occurred in findutils-4.3.2, but
+the NEWS file for that release didn't mention it.
+
+#17396: find -mtime -atime -ctime does not support fractional part
+(see "Functional changes" below)
+
+#14748: find -perm /zzz gives wrong result when zzz evaluates to an
+ all-zero mask
+
+#14535: correctly support case-folding in locate (that is, "locate
+-i") for multibyte character environments such as UTF-8.  Previously,
+if your search string contained a character which was outside the
+single-byte-encoding range for UTF-8 for example, then the
+case-folding behaviour failed to work and only exact matches would be
+returned.
+
+
+
+** Functional changes
+
+The -printf action (and similar related actions) now support %S,
+which is a measurement of the sparseness of a file.
+
+The test "-perm /000" now matches all files instead of no files.  For
+over a year find has been issuing warning messages indicating that
+this change will happen.  We now issue a warning indicating that the
+change has already happened (in 4.3.x only, there is no plan to make
+this change in the 4.2.x series).
+
+The tests -newer, -anewer, -cnewer, -mtime, -atime, -ctime, -amin,
+-cmin, -mmin and -used now support sub-second timestamps, including
+the ability to specify times with non-integer arguments.
+
+The -printf format specifiers also support sub-second timestamps:
+  atime   ctime  mtime
+  %a      %c     %t
+  %AS     %CS    %TS
+  %AT     %CT    %TT
+  %A+     %C+    %T+
+  %AX     %CX    %TX
+
+
+The new test -newerXY supports comparison between status times for
+files.  One of the status times for a file being considered (denoted
+X) is checked against a reference time (denoted Y) for the file whose
+name id the argument.  X and Y can be:
+
+   a    Access time
+   B    Birth time (st_birthtime, currently unsupported)
+   c    Change time
+   m    Modification time
+   t    Valid only for the reference time; instead of comparison
+        against a file status time, the argument is a time string.
+        Not yet supported.
+
+For example, -newermm is equivalent to -newer, and -neweram is true if
+the file being considered was accessed more recently than the
+reference file was modified.  The -newerXY test supports subsecond
+timestamps where these are available.  The X=B variant is not yet
+implemented.
+
+If you configure the source code and then run the tests with "make
+check", the test suite fails rather than defaulting to testing the
+system binaries.
+
+A new option, --max-database-age, has been added to locate.
+
+
+* Major changes in release 4.3.2, 2006-11-25
+
+** Bug Fixes
+
+#18222: find -printf '%H %P' once again prints the right result if
+more than one start point was given on the command line.
+
+#17782: find -execdir now correctly puts the prefix "./" before the
+expansion of "{}" rather than at the start of the argument it appears
+in.  Please note that if you use the -exec or -execdir actions with a
+shell, then you may be vulnerable to shell code injection attacks, so
+don't do that.  It's not a security defect in find - you should not be
+passing untrusted data (such as file names chosen by other people) to
+the shell.
+
+#17490: find  -regex generated a segfault in findutils-4.3.1, but this
+ is fixed in findutils-4.3.2.
+
+#17477: find -printf '%' (that is, where the format has a trailing %)
+now generates an error message.
+
+#17372: The fts-based find executable (the default configuration uses
+fts) is now much faster when -maxdepth is used on filesystems with
+high fanouts.
+
+#15531: The -prune action now behaves correctly when applied to a file.
+
+** Functional changes
+
+The slocate database format is now supported.  Preliminary changes
+intended to eventually allow setuid operation of locate have also been
+made.  For the moment, please don't install GNU locate as a
+set-user-ID program (except for testing purposes; if you do so, please
+make sure that untrusted users cannot execute the set-user-ID locate
+program).
+
+Use of an slocate database which was built with a nonzero security
+mode (at the moment, GNU updatedb will not do this) forces locate's
+"-e" option to be turned on, which has an effect on the "-S" option
+which is probably surprising for most users.
+
+
+** Documentation Fixes
+
+The global effect of options (other than -daystart and -follow) is now
+explained more clearly in the manual page.   Savannah bug #15360.
+
+
+* Major changes in release 4.3.1, 2006-08-06
+
+** Bug Fixes
+
+Find now follows POSIX rules for determining where directories end and
+expressions start.  This means that "find \(1 \!2 \, \)" now searches
+in the four named directories, rather than trying to parse an
+expression. (Savannah bug #15235).
+
+You now get a more helpful error message when you use command lines
+which have missing expressions, such as
+      find . ( )
+      find . !
+      find . -a
+      find . \( -not \)
+      find . \( -true -a
+
+Savannah bug #15800: If find finds more subdirectories within a parent
+directory than it previously expected to based on the link count of
+the parent, the resulting error message now gives the correct
+directory name (previously an error message was issued but it
+specified the wrong directory).
+
+Savannah bug #16738: "find .... -exec ... {} +" now works if you have
+a large environment and many files must be passed to the -exec
+action.  The same problem affected the -execdir action, though since
+the number of files in a given directory will normally be smaller, the
+problem was worse for -exec.
+
+Savannah bug #16579: Updatedb now works if it is running as a user
+whose login shell is not actually a shell.
+
+There have also been a number of documentation improvements (includng
+Savannah bug #16269).
+
+** Functional changes
+
+For find, debug output can now be enabled at runtime with the -D
+option.  This causes the printing of various sorts of information
+about find's internal state and progress.
+
+The find option -nowarn cannot itself produce a warning (this used to
+happen with commands like "find . -name quux -nowarn -print").
+
+** Performance Enhancements
+
+Find now has a rudimentary cost-based optimiser.  It has an idea of
+the basic cost of each test (i.e. that -name is very cheap while -size
+is more expensive).  It re-orders tests bearing in mind the cost of
+each test and its likely success.  Predicates with side effects (for
+example -delete or -exec) are not reordered.  The optimiser is not
+yet enabled by default, but the new option -O controls the query
+optimisation level.  To see this in action, try
+  find -D opt -O3 . -type f -o -type c -o -size 555 -name Z
+and compare the optimised query with:
+  find -D opt -O3 . -size 555 -o -type c -o -type f -name Z
+and
+  find -D opt     . -size 555 -o -type c -o -type f -name Z
+
+Over time, as optimisations are proven to be robust and correct, they
+will be moved to lower optimisation levels.  Some optimisations have
+always been performed by find (for example -name is always done early
+if possible).
+
+** Translations
+
+Findutils 4.3.1 includes updated translations for the following
+languages:
+ Vietnamese, Belarusian, Catalan, Danish, German, Greek, Esperanto,
+ Spanish, Estonian, Finnish, French, Irish, Galician, Croatian, Hungarian,
+ Indonesian, Italian, Japanese, Korean, Luganda, Malay, Dutch, Polish,
+ Portuguese, Brazilian Portuguese, Romanian, Russian, Kinyarwanda,
+ Slovak, Slovenian, Serbian, Swedish, Turkish, Chinese (simplified),
+ Chinese (traditional), Bulgarian
+
+* Major changes in release 4.3.0, 2005-12-12
+
+The 4.3.x release series are currently 'development' releases.  Please
+test it, but think carefully before installing it in a production
+system.  New features in findutils-4.3.x are under development; they
+may change or go away.
+
+All changes up to and including findutils-4.2.27 are included in this
+release.  In addition the following changes are new in this release:
+
+** Functional Changes
+
+By default, find now uses the fts() function to search the file
+system.  The use of fts greatly increases find's ability to search
+extremely deep directory hierarchites.
+
+You can tell that the version of find you are using uses FTS, because
+the output of "find --version" will include the word "FTS".
+
+Currently two binaries for 'find' are built.  The configure option
+--without-fts can be used to select whether 'find' uses fts:
+
+                                  With fts      Without fts
+default configuration             find          oldfind
+configure --with-fts              find          oldfind
+configure --without-fts           ftsfind       find
+
+New tests, -readable, -writable, -executable.  These check that a file
+can be read, written or executed respectively.
+
+* Major changes in release 4.2.27, 2005-12-06
+
+** Warnings of Future Changes
+
+The test -perm /000 currently matches no files, but for greater
+consistency with -perm -000, this will be changed to match all files;
+this change will probably be made in early 2006.  Meanwhile, a warning
+message is given if you do this.
+
+** Bug Fixes
+
+If xargs is invoked with many short arguments on PPC systems running
+the Linux kernel, we no longer get an "argument list too long" error
+from the operating system.
+
+Fixed a bug in the test suite which caused it to spuriously fail on
+systems where ARG_MAX is different to the value used by the Linux
+kernel on 32-bit x86-architecture systems.
+
+On systems running the Linux kernel, "find -printf %F" no longer
+produces the wrong answer for files on filesystems that have been
+remounted elsewhere using "mount --bind". (Savannah bug #14921).
+
+** Documentation Changes
+
+Following some extensive and detailed review comments from Aaron
+Hawley, the material in the manual pages and the Texinfo manual are
+now synchronised.
+
+The %M format specifier of "find -printf" is now documented, although
+it has existed since release 4.2.5.
+
+The 'find' manual page now correctly documents the fact that -regex
+defaults to using Emacs-style regular expressions (though this can be
+changed).
+
+* Major changes in release 4.2.26, 2005-11-19
+
+** Public Service Announcements
+
+I'd like to point out a second time that the interpretation of '-perm
++mode' has changed to be more POSIX-compliant.  If you want the old
+behaviour of the GNU extension you should use '-perm /mode'.  See the
+NEWS entry for findutils version 4.2.21 for details.
+
+** Functional Changes
+
+The xargs command now supports a new option (--delimiter) which allows
+input items to be separated by characters other than null and
+whitespace.  This resolves Savannah support request sr #102914.
+
+Sometimes find needs to read the /etc/mtab file (or perform the
+equivalent operation on systems not using /etc/mtab).  If this
+information is needed but not available, find now exits with an error
+message non-zero status.  If the information is not needed, find will
+not spuriously fail.
+
+A new xargs option --delimiter allows the input delimiter to be
+changed (previously \0 was the only choice unless you use the -L
+option, which changes other semantics too).
+
+** Bug Fixes
+
+If the environment size is too large to allow xargs to operate
+normally, 'xargs --help' still works (now).
+
+If the input to xargs is a large number of very short options (for
+example, one character each), earlier versions of xargs would fail
+with 'Argument list too long'.  However, since this is precisely the
+problem that xargs was invented to solve, this is a bug.  Hence on
+those systems we now correctly use a shorter command line.  This
+problem particularly affected 64-bit Linux systems because of the
+larger size of pointers, although 32-bit Linux systems were also
+affected (albeit for longer command lines).  In theory the same
+problem could affect 'find -exec {} +', but that's much less likely
+(even so, the bug is fixed there too).
+
+Bugfix for an unusual failure mode (Savannah bug #14842) where an
+attempt to allocate more space for directory contents succeeds but is
+incorrectly diagnosed as a failure.  The likelihood of you
+experiencing this depends on your architecture, operating system and
+resource limits.  This failure has been observed in a directory
+containing 35396 entries.
+
+** Documentation Changes
+
+The EXAMPLES section of the find manual page now correctly describes
+the symbolic and octal modes for the -perm test.
+
+The documentation and "--help" usage information for the -L, -l, -I
+and -i options have been clarified (but the behaviour has not changed).
+
+The documentation now explains more clearly what happens when you use
+"-L -type l".
+
+* Major changes in release 4.2.25, 2005-09-03
+
+** Bug Fixes
+
+find -perm /440 (which should succeed if a file is readable by its
+owner or group) now works.  Previously there was a bug which caused
+this to be treated as "find -perm 440".
+
+Some files in the xargs test suite have been renamed to avoid problems
+on operating systems whoch cannot distinguish filenames on the basis
+of upper/lower case distinctions.
+
+The software now builds on Cygwin, including the generated file
+regexprops.texi.
+
+Findutils should now build once again on systems supporting AFS, but
+this support has not recently been fully tested.  Findutils should
+also (once again) build on Cygwin.
+
+** Other Changes
+
+The test suite for find is now much more extensive.
+
+* Major changes in release 4.2.24, 2005-07-29
+
+** Documentation Changes
+
+The manual now includes a "Worked Examples" section which talks about
+the various ways in which findutils can be used to perform common
+tasks, and why some of these alternatives are better than others.
+
+The -I option of xargs (which is required by the POSIX standard) is
+now documented.
+
+We now document the fact that find ensures that commands run by -ok
+and -okdir don't steal find's input.  Find does this by redirecting
+the command's standard input from stdin.
+
+Many documentation readability enhancements and proofreading fixes
+were contributed by Aaron Hawley.
+
+** Functional Changes
+
+*** Functional changes in locate
+
+The "--regex" option of locate now assumes the regular expression to
+be in the same syntax as is used in GNU Emacs, though this can be
+changed with the new option --regextype.  This is a change from the
+existing behaviour (which was to use POSIX Basic Regular Expressions).
+Since this feature is releatively new anyway, I though it was more
+useful to have compatibility between regular expression handling in
+find and locate than to maintain the short-lived previous behaviour of
+locate.
+
+The locate program now also supports a "--regextype" long option which
+controls which regular expression syntax is understood by locate.
+This is a long option and has no single-letter 'short option'
+equivalent.
+
+*** Functional changes in find
+
+The regular expression syntax understood by "find" can be changed with
+the -regextype option; this option is positional, meaning that you can
+have several tests, each using a distinct syntax (this is not
+recommended practice however).
+
+The default regular expression syntax is substantially the same as
+that recognised by GNU Emacs, except for the fact that "." will match
+a newline.
+
+The leaf optimisation can be disabled with the configure option
+"--disable-leaf-optimisation", which is equivalent to specifying
+"-noleaf" on all find command lines.  This is useful for systems
+having filesystems which do not provide traditional Unix behaviour for
+the link count on directories (for example Cygwin and the Solaris 9
+HSFS implementation).
+
+** Bug Fixes
+
+*** Bug Fixes for find
+
+The -iregex test now works once again on systems that lack
+re_search() (that is, systems on which findutils needs to use the
+gnulib version of this function).
+
+find -regex now once again uses GNU Emacs-compatible regular
+expressions.
+
+If invoked with stderr closed, the -fprint and -fprintf actions now no
+longer cause error messages to be sent into the output file.
+
+If the link count of a directory is less that two, the leaf
+optimisation is now disabled for that directory.  This should allow
+searching of non-Unix filesystems to be more reliable on systems that
+don't take the trouble to make their filesystems look like traditional
+Unix filesystems.   Some filesystems don't even take the trouble to
+have a link count of less than two and for these, -noleaf is still
+required unless --disable-leaf-optimisation was used at configure time.
+
+The "%Y" directive for the -printf action now no longer changes find's
+idea of the mode of the file, so this means among other things that
+"-printf %Y %y" now works properly.  This is Savannah bug #13973.
+
+* Major changes in release 4.2.23, 2005-06-19
+
+** Documentation Changes
+
+The -L and -I options of xargs are currently incompatible (but should
+not be).
+
+Improved the documentation for -execdir and -okdir.
+
+** Functional Changes to updatedb
+
+File names ending in "/" which are specified as an argument to
+--prunepaths (or in $PRUNEPATHS) don't work, so we now issue an error
+message if the user tries to do that.  The obvious exception of course
+is "/" which does work and is not rejected.
+
+
+* Major changes in release 4.2.22, 2005-06-12
+
+** Security Fixes
+
+If a directory entry searched with "find -L" is a symbolic link to
+".", we no longer loop indefinitely.  This problem affected find
+versions 4.2.19, 4.2.20 and 4.2.21.  This problem allows users to make
+"find" loop indefinitely.  This is in effect a denial of service and
+could be used to prevent updates to the locate database or to defeat
+file security checks based on find.   However, it should be noted that
+you should not use "find -L" in security-sensitive scenarios.
+
+** Other Bug Fixes
+
+None in this release.
+
+** Functional Changes to locate
+
+A locate database can now be supplied on stdin, using '-' as a element
+of the database-path. If more than one database-path element is '-',
+later instances are ignored.
+
+A new option to locate, '--all' ('-A') causes matches to be limited to
+entries which match all given patterns, not entries which match
+one or more patterns.
+
+** Documentation Changes
+
+Some typos in the manual pages have been fixed.  Various parts of the
+manual now point out that it is good practice to quote the argument of
+"-name".  The manpage now has a "NON-BUGS" section which explains some
+symptoms that look like bugs but aren't.  The explanations of the "%k"
+and "%b" directives to "find -printf" have been imrpoved.
+
+
+* Major changes in release 4.2.21, 2005-06-07
+** Functional Changes to find
+
+The GNU extension "find ... -perm +MODE" has been withdrawn because it
+is incompatible with POSIX in obscure cases like "find ... -perm ++r".
+Use the new syntax "find ... -perm /MODE" instead.  Old usages will
+still continue to work, so long as they don't conflict with POSIX.
+
+If the output is going to a terminal, the -print, -fprint, -printf and
+-fprintf actions now quote "unusual" characters to prevent unwanted
+effects on the terminal.  See "Unusual Characters in File Names" for
+further details.  There is no change to the behaviour when the output
+is not going to a terminal.   The locate program does the same thing,
+unless the -0 option is in effect (in which case the filenames are
+printed as-is).
+
+** Functional Changes to locate
+
+The locate command will now read each locate database at most once.
+This means that if you are using multiple databases and are searching
+for more than one name, the results will now be printed in a different
+order (and if you specified a small limit with --limit, you may get a
+different set of results).
+
+A new option '--print' for locate causes it to print the matching
+results even if the '--count' or '--statistics' option is in effect.
+
+** Bug Fixes
+find /blah/blah/blah -depth -empty now works once again.
+
+The -regex and -iregex tests of find now correctly accept POSIX Basic
+Regular Expressions.  (Savannah bug #12999)
+
+The updatedb program now works on systems where "su" does not support
+the "-s" option, for example Solaris.
+
+* Major changes in release 4.2.20, 2005-03-17
+** Internationalization and Localization
+Updated Vietnamese and Dutch translations.
+
+** Bug Fixes
+Minor bugfix affecting only those who compile from the CVS repository,
+as opposed to those who compile from the source releases.
+
+* Major changes in release 4.2.19, 2005-03-07
+** Bug Fixes
+
+find should now no longer hang on systems which lack the O_NOFOLLOW
+flag to open(2) and which are clients of an unresponsive NFS server
+(Savannah bug #12044).
+
+We now avoid inappropriately failing for "find -L foo" or "find -H
+foo" if foo is a symbolic link (Savannah bug #12181).  Previously we
+used to fail with the error message "Too many levels of symbolic
+links".
+
+"find . -false -exec foo {} +" no longer runs an extra instance of foo
+when find exits (Savannah bug #12230).
+
+If the chdir() safety check fails but we can no longer get back to
+where we started, exit with an explanatory (fatal) error message.
+This does not happen on GNU/Linux and FreeBSD because the safety check
+is not needed (the security problem the safety check protects against
+is prevented in a cleaner way on those systems).
+
+"make distclean" no longer deletes regex.c (which "make all" needs).
+
+**  Functionality Changes
+"find -printf "%h\n" will now print "." for files in the current directory.
+Previously it printed nothing (but there was a bug in the %h
+implementation anyway).  This fixes Savannah bug #12085.
+
+Should now build (again) on non-C99-compliant systems.
+
+** Documentation enhancements
+Fixed some typos and clarified wording in "Working with automounters".
+
+** Internationalization and Localization
+New Vietnamese message translation.
+\f
+* Major changes in release 4.2.18, 2005-02-16
+** Bug Fixes
+*** "find -depth" was missing out non-leaf directories when they contain
+    non-directories.  This affected findutils releases 4.2.15,
+    4.2.16 and 4.2.17, but the bug is now fixed.
+*** Find no longer hangs on systems which are clients of unresponsive
+    NFS servers.
+**  Documentation improvements
+*** Improvements and corrections to the find.1 manpage, including corrections to the descriptions of -H and -L.
+\f
+* Major changes in release 4.2.17, 2005-02-08
+** Bug Fixes
+*** bug #11861  undefined symbol "basename" on IRIX 5.3
+*** bug #11865  xargs -i regression  (as compared to findutils-4.2.12)
+*** bug #11866  Typo in pred_okdir renders it useless (affecting 4.2.16 only)
+*** patch #3723 fix recent process_top_path change (for -execdir on /)
+*** Fixing bug #11866 and applying patch #3723 made -execdir work much better.
+*** find bar/baz/ugh now works again if baz is a symbolic link (broken
+    in 4.2.15).
+\f
+* Major changes in release 4.2.16, 2005-02-05
+**  Functionality Changes
+*** Updated the message catalogues for the translated messages.
+*** The subfs filesystem is now treated the same as the autofs
+    filesystem is.
+*** New translations:  Belarusian, Catalan, Greek, Esperanto,
+    Finnish, Irish, Croatian, Hungarian, Japanese, Luganda,
+    Malay, Romanian, Slovenian, Serbian, Chinese (simplified).
+
+**  Bug Fixes
+*** The -execdir action now works correctly for files named on the
+    command line.
+\f
+* Major changes in release 4.2.15, 2005-01-29
+**  Functionality Changes
+*** locate now supports matching regular expression (--regex).
+*** --enable-d_type-optimization (introduced in findutils 4.2.13) is now turned on by default.
+\f
+* Major changes in release 4.2.14, 2005-01-25
+**  Functionality Changes
+*** New options -L, -P, -H for locate.  The work in the same was as the same options for find.
+**  Bug Fixes
+*** Don't include the "findutils/find/testsuite/find.gnu" subdirectory in the
+    distributed tar file more than once.
+*** Should now build on Solaris once again.
+*** -xtype and -printf %Y now work correctly for symbolic links once again
+**  Documentation improvements
+*** All options for "locate" are now documented
+\f
+* Major changes in release 4.2.13, 2005-01-23
+**  Performance Enhancements
+*** On Linux and some other systems, a large performance improvement,
+    because we can eliminate many of the calls to lstat() (in extreme
+    cases, 99% of them).  Limited testing shows a 2x speedup on NFS
+    filesystems.  Other systems which can make use of this enhancement
+    include Mac OS X and *BSD.
+\f
+* Major changes in release 4.2.12, 2005-01-22
+**  Functionality Changes
+*** find is now POSIX-compliant, as far as I know.
+*** -exec ... {} + now works.
+*** New actions -execdir and -okdir which are like -exec and -ok but more secure.
+*** "locate -w" is now a synonym for "locate --wholepath".
+*** An empty path entry in the locate database path (for example "::" in
+    $LOCATE_PATH or in the argument to "locate -d") is taken to mean
+    the default database, whose name is hard-coded in locate.
+**  Bug Fixes
+*** If find or xargs cannot write to stdout, for example because
+    output is redirected to a file and the disk is full, the
+    relevant program will return a non-zero exit status.
+\f
+* Major changes in release 4.2.11, 2004-12-12
+**  Bug Fixes
+*** Compilation fix for systems without EOVERFLOW.
+*** More helpful error message if you make a mistake with (, ), -o or -a.
+**  Functionality Changes
+*** If you have unclosed parentheses on the find command line,
+    or any of a number of similar problems, find will now produce
+    a more helpful error message.
+*** locate -b is now a synonym for locate --basename
+*** locate now supports a --statistics (or -S) option, which prints some
+    statistics about the locate databases.
+*** Implemented the -samefile option.
+**  Documentation improvements
+*** New chapter in the manual, "Security Considerations".
+*** Better documentation for -prune (Mainly thanks to   Stepan Kasal)
+**  Bug Fixes
+*** locate's options -i and -w now work with the -e option (previously a bug
+    prevented this).
+\f
+* Major changes in release 4.2.10, 2004-12-06
+**  Bug Fixes
+*** Portability fix for fstype.c: should now compile on UNICOS, and possibly
+    also produce useful results on BeOS and Dolphin, perhaps other
+    systems too.
+\f
+* Major changes in release 4.2.9, 2004-12-05
+**  Functionality Changes
+*** xargs no longer treats a line containing only an underscore as a logical end-of-file.   To obtain the behaviour that was previously the default, use "-E_".
+*** xargs now supports the POSIX options -E, -I and -L.   These are synonyms
+    for the existing options -e, -i and -l, but the latter three are
+    now deprecated.
+**  Bug Fixes
+*** xargs -n NUM now invokes a command as soon as it has NUM arguments.
+    Previously, it waited until NUM+1 items had been read, and then
+    invoked the command with NUM arguments, saving the remaining one
+    for next time.
+*** If "find -L" discovers a symbolic link loop, an error message is issued.
+*** If you specify a directory on the find command line, but -prune
+    is applied to it, find will no longer chdir() into it anyway.
+**  Documentation improvements
+*** The precise interpretation of the arguments to the -atime, -ctime
+    and similar tests in find has been documented more clearly.
+\f
+* Major changes in release 4.2.8, 2004-11-24
+*** Bugfix to the findutils 4.2.7 automount handling on Solaris.  This
+    worked to some extent in findutils-4.2.7, but is much improved in
+    findutils-4.2.8.
+\f
+* Major changes in release 4.2.7, 2004-11-21
+**  Functionality Changes
+*** xargs can now read a list of arguments from a named file, allowing
+    the invoked program to use the same stdin as xargs started with
+    (for example ``xargs --arg-file=todo emacs'').
+**  Documentation improvements
+*** The Texinfo manual now has an extra chapter, "Error Messages".  Most
+    error messages are self-explanatory, but some of the ones which
+    are not are explained in this chapter.
+**  Bug Fixes
+*** Avoid trying to link against -lsun on UNICOS, which doesn't need it or
+    have it.
+*** Bugfix to the findutils 4.2.6 automount handling (which hadn't been enabled
+    on Solaris).
+*** Reenabled internationalisation support (which had been accidentally
+    disabled in findutils-4.2.5).
+\f
+* Major changes in release 4.2.6, 2004-11-21
+**  Bug Fixes
+*** find now copes rather better when a directory appears to change just as
+    it is about to start examining it, which happens with automount.
+    This is because automount mounts filesystems as you change
+    directory into them.  This should resolve Savannah bugs #3998,
+    #9043.
+\f
+* Major changes in release 4.2.5, 2004-11-11
+**  Functionality Changes
+*** The POSIX options -H and -L are supported.  These control whether or not
+    find will follow symbolic links.
+*** The BSD option -P is also now supported (though in any case
+    it is the default).
+**  Documentation improvements
+***  Better documentation for "xargs -i".
+**  Bug Fixes
+*** "make install" now respects DESTDIR when generating localstatedir.
+    (this is only relevant if you are installing to some location
+    other than the one that you indictaed when you ran "configure").
+*** Compatible with automake versions 1.8 and 1.9.
+*** Build problems on UNICOS now fixed, though the linker will still generate
+    warnings because we try to link with the nonexistent library
+    "-lsun".  Edit $(LIBS) to work around this problem.
+\f
+* Major changes in release 4.2.4, 2004-11-08
+**  Functionality Changes
+*** If your system sort command has a working "-z" option, updatedb will
+    now correctly handle newline characters in filenames (as will
+    locate).
+*** xargs now uses 128Kb of command line by default (less if the system
+    doesn't support that much).
+*** If you specify a 'find' option after non-option, a warning message
+    is now issued.  Options should be specified immediately after the
+    list of paths to search.  These warnings are enabled if you
+    specify the -warn option, or if stdin is a tty.  They are diabled
+    by the use of the -nowarn option.
+*** Like find, the locate program now supports an option --null (short form -0)
+    which changes the result separator from newline to NULL.
+*** Locate supports the option -c (long form --count) which suppresses normal
+    output but prints on stdout the number of results produced (like
+    grep -c).
+*** Locate supports the option -l (long form --limit) which limits the
+    number of results.  This is useful if you only want to find out if
+    there are copies of a certain file on the system, but don't want
+    to wait for the entire locate database to be searched.
+*** Locate now has an option --basename which forces the specified pattern to
+    be matched against the basename of the entries in the locate
+    database, rather than the whole name.  The default behaviour
+    (matching against the whole name of the file including all the
+    parent directory names) corresponds to the option --wholename.
+*** updatedb has a new option, --findoptions, that can be used to
+    pass extra options through to the find command that it uses.
+**  Bug Fixes
+*** "find -printf '%H\n'" now works (rather than segfaulting) on
+    systems that have non-writable string constants.
+*** Better POSIX compliance for the -s option to xargs (out of range
+    values should just result in bounding to the correct range, not an
+    error, so now we just print a warning message and adjust the
+    value).
+*** Corrected section numbers of manual page cross-references
+\f
+* Major changes in release 4.2.3, 2004-10-30
+**  Functionality Changes
+*** Added new action -delete which deletes things that find matches.
+*** Added new action -quit which causes find to exit immediately.
+*** A new format directive '%D' for "find -printf" prints the device number.
+*** The -ls predicate no longer truncates user or group names.
+*** Added new option "-d" which is a synonym for "-depth" for compatibility
+    with Mac OS, OpenBSD and FreeBSD.  This option is already
+    deprecated since the POSIX standard specifies "-depth".
+*** Added two new format specifiers to the -printf action; these are
+    %y and %Y.  They indicate the type of the file as a single letter;
+    these are the same latters as are used by the "-type" test.
+*** If a parent directory changes during the execution of find,
+    the error message we issue identifies the nature of the change
+    (for example the previous and current inode numbers of the
+    directory we've just returned out of).
+** Other Changes
+*** Non-functional code changes to silence compiler warnings.
+\f
+* Major changes in release 4.2.2, 2004-10-24
+**  Documentation improvements
+*** "find ... -exec {}+" is not yet supported.
+** Bug Fixes
+*** Fixed compilation problems on Solaris, RedHat EL AS 2.1, Irix, AIX
+*** Work around possible compiler bug on HP-UX 11.23 for ia64
+*** The built-in internationalisation support now works again.
+** Other Changes
+*** We now import the gnulib source in the way it is intended to be used,
+    which means among other things that we only have one config.h file
+    now.
+*** Functions which findutils requires but which are not present in
+    gnulib are now defined in "libfind.a".  This is in the lib
+    directory, while gnulib is in the gnulib subdirectory.
+*** Fixed a typo in the address of the FSF in many of the file headers.
+\f
+* Major changes in release 4.2.1, 2004-10-17
+** Bug Fixes
+*** 'find -name \*bar now matches .foobar, because the POSIX standard
+     requires it, as explained at
+     http://standards.ieee.org/reading/ieee/interp/1003-2-92_int/pasc-1003.2-126.html
+\f
+* Major changes in release 4.2.1, 2004-10-17
+** Bug Fixes
+*** find -iname now works correctly on systems that have an fnmatch() function
+    that does not support FNM_CASEFOLD
+*** updatedb now uses signal names for "trap" instead of numbers,
+    as per bug #9465 (see http://www.opengroup.org/onlinepubs/009695399/utilities/trap.html)
+*** Better support for systems lacking intmax_t
+** Other Changes
+**** findutils now uses a newer version of gnulib (dated 2004-10-17).
+\f
+* Major changes in release 4.2.0, 2003-06-14
+** Functionality Changes
+*** xargs now works better when the environment variables are very extensive.
+    The xargs command used to run into difficulties if the environment
+    data contained more than 20480 bytes.
+*** New options -wholename and -iwholename
+    As per the GNU Projecvt coding standard, These are preferred over
+    the -path and -ipath options.  Using -ipath now generates a warning,
+    though -path does not (since HPUX also offers -path).
+*** The environment variable FIND_BLOCK_SIZE is now ignored.
+*** New option "-ignore_readdir_race"
+    silences an error messages which would otherwise occur if a file is removed
+    after find has read it from the directory using readdir(), but before
+    find stats the file.  There is also an option
+    -noignore_readdir_race which has the opposite effect.
+**  Documentation improvements
+*** The -size option of find is now documented in more detail
+*** POSIX compliance and GNU extensions
+    The find manual page also now includes a section
+    which describes the relationship between the features of GNU
+    find and the POSIX standard.  Some other small improvements
+    to the find and xargs manual pages have been made.
+*** The argument to the -fprintf directive is now better documented.
+    The escape code '\0' for the `-printf' predicate of find is now
+    documented, and the documentation for the %k and %b specifiers
+    has been improved.
+*** xargs -i is now more clearly documented.
+** Bug Fixes
+*** locate 'pa*d' will now find /etc/passwd (if it exists, of course)
+*** xargs standard input is not inherited by child processes
+    If the command invoked by xargs reads from its standard input,
+    it now gets nothing, as opposed to stealing data from the
+    list of files that xargs is trying to read.
+*** Better support for 64-bit systems.
+*** The command "xargs -i -n1" now works as one might expect,
+    I think this is a strange thing to want to do.
+*** Arguments to find -mtime that are too large are now diagnosed
+    Previously, this just used to cause find just to do the wrong thing.
+*** updatedb is now somewhat more robust
+    The updatedb shell script now does not generate an empty
+    database if it fails.
+*** Sanity-check on some data read from locatedb
+    Locate now detects some types of file corruption in the
+    locate database.
+*** The %k format specifier for -fprintf now works
+    This was broken in 4.1.20.
+\f
+* Major changes in release 4.1.20, 2003-06-14:
+** New maintainer, James Youngman <jay@gnu.org>
+** As far as I know, this is the first release after 4.1.7, but I've left
+   a gap just in case.
+** We now use an "imported" version of gnulib, rather than including
+   a copy of the gnulib code in our CVS repository.   There are no
+   differences in the build instructions, though (unless you are
+   building directly from CVS, in which case please read the file
+   README-CVS).
+** There are no (deliberate) functional changes in version 4.1.20.
+\f
+* Major changes in release 4.1.7, 2001-05-20:
+fix problem so that default "-print" is added when "-prune" is used.
+security fixes related to directories changing while find is executing.
+\f
+* Major changes in release 4.1.6, 2000-10-10:
+correct bug in prune.
+added --ignore-case option for locate
+
+* Major changes in release 4.1.5, 2000-04-12:
+Add support for large files
+
+* Major changes in release 4.1.4, 2000-02-26:
+bug fixes, more up-to-date languages.
+
+* Major changes in release 4.1.3, 2000-01-27:
+added internationalization and localization.
+
+* Major changes in release 4.1.2, 2000-01-18:
+None.
+
+* Major changes in release 4.1.1, 1999-08-8:
+attempt at successful compilation on many platforms after years of neglect
+ "--existing" option added to locate "--prunefs" option added to updatedb
+
+* Major changes in release 4.1, 1994-11-3:
+
+** Distribution renamed to findutils.
+** updatedb is now a user command, installed in $exec_prefix/bin
+  instead of $exec_prefix/libexec.
+** A few problems in Makefiles and testsuite corrected.
+\f
+* Major changes in release 4.0, 1994-11-2:
+
+** Documentation:
+*** Texinfo manual.
+*** Man page for updatedb.
+*** Man page for the locate database formats.
+
+** find:
+*** Takes less CPU time on long paths, because it uses chdir to descend
+   trees, so it does fewer inode lookups.
+*** Does not get trapped in symbolic link loops when -follow is given.
+*** Supports "-fstype afs" if you have /afs and /usr/afsws/include
+   and you configure using the --with-afs option.
+*** New action -fls FILE; like -ls but writes to FILE.
+
+** locate:
+*** Supports a new database format, which is 8-bit clean and
+   allows machines with different byte orderings and integer sizes to
+   share the databases.  The new locate can also detect and read the
+   old database format automatically.  The new databases are typically
+   30% or more larger than the old ones (due to allowing all 8 bits in
+   file names).  Search times are approximately the same, or faster on
+   some systems.
+*** Warns if a file name database is more than 8 days old.
+
+** updatedb:
+*** Takes command-line options.
+
+** xargs:
+*** Performance improved 10-20%.
+*** The EOF string is not used when -0 is given.
+*** Now has a test suite.  Some minor bugs fixed as a result.
+\f
+* Major changes in release 3.8, 1993-03-29:
+
+** case insensitive versions of -lname, -name, -path, -regex:
+  -ilname, -iname, -ipath, -iregex
+** %F directive for -printf, -fprintf to print file system type
+\f
+* Major changes in release 3.7:
+
+** locate can search multiple databases
+** locate has an option to specify the database path
+** updatedb no longer goes into an infinite loop with some versions of tail
+\f
+* No NEWS was kept for earlier releases.  Known release dates include:
+** release 3.2, 1991-08-28
+** release 3.1, 1991-08-21
+** release 3.0, 1991-08-21
+** release 2.2, 1991-04-05
+** release 2.1, 1991-01-01
+** release 2.0, 1990-11-20
+** release 1.2, 1990-07-03
+** release 1.1, 1990-06-24
+** release 1.0, 1990-06-22
+** beginning of findutils history, 1987-02-21
+
+                        --//--
+This is used by Emacs' spell checker ispell.el:
+
+LocalWords: ansi knr strftime xargs updatedb sh fnmatch hin strcpy
+LocalWords: lib getstr getline frcode bigram texi depcomp automake
+LocalWords: strncasecmp strcasecmp LIBOBJS FUNC prunefs allout libexec
+LocalWords: testsuite Texinfo chdir inode fstype afs fls ls EOF lname
+LocalWords: regex ilname iname ipath iregex printf fprintf
+
+Copyright (C) 1996, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
+2008, 2009, 2010 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, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the ``GNU Free
+Documentation License'' file as part of this distribution.
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..ec5d312
--- /dev/null
+++ b/README
@@ -0,0 +1,66 @@
+This package contains the GNU find, xargs, and locate programs.  find
+and xargs comply with POSIX 1003.2, as far as I know (with the
+exception of the "+" modifier for the "-exec" action, which isn't
+implemented yet).  They also support a large number of additional
+options, some borrowed from Unix and some unique to GNU.
+
+See the file NEWS for a list of major changes in the current release.
+
+See the file INSTALL for compilation and installation instructions.
+
+To verify the GPG signature of the release, you will need the public
+key of the findutils maintainer.  You can download this from
+ftp://ftp.gnu.org/gnu/gnu-keyring.gpg.  Alternatively, you could query
+a PGP keyserver, but you will need to use one that can cope with
+subkeys containing photos.  Many older key servers cannot do this.  I
+use subkeys.pgp.net.  I think that one works.  See also the
+"Downloading" section of http://www.gnu.org/software/findutils/.
+
+Special configure options:
+
+--with-afs
+  Make find support "-fstype afs".  Requires /afs, /usr/afsws/lib, and
+/usr/afsws/include.  configure doesn't add AFS support
+automatically because it adds considerably to find's size, and the
+AFS libraries need -lucb on Solaris, which breaks find.
+
+--enable-id-cache
+  Make tables of used UIDs and GIDs at startup instead of using
+getpwuid or getgrgid when needed.  Speeds up -nouser and -nogroup
+unless you are running NIS or Hesiod, which make password and group
+calls very expensive.
+
+--enable-debug
+  Produce output on the standard error output indicating what find is
+doing.  This information includes details about how the command line
+has been parsed and what files have been stat()ed.  This output is
+normally interesting only to the maintainer, and so is off by default.
+
+DEFAULT_ARG_SIZE=<value>
+  If this environment variable is defined to a numeric expression
+during configure, it determines the default argument size limits used
+by xargs without -s, and by find, when spawning child processes.
+Otherwise, the default is set at 128 kibibytes.  If the system cannot
+support the default limit, the system's limit will be used instead.
+
+
+To gain speed, GNU find avoids statting files whenever possible.
+It does this by:
+1. Checking the number of links to directories and not statting files
+that it knows aren't directories until it encounters a test or action
+that needs the stat info.
+2.  Rearranging the command line, where possible, so that it can do tests
+that don't require a stat before tests that do, in hopes that the
+latter will be skipped because of an OR or AND.  (But it only does
+this where it will leave the output unchanged.)
+
+The locate program and its helper programs are derived (heavily
+modified) from James Woods' public domain fast-find code, which is
+also distributed with the 4.3BSD find.  Because POSIX.2 requires `find
+foo' to have the same effect as `find foo -print', the fast-find
+searching has been moved to a separate program, `locate'; the same
+thing has been done in 4.4BSD.  If you use locate, you should run the
+included `updatedb' script from cron periodically (typically nightly).
+
+Mail suggestions and bug reports for these programs to
+bug-findutils@gnu.org.
diff --git a/README-alpha b/README-alpha
new file mode 100644 (file)
index 0000000..8717c2b
--- /dev/null
@@ -0,0 +1,25 @@
+This is a test release of GNU findutils.
+
+The latest test release (if any) is available at
+ftp://alpha.gnu.org/gnu/findutils
+
+The latest full release is available at
+ftp://ftp.gnu.org/gnu/findutils.
+
+
+Discussion of the findutils package and ways to improve it takes place
+on the "bug-findutils" mailing list, which you can join by sending
+mail to bug-findutils-request@gnu.org.  An archive of patches to the
+bug-findutils mailing list is available at
+http://lists.gnu.org/archive/html/bug-findutils/.
+
+Bug reports, suggested patches and enhancement requests for findutils
+should be logged at http://savannah.gnu.org/bugs/?group=findutils.
+
+Changes to the findutils code are sent to the findutils-patches
+mailing list.  To join, please send email to
+findutils-patches@gnu.org.  You are also welcome to send patches to
+that list, but unless you are a list subscriber, you won't be able to
+follow any resulting discussion.  An archive of posts to the
+findutils-patches mailing list is available at
+http://lists.gnu.org/archive/html/findutils-patches/.
diff --git a/README-hacking b/README-hacking
new file mode 100644 (file)
index 0000000..5ce65b8
--- /dev/null
@@ -0,0 +1,222 @@
+These notes intend to help people working on the checked-out sources.
+They don't apply when you are building from a distribution tarball.
+
+If you want to submit a patch, please start from checked-out sources
+rather than the source tarball.
+
+
+Prerequisites
+=============
+
+ * git (to check out both findutils and gnulib).
+ * A C compiler, linker and software development libraries (the standard
+   C library).  Any compiler compliant with the 1990 ICO C standard running
+   on a POSIX system should work.
+ * GNU Autoconf
+ * GNU Automake
+ * GNU m4
+ * GNU gettext
+ * GNU Dejagnu
+
+The configure program should tell you if you try to use a version of
+one of these tools which is not oif a recent enough version.  The file
+tool-versions.txt indicates which version of each tool the current
+release was built and tested with.
+
+
+Use the latest upstream sources
+===============================
+
+1. Check out the findutils code
+
+  git clone git://git.sv.gnu.org/findutils
+
+This will download the whole repository, it's about 14MB.  If you
+already have a copy you can refresh it with
+
+  git checkout master  (to switch to your copy of the master branch)
+  git pull (to collect and merge changes)
+
+2. Generate a gnulib installation within the findutils source tree
+
+ Change your working directory to the findutils source directory (that
+ is, the directory containing this file).   Then run the following
+ command:-
+
+    sh import-gnulib.sh
+
+ This command will use git to check out the version of gnulib which is
+ intended to work with the findutils source you already have, as
+ configured by the file import-gnulib.config.  The gnulib code itself
+ is left in the directory "gnulib-git".  The "gnulib" directory
+ contains just the gnulib files that findutils needs during the build
+ process.
+
+ If you want to build findutils with a different version of gnulib,
+ just edit import-gnulib.config to change the version and then re-run
+ import-gnulib.sh.  When specifying the version, you can specify
+ either the date or a tag.  If making any kind of release, please
+ use a fully identifying version (rather than just, say, "HEAD").
+
+ The import-gnulib.sh script will also run Autoconf and Automake to
+ generate the "configure" script and "Makefile.in" files.  Should you
+ need to do this manually, you can do it like this :-
+
+    aclocal -I m4 -I gnulib/m4     && \
+    autoheader                    && \
+    autoconf                      && \
+    automake --add-missing --copy
+
+3. (Optional) Update the translations
+
+    rsync -Lrtvz  translationproject.org::tp/latest/findutils/ po
+
+3. Run "configure" and "make" in the normal way.
+
+ If you have GNU libintl installed, you can just run "configure".
+ Otherwise, run "configure --disable-nls".
+
+You are now at the point where your local directory looks just like it
+would after building a source release, except that your copy is more
+up-to-date.
+
+*Before* you commit changes
+===========================
+
+In this project, we much prefer patches that automatically record
+authorship.  That is important not just to give credit where due, but
+also from a legal standpoint (see below).  To create author-annotated
+patches with git, you must first tell git who you are.  That information
+is best recorded in your ~/.gitconfig file.  Edit that file, creating
+it if needed, and put your name and email address in place of these
+example values:
+
+[user]
+  name = Joe X. User
+  email = joe.user@example.com
+
+
+In order to simplify the handling of merges, we recommend that you
+use a specialised merge driver for the ChangeLog file.  Otherwise,
+you will end up spending time resolving merge conflicts for your
+ChangeLog edits.  You can install the ChangeLog merge driver by
+following the instructions in the README section of the file
+gnulib-git/gnulib/lib/git-merge-changelog.c.
+
+
+
+Making commits locally
+======================
+
+You will normally find it much easier to work on a branch.  This
+allows you to maintain your changes and test them without being
+affected by changes on the trunk.
+
+To Make a "topic" branch for your change, do this:
+
+  git branch my-topic
+  git checkout my-topic
+
+You can then work on your branch as normal.
+
+To update your local repository, do this:
+
+  git checkout master
+  git pull
+
+Then, rebase your topic branch to take into account the upstream
+changes you just pulled:
+
+  git checkout my-topic
+  git rebase master
+
+There are some useful checks that git commit hooks will do for you,
+it's a good idea to enable these:
+
+  chmod +x .git/hooks/pre-commit
+
+
+Submitting patches
+==================
+
+If you plan to submit changes to findutils, please make sure you have
+read the GNU coding standard (http://www.gnu.org/prep/standards/).
+Some common things you might have forgotten to do are:
+
+ - document your change in both the manual pages and the Texinfo file
+ - re-run the test suite (with Dejagnu installed!)
+ - add a ChangeLog entry (for now we still do that manually)
+ - add a test case for the bug you're fixing or feature you're adding
+ - mention your fix or change (if it's significant) in the NEWS file
+
+If you have patches, please generate them with "git format-patch" and
+mail them to these addresses:
+
+  bug-findutils@gnu.org, findutils-patches@gnu.org
+
+Here is a complete session
+
+  # set up your topic branch
+  git checkout master
+  git pull
+  git branch my-topic
+  git checkout my-topic
+
+  # update the code, documentation, test suite and change log, run tests
+  emacs xargs/xargs.c
+  emacs doc/find.texi xargs/xargs.1
+  emacs xargs/testsuite/Makefile.am  xargs/testsuite/xargs.gnu/blah.exp
+  make check
+  emacs ChangeLog NEWS
+
+  # make sure you didn't break anything
+  make distcheck
+
+  # commit the change and send the patches.
+  git add -u
+  git commit
+  git rebase master
+  mkdir /tmp/patches
+  git format-patch -o /tmp/patches master..HEAD
+  git send-email --compose \
+      --to bug-findutils@gnu.org \
+      --cc findutils-patches@gnu.org /tmp/patches
+
+
+Copyright assignment
+====================
+
+If your change is significant (i.e., if it adds more than ~10 lines),
+then you'll have to have a copyright assignment on file with the FSF.
+Since that involves first an email exchange between you and the FSF,
+and then the exchange (FSF to you, then back) of an actual sheet of paper
+with your signature on it, and finally, some administrative processing
+in Boston, the process can take a few weeks.
+
+The forms to choose from are in gnulib's doc/Copyright/ directory.
+If you want to assign a single change, you should use the file,
+doc/Copyright/request-assign.changes:
+
+    http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=doc/Copyright/request-assign.changes;hb=HEAD
+
+If you would like to assign past and future contributions to a project,
+you'd use doc/Copyright/request-assign.future:
+
+    http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=doc/Copyright/request-assign.future;hb=HEAD
+
+You may make assignments for up to four projects at a time.
+
+In case you're wondering why we bother with all of this, read this:
+
+    http://www.gnu.org/licenses/why-assign.html
+
+
+========================================================================
+Copyright (C) 2009, 2010 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, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the ``GNU Free
+Documentation License'' file as part of this distribution.
diff --git a/THANKS b/THANKS
new file mode 100644 (file)
index 0000000..ecba376
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,56 @@
+Thanks to the following people for support, code, patches, etc:
+
+A Costa <agcosta@gis.net>
+Aaron S. Hawley
+Andreas Metzler
+Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+Bas van Gompel
+Benno Schulenberg <benno@nietvergeten.nl>
+Bob Proulx
+Bruno Haible
+Dan Jacobson
+Dave Gilbert
+Dean Gaudet <dean@arctic.org>
+Dmitry V. Levin
+Ed Avis
+Eric Blake <ebb9@byu.net>
+Geoff Clare
+Gerrit P. Haase <gerrit.haase@t-online.de>
+Greg Wooledge
+James Woods
+James Youngman <jay@gnu.org>
+Jakub Bogusz <qboosh@pld-linux.org>
+Jesus Bravo Alvarez <jba@pobox.com>
+Jim Meyering
+John David Anglin <dave@hiauly1.hia.nrc.ca>
+John Levon
+Jonathan R. Ferro <jferro@corwin.ece.cmu.edu>
+Joseph S. Myers
+Karl Berry
+Lionel CONS <lionel.cons@cern.ch>
+Mark Kettenis <kettenis@gnu.org>
+Martin Buchholz
+Matt Mueller <donut@azstarnet.com>
+Michael Haubenwallner <michael.haubenwallner@salomon.at>
+Nelson Beebe
+Nigel Stepp <stepp@atistart.net>
+Nix <nix@esperi.org.uk>
+Paul Eggert
+Paul Slootman <paul@murphy.nl>
+Peter Breitenlohner <peb@mppmu.mpg.de>
+Primoz Peterlin
+Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+Solar Designer <solar@openwall.com>
+Stephane Barizien <sba@ocegr.fr>
+Steve Revilak
+Supriya Kannery
+Tavis Ormandy
+Vin Shelton
+Vincent Danjean <vdanjean@ens-lyon.fr>
+
+Suggestion for locate's ignore-case code:
+Matt Mueller <donut@azstarnet.com>
+Stephane Barizien <sba@ocegr.fr>
+
+Suggestion for the -sparse predicate:
+dean gaudet <dean@arctic.org>
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..aff56d4
--- /dev/null
+++ b/TODO
@@ -0,0 +1,110 @@
+-*-outline-*-
+* -fstype core dumps on sparc-sun-sunos4.1.3_U1 with gcc-2.95.2
+This is on foxtrot.rahul.net.  dbx does not work on compiled find.
+Perhaps gcc is installed incorrectly.  "find / -fstype ufs" core dumps
+quickly.  cc works correctly.
+
+* Speed of locate without "-i" option needs to be increased.
+
+* Internationalization
+** updatedb.sh should be internationalized
+
+* Eliminate unnecessary strcpy calls in xargs.
+
+* man pages for frcode, bigram, and code
+Perhaps a better description in texi pages as well.
+
+* Add option for find to sort output in lexical order for use for updatedb
+olarsac@airfrance.fr (Olivier) made the following suggestion:
+
+As I was running thru the code looking for the bug I wondered why the updatedb
+has to use sort...
+why not add an option to find that sorts the output in lexical order?
+my point is:
+- sort on a big list is costly (here we do locate on big big file system)
+- find may (in theory) sort incrementally very easily by sorting only the current
+directory entries before recursion
+
+
+* large file problems
+depcomp gets added by automake
+
+* investigate _LIBC when used with TOLOWER and TOUPPER
+_LIBC is used to determine whether TOLOWER should check isupper first.
+Is there something better to check?  Alternatively, can tolower be
+checked at run time to determine whether isupper should be called first.
+
+* BeOS problems with multibyte
+Bruno Haible reported problems with BeOS.
+
+* Include example of use of updatedb in documentation.
+Use something close to the Debian daily cron job.
+
+* Supply example for time range commands for find.
+
+* Test Coverage improvements
+ pred_closeparen pred_openparen
+ find -delete dir
+ find foo -empty where foo is an unreadable directory
+ find -printf %i
+ find -printf %l
+ find -printf %M
+ find -printf %u %U
+ find -nogroup
+ find -nouser
+ find -links +400 on a file.
+ find -perm : savannah bug 14748
+ The close_stdin=1 case of prep_child_for_exec
+ find -printf with no argument
+ find -regextype with no argument
+ find -size with no argument
+ find -size 1e6 (invalid)
+ find -warn
+ find -xdev
+ find -type c
+ locate or
+ locate and
+ locate visit_justprint_unquoted
+ locate on slocate format db
+ locate: the "procdata->count += procdata->c - 256" case
+ locate -b
+ locate -P -e
+ locate -P -E
+ locate -S
+ locate with limit
+ locate with count only, no printing
+ locate with $LOCATE_PATH
+ loate -0
+ locate -w
+ locate with regextype
+ locate -L
+ locate -H
+ locate -P
+ locate -l
+ locate -d -
+ locate with a database it cannot open
+ xargs escape processing
+ xargs -i -n1
+ xargs -a
+ xargs EOF string on first line
+ xargs blank line (state = SPACE)
+ xargs parse_num on non-number
+ xargs parse_num on a number with trailing junk
+
+
+
+
+Locale-dependent coverage:
+ locate: visit_substring_match_nocasefold_narrow
+
+
+
+                        --//--
+This is used by Emacs' spell checker ispell.el:
+
+LocalWords: strftime xargs updatedb sh strcpy
+LocalWords: lib frcode bigram texi depcomp automake
+LocalWords: LIBOBJS FUNC findutils
+LocalWords: LIBC TOLOWER TOUPPER tolower isupper
+LocalWords: Debian cron
+LocalWords: Haible BeOS
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..acb89f5
--- /dev/null
@@ -0,0 +1,1244 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
+[m4_warning([this file was generated for autoconf 2.67.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+AC_DEFUN([AM_C_PROTOTYPES],
+[AC_REQUIRE([AC_C_PROTOTYPES])
+if test "$ac_cv_prog_cc_stdc" != no; then
+  U= ANSI2KNR=
+else
+  U=_ ANSI2KNR=./ansi2knr
+fi
+# Ensure some checks needed by ansi2knr itself.
+AC_REQUIRE([AC_HEADER_STDC])
+AC_CHECK_HEADERS([string.h])
+AC_SUBST([U])dnl
+AC_SUBST([ANSI2KNR])dnl
+_AM_SUBST_NOTMAKE([ANSI2KNR])dnl
+])
+
+AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/findlib.m4])
+m4_include([m4/mkinstalldirs.m4])
+m4_include([m4/noreturn.m4])
+m4_include([m4/nullsort.m4])
+m4_include([m4/withfts.m4])
+m4_include([gnulib/m4/00gnulib.m4])
+m4_include([gnulib/m4/alloca.m4])
+m4_include([gnulib/m4/argmatch.m4])
+m4_include([gnulib/m4/assert.m4])
+m4_include([gnulib/m4/bison.m4])
+m4_include([gnulib/m4/btowc.m4])
+m4_include([gnulib/m4/canonicalize.m4])
+m4_include([gnulib/m4/chdir-long.m4])
+m4_include([gnulib/m4/chown.m4])
+m4_include([gnulib/m4/clock_time.m4])
+m4_include([gnulib/m4/cloexec.m4])
+m4_include([gnulib/m4/close-stream.m4])
+m4_include([gnulib/m4/close.m4])
+m4_include([gnulib/m4/closein.m4])
+m4_include([gnulib/m4/closeout.m4])
+m4_include([gnulib/m4/codeset.m4])
+m4_include([gnulib/m4/configmake.m4])
+m4_include([gnulib/m4/ctype.m4])
+m4_include([gnulib/m4/cycle-check.m4])
+m4_include([gnulib/m4/d-ino.m4])
+m4_include([gnulib/m4/d-type.m4])
+m4_include([gnulib/m4/dirent-safer.m4])
+m4_include([gnulib/m4/dirent_h.m4])
+m4_include([gnulib/m4/dirfd.m4])
+m4_include([gnulib/m4/dirname.m4])
+m4_include([gnulib/m4/double-slash-root.m4])
+m4_include([gnulib/m4/dup2.m4])
+m4_include([gnulib/m4/eealloc.m4])
+m4_include([gnulib/m4/environ.m4])
+m4_include([gnulib/m4/errno_h.m4])
+m4_include([gnulib/m4/error.m4])
+m4_include([gnulib/m4/euidaccess.m4])
+m4_include([gnulib/m4/extensions.m4])
+m4_include([gnulib/m4/faccessat.m4])
+m4_include([gnulib/m4/fchdir.m4])
+m4_include([gnulib/m4/fclose.m4])
+m4_include([gnulib/m4/fcntl-o.m4])
+m4_include([gnulib/m4/fcntl-safer.m4])
+m4_include([gnulib/m4/fcntl.m4])
+m4_include([gnulib/m4/fcntl_h.m4])
+m4_include([gnulib/m4/fdopendir.m4])
+m4_include([gnulib/m4/fflush.m4])
+m4_include([gnulib/m4/fileblocks.m4])
+m4_include([gnulib/m4/filemode.m4])
+m4_include([gnulib/m4/flexmember.m4])
+m4_include([gnulib/m4/float_h.m4])
+m4_include([gnulib/m4/fnmatch.m4])
+m4_include([gnulib/m4/fopen.m4])
+m4_include([gnulib/m4/fpending.m4])
+m4_include([gnulib/m4/fpurge.m4])
+m4_include([gnulib/m4/freading.m4])
+m4_include([gnulib/m4/fseeko.m4])
+m4_include([gnulib/m4/fstypename.m4])
+m4_include([gnulib/m4/ftell.m4])
+m4_include([gnulib/m4/ftello.m4])
+m4_include([gnulib/m4/fts.m4])
+m4_include([gnulib/m4/getcwd-abort-bug.m4])
+m4_include([gnulib/m4/getcwd-path-max.m4])
+m4_include([gnulib/m4/getcwd.m4])
+m4_include([gnulib/m4/getdelim.m4])
+m4_include([gnulib/m4/getdtablesize.m4])
+m4_include([gnulib/m4/getgroups.m4])
+m4_include([gnulib/m4/getline.m4])
+m4_include([gnulib/m4/getopt.m4])
+m4_include([gnulib/m4/getpagesize.m4])
+m4_include([gnulib/m4/gettext.m4])
+m4_include([gnulib/m4/gettime.m4])
+m4_include([gnulib/m4/gettimeofday.m4])
+m4_include([gnulib/m4/getugroups.m4])
+m4_include([gnulib/m4/glibc21.m4])
+m4_include([gnulib/m4/gnulib-common.m4])
+m4_include([gnulib/m4/gnulib-comp.m4])
+m4_include([gnulib/m4/group-member.m4])
+m4_include([gnulib/m4/hash.m4])
+m4_include([gnulib/m4/human.m4])
+m4_include([gnulib/m4/i-ring.m4])
+m4_include([gnulib/m4/iconv.m4])
+m4_include([gnulib/m4/idcache.m4])
+m4_include([gnulib/m4/include_next.m4])
+m4_include([gnulib/m4/inline.m4])
+m4_include([gnulib/m4/intlmacosx.m4])
+m4_include([gnulib/m4/intmax_t.m4])
+m4_include([gnulib/m4/inttostr.m4])
+m4_include([gnulib/m4/inttypes-pri.m4])
+m4_include([gnulib/m4/inttypes.m4])
+m4_include([gnulib/m4/inttypes_h.m4])
+m4_include([gnulib/m4/isblank.m4])
+m4_include([gnulib/m4/iswblank.m4])
+m4_include([gnulib/m4/langinfo_h.m4])
+m4_include([gnulib/m4/lchown.m4])
+m4_include([gnulib/m4/lcmessage.m4])
+m4_include([gnulib/m4/lib-ld.m4])
+m4_include([gnulib/m4/lib-link.m4])
+m4_include([gnulib/m4/lib-prefix.m4])
+m4_include([gnulib/m4/libunistring-base.m4])
+m4_include([gnulib/m4/localcharset.m4])
+m4_include([gnulib/m4/locale-fr.m4])
+m4_include([gnulib/m4/locale-ja.m4])
+m4_include([gnulib/m4/locale-tr.m4])
+m4_include([gnulib/m4/locale-zh.m4])
+m4_include([gnulib/m4/locale_h.m4])
+m4_include([gnulib/m4/localename.m4])
+m4_include([gnulib/m4/lock.m4])
+m4_include([gnulib/m4/longlong.m4])
+m4_include([gnulib/m4/ls-mntd-fs.m4])
+m4_include([gnulib/m4/lseek.m4])
+m4_include([gnulib/m4/lstat.m4])
+m4_include([gnulib/m4/malloc.m4])
+m4_include([gnulib/m4/malloca.m4])
+m4_include([gnulib/m4/math_h.m4])
+m4_include([gnulib/m4/mathfunc.m4])
+m4_include([gnulib/m4/mbchar.m4])
+m4_include([gnulib/m4/mbiter.m4])
+m4_include([gnulib/m4/mbrtowc.m4])
+m4_include([gnulib/m4/mbsinit.m4])
+m4_include([gnulib/m4/mbslen.m4])
+m4_include([gnulib/m4/mbsrtowcs.m4])
+m4_include([gnulib/m4/mbstate_t.m4])
+m4_include([gnulib/m4/mbtowc.m4])
+m4_include([gnulib/m4/memchr.m4])
+m4_include([gnulib/m4/mempcpy.m4])
+m4_include([gnulib/m4/memrchr.m4])
+m4_include([gnulib/m4/mgetgroups.m4])
+m4_include([gnulib/m4/mkdir.m4])
+m4_include([gnulib/m4/mktime.m4])
+m4_include([gnulib/m4/mmap-anon.m4])
+m4_include([gnulib/m4/mode_t.m4])
+m4_include([gnulib/m4/modechange.m4])
+m4_include([gnulib/m4/mountlist.m4])
+m4_include([gnulib/m4/multiarch.m4])
+m4_include([gnulib/m4/nl_langinfo.m4])
+m4_include([gnulib/m4/nls.m4])
+m4_include([gnulib/m4/onceonly.m4])
+m4_include([gnulib/m4/open.m4])
+m4_include([gnulib/m4/openat.m4])
+m4_include([gnulib/m4/parse-datetime.m4])
+m4_include([gnulib/m4/pathmax.m4])
+m4_include([gnulib/m4/perror.m4])
+m4_include([gnulib/m4/po.m4])
+m4_include([gnulib/m4/printf.m4])
+m4_include([gnulib/m4/priv-set.m4])
+m4_include([gnulib/m4/progtest.m4])
+m4_include([gnulib/m4/putenv.m4])
+m4_include([gnulib/m4/quote.m4])
+m4_include([gnulib/m4/quotearg.m4])
+m4_include([gnulib/m4/readlink.m4])
+m4_include([gnulib/m4/readlinkat.m4])
+m4_include([gnulib/m4/realloc.m4])
+m4_include([gnulib/m4/regex.m4])
+m4_include([gnulib/m4/rmdir.m4])
+m4_include([gnulib/m4/rpmatch.m4])
+m4_include([gnulib/m4/same.m4])
+m4_include([gnulib/m4/save-cwd.m4])
+m4_include([gnulib/m4/savedir.m4])
+m4_include([gnulib/m4/selinux-context-h.m4])
+m4_include([gnulib/m4/selinux-selinux-h.m4])
+m4_include([gnulib/m4/setenv.m4])
+m4_include([gnulib/m4/setlocale.m4])
+m4_include([gnulib/m4/size_max.m4])
+m4_include([gnulib/m4/sleep.m4])
+m4_include([gnulib/m4/snprintf.m4])
+m4_include([gnulib/m4/ssize_t.m4])
+m4_include([gnulib/m4/st_dm_mode.m4])
+m4_include([gnulib/m4/stat-time.m4])
+m4_include([gnulib/m4/stat.m4])
+m4_include([gnulib/m4/stdarg.m4])
+m4_include([gnulib/m4/stdbool.m4])
+m4_include([gnulib/m4/stddef_h.m4])
+m4_include([gnulib/m4/stdint.m4])
+m4_include([gnulib/m4/stdint_h.m4])
+m4_include([gnulib/m4/stdio-safer.m4])
+m4_include([gnulib/m4/stdio_h.m4])
+m4_include([gnulib/m4/stdlib_h.m4])
+m4_include([gnulib/m4/stpcpy.m4])
+m4_include([gnulib/m4/strcase.m4])
+m4_include([gnulib/m4/strcasestr.m4])
+m4_include([gnulib/m4/strdup.m4])
+m4_include([gnulib/m4/strerror.m4])
+m4_include([gnulib/m4/strftime.m4])
+m4_include([gnulib/m4/string_h.m4])
+m4_include([gnulib/m4/strings_h.m4])
+m4_include([gnulib/m4/strndup.m4])
+m4_include([gnulib/m4/strnlen.m4])
+m4_include([gnulib/m4/strstr.m4])
+m4_include([gnulib/m4/strtoimax.m4])
+m4_include([gnulib/m4/strtol.m4])
+m4_include([gnulib/m4/strtoll.m4])
+m4_include([gnulib/m4/strtoul.m4])
+m4_include([gnulib/m4/strtoull.m4])
+m4_include([gnulib/m4/strtoumax.m4])
+m4_include([gnulib/m4/symlink.m4])
+m4_include([gnulib/m4/symlinkat.m4])
+m4_include([gnulib/m4/sys_stat_h.m4])
+m4_include([gnulib/m4/sys_time_h.m4])
+m4_include([gnulib/m4/sys_wait_h.m4])
+m4_include([gnulib/m4/thread.m4])
+m4_include([gnulib/m4/threadlib.m4])
+m4_include([gnulib/m4/time_h.m4])
+m4_include([gnulib/m4/time_r.m4])
+m4_include([gnulib/m4/timespec.m4])
+m4_include([gnulib/m4/tm_gmtoff.m4])
+m4_include([gnulib/m4/ungetc.m4])
+m4_include([gnulib/m4/unistd-safer.m4])
+m4_include([gnulib/m4/unistd_h.m4])
+m4_include([gnulib/m4/unlink.m4])
+m4_include([gnulib/m4/unlinkdir.m4])
+m4_include([gnulib/m4/usleep.m4])
+m4_include([gnulib/m4/vasnprintf.m4])
+m4_include([gnulib/m4/version-etc.m4])
+m4_include([gnulib/m4/warn-on-use.m4])
+m4_include([gnulib/m4/warnings.m4])
+m4_include([gnulib/m4/wchar_h.m4])
+m4_include([gnulib/m4/wchar_t.m4])
+m4_include([gnulib/m4/wcrtomb.m4])
+m4_include([gnulib/m4/wctob.m4])
+m4_include([gnulib/m4/wctomb.m4])
+m4_include([gnulib/m4/wctype_h.m4])
+m4_include([gnulib/m4/wcwidth.m4])
+m4_include([gnulib/m4/wint_t.m4])
+m4_include([gnulib/m4/xalloc.m4])
+m4_include([gnulib/m4/xgetcwd.m4])
+m4_include([gnulib/m4/xsize.m4])
+m4_include([gnulib/m4/xstrndup.m4])
+m4_include([gnulib/m4/xstrtod.m4])
+m4_include([gnulib/m4/xstrtol.m4])
+m4_include([gnulib/m4/yesno.m4])
+m4_include([gnulib/m4/yield.m4])
diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am
new file mode 100644 (file)
index 0000000..d87b138
--- /dev/null
@@ -0,0 +1 @@
+EXTRA_DIST = check-testfiles.sh man-lint.sh
diff --git a/build-aux/Makefile.in b/build-aux/Makefile.in
new file mode 100644 (file)
index 0000000..b5cd857
--- /dev/null
@@ -0,0 +1,1339 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+subdir = build-aux
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in compile \
+       config.guess config.rpath config.sub depcomp install-sh \
+       mdate-sh missing mkinstalldirs texinfo.tex ylwrap
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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 =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = @INCLUDES@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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@
+EXTRA_DIST = check-testfiles.sh man-lint.sh
+all: all-am
+
+.SUFFIXES:
+$(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 build-aux/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits build-aux/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):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+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
+check: check-am
+all-am: Makefile
+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:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+       distclean-generic 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-generic pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# 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/build-aux/arg-nonnull.h b/build-aux/arg-nonnull.h
new file mode 100644 (file)
index 0000000..6c2f1e8
--- /dev/null
@@ -0,0 +1,26 @@
+/* A C macro for declaring that specific arguments must not be NULL.
+   Copyright (C) 2009-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/>.  */
+
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
+   that the values passed as arguments n, ..., m must be non-NULL pointers.
+   n = 1 stands for the first argument, n = 2 for the second argument etc.  */
+#ifndef _GL_ARG_NONNULL
+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+#  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
+# else
+#  define _GL_ARG_NONNULL(params)
+# endif
+#endif
diff --git a/build-aux/c++defs.h b/build-aux/c++defs.h
new file mode 100644 (file)
index 0000000..b6821a6
--- /dev/null
@@ -0,0 +1,271 @@
+/* C++ compatible function declaration macros.
+   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 _GL_CXXDEFS_H
+#define _GL_CXXDEFS_H
+
+/* The three most frequent use cases of these macros are:
+
+   * For providing a substitute for a function that is missing on some
+     platforms, but is declared and works fine on the platforms on which
+     it exists:
+
+       #if @GNULIB_FOO@
+       # if !@HAVE_FOO@
+       _GL_FUNCDECL_SYS (foo, ...);
+       # endif
+       _GL_CXXALIAS_SYS (foo, ...);
+       _GL_CXXALIASWARN (foo);
+       #elif defined GNULIB_POSIXCHECK
+       ...
+       #endif
+
+   * For providing a replacement for a function that exists on all platforms,
+     but is broken/insufficient and needs to be replaced on some platforms:
+
+       #if @GNULIB_FOO@
+       # if @REPLACE_FOO@
+       #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+       #   undef foo
+       #   define foo rpl_foo
+       #  endif
+       _GL_FUNCDECL_RPL (foo, ...);
+       _GL_CXXALIAS_RPL (foo, ...);
+       # else
+       _GL_CXXALIAS_SYS (foo, ...);
+       # endif
+       _GL_CXXALIASWARN (foo);
+       #elif defined GNULIB_POSIXCHECK
+       ...
+       #endif
+
+   * For providing a replacement for a function that exists on some platforms
+     but is broken/insufficient and needs to be replaced on some of them and
+     is additionally either missing or undeclared on some other platforms:
+
+       #if @GNULIB_FOO@
+       # if @REPLACE_FOO@
+       #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+       #   undef foo
+       #   define foo rpl_foo
+       #  endif
+       _GL_FUNCDECL_RPL (foo, ...);
+       _GL_CXXALIAS_RPL (foo, ...);
+       # else
+       #  if !@HAVE_FOO@   or   if !@HAVE_DECL_FOO@
+       _GL_FUNCDECL_SYS (foo, ...);
+       #  endif
+       _GL_CXXALIAS_SYS (foo, ...);
+       # endif
+       _GL_CXXALIASWARN (foo);
+       #elif defined GNULIB_POSIXCHECK
+       ...
+       #endif
+*/
+
+/* _GL_EXTERN_C declaration;
+   performs the declaration with C linkage.  */
+#if defined __cplusplus
+# define _GL_EXTERN_C extern "C"
+#else
+# define _GL_EXTERN_C extern
+#endif
+
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
+   declares a replacement function, named rpl_func, with the given prototype,
+   consisting of return type, parameters, and attributes.
+   Example:
+     _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
+                                  _GL_ARG_NONNULL ((1)));
+ */
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
+  _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
+  _GL_EXTERN_C rettype rpl_func parameters_and_attributes
+
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
+   declares the system function, named func, with the given prototype,
+   consisting of return type, parameters, and attributes.
+   Example:
+     _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
+                                  _GL_ARG_NONNULL ((1)));
+ */
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
+  _GL_EXTERN_C rettype func parameters_and_attributes
+
+/* _GL_CXXALIAS_RPL (func, rettype, parameters);
+   declares a C++ alias called GNULIB_NAMESPACE::func
+   that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
+   Example:
+     _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
+ */
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
+  _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
+    namespace GNULIB_NAMESPACE                                \
+    {                                                         \
+      rettype (*const func) parameters = ::rpl_func;          \
+    }                                                         \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
+   is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
+   except that the C function rpl_func may have a slightly different
+   declaration.  A cast is used to silence the "invalid conversion" error
+   that would otherwise occur.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
+    namespace GNULIB_NAMESPACE                                     \
+    {                                                              \
+      rettype (*const func) parameters =                           \
+        reinterpret_cast<rettype(*)parameters>(::rpl_func);        \
+    }                                                              \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS (func, rettype, parameters);
+   declares a C++ alias called GNULIB_NAMESPACE::func
+   that redirects to the system provided function func, if GNULIB_NAMESPACE
+   is defined.
+   Example:
+     _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
+ */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+  /* If we were to write
+       rettype (*const func) parameters = ::func;
+     like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
+     better (remove an indirection through a 'static' pointer variable),
+     but then the _GL_CXXALIASWARN macro below would cause a warning not only
+     for uses of ::func but also for uses of GNULIB_NAMESPACE::func.  */
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+    namespace GNULIB_NAMESPACE                     \
+    {                                              \
+      static rettype (*func) parameters = ::func;  \
+    }                                              \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
+   is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
+   except that the C function func may have a slightly different declaration.
+   A cast is used to silence the "invalid conversion" error that would
+   otherwise occur.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
+    namespace GNULIB_NAMESPACE                          \
+    {                                                   \
+      static rettype (*func) parameters =               \
+        reinterpret_cast<rettype(*)parameters>(::func); \
+    }                                                   \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
+   is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
+   except that the C function is picked among a set of overloaded functions,
+   namely the one with rettype2 and parameters2.  Two consecutive casts
+   are used to silence the "cannot find a match" and "invalid conversion"
+   errors that would otherwise occur.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+  /* The outer cast must be a reinterpret_cast.
+     The inner cast: When the function is defined as a set of overloaded
+     functions, it works as a static_cast<>, choosing the designated variant.
+     When the function is defined as a single variant, it works as a
+     reinterpret_cast<>. The parenthesized cast syntax works both ways.  */
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
+    namespace GNULIB_NAMESPACE                                                \
+    {                                                                         \
+      static rettype (*func) parameters =                                     \
+        reinterpret_cast<rettype(*)parameters>(                               \
+          (rettype2(*)parameters2)(::func));                                  \
+    }                                                                         \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIASWARN (func);
+   causes a warning to be emitted when ::func is used but not when
+   GNULIB_NAMESPACE::func is used.  func must be defined without overloaded
+   variants.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIASWARN(func) \
+   _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
+# define _GL_CXXALIASWARN_1(func,namespace) \
+   _GL_CXXALIASWARN_2 (func, namespace)
+/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
+   we enable the warning only when not optimizing.  */
+# if !__OPTIMIZE__
+#  define _GL_CXXALIASWARN_2(func,namespace) \
+    _GL_WARN_ON_USE (func, \
+                     "The symbol ::" #func " refers to the system function. " \
+                     "Use " #namespace "::" #func " instead.")
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+#  define _GL_CXXALIASWARN_2(func,namespace) \
+     extern __typeof__ (func) func
+# else
+#  define _GL_CXXALIASWARN_2(func,namespace) \
+     _GL_EXTERN_C int _gl_cxxalias_dummy
+# endif
+#else
+# define _GL_CXXALIASWARN(func) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
+   causes a warning to be emitted when the given overloaded variant of ::func
+   is used but not when GNULIB_NAMESPACE::func is used.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
+   _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
+                        GNULIB_NAMESPACE)
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
+   _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
+/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
+   we enable the warning only when not optimizing.  */
+# if !__OPTIMIZE__
+#  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+    _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
+                         "The symbol ::" #func " refers to the system function. " \
+                         "Use " #namespace "::" #func " instead.")
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+#  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+     extern __typeof__ (func) func
+# else
+#  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+     _GL_EXTERN_C int _gl_cxxalias_dummy
+# endif
+#else
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+#endif /* _GL_CXXDEFS_H */
diff --git a/build-aux/check-testfiles.sh b/build-aux/check-testfiles.sh
new file mode 100755 (executable)
index 0000000..2294700
--- /dev/null
@@ -0,0 +1,62 @@
+#! /bin/sh
+# check-testfiles.sh -- Check we distributed all the test files we need
+# Copyright (C) 2007, 2010 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/>.
+
+rv=0
+
+
+makelist () {
+    ls "${1}"/*/testsuite/*/*"${2}" | sed -e 's/.*\///' | sort
+}
+
+diagnose () {
+    makelist "${distdir}" "$1" > dist"${1}".txt  &&
+    makelist "${srcdir}"  "$1" >  src"${1}".txt  &&
+    diff  src"${1}".txt dist"${1}".txt
+    rm -f src"${1}".txt dist"${1}".txt
+    echo
+}
+
+
+check_shipfiles () {
+        distcount=`ls ${distdir}/*/testsuite/*/*${suffix} | wc -l`
+        srccount=`ls ${srcdir}/*/testsuite/*/*${suffix} | wc -l`
+        if test $distcount -eq $srccount ; then
+            echo "All $srccount of the $suffix files are accounted for"
+        else
+            echo "ERROR: Missing $suffix files: source $srccount distributed $distcount" >&2
+            rv=1
+            diagnose "${suffix}"
+        fi
+}
+
+
+main () {
+    distdir="$1"
+    srcdir="$2"
+    shift 2
+    if test "$#" -gt 0 ; then
+        for suffix ; do
+                check_shipfiles "$suffix"
+        done
+        exit $rv
+    else
+        echo "You did not specify any test file suffixes." >&2
+        exit 1
+    fi
+}
+
+main "$@"
diff --git a/build-aux/compile b/build-aux/compile
new file mode 100755 (executable)
index 0000000..1b1d232
--- /dev/null
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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 2, 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we strip `-o arg' only if arg is an object.
+       eat=1
+       case $2 in
+         *.o | *.obj)
+           ofile=$2
+           ;;
+         *)
+           set x "$@" -o "$2"
+           shift
+           ;;
+       esac
+       ;;
+      *.c)
+       cfile=$1
+       set x "$@" "$1"
+       shift
+       ;;
+      *)
+       set x "$@" "$1"
+       shift
+       ;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/build-aux/config.guess b/build-aux/config.guess
new file mode 100755 (executable)
index 0000000..7866080
--- /dev/null
@@ -0,0 +1,1511 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
+
+timestamp='2011-02-02'
+
+# This file 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep -q __ELF__
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit ;;
+    *:OpenBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    *:SolidBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Pn.n version is a patched version.
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+       exitcode=$?
+       trap '' 0
+       exit $exitcode ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+       echo powerpc-ibm-os400
+       exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7; exit ;;
+       esac ;;
+    s390x:SunOS:*:*)
+       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+       echo m68k-milan-mint${UNAME_RELEASE}
+       exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+       echo m68k-hades-mint${UNAME_RELEASE}
+       exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+       echo m68k-unknown-mint${UNAME_RELEASE}
+       exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit ;;
+    AViiON:dgux:*:*)
+       # DG/UX returns AViiON for all architectures
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+           else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
+       fi
+       exit ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit ;;
+    *:AIX:*:[4567])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                   sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                   case "${sc_cpu_version}" in
+                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                     532)                      # CPU_PA_RISC2_0
+                       case "${sc_kernel_bits}" in
+                         32) HP_ARCH="hppa2.0n" ;;
+                         64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                       esac ;;
+                   esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^            //' << EOF >$dummy.c
+
+               #define _HPUX_SOURCE
+               #include <stdlib.h>
+               #include <unistd.h>
+
+               int main ()
+               {
+               #if defined(_SC_KERNEL_BITS)
+                   long bits = sysconf(_SC_KERNEL_BITS);
+               #endif
+                   long cpu  = sysconf (_SC_CPU_VERSION);
+
+                   switch (cpu)
+                       {
+                       case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+                       case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+                       case CPU_PA_RISC2_0:
+               #if defined(_SC_KERNEL_BITS)
+                           switch (bits)
+                               {
+                               case 64: puts ("hppa2.0w"); break;
+                               case 32: puts ("hppa2.0n"); break;
+                               default: puts ("hppa2.0"); break;
+                               } break;
+               #else  /* !defined(_SC_KERNEL_BITS) */
+                           puts ("hppa2.0"); break;
+               #endif
+                       default: puts ("hppa1.0"); break;
+                       }
+                   exit (0);
+               }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep -q __LP64__
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
+       echo unknown-hitachi-hiuxwe2
+       exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+       exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+       exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+       exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+       exit ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+       echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    5000:UNIX_System_V:4.*:*)
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+       echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:FreeBSD:*:*)
+       case ${UNAME_MACHINE} in
+           pc98)
+               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           amd64)
+               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           *)
+               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       esac
+       exit ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit ;;
+    *:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit ;;
+    *:Interix*:*)
+       case ${UNAME_MACHINE} in
+           x86)
+               echo i586-pc-interix${UNAME_RELEASE}
+               exit ;;
+           authenticamd | genuineintel | EM64T)
+               echo x86_64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+           IA64)
+               echo ia64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+       esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+       esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
+    arm*:Linux:*:*)
+       eval $set_cc_for_build
+       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_EABI__
+       then
+           echo ${UNAME_MACHINE}-unknown-linux-gnu
+       else
+           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+       fi
+       exit ;;
+    avr32*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=${UNAME_MACHINE}el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=${UNAME_MACHINE}
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    or32:Linux:*:*)
+       echo or32-unknown-linux-gnu
+       exit ;;
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-gnu
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
+    vax:Linux:*:*)
+       echo ${UNAME_MACHINE}-dec-linux-gnu
+       exit ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit ;;
+    xtensa*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+       # Unixware is an offshoot of SVR4, but it has its own version
+       # number series starting with 2...
+       # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+       # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+       # uname -m prints for DJGPP always 'pc', but it prints nothing about
+       # the processor, so we play safe by assuming i586.
+       # Note: whatever this is, it MUST be the same as what config.sub
+       # prints for the "djgpp" host, or else GDB configury will decide that
+       # this is a cross-build.
+       echo i586-pc-msdosdjgpp
+       exit ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit ;;
+    PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                       # says <Richard.M.Bartel@ccMail.Census.GOV>
+       echo i586-unisys-sysv4
+       exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+       exit ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux${UNAME_RELEASE}
+       exit ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+       echo neo-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit ;;
+    SEI:*:*:SEIUX)
+       echo mips-sei-seiux${UNAME_RELEASE}
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
+    i*86:rdos:*:*)
+       echo ${UNAME_MACHINE}-pc-rdos
+       exit ;;
+    i*86:AROS:*:*)
+       echo ${UNAME_MACHINE}-pc-aros
+       exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+       "4"
+#else
+       ""
+#endif
+       ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    c34*)
+       echo c34-convex-bsd
+       exit ;;
+    c38*)
+       echo c38-convex-bsd
+       exit ;;
+    c4*)
+       echo c4-convex-bsd
+       exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
new file mode 100755 (executable)
index 0000000..17298f2
--- /dev/null
@@ -0,0 +1,672 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+#   Copyright 1996-2010 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+#   This file 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.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+#   than 256 bytes, otherwise the compiler driver will dump core. The only
+#   known workaround is to choose shorter directory names for the build
+#   directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix*)
+      wl='-Wl,'
+      ;;
+    darwin*)
+      case $cc_basename in
+        xlc*)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6* | nonstopux*)
+      wl='-Wl,'
+      ;;
+    newsos6)
+      ;;
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+        ecc*)
+          wl='-Wl,'
+          ;;
+        icc* | ifort*)
+          wl='-Wl,'
+          ;;
+        lf95*)
+          wl='-Wl,'
+          ;;
+        pgcc | pgf77 | pgf90)
+          wl='-Wl,'
+          ;;
+        ccc*)
+          wl='-Wl,'
+          ;;
+        como)
+          wl='-lopt='
+          ;;
+        *)
+          case `$CC -V 2>&1 | sed 5q` in
+            *Sun\ C*)
+              wl='-Wl,'
+              ;;
+          esac
+          ;;
+      esac
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    rdos*)
+      ;;
+    solaris*)
+      wl='-Wl,'
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      wl='-Wl,'
+      ;;
+    sysv4*MP*)
+      ;;
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      wl='-Wl,'
+      ;;
+    unicos*)
+      wl='-Wl,'
+      ;;
+    uts4*)
+      ;;
+  esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  # Set some defaults for GNU ld with shared library support. These
+  # are reset later if shared libraries are not supported. Putting them
+  # here allows them to be overridden if necessary.
+  # Unlike libtool, we use -rpath here, not --rpath, since the documented
+  # option of GNU ld is called -rpath, not --rpath.
+  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  case "$host_os" in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+        ld_shlibs=no
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we cannot use
+      # them.
+      ld_shlibs=no
+      ;;
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32* | cegcc*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      ;;
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    netbsd*)
+      ;;
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+          ld_shlibs=no
+          ;;
+        *)
+          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+          else
+            ld_shlibs=no
+          fi
+          ;;
+      esac
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = no; then
+    hardcode_libdir_flag_spec=
+  fi
+else
+  case "$host_os" in
+    aix3*)
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes; then
+        # Neither direct hardcoding nor static linking is supported with a
+        # broken collect2.
+        hardcode_direct=unsupported
+      fi
+      ;;
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+        # On IA64, the linker does run time linking by default, so we don't
+        # have to do anything special.
+        aix_use_runtimelinking=no
+      else
+        aix_use_runtimelinking=no
+        # Test if we are trying to use run time linking or normal
+        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+        # need to do runtime linking.
+        case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+          for ld_flag in $LDFLAGS; do
+            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+              aix_use_runtimelinking=yes
+              break
+            fi
+          done
+          ;;
+        esac
+      fi
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      if test "$GCC" = yes; then
+        case $host_os in aix4.[012]|aix4.[012].*)
+          collect2name=`${CC} -print-prog-name=collect2`
+          if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            :
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+          ;;
+        esac
+      fi
+      # Begin _LT_AC_SYS_LIBPATH_AIX.
+      echo 'int main () { return 0; }' > conftest.c
+      ${CC} ${LDFLAGS} conftest.c -o conftest
+      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      if test -z "$aix_libpath"; then
+        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      fi
+      if test -z "$aix_libpath"; then
+        aix_libpath="/usr/lib:/lib"
+      fi
+      rm -f conftest.c conftest
+      # End _LT_AC_SYS_LIBPATH_AIX.
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        fi
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+    bsdi[45]*)
+      ;;
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      libext=lib
+      ;;
+    darwin* | rhapsody*)
+      hardcode_direct=no
+      if test "$GCC" = yes ; then
+        :
+      else
+        case $cc_basename in
+          xlc*)
+            ;;
+          *)
+            ld_shlibs=no
+            ;;
+        esac
+      fi
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+    freebsd2.2*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    freebsd2*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd* | dragonfly*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      ;;
+    hpux10*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        hardcode_direct=yes
+        # hardcode_minus_L: Not really in the search PATH,
+        # but as the default location of the library.
+        hardcode_minus_L=yes
+      fi
+      ;;
+    hpux11*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct=no
+            ;;
+          *)
+            hardcode_direct=yes
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+        esac
+      fi
+      ;;
+    irix5* | irix6* | nonstopux*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    netbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    newsos6)
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+        hardcode_direct=yes
+        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+        else
+          case "$host_os" in
+            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+              hardcode_libdir_flag_spec='-R$libdir'
+              ;;
+            *)
+              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+              ;;
+          esac
+        fi
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      ;;
+    osf3*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    osf4* | osf5*)
+      if test "$GCC" = yes; then
+        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+        # Both cc and cxx compiler support -rpath directly
+        hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+    solaris*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+    sunos4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    sysv4)
+      case $host_vendor in
+        sni)
+          hardcode_direct=yes # is this really true???
+          ;;
+        siemens)
+          hardcode_direct=no
+          ;;
+        motorola)
+          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+          ;;
+      esac
+      ;;
+    sysv4.3*)
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+        ld_shlibs=yes
+      fi
+      ;;
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      ;;
+    sysv5* | sco3.2v5* | sco5v6*)
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      ;;
+    uts4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    *)
+      ld_shlibs=no
+      ;;
+  esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec=      # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+  aix3*)
+    library_names_spec='$libname.a'
+    ;;
+  aix[4-9]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  amigaos*)
+    library_names_spec='$libname.a'
+    ;;
+  beos*)
+    library_names_spec='$libname$shrext'
+    ;;
+  bsdi[45]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  cygwin* | mingw* | pw32* | cegcc*)
+    shrext=.dll
+    library_names_spec='$libname.dll.a $libname.lib'
+    ;;
+  darwin* | rhapsody*)
+    shrext=.dylib
+    library_names_spec='$libname$shrext'
+    ;;
+  dgux*)
+    library_names_spec='$libname$shrext'
+    ;;
+  freebsd1*)
+    ;;
+  freebsd* | dragonfly*)
+    case "$host_os" in
+      freebsd[123]*)
+        library_names_spec='$libname$shrext$versuffix' ;;
+      *)
+        library_names_spec='$libname$shrext' ;;
+    esac
+    ;;
+  gnu*)
+    library_names_spec='$libname$shrext'
+    ;;
+  hpux9* | hpux10* | hpux11*)
+    case $host_cpu in
+      ia64*)
+        shrext=.so
+        ;;
+      hppa*64*)
+        shrext=.sl
+        ;;
+      *)
+        shrext=.sl
+        ;;
+    esac
+    library_names_spec='$libname$shrext'
+    ;;
+  interix[3-9]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  irix5* | irix6* | nonstopux*)
+    library_names_spec='$libname$shrext'
+    case "$host_os" in
+      irix5* | nonstopux*)
+        libsuff= shlibsuff=
+        ;;
+      *)
+        case $LD in
+          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+          *) libsuff= shlibsuff= ;;
+        esac
+        ;;
+    esac
+    ;;
+  linux*oldld* | linux*aout* | linux*coff*)
+    ;;
+  linux* | k*bsd*-gnu)
+    library_names_spec='$libname$shrext'
+    ;;
+  knetbsd*-gnu)
+    library_names_spec='$libname$shrext'
+    ;;
+  netbsd*)
+    library_names_spec='$libname$shrext'
+    ;;
+  newsos6)
+    library_names_spec='$libname$shrext'
+    ;;
+  nto-qnx*)
+    library_names_spec='$libname$shrext'
+    ;;
+  openbsd*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  os2*)
+    libname_spec='$name'
+    shrext=.dll
+    library_names_spec='$libname.a'
+    ;;
+  osf3* | osf4* | osf5*)
+    library_names_spec='$libname$shrext'
+    ;;
+  rdos*)
+    ;;
+  solaris*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sunos4*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  sysv4 | sysv4.3*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sysv4*MP*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+    library_names_spec='$libname$shrext'
+    ;;
+  uts4*)
+    library_names_spec='$libname$shrext'
+    ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/build-aux/config.sub b/build-aux/config.sub
new file mode 100755 (executable)
index 0000000..aec52ad
--- /dev/null
@@ -0,0 +1,1758 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
+
+timestamp='2011-03-23'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+       -sun*os*)
+               # Prevent following clause from handling this invalid input.
+               ;;
+       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+       -apple | -axis | -knuth | -cray | -microblaze)
+               os=
+               basic_machine=$1
+               ;;
+       -bluegene*)
+               os=-cnk
+               ;;
+       -sim | -cisco | -oki | -wec | -winbond)
+               os=
+               basic_machine=$1
+               ;;
+       -scout)
+               ;;
+       -wrs)
+               os=-vxworks
+               basic_machine=$1
+               ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               basic_machine=$1
+               ;;
+       -hiux*)
+               os=-hiuxwe2
+               ;;
+       -sco6)
+               os=-sco5v6
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5)
+               os=-sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco4)
+               os=-sco3.2v4
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2v[4-9]*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -udk*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -isc)
+               os=-isc2.2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -clix*)
+               basic_machine=clipper-intergraph
+               ;;
+       -isc*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -lynx*)
+               os=-lynxos
+               ;;
+       -ptx*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+               ;;
+       -windowsnt*)
+               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               ;;
+       -psos*)
+               os=-psos
+               ;;
+       -mint | -mint[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+       # Recognize the basic CPU types without company name.
+       # Some are omitted here because they have special meanings below.
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+       | bfin \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+       | fido | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+       | lm32 \
+       | m32c | m32r | m32rle | m68000 | m68k | m88k \
+       | maxq | mb | microblaze | mcore | mep | metag \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+       | mips64octeon | mips64octeonel \
+       | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
+       | mips64vr4100 | mips64vr4100el \
+       | mips64vr4300 | mips64vr4300el \
+       | mips64vr5000 | mips64vr5000el \
+       | mips64vr5900 | mips64vr5900el \
+       | mipsisa32 | mipsisa32el \
+       | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64sb1 | mipsisa64sb1el \
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+       | moxie \
+       | mt \
+       | msp430 \
+       | nds32 | nds32le | nds32be \
+       | nios | nios2 \
+       | ns16k | ns32k \
+       | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle \
+       | pyramid \
+       | rx \
+       | score \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+       | spu \
+       | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xc16x | xstormy16 | xtensa \
+       | z8k | z80)
+               basic_machine=$basic_machine-unknown
+               ;;
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
+       ms1)
+               basic_machine=mt-unknown
+               ;;
+
+       strongarm | thumb | xscale)
+               basic_machine=arm-unknown
+               ;;
+
+       xscaleeb)
+               basic_machine=armeb-unknown
+               ;;
+
+       xscaleel)
+               basic_machine=armel-unknown
+               ;;
+
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+       # (2) the word "unknown" tends to confuse beginning users.
+       i*86 | x86_64)
+         basic_machine=$basic_machine-pc
+         ;;
+       # Object if more than one company name word.
+       *-*-*)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+       # Recognize the basic CPU types with company name.
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+       | avr-* | avr32-* \
+       | bfin-* | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
+       | clipper-* | craynv-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+       | lm32-* \
+       | m32c-* | m32r-* | m32rle-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+       | mips16-* \
+       | mips64-* | mips64el-* \
+       | mips64octeon-* | mips64octeonel-* \
+       | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
+       | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* \
+       | mips64vr5000-* | mips64vr5000el-* \
+       | mips64vr5900-* | mips64vr5900el-* \
+       | mipsisa32-* | mipsisa32el-* \
+       | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64sb1-* | mipsisa64sb1el-* \
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | mt-* \
+       | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
+       | nios-* | nios2-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+       | pyramid-* \
+       | romp-* | rs6000-* | rx-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+       | tahoe-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
+       | tron-* \
+       | ubicom32-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* \
+       | xstormy16-* | xtensa*-* \
+       | ymp-* \
+       | z8k-* | z80-*)
+               ;;
+       # Recognize the basic CPU types without company name, with glob match.
+       xtensa*)
+               basic_machine=$basic_machine-unknown
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+               basic_machine=i386-unknown
+               os=-bsd
+               ;;
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       a29khif)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
+       adobe68k)
+               basic_machine=m68010-adobe
+               os=-scout
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-unknown
+               ;;
+       amigaos | amigados)
+               basic_machine=m68k-unknown
+               os=-amigaos
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-unknown
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       apollo68bsd)
+               basic_machine=m68k-apollo
+               os=-bsd
+               ;;
+       aros)
+               basic_machine=i386-pc
+               os=-aros
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       blackfin)
+               basic_machine=bfin-unknown
+               os=-linux
+               ;;
+       blackfin-*)
+               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c90)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+       cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
+       convex-c1)
+               basic_machine=c1-convex
+               os=-bsd
+               ;;
+       convex-c2)
+               basic_machine=c2-convex
+               os=-bsd
+               ;;
+       convex-c32)
+               basic_machine=c32-convex
+               os=-bsd
+               ;;
+       convex-c34)
+               basic_machine=c34-convex
+               os=-bsd
+               ;;
+       convex-c38)
+               basic_machine=c38-convex
+               os=-bsd
+               ;;
+       cray | j90)
+               basic_machine=j90-cray
+               os=-unicos
+               ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16 | cr16-*)
+               basic_machine=cr16-unknown
+               os=-elf
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       decsystem10* | dec10*)
+               basic_machine=pdp10-dec
+               os=-tops10
+               ;;
+       decsystem20* | dec20*)
+               basic_machine=pdp10-dec
+               os=-tops20
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
+       dpx20 | dpx20-*)
+               basic_machine=rs6000-bull
+               os=-bosx
+               ;;
+       dpx2* | dpx2*-bull)
+               basic_machine=m68k-bull
+               os=-sysv3
+               ;;
+       ebmon29k)
+               basic_machine=a29k-amd
+               os=-ebmon
+               ;;
+       elxsi)
+               basic_machine=elxsi-elxsi
+               os=-bsd
+               ;;
+       encore | umax | mmax)
+               basic_machine=ns32k-encore
+               ;;
+       es1800 | OSE68k | ose68k | ose | OSE)
+               basic_machine=m68k-ericsson
+               os=-ose
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       h8300xray)
+               basic_machine=h8300-hitachi
+               os=-xray
+               ;;
+       h8500hms)
+               basic_machine=h8500-hitachi
+               os=-hms
+               ;;
+       harris)
+               basic_machine=m88k-harris
+               os=-sysv3
+               ;;
+       hp300-*)
+               basic_machine=m68k-hp
+               ;;
+       hp300bsd)
+               basic_machine=m68k-hp
+               os=-bsd
+               ;;
+       hp300hpux)
+               basic_machine=m68k-hp
+               os=-hpux
+               ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k78[0-9] | hp78[0-9])
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][13679] | hp8[0-9][13679])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hppa-next)
+               os=-nextstep3
+               ;;
+       hppaosf)
+               basic_machine=hppa1.1-hp
+               os=-osf
+               ;;
+       hppro)
+               basic_machine=hppa1.1-hp
+               os=-proelf
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i*86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv32
+               ;;
+       i*86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv4
+               ;;
+       i*86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv
+               ;;
+       i*86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-solaris2
+               ;;
+       i386mach)
+               basic_machine=i386-mach
+               os=-mach
+               ;;
+       i386-vsta | vsta)
+               basic_machine=i386-unknown
+               os=-vsta
+               ;;
+       iris | iris4d)
+               basic_machine=mips-sgi
+               case $os in
+                   -irix*)
+                       ;;
+                   *)
+                       os=-irix4
+                       ;;
+               esac
+               ;;
+       isi68 | isi)
+               basic_machine=m68k-isi
+               os=-sysv
+               ;;
+       m68knommu)
+               basic_machine=m68k-unknown
+               os=-linux
+               ;;
+       m68knommu-*)
+               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+       microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
+       mingw32ce)
+               basic_machine=arm-unknown
+               os=-mingw32ce
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       monitor)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
+       ms1-*)
+               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+               ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       netbsd386)
+               basic_machine=i386-unknown
+               os=-netbsd
+               ;;
+       netwinder)
+               basic_machine=armv4l-rebel
+               os=-linux
+               ;;
+       news | news700 | news800 | news900)
+               basic_machine=m68k-sony
+               os=-newsos
+               ;;
+       news1000)
+               basic_machine=m68030-sony
+               os=-newsos
+               ;;
+       news-3600 | risc-news)
+               basic_machine=mips-sony
+               os=-newsos
+               ;;
+       necv70)
+               basic_machine=v70-nec
+               os=-sysv
+               ;;
+       next | m*-next )
+               basic_machine=m68k-next
+               case $os in
+                   -nextstep* )
+                       ;;
+                   -ns2*)
+                     os=-nextstep2
+                       ;;
+                   *)
+                     os=-nextstep3
+                       ;;
+               esac
+               ;;
+       nh3000)
+               basic_machine=m68k-harris
+               os=-cxux
+               ;;
+       nh[45]000)
+               basic_machine=m88k-harris
+               os=-cxux
+               ;;
+       nindy960)
+               basic_machine=i960-intel
+               os=-nindy
+               ;;
+       mon960)
+               basic_machine=i960-intel
+               os=-mon960
+               ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+       neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+       nse-tandem)
+               basic_machine=nse-tandem
+               ;;
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       openrisc | openrisc-*)
+               basic_machine=or32-unknown
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
+               ;;
+       OSE68000 | ose68000)
+               basic_machine=m68000-ericsson
+               os=-ose
+               ;;
+       os68k)
+               basic_machine=m68k-none
+               os=-os68k
+               ;;
+       pa-hitachi)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       paragon)
+               basic_machine=i860-intel
+               os=-osf
+               ;;
+       parisc)
+               basic_machine=hppa-unknown
+               os=-linux
+               ;;
+       parisc-*)
+               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+       pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
+       pc98)
+               basic_machine=i386-pc
+               ;;
+       pc98-*)
+               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium | p5 | k5 | k6 | nexgen | viac3)
+               basic_machine=i586-pc
+               ;;
+       pentiumpro | p6 | 6x86 | athlon | athlon_*)
+               basic_machine=i686-pc
+               ;;
+       pentiumii | pentium2 | pentiumiii | pentium3)
+               basic_machine=i686-pc
+               ;;
+       pentium4)
+               basic_machine=i786-pc
+               ;;
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium4-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=power-ibm
+               ;;
+       ppc | ppcbe)    basic_machine=powerpc-unknown
+               ;;
+       ppc-* | ppcbe-*)
+               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppcle | powerpclittle | ppc-le | powerpc-little)
+               basic_machine=powerpcle-unknown
+               ;;
+       ppcle-* | powerpclittle-*)
+               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
+       rdos)
+               basic_machine=i386-pc
+               os=-rdos
+               ;;
+       rom68k)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       s390 | s390-*)
+               basic_machine=s390-ibm
+               ;;
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
+       sa29200)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       sb1)
+               basic_machine=mipsisa64sb1-unknown
+               ;;
+       sb1el)
+               basic_machine=mipsisa64sb1el-unknown
+               ;;
+       sde)
+               basic_machine=mipsisa32-sde
+               os=-elf
+               ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sh5el)
+               basic_machine=sh5le-unknown
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparclite-wrs | simso-wrs)
+               basic_machine=sparclite-wrs
+               os=-vxworks
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       st2000)
+               basic_machine=m68k-tandem
+               ;;
+       stratus)
+               basic_machine=i860-stratus
+               os=-sysv4
+               ;;
+       strongarm-* | thumb-*)
+               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       sun2)
+               basic_machine=m68000-sun
+               ;;
+       sun2os3)
+               basic_machine=m68000-sun
+               os=-sunos3
+               ;;
+       sun2os4)
+               basic_machine=m68000-sun
+               os=-sunos4
+               ;;
+       sun3os3)
+               basic_machine=m68k-sun
+               os=-sunos3
+               ;;
+       sun3os4)
+               basic_machine=m68k-sun
+               os=-sunos4
+               ;;
+       sun4os3)
+               basic_machine=sparc-sun
+               os=-sunos3
+               ;;
+       sun4os4)
+               basic_machine=sparc-sun
+               os=-sunos4
+               ;;
+       sun4sol2)
+               basic_machine=sparc-sun
+               os=-solaris2
+               ;;
+       sun3 | sun3-*)
+               basic_machine=m68k-sun
+               ;;
+       sun4)
+               basic_machine=sparc-sun
+               ;;
+       sun386 | sun386i | roadrunner)
+               basic_machine=i386-sun
+               ;;
+       sv1)
+               basic_machine=sv1-cray
+               os=-unicos
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       t3e)
+               basic_machine=alphaev5-cray
+               os=-unicos
+               ;;
+       t90)
+               basic_machine=t90-cray
+               os=-unicos
+               ;;
+       # This must be matched before tile*.
+       tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
+               ;;
+       tile*)
+               basic_machine=tile-unknown
+               os=-linux-gnu
+               ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
+       toad1)
+               basic_machine=pdp10-xkl
+               os=-tops20
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       v810 | necv810)
+               basic_machine=v810-nec
+               os=-none
+               ;;
+       vaxv)
+               basic_machine=vax-dec
+               os=-sysv
+               ;;
+       vms)
+               basic_machine=vax-dec
+               os=-vms
+               ;;
+       vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+       vxworks960)
+               basic_machine=i960-wrs
+               os=-vxworks
+               ;;
+       vxworks68)
+               basic_machine=m68k-wrs
+               os=-vxworks
+               ;;
+       vxworks29k)
+               basic_machine=a29k-wrs
+               os=-vxworks
+               ;;
+       w65*)
+               basic_machine=w65-wdc
+               os=-none
+               ;;
+       w89k-*)
+               basic_machine=hppa1.1-winbond
+               os=-proelf
+               ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
+       xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       xscale-* | xscalee[bl]-*)
+               basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+               ;;
+       ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       z8k-*-coff)
+               basic_machine=z8k-unknown
+               os=-sim
+               ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
+       none)
+               basic_machine=none-none
+               os=-none
+               ;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+       w89k)
+               basic_machine=hppa1.1-winbond
+               ;;
+       op50n)
+               basic_machine=hppa1.1-oki
+               ;;
+       op60c)
+               basic_machine=hppa1.1-oki
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+               basic_machine=sparc-sun
+               ;;
+       cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       mac | mpw | mac-mpw)
+               basic_machine=m68k-apple
+               ;;
+       pmac | pmac-mpw)
+               basic_machine=powerpc-apple
+               ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
+       *)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+       *-digital*)
+               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               ;;
+       *-commodore*)
+               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+       # First match some system type aliases
+       # that might get confused with valid system types.
+       # -solaris* is a basic system type, with this one exception.
+       -auroraux)
+               os=-auroraux
+               ;;
+       -solaris1 | -solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       -solaris)
+               os=-solaris2
+               ;;
+       -svr4*)
+               os=-sysv4
+               ;;
+       -unixware*)
+               os=-sysv4.2uw
+               ;;
+       -gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+               ;;
+       # First accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST END IN A *, to match a version number.
+       # -sysv* is not here because it comes later, after sysvr4.
+       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* | -aros* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+             | -openbsd* | -solidbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -qnx*)
+               case $basic_machine in
+                   x86-* | i*86-*)
+                       ;;
+                   *)
+                       os=-nto$os
+                       ;;
+               esac
+               ;;
+       -nto-qnx*)
+               ;;
+       -nto*)
+               os=`echo $os | sed -e 's|nto|nto-qnx|'`
+               ;;
+       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+               ;;
+       -mac*)
+               os=`echo $os | sed -e 's|mac|macos|'`
+               ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
+       -linux*)
+               os=`echo $os | sed -e 's|linux|linux-gnu|'`
+               ;;
+       -sunos5*)
+               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               ;;
+       -sunos6*)
+               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               ;;
+       -opened*)
+               os=-openedition
+               ;;
+       -os400*)
+               os=-os400
+               ;;
+       -wince*)
+               os=-wince
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -atheos*)
+               os=-atheos
+               ;;
+       -syllable*)
+               os=-syllable
+               ;;
+       -386bsd)
+               os=-bsd
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -nova*)
+               os=-rtmk-nova
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       -nsk*)
+               os=-nsk
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+       -tpf*)
+               os=-tpf
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -ose*)
+               os=-ose
+               ;;
+       -es1800*)
+               os=-ose
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+               os=-mint
+               ;;
+       -aros*)
+               os=-aros
+               ;;
+       -kaos*)
+               os=-kaos
+               ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
+       -dicos*)
+               os=-dicos
+               ;;
+       -nacl*)
+               ;;
+       -none)
+               ;;
+       *)
+               # Get rid of the `-' at the beginning of $os.
+               os=`echo $os | sed 's/[^-]*-//'`
+               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+       score-*)
+               os=-elf
+               ;;
+       spu-*)
+               os=-elf
+               ;;
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-rebel)
+               os=-linux
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+       c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+               ;;
+       pdp11-*)
+               os=-none
+               ;;
+       *-dec | vax-*)
+               os=-ultrix4.2
+               ;;
+       m68*-apollo)
+               os=-domain
+               ;;
+       i386-sun)
+               os=-sunos4.0.2
+               ;;
+       m68000-sun)
+               os=-sunos3
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       m68*-cisco)
+               os=-aout
+               ;;
+       mep-*)
+               os=-elf
+               ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
+               os=-elf
+               ;;
+       or32-*)
+               os=-coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-be)
+               os=-beos
+               ;;
+       *-haiku)
+               os=-haiku
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-knuth)
+               os=-mmixware
+               ;;
+       *-wec)
+               os=-proelf
+               ;;
+       *-winbond)
+               os=-proelf
+               ;;
+       *-oki)
+               os=-proelf
+               ;;
+       *-hp)
+               os=-hpux
+               ;;
+       *-hitachi)
+               os=-hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=-sysv
+               ;;
+       *-cbm)
+               os=-amigaos
+               ;;
+       *-dg)
+               os=-dgux
+               ;;
+       *-dolphin)
+               os=-sysv3
+               ;;
+       m68k-ccur)
+               os=-rtu
+               ;;
+       m88k-omron*)
+               os=-luna
+               ;;
+       *-next )
+               os=-nextstep
+               ;;
+       *-sequent)
+               os=-ptx
+               ;;
+       *-crds)
+               os=-unos
+               ;;
+       *-ns)
+               os=-genix
+               ;;
+       i370-*)
+               os=-mvs
+               ;;
+       *-next)
+               os=-nextstep3
+               ;;
+       *-gould)
+               os=-sysv
+               ;;
+       *-highlevel)
+               os=-bsd
+               ;;
+       *-encore)
+               os=-bsd
+               ;;
+       *-sgi)
+               os=-irix
+               ;;
+       *-siemens)
+               os=-sysv4
+               ;;
+       *-masscomp)
+               os=-rtu
+               ;;
+       f30[01]-fujitsu | f700-fujitsu)
+               os=-uxpv
+               ;;
+       *-rom68k)
+               os=-coff
+               ;;
+       *-*bug)
+               os=-coff
+               ;;
+       *-apple)
+               os=-macos
+               ;;
+       *-atari*)
+               os=-mint
+               ;;
+       *)
+               os=-none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+       *-unknown)
+               case $os in
+                       -riscix*)
+                               vendor=acorn
+                               ;;
+                       -sunos*)
+                               vendor=sun
+                               ;;
+                       -cnk*|-aix*)
+                               vendor=ibm
+                               ;;
+                       -beos*)
+                               vendor=be
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -mpeix*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs* | -opened*)
+                               vendor=ibm
+                               ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
+                       -vxsim* | -vxworks* | -windiss*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+                       -hms*)
+                               vendor=hitachi
+                               ;;
+                       -mpw* | -macos*)
+                               vendor=apple
+                               ;;
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/depcomp b/build-aux/depcomp
new file mode 100755 (executable)
index 0000000..5137dac
--- /dev/null
@@ -0,0 +1,684 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2010-10-07.20; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010
+# 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, 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/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u='sed s,\\\\,/,g'
+   depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+   # This is just like msvc7 but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u='sed s,\\\\,/,g'
+   depmode=msvc7
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> "$depfile"
+    echo >> "$depfile"
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${
+              s/^ *//
+              s/ \\*$//
+              s/$/:/
+              p
+            }' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test "$stat" = 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/      \1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/        /
+  G
+  p
+}' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no eat=no
+  for arg
+  do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/install-sh b/build-aux/install-sh
new file mode 100755 (executable)
index 0000000..a9244eb
--- /dev/null
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-01-19.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""       $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+       shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
+
+    -o) chowncmd="$chownprog $2"
+       shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+       # Protect names problematic for `test' and other utilities.
+       case $dst_arg in
+         -* | [=\(\)!]) dst_arg=./$dst_arg;;
+       esac
+       shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)        shift
+       break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+    # Protect names problematic for `test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names problematic for `test' and other utilities.
+  case $src in
+    -* | [=\(\)!]) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+    dst=$dst_arg
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dst_arg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       # Create intermediate dirs using mode 755 as modified by the umask.
+       # This is like FreeBSD 'install' as of 1997-10-28.
+       umask=`umask`
+       case $stripcmd.$umask in
+         # Optimize common cases.
+         *[2367][2367]) mkdir_umask=$umask;;
+         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+         *[0-7])
+           mkdir_umask=`expr $umask + 22 \
+             - $umask % 100 % 40 + $umask % 20 \
+             - $umask % 10 % 4 + $umask % 2
+           `;;
+         *) mkdir_umask=$umask,go-w;;
+       esac
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, rely on $mkdir_umask.
+       if test -n "$dir_arg"; then
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       fi
+
+       posix_mkdir=false
+       case $umask in
+         *[123567][0-7][0-7])
+           # POSIX mkdir -p sets u+wx bits regardless of umask, which
+           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+           ;;
+         *)
+           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+           if (umask $mkdir_umask &&
+               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+           then
+             if test -z "$dir_arg" || {
+                  # Check for POSIX incompatibilities with -m.
+                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                  # other-writeable bit of parent directory when it shouldn't.
+                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                  case $ls_ld_tmpdir in
+                    d????-?r-*) different_mode=700;;
+                    d????-?--*) different_mode=755;;
+                    *) false;;
+                  esac &&
+                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                  }
+                }
+             then posix_mkdir=:
+             fi
+             rmdir "$tmpdir/d" "$tmpdir"
+           else
+             # Remove any dirs left behind by ancient mkdir implementations.
+             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+           fi
+           trap '' 0;;
+       esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+       /*) prefix='/';;
+       [-=\(\)!]*) prefix='./';;
+       *)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test X"$d" = X && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (umask=$mkdir_umask &&
+            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+           # Don't fail if two instances are running concurrently.
+           test -d "$prefix" || exit 1
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/man-lint.sh b/build-aux/man-lint.sh
new file mode 100755 (executable)
index 0000000..813df1b
--- /dev/null
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+rv=0
+srcdir="$1" ; shift
+
+for manpage
+do
+  what="lint check on manpage $manpage"
+  echo -n "$what: "
+  messages="$( troff -t -man ${srcdir}/${manpage} 2>&1 >/dev/null )"
+  if test -z "$messages" ; then
+      echo "passed"
+  else
+      echo "FAILED:" >&2
+      echo "$messages"     >&2
+      rv=1
+  fi
+done
+exit $rv
diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh
new file mode 100755 (executable)
index 0000000..22f2f8b
--- /dev/null
@@ -0,0 +1,205 @@
+#!/bin/sh
+# Get modification time of a file or directory and pretty-print it.
+
+scriptversion=2007-03-30.02
+
+# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software
+# Foundation, Inc.
+# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
+#
+# 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, 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, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No file.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: mdate-sh [--help] [--version] FILE
+
+Pretty-print the modification time of FILE.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "mdate-sh $scriptversion"
+    exit $?
+    ;;
+esac
+
+# Prevent date giving response in another language.
+LANG=C
+export LANG
+LC_ALL=C
+export LC_ALL
+LC_TIME=C
+export LC_TIME
+
+# GNU ls changes its time format in response to the TIME_STYLE
+# variable.  Since we cannot assume `unset' works, revert this
+# variable to its documented default.
+if test "${TIME_STYLE+set}" = set; then
+  TIME_STYLE=posix-long-iso
+  export TIME_STYLE
+fi
+
+save_arg1=$1
+
+# Find out how to get the extended ls output of a file or directory.
+if ls -L /dev/null 1>/dev/null 2>&1; then
+  ls_command='ls -L -l -d'
+else
+  ls_command='ls -l -d'
+fi
+# Avoid user/group names that might have spaces, when possible.
+if ls -n /dev/null 1>/dev/null 2>&1; then
+  ls_command="$ls_command -n"
+fi
+
+# A `ls -l' line looks as follows on OS/2.
+#  drwxrwx---        0 Aug 11  2001 foo
+# This differs from Unix, which adds ownership information.
+#  drwxrwx---   2 root  root      4096 Aug 11  2001 foo
+#
+# To find the date, we split the line on spaces and iterate on words
+# until we find a month.  This cannot work with files whose owner is a
+# user named `Jan', or `Feb', etc.  However, it's unlikely that `/'
+# will be owned by a user whose name is a month.  So we first look at
+# the extended ls output of the root directory to decide how many
+# words should be skipped to get the date.
+
+# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
+set x`$ls_command /`
+
+# Find which argument is the month.
+month=
+command=
+until test $month
+do
+  shift
+  # Add another shift to the command.
+  command="$command shift;"
+  case $1 in
+    Jan) month=January; nummonth=1;;
+    Feb) month=February; nummonth=2;;
+    Mar) month=March; nummonth=3;;
+    Apr) month=April; nummonth=4;;
+    May) month=May; nummonth=5;;
+    Jun) month=June; nummonth=6;;
+    Jul) month=July; nummonth=7;;
+    Aug) month=August; nummonth=8;;
+    Sep) month=September; nummonth=9;;
+    Oct) month=October; nummonth=10;;
+    Nov) month=November; nummonth=11;;
+    Dec) month=December; nummonth=12;;
+  esac
+done
+
+# Get the extended ls output of the file or directory.
+set dummy x`eval "$ls_command \"\$save_arg1\""`
+
+# Remove all preceding arguments
+eval $command
+
+# Because of the dummy argument above, month is in $2.
+#
+# On a POSIX system, we should have
+#
+# $# = 5
+# $1 = file size
+# $2 = month
+# $3 = day
+# $4 = year or time
+# $5 = filename
+#
+# On Darwin 7.7.0 and 7.6.0, we have
+#
+# $# = 4
+# $1 = day
+# $2 = month
+# $3 = year or time
+# $4 = filename
+
+# Get the month.
+case $2 in
+  Jan) month=January; nummonth=1;;
+  Feb) month=February; nummonth=2;;
+  Mar) month=March; nummonth=3;;
+  Apr) month=April; nummonth=4;;
+  May) month=May; nummonth=5;;
+  Jun) month=June; nummonth=6;;
+  Jul) month=July; nummonth=7;;
+  Aug) month=August; nummonth=8;;
+  Sep) month=September; nummonth=9;;
+  Oct) month=October; nummonth=10;;
+  Nov) month=November; nummonth=11;;
+  Dec) month=December; nummonth=12;;
+esac
+
+case $3 in
+  ???*) day=$1;;
+  *) day=$3; shift;;
+esac
+
+# Here we have to deal with the problem that the ls output gives either
+# the time of day or the year.
+case $3 in
+  *:*) set `date`; eval year=\$$#
+       case $2 in
+        Jan) nummonthtod=1;;
+        Feb) nummonthtod=2;;
+        Mar) nummonthtod=3;;
+        Apr) nummonthtod=4;;
+        May) nummonthtod=5;;
+        Jun) nummonthtod=6;;
+        Jul) nummonthtod=7;;
+        Aug) nummonthtod=8;;
+        Sep) nummonthtod=9;;
+        Oct) nummonthtod=10;;
+        Nov) nummonthtod=11;;
+        Dec) nummonthtod=12;;
+       esac
+       # For the first six month of the year the time notation can also
+       # be used for files modified in the last year.
+       if (expr $nummonth \> $nummonthtod) > /dev/null;
+       then
+        year=`expr $year - 1`
+       fi;;
+  *) year=$3;;
+esac
+
+# The result.
+echo $day $month $year
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/build-aux/missing b/build-aux/missing
new file mode 100755 (executable)
index 0000000..727cfa0
--- /dev/null
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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, 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/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar*)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  autom4te*)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
+  bison*|yacc*)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f y.tab.h; then
+       echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex*|flex*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f lex.yy.c; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+        you modified a dependency of a manual page.  You may need the
+        \`Help2man' package in order for those modifications to take
+        effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit $?
+    fi
+    ;;
+
+  makeinfo*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar*)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+       case $firstarg in
+       *o*)
+           firstarg=`echo "$firstarg" | sed s/o//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+       case $firstarg in
+       *h*)
+           firstarg=`echo "$firstarg" | sed s/h//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/mkinstalldirs b/build-aux/mkinstalldirs
new file mode 100755 (executable)
index 0000000..4191a45
--- /dev/null
@@ -0,0 +1,162 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+
+scriptversion=2009-04-28.21; # UTC
+
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+IFS=" ""       $nl"
+errstatus=0
+dirmode=
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake@gnu.org>."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage"
+      exit $?
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --version)
+      echo "$0 $scriptversion"
+      exit $?
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error.  This is a problem when calling mkinstalldirs
+# from a parallel make.  We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
+case $dirmode in
+  '')
+    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    else
+      # On NextStep and OpenStep, the `mkdir' command does not
+      # recognize any option.  It will interpret all options as
+      # directories to create, and then abort because `.' already
+      # exists.
+      test -d ./-p && rmdir ./-p
+      test -d ./--version && rmdir ./--version
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+       test ! -d ./--version; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    else
+      # Clean up after NextStep and OpenStep mkdir.
+      for d in ./-m ./-p ./--version "./$dirmode";
+      do
+        test -d $d && rmdir $d
+      done
+    fi
+    ;;
+esac
+
+for file
+do
+  case $file in
+    /*) pathcomp=/ ;;
+    *)  pathcomp= ;;
+  esac
+  oIFS=$IFS
+  IFS=/
+  set fnord $file
+  shift
+  IFS=$oIFS
+
+  for d
+  do
+    test "x$d" = x && continue
+
+    pathcomp=$pathcomp$d
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+       errstatus=$lasterr
+      else
+       if test ! -z "$dirmode"; then
+         echo "chmod $dirmode $pathcomp"
+         lasterr=
+         chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+         if test ! -z "$lasterr"; then
+           errstatus=$lasterr
+         fi
+       fi
+      fi
+    fi
+
+    pathcomp=$pathcomp/
+  done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
new file mode 100644 (file)
index 0000000..d2b264d
--- /dev/null
@@ -0,0 +1,8962 @@
+% texinfo.tex -- TeX macros to handle Texinfo files.
+%
+% Load plain if necessary, i.e., if running under initex.
+\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
+%
+\def\texinfoversion{2007-12-02.17}
+%
+% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 2007,
+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+% 2007 Free Software Foundation, Inc.
+%
+% This texinfo.tex file 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 texinfo.tex file 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/>.
+%
+% As a special exception, when this file is read by TeX when processing
+% a Texinfo source document, you may use the result without
+% restriction.  (This has been our intent since Texinfo was invented.)
+%
+% Please try the latest version of texinfo.tex before submitting bug
+% reports; you can get the latest version from:
+%   http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
+%   ftp://tug.org/tex/texinfo.tex
+%     (and all CTAN mirrors, see http://www.ctan.org).
+% The texinfo.tex in any given distribution could well be out
+% of date, so if that's what you're using, please check.
+%
+% Send bug reports to bug-texinfo@gnu.org.  Please include including a
+% complete document in each bug report with which we can reproduce the
+% problem.  Patches are, of course, greatly appreciated.
+%
+% To process a Texinfo manual with TeX, it's most reliable to use the
+% texi2dvi shell script that comes with the distribution.  For a simple
+% manual foo.texi, however, you can get away with this:
+%   tex foo.texi
+%   texindex foo.??
+%   tex foo.texi
+%   tex foo.texi
+%   dvips foo.dvi -o  # or whatever; this makes foo.ps.
+% The extra TeX runs get the cross-reference information correct.
+% Sometimes one run after texindex suffices, and sometimes you need more
+% than two; texi2dvi does it as many times as necessary.
+%
+% It is possible to adapt texinfo.tex for other languages, to some
+% extent.  You can get the existing language-specific files from the
+% full Texinfo distribution.
+%
+% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
+
+
+\message{Loading texinfo [version \texinfoversion]:}
+
+% If in a .fmt file, print the version number
+% and turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+\everyjob{\message{[Texinfo version \texinfoversion]}%
+  \catcode`+=\active \catcode`\_=\active}
+
+
+\chardef\other=12
+
+% We never want plain's \outer definition of \+ in Texinfo.
+% For @tex, we can use \tabalign.
+\let\+ = \relax
+
+% Save some plain tex macros whose names we will redefine.
+\let\ptexb=\b
+\let\ptexbullet=\bullet
+\let\ptexc=\c
+\let\ptexcomma=\,
+\let\ptexdot=\.
+\let\ptexdots=\dots
+\let\ptexend=\end
+\let\ptexequiv=\equiv
+\let\ptexexclam=\!
+\let\ptexfootnote=\footnote
+\let\ptexgtr=>
+\let\ptexhat=^
+\let\ptexi=\i
+\let\ptexindent=\indent
+\let\ptexinsert=\insert
+\let\ptexlbrace=\{
+\let\ptexless=<
+\let\ptexnewwrite\newwrite
+\let\ptexnoindent=\noindent
+\let\ptexplus=+
+\let\ptexrbrace=\}
+\let\ptexslash=\/
+\let\ptexstar=\*
+\let\ptext=\t
+
+% If this character appears in an error message or help string, it
+% starts a new line in the output.
+\newlinechar = `^^J
+
+% Use TeX 3.0's \inputlineno to get the line number, for better error
+% messages, but if we're using an old version of TeX, don't do anything.
+%
+\ifx\inputlineno\thisisundefined
+  \let\linenumber = \empty % Pre-3.0.
+\else
+  \def\linenumber{l.\the\inputlineno:\space}
+\fi
+
+% Set up fixed words for English if not already set.
+\ifx\putwordAppendix\undefined  \gdef\putwordAppendix{Appendix}\fi
+\ifx\putwordChapter\undefined   \gdef\putwordChapter{Chapter}\fi
+\ifx\putwordfile\undefined      \gdef\putwordfile{file}\fi
+\ifx\putwordin\undefined        \gdef\putwordin{in}\fi
+\ifx\putwordIndexIsEmpty\undefined     \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
+\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
+\ifx\putwordInfo\undefined      \gdef\putwordInfo{Info}\fi
+\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
+\ifx\putwordMethodon\undefined  \gdef\putwordMethodon{Method on}\fi
+\ifx\putwordNoTitle\undefined   \gdef\putwordNoTitle{No Title}\fi
+\ifx\putwordof\undefined        \gdef\putwordof{of}\fi
+\ifx\putwordon\undefined        \gdef\putwordon{on}\fi
+\ifx\putwordpage\undefined      \gdef\putwordpage{page}\fi
+\ifx\putwordsection\undefined   \gdef\putwordsection{section}\fi
+\ifx\putwordSection\undefined   \gdef\putwordSection{Section}\fi
+\ifx\putwordsee\undefined       \gdef\putwordsee{see}\fi
+\ifx\putwordSee\undefined       \gdef\putwordSee{See}\fi
+\ifx\putwordShortTOC\undefined  \gdef\putwordShortTOC{Short Contents}\fi
+\ifx\putwordTOC\undefined       \gdef\putwordTOC{Table of Contents}\fi
+%
+\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
+\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
+\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
+\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
+\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
+\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
+\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
+\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
+\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
+\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
+\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
+\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
+%
+\ifx\putwordDefmac\undefined    \gdef\putwordDefmac{Macro}\fi
+\ifx\putwordDefspec\undefined   \gdef\putwordDefspec{Special Form}\fi
+\ifx\putwordDefvar\undefined    \gdef\putwordDefvar{Variable}\fi
+\ifx\putwordDefopt\undefined    \gdef\putwordDefopt{User Option}\fi
+\ifx\putwordDeffunc\undefined   \gdef\putwordDeffunc{Function}\fi
+
+% Since the category of space is not known, we have to be careful.
+\chardef\spacecat = 10
+\def\spaceisspace{\catcode`\ =\spacecat}
+
+% sometimes characters are active, so we need control sequences.
+\chardef\colonChar = `\:
+\chardef\commaChar = `\,
+\chardef\dashChar  = `\-
+\chardef\dotChar   = `\.
+\chardef\exclamChar= `\!
+\chardef\lquoteChar= `\`
+\chardef\questChar = `\?
+\chardef\rquoteChar= `\'
+\chardef\semiChar  = `\;
+\chardef\underChar = `\_
+
+% Ignore a token.
+%
+\def\gobble#1{}
+
+% The following is used inside several \edef's.
+\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
+
+% Hyphenation fixes.
+\hyphenation{
+  Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
+  ap-pen-dix bit-map bit-maps
+  data-base data-bases eshell fall-ing half-way long-est man-u-script
+  man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
+  par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
+  spell-ing spell-ings
+  stand-alone strong-est time-stamp time-stamps which-ever white-space
+  wide-spread wrap-around
+}
+
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen\bindingoffset
+\newdimen\normaloffset
+\newdimen\pagewidth \newdimen\pageheight
+
+% For a final copy, take out the rectangles
+% that mark overfull boxes (in case you have decided
+% that the text looks ok even though it passes the margin).
+%
+\def\finalout{\overfullrule=0pt}
+
+% @| inserts a changebar to the left of the current line.  It should
+% surround any changed text.  This approach does *not* work if the
+% change spans more than two lines of output.  To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change).
+%
+\def\|{%
+  % \vadjust can only be used in horizontal mode.
+  \leavevmode
+  %
+  % Append this vertical mode material after the current line in the output.
+  \vadjust{%
+    % We want to insert a rule with the height and depth of the current
+    % leading; that is exactly what \strutbox is supposed to record.
+    \vskip-\baselineskip
+    %
+    % \vadjust-items are inserted at the left edge of the type.  So
+    % the \llap here moves out into the left-hand margin.
+    \llap{%
+      %
+      % For a thicker or thinner bar, change the `1pt'.
+      \vrule height\baselineskip width1pt
+      %
+      % This is the space between the bar and the text.
+      \hskip 12pt
+    }%
+  }%
+}
+
+% Sometimes it is convenient to have everything in the transcript file
+% and nothing on the terminal.  We don't just call \tracingall here,
+% since that produces some useless output on the terminal.  We also make
+% some effort to order the tracing commands to reduce output in the log
+% file; cf. trace.sty in LaTeX.
+%
+\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
+\def\loggingall{%
+  \tracingstats2
+  \tracingpages1
+  \tracinglostchars2  % 2 gives us more in etex
+  \tracingparagraphs1
+  \tracingoutput1
+  \tracingmacros2
+  \tracingrestores1
+  \showboxbreadth\maxdimen \showboxdepth\maxdimen
+  \ifx\eTeXversion\undefined\else % etex gives us more logging
+    \tracingscantokens1
+    \tracingifs1
+    \tracinggroups1
+    \tracingnesting2
+    \tracingassigns1
+  \fi
+  \tracingcommands3  % 3 gives us more in etex
+  \errorcontextlines16
+}%
+
+% add check for \lastpenalty to plain's definitions.  If the last thing
+% we did was a \nobreak, we don't want to insert more space.
+%
+\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
+  \removelastskip\penalty-50\smallskip\fi\fi}
+\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
+  \removelastskip\penalty-100\medskip\fi\fi}
+\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
+  \removelastskip\penalty-200\bigskip\fi\fi}
+
+% For @cropmarks command.
+% Do @cropmarks to get crop marks.
+%
+\newif\ifcropmarks
+\let\cropmarks = \cropmarkstrue
+%
+% Dimensions to add cropmarks at corners.
+% Added by P. A. MacKay, 12 Nov. 1986
+%
+\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
+\newdimen\cornerlong  \cornerlong=1pc
+\newdimen\cornerthick \cornerthick=.3pt
+\newdimen\topandbottommargin \topandbottommargin=.75in
+
+% Output a mark which sets \thischapter, \thissection and \thiscolor.
+% We dump everything together because we only have one kind of mark.
+% This works because we only use \botmark / \topmark, not \firstmark.
+%
+% A mark contains a subexpression of the \ifcase ... \fi construct.
+% \get*marks macros below extract the needed part using \ifcase.
+%
+% Another complication is to let the user choose whether \thischapter
+% (\thissection) refers to the chapter (section) in effect at the top
+% of a page, or that at the bottom of a page.  The solution is
+% described on page 260 of The TeXbook.  It involves outputting two
+% marks for the sectioning macros, one before the section break, and
+% one after.  I won't pretend I can describe this better than DEK...
+\def\domark{%
+  \toks0=\expandafter{\lastchapterdefs}%
+  \toks2=\expandafter{\lastsectiondefs}%
+  \toks4=\expandafter{\prevchapterdefs}%
+  \toks6=\expandafter{\prevsectiondefs}%
+  \toks8=\expandafter{\lastcolordefs}%
+  \mark{%
+                   \the\toks0 \the\toks2
+      \noexpand\or \the\toks4 \the\toks6
+    \noexpand\else \the\toks8
+  }%
+}
+% \topmark doesn't work for the very first chapter (after the title
+% page or the contents), so we use \firstmark there -- this gets us
+% the mark with the chapter defs, unless the user sneaks in, e.g.,
+% @setcolor (or @url, or @link, etc.) between @contents and the very
+% first @chapter.
+\def\gettopheadingmarks{%
+  \ifcase0\topmark\fi
+  \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
+}
+\def\getbottomheadingmarks{\ifcase1\botmark\fi}
+\def\getcolormarks{\ifcase2\topmark\fi}
+
+% Avoid "undefined control sequence" errors.
+\def\lastchapterdefs{}
+\def\lastsectiondefs{}
+\def\prevchapterdefs{}
+\def\prevsectiondefs{}
+\def\lastcolordefs{}
+
+% Main output routine.
+\chardef\PAGE = 255
+\output = {\onepageout{\pagecontents\PAGE}}
+
+\newbox\headlinebox
+\newbox\footlinebox
+
+% \onepageout takes a vbox as an argument.  Note that \pagecontents
+% does insertions, but you have to call it yourself.
+\def\onepageout#1{%
+  \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
+  %
+  \ifodd\pageno  \advance\hoffset by \bindingoffset
+  \else \advance\hoffset by -\bindingoffset\fi
+  %
+  % Do this outside of the \shipout so @code etc. will be expanded in
+  % the headline as they should be, not taken literally (outputting ''code).
+  \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
+  \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+  \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
+  \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+  %
+  {%
+    % Have to do this stuff outside the \shipout because we want it to
+    % take effect in \write's, yet the group defined by the \vbox ends
+    % before the \shipout runs.
+    %
+    \indexdummies         % don't expand commands in the output.
+    \normalturnoffactive  % \ in index entries must not stay \, e.g., if
+               % the page break happens to be in the middle of an example.
+               % We don't want .vr (or whatever) entries like this:
+               % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
+               % "\acronym" won't work when it's read back in;
+               % it needs to be 
+               % {\code {{\tt \backslashcurfont }acronym}
+    \shipout\vbox{%
+      % Do this early so pdf references go to the beginning of the page.
+      \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
+      %
+      \ifcropmarks \vbox to \outervsize\bgroup
+        \hsize = \outerhsize
+        \vskip-\topandbottommargin
+        \vtop to0pt{%
+          \line{\ewtop\hfil\ewtop}%
+          \nointerlineskip
+          \line{%
+            \vbox{\moveleft\cornerthick\nstop}%
+            \hfill
+            \vbox{\moveright\cornerthick\nstop}%
+          }%
+          \vss}%
+        \vskip\topandbottommargin
+        \line\bgroup
+          \hfil % center the page within the outer (page) hsize.
+          \ifodd\pageno\hskip\bindingoffset\fi
+          \vbox\bgroup
+      \fi
+      %
+      \unvbox\headlinebox
+      \pagebody{#1}%
+      \ifdim\ht\footlinebox > 0pt
+        % Only leave this space if the footline is nonempty.
+        % (We lessened \vsize for it in \oddfootingyyy.)
+        % The \baselineskip=24pt in plain's \makefootline has no effect.
+        \vskip 24pt
+        \unvbox\footlinebox
+      \fi
+      %
+      \ifcropmarks
+          \egroup % end of \vbox\bgroup
+        \hfil\egroup % end of (centering) \line\bgroup
+        \vskip\topandbottommargin plus1fill minus1fill
+        \boxmaxdepth = \cornerthick
+        \vbox to0pt{\vss
+          \line{%
+            \vbox{\moveleft\cornerthick\nsbot}%
+            \hfill
+            \vbox{\moveright\cornerthick\nsbot}%
+          }%
+          \nointerlineskip
+          \line{\ewbot\hfil\ewbot}%
+        }%
+      \egroup % \vbox from first cropmarks clause
+      \fi
+    }% end of \shipout\vbox
+  }% end of group with \indexdummies
+  \advancepageno
+  \ifnum\outputpenalty>-20000 \else\dosupereject\fi
+}
+
+\newinsert\margin \dimen\margin=\maxdimen
+
+\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+{\catcode`\@ =11
+\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
+% marginal hacks, juha@viisa.uucp (Juha Takala)
+\ifvoid\margin\else % marginal info is present
+  \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
+\dimen@=\dp#1\relax \unvbox#1\relax
+\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
+\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
+}
+
+% Here are the rules for the cropmarks.  Note that they are
+% offset so that the space between them is truly \outerhsize or \outervsize
+% (P. A. MacKay, 12 November, 1986)
+%
+\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
+\def\nstop{\vbox
+  {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
+\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
+\def\nsbot{\vbox
+  {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
+
+% Parse an argument, then pass it to #1.  The argument is the rest of
+% the input line (except we remove a trailing comment).  #1 should be a
+% macro which expects an ordinary undelimited TeX argument.
+%
+\def\parsearg{\parseargusing{}}
+\def\parseargusing#1#2{%
+  \def\argtorun{#2}%
+  \begingroup
+    \obeylines
+    \spaceisspace
+    #1%
+    \parseargline\empty% Insert the \empty token, see \finishparsearg below.
+}
+
+{\obeylines %
+  \gdef\parseargline#1^^M{%
+    \endgroup % End of the group started in \parsearg.
+    \argremovecomment #1\comment\ArgTerm%
+  }%
+}
+
+% First remove any @comment, then any @c comment.
+\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
+\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
+
+% Each occurence of `\^^M' or `<space>\^^M' is replaced by a single space.
+%
+% \argremovec might leave us with trailing space, e.g.,
+%    @end itemize  @c foo
+% This space token undergoes the same procedure and is eventually removed
+% by \finishparsearg.
+%
+\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
+\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
+\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
+  \def\temp{#3}%
+  \ifx\temp\empty
+    % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
+    \let\temp\finishparsearg
+  \else
+    \let\temp\argcheckspaces
+  \fi
+  % Put the space token in:
+  \temp#1 #3\ArgTerm
+}
+
+% If a _delimited_ argument is enclosed in braces, they get stripped; so
+% to get _exactly_ the rest of the line, we had to prevent such situation.
+% We prepended an \empty token at the very beginning and we expand it now,
+% just before passing the control to \argtorun.
+% (Similarily, we have to think about #3 of \argcheckspacesY above: it is
+% either the null string, or it ends with \^^M---thus there is no danger
+% that a pair of braces would be stripped.
+%
+% But first, we have to remove the trailing space token.
+%
+\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
+
+% \parseargdef\foo{...}
+%      is roughly equivalent to
+% \def\foo{\parsearg\Xfoo}
+% \def\Xfoo#1{...}
+%
+% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
+% favourite TeX trick.  --kasal, 16nov03
+
+\def\parseargdef#1{%
+  \expandafter \doparseargdef \csname\string#1\endcsname #1%
+}
+\def\doparseargdef#1#2{%
+  \def#2{\parsearg#1}%
+  \def#1##1%
+}
+
+% Several utility definitions with active space:
+{
+  \obeyspaces
+  \gdef\obeyedspace{ }
+
+  % Make each space character in the input produce a normal interword
+  % space in the output.  Don't allow a line break at this space, as this
+  % is used only in environments like @example, where each line of input
+  % should produce a line of output anyway.
+  %
+  \gdef\sepspaces{\obeyspaces\let =\tie}
+
+  % If an index command is used in an @example environment, any spaces
+  % therein should become regular spaces in the raw index file, not the
+  % expansion of \tie (\leavevmode \penalty \@M \ ).
+  \gdef\unsepspaces{\let =\space}
+}
+
+
+\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
+
+% Define the framework for environments in texinfo.tex.  It's used like this:
+%
+%   \envdef\foo{...}
+%   \def\Efoo{...}
+%
+% It's the responsibility of \envdef to insert \begingroup before the
+% actual body; @end closes the group after calling \Efoo.  \envdef also
+% defines \thisenv, so the current environment is known; @end checks
+% whether the environment name matches.  The \checkenv macro can also be
+% used to check whether the current environment is the one expected.
+%
+% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
+% are not treated as enviroments; they don't open a group.  (The
+% implementation of @end takes care not to call \endgroup in this
+% special case.)
+
+
+% At runtime, environments start with this:
+\def\startenvironment#1{\begingroup\def\thisenv{#1}}
+% initialize
+\let\thisenv\empty
+
+% ... but they get defined via ``\envdef\foo{...}'':
+\long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
+\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
+
+% Check whether we're in the right environment:
+\def\checkenv#1{%
+  \def\temp{#1}%
+  \ifx\thisenv\temp
+  \else
+    \badenverr
+  \fi
+}
+
+% Evironment mismatch, #1 expected:
+\def\badenverr{%
+  \errhelp = \EMsimple
+  \errmessage{This command can appear only \inenvironment\temp,
+    not \inenvironment\thisenv}%
+}
+\def\inenvironment#1{%
+  \ifx#1\empty
+    out of any environment%
+  \else
+    in environment \expandafter\string#1%
+  \fi
+}
+
+% @end foo executes the definition of \Efoo.
+% But first, it executes a specialized version of \checkenv
+%
+\parseargdef\end{%
+  \if 1\csname iscond.#1\endcsname
+  \else
+    % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
+    \expandafter\checkenv\csname#1\endcsname
+    \csname E#1\endcsname
+    \endgroup
+  \fi
+}
+
+\newhelp\EMsimple{Press RETURN to continue.}
+
+
+%% Simple single-character @ commands
+
+% @@ prints an @
+% Kludge this until the fonts are right (grr).
+\def\@{{\tt\char64}}
+
+% This is turned off because it was never documented
+% and you can use @w{...} around a quote to suppress ligatures.
+%% Define @` and @' to be the same as ` and '
+%% but suppressing ligatures.
+%\def\`{{`}}
+%\def\'{{'}}
+
+% Used to generate quoted braces.
+\def\mylbrace {{\tt\char123}}
+\def\myrbrace {{\tt\char125}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+\begingroup
+  % Definitions to produce \{ and \} commands for indices,
+  % and @{ and @} for the aux/toc files.
+  \catcode`\{ = \other \catcode`\} = \other
+  \catcode`\[ = 1 \catcode`\] = 2
+  \catcode`\! = 0 \catcode`\\ = \other
+  !gdef!lbracecmd[\{]%
+  !gdef!rbracecmd[\}]%
+  !gdef!lbraceatcmd[@{]%
+  !gdef!rbraceatcmd[@}]%
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \c
+\let\dotaccent = \.
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \t
+\let\ubaraccent = \b
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+  \def\temp{#1}%
+  \ifx\temp\imacro \ptexi
+  \else\ifx\temp\jmacro \j
+  \else \errmessage{@dotless can be used only with i or j}%
+  \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence.  (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo.  Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+  L\kern-.36em
+  {\setbox0=\hbox{T}%
+   \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
+  \kern-.15em
+  \TeX
+}
+
+% Be sure we're in horizontal mode when doing a tie, since we make space
+% equivalent to this in @example-like environments. Otherwise, a space
+% at the beginning of a line will start with \penalty -- and
+% since \penalty is valid in vertical mode, we'd end up putting the
+% penalty on the vertical list instead of in the new paragraph.
+{\catcode`@ = 11
+ % Avoid using \@M directly, because that causes trouble
+ % if the definition is written into an index file.
+ \global\let\tiepenalty = \@M
+ \gdef\tie{\leavevmode\penalty\tiepenalty\ }
+}
+
+% @: forces normal size whitespace following.
+\def\:{\spacefactor=1000 }
+
+% @* forces a line break.
+\def\*{\hfil\break\hbox{}\ignorespaces}
+
+% @/ allows a line break.
+\let\/=\allowbreak
+
+% @. is an end-of-sentence period.
+\def\.{.\spacefactor=\endofsentencespacefactor\space}
+
+% @! is an end-of-sentence bang.
+\def\!{!\spacefactor=\endofsentencespacefactor\space}
+
+% @? is an end-of-sentence query.
+\def\?{?\spacefactor=\endofsentencespacefactor\space}
+
+% @frenchspacing on|off  says whether to put extra space after punctuation.
+% 
+\def\onword{on}
+\def\offword{off}
+%
+\parseargdef\frenchspacing{%
+  \def\temp{#1}%
+  \ifx\temp\onword \plainfrenchspacing
+  \else\ifx\temp\offword \plainnonfrenchspacing
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+  \fi\fi
+}
+
+% @w prevents a word break.  Without the \leavevmode, @w at the
+% beginning of a paragraph, when TeX is still in vertical mode, would
+% produce a whole line of output instead of starting the paragraph.
+\def\w#1{\leavevmode\hbox{#1}}
+
+% @group ... @end group forces ... to be all on one page, by enclosing
+% it in a TeX vbox.  We use \vtop instead of \vbox to construct the box
+% to keep its height that of a normal line.  According to the rules for
+% \topskip (p.114 of the TeXbook), the glue inserted is
+% max (\topskip - \ht (first item), 0).  If that height is large,
+% therefore, no glue is inserted, and the space between the headline and
+% the text is small, which looks bad.
+%
+% Another complication is that the group might be very large.  This can
+% cause the glue on the previous page to be unduly stretched, because it
+% does not have much material.  In this case, it's better to add an
+% explicit \vfill so that the extra space is at the bottom.  The
+% threshold for doing this is if the group is more than \vfilllimit
+% percent of a page (\vfilllimit can be changed inside of @tex).
+%
+\newbox\groupbox
+\def\vfilllimit{0.7}
+%
+\envdef\group{%
+  \ifnum\catcode`\^^M=\active \else
+    \errhelp = \groupinvalidhelp
+    \errmessage{@group invalid in context where filling is enabled}%
+  \fi
+  \startsavinginserts
+  %
+  \setbox\groupbox = \vtop\bgroup
+    % Do @comment since we are called inside an environment such as
+    % @example, where each end-of-line in the input causes an
+    % end-of-line in the output.  We don't want the end-of-line after
+    % the `@group' to put extra space in the output.  Since @group
+    % should appear on a line by itself (according to the Texinfo
+    % manual), we don't worry about eating any user text.
+    \comment
+}
+%
+% The \vtop produces a box with normal height and large depth; thus, TeX puts
+% \baselineskip glue before it, and (when the next line of text is done)
+% \lineskip glue after it.  Thus, space below is not quite equal to space
+% above.  But it's pretty close.
+\def\Egroup{%
+    % To get correct interline space between the last line of the group
+    % and the first line afterwards, we have to propagate \prevdepth.
+    \endgraf % Not \par, as it may have been set to \lisppar.
+    \global\dimen1 = \prevdepth
+  \egroup           % End the \vtop.
+  % \dimen0 is the vertical size of the group's box.
+  \dimen0 = \ht\groupbox  \advance\dimen0 by \dp\groupbox
+  % \dimen2 is how much space is left on the page (more or less).
+  \dimen2 = \pageheight   \advance\dimen2 by -\pagetotal
+  % if the group doesn't fit on the current page, and it's a big big
+  % group, force a page break.
+  \ifdim \dimen0 > \dimen2
+    \ifdim \pagetotal < \vfilllimit\pageheight
+      \page
+    \fi
+  \fi
+  \box\groupbox
+  \prevdepth = \dimen1
+  \checkinserts
+}
+%
+% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
+% message, so this ends up printing `@group can only ...'.
+%
+\newhelp\groupinvalidhelp{%
+group can only be used in environments such as @example,^^J%
+where each line of input produces a line of output.}
+
+% @need space-in-mils
+% forces a page break if there is not space-in-mils remaining.
+
+\newdimen\mil  \mil=0.001in
+
+% Old definition--didn't work.
+%\parseargdef\need{\par %
+%% This method tries to make TeX break the page naturally
+%% if the depth of the box does not fit.
+%{\baselineskip=0pt%
+%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
+%\prevdepth=-1000pt
+%}}
+
+\parseargdef\need{%
+  % Ensure vertical mode, so we don't make a big box in the middle of a
+  % paragraph.
+  \par
+  %
+  % If the @need value is less than one line space, it's useless.
+  \dimen0 = #1\mil
+  \dimen2 = \ht\strutbox
+  \advance\dimen2 by \dp\strutbox
+  \ifdim\dimen0 > \dimen2
+    %
+    % Do a \strut just to make the height of this box be normal, so the
+    % normal leading is inserted relative to the preceding line.
+    % And a page break here is fine.
+    \vtop to #1\mil{\strut\vfil}%
+    %
+    % TeX does not even consider page breaks if a penalty added to the
+    % main vertical list is 10000 or more.  But in order to see if the
+    % empty box we just added fits on the page, we must make it consider
+    % page breaks.  On the other hand, we don't want to actually break the
+    % page after the empty box.  So we use a penalty of 9999.
+    %
+    % There is an extremely small chance that TeX will actually break the
+    % page at this \penalty, if there are no other feasible breakpoints in
+    % sight.  (If the user is using lots of big @group commands, which
+    % almost-but-not-quite fill up a page, TeX will have a hard time doing
+    % good page breaking, for example.)  However, I could not construct an
+    % example where a page broke at this \penalty; if it happens in a real
+    % document, then we can reconsider our strategy.
+    \penalty9999
+    %
+    % Back up by the size of the box, whether we did a page break or not.
+    \kern -#1\mil
+    %
+    % Do not allow a page break right after this kern.
+    \nobreak
+  \fi
+}
+
+% @br   forces paragraph break (and is undocumented).
+
+\let\br = \par
+
+% @page forces the start of a new page.
+%
+\def\page{\par\vfill\supereject}
+
+% @exdent text....
+% outputs text on separate line in roman font, starting at standard page margin
+
+% This records the amount of indent in the innermost environment.
+% That's how much \exdent should take out.
+\newskip\exdentamount
+
+% This defn is used inside fill environments such as @defun.
+\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
+
+% This defn is used inside nofill environments such as @example.
+\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
+  \leftline{\hskip\leftskip{\rm#1}}}}
+
+% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
+% paragraph.  For more general purposes, use the \margin insertion
+% class.  WHICH is `l' or `r'.
+%
+\newskip\inmarginspacing \inmarginspacing=1cm
+\def\strutdepth{\dp\strutbox}
+%
+\def\doinmargin#1#2{\strut\vadjust{%
+  \nobreak
+  \kern-\strutdepth
+  \vtop to \strutdepth{%
+    \baselineskip=\strutdepth
+    \vss
+    % if you have multiple lines of stuff to put here, you'll need to
+    % make the vbox yourself of the appropriate size.
+    \ifx#1l%
+      \llap{\ignorespaces #2\hskip\inmarginspacing}%
+    \else
+      \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
+    \fi
+    \null
+  }%
+}}
+\def\inleftmargin{\doinmargin l}
+\def\inrightmargin{\doinmargin r}
+%
+% @inmargin{TEXT [, RIGHT-TEXT]}
+% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
+% else use TEXT for both).
+%
+\def\inmargin#1{\parseinmargin #1,,\finish}
+\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
+  \setbox0 = \hbox{\ignorespaces #2}%
+  \ifdim\wd0 > 0pt
+    \def\lefttext{#1}%  have both texts
+    \def\righttext{#2}%
+  \else
+    \def\lefttext{#1}%  have only one text
+    \def\righttext{#1}%
+  \fi
+  %
+  \ifodd\pageno
+    \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
+  \else
+    \def\temp{\inleftmargin\lefttext}%
+  \fi
+  \temp
+}
+
+% @include file    insert text of that file as input.
+%
+\def\include{\parseargusing\filenamecatcodes\includezzz}
+\def\includezzz#1{%
+  \pushthisfilestack
+  \def\thisfile{#1}%
+  {%
+    \makevalueexpandable
+    \def\temp{\input #1 }%
+    \expandafter
+  }\temp
+  \popthisfilestack
+}
+\def\filenamecatcodes{%
+  \catcode`\\=\other
+  \catcode`~=\other
+  \catcode`^=\other
+  \catcode`_=\other
+  \catcode`|=\other
+  \catcode`<=\other
+  \catcode`>=\other
+  \catcode`+=\other
+  \catcode`-=\other
+}
+
+\def\pushthisfilestack{%
+  \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
+}
+\def\pushthisfilestackX{%
+  \expandafter\pushthisfilestackY\thisfile\StackTerm
+}
+\def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
+  \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
+}
+
+\def\popthisfilestack{\errthisfilestackempty}
+\def\errthisfilestackempty{\errmessage{Internal error:
+  the stack of filenames is empty.}}
+
+\def\thisfile{}
+
+% @center line
+% outputs that line, centered.
+%
+\parseargdef\center{%
+  \ifhmode
+    \let\next\centerH
+  \else
+    \let\next\centerV
+  \fi
+  \next{\hfil \ignorespaces#1\unskip \hfil}%
+}
+\def\centerH#1{%
+  {%
+    \hfil\break
+    \advance\hsize by -\leftskip
+    \advance\hsize by -\rightskip
+    \line{#1}%
+    \break
+  }%
+}
+\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
+
+% @sp n   outputs n lines of vertical space
+
+\parseargdef\sp{\vskip #1\baselineskip}
+
+% @comment ...line which is ignored...
+% @c is the same as @comment
+% @ignore ... @end ignore  is another way to write a comment
+
+\def\comment{\begingroup \catcode`\^^M=\other%
+\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
+\commentxxx}
+{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
+
+\let\c=\comment
+
+% @paragraphindent NCHARS
+% We'll use ems for NCHARS, close enough.
+% NCHARS can also be the word `asis' or `none'.
+% We cannot feasibly implement @paragraphindent asis, though.
+%
+\def\asisword{asis} % no translation, these are keywords
+\def\noneword{none}
+%
+\parseargdef\paragraphindent{%
+  \def\temp{#1}%
+  \ifx\temp\asisword
+  \else
+    \ifx\temp\noneword
+      \defaultparindent = 0pt
+    \else
+      \defaultparindent = #1em
+    \fi
+  \fi
+  \parindent = \defaultparindent
+}
+
+% @exampleindent NCHARS
+% We'll use ems for NCHARS like @paragraphindent.
+% It seems @exampleindent asis isn't necessary, but
+% I preserve it to make it similar to @paragraphindent.
+\parseargdef\exampleindent{%
+  \def\temp{#1}%
+  \ifx\temp\asisword
+  \else
+    \ifx\temp\noneword
+      \lispnarrowing = 0pt
+    \else
+      \lispnarrowing = #1em
+    \fi
+  \fi
+}
+
+% @firstparagraphindent WORD
+% If WORD is `none', then suppress indentation of the first paragraph
+% after a section heading.  If WORD is `insert', then do indent at such
+% paragraphs.
+%
+% The paragraph indentation is suppressed or not by calling
+% \suppressfirstparagraphindent, which the sectioning commands do.
+% We switch the definition of this back and forth according to WORD.
+% By default, we suppress indentation.
+%
+\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
+\def\insertword{insert}
+%
+\parseargdef\firstparagraphindent{%
+  \def\temp{#1}%
+  \ifx\temp\noneword
+    \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
+  \else\ifx\temp\insertword
+    \let\suppressfirstparagraphindent = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @firstparagraphindent option `\temp'}%
+  \fi\fi
+}
+
+% Here is how we actually suppress indentation.  Redefine \everypar to
+% \kern backwards by \parindent, and then reset itself to empty.
+%
+% We also make \indent itself not actually do anything until the next
+% paragraph.
+%
+\gdef\dosuppressfirstparagraphindent{%
+  \gdef\indent{%
+    \restorefirstparagraphindent
+    \indent
+  }%
+  \gdef\noindent{%
+    \restorefirstparagraphindent
+    \noindent
+  }%
+  \global\everypar = {%
+    \kern -\parindent
+    \restorefirstparagraphindent
+  }%
+}
+
+\gdef\restorefirstparagraphindent{%
+  \global \let \indent = \ptexindent
+  \global \let \noindent = \ptexnoindent
+  \global \everypar = {}%
+}
+
+
+% @asis just yields its argument.  Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}.  So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+  \catcode`\_ = \active
+  \gdef\mathunderscore{%
+    \catcode`\_=\active
+    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+  }
+}
+% Another complication: we want \\ (and @\) to output a \ character.
+% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
+% this is not advertised and we don't care.  Texinfo does not
+% otherwise define @\.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+  \tex
+  \mathunderscore
+  \let\\ = \mathbackslash
+  \mathactive
+  $\finishmath
+}
+\def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+  \catcode`^ = \active
+  \catcode`< = \active
+  \catcode`> = \active
+  \catcode`+ = \active
+  \gdef\mathactive{%
+    \let^ = \ptexhat
+    \let< = \ptexless
+    \let> = \ptexgtr
+    \let+ = \ptexplus
+  }
+}
+
+% @bullet and @minus need the same treatment as @math, just above.
+\def\bullet{$\ptexbullet$}
+\def\minus{$-$}
+
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em.  So do
+% whichever is larger.
+%
+\def\dots{%
+  \leavevmode
+  \setbox0=\hbox{...}% get width of three periods
+  \ifdim\wd0 > 1.5em
+    \dimen0 = \wd0
+  \else
+    \dimen0 = 1.5em
+  \fi
+  \hbox to \dimen0{%
+    \hskip 0pt plus.25fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus.5fil
+  }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+  \dots
+  \spacefactor=\endofsentencespacefactor
+}
+
+% @comma{} is so commas can be inserted into text without messing up
+% Texinfo's parsing.
+%
+\let\comma = ,
+
+% @refill is a no-op.
+\let\refill=\relax
+
+% If working on a large document in chapters, it is convenient to
+% be able to disable indexing, cross-referencing, and contents, for test runs.
+% This is done with @novalidate (before @setfilename).
+%
+\newif\iflinks \linkstrue % by default we want the aux files.
+\let\novalidate = \linksfalse
+
+% @setfilename is done at the beginning of every texinfo file.
+% So open here the files we need to have open while reading the input.
+% This makes it possible to make a .fmt file for texinfo.
+\def\setfilename{%
+   \fixbackslash  % Turn off hack to swallow `\input texinfo'.
+   \iflinks
+     \tryauxfile
+     % Open the new aux file.  TeX will close it automatically at exit.
+     \immediate\openout\auxfile=\jobname.aux
+   \fi % \openindices needs to do some work in any case.
+   \openindices
+   \let\setfilename=\comment % Ignore extra @setfilename cmds.
+   %
+   % If texinfo.cnf is present on the system, read it.
+   % Useful for site-wide @afourpaper, etc.
+   \openin 1 texinfo.cnf
+   \ifeof 1 \else \input texinfo.cnf \fi
+   \closein 1
+   %
+   \comment % Ignore the actual filename.
+}
+
+% Called from \setfilename.
+%
+\def\openindices{%
+  \newindex{cp}%
+  \newcodeindex{fn}%
+  \newcodeindex{vr}%
+  \newcodeindex{tp}%
+  \newcodeindex{ky}%
+  \newcodeindex{pg}%
+}
+
+% @bye.
+\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+
+
+\message{pdf,}
+% adobe `portable' document format
+\newcount\tempnum
+\newcount\lnkcount
+\newtoks\filename
+\newcount\filenamelength
+\newcount\pgn
+\newtoks\toksA
+\newtoks\toksB
+\newtoks\toksC
+\newtoks\toksD
+\newbox\boxA
+\newcount\countA
+\newif\ifpdf
+\newif\ifpdfmakepagedest
+
+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
+% can be set).  So we test for \relax and 0 as well as \undefined,
+% borrowed from ifpdf.sty.
+\ifx\pdfoutput\undefined
+\else
+  \ifx\pdfoutput\relax
+  \else
+    \ifcase\pdfoutput
+    \else
+      \pdftrue
+    \fi
+  \fi
+\fi
+
+% PDF uses PostScript string constants for the names of xref targets,
+% for display in the outlines, and in other places.  Thus, we have to
+% double any backslashes.  Otherwise, a name like "\node" will be
+% interpreted as a newline (\n), followed by o, d, e.  Not good.
+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
+% (and related messages, the final outcome is that it is up to the TeX
+% user to double the backslashes and otherwise make the string valid, so
+% that's what we do).
+
+% double active backslashes.
+% 
+{\catcode`\@=0 \catcode`\\=\active
+ @gdef@activebackslashdouble{%
+   @catcode`@\=@active
+   @let\=@doublebackslash}
+}
+
+% To handle parens, we must adopt a different approach, since parens are
+% not active characters.  hyperref.dtx (which has the same problem as
+% us) handles it with this amazing macro to replace tokens, with minor
+% changes for Texinfo.  It is included here under the GPL by permission
+% from the author, Heiko Oberdiek.
+% 
+% #1 is the tokens to replace.
+% #2 is the replacement.
+% #3 is the control sequence with the string.
+% 
+\def\HyPsdSubst#1#2#3{%
+  \def\HyPsdReplace##1#1##2\END{%
+    ##1%
+    \ifx\\##2\\%
+    \else
+      #2%
+      \HyReturnAfterFi{%
+        \HyPsdReplace##2\END
+      }%
+    \fi
+  }%
+  \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
+}
+\long\def\HyReturnAfterFi#1\fi{\fi#1}
+
+% #1 is a control sequence in which to do the replacements.
+\def\backslashparens#1{%
+  \xdef#1{#1}% redefine it as its expansion; the definition is simply
+             % \lastnode when called from \setref -> \pdfmkdest.
+  \HyPsdSubst{(}{\realbackslash(}{#1}%
+  \HyPsdSubst{)}{\realbackslash)}{#1}%
+}
+
+\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
+with PDF output, and none of those formats could be found.  (.eps cannot
+be supported due to the design of the PDF format; use regular TeX (DVI
+output) for that.)}
+
+\ifpdf
+  %
+  % Color manipulation macros based on pdfcolor.tex.
+  \def\cmykDarkRed{0.28 1 1 0.35}
+  \def\cmykBlack{0 0 0 1}
+  %
+  \def\pdfsetcolor#1{\pdfliteral{#1 k}}
+  % Set color, and create a mark which defines \thiscolor accordingly,
+  % so that \makeheadline knows which color to restore.
+  \def\setcolor#1{%
+    \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
+    \domark
+    \pdfsetcolor{#1}%
+  }
+  %
+  \def\maincolor{\cmykBlack}
+  \pdfsetcolor{\maincolor}
+  \edef\thiscolor{\maincolor}
+  \def\lastcolordefs{}
+  %
+  \def\makefootline{%
+    \baselineskip24pt
+    \line{\pdfsetcolor{\maincolor}\the\footline}%
+  }
+  %
+  \def\makeheadline{%
+    \vbox to 0pt{%
+      \vskip-22.5pt
+      \line{%
+        \vbox to8.5pt{}%
+        % Extract \thiscolor definition from the marks.
+        \getcolormarks
+        % Typeset the headline with \maincolor, then restore the color.
+        \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+      }%
+      \vss
+    }%
+    \nointerlineskip
+  }
+  %
+  %
+  \pdfcatalog{/PageMode /UseOutlines}
+  %
+  % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
+  \def\dopdfimage#1#2#3{%
+    \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+    \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+    %
+    % pdftex (and the PDF format) support .png, .jpg, .pdf (among
+    % others).  Let's try in that order.
+    \let\pdfimgext=\empty
+    \begingroup
+      \openin 1 #1.png \ifeof 1
+        \openin 1 #1.jpg \ifeof 1
+          \openin 1 #1.jpeg \ifeof 1
+            \openin 1 #1.JPG \ifeof 1
+              \openin 1 #1.pdf \ifeof 1
+                \errhelp = \nopdfimagehelp
+                \errmessage{Could not find image file #1 for pdf}%
+              \else \gdef\pdfimgext{pdf}%
+              \fi
+            \else \gdef\pdfimgext{JPG}%
+            \fi
+          \else \gdef\pdfimgext{jpeg}%
+          \fi
+        \else \gdef\pdfimgext{jpg}%
+        \fi
+      \else \gdef\pdfimgext{png}%
+      \fi
+      \closein 1
+    \endgroup
+    %
+    % without \immediate, pdftex seg faults when the same image is
+    % included twice.  (Version 3.14159-pre-1.0-unofficial-20010704.)
+    \ifnum\pdftexversion < 14
+      \immediate\pdfimage
+    \else
+      \immediate\pdfximage
+    \fi
+      \ifdim \wd0 >0pt width \imagewidth \fi
+      \ifdim \wd2 >0pt height \imageheight \fi
+      \ifnum\pdftexversion<13
+         #1.\pdfimgext
+       \else
+         {#1.\pdfimgext}%
+       \fi
+    \ifnum\pdftexversion < 14 \else
+      \pdfrefximage \pdflastximage
+    \fi}
+  %
+  \def\pdfmkdest#1{{%
+    % We have to set dummies so commands such as @code, and characters
+    % such as \, aren't expanded when present in a section title.
+    \indexnofonts
+    \turnoffactive
+    \activebackslashdouble
+    \makevalueexpandable
+    \def\pdfdestname{#1}%
+    \backslashparens\pdfdestname
+    \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+  }}
+  %
+  % used to mark target names; must be expandable.
+  \def\pdfmkpgn#1{#1}
+  %
+  % by default, use a color that is dark enough to print on paper as
+  % nearly black, but still distinguishable for online viewing.
+  \def\urlcolor{\cmykDarkRed}
+  \def\linkcolor{\cmykDarkRed}
+  \def\endlink{\setcolor{\maincolor}\pdfendlink}
+  %
+  % Adding outlines to PDF; macros for calculating structure of outlines
+  % come from Petr Olsak
+  \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
+    \else \csname#1\endcsname \fi}
+  \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
+    \advance\tempnum by 1
+    \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
+  %
+  % #1 is the section text, which is what will be displayed in the
+  % outline by the pdf viewer.  #2 is the pdf expression for the number
+  % of subentries (or empty, for subsubsections).  #3 is the node text,
+  % which might be empty if this toc entry had no corresponding node.
+  % #4 is the page number
+  %
+  \def\dopdfoutline#1#2#3#4{%
+    % Generate a link to the node text if that exists; else, use the
+    % page number.  We could generate a destination for the section
+    % text in the case where a section has no node, but it doesn't
+    % seem worth the trouble, since most documents are normally structured.
+    \def\pdfoutlinedest{#3}%
+    \ifx\pdfoutlinedest\empty
+      \def\pdfoutlinedest{#4}%
+    \else
+      % Doubled backslashes in the name.
+      {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
+       \backslashparens\pdfoutlinedest}%
+    \fi
+    %
+    % Also double the backslashes in the display string.
+    {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
+     \backslashparens\pdfoutlinetext}%
+    %
+    \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
+  }
+  %
+  \def\pdfmakeoutlines{%
+    \begingroup
+      % Thanh's hack / proper braces in bookmarks
+      \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
+      \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
+      %
+      % Read toc silently, to get counts of subentries for \pdfoutline.
+      \def\numchapentry##1##2##3##4{%
+       \def\thischapnum{##2}%
+       \def\thissecnum{0}%
+       \def\thissubsecnum{0}%
+      }%
+      \def\numsecentry##1##2##3##4{%
+       \advancenumber{chap\thischapnum}%
+       \def\thissecnum{##2}%
+       \def\thissubsecnum{0}%
+      }%
+      \def\numsubsecentry##1##2##3##4{%
+       \advancenumber{sec\thissecnum}%
+       \def\thissubsecnum{##2}%
+      }%
+      \def\numsubsubsecentry##1##2##3##4{%
+       \advancenumber{subsec\thissubsecnum}%
+      }%
+      \def\thischapnum{0}%
+      \def\thissecnum{0}%
+      \def\thissubsecnum{0}%
+      %
+      % use \def rather than \let here because we redefine \chapentry et
+      % al. a second time, below.
+      \def\appentry{\numchapentry}%
+      \def\appsecentry{\numsecentry}%
+      \def\appsubsecentry{\numsubsecentry}%
+      \def\appsubsubsecentry{\numsubsubsecentry}%
+      \def\unnchapentry{\numchapentry}%
+      \def\unnsecentry{\numsecentry}%
+      \def\unnsubsecentry{\numsubsecentry}%
+      \def\unnsubsubsecentry{\numsubsubsecentry}%
+      \readdatafile{toc}%
+      %
+      % Read toc second time, this time actually producing the outlines.
+      % The `-' means take the \expnumber as the absolute number of
+      % subentries, which we calculated on our first read of the .toc above.
+      %
+      % We use the node names as the destinations.
+      \def\numchapentry##1##2##3##4{%
+        \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
+      \def\numsecentry##1##2##3##4{%
+        \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
+      \def\numsubsecentry##1##2##3##4{%
+        \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
+      \def\numsubsubsecentry##1##2##3##4{% count is always zero
+        \dopdfoutline{##1}{}{##3}{##4}}%
+      %
+      % PDF outlines are displayed using system fonts, instead of
+      % document fonts.  Therefore we cannot use special characters,
+      % since the encoding is unknown.  For example, the eogonek from
+      % Latin 2 (0xea) gets translated to a | character.  Info from
+      % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
+      %
+      % xx to do this right, we have to translate 8-bit characters to
+      % their "best" equivalent, based on the @documentencoding.  Right
+      % now, I guess we'll just let the pdf reader have its way.
+      \indexnofonts
+      \setupdatafile
+      \catcode`\\=\active \otherbackslash
+      \input \tocreadfilename
+    \endgroup
+  }
+  %
+  \def\skipspaces#1{\def\PP{#1}\def\D{|}%
+    \ifx\PP\D\let\nextsp\relax
+    \else\let\nextsp\skipspaces
+      \ifx\p\space\else\addtokens{\filename}{\PP}%
+        \advance\filenamelength by 1
+      \fi
+    \fi
+    \nextsp}
+  \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+  \ifnum\pdftexversion < 14
+    \let \startlink \pdfannotlink
+  \else
+    \let \startlink \pdfstartlink
+  \fi
+  % make a live url in pdf output.
+  \def\pdfurl#1{%
+    \begingroup
+      % it seems we really need yet another set of dummies; have not
+      % tried to figure out what each command should do in the context
+      % of @url.  for now, just make @/ a no-op, that's the only one
+      % people have actually reported a problem with.
+      % 
+      \normalturnoffactive
+      \def\@{@}%
+      \let\/=\empty
+      \makevalueexpandable
+      \leavevmode\setcolor{\urlcolor}%
+      \startlink attr{/Border [0 0 0]}%
+        user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
+    \endgroup}
+  \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+  \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+  \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+  \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+  \def\maketoks{%
+    \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+    \ifx\first0\adn0
+    \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+    \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+    \else
+      \ifnum0=\countA\else\makelink\fi
+      \ifx\first.\let\next=\done\else
+        \let\next=\maketoks
+        \addtokens{\toksB}{\the\toksD}
+        \ifx\first,\addtokens{\toksB}{\space}\fi
+      \fi
+    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+    \next}
+  \def\makelink{\addtokens{\toksB}%
+    {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+  \def\pdflink#1{%
+    \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
+    \setcolor{\linkcolor}#1\endlink}
+  \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+\else
+  \let\pdfmkdest = \gobble
+  \let\pdfurl = \gobble
+  \let\endlink = \relax
+  \let\setcolor = \gobble
+  \let\pdfsetcolor = \gobble
+  \let\pdfmakeoutlines = \relax
+\fi  % \ifx\pdfoutput
+
+
+\message{fonts,}
+
+% Change the current font style to #1, remembering it in \curfontstyle.
+% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
+% italics, not bold italics.
+%
+\def\setfontstyle#1{%
+  \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
+  \csname ten#1\endcsname  % change the current font
+}
+
+% Select #1 fonts with the current style.
+%
+\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
+
+\def\rm{\fam=0 \setfontstyle{rm}}
+\def\it{\fam=\itfam \setfontstyle{it}}
+\def\sl{\fam=\slfam \setfontstyle{sl}}
+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
+\def\tt{\fam=\ttfam \setfontstyle{tt}}
+
+% Texinfo sort of supports the sans serif font style, which plain TeX does not.
+% So we set up a \sf.
+\newfam\sffam
+\def\sf{\fam=\sffam \setfontstyle{sf}}
+\let\li = \sf % Sometimes we call it \li, not \sf.
+
+% We don't need math for this font style.
+\def\ttsl{\setfontstyle{ttsl}}
+
+
+% Default leading.
+\newdimen\textleading  \textleading = 13.2pt
+
+% Set the baselineskip to #1, and the lineskip and strut size
+% correspondingly.  There is no deep meaning behind these magic numbers
+% used as factors; they just match (closely enough) what Knuth defined.
+%
+\def\lineskipfactor{.08333}
+\def\strutheightpercent{.70833}
+\def\strutdepthpercent {.29167}
+%
+% can get a sort of poor man's double spacing by redefining this.
+\def\baselinefactor{1}
+%
+\def\setleading#1{%
+  \dimen0 = #1\relax
+  \normalbaselineskip = \baselinefactor\dimen0
+  \normallineskip = \lineskipfactor\normalbaselineskip
+  \normalbaselines
+  \setbox\strutbox =\hbox{%
+    \vrule width0pt height\strutheightpercent\baselineskip
+                    depth \strutdepthpercent \baselineskip
+  }%
+}
+
+% PDF CMaps.  See also LaTeX's t1.cmap.
+%
+% do nothing with this by default.
+\expandafter\let\csname cmapOT1\endcsname\gobble
+\expandafter\let\csname cmapOT1IT\endcsname\gobble
+\expandafter\let\csname cmapOT1TT\endcsname\gobble
+
+% if we are producing pdf, and we have \pdffontattr, then define cmaps.
+% (\pdffontattr was introduced many years ago, but people still run
+% older pdftex's; it's easy to conditionalize, so we do.)
+\ifpdf \ifx\pdffontattr\undefined \else
+  \begingroup
+    \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+    \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1-0)
+%%Title: (TeX-OT1-0 TeX OT1 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+8 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<23> <26> <0023>
+<28> <3B> <0028>
+<3F> <5B> <003F>
+<5D> <5E> <005D>
+<61> <7A> <0061>
+<7B> <7C> <2013>
+endbfrange
+40 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <00660066>
+<0C> <00660069>
+<0D> <0066006C>
+<0E> <006600660069>
+<0F> <00660066006C>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<21> <0021>
+<22> <201D>
+<27> <2019>
+<3C> <00A1>
+<3D> <003D>
+<3E> <00BF>
+<5C> <201C>
+<5F> <02D9>
+<60> <2018>
+<7D> <02DD>
+<7E> <007E>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+    }\endgroup
+  \expandafter\edef\csname cmapOT1\endcsname#1{%
+    \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+  }%
+%
+% \cmapOT1IT
+  \begingroup
+    \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+    \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1IT-0)
+%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1IT)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1IT-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+8 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<25> <26> <0025>
+<28> <3B> <0028>
+<3F> <5B> <003F>
+<5D> <5E> <005D>
+<61> <7A> <0061>
+<7B> <7C> <2013>
+endbfrange
+42 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <00660066>
+<0C> <00660069>
+<0D> <0066006C>
+<0E> <006600660069>
+<0F> <00660066006C>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<21> <0021>
+<22> <201D>
+<23> <0023>
+<24> <00A3>
+<27> <2019>
+<3C> <00A1>
+<3D> <003D>
+<3E> <00BF>
+<5C> <201C>
+<5F> <02D9>
+<60> <2018>
+<7D> <02DD>
+<7E> <007E>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+    }\endgroup
+  \expandafter\edef\csname cmapOT1IT\endcsname#1{%
+    \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+  }%
+%
+% \cmapOT1TT
+  \begingroup
+    \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+    \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1TT-0)
+%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1TT)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1TT-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+5 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<21> <26> <0021>
+<28> <5F> <0028>
+<61> <7E> <0061>
+endbfrange
+32 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <2191>
+<0C> <2193>
+<0D> <0027>
+<0E> <00A1>
+<0F> <00BF>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<20> <2423>
+<27> <2019>
+<60> <2018>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+    }\endgroup
+  \expandafter\edef\csname cmapOT1TT\endcsname#1{%
+    \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+  }%
+\fi\fi
+
+
+% Set the font macro #1 to the font named #2, adding on the
+% specified font prefix (normally `cm').
+% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
+% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
+% empty to omit).
+\def\setfont#1#2#3#4#5{%
+  \font#1=\fontprefix#2#3 scaled #4
+  \csname cmap#5\endcsname#1%
+}
+% This is what gets called when #5 of \setfont is empty.
+\let\cmap\gobble
+% emacs-page end of cmaps
+
+% Use cm as the default font prefix.
+% To specify the font prefix, you must define \fontprefix
+% before you read in texinfo.tex.
+\ifx\fontprefix\undefined
+\def\fontprefix{cm}
+\fi
+% Support font families that don't use the same naming scheme as CM.
+\def\rmshape{r}
+\def\rmbshape{bx}               %where the normal face is bold
+\def\bfshape{b}
+\def\bxshape{bx}
+\def\ttshape{tt}
+\def\ttbshape{tt}
+\def\ttslshape{sltt}
+\def\itshape{ti}
+\def\itbshape{bxti}
+\def\slshape{sl}
+\def\slbshape{bxsl}
+\def\sfshape{ss}
+\def\sfbshape{ss}
+\def\scshape{csc}
+\def\scbshape{csc}
+
+% Definitions for a main text size of 11pt.  This is the default in
+% Texinfo.
+% 
+\def\definetextfontsizexi{%
+% Text fonts (11.2pt, magstep1).
+\def\textnominalsize{11pt}
+\edef\mainmagstep{\magstephalf}
+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
+\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
+\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+\def\textecsize{1095}
+
+% A few fonts for @defun names and args.
+\setfont\defbf\bfshape{10}{\magstep1}{OT1}
+\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
+\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+
+% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}{OT1}
+\setfont\smalltt\ttshape{9}{1000}{OT1TT}
+\setfont\smallbf\bfshape{10}{900}{OT1}
+\setfont\smallit\itshape{9}{1000}{OT1IT}
+\setfont\smallsl\slshape{9}{1000}{OT1}
+\setfont\smallsf\sfshape{9}{1000}{OT1}
+\setfont\smallsc\scshape{10}{900}{OT1}
+\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+\def\smallecsize{0900}
+
+% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}{OT1}
+\setfont\smallertt\ttshape{8}{1000}{OT1TT}
+\setfont\smallerbf\bfshape{10}{800}{OT1}
+\setfont\smallerit\itshape{8}{1000}{OT1IT}
+\setfont\smallersl\slshape{8}{1000}{OT1}
+\setfont\smallersf\sfshape{8}{1000}{OT1}
+\setfont\smallersc\scshape{10}{800}{OT1}
+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+\def\smallerecsize{0800}
+
+% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
+\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\authorrm{\secrm}
+\def\authortt{\sectt}
+\def\titleecsize{2074}
+
+% Chapter (and unnumbered) fonts (17.28pt).
+\def\chapnominalsize{17pt}
+\setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
+\setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
+\setfont\chapsl\slbshape{10}{\magstep3}{OT1}
+\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
+\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
+\setfont\chapsf\sfbshape{17}{1000}{OT1}
+\let\chapbf=\chaprm
+\setfont\chapsc\scbshape{10}{\magstep3}{OT1}
+\font\chapi=cmmi12 scaled \magstep2
+\font\chapsy=cmsy10 scaled \magstep3
+\def\chapecsize{1728}
+
+% Section fonts (14.4pt).
+\def\secnominalsize{14pt}
+\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
+\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
+\setfont\secsl\slbshape{10}{\magstep2}{OT1}
+\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
+\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
+\setfont\secsf\sfbshape{12}{\magstep1}{OT1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep2}{OT1}
+\font\seci=cmmi12 scaled \magstep1
+\font\secsy=cmsy10 scaled \magstep2
+\def\sececsize{1440}
+
+% Subsection fonts (13.15pt).
+\def\ssecnominalsize{13pt}
+\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
+\setfont\ssecit\itbshape{10}{1315}{OT1IT}
+\setfont\ssecsl\slbshape{10}{1315}{OT1}
+\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
+\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
+\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{1315}{OT1}
+\font\sseci=cmmi12 scaled \magstephalf
+\font\ssecsy=cmsy10 scaled 1315
+\def\ssececsize{1200}
+
+% Reduced fonts for @acro in text (10pt).
+\def\reducednominalsize{10pt}
+\setfont\reducedrm\rmshape{10}{1000}{OT1}
+\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
+\setfont\reducedbf\bfshape{10}{1000}{OT1}
+\setfont\reducedit\itshape{10}{1000}{OT1IT}
+\setfont\reducedsl\slshape{10}{1000}{OT1}
+\setfont\reducedsf\sfshape{10}{1000}{OT1}
+\setfont\reducedsc\scshape{10}{1000}{OT1}
+\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
+\font\reducedi=cmmi10
+\font\reducedsy=cmsy10
+\def\reducedecsize{1000}
+
+% reset the current fonts
+\textfonts
+\rm
+} % end of 11pt text font size definitions
+
+
+% Definitions to make the main text be 10pt Computer Modern, with
+% section, chapter, etc., sizes following suit.  This is for the GNU
+% Press printing of the Emacs 22 manual.  Maybe other manuals in the
+% future.  Used with @smallbook, which sets the leading to 12pt.
+% 
+\def\definetextfontsizex{%
+% Text fonts (10pt).
+\def\textnominalsize{10pt}
+\edef\mainmagstep{1000}
+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
+\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
+\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+\def\textecsize{1000}
+
+% A few fonts for @defun names and args.
+\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
+\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
+\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+
+% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}{OT1}
+\setfont\smalltt\ttshape{9}{1000}{OT1TT}
+\setfont\smallbf\bfshape{10}{900}{OT1}
+\setfont\smallit\itshape{9}{1000}{OT1IT}
+\setfont\smallsl\slshape{9}{1000}{OT1}
+\setfont\smallsf\sfshape{9}{1000}{OT1}
+\setfont\smallsc\scshape{10}{900}{OT1}
+\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+\def\smallecsize{0900}
+
+% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}{OT1}
+\setfont\smallertt\ttshape{8}{1000}{OT1TT}
+\setfont\smallerbf\bfshape{10}{800}{OT1}
+\setfont\smallerit\itshape{8}{1000}{OT1IT}
+\setfont\smallersl\slshape{8}{1000}{OT1}
+\setfont\smallersf\sfshape{8}{1000}{OT1}
+\setfont\smallersc\scshape{10}{800}{OT1}
+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+\def\smallerecsize{0800}
+
+% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
+\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\authorrm{\secrm}
+\def\authortt{\sectt}
+\def\titleecsize{2074}
+
+% Chapter fonts (14.4pt).
+\def\chapnominalsize{14pt}
+\setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
+\setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
+\setfont\chapsl\slbshape{10}{\magstep2}{OT1}
+\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
+\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
+\setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
+\let\chapbf\chaprm
+\setfont\chapsc\scbshape{10}{\magstep2}{OT1}
+\font\chapi=cmmi12 scaled \magstep1
+\font\chapsy=cmsy10 scaled \magstep2
+\def\chapecsize{1440}
+
+% Section fonts (12pt).
+\def\secnominalsize{12pt}
+\setfont\secrm\rmbshape{12}{1000}{OT1}
+\setfont\secit\itbshape{10}{\magstep1}{OT1IT}
+\setfont\secsl\slbshape{10}{\magstep1}{OT1}
+\setfont\sectt\ttbshape{12}{1000}{OT1TT}
+\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
+\setfont\secsf\sfbshape{12}{1000}{OT1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep1}{OT1}
+\font\seci=cmmi12 
+\font\secsy=cmsy10 scaled \magstep1
+\def\sececsize{1200}
+
+% Subsection fonts (10pt).
+\def\ssecnominalsize{10pt}
+\setfont\ssecrm\rmbshape{10}{1000}{OT1}
+\setfont\ssecit\itbshape{10}{1000}{OT1IT}
+\setfont\ssecsl\slbshape{10}{1000}{OT1}
+\setfont\ssectt\ttbshape{10}{1000}{OT1TT}
+\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
+\setfont\ssecsf\sfbshape{10}{1000}{OT1}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{1000}{OT1}
+\font\sseci=cmmi10
+\font\ssecsy=cmsy10
+\def\ssececsize{1000}
+
+% Reduced fonts for @acro in text (9pt).
+\def\reducednominalsize{9pt}
+\setfont\reducedrm\rmshape{9}{1000}{OT1}
+\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
+\setfont\reducedbf\bfshape{10}{900}{OT1}
+\setfont\reducedit\itshape{9}{1000}{OT1IT}
+\setfont\reducedsl\slshape{9}{1000}{OT1}
+\setfont\reducedsf\sfshape{9}{1000}{OT1}
+\setfont\reducedsc\scshape{10}{900}{OT1}
+\setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
+\font\reducedi=cmmi9
+\font\reducedsy=cmsy9
+\def\reducedecsize{0900}
+
+% reduce space between paragraphs
+\divide\parskip by 2
+
+% reset the current fonts
+\textfonts
+\rm
+} % end of 10pt text font size definitions
+
+
+% We provide the user-level command
+%   @fonttextsize 10
+% (or 11) to redefine the text font size.  pt is assumed.
+% 
+\def\xword{10}
+\def\xiword{11}
+%
+\parseargdef\fonttextsize{%
+  \def\textsizearg{#1}%
+  \wlog{doing @fonttextsize \textsizearg}%
+  %
+  % Set \globaldefs so that documents can use this inside @tex, since
+  % makeinfo 4.8 does not support it, but we need it nonetheless.
+  % 
+ \begingroup \globaldefs=1
+  \ifx\textsizearg\xword \definetextfontsizex
+  \else \ifx\textsizearg\xiword \definetextfontsizexi
+  \else
+    \errhelp=\EMsimple
+    \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
+  \fi\fi
+ \endgroup
+}
+
+
+% In order for the font changes to affect most math symbols and letters,
+% we have to define the \textfont of the standard families.  Since
+% texinfo doesn't allow for producing subscripts and superscripts except
+% in the main text, we don't bother to reset \scriptfont and
+% \scriptscriptfont (which would also require loading a lot more fonts).
+%
+\def\resetmathfonts{%
+  \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
+  \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
+  \textfont\ttfam=\tentt \textfont\sffam=\tensf
+}
+
+% The font-changing commands redefine the meanings of \tenSTYLE, instead
+% of just \STYLE.  We do this because \STYLE needs to also set the
+% current \fam for math mode.  Our \STYLE (e.g., \rm) commands hardwire
+% \tenSTYLE to set the current font.
+%
+% Each font-changing command also sets the names \lsize (one size lower)
+% and \lllsize (three sizes lower).  These relative commands are used in
+% the LaTeX logo and acronyms.
+%
+% This all needs generalizing, badly.
+%
+\def\textfonts{%
+  \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
+  \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
+  \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
+  \let\tenttsl=\textttsl
+  \def\curfontsize{text}%
+  \def\lsize{reduced}\def\lllsize{smaller}%
+  \resetmathfonts \setleading{\textleading}}
+\def\titlefonts{%
+  \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
+  \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
+  \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
+  \let\tenttsl=\titlettsl
+  \def\curfontsize{title}%
+  \def\lsize{chap}\def\lllsize{subsec}%
+  \resetmathfonts \setleading{25pt}}
+\def\titlefont#1{{\titlefonts\rm #1}}
+\def\chapfonts{%
+  \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
+  \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
+  \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
+  \let\tenttsl=\chapttsl
+  \def\curfontsize{chap}%
+  \def\lsize{sec}\def\lllsize{text}%
+  \resetmathfonts \setleading{19pt}}
+\def\secfonts{%
+  \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
+  \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
+  \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
+  \let\tenttsl=\secttsl
+  \def\curfontsize{sec}%
+  \def\lsize{subsec}\def\lllsize{reduced}%
+  \resetmathfonts \setleading{16pt}}
+\def\subsecfonts{%
+  \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
+  \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
+  \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
+  \let\tenttsl=\ssecttsl
+  \def\curfontsize{ssec}%
+  \def\lsize{text}\def\lllsize{small}%
+  \resetmathfonts \setleading{15pt}}
+\let\subsubsecfonts = \subsecfonts
+\def\reducedfonts{%
+  \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
+  \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
+  \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
+  \let\tenttsl=\reducedttsl
+  \def\curfontsize{reduced}%
+  \def\lsize{small}\def\lllsize{smaller}%
+  \resetmathfonts \setleading{10.5pt}}
+\def\smallfonts{%
+  \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
+  \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
+  \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
+  \let\tenttsl=\smallttsl
+  \def\curfontsize{small}%
+  \def\lsize{smaller}\def\lllsize{smaller}%
+  \resetmathfonts \setleading{10.5pt}}
+\def\smallerfonts{%
+  \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
+  \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
+  \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
+  \let\tenttsl=\smallerttsl
+  \def\curfontsize{smaller}%
+  \def\lsize{smaller}\def\lllsize{smaller}%
+  \resetmathfonts \setleading{9.5pt}}
+
+% Set the fonts to use with the @small... environments.
+\let\smallexamplefonts = \smallfonts
+
+% About \smallexamplefonts.  If we use \smallfonts (9pt), @smallexample
+% can fit this many characters:
+%   8.5x11=86   smallbook=72  a4=90  a5=69
+% If we use \scriptfonts (8pt), then we can fit this many characters:
+%   8.5x11=90+  smallbook=80  a4=90+  a5=77
+% For me, subjectively, the few extra characters that fit aren't worth
+% the additional smallness of 8pt.  So I'm making the default 9pt.
+%
+% By the way, for comparison, here's what fits with @example (10pt):
+%   8.5x11=71  smallbook=60  a4=75  a5=58
+%
+% I wish the USA used A4 paper.
+% --karl, 24jan03.
+
+
+% Set up the default fonts, so we can use them for creating boxes.
+%
+\definetextfontsizexi
+
+% Define these so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
+% Count depth in font-changes, for error checks
+\newcount\fontdepth \fontdepth=0
+
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
+%% Add scribe-like font environments, plus @l for inline lisp (usually sans
+%% serif) and @ii for TeX italic
+
+% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
+% unless the following character is such as not to need one.
+\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
+                    \ptexslash\fi\fi\fi}
+\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
+\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
+
+% like \smartslanted except unconditionally uses \ttsl.
+% @var is set to this for defun arguments.
+\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
+
+% like \smartslanted except unconditionally use \sl.  We never want
+% ttsl for book titles, do we?
+\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
+
+\let\i=\smartitalic
+\let\slanted=\smartslanted
+\let\var=\smartslanted
+\let\dfn=\smartslanted
+\let\emph=\smartitalic
+
+% @b, explicit bold.
+\def\b#1{{\bf #1}}
+\let\strong=\b
+
+% @sansserif, explicit sans.
+\def\sansserif#1{{\sf #1}}
+
+% We can't just use \exhyphenpenalty, because that only has effect at
+% the end of a paragraph.  Restore normal hyphenation at the end of the
+% group within which \nohyphenation is presumably called.
+%
+\def\nohyphenation{\hyphenchar\font = -1  \aftergroup\restorehyphenation}
+\def\restorehyphenation{\hyphenchar\font = `- }
+
+% Set sfcode to normal for the chars that usually have another value.
+% Can't use plain's \frenchspacing because it uses the `\x notation, and
+% sometimes \x has an active definition that messes things up.
+%
+\catcode`@=11
+  \def\plainfrenchspacing{%
+    \sfcode\dotChar  =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
+    \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+    \def\endofsentencespacefactor{1000}% for @. and friends
+  }
+  \def\plainnonfrenchspacing{%
+    \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+    \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+    \def\endofsentencespacefactor{3000}% for @. and friends
+  }
+\catcode`@=\other
+\def\endofsentencespacefactor{3000}% default
+
+\def\t#1{%
+  {\tt \rawbackslash \plainfrenchspacing #1}%
+  \null
+}
+\def\samp#1{`\tclose{#1}'\null}
+\setfont\keyrm\rmshape{8}{1000}{OT1}
+\font\keysy=cmsy9
+\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+    \vbox{\hrule\kern-0.4pt
+     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+    \kern-0.4pt\hrule}%
+  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+\def\key #1{{\nohyphenation \uppercase{#1}}\null}
+% The old definition, with no lozenge:
+%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+% @file, @option are the same as @samp.
+\let\file=\samp
+\let\option=\samp
+
+% @code is a modification of @t,
+% which makes spaces the same size as normal in the surrounding text.
+\def\tclose#1{%
+  {%
+    % Change normal interword space to be same as for the current font.
+    \spaceskip = \fontdimen2\font
+    %
+    % Switch to typewriter.
+    \tt
+    %
+    % But `\ ' produces the large typewriter interword space.
+    \def\ {{\spaceskip = 0pt{} }}%
+    %
+    % Turn off hyphenation.
+    \nohyphenation
+    %
+    \rawbackslash
+    \plainfrenchspacing
+    #1%
+  }%
+  \null
+}
+
+% We *must* turn on hyphenation at `-' and `_' in @code.
+% Otherwise, it is too hard to avoid overfull hboxes
+% in the Emacs manual, the Library manual, etc.
+
+% Unfortunately, TeX uses one parameter (\hyphenchar) to control
+% both hyphenation at - and hyphenation within words.
+% We must therefore turn them both off (\tclose does that)
+% and arrange explicitly to hyphenate at a dash.
+%  -- rms.
+{
+  \catcode`\-=\active \catcode`\_=\active
+  \catcode`\'=\active \catcode`\`=\active
+  %
+  \global\def\code{\begingroup
+    \catcode\rquoteChar=\active \catcode\lquoteChar=\active
+    \let'\codequoteright \let`\codequoteleft
+    %
+    \catcode\dashChar=\active  \catcode\underChar=\active
+    \ifallowcodebreaks
+     \let-\codedash
+     \let_\codeunder
+    \else
+     \let-\realdash
+     \let_\realunder
+    \fi
+    \codex
+  }
+}
+
+\def\realdash{-}
+\def\codedash{-\discretionary{}{}{}}
+\def\codeunder{%
+  % this is all so @math{@code{var_name}+1} can work.  In math mode, _
+  % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
+  % will therefore expand the active definition of _, which is us
+  % (inside @code that is), therefore an endless loop.
+  \ifusingtt{\ifmmode
+               \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
+             \else\normalunderscore \fi
+             \discretionary{}{}{}}%
+            {\_}%
+}
+\def\codex #1{\tclose{#1}\endgroup}
+
+% An additional complication: the above will allow breaks after, e.g.,
+% each of the four underscores in __typeof__.  This is undesirable in
+% some manuals, especially if they don't have long identifiers in
+% general.  @allowcodebreaks provides a way to control this.
+% 
+\newif\ifallowcodebreaks  \allowcodebreakstrue
+
+\def\keywordtrue{true}
+\def\keywordfalse{false}
+
+\parseargdef\allowcodebreaks{%
+  \def\txiarg{#1}%
+  \ifx\txiarg\keywordtrue
+    \allowcodebreakstrue
+  \else\ifx\txiarg\keywordfalse
+    \allowcodebreaksfalse
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+  \fi\fi
+}
+
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+
+% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
+%   `example' (@kbd uses ttsl only inside of @example and friends),
+%   or `code' (@kbd uses normal tty font always).
+\parseargdef\kbdinputstyle{%
+  \def\txiarg{#1}%
+  \ifx\txiarg\worddistinct
+    \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
+  \else\ifx\txiarg\wordexample
+    \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
+  \else\ifx\txiarg\wordcode
+    \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
+  \fi\fi\fi
+}
+\def\worddistinct{distinct}
+\def\wordexample{example}
+\def\wordcode{code}
+
+% Default is `distinct.'
+\kbdinputstyle distinct
+
+\def\xkey{\key}
+\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
+\ifx\one\xkey\ifx\threex\three \key{#2}%
+\else{\tclose{\kbdfont\look}}\fi
+\else{\tclose{\kbdfont\look}}\fi}
+
+% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
+\let\indicateurl=\code
+\let\env=\code
+\let\command=\code
+
+% @uref (abbreviation for `urlref') takes an optional (comma-separated)
+% second argument specifying the text to display and an optional third
+% arg as text to display instead of (rather than in addition to) the url
+% itself.  First (mandatory) arg is the url.  Perhaps eventually put in
+% a hypertex \special here.
+%
+\def\uref#1{\douref #1,,,\finish}
+\def\douref#1,#2,#3,#4\finish{\begingroup
+  \unsepspaces
+  \pdfurl{#1}%
+  \setbox0 = \hbox{\ignorespaces #3}%
+  \ifdim\wd0 > 0pt
+    \unhbox0 % third arg given, show only that
+  \else
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0 > 0pt
+      \ifpdf
+        \unhbox0             % PDF: 2nd arg given, show only it
+      \else
+        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+      \fi
+    \else
+      \code{#1}% only url given, so show it
+    \fi
+  \fi
+  \endlink
+\endgroup}
+
+% @url synonym for @uref, since that's how everyone uses it.
+%
+\let\url=\uref
+
+% rms does not like angle brackets --karl, 17may97.
+% So now @email is just like @uref, unless we are pdf.
+%
+%\def\email#1{\angleleft{\tt #1}\angleright}
+\ifpdf
+  \def\email#1{\doemail#1,,\finish}
+  \def\doemail#1,#2,#3\finish{\begingroup
+    \unsepspaces
+    \pdfurl{mailto:#1}%
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+    \endlink
+  \endgroup}
+\else
+  \let\email=\uref
+\fi
+
+% Check if we are currently using a typewriter font.  Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
+% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
+%
+\def\dmn#1{\thinspace #1}
+
+\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
+
+% @l was never documented to mean ``switch to the Lisp font'',
+% and it is not used as such in any manual I can find.  We need it for
+% Polish suppressed-l.  --karl, 22sep96.
+%\def\l#1{{\li #1}\null}
+
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}}              % roman font
+\def\sc#1{{\smallcaps#1}}       % smallcaps font
+\def\ii#1{{\it #1}}             % italic font
+
+% @acronym for "FBI", "NATO", and the like.
+% We print this one point size smaller, since it's intended for
+% all-uppercase.
+% 
+\def\acronym#1{\doacronym #1,,\finish}
+\def\doacronym#1,#2,#3\finish{%
+  {\selectfonts\lsize #1}%
+  \def\temp{#2}%
+  \ifx\temp\empty \else
+    \space ({\unsepspaces \ignorespaces \temp \unskip})%
+  \fi
+}
+
+% @abbr for "Comput. J." and the like.
+% No font change, but don't do end-of-sentence spacing.
+% 
+\def\abbr#1{\doabbr #1,,\finish}
+\def\doabbr#1,#2,#3\finish{%
+  {\plainfrenchspacing #1}%
+  \def\temp{#2}%
+  \ifx\temp\empty \else
+    \space ({\unsepspaces \ignorespaces \temp \unskip})%
+  \fi
+}
+
+% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
+%
+\def\pounds{{\it\$}}
+
+% @euro{} comes from a separate font, depending on the current style.
+% We use the free feym* fonts from the eurosym package by Henrik
+% Theiling, which support regular, slanted, bold and bold slanted (and
+% "outlined" (blackboard board, sort of) versions, which we don't need).
+% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
+% 
+% Although only regular is the truly official Euro symbol, we ignore
+% that.  The Euro is designed to be slightly taller than the regular
+% font height.
+% 
+% feymr - regular
+% feymo - slanted
+% feybr - bold
+% feybo - bold slanted
+% 
+% There is no good (free) typewriter version, to my knowledge.
+% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
+% Hmm.
+% 
+% Also doesn't work in math.  Do we need to do math with euro symbols?
+% Hope not.
+% 
+% 
+\def\euro{{\eurofont e}}
+\def\eurofont{%
+  % We set the font at each command, rather than predefining it in
+  % \textfonts and the other font-switching commands, so that
+  % installations which never need the symbol don't have to have the
+  % font installed.
+  % 
+  % There is only one designed size (nominal 10pt), so we always scale
+  % that to the current nominal size.
+  % 
+  % By the way, simply using "at 1em" works for cmr10 and the like, but
+  % does not work for cmbx10 and other extended/shrunken fonts.
+  % 
+  \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
+  %
+  \ifx\curfontstyle\bfstylename 
+    % bold:
+    \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
+  \else 
+    % regular:
+    \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
+  \fi
+  \thiseurofont
+}
+
+% Hacks for glyphs from the EC fonts similar to \euro.  We don't
+% use \let for the aliases, because sometimes we redefine the original
+% macro, and the alias should reflect the redefinition.
+\def\guillemetleft{{\ecfont \char"13}}
+\def\guillemotleft{\guillemetleft}
+\def\guillemetright{{\ecfont \char"14}}
+\def\guillemotright{\guillemetright}
+\def\guilsinglleft{{\ecfont \char"0E}}
+\def\guilsinglright{{\ecfont \char"0F}}
+\def\quotedblbase{{\ecfont \char"12}}
+\def\quotesinglbase{{\ecfont \char"0D}}
+%
+\def\ecfont{%
+  % We can't distinguish serif/sanserif and italic/slanted, but this
+  % is used for crude hacks anyway (like adding French and German
+  % quotes to documents typeset with CM, where we lose kerning), so
+  % hopefully nobody will notice/care.
+  \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
+  \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
+  \ifx\curfontstyle\bfstylename
+    % bold:
+    \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+  \else
+    % regular:
+    \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+  \fi
+  \thisecfont
+}
+
+% @registeredsymbol - R in a circle.  The font for the R should really
+% be smaller yet, but lllsize is the best we can do for now.
+% Adapted from the plain.tex definition of \copyright.
+%
+\def\registeredsymbol{%
+  $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
+               \hfil\crcr\Orb}}%
+    }$%
+}
+
+% @textdegree - the normal degrees sign.
+%
+\def\textdegree{$^\circ$}
+
+% Laurent Siebenmann reports \Orb undefined with:
+%  Textures 1.7.7 (preloaded format=plain 93.10.14)  (68K)  16 APR 2004 02:38
+% so we'll define it if necessary.
+% 
+\ifx\Orb\undefined
+\def\Orb{\mathhexbox20D}
+\fi
+
+% Quotes.
+\chardef\quotedblleft="5C
+\chardef\quotedblright=`\"
+\chardef\quoteleft=`\`
+\chardef\quoteright=`\'
+
+
+\message{page headings,}
+
+\newskip\titlepagetopglue \titlepagetopglue = 1.5in
+\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
+
+% First the title page.  Must do @settitle before @titlepage.
+\newif\ifseenauthor
+\newif\iffinishedtitlepage
+
+% Do an implicit @contents or @shortcontents after @end titlepage if the
+% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
+%
+\newif\ifsetcontentsaftertitlepage
+ \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
+\newif\ifsetshortcontentsaftertitlepage
+ \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
+
+\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+        \endgroup\page\hbox{}\page}
+
+\envdef\titlepage{%
+  % Open one extra group, as we want to close it in the middle of \Etitlepage.
+  \begingroup
+    \parindent=0pt \textfonts
+    % Leave some space at the very top of the page.
+    \vglue\titlepagetopglue
+    % No rule at page bottom unless we print one at the top with @title.
+    \finishedtitlepagetrue
+    %
+    % Most title ``pages'' are actually two pages long, with space
+    % at the top of the second.  We don't want the ragged left on the second.
+    \let\oldpage = \page
+    \def\page{%
+      \iffinishedtitlepage\else
+        \finishtitlepage
+      \fi
+      \let\page = \oldpage
+      \page
+      \null
+    }%
+}
+
+\def\Etitlepage{%
+    \iffinishedtitlepage\else
+       \finishtitlepage
+    \fi
+    % It is important to do the page break before ending the group,
+    % because the headline and footline are only empty inside the group.
+    % If we use the new definition of \page, we always get a blank page
+    % after the title page, which we certainly don't want.
+    \oldpage
+  \endgroup
+  %
+  % Need this before the \...aftertitlepage checks so that if they are
+  % in effect the toc pages will come out with page numbers.
+  \HEADINGSon
+  %
+  % If they want short, they certainly want long too.
+  \ifsetshortcontentsaftertitlepage
+    \shortcontents
+    \contents
+    \global\let\shortcontents = \relax
+    \global\let\contents = \relax
+  \fi
+  %
+  \ifsetcontentsaftertitlepage
+    \contents
+    \global\let\contents = \relax
+    \global\let\shortcontents = \relax
+  \fi
+}
+
+\def\finishtitlepage{%
+  \vskip4pt \hrule height 2pt width \hsize
+  \vskip\titlepagebottomglue
+  \finishedtitlepagetrue
+}
+
+%%% Macros to be used within @titlepage:
+
+\let\subtitlerm=\tenrm
+\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
+
+\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
+               \let\tt=\authortt}
+
+\parseargdef\title{%
+  \checkenv\titlepage
+  \leftline{\titlefonts\rm #1}
+  % print a rule at the page bottom also.
+  \finishedtitlepagefalse
+  \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+}
+
+\parseargdef\subtitle{%
+  \checkenv\titlepage
+  {\subtitlefont \rightline{#1}}%
+}
+
+% @author should come last, but may come many times.
+% It can also be used inside @quotation.
+%
+\parseargdef\author{%
+  \def\temp{\quotation}%
+  \ifx\thisenv\temp
+    \def\quotationauthor{#1}% printed in \Equotation.
+  \else
+    \checkenv\titlepage
+    \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
+    {\authorfont \leftline{#1}}%
+  \fi
+}
+
+
+%%% Set up page headings and footings.
+
+\let\thispage=\folio
+
+\newtoks\evenheadline    % headline on even pages
+\newtoks\oddheadline     % headline on odd pages
+\newtoks\evenfootline    % footline on even pages
+\newtoks\oddfootline     % footline on odd pages
+
+% Now make TeX use those variables
+\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
+                            \else \the\evenheadline \fi}}
+\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
+                            \else \the\evenfootline \fi}\HEADINGShook}
+\let\HEADINGShook=\relax
+
+% Commands to set those variables.
+% For example, this is what  @headings on  does
+% @evenheading @thistitle|@thispage|@thischapter
+% @oddheading @thischapter|@thispage|@thistitle
+% @evenfooting @thisfile||
+% @oddfooting ||@thisfile
+
+
+\def\evenheading{\parsearg\evenheadingxxx}
+\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
+\def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\def\oddheading{\parsearg\oddheadingxxx}
+\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
+\def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
+
+\def\evenfooting{\parsearg\evenfootingxxx}
+\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
+\def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\def\oddfooting{\parsearg\oddfootingxxx}
+\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
+\def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
+  \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
+  %
+  % Leave some space for the footline.  Hopefully ok to assume
+  % @evenfooting will not be used by itself.
+  \global\advance\pageheight by -12pt
+  \global\advance\vsize by -12pt
+}
+
+\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
+
+% @evenheadingmarks top     \thischapter <- chapter at the top of a page
+% @evenheadingmarks bottom  \thischapter <- chapter at the bottom of a page
+%
+% The same set of arguments for:
+%
+% @oddheadingmarks
+% @evenfootingmarks
+% @oddfootingmarks
+% @everyheadingmarks
+% @everyfootingmarks
+
+\def\evenheadingmarks{\headingmarks{even}{heading}}
+\def\oddheadingmarks{\headingmarks{odd}{heading}}
+\def\evenfootingmarks{\headingmarks{even}{footing}}
+\def\oddfootingmarks{\headingmarks{odd}{footing}}
+\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
+                          \headingmarks{odd}{heading}{#1} }
+\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
+                          \headingmarks{odd}{footing}{#1} }
+% #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
+\def\headingmarks#1#2#3 {%
+  \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
+  \global\expandafter\let\csname get#1#2marks\endcsname \temp
+}
+
+\everyheadingmarks bottom
+\everyfootingmarks bottom
+
+% @headings double      turns headings on for double-sided printing.
+% @headings single      turns headings on for single-sided printing.
+% @headings off         turns them off.
+% @headings on          same as @headings double, retained for compatibility.
+% @headings after       turns on double-sided headings after this page.
+% @headings doubleafter turns on double-sided headings after this page.
+% @headings singleafter turns on single-sided headings after this page.
+% By default, they are off at the start of a document,
+% and turned `on' after @end titlepage.
+
+\def\headings #1 {\csname HEADINGS#1\endcsname}
+
+\def\HEADINGSoff{%
+\global\evenheadline={\hfil} \global\evenfootline={\hfil}
+\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
+\HEADINGSoff
+% When we turn headings on, set the page number to 1.
+% For double-sided printing, put current file name in lower left corner,
+% chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSdouble{%
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+\let\contentsalignmacro = \chappager
+
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingle{%
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+\def\HEADINGSon{\HEADINGSdouble}
+
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+\let\HEADINGSdoubleafter=\HEADINGSafter
+\def\HEADINGSdoublex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
+\def\HEADINGSsinglex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+
+% Subroutines used in generating headings
+% This produces Day Month Year style of output.
+% Only define if not already defined, in case a txi-??.tex file has set
+% up a different format (e.g., txi-cs.tex does this).
+\ifx\today\undefined
+\def\today{%
+  \number\day\space
+  \ifcase\month
+  \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
+  \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
+  \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
+  \fi
+  \space\number\year}
+\fi
+
+% @settitle line...  specifies the title of the document, for headings.
+% It generates no output of its own.
+\def\thistitle{\putwordNoTitle}
+\def\settitle{\parsearg{\gdef\thistitle}}
+
+
+\message{tables,}
+% Tables -- @table, @ftable, @vtable, @item(x).
+
+% default indentation of table text
+\newdimen\tableindent \tableindent=.8in
+% default indentation of @itemize and @enumerate text
+\newdimen\itemindent  \itemindent=.3in
+% margin between end of table item and start of table text.
+\newdimen\itemmargin  \itemmargin=.1in
+
+% used internally for \itemindent minus \itemmargin
+\newdimen\itemmax
+
+% Note @table, @ftable, and @vtable define @item, @itemx, etc., with
+% these defs.
+% They also define \itemindex
+% to index the item name in whatever manner is desired (perhaps none).
+
+\newif\ifitemxneedsnegativevskip
+
+\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
+
+\def\internalBitem{\smallbreak \parsearg\itemzzz}
+\def\internalBitemx{\itemxpar \parsearg\itemzzz}
+
+\def\itemzzz #1{\begingroup %
+  \advance\hsize by -\rightskip
+  \advance\hsize by -\tableindent
+  \setbox0=\hbox{\itemindicate{#1}}%
+  \itemindex{#1}%
+  \nobreak % This prevents a break before @itemx.
+  %
+  % If the item text does not fit in the space we have, put it on a line
+  % by itself, and do not allow a page break either before or after that
+  % line.  We do not start a paragraph here because then if the next
+  % command is, e.g., @kindex, the whatsit would get put into the
+  % horizontal list on a line by itself, resulting in extra blank space.
+  \ifdim \wd0>\itemmax
+    %
+    % Make this a paragraph so we get the \parskip glue and wrapping,
+    % but leave it ragged-right.
+    \begingroup
+      \advance\leftskip by-\tableindent
+      \advance\hsize by\tableindent
+      \advance\rightskip by0pt plus1fil
+      \leavevmode\unhbox0\par
+    \endgroup
+    %
+    % We're going to be starting a paragraph, but we don't want the
+    % \parskip glue -- logically it's part of the @item we just started.
+    \nobreak \vskip-\parskip
+    %
+    % Stop a page break at the \parskip glue coming up.  However, if
+    % what follows is an environment such as @example, there will be no
+    % \parskip glue; then the negative vskip we just inserted would
+    % cause the example and the item to crash together.  So we use this
+    % bizarre value of 10001 as a signal to \aboveenvbreak to insert
+    % \parskip glue after all.  Section titles are handled this way also.
+    % 
+    \penalty 10001
+    \endgroup
+    \itemxneedsnegativevskipfalse
+  \else
+    % The item text fits into the space.  Start a paragraph, so that the
+    % following text (if any) will end up on the same line.
+    \noindent
+    % Do this with kerns and \unhbox so that if there is a footnote in
+    % the item text, it can migrate to the main vertical list and
+    % eventually be printed.
+    \nobreak\kern-\tableindent
+    \dimen0 = \itemmax  \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
+    \unhbox0
+    \nobreak\kern\dimen0
+    \endgroup
+    \itemxneedsnegativevskiptrue
+  \fi
+}
+
+\def\item{\errmessage{@item while not in a list environment}}
+\def\itemx{\errmessage{@itemx while not in a list environment}}
+
+% @table, @ftable, @vtable.
+\envdef\table{%
+  \let\itemindex\gobble
+  \tablecheck{table}%
+}
+\envdef\ftable{%
+  \def\itemindex ##1{\doind {fn}{\code{##1}}}%
+  \tablecheck{ftable}%
+}
+\envdef\vtable{%
+  \def\itemindex ##1{\doind {vr}{\code{##1}}}%
+  \tablecheck{vtable}%
+}
+\def\tablecheck#1{%
+  \ifnum \the\catcode`\^^M=\active
+    \endgroup
+    \errmessage{This command won't work in this context; perhaps the problem is
+      that we are \inenvironment\thisenv}%
+    \def\next{\doignore{#1}}%
+  \else
+    \let\next\tablex
+  \fi
+  \next
+}
+\def\tablex#1{%
+  \def\itemindicate{#1}%
+  \parsearg\tabley
+}
+\def\tabley#1{%
+  {%
+    \makevalueexpandable
+    \edef\temp{\noexpand\tablez #1\space\space\space}%
+    \expandafter
+  }\temp \endtablez
+}
+\def\tablez #1 #2 #3 #4\endtablez{%
+  \aboveenvbreak
+  \ifnum 0#1>0 \advance \leftskip by #1\mil \fi
+  \ifnum 0#2>0 \tableindent=#2\mil \fi
+  \ifnum 0#3>0 \advance \rightskip by #3\mil \fi
+  \itemmax=\tableindent
+  \advance \itemmax by -\itemmargin
+  \advance \leftskip by \tableindent
+  \exdentamount=\tableindent
+  \parindent = 0pt
+  \parskip = \smallskipamount
+  \ifdim \parskip=0pt \parskip=2pt \fi
+  \let\item = \internalBitem
+  \let\itemx = \internalBitemx
+}
+\def\Etable{\endgraf\afterenvbreak}
+\let\Eftable\Etable
+\let\Evtable\Etable
+\let\Eitemize\Etable
+\let\Eenumerate\Etable
+
+% This is the counter used by @enumerate, which is really @itemize
+
+\newcount \itemno
+
+\envdef\itemize{\parsearg\doitemize}
+
+\def\doitemize#1{%
+  \aboveenvbreak
+  \itemmax=\itemindent
+  \advance\itemmax by -\itemmargin
+  \advance\leftskip by \itemindent
+  \exdentamount=\itemindent
+  \parindent=0pt
+  \parskip=\smallskipamount
+  \ifdim\parskip=0pt \parskip=2pt \fi
+  \def\itemcontents{#1}%
+  % @itemize with no arg is equivalent to @itemize @bullet.
+  \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+  \let\item=\itemizeitem
+}
+
+% Definition of @item while inside @itemize and @enumerate.
+%
+\def\itemizeitem{%
+  \advance\itemno by 1  % for enumerations
+  {\let\par=\endgraf \smallbreak}% reasonable place to break
+  {%
+   % If the document has an @itemize directly after a section title, a
+   % \nobreak will be last on the list, and \sectionheading will have
+   % done a \vskip-\parskip.  In that case, we don't want to zero
+   % parskip, or the item text will crash with the heading.  On the
+   % other hand, when there is normal text preceding the item (as there
+   % usually is), we do want to zero parskip, or there would be too much
+   % space.  In that case, we won't have a \nobreak before.  At least
+   % that's the theory.
+   \ifnum\lastpenalty<10000 \parskip=0in \fi
+   \noindent
+   \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
+   \vadjust{\penalty 1200}}% not good to break after first line of item.
+  \flushcr
+}
+
+% \splitoff TOKENS\endmark defines \first to be the first token in
+% TOKENS, and \rest to be the remainder.
+%
+\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
+
+% Allow an optional argument of an uppercase letter, lowercase letter,
+% or number, to specify the first label in the enumerated list.  No
+% argument is the same as `1'.
+%
+\envparseargdef\enumerate{\enumeratey #1  \endenumeratey}
+\def\enumeratey #1 #2\endenumeratey{%
+  % If we were given no argument, pretend we were given `1'.
+  \def\thearg{#1}%
+  \ifx\thearg\empty \def\thearg{1}\fi
+  %
+  % Detect if the argument is a single token.  If so, it might be a
+  % letter.  Otherwise, the only valid thing it can be is a number.
+  % (We will always have one token, because of the test we just made.
+  % This is a good thing, since \splitoff doesn't work given nothing at
+  % all -- the first parameter is undelimited.)
+  \expandafter\splitoff\thearg\endmark
+  \ifx\rest\empty
+    % Only one token in the argument.  It could still be anything.
+    % A ``lowercase letter'' is one whose \lccode is nonzero.
+    % An ``uppercase letter'' is one whose \lccode is both nonzero, and
+    %   not equal to itself.
+    % Otherwise, we assume it's a number.
+    %
+    % We need the \relax at the end of the \ifnum lines to stop TeX from
+    % continuing to look for a <number>.
+    %
+    \ifnum\lccode\expandafter`\thearg=0\relax
+      \numericenumerate % a number (we hope)
+    \else
+      % It's a letter.
+      \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
+        \lowercaseenumerate % lowercase letter
+      \else
+        \uppercaseenumerate % uppercase letter
+      \fi
+    \fi
+  \else
+    % Multiple tokens in the argument.  We hope it's a number.
+    \numericenumerate
+  \fi
+}
+
+% An @enumerate whose labels are integers.  The starting integer is
+% given in \thearg.
+%
+\def\numericenumerate{%
+  \itemno = \thearg
+  \startenumeration{\the\itemno}%
+}
+
+% The starting (lowercase) letter is in \thearg.
+\def\lowercaseenumerate{%
+  \itemno = \expandafter`\thearg
+  \startenumeration{%
+    % Be sure we're not beyond the end of the alphabet.
+    \ifnum\itemno=0
+      \errmessage{No more lowercase letters in @enumerate; get a bigger
+                  alphabet}%
+    \fi
+    \char\lccode\itemno
+  }%
+}
+
+% The starting (uppercase) letter is in \thearg.
+\def\uppercaseenumerate{%
+  \itemno = \expandafter`\thearg
+  \startenumeration{%
+    % Be sure we're not beyond the end of the alphabet.
+    \ifnum\itemno=0
+      \errmessage{No more uppercase letters in @enumerate; get a bigger
+                  alphabet}
+    \fi
+    \char\uccode\itemno
+  }%
+}
+
+% Call \doitemize, adding a period to the first argument and supplying the
+% common last two arguments.  Also subtract one from the initial value in
+% \itemno, since @item increments \itemno.
+%
+\def\startenumeration#1{%
+  \advance\itemno by -1
+  \doitemize{#1.}\flushcr
+}
+
+% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
+% to @enumerate.
+%
+\def\alphaenumerate{\enumerate{a}}
+\def\capsenumerate{\enumerate{A}}
+\def\Ealphaenumerate{\Eenumerate}
+\def\Ecapsenumerate{\Eenumerate}
+
+
+% @multitable macros
+% Amy Hendrickson, 8/18/94, 3/6/96
+%
+% @multitable ... @end multitable will make as many columns as desired.
+% Contents of each column will wrap at width given in preamble.  Width
+% can be specified either with sample text given in a template line,
+% or in percent of \hsize, the current width of text on page.
+
+% Table can continue over pages but will only break between lines.
+
+% To make preamble:
+%
+% Either define widths of columns in terms of percent of \hsize:
+%   @multitable @columnfractions .25 .3 .45
+%   @item ...
+%
+%   Numbers following @columnfractions are the percent of the total
+%   current hsize to be used for each column. You may use as many
+%   columns as desired.
+
+
+% Or use a template:
+%   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+%   @item ...
+%   using the widest term desired in each column.
+
+% Each new table line starts with @item, each subsequent new column
+% starts with @tab. Empty columns may be produced by supplying @tab's
+% with nothing between them for as many times as empty columns are needed,
+% ie, @tab@tab@tab will produce two empty columns.
+
+% @item, @tab do not need to be on their own lines, but it will not hurt
+% if they are.
+
+% Sample multitable:
+
+%   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+%   @item first col stuff @tab second col stuff @tab third col
+%   @item
+%   first col stuff
+%   @tab
+%   second col stuff
+%   @tab
+%   third col
+%   @item first col stuff @tab second col stuff
+%   @tab Many paragraphs of text may be used in any column.
+%
+%         They will wrap at the width determined by the template.
+%   @item@tab@tab This will be in third column.
+%   @end multitable
+
+% Default dimensions may be reset by user.
+% @multitableparskip is vertical space between paragraphs in table.
+% @multitableparindent is paragraph indent in table.
+% @multitablecolmargin is horizontal space to be left between columns.
+% @multitablelinespace is space to leave between table items, baseline
+%                                                            to baseline.
+%   0pt means it depends on current normal line spacing.
+%
+\newskip\multitableparskip
+\newskip\multitableparindent
+\newdimen\multitablecolspace
+\newskip\multitablelinespace
+\multitableparskip=0pt
+\multitableparindent=6pt
+\multitablecolspace=12pt
+\multitablelinespace=0pt
+
+% Macros used to set up halign preamble:
+%
+\let\endsetuptable\relax
+\def\xendsetuptable{\endsetuptable}
+\let\columnfractions\relax
+\def\xcolumnfractions{\columnfractions}
+\newif\ifsetpercent
+
+% #1 is the @columnfraction, usually a decimal number like .5, but might
+% be just 1.  We just use it, whatever it is.
+%
+\def\pickupwholefraction#1 {%
+  \global\advance\colcount by 1
+  \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
+  \setuptable
+}
+
+\newcount\colcount
+\def\setuptable#1{%
+  \def\firstarg{#1}%
+  \ifx\firstarg\xendsetuptable
+    \let\go = \relax
+  \else
+    \ifx\firstarg\xcolumnfractions
+      \global\setpercenttrue
+    \else
+      \ifsetpercent
+         \let\go\pickupwholefraction
+      \else
+         \global\advance\colcount by 1
+         \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
+                   % separator; typically that is always in the input, anyway.
+         \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
+      \fi
+    \fi
+    \ifx\go\pickupwholefraction
+      % Put the argument back for the \pickupwholefraction call, so
+      % we'll always have a period there to be parsed.
+      \def\go{\pickupwholefraction#1}%
+    \else
+      \let\go = \setuptable
+    \fi%
+  \fi
+  \go
+}
+
+% multitable-only commands.
+%
+% @headitem starts a heading row, which we typeset in bold.
+% Assignments have to be global since we are inside the implicit group
+% of an alignment entry.  Note that \everycr resets \everytab.
+\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}%
+%
+% A \tab used to include \hskip1sp.  But then the space in a template
+% line is not enough.  That is bad.  So let's go back to just `&' until
+% we encounter the problem it was intended to solve again.
+%                                      --karl, nathan@acm.org, 20apr99.
+\def\tab{\checkenv\multitable &\the\everytab}%
+
+% @multitable ... @end multitable definitions:
+%
+\newtoks\everytab  % insert after every tab.
+%
+\envdef\multitable{%
+  \vskip\parskip
+  \startsavinginserts
+  %
+  % @item within a multitable starts a normal row.
+  % We use \def instead of \let so that if one of the multitable entries
+  % contains an @itemize, we don't choke on the \item (seen as \crcr aka
+  % \endtemplate) expanding \doitemize.
+  \def\item{\crcr}%
+  %
+  \tolerance=9500
+  \hbadness=9500
+  \setmultitablespacing
+  \parskip=\multitableparskip
+  \parindent=\multitableparindent
+  \overfullrule=0pt
+  \global\colcount=0
+  %
+  \everycr = {%
+    \noalign{%
+      \global\everytab={}%
+      \global\colcount=0 % Reset the column counter.
+      % Check for saved footnotes, etc.
+      \checkinserts
+      % Keeps underfull box messages off when table breaks over pages.
+      %\filbreak
+       % Maybe so, but it also creates really weird page breaks when the
+       % table breaks over pages. Wouldn't \vfil be better?  Wait until the
+       % problem manifests itself, so it can be fixed for real --karl.
+    }%
+  }%
+  %
+  \parsearg\domultitable
+}
+\def\domultitable#1{%
+  % To parse everything between @multitable and @item:
+  \setuptable#1 \endsetuptable
+  %
+  % This preamble sets up a generic column definition, which will
+  % be used as many times as user calls for columns.
+  % \vtop will set a single line and will also let text wrap and
+  % continue for many paragraphs if desired.
+  \halign\bgroup &%
+    \global\advance\colcount by 1
+    \multistrut
+    \vtop{%
+      % Use the current \colcount to find the correct column width:
+      \hsize=\expandafter\csname col\the\colcount\endcsname
+      %
+      % In order to keep entries from bumping into each other
+      % we will add a \leftskip of \multitablecolspace to all columns after
+      % the first one.
+      %
+      % If a template has been used, we will add \multitablecolspace
+      % to the width of each template entry.
+      %
+      % If the user has set preamble in terms of percent of \hsize we will
+      % use that dimension as the width of the column, and the \leftskip
+      % will keep entries from bumping into each other.  Table will start at
+      % left margin and final column will justify at right margin.
+      %
+      % Make sure we don't inherit \rightskip from the outer environment.
+      \rightskip=0pt
+      \ifnum\colcount=1
+       % The first column will be indented with the surrounding text.
+       \advance\hsize by\leftskip
+      \else
+       \ifsetpercent \else
+         % If user has not set preamble in terms of percent of \hsize
+         % we will advance \hsize by \multitablecolspace.
+         \advance\hsize by \multitablecolspace
+       \fi
+       % In either case we will make \leftskip=\multitablecolspace:
+      \leftskip=\multitablecolspace
+      \fi
+      % Ignoring space at the beginning and end avoids an occasional spurious
+      % blank line, when TeX decides to break the line at the space before the
+      % box from the multistrut, so the strut ends up on a line by itself.
+      % For example:
+      % @multitable @columnfractions .11 .89
+      % @item @code{#}
+      % @tab Legal holiday which is valid in major parts of the whole country.
+      % Is automatically provided with highlighting sequences respectively
+      % marking characters.
+      \noindent\ignorespaces##\unskip\multistrut
+    }\cr
+}
+\def\Emultitable{%
+  \crcr
+  \egroup % end the \halign
+  \global\setpercentfalse
+}
+
+\def\setmultitablespacing{%
+  \def\multistrut{\strut}% just use the standard line spacing
+  %
+  % Compute \multitablelinespace (if not defined by user) for use in
+  % \multitableparskip calculation.  We used define \multistrut based on
+  % this, but (ironically) that caused the spacing to be off.
+  % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
+\ifdim\multitablelinespace=0pt
+\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
+\global\advance\multitablelinespace by-\ht0
+\fi
+%% Test to see if parskip is larger than space between lines of
+%% table. If not, do nothing.
+%%        If so, set to same dimension as multitablelinespace.
+\ifdim\multitableparskip>\multitablelinespace
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+                                      %% than skip between lines in the table.
+\fi%
+\ifdim\multitableparskip=0pt
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+                                      %% than skip between lines in the table.
+\fi}
+
+
+\message{conditionals,}
+
+% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
+% @ifnotxml always succeed.  They currently do nothing; we don't
+% attempt to check whether the conditionals are properly nested.  But we
+% have to remember that they are conditionals, so that @end doesn't
+% attempt to close an environment group.
+%
+\def\makecond#1{%
+  \expandafter\let\csname #1\endcsname = \relax
+  \expandafter\let\csname iscond.#1\endcsname = 1
+}
+\makecond{iftex}
+\makecond{ifnotdocbook}
+\makecond{ifnothtml}
+\makecond{ifnotinfo}
+\makecond{ifnotplaintext}
+\makecond{ifnotxml}
+
+% Ignore @ignore, @ifhtml, @ifinfo, and the like.
+%
+\def\direntry{\doignore{direntry}}
+\def\documentdescription{\doignore{documentdescription}}
+\def\docbook{\doignore{docbook}}
+\def\html{\doignore{html}}
+\def\ifdocbook{\doignore{ifdocbook}}
+\def\ifhtml{\doignore{ifhtml}}
+\def\ifinfo{\doignore{ifinfo}}
+\def\ifnottex{\doignore{ifnottex}}
+\def\ifplaintext{\doignore{ifplaintext}}
+\def\ifxml{\doignore{ifxml}}
+\def\ignore{\doignore{ignore}}
+\def\menu{\doignore{menu}}
+\def\xml{\doignore{xml}}
+
+% Ignore text until a line `@end #1', keeping track of nested conditionals.
+%
+% A count to remember the depth of nesting.
+\newcount\doignorecount
+
+\def\doignore#1{\begingroup
+  % Scan in ``verbatim'' mode:
+  \obeylines
+  \catcode`\@ = \other
+  \catcode`\{ = \other
+  \catcode`\} = \other
+  %
+  % Make sure that spaces turn into tokens that match what \doignoretext wants.
+  \spaceisspace
+  %
+  % Count number of #1's that we've seen.
+  \doignorecount = 0
+  %
+  % Swallow text until we reach the matching `@end #1'.
+  \dodoignore{#1}%
+}
+
+{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
+  \obeylines %
+  %
+  \gdef\dodoignore#1{%
+    % #1 contains the command name as a string, e.g., `ifinfo'.
+    %
+    % Define a command to find the next `@end #1'.
+    \long\def\doignoretext##1^^M@end #1{%
+      \doignoretextyyy##1^^M@#1\_STOP_}%
+    %
+    % And this command to find another #1 command, at the beginning of a
+    % line.  (Otherwise, we would consider a line `@c @ifset', for
+    % example, to count as an @ifset for nesting.)
+    \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
+    %
+    % And now expand that command.
+    \doignoretext ^^M%
+  }%
+}
+
+\def\doignoreyyy#1{%
+  \def\temp{#1}%
+  \ifx\temp\empty                      % Nothing found.
+    \let\next\doignoretextzzz
+  \else                                        % Found a nested condition, ...
+    \advance\doignorecount by 1
+    \let\next\doignoretextyyy          % ..., look for another.
+    % If we're here, #1 ends with ^^M\ifinfo (for example).
+  \fi
+  \next #1% the token \_STOP_ is present just after this macro.
+}
+
+% We have to swallow the remaining "\_STOP_".
+%
+\def\doignoretextzzz#1{%
+  \ifnum\doignorecount = 0     % We have just found the outermost @end.
+    \let\next\enddoignore
+  \else                                % Still inside a nested condition.
+    \advance\doignorecount by -1
+    \let\next\doignoretext      % Look for the next @end.
+  \fi
+  \next
+}
+
+% Finish off ignored text.
+{ \obeylines%
+  % Ignore anything after the last `@end #1'; this matters in verbatim
+  % environments, where otherwise the newline after an ignored conditional
+  % would result in a blank line in the output.
+  \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
+}
+
+
+% @set VAR sets the variable VAR to an empty value.
+% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
+%
+% Since we want to separate VAR from REST-OF-LINE (which might be
+% empty), we can't just use \parsearg; we have to insert a space of our
+% own to delimit the rest of the line, and then take it out again if we
+% didn't need it.
+% We rely on the fact that \parsearg sets \catcode`\ =10.
+%
+\parseargdef\set{\setyyy#1 \endsetyyy}
+\def\setyyy#1 #2\endsetyyy{%
+  {%
+    \makevalueexpandable
+    \def\temp{#2}%
+    \edef\next{\gdef\makecsname{SET#1}}%
+    \ifx\temp\empty
+      \next{}%
+    \else
+      \setzzz#2\endsetzzz
+    \fi
+  }%
+}
+% Remove the trailing space \setxxx inserted.
+\def\setzzz#1 \endsetzzz{\next{#1}}
+
+% @clear VAR clears (i.e., unsets) the variable VAR.
+%
+\parseargdef\clear{%
+  {%
+    \makevalueexpandable
+    \global\expandafter\let\csname SET#1\endcsname=\relax
+  }%
+}
+
+% @value{foo} gets the text saved in variable foo.
+\def\value{\begingroup\makevalueexpandable\valuexxx}
+\def\valuexxx#1{\expandablevalue{#1}\endgroup}
+{
+  \catcode`\- = \active \catcode`\_ = \active
+  %
+  \gdef\makevalueexpandable{%
+    \let\value = \expandablevalue
+    % We don't want these characters active, ...
+    \catcode`\-=\other \catcode`\_=\other
+    % ..., but we might end up with active ones in the argument if
+    % we're called from @code, as @code{@value{foo-bar_}}, though.
+    % So \let them to their normal equivalents.
+    \let-\realdash \let_\normalunderscore
+  }
+}
+
+% We have this subroutine so that we can handle at least some @value's
+% properly in indexes (we call \makevalueexpandable in \indexdummies).
+% The command has to be fully expandable (if the variable is set), since
+% the result winds up in the index file.  This means that if the
+% variable's value contains other Texinfo commands, it's almost certain
+% it will fail (although perhaps we could fix that with sufficient work
+% to do a one-level expansion on the result, instead of complete).
+%
+\def\expandablevalue#1{%
+  \expandafter\ifx\csname SET#1\endcsname\relax
+    {[No value for ``#1'']}%
+    \message{Variable `#1', used in @value, is not set.}%
+  \else
+    \csname SET#1\endcsname
+  \fi
+}
+
+% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
+% with @set.
+%
+% To get special treatment of `@end ifset,' call \makeond and the redefine.
+%
+\makecond{ifset}
+\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
+\def\doifset#1#2{%
+  {%
+    \makevalueexpandable
+    \let\next=\empty
+    \expandafter\ifx\csname SET#2\endcsname\relax
+      #1% If not set, redefine \next.
+    \fi
+    \expandafter
+  }\next
+}
+\def\ifsetfail{\doignore{ifset}}
+
+% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% defined with @set, or has been undefined with @clear.
+%
+% The `\else' inside the `\doifset' parameter is a trick to reuse the
+% above code: if the variable is not set, do nothing, if it is set,
+% then redefine \next to \ifclearfail.
+%
+\makecond{ifclear}
+\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
+\def\ifclearfail{\doignore{ifclear}}
+
+% @dircategory CATEGORY  -- specify a category of the dir file
+% which this file should belong to.  Ignore this in TeX.
+\let\dircategory=\comment
+
+% @defininfoenclose.
+\let\definfoenclose=\comment
+
+
+\message{indexing,}
+% Index generation facilities
+
+% Define \newwrite to be identical to plain tex's \newwrite
+% except not \outer, so it can be used within macros and \if's.
+\edef\newwrite{\makecsname{ptexnewwrite}}
+
+% \newindex {foo} defines an index named foo.
+% It automatically defines \fooindex such that
+% \fooindex ...rest of line... puts an entry in the index foo.
+% It also defines \fooindfile to be the number of the output channel for
+% the file that accumulates this index.  The file's extension is foo.
+% The name of an index should be no more than 2 characters long
+% for the sake of vms.
+%
+\def\newindex#1{%
+  \iflinks
+    \expandafter\newwrite \csname#1indfile\endcsname
+    \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+  \fi
+  \expandafter\xdef\csname#1index\endcsname{%     % Define @#1index
+    \noexpand\doindex{#1}}
+}
+
+% @defindex foo  ==  \newindex{foo}
+%
+\def\defindex{\parsearg\newindex}
+
+% Define @defcodeindex, like @defindex except put all entries in @code.
+%
+\def\defcodeindex{\parsearg\newcodeindex}
+%
+\def\newcodeindex#1{%
+  \iflinks
+    \expandafter\newwrite \csname#1indfile\endcsname
+    \openout \csname#1indfile\endcsname \jobname.#1
+  \fi
+  \expandafter\xdef\csname#1index\endcsname{%
+    \noexpand\docodeindex{#1}}%
+}
+
+
+% @synindex foo bar    makes index foo feed into index bar.
+% Do this instead of @defindex foo if you don't want it as a separate index.
+%
+% @syncodeindex foo bar   similar, but put all entries made for index foo
+% inside @code.
+%
+\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
+\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
+
+% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
+% #3 the target index (bar).
+\def\dosynindex#1#2#3{%
+  % Only do \closeout if we haven't already done it, else we'll end up
+  % closing the target index.
+  \expandafter \ifx\csname donesynindex#2\endcsname \undefined
+    % The \closeout helps reduce unnecessary open files; the limit on the
+    % Acorn RISC OS is a mere 16 files.
+    \expandafter\closeout\csname#2indfile\endcsname
+    \expandafter\let\csname\donesynindex#2\endcsname = 1
+  \fi
+  % redefine \fooindfile:
+  \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
+  \expandafter\let\csname#2indfile\endcsname=\temp
+  % redefine \fooindex:
+  \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
+}
+
+% Define \doindex, the driver for all \fooindex macros.
+% Argument #1 is generated by the calling \fooindex macro,
+%  and it is "foo", the name of the index.
+
+% \doindex just uses \parsearg; it calls \doind for the actual work.
+% This is because \doind is more useful to call from other macros.
+
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+
+\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
+\def\singleindexer #1{\doind{\indexname}{#1}}
+
+% like the previous two, but they put @code around the argument.
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
+\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+
+% Take care of Texinfo commands that can appear in an index entry.
+% Since there are some commands we want to expand, and others we don't,
+% we have to laboriously prevent expansion for those that we don't.
+%
+\def\indexdummies{%
+  \escapechar = `\\     % use backslash in output files.
+  \def\@{@}% change to @@ when we switch to @ as escape char in index files.
+  \def\ {\realbackslash\space }%
+  %
+  % Need these in case \tex is in effect and \{ is a \delimiter again.
+  % But can't use \lbracecmd and \rbracecmd because texindex assumes
+  % braces and backslashes are used only as delimiters.
+  \let\{ = \mylbrace
+  \let\} = \myrbrace
+  %
+  % I don't entirely understand this, but when an index entry is
+  % generated from a macro call, the \endinput which \scanmacro inserts
+  % causes processing to be prematurely terminated.  This is,
+  % apparently, because \indexsorttmp is fully expanded, and \endinput
+  % is an expandable command.  The redefinition below makes \endinput
+  % disappear altogether for that purpose -- although logging shows that
+  % processing continues to some further point.  On the other hand, it
+  % seems \endinput does not hurt in the printed index arg, since that
+  % is still getting written without apparent harm.
+  % 
+  % Sample source (mac-idx3.tex, reported by Graham Percival to
+  % help-texinfo, 22may06):
+  % @macro funindex {WORD}
+  % @findex xyz
+  % @end macro
+  % ...
+  % @funindex commtest
+  % 
+  % The above is not enough to reproduce the bug, but it gives the flavor.
+  % 
+  % Sample whatsit resulting:
+  % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
+  % 
+  % So:
+  \let\endinput = \empty
+  %
+  % Do the redefinitions.
+  \commondummies
+}
+
+% For the aux and toc files, @ is the escape character.  So we want to
+% redefine everything using @ as the escape character (instead of
+% \realbackslash, still used for index files).  When everything uses @,
+% this will be simpler.
+%
+\def\atdummies{%
+  \def\@{@@}%
+  \def\ {@ }%
+  \let\{ = \lbraceatcmd
+  \let\} = \rbraceatcmd
+  %
+  % Do the redefinitions.
+  \commondummies
+  \otherbackslash
+}
+
+% Called from \indexdummies and \atdummies.
+%
+\def\commondummies{%
+  %
+  % \definedummyword defines \#1 as \string\#1\space, thus effectively
+  % preventing its expansion.  This is used only for control% words,
+  % not control letters, because the \space would be incorrect for
+  % control characters, but is needed to separate the control word
+  % from whatever follows.
+  %
+  % For control letters, we have \definedummyletter, which omits the
+  % space.
+  %
+  % These can be used both for control words that take an argument and
+  % those that do not.  If it is followed by {arg} in the input, then
+  % that will dutifully get written to the index (or wherever).
+  %
+  \def\definedummyword  ##1{\def##1{\string##1\space}}%
+  \def\definedummyletter##1{\def##1{\string##1}}%
+  \let\definedummyaccent\definedummyletter
+  %
+  \commondummiesnofonts
+  %
+  \definedummyletter\_%
+  %
+  % Non-English letters.
+  \definedummyword\AA
+  \definedummyword\AE
+  \definedummyword\L
+  \definedummyword\OE
+  \definedummyword\O
+  \definedummyword\aa
+  \definedummyword\ae
+  \definedummyword\l
+  \definedummyword\oe
+  \definedummyword\o
+  \definedummyword\ss
+  \definedummyword\exclamdown
+  \definedummyword\questiondown
+  \definedummyword\ordf
+  \definedummyword\ordm
+  %
+  % Although these internal commands shouldn't show up, sometimes they do.
+  \definedummyword\bf
+  \definedummyword\gtr
+  \definedummyword\hat
+  \definedummyword\less
+  \definedummyword\sf
+  \definedummyword\sl
+  \definedummyword\tclose
+  \definedummyword\tt
+  %
+  \definedummyword\LaTeX
+  \definedummyword\TeX
+  %
+  % Assorted special characters.
+  \definedummyword\bullet
+  \definedummyword\comma
+  \definedummyword\copyright
+  \definedummyword\registeredsymbol
+  \definedummyword\dots
+  \definedummyword\enddots
+  \definedummyword\equiv
+  \definedummyword\error
+  \definedummyword\euro
+  \definedummyword\guillemetleft
+  \definedummyword\guillemetright
+  \definedummyword\guilsinglleft
+  \definedummyword\guilsinglright
+  \definedummyword\expansion
+  \definedummyword\minus
+  \definedummyword\pounds
+  \definedummyword\point
+  \definedummyword\print
+  \definedummyword\quotedblbase
+  \definedummyword\quotedblleft
+  \definedummyword\quotedblright
+  \definedummyword\quoteleft
+  \definedummyword\quoteright
+  \definedummyword\quotesinglbase
+  \definedummyword\result
+  \definedummyword\textdegree
+  %
+  % We want to disable all macros so that they are not expanded by \write.
+  \macrolist
+  %
+  \normalturnoffactive
+  %
+  % Handle some cases of @value -- where it does not contain any
+  % (non-fully-expandable) commands.
+  \makevalueexpandable
+}
+
+% \commondummiesnofonts: common to \commondummies and \indexnofonts.
+%
+\def\commondummiesnofonts{%
+  % Control letters and accents.
+  \definedummyletter\!%
+  \definedummyaccent\"%
+  \definedummyaccent\'%
+  \definedummyletter\*%
+  \definedummyaccent\,%
+  \definedummyletter\.%
+  \definedummyletter\/%
+  \definedummyletter\:%
+  \definedummyaccent\=%
+  \definedummyletter\?%
+  \definedummyaccent\^%
+  \definedummyaccent\`%
+  \definedummyaccent\~%
+  \definedummyword\u
+  \definedummyword\v
+  \definedummyword\H
+  \definedummyword\dotaccent
+  \definedummyword\ringaccent
+  \definedummyword\tieaccent
+  \definedummyword\ubaraccent
+  \definedummyword\udotaccent
+  \definedummyword\dotless
+  %
+  % Texinfo font commands.
+  \definedummyword\b
+  \definedummyword\i
+  \definedummyword\r
+  \definedummyword\sc
+  \definedummyword\t
+  %
+  % Commands that take arguments.
+  \definedummyword\acronym
+  \definedummyword\cite
+  \definedummyword\code
+  \definedummyword\command
+  \definedummyword\dfn
+  \definedummyword\emph
+  \definedummyword\env
+  \definedummyword\file
+  \definedummyword\kbd
+  \definedummyword\key
+  \definedummyword\math
+  \definedummyword\option
+  \definedummyword\pxref
+  \definedummyword\ref
+  \definedummyword\samp
+  \definedummyword\strong
+  \definedummyword\tie
+  \definedummyword\uref
+  \definedummyword\url
+  \definedummyword\var
+  \definedummyword\verb
+  \definedummyword\w
+  \definedummyword\xref
+}
+
+% \indexnofonts is used when outputting the strings to sort the index
+% by, and when constructing control sequence names.  It eliminates all
+% control sequences and just writes whatever the best ASCII sort string
+% would be for a given command (usually its argument).
+%
+\def\indexnofonts{%
+  % Accent commands should become @asis.
+  \def\definedummyaccent##1{\let##1\asis}%
+  % We can just ignore other control letters.
+  \def\definedummyletter##1{\let##1\empty}%
+  % Hopefully, all control words can become @asis.
+  \let\definedummyword\definedummyaccent
+  %
+  \commondummiesnofonts
+  %
+  % Don't no-op \tt, since it isn't a user-level command
+  % and is used in the definitions of the active chars like <, >, |, etc.
+  % Likewise with the other plain tex font commands.
+  %\let\tt=\asis
+  %
+  \def\ { }%
+  \def\@{@}%
+  % how to handle braces?
+  \def\_{\normalunderscore}%
+  %
+  % Non-English letters.
+  \def\AA{AA}%
+  \def\AE{AE}%
+  \def\L{L}%
+  \def\OE{OE}%
+  \def\O{O}%
+  \def\aa{aa}%
+  \def\ae{ae}%
+  \def\l{l}%
+  \def\oe{oe}%
+  \def\o{o}%
+  \def\ss{ss}%
+  \def\exclamdown{!}%
+  \def\questiondown{?}%
+  \def\ordf{a}%
+  \def\ordm{o}%
+  %
+  \def\LaTeX{LaTeX}%
+  \def\TeX{TeX}%
+  %
+  % Assorted special characters.
+  % (The following {} will end up in the sort string, but that's ok.)
+  \def\bullet{bullet}%
+  \def\comma{,}%
+  \def\copyright{copyright}%
+  \def\registeredsymbol{R}%
+  \def\dots{...}%
+  \def\enddots{...}%
+  \def\equiv{==}%
+  \def\error{error}%
+  \def\euro{euro}%
+  \def\guillemetleft{<<}%
+  \def\guillemetright{>>}%
+  \def\guilsinglleft{<}%
+  \def\guilsinglright{>}%
+  \def\expansion{==>}%
+  \def\minus{-}%
+  \def\pounds{pounds}%
+  \def\point{.}%
+  \def\print{-|}%
+  \def\quotedblbase{"}%
+  \def\quotedblleft{"}%
+  \def\quotedblright{"}%
+  \def\quoteleft{`}%
+  \def\quoteright{'}%
+  \def\quotesinglbase{,}%
+  \def\result{=>}%
+  \def\textdegree{degrees}%
+  %
+  % We need to get rid of all macros, leaving only the arguments (if present).
+  % Of course this is not nearly correct, but it is the best we can do for now.
+  % makeinfo does not expand macros in the argument to @deffn, which ends up
+  % writing an index entry, and texindex isn't prepared for an index sort entry
+  % that starts with \.
+  % 
+  % Since macro invocations are followed by braces, we can just redefine them
+  % to take a single TeX argument.  The case of a macro invocation that
+  % goes to end-of-line is not handled.
+  % 
+  \macrolist
+}
+
+\let\indexbackslash=0  %overridden during \printindex.
+\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
+
+% Most index entries go through here, but \dosubind is the general case.
+% #1 is the index name, #2 is the entry text.
+\def\doind#1#2{\dosubind{#1}{#2}{}}
+
+% Workhorse for all \fooindexes.
+% #1 is name of index, #2 is stuff to put there, #3 is subentry --
+% empty if called from \doind, as we usually are (the main exception
+% is with most defuns, which call us directly).
+%
+\def\dosubind#1#2#3{%
+  \iflinks
+  {%
+    % Store the main index entry text (including the third arg).
+    \toks0 = {#2}%
+    % If third arg is present, precede it with a space.
+    \def\thirdarg{#3}%
+    \ifx\thirdarg\empty \else
+      \toks0 = \expandafter{\the\toks0 \space #3}%
+    \fi
+    %
+    \edef\writeto{\csname#1indfile\endcsname}%
+    %
+    \safewhatsit\dosubindwrite
+  }%
+  \fi
+}
+
+% Write the entry in \toks0 to the index file:
+%
+\def\dosubindwrite{%
+  % Put the index entry in the margin if desired.
+  \ifx\SETmarginindex\relax\else
+    \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
+  \fi
+  %
+  % Remember, we are within a group.
+  \indexdummies % Must do this here, since \bf, etc expand at this stage
+  \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
+      % so it will be output as is; and it will print as backslash.
+  %
+  % Process the index entry with all font commands turned off, to
+  % get the string to sort by.
+  {\indexnofonts
+   \edef\temp{\the\toks0}% need full expansion
+   \xdef\indexsorttmp{\temp}%
+  }%
+  %
+  % Set up the complete index entry, with both the sort key and
+  % the original text, including any font commands.  We write
+  % three arguments to \entry to the .?? file (four in the
+  % subentry case), texindex reduces to two when writing the .??s
+  % sorted result.
+  \edef\temp{%
+    \write\writeto{%
+      \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
+  }%
+  \temp
+}
+
+% Take care of unwanted page breaks/skips around a whatsit:
+%
+% If a skip is the last thing on the list now, preserve it
+% by backing up by \lastskip, doing the \write, then inserting
+% the skip again.  Otherwise, the whatsit generated by the
+% \write or \pdfdest will make \lastskip zero.  The result is that
+% sequences like this:
+% @end defun
+% @tindex whatever
+% @defun ...
+% will have extra space inserted, because the \medbreak in the
+% start of the @defun won't see the skip inserted by the @end of
+% the previous defun.
+%
+% But don't do any of this if we're not in vertical mode.  We
+% don't want to do a \vskip and prematurely end a paragraph.
+%
+% Avoid page breaks due to these extra skips, too.
+%
+% But wait, there is a catch there:
+% We'll have to check whether \lastskip is zero skip.  \ifdim is not
+% sufficient for this purpose, as it ignores stretch and shrink parts
+% of the skip.  The only way seems to be to check the textual
+% representation of the skip.
+%
+% The following is almost like \def\zeroskipmacro{0.0pt} except that
+% the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
+%
+\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
+%
+\newskip\whatsitskip
+\newcount\whatsitpenalty
+%
+% ..., ready, GO:
+%
+\def\safewhatsit#1{%
+\ifhmode
+  #1%
+\else
+  % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
+  \whatsitskip = \lastskip
+  \edef\lastskipmacro{\the\lastskip}%
+  \whatsitpenalty = \lastpenalty
+  %
+  % If \lastskip is nonzero, that means the last item was a
+  % skip.  And since a skip is discardable, that means this
+  % -\whatsitskip glue we're inserting is preceded by a
+  % non-discardable item, therefore it is not a potential
+  % breakpoint, therefore no \nobreak needed.
+  \ifx\lastskipmacro\zeroskipmacro
+  \else
+    \vskip-\whatsitskip
+  \fi
+  %
+  #1%
+  %
+  \ifx\lastskipmacro\zeroskipmacro
+    % If \lastskip was zero, perhaps the last item was a penalty, and
+    % perhaps it was >=10000, e.g., a \nobreak.  In that case, we want
+    % to re-insert the same penalty (values >10000 are used for various
+    % signals); since we just inserted a non-discardable item, any
+    % following glue (such as a \parskip) would be a breakpoint.  For example:
+    % 
+    %   @deffn deffn-whatever
+    %   @vindex index-whatever
+    %   Description.
+    % would allow a break between the index-whatever whatsit
+    % and the "Description." paragraph.
+    \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
+  \else
+    % On the other hand, if we had a nonzero \lastskip,
+    % this make-up glue would be preceded by a non-discardable item
+    % (the whatsit from the \write), so we must insert a \nobreak.
+    \nobreak\vskip\whatsitskip
+  \fi
+\fi
+}
+
+% The index entry written in the file actually looks like
+%  \entry {sortstring}{page}{topic}
+% or
+%  \entry {sortstring}{page}{topic}{subtopic}
+% The texindex program reads in these files and writes files
+% containing these kinds of lines:
+%  \initial {c}
+%     before the first topic whose initial is c
+%  \entry {topic}{pagelist}
+%     for a topic that is used without subtopics
+%  \primary {topic}
+%     for the beginning of a topic that is used with subtopics
+%  \secondary {subtopic}{pagelist}
+%     for each subtopic.
+
+% Define the user-accessible indexing commands
+% @findex, @vindex, @kindex, @cindex.
+
+\def\findex {\fnindex}
+\def\kindex {\kyindex}
+\def\cindex {\cpindex}
+\def\vindex {\vrindex}
+\def\tindex {\tpindex}
+\def\pindex {\pgindex}
+
+\def\cindexsub {\begingroup\obeylines\cindexsub}
+{\obeylines %
+\gdef\cindexsub "#1" #2^^M{\endgroup %
+\dosubind{cp}{#2}{#1}}}
+
+% Define the macros used in formatting output of the sorted index material.
+
+% @printindex causes a particular index (the ??s file) to get printed.
+% It does not print any chapter heading (usually an @unnumbered).
+%
+\parseargdef\printindex{\begingroup
+  \dobreak \chapheadingskip{10000}%
+  %
+  \smallfonts \rm
+  \tolerance = 9500
+  \plainfrenchspacing
+  \everypar = {}% don't want the \kern\-parindent from indentation suppression.
+  %
+  % See if the index file exists and is nonempty.
+  % Change catcode of @ here so that if the index file contains
+  % \initial {@}
+  % as its first line, TeX doesn't complain about mismatched braces
+  % (because it thinks @} is a control sequence).
+  \catcode`\@ = 11
+  \openin 1 \jobname.#1s
+  \ifeof 1
+    % \enddoublecolumns gets confused if there is no text in the index,
+    % and it loses the chapter title and the aux file entries for the
+    % index.  The easiest way to prevent this problem is to make sure
+    % there is some text.
+    \putwordIndexNonexistent
+  \else
+    %
+    % If the index file exists but is empty, then \openin leaves \ifeof
+    % false.  We have to make TeX try to read something from the file, so
+    % it can discover if there is anything in it.
+    \read 1 to \temp
+    \ifeof 1
+      \putwordIndexIsEmpty
+    \else
+      % Index files are almost Texinfo source, but we use \ as the escape
+      % character.  It would be better to use @, but that's too big a change
+      % to make right now.
+      \def\indexbackslash{\backslashcurfont}%
+      \catcode`\\ = 0
+      \escapechar = `\\
+      \begindoublecolumns
+      \input \jobname.#1s
+      \enddoublecolumns
+    \fi
+  \fi
+  \closein 1
+\endgroup}
+
+% These macros are used by the sorted index file itself.
+% Change them to control the appearance of the index.
+
+\def\initial#1{{%
+  % Some minor font changes for the special characters.
+  \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
+  %
+  % Remove any glue we may have, we'll be inserting our own.
+  \removelastskip
+  %
+  % We like breaks before the index initials, so insert a bonus.
+  \nobreak
+  \vskip 0pt plus 3\baselineskip
+  \penalty 0
+  \vskip 0pt plus -3\baselineskip
+  %
+  % Typeset the initial.  Making this add up to a whole number of
+  % baselineskips increases the chance of the dots lining up from column
+  % to column.  It still won't often be perfect, because of the stretch
+  % we need before each entry, but it's better.
+  %
+  % No shrink because it confuses \balancecolumns.
+  \vskip 1.67\baselineskip plus .5\baselineskip
+  \leftline{\secbf #1}%
+  % Do our best not to break after the initial.
+  \nobreak
+  \vskip .33\baselineskip plus .1\baselineskip
+}}
+
+% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
+% then page number (#2) flushed to the right margin.  It is used for index
+% and table of contents entries.  The paragraph is indented by \leftskip.
+%
+% A straightforward implementation would start like this:
+%      \def\entry#1#2{...
+% But this frozes the catcodes in the argument, and can cause problems to
+% @code, which sets - active.  This problem was fixed by a kludge---
+% ``-'' was active throughout whole index, but this isn't really right.
+%
+% The right solution is to prevent \entry from swallowing the whole text.
+%                                 --kasal, 21nov03
+\def\entry{%
+  \begingroup
+    %
+    % Start a new paragraph if necessary, so our assignments below can't
+    % affect previous text.
+    \par
+    %
+    % Do not fill out the last line with white space.
+    \parfillskip = 0in
+    %
+    % No extra space above this paragraph.
+    \parskip = 0in
+    %
+    % Do not prefer a separate line ending with a hyphen to fewer lines.
+    \finalhyphendemerits = 0
+    %
+    % \hangindent is only relevant when the entry text and page number
+    % don't both fit on one line.  In that case, bob suggests starting the
+    % dots pretty far over on the line.  Unfortunately, a large
+    % indentation looks wrong when the entry text itself is broken across
+    % lines.  So we use a small indentation and put up with long leaders.
+    %
+    % \hangafter is reset to 1 (which is the value we want) at the start
+    % of each paragraph, so we need not do anything with that.
+    \hangindent = 2em
+    %
+    % When the entry text needs to be broken, just fill out the first line
+    % with blank space.
+    \rightskip = 0pt plus1fil
+    %
+    % A bit of stretch before each entry for the benefit of balancing
+    % columns.
+    \vskip 0pt plus1pt
+    %
+    % Swallow the left brace of the text (first parameter):
+    \afterassignment\doentry
+    \let\temp =
+}
+\def\doentry{%
+    \bgroup % Instead of the swallowed brace.
+      \noindent
+      \aftergroup\finishentry
+      % And now comes the text of the entry.
+}
+\def\finishentry#1{%
+    % #1 is the page number.
+    %
+    % The following is kludged to not output a line of dots in the index if
+    % there are no page numbers.  The next person who breaks this will be
+    % cursed by a Unix daemon.
+    \setbox\boxA = \hbox{#1}%
+    \ifdim\wd\boxA = 0pt
+      \ %
+    \else
+      %
+      % If we must, put the page number on a line of its own, and fill out
+      % this line with blank space.  (The \hfil is overwhelmed with the
+      % fill leaders glue in \indexdotfill if the page number does fit.)
+      \hfil\penalty50
+      \null\nobreak\indexdotfill % Have leaders before the page number.
+      %
+      % The `\ ' here is removed by the implicit \unskip that TeX does as
+      % part of (the primitive) \par.  Without it, a spurious underfull
+      % \hbox ensues.
+      \ifpdf
+       \pdfgettoks#1.%
+       \ \the\toksA
+      \else
+       \ #1%
+      \fi
+    \fi
+    \par
+  \endgroup
+}
+
+% Like plain.tex's \dotfill, except uses up at least 1 em.
+\def\indexdotfill{\cleaders
+  \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
+
+\def\primary #1{\line{#1\hfil}}
+
+\newskip\secondaryindent \secondaryindent=0.5cm
+\def\secondary#1#2{{%
+  \parfillskip=0in
+  \parskip=0in
+  \hangindent=1in
+  \hangafter=1
+  \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
+  \ifpdf
+    \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+  \else
+    #2
+  \fi
+  \par
+}}
+
+% Define two-column mode, which we use to typeset indexes.
+% Adapted from the TeXbook, page 416, which is to say,
+% the manmac.tex format used to print the TeXbook itself.
+\catcode`\@=11
+
+\newbox\partialpage
+\newdimen\doublecolumnhsize
+
+\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
+  % Grab any single-column material above us.
+  \output = {%
+    %
+    % Here is a possibility not foreseen in manmac: if we accumulate a
+    % whole lot of material, we might end up calling this \output
+    % routine twice in a row (see the doublecol-lose test, which is
+    % essentially a couple of indexes with @setchapternewpage off).  In
+    % that case we just ship out what is in \partialpage with the normal
+    % output routine.  Generally, \partialpage will be empty when this
+    % runs and this will be a no-op.  See the indexspread.tex test case.
+    \ifvoid\partialpage \else
+      \onepageout{\pagecontents\partialpage}%
+    \fi
+    %
+    \global\setbox\partialpage = \vbox{%
+      % Unvbox the main output page.
+      \unvbox\PAGE
+      \kern-\topskip \kern\baselineskip
+    }%
+  }%
+  \eject % run that output routine to set \partialpage
+  %
+  % Use the double-column output routine for subsequent pages.
+  \output = {\doublecolumnout}%
+  %
+  % Change the page size parameters.  We could do this once outside this
+  % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
+  % format, but then we repeat the same computation.  Repeating a couple
+  % of assignments once per index is clearly meaningless for the
+  % execution time, so we may as well do it in one place.
+  %
+  % First we halve the line length, less a little for the gutter between
+  % the columns.  We compute the gutter based on the line length, so it
+  % changes automatically with the paper format.  The magic constant
+  % below is chosen so that the gutter has the same value (well, +-<1pt)
+  % as it did when we hard-coded it.
+  %
+  % We put the result in a separate register, \doublecolumhsize, so we
+  % can restore it in \pagesofar, after \hsize itself has (potentially)
+  % been clobbered.
+  %
+  \doublecolumnhsize = \hsize
+    \advance\doublecolumnhsize by -.04154\hsize
+    \divide\doublecolumnhsize by 2
+  \hsize = \doublecolumnhsize
+  %
+  % Double the \vsize as well.  (We don't need a separate register here,
+  % since nobody clobbers \vsize.)
+  \vsize = 2\vsize
+}
+
+% The double-column output routine for all double-column pages except
+% the last.
+%
+\def\doublecolumnout{%
+  \splittopskip=\topskip \splitmaxdepth=\maxdepth
+  % Get the available space for the double columns -- the normal
+  % (undoubled) page height minus any material left over from the
+  % previous page.
+  \dimen@ = \vsize
+  \divide\dimen@ by 2
+  \advance\dimen@ by -\ht\partialpage
+  %
+  % box0 will be the left-hand column, box2 the right.
+  \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+  \onepageout\pagesofar
+  \unvbox255
+  \penalty\outputpenalty
+}
+%
+% Re-output the contents of the output page -- any previous material,
+% followed by the two boxes we just split, in box0 and box2.
+\def\pagesofar{%
+  \unvbox\partialpage
+  %
+  \hsize = \doublecolumnhsize
+  \wd0=\hsize \wd2=\hsize
+  \hbox to\pagewidth{\box0\hfil\box2}%
+}
+%
+% All done with double columns.
+\def\enddoublecolumns{%
+  % The following penalty ensures that the page builder is exercised
+  % _before_ we change the output routine.  This is necessary in the
+  % following situation:
+  %
+  % The last section of the index consists only of a single entry.
+  % Before this section, \pagetotal is less than \pagegoal, so no
+  % break occurs before the last section starts.  However, the last
+  % section, consisting of \initial and the single \entry, does not
+  % fit on the page and has to be broken off.  Without the following
+  % penalty the page builder will not be exercised until \eject
+  % below, and by that time we'll already have changed the output
+  % routine to the \balancecolumns version, so the next-to-last
+  % double-column page will be processed with \balancecolumns, which
+  % is wrong:  The two columns will go to the main vertical list, with
+  % the broken-off section in the recent contributions.  As soon as
+  % the output routine finishes, TeX starts reconsidering the page
+  % break.  The two columns and the broken-off section both fit on the
+  % page, because the two columns now take up only half of the page
+  % goal.  When TeX sees \eject from below which follows the final
+  % section, it invokes the new output routine that we've set after
+  % \balancecolumns below; \onepageout will try to fit the two columns
+  % and the final section into the vbox of \pageheight (see
+  % \pagebody), causing an overfull box.
+  %
+  % Note that glue won't work here, because glue does not exercise the
+  % page builder, unlike penalties (see The TeXbook, pp. 280-281).
+  \penalty0
+  %
+  \output = {%
+    % Split the last of the double-column material.  Leave it on the
+    % current page, no automatic page break.
+    \balancecolumns
+    %
+    % If we end up splitting too much material for the current page,
+    % though, there will be another page break right after this \output
+    % invocation ends.  Having called \balancecolumns once, we do not
+    % want to call it again.  Therefore, reset \output to its normal
+    % definition right away.  (We hope \balancecolumns will never be
+    % called on to balance too much material, but if it is, this makes
+    % the output somewhat more palatable.)
+    \global\output = {\onepageout{\pagecontents\PAGE}}%
+  }%
+  \eject
+  \endgroup % started in \begindoublecolumns
+  %
+  % \pagegoal was set to the doubled \vsize above, since we restarted
+  % the current page.  We're now back to normal single-column
+  % typesetting, so reset \pagegoal to the normal \vsize (after the
+  % \endgroup where \vsize got restored).
+  \pagegoal = \vsize
+}
+%
+% Called at the end of the double column material.
+\def\balancecolumns{%
+  \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
+  \dimen@ = \ht0
+  \advance\dimen@ by \topskip
+  \advance\dimen@ by-\baselineskip
+  \divide\dimen@ by 2 % target to split to
+  %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
+  \splittopskip = \topskip
+  % Loop until we get a decent breakpoint.
+  {%
+    \vbadness = 10000
+    \loop
+      \global\setbox3 = \copy0
+      \global\setbox1 = \vsplit3 to \dimen@
+    \ifdim\ht3>\dimen@
+      \global\advance\dimen@ by 1pt
+    \repeat
+  }%
+  %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
+  \setbox0=\vbox to\dimen@{\unvbox1}%
+  \setbox2=\vbox to\dimen@{\unvbox3}%
+  %
+  \pagesofar
+}
+\catcode`\@ = \other
+
+
+\message{sectioning,}
+% Chapters, sections, etc.
+
+% \unnumberedno is an oxymoron, of course.  But we count the unnumbered
+% sections so that we can refer to them unambiguously in the pdf
+% outlines by their "section number".  We avoid collisions with chapter
+% numbers by starting them at 10000.  (If a document ever has 10000
+% chapters, we're in trouble anyway, I'm sure.)
+\newcount\unnumberedno \unnumberedno = 10000
+\newcount\chapno
+\newcount\secno        \secno=0
+\newcount\subsecno     \subsecno=0
+\newcount\subsubsecno  \subsubsecno=0
+
+% This counter is funny since it counts through charcodes of letters A, B, ...
+\newcount\appendixno  \appendixno = `\@
+%
+% \def\appendixletter{\char\the\appendixno}
+% We do the following ugly conditional instead of the above simple
+% construct for the sake of pdftex, which needs the actual
+% letter in the expansion, not just typeset.
+%
+\def\appendixletter{%
+  \ifnum\appendixno=`A A%
+  \else\ifnum\appendixno=`B B%
+  \else\ifnum\appendixno=`C C%
+  \else\ifnum\appendixno=`D D%
+  \else\ifnum\appendixno=`E E%
+  \else\ifnum\appendixno=`F F%
+  \else\ifnum\appendixno=`G G%
+  \else\ifnum\appendixno=`H H%
+  \else\ifnum\appendixno=`I I%
+  \else\ifnum\appendixno=`J J%
+  \else\ifnum\appendixno=`K K%
+  \else\ifnum\appendixno=`L L%
+  \else\ifnum\appendixno=`M M%
+  \else\ifnum\appendixno=`N N%
+  \else\ifnum\appendixno=`O O%
+  \else\ifnum\appendixno=`P P%
+  \else\ifnum\appendixno=`Q Q%
+  \else\ifnum\appendixno=`R R%
+  \else\ifnum\appendixno=`S S%
+  \else\ifnum\appendixno=`T T%
+  \else\ifnum\appendixno=`U U%
+  \else\ifnum\appendixno=`V V%
+  \else\ifnum\appendixno=`W W%
+  \else\ifnum\appendixno=`X X%
+  \else\ifnum\appendixno=`Y Y%
+  \else\ifnum\appendixno=`Z Z%
+  % The \the is necessary, despite appearances, because \appendixletter is
+  % expanded while writing the .toc file.  \char\appendixno is not
+  % expandable, thus it is written literally, thus all appendixes come out
+  % with the same letter (or @) in the toc without it.
+  \else\char\the\appendixno
+  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
+% Each @chapter defines these (using marks) as the number+name, number
+% and name of the chapter.  Page headings and footings can use
+% these.  @section does likewise.
+\def\thischapter{}
+\def\thischapternum{}
+\def\thischaptername{}
+\def\thissection{}
+\def\thissectionnum{}
+\def\thissectionname{}
+
+\newcount\absseclevel % used to calculate proper heading level
+\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
+
+% @raisesections: treat @section as chapter, @subsection as section, etc.
+\def\raisesections{\global\advance\secbase by -1}
+\let\up=\raisesections % original BFox name
+
+% @lowersections: treat @chapter as section, @section as subsection, etc.
+\def\lowersections{\global\advance\secbase by 1}
+\let\down=\lowersections % original BFox name
+
+% we only have subsub.
+\chardef\maxseclevel = 3
+%
+% A numbered section within an unnumbered changes to unnumbered too.
+% To achive this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unmlevel = \maxseclevel
+%
+% Trace whether the current chapter is an appendix or not:
+% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
+\def\chapheadtype{N}
+
+% Choose a heading macro
+% #1 is heading type
+% #2 is heading level
+% #3 is text for heading
+\def\genhead#1#2#3{%
+  % Compute the abs. sec. level:
+  \absseclevel=#2
+  \advance\absseclevel by \secbase
+  % Make sure \absseclevel doesn't fall outside the range:
+  \ifnum \absseclevel < 0
+    \absseclevel = 0
+  \else
+    \ifnum \absseclevel > 3
+      \absseclevel = 3
+    \fi
+  \fi
+  % The heading type:
+  \def\headtype{#1}%
+  \if \headtype U%
+    \ifnum \absseclevel < \unmlevel
+      \chardef\unmlevel = \absseclevel
+    \fi
+  \else
+    % Check for appendix sections:
+    \ifnum \absseclevel = 0
+      \edef\chapheadtype{\headtype}%
+    \else
+      \if \headtype A\if \chapheadtype N%
+       \errmessage{@appendix... within a non-appendix chapter}%
+      \fi\fi
+    \fi
+    % Check for numbered within unnumbered:
+    \ifnum \absseclevel > \unmlevel
+      \def\headtype{U}%
+    \else
+      \chardef\unmlevel = 3
+    \fi
+  \fi
+  % Now print the heading:
+  \if \headtype U%
+    \ifcase\absseclevel
+       \unnumberedzzz{#3}%
+    \or \unnumberedseczzz{#3}%
+    \or \unnumberedsubseczzz{#3}%
+    \or \unnumberedsubsubseczzz{#3}%
+    \fi
+  \else
+    \if \headtype A%
+      \ifcase\absseclevel
+         \appendixzzz{#3}%
+      \or \appendixsectionzzz{#3}%
+      \or \appendixsubseczzz{#3}%
+      \or \appendixsubsubseczzz{#3}%
+      \fi
+    \else
+      \ifcase\absseclevel
+         \chapterzzz{#3}%
+      \or \seczzz{#3}%
+      \or \numberedsubseczzz{#3}%
+      \or \numberedsubsubseczzz{#3}%
+      \fi
+    \fi
+  \fi
+  \suppressfirstparagraphindent
+}
+
+% an interface:
+\def\numhead{\genhead N}
+\def\apphead{\genhead A}
+\def\unnmhead{\genhead U}
+
+% @chapter, @appendix, @unnumbered.  Increment top-level counter, reset
+% all lower-level sectioning counters to zero.
+%
+% Also set \chaplevelprefix, which we prepend to @float sequence numbers
+% (e.g., figures), q.v.  By default (before any chapter), that is empty.
+\let\chaplevelprefix = \empty
+%
+\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
+\def\chapterzzz#1{%
+  % section resetting is \global in case the chapter is in a group, such
+  % as an @include file.
+  \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+    \global\advance\chapno by 1
+  %
+  % Used for \float.
+  \gdef\chaplevelprefix{\the\chapno.}%
+  \resetallfloatnos
+  %
+  \message{\putwordChapter\space \the\chapno}%
+  %
+  % Write the actual heading.
+  \chapmacro{#1}{Ynumbered}{\the\chapno}%
+  %
+  % So @section and the like are numbered underneath this chapter.
+  \global\let\section = \numberedsec
+  \global\let\subsection = \numberedsubsec
+  \global\let\subsubsection = \numberedsubsubsec
+}
+
+\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz
+\def\appendixzzz#1{%
+  \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+    \global\advance\appendixno by 1
+  \gdef\chaplevelprefix{\appendixletter.}%
+  \resetallfloatnos
+  %
+  \def\appendixnum{\putwordAppendix\space \appendixletter}%
+  \message{\appendixnum}%
+  %
+  \chapmacro{#1}{Yappendix}{\appendixletter}%
+  %
+  \global\let\section = \appendixsec
+  \global\let\subsection = \appendixsubsec
+  \global\let\subsubsection = \appendixsubsubsec
+}
+
+\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
+\def\unnumberedzzz#1{%
+  \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+    \global\advance\unnumberedno by 1
+  %
+  % Since an unnumbered has no number, no prefix for figures.
+  \global\let\chaplevelprefix = \empty
+  \resetallfloatnos
+  %
+  % This used to be simply \message{#1}, but TeX fully expands the
+  % argument to \message.  Therefore, if #1 contained @-commands, TeX
+  % expanded them.  For example, in `@unnumbered The @cite{Book}', TeX
+  % expanded @cite (which turns out to cause errors because \cite is meant
+  % to be executed, not expanded).
+  %
+  % Anyway, we don't want the fully-expanded definition of @cite to appear
+  % as a result of the \message, we just want `@cite' itself.  We use
+  % \the<toks register> to achieve this: TeX expands \the<toks> only once,
+  % simply yielding the contents of <toks register>.  (We also do this for
+  % the toc entries.)
+  \toks0 = {#1}%
+  \message{(\the\toks0)}%
+  %
+  \chapmacro{#1}{Ynothing}{\the\unnumberedno}%
+  %
+  \global\let\section = \unnumberedsec
+  \global\let\subsection = \unnumberedsubsec
+  \global\let\subsubsection = \unnumberedsubsubsec
+}
+
+% @centerchap is like @unnumbered, but the heading is centered.
+\outer\parseargdef\centerchap{%
+  % Well, we could do the following in a group, but that would break
+  % an assumption that \chapmacro is called at the outermost level.
+  % Thus we are safer this way:                --kasal, 24feb04
+  \let\centerparametersmaybe = \centerparameters
+  \unnmhead0{#1}%
+  \let\centerparametersmaybe = \relax
+}
+
+% @top is like @unnumbered.
+\let\top\unnumbered
+
+% Sections.
+\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
+\def\seczzz#1{%
+  \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
+  \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
+}
+
+\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
+\def\appendixsectionzzz#1{%
+  \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
+  \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
+}
+\let\appendixsec\appendixsection
+
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
+\def\unnumberedseczzz#1{%
+  \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
+  \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
+}
+
+% Subsections.
+\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
+\def\numberedsubseczzz#1{%
+  \global\subsubsecno=0  \global\advance\subsecno by 1
+  \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
+}
+
+\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
+\def\appendixsubseczzz#1{%
+  \global\subsubsecno=0  \global\advance\subsecno by 1
+  \sectionheading{#1}{subsec}{Yappendix}%
+                 {\appendixletter.\the\secno.\the\subsecno}%
+}
+
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
+\def\unnumberedsubseczzz#1{%
+  \global\subsubsecno=0  \global\advance\subsecno by 1
+  \sectionheading{#1}{subsec}{Ynothing}%
+                 {\the\unnumberedno.\the\secno.\the\subsecno}%
+}
+
+% Subsubsections.
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
+\def\numberedsubsubseczzz#1{%
+  \global\advance\subsubsecno by 1
+  \sectionheading{#1}{subsubsec}{Ynumbered}%
+                 {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
+\def\appendixsubsubseczzz#1{%
+  \global\advance\subsubsecno by 1
+  \sectionheading{#1}{subsubsec}{Yappendix}%
+                 {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
+\def\unnumberedsubsubseczzz#1{%
+  \global\advance\subsubsecno by 1
+  \sectionheading{#1}{subsubsec}{Ynothing}%
+                 {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+% These macros control what the section commands do, according
+% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
+% Define them by default for a numbered chapter.
+\let\section = \numberedsec
+\let\subsection = \numberedsubsec
+\let\subsubsection = \numberedsubsubsec
+
+% Define @majorheading, @heading and @subheading
+
+% NOTE on use of \vbox for chapter headings, section headings, and such:
+%       1) We use \vbox rather than the earlier \line to permit
+%          overlong headings to fold.
+%       2) \hyphenpenalty is set to 10000 because hyphenation in a
+%          heading is obnoxious; this forbids it.
+%       3) Likewise, headings look best if no \parindent is used, and
+%          if justification is not attempted.  Hence \raggedright.
+
+
+\def\majorheading{%
+  {\advance\chapheadingskip by 10pt \chapbreak }%
+  \parsearg\chapheadingzzz
+}
+
+\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
+\def\chapheadingzzz#1{%
+  {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+                    \parindent=0pt\raggedright
+                    \rm #1\hfill}}%
+  \bigskip \par\penalty 200\relax
+  \suppressfirstparagraphindent
+}
+
+% @heading, @subheading, @subsubheading.
+\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
+  \suppressfirstparagraphindent}
+\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
+  \suppressfirstparagraphindent}
+\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
+  \suppressfirstparagraphindent}
+
+% These macros generate a chapter, section, etc. heading only
+% (including whitespace, linebreaking, etc. around it),
+% given all the information in convenient, parsed form.
+
+%%% Args are the skip and penalty (usually negative)
+\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
+
+%%% Define plain chapter starts, and page on/off switching for it
+% Parameter controlling skip before chapter headings (if needed)
+
+\newskip\chapheadingskip
+
+\def\chapbreak{\dobreak \chapheadingskip {-4000}}
+\def\chappager{\par\vfill\supereject}
+% Because \domark is called before \chapoddpage, the filler page will
+% get the headings for the next chapter, which is wrong.  But we don't
+% care -- we just disable all headings on the filler page.
+\def\chapoddpage{%
+  \chappager
+  \ifodd\pageno \else
+    \begingroup
+      \evenheadline={\hfil}\evenfootline={\hfil}%
+      \oddheadline={\hfil}\oddfootline={\hfil}%
+      \hbox to 0pt{}%
+      \chappager
+    \endgroup
+  \fi
+}
+
+\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
+
+\def\CHAPPAGoff{%
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chapbreak
+\global\let\pagealignmacro=\chappager}
+
+\def\CHAPPAGon{%
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chappager
+\global\let\pagealignmacro=\chappager
+\global\def\HEADINGSon{\HEADINGSsingle}}
+
+\def\CHAPPAGodd{%
+\global\let\contentsalignmacro = \chapoddpage
+\global\let\pchapsepmacro=\chapoddpage
+\global\let\pagealignmacro=\chapoddpage
+\global\def\HEADINGSon{\HEADINGSdouble}}
+
+\CHAPPAGon
+
+% Chapter opening.
+%
+% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
+% Yappendix, Yomitfromtoc), #3 the chapter number.
+%
+% To test against our argument.
+\def\Ynothingkeyword{Ynothing}
+\def\Yomitfromtockeyword{Yomitfromtoc}
+\def\Yappendixkeyword{Yappendix}
+%
+\def\chapmacro#1#2#3{%
+  % Insert the first mark before the heading break (see notes for \domark).
+  \let\prevchapterdefs=\lastchapterdefs
+  \let\prevsectiondefs=\lastsectiondefs
+  \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
+                        \gdef\thissection{}}%
+  %
+  \def\temptype{#2}%
+  \ifx\temptype\Ynothingkeyword
+    \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+                          \gdef\thischapter{\thischaptername}}%
+  \else\ifx\temptype\Yomitfromtockeyword
+    \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+                          \gdef\thischapter{}}%
+  \else\ifx\temptype\Yappendixkeyword
+    \toks0={#1}%
+    \xdef\lastchapterdefs{%
+      \gdef\noexpand\thischaptername{\the\toks0}%
+      \gdef\noexpand\thischapternum{\appendixletter}%
+      \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum:
+                                 \noexpand\thischaptername}%
+    }%
+  \else
+    \toks0={#1}%
+    \xdef\lastchapterdefs{%
+      \gdef\noexpand\thischaptername{\the\toks0}%
+      \gdef\noexpand\thischapternum{\the\chapno}%
+      \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum:
+                                 \noexpand\thischaptername}%
+    }%
+  \fi\fi\fi
+  %
+  % Output the mark.  Pass it through \safewhatsit, to take care of
+  % the preceding space.
+  \safewhatsit\domark
+  %
+  % Insert the chapter heading break.
+  \pchapsepmacro
+  %
+  % Now the second mark, after the heading break.  No break points
+  % between here and the heading.
+  \let\prevchapterdefs=\lastchapterdefs
+  \let\prevsectiondefs=\lastsectiondefs
+  \domark
+  %
+  {%
+    \chapfonts \rm
+    %
+    % Have to define \lastsection before calling \donoderef, because the
+    % xref code eventually uses it.  On the other hand, it has to be called
+    % after \pchapsepmacro, or the headline will change too soon.
+    \gdef\lastsection{#1}%
+    %
+    % Only insert the separating space if we have a chapter/appendix
+    % number, and don't print the unnumbered ``number''.
+    \ifx\temptype\Ynothingkeyword
+      \setbox0 = \hbox{}%
+      \def\toctype{unnchap}%
+    \else\ifx\temptype\Yomitfromtockeyword
+      \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
+      \def\toctype{omit}%
+    \else\ifx\temptype\Yappendixkeyword
+      \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
+      \def\toctype{app}%
+    \else
+      \setbox0 = \hbox{#3\enspace}%
+      \def\toctype{numchap}%
+    \fi\fi\fi
+    %
+    % Write the toc entry for this chapter.  Must come before the
+    % \donoderef, because we include the current node name in the toc
+    % entry, and \donoderef resets it to empty.
+    \writetocentry{\toctype}{#1}{#3}%
+    %
+    % For pdftex, we have to write out the node definition (aka, make
+    % the pdfdest) after any page break, but before the actual text has
+    % been typeset.  If the destination for the pdf outline is after the
+    % text, then jumping from the outline may wind up with the text not
+    % being visible, for instance under high magnification.
+    \donoderef{#2}%
+    %
+    % Typeset the actual heading.
+    \nobreak % Avoid page breaks at the interline glue.
+    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+          \hangindent=\wd0 \centerparametersmaybe
+          \unhbox0 #1\par}%
+  }%
+  \nobreak\bigskip % no page break after a chapter title
+  \nobreak
+}
+
+% @centerchap -- centered and unnumbered.
+\let\centerparametersmaybe = \relax
+\def\centerparameters{%
+  \advance\rightskip by 3\rightskip
+  \leftskip = \rightskip
+  \parfillskip = 0pt
+}
+
+
+% I don't think this chapter style is supported any more, so I'm not
+% updating it with the new noderef stuff.  We'll see.  --karl, 11aug03.
+%
+\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
+%
+\def\unnchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+                       \parindent=0pt\raggedright
+                       \rm #1\hfill}}\bigskip \par\nobreak
+}
+\def\chfopen #1#2{\chapoddpage {\chapfonts
+\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
+\par\penalty 5000 %
+}
+\def\centerchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+                       \parindent=0pt
+                       \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
+}
+\def\CHAPFopen{%
+  \global\let\chapmacro=\chfopen
+  \global\let\centerchapmacro=\centerchfopen}
+
+
+% Section titles.  These macros combine the section number parts and
+% call the generic \sectionheading to do the printing.
+%
+\newskip\secheadingskip
+\def\secheadingbreak{\dobreak \secheadingskip{-1000}}
+
+% Subsection titles.
+\newskip\subsecheadingskip
+\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
+
+% Subsubsection titles.
+\def\subsubsecheadingskip{\subsecheadingskip}
+\def\subsubsecheadingbreak{\subsecheadingbreak}
+
+
+% Print any size, any type, section title.
+%
+% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
+% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
+% section number.
+%
+\def\seckeyword{sec}
+%
+\def\sectionheading#1#2#3#4{%
+  {%
+    % Switch to the right set of fonts.
+    \csname #2fonts\endcsname \rm
+    %
+    \def\sectionlevel{#2}%
+    \def\temptype{#3}%
+    %
+    % Insert first mark before the heading break (see notes for \domark).
+    \let\prevsectiondefs=\lastsectiondefs
+    \ifx\temptype\Ynothingkeyword
+      \ifx\sectionlevel\seckeyword
+        \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
+                              \gdef\thissection{\thissectionname}}%
+      \fi
+    \else\ifx\temptype\Yomitfromtockeyword
+      % Don't redefine \thissection.
+    \else\ifx\temptype\Yappendixkeyword
+      \ifx\sectionlevel\seckeyword
+        \toks0={#1}%
+        \xdef\lastsectiondefs{%
+          \gdef\noexpand\thissectionname{\the\toks0}%
+          \gdef\noexpand\thissectionnum{#4}%
+          \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum:
+                                     \noexpand\thissectionname}%
+        }%
+      \fi
+    \else
+      \ifx\sectionlevel\seckeyword
+        \toks0={#1}%
+        \xdef\lastsectiondefs{%
+          \gdef\noexpand\thissectionname{\the\toks0}%
+          \gdef\noexpand\thissectionnum{#4}%
+          \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum:
+                                     \noexpand\thissectionname}%
+        }%
+      \fi
+    \fi\fi\fi
+    %
+    % Output the mark.  Pass it through \safewhatsit, to take care of
+    % the preceding space.
+    \safewhatsit\domark
+    %
+    % Insert space above the heading.
+    \csname #2headingbreak\endcsname
+    %
+    % Now the second mark, after the heading break.  No break points
+    % between here and the heading.
+    \let\prevsectiondefs=\lastsectiondefs
+    \domark
+    %
+    % Only insert the space after the number if we have a section number.
+    \ifx\temptype\Ynothingkeyword
+      \setbox0 = \hbox{}%
+      \def\toctype{unn}%
+      \gdef\lastsection{#1}%
+    \else\ifx\temptype\Yomitfromtockeyword
+      % for @headings -- no section number, don't include in toc,
+      % and don't redefine \lastsection.
+      \setbox0 = \hbox{}%
+      \def\toctype{omit}%
+      \let\sectionlevel=\empty
+    \else\ifx\temptype\Yappendixkeyword
+      \setbox0 = \hbox{#4\enspace}%
+      \def\toctype{app}%
+      \gdef\lastsection{#1}%
+    \else
+      \setbox0 = \hbox{#4\enspace}%
+      \def\toctype{num}%
+      \gdef\lastsection{#1}%
+    \fi\fi\fi
+    %
+    % Write the toc entry (before \donoderef).  See comments in \chapmacro.
+    \writetocentry{\toctype\sectionlevel}{#1}{#4}%
+    %
+    % Write the node reference (= pdf destination for pdftex).
+    % Again, see comments in \chapmacro.
+    \donoderef{#3}%
+    %
+    % Interline glue will be inserted when the vbox is completed.
+    % That glue will be a valid breakpoint for the page, since it'll be
+    % preceded by a whatsit (usually from the \donoderef, or from the
+    % \writetocentry if there was no node).  We don't want to allow that
+    % break, since then the whatsits could end up on page n while the
+    % section is on page n+1, thus toc/etc. are wrong.  Debian bug 276000.
+    \nobreak
+    %
+    % Output the actual section heading.
+    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+          \hangindent=\wd0  % zero if no section number
+          \unhbox0 #1}%
+  }%
+  % Add extra space after the heading -- half of whatever came above it.
+  % Don't allow stretch, though.
+  \kern .5 \csname #2headingskip\endcsname
+  %
+  % Do not let the kern be a potential breakpoint, as it would be if it
+  % was followed by glue.
+  \nobreak
+  %
+  % We'll almost certainly start a paragraph next, so don't let that
+  % glue accumulate.  (Not a breakpoint because it's preceded by a
+  % discardable item.)
+  \vskip-\parskip
+  % 
+  % This is purely so the last item on the list is a known \penalty >
+  % 10000.  This is so \startdefun can avoid allowing breakpoints after
+  % section headings.  Otherwise, it would insert a valid breakpoint between:
+  % 
+  %   @section sec-whatever
+  %   @deffn def-whatever
+  \penalty 10001
+}
+
+
+\message{toc,}
+% Table of contents.
+\newwrite\tocfile
+
+% Write an entry to the toc file, opening it if necessary.
+% Called from @chapter, etc.
+%
+% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
+% We append the current node name (if any) and page number as additional
+% arguments for the \{chap,sec,...}entry macros which will eventually
+% read this.  The node name is used in the pdf outlines as the
+% destination to jump to.
+%
+% We open the .toc file for writing here instead of at @setfilename (or
+% any other fixed time) so that @contents can be anywhere in the document.
+% But if #1 is `omit', then we don't do anything.  This is used for the
+% table of contents chapter openings themselves.
+%
+\newif\iftocfileopened
+\def\omitkeyword{omit}%
+%
+\def\writetocentry#1#2#3{%
+  \edef\writetoctype{#1}%
+  \ifx\writetoctype\omitkeyword \else
+    \iftocfileopened\else
+      \immediate\openout\tocfile = \jobname.toc
+      \global\tocfileopenedtrue
+    \fi
+    %
+    \iflinks
+      {\atdummies
+       \edef\temp{%
+         \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
+       \temp
+      }%
+    \fi
+  \fi
+  %
+  % Tell \shipout to create a pdf destination on each page, if we're
+  % writing pdf.  These are used in the table of contents.  We can't
+  % just write one on every page because the title pages are numbered
+  % 1 and 2 (the page numbers aren't printed), and so are the first
+  % two pages of the document.  Thus, we'd have two destinations named
+  % `1', and two named `2'.
+  \ifpdf \global\pdfmakepagedesttrue \fi
+}
+
+
+% These characters do not print properly in the Computer Modern roman
+% fonts, so we must take special care.  This is more or less redundant
+% with the Texinfo input format setup at the end of this file.
+% 
+\def\activecatcodes{%
+  \catcode`\"=\active
+  \catcode`\$=\active
+  \catcode`\<=\active
+  \catcode`\>=\active
+  \catcode`\\=\active
+  \catcode`\^=\active
+  \catcode`\_=\active
+  \catcode`\|=\active
+  \catcode`\~=\active
+}
+
+
+% Read the toc file, which is essentially Texinfo input.
+\def\readtocfile{%
+  \setupdatafile
+  \activecatcodes
+  \input \tocreadfilename
+}
+
+\newskip\contentsrightmargin \contentsrightmargin=1in
+\newcount\savepageno
+\newcount\lastnegativepageno \lastnegativepageno = -1
+
+% Prepare to read what we've written to \tocfile.
+%
+\def\startcontents#1{%
+  % If @setchapternewpage on, and @headings double, the contents should
+  % start on an odd page, unlike chapters.  Thus, we maintain
+  % \contentsalignmacro in parallel with \pagealignmacro.
+  % From: Torbjorn Granlund <tege@matematik.su.se>
+  \contentsalignmacro
+  \immediate\closeout\tocfile
+  %
+  % Don't need to put `Contents' or `Short Contents' in the headline.
+  % It is abundantly clear what they are.
+  \chapmacro{#1}{Yomitfromtoc}{}%
+  %
+  \savepageno = \pageno
+  \begingroup                  % Set up to handle contents files properly.
+    \raggedbottom              % Worry more about breakpoints than the bottom.
+    \advance\hsize by -\contentsrightmargin % Don't use the full line length.
+    %
+    % Roman numerals for page numbers.
+    \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
+}
+
+% redefined for the two-volume lispref.  We always output on
+% \jobname.toc even if this is redefined.
+% 
+\def\tocreadfilename{\jobname.toc}
+
+% Normal (long) toc.
+%
+\def\contents{%
+  \startcontents{\putwordTOC}%
+    \openin 1 \tocreadfilename\space
+    \ifeof 1 \else
+      \readtocfile
+    \fi
+    \vfill \eject
+    \contentsalignmacro % in case @setchapternewpage odd is in effect
+    \ifeof 1 \else
+      \pdfmakeoutlines
+    \fi
+    \closein 1
+  \endgroup
+  \lastnegativepageno = \pageno
+  \global\pageno = \savepageno
+}
+
+% And just the chapters.
+\def\summarycontents{%
+  \startcontents{\putwordShortTOC}%
+    %
+    \let\numchapentry = \shortchapentry
+    \let\appentry = \shortchapentry
+    \let\unnchapentry = \shortunnchapentry
+    % We want a true roman here for the page numbers.
+    \secfonts
+    \let\rm=\shortcontrm \let\bf=\shortcontbf
+    \let\sl=\shortcontsl \let\tt=\shortconttt
+    \rm
+    \hyphenpenalty = 10000
+    \advance\baselineskip by 1pt % Open it up a little.
+    \def\numsecentry##1##2##3##4{}
+    \let\appsecentry = \numsecentry
+    \let\unnsecentry = \numsecentry
+    \let\numsubsecentry = \numsecentry
+    \let\appsubsecentry = \numsecentry
+    \let\unnsubsecentry = \numsecentry
+    \let\numsubsubsecentry = \numsecentry
+    \let\appsubsubsecentry = \numsecentry
+    \let\unnsubsubsecentry = \numsecentry
+    \openin 1 \tocreadfilename\space
+    \ifeof 1 \else
+      \readtocfile
+    \fi
+    \closein 1
+    \vfill \eject
+    \contentsalignmacro % in case @setchapternewpage odd is in effect
+  \endgroup
+  \lastnegativepageno = \pageno
+  \global\pageno = \savepageno
+}
+\let\shortcontents = \summarycontents
+
+% Typeset the label for a chapter or appendix for the short contents.
+% The arg is, e.g., `A' for an appendix, or `3' for a chapter.
+%
+\def\shortchaplabel#1{%
+  % This space should be enough, since a single number is .5em, and the
+  % widest letter (M) is 1em, at least in the Computer Modern fonts.
+  % But use \hss just in case.
+  % (This space doesn't include the extra space that gets added after
+  % the label; that gets put in by \shortchapentry above.)
+  %
+  % We'd like to right-justify chapter numbers, but that looks strange
+  % with appendix letters.  And right-justifying numbers and
+  % left-justifying letters looks strange when there is less than 10
+  % chapters.  Have to read the whole toc once to know how many chapters
+  % there are before deciding ...
+  \hbox to 1em{#1\hss}%
+}
+
+% These macros generate individual entries in the table of contents.
+% The first argument is the chapter or section name.
+% The last argument is the page number.
+% The arguments in between are the chapter number, section number, ...
+
+% Chapters, in the main contents.
+\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
+%
+% Chapters, in the short toc.
+% See comments in \dochapentry re vbox and related settings.
+\def\shortchapentry#1#2#3#4{%
+  \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
+}
+
+% Appendices, in the main contents.
+% Need the word Appendix, and a fixed-size box.
+%
+\def\appendixbox#1{%
+  % We use M since it's probably the widest letter.
+  \setbox0 = \hbox{\putwordAppendix{} M}%
+  \hbox to \wd0{\putwordAppendix{} #1\hss}}
+%
+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
+
+% Unnumbered chapters.
+\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
+\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
+
+% Sections.
+\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
+\let\appsecentry=\numsecentry
+\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
+
+% Subsections.
+\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
+\let\appsubsecentry=\numsubsecentry
+\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
+
+% And subsubsections.
+\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
+\let\appsubsubsecentry=\numsubsubsecentry
+\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
+
+% This parameter controls the indentation of the various levels.
+% Same as \defaultparindent.
+\newdimen\tocindent \tocindent = 15pt
+
+% Now for the actual typesetting. In all these, #1 is the text and #2 is the
+% page number.
+%
+% If the toc has to be broken over pages, we want it to be at chapters
+% if at all possible; hence the \penalty.
+\def\dochapentry#1#2{%
+   \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
+   \begingroup
+     \chapentryfonts
+     \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+   \endgroup
+   \nobreak\vskip .25\baselineskip plus.1\baselineskip
+}
+
+\def\dosecentry#1#2{\begingroup
+  \secentryfonts \leftskip=\tocindent
+  \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+\def\dosubsecentry#1#2{\begingroup
+  \subsecentryfonts \leftskip=2\tocindent
+  \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+\def\dosubsubsecentry#1#2{\begingroup
+  \subsubsecentryfonts \leftskip=3\tocindent
+  \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+% We use the same \entry macro as for the index entries.
+\let\tocentry = \entry
+
+% Space between chapter (or whatever) number and the title.
+\def\labelspace{\hskip1em \relax}
+
+\def\dopageno#1{{\rm #1}}
+\def\doshortpageno#1{{\rm #1}}
+
+\def\chapentryfonts{\secfonts \rm}
+\def\secentryfonts{\textfonts}
+\def\subsecentryfonts{\textfonts}
+\def\subsubsecentryfonts{\textfonts}
+
+
+\message{environments,}
+% @foo ... @end foo.
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, it should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+   \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+   \advance\hsize by -2\dimen2 % Rules.
+   \vbox{%
+      \hrule height\dimen2
+      \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
+         \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+         \kern3pt\vrule width\dimen2}% Space to right.
+      \hrule height\dimen2}
+    \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
+% @tex ... @end tex    escapes into raw Tex temporarily.
+% One exception: @ is still an escape character, so that @end tex works.
+% But \@ or @@ will get a plain tex @ character.
+
+\envdef\tex{%
+  \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
+  \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
+  \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
+  \catcode `\%=14
+  \catcode `\+=\other
+  \catcode `\"=\other
+  \catcode `\|=\other
+  \catcode `\<=\other
+  \catcode `\>=\other
+  \escapechar=`\\
+  %
+  \let\b=\ptexb
+  \let\bullet=\ptexbullet
+  \let\c=\ptexc
+  \let\,=\ptexcomma
+  \let\.=\ptexdot
+  \let\dots=\ptexdots
+  \let\equiv=\ptexequiv
+  \let\!=\ptexexclam
+  \let\i=\ptexi
+  \let\indent=\ptexindent
+  \let\noindent=\ptexnoindent
+  \let\{=\ptexlbrace
+  \let\+=\tabalign
+  \let\}=\ptexrbrace
+  \let\/=\ptexslash
+  \let\*=\ptexstar
+  \let\t=\ptext
+  \let\frenchspacing=\plainfrenchspacing
+  %
+  \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
+  \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
+  \def\@{@}%
+}
+% There is no need to define \Etex.
+
+% Define @lisp ... @end lisp.
+% @lisp environment forms a group so it can rebind things,
+% including the definition of @end lisp (which normally is erroneous).
+
+% Amount to narrow the margins by for @lisp.
+\newskip\lispnarrowing \lispnarrowing=0.4in
+
+% This is the definition that ^^M gets inside @lisp, @example, and other
+% such environments.  \null is better than a space, since it doesn't
+% have any width.
+\def\lisppar{\null\endgraf}
+
+% This space is always present above and below environments.
+\newskip\envskipamount \envskipamount = 0pt
+
+% Make spacing and below environment symmetrical.  We use \parskip here
+% to help in doing that, since in @example-like environments \parskip
+% is reset to zero; thus the \afterenvbreak inserts no space -- but the
+% start of the next paragraph will insert \parskip.
+%
+\def\aboveenvbreak{{%
+  % =10000 instead of <10000 because of a special case in \itemzzz and
+  % \sectionheading, q.v.
+  \ifnum \lastpenalty=10000 \else
+    \advance\envskipamount by \parskip
+    \endgraf
+    \ifdim\lastskip<\envskipamount
+      \removelastskip
+      % it's not a good place to break if the last penalty was \nobreak
+      % or better ...
+      \ifnum\lastpenalty<10000 \penalty-50 \fi
+      \vskip\envskipamount
+    \fi
+  \fi
+}}
+
+\let\afterenvbreak = \aboveenvbreak
+
+% \nonarrowing is a flag.  If "set", @lisp etc don't narrow margins; it will
+% also clear it, so that its embedded environments do the narrowing again.
+\let\nonarrowing=\relax
+
+% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
+% environment contents.
+\font\circle=lcircle10
+\newdimen\circthick
+\newdimen\cartouter\newdimen\cartinner
+\newskip\normbskip\newskip\normpskip\newskip\normlskip
+\circthick=\fontdimen8\circle
+%
+\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
+\def\ctr{{\hskip 6pt\circle\char'010}}
+\def\cbl{{\circle\char'012\hskip -6pt}}
+\def\cbr{{\hskip 6pt\circle\char'011}}
+\def\carttop{\hbox to \cartouter{\hskip\lskip
+        \ctl\leaders\hrule height\circthick\hfil\ctr
+        \hskip\rskip}}
+\def\cartbot{\hbox to \cartouter{\hskip\lskip
+        \cbl\leaders\hrule height\circthick\hfil\cbr
+        \hskip\rskip}}
+%
+\newskip\lskip\newskip\rskip
+
+\envdef\cartouche{%
+  \ifhmode\par\fi  % can't be in the midst of a paragraph.
+  \startsavinginserts
+  \lskip=\leftskip \rskip=\rightskip
+  \leftskip=0pt\rightskip=0pt % we want these *outside*.
+  \cartinner=\hsize \advance\cartinner by-\lskip
+  \advance\cartinner by-\rskip
+  \cartouter=\hsize
+  \advance\cartouter by 18.4pt % allow for 3pt kerns on either
+                               % side, and for 6pt waste from
+                               % each corner char, and rule thickness
+  \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
+  % Flag to tell @lisp, etc., not to narrow margin.
+  \let\nonarrowing = t%
+  \vbox\bgroup
+      \baselineskip=0pt\parskip=0pt\lineskip=0pt
+      \carttop
+      \hbox\bgroup
+         \hskip\lskip
+         \vrule\kern3pt
+         \vbox\bgroup
+             \kern3pt
+             \hsize=\cartinner
+             \baselineskip=\normbskip
+             \lineskip=\normlskip
+             \parskip=\normpskip
+             \vskip -\parskip
+             \comment % For explanation, see the end of \def\group.
+}
+\def\Ecartouche{%
+              \ifhmode\par\fi
+             \kern3pt
+         \egroup
+         \kern3pt\vrule
+         \hskip\rskip
+      \egroup
+      \cartbot
+  \egroup
+  \checkinserts
+}
+
+
+% This macro is called at the beginning of all the @example variants,
+% inside a group.
+\def\nonfillstart{%
+  \aboveenvbreak
+  \hfuzz = 12pt % Don't be fussy
+  \sepspaces % Make spaces be word-separators rather than space tokens.
+  \let\par = \lisppar % don't ignore blank lines
+  \obeylines % each line of input is a line of output
+  \parskip = 0pt
+  \parindent = 0pt
+  \emergencystretch = 0pt % don't try to avoid overfull boxes
+  \ifx\nonarrowing\relax
+    \advance \leftskip by \lispnarrowing
+    \exdentamount=\lispnarrowing
+  \else
+    \let\nonarrowing = \relax
+  \fi
+  \let\exdent=\nofillexdent
+}
+
+% If you want all examples etc. small: @set dispenvsize small.
+% If you want even small examples the full size: @set dispenvsize nosmall.
+% This affects the following displayed environments:
+%    @example, @display, @format, @lisp
+%
+\def\smallword{small}
+\def\nosmallword{nosmall}
+\let\SETdispenvsize\relax
+\def\setnormaldispenv{%
+  \ifx\SETdispenvsize\smallword
+    % end paragraph for sake of leading, in case document has no blank
+    % line.  This is redundant with what happens in \aboveenvbreak, but
+    % we need to do it before changing the fonts, and it's inconvenient
+    % to change the fonts afterward.
+    \ifnum \lastpenalty=10000 \else \endgraf \fi
+    \smallexamplefonts \rm
+  \fi
+}
+\def\setsmalldispenv{%
+  \ifx\SETdispenvsize\nosmallword
+  \else
+    \ifnum \lastpenalty=10000 \else \endgraf \fi
+    \smallexamplefonts \rm
+  \fi
+}
+
+% We often define two environments, @foo and @smallfoo.
+% Let's do it by one command:
+\def\makedispenv #1#2{
+  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
+  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
+  \expandafter\let\csname E#1\endcsname \afterenvbreak
+  \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
+}
+
+% Define two synonyms:
+\def\maketwodispenvs #1#2#3{
+  \makedispenv{#1}{#3}
+  \makedispenv{#2}{#3}
+}
+
+% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
+%
+% @smallexample and @smalllisp: use smaller fonts.
+% Originally contributed by Pavel@xerox.
+%
+\maketwodispenvs {lisp}{example}{%
+  \nonfillstart
+  \tt\quoteexpand
+  \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
+  \gobble       % eat return
+}
+% @display/@smalldisplay: same as @lisp except keep current font.
+%
+\makedispenv {display}{%
+  \nonfillstart
+  \gobble
+}
+
+% @format/@smallformat: same as @display except don't narrow margins.
+%
+\makedispenv{format}{%
+  \let\nonarrowing = t%
+  \nonfillstart
+  \gobble
+}
+
+% @flushleft: same as @format, but doesn't obey \SETdispenvsize.
+\envdef\flushleft{%
+  \let\nonarrowing = t%
+  \nonfillstart
+  \gobble
+}
+\let\Eflushleft = \afterenvbreak
+
+% @flushright.
+%
+\envdef\flushright{%
+  \let\nonarrowing = t%
+  \nonfillstart
+  \advance\leftskip by 0pt plus 1fill
+  \gobble
+}
+\let\Eflushright = \afterenvbreak
+
+
+% @quotation does normal linebreaking (hence we can't use \nonfillstart)
+% and narrows the margins.  We keep \parskip nonzero in general, since
+% we're doing normal filling.  So, when using \aboveenvbreak and
+% \afterenvbreak, temporarily make \parskip 0.
+%
+\envdef\quotation{%
+  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+  \parindent=0pt
+  %
+  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \ifx\nonarrowing\relax
+    \advance\leftskip by \lispnarrowing
+    \advance\rightskip by \lispnarrowing
+    \exdentamount = \lispnarrowing
+  \else
+    \let\nonarrowing = \relax
+  \fi
+  \parsearg\quotationlabel
+}
+
+% We have retained a nonzero parskip for the environment, since we're
+% doing normal filling.
+%
+\def\Equotation{%
+  \par
+  \ifx\quotationauthor\undefined\else
+    % indent a bit.
+    \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
+  \fi
+  {\parskip=0pt \afterenvbreak}%
+}
+
+% If we're given an argument, typeset it in bold with a colon after.
+\def\quotationlabel#1{%
+  \def\temp{#1}%
+  \ifx\temp\empty \else
+    {\bf #1: }%
+  \fi
+}
+
+
+% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
+% If we want to allow any <char> as delimiter,
+% we need the curly braces so that makeinfo sees the @verb command, eg:
+% `@verbx...x' would look like the '@verbx' command.  --janneke@gnu.org
+%
+% [Knuth]: Donald Ervin Knuth, 1996.  The TeXbook.
+%
+% [Knuth] p.344; only we need to do the other characters Texinfo sets
+% active too.  Otherwise, they get lost as the first character on a
+% verbatim line.
+\def\dospecials{%
+  \do\ \do\\\do\{\do\}\do\$\do\&%
+  \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
+  \do\<\do\>\do\|\do\@\do+\do\"%
+}
+%
+% [Knuth] p. 380
+\def\uncatcodespecials{%
+  \def\do##1{\catcode`##1=\other}\dospecials}
+%
+% [Knuth] pp. 380,381,391
+% Disable Spanish ligatures ?` and !` of \tt font
+\begingroup
+  \catcode`\`=\active\gdef`{\relax\lq}
+\endgroup
+%
+% Setup for the @verb command.
+%
+% Eight spaces for a tab
+\begingroup
+  \catcode`\^^I=\active
+  \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
+\endgroup
+%
+\def\setupverb{%
+  \tt  % easiest (and conventionally used) font for verbatim
+  \def\par{\leavevmode\endgraf}%
+  \catcode`\`=\active
+  \tabeightspaces
+  % Respect line breaks,
+  % print special symbols as themselves, and
+  % make each space count
+  % must do in this order:
+  \obeylines \uncatcodespecials \sepspaces
+}
+
+% Setup for the @verbatim environment
+%
+% Real tab expansion
+\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
+%
+\def\starttabbox{\setbox0=\hbox\bgroup}
+
+% Allow an option to not replace quotes with a regular directed right
+% quote/apostrophe (char 0x27), but instead use the undirected quote
+% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
+% the default, but it works for pasting with more pdf viewers (at least
+% evince), the lilypond developers report.  xpdf does work with the
+% regular 0x27.  
+% 
+\def\codequoteright{%
+  \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+    \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+      '%
+    \else \char'15 \fi
+  \else \char'15 \fi
+}
+%
+% and a similar option for the left quote char vs. a grave accent.
+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
+% the code environments to do likewise.
+% 
+\def\codequoteleft{%
+  \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+    \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+      `%
+    \else \char'22 \fi
+  \else \char'22 \fi
+}
+%
+\begingroup
+  \catcode`\^^I=\active
+  \gdef\tabexpand{%
+    \catcode`\^^I=\active
+    \def^^I{\leavevmode\egroup
+      \dimen0=\wd0 % the width so far, or since the previous tab
+      \divide\dimen0 by\tabw
+      \multiply\dimen0 by\tabw % compute previous multiple of \tabw
+      \advance\dimen0 by\tabw  % advance to next multiple of \tabw
+      \wd0=\dimen0 \box0 \starttabbox
+    }%
+  }
+  \catcode`\'=\active
+  \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
+  %
+  \catcode`\`=\active
+  \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
+  %
+  \gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
+\endgroup
+
+% start the verbatim environment.
+\def\setupverbatim{%
+  \let\nonarrowing = t%
+  \nonfillstart
+  % Easiest (and conventionally used) font for verbatim
+  \tt
+  \def\par{\leavevmode\egroup\box0\endgraf}%
+  \catcode`\`=\active
+  \tabexpand
+  \quoteexpand
+  % Respect line breaks,
+  % print special symbols as themselves, and
+  % make each space count
+  % must do in this order:
+  \obeylines \uncatcodespecials \sepspaces
+  \everypar{\starttabbox}%
+}
+
+% Do the @verb magic: verbatim text is quoted by unique
+% delimiter characters.  Before first delimiter expect a
+% right brace, after last delimiter expect closing brace:
+%
+%    \def\doverb'{'<char>#1<char>'}'{#1}
+%
+% [Knuth] p. 382; only eat outer {}
+\begingroup
+  \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
+  \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
+\endgroup
+%
+\def\verb{\begingroup\setupverb\doverb}
+%
+%
+% Do the @verbatim magic: define the macro \doverbatim so that
+% the (first) argument ends when '@end verbatim' is reached, ie:
+%
+%     \def\doverbatim#1@end verbatim{#1}
+%
+% For Texinfo it's a lot easier than for LaTeX,
+% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
+% we need not redefine '\', '{' and '}'.
+%
+% Inspired by LaTeX's verbatim command set [latex.ltx]
+%
+\begingroup
+  \catcode`\ =\active
+  \obeylines %
+  % ignore everything up to the first ^^M, that's the newline at the end
+  % of the @verbatim input line itself.  Otherwise we get an extra blank
+  % line in the output.
+  \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}%
+  % We really want {...\end verbatim} in the body of the macro, but
+  % without the active space; thus we have to use \xdef and \gobble.
+\endgroup
+%
+\envdef\verbatim{%
+    \setupverbatim\doverbatim
+}
+\let\Everbatim = \afterenvbreak
+
+
+% @verbatiminclude FILE - insert text of file in verbatim environment.
+%
+\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
+%
+\def\doverbatiminclude#1{%
+  {%
+    \makevalueexpandable
+    \setupverbatim
+    \input #1
+    \afterenvbreak
+  }%
+}
+
+% @copying ... @end copying.
+% Save the text away for @insertcopying later.
+%
+% We save the uninterpreted tokens, rather than creating a box.
+% Saving the text in a box would be much easier, but then all the
+% typesetting commands (@smallbook, font changes, etc.) have to be done
+% beforehand -- and a) we want @copying to be done first in the source
+% file; b) letting users define the frontmatter in as flexible order as
+% possible is very desirable.
+%
+\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
+\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
+%
+\def\insertcopying{%
+  \begingroup
+    \parindent = 0pt  % paragraph indentation looks wrong on title page
+    \scanexp\copyingtext
+  \endgroup
+}
+
+
+\message{defuns,}
+% @defun etc.
+
+\newskip\defbodyindent \defbodyindent=.4in
+\newskip\defargsindent \defargsindent=50pt
+\newskip\deflastargmargin \deflastargmargin=18pt
+\newcount\defunpenalty
+
+% Start the processing of @deffn:
+\def\startdefun{%
+  \ifnum\lastpenalty<10000
+    \medbreak
+    \defunpenalty=10003 % Will keep this @deffn together with the
+                        % following @def command, see below.
+  \else
+    % If there are two @def commands in a row, we'll have a \nobreak,
+    % which is there to keep the function description together with its
+    % header.  But if there's nothing but headers, we need to allow a
+    % break somewhere.  Check specifically for penalty 10002, inserted
+    % by \printdefunline, instead of 10000, since the sectioning
+    % commands also insert a nobreak penalty, and we don't want to allow
+    % a break between a section heading and a defun.
+    %
+    % As a minor refinement, we avoid "club" headers by signalling
+    % with penalty of 10003 after the very first @deffn in the
+    % sequence (see above), and penalty of 10002 after any following
+    % @def command.
+    \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
+    %
+    % Similarly, after a section heading, do not allow a break.
+    % But do insert the glue.
+    \medskip  % preceded by discardable penalty, so not a breakpoint
+  \fi
+  %
+  \parindent=0in
+  \advance\leftskip by \defbodyindent
+  \exdentamount=\defbodyindent
+}
+
+\def\dodefunx#1{%
+  % First, check whether we are in the right environment:
+  \checkenv#1%
+  %
+  % As above, allow line break if we have multiple x headers in a row.
+  % It's not a great place, though.
+  \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
+  %
+  % And now, it's time to reuse the body of the original defun:
+  \expandafter\gobbledefun#1%
+}
+\def\gobbledefun#1\startdefun{}
+
+% \printdefunline \deffnheader{text}
+%
+\def\printdefunline#1#2{%
+  \begingroup
+    % call \deffnheader:
+    #1#2 \endheader
+    % common ending:
+    \interlinepenalty = 10000
+    \advance\rightskip by 0pt plus 1fil
+    \endgraf
+    \nobreak\vskip -\parskip
+    \penalty\defunpenalty  % signal to \startdefun and \dodefunx
+    % Some of the @defun-type tags do not enable magic parentheses,
+    % rendering the following check redundant.  But we don't optimize.
+    \checkparencounts
+  \endgroup
+}
+
+\def\Edefun{\endgraf\medbreak}
+
+% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
+% the only thing remainnig is to define \deffnheader.
+%
+\def\makedefun#1{%
+  \expandafter\let\csname E#1\endcsname = \Edefun
+  \edef\temp{\noexpand\domakedefun
+    \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
+  \temp
+}
+
+% \domakedefun \deffn \deffnx \deffnheader
+%
+% Define \deffn and \deffnx, without parameters.
+% \deffnheader has to be defined explicitly.
+%
+\def\domakedefun#1#2#3{%
+  \envdef#1{%
+    \startdefun
+    \parseargusing\activeparens{\printdefunline#3}%
+  }%
+  \def#2{\dodefunx#1}%
+  \def#3%
+}
+
+%%% Untyped functions:
+
+% @deffn category name args
+\makedefun{deffn}{\deffngeneral{}}
+
+% @deffn category class name args
+\makedefun{defop}#1 {\defopon{#1\ \putwordon}}
+
+% \defopon {category on}class name args
+\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+
+% \deffngeneral {subind}category name args
+%
+\def\deffngeneral#1#2 #3 #4\endheader{%
+  % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
+  \dosubind{fn}{\code{#3}}{#1}%
+  \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
+}
+
+%%% Typed functions:
+
+% @deftypefn category type name args
+\makedefun{deftypefn}{\deftypefngeneral{}}
+
+% @deftypeop category class type name args
+\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
+
+% \deftypeopon {category on}class type name args
+\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+
+% \deftypefngeneral {subind}category type name args
+%
+\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
+  \dosubind{fn}{\code{#4}}{#1}%
+  \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+}
+
+%%% Typed variables:
+
+% @deftypevr category type var args
+\makedefun{deftypevr}{\deftypecvgeneral{}}
+
+% @deftypecv category class type var args
+\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
+
+% \deftypecvof {category of}class type var args
+\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
+
+% \deftypecvgeneral {subind}category type var args
+%
+\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
+  \dosubind{vr}{\code{#4}}{#1}%
+  \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+}
+
+%%% Untyped variables:
+
+% @defvr category var args
+\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
+
+% @defcv category class var args
+\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
+
+% \defcvof {category of}class var args
+\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
+
+%%% Type:
+% @deftp category name args
+\makedefun{deftp}#1 #2 #3\endheader{%
+  \doind{tp}{\code{#2}}%
+  \defname{#1}{}{#2}\defunargs{#3\unskip}%
+}
+
+% Remaining @defun-like shortcuts:
+\makedefun{defun}{\deffnheader{\putwordDeffunc} }
+\makedefun{defmac}{\deffnheader{\putwordDefmac} }
+\makedefun{defspec}{\deffnheader{\putwordDefspec} }
+\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
+\makedefun{defvar}{\defvrheader{\putwordDefvar} }
+\makedefun{defopt}{\defvrheader{\putwordDefopt} }
+\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
+\makedefun{defmethod}{\defopon\putwordMethodon}
+\makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
+\makedefun{defivar}{\defcvof\putwordInstanceVariableof}
+\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
+
+% \defname, which formats the name of the @def (not the args).
+% #1 is the category, such as "Function".
+% #2 is the return type, if any.
+% #3 is the function name.
+%
+% We are followed by (but not passed) the arguments, if any.
+%
+\def\defname#1#2#3{%
+  % Get the values of \leftskip and \rightskip as they were outside the @def...
+  \advance\leftskip by -\defbodyindent
+  %
+  % How we'll format the type name.  Putting it in brackets helps
+  % distinguish it from the body text that may end up on the next line
+  % just below it.
+  \def\temp{#1}%
+  \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
+  %
+  % Figure out line sizes for the paragraph shape.
+  % The first line needs space for \box0; but if \rightskip is nonzero,
+  % we need only space for the part of \box0 which exceeds it:
+  \dimen0=\hsize  \advance\dimen0 by -\wd0  \advance\dimen0 by \rightskip
+  % The continuations:
+  \dimen2=\hsize  \advance\dimen2 by -\defargsindent
+  % (plain.tex says that \dimen1 should be used only as global.)
+  \parshape 2 0in \dimen0 \defargsindent \dimen2
+  %
+  % Put the type name to the right margin.
+  \noindent
+  \hbox to 0pt{%
+    \hfil\box0 \kern-\hsize
+    % \hsize has to be shortened this way:
+    \kern\leftskip
+    % Intentionally do not respect \rightskip, since we need the space.
+  }%
+  %
+  % Allow all lines to be underfull without complaint:
+  \tolerance=10000 \hbadness=10000
+  \exdentamount=\defbodyindent
+  {%
+    % defun fonts. We use typewriter by default (used to be bold) because:
+    % . we're printing identifiers, they should be in tt in principle.
+    % . in languages with many accents, such as Czech or French, it's
+    %   common to leave accents off identifiers.  The result looks ok in
+    %   tt, but exceedingly strange in rm.
+    % . we don't want -- and --- to be treated as ligatures.
+    % . this still does not fix the ?` and !` ligatures, but so far no
+    %   one has made identifiers using them :).
+    \df \tt
+    \def\temp{#2}% return value type
+    \ifx\temp\empty\else \tclose{\temp} \fi
+    #3% output function name
+  }%
+  {\rm\enskip}% hskip 0.5 em of \tenrm
+  %
+  \boldbrax
+  % arguments will be output next, if any.
+}
+
+% Print arguments in slanted roman (not ttsl), inconsistently with using
+% tt for the name.  This is because literal text is sometimes needed in
+% the argument list (groff manual), and ttsl and tt are not very
+% distinguishable.  Prevent hyphenation at `-' chars.
+%
+\def\defunargs#1{%
+  % use sl by default (not ttsl),
+  % tt for the names.
+  \df \sl \hyphenchar\font=0
+  %
+  % On the other hand, if an argument has two dashes (for instance), we
+  % want a way to get ttsl.  Let's try @var for that.
+  \let\var=\ttslanted
+  #1%
+  \sl\hyphenchar\font=45
+}
+
+% We want ()&[] to print specially on the defun line.
+%
+\def\activeparens{%
+  \catcode`\(=\active \catcode`\)=\active
+  \catcode`\[=\active \catcode`\]=\active
+  \catcode`\&=\active
+}
+
+% Make control sequences which act like normal parenthesis chars.
+\let\lparen = ( \let\rparen = )
+
+% Be sure that we always have a definition for `(', etc.  For example,
+% if the fn name has parens in it, \boldbrax will not be in effect yet,
+% so TeX would otherwise complain about undefined control sequence.
+{
+  \activeparens
+  \global\let(=\lparen \global\let)=\rparen
+  \global\let[=\lbrack \global\let]=\rbrack
+  \global\let& = \&
+
+  \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+  \gdef\magicamp{\let&=\amprm}
+}
+
+\newcount\parencount
+
+% If we encounter &foo, then turn on ()-hacking afterwards
+\newif\ifampseen
+\def\amprm#1 {\ampseentrue{\bf\&#1 }}
+
+\def\parenfont{%
+  \ifampseen
+    % At the first level, print parens in roman,
+    % otherwise use the default font.
+    \ifnum \parencount=1 \rm \fi
+  \else
+    % The \sf parens (in \boldbrax) actually are a little bolder than
+    % the contained text.  This is especially needed for [ and ] .
+    \sf
+  \fi
+}
+\def\infirstlevel#1{%
+  \ifampseen
+    \ifnum\parencount=1
+      #1%
+    \fi
+  \fi
+}
+\def\bfafterword#1 {#1 \bf}
+
+\def\opnr{%
+  \global\advance\parencount by 1
+  {\parenfont(}%
+  \infirstlevel \bfafterword
+}
+\def\clnr{%
+  {\parenfont)}%
+  \infirstlevel \sl
+  \global\advance\parencount by -1
+}
+
+\newcount\brackcount
+\def\lbrb{%
+  \global\advance\brackcount by 1
+  {\bf[}%
+}
+\def\rbrb{%
+  {\bf]}%
+  \global\advance\brackcount by -1
+}
+
+\def\checkparencounts{%
+  \ifnum\parencount=0 \else \badparencount \fi
+  \ifnum\brackcount=0 \else \badbrackcount \fi
+}
+% these should not use \errmessage; the glibc manual, at least, actually
+% has such constructs (when documenting function pointers).
+\def\badparencount{%
+  \message{Warning: unbalanced parentheses in @def...}%
+  \global\parencount=0
+}
+\def\badbrackcount{%
+  \message{Warning: unbalanced square brackets in @def...}%
+  \global\brackcount=0
+}
+
+
+\message{macros,}
+% @macro.
+
+% To do this right we need a feature of e-TeX, \scantokens,
+% which we arrange to emulate with a temporary file in ordinary TeX.
+\ifx\eTeXversion\undefined
+  \newwrite\macscribble
+  \def\scantokens#1{%
+    \toks0={#1}%
+    \immediate\openout\macscribble=\jobname.tmp
+    \immediate\write\macscribble{\the\toks0}%
+    \immediate\closeout\macscribble
+    \input \jobname.tmp
+  }
+\fi
+
+\def\scanmacro#1{%
+  \begingroup
+    \newlinechar`\^^M
+    \let\xeatspaces\eatspaces
+    % Undo catcode changes of \startcontents and \doprintindex
+    % When called from @insertcopying or (short)caption, we need active
+    % backslash to get it printed correctly.  Previously, we had
+    % \catcode`\\=\other instead.  We'll see whether a problem appears
+    % with macro expansion.                            --kasal, 19aug04
+    \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+    % ... and \example
+    \spaceisspace
+    %
+    % Append \endinput to make sure that TeX does not see the ending newline.
+    % I've verified that it is necessary both for e-TeX and for ordinary TeX
+    %                                                  --kasal, 29nov03
+    \scantokens{#1\endinput}%
+  \endgroup
+}
+
+\def\scanexp#1{%
+  \edef\temp{\noexpand\scanmacro{#1}}%
+  \temp
+}
+
+\newcount\paramno   % Count of parameters
+\newtoks\macname    % Macro name
+\newif\ifrecursive  % Is it recursive?
+
+% List of all defined macros in the form
+%    \definedummyword\macro1\definedummyword\macro2...
+% Currently is also contains all @aliases; the list can be split
+% if there is a need.
+\def\macrolist{}
+
+% Add the macro to \macrolist
+\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
+\def\addtomacrolistxxx#1{%
+     \toks0 = \expandafter{\macrolist\definedummyword#1}%
+     \xdef\macrolist{\the\toks0}%
+}
+
+% Utility routines.
+% This does \let #1 = #2, with \csnames; that is,
+%   \let \csname#1\endcsname = \csname#2\endcsname
+% (except of course we have to play expansion games).
+% 
+\def\cslet#1#2{%
+  \expandafter\let
+  \csname#1\expandafter\endcsname
+  \csname#2\endcsname
+}
+
+% Trim leading and trailing spaces off a string.
+% Concepts from aro-bend problem 15 (see CTAN).
+{\catcode`\@=11
+\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
+\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
+\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
+\def\unbrace#1{#1}
+\unbrace{\gdef\trim@@@ #1 } #2@{#1}
+}
+
+% Trim a single trailing ^^M off a string.
+{\catcode`\^^M=\other \catcode`\Q=3%
+\gdef\eatcr #1{\eatcra #1Q^^MQ}%
+\gdef\eatcra#1^^MQ{\eatcrb#1Q}%
+\gdef\eatcrb#1Q#2Q{#1}%
+}
+
+% Macro bodies are absorbed as an argument in a context where
+% all characters are catcode 10, 11 or 12, except \ which is active
+% (as in normal texinfo). It is necessary to change the definition of \.
+
+% Non-ASCII encodings make 8-bit characters active, so un-activate
+% them to avoid their expansion.  Must do this non-globally, to
+% confine the change to the current group.
+
+% It's necessary to have hard CRs when the macro is executed. This is
+% done by  making ^^M (\endlinechar) catcode 12 when reading the macro
+% body, and then making it the \newlinechar in \scanmacro.
+
+\def\scanctxt{%
+  \catcode`\"=\other
+  \catcode`\+=\other
+  \catcode`\<=\other
+  \catcode`\>=\other
+  \catcode`\@=\other
+  \catcode`\^=\other
+  \catcode`\_=\other
+  \catcode`\|=\other
+  \catcode`\~=\other
+  \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
+}
+
+\def\scanargctxt{%
+  \scanctxt
+  \catcode`\\=\other
+  \catcode`\^^M=\other
+}
+
+\def\macrobodyctxt{%
+  \scanctxt
+  \catcode`\{=\other
+  \catcode`\}=\other
+  \catcode`\^^M=\other
+  \usembodybackslash
+}
+
+\def\macroargctxt{%
+  \scanctxt
+  \catcode`\\=\other
+}
+
+% \mbodybackslash is the definition of \ in @macro bodies.
+% It maps \foo\ => \csname macarg.foo\endcsname => #N
+% where N is the macro parameter number.
+% We define \csname macarg.\endcsname to be \realbackslash, so
+% \\ in macro replacement text gets you a backslash.
+
+{\catcode`@=0 @catcode`@\=@active
+ @gdef@usembodybackslash{@let\=@mbodybackslash}
+ @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
+}
+\expandafter\def\csname macarg.\endcsname{\realbackslash}
+
+\def\macro{\recursivefalse\parsearg\macroxxx}
+\def\rmacro{\recursivetrue\parsearg\macroxxx}
+
+\def\macroxxx#1{%
+  \getargs{#1}%           now \macname is the macname and \argl the arglist
+  \ifx\argl\empty       % no arguments
+     \paramno=0%
+  \else
+     \expandafter\parsemargdef \argl;%
+  \fi
+  \if1\csname ismacro.\the\macname\endcsname
+     \message{Warning: redefining \the\macname}%
+  \else
+     \expandafter\ifx\csname \the\macname\endcsname \relax
+     \else \errmessage{Macro name \the\macname\space already defined}\fi
+     \global\cslet{macsave.\the\macname}{\the\macname}%
+     \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
+     \addtomacrolist{\the\macname}%
+  \fi
+  \begingroup \macrobodyctxt
+  \ifrecursive \expandafter\parsermacbody
+  \else \expandafter\parsemacbody
+  \fi}
+
+\parseargdef\unmacro{%
+  \if1\csname ismacro.#1\endcsname
+    \global\cslet{#1}{macsave.#1}%
+    \global\expandafter\let \csname ismacro.#1\endcsname=0%
+    % Remove the macro name from \macrolist:
+    \begingroup
+      \expandafter\let\csname#1\endcsname \relax
+      \let\definedummyword\unmacrodo
+      \xdef\macrolist{\macrolist}%
+    \endgroup
+  \else
+    \errmessage{Macro #1 not defined}%
+  \fi
+}
+
+% Called by \do from \dounmacro on each macro.  The idea is to omit any
+% macro definitions that have been changed to \relax.
+%
+\def\unmacrodo#1{%
+  \ifx #1\relax
+    % remove this
+  \else
+    \noexpand\definedummyword \noexpand#1%
+  \fi
+}
+
+% This makes use of the obscure feature that if the last token of a
+% <parameter list> is #, then the preceding argument is delimited by
+% an opening brace, and that opening brace is not consumed.
+\def\getargs#1{\getargsxxx#1{}}
+\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
+\def\getmacname #1 #2\relax{\macname={#1}}
+\def\getmacargs#1{\def\argl{#1}}
+
+% Parse the optional {params} list.  Set up \paramno and \paramlist
+% so \defmacro knows what to do.  Define \macarg.blah for each blah
+% in the params list, to be ##N where N is the position in that list.
+% That gets used by \mbodybackslash (above).
+
+% We need to get `macro parameter char #' into several definitions.
+% The technique used is stolen from LaTeX:  let \hash be something
+% unexpandable, insert that wherever you need a #, and then redefine
+% it to # just before using the token list produced.
+%
+% The same technique is used to protect \eatspaces till just before
+% the macro is used.
+
+\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
+        \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
+\def\parsemargdefxxx#1,{%
+  \if#1;\let\next=\relax
+  \else \let\next=\parsemargdefxxx
+    \advance\paramno by 1%
+    \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+        {\xeatspaces{\hash\the\paramno}}%
+    \edef\paramlist{\paramlist\hash\the\paramno,}%
+  \fi\next}
+
+% These two commands read recursive and nonrecursive macro bodies.
+% (They're different since rec and nonrec macros end differently.)
+
+\long\def\parsemacbody#1@end macro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\long\def\parsermacbody#1@end rmacro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+
+% This defines the macro itself. There are six cases: recursive and
+% nonrecursive macros of zero, one, and many arguments.
+% Much magic with \expandafter here.
+% \xdef is used so that macro definitions will survive the file
+% they're defined in; @include reads the file inside a group.
+\def\defmacro{%
+  \let\hash=##% convert placeholders to macro parameter chars
+  \ifrecursive
+    \ifcase\paramno
+    % 0
+      \expandafter\xdef\csname\the\macname\endcsname{%
+        \noexpand\scanmacro{\temp}}%
+    \or % 1
+      \expandafter\xdef\csname\the\macname\endcsname{%
+         \bgroup\noexpand\macroargctxt
+         \noexpand\braceorline
+         \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+      \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+         \egroup\noexpand\scanmacro{\temp}}%
+    \else % many
+      \expandafter\xdef\csname\the\macname\endcsname{%
+         \bgroup\noexpand\macroargctxt
+         \noexpand\csname\the\macname xx\endcsname}%
+      \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+          \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+      \expandafter\expandafter
+      \expandafter\xdef
+      \expandafter\expandafter
+        \csname\the\macname xxx\endcsname
+          \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+    \fi
+  \else
+    \ifcase\paramno
+    % 0
+      \expandafter\xdef\csname\the\macname\endcsname{%
+        \noexpand\norecurse{\the\macname}%
+        \noexpand\scanmacro{\temp}\egroup}%
+    \or % 1
+      \expandafter\xdef\csname\the\macname\endcsname{%
+         \bgroup\noexpand\macroargctxt
+         \noexpand\braceorline
+         \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+      \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+        \egroup
+        \noexpand\norecurse{\the\macname}%
+        \noexpand\scanmacro{\temp}\egroup}%
+    \else % many
+      \expandafter\xdef\csname\the\macname\endcsname{%
+         \bgroup\noexpand\macroargctxt
+         \expandafter\noexpand\csname\the\macname xx\endcsname}%
+      \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+          \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+      \expandafter\expandafter
+      \expandafter\xdef
+      \expandafter\expandafter
+      \csname\the\macname xxx\endcsname
+      \paramlist{%
+          \egroup
+          \noexpand\norecurse{\the\macname}%
+          \noexpand\scanmacro{\temp}\egroup}%
+    \fi
+  \fi}
+
+\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
+
+% \braceorline decides whether the next nonwhitespace character is a
+% {.  If so it reads up to the closing }, if not, it reads the whole
+% line.  Whatever was read is then fed to the next control sequence
+% as an argument (by \parsebrace or \parsearg)
+\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
+\def\braceorlinexxx{%
+  \ifx\nchar\bgroup\else
+    \expandafter\parsearg
+  \fi \macnamexxx}
+
+
+% @alias.
+% We need some trickery to remove the optional spaces around the equal
+% sign.  Just make them active and then expand them all to nothing.
+\def\alias{\parseargusing\obeyspaces\aliasxxx}
+\def\aliasxxx #1{\aliasyyy#1\relax}
+\def\aliasyyy #1=#2\relax{%
+  {%
+    \expandafter\let\obeyedspace=\empty
+    \addtomacrolist{#1}%
+    \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
+  }%
+  \next
+}
+
+
+\message{cross references,}
+
+\newwrite\auxfile
+\newif\ifhavexrefs    % True if xref values are known.
+\newif\ifwarnedxrefs  % True if we warned once that they aren't known.
+
+% @inforef is relatively simple.
+\def\inforef #1{\inforefzzz #1,,,,**}
+\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+  node \samp{\ignorespaces#1{}}}
+
+% @node's only job in TeX is to define \lastnode, which is used in
+% cross-references.  The @node line might or might not have commas, and
+% might or might not have spaces before the first comma, like:
+% @node foo , bar , ...
+% We don't want such trailing spaces in the node name.
+%
+\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
+%
+% also remove a trailing comma, in case of something like this:
+% @node Help-Cross,  ,  , Cross-refs
+\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
+\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
+
+\let\nwnode=\node
+\let\lastnode=\empty
+
+% Write a cross-reference definition for the current node.  #1 is the
+% type (Ynumbered, Yappendix, Ynothing).
+%
+\def\donoderef#1{%
+  \ifx\lastnode\empty\else
+    \setref{\lastnode}{#1}%
+    \global\let\lastnode=\empty
+  \fi
+}
+
+% @anchor{NAME} -- define xref target at arbitrary point.
+%
+\newcount\savesfregister
+%
+\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
+\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
+\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
+
+% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
+% anchor), which consists of three parts:
+% 1) NAME-title - the current sectioning name taken from \lastsection,
+%                 or the anchor name.
+% 2) NAME-snt   - section number and type, passed as the SNT arg, or
+%                 empty for anchors.
+% 3) NAME-pg    - the page number.
+%
+% This is called from \donoderef, \anchor, and \dofloat.  In the case of
+% floats, there is an additional part, which is not written here:
+% 4) NAME-lof   - the text as it should appear in a @listoffloats.
+%
+\def\setref#1#2{%
+  \pdfmkdest{#1}%
+  \iflinks
+    {%
+      \atdummies  % preserve commands, but don't expand them
+      \edef\writexrdef##1##2{%
+       \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
+         ##1}{##2}}% these are parameters of \writexrdef
+      }%
+      \toks0 = \expandafter{\lastsection}%
+      \immediate \writexrdef{title}{\the\toks0 }%
+      \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
+      \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout
+    }%
+  \fi
+}
+
+% @xref, @pxref, and @ref generate cross-references.  For \xrefX, #1 is
+% the node name, #2 the name of the Info cross-reference, #3 the printed
+% node name, #4 the name of the Info file, #5 the name of the printed
+% manual.  All but the node name can be omitted.
+%
+\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
+\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
+\def\ref#1{\xrefX[#1,,,,,,,]}
+\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
+  \unsepspaces
+  \def\printedmanual{\ignorespaces #5}%
+  \def\printedrefname{\ignorespaces #3}%
+  \setbox1=\hbox{\printedmanual\unskip}%
+  \setbox0=\hbox{\printedrefname\unskip}%
+  \ifdim \wd0 = 0pt
+    % No printed node name was explicitly given.
+    \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
+      % Use the node name inside the square brackets.
+      \def\printedrefname{\ignorespaces #1}%
+    \else
+      % Use the actual chapter/section title appear inside
+      % the square brackets.  Use the real section title if we have it.
+      \ifdim \wd1 > 0pt
+        % It is in another manual, so we don't have it.
+        \def\printedrefname{\ignorespaces #1}%
+      \else
+        \ifhavexrefs
+          % We know the real title if we have the xref values.
+          \def\printedrefname{\refx{#1-title}{}}%
+        \else
+          % Otherwise just copy the Info node name.
+          \def\printedrefname{\ignorespaces #1}%
+        \fi%
+      \fi
+    \fi
+  \fi
+  %
+  % Make link in pdf output.
+  \ifpdf
+    \leavevmode
+    \getfilename{#4}%
+    {\indexnofonts
+     \turnoffactive
+     % See comments at \activebackslashdouble.
+     {\activebackslashdouble \xdef\pdfxrefdest{#1}%
+      \backslashparens\pdfxrefdest}%
+     %
+     \ifnum\filenamelength>0
+       \startlink attr{/Border [0 0 0]}%
+         goto file{\the\filename.pdf} name{\pdfxrefdest}%
+     \else
+       \startlink attr{/Border [0 0 0]}%
+         goto name{\pdfmkpgn{\pdfxrefdest}}%
+     \fi
+    }%
+    \setcolor{\linkcolor}%
+  \fi
+  %
+  % Float references are printed completely differently: "Figure 1.2"
+  % instead of "[somenode], p.3".  We distinguish them by the
+  % LABEL-title being set to a magic string.
+  {%
+    % Have to otherify everything special to allow the \csname to
+    % include an _ in the xref name, etc.
+    \indexnofonts
+    \turnoffactive
+    \expandafter\global\expandafter\let\expandafter\Xthisreftitle
+      \csname XR#1-title\endcsname
+  }%
+  \iffloat\Xthisreftitle
+    % If the user specified the print name (third arg) to the ref,
+    % print it instead of our usual "Figure 1.2".
+    \ifdim\wd0 = 0pt
+      \refx{#1-snt}{}%
+    \else
+      \printedrefname
+    \fi
+    %
+    % if the user also gave the printed manual name (fifth arg), append
+    % "in MANUALNAME".
+    \ifdim \wd1 > 0pt
+      \space \putwordin{} \cite{\printedmanual}%
+    \fi
+  \else
+    % node/anchor (non-float) references.
+    %
+    % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
+    % insert empty discretionaries after hyphens, which means that it will
+    % not find a line break at a hyphen in a node names.  Since some manuals
+    % are best written with fairly long node names, containing hyphens, this
+    % is a loss.  Therefore, we give the text of the node name again, so it
+    % is as if TeX is seeing it for the first time.
+    \ifdim \wd1 > 0pt
+      \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
+    \else
+      % _ (for example) has to be the character _ for the purposes of the
+      % control sequence corresponding to the node, but it has to expand
+      % into the usual \leavevmode...\vrule stuff for purposes of
+      % printing. So we \turnoffactive for the \refx-snt, back on for the
+      % printing, back off for the \refx-pg.
+      {\turnoffactive
+       % Only output a following space if the -snt ref is nonempty; for
+       % @unnumbered and @anchor, it won't be.
+       \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
+       \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
+      }%
+      % output the `[mynode]' via a macro so it can be overridden.
+      \xrefprintnodename\printedrefname
+      %
+      % But we always want a comma and a space:
+      ,\space
+      %
+      % output the `page 3'.
+      \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+    \fi
+  \fi
+  \endlink
+\endgroup}
+
+% This macro is called from \xrefX for the `[nodename]' part of xref
+% output.  It's a separate macro only so it can be changed more easily,
+% since square brackets don't work well in some documents.  Particularly
+% one that Bob is working on :).
+%
+\def\xrefprintnodename#1{[#1]}
+
+% Things referred to by \setref.
+%
+\def\Ynothing{}
+\def\Yomitfromtoc{}
+\def\Ynumbered{%
+  \ifnum\secno=0
+    \putwordChapter@tie \the\chapno
+  \else \ifnum\subsecno=0
+    \putwordSection@tie \the\chapno.\the\secno
+  \else \ifnum\subsubsecno=0
+    \putwordSection@tie \the\chapno.\the\secno.\the\subsecno
+  \else
+    \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
+  \fi\fi\fi
+}
+\def\Yappendix{%
+  \ifnum\secno=0
+     \putwordAppendix@tie @char\the\appendixno{}%
+  \else \ifnum\subsecno=0
+     \putwordSection@tie @char\the\appendixno.\the\secno
+  \else \ifnum\subsubsecno=0
+    \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
+  \else
+    \putwordSection@tie
+      @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
+  \fi\fi\fi
+}
+
+% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
+% If its value is nonempty, SUFFIX is output afterward.
+%
+\def\refx#1#2{%
+  {%
+    \indexnofonts
+    \otherbackslash
+    \expandafter\global\expandafter\let\expandafter\thisrefX
+      \csname XR#1\endcsname
+  }%
+  \ifx\thisrefX\relax
+    % If not defined, say something at least.
+    \angleleft un\-de\-fined\angleright
+    \iflinks
+      \ifhavexrefs
+        \message{\linenumber Undefined cross reference `#1'.}%
+      \else
+        \ifwarnedxrefs\else
+          \global\warnedxrefstrue
+          \message{Cross reference values unknown; you must run TeX again.}%
+        \fi
+      \fi
+    \fi
+  \else
+    % It's defined, so just use it.
+    \thisrefX
+  \fi
+  #2% Output the suffix in any case.
+}
+
+% This is the macro invoked by entries in the aux file.  Usually it's
+% just a \def (we prepend XR to the control sequence name to avoid
+% collisions).  But if this is a float type, we have more work to do.
+%
+\def\xrdef#1#2{%
+  {% The node name might contain 8-bit characters, which in our current
+   % implementation are changed to commands like @'e.  Don't let these
+   % mess up the control sequence name.
+    \indexnofonts
+    \turnoffactive
+    \xdef\safexrefname{#1}%
+  }%
+  %
+  \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
+  %
+  % Was that xref control sequence that we just defined for a float?
+  \expandafter\iffloat\csname XR\safexrefname\endcsname
+    % it was a float, and we have the (safe) float type in \iffloattype.
+    \expandafter\let\expandafter\floatlist
+      \csname floatlist\iffloattype\endcsname
+    %
+    % Is this the first time we've seen this float type?
+    \expandafter\ifx\floatlist\relax
+      \toks0 = {\do}% yes, so just \do
+    \else
+      % had it before, so preserve previous elements in list.
+      \toks0 = \expandafter{\floatlist\do}%
+    \fi
+    %
+    % Remember this xref in the control sequence \floatlistFLOATTYPE,
+    % for later use in \listoffloats.
+    \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
+      {\safexrefname}}%
+  \fi
+}
+
+% Read the last existing aux file, if any.  No error if none exists.
+%
+\def\tryauxfile{%
+  \openin 1 \jobname.aux
+  \ifeof 1 \else
+    \readdatafile{aux}%
+    \global\havexrefstrue
+  \fi
+  \closein 1
+}
+
+\def\setupdatafile{%
+  \catcode`\^^@=\other
+  \catcode`\^^A=\other
+  \catcode`\^^B=\other
+  \catcode`\^^C=\other
+  \catcode`\^^D=\other
+  \catcode`\^^E=\other
+  \catcode`\^^F=\other
+  \catcode`\^^G=\other
+  \catcode`\^^H=\other
+  \catcode`\^^K=\other
+  \catcode`\^^L=\other
+  \catcode`\^^N=\other
+  \catcode`\^^P=\other
+  \catcode`\^^Q=\other
+  \catcode`\^^R=\other
+  \catcode`\^^S=\other
+  \catcode`\^^T=\other
+  \catcode`\^^U=\other
+  \catcode`\^^V=\other
+  \catcode`\^^W=\other
+  \catcode`\^^X=\other
+  \catcode`\^^Z=\other
+  \catcode`\^^[=\other
+  \catcode`\^^\=\other
+  \catcode`\^^]=\other
+  \catcode`\^^^=\other
+  \catcode`\^^_=\other
+  % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
+  % in xref tags, i.e., node names.  But since ^^e4 notation isn't
+  % supported in the main text, it doesn't seem desirable.  Furthermore,
+  % that is not enough: for node names that actually contain a ^
+  % character, we would end up writing a line like this: 'xrdef {'hat
+  % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
+  % argument, and \hat is not an expandable control sequence.  It could
+  % all be worked out, but why?  Either we support ^^ or we don't.
+  %
+  % The other change necessary for this was to define \auxhat:
+  % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
+  % and then to call \auxhat in \setq.
+  %
+  \catcode`\^=\other
+  %
+  % Special characters.  Should be turned off anyway, but...
+  \catcode`\~=\other
+  \catcode`\[=\other
+  \catcode`\]=\other
+  \catcode`\"=\other
+  \catcode`\_=\other
+  \catcode`\|=\other
+  \catcode`\<=\other
+  \catcode`\>=\other
+  \catcode`\$=\other
+  \catcode`\#=\other
+  \catcode`\&=\other
+  \catcode`\%=\other
+  \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
+  %
+  % This is to support \ in node names and titles, since the \
+  % characters end up in a \csname.  It's easier than
+  % leaving it active and making its active definition an actual \
+  % character.  What I don't understand is why it works in the *value*
+  % of the xrdef.  Seems like it should be a catcode12 \, and that
+  % should not typeset properly.  But it works, so I'm moving on for
+  % now.  --karl, 15jan04.
+  \catcode`\\=\other
+  %
+  % Make the characters 128-255 be printing characters.
+  {%
+    \count1=128
+    \def\loop{%
+      \catcode\count1=\other
+      \advance\count1 by 1
+      \ifnum \count1<256 \loop \fi
+    }%
+  }%
+  %
+  % @ is our escape character in .aux files, and we need braces.
+  \catcode`\{=1
+  \catcode`\}=2
+  \catcode`\@=0
+}
+
+\def\readdatafile#1{%
+\begingroup
+  \setupdatafile
+  \input\jobname.#1
+\endgroup}
+
+
+\message{insertions,}
+% including footnotes.
+
+\newcount \footnoteno
+
+% The trailing space in the following definition for supereject is
+% vital for proper filling; pages come out unaligned when you do a
+% pagealignmacro call if that space before the closing brace is
+% removed. (Generally, numeric constants should always be followed by a
+% space to prevent strange expansion errors.)
+\def\supereject{\par\penalty -20000\footnoteno =0 }
+
+% @footnotestyle is meaningful for info output only.
+\let\footnotestyle=\comment
+
+{\catcode `\@=11
+%
+% Auto-number footnotes.  Otherwise like plain.
+\gdef\footnote{%
+  \let\indent=\ptexindent
+  \let\noindent=\ptexnoindent
+  \global\advance\footnoteno by \@ne
+  \edef\thisfootno{$^{\the\footnoteno}$}%
+  %
+  % In case the footnote comes at the end of a sentence, preserve the
+  % extra spacing after we do the footnote number.
+  \let\@sf\empty
+  \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
+  %
+  % Remove inadvertent blank space before typesetting the footnote number.
+  \unskip
+  \thisfootno\@sf
+  \dofootnote
+}%
+
+% Don't bother with the trickery in plain.tex to not require the
+% footnote text as a parameter.  Our footnotes don't need to be so general.
+%
+% Oh yes, they do; otherwise, @ifset (and anything else that uses
+% \parseargline) fails inside footnotes because the tokens are fixed when
+% the footnote is read.  --karl, 16nov96.
+%
+\gdef\dofootnote{%
+  \insert\footins\bgroup
+  % We want to typeset this text as a normal paragraph, even if the
+  % footnote reference occurs in (for example) a display environment.
+  % So reset some parameters.
+  \hsize=\pagewidth
+  \interlinepenalty\interfootnotelinepenalty
+  \splittopskip\ht\strutbox % top baseline for broken footnotes
+  \splitmaxdepth\dp\strutbox
+  \floatingpenalty\@MM
+  \leftskip\z@skip
+  \rightskip\z@skip
+  \spaceskip\z@skip
+  \xspaceskip\z@skip
+  \parindent\defaultparindent
+  %
+  \smallfonts \rm
+  %
+  % Because we use hanging indentation in footnotes, a @noindent appears
+  % to exdent this text, so make it be a no-op.  makeinfo does not use
+  % hanging indentation so @noindent can still be needed within footnote
+  % text after an @example or the like (not that this is good style).
+  \let\noindent = \relax
+  %
+  % Hang the footnote text off the number.  Use \everypar in case the
+  % footnote extends for more than one paragraph.
+  \everypar = {\hang}%
+  \textindent{\thisfootno}%
+  %
+  % Don't crash into the line above the footnote text.  Since this
+  % expands into a box, it must come within the paragraph, lest it
+  % provide a place where TeX can split the footnote.
+  \footstrut
+  \futurelet\next\fo@t
+}
+}%end \catcode `\@=11
+
+% In case a @footnote appears in a vbox, save the footnote text and create
+% the real \insert just after the vbox finished.  Otherwise, the insertion
+% would be lost.
+% Similarily, if a @footnote appears inside an alignment, save the footnote
+% text to a box and make the \insert when a row of the table is finished.
+% And the same can be done for other insert classes.  --kasal, 16nov03.
+
+% Replace the \insert primitive by a cheating macro.
+% Deeper inside, just make sure that the saved insertions are not spilled
+% out prematurely.
+%
+\def\startsavinginserts{%
+  \ifx \insert\ptexinsert
+    \let\insert\saveinsert
+  \else
+    \let\checkinserts\relax
+  \fi
+}
+
+% This \insert replacement works for both \insert\footins{foo} and
+% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
+%
+\def\saveinsert#1{%
+  \edef\next{\noexpand\savetobox \makeSAVEname#1}%
+  \afterassignment\next
+  % swallow the left brace
+  \let\temp =
+}
+\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
+\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
+
+\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
+
+\def\placesaveins#1{%
+  \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
+    {\box#1}%
+}
+
+% eat @SAVE -- beware, all of them have catcode \other:
+{
+  \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials  %  ;-)
+  \gdef\gobblesave @SAVE{}
+}
+
+% initialization:
+\def\newsaveins #1{%
+  \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
+  \next
+}
+\def\newsaveinsX #1{%
+  \csname newbox\endcsname #1%
+  \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
+    \checksaveins #1}%
+}
+
+% initialize:
+\let\checkinserts\empty
+\newsaveins\footins
+\newsaveins\margin
+
+
+% @image.  We use the macros from epsf.tex to support this.
+% If epsf.tex is not installed and @image is used, we complain.
+%
+% Check for and read epsf.tex up front.  If we read it only at @image
+% time, we might be inside a group, and then its definitions would get
+% undone and the next image would fail.
+\openin 1 = epsf.tex
+\ifeof 1 \else
+  % Do not bother showing banner with epsf.tex v2.7k (available in
+  % doc/epsf.tex and on ctan).
+  \def\epsfannounce{\toks0 = }%
+  \input epsf.tex
+\fi
+\closein 1
+%
+% We will only complain once about lack of epsf.tex.
+\newif\ifwarnednoepsf
+\newhelp\noepsfhelp{epsf.tex must be installed for images to
+  work.  It is also included in the Texinfo distribution, or you can get
+  it from ftp://tug.org/tex/epsf.tex.}
+%
+\def\image#1{%
+  \ifx\epsfbox\undefined
+    \ifwarnednoepsf \else
+      \errhelp = \noepsfhelp
+      \errmessage{epsf.tex not found, images will be ignored}%
+      \global\warnednoepsftrue
+    \fi
+  \else
+    \imagexxx #1,,,,,\finish
+  \fi
+}
+%
+% Arguments to @image:
+% #1 is (mandatory) image filename; we tack on .eps extension.
+% #2 is (optional) width, #3 is (optional) height.
+% #4 is (ignored optional) html alt text.
+% #5 is (ignored optional) extension.
+% #6 is just the usual extra ignored arg for parsing this stuff.
+\newif\ifimagevmode
+\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
+  \catcode`\^^M = 5     % in case we're inside an example
+  \normalturnoffactive  % allow _ et al. in names
+  % If the image is by itself, center it.
+  \ifvmode
+    \imagevmodetrue
+    \nobreak\bigskip
+    % Usually we'll have text after the image which will insert
+    % \parskip glue, so insert it here too to equalize the space
+    % above and below.
+    \nobreak\vskip\parskip
+    \nobreak
+    \line\bgroup
+  \fi
+  %
+  % Output the image.
+  \ifpdf
+    \dopdfimage{#1}{#2}{#3}%
+  \else
+    % \epsfbox itself resets \epsf?size at each figure.
+    \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
+    \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
+    \epsfbox{#1.eps}%
+  \fi
+  %
+  \ifimagevmode \egroup \bigbreak \fi  % space after the image
+\endgroup}
+
+
+% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
+% etc.  We don't actually implement floating yet, we always include the
+% float "here".  But it seemed the best name for the future.
+%
+\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
+
+% There may be a space before second and/or third parameter; delete it.
+\def\eatcommaspace#1, {#1,}
+
+% #1 is the optional FLOATTYPE, the text label for this float, typically
+% "Figure", "Table", "Example", etc.  Can't contain commas.  If omitted,
+% this float will not be numbered and cannot be referred to.
+%
+% #2 is the optional xref label.  Also must be present for the float to
+% be referable.
+%
+% #3 is the optional positioning argument; for now, it is ignored.  It
+% will somehow specify the positions allowed to float to (here, top, bottom).
+%
+% We keep a separate counter for each FLOATTYPE, which we reset at each
+% chapter-level command.
+\let\resetallfloatnos=\empty
+%
+\def\dofloat#1,#2,#3,#4\finish{%
+  \let\thiscaption=\empty
+  \let\thisshortcaption=\empty
+  %
+  % don't lose footnotes inside @float.
+  %
+  % BEWARE: when the floats start float, we have to issue warning whenever an
+  % insert appears inside a float which could possibly float. --kasal, 26may04
+  %
+  \startsavinginserts
+  %
+  % We can't be used inside a paragraph.
+  \par
+  %
+  \vtop\bgroup
+    \def\floattype{#1}%
+    \def\floatlabel{#2}%
+    \def\floatloc{#3}% we do nothing with this yet.
+    %
+    \ifx\floattype\empty
+      \let\safefloattype=\empty
+    \else
+      {%
+        % the floattype might have accents or other special characters,
+        % but we need to use it in a control sequence name.
+        \indexnofonts
+        \turnoffactive
+        \xdef\safefloattype{\floattype}%
+      }%
+    \fi
+    %
+    % If label is given but no type, we handle that as the empty type.
+    \ifx\floatlabel\empty \else
+      % We want each FLOATTYPE to be numbered separately (Figure 1,
+      % Table 1, Figure 2, ...).  (And if no label, no number.)
+      %
+      \expandafter\getfloatno\csname\safefloattype floatno\endcsname
+      \global\advance\floatno by 1
+      %
+      {%
+        % This magic value for \lastsection is output by \setref as the
+        % XREFLABEL-title value.  \xrefX uses it to distinguish float
+        % labels (which have a completely different output format) from
+        % node and anchor labels.  And \xrdef uses it to construct the
+        % lists of floats.
+        %
+        \edef\lastsection{\floatmagic=\safefloattype}%
+        \setref{\floatlabel}{Yfloat}%
+      }%
+    \fi
+    %
+    % start with \parskip glue, I guess.
+    \vskip\parskip
+    %
+    % Don't suppress indentation if a float happens to start a section.
+    \restorefirstparagraphindent
+}
+
+% we have these possibilities:
+% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
+% @float Foo,lbl & no caption:    Foo 1.1
+% @float Foo & @caption{Cap}:     Foo: Cap
+% @float Foo & no caption:        Foo
+% @float ,lbl & Caption{Cap}:     1.1: Cap
+% @float ,lbl & no caption:       1.1
+% @float & @caption{Cap}:         Cap
+% @float & no caption:
+%
+\def\Efloat{%
+    \let\floatident = \empty
+    %
+    % In all cases, if we have a float type, it comes first.
+    \ifx\floattype\empty \else \def\floatident{\floattype}\fi
+    %
+    % If we have an xref label, the number comes next.
+    \ifx\floatlabel\empty \else
+      \ifx\floattype\empty \else % if also had float type, need tie first.
+        \appendtomacro\floatident{\tie}%
+      \fi
+      % the number.
+      \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
+    \fi
+    %
+    % Start the printed caption with what we've constructed in
+    % \floatident, but keep it separate; we need \floatident again.
+    \let\captionline = \floatident
+    %
+    \ifx\thiscaption\empty \else
+      \ifx\floatident\empty \else
+       \appendtomacro\captionline{: }% had ident, so need a colon between
+      \fi
+      %
+      % caption text.
+      \appendtomacro\captionline{\scanexp\thiscaption}%
+    \fi
+    %
+    % If we have anything to print, print it, with space before.
+    % Eventually this needs to become an \insert.
+    \ifx\captionline\empty \else
+      \vskip.5\parskip
+      \captionline
+      %
+      % Space below caption.
+      \vskip\parskip
+    \fi
+    %
+    % If have an xref label, write the list of floats info.  Do this
+    % after the caption, to avoid chance of it being a breakpoint.
+    \ifx\floatlabel\empty \else
+      % Write the text that goes in the lof to the aux file as
+      % \floatlabel-lof.  Besides \floatident, we include the short
+      % caption if specified, else the full caption if specified, else nothing.
+      {%
+        \atdummies
+        %
+        % since we read the caption text in the macro world, where ^^M
+        % is turned into a normal character, we have to scan it back, so
+        % we don't write the literal three characters "^^M" into the aux file.
+       \scanexp{%
+         \xdef\noexpand\gtemp{%
+           \ifx\thisshortcaption\empty
+             \thiscaption
+           \else
+             \thisshortcaption
+           \fi
+         }%
+       }%
+        \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
+         \ifx\gtemp\empty \else : \gtemp \fi}}%
+      }%
+    \fi
+  \egroup  % end of \vtop
+  %
+  % place the captured inserts
+  %
+  % BEWARE: when the floats start floating, we have to issue warning
+  % whenever an insert appears inside a float which could possibly
+  % float. --kasal, 26may04
+  %
+  \checkinserts
+}
+
+% Append the tokens #2 to the definition of macro #1, not expanding either.
+%
+\def\appendtomacro#1#2{%
+  \expandafter\def\expandafter#1\expandafter{#1#2}%
+}
+
+% @caption, @shortcaption
+%
+\def\caption{\docaption\thiscaption}
+\def\shortcaption{\docaption\thisshortcaption}
+\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
+\def\defcaption#1#2{\egroup \def#1{#2}}
+
+% The parameter is the control sequence identifying the counter we are
+% going to use.  Create it if it doesn't exist and assign it to \floatno.
+\def\getfloatno#1{%
+  \ifx#1\relax
+      % Haven't seen this figure type before.
+      \csname newcount\endcsname #1%
+      %
+      % Remember to reset this floatno at the next chap.
+      \expandafter\gdef\expandafter\resetallfloatnos
+        \expandafter{\resetallfloatnos #1=0 }%
+  \fi
+  \let\floatno#1%
+}
+
+% \setref calls this to get the XREFLABEL-snt value.  We want an @xref
+% to the FLOATLABEL to expand to "Figure 3.1".  We call \setref when we
+% first read the @float command.
+%
+\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
+
+% Magic string used for the XREFLABEL-title value, so \xrefX can
+% distinguish floats from other xref types.
+\def\floatmagic{!!float!!}
+
+% #1 is the control sequence we are passed; we expand into a conditional
+% which is true if #1 represents a float ref.  That is, the magic
+% \lastsection value which we \setref above.
+%
+\def\iffloat#1{\expandafter\doiffloat#1==\finish}
+%
+% #1 is (maybe) the \floatmagic string.  If so, #2 will be the
+% (safe) float type for this float.  We set \iffloattype to #2.
+%
+\def\doiffloat#1=#2=#3\finish{%
+  \def\temp{#1}%
+  \def\iffloattype{#2}%
+  \ifx\temp\floatmagic
+}
+
+% @listoffloats FLOATTYPE - print a list of floats like a table of contents.
+%
+\parseargdef\listoffloats{%
+  \def\floattype{#1}% floattype
+  {%
+    % the floattype might have accents or other special characters,
+    % but we need to use it in a control sequence name.
+    \indexnofonts
+    \turnoffactive
+    \xdef\safefloattype{\floattype}%
+  }%
+  %
+  % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
+  \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
+    \ifhavexrefs
+      % if the user said @listoffloats foo but never @float foo.
+      \message{\linenumber No `\safefloattype' floats to list.}%
+    \fi
+  \else
+    \begingroup
+      \leftskip=\tocindent  % indent these entries like a toc
+      \let\do=\listoffloatsdo
+      \csname floatlist\safefloattype\endcsname
+    \endgroup
+  \fi
+}
+
+% This is called on each entry in a list of floats.  We're passed the
+% xref label, in the form LABEL-title, which is how we save it in the
+% aux file.  We strip off the -title and look up \XRLABEL-lof, which
+% has the text we're supposed to typeset here.
+%
+% Figures without xref labels will not be included in the list (since
+% they won't appear in the aux file).
+%
+\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
+\def\listoffloatsdoentry#1-title\finish{{%
+  % Can't fully expand XR#1-lof because it can contain anything.  Just
+  % pass the control sequence.  On the other hand, XR#1-pg is just the
+  % page number, and we want to fully expand that so we can get a link
+  % in pdf output.
+  \toksA = \expandafter{\csname XR#1-lof\endcsname}%
+  %
+  % use the same \entry macro we use to generate the TOC and index.
+  \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
+  \writeentry
+}}
+
+
+\message{localization,}
+
+% @documentlanguage is usually given very early, just after
+% @setfilename.  If done too late, it may not override everything
+% properly.  Single argument is the language (de) or locale (de_DE)
+% abbreviation.  It would be nice if we could set up a hyphenation file.
+%
+{
+  \catcode`\_ = \active
+  \globaldefs=1
+\parseargdef\documentlanguage{\begingroup
+  \let_=\normalunderscore  % normal _ character for filenames
+  \tex % read txi-??.tex file in plain TeX.
+    % Read the file by the name they passed if it exists.
+    \openin 1 txi-#1.tex
+    \ifeof 1
+      \documentlanguagetrywithoutunderscore{#1_\finish}%
+    \else
+      \input txi-#1.tex
+    \fi
+    \closein 1
+  \endgroup
+\endgroup}
+}
+%
+% If they passed de_DE, and txi-de_DE.tex doesn't exist,
+% try txi-de.tex.
+% 
+\def\documentlanguagetrywithoutunderscore#1_#2\finish{%
+  \openin 1 txi-#1.tex
+  \ifeof 1
+    \errhelp = \nolanghelp
+    \errmessage{Cannot read language file txi-#1.tex}%
+  \else
+    \input txi-#1.tex
+  \fi
+  \closein 1
+}
+%
+\newhelp\nolanghelp{The given language definition file cannot be found or
+is empty.  Maybe you need to install it?  In the current directory
+should work if nowhere else does.}
+
+% Set the catcode of characters 128 through 255 to the specified number.
+%
+\def\setnonasciicharscatcode#1{%
+   \count255=128
+   \loop\ifnum\count255<256
+      \global\catcode\count255=#1\relax
+      \advance\count255 by 1
+   \repeat
+}
+
+\def\setnonasciicharscatcodenonglobal#1{%
+   \count255=128
+   \loop\ifnum\count255<256
+      \catcode\count255=#1\relax
+      \advance\count255 by 1
+   \repeat
+}
+
+% @documentencoding sets the definition of non-ASCII characters
+% according to the specified encoding.
+%
+\parseargdef\documentencoding{%
+  % Encoding being declared for the document.
+  \def\declaredencoding{\csname #1.enc\endcsname}%
+  %
+  % Supported encodings: names converted to tokens in order to be able
+  % to compare them with \ifx.
+  \def\ascii{\csname US-ASCII.enc\endcsname}%
+  \def\latnine{\csname ISO-8859-15.enc\endcsname}%
+  \def\latone{\csname ISO-8859-1.enc\endcsname}%
+  \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
+  \def\utfeight{\csname UTF-8.enc\endcsname}%
+  %
+  \ifx \declaredencoding \ascii
+     \asciichardefs
+  %
+  \else \ifx \declaredencoding \lattwo
+     \setnonasciicharscatcode\active
+     \lattwochardefs
+  %
+  \else \ifx \declaredencoding \latone 
+     \setnonasciicharscatcode\active
+     \latonechardefs
+  %
+  \else \ifx \declaredencoding \latnine
+     \setnonasciicharscatcode\active
+     \latninechardefs
+  %
+  \else \ifx \declaredencoding \utfeight
+     \setnonasciicharscatcode\active
+     \utfeightchardefs
+  %
+  \else 
+    \message{Unknown document encoding #1, ignoring.}%
+  %
+  \fi % utfeight
+  \fi % latnine
+  \fi % latone
+  \fi % lattwo
+  \fi % ascii
+}
+
+% A message to be logged when using a character that isn't available
+% the default font encoding (OT1).
+% 
+\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
+
+% Take account of \c (plain) vs. \, (Texinfo) difference.
+\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
+
+% First, make active non-ASCII characters in order for them to be
+% correctly categorized when TeX reads the replacement text of
+% macros containing the character definitions.
+\setnonasciicharscatcode\active
+%
+% Latin1 (ISO-8859-1) character definitions.
+\def\latonechardefs{%
+  \gdef^^a0{~} 
+  \gdef^^a1{\exclamdown}
+  \gdef^^a2{\missingcharmsg{CENT SIGN}} 
+  \gdef^^a3{{\pounds}}
+  \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+  \gdef^^a5{\missingcharmsg{YEN SIGN}}
+  \gdef^^a6{\missingcharmsg{BROKEN BAR}} 
+  \gdef^^a7{\S}
+  \gdef^^a8{\"{}} 
+  \gdef^^a9{\copyright} 
+  \gdef^^aa{\ordf}
+  \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} 
+  \gdef^^ac{$\lnot$}
+  \gdef^^ad{\-} 
+  \gdef^^ae{\registeredsymbol} 
+  \gdef^^af{\={}}
+  %
+  \gdef^^b0{\textdegree}
+  \gdef^^b1{$\pm$}
+  \gdef^^b2{$^2$}
+  \gdef^^b3{$^3$}
+  \gdef^^b4{\'{}}
+  \gdef^^b5{$\mu$}
+  \gdef^^b6{\P}
+  %
+  \gdef^^b7{$^.$}
+  \gdef^^b8{\cedilla\ }
+  \gdef^^b9{$^1$}
+  \gdef^^ba{\ordm}
+  %
+  \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
+  \gdef^^bc{$1\over4$}
+  \gdef^^bd{$1\over2$}
+  \gdef^^be{$3\over4$}
+  \gdef^^bf{\questiondown}
+  %
+  \gdef^^c0{\`A}
+  \gdef^^c1{\'A}
+  \gdef^^c2{\^A}
+  \gdef^^c3{\~A}
+  \gdef^^c4{\"A}
+  \gdef^^c5{\ringaccent A} 
+  \gdef^^c6{\AE}
+  \gdef^^c7{\cedilla C}
+  \gdef^^c8{\`E}
+  \gdef^^c9{\'E}
+  \gdef^^ca{\^E}
+  \gdef^^cb{\"E}
+  \gdef^^cc{\`I}
+  \gdef^^cd{\'I}
+  \gdef^^ce{\^I}
+  \gdef^^cf{\"I}
+  %
+  \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}}
+  \gdef^^d1{\~N}
+  \gdef^^d2{\`O}
+  \gdef^^d3{\'O}
+  \gdef^^d4{\^O}
+  \gdef^^d5{\~O}
+  \gdef^^d6{\"O}
+  \gdef^^d7{$\times$}
+  \gdef^^d8{\O}
+  \gdef^^d9{\`U}
+  \gdef^^da{\'U}
+  \gdef^^db{\^U}
+  \gdef^^dc{\"U}
+  \gdef^^dd{\'Y}
+  \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}}
+  \gdef^^df{\ss}
+  %
+  \gdef^^e0{\`a}
+  \gdef^^e1{\'a}
+  \gdef^^e2{\^a}
+  \gdef^^e3{\~a}
+  \gdef^^e4{\"a}
+  \gdef^^e5{\ringaccent a}
+  \gdef^^e6{\ae}
+  \gdef^^e7{\cedilla c}
+  \gdef^^e8{\`e}
+  \gdef^^e9{\'e}
+  \gdef^^ea{\^e}
+  \gdef^^eb{\"e}
+  \gdef^^ec{\`{\dotless i}}
+  \gdef^^ed{\'{\dotless i}}
+  \gdef^^ee{\^{\dotless i}}
+  \gdef^^ef{\"{\dotless i}}
+  %
+  \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}}
+  \gdef^^f1{\~n}
+  \gdef^^f2{\`o}
+  \gdef^^f3{\'o}
+  \gdef^^f4{\^o}
+  \gdef^^f5{\~o}
+  \gdef^^f6{\"o}
+  \gdef^^f7{$\div$}
+  \gdef^^f8{\o}
+  \gdef^^f9{\`u}
+  \gdef^^fa{\'u}
+  \gdef^^fb{\^u}
+  \gdef^^fc{\"u}
+  \gdef^^fd{\'y}
+  \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}}
+  \gdef^^ff{\"y}
+}
+
+% Latin9 (ISO-8859-15) encoding character definitions.
+\def\latninechardefs{%
+  % Encoding is almost identical to Latin1.
+  \latonechardefs
+  %
+  \gdef^^a4{\euro}
+  \gdef^^a6{\v S}
+  \gdef^^a8{\v s}
+  \gdef^^b4{\v Z}
+  \gdef^^b8{\v z}
+  \gdef^^bc{\OE}
+  \gdef^^bd{\oe}
+  \gdef^^be{\"Y}
+}
+
+% Latin2 (ISO-8859-2) character definitions.
+\def\lattwochardefs{%
+  \gdef^^a0{~}
+  \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}}
+  \gdef^^a2{\u{}}
+  \gdef^^a3{\L}
+  \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+  \gdef^^a5{\v L}
+  \gdef^^a6{\'S}
+  \gdef^^a7{\S}
+  \gdef^^a8{\"{}}
+  \gdef^^a9{\v S}
+  \gdef^^aa{\cedilla S}
+  \gdef^^ab{\v T}
+  \gdef^^ac{\'Z}
+  \gdef^^ad{\-}
+  \gdef^^ae{\v Z}
+  \gdef^^af{\dotaccent Z}
+  %
+  \gdef^^b0{\textdegree}
+  \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}}
+  \gdef^^b2{\missingcharmsg{OGONEK}}
+  \gdef^^b3{\l}
+  \gdef^^b4{\'{}}
+  \gdef^^b5{\v l}
+  \gdef^^b6{\'s}
+  \gdef^^b7{\v{}}
+  \gdef^^b8{\cedilla\ }
+  \gdef^^b9{\v s}
+  \gdef^^ba{\cedilla s}
+  \gdef^^bb{\v t}
+  \gdef^^bc{\'z}
+  \gdef^^bd{\H{}}
+  \gdef^^be{\v z}
+  \gdef^^bf{\dotaccent z}
+  %
+  \gdef^^c0{\'R}
+  \gdef^^c1{\'A}
+  \gdef^^c2{\^A}
+  \gdef^^c3{\u A}
+  \gdef^^c4{\"A}
+  \gdef^^c5{\'L}
+  \gdef^^c6{\'C}
+  \gdef^^c7{\cedilla C}
+  \gdef^^c8{\v C}
+  \gdef^^c9{\'E}
+  \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}}
+  \gdef^^cb{\"E}
+  \gdef^^cc{\v E}
+  \gdef^^cd{\'I}
+  \gdef^^ce{\^I}
+  \gdef^^cf{\v D}
+  %
+  \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
+  \gdef^^d1{\'N}
+  \gdef^^d2{\v N}
+  \gdef^^d3{\'O}
+  \gdef^^d4{\^O}
+  \gdef^^d5{\H O}
+  \gdef^^d6{\"O}
+  \gdef^^d7{$\times$}
+  \gdef^^d8{\v R}
+  \gdef^^d9{\ringaccent U} 
+  \gdef^^da{\'U}
+  \gdef^^db{\H U}
+  \gdef^^dc{\"U}
+  \gdef^^dd{\'Y}
+  \gdef^^de{\cedilla T}
+  \gdef^^df{\ss}
+  %
+  \gdef^^e0{\'r}
+  \gdef^^e1{\'a}
+  \gdef^^e2{\^a}
+  \gdef^^e3{\u a}
+  \gdef^^e4{\"a}
+  \gdef^^e5{\'l}
+  \gdef^^e6{\'c}
+  \gdef^^e7{\cedilla c}
+  \gdef^^e8{\v c}
+  \gdef^^e9{\'e}
+  \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}}
+  \gdef^^eb{\"e}
+  \gdef^^ec{\v e}
+  \gdef^^ed{\'\i}
+  \gdef^^ee{\^\i}
+  \gdef^^ef{\v d}
+  %
+  \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
+  \gdef^^f1{\'n}
+  \gdef^^f2{\v n}
+  \gdef^^f3{\'o}
+  \gdef^^f4{\^o}
+  \gdef^^f5{\H o}
+  \gdef^^f6{\"o}
+  \gdef^^f7{$\div$}
+  \gdef^^f8{\v r}
+  \gdef^^f9{\ringaccent u}
+  \gdef^^fa{\'u}
+  \gdef^^fb{\H u}
+  \gdef^^fc{\"u}
+  \gdef^^fd{\'y}
+  \gdef^^fe{\cedilla t}
+  \gdef^^ff{\dotaccent{}}
+}
+
+% UTF-8 character definitions.
+% 
+% This code to support UTF-8 is based on LaTeX's utf8.def, with some
+% changes for Texinfo conventions.  It is included here under the GPL by
+% permission from Frank Mittelbach and the LaTeX team.
+% 
+\newcount\countUTFx
+\newcount\countUTFy
+\newcount\countUTFz
+
+\gdef\UTFviiiTwoOctets#1#2{\expandafter
+   \UTFviiiDefined\csname u8:#1\string #2\endcsname}
+%
+\gdef\UTFviiiThreeOctets#1#2#3{\expandafter
+   \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
+%
+\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
+   \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
+
+\gdef\UTFviiiDefined#1{%
+  \ifx #1\relax
+    \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+  \else
+    \expandafter #1%
+  \fi
+}
+
+\begingroup
+  \catcode`\~13
+  \catcode`\"12
+
+  \def\UTFviiiLoop{%
+    \global\catcode\countUTFx\active
+    \uccode`\~\countUTFx
+    \uppercase\expandafter{\UTFviiiTmp}%
+    \advance\countUTFx by 1
+    \ifnum\countUTFx < \countUTFy
+      \expandafter\UTFviiiLoop
+    \fi}
+
+  \countUTFx = "C2
+  \countUTFy = "E0
+  \def\UTFviiiTmp{%
+    \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
+  \UTFviiiLoop
+
+  \countUTFx = "E0
+  \countUTFy = "F0
+  \def\UTFviiiTmp{%
+    \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
+  \UTFviiiLoop
+
+  \countUTFx = "F0
+  \countUTFy = "F4
+  \def\UTFviiiTmp{%
+    \xdef~{\noexpand\UTFviiiFourOctets\string~}}
+  \UTFviiiLoop
+\endgroup
+
+\begingroup
+  \catcode`\"=12
+  \catcode`\<=12
+  \catcode`\.=12
+  \catcode`\,=12
+  \catcode`\;=12
+  \catcode`\!=12
+  \catcode`\~=13
+
+  \gdef\DeclareUnicodeCharacter#1#2{%
+    \countUTFz = "#1\relax
+    \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
+    \begingroup
+      \parseXMLCharref
+      \def\UTFviiiTwoOctets##1##2{%
+        \csname u8:##1\string ##2\endcsname}%
+      \def\UTFviiiThreeOctets##1##2##3{%
+        \csname u8:##1\string ##2\string ##3\endcsname}%
+      \def\UTFviiiFourOctets##1##2##3##4{%
+        \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
+      \expandafter\expandafter\expandafter\expandafter
+       \expandafter\expandafter\expandafter
+       \gdef\UTFviiiTmp{#2}%
+    \endgroup}
+
+  \gdef\parseXMLCharref{%
+    \ifnum\countUTFz < "A0\relax
+      \errhelp = \EMsimple
+      \errmessage{Cannot define Unicode char value < 00A0}%
+    \else\ifnum\countUTFz < "800\relax
+      \parseUTFviiiA,%
+      \parseUTFviiiB C\UTFviiiTwoOctets.,%
+    \else\ifnum\countUTFz < "10000\relax
+      \parseUTFviiiA;%
+      \parseUTFviiiA,%
+      \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
+    \else
+      \parseUTFviiiA;%
+      \parseUTFviiiA,%
+      \parseUTFviiiA!%
+      \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
+    \fi\fi\fi
+  }
+
+  \gdef\parseUTFviiiA#1{%
+    \countUTFx = \countUTFz
+    \divide\countUTFz by 64
+    \countUTFy = \countUTFz
+    \multiply\countUTFz by 64
+    \advance\countUTFx by -\countUTFz
+    \advance\countUTFx by 128
+    \uccode `#1\countUTFx
+    \countUTFz = \countUTFy}
+
+  \gdef\parseUTFviiiB#1#2#3#4{%
+    \advance\countUTFz by "#10\relax
+    \uccode `#3\countUTFz
+    \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
+\endgroup
+
+\def\utfeightchardefs{%
+  \DeclareUnicodeCharacter{00A0}{\tie}
+  \DeclareUnicodeCharacter{00A1}{\exclamdown}
+  \DeclareUnicodeCharacter{00A3}{\pounds}
+  \DeclareUnicodeCharacter{00A8}{\"{ }}
+  \DeclareUnicodeCharacter{00A9}{\copyright}
+  \DeclareUnicodeCharacter{00AA}{\ordf}
+  \DeclareUnicodeCharacter{00AB}{\guillemetleft}
+  \DeclareUnicodeCharacter{00AD}{\-}
+  \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
+  \DeclareUnicodeCharacter{00AF}{\={ }}
+
+  \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
+  \DeclareUnicodeCharacter{00B4}{\'{ }}
+  \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
+  \DeclareUnicodeCharacter{00BA}{\ordm}
+  \DeclareUnicodeCharacter{00BB}{\guillemetright}
+  \DeclareUnicodeCharacter{00BF}{\questiondown}
+
+  \DeclareUnicodeCharacter{00C0}{\`A}
+  \DeclareUnicodeCharacter{00C1}{\'A}
+  \DeclareUnicodeCharacter{00C2}{\^A}
+  \DeclareUnicodeCharacter{00C3}{\~A}
+  \DeclareUnicodeCharacter{00C4}{\"A}
+  \DeclareUnicodeCharacter{00C5}{\AA}
+  \DeclareUnicodeCharacter{00C6}{\AE}
+  \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
+  \DeclareUnicodeCharacter{00C8}{\`E}
+  \DeclareUnicodeCharacter{00C9}{\'E}
+  \DeclareUnicodeCharacter{00CA}{\^E}
+  \DeclareUnicodeCharacter{00CB}{\"E}
+  \DeclareUnicodeCharacter{00CC}{\`I}
+  \DeclareUnicodeCharacter{00CD}{\'I}
+  \DeclareUnicodeCharacter{00CE}{\^I}
+  \DeclareUnicodeCharacter{00CF}{\"I}
+
+  \DeclareUnicodeCharacter{00D1}{\~N}
+  \DeclareUnicodeCharacter{00D2}{\`O}
+  \DeclareUnicodeCharacter{00D3}{\'O}
+  \DeclareUnicodeCharacter{00D4}{\^O}
+  \DeclareUnicodeCharacter{00D5}{\~O}
+  \DeclareUnicodeCharacter{00D6}{\"O}
+  \DeclareUnicodeCharacter{00D8}{\O}
+  \DeclareUnicodeCharacter{00D9}{\`U}
+  \DeclareUnicodeCharacter{00DA}{\'U}
+  \DeclareUnicodeCharacter{00DB}{\^U}
+  \DeclareUnicodeCharacter{00DC}{\"U}
+  \DeclareUnicodeCharacter{00DD}{\'Y}
+  \DeclareUnicodeCharacter{00DF}{\ss}
+
+  \DeclareUnicodeCharacter{00E0}{\`a}
+  \DeclareUnicodeCharacter{00E1}{\'a}
+  \DeclareUnicodeCharacter{00E2}{\^a}
+  \DeclareUnicodeCharacter{00E3}{\~a}
+  \DeclareUnicodeCharacter{00E4}{\"a}
+  \DeclareUnicodeCharacter{00E5}{\aa}
+  \DeclareUnicodeCharacter{00E6}{\ae}
+  \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
+  \DeclareUnicodeCharacter{00E8}{\`e}
+  \DeclareUnicodeCharacter{00E9}{\'e}
+  \DeclareUnicodeCharacter{00EA}{\^e}
+  \DeclareUnicodeCharacter{00EB}{\"e}
+  \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
+  \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
+  \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
+  \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
+
+  \DeclareUnicodeCharacter{00F1}{\~n}
+  \DeclareUnicodeCharacter{00F2}{\`o}
+  \DeclareUnicodeCharacter{00F3}{\'o}
+  \DeclareUnicodeCharacter{00F4}{\^o}
+  \DeclareUnicodeCharacter{00F5}{\~o}
+  \DeclareUnicodeCharacter{00F6}{\"o}
+  \DeclareUnicodeCharacter{00F8}{\o}
+  \DeclareUnicodeCharacter{00F9}{\`u}
+  \DeclareUnicodeCharacter{00FA}{\'u}
+  \DeclareUnicodeCharacter{00FB}{\^u}
+  \DeclareUnicodeCharacter{00FC}{\"u}
+  \DeclareUnicodeCharacter{00FD}{\'y}
+  \DeclareUnicodeCharacter{00FF}{\"y}
+
+  \DeclareUnicodeCharacter{0100}{\=A}
+  \DeclareUnicodeCharacter{0101}{\=a}
+  \DeclareUnicodeCharacter{0102}{\u{A}}
+  \DeclareUnicodeCharacter{0103}{\u{a}}
+  \DeclareUnicodeCharacter{0106}{\'C}
+  \DeclareUnicodeCharacter{0107}{\'c}
+  \DeclareUnicodeCharacter{0108}{\^C}
+  \DeclareUnicodeCharacter{0109}{\^c}
+  \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
+  \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
+  \DeclareUnicodeCharacter{010C}{\v{C}}
+  \DeclareUnicodeCharacter{010D}{\v{c}}
+  \DeclareUnicodeCharacter{010E}{\v{D}}
+
+  \DeclareUnicodeCharacter{0112}{\=E}
+  \DeclareUnicodeCharacter{0113}{\=e}
+  \DeclareUnicodeCharacter{0114}{\u{E}}
+  \DeclareUnicodeCharacter{0115}{\u{e}}
+  \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
+  \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
+  \DeclareUnicodeCharacter{011A}{\v{E}}
+  \DeclareUnicodeCharacter{011B}{\v{e}}
+  \DeclareUnicodeCharacter{011C}{\^G}
+  \DeclareUnicodeCharacter{011D}{\^g}
+  \DeclareUnicodeCharacter{011E}{\u{G}}
+  \DeclareUnicodeCharacter{011F}{\u{g}}
+
+  \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
+  \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
+  \DeclareUnicodeCharacter{0124}{\^H}
+  \DeclareUnicodeCharacter{0125}{\^h}
+  \DeclareUnicodeCharacter{0128}{\~I}
+  \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
+  \DeclareUnicodeCharacter{012A}{\=I}
+  \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
+  \DeclareUnicodeCharacter{012C}{\u{I}}
+  \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
+
+  \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
+  \DeclareUnicodeCharacter{0131}{\dotless{i}}
+  \DeclareUnicodeCharacter{0132}{IJ}
+  \DeclareUnicodeCharacter{0133}{ij}
+  \DeclareUnicodeCharacter{0134}{\^J}
+  \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
+  \DeclareUnicodeCharacter{0139}{\'L}
+  \DeclareUnicodeCharacter{013A}{\'l}
+
+  \DeclareUnicodeCharacter{0141}{\L}
+  \DeclareUnicodeCharacter{0142}{\l}
+  \DeclareUnicodeCharacter{0143}{\'N}
+  \DeclareUnicodeCharacter{0144}{\'n}
+  \DeclareUnicodeCharacter{0147}{\v{N}}
+  \DeclareUnicodeCharacter{0148}{\v{n}}
+  \DeclareUnicodeCharacter{014C}{\=O}
+  \DeclareUnicodeCharacter{014D}{\=o}
+  \DeclareUnicodeCharacter{014E}{\u{O}}
+  \DeclareUnicodeCharacter{014F}{\u{o}}
+
+  \DeclareUnicodeCharacter{0150}{\H{O}}
+  \DeclareUnicodeCharacter{0151}{\H{o}}
+  \DeclareUnicodeCharacter{0152}{\OE}
+  \DeclareUnicodeCharacter{0153}{\oe}
+  \DeclareUnicodeCharacter{0154}{\'R}
+  \DeclareUnicodeCharacter{0155}{\'r}
+  \DeclareUnicodeCharacter{0158}{\v{R}}
+  \DeclareUnicodeCharacter{0159}{\v{r}}
+  \DeclareUnicodeCharacter{015A}{\'S}
+  \DeclareUnicodeCharacter{015B}{\'s}
+  \DeclareUnicodeCharacter{015C}{\^S}
+  \DeclareUnicodeCharacter{015D}{\^s}
+  \DeclareUnicodeCharacter{015E}{\cedilla{S}}
+  \DeclareUnicodeCharacter{015F}{\cedilla{s}}
+
+  \DeclareUnicodeCharacter{0160}{\v{S}}
+  \DeclareUnicodeCharacter{0161}{\v{s}}
+  \DeclareUnicodeCharacter{0162}{\cedilla{t}}
+  \DeclareUnicodeCharacter{0163}{\cedilla{T}}
+  \DeclareUnicodeCharacter{0164}{\v{T}}
+
+  \DeclareUnicodeCharacter{0168}{\~U}
+  \DeclareUnicodeCharacter{0169}{\~u}
+  \DeclareUnicodeCharacter{016A}{\=U}
+  \DeclareUnicodeCharacter{016B}{\=u}
+  \DeclareUnicodeCharacter{016C}{\u{U}}
+  \DeclareUnicodeCharacter{016D}{\u{u}}
+  \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
+  \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
+
+  \DeclareUnicodeCharacter{0170}{\H{U}}
+  \DeclareUnicodeCharacter{0171}{\H{u}}
+  \DeclareUnicodeCharacter{0174}{\^W}
+  \DeclareUnicodeCharacter{0175}{\^w}
+  \DeclareUnicodeCharacter{0176}{\^Y}
+  \DeclareUnicodeCharacter{0177}{\^y}
+  \DeclareUnicodeCharacter{0178}{\"Y}
+  \DeclareUnicodeCharacter{0179}{\'Z}
+  \DeclareUnicodeCharacter{017A}{\'z}
+  \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
+  \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
+  \DeclareUnicodeCharacter{017D}{\v{Z}}
+  \DeclareUnicodeCharacter{017E}{\v{z}}
+
+  \DeclareUnicodeCharacter{01C4}{D\v{Z}}
+  \DeclareUnicodeCharacter{01C5}{D\v{z}}
+  \DeclareUnicodeCharacter{01C6}{d\v{z}}
+  \DeclareUnicodeCharacter{01C7}{LJ}
+  \DeclareUnicodeCharacter{01C8}{Lj}
+  \DeclareUnicodeCharacter{01C9}{lj}
+  \DeclareUnicodeCharacter{01CA}{NJ}
+  \DeclareUnicodeCharacter{01CB}{Nj}
+  \DeclareUnicodeCharacter{01CC}{nj}
+  \DeclareUnicodeCharacter{01CD}{\v{A}}
+  \DeclareUnicodeCharacter{01CE}{\v{a}}
+  \DeclareUnicodeCharacter{01CF}{\v{I}}
+
+  \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
+  \DeclareUnicodeCharacter{01D1}{\v{O}}
+  \DeclareUnicodeCharacter{01D2}{\v{o}}
+  \DeclareUnicodeCharacter{01D3}{\v{U}}
+  \DeclareUnicodeCharacter{01D4}{\v{u}}
+
+  \DeclareUnicodeCharacter{01E2}{\={\AE}}
+  \DeclareUnicodeCharacter{01E3}{\={\ae}}
+  \DeclareUnicodeCharacter{01E6}{\v{G}}
+  \DeclareUnicodeCharacter{01E7}{\v{g}}
+  \DeclareUnicodeCharacter{01E8}{\v{K}}
+  \DeclareUnicodeCharacter{01E9}{\v{k}}
+
+  \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
+  \DeclareUnicodeCharacter{01F1}{DZ}
+  \DeclareUnicodeCharacter{01F2}{Dz}
+  \DeclareUnicodeCharacter{01F3}{dz}
+  \DeclareUnicodeCharacter{01F4}{\'G}
+  \DeclareUnicodeCharacter{01F5}{\'g}
+  \DeclareUnicodeCharacter{01F8}{\`N}
+  \DeclareUnicodeCharacter{01F9}{\`n}
+  \DeclareUnicodeCharacter{01FC}{\'{\AE}}
+  \DeclareUnicodeCharacter{01FD}{\'{\ae}}
+  \DeclareUnicodeCharacter{01FE}{\'{\O}}
+  \DeclareUnicodeCharacter{01FF}{\'{\o}}
+
+  \DeclareUnicodeCharacter{021E}{\v{H}}
+  \DeclareUnicodeCharacter{021F}{\v{h}}
+
+  \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
+  \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
+  \DeclareUnicodeCharacter{0228}{\cedilla{E}}
+  \DeclareUnicodeCharacter{0229}{\cedilla{e}}
+  \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
+  \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
+
+  \DeclareUnicodeCharacter{0232}{\=Y}
+  \DeclareUnicodeCharacter{0233}{\=y}
+  \DeclareUnicodeCharacter{0237}{\dotless{j}}
+
+  \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
+  \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
+  \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
+  \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
+  \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
+  \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
+  \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
+  \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
+  \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
+  \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
+  \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
+  \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
+
+  \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
+  \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
+
+  \DeclareUnicodeCharacter{1E20}{\=G}
+  \DeclareUnicodeCharacter{1E21}{\=g}
+  \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
+  \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
+  \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
+  \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
+  \DeclareUnicodeCharacter{1E26}{\"H}
+  \DeclareUnicodeCharacter{1E27}{\"h}
+
+  \DeclareUnicodeCharacter{1E30}{\'K}
+  \DeclareUnicodeCharacter{1E31}{\'k}
+  \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
+  \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
+  \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
+  \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
+  \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
+  \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
+  \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
+  \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
+  \DeclareUnicodeCharacter{1E3E}{\'M}
+  \DeclareUnicodeCharacter{1E3F}{\'m}
+
+  \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
+  \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
+  \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
+  \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
+  \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
+  \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
+  \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
+  \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
+  \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
+  \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
+
+  \DeclareUnicodeCharacter{1E54}{\'P}
+  \DeclareUnicodeCharacter{1E55}{\'p}
+  \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
+  \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
+  \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
+  \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
+  \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
+  \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
+  \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
+  \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
+
+  \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
+  \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
+  \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
+  \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
+  \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
+  \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
+  \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
+  \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
+  \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
+  \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
+
+  \DeclareUnicodeCharacter{1E7C}{\~V}
+  \DeclareUnicodeCharacter{1E7D}{\~v}
+  \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
+  \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
+
+  \DeclareUnicodeCharacter{1E80}{\`W}
+  \DeclareUnicodeCharacter{1E81}{\`w}
+  \DeclareUnicodeCharacter{1E82}{\'W}
+  \DeclareUnicodeCharacter{1E83}{\'w}
+  \DeclareUnicodeCharacter{1E84}{\"W}
+  \DeclareUnicodeCharacter{1E85}{\"w}
+  \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
+  \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
+  \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
+  \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
+  \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
+  \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
+  \DeclareUnicodeCharacter{1E8C}{\"X}
+  \DeclareUnicodeCharacter{1E8D}{\"x}
+  \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
+  \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
+
+  \DeclareUnicodeCharacter{1E90}{\^Z}
+  \DeclareUnicodeCharacter{1E91}{\^z}
+  \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
+  \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
+  \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
+  \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
+  \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
+  \DeclareUnicodeCharacter{1E97}{\"t}
+  \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
+  \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
+
+  \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
+  \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
+
+  \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
+  \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
+  \DeclareUnicodeCharacter{1EBC}{\~E}
+  \DeclareUnicodeCharacter{1EBD}{\~e}
+
+  \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
+  \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
+  \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
+  \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
+
+  \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
+  \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
+
+  \DeclareUnicodeCharacter{1EF2}{\`Y}
+  \DeclareUnicodeCharacter{1EF3}{\`y}
+  \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
+
+  \DeclareUnicodeCharacter{1EF8}{\~Y}
+  \DeclareUnicodeCharacter{1EF9}{\~y}
+
+  \DeclareUnicodeCharacter{2013}{--}
+  \DeclareUnicodeCharacter{2014}{---}
+  \DeclareUnicodeCharacter{2018}{\quoteleft}
+  \DeclareUnicodeCharacter{2019}{\quoteright}
+  \DeclareUnicodeCharacter{201A}{\quotesinglbase}
+  \DeclareUnicodeCharacter{201C}{\quotedblleft}
+  \DeclareUnicodeCharacter{201D}{\quotedblright}
+  \DeclareUnicodeCharacter{201E}{\quotedblbase}
+  \DeclareUnicodeCharacter{2022}{\bullet}
+  \DeclareUnicodeCharacter{2026}{\dots}
+  \DeclareUnicodeCharacter{2039}{\guilsinglleft}
+  \DeclareUnicodeCharacter{203A}{\guilsinglright}
+  \DeclareUnicodeCharacter{20AC}{\euro}
+
+  \DeclareUnicodeCharacter{2192}{\expansion}
+  \DeclareUnicodeCharacter{21D2}{\result}
+
+  \DeclareUnicodeCharacter{2212}{\minus}
+  \DeclareUnicodeCharacter{2217}{\point}
+  \DeclareUnicodeCharacter{2261}{\equiv}
+}% end of \utfeightchardefs
+
+
+% US-ASCII character definitions.
+\def\asciichardefs{% nothing need be done
+   \relax
+}
+
+% Make non-ASCII characters printable again for compatibility with
+% existing Texinfo documents that may use them, even without declaring a
+% document encoding.
+%
+\setnonasciicharscatcode \other
+
+
+\message{formatting,}
+
+\newdimen\defaultparindent \defaultparindent = 15pt
+
+\chapheadingskip = 15pt plus 4pt minus 2pt
+\secheadingskip = 12pt plus 3pt minus 2pt
+\subsecheadingskip = 9pt plus 2pt minus 2pt
+
+% Prevent underfull vbox error messages.
+\vbadness = 10000
+
+% Don't be so finicky about underfull hboxes, either.
+\hbadness = 2000
+
+% Following George Bush, get rid of widows and orphans.
+\widowpenalty=10000
+\clubpenalty=10000
+
+% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
+% using an old version of TeX, don't do anything.  We want the amount of
+% stretch added to depend on the line length, hence the dependence on
+% \hsize.  We call this whenever the paper size is set.
+%
+\def\setemergencystretch{%
+  \ifx\emergencystretch\thisisundefined
+    % Allow us to assign to \emergencystretch anyway.
+    \def\emergencystretch{\dimen0}%
+  \else
+    \emergencystretch = .15\hsize
+  \fi
+}
+
+% Parameters in order: 1) textheight; 2) textwidth;
+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
+% 7) physical page height; 8) physical page width.
+%
+% We also call \setleading{\textleading}, so the caller should define
+% \textleading.  The caller should also set \parskip.
+%
+\def\internalpagesizes#1#2#3#4#5#6#7#8{%
+  \voffset = #3\relax
+  \topskip = #6\relax
+  \splittopskip = \topskip
+  %
+  \vsize = #1\relax
+  \advance\vsize by \topskip
+  \outervsize = \vsize
+  \advance\outervsize by 2\topandbottommargin
+  \pageheight = \vsize
+  %
+  \hsize = #2\relax
+  \outerhsize = \hsize
+  \advance\outerhsize by 0.5in
+  \pagewidth = \hsize
+  %
+  \normaloffset = #4\relax
+  \bindingoffset = #5\relax
+  %
+  \ifpdf
+    \pdfpageheight #7\relax
+    \pdfpagewidth #8\relax
+    % if we don't reset these, they will remain at "1 true in" of
+    % whatever layout pdftex was dumped with.
+    \pdfhorigin = 1 true in
+    \pdfvorigin = 1 true in
+  \fi
+  %
+  \setleading{\textleading}
+  %
+  \parindent = \defaultparindent
+  \setemergencystretch
+}
+
+% @letterpaper (the default).
+\def\letterpaper{{\globaldefs = 1
+  \parskip = 3pt plus 2pt minus 1pt
+  \textleading = 13.2pt
+  %
+  % If page is nothing but text, make it come out even.
+  \internalpagesizes{607.2pt}{6in}% that's 46 lines
+                    {\voffset}{.25in}%
+                    {\bindingoffset}{36pt}%
+                    {11in}{8.5in}%
+}}
+
+% Use @smallbook to reset parameters for 7x9.25 trim size.
+\def\smallbook{{\globaldefs = 1
+  \parskip = 2pt plus 1pt
+  \textleading = 12pt
+  %
+  \internalpagesizes{7.5in}{5in}%
+                    {-.2in}{0in}%
+                    {\bindingoffset}{16pt}%
+                    {9.25in}{7in}%
+  %
+  \lispnarrowing = 0.3in
+  \tolerance = 700
+  \hfuzz = 1pt
+  \contentsrightmargin = 0pt
+  \defbodyindent = .5cm
+}}
+
+% Use @smallerbook to reset parameters for 6x9 trim size.
+% (Just testing, parameters still in flux.)
+\def\smallerbook{{\globaldefs = 1
+  \parskip = 1.5pt plus 1pt
+  \textleading = 12pt
+  %
+  \internalpagesizes{7.4in}{4.8in}%
+                    {-.2in}{-.4in}%
+                    {0pt}{14pt}%
+                    {9in}{6in}%
+  %
+  \lispnarrowing = 0.25in
+  \tolerance = 700
+  \hfuzz = 1pt
+  \contentsrightmargin = 0pt
+  \defbodyindent = .4cm
+}}
+
+% Use @afourpaper to print on European A4 paper.
+\def\afourpaper{{\globaldefs = 1
+  \parskip = 3pt plus 2pt minus 1pt
+  \textleading = 13.2pt
+  %
+  % Double-side printing via postscript on Laserjet 4050
+  % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
+  % To change the settings for a different printer or situation, adjust
+  % \normaloffset until the front-side and back-side texts align.  Then
+  % do the same for \bindingoffset.  You can set these for testing in
+  % your texinfo source file like this:
+  % @tex
+  % \global\normaloffset = -6mm
+  % \global\bindingoffset = 10mm
+  % @end tex
+  \internalpagesizes{673.2pt}{160mm}% that's 51 lines
+                    {\voffset}{\hoffset}%
+                    {\bindingoffset}{44pt}%
+                    {297mm}{210mm}%
+  %
+  \tolerance = 700
+  \hfuzz = 1pt
+  \contentsrightmargin = 0pt
+  \defbodyindent = 5mm
+}}
+
+% Use @afivepaper to print on European A5 paper.
+% From romildo@urano.iceb.ufop.br, 2 July 2000.
+% He also recommends making @example and @lisp be small.
+\def\afivepaper{{\globaldefs = 1
+  \parskip = 2pt plus 1pt minus 0.1pt
+  \textleading = 12.5pt
+  %
+  \internalpagesizes{160mm}{120mm}%
+                    {\voffset}{\hoffset}%
+                    {\bindingoffset}{8pt}%
+                    {210mm}{148mm}%
+  %
+  \lispnarrowing = 0.2in
+  \tolerance = 800
+  \hfuzz = 1.2pt
+  \contentsrightmargin = 0pt
+  \defbodyindent = 2mm
+  \tableindent = 12mm
+}}
+
+% A specific text layout, 24x15cm overall, intended for A4 paper.
+\def\afourlatex{{\globaldefs = 1
+  \afourpaper
+  \internalpagesizes{237mm}{150mm}%
+                    {\voffset}{4.6mm}%
+                    {\bindingoffset}{7mm}%
+                    {297mm}{210mm}%
+  %
+  % Must explicitly reset to 0 because we call \afourpaper.
+  \globaldefs = 0
+}}
+
+% Use @afourwide to print on A4 paper in landscape format.
+\def\afourwide{{\globaldefs = 1
+  \afourpaper
+  \internalpagesizes{241mm}{165mm}%
+                    {\voffset}{-2.95mm}%
+                    {\bindingoffset}{7mm}%
+                    {297mm}{210mm}%
+  \globaldefs = 0
+}}
+
+% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
+% Perhaps we should allow setting the margins, \topskip, \parskip,
+% and/or leading, also. Or perhaps we should compute them somehow.
+%
+\parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
+\def\pagesizesyyy#1,#2,#3\finish{{%
+  \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
+  \globaldefs = 1
+  %
+  \parskip = 3pt plus 2pt minus 1pt
+  \setleading{\textleading}%
+  %
+  \dimen0 = #1\relax
+  \advance\dimen0 by \voffset
+  %
+  \dimen2 = \hsize
+  \advance\dimen2 by \normaloffset
+  %
+  \internalpagesizes{#1}{\hsize}%
+                    {\voffset}{\normaloffset}%
+                    {\bindingoffset}{44pt}%
+                    {\dimen0}{\dimen2}%
+}}
+
+% Set default to letter.
+%
+\letterpaper
+
+
+\message{and turning on texinfo input format.}
+
+% Define macros to output various characters with catcode for normal text.
+\catcode`\"=\other
+\catcode`\~=\other
+\catcode`\^=\other
+\catcode`\_=\other
+\catcode`\|=\other
+\catcode`\<=\other
+\catcode`\>=\other
+\catcode`\+=\other
+\catcode`\$=\other
+\def\normaldoublequote{"}
+\def\normaltilde{~}
+\def\normalcaret{^}
+\def\normalunderscore{_}
+\def\normalverticalbar{|}
+\def\normalless{<}
+\def\normalgreater{>}
+\def\normalplus{+}
+\def\normaldollar{$}%$ font-lock fix
+
+% This macro is used to make a character print one way in \tt
+% (where it can probably be output as-is), and another way in other fonts,
+% where something hairier probably needs to be done.
+%
+% #1 is what to print if we are indeed using \tt; #2 is what to print
+% otherwise.  Since all the Computer Modern typewriter fonts have zero
+% interword stretch (and shrink), and it is reasonable to expect all
+% typewriter fonts to have this, we can check that font parameter.
+%
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+% Same as above, but check for italic font.  Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts.  But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
+
+% Turn off all special characters except @
+% (and those which the user can use as if they were ordinary).
+% Most of these we simply print from the \tt font, but for some, we can
+% use math or other variants that look better in normal text.
+
+\catcode`\"=\active
+\def\activedoublequote{{\tt\char34}}
+\let"=\activedoublequote
+\catcode`\~=\active
+\def~{{\tt\char126}}
+\chardef\hat=`\^
+\catcode`\^=\active
+\def^{{\tt \hat}}
+
+\catcode`\_=\active
+\def_{\ifusingtt\normalunderscore\_}
+\let\realunder=_
+% Subroutine for the previous macro.
+\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
+
+\catcode`\|=\active
+\def|{{\tt\char124}}
+\chardef \less=`\<
+\catcode`\<=\active
+\def<{{\tt \less}}
+\chardef \gtr=`\>
+\catcode`\>=\active
+\def>{{\tt \gtr}}
+\catcode`\+=\active
+\def+{{\tt \char 43}}
+\catcode`\$=\active
+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \everyjob (or @setfilename) turn them on.
+% \otherifyactive is called near the end of this file.
+\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
+% Used sometimes to turn off (effectively) the active characters even after
+% parsing them.
+\def\turnoffactive{%
+  \normalturnoffactive
+  \otherbackslash
+}
+
+\catcode`\@=0
+
+% \backslashcurfont outputs one backslash character in current font,
+% as in \char`\\.
+\global\chardef\backslashcurfont=`\\
+\global\let\rawbackslashxx=\backslashcurfont  % let existing .??s files work
+
+% \realbackslash is an actual character `\' with catcode other, and
+% \doublebackslash is two of them (for the pdf outlines).
+{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
+
+% In texinfo, backslash is an active character; it prints the backslash
+% in fixed width font.
+\catcode`\\=\active
+@def@normalbackslash{{@tt@backslashcurfont}}
+% On startup, @fixbackslash assigns:
+%  @let \ = @normalbackslash
+
+% \rawbackslash defines an active \ to do \backslashcurfont.
+% \otherbackslash defines an active \ to be a literal `\' character with
+% catcode other.
+@gdef@rawbackslash{@let\=@backslashcurfont}
+@gdef@otherbackslash{@let\=@realbackslash}
+
+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
+% the literal character `\'.
+% 
+@def@normalturnoffactive{%
+  @let\=@normalbackslash
+  @let"=@normaldoublequote
+  @let~=@normaltilde
+  @let^=@normalcaret
+  @let_=@normalunderscore
+  @let|=@normalverticalbar
+  @let<=@normalless
+  @let>=@normalgreater
+  @let+=@normalplus
+  @let$=@normaldollar %$ font-lock fix
+  @unsepspaces
+}
+
+% Make _ and + \other characters, temporarily.
+% This is canceled by @fixbackslash.
+@otherifyactive
+
+% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
+% That is what \eatinput is for; after that, the `\' should revert to printing
+% a backslash.
+%
+@gdef@eatinput input texinfo{@fixbackslash}
+@global@let\ = @eatinput
+
+% On the other hand, perhaps the file did not have a `\input texinfo'. Then
+% the first `\' in the file would cause an error. This macro tries to fix
+% that, assuming it is called before the first `\' could plausibly occur.
+% Also turn back on active characters that might appear in the input
+% file name, in case not using a pre-dumped format.
+%
+@gdef@fixbackslash{%
+  @ifx\@eatinput @let\ = @normalbackslash @fi
+  @catcode`+=@active
+  @catcode`@_=@active
+}
+
+% Say @foo, not \foo, in error messages.
+@escapechar = `@@
+
+% These look ok in all fonts, so just make them not special.
+@catcode`@& = @other
+@catcode`@# = @other
+@catcode`@% = @other
+
+
+@c Local variables:
+@c eval: (add-hook 'write-file-hooks 'time-stamp)
+@c page-delimiter: "^\\\\message"
+@c time-stamp-start: "def\\\\texinfoversion{"
+@c time-stamp-format: "%:y-%02m-%02d.%02H"
+@c time-stamp-end: "}"
+@c End:
+
+@c vim:sw=2:
+
+@ignore
+   arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
+@end ignore
diff --git a/build-aux/unused-parameter.h b/build-aux/unused-parameter.h
new file mode 100644 (file)
index 0000000..c8d2071
--- /dev/null
@@ -0,0 +1,36 @@
+/* A C macro for declaring that specific function parameters are not used.
+   Copyright (C) 2008-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/>.  */
+
+/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
+   declarations for parameters that are not used.  This helps to reduce
+   warnings, such as from GCC -Wunused-parameter.  The syntax is as follows:
+       type param _GL_UNUSED_PARAMETER
+   or more generally
+       param_decl _GL_UNUSED_PARAMETER
+   For example:
+       int param _GL_UNUSED_PARAMETER
+       int *(*param)(void) _GL_UNUSED_PARAMETER
+   Other possible, but obscure and discouraged syntaxes:
+       int _GL_UNUSED_PARAMETER *(*param)(void)
+       _GL_UNUSED_PARAMETER int *(*param)(void)
+ */
+#ifndef _GL_UNUSED_PARAMETER
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+#  define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
+# else
+#  define _GL_UNUSED_PARAMETER
+# endif
+#endif
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
new file mode 100755 (executable)
index 0000000..ef0b1ce
--- /dev/null
@@ -0,0 +1,267 @@
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+  & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
+    if 0;
+# Update an FSF copyright year list to include the current year.
+
+my $VERSION = '2011-01-02.20:59'; # UTC
+
+# Copyright (C) 2009-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, 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 Jim Meyering and Joel E. Denny
+
+# The arguments to this script should be names of files that contain
+# copyright statements to be updated.  The copyright holder's name
+# defaults to "Free Softward Foundation, Inc." but may be changed to
+# any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
+# variable.
+#
+# For example, you might wish to use the update-copyright target rule
+# in maint.mk from gnulib's maintainer-makefile module.
+#
+# Iff a copyright statement is recognized in a file and the final
+# year is not the current year, then the statement is updated for the
+# new year and it is reformatted to:
+#
+#   1. Fit within 72 columns.
+#   2. Convert 2-digit years to 4-digit years by prepending "19".
+#   3. Expand copyright year intervals.  (See "Environment variables"
+#      below.)
+#
+# A warning is printed for every file for which no copyright
+# statement is recognized.
+#
+# Each file's copyright statement must be formated correctly in
+# order to be recognized.  For example, each of these is fine:
+#
+#   Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+#   Foundation, Inc.
+#
+#   # Copyright (C) 1990-2005, 2007-2009 Free Software
+#   # Foundation, Inc.
+#
+#   /*
+#    * Copyright &copy; 90,2005,2007-2009
+#    * Free Software Foundation, Inc.
+#    */
+#
+# However, the following format is not recognized because the line
+# prefix changes after the first line:
+#
+#   ## Copyright (C) 1990-2005, 2007-2009 Free Software
+#   #  Foundation, Inc.
+#
+# However, any correctly formatted copyright statement following
+# a non-matching copyright statements would be recognized.
+#
+# The exact conditions that a file's copyright statement must meet
+# to be recognized are:
+#
+#   1. It is the first copyright statement that meets all of the
+#      following conditions.  Subsequent copyright statements are
+#      ignored.
+#   2. Its format is "Copyright (C)", then a list of copyright years,
+#      and then the name of the copyright holder.
+#   3. The "(C)" takes one of the following forms or is omitted
+#      entirely:
+#
+#        A. (C)
+#        B. (c)
+#        C. @copyright{}
+#        D. &copy;
+#
+#   4. The "Copyright" appears at the beginning of a line, except that it
+#      may be prefixed by any sequence (e.g., a comment) of no more than
+#      5 characters -- including white space.
+#   5. Iff such a prefix is present, the same prefix appears at the
+#      beginning of each remaining line within the FSF copyright
+#      statement.  There is one exception in order to support C-style
+#      comments: if the first line's prefix contains nothing but
+#      whitespace surrounding a "/*", then the prefix for all subsequent
+#      lines is the same as the first line's prefix except with each of
+#      "/" and possibly "*" replaced by a " ".  The replacement of "*"
+#      by " " is consistent throughout all subsequent lines.
+#   6. Blank lines, even if preceded by the prefix, do not appear
+#      within the FSF copyright statement.
+#   7. Each copyright year is 2 or 4 digits, and years are separated by
+#      commas or dashes.  Whitespace may appear after commas.
+#
+# Environment variables:
+#
+#   1. If UPDATE_COPYRIGHT_FORCE=1, a recognized FSF copyright statement
+#      is reformatted even if it does not need updating for the new
+#      year.  If unset or set to 0, only updated FSF copyright
+#      statements are reformatted.
+#   2. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive
+#      copyright years (such as 90, 1991, 1992-2007, 2008) in a
+#      reformatted FSF copyright statement is collapsed to a single
+#      interval (such as 1990-2008).  If unset or set to 0, all existing
+#      copyright year intervals in a reformatted FSF copyright statement
+#      are expanded instead.
+#   3. For testing purposes, you can set the assumed current year in
+#      UPDATE_COPYRIGHT_YEAR.
+#   4. The default maximum line length for a copyright line is 72.
+#      Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length.
+#   5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other
+#      than "Free Software Foundation, Inc.".
+
+use strict;
+use warnings;
+
+my $copyright_re = 'Copyright';
+my $circle_c_re = '(?:\([cC]\)|@copyright{}|&copy;)';
+my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
+$holder ||= 'Free Software Foundation, Inc.';
+my $prefix_max = 5;
+my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH};
+!$margin || $margin !~ m/^\d+$/
+  and $margin = 72;
+
+my $tab_width = 8;
+
+my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
+if (!$this_year || $this_year !~ m/^\d{4}$/)
+  {
+    my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
+    $this_year = $year + 1900;
+  }
+
+# Unless the file consistently uses "\r\n" as the EOL, use "\n" instead.
+my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n";
+
+my $leading;
+my $prefix;
+my $ws_re;
+my $stmt_re;
+while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
+  {
+    $leading = "$1$2";
+    $prefix = $2;
+    if ($prefix =~ /^(\s*\/)\*(\s*)$/)
+      {
+        $prefix =~ s,/, ,;
+        my $prefix_ws = $prefix;
+        $prefix_ws =~ s/\*/ /; # Only whitespace.
+        if (/\G(?:[^*\n]|\*[^\/\n])*\*?\n$prefix_ws/)
+          {
+            $prefix = $prefix_ws;
+          }
+      }
+    $ws_re = '[ \t\r\f]'; # \s without \n
+    $ws_re =
+      "(?:$ws_re*(?:$ws_re|\\n" . quotemeta($prefix) . ")$ws_re*)";
+    my $holder_re = $holder;
+    $holder_re =~ s/\s/$ws_re/g;
+    my $stmt_remainder_re =
+      "(?:$ws_re$circle_c_re)?"
+      . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|-))*"
+      . "((?:\\d\\d)?\\d\\d)$ws_re$holder_re";
+    if (/\G$stmt_remainder_re/)
+      {
+        $stmt_re =
+          quotemeta($leading) . "($copyright_re$stmt_remainder_re)";
+        last;
+      }
+  }
+if (defined $stmt_re)
+  {
+    /$stmt_re/ or die; # Should never die.
+    my $stmt = $1;
+    my $final_year_orig = $2;
+
+    # Handle two-digit year numbers like "98" and "99".
+    my $final_year = $final_year_orig;
+    $final_year <= 99
+      and $final_year += 1900;
+
+    if ($final_year != $this_year)
+      {
+        # Update the year.
+        $stmt =~ s/$final_year_orig/$final_year, $this_year/;
+      }
+    if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
+      {
+        # Normalize all whitespace including newline-prefix sequences.
+        $stmt =~ s/$ws_re/ /g;
+
+        # Put spaces after commas.
+        $stmt =~ s/, ?/, /g;
+
+        # Convert 2-digit to 4-digit years.
+        $stmt =~ s/(\b\d\d\b)/19$1/g;
+
+        # Make the use of intervals consistent.
+        if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS})
+          {
+            $stmt =~ s/(\d{4})-(\d{4})/join(', ', $1..$2)/eg;
+          }
+        else
+          {
+            $stmt =~
+              s/
+                (\d{4})
+                (?:
+                  (,\ |-)
+                  ((??{
+                    if    ($2 eq '-') { '\d{4}'; }
+                    elsif (!$3)       { $1 + 1;  }
+                    else              { $3 + 1;  }
+                  }))
+                )+
+              /$1-$3/gx;
+          }
+
+        # Format within margin.
+        my $stmt_wrapped;
+        my $text_margin = $margin - length($prefix);
+        if ($prefix =~ /^(\t+)/)
+          {
+            $text_margin -= length($1) * ($tab_width - 1);
+          }
+        while (length $stmt)
+          {
+            if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//)
+                || ($stmt =~ s/^([\S]+)(?: |$)//))
+              {
+                my $line = $1;
+                $stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading;
+                $stmt_wrapped .= $line;
+              }
+            else
+              {
+                # Should be unreachable, but we don't want an infinite
+                # loop if it can be reached.
+                die;
+              }
+          }
+
+        # Replace the old copyright statement.
+        s/$stmt_re/$stmt_wrapped/;
+      }
+  }
+else
+  {
+    print STDERR "$ARGV: warning: copyright statement not found\n";
+  }
+
+# Local variables:
+# mode: perl
+# indent-tabs-mode: nil
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "my $VERSION = '"
+# time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "'; # UTC"
+# End:
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
new file mode 100755 (executable)
index 0000000..a6c228b
--- /dev/null
@@ -0,0 +1,207 @@
+eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}'
+  & eval 'exec perl -wST "$0" $argv:q'
+    if 0;
+# Detect instances of "if (p) free (p);".
+# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
+
+my $VERSION = '2011-01-09 01:39'; # UTC
+# The definition above must lie within the first 8 lines in order
+# for the Emacs time-stamp write hook (at end) to update it.
+# If you change this file with Emacs, please let the write hook
+# do its job.  Otherwise, update this string manually.
+
+# Copyright (C) 2008-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 Jim Meyering
+
+use strict;
+use warnings;
+use Getopt::Long;
+
+(my $ME = $0) =~ s|.*/||;
+
+# use File::Coda; # http://meyering.net/code/Coda/
+END {
+  defined fileno STDOUT or return;
+  close STDOUT and return;
+  warn "$ME: failed to close standard output: $!\n";
+  $? ||= 1;
+}
+
+sub usage ($)
+{
+  my ($exit_code) = @_;
+  my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+  if ($exit_code != 0)
+    {
+      print $STREAM "Try `$ME --help' for more information.\n";
+    }
+  else
+    {
+      print $STREAM <<EOF;
+Usage: $ME [OPTIONS] FILE...
+
+Detect any instance in FILE of a useless "if" test before a free call, e.g.,
+"if (p) free (p);".  Any such test may be safely removed without affecting
+the semantics of the C code in FILE.  Use --name=FOO --name=BAR to also
+detect free-like functions named FOO and BAR.
+
+OPTIONS:
+
+   --list       print only the name of each matching FILE (\\0-terminated)
+   --name=N     add name N to the list of \`free\'-like functions to detect;
+                  may be repeated
+
+   --help       display this help and exit
+   --version    output version information and exit
+
+Exit status:
+
+  0   one or more matches
+  1   no match
+  2   an error
+
+EXAMPLE:
+
+For example, this command prints all removable "if" tests before "free"
+and "kfree" calls in the linux kernel sources:
+
+    git ls-files -z |xargs -0 $ME --name=kfree
+
+EOF
+    }
+  exit $exit_code;
+}
+
+sub is_NULL ($)
+{
+  my ($expr) = @_;
+  return ($expr eq 'NULL' || $expr eq '0');
+}
+
+{
+  sub EXIT_MATCH {0}
+  sub EXIT_NO_MATCH {1}
+  sub EXIT_ERROR {2}
+  my $err = EXIT_NO_MATCH;
+
+  my $list;
+  my @name = qw(free);
+  GetOptions
+    (
+     help => sub { usage 0 },
+     version => sub { print "$ME version $VERSION\n"; exit },
+     list => \$list,
+     'name=s@' => \@name,
+    ) or usage 1;
+
+  # Make sure we have the right number of non-option arguments.
+  # Always tell the user why we fail.
+  @ARGV < 1
+    and (warn "$ME: missing FILE argument\n"), usage EXIT_ERROR;
+
+  my $or = join '|', @name;
+  my $regexp = qr/(?:$or)/;
+
+  # Set the input record separator.
+  # Note: this makes it impractical to print line numbers.
+  $/ = '"';
+
+  my $found_match = 0;
+ FILE:
+  foreach my $file (@ARGV)
+    {
+      open FH, '<', $file
+        or (warn "$ME: can't open `$file' for reading: $!\n"),
+          $err = EXIT_ERROR, next;
+      while (defined (my $line = <FH>))
+        {
+          while ($line =~
+              /\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\)
+              #  1          2                  3
+               (?:   \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)|
+                \s*\{\s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;\s*\}))/sxg)
+            {
+              my $all = $1;
+              my ($lhs, $rhs) = ($2, $3);
+              my ($free_opnd, $braced_free_opnd) = ($4, $5);
+              my $non_NULL;
+              if (!defined $rhs) { $non_NULL = $lhs }
+              elsif (is_NULL $rhs) { $non_NULL = $lhs }
+              elsif (is_NULL $lhs) { $non_NULL = $rhs }
+              else { next }
+
+              # Compare the non-NULL part of the "if" expression and the
+              # free'd expression, without regard to white space.
+              $non_NULL =~ tr/ \t//d;
+              my $e2 = defined $free_opnd ? $free_opnd : $braced_free_opnd;
+              $e2 =~ tr/ \t//d;
+              if ($non_NULL eq $e2)
+                {
+                  $found_match = 1;
+                  $list
+                    and (print "$file\0"), next FILE;
+                  print "$file: $all\n";
+                }
+            }
+        }
+    }
+  continue
+    {
+      close FH;
+    }
+
+  $found_match && $err == EXIT_NO_MATCH
+    and $err = EXIT_MATCH;
+
+  exit $err;
+}
+
+my $foo = <<'EOF';
+# The above is to *find* them.
+# This adjusts them, removing the unnecessary "if (p)" part.
+
+# FIXME: do something like this as an option (doesn't do braces):
+free=xfree
+git grep -l -z "$free *(" \
+  | xargs -0 useless-if-before-free -l --name="$free" \
+  | xargs -0 perl -0x3b -pi -e \
+   's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\))/$2/s'
+
+# Use the following to remove redundant uses of kfree inside braces.
+# Note that -0777 puts perl in slurp-whole-file mode;
+# but we have plenty of memory, these days...
+free=kfree
+git grep -l -z "$free *(" \
+  | xargs -0 useless-if-before-free -l --name="$free" \
+  | xargs -0 perl -0777 -pi -e \
+     's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s*\{\s*('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\);)\s*\}[^\n]*$/$2/gms'
+
+Be careful that the result of the above transformation is valid.
+If the matched string is followed by "else", then obviously, it won't be.
+
+When modifying files, refuse to process anything other than a regular file.
+EOF
+
+## Local Variables:
+## mode: perl
+## indent-tabs-mode: nil
+## eval: (add-hook 'write-file-hooks 'time-stamp)
+## time-stamp-start: "my $VERSION = '"
+## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+## time-stamp-time-zone: "UTC"
+## time-stamp-end: "'; # UTC"
+## End:
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
new file mode 100755 (executable)
index 0000000..9bb6fe6
--- /dev/null
@@ -0,0 +1,118 @@
+#!/bin/sh
+# List version-controlled file names.
+
+# Print a version string.
+scriptversion=2010-04-23.22; # UTC
+
+# Copyright (C) 2006-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/>.
+
+
+# List the specified version-controlled files.
+# With no argument, list them all.  With a single DIRECTORY argument,
+# list the version-controlled files in that directory.
+
+# If there's an argument, it must be a single, "."-relative directory name.
+# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
+
+postprocess=
+case $1 in
+  --help) cat <<EOF
+Usage: $0 [-C SRCDIR] [DIR]
+
+Output a list of version-controlled files in DIR (default .), relative to
+SRCDIR (default .).  SRCDIR must be the top directory of a checkout.
+
+Options:
+  --help     print this help, then exit
+  --version  print version number, then exit
+  -C SRCDIR  change directory to SRCDIR before generating list
+
+Report bugs and patches to <bug-gnulib@gnu.org>.
+EOF
+    exit ;;
+
+  --version)
+    year=`echo "$scriptversion" | sed 's/[^0-9].*//'`
+    cat <<EOF
+vc-list-files $scriptversion
+Copyright (C) $year Free Software Foundation, Inc,
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+    exit ;;
+
+  -C)
+    test "$2" = . || postprocess="| sed 's|^|$2/|'"
+    cd "$2" || exit 1
+    shift; shift ;;
+esac
+
+dir=
+case $# in
+  0) ;;
+  1) dir=$1 ;;
+  *) echo "$0: too many arguments" 1>&2
+     echo "Usage: $0 [-C srcdir] [DIR]" 1>&2; exit 1;;
+esac
+
+test "x$dir" = x && dir=.
+
+if test -d .git; then
+  test "x$dir" = x. \
+    && dir= sed_esc= \
+    || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
+  # Ignore git symlinks - either they point into the tree, in which case
+  # we don't need to visit the target twice, or they point somewhere
+  # else (often into a submodule), in which case the content does not
+  # belong to this package.
+  eval exec git ls-tree -r 'HEAD:"$dir"' \
+    \| sed -n '"s/^100[^       ]*./$sed_esc/p"' $postprocess
+elif test -d .hg; then
+  eval exec hg locate '"$dir/*"' $postprocess
+elif test -d .bzr; then
+  test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
+  eval exec bzr ls -R --versioned '"$dir"' $postprocess
+elif test -d CVS; then
+  test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
+  if test -x build-aux/cvsu; then
+    eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
+  elif (cvsu --help) >/dev/null 2>&1; then
+    eval cvsu --find --types=AFGM '"$dir"' $postprocess
+  else
+    eval awk -F/ \''{                  \
+       if (!$1 && $3 !~ /^-/) {        \
+         f=FILENAME;                   \
+         if (f ~ /CVS\/Entries$/)      \
+           f = substr(f, 1, length(f)-11); \
+         print f $2;                   \
+       }}'\''                          \
+      `find "$dir" -name Entries -print` /dev/null' $postprocess
+  fi
+elif test -d .svn; then
+  eval exec svn list -R '"$dir"' $postprocess
+else
+  echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
+  exit 1
+fi
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/warn-on-use.h b/build-aux/warn-on-use.h
new file mode 100644 (file)
index 0000000..2cdeec3
--- /dev/null
@@ -0,0 +1,109 @@
+/* A C macro for emitting warnings if a function is used.
+   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/>.  */
+
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
+   for FUNCTION which will then trigger a compiler warning containing
+   the text of "literal string" anywhere that function is called, if
+   supported by the compiler.  If the compiler does not support this
+   feature, the macro expands to an unused extern declaration.
+
+   This macro is useful for marking a function as a potential
+   portability trap, with the intent that "literal string" include
+   instructions on the replacement function that should be used
+   instead.  However, one of the reasons that a function is a
+   portability trap is if it has the wrong signature.  Declaring
+   FUNCTION with a different signature in C is a compilation error, so
+   this macro must use the same type as any existing declaration so
+   that programs that avoid the problematic FUNCTION do not fail to
+   compile merely because they included a header that poisoned the
+   function.  But this implies that _GL_WARN_ON_USE is only safe to
+   use if FUNCTION is known to already have a declaration.  Use of
+   this macro implies that there must not be any other macro hiding
+   the declaration of FUNCTION; but undefining FUNCTION first is part
+   of the poisoning process anyway (although for symbols that are
+   provided only via a macro, the result is a compilation error rather
+   than a warning containing "literal string").  Also note that in
+   C++, it is only safe to use if FUNCTION has no overloads.
+
+   For an example, it is possible to poison 'getline' by:
+   - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
+     [getline]) in configure.ac, which potentially defines
+     HAVE_RAW_DECL_GETLINE
+   - adding this code to a header that wraps the system <stdio.h>:
+     #undef getline
+     #if HAVE_RAW_DECL_GETLINE
+     _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
+       "not universally present; use the gnulib module getline");
+     #endif
+
+   It is not possible to directly poison global variables.  But it is
+   possible to write a wrapper accessor function, and poison that
+   (less common usage, like &environ, will cause a compilation error
+   rather than issue the nice warning, but the end result of informing
+   the developer about their portability problem is still achieved):
+   #if HAVE_RAW_DECL_ENVIRON
+   static inline char ***rpl_environ (void) { return &environ; }
+   _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
+   # undef environ
+   # define environ (*rpl_environ ())
+   #endif
+   */
+#ifndef _GL_WARN_ON_USE
+
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+/* A compiler attribute is available in gcc versions 4.3.0 and later.  */
+#  define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+/* Verify the existence of the function.  */
+#  define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function
+# else /* Unsupported.  */
+#  define _GL_WARN_ON_USE(function, message) \
+_GL_WARN_EXTERN_C int _gl_warn_on_use
+# endif
+#endif
+
+/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
+   is like _GL_WARN_ON_USE (function, "string"), except that the function is
+   declared with the given prototype, consisting of return type, parameters,
+   and attributes.
+   This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
+   not work in this case.  */
+#ifndef _GL_WARN_ON_USE_CXX
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+extern rettype function parameters_and_attributes \
+     __attribute__ ((__warning__ (msg)))
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+/* Verify the existence of the function.  */
+#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+extern rettype function parameters_and_attributes
+# else /* Unsupported.  */
+#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+_GL_WARN_EXTERN_C int _gl_warn_on_use
+# endif
+#endif
+
+/* _GL_WARN_EXTERN_C declaration;
+   performs the declaration with C linkage.  */
+#ifndef _GL_WARN_EXTERN_C
+# if defined __cplusplus
+#  define _GL_WARN_EXTERN_C extern "C"
+# else
+#  define _GL_WARN_EXTERN_C extern
+# endif
+#endif
diff --git a/build-aux/ylwrap b/build-aux/ylwrap
new file mode 100755 (executable)
index 0000000..7fe7c3f
--- /dev/null
@@ -0,0 +1,223 @@
+#! /bin/sh
+# ylwrap - wrapper for lex/yacc invocations.
+
+scriptversion=2007-11-22.22
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
+# 2007  Free Software Foundation, Inc.
+#
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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, 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case "$1" in
+  '')
+    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
+    exit 1
+    ;;
+  --basedir)
+    basedir=$2
+    shift 2
+    ;;
+  -h|--h*)
+    cat <<\EOF
+Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+
+Wrapper for lex/yacc invocations, renaming files as desired.
+
+  INPUT is the input file
+  OUTPUT is one file PROG generates
+  DESIRED is the file we actually want instead of OUTPUT
+  PROGRAM is program to run
+  ARGS are passed to PROG
+
+Any number of OUTPUT,DESIRED pairs may be used.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v|--v*)
+    echo "ylwrap $scriptversion"
+    exit $?
+    ;;
+esac
+
+
+# The input.
+input="$1"
+shift
+case "$input" in
+  [\\/]* | ?:[\\/]*)
+    # Absolute path; do nothing.
+    ;;
+  *)
+    # Relative path.  Make it absolute.
+    input="`pwd`/$input"
+    ;;
+esac
+
+pairlist=
+while test "$#" -ne 0; do
+  if test "$1" = "--"; then
+    shift
+    break
+  fi
+  pairlist="$pairlist $1"
+  shift
+done
+
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+  [\\/]* | ?:[\\/]*) ;;
+  *[\\/]*) prog="`pwd`/$prog" ;;
+esac
+
+# FIXME: add hostname here for parallel makes that run commands on
+# other machines.  But that might take us over the 14-char limit.
+dirname=ylwrap$$
+trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+mkdir $dirname || exit 1
+
+cd $dirname
+
+case $# in
+  0) "$prog" "$input" ;;
+  *) "$prog" "$@" "$input" ;;
+esac
+ret=$?
+
+if test $ret -eq 0; then
+  set X $pairlist
+  shift
+  first=yes
+  # Since DOS filename conventions don't allow two dots,
+  # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+  # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+  y_tab_nodot="no"
+  if test -f y_tab.c || test -f y_tab.h; then
+    y_tab_nodot="yes"
+  fi
+
+  # The directory holding the input.
+  input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+  # Quote $INPUT_DIR so we can use it in a regexp.
+  # FIXME: really we should care about more than `.' and `\'.
+  input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
+
+  while test "$#" -ne 0; do
+    from="$1"
+    # Handle y_tab.c and y_tab.h output by DOS
+    if test $y_tab_nodot = "yes"; then
+      if test $from = "y.tab.c"; then
+       from="y_tab.c"
+      else
+       if test $from = "y.tab.h"; then
+         from="y_tab.h"
+       fi
+      fi
+    fi
+    if test -f "$from"; then
+      # If $2 is an absolute path name, then just use that,
+      # otherwise prepend `../'.
+      case "$2" in
+       [\\/]* | ?:[\\/]*) target="$2";;
+       *) target="../$2";;
+      esac
+
+      # We do not want to overwrite a header file if it hasn't
+      # changed.  This avoid useless recompilations.  However the
+      # parser itself (the first file) should always be updated,
+      # because it is the destination of the .y.c rule in the
+      # Makefile.  Divert the output of all other files to a temporary
+      # file so we can compare them to existing versions.
+      if test $first = no; then
+       realtarget="$target"
+       target="tmp-`echo $target | sed s/.*[\\/]//g`"
+      fi
+      # Edit out `#line' or `#' directives.
+      #
+      # We don't want the resulting debug information to point at
+      # an absolute srcdir; it is better for it to just mention the
+      # .y file with no path.
+      #
+      # We want to use the real output file name, not yy.lex.c for
+      # instance.
+      #
+      # We want the include guards to be adjusted too.
+      FROM=`echo "$from" | sed \
+            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+      TARGET=`echo "$2" | sed \
+            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+
+      sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
+          -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
+
+      # Check whether header files must be updated.
+      if test $first = no; then
+       if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
+         echo "$2" is unchanged
+         rm -f "$target"
+       else
+          echo updating "$2"
+          mv -f "$target" "$realtarget"
+        fi
+      fi
+    else
+      # A missing file is only an error for the first file.  This
+      # is a blatant hack to let us support using "yacc -d".  If -d
+      # is not specified, we don't want an error when the header
+      # file is "missing".
+      if test $first = yes; then
+        ret=1
+      fi
+    fi
+    shift
+    shift
+    first=no
+  done
+else
+  ret=$?
+fi
+
+# Remove the directory.
+cd ..
+rm -rf $dirname
+
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644 (file)
index 0000000..73ee1be
--- /dev/null
@@ -0,0 +1,2391 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define so that source code can verify that config.h was already included */
+#undef ALREADY_INCLUDED_CONFIG_H
+
+/* Define to the number of bits in type 'ptrdiff_t'. */
+#undef BITSIZEOF_PTRDIFF_T
+
+/* Define to the number of bits in type 'sig_atomic_t'. */
+#undef BITSIZEOF_SIG_ATOMIC_T
+
+/* Define to the number of bits in type 'size_t'. */
+#undef BITSIZEOF_SIZE_T
+
+/* Define to the number of bits in type 'wchar_t'. */
+#undef BITSIZEOF_WCHAR_T
+
+/* Define to the number of bits in type 'wint_t'. */
+#undef BITSIZEOF_WINT_T
+
+/* Define if you want find -nouser and -nogroup to make tables of used UIDs
+   and GIDs at startup instead of using getpwuid or getgrgid when needed.
+   Speeds up -nouser and -nogroup unless you are running NIS or Hesiod, which
+   make password and group calls very expensive. */
+#undef CACHE_IDS
+
+/* Define to 1 if chown fails to change ctime when at least one argument was
+   not -1. */
+#undef CHOWN_CHANGE_TIME_BUG
+
+/* Define if chown is not POSIX compliant regarding IDs of -1. */
+#undef CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE
+
+/* Define if chown modifies symlinks. */
+#undef CHOWN_MODIFIES_SYMLINK
+
+/* Define to 1 if chown mishandles trailing slash. */
+#undef CHOWN_TRAILING_SLASH_BUG
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define if you want to see find's innards */
+#undef DEBUG
+
+/* Define if you want to see a message every time find calls the stat() system
+   call */
+#undef DEBUG_STAT
+
+/* If defined, the default argument size used in child processes */
+#undef DEFAULT_ARG_SIZE
+
+/* the name of the file descriptor member of DIR */
+#undef DIR_FD_MEMBER_NAME
+
+#ifdef DIR_FD_MEMBER_NAME
+# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
+#else
+# define DIR_TO_FD(Dir_p) -1
+#endif
+
+
+/* Define to 1 if // is a file system root distinct from /. */
+#undef DOUBLE_SLASH_IS_DISTINCT_ROOT
+
+/* Define if struct dirent has a member d_ino that actually works. */
+#undef D_INO_IN_DIRENT
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#undef ENABLE_NLS
+
+/* Define to 1 if your platform has fchownat, but it does not reject an empty
+   file name. */
+#undef FCHOWNAT_EMPTY_FILENAME_BUG
+
+/* Define to 1 if your platform has fchownat, but it cannot perform lchown
+   tasks. */
+#undef FCHOWNAT_NOFOLLOW_BUG
+
+/* Define this to 1 if F_DUPFD behavior does not match POSIX */
+#undef FCNTL_DUPFD_BUGGY
+
+/* Define if we are compiling GNU findutils */
+#undef FINDUTILS
+
+/* Define to nothing if C supports flexible array members, and to 1 if it does
+   not. That way, with a declaration like `struct s { int n; double
+   d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
+   compilers. When computing the size of such an object, don't use 'sizeof
+   (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
+   instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
+   MSVC and with C++ compilers. */
+#undef FLEXIBLE_ARRAY_MEMBER
+
+/* Define to 1 if fopen() fails to recognize a trailing slash. */
+#undef FOPEN_TRAILING_SLASH_BUG
+
+/* Define to 1 if the system's ftello function has the Solaris bug. */
+#undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE
+
+/* Define to 1 if mkdir mistakenly creates a directory given with a trailing
+   dot component. */
+#undef FUNC_MKDIR_DOT_BUG
+
+/* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */
+#undef FUNC_NL_LANGINFO_YESEXPR_WORKS
+
+/* Define to 1 if realpath() can malloc memory, always gives an absolute path,
+   and handles trailing slash correctly. */
+#undef FUNC_REALPATH_WORKS
+
+/* Define to 1 if ungetc is broken when used on arbitrary bytes. */
+#undef FUNC_UNGETC_BROKEN
+
+/* Define to the type of elements in the array set by `getgroups'. Usually
+   this is either `int' or `gid_t'. */
+#undef GETGROUPS_T
+
+/* Define this to 1 if getgroups(0,NULL) does not return the number of groups.
+   */
+#undef GETGROUPS_ZERO_BUG
+
+/* Define if gettimeofday clobbers the localtime buffer. */
+#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
+
+/* Define this to 'void' or 'struct timezone' to match the system's
+   declaration of the second argument to gettimeofday. */
+#undef GETTIMEOFDAY_TIMEZONE
+
+/* Define to make the limit macros in <stdint.h> visible. */
+#undef GL_TRIGGER_STDC_LIMIT_MACROS
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module areadlinkat shall be considered present. */
+#undef GNULIB_AREADLINKAT
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module canonicalize shall be considered present. */
+#undef GNULIB_CANONICALIZE
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module close-stream shall be considered present. */
+#undef GNULIB_CLOSE_STREAM
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module dirent-safer shall be considered present. */
+#undef GNULIB_DIRENT_SAFER
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module dirname shall be considered present. */
+#undef GNULIB_DIRNAME
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module faccessat shall be considered present. */
+#undef GNULIB_FACCESSAT
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module fcntl-safer shall be considered present. */
+#undef GNULIB_FCNTL_SAFER
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module fdopendir shall be considered present. */
+#undef GNULIB_FDOPENDIR
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module fd-safer-flag shall be considered present. */
+#undef GNULIB_FD_SAFER_FLAG
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module fopen-safer shall be considered present. */
+#undef GNULIB_FOPEN_SAFER
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module malloc-gnu shall be considered present. */
+#undef GNULIB_MALLOC_GNU
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module openat-safer shall be considered present. */
+#undef GNULIB_OPENAT_SAFER
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module realloc-gnu shall be considered present. */
+#undef GNULIB_REALLOC_GNU
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module snprintf shall be considered present. */
+#undef GNULIB_SNPRINTF
+
+/* Define to 1 when the gnulib module btowc should be tested. */
+#undef GNULIB_TEST_BTOWC
+
+/* Define to 1 when the gnulib module canonicalize should be tested. */
+#undef GNULIB_TEST_CANONICALIZE
+
+/* Define to 1 when the gnulib module canonicalize_file_name should be tested.
+   */
+#undef GNULIB_TEST_CANONICALIZE_FILE_NAME
+
+/* Define to 1 when the gnulib module chown should be tested. */
+#undef GNULIB_TEST_CHOWN
+
+/* Define to 1 when the gnulib module cloexec should be tested. */
+#undef GNULIB_TEST_CLOEXEC
+
+/* Define to 1 when the gnulib module close should be tested. */
+#undef GNULIB_TEST_CLOSE
+
+/* Define to 1 when the gnulib module dirfd should be tested. */
+#undef GNULIB_TEST_DIRFD
+
+/* Define to 1 when the gnulib module dup2 should be tested. */
+#undef GNULIB_TEST_DUP2
+
+/* Define to 1 when the gnulib module environ should be tested. */
+#undef GNULIB_TEST_ENVIRON
+
+/* Define to 1 when the gnulib module euidaccess should be tested. */
+#undef GNULIB_TEST_EUIDACCESS
+
+/* Define to 1 when the gnulib module faccessat should be tested. */
+#undef GNULIB_TEST_FACCESSAT
+
+/* Define to 1 when the gnulib module fchdir should be tested. */
+#undef GNULIB_TEST_FCHDIR
+
+/* Define to 1 when the gnulib module fclose should be tested. */
+#undef GNULIB_TEST_FCLOSE
+
+/* Define to 1 when the gnulib module fcntl should be tested. */
+#undef GNULIB_TEST_FCNTL
+
+/* Define to 1 when the gnulib module fdopendir should be tested. */
+#undef GNULIB_TEST_FDOPENDIR
+
+/* Define to 1 when the gnulib module fflush should be tested. */
+#undef GNULIB_TEST_FFLUSH
+
+/* Define to 1 when the gnulib module fopen should be tested. */
+#undef GNULIB_TEST_FOPEN
+
+/* Define to 1 when the gnulib module fpurge should be tested. */
+#undef GNULIB_TEST_FPURGE
+
+/* Define to 1 when the gnulib module fseeko should be tested. */
+#undef GNULIB_TEST_FSEEKO
+
+/* Define to 1 when the gnulib module ftell should be tested. */
+#undef GNULIB_TEST_FTELL
+
+/* Define to 1 when the gnulib module ftello should be tested. */
+#undef GNULIB_TEST_FTELLO
+
+/* Define to 1 when the gnulib module getcwd should be tested. */
+#undef GNULIB_TEST_GETCWD
+
+/* Define to 1 when the gnulib module getdelim should be tested. */
+#undef GNULIB_TEST_GETDELIM
+
+/* Define to 1 when the gnulib module getdtablesize should be tested. */
+#undef GNULIB_TEST_GETDTABLESIZE
+
+/* Define to 1 when the gnulib module getgroups should be tested. */
+#undef GNULIB_TEST_GETGROUPS
+
+/* Define to 1 when the gnulib module getline should be tested. */
+#undef GNULIB_TEST_GETLINE
+
+/* Define to 1 when the gnulib module getopt-gnu should be tested. */
+#undef GNULIB_TEST_GETOPT_GNU
+
+/* Define to 1 when the gnulib module getpagesize should be tested. */
+#undef GNULIB_TEST_GETPAGESIZE
+
+/* Define to 1 when the gnulib module gettimeofday should be tested. */
+#undef GNULIB_TEST_GETTIMEOFDAY
+
+/* Define to 1 when the gnulib module iswblank should be tested. */
+#undef GNULIB_TEST_ISWBLANK
+
+/* Define to 1 when the gnulib module lchown should be tested. */
+#undef GNULIB_TEST_LCHOWN
+
+/* Define to 1 when the gnulib module lseek should be tested. */
+#undef GNULIB_TEST_LSEEK
+
+/* Define to 1 when the gnulib module lstat should be tested. */
+#undef GNULIB_TEST_LSTAT
+
+/* Define to 1 when the gnulib module malloc-posix should be tested. */
+#undef GNULIB_TEST_MALLOC_POSIX
+
+/* Define to 1 when the gnulib module mbrtowc should be tested. */
+#undef GNULIB_TEST_MBRTOWC
+
+/* Define to 1 when the gnulib module mbscasestr should be tested. */
+#undef GNULIB_TEST_MBSCASESTR
+
+/* Define to 1 when the gnulib module mbsinit should be tested. */
+#undef GNULIB_TEST_MBSINIT
+
+/* Define to 1 when the gnulib module mbslen should be tested. */
+#undef GNULIB_TEST_MBSLEN
+
+/* Define to 1 when the gnulib module mbsrtowcs should be tested. */
+#undef GNULIB_TEST_MBSRTOWCS
+
+/* Define to 1 when the gnulib module mbsstr should be tested. */
+#undef GNULIB_TEST_MBSSTR
+
+/* Define to 1 when the gnulib module mbtowc should be tested. */
+#undef GNULIB_TEST_MBTOWC
+
+/* Define to 1 when the gnulib module memchr should be tested. */
+#undef GNULIB_TEST_MEMCHR
+
+/* Define to 1 when the gnulib module mempcpy should be tested. */
+#undef GNULIB_TEST_MEMPCPY
+
+/* Define to 1 when the gnulib module memrchr should be tested. */
+#undef GNULIB_TEST_MEMRCHR
+
+/* Define to 1 when the gnulib module mktime should be tested. */
+#undef GNULIB_TEST_MKTIME
+
+/* Define to 1 when the gnulib module nl_langinfo should be tested. */
+#undef GNULIB_TEST_NL_LANGINFO
+
+/* Define to 1 when the gnulib module open should be tested. */
+#undef GNULIB_TEST_OPEN
+
+/* Define to 1 when the gnulib module perror should be tested. */
+#undef GNULIB_TEST_PERROR
+
+/* Define to 1 when the gnulib module putenv should be tested. */
+#undef GNULIB_TEST_PUTENV
+
+/* Define to 1 when the gnulib module readlink should be tested. */
+#undef GNULIB_TEST_READLINK
+
+/* Define to 1 when the gnulib module readlinkat should be tested. */
+#undef GNULIB_TEST_READLINKAT
+
+/* Define to 1 when the gnulib module realloc-posix should be tested. */
+#undef GNULIB_TEST_REALLOC_POSIX
+
+/* Define to 1 when the gnulib module rmdir should be tested. */
+#undef GNULIB_TEST_RMDIR
+
+/* Define to 1 when the gnulib module rpmatch should be tested. */
+#undef GNULIB_TEST_RPMATCH
+
+/* Define to 1 when the gnulib module setenv should be tested. */
+#undef GNULIB_TEST_SETENV
+
+/* Define to 1 when the gnulib module setlocale should be tested. */
+#undef GNULIB_TEST_SETLOCALE
+
+/* Define to 1 when the gnulib module sleep should be tested. */
+#undef GNULIB_TEST_SLEEP
+
+/* Define to 1 when the gnulib module snprintf should be tested. */
+#undef GNULIB_TEST_SNPRINTF
+
+/* Define to 1 when the gnulib module stat should be tested. */
+#undef GNULIB_TEST_STAT
+
+/* Define to 1 when the gnulib module stpcpy should be tested. */
+#undef GNULIB_TEST_STPCPY
+
+/* Define to 1 when the gnulib module strcasestr should be tested. */
+#undef GNULIB_TEST_STRCASESTR
+
+/* Define to 1 when the gnulib module strdup should be tested. */
+#undef GNULIB_TEST_STRDUP
+
+/* Define to 1 when the gnulib module strerror should be tested. */
+#undef GNULIB_TEST_STRERROR
+
+/* Define to 1 when the gnulib module strndup should be tested. */
+#undef GNULIB_TEST_STRNDUP
+
+/* Define to 1 when the gnulib module strnlen should be tested. */
+#undef GNULIB_TEST_STRNLEN
+
+/* Define to 1 when the gnulib module strstr should be tested. */
+#undef GNULIB_TEST_STRSTR
+
+/* Define to 1 when the gnulib module strtoll should be tested. */
+#undef GNULIB_TEST_STRTOLL
+
+/* Define to 1 when the gnulib module strtoull should be tested. */
+#undef GNULIB_TEST_STRTOULL
+
+/* Define to 1 when the gnulib module symlink should be tested. */
+#undef GNULIB_TEST_SYMLINK
+
+/* Define to 1 when the gnulib module symlinkat should be tested. */
+#undef GNULIB_TEST_SYMLINKAT
+
+/* Define to 1 when the gnulib module time_r should be tested. */
+#undef GNULIB_TEST_TIME_R
+
+/* Define to 1 when the gnulib module unlink should be tested. */
+#undef GNULIB_TEST_UNLINK
+
+/* Define to 1 when the gnulib module unsetenv should be tested. */
+#undef GNULIB_TEST_UNSETENV
+
+/* Define to 1 when the gnulib module usleep should be tested. */
+#undef GNULIB_TEST_USLEEP
+
+/* Define to 1 when the gnulib module wcrtomb should be tested. */
+#undef GNULIB_TEST_WCRTOMB
+
+/* Define to 1 when the gnulib module wctob should be tested. */
+#undef GNULIB_TEST_WCTOB
+
+/* Define to 1 when the gnulib module wctomb should be tested. */
+#undef GNULIB_TEST_WCTOMB
+
+/* Define to 1 when the gnulib module wcwidth should be tested. */
+#undef GNULIB_TEST_WCWIDTH
+
+/* Define to 1 if you have the `access' function. */
+#undef HAVE_ACCESS
+
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
+
+/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
+   may be supplied by this distribution. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if the compiler supports __attribute__ ((__noreturn__)) */
+#undef HAVE_ATTRIBUTE_NORETURN
+
+/* Define to 1 if you have the <bp-sym.h> header file. */
+#undef HAVE_BP_SYM_H
+
+/* Define to 1 if you have the `btowc' function. */
+#undef HAVE_BTOWC
+
+/* Define to 1 if you have the `canonicalize_file_name' function. */
+#undef HAVE_CANONICALIZE_FILE_NAME
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Define to 1 if you have the `chown' function. */
+#undef HAVE_CHOWN
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the `clock_settime' function. */
+#undef HAVE_CLOCK_SETTIME
+
+/* Define if you have compound literals. */
+#undef HAVE_COMPOUND_LITERALS
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't.
+   */
+#undef HAVE_DECL_ALARM
+
+/* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't.
+   */
+#undef HAVE_DECL_DIRFD
+
+/* Define to 1 if you have the declaration of `fchdir', and to 0 if you don't.
+   */
+#undef HAVE_DECL_FCHDIR
+
+/* Define to 1 if you have the declaration of `fdopendir', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FDOPENDIR
+
+/* Define to 1 if you have the declaration of `fpurge', and to 0 if you don't.
+   */
+#undef HAVE_DECL_FPURGE
+
+/* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't.
+   */
+#undef HAVE_DECL_FSEEKO
+
+/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't.
+   */
+#undef HAVE_DECL_FTELLO
+
+/* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't.
+   */
+#undef HAVE_DECL_GETCWD
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETDELIM
+
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+   */
+#undef HAVE_DECL_GETENV
+
+/* Define to 1 if you have the declaration of `getline', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLINE
+
+/* Define to 1 if you have the declaration of `imaxabs', and to 0 if you
+   don't. */
+#undef HAVE_DECL_IMAXABS
+
+/* Define to 1 if you have the declaration of `imaxdiv', and to 0 if you
+   don't. */
+#undef HAVE_DECL_IMAXDIV
+
+/* Define to 1 if you have the declaration of `isblank', and to 0 if you
+   don't. */
+#undef HAVE_DECL_ISBLANK
+
+/* Define to 1 if you have the declaration of `iswblank', and to 0 if you
+   don't. */
+#undef HAVE_DECL_ISWBLANK
+
+/* Define to 1 if you have the declaration of `localtime_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_LOCALTIME_R
+
+/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
+   don't. */
+#undef HAVE_DECL_MEMRCHR
+
+/* Define to 1 if you have the declaration of `program_invocation_name', and
+   to 0 if you don't. */
+#undef HAVE_DECL_PROGRAM_INVOCATION_NAME
+
+/* Define to 1 if you have the declaration of `program_invocation_short_name',
+   and to 0 if you don't. */
+#undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+
+/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't.
+   */
+#undef HAVE_DECL_SETENV
+
+/* Define to 1 if you have the declaration of `setregid', and to 0 if you
+   don't. */
+#undef HAVE_DECL_SETREGID
+
+/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't.
+   */
+#undef HAVE_DECL_SLEEP
+
+/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL_SNPRINTF
+
+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
+   */
+#undef HAVE_DECL_STRDUP
+
+/* Define to 1 if you have the declaration of `strerror', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRERROR
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRERROR_R
+
+/* Define to 1 if you have the declaration of `strmode', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRMODE
+
+/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRNCASECMP
+
+/* Define to 1 if you have the declaration of `strndup', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRNDUP
+
+/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRNLEN
+
+/* Define to 1 if you have the declaration of `strtoimax', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRTOIMAX
+
+/* Define to 1 if you have the declaration of `strtoll', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRTOLL
+
+/* Define to 1 if you have the declaration of `strtoull', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRTOULL
+
+/* Define to 1 if you have the declaration of `strtoumax', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRTOUMAX
+
+/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
+   */
+#undef HAVE_DECL_TZNAME
+
+/* Define to 1 if you have the declaration of `unsetenv', and to 0 if you
+   don't. */
+#undef HAVE_DECL_UNSETENV
+
+/* Define to 1 if you have the declaration of `wctob', and to 0 if you don't.
+   */
+#undef HAVE_DECL_WCTOB
+
+/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you
+   don't. */
+#undef HAVE_DECL_WCWIDTH
+
+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL__SNPRINTF
+
+/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
+   don't. */
+#undef HAVE_DECL___FPENDING
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `dirfd' function. */
+#undef HAVE_DIRFD
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Define to 1 if you have the `dup2' function. */
+#undef HAVE_DUP2
+
+/* Define to 1 if you have the `eaccess' function. */
+#undef HAVE_EACCESS
+
+/* Define to 1 if you have the `endgrent' function. */
+#undef HAVE_ENDGRENT
+
+/* Define to 1 if you have the `endmntent' function. */
+#undef HAVE_ENDMNTENT
+
+/* Define to 1 if you have the `endpwent' function. */
+#undef HAVE_ENDPWENT
+
+/* Define if you have the declaration of environ. */
+#undef HAVE_ENVIRON_DECL
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the `euidaccess' function. */
+#undef HAVE_EUIDACCESS
+
+/* fabs is defined in -lm */
+#undef HAVE_FABS_IN_LIBM
+
+/* Define to 1 if you have the `faccessat' function. */
+#undef HAVE_FACCESSAT
+
+/* Define to 1 if you have the `fchdir' function. */
+#undef HAVE_FCHDIR
+
+/* Define to 1 if you have the `fchmodat' function. */
+#undef HAVE_FCHMODAT
+
+/* Define to 1 if you have the `fchown' function. */
+#undef HAVE_FCHOWN
+
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `fdopendir' function. */
+#undef HAVE_FDOPENDIR
+
+/* Define to 1 if you have the <features.h> header file. */
+#undef HAVE_FEATURES_H
+
+/* Define to 1 if you have the `flockfile' function. */
+#undef HAVE_FLOCKFILE
+
+/* Define to 1 if you have the `forcefindlib' function. */
+#undef HAVE_FORCEFINDLIB
+
+/* Define to 1 if you have the `fpurge' function. */
+#undef HAVE_FPURGE
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
+/* Define to 1 if you have the `fstatat' function. */
+#undef HAVE_FSTATAT
+
+/* Define to 1 if you have the `fstatfs' function. */
+#undef HAVE_FSTATFS
+
+/* Define to 1 if you have the <fs_info.h> header file. */
+#undef HAVE_FS_INFO_H
+
+/* Define to 1 if you have the `fs_stat_dev' function. */
+#undef HAVE_FS_STAT_DEV
+
+/* Define to 1 if you have the `funlockfile' function. */
+#undef HAVE_FUNLOCKFILE
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `getdelim' function. */
+#undef HAVE_GETDELIM
+
+/* Define to 1 if you have the `getdtablesize' function. */
+#undef HAVE_GETDTABLESIZE
+
+/* Define to 1 if you have the `getegid' function. */
+#undef HAVE_GETEGID
+
+/* Define to 1 if you have the `getgrouplist' function. */
+#undef HAVE_GETGROUPLIST
+
+/* Define to 1 if your system has a working `getgroups' function. */
+#undef HAVE_GETGROUPS
+
+/* Define to 1 if you have the `getmntent' function. */
+#undef HAVE_GETMNTENT
+
+/* Define to 1 if you have the `getmntinfo' function. */
+#undef HAVE_GETMNTINFO
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getopt_long_only' function. */
+#undef HAVE_GETOPT_LONG_ONLY
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getppriv' function. */
+#undef HAVE_GETPPRIV
+
+/* Define to 1 if you have the `getrusage' function. */
+#undef HAVE_GETRUSAGE
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <grp.h> header file. */
+#undef HAVE_GRP_H
+
+/* Define to 1 if you have the `hasmntopt' function. */
+#undef HAVE_HASMNTOPT
+
+/* Define if you have the iconv() function and it works. */
+#undef HAVE_ICONV
+
+/* Define to 1 if the compiler supports one of the keywords 'inline',
+   '__inline__', '__inline' and effectively inlines functions marked as such.
+   */
+#undef HAVE_INLINE
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_INTMAX_T
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define to 1 if you have the `isblank' function. */
+#undef HAVE_ISBLANK
+
+/* Define to 1 if you have the `iswblank' function. */
+#undef HAVE_ISWBLANK
+
+/* Define to 1 if you have the `iswcntrl' function. */
+#undef HAVE_ISWCNTRL
+
+/* Define to 1 if you have the `iswctype' function. */
+#undef HAVE_ISWCTYPE
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define to 1 if you have the <langinfo.h> header file. */
+#undef HAVE_LANGINFO_H
+
+/* Define if you have <langinfo.h> and nl_langinfo(YESEXPR). */
+#undef HAVE_LANGINFO_YESEXPR
+
+/* Define to 1 if you have the `lchmod' function. */
+#undef HAVE_LCHMOD
+
+/* Define to 1 if you have the `lchown' function. */
+#undef HAVE_LCHOWN
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if you have the <libgen.h> header file. */
+#undef HAVE_LIBGEN_H
+
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
+/* Define to 1 if you have the `sun' library (-lsun). */
+#undef HAVE_LIBSUN
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the `listmntent' function. */
+#undef HAVE_LISTMNTENT
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define to 1 if you have the `localtime_r' function. */
+#undef HAVE_LOCALTIME_R
+
+/* Define to 1 if you support file names longer than 14 characters. */
+#undef HAVE_LONG_FILE_NAMES
+
+/* Define to 1 if the system has the type `long long int'. */
+#undef HAVE_LONG_LONG_INT
+
+/* Define to 1 if you have the `lstat' function. */
+#undef HAVE_LSTAT
+
+/* Define to 1 if your system has a GNU libc compatible 'malloc' function, and
+   to 0 otherwise. */
+#undef HAVE_MALLOC_GNU
+
+/* Define if the 'malloc' function is POSIX compliant. */
+#undef HAVE_MALLOC_POSIX
+
+/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
+   config.h and <sys/mman.h>. */
+#undef HAVE_MAP_ANONYMOUS
+
+/* Define to 1 if you have the <math.h> header file. */
+#undef HAVE_MATH_H
+
+/* Define to 1 if you have the `mbrtowc' function. */
+#undef HAVE_MBRTOWC
+
+/* Define to 1 if you have the `mbsinit' function. */
+#undef HAVE_MBSINIT
+
+/* Define to 1 if you have the `mbslen' function. */
+#undef HAVE_MBSLEN
+
+/* Define to 1 if you have the `mbsrtowcs' function. */
+#undef HAVE_MBSRTOWCS
+
+/* Define to 1 if <wchar.h> declares mbstate_t. */
+#undef HAVE_MBSTATE_T
+
+/* Define to 1 if you have the `memchr' function. */
+#undef HAVE_MEMCHR
+
+/* Define to 1 if you have the `memcmp' function. */
+#undef HAVE_MEMCMP
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* Define to 1 if you have the `memrchr' function. */
+#undef HAVE_MEMRCHR
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `mkdirat' function. */
+#undef HAVE_MKDIRAT
+
+/* Define to 1 if you have the <mntent.h> header file. */
+#undef HAVE_MNTENT_H
+
+/* modf is defined in -lm */
+#undef HAVE_MODF_IN_LIBM
+
+/* Define to 1 if you have the `mprotect' function. */
+#undef HAVE_MPROTECT
+
+/* Define to 1 if you have the `nanotime' function. */
+#undef HAVE_NANOTIME
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the `newlocale' function. */
+#undef HAVE_NEWLOCALE
+
+/* Define to 1 if you have the `next_dev' function. */
+#undef HAVE_NEXT_DEV
+
+/* Define to 1 if you have the `nl_langinfo' function. */
+#undef HAVE_NL_LANGINFO
+
+/* Define to 1 if you have the `openat' function. */
+#undef HAVE_OPENAT
+
+/* Define to 1 if you have the <OS.h> header file. */
+#undef HAVE_OS_H
+
+/* Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
+   setting errno to ERANGE, ENAMETOOLONG, or ENOENT. */
+#undef HAVE_PARTLY_WORKING_GETCWD
+
+/* Define to 1 if you have the `pathconf' function. */
+#undef HAVE_PATHCONF
+
+/* Define to 1 if you have the `pipe' function. */
+#undef HAVE_PIPE
+
+/* Define to 1 if you have the <priv.h> header file. */
+#undef HAVE_PRIV_H
+
+/* Define to 1 if you have the `pthread_atfork' function. */
+#undef HAVE_PTHREAD_ATFORK
+
+/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
+#undef HAVE_PTHREAD_MUTEX_RECURSIVE
+
+/* Define if the POSIX multithreading library has read/write locks. */
+#undef HAVE_PTHREAD_RWLOCK
+
+/* Define to 1 if acosl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ACOSL
+
+/* Define to 1 if alphasort is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ALPHASORT
+
+/* Define to 1 if asinl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ASINL
+
+/* Define to 1 if atanl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ATANL
+
+/* Define to 1 if atoll is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ATOLL
+
+/* Define to 1 if btowc is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_BTOWC
+
+/* Define to 1 if canonicalize_file_name is declared even after undefining
+   macros. */
+#undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
+
+/* Define to 1 if ceilf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_CEILF
+
+/* Define to 1 if ceill is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_CEILL
+
+/* Define to 1 if chown is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_CHOWN
+
+/* Define to 1 if cosl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_COSL
+
+/* Define to 1 if dirfd is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DIRFD
+
+/* Define to 1 if dprintf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DPRINTF
+
+/* Define to 1 if dup2 is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DUP2
+
+/* Define to 1 if dup3 is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DUP3
+
+/* Define to 1 if duplocale is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DUPLOCALE
+
+/* Define to 1 if endusershell is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ENDUSERSHELL
+
+/* Define to 1 if environ is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ENVIRON
+
+/* Define to 1 if euidaccess is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_EUIDACCESS
+
+/* Define to 1 if expl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_EXPL
+
+/* Define to 1 if faccessat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FACCESSAT
+
+/* Define to 1 if fchdir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FCHDIR
+
+/* Define to 1 if fchmodat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FCHMODAT
+
+/* Define to 1 if fchownat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FCHOWNAT
+
+/* Define to 1 if fcntl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FCNTL
+
+/* Define to 1 if fdopendir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FDOPENDIR
+
+/* Define to 1 if floorf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FLOORF
+
+/* Define to 1 if floorl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FLOORL
+
+/* Define to 1 if fpurge is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FPURGE
+
+/* Define to 1 if frexpl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FREXPL
+
+/* Define to 1 if fseeko is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FSEEKO
+
+/* Define to 1 if fstatat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FSTATAT
+
+/* Define to 1 if fsync is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FSYNC
+
+/* Define to 1 if ftello is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FTELLO
+
+/* Define to 1 if ftruncate is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FTRUNCATE
+
+/* Define to 1 if futimens is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FUTIMENS
+
+/* Define to 1 if getcwd is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETCWD
+
+/* Define to 1 if getdelim is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETDELIM
+
+/* Define to 1 if getdomainname is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETDOMAINNAME
+
+/* Define to 1 if getdtablesize is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETDTABLESIZE
+
+/* Define to 1 if getgroups is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETGROUPS
+
+/* Define to 1 if gethostname is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETHOSTNAME
+
+/* Define to 1 if getline is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETLINE
+
+/* Define to 1 if getloadavg is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETLOADAVG
+
+/* Define to 1 if getlogin is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETLOGIN
+
+/* Define to 1 if getlogin_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETLOGIN_R
+
+/* Define to 1 if getpagesize is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETPAGESIZE
+
+/* Define to 1 if getsubopt is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETSUBOPT
+
+/* Define to 1 if gettimeofday is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETTIMEOFDAY
+
+/* Define to 1 if getusershell is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETUSERSHELL
+
+/* Define to 1 if grantpt is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GRANTPT
+
+/* Define to 1 if imaxabs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_IMAXABS
+
+/* Define to 1 if imaxdiv is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_IMAXDIV
+
+/* Define to 1 if initstat_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_INITSTAT_R
+
+/* Define to 1 if isblank is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ISBLANK
+
+/* Define to 1 if iswctype is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ISWCTYPE
+
+/* Define to 1 if lchmod is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LCHMOD
+
+/* Define to 1 if lchown is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LCHOWN
+
+/* Define to 1 if ldexpl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LDEXPL
+
+/* Define to 1 if link is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LINK
+
+/* Define to 1 if linkat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LINKAT
+
+/* Define to 1 if logb is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LOGB
+
+/* Define to 1 if logl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LOGL
+
+/* Define to 1 if lseek is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LSEEK
+
+/* Define to 1 if lstat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LSTAT
+
+/* Define to 1 if mbrlen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MBRLEN
+
+/* Define to 1 if mbrtowc is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MBRTOWC
+
+/* Define to 1 if mbsinit is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MBSINIT
+
+/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MBSNRTOWCS
+
+/* Define to 1 if mbsrtowcs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MBSRTOWCS
+
+/* Define to 1 if memmem is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MEMMEM
+
+/* Define to 1 if mempcpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MEMPCPY
+
+/* Define to 1 if memrchr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MEMRCHR
+
+/* Define to 1 if mkdirat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKDIRAT
+
+/* Define to 1 if mkdtemp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKDTEMP
+
+/* Define to 1 if mkfifo is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKFIFO
+
+/* Define to 1 if mkfifoat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKFIFOAT
+
+/* Define to 1 if mknod is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKNOD
+
+/* Define to 1 if mknodat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKNODAT
+
+/* Define to 1 if mkostemp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKOSTEMP
+
+/* Define to 1 if mkostemps is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKOSTEMPS
+
+/* Define to 1 if mkstemp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKSTEMP
+
+/* Define to 1 if mkstemps is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKSTEMPS
+
+/* Define to 1 if nl_langinfo is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_NL_LANGINFO
+
+/* Define to 1 if openat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_OPENAT
+
+/* Define to 1 if pipe is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PIPE
+
+/* Define to 1 if pipe2 is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PIPE2
+
+/* Define to 1 if popen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_POPEN
+
+/* Define to 1 if pread is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PREAD
+
+/* Define to 1 if ptsname is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PTSNAME
+
+/* Define to 1 if pwrite is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PWRITE
+
+/* Define to 1 if random_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RANDOM_R
+
+/* Define to 1 if rawmemchr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RAWMEMCHR
+
+/* Define to 1 if readlink is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_READLINK
+
+/* Define to 1 if readlinkat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_READLINKAT
+
+/* Define to 1 if realpath is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_REALPATH
+
+/* Define to 1 if renameat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RENAMEAT
+
+/* Define to 1 if rmdir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RMDIR
+
+/* Define to 1 if round is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ROUND
+
+/* Define to 1 if roundf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ROUNDF
+
+/* Define to 1 if roundl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ROUNDL
+
+/* Define to 1 if rpmatch is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RPMATCH
+
+/* Define to 1 if scandir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SCANDIR
+
+/* Define to 1 if setenv is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETENV
+
+/* Define to 1 if setlocale is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETLOCALE
+
+/* Define to 1 if setstate_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETSTATE_R
+
+/* Define to 1 if setusershell is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETUSERSHELL
+
+/* Define to 1 if sinl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SINL
+
+/* Define to 1 if sleep is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SLEEP
+
+/* Define to 1 if snprintf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SNPRINTF
+
+/* Define to 1 if sqrtl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SQRTL
+
+/* Define to 1 if srandom_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SRANDOM_R
+
+/* Define to 1 if stat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STAT
+
+/* Define to 1 if stpcpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STPCPY
+
+/* Define to 1 if stpncpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STPNCPY
+
+/* Define to 1 if strcasecmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRCASECMP
+
+/* Define to 1 if strcasestr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRCASESTR
+
+/* Define to 1 if strchrnul is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRCHRNUL
+
+/* Define to 1 if strdup is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRDUP
+
+/* Define to 1 if strerror_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRERROR_R
+
+/* Define to 1 if strncasecmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRNCASECMP
+
+/* Define to 1 if strncat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRNCAT
+
+/* Define to 1 if strndup is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRNDUP
+
+/* Define to 1 if strnlen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRNLEN
+
+/* Define to 1 if strpbrk is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRPBRK
+
+/* Define to 1 if strsep is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRSEP
+
+/* Define to 1 if strsignal is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRSIGNAL
+
+/* Define to 1 if strtod is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOD
+
+/* Define to 1 if strtoimax is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOIMAX
+
+/* Define to 1 if strtok_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOK_R
+
+/* Define to 1 if strtoll is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOLL
+
+/* Define to 1 if strtoull is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOULL
+
+/* Define to 1 if strtoumax is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOUMAX
+
+/* Define to 1 if strverscmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRVERSCMP
+
+/* Define to 1 if symlink is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SYMLINK
+
+/* Define to 1 if symlinkat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SYMLINKAT
+
+/* Define to 1 if tanl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TANL
+
+/* Define to 1 if tmpfile is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TMPFILE
+
+/* Define to 1 if towctrans is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TOWCTRANS
+
+/* Define to 1 if trunc is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TRUNC
+
+/* Define to 1 if truncf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TRUNCF
+
+/* Define to 1 if truncl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TRUNCL
+
+/* Define to 1 if ttyname_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TTYNAME_R
+
+/* Define to 1 if unlink is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_UNLINK
+
+/* Define to 1 if unlinkat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_UNLINKAT
+
+/* Define to 1 if unlockpt is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_UNLOCKPT
+
+/* Define to 1 if unsetenv is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_UNSETENV
+
+/* Define to 1 if usleep is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_USLEEP
+
+/* Define to 1 if utimensat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_UTIMENSAT
+
+/* Define to 1 if vdprintf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_VDPRINTF
+
+/* Define to 1 if vsnprintf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_VSNPRINTF
+
+/* Define to 1 if waitpid is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WAITPID
+
+/* Define to 1 if wcpcpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCPCPY
+
+/* Define to 1 if wcpncpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCPNCPY
+
+/* Define to 1 if wcrtomb is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCRTOMB
+
+/* Define to 1 if wcscasecmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCASECMP
+
+/* Define to 1 if wcscat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCAT
+
+/* Define to 1 if wcschr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCHR
+
+/* Define to 1 if wcscmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCMP
+
+/* Define to 1 if wcscoll is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCOLL
+
+/* Define to 1 if wcscpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCPY
+
+/* Define to 1 if wcscspn is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCSPN
+
+/* Define to 1 if wcsdup is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSDUP
+
+/* Define to 1 if wcslen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSLEN
+
+/* Define to 1 if wcsncasecmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNCASECMP
+
+/* Define to 1 if wcsncat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNCAT
+
+/* Define to 1 if wcsncmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNCMP
+
+/* Define to 1 if wcsncpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNCPY
+
+/* Define to 1 if wcsnlen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNLEN
+
+/* Define to 1 if wcsnrtombs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNRTOMBS
+
+/* Define to 1 if wcspbrk is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSPBRK
+
+/* Define to 1 if wcsrchr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSRCHR
+
+/* Define to 1 if wcsrtombs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSRTOMBS
+
+/* Define to 1 if wcsspn is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSSPN
+
+/* Define to 1 if wcsstr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSSTR
+
+/* Define to 1 if wcstok is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSTOK
+
+/* Define to 1 if wcswidth is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSWIDTH
+
+/* Define to 1 if wcsxfrm is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSXFRM
+
+/* Define to 1 if wctob is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCTOB
+
+/* Define to 1 if wctrans is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCTRANS
+
+/* Define to 1 if wctype is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCTYPE
+
+/* Define to 1 if wcwidth is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCWIDTH
+
+/* Define to 1 if wmemchr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WMEMCHR
+
+/* Define to 1 if wmemcmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WMEMCMP
+
+/* Define to 1 if wmemcpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WMEMCPY
+
+/* Define to 1 if wmemmove is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WMEMMOVE
+
+/* Define to 1 if wmemset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WMEMSET
+
+/* Define to 1 if _Exit is declared even after undefining macros. */
+#undef HAVE_RAW_DECL__EXIT
+
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
+/* Define to 1 if you have the `readlinkat' function. */
+#undef HAVE_READLINKAT
+
+/* Define to 1 if your system has a GNU libc compatible 'realloc' function,
+   and to 0 otherwise. */
+#undef HAVE_REALLOC_GNU
+
+/* Define if the 'realloc' function is POSIX compliant. */
+#undef HAVE_REALLOC_POSIX
+
+/* Define to 1 if you have the `realpath' function. */
+#undef HAVE_REALPATH
+
+/* Define to 1 if you have the `rpmatch' function. */
+#undef HAVE_RPMATCH
+
+/* Define to 1 if you have the <search.h> header file. */
+#undef HAVE_SEARCH_H
+
+/* Define to 1 if you have the <selinux/context.h> header file. */
+#undef HAVE_SELINUX_CONTEXT_H
+
+/* Define to 1 if you have the <selinux/flask.h> header file. */
+#undef HAVE_SELINUX_FLASK_H
+
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
+#undef HAVE_SELINUX_SELINUX_H
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define to 1 if you have the `setgroups' function. */
+#undef HAVE_SETGROUPS
+
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
+
+/* Define to 1 if you have the `setmntent' function. */
+#undef HAVE_SETMNTENT
+
+/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
+#undef HAVE_SIGNED_SIG_ATOMIC_T
+
+/* Define to 1 if 'wchar_t' is a signed integer type. */
+#undef HAVE_SIGNED_WCHAR_T
+
+/* Define to 1 if 'wint_t' is a signed integer type. */
+#undef HAVE_SIGNED_WINT_T
+
+/* Define to 1 if you have the `sleep' function. */
+#undef HAVE_SLEEP
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define if the return value of the snprintf function is the number of of
+   bytes (excluding the terminating NUL) that would have been produced if the
+   buffer had been large enough. */
+#undef HAVE_SNPRINTF_RETVAL_C99
+
+/* Define to 1 if you have the `statvfs' function. */
+#undef HAVE_STATVFS
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#undef HAVE_STDINT_H_WITH_UINTMAX
+
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `stpcpy' function. */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strcasestr' function. */
+#undef HAVE_STRCASESTR
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
+/* Define to 1 if you have the `strnlen' function. */
+#undef HAVE_STRNLEN
+
+/* Define to 1 if you have the `strspn' function. */
+#undef HAVE_STRSPN
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtoimax' function. */
+#undef HAVE_STRTOIMAX
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the `strtoll' function. */
+#undef HAVE_STRTOLL
+
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
+
+/* Define to 1 if you have the `strtoull' function. */
+#undef HAVE_STRTOULL
+
+/* Define to 1 if you have the `strtoumax' function. */
+#undef HAVE_STRTOUMAX
+
+/* Define if there is a member named d_type in the struct describing directory
+   headers. */
+#undef HAVE_STRUCT_DIRENT_D_TYPE
+
+/* Define to 1 if `f_fstypename' is a member of `struct fsstat'. */
+#undef HAVE_STRUCT_FSSTAT_F_FSTYPENAME
+
+/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_FSTYPENAME
+
+/* Define to 1 if `f_type' is a member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_TYPE
+
+/* Define to 1 if `st_atimensec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIMENSEC
+
+/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
+
+/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
+
+/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
+
+/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
+
+/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
+
+/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC
+
+/* Define to 1 if `st_blocks' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLOCKS
+
+/* Define to 1 if `st_rdev' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_RDEV
+
+/* Define to 1 if `tm_zone' is a member of `struct tm'. */
+#undef HAVE_STRUCT_TM_TM_ZONE
+
+/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
+   `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
+#undef HAVE_ST_BLOCKS
+
+/* Define if struct stat has an st_dm_mode member. */
+#undef HAVE_ST_DM_MODE
+
+/* Define to 1 if you have the `symlink' function. */
+#undef HAVE_SYMLINK
+
+/* Define to 1 if you have the `symlinkat' function. */
+#undef HAVE_SYMLINKAT
+
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
+#undef HAVE_SYS_BITYPES_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/fs_types.h> header file. */
+#undef HAVE_SYS_FS_TYPES_H
+
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+#undef HAVE_SYS_INTTYPES_H
+
+/* Define to 1 if you have the <sys/mkdev.h> header file. */
+#undef HAVE_SYS_MKDEV_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/mntent.h> header file. */
+#undef HAVE_SYS_MNTENT_H
+
+/* Define to 1 if you have the <sys/mntio.h> header file. */
+#undef HAVE_SYS_MNTIO_H
+
+/* Define to 1 if you have the <sys/mnttab.h> header file. */
+#undef HAVE_SYS_MNTTAB_H
+
+/* Define to 1 if you have the <sys/mount.h> header file. */
+#undef HAVE_SYS_MOUNT_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/statvfs.h> header file. */
+#undef HAVE_SYS_STATVFS_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#undef HAVE_SYS_TIMEB_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/ucred.h> header file. */
+#undef HAVE_SYS_UCRED_H
+
+/* Define to 1 if you have the <sys/utsname.h> header file. */
+#undef HAVE_SYS_UTSNAME_H
+
+/* Define to 1 if you have the <sys/vfs.h> header file. */
+#undef HAVE_SYS_VFS_H
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define if struct tm has the tm_gmtoff member. */
+#undef HAVE_TM_GMTOFF
+
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+   `HAVE_STRUCT_TM_TM_ZONE' instead. */
+#undef HAVE_TM_ZONE
+
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+   `tzname'. */
+#undef HAVE_TZNAME
+
+/* Define to 1 if you have the `tzset' function. */
+#undef HAVE_TZSET
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `unlinkat' function. */
+#undef HAVE_UNLINKAT
+
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#undef HAVE_UNSIGNED_LONG_LONG_INT
+
+/* Define to 1 if you have the `uselocale' function. */
+#undef HAVE_USELOCALE
+
+/* Define to 1 if you have the `usleep' function. */
+#undef HAVE_USLEEP
+
+/* Define to 1 if you have the `vasnprintf' function. */
+#undef HAVE_VASNPRINTF
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define if you have the 'wchar_t' type. */
+#undef HAVE_WCHAR_T
+
+/* Define to 1 if you have the `wcrtomb' function. */
+#undef HAVE_WCRTOMB
+
+/* Define to 1 if you have the `wcscoll' function. */
+#undef HAVE_WCSCOLL
+
+/* Define to 1 if you have the `wcslen' function. */
+#undef HAVE_WCSLEN
+
+/* Define to 1 if you have the `wcsnlen' function. */
+#undef HAVE_WCSNLEN
+
+/* Define to 1 if you have the `wctob' function. */
+#undef HAVE_WCTOB
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#undef HAVE_WCTYPE_H
+
+/* Define to 1 if you have the `wcwidth' function. */
+#undef HAVE_WCWIDTH
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#undef HAVE_WINSOCK2_H
+
+/* Define if you have the 'wint_t' type. */
+#undef HAVE_WINT_T
+
+/* Define to 1 if you have the `wmemchr' function. */
+#undef HAVE_WMEMCHR
+
+/* Define to 1 if you have the `wmemcpy' function. */
+#undef HAVE_WMEMCPY
+
+/* Define to 1 if you have the `wmempcpy' function. */
+#undef HAVE_WMEMPCPY
+
+/* Define to 1 if O_NOATIME works. */
+#undef HAVE_WORKING_O_NOATIME
+
+/* Define to 1 if O_NOFOLLOW works. */
+#undef HAVE_WORKING_O_NOFOLLOW
+
+/* Define to 1 if you have the <xlocale.h> header file. */
+#undef HAVE_XLOCALE_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to 1 if you have the `_ftime' function. */
+#undef HAVE__FTIME
+
+/* Define to 1 if you have the `__fpending' function. */
+#undef HAVE___FPENDING
+
+/* Define to 1 if you have the `__fpurge' function. */
+#undef HAVE___FPURGE
+
+/* Define to 1 if you have the `__freading' function. */
+#undef HAVE___FREADING
+
+/* Define if you want to use the leaf optimisation (this can still be turned
+   off with -noleaf) */
+#undef LEAF_OPTIMISATION
+
+/* Define to 1 if lseek does not detect pipes. */
+#undef LSEEK_PIPE_BROKEN
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+   slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
+/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
+   */
+#undef MAJOR_IN_MKDEV
+
+/* Define to 1 if `major', `minor', and `makedev' are declared in
+   <sysmacros.h>. */
+#undef MAJOR_IN_SYSMACROS
+
+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
+#undef MALLOC_0_IS_NONNULL
+
+/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
+#undef MAP_ANONYMOUS
+
+/* Define if the mbrtowc function has the NULL pwc argument bug. */
+#undef MBRTOWC_NULL_ARG1_BUG
+
+/* Define if the mbrtowc function has the NULL string argument bug. */
+#undef MBRTOWC_NULL_ARG2_BUG
+
+/* Define if the mbrtowc function does not return 0 for a NUL character. */
+#undef MBRTOWC_NUL_RETVAL_BUG
+
+/* Define if the mbrtowc function returns a wrong return value. */
+#undef MBRTOWC_RETVAL_BUG
+
+/* Define if there is no specific function for reading the list of mounted
+   file systems. fread will be used to read /etc/mnttab. (SVR2) */
+#undef MOUNTED_FREAD
+
+/* Define if (like SVR2) there is no specific function for reading the list of
+   mounted file systems, and your system has these header files: <sys/fstyp.h>
+   and <sys/statfs.h>. (SVR3) */
+#undef MOUNTED_FREAD_FSTYP
+
+/* Define if there are functions named next_dev and fs_stat_dev for reading
+   the list of mounted file systems. (BeOS) */
+#undef MOUNTED_FS_STAT_DEV
+
+/* Define if there is a function named getfsstat for reading the list of
+   mounted file systems. (DEC Alpha running OSF/1) */
+#undef MOUNTED_GETFSSTAT
+
+/* Define if there is a function named getmnt for reading the list of mounted
+   file systems. (Ultrix) */
+#undef MOUNTED_GETMNT
+
+/* Define if there is a function named getmntent for reading the list of
+   mounted file systems, and that function takes a single argument. (4.3BSD,
+   SunOS, HP-UX, Dynix, Irix) */
+#undef MOUNTED_GETMNTENT1
+
+/* Define if there is a function named getmntent for reading the list of
+   mounted file systems, and that function takes two arguments. (SVR4) */
+#undef MOUNTED_GETMNTENT2
+
+/* Define if there is a function named getmntinfo for reading the list of
+   mounted file systems and it returns an array of 'struct statfs'. (4.4BSD,
+   Darwin) */
+#undef MOUNTED_GETMNTINFO
+
+/* Define if there is a function named getmntinfo for reading the list of
+   mounted file systems and it returns an array of 'struct statvfs'. (NetBSD
+   3.0) */
+#undef MOUNTED_GETMNTINFO2
+
+/* Define if we are on interix, and ought to use statvfs plus some special
+   knowledge on where mounted filesystems can be found. (Interix) */
+#undef MOUNTED_INTERIX_STATVFS
+
+/* Define if there is a function named listmntent that can be used to list all
+   mounted file systems. (UNICOS) */
+#undef MOUNTED_LISTMNTENT
+
+/* Define if there is a function named mntctl that can be used to read the
+   list of mounted file systems, and there is a system header file that
+   declares `struct vmount.' (AIX) */
+#undef MOUNTED_VMOUNT
+
+/* Define to 1 if assertions should be disabled. */
+#undef NDEBUG
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Define to 1 if open() fails to recognize a trailing slash. */
+#undef OPEN_TRAILING_SLASH_BUG
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* String identifying the packager of this software */
+#undef PACKAGE_PACKAGER
+
+/* Packager info for bug reports (URL/e-mail/...) */
+#undef PACKAGE_PACKAGER_BUG_REPORTS
+
+/* Packager-specific version information */
+#undef PACKAGE_PACKAGER_VERSION
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* the number of pending output bytes on stream `fp' */
+#undef PENDING_OUTPUT_N_BYTES
+
+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+#undef PRI_MACROS_BROKEN
+
+/* Define to the type that is the result of default argument promotions of
+   type mode_t. */
+#undef PROMOTED_MODE_T
+
+/* Define to 1 if the C compiler supports function prototypes. */
+#undef PROTOTYPES
+
+/* Define if the pthread_in_use() detection is hard. */
+#undef PTHREAD_IN_USE_DETECTION_HARD
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'ptrdiff_t'. */
+#undef PTRDIFF_T_SUFFIX
+
+/* Define to 1 if readlink fails to recognize a trailing slash. */
+#undef READLINK_TRAILING_SLASH_BUG
+
+/* Define to 1 if gnulib's fchdir() replacement is used. */
+#undef REPLACE_FCHDIR
+
+/* Define to 1 if stat needs help when passed a directory name with a trailing
+   slash */
+#undef REPLACE_FUNC_STAT_DIR
+
+/* Define to 1 if stat needs help when passed a file name with a trailing
+   slash */
+#undef REPLACE_FUNC_STAT_FILE
+
+/* Define if nl_langinfo exists but is overridden by gnulib. */
+#undef REPLACE_NL_LANGINFO
+
+/* Define to 1 if open() should work around the inability to open a directory.
+   */
+#undef REPLACE_OPEN_DIRECTORY
+
+/* Define this to 1 if strerror is broken. */
+#undef REPLACE_STRERROR
+
+/* Define if vasnprintf exists but is overridden by gnulib. */
+#undef REPLACE_VASNPRINTF
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'sig_atomic_t'. */
+#undef SIG_ATOMIC_T_SUFFIX
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#ifndef SIZE_MAX
+# undef SIZE_MAX
+#endif
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'size_t'. */
+#undef SIZE_T_SUFFIX
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+       STACK_DIRECTION > 0 => grows toward higher addresses
+       STACK_DIRECTION < 0 => grows toward lower addresses
+       STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#undef STAT_MACROS_BROKEN
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
+/* Define to 1 if all 'time_t' values fit in a 'long int'. */
+#undef TIME_T_FITS_IN_LONG_INT
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Define to 1 if the type of the st_atim member of a struct stat is struct
+   timespec. */
+#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
+
+/* Define to 1 if unlink (dir) cannot possibly succeed. */
+#undef UNLINK_CANNOT_UNLINK_DIR
+
+/* Define to 1 if unlink() on a parent directory may succeed */
+#undef UNLINK_PARENT_BUG
+
+/* Define if the POSIX multithreading library can be used. */
+#undef USE_POSIX_THREADS
+
+/* Define if references to the POSIX multithreading library should be made
+   weak. */
+#undef USE_POSIX_THREADS_WEAK
+
+/* Define if the GNU Pth multithreading library can be used. */
+#undef USE_PTH_THREADS
+
+/* Define if references to the GNU Pth multithreading library should be made
+   weak. */
+#undef USE_PTH_THREADS_WEAK
+
+/* Define if the old Solaris multithreading library can be used. */
+#undef USE_SOLARIS_THREADS
+
+/* Define if references to the old Solaris multithreading library should be
+   made weak. */
+#undef USE_SOLARIS_THREADS_WEAK
+
+/* Define if the Win32 multithreading API can be used. */
+#undef USE_WIN32_THREADS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if unsetenv returns void instead of int. */
+#undef VOID_UNSETENV
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'wchar_t'. */
+#undef WCHAR_T_SUFFIX
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'wint_t'. */
+#undef WINT_T_SUFFIX
+
+/* Define if you want to use fts() to do the filesystem search. */
+#undef WITH_FTS
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define if you want regoff_t to be at least as wide POSIX requires. */
+#undef _REGEX_LARGE_OFFSETS
+
+/* Define to 500 only on HP-UX. */
+#undef _XOPEN_SOURCE
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define to rpl_ if the getopt replacement functions and variables should be
+   used. */
+#undef __GETOPT_PREFIX
+
+/* Define like PROTOTYPES; this can be used by system headers. */
+#undef __PROTOTYPES
+
+/* Ensure that <stdint.h> defines the limit macros, since gnulib's
+   <inttypes.h> relies on them.  */
+#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+
+
+/* Define to `unsigned long' if <sys/types.h> does not define. */
+#undef dev_t
+
+/* Always use our fgetfilecon wrapper. */
+#undef fgetfilecon
+
+/* Define to a replacement function name for fnmatch(). */
+#undef fnmatch
+
+/* Always use our getfilecon wrapper. */
+#undef getfilecon
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* A replacement for va_copy, if needed.  */
+#define gl_va_copy(a,b) ((a) = (b))
+
+/* Define to rpl_gmtime if the replacement function should be used. */
+#undef gmtime
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `unsigned long' if <sys/types.h> does not define. */
+#undef ino_t
+
+/* Define to long or long long if <stdint.h> and <inttypes.h> don't define. */
+#undef intmax_t
+
+/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+   the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+   earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+   __APPLE__ && __MACH__ test for MacOS X.
+   __APPLE_CC__ tests for the Apple compiler and its version.
+   __STDC_VERSION__ tests for the C99 mode.  */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif
+
+/* Always use our lgetfilecon wrapper. */
+#undef lgetfilecon
+
+/* Define to rpl_localtime if the replacement function should be used. */
+#undef localtime
+
+/* Define to a type if <wchar.h> does not define. */
+#undef mbstate_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef mode_t
+
+/* Define to the name of the strftime replacement function. */
+#undef my_strftime
+
+/* Define to the type of st_nlink in struct stat, or a supertype. */
+#undef nlink_t
+
+/* Define to `long int' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define as the type of the result of subtracting two pointers, if the system
+   doesn't define it. */
+#undef ptrdiff_t
+
+/* Define to rpl_re_comp if the replacement should be used. */
+#undef re_comp
+
+/* Define to rpl_re_compile_fastmap if the replacement should be used. */
+#undef re_compile_fastmap
+
+/* Define to rpl_re_compile_pattern if the replacement should be used. */
+#undef re_compile_pattern
+
+/* Define to rpl_re_exec if the replacement should be used. */
+#undef re_exec
+
+/* Define to rpl_re_match if the replacement should be used. */
+#undef re_match
+
+/* Define to rpl_re_match_2 if the replacement should be used. */
+#undef re_match_2
+
+/* Define to rpl_re_search if the replacement should be used. */
+#undef re_search
+
+/* Define to rpl_re_search_2 if the replacement should be used. */
+#undef re_search_2
+
+/* Define to rpl_re_set_registers if the replacement should be used. */
+#undef re_set_registers
+
+/* Define to rpl_re_set_syntax if the replacement should be used. */
+#undef re_set_syntax
+
+/* Define to rpl_re_syntax_options if the replacement should be used. */
+#undef re_syntax_options
+
+/* Define to rpl_regcomp if the replacement should be used. */
+#undef regcomp
+
+/* Define to rpl_regerror if the replacement should be used. */
+#undef regerror
+
+/* Define to rpl_regexec if the replacement should be used. */
+#undef regexec
+
+/* Define to rpl_regfree if the replacement should be used. */
+#undef regfree
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef ssize_t
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
+/* Define as a marker that can be attached to declarations that might not
+    be used.  This helps to reduce warnings, such as from
+    GCC -Wunused-parameter.  */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_UNUSED
+#endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+   is a misnomer outside of parameter lists.  */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
+
+
+/* Define to an unsigned 32-bit type if <sys/types.h> lacks this type. */
+#undef useconds_t
+
+/* Define as a macro for copying va_list variables. */
+#undef va_copy
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..a059523
--- /dev/null
+++ b/configure
@@ -0,0 +1,43281 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.67 for GNU findutils 4.5.10.
+#
+# Report bugs to <bug-findutils@gnu.org>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+        /*)
+          for as_base in sh bash ksh sh5; do
+            # Try only shells that exist, to save several forks.
+            as_shell=$as_dir/$as_base
+            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+          done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  # We cannot yet assume a decent shell, so we have to provide a
+       # neutralization value for shells without unset; and this also
+       # works around shells that cannot unset nonexistent variables.
+       BASH_ENV=/dev/null
+       ENV=/dev/null
+       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+       export CONFIG_SHELL
+       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: bug-findutils@gnu.org about your system, including any
+$0: error possibly output before this message. Then install
+$0: a modern shell, or manually run the script under such a
+$0: shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='GNU findutils'
+PACKAGE_TARNAME='findutils'
+PACKAGE_VERSION='4.5.10'
+PACKAGE_STRING='GNU findutils 4.5.10'
+PACKAGE_BUGREPORT='bug-findutils@gnu.org'
+PACKAGE_URL='http://www.gnu.org/software/findutils/'
+
+ac_unique_file="find/pred.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+gl_use_threads_default=
+gl_func_list=
+gl_header_list=
+gl_fnmatch_required=POSIX
+gl_getopt_required=POSIX
+gl_getopt_required=POSIX
+gt_needs=
+ac_subst_vars='gltests_LTLIBOBJS
+gltests_LIBOBJS
+gl_LTLIBOBJS
+gl_LIBOBJS
+CONFIG_INCLUDE
+am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+POSUB
+INTLLIBS
+LTLIBICONV
+LIBICONV
+XGETTEXT_EXTRA_OPTIONS
+MSGMERGE
+XGETTEXT_015
+XGETTEXT
+GMSGFMT_015
+MSGFMT_015
+GMSGFMT
+MSGFMT
+GETTEXT_MACRO_VERSION
+USE_NLS
+HAVE_ATTRIBUTE_NORETURN
+SORT_SUPPORTS_Z
+SORT
+FINDLIBOBJS
+LIBOBJS
+FINDLIBS
+CROSS_COMPILING_FALSE
+CROSS_COMPILING_TRUE
+MKINSTALLDIRS
+LIBTESTS_LIBDEPS
+LIBGNULIB_LTLIBDEPS
+LIBGNULIB_LIBDEPS
+YIELD_LIB
+abs_aux_dir
+LTLIBMULTITHREAD
+LIBMULTITHREAD
+LTLIBTHREAD
+LIBTHREAD
+LIBPTH_PREFIX
+LTLIBPTH
+LIBPTH
+INTL_MACOSX_LIBS
+LOCALE_TR_UTF8
+gltests_WITNESS
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
+NEXT_WCHAR_H
+WARN_CFLAGS
+HAVE_FEATURES_H
+LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
+LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
+LIBUNISTRING_UNIWIDTH_H
+LIBUNISTRING_UNITYPES_H
+HAVE_UNISTD_H
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
+NEXT_UNISTD_H
+PTHREAD_H_DEFINES_STRUCT_TIMESPEC
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
+TIME_H_DEFINES_STRUCT_TIMESPEC
+NEXT_AS_FIRST_DIRECTIVE_TIME_H
+NEXT_TIME_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
+NEXT_SYS_WAIT_H
+GNULIB_WAITPID
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
+NEXT_SYS_STAT_H
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
+NEXT_STRINGS_H
+NEXT_AS_FIRST_DIRECTIVE_STRING_H
+NEXT_STRING_H
+HAVE_DECL_STRNCASECMP
+HAVE_STRCASECMP
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
+NEXT_STDLIB_H
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H
+NEXT_STDIO_H
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H
+NEXT_STDARG_H
+STDARG_H
+SELINUX_CONTEXT_H
+NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
+NEXT_SELINUX_SELINUX_H
+LIB_SELINUX
+YFLAGS
+YACC
+MODF_LIBM
+REPLACE_TIMEGM
+REPLACE_NANOSLEEP
+REPLACE_MKTIME
+REPLACE_LOCALTIME_R
+HAVE_TIMEGM
+HAVE_STRPTIME
+HAVE_NANOSLEEP
+HAVE_DECL_LOCALTIME_R
+GNULIB_TIME_R
+GNULIB_TIMEGM
+GNULIB_STRPTIME
+GNULIB_NANOSLEEP
+GNULIB_MKTIME
+UNDEFINE_STRTOK_R
+REPLACE_STRTOK_R
+REPLACE_STRSIGNAL
+REPLACE_STRNLEN
+REPLACE_STRNDUP
+REPLACE_STRNCAT
+REPLACE_STRERROR_R
+REPLACE_STRERROR
+REPLACE_STRCASESTR
+REPLACE_STRSTR
+REPLACE_STRDUP
+REPLACE_STPNCPY
+REPLACE_MEMMEM
+REPLACE_MEMCHR
+HAVE_STRVERSCMP
+HAVE_DECL_STRSIGNAL
+HAVE_DECL_STRERROR_R
+HAVE_DECL_STRTOK_R
+HAVE_STRCASESTR
+HAVE_STRSEP
+HAVE_STRPBRK
+HAVE_DECL_STRNLEN
+HAVE_DECL_STRNDUP
+HAVE_DECL_STRDUP
+HAVE_STRCHRNUL
+HAVE_STPNCPY
+HAVE_STPCPY
+HAVE_RAWMEMCHR
+HAVE_DECL_MEMRCHR
+HAVE_MEMPCPY
+HAVE_DECL_MEMMEM
+HAVE_MEMCHR
+HAVE_MBSLEN
+GNULIB_STRVERSCMP
+GNULIB_STRSIGNAL
+GNULIB_STRERROR_R
+GNULIB_STRERROR
+GNULIB_MBSTOK_R
+GNULIB_MBSSEP
+GNULIB_MBSSPN
+GNULIB_MBSPBRK
+GNULIB_MBSCSPN
+GNULIB_MBSCASESTR
+GNULIB_MBSPCASECMP
+GNULIB_MBSNCASECMP
+GNULIB_MBSCASECMP
+GNULIB_MBSSTR
+GNULIB_MBSRCHR
+GNULIB_MBSCHR
+GNULIB_MBSNLEN
+GNULIB_MBSLEN
+GNULIB_STRTOK_R
+GNULIB_STRCASESTR
+GNULIB_STRSTR
+GNULIB_STRSEP
+GNULIB_STRPBRK
+GNULIB_STRNLEN
+GNULIB_STRNDUP
+GNULIB_STRNCAT
+GNULIB_STRDUP
+GNULIB_STRCHRNUL
+GNULIB_STPNCPY
+GNULIB_STPCPY
+GNULIB_RAWMEMCHR
+GNULIB_MEMRCHR
+GNULIB_MEMPCPY
+GNULIB_MEMMEM
+GNULIB_MEMCHR
+LOCALE_FR_UTF8
+LOCALE_ZH_CN
+LOCALE_JA
+NEXT_AS_FIRST_DIRECTIVE_MATH_H
+NEXT_MATH_H
+REPLACE_TRUNCL
+REPLACE_TRUNCF
+REPLACE_TRUNC
+REPLACE_SIGNBIT_USING_GCC
+REPLACE_SIGNBIT
+REPLACE_ROUNDL
+REPLACE_ROUNDF
+REPLACE_ROUND
+REPLACE_NAN
+REPLACE_LDEXPL
+REPLACE_ISNAN
+REPLACE_ISINF
+REPLACE_ISFINITE
+REPLACE_HUGE_VAL
+REPLACE_FREXPL
+REPLACE_FREXP
+REPLACE_FLOORL
+REPLACE_FLOORF
+REPLACE_FLOOR
+REPLACE_CEILL
+REPLACE_CEILF
+REPLACE_CEIL
+HAVE_DECL_TRUNCL
+HAVE_DECL_TRUNCF
+HAVE_DECL_TRUNC
+HAVE_DECL_TANL
+HAVE_DECL_SQRTL
+HAVE_DECL_SINL
+HAVE_DECL_ROUNDL
+HAVE_DECL_ROUNDF
+HAVE_DECL_ROUND
+HAVE_DECL_LOGL
+HAVE_DECL_LOGB
+HAVE_DECL_LDEXPL
+HAVE_DECL_FREXPL
+HAVE_DECL_FLOORL
+HAVE_DECL_FLOORF
+HAVE_DECL_EXPL
+HAVE_DECL_COSL
+HAVE_DECL_CEILL
+HAVE_DECL_CEILF
+HAVE_DECL_ATANL
+HAVE_DECL_ASINL
+HAVE_DECL_ACOSL
+HAVE_TANL
+HAVE_SQRTL
+HAVE_SINL
+HAVE_LOGL
+HAVE_ISNANL
+HAVE_ISNAND
+HAVE_ISNANF
+HAVE_EXPL
+HAVE_COSL
+HAVE_ATANL
+HAVE_ASINL
+HAVE_ACOSL
+GNULIB_TRUNCL
+GNULIB_TRUNCF
+GNULIB_TRUNC
+GNULIB_TANL
+GNULIB_SQRTL
+GNULIB_SINL
+GNULIB_SIGNBIT
+GNULIB_ROUNDL
+GNULIB_ROUNDF
+GNULIB_ROUND
+GNULIB_LOGL
+GNULIB_LOGB
+GNULIB_LDEXPL
+GNULIB_ISNANL
+GNULIB_ISNAND
+GNULIB_ISNANF
+GNULIB_ISNAN
+GNULIB_ISINF
+GNULIB_ISFINITE
+GNULIB_FREXPL
+GNULIB_FREXP
+GNULIB_FLOORL
+GNULIB_FLOORF
+GNULIB_FLOOR
+GNULIB_EXPL
+GNULIB_COSL
+GNULIB_CEILL
+GNULIB_CEILF
+GNULIB_CEIL
+GNULIB_ATANL
+GNULIB_ASINL
+GNULIB_ACOSL
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
+NEXT_LOCALE_H
+HAVE_XLOCALE_H
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
+NEXT_STDDEF_H
+STDDEF_H
+HAVE_WCHAR_T
+REPLACE_NULL
+REPLACE_DUPLOCALE
+REPLACE_SETLOCALE
+HAVE_DUPLOCALE
+GNULIB_DUPLOCALE
+GNULIB_SETLOCALE
+LOCALCHARSET_TESTS_ENVIRONMENT
+GLIBC21
+HAVE_LANGINFO_YESEXPR
+HAVE_LANGINFO_ERA
+HAVE_LANGINFO_T_FMT_AMPM
+HAVE_LANGINFO_CODESET
+HAVE_LANGINFO_H
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
+NEXT_LANGINFO_H
+REPLACE_NL_LANGINFO
+HAVE_NL_LANGINFO
+GNULIB_NL_LANGINFO
+REPLACE_ISWCNTRL
+HAVE_WCTYPE_H
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
+NEXT_WCTYPE_H
+HAVE_WINT_T
+HAVE_ISWCNTRL
+REPLACE_ISWBLANK
+HAVE_WCTRANS_T
+HAVE_WCTYPE_T
+HAVE_ISWBLANK
+GNULIB_TOWCTRANS
+GNULIB_WCTRANS
+GNULIB_ISWCTYPE
+GNULIB_WCTYPE
+GNULIB_ISWBLANK
+UINT64_MAX_EQ_ULONG_MAX
+UINT32_MAX_LT_UINTMAX_MAX
+INT64_MAX_EQ_LONG_MAX
+INT32_MAX_LT_INTMAX_MAX
+PRIPTR_PREFIX
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
+NEXT_INTTYPES_H
+HAVE_DECL_STRTOUMAX
+HAVE_DECL_STRTOIMAX
+HAVE_DECL_IMAXDIV
+HAVE_DECL_IMAXABS
+GNULIB_STRTOUMAX
+GNULIB_STRTOIMAX
+GNULIB_IMAXDIV
+GNULIB_IMAXABS
+PRI_MACROS_BROKEN
+STDINT_H
+WINT_T_SUFFIX
+WCHAR_T_SUFFIX
+SIG_ATOMIC_T_SUFFIX
+SIZE_T_SUFFIX
+PTRDIFF_T_SUFFIX
+HAVE_SIGNED_WINT_T
+HAVE_SIGNED_WCHAR_T
+HAVE_SIGNED_SIG_ATOMIC_T
+BITSIZEOF_WINT_T
+BITSIZEOF_WCHAR_T
+BITSIZEOF_SIG_ATOMIC_T
+BITSIZEOF_SIZE_T
+BITSIZEOF_PTRDIFF_T
+APPLE_UNIVERSAL_BUILD
+HAVE_SYS_BITYPES_H
+HAVE_SYS_INTTYPES_H
+HAVE_STDINT_H
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H
+NEXT_STDINT_H
+HAVE_SYS_TYPES_H
+HAVE_INTTYPES_H
+HAVE_WCHAR_H
+HAVE_UNSIGNED_LONG_LONG_INT
+HAVE_LONG_LONG_INT
+HAVE__BOOL
+STDBOOL_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
+NEXT_SYS_TIME_H
+REPLACE_GETTIMEOFDAY
+HAVE_SYS_TIME_H
+HAVE_STRUCT_TIMEVAL
+HAVE_GETTIMEOFDAY
+GNULIB_GETTIMEOFDAY
+LTLIBINTL
+LIBINTL
+GETOPT_H
+HAVE_GETOPT_H
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
+NEXT_GETOPT_H
+FNMATCH_H
+FLOAT_H
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
+NEXT_FLOAT_H
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
+NEXT_FCNTL_H
+REPLACE_VSPRINTF
+REPLACE_VSNPRINTF
+REPLACE_VPRINTF
+REPLACE_VFPRINTF
+REPLACE_VDPRINTF
+REPLACE_VASPRINTF
+REPLACE_TMPFILE
+REPLACE_STDIO_WRITE_FUNCS
+REPLACE_SPRINTF
+REPLACE_SNPRINTF
+REPLACE_RENAMEAT
+REPLACE_RENAME
+REPLACE_REMOVE
+REPLACE_PRINTF
+REPLACE_POPEN
+REPLACE_PERROR
+REPLACE_OBSTACK_PRINTF
+REPLACE_GETLINE
+REPLACE_GETDELIM
+REPLACE_FTELLO
+REPLACE_FTELL
+REPLACE_FSEEKO
+REPLACE_FSEEK
+REPLACE_FREOPEN
+REPLACE_FPURGE
+REPLACE_FPRINTF
+REPLACE_FOPEN
+REPLACE_FFLUSH
+REPLACE_FCLOSE
+REPLACE_DPRINTF
+HAVE_VDPRINTF
+HAVE_VASPRINTF
+HAVE_RENAMEAT
+HAVE_FTELLO
+HAVE_FSEEKO
+HAVE_DPRINTF
+HAVE_DECL_VSNPRINTF
+HAVE_DECL_SNPRINTF
+HAVE_DECL_OBSTACK_PRINTF
+HAVE_DECL_GETLINE
+HAVE_DECL_GETDELIM
+HAVE_DECL_FTELLO
+HAVE_DECL_FSEEKO
+HAVE_DECL_FPURGE
+GNULIB_VSPRINTF_POSIX
+GNULIB_VSNPRINTF
+GNULIB_VPRINTF_POSIX
+GNULIB_VPRINTF
+GNULIB_VFPRINTF_POSIX
+GNULIB_VFPRINTF
+GNULIB_VDPRINTF
+GNULIB_VASPRINTF
+GNULIB_TMPFILE
+GNULIB_STDIO_H_SIGPIPE
+GNULIB_SPRINTF_POSIX
+GNULIB_SNPRINTF
+GNULIB_RENAMEAT
+GNULIB_RENAME
+GNULIB_REMOVE
+GNULIB_PUTS
+GNULIB_PUTCHAR
+GNULIB_PUTC
+GNULIB_PRINTF_POSIX
+GNULIB_PRINTF
+GNULIB_POPEN
+GNULIB_PERROR
+GNULIB_OBSTACK_PRINTF_POSIX
+GNULIB_OBSTACK_PRINTF
+GNULIB_GETLINE
+GNULIB_GETDELIM
+GNULIB_FWRITE
+GNULIB_FTELLO
+GNULIB_FTELL
+GNULIB_FSEEKO
+GNULIB_FSEEK
+GNULIB_FREOPEN
+GNULIB_FPUTS
+GNULIB_FPUTC
+GNULIB_FPURGE
+GNULIB_FPRINTF_POSIX
+GNULIB_FPRINTF
+GNULIB_FOPEN
+GNULIB_FFLUSH
+GNULIB_FCLOSE
+GNULIB_DPRINTF
+REPLACE_UTIMENSAT
+REPLACE_STAT
+REPLACE_MKNOD
+REPLACE_MKFIFO
+REPLACE_MKDIR
+REPLACE_LSTAT
+REPLACE_FUTIMENS
+REPLACE_FSTATAT
+REPLACE_FSTAT
+HAVE_UTIMENSAT
+HAVE_MKNODAT
+HAVE_MKNOD
+HAVE_MKFIFOAT
+HAVE_MKFIFO
+HAVE_MKDIRAT
+HAVE_LSTAT
+HAVE_LCHMOD
+HAVE_FUTIMENS
+HAVE_FSTATAT
+HAVE_FCHMODAT
+GNULIB_UTIMENSAT
+GNULIB_STAT
+GNULIB_MKNODAT
+GNULIB_MKNOD
+GNULIB_MKFIFOAT
+GNULIB_MKFIFO
+GNULIB_MKDIRAT
+GNULIB_LSTAT
+GNULIB_LCHMOD
+GNULIB_FUTIMENS
+GNULIB_FSTATAT
+GNULIB_FCHMODAT
+REPLACE_OPENAT
+REPLACE_OPEN
+REPLACE_FCNTL
+HAVE_OPENAT
+HAVE_FCNTL
+GNULIB_OPENAT
+GNULIB_OPEN
+GNULIB_FCNTL
+LIB_EACCESS
+EOVERFLOW_VALUE
+EOVERFLOW_HIDDEN
+ENOLINK_VALUE
+ENOLINK_HIDDEN
+EMULTIHOP_VALUE
+EMULTIHOP_HIDDEN
+ERRNO_H
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
+NEXT_ERRNO_H
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
+NEXT_DIRENT_H
+REPLACE_OPENDIR
+REPLACE_FDOPENDIR
+REPLACE_DIRFD
+REPLACE_CLOSEDIR
+HAVE_ALPHASORT
+HAVE_SCANDIR
+HAVE_FDOPENDIR
+HAVE_DECL_FDOPENDIR
+HAVE_DECL_DIRFD
+GNULIB_ALPHASORT
+GNULIB_SCANDIR
+GNULIB_FDOPENDIR
+GNULIB_DIRFD
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
+NEXT_CTYPE_H
+PRAGMA_COLUMNS
+PRAGMA_SYSTEM_HEADER
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE
+INCLUDE_NEXT
+HAVE_ISBLANK
+GNULIB_ISBLANK
+pkglibexecdir
+lispdir
+LIB_CLOCK_GETTIME
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
+UNISTD_H_HAVE_WINSOCK2_H
+REPLACE_WRITE
+REPLACE_USLEEP
+REPLACE_UNLINKAT
+REPLACE_UNLINK
+REPLACE_TTYNAME_R
+REPLACE_SYMLINK
+REPLACE_SLEEP
+REPLACE_RMDIR
+REPLACE_READLINK
+REPLACE_PWRITE
+REPLACE_PREAD
+REPLACE_LSEEK
+REPLACE_LINKAT
+REPLACE_LINK
+REPLACE_LCHOWN
+REPLACE_GETPAGESIZE
+REPLACE_GETGROUPS
+REPLACE_GETLOGIN_R
+REPLACE_GETDOMAINNAME
+REPLACE_GETCWD
+REPLACE_FCHOWNAT
+REPLACE_DUP2
+REPLACE_DUP
+REPLACE_CLOSE
+REPLACE_CHOWN
+HAVE_SYS_PARAM_H
+HAVE_OS_H
+HAVE_DECL_TTYNAME_R
+HAVE_DECL_GETUSERSHELL
+HAVE_DECL_GETPAGESIZE
+HAVE_DECL_GETLOGIN_R
+HAVE_DECL_GETDOMAINNAME
+HAVE_DECL_FCHDIR
+HAVE_DECL_ENVIRON
+HAVE_USLEEP
+HAVE_UNLINKAT
+HAVE_SYMLINKAT
+HAVE_SYMLINK
+HAVE_SLEEP
+HAVE_READLINKAT
+HAVE_READLINK
+HAVE_PWRITE
+HAVE_PREAD
+HAVE_PIPE2
+HAVE_PIPE
+HAVE_LINKAT
+HAVE_LINK
+HAVE_LCHOWN
+HAVE_GETPAGESIZE
+HAVE_GETLOGIN
+HAVE_GETHOSTNAME
+HAVE_GETGROUPS
+HAVE_GETDTABLESIZE
+HAVE_FTRUNCATE
+HAVE_FSYNC
+HAVE_FCHOWNAT
+HAVE_FCHDIR
+HAVE_FACCESSAT
+HAVE_EUIDACCESS
+HAVE_DUP3
+HAVE_DUP2
+HAVE_CHOWN
+GNULIB_WRITE
+GNULIB_USLEEP
+GNULIB_UNLINKAT
+GNULIB_UNLINK
+GNULIB_UNISTD_H_SIGPIPE
+GNULIB_UNISTD_H_GETOPT
+GNULIB_TTYNAME_R
+GNULIB_SYMLINKAT
+GNULIB_SYMLINK
+GNULIB_SLEEP
+GNULIB_RMDIR
+GNULIB_READLINKAT
+GNULIB_READLINK
+GNULIB_PWRITE
+GNULIB_PREAD
+GNULIB_PIPE2
+GNULIB_PIPE
+GNULIB_LSEEK
+GNULIB_LINKAT
+GNULIB_LINK
+GNULIB_LCHOWN
+GNULIB_GETUSERSHELL
+GNULIB_GETPAGESIZE
+GNULIB_GETLOGIN_R
+GNULIB_GETLOGIN
+GNULIB_GETHOSTNAME
+GNULIB_GETGROUPS
+GNULIB_GETDTABLESIZE
+GNULIB_GETDOMAINNAME
+GNULIB_GETCWD
+GNULIB_FTRUNCATE
+GNULIB_FSYNC
+GNULIB_FCHOWNAT
+GNULIB_FCHDIR
+GNULIB_FACCESSAT
+GNULIB_EUIDACCESS
+GNULIB_ENVIRON
+GNULIB_DUP3
+GNULIB_DUP2
+GNULIB_CLOSE
+GNULIB_CHOWN
+REPLACE_WCTOMB
+REPLACE_UNSETENV
+REPLACE_STRTOD
+REPLACE_SETENV
+REPLACE_REALPATH
+REPLACE_REALLOC
+REPLACE_PUTENV
+REPLACE_MKSTEMP
+REPLACE_MBTOWC
+REPLACE_MALLOC
+REPLACE_CANONICALIZE_FILE_NAME
+REPLACE_CALLOC
+HAVE_DECL_UNSETENV
+HAVE_UNLOCKPT
+HAVE_SYS_LOADAVG_H
+HAVE_STRUCT_RANDOM_DATA
+HAVE_STRTOULL
+HAVE_STRTOLL
+HAVE_STRTOD
+HAVE_DECL_SETENV
+HAVE_SETENV
+HAVE_RPMATCH
+HAVE_REALPATH
+HAVE_RANDOM_R
+HAVE_RANDOM_H
+HAVE_PTSNAME
+HAVE_MKSTEMPS
+HAVE_MKSTEMP
+HAVE_MKOSTEMPS
+HAVE_MKOSTEMP
+HAVE_MKDTEMP
+HAVE_GRANTPT
+HAVE_GETSUBOPT
+HAVE_DECL_GETLOADAVG
+HAVE_CANONICALIZE_FILE_NAME
+HAVE_ATOLL
+HAVE__EXIT
+GNULIB_WCTOMB
+GNULIB_UNSETENV
+GNULIB_UNLOCKPT
+GNULIB_SYSTEM_POSIX
+GNULIB_STRTOULL
+GNULIB_STRTOLL
+GNULIB_STRTOD
+GNULIB_SETENV
+GNULIB_RPMATCH
+GNULIB_REALPATH
+GNULIB_REALLOC_POSIX
+GNULIB_RANDOM_R
+GNULIB_PUTENV
+GNULIB_PTSNAME
+GNULIB_MKSTEMPS
+GNULIB_MKSTEMP
+GNULIB_MKOSTEMPS
+GNULIB_MKOSTEMP
+GNULIB_MKDTEMP
+GNULIB_MBTOWC
+GNULIB_MALLOC_POSIX
+GNULIB_GRANTPT
+GNULIB_GETSUBOPT
+GNULIB_GETLOADAVG
+GNULIB_CANONICALIZE_FILE_NAME
+GNULIB_CALLOC_POSIX
+GNULIB_ATOLL
+GNULIB__EXIT
+LOCALE_FR
+REPLACE_WCSWIDTH
+REPLACE_WCWIDTH
+REPLACE_WCSNRTOMBS
+REPLACE_WCSRTOMBS
+REPLACE_WCRTOMB
+REPLACE_MBSNRTOWCS
+REPLACE_MBSRTOWCS
+REPLACE_MBRLEN
+REPLACE_MBRTOWC
+REPLACE_MBSINIT
+REPLACE_WCTOB
+REPLACE_BTOWC
+REPLACE_MBSTATE_T
+HAVE_DECL_WCWIDTH
+HAVE_DECL_WCTOB
+HAVE_WCSWIDTH
+HAVE_WCSTOK
+HAVE_WCSSTR
+HAVE_WCSPBRK
+HAVE_WCSSPN
+HAVE_WCSCSPN
+HAVE_WCSRCHR
+HAVE_WCSCHR
+HAVE_WCSDUP
+HAVE_WCSXFRM
+HAVE_WCSCOLL
+HAVE_WCSNCASECMP
+HAVE_WCSCASECMP
+HAVE_WCSNCMP
+HAVE_WCSCMP
+HAVE_WCSNCAT
+HAVE_WCSCAT
+HAVE_WCPNCPY
+HAVE_WCSNCPY
+HAVE_WCPCPY
+HAVE_WCSCPY
+HAVE_WCSNLEN
+HAVE_WCSLEN
+HAVE_WMEMSET
+HAVE_WMEMMOVE
+HAVE_WMEMCPY
+HAVE_WMEMCMP
+HAVE_WMEMCHR
+HAVE_WCSNRTOMBS
+HAVE_WCSRTOMBS
+HAVE_WCRTOMB
+HAVE_MBSNRTOWCS
+HAVE_MBSRTOWCS
+HAVE_MBRLEN
+HAVE_MBRTOWC
+HAVE_MBSINIT
+HAVE_BTOWC
+GNULIB_WCSWIDTH
+GNULIB_WCSTOK
+GNULIB_WCSSTR
+GNULIB_WCSPBRK
+GNULIB_WCSSPN
+GNULIB_WCSCSPN
+GNULIB_WCSRCHR
+GNULIB_WCSCHR
+GNULIB_WCSDUP
+GNULIB_WCSXFRM
+GNULIB_WCSCOLL
+GNULIB_WCSNCASECMP
+GNULIB_WCSCASECMP
+GNULIB_WCSNCMP
+GNULIB_WCSCMP
+GNULIB_WCSNCAT
+GNULIB_WCSCAT
+GNULIB_WCPNCPY
+GNULIB_WCSNCPY
+GNULIB_WCPCPY
+GNULIB_WCSCPY
+GNULIB_WCSNLEN
+GNULIB_WCSLEN
+GNULIB_WMEMSET
+GNULIB_WMEMMOVE
+GNULIB_WMEMCPY
+GNULIB_WMEMCMP
+GNULIB_WMEMCHR
+GNULIB_WCWIDTH
+GNULIB_WCSNRTOMBS
+GNULIB_WCSRTOMBS
+GNULIB_WCRTOMB
+GNULIB_MBSNRTOWCS
+GNULIB_MBSRTOWCS
+GNULIB_MBRLEN
+GNULIB_MBRTOWC
+GNULIB_MBSINIT
+GNULIB_WCTOB
+GNULIB_BTOWC
+ALLOCA_H
+ALLOCA
+GL_COND_LIBTOOL_FALSE
+GL_COND_LIBTOOL_TRUE
+ANSI2KNR
+U
+EGREP
+GREP
+RANLIB
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+DEFAULT_ARG_SIZE
+WITH_FTS_FALSE
+WITH_FTS_TRUE
+AUXDIR
+INCLUDES
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_fts
+enable_id_cache
+enable_debug
+enable_leaf_optimisation
+enable_d_type_optimization
+enable_d_type_optimisation
+enable_dependency_tracking
+enable_threads
+enable_largefile
+enable_assert
+with_included_regex
+with_selinux
+with_packager
+with_packager_version
+with_packager_bug_reports
+with_gnu_ld
+enable_rpath
+with_libpth_prefix
+enable_nls
+with_libiconv_prefix
+with_libintl_prefix
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+DEFAULT_ARG_SIZE
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+YACC
+YFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
+               datadir sysconfdir sharedstatedir localstatedir includedir \
+               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+               libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_myself" : 'X\(//\)[^/]' \| \
+        X"$as_myself" : 'X\(//\)$' \| \
+        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures GNU findutils 4.5.10 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/findutils]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of GNU findutils 4.5.10:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-id-cache       cache all UIDs & GIDs; avoid if using NIS or Hesiod
+  --enable-debug          Enable debugging output which is likely to be
+                          interesting to people debugging findutils
+  --enable-leaf-optimisation
+                          Enable an optimisation which saves lstat calls to
+                          identify subdirectories on filesystems having
+                          traditional Unix semantics
+  --enable-d_type-optimization
+                          Make use of the file type data returned in struct
+                          dirent.d_type by readdir()
+  --enable-d_type-optimisation
+                          Synonym for --enable-d_type-optimization
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-threads={posix|solaris|pth|win32}
+                          specify multithreading API
+  --disable-threads       build without multithread safety
+  --disable-largefile     omit support for large files
+  --disable-assert        turn off assertions
+  --disable-rpath         do not hardcode runtime library paths
+  --disable-nls           do not use Native Language Support
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --without-fts           Use an older mechanism for searching the filesystem, instead of using fts()
+  --without-included-regex
+                          don't compile regex; this is the default on systems
+                          with recent-enough versions of the GNU C Library
+                          (use with caution on other systems).
+  --without-selinux       do not use SELinux, even on systems with SELinux
+  --with-packager         String identifying the packager of this software
+  --with-packager-version Packager-specific version information
+  --with-packager-bug-reports
+                          Packager info for bug reports (URL/e-mail/...)
+  --with-gnu-ld           assume the C compiler uses GNU ld default=no
+  --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
+  --without-libpth-prefix     don't search for libpth in includedir and libdir
+  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
+  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
+  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
+  --without-libintl-prefix     don't search for libintl in includedir and libdir
+
+Some influential environment variables:
+  DEFAULT_ARG_SIZE
+              Default size of arguments to child processes of find and xargs,
+              128k if unspecified
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
+              `bison -y'. Values other than `bison -y' will most likely break
+              on most systems.
+  YFLAGS      YFLAGS contains the list arguments that will be passed by
+              default to Bison. This script will default YFLAGS to the empty
+              string to avoid a default value of `-d' given by some make
+              applications.
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <bug-findutils@gnu.org>.
+GNU findutils home page: <http://www.gnu.org/software/findutils/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+GNU findutils configure 4.5.10
+generated by GNU Autoconf 2.67
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval "test \"\${$3+set}\"" = set; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ------------------------------------ ##
+## Report this to bug-findutils@gnu.org ##
+## ------------------------------------ ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_decl
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+                       if test $ac_lo -le $ac_mid; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+        return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+           return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval "test \"\${$4+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_member
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by GNU findutils $as_me 4.5.10, which was
+generated by GNU Autoconf 2.67.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+       ac_must_keep_next=false # Got value, back to normal.
+      else
+       case $ac_arg in
+         *=* | --config-cache | -C | -disable-* | --disable-* \
+         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+         | -with-* | --with-* | -without-* | --without-* | --x)
+           case "$ac_configure_args0 " in
+             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+           esac
+           ;;
+         -* ) ac_must_keep_next=true ;;
+       esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+gl_func_list="$gl_func_list btowc"
+gl_func_list="$gl_func_list canonicalize_file_name"
+gl_func_list="$gl_func_list realpath"
+gl_func_list="$gl_func_list chown"
+gl_func_list="$gl_func_list fchown"
+gl_header_list="$gl_header_list dirent.h"
+gl_func_list="$gl_func_list fdopendir"
+gl_func_list="$gl_func_list dup2"
+gl_func_list="$gl_func_list fcntl"
+gl_func_list="$gl_func_list faccessat"
+gl_header_list="$gl_header_list libgen.h"
+gl_func_list="$gl_func_list lchmod"
+gl_func_list="$gl_func_list access"
+gl_func_list="$gl_func_list fchdir"
+gl_header_list="$gl_header_list sys/param.h"
+gl_func_list="$gl_func_list isblank"
+gl_func_list="$gl_func_list iswctype"
+gl_func_list="$gl_func_list mbsrtowcs"
+gl_func_list="$gl_func_list mempcpy"
+gl_func_list="$gl_func_list wmemchr"
+gl_func_list="$gl_func_list wmemcpy"
+gl_func_list="$gl_func_list wmempcpy"
+gl_header_list="$gl_header_list wctype.h"
+gl_fnmatch_required=GNU
+gl_header_list="$gl_header_list stdio_ext.h"
+gl_func_list="$gl_func_list __fpending"
+gl_func_list="$gl_func_list fpurge"
+gl_func_list="$gl_func_list __fpurge"
+gl_func_list="$gl_func_list __freading"
+gl_func_list="$gl_func_list fstatfs"
+gl_header_list="$gl_header_list sys/vfs.h"
+gl_func_list="$gl_func_list getdelim"
+gl_func_list="$gl_func_list getdtablesize"
+gl_getopt_required=GNU
+gl_header_list="$gl_header_list getopt.h"
+gl_func_list="$gl_func_list gettimeofday"
+gl_func_list="$gl_func_list nanotime"
+gl_header_list="$gl_header_list sys/time.h"
+gl_header_list="$gl_header_list wchar.h"
+gl_header_list="$gl_header_list stdint.h"
+gl_header_list="$gl_header_list inttypes.h"
+gl_func_list="$gl_func_list iswcntrl"
+gl_func_list="$gl_func_list iswblank"
+gl_header_list="$gl_header_list langinfo.h"
+gl_header_list="$gl_header_list xlocale.h"
+gl_func_list="$gl_func_list lstat"
+gl_header_list="$gl_header_list math.h"
+gl_func_list="$gl_func_list mbsinit"
+gl_func_list="$gl_func_list mbrtowc"
+gl_func_list="$gl_func_list mbslen"
+gl_header_list="$gl_header_list sys/mman.h"
+gl_func_list="$gl_func_list mprotect"
+gl_func_list="$gl_func_list memchr"
+gl_header_list="$gl_header_list unistd.h"
+gl_func_list="$gl_func_list alarm"
+gl_header_list="$gl_header_list sys/statvfs.h"
+gl_func_list="$gl_func_list nl_langinfo"
+gl_func_list="$gl_func_list pathconf"
+gl_func_list="$gl_func_list readlink"
+gl_func_list="$gl_func_list readlinkat"
+gl_func_list="$gl_func_list wcscoll"
+gl_header_list="$gl_header_list selinux/selinux.h"
+gl_func_list="$gl_func_list setenv"
+gl_func_list="$gl_func_list strdup"
+gl_header_list="$gl_header_list sys/socket.h"
+gl_func_list="$gl_func_list tzset"
+gl_header_list="$gl_header_list strings.h"
+gl_func_list="$gl_func_list strndup"
+gl_header_list="$gl_header_list sys/stat.h"
+gl_header_list="$gl_header_list sys/wait.h"
+gl_func_list="$gl_func_list localtime_r"
+gl_func_list="$gl_func_list pipe"
+gl_func_list="$gl_func_list vasnprintf"
+gl_header_list="$gl_header_list features.h"
+gl_func_list="$gl_func_list wcrtomb"
+gl_func_list="$gl_func_list wcwidth"
+gl_func_list="$gl_func_list getegid"
+gl_header_list="$gl_header_list grp.h"
+gl_func_list="$gl_func_list newlocale"
+gl_func_list="$gl_func_list getgrouplist"
+gl_header_list="$gl_header_list priv.h"
+gl_func_list="$gl_func_list sleep"
+gl_func_list="$gl_func_list symlink"
+gl_func_list="$gl_func_list symlinkat"
+gl_func_list="$gl_func_list usleep"
+gl_func_list="$gl_func_list wctob"
+gt_needs="$gt_needs "
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+         ac_cache_corrupted=:
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+         eval $ac_var=\$ac_old_val
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_aux_dir=
+for ac_dir in build-aux "$srcdir"/build-aux; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+am__api_version='1.11'
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+         if test $ac_prog = install &&
+           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         elif test $ac_prog = install &&
+           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           rm -rf conftest.one conftest.two conftest.dir
+           echo one > conftest.one
+           echo two > conftest.two
+           mkdir conftest.dir
+           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+             test -s conftest.one && test -s conftest.two &&
+             test -s conftest.dir/conftest.one &&
+             test -s conftest.dir/conftest.two
+           then
+             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+             break 3
+           fi
+         fi
+       fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='findutils'
+ VERSION='4.5.10'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+
+ALL_LINGUAS="be bg cs ca da de el eo es et fi fr ga gl hr hu id it ja ko lg lt ms nl pl pt pt_BR ro ru rw sk sl sr sv tr uk vi zh_CN zh_TW"
+
+AUXDIR=$ac_aux_dir
+
+
+# Check whether --with-fts was given.
+if test "${with_fts+set}" = set; then :
+  withval=$with_fts; with_fts=$withval
+fi
+
+  case $with_fts in
+        yes|no) ;;
+        '')     with_fts=yes ;;
+        *) as_fn_error $? "Invalid value for --with-fts: $with_fts" "$LINENO" 5
+  esac
+   if test x"${with_fts-no}" != xno; then
+  WITH_FTS_TRUE=
+  WITH_FTS_FALSE='#'
+else
+  WITH_FTS_TRUE='#'
+  WITH_FTS_FALSE=
+fi
+
+  if test x"${with_fts-no}" != xno ; then
+
+$as_echo "#define WITH_FTS 1" >>confdefs.h
+
+  fi
+
+
+# Check whether --enable-id-cache was given.
+if test "${enable_id_cache+set}" = set; then :
+  enableval=$enable_id_cache;
+$as_echo "#define CACHE_IDS 1" >>confdefs.h
+
+fi
+
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+  enableval=$enable_debug; ac_cv_debug=$enableval
+else
+  ac_cv_debug=no
+fi
+
+
+# Check whether --enable-leaf-optimisation was given.
+if test "${enable_leaf_optimisation+set}" = set; then :
+  enableval=$enable_leaf_optimisation; ac_cv_leaf_optimisation=$enableval
+else
+  ac_cv_leaf_optimisation=yes
+fi
+
+
+# Check whether --enable-d_type-optimization was given.
+if test "${enable_d_type_optimization+set}" = set; then :
+  enableval=$enable_d_type_optimization; ac_cv_d_type=$enableval
+else
+  ac_cv_d_type=yes
+fi
+
+
+# Check whether --enable-d_type-optimisation was given.
+if test "${enable_d_type_optimisation+set}" = set; then :
+  enableval=$enable_d_type_optimisation; ac_cv_d_type=$enableval
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether debug output should be produced" >&5
+$as_echo_n "checking whether debug output should be produced... " >&6; }
+if test x$ac_cv_debug = xno; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define DEBUG 1" >>confdefs.h
+
+
+$as_echo "#define DEBUG_STAT 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for leaf optimisation" >&5
+$as_echo_n "checking for leaf optimisation... " >&6; }
+if test x$ac_cv_leaf_optimisation = xno; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define LEAF_OPTIMISATION 1" >>confdefs.h
+
+fi
+
+
+if test -n "$DEFAULT_ARG_SIZE"; then
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_ARG_SIZE $DEFAULT_ARG_SIZE
+_ACEOF
+
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+       ;;
+    [ab].out )
+       # We found the default executable, but exeext='' is most
+       # certainly right.
+       break;;
+    *.* )
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
+       break;;
+    * )
+       break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5 ; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test "x$CC" != xcc; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+                     sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+   test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+        test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+      then
+       # cc works too.
+       :
+      else
+       # cc exists but doesn't like -o.
+       eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                 inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+  MINIX=yes
+else
+  MINIX=
+fi
+
+
+  if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+  fi
+
+        case "$host_os" in
+    hpux*)
+
+$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+      ;;
+  esac
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#         define __EXTENSIONS__ 1
+          $ac_includes_default
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_safe_to_define___extensions__=yes
+else
+  ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_source+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h> /* for off_t */
+     #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_sys_largefile_source=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+     #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_sys_largefile_source=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  ac_cv_sys_largefile_source=unknown
+  break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
+$as_echo "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+  no | unknown) ;;
+  *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+;;
+esac
+rm -rf conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
+
+$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
+
+fi
+
+   case $ac_cv_prog_cc_stdc in #(
+  no) :
+    ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
+  *) :
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+  int x = 1234;
+  int y = 5678;
+  debug ("Flag");
+  debug ("X = %d\n", x);
+  showlist (The first, second, and third items.);
+  report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
+
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+  // See if C++-style comments work.
+  // Iterate through items via the restricted pointer.
+  // Also check for declarations in for loops.
+  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+    continue;
+  return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  va_list args_copy;
+  va_copy (args_copy, args);
+
+  const char *str;
+  int number;
+  float fnumber;
+
+  while (*format)
+    {
+      switch (*format++)
+       {
+       case 's': // string
+         str = va_arg (args_copy, const char *);
+         break;
+       case 'd': // int
+         number = va_arg (args_copy, int);
+         break;
+       case 'f': // float
+         fnumber = va_arg (args_copy, double);
+         break;
+       default:
+         break;
+       }
+    }
+  va_end (args_copy);
+  va_end (args);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  test_varargs ("s, d' f .", "string", 65, 34.234);
+  test_varargs_macros ();
+
+  // Check flexible array members.
+  struct incomplete_array *ia =
+    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+  ia->datasize = 10;
+  for (int i = 0; i < ia->datasize; ++i)
+    ia->data[i] = i * 1.234;
+
+  // Check named initializers.
+  struct named_init ni = {
+    .number = 34,
+    .name = L"Test wide string",
+    .average = 543.34343,
+  };
+
+  ni.number = 58;
+
+  int dynamic_array[ni.number];
+  dynamic_array[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+else
+  ac_cv_prog_cc_stdc=no
+fi
+
+fi
+ ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
+$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
+  if test "${ac_cv_prog_cc_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+fi
+
+  case $ac_cv_prog_cc_stdc in #(
+  no) :
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;; #(
+  '') :
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;; #(
+  *) :
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
+$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
+esac
+
+
+
+
+
+
+  # Check whether --enable-threads was given.
+if test "${enable_threads+set}" = set; then :
+  enableval=$enable_threads; gl_use_threads=$enableval
+else
+  if test -n "$gl_use_threads_default"; then
+       gl_use_threads="$gl_use_threads_default"
+     else
+       case "$host_os" in
+                                                               osf*) gl_use_threads=no ;;
+         cygwin*)
+               case `uname -r` in
+                 1.[0-5].*) gl_use_threads=no ;;
+                 *)         gl_use_threads=yes ;;
+               esac
+               ;;
+         *)    gl_use_threads=yes ;;
+       esac
+     fi
+
+fi
+
+  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+    # For using <pthread.h>:
+    case "$host_os" in
+      osf*)
+        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+        # groks <pthread.h>. cc also understands the flag -pthread, but
+        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+        # 2. putting a flag into CPPFLAGS that has an effect on the linker
+        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
+        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+        ;;
+    esac
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in <errno.h>.
+    case "$host_os" in
+      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+    esac
+  fi
+
+
+
+
+  # Code from module alloca:
+  # Code from module alloca-opt:
+  # Code from module alloca-opt-tests:
+  # Code from module areadlink:
+  # Code from module areadlink-tests:
+  # Code from module areadlink-with-size:
+  # Code from module areadlink-with-size-tests:
+  # Code from module areadlinkat:
+  # Code from module areadlinkat-tests:
+  # Code from module arg-nonnull:
+  # Code from module argmatch:
+  # Code from module argmatch-tests:
+  # Code from module assert:
+  # Code from module binary-io:
+  # Code from module binary-io-tests:
+  # Code from module bitrotate:
+  # Code from module bitrotate-tests:
+  # Code from module btowc:
+  # Code from module btowc-tests:
+  # Code from module c++defs:
+  # Code from module c-ctype:
+  # Code from module c-ctype-tests:
+  # Code from module c-strcase:
+  # Code from module c-strcase-tests:
+  # Code from module c-strcasestr:
+  # Code from module c-strcasestr-tests:
+  # Code from module c-strstr:
+  # Code from module c-strstr-tests:
+  # Code from module canonicalize:
+  # Code from module canonicalize-tests:
+  # Code from module chdir-long:
+  # Code from module chown:
+  # Code from module chown-tests:
+  # Code from module clock-time:
+  # Code from module cloexec:
+  # Code from module cloexec-tests:
+  # Code from module close:
+  # Code from module close-hook:
+  # Code from module close-stream:
+  # Code from module closein:
+  # Code from module closein-tests:
+  # Code from module closeout:
+  # Code from module configmake:
+  # Code from module ctype:
+  # Code from module ctype-tests:
+  # Code from module cycle-check:
+  # Code from module d-ino:
+  # Code from module d-type:
+  # Code from module dev-ino:
+  # Code from module dirent:
+  # Code from module dirent-safer:
+  # Code from module dirent-safer-tests:
+  # Code from module dirent-tests:
+  # Code from module dirfd:
+  # Code from module dirname:
+  # Code from module dirname-lgpl:
+  # Code from module dirname-tests:
+  # Code from module dosname:
+  # Code from module double-slash-root:
+  # Code from module dup2:
+  # Code from module dup2-tests:
+  # Code from module environ:
+  # Code from module environ-tests:
+  # Code from module errno:
+  # Code from module errno-tests:
+  # Code from module error:
+  # Code from module euidaccess:
+  # Code from module exitfail:
+  # Code from module extensions:
+
+  # Code from module faccessat:
+  # Code from module fchdir:
+  # Code from module fchdir-tests:
+  # Code from module fclose:
+  # Code from module fcntl:
+  # Code from module fcntl-h:
+  # Code from module fcntl-h-tests:
+  # Code from module fcntl-safer:
+  # Code from module fcntl-safer-tests:
+  # Code from module fcntl-tests:
+  # Code from module fd-safer-flag:
+  # Code from module fdl:
+  # Code from module fdopendir:
+  # Code from module fdopendir-tests:
+  # Code from module fflush:
+
+  # Code from module fflush-tests:
+  # Code from module file-set:
+  # Code from module fileblocks:
+  # Code from module filemode:
+  # Code from module flexmember:
+  # Code from module float:
+  # Code from module fnmatch:
+  # Code from module fnmatch-gnu:
+  # Code from module fnmatch-tests:
+  # Code from module fopen:
+  # Code from module fopen-safer:
+  # Code from module fopen-safer-tests:
+  # Code from module fopen-tests:
+  # Code from module fpending:
+  # Code from module fpending-tests:
+  # Code from module fpurge:
+  # Code from module fpurge-tests:
+  # Code from module freadahead:
+  # Code from module freadahead-tests:
+  # Code from module freading:
+  # Code from module freading-tests:
+  # Code from module fseeko:
+
+  # Code from module fseeko-tests:
+  # Code from module ftell:
+  # Code from module ftell-tests:
+  # Code from module ftello:
+
+  # Code from module ftello-tests:
+  # Code from module fts:
+  # Code from module getcwd:
+  # Code from module getcwd-tests:
+  # Code from module getdelim:
+  # Code from module getdelim-tests:
+  # Code from module getdtablesize:
+  # Code from module getdtablesize-tests:
+  # Code from module getgroups:
+  # Code from module getgroups-tests:
+  # Code from module getline:
+  # Code from module getline-tests:
+  # Code from module getopt-gnu:
+  # Code from module getopt-posix:
+  # Code from module getopt-posix-tests:
+  # Code from module getpagesize:
+  # Code from module gettext:
+  # Code from module gettext-h:
+  # Code from module gettime:
+  # Code from module gettimeofday:
+  # Code from module gettimeofday-tests:
+  # Code from module getugroups:
+  # Code from module gnumakefile:
+  # Code from module gpl-3.0:
+  # Code from module group-member:
+  # Code from module hash:
+  # Code from module hash-pjw:
+  # Code from module hash-tests:
+  # Code from module hash-triple:
+  # Code from module havelib:
+  # Code from module human:
+  # Code from module i-ring:
+  # Code from module i-ring-tests:
+  # Code from module idcache:
+  # Code from module ignore-value:
+  # Code from module ignore-value-tests:
+  # Code from module include_next:
+  # Code from module inline:
+  # Code from module intprops:
+  # Code from module inttostr:
+  # Code from module inttostr-tests:
+  # Code from module inttypes:
+  # Code from module inttypes-tests:
+  # Code from module isblank:
+  # Code from module isblank-tests:
+  # Code from module iswblank:
+  # Code from module iswblank-tests:
+  # Code from module langinfo:
+  # Code from module langinfo-tests:
+  # Code from module lchown:
+  # Code from module lchown-tests:
+  # Code from module localcharset:
+  # Code from module locale:
+  # Code from module locale-tests:
+  # Code from module localename:
+  # Code from module localename-tests:
+  # Code from module lock:
+  # Code from module lock-tests:
+  # Code from module lseek:
+  # Code from module lseek-tests:
+  # Code from module lstat:
+  # Code from module lstat-tests:
+  # Code from module maintainer-makefile:
+  # Code from module malloc:
+  # Code from module malloc-gnu:
+  # Code from module malloc-gnu-tests:
+  # Code from module malloc-posix:
+  # Code from module malloca:
+  # Code from module malloca-tests:
+  # Code from module math:
+  # Code from module math-tests:
+  # Code from module mbchar:
+  # Code from module mbrtowc:
+  # Code from module mbrtowc-tests:
+  # Code from module mbscasestr:
+  # Code from module mbscasestr-tests:
+  # Code from module mbsinit:
+  # Code from module mbsinit-tests:
+  # Code from module mbslen:
+  # Code from module mbsrtowcs:
+  # Code from module mbsrtowcs-tests:
+  # Code from module mbsstr:
+  # Code from module mbsstr-tests:
+  # Code from module mbtowc:
+  # Code from module mbuiter:
+  # Code from module memchr:
+  # Code from module memchr-tests:
+  # Code from module mempcpy:
+  # Code from module memrchr:
+  # Code from module memrchr-tests:
+  # Code from module mgetgroups:
+  # Code from module mkdir:
+  # Code from module mkdir-tests:
+  # Code from module mktime:
+  # Code from module modechange:
+  # Code from module modf:
+  # Code from module modf-tests:
+  # Code from module mountlist:
+  # Code from module multiarch:
+  # Code from module nl_langinfo:
+  # Code from module nl_langinfo-tests:
+  # Code from module open:
+  # Code from module open-tests:
+  # Code from module openat:
+  # Code from module openat-die:
+  # Code from module openat-safer:
+  # Code from module openat-safer-tests:
+  # Code from module openat-tests:
+  # Code from module parse-datetime:
+  # Code from module parse-datetime-tests:
+  # Code from module pathmax:
+  # Code from module perror:
+  # Code from module perror-tests:
+  # Code from module priv-set:
+  # Code from module priv-set-tests:
+  # Code from module progname:
+  # Code from module putenv:
+  # Code from module quote:
+  # Code from module quotearg:
+  # Code from module quotearg-simple:
+  # Code from module quotearg-simple-tests:
+  # Code from module readlink:
+  # Code from module readlink-tests:
+  # Code from module readlinkat:
+  # Code from module readlinkat-tests:
+  # Code from module realloc:
+  # Code from module realloc-gnu:
+  # Code from module realloc-gnu-tests:
+  # Code from module realloc-posix:
+  # Code from module regex:
+  # Code from module rmdir:
+  # Code from module rmdir-tests:
+  # Code from module rpmatch:
+  # Code from module same:
+  # Code from module same-inode:
+  # Code from module save-cwd:
+  # Code from module savedir:
+  # Code from module selinux-at:
+  # Code from module selinux-h:
+  # Code from module setenv:
+  # Code from module setenv-tests:
+  # Code from module setlocale:
+  # Code from module setlocale-tests:
+  # Code from module size_max:
+  # Code from module sleep:
+  # Code from module sleep-tests:
+  # Code from module snprintf:
+  # Code from module snprintf-tests:
+  # Code from module ssize_t:
+  # Code from module stat:
+  # Code from module stat-macros:
+  # Code from module stat-tests:
+  # Code from module stat-time:
+  # Code from module stat-time-tests:
+  # Code from module stdarg:
+
+  # Code from module stdbool:
+  # Code from module stdbool-tests:
+  # Code from module stddef:
+  # Code from module stddef-tests:
+  # Code from module stdint:
+  # Code from module stdint-tests:
+  # Code from module stdio:
+  # Code from module stdio-tests:
+  # Code from module stdlib:
+  # Code from module stdlib-tests:
+  # Code from module stpcpy:
+  # Code from module strcase:
+  # Code from module strcasestr:
+  # Code from module strcasestr-simple:
+  # Code from module strcasestr-tests:
+  # Code from module strdup-posix:
+  # Code from module streq:
+  # Code from module strerror:
+  # Code from module strerror-tests:
+  # Code from module strftime:
+  # Code from module strftime-tests:
+  # Code from module string:
+  # Code from module string-tests:
+  # Code from module strings:
+  # Code from module strings-tests:
+  # Code from module strndup:
+  # Code from module strnlen:
+  # Code from module strnlen-tests:
+  # Code from module strnlen1:
+  # Code from module strstr:
+  # Code from module strstr-simple:
+  # Code from module strstr-tests:
+  # Code from module strtoimax:
+  # Code from module strtol:
+  # Code from module strtoll:
+  # Code from module strtoul:
+  # Code from module strtoull:
+  # Code from module strtoumax:
+  # Code from module symlink:
+  # Code from module symlink-tests:
+  # Code from module symlinkat:
+  # Code from module symlinkat-tests:
+  # Code from module sys_stat:
+  # Code from module sys_stat-tests:
+  # Code from module sys_time:
+  # Code from module sys_time-tests:
+  # Code from module sys_wait:
+  # Code from module sys_wait-tests:
+  # Code from module thread:
+  # Code from module threadlib:
+
+
+
+  # Code from module time:
+  # Code from module time-tests:
+  # Code from module time_r:
+  # Code from module timespec:
+  # Code from module unistd:
+  # Code from module unistd-safer:
+  # Code from module unistd-safer-tests:
+  # Code from module unistd-tests:
+  # Code from module unitypes:
+  # Code from module uniwidth/base:
+  # Code from module uniwidth/width:
+  # Code from module uniwidth/width-tests:
+  # Code from module unlink:
+  # Code from module unlink-tests:
+  # Code from module unlinkdir:
+  # Code from module unsetenv:
+  # Code from module unsetenv-tests:
+  # Code from module unused-parameter:
+  # Code from module update-copyright:
+  # Code from module update-copyright-tests:
+  # Code from module useless-if-before-free:
+  # Code from module usleep:
+  # Code from module usleep-tests:
+  # Code from module vasnprintf:
+  # Code from module vasnprintf-tests:
+  # Code from module vc-list-files:
+  # Code from module vc-list-files-tests:
+  # Code from module verify:
+  # Code from module verify-tests:
+  # Code from module version-etc:
+  # Code from module version-etc-fsf:
+  # Code from module version-etc-tests:
+  # Code from module warn-on-use:
+  # Code from module warnings:
+  # Code from module wchar:
+  # Code from module wchar-tests:
+  # Code from module wcrtomb:
+  # Code from module wcrtomb-tests:
+  # Code from module wctob:
+  # Code from module wctomb:
+  # Code from module wctype-h:
+  # Code from module wctype-h-tests:
+  # Code from module wcwidth:
+  # Code from module wcwidth-tests:
+  # Code from module xalloc:
+  # Code from module xalloc-die:
+  # Code from module xalloc-die-tests:
+  # Code from module xgetcwd:
+  # Code from module xsize:
+  # Code from module xstrndup:
+  # Code from module xstrtod:
+  # Code from module xstrtol:
+  # Code from module xstrtol-tests:
+  # Code from module xstrtoumax:
+  # Code from module xstrtoumax-tests:
+  # Code from module yesno:
+  # Code from module yesno-tests:
+  # Code from module yield:
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
+$as_echo_n "checking for function prototypes... " >&6; }
+if test "$ac_cv_prog_cc_c89" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define PROTOTYPES 1" >>confdefs.h
+
+
+$as_echo "#define __PROTOTYPES 1" >>confdefs.h
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "$ac_cv_prog_cc_stdc" != no; then
+  U= ANSI2KNR=
+else
+  U=_ ANSI2KNR=./ansi2knr
+fi
+# Ensure some checks needed by ansi2knr itself.
+
+for ac_header in string.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
+if test "x$ac_cv_header_string_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRING_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+  enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_sys_largefile_CC=no
+     if test "$GCC" != yes; then
+       ac_save_CC=$CC
+       while :; do
+        # IRIX 6.2 and later do not support large files by default,
+        # so use the C compiler's -n32 option if that helps.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+        if ac_fn_c_try_compile "$LINENO"; then :
+  break
+fi
+rm -f core conftest.err conftest.$ac_objext
+        CC="$CC -n32"
+        if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+        break
+       done
+       CC=$ac_save_CC
+       rm -f conftest.$ac_ext
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+  if test "$ac_cv_sys_largefile_CC" != no; then
+    CC=$CC$ac_cv_sys_largefile_CC
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_sys_file_offset_bits=unknown
+  break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+  no | unknown) ;;
+  *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+  if test $ac_cv_sys_file_offset_bits = unknown; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_sys_large_files=unknown
+  break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+  no | unknown) ;;
+  *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+  fi
+fi
+
+
+
+
+
+
+
+          LIBC_FATAL_STDERR_=1
+  export LIBC_FATAL_STDERR_
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+                         if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_working_alloca_h=yes
+else
+  ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  ifdef HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+                                   if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_func_alloca_works=yes
+else
+  ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+
+
+
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then :
+  ac_cv_os_cray=yes
+else
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+    break
+fi
+
+  done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_c_stack_direction=0
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+  return find_stack_direction () < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_stack_direction=1
+else
+  ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if test "${ac_cv_c_inline+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+
+  GNULIB_BTOWC=0;
+  GNULIB_WCTOB=0;
+  GNULIB_MBSINIT=0;
+  GNULIB_MBRTOWC=0;
+  GNULIB_MBRLEN=0;
+  GNULIB_MBSRTOWCS=0;
+  GNULIB_MBSNRTOWCS=0;
+  GNULIB_WCRTOMB=0;
+  GNULIB_WCSRTOMBS=0;
+  GNULIB_WCSNRTOMBS=0;
+  GNULIB_WCWIDTH=0;
+  GNULIB_WMEMCHR=0;
+  GNULIB_WMEMCMP=0;
+  GNULIB_WMEMCPY=0;
+  GNULIB_WMEMMOVE=0;
+  GNULIB_WMEMSET=0;
+  GNULIB_WCSLEN=0;
+  GNULIB_WCSNLEN=0;
+  GNULIB_WCSCPY=0;
+  GNULIB_WCPCPY=0;
+  GNULIB_WCSNCPY=0;
+  GNULIB_WCPNCPY=0;
+  GNULIB_WCSCAT=0;
+  GNULIB_WCSNCAT=0;
+  GNULIB_WCSCMP=0;
+  GNULIB_WCSNCMP=0;
+  GNULIB_WCSCASECMP=0;
+  GNULIB_WCSNCASECMP=0;
+  GNULIB_WCSCOLL=0;
+  GNULIB_WCSXFRM=0;
+  GNULIB_WCSDUP=0;
+  GNULIB_WCSCHR=0;
+  GNULIB_WCSRCHR=0;
+  GNULIB_WCSCSPN=0;
+  GNULIB_WCSSPN=0;
+  GNULIB_WCSPBRK=0;
+  GNULIB_WCSSTR=0;
+  GNULIB_WCSTOK=0;
+  GNULIB_WCSWIDTH=0;
+    HAVE_BTOWC=1;
+  HAVE_MBSINIT=1;
+  HAVE_MBRTOWC=1;
+  HAVE_MBRLEN=1;
+  HAVE_MBSRTOWCS=1;
+  HAVE_MBSNRTOWCS=1;
+  HAVE_WCRTOMB=1;
+  HAVE_WCSRTOMBS=1;
+  HAVE_WCSNRTOMBS=1;
+  HAVE_WMEMCHR=1;
+  HAVE_WMEMCMP=1;
+  HAVE_WMEMCPY=1;
+  HAVE_WMEMMOVE=1;
+  HAVE_WMEMSET=1;
+  HAVE_WCSLEN=1;
+  HAVE_WCSNLEN=1;
+  HAVE_WCSCPY=1;
+  HAVE_WCPCPY=1;
+  HAVE_WCSNCPY=1;
+  HAVE_WCPNCPY=1;
+  HAVE_WCSCAT=1;
+  HAVE_WCSNCAT=1;
+  HAVE_WCSCMP=1;
+  HAVE_WCSNCMP=1;
+  HAVE_WCSCASECMP=1;
+  HAVE_WCSNCASECMP=1;
+  HAVE_WCSCOLL=1;
+  HAVE_WCSXFRM=1;
+  HAVE_WCSDUP=1;
+  HAVE_WCSCHR=1;
+  HAVE_WCSRCHR=1;
+  HAVE_WCSCSPN=1;
+  HAVE_WCSSPN=1;
+  HAVE_WCSPBRK=1;
+  HAVE_WCSSTR=1;
+  HAVE_WCSTOK=1;
+  HAVE_WCSWIDTH=1;
+  HAVE_DECL_WCTOB=1;
+  HAVE_DECL_WCWIDTH=1;
+  REPLACE_MBSTATE_T=0;
+  REPLACE_BTOWC=0;
+  REPLACE_WCTOB=0;
+  REPLACE_MBSINIT=0;
+  REPLACE_MBRTOWC=0;
+  REPLACE_MBRLEN=0;
+  REPLACE_MBSRTOWCS=0;
+  REPLACE_MBSNRTOWCS=0;
+  REPLACE_WCRTOMB=0;
+  REPLACE_WCSRTOMBS=0;
+  REPLACE_WCSNRTOMBS=0;
+  REPLACE_WCWIDTH=0;
+  REPLACE_WCSWIDTH=0;
+
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
+$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
+if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_header_wchar_h_correct_inline=yes
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+       #define wcstod renamed_wcstod
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+extern int zero (void);
+int main () { return zero(); }
+
+_ACEOF
+     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+       mv conftest.$ac_objext conftest1.$ac_objext
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+         #define wcstod renamed_wcstod
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int zero (void) { return 0; }
+
+_ACEOF
+       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+         mv conftest.$ac_objext conftest2.$ac_objext
+         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
+           :
+         else
+           gl_cv_header_wchar_h_correct_inline=no
+         fi
+       fi
+     fi
+     rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
+$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
+  if test $gl_cv_header_wchar_h_correct_inline = no; then
+    as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
+This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
+C99 mode. You have four options:
+  - Add the flag -fgnu89-inline to CC and reconfigure, or
+  - Fix your include files, using parts of
+    <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+  - Use a gcc version older than 4.3, or
+  - Don't use the flags -std=c99 or -std=gnu99.
+Configuration aborted." "$LINENO" 5
+  fi
+
+
+
+
+
+  for ac_func in $gl_func_list
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if test "${am_cv_langinfo_codeset+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET); return !cs;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_langinfo_codeset=yes
+else
+  am_cv_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
+$as_echo "$am_cv_langinfo_codeset" >&6; }
+  if test $am_cv_langinfo_codeset = yes; then
+
+$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+     one byte long. This excludes the UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Win32 locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
+            else
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
+              else
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+  LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+$as_echo_n "checking whether // is distinct from /... " >&6; }
+if test "${gl_cv_double_slash_root+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+   if test x"$cross_compiling" = xyes ; then
+        # When cross-compiling, there is no way to tell whether // is special
+        # short of a list of hosts.  However, the only known hosts to date
+        # that have a distinct // are Apollo DomainOS (too old to port to),
+        # Cygwin, and z/OS.  If anyone knows of another system for which // has
+        # special semantics and is distinct from /, please report it to
+        # <bug-gnulib@gnu.org>.
+        case $host in
+          *-cygwin | i370-ibm-openedition)
+            gl_cv_double_slash_root=yes ;;
+          *)
+            # Be optimistic and assume that / and // are the same when we
+            # don't know.
+            gl_cv_double_slash_root='unknown, assuming no' ;;
+        esac
+      else
+        set x `ls -di / // 2>/dev/null`
+        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
+          gl_cv_double_slash_root=no
+        else
+          gl_cv_double_slash_root=yes
+        fi
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+$as_echo "$gl_cv_double_slash_root" >&6; }
+  if test "$gl_cv_double_slash_root" = yes; then
+
+$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
+$as_echo_n "checking whether realpath works... " >&6; }
+if test "${gl_cv_func_realpath_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    touch conftest.a
+    if test "$cross_compiling" = yes; then :
+  gl_cv_func_realpath_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+        #include <stdlib.h>
+
+int
+main ()
+{
+
+        int result = 0;
+        {
+          char *name = realpath ("conftest.a", NULL);
+          if (!(name && *name == '/'))
+            result |= 1;
+        }
+        {
+          char *name = realpath ("conftest.b/../conftest.a", NULL);
+          if (name != NULL)
+            result |= 2;
+        }
+        {
+          char *name = realpath ("conftest.a/", NULL);
+          if (name != NULL)
+            result |= 4;
+        }
+        return result;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_realpath_works=yes
+else
+  gl_cv_func_realpath_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
+$as_echo "$gl_cv_func_realpath_works" >&6; }
+  if test "$gl_cv_func_realpath_works" = yes; then
+
+$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
+
+  fi
+
+
+  GNULIB__EXIT=0;
+  GNULIB_ATOLL=0;
+  GNULIB_CALLOC_POSIX=0;
+  GNULIB_CANONICALIZE_FILE_NAME=0;
+  GNULIB_GETLOADAVG=0;
+  GNULIB_GETSUBOPT=0;
+  GNULIB_GRANTPT=0;
+  GNULIB_MALLOC_POSIX=0;
+  GNULIB_MBTOWC=0;
+  GNULIB_MKDTEMP=0;
+  GNULIB_MKOSTEMP=0;
+  GNULIB_MKOSTEMPS=0;
+  GNULIB_MKSTEMP=0;
+  GNULIB_MKSTEMPS=0;
+  GNULIB_PTSNAME=0;
+  GNULIB_PUTENV=0;
+  GNULIB_RANDOM_R=0;
+  GNULIB_REALLOC_POSIX=0;
+  GNULIB_REALPATH=0;
+  GNULIB_RPMATCH=0;
+  GNULIB_SETENV=0;
+  GNULIB_STRTOD=0;
+  GNULIB_STRTOLL=0;
+  GNULIB_STRTOULL=0;
+  GNULIB_SYSTEM_POSIX=0;
+  GNULIB_UNLOCKPT=0;
+  GNULIB_UNSETENV=0;
+  GNULIB_WCTOMB=0;
+    HAVE__EXIT=1;
+  HAVE_ATOLL=1;
+  HAVE_CANONICALIZE_FILE_NAME=1;
+  HAVE_DECL_GETLOADAVG=1;
+  HAVE_GETSUBOPT=1;
+  HAVE_GRANTPT=1;
+  HAVE_MKDTEMP=1;
+  HAVE_MKOSTEMP=1;
+  HAVE_MKOSTEMPS=1;
+  HAVE_MKSTEMP=1;
+  HAVE_MKSTEMPS=1;
+  HAVE_PTSNAME=1;
+  HAVE_RANDOM_H=1;
+  HAVE_RANDOM_R=1;
+  HAVE_REALPATH=1;
+  HAVE_RPMATCH=1;
+  HAVE_SETENV=1;
+  HAVE_DECL_SETENV=1;
+  HAVE_STRTOD=1;
+  HAVE_STRTOLL=1;
+  HAVE_STRTOULL=1;
+  HAVE_STRUCT_RANDOM_DATA=1;
+  HAVE_SYS_LOADAVG_H=0;
+  HAVE_UNLOCKPT=1;
+  HAVE_DECL_UNSETENV=1;
+  REPLACE_CALLOC=0;
+  REPLACE_CANONICALIZE_FILE_NAME=0;
+  REPLACE_MALLOC=0;
+  REPLACE_MBTOWC=0;
+  REPLACE_MKSTEMP=0;
+  REPLACE_PUTENV=0;
+  REPLACE_REALLOC=0;
+  REPLACE_REALPATH=0;
+  REPLACE_SETENV=0;
+  REPLACE_STRTOD=0;
+  REPLACE_UNSETENV=0;
+  REPLACE_WCTOMB=0;
+
+
+  GNULIB_CHOWN=0;
+  GNULIB_CLOSE=0;
+  GNULIB_DUP2=0;
+  GNULIB_DUP3=0;
+  GNULIB_ENVIRON=0;
+  GNULIB_EUIDACCESS=0;
+  GNULIB_FACCESSAT=0;
+  GNULIB_FCHDIR=0;
+  GNULIB_FCHOWNAT=0;
+  GNULIB_FSYNC=0;
+  GNULIB_FTRUNCATE=0;
+  GNULIB_GETCWD=0;
+  GNULIB_GETDOMAINNAME=0;
+  GNULIB_GETDTABLESIZE=0;
+  GNULIB_GETGROUPS=0;
+  GNULIB_GETHOSTNAME=0;
+  GNULIB_GETLOGIN=0;
+  GNULIB_GETLOGIN_R=0;
+  GNULIB_GETPAGESIZE=0;
+  GNULIB_GETUSERSHELL=0;
+  GNULIB_LCHOWN=0;
+  GNULIB_LINK=0;
+  GNULIB_LINKAT=0;
+  GNULIB_LSEEK=0;
+  GNULIB_PIPE=0;
+  GNULIB_PIPE2=0;
+  GNULIB_PREAD=0;
+  GNULIB_PWRITE=0;
+  GNULIB_READLINK=0;
+  GNULIB_READLINKAT=0;
+  GNULIB_RMDIR=0;
+  GNULIB_SLEEP=0;
+  GNULIB_SYMLINK=0;
+  GNULIB_SYMLINKAT=0;
+  GNULIB_TTYNAME_R=0;
+  GNULIB_UNISTD_H_GETOPT=0;
+  GNULIB_UNISTD_H_SIGPIPE=0;
+  GNULIB_UNLINK=0;
+  GNULIB_UNLINKAT=0;
+  GNULIB_USLEEP=0;
+  GNULIB_WRITE=0;
+    HAVE_CHOWN=1;
+  HAVE_DUP2=1;
+  HAVE_DUP3=1;
+  HAVE_EUIDACCESS=1;
+  HAVE_FACCESSAT=1;
+  HAVE_FCHDIR=1;
+  HAVE_FCHOWNAT=1;
+  HAVE_FSYNC=1;
+  HAVE_FTRUNCATE=1;
+  HAVE_GETDTABLESIZE=1;
+  HAVE_GETGROUPS=1;
+  HAVE_GETHOSTNAME=1;
+  HAVE_GETLOGIN=1;
+  HAVE_GETPAGESIZE=1;
+  HAVE_LCHOWN=1;
+  HAVE_LINK=1;
+  HAVE_LINKAT=1;
+  HAVE_PIPE=1;
+  HAVE_PIPE2=1;
+  HAVE_PREAD=1;
+  HAVE_PWRITE=1;
+  HAVE_READLINK=1;
+  HAVE_READLINKAT=1;
+  HAVE_SLEEP=1;
+  HAVE_SYMLINK=1;
+  HAVE_SYMLINKAT=1;
+  HAVE_UNLINKAT=1;
+  HAVE_USLEEP=1;
+  HAVE_DECL_ENVIRON=1;
+  HAVE_DECL_FCHDIR=1;
+  HAVE_DECL_GETDOMAINNAME=1;
+  HAVE_DECL_GETLOGIN_R=1;
+  HAVE_DECL_GETPAGESIZE=1;
+  HAVE_DECL_GETUSERSHELL=1;
+  HAVE_DECL_TTYNAME_R=1;
+  HAVE_OS_H=0;
+  HAVE_SYS_PARAM_H=0;
+  REPLACE_CHOWN=0;
+  REPLACE_CLOSE=0;
+  REPLACE_DUP=0;
+  REPLACE_DUP2=0;
+  REPLACE_FCHOWNAT=0;
+  REPLACE_GETCWD=0;
+  REPLACE_GETDOMAINNAME=0;
+  REPLACE_GETLOGIN_R=0;
+  REPLACE_GETGROUPS=0;
+  REPLACE_GETPAGESIZE=0;
+  REPLACE_LCHOWN=0;
+  REPLACE_LINK=0;
+  REPLACE_LINKAT=0;
+  REPLACE_LSEEK=0;
+  REPLACE_PREAD=0;
+  REPLACE_PWRITE=0;
+  REPLACE_READLINK=0;
+  REPLACE_RMDIR=0;
+  REPLACE_SLEEP=0;
+  REPLACE_SYMLINK=0;
+  REPLACE_TTYNAME_R=0;
+  REPLACE_UNLINK=0;
+  REPLACE_UNLINKAT=0;
+  REPLACE_USLEEP=0;
+  REPLACE_WRITE=0;
+  UNISTD_H_HAVE_WINSOCK2_H=0;
+  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if test "${ac_cv_type_uid_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then :
+  ac_cv_type_uid_t=yes
+else
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "#define uid_t int" >>confdefs.h
+
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
+for ac_header in unistd.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_UNISTD_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
+$as_echo_n "checking for working chown... " >&6; }
+if test "${ac_cv_func_chown_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_chown_works=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+#include <fcntl.h>
+
+int
+main ()
+{
+  char *f = "conftest.chown";
+  struct stat before, after;
+
+  if (creat (f, 0600) < 0)
+    return 1;
+  if (stat (f, &before) < 0)
+    return 1;
+  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
+    return 1;
+  if (stat (f, &after) < 0)
+    return 1;
+  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_chown_works=yes
+else
+  ac_cv_func_chown_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+rm -f conftest.chown
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
+$as_echo "$ac_cv_func_chown_works" >&6; }
+if test $ac_cv_func_chown_works = yes; then
+
+$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
+
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
+$as_echo_n "checking whether chown dereferences symlinks... " >&6; }
+if test "${gl_cv_func_chown_follows_symlink+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      if test "$cross_compiling" = yes; then :
+  gl_cv_func_chown_follows_symlink=yes
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+
+        int
+        main ()
+        {
+          int result = 0;
+          char const *dangling_symlink = "conftest.dangle";
+
+          unlink (dangling_symlink);
+          if (symlink ("conftest.no-such", dangling_symlink))
+            abort ();
+
+          /* Exit successfully on a conforming system,
+             i.e., where chown must fail with ENOENT.  */
+          if (chown (dangling_symlink, getuid (), getgid ()) == 0)
+            result |= 1;
+          if (errno != ENOENT)
+            result |= 2;
+          return result;
+        }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_chown_follows_symlink=yes
+else
+  gl_cv_func_chown_follows_symlink=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
+$as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
+
+  if test $gl_cv_func_chown_follows_symlink = no; then
+
+$as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+    if test $ac_cv_func_chown = no; then
+    HAVE_CHOWN=0
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
+
+  else
+        if test $gl_cv_func_chown_follows_symlink = no; then
+      REPLACE_CHOWN=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
+
+    fi
+
+        if test $ac_cv_func_chown_works = no; then
+
+$as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
+
+      REPLACE_CHOWN=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
+
+    fi
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
+$as_echo_n "checking whether chown honors trailing slash... " >&6; }
+if test "${gl_cv_func_chown_slash_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  touch conftest.file && rm -f conftest.link
+       if test "$cross_compiling" = yes; then :
+  gl_cv_func_chown_slash_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+
+int
+main ()
+{
+    if (symlink ("conftest.file", "conftest.link")) return 1;
+          if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_chown_slash_works=yes
+else
+  gl_cv_func_chown_slash_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      rm -f conftest.link conftest.file
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
+$as_echo "$gl_cv_func_chown_slash_works" >&6; }
+    if test "$gl_cv_func_chown_slash_works" != yes; then
+
+$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+      REPLACE_CHOWN=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
+
+    fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
+$as_echo_n "checking whether chown always updates ctime... " >&6; }
+if test "${gl_cv_func_chown_ctime_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_chown_ctime_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+int
+main ()
+{
+    struct stat st1, st2;
+          if (close (creat ("conftest.file", 0600))) return 1;
+          if (stat ("conftest.file", &st1)) return 2;
+          sleep (1);
+          if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
+          if (stat ("conftest.file", &st2)) return 4;
+          if (st2.st_ctime <= st1.st_ctime) return 5;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_chown_ctime_works=yes
+else
+  gl_cv_func_chown_ctime_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      rm -f conftest.file
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
+$as_echo "$gl_cv_func_chown_ctime_works" >&6; }
+    if test "$gl_cv_func_chown_ctime_works" != yes; then
+
+$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
+
+      REPLACE_CHOWN=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
+
+    fi
+
+    if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
+
+    fi
+  fi
+
+
+  GNULIB_ISBLANK=0;
+    HAVE_ISBLANK=1;
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
+$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
+if test "${gl_cv_have_include_next+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -rf conftestd1a conftestd1b conftestd2
+     mkdir conftestd1a conftestd1b conftestd2
+                                                  cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+     cat <<EOF > conftestd1b/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+     cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+     gl_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <conftest.h>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_have_include_next=yes
+else
+  CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <conftest.h>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_have_include_next=buggy
+else
+  gl_cv_have_include_next=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CPPFLAGS="$gl_save_CPPFLAGS"
+     rm -rf conftestd1a conftestd1b conftestd2
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
+$as_echo "$gl_cv_have_include_next" >&6; }
+  PRAGMA_SYSTEM_HEADER=
+  if test $gl_cv_have_include_next = yes; then
+    INCLUDE_NEXT=include_next
+    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+    if test -n "$GCC"; then
+      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+    fi
+  else
+    if test $gl_cv_have_include_next = buggy; then
+      INCLUDE_NEXT=include
+      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+    else
+      INCLUDE_NEXT=include
+      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+    fi
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
+$as_echo_n "checking whether system header files limit the line length... " >&6; }
+if test "${gl_cv_pragma_columns+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __TANDEM
+choke me
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "choke me" >/dev/null 2>&1; then :
+  gl_cv_pragma_columns=yes
+else
+  gl_cv_pragma_columns=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
+$as_echo "$gl_cv_pragma_columns" >&6; }
+  if test $gl_cv_pragma_columns = yes; then
+    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
+  else
+    PRAGMA_COLUMNS=
+  fi
+
+
+
+     GNULIB_DIRFD=0;
+  GNULIB_FDOPENDIR=0;
+  GNULIB_SCANDIR=0;
+  GNULIB_ALPHASORT=0;
+    HAVE_DECL_DIRFD=1;
+  HAVE_DECL_FDOPENDIR=1;
+  HAVE_FDOPENDIR=1;
+  HAVE_SCANDIR=1;
+  HAVE_ALPHASORT=1;
+  REPLACE_CLOSEDIR=0;
+  REPLACE_DIRFD=0;
+  REPLACE_FDOPENDIR=0;
+  REPLACE_OPENDIR=0;
+
+
+
+
+
+  for ac_header in $gl_header_list
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
+$as_echo_n "checking if environ is properly declared... " >&6; }
+  if test "${gt_cv_var_environ_declaration+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+           extern struct { int foo; } environ;
+int
+main ()
+{
+environ.foo = 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_var_environ_declaration=no
+else
+  gt_cv_var_environ_declaration=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
+$as_echo "$gt_cv_var_environ_declaration" >&6; }
+  if test $gt_cv_var_environ_declaration = yes; then
+
+$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
+
+  fi
+
+
+  if test $gt_cv_var_environ_declaration != yes; then
+    HAVE_DECL_ENVIRON=0
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
+$as_echo_n "checking for complete errno.h... " >&6; }
+if test "${gl_cv_header_errno_h_complete+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ESTALE
+booboo
+#endif
+#if !defined EDQUOT
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "booboo" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_complete=no
+else
+  gl_cv_header_errno_h_complete=yes
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
+$as_echo "$gl_cv_header_errno_h_complete" >&6; }
+  if test $gl_cv_header_errno_h_complete = yes; then
+    ERRNO_H=''
+  else
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_errno_h='<'errno.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
+$as_echo_n "checking absolute name of <errno.h>... " >&6; }
+if test "${gl_cv_next_errno_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/errno.h#{
+                    s#.*"\(.*/errno.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
+$as_echo "$gl_cv_next_errno_h" >&6; }
+     fi
+     NEXT_ERRNO_H=$gl_cv_next_errno_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'errno.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_errno_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
+
+
+
+
+    ERRNO_H='errno.h'
+  fi
+
+
+  if test -n "$ERRNO_H"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
+$as_echo_n "checking for EMULTIHOP value... " >&6; }
+if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EMULTIHOP=yes
+else
+  gl_cv_header_errno_h_EMULTIHOP=no
+fi
+rm -f conftest*
+
+      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EMULTIHOP=hidden
+fi
+rm -f conftest*
+
+        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
+                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+        fi
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
+$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
+    case $gl_cv_header_errno_h_EMULTIHOP in
+      yes | no)
+        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
+        ;;
+      *)
+        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
+        ;;
+    esac
+
+
+  fi
+
+
+  if test -n "$ERRNO_H"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
+$as_echo_n "checking for ENOLINK value... " >&6; }
+if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_ENOLINK=yes
+else
+  gl_cv_header_errno_h_ENOLINK=no
+fi
+rm -f conftest*
+
+      if test $gl_cv_header_errno_h_ENOLINK = no; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_ENOLINK=hidden
+fi
+rm -f conftest*
+
+        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
+                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+        fi
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
+$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
+    case $gl_cv_header_errno_h_ENOLINK in
+      yes | no)
+        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
+        ;;
+      *)
+        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
+        ;;
+    esac
+
+
+  fi
+
+
+  if test -n "$ERRNO_H"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
+$as_echo_n "checking for EOVERFLOW value... " >&6; }
+if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EOVERFLOW=yes
+else
+  gl_cv_header_errno_h_EOVERFLOW=no
+fi
+rm -f conftest*
+
+      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EOVERFLOW=hidden
+fi
+rm -f conftest*
+
+        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
+                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+        fi
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
+$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
+    case $gl_cv_header_errno_h_EOVERFLOW in
+      yes | no)
+        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
+        ;;
+      *)
+        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
+        ;;
+    esac
+
+
+  fi
+
+
+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R $ac_have_decl
+_ACEOF
+
+for ac_func in strerror_r
+do :
+  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
+if test "x$ac_cv_func_strerror_r" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRERROR_R 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+$as_echo_n "checking whether strerror_r returns char *... " >&6; }
+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    ac_cv_func_strerror_r_char_p=no
+    if test $ac_cv_have_decl_strerror_r = yes; then
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+         char buf[100];
+         char x = *strerror_r (0, buf, sizeof buf);
+         char *p = strerror_r (0, buf, sizeof buf);
+         return !p || x;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    else
+      # strerror_r is not declared.  Choose between
+      # systems that have relatively inaccessible declarations for the
+      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
+      # former has a strerror_r that returns char*, while the latter
+      # has a strerror_r that returns `int'.
+      # This test should segfault on the DEC system.
+      if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+       extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+         char x = *strerror_r (0, buf, sizeof buf);
+         return ! isalpha (x);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+if test $ac_cv_func_strerror_r_char_p = yes; then
+
+$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
+
+fi
+
+
+  XGETTEXT_EXTRA_OPTIONS=
+
+
+
+
+
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default"
+if test "x$ac_cv_have_decl_setregid" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SETREGID $ac_have_decl
+_ACEOF
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
+$as_echo_n "checking type of array argument to getgroups... " >&6; }
+if test "${ac_cv_type_getgroups+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_type_getgroups=cross
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Thanks to Mike Rendell for this test.  */
+$ac_includes_default
+#define NGID 256
+#undef MAX
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+
+int
+main ()
+{
+  gid_t gidset[NGID];
+  int i, n;
+  union { gid_t gval; long int lval; }  val;
+
+  val.lval = -1;
+  for (i = 0; i < NGID; i++)
+    gidset[i] = val.gval;
+  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
+                gidset);
+  /* Exit non-zero if getgroups seems to require an array of ints.  This
+     happens when gid_t is short int but getgroups modifies an array
+     of ints.  */
+  return n > 0 && gidset[n] != val.gval;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_type_getgroups=gid_t
+else
+  ac_cv_type_getgroups=int
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+if test $ac_cv_type_getgroups = cross; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
+  ac_cv_type_getgroups=gid_t
+else
+  ac_cv_type_getgroups=int
+fi
+rm -f conftest*
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
+$as_echo "$ac_cv_type_getgroups" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define GETGROUPS_T $ac_cv_type_getgroups
+_ACEOF
+
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
+if test "x$ac_cv_func_getgroups" = x""yes; then :
+
+fi
+
+
+# If we don't yet have getgroups, see if it's in -lbsd.
+# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
+ac_save_LIBS=$LIBS
+if test $ac_cv_func_getgroups = no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
+$as_echo_n "checking for getgroups in -lbsd... " >&6; }
+if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getgroups ();
+int
+main ()
+{
+return getgroups ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_bsd_getgroups=yes
+else
+  ac_cv_lib_bsd_getgroups=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
+$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
+if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
+  GETGROUPS_LIB=-lbsd
+fi
+
+fi
+
+# Run the program to test the functionality of the system-supplied
+# getgroups function only if there is such a function.
+if test $ac_cv_func_getgroups = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
+$as_echo_n "checking for working getgroups... " >&6; }
+if test "${ac_cv_func_getgroups_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_getgroups_works=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+/* On Ultrix 4.3, getgroups (0, 0) always fails.  */
+       return getgroups (0, 0) == -1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_getgroups_works=yes
+else
+  ac_cv_func_getgroups_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
+$as_echo "$ac_cv_func_getgroups_works" >&6; }
+else
+  ac_cv_func_getgroups_works=no
+fi
+if test $ac_cv_func_getgroups_works = yes; then
+
+$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
+
+fi
+LIBS=$ac_save_LIBS
+
+
+  GNULIB_FCNTL=0;
+  GNULIB_OPEN=0;
+  GNULIB_OPENAT=0;
+    HAVE_FCNTL=1;
+  HAVE_OPENAT=1;
+  REPLACE_FCNTL=0;
+  REPLACE_OPEN=0;
+  REPLACE_OPENAT=0;
+
+
+     GNULIB_FCHMODAT=0;
+  GNULIB_FSTATAT=0;
+  GNULIB_FUTIMENS=0;
+  GNULIB_LCHMOD=0;
+  GNULIB_LSTAT=0;
+  GNULIB_MKDIRAT=0;
+  GNULIB_MKFIFO=0;
+  GNULIB_MKFIFOAT=0;
+  GNULIB_MKNOD=0;
+  GNULIB_MKNODAT=0;
+  GNULIB_STAT=0;
+  GNULIB_UTIMENSAT=0;
+    HAVE_FCHMODAT=1;
+  HAVE_FSTATAT=1;
+  HAVE_FUTIMENS=1;
+  HAVE_LCHMOD=1;
+  HAVE_LSTAT=1;
+  HAVE_MKDIRAT=1;
+  HAVE_MKFIFO=1;
+  HAVE_MKFIFOAT=1;
+  HAVE_MKNOD=1;
+  HAVE_MKNODAT=1;
+  HAVE_UTIMENSAT=1;
+  REPLACE_FSTAT=0;
+  REPLACE_FSTATAT=0;
+  REPLACE_FUTIMENS=0;
+  REPLACE_LSTAT=0;
+  REPLACE_MKDIR=0;
+  REPLACE_MKFIFO=0;
+  REPLACE_MKNOD=0;
+  REPLACE_STAT=0;
+  REPLACE_UTIMENSAT=0;
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
+$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
+if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -f conftest.sym conftest.file
+     echo >conftest.file
+     if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
+       if test "$cross_compiling" = yes; then :
+  # When cross-compiling, be pessimistic so we will end up using the
+          # replacement version of lstat that checks for trailing slashes and
+          # calls lstat a second time when necessary.
+          ac_cv_func_lstat_dereferences_slashed_symlink=no
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+struct stat sbuf;
+              /* Linux will dereference the symlink and fail, as required by
+                 POSIX.  That is better in the sense that it means we will not
+                 have to compile and use the lstat wrapper.  */
+              return lstat ("conftest.sym/", &sbuf) == 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_lstat_dereferences_slashed_symlink=yes
+else
+  ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     else
+       # If the 'ln -s' command failed, then we probably don't even
+       # have an lstat function.
+       ac_cv_func_lstat_dereferences_slashed_symlink=no
+     fi
+     rm -f conftest.sym conftest.file
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
+$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+  test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
+
+cat >>confdefs.h <<_ACEOF
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+_ACEOF
+
+  if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
+
+  fi
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
+$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
+if test "${gl_cv_func_unlink_honors_slashes+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  touch conftest.file
+     # Assume that if we have lstat, we can also check symlinks.
+     if test $ac_cv_func_lstat = yes; then
+       ln -s conftest.file conftest.lnk
+     fi
+     if test "$cross_compiling" = yes; then :
+  gl_cv_func_unlink_honors_slashes="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+           #include <errno.h>
+
+int
+main ()
+{
+int result = 0;
+           if (!unlink ("conftest.file/"))
+             result |= 1;
+           else if (errno != ENOTDIR)
+             result |= 2;
+#if HAVE_LSTAT
+           if (!unlink ("conftest.lnk/"))
+             result |= 4;
+           else if (errno != ENOTDIR)
+             result |= 8;
+#endif
+           return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_unlink_honors_slashes=yes
+else
+  gl_cv_func_unlink_honors_slashes=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     rm -f conftest.file conftest.lnk
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
+$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
+$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
+if test "${gl_cv_func_unlink_parent_fails+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$host_os" in
+       darwin*)
+                                                      if {
+              # Use the mktemp program if available. If not available, hide the error
+              # message.
+              tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
+              test -n "$tmp" && test -d "$tmp"
+            } ||
+            {
+              # Use a simple mkdir command. It is guaranteed to fail if the directory
+              # already exists.  $RANDOM is bash specific and expands to empty in shells
+              # other than bash, ksh and zsh.  Its use does not increase security;
+              # rather, it minimizes the probability of failure in a very cluttered /tmp
+              # directory.
+              tmp=/tmp/gt$$-$RANDOM
+              (umask 077 && mkdir "$tmp")
+            }; then
+           mkdir "$tmp/subdir"
+           GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
+           export GL_SUBDIR_FOR_UNLINK
+           if test "$cross_compiling" = yes; then :
+  gl_cv_func_unlink_parent_fails="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+                #include <stdlib.h>
+                #include <unistd.h>
+                int main ()
+                {
+                  int result = 0;
+                  if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
+                    result |= 1;
+                  else if (unlink ("..") == 0)
+                    result |= 2;
+                  return result;
+                }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_unlink_parent_fails=yes
+else
+  gl_cv_func_unlink_parent_fails=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+           unset GL_SUBDIR_FOR_UNLINK
+           rm -rf "$tmp"
+         else
+           gl_cv_func_unlink_parent_fails="guessing no"
+         fi
+         ;;
+       *)
+         gl_cv_func_unlink_parent_fails="guessing yes"
+         ;;
+     esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
+$as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
+  case "$gl_cv_func_unlink_parent_fails" in
+    *no)
+
+$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
+
+      ;;
+  esac
+  if test "$gl_cv_func_unlink_honors_slashes" != yes \
+     || { case "$gl_cv_func_unlink_parent_fails" in
+            *yes) false;;
+            *no) true;;
+          esac
+        }; then
+    REPLACE_UNLINK=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
+
+  fi
+
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define mode_t int
+_ACEOF
+
+fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
+$as_echo_n "checking for promoted mode_t type... " >&6; }
+if test "${gl_cv_promoted_mode_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+int
+main ()
+{
+typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_promoted_mode_t='int'
+else
+  gl_cv_promoted_mode_t='mode_t'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
+$as_echo "$gl_cv_promoted_mode_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
+_ACEOF
+
+
+
+
+  GNULIB_OPENAT=1
+
+
+  GNULIB_FCHMODAT=1
+  GNULIB_FSTATAT=1
+  GNULIB_MKDIRAT=1
+
+
+  GNULIB_FCHOWNAT=1
+  GNULIB_UNLINKAT=1
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  for ac_func in fchmodat fstatat mkdirat openat unlinkat
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+
+  case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
+  yes+yes)
+    # GNU/Hurd has unlinkat, but it has the same bug as unlink.
+    if test $REPLACE_UNLINK = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
+
+      REPLACE_UNLINKAT=1
+    fi ;;
+  yes+*)
+    # Solaris 9 has *at functions, but uniformly mishandles trailing
+    # slash in all of them.
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
+
+    REPLACE_OPENAT=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
+
+    REPLACE_FSTATAT=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
+
+    REPLACE_UNLINKAT=1
+    ;;
+  *)
+    HAVE_OPENAT=0
+    HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
+    HAVE_FSTATAT=0 # No known system with fstatat but not openat
+
+
+
+  :
+;;
+  esac
+  if test $ac_cv_func_fchmodat != yes; then
+    HAVE_FCHMODAT=0
+  fi
+  if test $ac_cv_func_mkdirat != yes; then
+    HAVE_MKDIRAT=0
+  fi
+
+
+
+  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
+if test "x$ac_cv_func_fchownat" = x""yes; then :
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
+$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
+if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+     gl_dangle=conftest.dangle
+     # Remove any remnants of a previous test.
+     rm -f $gl_dangle
+     # Arrange for deletion of the temporary file this test creates.
+     ac_clean_files="$ac_clean_files $gl_dangle"
+     ln -s conftest.no-such $gl_dangle
+     if test "$cross_compiling" = yes; then :
+  gl_cv_func_fchownat_nofollow_works=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+int
+main ()
+{
+  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
+                    AT_SYMLINK_NOFOLLOW) != 0
+          && errno == ENOENT);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fchownat_nofollow_works=yes
+else
+  gl_cv_func_fchownat_nofollow_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
+$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
+  if test $gl_cv_func_fchownat_nofollow_works = no; then :
+  REPLACE_FCHOWNAT=1
+
+$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
+
+
+fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
+$as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
+if test "${gl_cv_func_fchownat_empty_filename_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_fchownat_empty_filename_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+            #include <fcntl.h>
+
+int
+main ()
+{
+int fd;
+            int ret;
+            if (mkdir ("conftestdir", 0700) < 0)
+              return 2;
+            fd = open ("conftestdir", O_RDONLY);
+            if (fd < 0)
+              return 3;
+            ret = fchownat (fd, "", -1, -1, 0);
+            close (fd);
+            rmdir ("conftestdir");
+            return ret == 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fchownat_empty_filename_works=yes
+else
+  gl_cv_func_fchownat_empty_filename_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
+$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
+  if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
+  REPLACE_FCHOWNAT=1
+
+$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
+
+
+fi
+
+     if test $REPLACE_CHOWN = 1; then
+       REPLACE_FCHOWNAT=1
+     fi
+else
+  HAVE_FCHOWNAT=0
+fi
+
+  if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fchdir" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FCHDIR $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+  GNULIB_DPRINTF=0;
+  GNULIB_FCLOSE=0;
+  GNULIB_FFLUSH=0;
+  GNULIB_FOPEN=0;
+  GNULIB_FPRINTF=0;
+  GNULIB_FPRINTF_POSIX=0;
+  GNULIB_FPURGE=0;
+  GNULIB_FPUTC=0;
+  GNULIB_FPUTS=0;
+  GNULIB_FREOPEN=0;
+  GNULIB_FSEEK=0;
+  GNULIB_FSEEKO=0;
+  GNULIB_FTELL=0;
+  GNULIB_FTELLO=0;
+  GNULIB_FWRITE=0;
+  GNULIB_GETDELIM=0;
+  GNULIB_GETLINE=0;
+  GNULIB_OBSTACK_PRINTF=0;
+  GNULIB_OBSTACK_PRINTF_POSIX=0;
+  GNULIB_PERROR=0;
+  GNULIB_POPEN=0;
+  GNULIB_PRINTF=0;
+  GNULIB_PRINTF_POSIX=0;
+  GNULIB_PUTC=0;
+  GNULIB_PUTCHAR=0;
+  GNULIB_PUTS=0;
+  GNULIB_REMOVE=0;
+  GNULIB_RENAME=0;
+  GNULIB_RENAMEAT=0;
+  GNULIB_SNPRINTF=0;
+  GNULIB_SPRINTF_POSIX=0;
+  GNULIB_STDIO_H_SIGPIPE=0;
+  GNULIB_TMPFILE=0;
+  GNULIB_VASPRINTF=0;
+  GNULIB_VDPRINTF=0;
+  GNULIB_VFPRINTF=0;
+  GNULIB_VFPRINTF_POSIX=0;
+  GNULIB_VPRINTF=0;
+  GNULIB_VPRINTF_POSIX=0;
+  GNULIB_VSNPRINTF=0;
+  GNULIB_VSPRINTF_POSIX=0;
+    HAVE_DECL_FPURGE=1;
+  HAVE_DECL_FSEEKO=1;
+  HAVE_DECL_FTELLO=1;
+  HAVE_DECL_GETDELIM=1;
+  HAVE_DECL_GETLINE=1;
+  HAVE_DECL_OBSTACK_PRINTF=1;
+  HAVE_DECL_SNPRINTF=1;
+  HAVE_DECL_VSNPRINTF=1;
+  HAVE_DPRINTF=1;
+  HAVE_FSEEKO=1;
+  HAVE_FTELLO=1;
+  HAVE_RENAMEAT=1;
+  HAVE_VASPRINTF=1;
+  HAVE_VDPRINTF=1;
+  REPLACE_DPRINTF=0;
+  REPLACE_FCLOSE=0;
+  REPLACE_FFLUSH=0;
+  REPLACE_FOPEN=0;
+  REPLACE_FPRINTF=0;
+  REPLACE_FPURGE=0;
+  REPLACE_FREOPEN=0;
+  REPLACE_FSEEK=0;
+  REPLACE_FSEEKO=0;
+  REPLACE_FTELL=0;
+  REPLACE_FTELLO=0;
+  REPLACE_GETDELIM=0;
+  REPLACE_GETLINE=0;
+  REPLACE_OBSTACK_PRINTF=0;
+  REPLACE_PERROR=0;
+  REPLACE_POPEN=0;
+  REPLACE_PRINTF=0;
+  REPLACE_REMOVE=0;
+  REPLACE_RENAME=0;
+  REPLACE_RENAMEAT=0;
+  REPLACE_SNPRINTF=0;
+  REPLACE_SPRINTF=0;
+  REPLACE_STDIO_WRITE_FUNCS=0;
+  REPLACE_TMPFILE=0;
+  REPLACE_VASPRINTF=0;
+  REPLACE_VDPRINTF=0;
+  REPLACE_VFPRINTF=0;
+  REPLACE_VPRINTF=0;
+  REPLACE_VSNPRINTF=0;
+  REPLACE_VSPRINTF=0;
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
+$as_echo_n "checking for working fcntl.h... " >&6; }
+if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_header_working_fcntl_h=cross-compiling
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+           #include <sys/stat.h>
+           #include <unistd.h>
+           #include <fcntl.h>
+           #ifndef O_NOATIME
+            #define O_NOATIME 0
+           #endif
+           #ifndef O_NOFOLLOW
+            #define O_NOFOLLOW 0
+           #endif
+           static int const constants[] =
+            {
+              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+            };
+
+int
+main ()
+{
+
+            int result = !constants;
+            {
+              static char const sym[] = "conftest.sym";
+              if (symlink (".", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              unlink (sym);
+            }
+            {
+              static char const file[] = "confdefs.h";
+              int fd = open (file, O_RDONLY | O_NOATIME);
+              if (fd < 0)
+                result |= 8;
+              else
+                {
+                  struct stat st0;
+                  if (fstat (fd, &st0) != 0)
+                    result |= 16;
+                  else
+                    {
+                      char c;
+                      sleep (1);
+                      if (read (fd, &c, 1) != 1)
+                        result |= 24;
+                      else
+                        {
+                          if (close (fd) != 0)
+                            result |= 32;
+                          else
+                            {
+                              struct stat st1;
+                              if (stat (file, &st1) != 0)
+                                result |= 40;
+                              else
+                                if (st0.st_atime != st1.st_atime)
+                                  result |= 64;
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_header_working_fcntl_h=yes
+else
+  case $? in #(
+        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+         *) gl_cv_header_working_fcntl_h='no';;
+        esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
+$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WORKING_O_NOATIME $ac_val
+_ACEOF
+
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WORKING_O_NOFOLLOW $ac_val
+_ACEOF
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
+$as_echo_n "checking for fseeko... " >&6; }
+if test "${gl_cv_func_fseeko+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+
+int
+main ()
+{
+fseeko (stdin, 0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_func_fseeko=yes
+else
+  gl_cv_func_fseeko=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
+$as_echo "$gl_cv_func_fseeko" >&6; }
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
+$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
+if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat s; s.st_dm_mode;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_struct_st_dm_mode=yes
+else
+  ac_cv_struct_st_dm_mode=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
+$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
+
+  if test $ac_cv_struct_st_dm_mode = yes; then
+
+$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
+
+  fi
+
+
+
+      ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strmode" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRMODE $ac_have_decl
+_ACEOF
+
+
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
+$as_echo_n "checking for mbstate_t... " >&6; }
+if test "${ac_cv_type_mbstate_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_type_mbstate_t=yes
+else
+  ac_cv_type_mbstate_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
+$as_echo "$ac_cv_type_mbstate_t" >&6; }
+   if test $ac_cv_type_mbstate_t = yes; then
+
+$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
+
+   else
+
+$as_echo "#define mbstate_t int" >>confdefs.h
+
+   fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
+$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
+if test "${gl_cv_var_stdin_large_offset+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+#if defined __SL64 && defined __SCLE /* cygwin */
+  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
+     it is easier to do a version check than building a runtime test.  */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+  choke me
+# endif
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_var_stdin_large_offset=yes
+else
+  gl_cv_var_stdin_large_offset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
+$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
+
+
+      ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fseeko" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FSEEKO $ac_have_decl
+_ACEOF
+
+
+
+      ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
+if test "x$ac_cv_have_decl_ftello" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FTELLO $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
+$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
+if test "${gl_cv_func_getcwd_null+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+
+       case "$host_os" in
+                               # Guess yes on glibc systems.
+         *-gnu*)               gl_cv_func_getcwd_null="guessing yes";;
+                               # Guess yes on Cygwin.
+         cygwin*)              gl_cv_func_getcwd_null="guessing yes";;
+                               # Guess yes on mingw.
+         mingw*)               gl_cv_func_getcwd_null="guessing yes";;
+                               # If we don't know, assume the worst.
+         *)                    gl_cv_func_getcwd_null="guessing no";;
+       esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#        include <unistd.h>
+#        ifndef getcwd
+         char *getcwd ();
+#        endif
+
+int
+main ()
+{
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* mingw cwd does not start with '/', but getcwd does allocate.  */
+#else
+           if (chdir ("/") != 0)
+             return 1;
+           else
+             {
+               char *f = getcwd (NULL, 0);
+               if (! f)
+                 return 2;
+               if (f[0] != '/')
+                 return 3;
+               if (f[1] != '\0')
+                 return 4;
+               return 0;
+             }
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_getcwd_null=yes
+else
+  gl_cv_func_getcwd_null=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
+$as_echo "$gl_cv_func_getcwd_null" >&6; }
+
+
+      ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getcwd" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETCWD $ac_have_decl
+_ACEOF
+
+
+
+      ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getdelim" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETDELIM $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getline" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLINE $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_getopt_h='<'getopt.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
+$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
+if test "${gl_cv_next_getopt_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_getopt_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <getopt.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/getopt.h#{
+                    s#.*"\(.*/getopt.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_getopt_h='<'getopt.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
+$as_echo "$gl_cv_next_getopt_h" >&6; }
+     fi
+     NEXT_GETOPT_H=$gl_cv_next_getopt_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'getopt.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_getopt_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_getopt_h = yes; then
+    HAVE_GETOPT_H=1
+  else
+    HAVE_GETOPT_H=0
+  fi
+
+
+  gl_replace_getopt=
+
+    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+    for ac_header in getopt.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
+if test "x$ac_cv_header_getopt_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETOPT_H 1
+_ACEOF
+
+else
+  gl_replace_getopt=yes
+fi
+
+done
+
+  fi
+
+    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+    for ac_func in getopt_long_only
+do :
+  ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
+if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETOPT_LONG_ONLY 1
+_ACEOF
+
+else
+  gl_replace_getopt=yes
+fi
+done
+
+  fi
+
+                    if test -z "$gl_replace_getopt"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
+$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
+if test "${gl_cv_func_getopt_posix+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                                                                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+int
+main ()
+{
+int *p = &optreset; return optreset;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_optind_min=1
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <getopt.h>
+int
+main ()
+{
+return !getopt_clip;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_optind_min=1
+else
+  gl_optind_min=0
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+                gl_save_CPPFLAGS=$CPPFLAGS
+        CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
+        if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+             mingw*)         gl_cv_func_getopt_posix="guessing no";;
+             darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
+             *)              gl_cv_func_getopt_posix="guessing yes";;
+           esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+main ()
+{
+  {
+    int argc = 0;
+    char *argv[10];
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-a";
+    argv[argc++] = "foo";
+    argv[argc++] = "bar";
+    argv[argc] = NULL;
+    optind = OPTIND_MIN;
+    opterr = 0;
+
+    c = getopt (argc, argv, "ab");
+    if (!(c == 'a'))
+      return 1;
+    c = getopt (argc, argv, "ab");
+    if (!(c == -1))
+      return 2;
+    if (!(optind == 2))
+      return 3;
+  }
+  /* Some internal state exists at this point.  */
+  {
+    int argc = 0;
+    char *argv[10];
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "donald";
+    argv[argc++] = "-p";
+    argv[argc++] = "billy";
+    argv[argc++] = "duck";
+    argv[argc++] = "-a";
+    argv[argc++] = "bar";
+    argv[argc] = NULL;
+    optind = OPTIND_MIN;
+    opterr = 0;
+
+    c = getopt (argc, argv, "+abp:q:");
+    if (!(c == -1))
+      return 4;
+    if (!(strcmp (argv[0], "program") == 0))
+      return 5;
+    if (!(strcmp (argv[1], "donald") == 0))
+      return 6;
+    if (!(strcmp (argv[2], "-p") == 0))
+      return 7;
+    if (!(strcmp (argv[3], "billy") == 0))
+      return 8;
+    if (!(strcmp (argv[4], "duck") == 0))
+      return 9;
+    if (!(strcmp (argv[5], "-a") == 0))
+      return 10;
+    if (!(strcmp (argv[6], "bar") == 0))
+      return 11;
+    if (!(optind == 1))
+      return 12;
+  }
+  /* Detect MacOS 10.5, AIX 7.1 bug.  */
+  {
+    char *argv[3] = { "program", "-ab", NULL };
+    optind = OPTIND_MIN;
+    opterr = 0;
+    if (getopt (2, argv, "ab:") != 'a')
+      return 13;
+    if (getopt (2, argv, "ab:") != '?')
+      return 14;
+    if (optopt != 'b')
+      return 15;
+    if (optind != 2)
+      return 16;
+  }
+
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_getopt_posix=yes
+else
+  gl_cv_func_getopt_posix=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+        CPPFLAGS=$gl_save_CPPFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
+$as_echo "$gl_cv_func_getopt_posix" >&6; }
+    case "$gl_cv_func_getopt_posix" in
+      *no) gl_replace_getopt=yes ;;
+    esac
+  fi
+
+  if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
+$as_echo_n "checking for working GNU getopt function... " >&6; }
+if test "${gl_cv_func_getopt_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
+       # optstring is necessary for programs like m4 that have POSIX-mandated
+       # semantics for supporting options interspersed with files.
+       # Also, since getopt_long is a GNU extension, we require optind=0.
+       # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
+       # so take care to revert to the correct (non-)export state.
+       gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
+       case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
+         xx) gl_had_POSIXLY_CORRECT=exported ;;
+         x)  gl_had_POSIXLY_CORRECT=yes      ;;
+         *)  gl_had_POSIXLY_CORRECT=         ;;
+       esac
+       POSIXLY_CORRECT=1
+       export POSIXLY_CORRECT
+       if test "$cross_compiling" = yes; then :
+           case $host_os:$ac_cv_have_decl_optreset in
+           *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
+           *:yes)               gl_cv_func_getopt_gnu=no;;
+           *)                   gl_cv_func_getopt_gnu=yes;;
+         esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <getopt.h>
+                           #include <stddef.h>
+                           #include <string.h>
+
+int
+main ()
+{
+
+             int result = 0;
+             /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
+                and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+                OSF/1 5.1, Solaris 10.  */
+             {
+               char *myargv[3];
+               myargv[0] = "conftest";
+               myargv[1] = "-+";
+               myargv[2] = 0;
+               opterr = 0;
+               if (getopt (2, myargv, "+a") != '?')
+                 result |= 1;
+             }
+             /* This code succeeds on glibc 2.8, mingw,
+                and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+                IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
+             {
+               char *argv[] = { "program", "-p", "foo", "bar", NULL };
+
+               optind = 1;
+               if (getopt (4, argv, "p::") != 'p')
+                 result |= 2;
+               else if (optarg != NULL)
+                 result |= 4;
+               else if (getopt (4, argv, "p::") != -1)
+                 result |= 6;
+               else if (optind != 2)
+                 result |= 8;
+             }
+             /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
+             {
+               char *argv[] = { "program", "foo", "-p", NULL };
+               optind = 0;
+               if (getopt (3, argv, "-p") != 1)
+                 result |= 16;
+               else if (getopt (3, argv, "-p") != 'p')
+                 result |= 32;
+             }
+             /* This code fails on glibc 2.11.  */
+             {
+               char *argv[] = { "program", "-b", "-a", NULL };
+               optind = opterr = 0;
+               if (getopt (3, argv, "+:a:b") != 'b')
+                 result |= 64;
+               else if (getopt (3, argv, "+:a:b") != ':')
+                 result |= 64;
+             }
+             return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_getopt_gnu=yes
+else
+  gl_cv_func_getopt_gnu=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+       case $gl_had_POSIXLY_CORRECT in
+         exported) ;;
+         yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
+         *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
+       esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
+$as_echo "$gl_cv_func_getopt_gnu" >&6; }
+    if test "$gl_cv_func_getopt_gnu" = "no"; then
+      gl_replace_getopt=yes
+    fi
+  fi
+
+
+      ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getenv" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+  if test -n "$gl_replace_getopt"; then :
+
+
+
+  GETOPT_H=getopt.h
+
+$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
+
+
+
+    GNULIB_UNISTD_H_GETOPT=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
+
+
+
+  :
+
+
+
+
+
+
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if test "${ac_cv_c_restrict+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_restrict=no
+   # The order here caters to the fact that C++ does not require restrict.
+   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+typedef int * int_ptr;
+       int foo (int_ptr $ac_kw ip) {
+       return ip[0];
+       }
+int
+main ()
+{
+int s[1];
+       int * $ac_kw t = s;
+       t[0] = 0;
+       return foo(t)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) $as_echo "#define restrict /**/" >>confdefs.h
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+
+  GNULIB_GETTIMEOFDAY=0;
+    HAVE_GETTIMEOFDAY=1;
+  HAVE_STRUCT_TIMEVAL=1;
+  HAVE_SYS_TIME_H=1;
+  REPLACE_GETTIMEOFDAY=0;
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_time_h='<'sys/time.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
+$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
+if test "${gl_cv_next_sys_time_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_sys_time_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/sys/time.h#{
+                    s#.*"\(.*/sys/time.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_sys_time_h='<'sys/time.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
+$as_echo "$gl_cv_next_sys_time_h" >&6; }
+     fi
+     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/time.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_time_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
+
+
+
+
+
+  if test $ac_cv_header_sys_time_h != yes; then
+    HAVE_SYS_TIME_H=0
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
+$as_echo_n "checking for struct timeval... " >&6; }
+if test "${gl_cv_sys_struct_timeval+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if HAVE_SYS_TIME_H
+             #include <sys/time.h>
+            #endif
+            #include <time.h>
+
+int
+main ()
+{
+static struct timeval x; x.tv_sec = x.tv_usec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timeval=yes
+else
+  gl_cv_sys_struct_timeval=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
+$as_echo "$gl_cv_sys_struct_timeval" >&6; }
+  if test $gl_cv_sys_struct_timeval != yes; then
+    HAVE_STRUCT_TIMEVAL=0
+  fi
+
+
+    for gl_func in gettimeofday; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if test "${ac_cv_header_stdbool_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+             #include <stdbool.h>
+             #ifndef bool
+              "error: bool is not defined"
+             #endif
+             #ifndef false
+              "error: false is not defined"
+             #endif
+             #if false
+              "error: false is not 0"
+             #endif
+             #ifndef true
+              "error: true is not defined"
+             #endif
+             #if true != 1
+              "error: true is not 1"
+             #endif
+             #ifndef __bool_true_false_are_defined
+              "error: __bool_true_false_are_defined is not defined"
+             #endif
+
+             struct s { _Bool s: 1; _Bool t; } s;
+
+             char a[true == 1 ? 1 : -1];
+             char b[false == 0 ? 1 : -1];
+             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+             char d[(bool) 0.5 == true ? 1 : -1];
+             /* See body of main program for 'e'.  */
+             char f[(_Bool) 0.0 == false ? 1 : -1];
+             char g[true];
+             char h[sizeof (_Bool)];
+             char i[sizeof s.t];
+             enum { j = false, k = true, l = false * true, m = true * 256 };
+             /* The following fails for
+                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+             _Bool n[m];
+             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+             /* Catch a bug in an HP-UX C compiler.  See
+                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+              */
+             _Bool q = true;
+             _Bool *pq = &q;
+
+int
+main ()
+{
+
+             bool e = &s;
+             *pq |= q;
+             *pq |= ! q;
+             /* Refer to every declared value, to avoid compiler optimizations.  */
+             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+                     + !m + !n + !o + !p + !q + !pq);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdbool_h=yes
+else
+  ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+
+
+
+
+  # Define two additional variables used in the Makefile substitution.
+
+  if test "$ac_cv_header_stdbool_h" = yes; then
+    STDBOOL_H=''
+  else
+    STDBOOL_H='stdbool.h'
+  fi
+
+
+  if test "$ac_cv_type__Bool" = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+else
+  ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if test "${ac_cv_type_long_long_int+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+                                        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+                 #ifndef LLONG_MAX
+                 # define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 # define LLONG_MAX (HALF - 1 + HALF)
+                 #endif
+int
+main ()
+{
+long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+        fi
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+  if test $ac_cv_type_long_long_int = yes; then
+
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+    gl_cv_c_multiarch=no
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+         not a universal capable compiler
+        #endif
+        typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+               arch=
+     prev=
+     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+       if test -n "$prev"; then
+         case $word in
+           i?86 | x86_64 | ppc | ppc64)
+             if test -z "$arch" || test "$arch" = "$word"; then
+               arch="$word"
+             else
+               gl_cv_c_multiarch=yes
+             fi
+             ;;
+         esac
+         prev=
+       else
+         if test "x$word" = "x-arch"; then
+           prev=arch
+         fi
+       fi
+     done
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  if test $gl_cv_c_multiarch = yes; then
+    APPLE_UNIVERSAL_BUILD=1
+  else
+    APPLE_UNIVERSAL_BUILD=0
+  fi
+
+
+
+
+
+  if test $ac_cv_type_long_long_int = yes; then
+    HAVE_LONG_LONG_INT=1
+  else
+    HAVE_LONG_LONG_INT=0
+  fi
+
+
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    HAVE_UNSIGNED_LONG_LONG_INT=1
+  else
+    HAVE_UNSIGNED_LONG_LONG_INT=0
+  fi
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
+
+
+      if test $ac_cv_header_inttypes_h = yes; then
+    HAVE_INTTYPES_H=1
+  else
+    HAVE_INTTYPES_H=0
+  fi
+
+
+      if test $ac_cv_header_sys_types_h = yes; then
+    HAVE_SYS_TYPES_H=1
+  else
+    HAVE_SYS_TYPES_H=0
+  fi
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdint_h='<'stdint.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if test "${gl_cv_next_stdint_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_stdint_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdint.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/stdint.h#{
+                    s#.*"\(.*/stdint.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_stdint_h='<'stdint.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+$as_echo "$gl_cv_next_stdint_h" >&6; }
+     fi
+     NEXT_STDINT_H=$gl_cv_next_stdint_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stdint.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdint_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_stdint_h = yes; then
+    HAVE_STDINT_H=1
+  else
+    HAVE_STDINT_H=0
+  fi
+
+
+    if test $ac_cv_header_stdint_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_stdint_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_header_working_stdint_h=no
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t) \
+  ((t) ((t) 0 < (t) -1 \
+        ? (t) -1 \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+struct s {
+  int check_PTRDIFF:
+      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+      ? 1 : -1;
+  /* Detect bug in FreeBSD 6.0 / ia64.  */
+  int check_SIG_ATOMIC:
+      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+      ? 1 : -1;
+  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+  int check_WCHAR:
+      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+      ? 1 : -1;
+  /* Detect bug in mingw.  */
+  int check_WINT:
+      WINT_MIN == TYPE_MINIMUM (wint_t)
+      && WINT_MAX == TYPE_MAXIMUM (wint_t)
+      ? 1 : -1;
+
+  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
+  int check_UINT8_C:
+        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+  int check_UINT16_C:
+        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
+#ifdef UINT8_MAX
+  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+                                                    if test "$cross_compiling" = yes; then :
+                 gl_cv_header_working_stdint_h=yes
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+  {
+#ifdef INT8_MAX
+    MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+    MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+    MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+    MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+    MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+    MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+    MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+    MVAL (UINT64_MAX),
+#endif
+    NULL
+  };
+
+int
+main ()
+{
+
+  const char **mv;
+  for (mv = macro_values; *mv != NULL; mv++)
+    {
+      const char *value = *mv;
+      /* Test whether it looks like a cast expression.  */
+      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+          || strncmp (value, "((int)"/*)*/, 6) == 0
+          || strncmp (value, "((signed short)"/*)*/, 15) == 0
+          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+        return mv - macro_values + 1;
+    }
+  return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_header_working_stdint_h=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+  fi
+  if test "$gl_cv_header_working_stdint_h" = yes; then
+    STDINT_H=
+  else
+            for ac_header in sys/inttypes.h sys/bitypes.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    if test $ac_cv_header_sys_inttypes_h = yes; then
+      HAVE_SYS_INTTYPES_H=1
+    else
+      HAVE_SYS_INTTYPES_H=0
+    fi
+
+    if test $ac_cv_header_sys_bitypes_h = yes; then
+      HAVE_SYS_BITYPES_H=1
+    else
+      HAVE_SYS_BITYPES_H=0
+    fi
+
+
+
+
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+  for gltype in ptrdiff_t size_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+#include <limits.h>"; then :
+
+else
+  result=unknown
+fi
+
+       eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+                                                result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
+
+
+  fi
+
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+#include <limits.h>"; then :
+
+else
+  result=unknown
+fi
+
+       eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+                                                result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
+
+
+
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+$as_echo_n "checking whether $gltype is signed... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  result=yes
+else
+  result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       eval gl_cv_type_${gltype}_signed=\$result
+
+fi
+eval ac_res=\$gl_cv_type_${gltype}_signed
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_type_${gltype}_signed
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    if test "$result" = yes; then
+      cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+      eval HAVE_SIGNED_${GLTYPE}=1
+    else
+      eval HAVE_SIGNED_${GLTYPE}=0
+    fi
+  done
+
+
+  gl_cv_type_ptrdiff_t_signed=yes
+  gl_cv_type_size_t_signed=no
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+  for gltype in ptrdiff_t size_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
+         esac
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+              extern $gltype foo;
+              extern $gltype1 foo;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+  done
+
+
+  fi
+
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
+         esac
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+              extern $gltype foo;
+              extern $gltype1 foo;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+  done
+
+
+
+    STDINT_H=stdint.h
+  fi
+
+
+
+  for ac_header in inttypes.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+fi
+
+done
+
+  if test $ac_cv_header_inttypes_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
+$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
+if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_inttypes_pri_broken=no
+else
+  gt_cv_inttypes_pri_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
+$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define PRI_MACROS_BROKEN 1
+_ACEOF
+
+    PRI_MACROS_BROKEN=1
+  else
+    PRI_MACROS_BROKEN=0
+  fi
+
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "imaxabs" "ac_cv_have_decl_imaxabs" "$ac_includes_default"
+if test "x$ac_cv_have_decl_imaxabs" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_IMAXABS $ac_have_decl
+_ACEOF
+
+
+
+      ac_fn_c_check_decl "$LINENO" "imaxdiv" "ac_cv_have_decl_imaxdiv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_imaxdiv" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_IMAXDIV $ac_have_decl
+_ACEOF
+
+
+
+      ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOIMAX $ac_have_decl
+_ACEOF
+
+
+
+      ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOUMAX $ac_have_decl
+_ACEOF
+
+
+
+  GNULIB_IMAXABS=0;
+  GNULIB_IMAXDIV=0;
+  GNULIB_STRTOIMAX=0;
+  GNULIB_STRTOUMAX=0;
+    HAVE_DECL_IMAXABS=1;
+  HAVE_DECL_IMAXDIV=1;
+  HAVE_DECL_STRTOIMAX=1;
+  HAVE_DECL_STRTOUMAX=1;
+
+
+  GNULIB_ISWBLANK=0;
+  GNULIB_WCTYPE=0;
+  GNULIB_ISWCTYPE=0;
+  GNULIB_WCTRANS=0;
+  GNULIB_TOWCTRANS=0;
+    HAVE_ISWBLANK=1;
+  HAVE_WCTYPE_T=1;
+  HAVE_WCTRANS_T=1;
+  REPLACE_ISWBLANK=0;
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if test "${gt_cv_c_wint_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+            wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wint_t=yes
+else
+  gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+  if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_iswcntrl = yes; then
+    HAVE_ISWCNTRL=1
+  else
+    HAVE_ISWCNTRL=0
+  fi
+
+
+
+
+
+  if test $gt_cv_c_wint_t = yes; then
+    HAVE_WINT_T=1
+  else
+    HAVE_WINT_T=0
+  fi
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_wctype_h='<'wctype.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
+$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
+if test "${gl_cv_next_wctype_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_wctype_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <wctype.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/wctype.h#{
+                    s#.*"\(.*/wctype.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_wctype_h='<'wctype.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
+$as_echo "$gl_cv_next_wctype_h" >&6; }
+     fi
+     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'wctype.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_wctype_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_wctype_h = yes; then
+    if test $ac_cv_func_iswcntrl = yes; then
+                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
+$as_echo_n "checking whether iswcntrl works... " >&6; }
+if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+          if test "$cross_compiling" = yes; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+                          #if __GNU_LIBRARY__ == 1
+                          Linux libc5 i18n is broken.
+                          #endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_iswcntrl_works=yes
+else
+  gl_cv_func_iswcntrl_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+                  included before <wchar.h>.
+                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+                  must be included before <wchar.h>.  */
+               #include <stddef.h>
+               #include <stdio.h>
+               #include <time.h>
+               #include <wchar.h>
+               #include <wctype.h>
+               int main () { return iswprint ('x') == 0; }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_iswcntrl_works=yes
+else
+  gl_cv_func_iswcntrl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
+$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
+    fi
+    HAVE_WCTYPE_H=1
+  else
+    HAVE_WCTYPE_H=0
+  fi
+
+
+  if test "$gl_cv_func_iswcntrl_works" = no; then
+    REPLACE_ISWCNTRL=1
+  else
+    REPLACE_ISWCNTRL=0
+  fi
+
+
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+        :
+  fi
+
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
+$as_echo_n "checking for wctype_t... " >&6; }
+if test "${gl_cv_type_wctype_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+               included before <wchar.h>.
+               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+               must be included before <wchar.h>.  */
+            #include <stddef.h>
+            #include <stdio.h>
+            #include <time.h>
+            #include <wchar.h>
+            #if HAVE_WCTYPE_H
+            # include <wctype.h>
+            #endif
+            wctype_t a;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_wctype_t=yes
+else
+  gl_cv_type_wctype_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
+$as_echo "$gl_cv_type_wctype_t" >&6; }
+  if test $gl_cv_type_wctype_t = no; then
+    HAVE_WCTYPE_T=0
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
+$as_echo_n "checking for wctrans_t... " >&6; }
+if test "${gl_cv_type_wctrans_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+               included before <wchar.h>.
+               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+               must be included before <wchar.h>.  */
+            #include <stddef.h>
+            #include <stdio.h>
+            #include <time.h>
+            #include <wchar.h>
+            #include <wctype.h>
+            wctrans_t a;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_wctrans_t=yes
+else
+  gl_cv_type_wctrans_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
+$as_echo "$gl_cv_type_wctrans_t" >&6; }
+  if test $gl_cv_type_wctrans_t = no; then
+    HAVE_WCTRANS_T=0
+  fi
+
+
+    for gl_func in wctype iswctype wctrans towctrans     ; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# include <wchar.h>
+#endif
+#include <wctype.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "$ac_includes_default"
+if test "x$ac_cv_have_decl_iswblank" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISWBLANK $ac_have_decl
+_ACEOF
+
+
+
+  GNULIB_NL_LANGINFO=0;
+    HAVE_NL_LANGINFO=1;
+  REPLACE_NL_LANGINFO=0;
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
+_ACEOF
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
+$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
+if test "${ac_cv_gnu_library_2_1+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+#ifdef __UCLIBC__
+ Lucky user
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky" >/dev/null 2>&1; then :
+  ac_cv_gnu_library_2_1=yes
+else
+  ac_cv_gnu_library_2_1=no
+fi
+rm -f conftest*
+
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
+$as_echo "$ac_cv_gnu_library_2_1" >&6; }
+
+    GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+  GNULIB_SETLOCALE=0;
+  GNULIB_DUPLOCALE=0;
+    HAVE_DUPLOCALE=1;
+  REPLACE_SETLOCALE=0;
+  REPLACE_DUPLOCALE=0;
+
+
+    REPLACE_NULL=0;
+  HAVE_WCHAR_T=1;
+  STDDEF_H='';
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if test "${gt_cv_c_wchar_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+            wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wchar_t=yes
+else
+  gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+  if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
+
+  fi
+
+
+
+
+  if test $gt_cv_c_wchar_t = no; then
+    HAVE_WCHAR_T=0
+    STDDEF_H=stddef.h
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if test "${gl_cv_decl_null_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+      int test[2 * (sizeof NULL == sizeof (void *)) -1];
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_decl_null_works=yes
+else
+  gl_cv_decl_null_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+$as_echo "$gl_cv_decl_null_works" >&6; }
+  if test $gl_cv_decl_null_works = no; then
+    REPLACE_NULL=1
+    STDDEF_H=stddef.h
+  fi
+  if test -n "$STDDEF_H"; then
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stddef_h='<'stddef.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
+if test "${gl_cv_next_stddef_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/stddef.h#{
+                    s#.*"\(.*/stddef.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+$as_echo "$gl_cv_next_stddef_h" >&6; }
+     fi
+     NEXT_STDDEF_H=$gl_cv_next_stddef_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stddef.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stddef_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
+
+
+
+
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
+$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
+if test "${gl_cv_func_malloc_posix+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+             choke me
+             #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_malloc_posix=yes
+else
+  gl_cv_func_malloc_posix=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
+$as_echo "$gl_cv_func_malloc_posix" >&6; }
+
+
+  for ac_header in stdlib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_malloc_0_nonnull=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_malloc_0_nonnull=yes
+else
+  ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+  gl_cv_func_malloc_0_nonnull=1
+else
+  gl_cv_func_malloc_0_nonnull=0
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
+_ACEOF
+
+
+
+  GNULIB_ACOSL=0;
+  GNULIB_ASINL=0;
+  GNULIB_ATANL=0;
+  GNULIB_CEIL=0;
+  GNULIB_CEILF=0;
+  GNULIB_CEILL=0;
+  GNULIB_COSL=0;
+  GNULIB_EXPL=0;
+  GNULIB_FLOOR=0;
+  GNULIB_FLOORF=0;
+  GNULIB_FLOORL=0;
+  GNULIB_FREXP=0;
+  GNULIB_FREXPL=0;
+  GNULIB_ISFINITE=0;
+  GNULIB_ISINF=0;
+  GNULIB_ISNAN=0;
+  GNULIB_ISNANF=0;
+  GNULIB_ISNAND=0;
+  GNULIB_ISNANL=0;
+  GNULIB_LDEXPL=0;
+  GNULIB_LOGB=0;
+  GNULIB_LOGL=0;
+  GNULIB_ROUND=0;
+  GNULIB_ROUNDF=0;
+  GNULIB_ROUNDL=0;
+  GNULIB_SIGNBIT=0;
+  GNULIB_SINL=0;
+  GNULIB_SQRTL=0;
+  GNULIB_TANL=0;
+  GNULIB_TRUNC=0;
+  GNULIB_TRUNCF=0;
+  GNULIB_TRUNCL=0;
+    HAVE_ACOSL=1;
+  HAVE_ASINL=1;
+  HAVE_ATANL=1;
+  HAVE_COSL=1;
+  HAVE_EXPL=1;
+  HAVE_ISNANF=1;
+  HAVE_ISNAND=1;
+  HAVE_ISNANL=1;
+  HAVE_LOGL=1;
+  HAVE_SINL=1;
+  HAVE_SQRTL=1;
+  HAVE_TANL=1;
+  HAVE_DECL_ACOSL=1;
+  HAVE_DECL_ASINL=1;
+  HAVE_DECL_ATANL=1;
+  HAVE_DECL_CEILF=1;
+  HAVE_DECL_CEILL=1;
+  HAVE_DECL_COSL=1;
+  HAVE_DECL_EXPL=1;
+  HAVE_DECL_FLOORF=1;
+  HAVE_DECL_FLOORL=1;
+  HAVE_DECL_FREXPL=1;
+  HAVE_DECL_LDEXPL=1;
+  HAVE_DECL_LOGB=1;
+  HAVE_DECL_LOGL=1;
+  HAVE_DECL_ROUND=1;
+  HAVE_DECL_ROUNDF=1;
+  HAVE_DECL_ROUNDL=1;
+  HAVE_DECL_SINL=1;
+  HAVE_DECL_SQRTL=1;
+  HAVE_DECL_TANL=1;
+  HAVE_DECL_TRUNC=1;
+  HAVE_DECL_TRUNCF=1;
+  HAVE_DECL_TRUNCL=1;
+  REPLACE_CEIL=0;
+  REPLACE_CEILF=0;
+  REPLACE_CEILL=0;
+  REPLACE_FLOOR=0;
+  REPLACE_FLOORF=0;
+  REPLACE_FLOORL=0;
+  REPLACE_FREXP=0;
+  REPLACE_FREXPL=0;
+  REPLACE_HUGE_VAL=0;
+  REPLACE_ISFINITE=0;
+  REPLACE_ISINF=0;
+  REPLACE_ISNAN=0;
+  REPLACE_LDEXPL=0;
+  REPLACE_NAN=0;
+  REPLACE_ROUND=0;
+  REPLACE_ROUNDF=0;
+  REPLACE_ROUNDL=0;
+  REPLACE_SIGNBIT=0;
+  REPLACE_SIGNBIT_USING_GCC=0;
+  REPLACE_TRUNC=0;
+  REPLACE_TRUNCF=0;
+  REPLACE_TRUNCL=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
+     on Cygwin 1.5.x.  */
+  if (MB_CUR_MAX == 1)
+    return 1;
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
+          # and CP932 is very different from EUC-JP, so we cannot use it here.
+          gt_cv_locale_ja=none
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the AIX locale name.
+          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_ja=ja_JP
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_ja=ja_JP.EUC-JP
+            else
+              # Test for the HP-UX, OSF/1, NetBSD locale name.
+              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_ja=ja_JP.eucJP
+              else
+                # Test for the IRIX, FreeBSD locale name.
+                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_ja=ja_JP.EUC
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_ja=ja
+                  else
+                    # Special test for NetBSD 1.6.
+                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+                      gt_cv_locale_ja=ja_JP.eucJP
+                    else
+                      # None found.
+                      gt_cv_locale_ja=none
+                    fi
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+  LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  /* Check whether a typical GB18030 multibyte sequence is recognized as a
+     single wide character.  This excludes the GB2312 and GBK encodings.  */
+  if (mblen ("\203\062\332\066", 5) != 4)
+    return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
+    else
+      # If there was a link error, due to mblen(), the system is so old that
+      # it certainly doesn't have a chinese locale.
+      gt_cv_locale_zh_CN=none
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+  GNULIB_MEMCHR=0;
+  GNULIB_MEMMEM=0;
+  GNULIB_MEMPCPY=0;
+  GNULIB_MEMRCHR=0;
+  GNULIB_RAWMEMCHR=0;
+  GNULIB_STPCPY=0;
+  GNULIB_STPNCPY=0;
+  GNULIB_STRCHRNUL=0;
+  GNULIB_STRDUP=0;
+  GNULIB_STRNCAT=0;
+  GNULIB_STRNDUP=0;
+  GNULIB_STRNLEN=0;
+  GNULIB_STRPBRK=0;
+  GNULIB_STRSEP=0;
+  GNULIB_STRSTR=0;
+  GNULIB_STRCASESTR=0;
+  GNULIB_STRTOK_R=0;
+  GNULIB_MBSLEN=0;
+  GNULIB_MBSNLEN=0;
+  GNULIB_MBSCHR=0;
+  GNULIB_MBSRCHR=0;
+  GNULIB_MBSSTR=0;
+  GNULIB_MBSCASECMP=0;
+  GNULIB_MBSNCASECMP=0;
+  GNULIB_MBSPCASECMP=0;
+  GNULIB_MBSCASESTR=0;
+  GNULIB_MBSCSPN=0;
+  GNULIB_MBSPBRK=0;
+  GNULIB_MBSSPN=0;
+  GNULIB_MBSSEP=0;
+  GNULIB_MBSTOK_R=0;
+  GNULIB_STRERROR=0;
+  GNULIB_STRERROR_R=0;
+  GNULIB_STRSIGNAL=0;
+  GNULIB_STRVERSCMP=0;
+  HAVE_MBSLEN=0;
+    HAVE_MEMCHR=1;
+  HAVE_DECL_MEMMEM=1;
+  HAVE_MEMPCPY=1;
+  HAVE_DECL_MEMRCHR=1;
+  HAVE_RAWMEMCHR=1;
+  HAVE_STPCPY=1;
+  HAVE_STPNCPY=1;
+  HAVE_STRCHRNUL=1;
+  HAVE_DECL_STRDUP=1;
+  HAVE_DECL_STRNDUP=1;
+  HAVE_DECL_STRNLEN=1;
+  HAVE_STRPBRK=1;
+  HAVE_STRSEP=1;
+  HAVE_STRCASESTR=1;
+  HAVE_DECL_STRTOK_R=1;
+  HAVE_DECL_STRERROR_R=1;
+  HAVE_DECL_STRSIGNAL=1;
+  HAVE_STRVERSCMP=1;
+  REPLACE_MEMCHR=0;
+  REPLACE_MEMMEM=0;
+  REPLACE_STPNCPY=0;
+  REPLACE_STRDUP=0;
+  REPLACE_STRSTR=0;
+  REPLACE_STRCASESTR=0;
+  REPLACE_STRERROR=0;
+  REPLACE_STRERROR_R=0;
+  REPLACE_STRNCAT=0;
+  REPLACE_STRNDUP=0;
+  REPLACE_STRNLEN=0;
+  REPLACE_STRSIGNAL=0;
+  REPLACE_STRTOK_R=0;
+  UNDEFINE_STRTOK_R=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+  # irrelevant for anonymous mappings.
+  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+  gl_have_mmap=yes
+else
+  gl_have_mmap=no
+fi
+
+
+  # Try to allow MAP_ANONYMOUS.
+  gl_have_mmap_anonymous=no
+  if test $gl_have_mmap = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+  gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    if test $gl_have_mmap_anonymous != yes; then
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+         gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+    if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+    fi
+  fi
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_memchr = yes; then
+    # Detect platform-specific bugs in some versions of glibc:
+    # memchr should not dereference anything with length 0
+    #   http://bugzilla.redhat.com/499689
+    # memchr should not dereference overestimated length after a match
+    #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+    #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
+    # Assume that memchr works on platforms that lack mprotect.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
+$as_echo_n "checking whether memchr works... " >&6; }
+if test "${gl_cv_func_memchr_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+         gl_cv_func_memchr_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <string.h>
+#if HAVE_SYS_MMAN_H
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+# ifndef MAP_FILE
+#  define MAP_FILE 0
+# endif
+#endif
+
+int
+main ()
+{
+
+  int result = 0;
+  char *fence = NULL;
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+  const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+  const int flags = MAP_FILE | MAP_PRIVATE;
+  int fd = open ("/dev/zero", O_RDONLY, 0666);
+  if (fd >= 0)
+# endif
+    {
+      int pagesize = getpagesize ();
+      char *two_pages =
+        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+                       flags, fd, 0);
+      if (two_pages != (char *)(-1)
+          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+        fence = two_pages + pagesize;
+    }
+#endif
+  if (fence)
+    {
+      if (memchr (fence, 0, 0))
+        result |= 1;
+      strcpy (fence - 9, "12345678");
+      if (memchr (fence - 9, 0, 79) != fence - 1)
+        result |= 2;
+      if (memchr (fence - 1, 0, 3) != fence - 1)
+        result |= 4;
+    }
+  return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_memchr_works=yes
+else
+  gl_cv_func_memchr_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
+$as_echo "$gl_cv_func_memchr_works" >&6; }
+    if test "$gl_cv_func_memchr_works" != yes; then
+      REPLACE_MEMCHR=1
+    fi
+  else
+    HAVE_MEMCHR=0
+  fi
+  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
+
+
+  for ac_header in bp-sym.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
+if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_BP_SYM_H 1
+_ACEOF
+
+fi
+
+done
+
+
+  fi
+
+
+      ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
+if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MEMRCHR $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+  GNULIB_MKTIME=0;
+  GNULIB_NANOSLEEP=0;
+  GNULIB_STRPTIME=0;
+  GNULIB_TIMEGM=0;
+  GNULIB_TIME_R=0;
+    HAVE_DECL_LOCALTIME_R=1;
+  HAVE_NANOSLEEP=1;
+  HAVE_STRPTIME=1;
+  HAVE_TIMEGM=1;
+        REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
+  REPLACE_MKTIME=GNULIB_PORTCHECK;
+  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
+  REPLACE_TIMEGM=GNULIB_PORTCHECK;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  # parse-datetime.y works with bison only.
+  : ${YACC='bison -y'}
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
+$as_echo_n "checking for compound literals... " >&6; }
+if test "${gl_cv_compound_literals+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+struct s { int i, j; };
+int
+main ()
+{
+struct s t = (struct s) { 3, 4 };
+        if (t.i != 0) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_compound_literals=yes
+else
+  gl_cv_compound_literals=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
+$as_echo "$gl_cv_compound_literals" >&6; }
+  if test $gl_cv_compound_literals = yes; then
+
+$as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
+
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test "${ac_cv_struct_tm+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+                                    int *p = &tm.tm_sec;
+                                    return !p;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_struct_tm=time.h
+else
+  ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+
+ ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
+"
+if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
+
+$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
+$as_echo_n "checking for long file names... " >&6; }
+if test "${ac_cv_sys_long_file_names+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_sys_long_file_names=yes
+# Test for long file names in all the places we know might matter:
+#      .               the current directory, where building will happen
+#      $prefix/lib     where we will be installing things
+#      $exec_prefix/lib        likewise
+#      $TMPDIR         if set, where it might want to write temporary files
+#      /tmp            where it might want to write temporary files
+#      /var/tmp                likewise
+#      /usr/tmp                likewise
+for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
+  # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
+  # in the usual case where exec_prefix is '${prefix}'.
+  case $ac_dir in #(
+    . | /* | ?:[\\/]*) ;; #(
+    *) continue;;
+  esac
+  test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
+  ac_xdir=$ac_dir/cf$$
+  (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
+  ac_tf1=$ac_xdir/conftest9012345
+  ac_tf2=$ac_xdir/conftest9012346
+  touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
+    ac_cv_sys_long_file_names=no
+  rm -f -r "$ac_xdir" 2>/dev/null
+  test $ac_cv_sys_long_file_names = no && break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
+$as_echo "$ac_cv_sys_long_file_names" >&6; }
+if test $ac_cv_sys_long_file_names = yes; then
+
+$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+# Check whether --with-selinux was given.
+if test "${with_selinux+set}" = set; then :
+  withval=$with_selinux;
+else
+  with_selinux=maybe
+fi
+
+
+  LIB_SELINUX=
+  if test "$with_selinux" != no; then
+    gl_save_LIBS=$LIBS
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
+$as_echo_n "checking for library containing setfilecon... " >&6; }
+if test "${ac_cv_search_setfilecon+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char setfilecon ();
+int
+main ()
+{
+return setfilecon ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' selinux; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_setfilecon=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_setfilecon+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_setfilecon+set}" = set; then :
+
+else
+  ac_cv_search_setfilecon=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
+$as_echo "$ac_cv_search_setfilecon" >&6; }
+ac_res=$ac_cv_search_setfilecon
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  test "$ac_cv_search_setfilecon" = "none required" ||
+                    LIB_SELINUX=$ac_cv_search_setfilecon
+fi
+
+    LIBS=$gl_save_LIBS
+  fi
+
+
+  # Warn if SELinux is found but libselinux is absent;
+  if test "$ac_cv_search_setfilecon" = no &&
+     test "$host" = "$build" && test -d /selinux; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
+$as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU findutils will be compiled without SELinux support." >&5
+$as_echo "$as_me: WARNING: GNU findutils will be compiled without SELinux support." >&2;}
+  fi
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_setenv" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SETENV $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_setenv = no; then
+    HAVE_DECL_SETENV=0
+  fi
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_setenv = no; then
+    HAVE_SETENV=0
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
+$as_echo_n "checking whether setenv validates arguments... " >&6; }
+if test "${gl_cv_func_setenv_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_setenv_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+       #include <stdlib.h>
+       #include <errno.h>
+       #include <string.h>
+
+int
+main ()
+{
+
+       int result = 0;
+       {
+         if (setenv ("", "", 0) != -1)
+           result |= 1;
+         else if (errno != EINVAL)
+           result |= 2;
+       }
+       {
+         if (setenv ("a", "=", 1) != 0)
+           result |= 4;
+         else if (strcmp (getenv ("a"), "=") != 0)
+           result |= 8;
+       }
+       return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_setenv_works=yes
+else
+  gl_cv_func_setenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
+$as_echo "$gl_cv_func_setenv_works" >&6; }
+    if test "$gl_cv_func_setenv_works" != yes; then
+      REPLACE_SETENV=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
+
+    fi
+  fi
+
+
+
+
+  :
+
+
+
+
+
+  for ac_header in search.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
+if test "x$ac_cv_header_search_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SEARCH_H 1
+_ACEOF
+
+fi
+
+done
+
+  for ac_func in tsearch
+do :
+  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
+if test "x$ac_cv_func_tsearch" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_TSEARCH 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
+$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
+if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      if test "$cross_compiling" = yes; then :
+
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
+           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on OpenBSD >= 3.9.
+           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+                                 gl_cv_func_snprintf_retval_c99="guessing no";;
+           openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.10.
+           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
+           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
+           aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_snprintf_retval_c99="guessing no";;
+           netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
+         esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+  strcpy (buf, "ABCDEF");
+  if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+    return 1;
+  if (snprintf (buf, 0, "%d %d", 4567, 89) != 7)
+    return 2;
+  if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
+    return 3;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_snprintf_retval_c99=yes
+else
+  gl_cv_func_snprintf_retval_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
+$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
+
+
+      ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF $ac_have_decl
+_ACEOF
+
+
+
+    HAVE_STRCASECMP=1;
+  HAVE_DECL_STRNCASECMP=1;
+
+
+
+
+
+
+
+  for ac_func in strcasestr
+do :
+  ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
+if test "x$ac_cv_func_strcasestr" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRCASESTR 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_strcasestr = no; then
+    HAVE_STRCASESTR=0
+  else
+    if test "$gl_cv_func_memchr_works" != yes; then
+      REPLACE_STRCASESTR=1
+    else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5
+$as_echo_n "checking whether strcasestr works... " >&6; }
+if test "${gl_cv_func_strcasestr_works_always+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+                                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strcasestr_works_always=yes
+else
+  gl_cv_func_strcasestr_works_always="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <string.h> /* for strcasestr */
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
+
+int
+main ()
+{
+return !!strcasestr (HAYSTACK, NEEDLE);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strcasestr_works_always=yes
+else
+  gl_cv_func_strcasestr_works_always=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5
+$as_echo "$gl_cv_func_strcasestr_works_always" >&6; }
+      if test "$gl_cv_func_strcasestr_works_always" != yes; then
+        REPLACE_STRCASESTR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
+
+      fi
+    fi
+  fi
+  if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strdup" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRDUP $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+  if test -z "$ERRNO_H"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
+$as_echo_n "checking for working strerror function... " >&6; }
+if test "${gl_cv_func_working_strerror+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+int
+main ()
+{
+return !*strerror (-2);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_working_strerror=yes
+else
+  gl_cv_func_working_strerror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+int
+main ()
+{
+return !*strerror (-2);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_working_strerror=yes
+else
+  gl_cv_func_working_strerror=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
+$as_echo "$gl_cv_func_working_strerror" >&6; }
+    if test $gl_cv_func_working_strerror = no; then
+                  REPLACE_STRERROR=1
+    fi
+  else
+            REPLACE_STRERROR=1
+  fi
+  if test $REPLACE_STRERROR = 1; then
+
+  ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR $ac_have_decl
+_ACEOF
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_header_sys_socket_h != yes; then
+                    for ac_header in winsock2.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_WINSOCK2_H 1
+_ACEOF
+
+fi
+
+done
+
+  fi
+
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_string_h='<'string.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
+$as_echo_n "checking absolute name of <string.h>... " >&6; }
+if test "${gl_cv_next_string_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/string.h#{
+                    s#.*"\(.*/string.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
+$as_echo "$gl_cv_next_string_h" >&6; }
+     fi
+     NEXT_STRING_H=$gl_cv_next_string_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'string.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_string_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
+
+
+
+
+
+
+    for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup      strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r      strsignal strverscmp; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_strings_h='<'strings.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
+$as_echo_n "checking absolute name of <strings.h>... " >&6; }
+if test "${gl_cv_next_strings_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_strings_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <strings.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/strings.h#{
+                    s#.*"\(.*/strings.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_strings_h='<'strings.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
+$as_echo "$gl_cv_next_strings_h" >&6; }
+     fi
+     NEXT_STRINGS_H=$gl_cv_next_strings_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'strings.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_strings_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
+
+
+
+
+
+
+    for gl_func in strcasecmp strncasecmp; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <strings.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+
+      ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strndup" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNDUP $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNLEN $ac_have_decl
+_ACEOF
+
+
+
+
+
+  if test "$gl_cv_func_memchr_works" != yes; then
+    REPLACE_STRSTR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
+
+  else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
+$as_echo_n "checking whether strstr works... " >&6; }
+if test "${gl_cv_func_strstr_works_always+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+                                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strstr_works_always=yes
+else
+  gl_cv_func_strstr_works_always="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <string.h> /* for strstr */
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
+
+int
+main ()
+{
+return !!strstr (HAYSTACK, NEEDLE);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strstr_works_always=yes
+else
+  gl_cv_func_strstr_works_always=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
+$as_echo "$gl_cv_func_strstr_works_always" >&6; }
+    if test "$gl_cv_func_strstr_works_always" != yes; then
+      REPLACE_STRSTR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
+
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
+$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
+if test "${ac_cv_header_stat_broken+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined S_ISBLK && defined S_IFDIR
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+#endif
+
+#if defined S_ISBLK && defined S_IFCHR
+extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+#endif
+
+#if defined S_ISLNK && defined S_IFREG
+extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+#endif
+
+#if defined S_ISSOCK && defined S_IFREG
+extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stat_broken=no
+else
+  ac_cv_header_stat_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
+$as_echo "$ac_cv_header_stat_broken" >&6; }
+if test $ac_cv_header_stat_broken = yes; then
+
+$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+  GNULIB_WAITPID=0;
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
+$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timespec_in_time_h=yes
+else
+  gl_cv_sys_struct_timespec_in_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
+
+  TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+    TIME_H_DEFINES_STRUCT_TIMESPEC=1
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
+$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timespec_in_sys_time_h=yes
+else
+  gl_cv_sys_struct_timespec_in_sys_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
+    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
+$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timespec_in_pthread_h=yes
+else
+  gl_cv_sys_struct_timespec_in_pthread_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
+      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
+        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+      fi
+    fi
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_time_h='<'time.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
+$as_echo_n "checking absolute name of <time.h>... " >&6; }
+if test "${gl_cv_next_time_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/time.h#{
+                    s#.*"\(.*/time.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
+$as_echo "$gl_cv_next_time_h" >&6; }
+     fi
+     NEXT_TIME_H=$gl_cv_next_time_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'time.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_time_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_LOCALTIME_R $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+
+
+  if test "$HAVE_LIBUNISTRING" = yes; then
+    LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
+    LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
+    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
+  fi
+
+
+      ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_UNSETENV $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_header_features_h = yes; then
+    HAVE_FEATURES_H=1
+  else
+    HAVE_FEATURES_H=0
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if test "${gl_cv_header_inttypes_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <inttypes.h>
+
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_inttypes_h=yes
+else
+  gl_cv_header_inttypes_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
+$as_echo "$gl_cv_header_inttypes_h" >&6; }
+  if test $gl_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
+_ACEOF
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
+$as_echo_n "checking for stdint.h... " >&6; }
+if test "${gl_cv_header_stdint_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <stdint.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_stdint_h=yes
+else
+  gl_cv_header_stdint_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
+$as_echo "$gl_cv_header_stdint_h" >&6; }
+  if test $gl_cv_header_stdint_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
+$as_echo_n "checking for intmax_t... " >&6; }
+if test "${gt_cv_c_intmax_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+
+int
+main ()
+{
+intmax_t x = -1; return !x;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_intmax_t=yes
+else
+  gt_cv_c_intmax_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
+$as_echo "$gt_cv_c_intmax_t" >&6; }
+  if test $gt_cv_c_intmax_t = yes; then
+
+$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+
+  else
+
+    test $ac_cv_type_long_long_int = yes \
+      && ac_type='long long' \
+      || ac_type='long'
+
+cat >>confdefs.h <<_ACEOF
+#define intmax_t $ac_type
+_ACEOF
+
+  fi
+
+
+
+
+
+
+
+  for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+      ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl__snprintf" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__SNPRINTF $ac_have_decl
+_ACEOF
+
+
+  case "$gl_cv_func_snprintf_retval_c99" in
+    *yes)
+
+$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
+
+      ;;
+  esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
+$as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
+if test "${gl_cv_func_ungetc_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_ungetc_works='guessing no'
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+
+int
+main ()
+{
+FILE *f;
+           if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
+           if (fputs ("abc", f) < 0) return 2;
+           rewind (f);
+           if (fgetc (f) != 'a') return 3;
+           if (fgetc (f) != 'b') return 4;
+           if (ungetc ('d', f) != 'd') return 5;
+           if (ftell (f) != 1) return 6;
+           if (fgetc (f) != 'd') return 7;
+           if (ftell (f) != 2) return 8;
+           if (fseek (f, 0, SEEK_CUR) != 0) return 9;
+           if (ftell (f) != 2) return 10;
+           if (fgetc (f) != 'c') return 11;
+           fclose (f); remove ("conftest.tmp");
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_ungetc_works=yes
+else
+  gl_cv_func_ungetc_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
+$as_echo "$gl_cv_func_ungetc_works" >&6; }
+  if test "$gl_cv_func_ungetc_works" != yes; then
+
+$as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
+if test "x$ac_cv_type_off_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define off_t long int
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if test "${gt_cv_val_LC_MESSAGES+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_val_LC_MESSAGES=yes
+else
+  gt_cv_val_LC_MESSAGES=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
+$as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
+  if test $gt_cv_val_LC_MESSAGES = yes; then
+
+$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
+
+  fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <CoreFoundation/CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+  gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+  fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <CoreFoundation/CFLocale.h>
+int
+main ()
+{
+CFLocaleCopyCurrent();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_CFLocaleCopyCurrent=yes
+else
+  gt_cv_func_CFLocaleCopyCurrent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
+
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+
+
+
+      if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${acl_cv_path_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+        test "$with_gnu_ld" != no && break ;;
+      *)
+        test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${acl_cv_prog_gnu_ld+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if test "${acl_cv_rpath+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+  enableval=$enable_rpath; :
+else
+  enable_rpath=yes
+fi
+
+
+
+
+  acl_libdirstem=lib
+  acl_libdirstem2=
+  case "$host_os" in
+    solaris*)
+                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
+$as_echo_n "checking for 64-bit host... " >&6; }
+if test "${gl_cv_solaris_64bit+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef _LP64
+sixtyfour bits
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
+  gl_cv_solaris_64bit=yes
+else
+  gl_cv_solaris_64bit=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
+$as_echo "$gl_cv_solaris_64bit" >&6; }
+      if test $gl_cv_solaris_64bit = yes; then
+        acl_libdirstem=lib/64
+        case "$host_cpu" in
+          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
+          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+        esac
+      fi
+      ;;
+    *)
+      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+      if test -n "$searchpath"; then
+        acl_save_IFS="${IFS=   }"; IFS=":"
+        for searchdir in $searchpath; do
+          if test -d "$searchdir"; then
+            case "$searchdir" in
+              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+              */../ | */.. )
+                # Better ignore directories of this form. They are misleading.
+                ;;
+              *) searchdir=`cd "$searchdir" && pwd`
+                 case "$searchdir" in
+                   */lib64 ) acl_libdirstem=lib64 ;;
+                 esac ;;
+            esac
+          fi
+        done
+        IFS="$acl_save_IFS"
+      fi
+      ;;
+  esac
+  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+
+
+
+  gl_threads_api=none
+  LIBTHREAD=
+  LTLIBTHREAD=
+  LIBMULTITHREAD=
+  LTLIBMULTITHREAD=
+  if test "$gl_use_threads" != no; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
+$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
+if test "${gl_cv_have_weak+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_have_weak=no
+              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern void xyzzy ();
+#pragma weak xyzzy
+int
+main ()
+{
+xyzzy();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_have_weak=maybe
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       if test $gl_cv_have_weak = maybe; then
+                           if test "$cross_compiling" = yes; then :
+                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __ELF__
+               Extensible Linking Format
+               #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
+  gl_cv_have_weak="guessing yes"
+else
+  gl_cv_have_weak="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+  return (fputs == NULL);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_have_weak=yes
+else
+  gl_cv_have_weak=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+       fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
+$as_echo "$gl_cv_have_weak" >&6; }
+    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+      # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+      # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
+      ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = x""yes; then :
+  gl_have_pthread_h=yes
+else
+  gl_have_pthread_h=no
+fi
+
+
+      if test "$gl_have_pthread_h" = yes; then
+        # Other possible tests:
+        #   -lpthreads (FSU threads, PCthreads)
+        #   -lgthreads
+        gl_have_pthread=
+        # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+        # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+        # the second one only in libpthread, and lock.c needs it.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+pthread_mutex_lock((pthread_mutex_t*)0);
+               pthread_mutexattr_init((pthread_mutexattr_t*)0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_have_pthread=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+        # since it is defined as a macro on OSF/1.)
+        if test -n "$gl_have_pthread"; then
+          # The program links fine without libpthread. But it may actually
+          # need to link with libpthread in order to create multiple threads.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
+if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_kill=yes
+else
+  ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then :
+  LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             case "$host_os" in
+               solaris* | hpux*)
+
+$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
+
+             esac
+
+fi
+
+        else
+          # Some library is needed. Try libpthread and libc_r.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
+if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_kill=yes
+else
+  ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then :
+  gl_have_pthread=yes
+             LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+             LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+fi
+
+          if test -z "$gl_have_pthread"; then
+            # For FreeBSD 4.
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
+$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
+if test "${ac_cv_lib_c_r_pthread_kill+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_kill=yes
+else
+  ac_cv_lib_c_r_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_kill" = x""yes; then :
+  gl_have_pthread=yes
+               LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+               LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
+fi
+
+          fi
+        fi
+        if test -n "$gl_have_pthread"; then
+          gl_threads_api=posix
+
+$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
+
+          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+
+$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
+
+              LIBTHREAD=
+              LTLIBTHREAD=
+            fi
+          fi
+        fi
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+        gl_have_solaristhread=
+        gl_save_LIBS="$LIBS"
+        LIBS="$LIBS -lthread"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <thread.h>
+#include <synch.h>
+
+int
+main ()
+{
+thr_self();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_have_solaristhread=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LIBS="$gl_save_LIBS"
+        if test -n "$gl_have_solaristhread"; then
+          gl_threads_api=solaris
+          LIBTHREAD=-lthread
+          LTLIBTHREAD=-lthread
+          LIBMULTITHREAD="$LIBTHREAD"
+          LTLIBMULTITHREAD="$LTLIBTHREAD"
+
+$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
+
+          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+
+$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
+
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      fi
+    fi
+    if test "$gl_use_threads" = pth; then
+      gl_save_CPPFLAGS="$CPPFLAGS"
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
+$as_echo_n "checking how to link with libpth... " >&6; }
+if test "${ac_cv_libpth_libs+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libpth-prefix was given.
+if test "${with_libpth_prefix+set}" = set; then :
+  withval=$with_libpth_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
+
+fi
+
+      LIBPTH=
+  LTLIBPTH=
+  INCPTH=
+  LIBPTH_PREFIX=
+      HAVE_LIBPTH=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='pth '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBPTH; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                                LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBPTH; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
+              else
+                                                LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'pth'; then
+                  LIBPTH_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'pth'; then
+                  LIBPTH_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCPTH; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBPTH; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBPTH; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
+                    LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
+            LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
+    done
+  fi
+
+
+
+
+
+
+    ac_cv_libpth_libs="$LIBPTH"
+    ac_cv_libpth_ltlibs="$LTLIBPTH"
+    ac_cv_libpth_cppflags="$INCPTH"
+    ac_cv_libpth_prefix="$LIBPTH_PREFIX"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
+$as_echo "$ac_cv_libpth_libs" >&6; }
+  LIBPTH="$ac_cv_libpth_libs"
+  LTLIBPTH="$ac_cv_libpth_ltlibs"
+  INCPTH="$ac_cv_libpth_cppflags"
+  LIBPTH_PREFIX="$ac_cv_libpth_prefix"
+
+  for element in $INCPTH; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+
+
+
+      HAVE_LIBPTH=yes
+
+
+
+      gl_have_pth=
+      gl_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBPTH"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pth.h>
+int
+main ()
+{
+pth_self();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_have_pth=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+      LIBS="$gl_save_LIBS"
+      if test -n "$gl_have_pth"; then
+        gl_threads_api=pth
+        LIBTHREAD="$LIBPTH"
+        LTLIBTHREAD="$LTLIBPTH"
+        LIBMULTITHREAD="$LIBTHREAD"
+        LTLIBMULTITHREAD="$LTLIBTHREAD"
+
+$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
+
+        if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+
+$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
+
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      else
+        CPPFLAGS="$gl_save_CPPFLAGS"
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
+        if { case "$host_os" in
+               mingw*) true;;
+               *) false;;
+             esac
+           }; then
+          gl_threads_api=win32
+
+$as_echo "#define USE_WIN32_THREADS 1" >>confdefs.h
+
+        fi
+      fi
+    fi
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
+$as_echo_n "checking for multithread API to use... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
+$as_echo "$gl_threads_api" >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
+if test "x$ac_cv_have_decl_alarm" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ALARM $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+   if false; then
+  GL_COND_LIBTOOL_TRUE=
+  GL_COND_LIBTOOL_FALSE='#'
+else
+  GL_COND_LIBTOOL_TRUE='#'
+  GL_COND_LIBTOOL_FALSE=
+fi
+
+  gl_cond_libtool=false
+  gl_libdeps=
+  gl_ltlibdeps=
+  gl_m4_base='gnulib/m4'
+
+
+
+
+
+
+
+
+
+  gl_source_base='gnulib/lib'
+  # Code from module alloca:
+  # Code from module alloca-opt:
+
+
+  if test $ac_cv_func_alloca_works = no; then
+    :
+  fi
+
+  # Define an additional variable used in the Makefile substitution.
+  if test $ac_cv_working_alloca_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
+$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
+if test "${gl_cv_rpl_alloca+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+        Need own alloca
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Need own alloca" >/dev/null 2>&1; then :
+  gl_cv_rpl_alloca=yes
+else
+  gl_cv_rpl_alloca=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
+$as_echo "$gl_cv_rpl_alloca" >&6; }
+    if test $gl_cv_rpl_alloca = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+      ALLOCA_H=alloca.h
+    else
+                  ALLOCA_H=
+    fi
+  else
+    ALLOCA_H=alloca.h
+  fi
+
+
+  # Code from module areadlink:
+  # Code from module areadlink-with-size:
+  # Code from module areadlinkat:
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_AREADLINKAT 1
+_ACEOF
+
+
+  # Code from module arg-nonnull:
+  # Code from module argmatch:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS argmatch.$ac_objext"
+
+
+  # Code from module assert:
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
+$as_echo_n "checking whether to enable assertions... " >&6; }
+  # Check whether --enable-assert was given.
+if test "${enable_assert+set}" = set; then :
+  enableval=$enable_assert; if test "x$enableval" = xno; then :
+
+$as_echo "#define NDEBUG 1" >>confdefs.h
+
+elif test "x$enableval" != xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
+$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
+      enable_assert=yes
+fi
+else
+  enable_assert=yes
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
+$as_echo "$enable_assert" >&6; }
+
+  # Code from module bitrotate:
+
+  # Code from module btowc:
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_btowc = no; then
+    HAVE_BTOWC=0
+  else
+
+
+
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
+$as_echo_n "checking whether btowc(0) is correct... " >&6; }
+if test "${gl_cv_func_btowc_nul+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        if test "$cross_compiling" = yes; then :
+
+           case "$host_os" in
+                      # Guess no on Cygwin.
+             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
+                      # Guess yes otherwise.
+             *)       gl_cv_func_btowc_nul="guessing yes" ;;
+           esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (btowc ('\0') != 0)
+    return 1;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_btowc_nul=yes
+else
+  gl_cv_func_btowc_nul=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
+$as_echo "$gl_cv_func_btowc_nul" >&6; }
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
+$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
+if test "${gl_cv_func_btowc_eof+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                        case "$host_os" in
+                 # Guess no on IRIX.
+          irix*) gl_cv_func_btowc_eof="guessing no" ;;
+                 # Guess yes otherwise.
+          *)     gl_cv_func_btowc_eof="guessing yes" ;;
+        esac
+        if test $LOCALE_FR != none; then
+          if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      if (btowc (EOF) != WEOF)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_btowc_eof=yes
+else
+  gl_cv_func_btowc_eof=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+        fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
+$as_echo "$gl_cv_func_btowc_eof" >&6; }
+
+    case "$gl_cv_func_btowc_nul" in
+      *yes) ;;
+      *) REPLACE_BTOWC=1 ;;
+    esac
+    case "$gl_cv_func_btowc_eof" in
+      *yes) ;;
+      *) REPLACE_BTOWC=1 ;;
+    esac
+  fi
+  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+
+    :
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_BTOWC=1
+
+
+
+$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
+
+
+
+  # Code from module c++defs:
+  # Code from module c-ctype:
+  # Code from module c-strcase:
+  # Code from module c-strcasestr:
+  # Code from module c-strstr:
+  # Code from module canonicalize:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS canonicalize.$ac_objext"
+
+
+
+
+  :
+
+
+
+
+
+
+
+  if test $ac_cv_func_canonicalize_file_name = no; then
+    HAVE_CANONICALIZE_FILE_NAME=0
+  elif test "$gl_cv_func_realpath_works" != yes; then
+    REPLACE_CANONICALIZE_FILE_NAME=1
+  fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_CANONICALIZE 1
+_ACEOF
+
+
+
+
+$as_echo "#define GNULIB_TEST_CANONICALIZE 1" >>confdefs.h
+
+
+
+
+
+  GNULIB_CANONICALIZE_FILE_NAME=1
+
+
+
+$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
+
+
+
+  # Code from module chdir-long:
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
+$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
+if test "${gl_cv_have_arbitrary_file_name_length_limit+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+#include <limits.h>
+#if defined PATH_MAX || defined MAXPATHLEN
+have_arbitrary_file_name_length_limit
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
+  gl_cv_have_arbitrary_file_name_length_limit=yes
+else
+  gl_cv_have_arbitrary_file_name_length_limit=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
+$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
+
+  if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
+
+
+
+  :
+
+  fi
+
+  # Code from module chown:
+
+
+
+
+  GNULIB_CHOWN=1
+
+
+
+$as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
+
+
+
+  # Code from module clock-time:
+
+
+
+  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
+  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+
+  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
+  # programs in the package would end up linked with that potentially-shared
+  # library, inducing unnecessary run-time overhead.
+  LIB_CLOCK_GETTIME=
+
+  gl_saved_libs=$LIBS
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if test "${ac_cv_search_clock_gettime+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' rt posix4; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_clock_gettime+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_clock_gettime+set}" = set; then :
+
+else
+  ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  test "$ac_cv_search_clock_gettime" = "none required" ||
+                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
+fi
+
+    for ac_func in clock_gettime clock_settime
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+  LIBS=$gl_saved_libs
+
+  # Code from module cloexec:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS cloexec.$ac_objext"
+
+
+
+
+$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
+
+
+  # Code from module close:
+
+
+
+
+
+
+  GNULIB_CLOSE=1
+
+
+
+$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
+
+
+
+  # Code from module close-hook:
+  # Code from module close-stream:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS close-stream.$ac_objext"
+
+
+    :
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_CLOSE_STREAM 1
+_ACEOF
+
+
+  # Code from module closein:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS closein.$ac_objext"
+
+
+    :
+
+  # Code from module closeout:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS closeout.$ac_objext"
+
+
+    :
+
+  # Code from module configmake:
+
+          if test "x$datarootdir" = x; then
+    datarootdir='${datadir}'
+
+  fi
+    if test "x$docdir" = x; then
+    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+
+  fi
+    if test "x$htmldir" = x; then
+    htmldir='${docdir}'
+
+  fi
+  if test "x$dvidir" = x; then
+    dvidir='${docdir}'
+
+  fi
+  if test "x$pdfdir" = x; then
+    pdfdir='${docdir}'
+
+  fi
+  if test "x$psdir" = x; then
+    psdir='${docdir}'
+
+  fi
+  if test "x$lispdir" = x; then
+    lispdir='${datarootdir}/emacs/site-lisp'
+
+  fi
+  if test "x$localedir" = x; then
+    localedir='${datarootdir}/locale'
+
+  fi
+
+      pkglibexecdir='${libexecdir}/${PACKAGE}'
+
+
+  # Code from module ctype:
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_ctype_h='<'ctype.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
+$as_echo_n "checking absolute name of <ctype.h>... " >&6; }
+if test "${gl_cv_next_ctype_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_ctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/ctype.h#{
+                    s#.*"\(.*/ctype.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
+$as_echo "$gl_cv_next_ctype_h" >&6; }
+     fi
+     NEXT_CTYPE_H=$gl_cv_next_ctype_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'ctype.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_ctype_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
+
+
+
+
+
+
+    for gl_func in isblank; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module cycle-check:
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS cycle-check.$ac_objext"
+
+
+  # Code from module d-ino:
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
+$as_echo_n "checking for d_ino member in directory struct... " >&6; }
+if test "${gl_cv_struct_dirent_d_ino+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_struct_dirent_d_ino=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+             #include <sys/stat.h>
+             #include <dirent.h>
+
+int
+main ()
+{
+DIR *dp = opendir (".");
+             struct dirent *e;
+             struct stat st;
+             if (! dp)
+               return 1;
+             e = readdir (dp);
+             if (! e)
+               return 2;
+             if (stat (e->d_name, &st) != 0)
+               return 3;
+             if (e->d_ino != st.st_ino)
+               return 4;
+             return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_struct_dirent_d_ino=yes
+else
+  gl_cv_struct_dirent_d_ino=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
+$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
+   if test $gl_cv_struct_dirent_d_ino = yes; then
+
+$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
+
+   fi
+
+
+  # Code from module d-type:
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
+$as_echo_n "checking for d_type member in directory struct... " >&6; }
+if test "${gl_cv_struct_dirent_d_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <dirent.h>
+
+int
+main ()
+{
+struct dirent dp; dp.d_type = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_struct_dirent_d_type=yes
+else
+  gl_cv_struct_dirent_d_type=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
+$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
+   if test $gl_cv_struct_dirent_d_type = yes; then
+
+$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
+
+   fi
+
+
+  # Code from module dev-ino:
+  # Code from module dirent:
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_dirent_h='<'dirent.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
+$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
+if test "${gl_cv_next_dirent_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_dirent_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <dirent.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/dirent.h#{
+                    s#.*"\(.*/dirent.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_dirent_h='<'dirent.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
+$as_echo "$gl_cv_next_dirent_h" >&6; }
+     fi
+     NEXT_DIRENT_H=$gl_cv_next_dirent_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'dirent.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_dirent_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
+
+
+
+
+
+
+    for gl_func in alphasort dirfd fdopendir scandir; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <dirent.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module dirent-safer:
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS opendir-safer.$ac_objext"
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_DIRENT_SAFER 1
+_ACEOF
+
+
+  # Code from module dirfd:
+
+
+
+    :
+
+
+
+
+  for ac_func in dirfd
+do :
+  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
+if test "x$ac_cv_func_dirfd" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DIRFD 1
+_ACEOF
+
+fi
+done
+
+  ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
+     #include <dirent.h>
+"
+if test "x$ac_cv_have_decl_dirfd" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_DIRFD $ac_have_decl
+_ACEOF
+
+  if test $ac_cv_have_decl_dirfd = no; then
+    HAVE_DECL_DIRFD=0
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
+$as_echo_n "checking whether dirfd is a macro... " >&6; }
+if test "${gl_cv_func_dirfd_macro+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <dirent.h>
+#ifdef dirfd
+ dirent_header_defines_dirfd
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
+  gl_cv_func_dirfd_macro=yes
+else
+  gl_cv_func_dirfd_macro=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
+$as_echo "$gl_cv_func_dirfd_macro" >&6; }
+
+  # Use the replacement only if we have no function or macro with that name.
+  if test $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro = no,no; then
+    if test $ac_cv_have_decl_dirfd = yes; then
+      # If the system declares dirfd already, let's declare rpl_dirfd instead.
+      REPLACE_DIRFD=1
+    fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
+$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
+if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        dirfd_save_CFLAGS=$CFLAGS
+        for ac_expr in d_fd dd_fd; do
+
+          CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+             #include <sys/types.h>
+             #include <dirent.h>
+int
+main ()
+{
+DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  dir_fd_found=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+          CFLAGS=$dirfd_save_CFLAGS
+          test "$dir_fd_found" = yes && break
+        done
+        test "$dir_fd_found" = yes || ac_expr=no_such_member
+
+        gl_cv_sys_dir_fd_member_name=$ac_expr
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
+$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
+    if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
+
+cat >>confdefs.h <<_ACEOF
+#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
+_ACEOF
+
+    fi
+
+  fi
+
+
+
+
+  GNULIB_DIRFD=1
+
+
+
+$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
+
+
+
+  # Code from module dirname:
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS basename.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS dirname.$ac_objext"
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_DIRNAME 1
+_ACEOF
+
+
+  # Code from module dirname-lgpl:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext"
+
+
+
+
+
+  # Code from module dosname:
+  # Code from module double-slash-root:
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+$as_echo_n "checking whether // is distinct from /... " >&6; }
+if test "${gl_cv_double_slash_root+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+   if test x"$cross_compiling" = xyes ; then
+        # When cross-compiling, there is no way to tell whether // is special
+        # short of a list of hosts.  However, the only known hosts to date
+        # that have a distinct // are Apollo DomainOS (too old to port to),
+        # Cygwin, and z/OS.  If anyone knows of another system for which // has
+        # special semantics and is distinct from /, please report it to
+        # <bug-gnulib@gnu.org>.
+        case $host in
+          *-cygwin | i370-ibm-openedition)
+            gl_cv_double_slash_root=yes ;;
+          *)
+            # Be optimistic and assume that / and // are the same when we
+            # don't know.
+            gl_cv_double_slash_root='unknown, assuming no' ;;
+        esac
+      else
+        set x `ls -di / // 2>/dev/null`
+        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
+          gl_cv_double_slash_root=no
+        else
+          gl_cv_double_slash_root=yes
+        fi
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+$as_echo "$gl_cv_double_slash_root" >&6; }
+  if test "$gl_cv_double_slash_root" = yes; then
+
+$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+
+  fi
+
+  # Code from module dup2:
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+  if test $ac_cv_func_dup2 = no; then
+    HAVE_DUP2=0
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
+
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
+$as_echo_n "checking whether dup2 works... " >&6; }
+if test "${gl_cv_func_dup2_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+           mingw*) # on this platform, dup2 always returns 0 for success
+             gl_cv_func_dup2_works=no;;
+           cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+             gl_cv_func_dup2_works=no;;
+           linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
+                   # closed fd may yield -EBADF instead of -1 / errno=EBADF.
+             gl_cv_func_dup2_works=no;;
+           freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
+             gl_cv_func_dup2_works=no;;
+           haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
+             gl_cv_func_dup2_works=no;;
+           *) gl_cv_func_dup2_works=yes;;
+         esac
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+         #include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+int
+main ()
+{
+int result = 0;
+#if HAVE_FCNTL
+            if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
+              result |= 1;
+#endif HAVE_FCNTL
+            if (dup2 (1, 1) == 0)
+              result |= 2;
+#if HAVE_FCNTL
+            if (fcntl (1, F_GETFD) != FD_CLOEXEC)
+              result |= 4;
+#endif
+            close (0);
+            if (dup2 (0, 0) != -1)
+              result |= 8;
+            /* Many gnulib modules require POSIX conformance of EBADF.  */
+            if (dup2 (2, 1000000) == -1 && errno != EBADF)
+              result |= 16;
+            return result;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_dup2_works=yes
+else
+  gl_cv_func_dup2_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
+$as_echo "$gl_cv_func_dup2_works" >&6; }
+    if test "$gl_cv_func_dup2_works" = no; then
+
+
+  if test $ac_cv_func_dup2 = yes; then
+    REPLACE_DUP2=1
+  fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
+
+
+    fi
+  fi
+
+
+
+
+  GNULIB_DUP2=1
+
+
+
+$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
+
+
+
+  # Code from module environ:
+
+
+
+
+  GNULIB_ENVIRON=1
+
+
+
+$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
+
+
+
+  # Code from module errno:
+
+  # Code from module error:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
+$as_echo_n "checking for error_at_line... " >&6; }
+if test "${ac_cv_lib_error_at_line+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <error.h>
+int
+main ()
+{
+error_at_line (0, 0, "", 0, "an error occurred");
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_error_at_line=yes
+else
+  ac_cv_lib_error_at_line=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
+$as_echo "$ac_cv_lib_error_at_line" >&6; }
+  if test $ac_cv_lib_error_at_line = no; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
+
+  fi
+
+
+
+
+  :
+
+
+
+
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
+
+
+
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
+
+  # Code from module euidaccess:
+
+
+
+
+
+
+
+
+
+
+
+
+
+  for ac_func in euidaccess
+do :
+  ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
+if test "x$ac_cv_func_euidaccess" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_EUIDACCESS 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+  if test $ac_cv_func_euidaccess = no; then
+    HAVE_EUIDACCESS=0
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+  # Solaris 9 needs -lgen to get the eaccess function.
+  # Save and restore LIBS so -lgen isn't added to it.  Otherwise, *all*
+  # programs in the package would end up linked with that potentially-shared
+  # library, inducing unnecessary run-time overhead.
+  LIB_EACCESS=
+
+  gl_saved_libs=$LIBS
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
+$as_echo_n "checking for library containing eaccess... " >&6; }
+if test "${ac_cv_search_eaccess+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char eaccess ();
+int
+main ()
+{
+return eaccess ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' gen; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_eaccess=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_eaccess+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_eaccess+set}" = set; then :
+
+else
+  ac_cv_search_eaccess=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
+$as_echo "$ac_cv_search_eaccess" >&6; }
+ac_res=$ac_cv_search_eaccess
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  test "$ac_cv_search_eaccess" = "none required" ||
+                    LIB_EACCESS=$ac_cv_search_eaccess
+fi
+
+    for ac_func in eaccess
+do :
+  ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
+if test "x$ac_cv_func_eaccess" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_EACCESS 1
+_ACEOF
+
+fi
+done
+
+  LIBS=$gl_saved_libs
+
+  fi
+
+
+
+
+  GNULIB_EUIDACCESS=1
+
+
+
+$as_echo "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h
+
+
+
+  # Code from module exitfail:
+  # Code from module extensions:
+  # Code from module faccessat:
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_faccessat = no; then
+    HAVE_FACCESSAT=0
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
+
+  fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_FACCESSAT 1
+_ACEOF
+
+
+
+
+
+  GNULIB_FACCESSAT=1
+
+
+
+$as_echo "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h
+
+
+
+  # Code from module fchdir:
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_fchdir = no; then
+    HAVE_DECL_FCHDIR=0
+  fi
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_fchdir = no; then
+    HAVE_FCHDIR=0
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
+
+    :
+
+$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
+
+                REPLACE_OPENDIR=1
+    REPLACE_CLOSEDIR=1
+    REPLACE_DUP=1
+
+
+  REPLACE_OPEN=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
+
+
+
+
+  :
+
+
+
+
+  REPLACE_CLOSE=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
+
+
+
+  REPLACE_FCLOSE=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
+
+
+
+
+
+  if test $ac_cv_func_dup2 = yes; then
+    REPLACE_DUP2=1
+  fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_fcntl = no; then
+    HAVE_FCNTL=0
+  else
+    REPLACE_FCNTL=1
+  fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
+
+
+
+    :
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
+$as_echo_n "checking whether open can visit directories... " >&6; }
+if test "${gl_cv_func_open_directory_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_open_directory_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <fcntl.h>
+
+int
+main ()
+{
+return open(".", O_RDONLY) < 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_open_directory_works=yes
+else
+  gl_cv_func_open_directory_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
+$as_echo "$gl_cv_func_open_directory_works" >&6; }
+    if test "$gl_cv_func_open_directory_works" != yes; then
+
+$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
+
+      REPLACE_FSTAT=1
+    fi
+  fi
+
+
+
+
+  GNULIB_FCHDIR=1
+
+
+
+$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
+
+
+
+  # Code from module fclose:
+
+
+
+
+
+  GNULIB_FCLOSE=1
+
+
+
+$as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
+
+
+
+  # Code from module fcntl:
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_fcntl = no; then
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_fcntl = no; then
+    HAVE_FCNTL=0
+  else
+    REPLACE_FCNTL=1
+  fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
+
+
+  else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
+$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
+if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  # Guess that it works on glibc systems
+          case $host_os in #((
+            *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
+            *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+          esac
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <fcntl.h>
+#include <errno.h>
+
+int
+main ()
+{
+int result = 0;
+      if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
+      if (errno != EINVAL) result |= 2;
+      return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fcntl_f_dupfd_works=yes
+else
+  gl_cv_func_fcntl_f_dupfd_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
+$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
+    case $gl_cv_func_fcntl_f_dupfd_works in
+      *yes) ;;
+      *)
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_fcntl = no; then
+    HAVE_FCNTL=0
+  else
+    REPLACE_FCNTL=1
+  fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
+
+
+
+$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
+ ;;
+    esac
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
+$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
+if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <fcntl.h>
+#ifndef F_DUPFD_CLOEXEC
+choke me
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+   it to support the semantics on older kernels that failed with EINVAL.  */
+choke me
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_fcntl_f_dupfd_cloexec=yes
+else
+  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  gl_cv_func_fcntl_f_dupfd_cloexec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
+$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
+    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_fcntl = no; then
+    HAVE_FCNTL=0
+  else
+    REPLACE_FCNTL=1
+  fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
+
+
+          fi
+  fi
+
+
+
+
+  GNULIB_FCNTL=1
+
+
+
+$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
+
+
+
+  # Code from module fcntl-h:
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_fcntl_h='<'fcntl.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
+$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
+if test "${gl_cv_next_fcntl_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <fcntl.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/fcntl.h#{
+                    s#.*"\(.*/fcntl.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
+$as_echo "$gl_cv_next_fcntl_h" >&6; }
+     fi
+     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'fcntl.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_fcntl_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
+
+
+
+
+
+
+    for gl_func in fcntl openat; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <fcntl.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module fcntl-safer:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS open-safer.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS creat-safer.$ac_objext"
+
+  # Prerequisites of lib/open-safer.c.
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_FCNTL_SAFER 1
+_ACEOF
+
+
+  # Code from module fdl:
+  # Code from module fdopendir:
+
+
+    ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
+#include <dirent.h>
+
+"
+if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FDOPENDIR $ac_have_decl
+_ACEOF
+if test $ac_have_decl = 1; then :
+
+else
+  HAVE_DECL_FDOPENDIR=0
+fi
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_fdopendir = no; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
+
+
+    :
+
+    HAVE_FDOPENDIR=0
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
+$as_echo_n "checking whether fdopendir works... " >&6; }
+if test "${gl_cv_func_fdopendir_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_fdopendir_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <dirent.h>
+#include <fcntl.h>
+#include <unistd.h>
+#if !HAVE_DECL_FDOPENDIR
+extern DIR *fdopendir (int);
+#endif
+
+int
+main ()
+{
+int result = 0;
+     int fd = open ("conftest.c", O_RDONLY);
+     if (fd < 0) result |= 1;
+     if (fdopendir (fd)) result |= 2;
+     if (close (fd)) result |= 4;
+     return result;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fdopendir_works=yes
+else
+  gl_cv_func_fdopendir_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
+$as_echo "$gl_cv_func_fdopendir_works" >&6; }
+    if test "$gl_cv_func_fdopendir_works" != yes; then
+      REPLACE_FDOPENDIR=1
+
+    :
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
+
+    fi
+  fi
+
+
+
+
+  GNULIB_FDOPENDIR=1
+
+
+
+$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_FDOPENDIR 1
+_ACEOF
+
+
+  # Code from module fflush:
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+$as_echo_n "checking whether fflush works on input streams... " >&6; }
+if test "${gl_cv_func_fflush_stdin+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  echo hello world > conftest.txt
+     if test "$cross_compiling" = yes; then :
+        gl_cv_func_fflush_stdin=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <unistd.h>
+
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "r");
+         char buffer[10];
+         int fd;
+         int c;
+         if (f == NULL)
+           return 1;
+         fd = fileno (f);
+         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+           return 2;
+         /* For deterministic results, ensure f read a bigger buffer.  */
+         if (lseek (fd, 0, SEEK_CUR) == 5)
+           return 3;
+         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
+            on BSD systems and on mingw.  */
+         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+           return 4;
+         if (lseek (fd, 0, SEEK_CUR) != 5)
+           return 5;
+         /* Verify behaviour of fflush after ungetc. See
+            <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
+         /* Verify behaviour of fflush after a backup ungetc.  This fails on
+            mingw.  */
+         c = fgetc (f);
+         ungetc (c, f);
+         fflush (f);
+         if (fgetc (f) != c)
+           return 6;
+         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
+            on glibc 2.8 and on BSD systems.  */
+         c = fgetc (f);
+         ungetc ('@', f);
+         fflush (f);
+         if (fgetc (f) != c)
+           return 7;
+         return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fflush_stdin=yes
+else
+  gl_cv_func_fflush_stdin=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     rm conftest.txt
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
+$as_echo "$gl_cv_func_fflush_stdin" >&6; }
+  if test $gl_cv_func_fflush_stdin = no; then
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
+
+
+  REPLACE_FFLUSH=1
+
+
+  :
+
+
+
+
+  if test $gl_cv_func_fseeko = yes; then
+    REPLACE_FSEEKO=1
+  fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
+
+
+
+
+  fi
+
+
+
+
+  GNULIB_FFLUSH=1
+
+
+
+$as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
+
+
+
+  # Code from module file-set:
+  # Code from module fileblocks:
+
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLOCKS 1
+_ACEOF
+
+
+$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
+
+else
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
+
+fi
+
+
+    if test $ac_cv_member_struct_stat_st_blocks = no; then
+
+
+  :
+
+
+
+
+
+  :
+
+  fi
+
+  # Code from module filemode:
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS filemode.$ac_objext"
+
+
+  :
+
+
+
+
+
+
+  # Code from module flexmember:
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
+$as_echo_n "checking for flexible array member... " >&6; }
+if test "${ac_cv_c_flexmember+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+            #include <stdio.h>
+            #include <stddef.h>
+            struct s { int n; double d[]; };
+int
+main ()
+{
+int m = getchar ();
+            struct s *p = malloc (offsetof (struct s, d)
+                                  + m * sizeof (double));
+            p->d[0] = 0.0;
+            return p->d != (double *) NULL;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_flexmember=yes
+else
+  ac_cv_c_flexmember=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
+$as_echo "$ac_cv_c_flexmember" >&6; }
+  if test $ac_cv_c_flexmember = yes; then
+
+$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
+
+  else
+    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
+
+  fi
+
+  # Code from module float:
+
+
+
+  FLOAT_H=
+  case "$host_os" in
+    beos* | openbsd* | mirbsd*)
+      FLOAT_H=float.h
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_float_h='<'float.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
+$as_echo_n "checking absolute name of <float.h>... " >&6; }
+if test "${gl_cv_next_float_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <float.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/float.h#{
+                    s#.*"\(.*/float.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
+$as_echo "$gl_cv_next_float_h" >&6; }
+     fi
+     NEXT_FLOAT_H=$gl_cv_next_float_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'float.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_float_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
+
+
+
+
+      ;;
+  esac
+
+
+  # Code from module fnmatch:
+
+
+
+
+
+  FNMATCH_H=
+  gl_fnmatch_required_lowercase=`
+    echo $gl_fnmatch_required | tr '[A-Z]' '[a-z]'
+  `
+  gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
+$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
+if eval "test \"\${$gl_fnmatch_cache_var+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+                           if test $gl_fnmatch_required = GNU; then
+       gl_fnmatch_gnu_start=
+       gl_fnmatch_gnu_end=
+     else
+       gl_fnmatch_gnu_start='#if 0'
+       gl_fnmatch_gnu_end='#endif'
+     fi
+     if test "$cross_compiling" = yes; then :
+  eval "$gl_fnmatch_cache_var=\"guessing no\""
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <fnmatch.h>
+            static int
+            y (char const *pattern, char const *string, int flags)
+            {
+              return fnmatch (pattern, string, flags) == 0;
+            }
+            static int
+            n (char const *pattern, char const *string, int flags)
+            {
+              return fnmatch (pattern, string, flags) == FNM_NOMATCH;
+            }
+
+int
+main ()
+{
+char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
+            char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
+            static char const A_1[] = { 'A' - 1, 0 };
+            static char const A01[] = { 'A' + 1, 0 };
+            static char const a_1[] = { 'a' - 1, 0 };
+            static char const a01[] = { 'a' + 1, 0 };
+            static char const bs_1[] = { '\\\\' - 1, 0 };
+            static char const bs01[] = { '\\\\' + 1, 0 };
+            int result = 0;
+            if (!n ("a*", "", 0))
+              return 1;
+            if (!y ("a*", "abc", 0))
+              return 1;
+            if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
+              return 2;
+            if (!y ("a\\\\bc", "abc", 0))
+              return 3;
+            if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
+              return 3;
+            if (!y ("*x", ".x", 0))
+              return 4;
+            if (!n ("*x", ".x", FNM_PERIOD))
+              return 4;
+            if (!y (Apat, "\\\\", 0))
+              return 5;
+            if (!y (Apat, "A", 0))
+              return 5;
+            if (!y (apat, "\\\\", 0))
+              return 5;
+            if (!y (apat, "a", 0))
+              return 5;
+            if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
+              return 5;
+            if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
+              return 5;
+            if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
+              return 5;
+            if (!(y (apat, a01, 0) == ('a' < '\\\\')))
+              return 5;
+            if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
+              return 5;
+            if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
+              return 5;
+            if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
+              return 5;
+            if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
+              return 5;
+            $gl_fnmatch_gnu_start
+            if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
+              result |= 8;
+            if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
+              result |= 16;
+            if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
+              result |= 32;
+            if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
+              result |= 64;
+            if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
+              result |= 64;
+            if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
+              result |= 64;
+            $gl_fnmatch_gnu_end
+            return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  eval "$gl_fnmatch_cache_var=yes"
+else
+  eval "$gl_fnmatch_cache_var=no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+eval ac_res=\$$gl_fnmatch_cache_var
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
+  if test "$gl_fnmatch_result" = yes; then
+            rm -f "$gl_source_base/fnmatch.h"
+  else
+    FNMATCH_H=fnmatch.h
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
+
+
+cat >>confdefs.h <<_ACEOF
+#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
+_ACEOF
+
+
+    ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
+"
+if test "x$ac_cv_have_decl_isblank" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISBLANK $ac_have_decl
+_ACEOF
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  fi
+
+
+  # Code from module fnmatch-gnu:
+
+
+
+
+
+  # Code from module fopen:
+
+
+
+  case "$host_os" in
+    mingw* | pw*)
+            REPLACE_FOPEN=1
+            gl_cv_func_fopen_slash="guessing no"
+      ;;
+    *)
+                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
+$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
+if test "${gl_cv_func_fopen_slash+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+          if test "$cross_compiling" = yes; then :
+
+             case "$host_os" in
+               aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
+                 gl_cv_func_fopen_slash="guessing no" ;;
+               *)
+                 gl_cv_func_fopen_slash="guessing yes" ;;
+             esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stddef.h>
+#include <stdio.h>
+int main ()
+{
+  return fopen ("conftest.sl/", "w") != NULL;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fopen_slash=yes
+else
+  gl_cv_func_fopen_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+          rm -f conftest.sl
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
+$as_echo "$gl_cv_func_fopen_slash" >&6; }
+      ;;
+  esac
+  case "$gl_cv_func_fopen_slash" in
+    *no)
+
+$as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+      REPLACE_FOPEN=1
+      ;;
+  esac
+  if test $REPLACE_FOPEN = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
+
+
+
+
+  fi
+
+
+
+
+  GNULIB_FOPEN=1
+
+
+
+$as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
+
+
+
+  # Code from module fopen-safer:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fopen-safer.$ac_objext"
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_FOPEN_SAFER 1
+_ACEOF
+
+
+  # Code from module fpending:
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+  fp_headers='
+#     include <stdio.h>
+#     if HAVE_STDIO_EXT_H
+#      include <stdio_ext.h>
+#     endif
+'
+  ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
+"
+if test "x$ac_cv_have_decl___fpending" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL___FPENDING $ac_have_decl
+_ACEOF
+
+  if test $ac_cv_func___fpending = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
+$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
+if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        for ac_expr in                                                    \
+                                                                          \
+            '# glibc2'                                                    \
+            'fp->_IO_write_ptr - fp->_IO_write_base'                      \
+                                                                          \
+            '# traditional Unix'                                          \
+            'fp->_ptr - fp->_base'                                        \
+                                                                          \
+            '# BSD'                                                       \
+            'fp->_p - fp->_bf._base'                                      \
+                                                                          \
+            '# SCO, Unixware'                                             \
+            '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
+                                                                          \
+            '# QNX'                                                       \
+            '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
+                                                                          \
+            '# old glibc?'                                                \
+            'fp->__bufp - fp->__buffer'                                   \
+                                                                          \
+            '# old glibc iostream?'                                       \
+            'fp->_pptr - fp->_pbase'                                      \
+                                                                          \
+            '# emx+gcc'                                                   \
+            'fp->_ptr - fp->_buffer'                                      \
+                                                                          \
+            '# VMS'                                                       \
+            '(*fp)->_ptr - (*fp)->_base'                                  \
+                                                                          \
+            '# e.g., DGUX R4.11; the info is not available'               \
+            1                                                             \
+            ; do
+
+          # Skip each embedded comment.
+          case "$ac_expr" in '#'*) continue;; esac
+
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *fp = stdin; (void) ($ac_expr);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  fp_done=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+          test "$fp_done" = yes && break
+        done
+
+        ac_cv_sys_pending_output_n_bytes=$ac_expr
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
+$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
+_ACEOF
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
+
+  fi
+
+  # Code from module fpurge:
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+  ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl_fpurge" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPURGE $ac_have_decl
+_ACEOF
+
+  if test "x$ac_cv_func_fpurge" = xyes; then
+    # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
+$as_echo_n "checking whether fpurge works... " >&6; }
+if test "${gl_cv_func_fpurge_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_fpurge_works='guessing no'
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "w+");
+        if (!f) return 1;
+        if (fputc ('a', f) != 'a') return 2;
+        rewind (f);
+        if (fgetc (f) != 'a') return 3;
+        if (fgetc (f) != EOF) return 4;
+        if (fpurge (f) != 0) return 5;
+        if (putc ('b', f) != 'b') return 6;
+        if (fclose (f) != 0) return 7;
+        if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
+        if (fgetc (f) != 'a') return 9;
+        if (fgetc (f) != 'b') return 10;
+        if (fgetc (f) != EOF) return 11;
+        if (fclose (f) != 0) return 12;
+        if (remove ("conftest.txt") != 0) return 13;
+        return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fpurge_works=yes
+else
+  gl_cv_func_fpurge_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
+$as_echo "$gl_cv_func_fpurge_works" >&6; }
+    if test "x$gl_cv_func_fpurge_works" != xyes; then
+      REPLACE_FPURGE=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
+
+    fi
+  else
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
+
+  fi
+  if test "x$ac_cv_have_decl_fpurge" = xno; then
+    HAVE_DECL_FPURGE=0
+  fi
+
+
+
+
+  GNULIB_FPURGE=1
+
+
+
+$as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
+
+
+
+  # Code from module freadahead:
+  # Code from module freading:
+
+
+  :
+
+
+
+
+
+
+  # Code from module fseeko:
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_fseeko = no; then
+    HAVE_DECL_FSEEKO=0
+  fi
+
+  if test $gl_cv_func_fseeko = no; then
+    HAVE_FSEEKO=0
+
+
+
+  if test $gl_cv_func_fseeko = yes; then
+    REPLACE_FSEEKO=1
+  fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
+
+
+
+  else
+    if test $gl_cv_var_stdin_large_offset = no; then
+
+
+
+  if test $gl_cv_func_fseeko = yes; then
+    REPLACE_FSEEKO=1
+  fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
+
+
+
+    fi
+  fi
+
+
+
+
+  GNULIB_FSEEKO=1
+
+
+
+$as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
+
+
+
+  # Code from module ftello:
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_ftello = no; then
+    HAVE_DECL_FTELLO=0
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
+$as_echo_n "checking for ftello... " >&6; }
+if test "${gl_cv_func_ftello+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+ftello (stdin);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_func_ftello=yes
+else
+  gl_cv_func_ftello=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
+$as_echo "$gl_cv_func_ftello" >&6; }
+  if test $gl_cv_func_ftello = no; then
+    HAVE_FTELLO=0
+  else
+    if test $gl_cv_var_stdin_large_offset = no; then
+      REPLACE_FTELLO=1
+    else
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
+$as_echo_n "checking whether ftello works... " >&6; }
+if test "${gl_cv_func_ftello_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                              case "$host_os" in
+                      # Guess no on Solaris.
+            solaris*) gl_cv_func_ftello_works="guessing no" ;;
+                      # Guess yes otherwise.
+            *)        gl_cv_func_ftello_works="guessing yes" ;;
+          esac
+          if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define TESTFILE "conftest.tmp"
+int
+main (void)
+{
+  FILE *fp;
+
+  /* Create a file with some contents.  */
+  fp = fopen (TESTFILE, "w");
+  if (fp == NULL)
+    return 70;
+  if (fwrite ("foogarsh", 1, 8, fp) < 8)
+    return 71;
+  if (fclose (fp))
+    return 72;
+
+  /* The file's contents is now "foogarsh".  */
+
+  /* Try writing after reading to EOF.  */
+  fp = fopen (TESTFILE, "r+");
+  if (fp == NULL)
+    return 73;
+  if (fseek (fp, -1, SEEK_END))
+    return 74;
+  if (!(getc (fp) == 'h'))
+    return 1;
+  if (!(getc (fp) == EOF))
+    return 2;
+  if (!(ftell (fp) == 8))
+    return 3;
+  if (!(ftell (fp) == 8))
+    return 4;
+  if (!(putc ('!', fp) == '!'))
+    return 5;
+  if (!(ftell (fp) == 9))
+    return 6;
+  if (!(fclose (fp) == 0))
+    return 7;
+  fp = fopen (TESTFILE, "r");
+  if (fp == NULL)
+    return 75;
+  {
+    char buf[10];
+    if (!(fread (buf, 1, 10, fp) == 9))
+      return 10;
+    if (!(memcmp (buf, "foogarsh!", 9) == 0))
+      return 11;
+  }
+  if (!(fclose (fp) == 0))
+    return 12;
+
+  /* The file's contents is now "foogarsh!".  */
+
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_ftello_works=yes
+else
+  gl_cv_func_ftello_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
+$as_echo "$gl_cv_func_ftello_works" >&6; }
+      case "$gl_cv_func_ftello_works" in
+        *yes) ;;
+        *)
+          REPLACE_FTELLO=1
+
+$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
+
+          ;;
+      esac
+    fi
+  fi
+  if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
+
+
+  fi
+
+
+
+
+  GNULIB_FTELLO=1
+
+
+
+$as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
+
+
+
+  # Code from module fts:
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fts.$ac_objext"
+
+
+
+
+
+  GNULIB_OPENAT=1
+
+
+  GNULIB_FCHMODAT=1
+  GNULIB_FSTATAT=1
+  GNULIB_MKDIRAT=1
+
+
+  GNULIB_FCHOWNAT=1
+  GNULIB_UNLINKAT=1
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  for ac_func in fchmodat fstatat mkdirat openat unlinkat
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+
+  case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
+  yes+yes)
+    # GNU/Hurd has unlinkat, but it has the same bug as unlink.
+    if test $REPLACE_UNLINK = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
+
+      REPLACE_UNLINKAT=1
+    fi ;;
+  yes+*)
+    # Solaris 9 has *at functions, but uniformly mishandles trailing
+    # slash in all of them.
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
+
+    REPLACE_OPENAT=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
+
+    REPLACE_FSTATAT=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
+
+    REPLACE_UNLINKAT=1
+    ;;
+  *)
+    HAVE_OPENAT=0
+    HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
+    HAVE_FSTATAT=0 # No known system with fstatat but not openat
+
+
+
+  :
+;;
+  esac
+  if test $ac_cv_func_fchmodat != yes; then
+    HAVE_FCHMODAT=0
+  fi
+  if test $ac_cv_func_mkdirat != yes; then
+    HAVE_MKDIRAT=0
+  fi
+
+
+
+  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
+if test "x$ac_cv_func_fchownat" = x""yes; then :
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
+$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
+if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+     gl_dangle=conftest.dangle
+     # Remove any remnants of a previous test.
+     rm -f $gl_dangle
+     # Arrange for deletion of the temporary file this test creates.
+     ac_clean_files="$ac_clean_files $gl_dangle"
+     ln -s conftest.no-such $gl_dangle
+     if test "$cross_compiling" = yes; then :
+  gl_cv_func_fchownat_nofollow_works=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+int
+main ()
+{
+  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
+                    AT_SYMLINK_NOFOLLOW) != 0
+          && errno == ENOENT);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fchownat_nofollow_works=yes
+else
+  gl_cv_func_fchownat_nofollow_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
+$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
+  if test $gl_cv_func_fchownat_nofollow_works = no; then :
+  REPLACE_FCHOWNAT=1
+
+$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
+
+
+fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
+$as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
+if test "${gl_cv_func_fchownat_empty_filename_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_fchownat_empty_filename_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+            #include <fcntl.h>
+
+int
+main ()
+{
+int fd;
+            int ret;
+            if (mkdir ("conftestdir", 0700) < 0)
+              return 2;
+            fd = open ("conftestdir", O_RDONLY);
+            if (fd < 0)
+              return 3;
+            ret = fchownat (fd, "", -1, -1, 0);
+            close (fd);
+            rmdir ("conftestdir");
+            return ret == 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fchownat_empty_filename_works=yes
+else
+  gl_cv_func_fchownat_empty_filename_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
+$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
+  if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
+  REPLACE_FCHOWNAT=1
+
+$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
+
+
+fi
+
+     if test $REPLACE_CHOWN = 1; then
+       REPLACE_FCHOWNAT=1
+     fi
+else
+  HAVE_FCHOWNAT=0
+fi
+
+  if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
+
+  fi
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+  ac_fn_c_check_member "$LINENO" "struct statfs" "f_type" "ac_cv_member_struct_statfs_f_type" "$ac_includes_default
+     #include <sys/vfs.h>
+"
+if test "x$ac_cv_member_struct_statfs_f_type" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STATFS_F_TYPE 1
+_ACEOF
+
+
+fi
+
+
+
+  # Code from module getcwd:
+
+
+
+
+  gl_abort_bug=no
+  case $gl_cv_func_getcwd_null,$host_os in
+  *,mingw*)
+    gl_cv_func_getcwd_path_max=yes;;
+  yes,*)
+
+
+  :
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
+$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
+if test "${gl_cv_func_getcwd_path_max+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # Arrange for deletion of the temporary directory this test creates.
+     ac_clean_files="$ac_clean_files confdir3"
+     if test "$cross_compiling" = yes; then :
+  gl_cv_func_getcwd_path_max=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+
+#ifndef AT_FDCWD
+# define AT_FDCWD 0
+#endif
+#ifdef ENAMETOOLONG
+# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
+#else
+# define is_ENAMETOOLONG(x) 0
+#endif
+
+/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
+#undef mkdir
+
+#ifndef S_IRWXU
+# define S_IRWXU 0700
+#endif
+
+/* The length of this name must be 8.  */
+#define DIR_NAME "confdir3"
+#define DIR_NAME_LEN 8
+#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
+
+/* The length of "../".  */
+#define DOTDOTSLASH_LEN 3
+
+/* Leftover bytes in the buffer, to work around library or OS bugs.  */
+#define BUF_SLOP 20
+
+int
+main ()
+{
+#ifndef PATH_MAX
+  /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
+     at least not on a local file system.  And if we were to start worrying
+     about remote file systems, we'd have to enable the wrapper function
+     all of the time, just to be safe.  That's not worth the cost.  */
+  exit (0);
+#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
+        - DIR_NAME_SIZE - BUF_SLOP) \
+       <= PATH_MAX)
+  /* FIXME: Assuming there's a system for which this is true,
+     this should be done in a compile test.  */
+  exit (0);
+#else
+  char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
+           + DIR_NAME_SIZE + BUF_SLOP];
+  char *cwd = getcwd (buf, PATH_MAX);
+  size_t initial_cwd_len;
+  size_t cwd_len;
+  int fail = 0;
+  size_t n_chdirs = 0;
+
+  if (cwd == NULL)
+    exit (10);
+
+  cwd_len = initial_cwd_len = strlen (cwd);
+
+  while (1)
+    {
+      size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
+      char *c = NULL;
+
+      cwd_len += DIR_NAME_SIZE;
+      /* If mkdir or chdir fails, it could be that this system cannot create
+         any file with an absolute name longer than PATH_MAX, such as cygwin.
+         If so, leave fail as 0, because the current working directory can't
+         be too long for getcwd if it can't even be created.  For other
+         errors, be pessimistic and consider that as a failure, too.  */
+      if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
+        {
+          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
+            fail = 20;
+          break;
+        }
+
+      if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
+        {
+          c = getcwd (buf, PATH_MAX);
+          if (!c && errno == ENOENT)
+            {
+              fail = 11;
+              break;
+            }
+          if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno)))
+            {
+              fail = 21;
+              break;
+            }
+        }
+
+      if (dotdot_max <= cwd_len - initial_cwd_len)
+        {
+          if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
+            break;
+          c = getcwd (buf, cwd_len + 1);
+          if (!c)
+            {
+              if (! (errno == ERANGE || errno == ENOENT
+                     || is_ENAMETOOLONG (errno)))
+                {
+                  fail = 22;
+                  break;
+                }
+              if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
+                {
+                  fail = 12;
+                  break;
+                }
+            }
+        }
+
+      if (c && strlen (c) != cwd_len)
+        {
+          fail = 23;
+          break;
+        }
+      ++n_chdirs;
+    }
+
+  /* Leaving behind such a deep directory is not polite.
+     So clean up here, right away, even though the driving
+     shell script would also clean up.  */
+  {
+    size_t i;
+
+    /* Try rmdir first, in case the chdir failed.  */
+    rmdir (DIR_NAME);
+    for (i = 0; i <= n_chdirs; i++)
+      {
+        if (chdir ("..") < 0)
+          break;
+        if (rmdir (DIR_NAME) != 0)
+          break;
+      }
+  }
+
+  exit (fail);
+#endif
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_getcwd_path_max=yes
+else
+  case $? in
+     10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
+     *) gl_cv_func_getcwd_path_max=no;;
+     esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
+$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
+  case $gl_cv_func_getcwd_path_max in
+  no,*)
+
+$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
+;;
+  esac
+
+
+
+  :
+
+
+
+
+
+  for ac_func in getpagesize
+do :
+  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+done
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
+$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
+if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # Remove any remnants of a previous test.
+     rm -rf confdir-14B---
+     # Arrange for deletion of the temporary directory this test creates.
+     ac_clean_files="$ac_clean_files confdir-14B---"
+     if test "$cross_compiling" = yes; then :
+  gl_cv_func_getcwd_abort_bug=yes
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <limits.h>
+#include <string.h>
+#include <sys/stat.h>
+
+/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
+#undef mkdir
+
+#ifndef S_IRWXU
+# define S_IRWXU 0700
+#endif
+
+/* FIXME: skip the run-test altogether on systems without getpagesize.  */
+#if ! HAVE_GETPAGESIZE
+# define getpagesize() 0
+#endif
+
+/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
+   the 16kB pagesize on ia64 linux.  Those conditions make the code below
+   trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
+#define TARGET_LEN (5 * 1024)
+
+int
+main ()
+{
+  char const *dir_name = "confdir-14B---";
+  char *cwd;
+  size_t initial_cwd_len;
+  int fail = 0;
+  size_t desired_depth;
+  size_t d;
+
+  /* The bug is triggered when PATH_MAX < getpagesize (), so skip
+     this relative expensive and invasive test if that's not true.  */
+  if (getpagesize () <= PATH_MAX)
+    return 0;
+
+  cwd = getcwd (NULL, 0);
+  if (cwd == NULL)
+    return 0;
+
+  initial_cwd_len = strlen (cwd);
+  free (cwd);
+  desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
+                   / (1 + strlen (dir_name)));
+  for (d = 0; d < desired_depth; d++)
+    {
+      if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
+        {
+          fail = 3; /* Unable to construct deep hierarchy.  */
+          break;
+        }
+    }
+
+  /* If libc has the bug in question, this invocation of getcwd
+     results in a failed assertion.  */
+  cwd = getcwd (NULL, 0);
+  if (cwd == NULL)
+    fail = 4; /* getcwd failed.  This is ok, and expected.  */
+  free (cwd);
+
+  /* Call rmdir first, in case the above chdir failed.  */
+  rmdir (dir_name);
+  while (0 < d--)
+    {
+      if (chdir ("..") < 0)
+        break;
+      rmdir (dir_name);
+    }
+
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_getcwd_abort_bug=no
+else
+  gl_cv_func_getcwd_abort_bug=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
+$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
+  if test $gl_cv_func_getcwd_abort_bug = yes; then :
+  gl_abort_bug=yes
+fi
+;;
+  esac
+
+  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in
+  *yes,yes,no) ;;
+  *)
+    REPLACE_GETCWD=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
+
+
+
+
+  :
+;;
+  esac
+
+
+
+
+  GNULIB_GETCWD=1
+
+
+
+$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
+
+
+
+  # Code from module getdelim:
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_getdelim = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
+$as_echo_n "checking for working getdelim function... " >&6; }
+if test "${gl_cv_func_working_getdelim+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
+    if test "$cross_compiling" = yes; then :
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
+  Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
+  gl_cv_func_working_getdelim=yes
+else
+  gl_cv_func_working_getdelim=no
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#    include <stdio.h>
+#    include <stdlib.h>
+#    include <string.h>
+    int main ()
+    {
+      FILE *in = fopen ("./conftest.data", "r");
+      if (!in)
+        return 1;
+      {
+        /* Test result for a NULL buffer and a zero size.
+           Based on a test program from Karl Heuer.  */
+        char *line = NULL;
+        size_t siz = 0;
+        int len = getdelim (&line, &siz, '\n', in);
+        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
+          return 2;
+      }
+      {
+        /* Test result for a NULL buffer and a non-zero size.
+           This crashes on FreeBSD 8.0.  */
+        char *line = NULL;
+        size_t siz = (size_t)(~0) / 4;
+        if (getdelim (&line, &siz, '\n', in) == -1)
+          return 3;
+      }
+      return 0;
+    }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_working_getdelim=yes
+else
+  gl_cv_func_working_getdelim=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
+$as_echo "$gl_cv_func_working_getdelim" >&6; }
+  else
+    gl_cv_func_working_getdelim=no
+  fi
+
+  if test $ac_cv_have_decl_getdelim = no; then
+    HAVE_DECL_GETDELIM=0
+  fi
+
+  if test $gl_cv_func_working_getdelim = no; then
+    if test $ac_cv_func_getdelim = yes; then
+      REPLACE_GETDELIM=1
+    fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
+
+
+  for ac_func in flockfile funlockfile
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+  ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
+_ACEOF
+
+
+  fi
+
+
+
+
+  GNULIB_GETDELIM=1
+
+
+
+$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
+
+
+
+  # Code from module getdtablesize:
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_getdtablesize != yes; then
+    HAVE_GETDTABLESIZE=0
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_GETDTABLESIZE=1
+
+
+
+$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
+
+
+
+  # Code from module getgroups:
+
+
+
+
+  if test "$ac_cv_func_getgroups" != yes; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
+
+    HAVE_GETGROUPS=0
+  elif test "$ac_cv_func_getgroups_works.$ac_cv_type_getgroups" != yes.gid_t
+  then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
+
+    REPLACE_GETGROUPS=1
+
+$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
+
+  else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
+$as_echo_n "checking whether getgroups handles negative values... " >&6; }
+if test "${gl_cv_func_getgroups_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_getgroups_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+int size = getgroups (0, 0);
+          gid_t *list = malloc (size * sizeof *list);
+          return getgroups (-1, list) != -1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_getgroups_works=yes
+else
+  gl_cv_func_getgroups_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
+$as_echo "$gl_cv_func_getgroups_works" >&6; }
+    if test "$gl_cv_func_getgroups_works" != yes; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
+
+      REPLACE_GETGROUPS=1
+    fi
+  fi
+  test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
+
+
+
+
+  GNULIB_GETGROUPS=1
+
+
+
+$as_echo "#define GNULIB_TEST_GETGROUPS 1" >>confdefs.h
+
+
+
+  # Code from module getline:
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  gl_getline_needs_run_time_check=no
+  ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
+if test "x$ac_cv_func_getline" = x""yes; then :
+                   gl_getline_needs_run_time_check=yes
+else
+  am_cv_func_working_getline=no
+fi
+
+  if test $gl_getline_needs_run_time_check = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
+$as_echo_n "checking for working getline function... " >&6; }
+if test "${am_cv_func_working_getline+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
+    if test "$cross_compiling" = yes; then :
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
+  Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
+  am_cv_func_working_getline=yes
+else
+  am_cv_func_working_getline=no
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#    include <stdio.h>
+#    include <stdlib.h>
+#    include <string.h>
+    int main ()
+    {
+      FILE *in = fopen ("./conftest.data", "r");
+      if (!in)
+        return 1;
+      {
+        /* Test result for a NULL buffer and a zero size.
+           Based on a test program from Karl Heuer.  */
+        char *line = NULL;
+        size_t siz = 0;
+        int len = getline (&line, &siz, in);
+        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
+          return 2;
+      }
+      {
+        /* Test result for a NULL buffer and a non-zero size.
+           This crashes on FreeBSD 8.0.  */
+        char *line = NULL;
+        size_t siz = (size_t)(~0) / 4;
+        if (getline (&line, &siz, in) == -1)
+          return 3;
+      }
+      return 0;
+    }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  am_cv_func_working_getline=yes
+else
+  am_cv_func_working_getline=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
+$as_echo "$am_cv_func_working_getline" >&6; }
+  fi
+
+  if test $ac_cv_have_decl_getline = no; then
+    HAVE_DECL_GETLINE=0
+  fi
+
+  if test $am_cv_func_working_getline = no; then
+                REPLACE_GETLINE=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_getdelim = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
+$as_echo_n "checking for working getdelim function... " >&6; }
+if test "${gl_cv_func_working_getdelim+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
+    if test "$cross_compiling" = yes; then :
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
+  Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
+  gl_cv_func_working_getdelim=yes
+else
+  gl_cv_func_working_getdelim=no
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#    include <stdio.h>
+#    include <stdlib.h>
+#    include <string.h>
+    int main ()
+    {
+      FILE *in = fopen ("./conftest.data", "r");
+      if (!in)
+        return 1;
+      {
+        /* Test result for a NULL buffer and a zero size.
+           Based on a test program from Karl Heuer.  */
+        char *line = NULL;
+        size_t siz = 0;
+        int len = getdelim (&line, &siz, '\n', in);
+        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
+          return 2;
+      }
+      {
+        /* Test result for a NULL buffer and a non-zero size.
+           This crashes on FreeBSD 8.0.  */
+        char *line = NULL;
+        size_t siz = (size_t)(~0) / 4;
+        if (getdelim (&line, &siz, '\n', in) == -1)
+          return 3;
+      }
+      return 0;
+    }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_working_getdelim=yes
+else
+  gl_cv_func_working_getdelim=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
+$as_echo "$gl_cv_func_working_getdelim" >&6; }
+  else
+    gl_cv_func_working_getdelim=no
+  fi
+
+  if test $ac_cv_have_decl_getdelim = no; then
+    HAVE_DECL_GETDELIM=0
+  fi
+
+  if test $gl_cv_func_working_getdelim = no; then
+    if test $ac_cv_func_getdelim = yes; then
+      REPLACE_GETDELIM=1
+    fi
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
+
+
+  for ac_func in flockfile funlockfile
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+  ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
+_ACEOF
+
+
+  fi
+
+
+  fi
+
+
+
+
+  GNULIB_GETLINE=1
+
+
+
+$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
+
+
+
+  # Code from module getopt-gnu:
+
+
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
+
+
+  # Code from module getopt-posix:
+
+
+
+
+
+  if test -n "$gl_replace_getopt"; then :
+
+
+
+  GETOPT_H=getopt.h
+
+$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
+
+
+
+    GNULIB_UNISTD_H_GETOPT=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
+
+
+
+  :
+
+
+
+
+
+
+
+
+fi
+
+
+  # Code from module gettext:
+
+  # Code from module gettext-h:
+
+
+  # Code from module gettime:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS gettime.$ac_objext"
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+  # Code from module gettimeofday:
+
+
+
+
+
+  :
+
+
+
+
+
+
+  gl_gettimeofday_timezone=void
+  if test $ac_cv_func_gettimeofday != yes; then
+    HAVE_GETTIMEOFDAY=0
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
+
+
+  for ac_header in sys/timeb.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+  for ac_func in _ftime
+do :
+  ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+  else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
+$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
+if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+       gl_cv_func_gettimeofday_clobber=yes
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+          #include <sys/time.h>
+          #include <time.h>
+          #include <stdlib.h>
+
+int
+main ()
+{
+
+          time_t t = 0;
+          struct tm *lt;
+          struct tm saved_lt;
+          struct timeval tv;
+          lt = localtime (&t);
+          saved_lt = *lt;
+          gettimeofday (&tv, NULL);
+          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_gettimeofday_clobber=no
+else
+  gl_cv_func_gettimeofday_clobber=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
+$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
+
+ if test $gl_cv_func_gettimeofday_clobber = yes; then
+   REPLACE_GETTIMEOFDAY=1
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
+
+
+  for ac_header in sys/timeb.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+  for ac_func in _ftime
+do :
+  ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+
+$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
+
+
+$as_echo "#define localtime rpl_localtime" >>confdefs.h
+
+
+
+$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
+
+ fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
+$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
+if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
+              struct timeval c;
+              int gettimeofday (struct timeval *restrict, void *restrict);
+
+int
+main ()
+{
+/* glibc uses struct timezone * rather than the POSIX void *
+                 if _GNU_SOURCE is defined.  However, since the only portable
+                 use of gettimeofday uses NULL as the second parameter, and
+                 since the glibc definition is actually more typesafe, it is
+                 not worth wrapping this to get a compliant signature.  */
+              int (*f) (struct timeval *restrict, void *restrict)
+                = gettimeofday;
+              int x = f (&c, 0);
+              return !(x | c.tv_sec | c.tv_usec);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_gettimeofday_posix_signature=yes
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
+int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_gettimeofday_posix_signature=almost
+else
+  gl_cv_func_gettimeofday_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
+$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
+    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
+      gl_gettimeofday_timezone='struct timezone'
+    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
+      REPLACE_GETTIMEOFDAY=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
+
+
+  for ac_header in sys/timeb.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+  for ac_func in _ftime
+do :
+  ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+    fi
+  fi
+
+cat >>confdefs.h <<_ACEOF
+#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
+_ACEOF
+
+
+
+
+
+  GNULIB_GETTIMEOFDAY=1
+
+
+
+$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
+
+
+
+  # Code from module gnumakefile:
+  # Autoconf 2.61a.99 and earlier don't support linking a file only
+  # in VPATH builds.  But since GNUmakefile is for maintainer use
+  # only, it does not matter if we skip the link with older autoconf.
+  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+  # builds, so use a shell variable to bypass this.
+  GNUmakefile=GNUmakefile
+  ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
+
+  # Code from module gpl-3.0:
+  # Code from module group-member:
+
+
+
+      ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
+if test "x$ac_cv_func_group_member" = x""yes; then :
+
+else
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
+
+
+
+
+
+fi
+
+
+  # Code from module hash:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS hash.$ac_objext"
+
+
+
+
+  # Code from module hash-pjw:
+  # Code from module hash-triple:
+  # Code from module havelib:
+  # Code from module human:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS human.$ac_objext"
+
+
+    :
+
+  # Code from module i-ring:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS i-ring.$ac_objext"
+
+
+  # Code from module idcache:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS idcache.$ac_objext"
+
+
+  # Code from module include_next:
+  # Code from module inline:
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
+$as_echo_n "checking whether the compiler generally respects inline... " >&6; }
+if test "${gl_cv_c_inline_effective+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test $ac_cv_c_inline = no; then
+       gl_cv_c_inline_effective=no
+     else
+                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifdef __NO_INLINE__
+               #error "inline is not effective"
+             #endif
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_c_inline_effective=yes
+else
+  gl_cv_c_inline_effective=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
+$as_echo "$gl_cv_c_inline_effective" >&6; }
+  if test $gl_cv_c_inline_effective = yes; then
+
+$as_echo "#define HAVE_INLINE 1" >>confdefs.h
+
+  fi
+
+  # Code from module intprops:
+  # Code from module inttypes:
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h conforms to C99" >&5
+$as_echo_n "checking whether inttypes.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_inttypes_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_header_working_inttypes_h=no
+     if test "$gl_cv_header_working_stdint_h" = yes \
+        && test $ac_cv_header_inttypes_h = yes \
+        && test "$ac_cv_have_decl_imaxabs" = yes \
+        && test "$ac_cv_have_decl_imaxdiv" = yes \
+        && test "$ac_cv_have_decl_strtoimax" = yes \
+        && test "$ac_cv_have_decl_strtoumax" = yes; then
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#include <stddef.h>
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */
+#include <inttypes.h>
+
+/* No need to duplicate the tests of stdint.m4; they are subsumed by
+   $gl_cv_header_working_stdint_h = yes.  */
+
+/* Tests for macros supposed to be defined in inttypes.h.  */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+  PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+  PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+  PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+  PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+  PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+  PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+  PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+  PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+  PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+  PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+  PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+  PRIdLEAST64 PRIiLEAST64
+  PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+  PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+  PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+  PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+  PRIdFAST64 PRIiFAST64
+  PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+  PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+  PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+  PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+  ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+  SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+  SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+  SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+  SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+  SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+  SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+  SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+  SCNo64 SCNu64 SCNx64
+#endif
+  SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+  SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+  SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+  SCNdLEAST64 SCNiLEAST64
+  SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+  SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+  SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+  SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+  SCNdFAST64 SCNiFAST64
+  SCNoFAST64 SCNuFAST64 SCNxFAST64
+  SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+  SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+  SCNoPTR SCNuPTR SCNxPTR
+#endif
+  ;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_working_inttypes_h=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_inttypes_h" >&5
+$as_echo "$gl_cv_header_working_inttypes_h" >&6; }
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_inttypes_h='<'inttypes.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
+$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
+if test "${gl_cv_next_inttypes_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_inttypes_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <inttypes.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/inttypes.h#{
+                    s#.*"\(.*/inttypes.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_inttypes_h='<'inttypes.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
+$as_echo "$gl_cv_next_inttypes_h" >&6; }
+     fi
+     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'inttypes.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_inttypes_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h
+
+
+
+  PRIPTR_PREFIX=
+  if test -n "$STDINT_H"; then
+        PRIPTR_PREFIX='"l"'
+  else
+        for glpfx in '' l ll I64; do
+      case $glpfx in
+        '')  gltype1='int';;
+        l)   gltype1='long int';;
+        ll)  gltype1='long long int';;
+        I64) gltype1='__int64';;
+      esac
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdint.h>
+           extern intptr_t foo;
+           extern $gltype1 foo;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  PRIPTR_PREFIX='"'$glpfx'"'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      test -n "$PRIPTR_PREFIX" && break
+    done
+  fi
+
+
+  if test "$ac_cv_have_decl_imaxabs" = yes; then
+    HAVE_DECL_IMAXABS=1
+  else
+    HAVE_DECL_IMAXABS=0
+  fi
+
+  if test "$ac_cv_have_decl_imaxdiv" = yes; then
+    HAVE_DECL_IMAXDIV=1
+  else
+    HAVE_DECL_IMAXDIV=0
+  fi
+
+  if test "$ac_cv_have_decl_strtoimax" = yes; then
+    HAVE_DECL_STRTOIMAX=1
+  else
+    HAVE_DECL_STRTOIMAX=0
+  fi
+
+  if test "$ac_cv_have_decl_strtoumax" = yes; then
+    HAVE_DECL_STRTOUMAX=1
+  else
+    HAVE_DECL_STRTOUMAX=0
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
+$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
+if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
+
+            #if defined INT32_MAX && defined INTMAX_MAX
+             #define CONDITION (INT32_MAX < INTMAX_MAX)
+            #elif HAVE_LONG_LONG_INT
+             #define CONDITION (sizeof (int) < sizeof (long long int))
+            #else
+             #define CONDITION 0
+            #endif
+            int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
+else
+  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
+$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
+  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
+    INT32_MAX_LT_INTMAX_MAX=1;
+  else
+    INT32_MAX_LT_INTMAX_MAX=0;
+  fi
+
+
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
+$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
+if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
+
+            #if defined INT64_MAX
+             #define CONDITION (INT64_MAX == LONG_MAX)
+            #elif HAVE_LONG_LONG_INT
+             #define CONDITION (sizeof (long long int) == sizeof (long int))
+            #else
+             #define CONDITION 0
+            #endif
+            int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
+else
+  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
+$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
+  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
+    INT64_MAX_EQ_LONG_MAX=1;
+  else
+    INT64_MAX_EQ_LONG_MAX=0;
+  fi
+
+
+  else
+    INT64_MAX_EQ_LONG_MAX=-1
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
+$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
+if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
+
+            #if defined UINT32_MAX && defined UINTMAX_MAX
+             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
+            #elif HAVE_LONG_LONG_INT
+             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
+            #else
+             #define CONDITION 0
+            #endif
+            int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
+else
+  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
+$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
+  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
+    UINT32_MAX_LT_UINTMAX_MAX=1;
+  else
+    UINT32_MAX_LT_UINTMAX_MAX=0;
+  fi
+
+
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
+$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
+if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
+
+            #if defined UINT64_MAX
+             #define CONDITION (UINT64_MAX == ULONG_MAX)
+            #elif HAVE_LONG_LONG_INT
+             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
+            #else
+             #define CONDITION 0
+            #endif
+            int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
+else
+  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
+$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
+  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
+    UINT64_MAX_EQ_ULONG_MAX=1;
+  else
+    UINT64_MAX_EQ_ULONG_MAX=0;
+  fi
+
+
+  else
+    UINT64_MAX_EQ_ULONG_MAX=-1
+  fi
+
+
+    for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <inttypes.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module isblank:
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_isblank = no; then
+    HAVE_ISBLANK=0
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_ISBLANK=1
+
+
+  # Code from module iswblank:
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_iswblank = no; then
+    HAVE_ISWBLANK=0
+    if test $ac_cv_have_decl_iswblank = yes; then
+      REPLACE_ISWBLANK=1
+    fi
+  fi
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+        :
+  else
+    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
+
+    fi
+  fi
+
+
+
+
+
+  GNULIB_ISWBLANK=1
+
+
+
+$as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
+
+
+
+  # Code from module langinfo:
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_langinfo_h='<'langinfo.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
+$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
+if test "${gl_cv_next_langinfo_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_langinfo_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/langinfo.h#{
+                    s#.*"\(.*/langinfo.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_langinfo_h='<'langinfo.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
+$as_echo "$gl_cv_next_langinfo_h" >&6; }
+     fi
+     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'langinfo.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_langinfo_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
+
+
+
+
+
+    HAVE_LANGINFO_CODESET=0
+  HAVE_LANGINFO_T_FMT_AMPM=0
+  HAVE_LANGINFO_ERA=0
+  HAVE_LANGINFO_YESEXPR=0
+
+  :
+
+
+
+
+
+  if test $ac_cv_header_langinfo_h = yes; then
+    HAVE_LANGINFO_H=1
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
+$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
+if test "${gl_cv_header_langinfo_codeset+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int a = CODESET;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_langinfo_codeset=yes
+else
+  gl_cv_header_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
+$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
+    if test $gl_cv_header_langinfo_codeset = yes; then
+      HAVE_LANGINFO_CODESET=1
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
+$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
+if test "${gl_cv_header_langinfo_t_fmt_ampm+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int a = T_FMT_AMPM;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_langinfo_t_fmt_ampm=yes
+else
+  gl_cv_header_langinfo_t_fmt_ampm=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
+$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
+    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
+      HAVE_LANGINFO_T_FMT_AMPM=1
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
+$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
+if test "${gl_cv_header_langinfo_era+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int a = ERA;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_langinfo_era=yes
+else
+  gl_cv_header_langinfo_era=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
+$as_echo "$gl_cv_header_langinfo_era" >&6; }
+    if test $gl_cv_header_langinfo_era = yes; then
+      HAVE_LANGINFO_ERA=1
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
+$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
+if test "${gl_cv_header_langinfo_yesexpr+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int a = YESEXPR;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_langinfo_yesexpr=yes
+else
+  gl_cv_header_langinfo_yesexpr=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
+$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
+    if test $gl_cv_header_langinfo_yesexpr = yes; then
+      HAVE_LANGINFO_YESEXPR=1
+    fi
+  else
+    HAVE_LANGINFO_H=0
+  fi
+
+
+
+
+
+
+
+    for gl_func in nl_langinfo; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module lchown:
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+  for ac_func in lchown
+do :
+  ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
+if test "x$ac_cv_func_lchown" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LCHOWN 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+  if test $ac_cv_func_lchown = no; then
+    HAVE_LCHOWN=0
+  elif test "$gl_cv_func_chown_slash_works" != yes \
+      || test "$gl_cv_func_chown_ctime_works" != yes; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
+
+    REPLACE_LCHOWN=1
+  fi
+
+
+
+
+  GNULIB_LCHOWN=1
+
+
+
+$as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h
+
+
+
+  # Code from module localcharset:
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+  LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+
+  # Code from module locale:
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
+$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
+if test "${gl_cv_header_locale_h_posix2001+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+            int x = LC_MESSAGES;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_locale_h_posix2001=yes
+else
+  gl_cv_header_locale_h_posix2001=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
+$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_header_xlocale_h = yes; then
+    HAVE_XLOCALE_H=1
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
+$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
+if test "${gl_cv_header_locale_has_locale_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+              locale_t x;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_locale_has_locale_t=yes
+else
+  gl_cv_header_locale_has_locale_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
+$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
+    if test $gl_cv_header_locale_has_locale_t = yes; then
+      gl_cv_header_locale_h_needs_xlocale_h=no
+    else
+      gl_cv_header_locale_h_needs_xlocale_h=yes
+    fi
+  else
+    HAVE_XLOCALE_H=0
+    gl_cv_header_locale_h_needs_xlocale_h=no
+  fi
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_locale_h='<'locale.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
+$as_echo_n "checking absolute name of <locale.h>... " >&6; }
+if test "${gl_cv_next_locale_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/locale.h#{
+                    s#.*"\(.*/locale.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
+$as_echo "$gl_cv_next_locale_h" >&6; }
+     fi
+     NEXT_LOCALE_H=$gl_cv_next_locale_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'locale.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_locale_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
+
+
+
+
+
+  if test -n "$STDDEF_H" \
+     || test $gl_cv_header_locale_h_posix2001 = no \
+     || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then
+
+    :
+
+  fi
+
+
+    for gl_func in setlocale duplocale; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+/* Some systems provide declarations in a non-standard header.  */
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module lseek:
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
+$as_echo_n "checking whether lseek detects pipes... " >&6; }
+if test "${gl_cv_func_lseek_pipe+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test $cross_compiling = no; then
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h> /* for off_t */
+#include <stdio.h> /* for SEEK_CUR */
+#include <unistd.h>
+int
+main ()
+{
+
+  /* Exit with success only if stdin is seekable.  */
+  return lseek (0, (off_t)0, SEEK_CUR) < 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  if test -s conftest$ac_exeext \
+             && ./conftest$ac_exeext < conftest.$ac_ext \
+             && test 1 = "`echo hi \
+               | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+            gl_cv_func_lseek_pipe=yes
+          else
+            gl_cv_func_lseek_pipe=no
+          fi
+else
+  gl_cv_func_lseek_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     else
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
+/* mingw and BeOS mistakenly return 0 when trying to seek on pipes.  */
+  Choke me.
+#endif
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_lseek_pipe=yes
+else
+  gl_cv_func_lseek_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
+$as_echo "$gl_cv_func_lseek_pipe" >&6; }
+  if test $gl_cv_func_lseek_pipe = no; then
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
+
+
+  REPLACE_LSEEK=1
+
+$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
+
+
+  fi
+
+
+
+
+  GNULIB_LSEEK=1
+
+
+
+$as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
+
+
+
+  # Code from module lstat:
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_lstat = yes; then
+
+    if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+            REPLACE_LSTAT=1
+    fi
+    # Prerequisites of lib/lstat.c.
+
+  else
+    HAVE_LSTAT=0
+  fi
+
+
+
+
+  GNULIB_LSTAT=1
+
+
+
+$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
+
+
+
+  # Code from module maintainer-makefile:
+
+  # Code from module malloc:
+  # Code from module malloc-gnu:
+
+
+    for ac_header in stdlib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_malloc_0_nonnull=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_malloc_0_nonnull=yes
+else
+  ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+
+$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
+
+else
+  $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
+
+  REPLACE_MALLOC=1
+
+
+fi
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_MALLOC_GNU 1
+_ACEOF
+
+
+  # Code from module malloc-posix:
+
+
+
+  if test $gl_cv_func_malloc_posix = yes; then
+
+$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
+
+  else
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
+
+  REPLACE_MALLOC=1
+
+  fi
+
+
+
+
+  GNULIB_MALLOC_POSIX=1
+
+
+
+$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
+
+
+
+  # Code from module malloca:
+
+
+
+
+  # Code from module math:
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_math_h='<'math.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
+$as_echo_n "checking absolute name of <math.h>... " >&6; }
+if test "${gl_cv_next_math_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_math_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/math.h#{
+                    s#.*"\(.*/math.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_math_h='<'math.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
+$as_echo "$gl_cv_next_math_h" >&6; }
+     fi
+     NEXT_MATH_H=$gl_cv_next_math_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'math.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_math_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
+$as_echo_n "checking whether NAN macro works... " >&6; }
+if test "${gl_cv_header_math_nan_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+int
+main ()
+{
+/* Solaris 10 has a broken definition of NAN.  Other platforms
+        fail to provide NAN, or provide it only in C99 mode; this
+        test only needs to fail when NAN is provided but wrong.  */
+         float f = 1.0f;
+#ifdef NAN
+         f = NAN;
+#endif
+         return f == 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_math_nan_works=yes
+else
+  gl_cv_header_math_nan_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
+$as_echo "$gl_cv_header_math_nan_works" >&6; }
+  if test $gl_cv_header_math_nan_works = no; then
+    REPLACE_NAN=1
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
+$as_echo_n "checking whether HUGE_VAL works... " >&6; }
+if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+int
+main ()
+{
+/* Solaris 10 has a broken definition of HUGE_VAL.  */
+         double d = HUGE_VAL;
+         return d == 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_math_huge_val_works=yes
+else
+  gl_cv_header_math_huge_val_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
+$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
+  if test $gl_cv_header_math_huge_val_works = no; then
+    REPLACE_HUGE_VAL=1
+  fi
+
+
+    for gl_func in acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl     ldexpl logb logl round roundf roundl sinl sqrtl tanl trunc truncf truncl; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module mbchar:
+
+
+
+
+  # Code from module mbrtowc:
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                     # Guess no on AIX and OSF/1.
+        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+                     # Guess yes otherwise.
+        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+      esac
+      if test $LOCALE_JA != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        if (mbsinit (&state))
+          return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_incomplete_state=yes
+else
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                    # Guess no on Solaris 8.
+        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+                    # Guess yes otherwise.
+        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+      esac
+      if test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8:
+     mbrtowc returns 2, and sets wc to 0x00F0.
+     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 6, &state) != 4
+          && mbtowc (&wc, input + 3, 6) == 4)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_sanitycheck=yes
+else
+  gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+    REPLACE_MBSTATE_T=0
+    case "$gl_cv_func_mbrtowc_incomplete_state" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+    case "$gl_cv_func_mbrtowc_sanitycheck" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+  else
+    REPLACE_MBSTATE_T=1
+  fi
+  if test $REPLACE_MBSTATE_T = 1; then
+
+    :
+
+  fi
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_mbrtowc = no; then
+    HAVE_MBRTOWC=0
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBRTOWC=1
+    else
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
+$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
+if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                  # Guess no on Solaris.
+        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
+                  # Guess yes otherwise.
+        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
+      esac
+      if test $LOCALE_FR_UTF8 != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      char input[] = "\303\237er";
+      mbstate_t state;
+      wchar_t wc;
+      size_t ret;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      wc = (wchar_t) 0xBADFACE;
+      ret = mbrtowc (&wc, input, 5, &state);
+      if (ret != 2)
+        result |= 1;
+      if (!mbsinit (&state))
+        result |= 2;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      ret = mbrtowc (NULL, input, 5, &state);
+      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
+        result |= 4;
+      if (!mbsinit (&state))
+        result |= 8;
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_null_arg1=yes
+else
+  gl_cv_func_mbrtowc_null_arg1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
+$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
+
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
+$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
+if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+              # Guess no on OSF/1.
+        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
+              # Guess yes otherwise.
+        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
+      esac
+      if test $LOCALE_FR_UTF8 != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      mbstate_t state;
+      wchar_t wc;
+      int ret;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      wc = (wchar_t) 0xBADFACE;
+      mbrtowc (&wc, NULL, 5, &state);
+      /* Check that wc was not modified.  */
+      if (wc != (wchar_t) 0xBADFACE)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_null_arg2=yes
+else
+  gl_cv_func_mbrtowc_null_arg2=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
+$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
+$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
+if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                                   # Guess no on HP-UX, Solaris, native Windows.
+        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+                                   # Guess yes otherwise.
+        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
+      esac
+      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
+         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  int found_some_locale = 0;
+  /* This fails on Solaris.  */
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      char input[] = "B\303\274\303\237er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        {
+          input[1] = '\0';
+          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+            result |= 1;
+        }
+      found_some_locale = 1;
+    }
+  /* This fails on HP-UX 11.11.  */
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        {
+          input[1] = '\0';
+          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+            result |= 2;
+        }
+      found_some_locale = 1;
+    }
+  /* This fails on native Windows.  */
+  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
+    {
+      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 4;
+        }
+      found_some_locale = 1;
+    }
+  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
+    {
+      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 8;
+        }
+      found_some_locale = 1;
+    }
+  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
+    {
+      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 16;
+        }
+      found_some_locale = 1;
+    }
+  return (found_some_locale ? result : 77);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_retval=yes
+else
+  if test $? != 77; then
+             gl_cv_func_mbrtowc_retval=no
+           fi
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
+$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
+
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
+$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
+if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                       # Guess no on Solaris 8 and 9.
+        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+                       # Guess yes otherwise.
+        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+      esac
+      if test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8 and 9.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "", 1, &state) != 0)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_nul_retval=yes
+else
+  gl_cv_func_mbrtowc_nul_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
+$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+
+      case "$gl_cv_func_mbrtowc_null_arg1" in
+        *yes) ;;
+        *)
+$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
+
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_null_arg2" in
+        *yes) ;;
+        *)
+$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
+
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_retval" in
+        *yes) ;;
+        *)
+$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
+
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_nul_retval" in
+        *yes) ;;
+        *)
+$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
+
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+    fi
+  fi
+  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+
+    :
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_MBRTOWC=1
+
+
+
+$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
+
+
+
+  # Code from module mbscasestr:
+
+
+
+  GNULIB_MBSCASESTR=1
+
+
+
+$as_echo "#define GNULIB_TEST_MBSCASESTR 1" >>confdefs.h
+
+
+
+  # Code from module mbsinit:
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                     # Guess no on AIX and OSF/1.
+        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+                     # Guess yes otherwise.
+        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+      esac
+      if test $LOCALE_JA != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        if (mbsinit (&state))
+          return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_incomplete_state=yes
+else
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                    # Guess no on Solaris 8.
+        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+                    # Guess yes otherwise.
+        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+      esac
+      if test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8:
+     mbrtowc returns 2, and sets wc to 0x00F0.
+     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 6, &state) != 4
+          && mbtowc (&wc, input + 3, 6) == 4)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_sanitycheck=yes
+else
+  gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+    REPLACE_MBSTATE_T=0
+    case "$gl_cv_func_mbrtowc_incomplete_state" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+    case "$gl_cv_func_mbrtowc_sanitycheck" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+  else
+    REPLACE_MBSTATE_T=1
+  fi
+  if test $REPLACE_MBSTATE_T = 1; then
+
+    :
+
+  fi
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_mbsinit = no; then
+    HAVE_MBSINIT=0
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBSINIT=1
+    else
+                        case "$host_os" in
+        mingw*) REPLACE_MBSINIT=1 ;;
+      esac
+    fi
+  fi
+  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+
+    :
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_MBSINIT=1
+
+
+
+$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
+
+
+
+  # Code from module mbslen:
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_mbslen = yes; then
+    HAVE_MBSLEN=1
+  else
+    HAVE_MBSLEN=0
+  fi
+
+
+
+
+  GNULIB_MBSLEN=1
+
+
+
+$as_echo "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
+
+
+
+  # Code from module mbsrtowcs:
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                     # Guess no on AIX and OSF/1.
+        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+                     # Guess yes otherwise.
+        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+      esac
+      if test $LOCALE_JA != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        if (mbsinit (&state))
+          return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_incomplete_state=yes
+else
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                    # Guess no on Solaris 8.
+        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+                    # Guess yes otherwise.
+        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+      esac
+      if test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8:
+     mbrtowc returns 2, and sets wc to 0x00F0.
+     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 6, &state) != 4
+          && mbtowc (&wc, input + 3, 6) == 4)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_sanitycheck=yes
+else
+  gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+    REPLACE_MBSTATE_T=0
+    case "$gl_cv_func_mbrtowc_incomplete_state" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+    case "$gl_cv_func_mbrtowc_sanitycheck" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+  else
+    REPLACE_MBSTATE_T=1
+  fi
+  if test $REPLACE_MBSTATE_T = 1; then
+
+    :
+
+  fi
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_mbsrtowcs = no; then
+    HAVE_MBSRTOWCS=0
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBSRTOWCS=1
+    else
+
+
+
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
+$as_echo_n "checking whether mbsrtowcs works... " >&6; }
+if test "${gl_cv_func_mbsrtowcs_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                                   # Guess no on HP-UX, Solaris, mingw.
+        hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
+                                   # Guess yes otherwise.
+        *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
+      esac
+      if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  /* Test whether the function supports a NULL destination argument.
+     This fails on native Windows.  */
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      const char input[] = "\337er";
+      const char *src = input;
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbsrtowcs (NULL, &src, 1, &state) != 3
+          || src != input)
+        result |= 1;
+    }
+  /* Test whether the function works when started with a conversion state
+     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      const char input[] = "B\303\274\303\237er";
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
+        if (!mbsinit (&state))
+          {
+            const char *src = input + 2;
+            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
+              result |= 2;
+          }
+    }
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      const char input[] = "<\306\374\313\334\270\354>";
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
+        if (!mbsinit (&state))
+          {
+            const char *src = input + 4;
+            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
+              result |= 4;
+          }
+    }
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      const char input[] = "B\250\271\201\060\211\070er";
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
+        if (!mbsinit (&state))
+          {
+            const char *src = input + 2;
+            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
+              result |= 8;
+          }
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbsrtowcs_works=yes
+else
+  gl_cv_func_mbsrtowcs_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
+$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
+
+      case "$gl_cv_func_mbsrtowcs_works" in
+        *yes) ;;
+        *) REPLACE_MBSRTOWCS=1 ;;
+      esac
+    fi
+  fi
+  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
+
+    :
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_MBSRTOWCS=1
+
+
+
+$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
+
+
+
+  # Code from module mbsstr:
+
+
+
+  GNULIB_MBSSTR=1
+
+
+
+$as_echo "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
+
+
+
+  # Code from module mbtowc:
+
+
+
+  if false; then
+    REPLACE_MBTOWC=1
+  fi
+  if test $REPLACE_MBTOWC = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_MBTOWC=1
+
+
+
+$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
+
+
+
+  # Code from module mbuiter:
+
+
+
+  :
+
+  # Code from module memchr:
+
+
+
+
+  GNULIB_MEMCHR=1
+
+
+
+$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
+
+
+
+  # Code from module mempcpy:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  for ac_func in mempcpy
+do :
+  ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
+if test "x$ac_cv_func_mempcpy" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMPCPY 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+  if test $ac_cv_func_mempcpy = no; then
+    HAVE_MEMPCPY=0
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_MEMPCPY=1
+
+
+
+$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
+
+
+
+  # Code from module memrchr:
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_memrchr = no; then
+    HAVE_DECL_MEMRCHR=0
+  fi
+
+
+
+
+
+
+
+
+
+  for ac_func in memrchr
+do :
+  ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
+if test "x$ac_cv_func_memrchr" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMRCHR 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+  if test $ac_cv_func_memrchr = no; then
+    :
+  fi
+
+
+
+
+  GNULIB_MEMRCHR=1
+
+
+
+$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
+
+
+
+  # Code from module mkdir:
+
+
+  :
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
+$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
+if test "${gl_cv_func_mkdir_trailing_slash_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -rf conftest.dir
+      if test "$cross_compiling" = yes; then :
+  gl_cv_func_mkdir_trailing_slash_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#       include <sys/types.h>
+#       include <sys/stat.h>
+
+int
+main ()
+{
+return mkdir ("conftest.dir/", 0700);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mkdir_trailing_slash_works=yes
+else
+  gl_cv_func_mkdir_trailing_slash_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    rm -rf conftest.dir
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
+$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
+  if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then
+    REPLACE_MKDIR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
+
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
+$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
+if test "${gl_cv_func_mkdir_trailing_dot_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -rf conftest.dir
+      if test "$cross_compiling" = yes; then :
+  gl_cv_func_mkdir_trailing_dot_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#       include <sys/types.h>
+#       include <sys/stat.h>
+
+int
+main ()
+{
+return !mkdir ("conftest.dir/./", 0700);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mkdir_trailing_dot_works=yes
+else
+  gl_cv_func_mkdir_trailing_dot_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    rm -rf conftest.dir
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
+$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
+  if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then
+    REPLACE_MKDIR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
+
+
+$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
+
+  fi
+
+  # Code from module mktime:
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+if test $APPLE_UNIVERSAL_BUILD = 1; then
+  # A universal build on Apple MacOS X platforms.
+  # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
+  # But we need a configuration result that is valid in both modes.
+  ac_cv_func_working_mktime=no
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
+$as_echo_n "checking for working mktime... " >&6; }
+if test "${ac_cv_func_working_mktime+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_working_mktime=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Test program from Paul Eggert and Tony Leneis.  */
+#include <limits.h>
+#include <stdlib.h>
+#include <time.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifndef HAVE_ALARM
+# define alarm(X) /* empty */
+#endif
+
+/* Work around redefinition to rpl_putenv by other config tests.  */
+#undef putenv
+
+static time_t time_t_max;
+static time_t time_t_min;
+
+/* Values we'll use to set the TZ environment variable.  */
+static char *tz_strings[] = {
+  (char *) 0, "TZ=GMT0", "TZ=JST-9",
+  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
+};
+#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
+
+/* Return 0 if mktime fails to convert a date in the spring-forward gap.
+   Based on a problem report from Andreas Jaeger.  */
+static int
+spring_forward_gap ()
+{
+  /* glibc (up to about 1998-10-07) failed this test. */
+  struct tm tm;
+
+  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+     instead of "TZ=America/Vancouver" in order to detect the bug even
+     on systems that don't support the Olson extension, or don't have the
+     full zoneinfo tables installed.  */
+  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+
+  tm.tm_year = 98;
+  tm.tm_mon = 3;
+  tm.tm_mday = 5;
+  tm.tm_hour = 2;
+  tm.tm_min = 0;
+  tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+  return mktime (&tm) != (time_t) -1;
+}
+
+static int
+mktime_test1 (time_t now)
+{
+  struct tm *lt;
+  return ! (lt = localtime (&now)) || mktime (lt) == now;
+}
+
+static int
+mktime_test (time_t now)
+{
+  return (mktime_test1 (now)
+          && mktime_test1 ((time_t) (time_t_max - now))
+          && mktime_test1 ((time_t) (time_t_min + now)));
+}
+
+static int
+irix_6_4_bug ()
+{
+  /* Based on code from Ariel Faigon.  */
+  struct tm tm;
+  tm.tm_year = 96;
+  tm.tm_mon = 3;
+  tm.tm_mday = 0;
+  tm.tm_hour = 0;
+  tm.tm_min = 0;
+  tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+  mktime (&tm);
+  return tm.tm_mon == 2 && tm.tm_mday == 31;
+}
+
+static int
+bigtime_test (int j)
+{
+  struct tm tm;
+  time_t now;
+  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
+  now = mktime (&tm);
+  if (now != (time_t) -1)
+    {
+      struct tm *lt = localtime (&now);
+      if (! (lt
+             && lt->tm_year == tm.tm_year
+             && lt->tm_mon == tm.tm_mon
+             && lt->tm_mday == tm.tm_mday
+             && lt->tm_hour == tm.tm_hour
+             && lt->tm_min == tm.tm_min
+             && lt->tm_sec == tm.tm_sec
+             && lt->tm_yday == tm.tm_yday
+             && lt->tm_wday == tm.tm_wday
+             && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+                  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+        return 0;
+    }
+  return 1;
+}
+
+static int
+year_2050_test ()
+{
+  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
+     ignoring leap seconds.  */
+  unsigned long int answer = 2527315200UL;
+
+  struct tm tm;
+  time_t t;
+  tm.tm_year = 2050 - 1900;
+  tm.tm_mon = 2 - 1;
+  tm.tm_mday = 1;
+  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+
+  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+     instead of "TZ=America/Vancouver" in order to detect the bug even
+     on systems that don't support the Olson extension, or don't have the
+     full zoneinfo tables installed.  */
+  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+
+  t = mktime (&tm);
+
+  /* Check that the result is either a failure, or close enough
+     to the correct answer that we can assume the discrepancy is
+     due to leap seconds.  */
+  return (t == (time_t) -1
+          || (0 < t && answer - 120 <= t && t <= answer + 120));
+}
+
+int
+main ()
+{
+  int result = 0;
+  time_t t, delta;
+  int i, j;
+  int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
+  int time_t_signed = ! ((time_t) 0 < (time_t) -1);
+
+  /* This test makes some buggy mktime implementations loop.
+     Give up after 60 seconds; a mktime slower than that
+     isn't worth using anyway.  */
+  alarm (60);
+
+  time_t_max = (! time_t_signed
+                ? (time_t) -1
+                : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
+                   * 2 + 1));
+  time_t_min = (! time_t_signed
+                ? (time_t) 0
+                : time_t_signed_magnitude
+                ? ~ (time_t) 0
+                : ~ time_t_max);
+
+  delta = time_t_max / 997; /* a suitable prime number */
+  for (i = 0; i < N_STRINGS; i++)
+    {
+      if (tz_strings[i])
+        putenv (tz_strings[i]);
+
+      for (t = 0; t <= time_t_max - delta; t += delta)
+        if (! mktime_test (t))
+          result |= 1;
+      if (! (mktime_test ((time_t) 1)
+             && mktime_test ((time_t) (60 * 60))
+             && mktime_test ((time_t) (60 * 60 * 24))))
+        result |= 2;
+
+      for (j = 1; ; j <<= 1)
+        if (! bigtime_test (j))
+          result |= 4;
+        else if (INT_MAX / 2 < j)
+          break;
+      if (! bigtime_test (INT_MAX))
+        result |= 8;
+    }
+  if (! irix_6_4_bug ())
+    result |= 16;
+  if (! spring_forward_gap ())
+    result |= 32;
+  if (! year_2050_test ())
+    result |= 64;
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_working_mktime=yes
+else
+  ac_cv_func_working_mktime=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
+$as_echo "$ac_cv_func_working_mktime" >&6; }
+if test $ac_cv_func_working_mktime = no; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
+
+fi
+
+    if test $ac_cv_func_working_mktime = no; then
+    REPLACE_MKTIME=1
+
+
+
+  else
+    REPLACE_MKTIME=0
+  fi
+
+
+
+
+  GNULIB_MKTIME=1
+
+
+
+$as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
+
+
+
+  # Code from module modechange:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS modechange.$ac_objext"
+
+
+  # Code from module modf:
+
+
+
+  MODF_LIBM=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modf can be used without linking with libm" >&5
+$as_echo_n "checking whether modf can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_modf_no_libm+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             double (*funcptr) (double, double *) = modf;
+             double d_ret;
+int
+main ()
+{
+double y = funcptr (1.6180339887, &d_ret);
+             return y < 0.3 || y > 1.7;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_func_modf_no_libm=yes
+else
+  gl_cv_func_modf_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_modf_no_libm" >&5
+$as_echo "$gl_cv_func_modf_no_libm" >&6; }
+  if test $gl_cv_func_modf_no_libm = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modf can be used with libm" >&5
+$as_echo_n "checking whether modf can be used with libm... " >&6; }
+if test "${gl_cv_func_modf_in_libm+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               double (*funcptr) (double, double *) = modf;
+               double d_ret;
+int
+main ()
+{
+double y = funcptr (1.6180339887, &d_ret);
+               return y < 0.3 || y > 1.7;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_func_modf_in_libm=yes
+else
+  gl_cv_func_modf_in_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LIBS="$save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_modf_in_libm" >&5
+$as_echo "$gl_cv_func_modf_in_libm" >&6; }
+    if test $gl_cv_func_modf_in_libm = yes; then
+      MODF_LIBM=-lm
+    fi
+  fi
+
+
+
+
+  # Code from module mountlist:
+
+
+for ac_func in listmntent getmntinfo
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+  :
+
+
+
+
+
+
+
+
+
+# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses
+# NGROUPS (as the array dimension for a struct member) without a definition.
+for ac_header in sys/ucred.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "#include <grp.h>
+"
+if test "x$ac_cv_header_sys_ucred_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_UCRED_H 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/mount.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default
+   #if HAVE_SYS_PARAM_H
+     #include <sys/param.h>
+    #endif
+"
+if test "x$ac_cv_header_sys_mount_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_MOUNT_H 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in mntent.h sys/fs_types.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    getfsstat_includes="\
+$ac_includes_default
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */
+#endif
+#if HAVE_SYS_UCRED_H
+# include <grp.h> /* needed for definition of NGROUPS */
+# include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
+#endif
+#if HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#if HAVE_SYS_FS_TYPES_H
+# include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */
+#endif
+"
+ac_fn_c_check_member "$LINENO" "struct fsstat" "f_fstypename" "ac_cv_member_struct_fsstat_f_fstypename" "$getfsstat_includes
+"
+if test "x$ac_cv_member_struct_fsstat_f_fstypename" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_FSSTAT_F_FSTYPENAME 1
+_ACEOF
+
+
+fi
+
+
+# Determine how to get the list of mounted file systems.
+ac_list_mounted_fs=
+
+# If the getmntent function is available but not in the standard library,
+# make sure LIBS contains the appropriate -l option.
+# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
+# -lseq on Dynix/PTX, -lgen on Unixware.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5
+$as_echo_n "checking for library containing getmntent... " >&6; }
+if test "${ac_cv_search_getmntent+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getmntent ();
+int
+main ()
+{
+return getmntent ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' sun seq gen; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_getmntent=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_getmntent+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_getmntent+set}" = set; then :
+
+else
+  ac_cv_search_getmntent=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5
+$as_echo "$ac_cv_search_getmntent" >&6; }
+ac_res=$ac_cv_search_getmntent
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+for ac_func in getmntent
+do :
+  ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
+if test "x$ac_cv_func_getmntent" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETMNTENT 1
+_ACEOF
+
+fi
+done
+
+
+
+# This test must precede the ones for getmntent because Unicos-9 is
+# reported to have the getmntent function, but its support is incompatible
+# with other getmntent implementations.
+
+# NOTE: Normally, I wouldn't use a check for system type as I've done for
+# `CRAY' below since that goes against the whole autoconf philosophy.  But
+# I think there is too great a chance that some non-Cray system has a
+# function named listmntent to risk the false positive.
+
+if test -z "$ac_list_mounted_fs"; then
+  # Cray UNICOS 9
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for listmntent of Cray/Unicos-9" >&5
+$as_echo_n "checking for listmntent of Cray/Unicos-9... " >&6; }
+  if test "${fu_cv_sys_mounted_cray_listmntent+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  fu_cv_sys_mounted_cray_listmntent=no
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef _CRAY
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  test $ac_cv_func_listmntent = yes \
+            && fu_cv_sys_mounted_cray_listmntent=yes
+
+fi
+rm -f conftest*
+
+
+
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_cray_listmntent" >&5
+$as_echo "$fu_cv_sys_mounted_cray_listmntent" >&6; }
+  if test $fu_cv_sys_mounted_cray_listmntent = yes; then
+    ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_LISTMNTENT 1" >>confdefs.h
+
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # AIX.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mntctl function and struct vmount" >&5
+$as_echo_n "checking for mntctl function and struct vmount... " >&6; }
+  if test "${fu_cv_sys_mounted_vmount+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <fshelp.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  fu_cv_sys_mounted_vmount=yes
+else
+  fu_cv_sys_mounted_vmount=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_vmount" >&5
+$as_echo "$fu_cv_sys_mounted_vmount" >&6; }
+  if test $fu_cv_sys_mounted_vmount = yes; then
+    ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_VMOUNT 1" >>confdefs.h
+
+  fi
+fi
+
+if test $ac_cv_func_getmntent = yes; then
+
+  # This system has the getmntent function.
+  # Determine whether it's the one-argument variant or the two-argument one.
+
+  if test -z "$ac_list_mounted_fs"; then
+    # 4.3BSD, SunOS, HP-UX, Dynix, Irix
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for one-argument getmntent function" >&5
+$as_echo_n "checking for one-argument getmntent function... " >&6; }
+    if test "${fu_cv_sys_mounted_getmntent1+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */
+#include <stdio.h>
+
+#include <mntent.h>
+#if !defined MOUNTED
+# if defined _PATH_MOUNTED      /* GNU libc  */
+#  define MOUNTED _PATH_MOUNTED
+# endif
+# if defined MNT_MNTTAB /* HP-UX.  */
+#  define MOUNTED MNT_MNTTAB
+# endif
+# if defined MNTTABNAME /* Dynix.  */
+#  define MOUNTED MNTTABNAME
+# endif
+#endif
+
+int
+main ()
+{
+ struct mntent *mnt = 0; char *table = MOUNTED;
+                         if (sizeof mnt && sizeof table) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  fu_cv_sys_mounted_getmntent1=yes
+else
+  fu_cv_sys_mounted_getmntent1=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent1" >&5
+$as_echo "$fu_cv_sys_mounted_getmntent1" >&6; }
+    if test $fu_cv_sys_mounted_getmntent1 = yes; then
+      ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_GETMNTENT1 1" >>confdefs.h
+
+    fi
+  fi
+
+  if test -z "$ac_list_mounted_fs"; then
+    # SVR4
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument getmntent function" >&5
+$as_echo_n "checking for two-argument getmntent function... " >&6; }
+    if test "${fu_cv_sys_mounted_getmntent2+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/mnttab.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "getmntent" >/dev/null 2>&1; then :
+  fu_cv_sys_mounted_getmntent2=yes
+else
+  fu_cv_sys_mounted_getmntent2=no
+fi
+rm -f conftest*
+
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent2" >&5
+$as_echo "$fu_cv_sys_mounted_getmntent2" >&6; }
+    if test $fu_cv_sys_mounted_getmntent2 = yes; then
+      ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_GETMNTENT2 1" >>confdefs.h
+
+      for ac_func in hasmntopt
+do :
+  ac_fn_c_check_func "$LINENO" "hasmntopt" "ac_cv_func_hasmntopt"
+if test "x$ac_cv_func_hasmntopt" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_HASMNTOPT 1
+_ACEOF
+
+fi
+done
+
+    fi
+  fi
+
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # DEC Alpha running OSF/1, and Apple Darwin 1.3.
+  # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getfsstat function" >&5
+$as_echo_n "checking for getfsstat function... " >&6; }
+  if test "${fu_cv_sys_mounted_getfsstat+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
+# define FS_TYPE(Ent) ((Ent).f_fstypename)
+#else
+# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
+#endif
+$getfsstat_includes
+
+int
+main ()
+{
+struct statfs *stats;
+        int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT);
+        char *t = FS_TYPE (*stats);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  fu_cv_sys_mounted_getfsstat=yes
+else
+  fu_cv_sys_mounted_getfsstat=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getfsstat" >&5
+$as_echo "$fu_cv_sys_mounted_getfsstat" >&6; }
+  if test $fu_cv_sys_mounted_getfsstat = yes; then
+    ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_GETFSSTAT 1" >>confdefs.h
+
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # SVR3
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIXME existence of three headers" >&5
+$as_echo_n "checking for FIXME existence of three headers... " >&6; }
+  if test "${fu_cv_sys_mounted_fread_fstyp+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/statfs.h>
+#include <sys/fstyp.h>
+#include <mnttab.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  fu_cv_sys_mounted_fread_fstyp=yes
+else
+  fu_cv_sys_mounted_fread_fstyp=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread_fstyp" >&5
+$as_echo "$fu_cv_sys_mounted_fread_fstyp" >&6; }
+  if test $fu_cv_sys_mounted_fread_fstyp = yes; then
+    ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_FREAD_FSTYP 1" >>confdefs.h
+
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # 4.4BSD and DEC OSF/1.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmntinfo function" >&5
+$as_echo_n "checking for getmntinfo function... " >&6; }
+  if test "${fu_cv_sys_mounted_getmntinfo+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      test "$ac_cv_func_getmntinfo" = yes \
+          && fu_cv_sys_mounted_getmntinfo=yes \
+          || fu_cv_sys_mounted_getmntinfo=no
+
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo" >&5
+$as_echo "$fu_cv_sys_mounted_getmntinfo" >&6; }
+  if test $fu_cv_sys_mounted_getmntinfo = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getmntinfo returns statvfs structures" >&5
+$as_echo_n "checking whether getmntinfo returns statvfs structures... " >&6; }
+    if test "${fu_cv_sys_mounted_getmntinfo2+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#include <sys/types.h>
+#if HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#if HAVE_SYS_STATVFS_H
+# include <sys/statvfs.h>
+#endif
+extern int getmntinfo (struct statfs **, int);
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  fu_cv_sys_mounted_getmntinfo2=no
+else
+  fu_cv_sys_mounted_getmntinfo2=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo2" >&5
+$as_echo "$fu_cv_sys_mounted_getmntinfo2" >&6; }
+    if test $fu_cv_sys_mounted_getmntinfo2 = no; then
+      ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_GETMNTINFO 1" >>confdefs.h
+
+    else
+      ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_GETMNTINFO2 1" >>confdefs.h
+
+    fi
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # Ultrix
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmnt function" >&5
+$as_echo_n "checking for getmnt function... " >&6; }
+  if test "${fu_cv_sys_mounted_getmnt+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/fs_types.h>
+#include <sys/mount.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  fu_cv_sys_mounted_getmnt=yes
+else
+  fu_cv_sys_mounted_getmnt=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmnt" >&5
+$as_echo "$fu_cv_sys_mounted_getmnt" >&6; }
+  if test $fu_cv_sys_mounted_getmnt = yes; then
+    ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_GETMNT 1" >>confdefs.h
+
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # BeOS
+  for ac_func in next_dev fs_stat_dev
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+  for ac_header in fs_info.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "fs_info.h" "ac_cv_header_fs_info_h" "$ac_includes_default"
+if test "x$ac_cv_header_fs_info_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_FS_INFO_H 1
+_ACEOF
+
+fi
+
+done
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BEOS mounted file system support functions" >&5
+$as_echo_n "checking for BEOS mounted file system support functions... " >&6; }
+  if test $ac_cv_header_fs_info_h = yes \
+      && test $ac_cv_func_next_dev = yes \
+        && test $ac_cv_func_fs_stat_dev = yes; then
+    fu_result=yes
+  else
+    fu_result=no
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_result" >&5
+$as_echo "$fu_result" >&6; }
+  if test $fu_result = yes; then
+    ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_FS_STAT_DEV 1" >>confdefs.h
+
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # SVR2
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to resort to fread on /etc/mnttab" >&5
+$as_echo_n "checking whether it is possible to resort to fread on /etc/mnttab... " >&6; }
+  if test "${fu_cv_sys_mounted_fread+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <mnttab.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  fu_cv_sys_mounted_fread=yes
+else
+  fu_cv_sys_mounted_fread=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread" >&5
+$as_echo "$fu_cv_sys_mounted_fread" >&6; }
+  if test $fu_cv_sys_mounted_fread = yes; then
+    ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_FREAD 1" >>confdefs.h
+
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # Interix / BSD alike statvfs
+  # the code is really interix specific, so make sure, we're on it.
+  case "$host" in
+  *-interix*)
+    for ac_func in statvfs
+do :
+  ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
+if test "x$ac_cv_func_statvfs" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STATVFS 1
+_ACEOF
+
+fi
+done
+
+    if test $ac_cv_func_statvfs = yes; then
+      ac_list_mounted_fs=found
+
+$as_echo "#define MOUNTED_INTERIX_STATVFS 1" >>confdefs.h
+
+    fi
+    ;;
+  esac
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  as_fn_error $? "could not determine how to read list of mounted file systems" "$LINENO" 5
+  # FIXME -- no need to abort building the whole package
+  # Can't build mountlist.c or anything that needs its functions
+fi
+
+if test $ac_list_mounted_fs = found; then :
+  gl_cv_list_mounted_fs=yes
+else
+  gl_cv_list_mounted_fs=no
+fi
+
+
+  if test $gl_cv_list_mounted_fs = yes; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mountlist.$ac_objext"
+
+
+    for ac_header in sys/mntent.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/mntent.h" "ac_cv_header_sys_mntent_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mntent_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_MNTENT_H 1
+_ACEOF
+
+fi
+
+done
+
+
+  ac_fn_c_check_member "$LINENO" "struct statfs" "f_fstypename" "ac_cv_member_struct_statfs_f_fstypename" "
+      #include <sys/types.h>
+      #include <sys/param.h>
+      #include <sys/mount.h>
+
+"
+if test "x$ac_cv_member_struct_statfs_f_fstypename" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1
+_ACEOF
+
+
+fi
+
+
+
+  fi
+
+  # Code from module multiarch:
+
+  # Code from module nl_langinfo:
+
+
+
+
+  :
+
+
+
+
+
+     if test $ac_cv_func_nl_langinfo = yes; then
+    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
+$as_echo_n "checking whether YESEXPR works... " >&6; }
+if test "${gl_cv_func_nl_langinfo_yesexpr_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+
+         case "$host_os" in
+                   # Guess no on irix systems.
+           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
+                   # Guess yes elsewhere.
+           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
+         esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+
+int
+main ()
+{
+return !*nl_langinfo(YESEXPR);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_nl_langinfo_yesexpr_works=yes
+else
+  gl_cv_func_nl_langinfo_yesexpr_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
+$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
+    case $gl_cv_func_nl_langinfo_yesexpr_works in
+      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
+      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
+    esac
+
+cat >>confdefs.h <<_ACEOF
+#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
+_ACEOF
+
+    if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
+        && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
+      :
+    else
+      REPLACE_NL_LANGINFO=1
+
+$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
+
+    fi
+  else
+    HAVE_NL_LANGINFO=0
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_NL_LANGINFO=1
+
+
+
+$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
+
+
+
+  # Code from module open:
+
+
+  case "$host_os" in
+    mingw* | pw*)
+
+
+  REPLACE_OPEN=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
+
+
+
+
+  :
+
+
+      ;;
+    *)
+
+  :
+
+
+
+
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
+$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
+if test "${gl_cv_func_open_slash+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # Assume that if we have lstat, we can also check symlinks.
+          if test $ac_cv_func_lstat = yes; then
+            touch conftest.tmp
+            ln -s conftest.tmp conftest.lnk
+          fi
+          if test "$cross_compiling" = yes; then :
+
+             case "$host_os" in
+               freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
+                 gl_cv_func_open_slash="guessing no" ;;
+               *)
+                 gl_cv_func_open_slash="guessing yes" ;;
+             esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+  int result = 0;
+#if HAVE_LSTAT
+  if (open ("conftest.lnk/", O_RDONLY) != -1)
+    result |= 1;
+#endif
+  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
+    result |= 2;
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_open_slash=yes
+else
+  gl_cv_func_open_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+          rm -f conftest.sl conftest.tmp conftest.lnk
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
+$as_echo "$gl_cv_func_open_slash" >&6; }
+      case "$gl_cv_func_open_slash" in
+        *no)
+
+$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+
+
+  REPLACE_OPEN=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
+
+
+
+
+  :
+
+
+          ;;
+      esac
+      ;;
+  esac
+
+
+
+
+  GNULIB_OPEN=1
+
+
+
+$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
+
+
+
+  # Code from module openat:
+
+
+  GNULIB_OPENAT=1
+
+
+  GNULIB_FCHMODAT=1
+  GNULIB_FSTATAT=1
+  GNULIB_MKDIRAT=1
+
+
+  GNULIB_FCHOWNAT=1
+  GNULIB_UNLINKAT=1
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  for ac_func in fchmodat fstatat mkdirat openat unlinkat
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+
+  case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
+  yes+yes)
+    # GNU/Hurd has unlinkat, but it has the same bug as unlink.
+    if test $REPLACE_UNLINK = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
+
+      REPLACE_UNLINKAT=1
+    fi ;;
+  yes+*)
+    # Solaris 9 has *at functions, but uniformly mishandles trailing
+    # slash in all of them.
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
+
+    REPLACE_OPENAT=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
+
+    REPLACE_FSTATAT=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
+
+    REPLACE_UNLINKAT=1
+    ;;
+  *)
+    HAVE_OPENAT=0
+    HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
+    HAVE_FSTATAT=0 # No known system with fstatat but not openat
+
+
+
+  :
+;;
+  esac
+  if test $ac_cv_func_fchmodat != yes; then
+    HAVE_FCHMODAT=0
+  fi
+  if test $ac_cv_func_mkdirat != yes; then
+    HAVE_MKDIRAT=0
+  fi
+
+
+
+  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
+if test "x$ac_cv_func_fchownat" = x""yes; then :
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
+$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
+if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+     gl_dangle=conftest.dangle
+     # Remove any remnants of a previous test.
+     rm -f $gl_dangle
+     # Arrange for deletion of the temporary file this test creates.
+     ac_clean_files="$ac_clean_files $gl_dangle"
+     ln -s conftest.no-such $gl_dangle
+     if test "$cross_compiling" = yes; then :
+  gl_cv_func_fchownat_nofollow_works=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+int
+main ()
+{
+  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
+                    AT_SYMLINK_NOFOLLOW) != 0
+          && errno == ENOENT);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fchownat_nofollow_works=yes
+else
+  gl_cv_func_fchownat_nofollow_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
+$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
+  if test $gl_cv_func_fchownat_nofollow_works = no; then :
+  REPLACE_FCHOWNAT=1
+
+$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
+
+
+fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
+$as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
+if test "${gl_cv_func_fchownat_empty_filename_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_fchownat_empty_filename_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+            #include <fcntl.h>
+
+int
+main ()
+{
+int fd;
+            int ret;
+            if (mkdir ("conftestdir", 0700) < 0)
+              return 2;
+            fd = open ("conftestdir", O_RDONLY);
+            if (fd < 0)
+              return 3;
+            ret = fchownat (fd, "", -1, -1, 0);
+            close (fd);
+            rmdir ("conftestdir");
+            return ret == 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_fchownat_empty_filename_works=yes
+else
+  gl_cv_func_fchownat_empty_filename_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
+$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
+  if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
+  REPLACE_FCHOWNAT=1
+
+$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
+
+
+fi
+
+     if test $REPLACE_CHOWN = 1; then
+       REPLACE_FCHOWNAT=1
+     fi
+else
+  HAVE_FCHOWNAT=0
+fi
+
+  if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
+
+  fi
+
+
+  # Code from module openat-die:
+  # Code from module openat-safer:
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS openat-safer.$ac_objext"
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_OPENAT_SAFER 1
+_ACEOF
+
+
+  # Code from module parse-datetime:
+
+
+
+
+
+
+  ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+"
+if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TM_TM_ZONE 1
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
+
+else
+  ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
+"
+if test "x$ac_cv_have_decl_tzname" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_TZNAME $ac_have_decl
+_ACEOF
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
+$as_echo_n "checking for tzname... " >&6; }
+if test "${ac_cv_var_tzname+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+#if !HAVE_DECL_TZNAME
+extern char *tzname[];
+#endif
+
+int
+main ()
+{
+return tzname[0][0];
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_var_tzname=yes
+else
+  ac_cv_var_tzname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
+$as_echo "$ac_cv_var_tzname" >&6; }
+  if test $ac_cv_var_tzname = yes; then
+
+$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
+
+  fi
+fi
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <time.h> /* for time_t */
+#include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
+#define TYPE_MINIMUM(t) \
+  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t) \
+  ((t) ((t) 0 < (t) -1 \
+        ? (t) -1 \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
+typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+$as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+  # Code from module pathmax:
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  # Code from module perror:
+
+
+
+  if test -n "$ERRNO_H"; then
+            REPLACE_PERROR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_PERROR=1
+
+
+
+$as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h
+
+
+
+  # Code from module progname:
+  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
+_ACEOF
+
+  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
+_ACEOF
+
+  # Code from module quote:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS quote.$ac_objext"
+
+
+
+  # Code from module quotearg:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext"
+
+
+  # Code from module quotearg-simple:
+  # Code from module readlink:
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_readlink = no; then
+    HAVE_READLINK=0
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
+
+
+  :
+
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
+$as_echo_n "checking whether readlink signature is correct... " >&6; }
+if test "${gl_cv_decl_readlink_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+      /* Cause compilation failure if original declaration has wrong type.  */
+      ssize_t readlink (const char *, char *, size_t);
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_decl_readlink_works=yes
+else
+  gl_cv_decl_readlink_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
+$as_echo "$gl_cv_decl_readlink_works" >&6; }
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
+$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_readlink_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # We have readlink, so assume ln -s works.
+       ln -s conftest.no-such conftest.link
+       ln -s conftest.link conftest.lnk2
+       if test "$cross_compiling" = yes; then :
+  gl_cv_func_readlink_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+
+int
+main ()
+{
+char buf[20];
+      return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_readlink_works=yes
+else
+  gl_cv_func_readlink_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      rm -f conftest.link conftest.lnk2
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
+$as_echo "$gl_cv_func_readlink_works" >&6; }
+    if test "$gl_cv_func_readlink_works" != yes; then
+
+$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+      REPLACE_READLINK=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
+
+    elif test "$gl_cv_decl_readlink_works" != yes; then
+      REPLACE_READLINK=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
+
+    fi
+  fi
+
+
+
+
+  GNULIB_READLINK=1
+
+
+
+$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
+
+
+
+  # Code from module readlinkat:
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_readlinkat = no; then
+    HAVE_READLINKAT=0
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_READLINKAT=1
+
+
+
+$as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h
+
+
+
+  # Code from module realloc:
+  # Code from module realloc-gnu:
+
+
+    for ac_header in stdlib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
+$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
+if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_realloc_0_nonnull=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *realloc ();
+#endif
+
+int
+main ()
+{
+return ! realloc (0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_realloc_0_nonnull=yes
+else
+  ac_cv_func_realloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
+if test $ac_cv_func_realloc_0_nonnull = yes; then :
+
+$as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h
+
+else
+  $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
+
+  REPLACE_REALLOC=1
+
+
+fi
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_REALLOC_GNU 1
+_ACEOF
+
+
+  # Code from module realloc-posix:
+
+
+
+  if test $gl_cv_func_malloc_posix = yes; then
+
+$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
+
+  else
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
+
+  REPLACE_REALLOC=1
+
+  fi
+
+
+
+
+  GNULIB_REALLOC_POSIX=1
+
+
+
+$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
+
+
+
+  # Code from module regex:
+
+
+# Check whether --with-included-regex was given.
+if test "${with_included_regex+set}" = set; then :
+  withval=$with_included_regex;
+fi
+
+
+  case $with_included_regex in #(
+  yes|no) ac_use_included_regex=$with_included_regex
+        ;;
+  '')
+    # If the system regex support is good enough that it passes the
+    # following run test, then default to *not* using the included regex.c.
+    # If cross compiling, assume the test would fail and use the included
+    # regex.c.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
+$as_echo_n "checking for working re_compile_pattern... " >&6; }
+if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+         gl_cv_func_re_compile_pattern_working=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+           #include <locale.h>
+           #include <limits.h>
+           #include <regex.h>
+
+int
+main ()
+{
+int result = 0;
+            static struct re_pattern_buffer regex;
+            unsigned char folded_chars[UCHAR_MAX + 1];
+            int i;
+            const char *s;
+            struct re_registers regs;
+
+            /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+               This test needs valgrind to catch the bug on Debian
+               GNU/Linux 3.1 x86, but it might catch the bug better
+               on other platforms and it shouldn't hurt to try the
+               test here.  */
+            if (setlocale (LC_ALL, "en_US.UTF-8"))
+              {
+                static char const pat[] = "insert into";
+                static char const data[] =
+                  "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+                re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+                               | RE_ICASE);
+                memset (&regex, 0, sizeof regex);
+                s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+                if (s)
+                  result |= 1;
+                else if (re_search (&regex, data, sizeof data - 1,
+                                    0, sizeof data - 1, &regs)
+                         != -1)
+                  result |= 1;
+                if (! setlocale (LC_ALL, "C"))
+                  return 1;
+              }
+
+            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
+            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("a[^x]b", 6, &regex);
+            if (s)
+              result |= 2;
+            /* This should fail, but succeeds for glibc-2.5.  */
+            else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+              result |= 2;
+
+            /* This regular expression is from Spencer ere test number 75
+               in grep-2.3.  */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+            memset (&regex, 0, sizeof regex);
+            for (i = 0; i <= UCHAR_MAX; i++)
+              folded_chars[i] = i;
+            regex.translate = folded_chars;
+            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
+            /* This should fail with _Invalid character class name_ error.  */
+            if (!s)
+              result |= 4;
+
+            /* Ensure that [b-a] is diagnosed as invalid, when
+               using RE_NO_EMPTY_RANGES. */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("a[b-a]", 6, &regex);
+            if (s == 0)
+              result |= 8;
+
+            /* This should succeed, but does not for glibc-2.1.3.  */
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("{1", 2, &regex);
+            if (s)
+              result |= 8;
+
+            /* The following example is derived from a problem report
+               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("[an\371]*n", 7, &regex);
+            if (s)
+              result |= 8;
+            /* This should match, but does not for glibc-2.2.1.  */
+            else if (re_match (&regex, "an", 2, 0, &regs) != 2)
+              result |= 8;
+
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("x", 1, &regex);
+            if (s)
+              result |= 8;
+            /* glibc-2.2.93 does not work with a negative RANGE argument.  */
+            else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+              result |= 8;
+
+            /* The version of regex.c in older versions of gnulib
+               ignored RE_ICASE.  Detect that problem too.  */
+            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("x", 1, &regex);
+            if (s)
+              result |= 16;
+            else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+              result |= 16;
+
+            /* Catch a bug reported by Vin Shelton in
+               http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+               */
+            re_set_syntax (RE_SYNTAX_POSIX_BASIC
+                           & ~RE_CONTEXT_INVALID_DUP
+                           & ~RE_NO_EMPTY_RANGES);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+            if (s)
+              result |= 32;
+
+            /* REG_STARTEND was added to glibc on 2004-01-15.
+               Reject older versions.  */
+            if (! REG_STARTEND)
+              result |= 64;
+
+#if 0
+            /* It would be nice to reject hosts whose regoff_t values are too
+               narrow (including glibc on hosts with 64-bit ptrdiff_t and
+               32-bit int), but we should wait until glibc implements this
+               feature.  Otherwise, support for equivalence classes and
+               multibyte collation symbols would always be broken except
+               when compiling --without-included-regex.   */
+            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+                || sizeof (regoff_t) < sizeof (ssize_t))
+              result |= 64;
+#endif
+
+            return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_re_compile_pattern_working=yes
+else
+  gl_cv_func_re_compile_pattern_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
+$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
+    case $gl_cv_func_re_compile_pattern_working in #(
+    yes) ac_use_included_regex=no;; #(
+    no) ac_use_included_regex=yes;;
+    esac
+    ;;
+  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
+    ;;
+  esac
+
+  if test $ac_use_included_regex = yes; then
+
+$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
+
+
+$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
+
+
+$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
+
+
+$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
+
+
+$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
+
+
+$as_echo "#define re_search rpl_re_search" >>confdefs.h
+
+
+$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
+
+
+$as_echo "#define re_match rpl_re_match" >>confdefs.h
+
+
+$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
+
+
+$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
+
+
+$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
+
+
+$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
+
+
+$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
+
+
+$as_echo "#define regexec rpl_regexec" >>confdefs.h
+
+
+$as_echo "#define regerror rpl_regerror" >>confdefs.h
+
+
+$as_echo "#define regfree rpl_regfree" >>confdefs.h
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
+
+
+
+
+
+
+  for ac_header in libintl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBINTL_H 1
+_ACEOF
+
+fi
+
+done
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
+"
+if test "x$ac_cv_have_decl_isblank" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISBLANK $ac_have_decl
+_ACEOF
+
+
+  fi
+
+  # Code from module rmdir:
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
+$as_echo_n "checking whether rmdir works... " >&6; }
+if test "${gl_cv_func_rmdir_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  mkdir conftest.dir
+     touch conftest.file
+     if test "$cross_compiling" = yes; then :
+  gl_cv_func_rmdir_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+           #include <errno.h>
+           #include <unistd.h>
+
+int
+main ()
+{
+int result = 0;
+      if (!rmdir ("conftest.file/"))
+        result |= 1;
+      else if (errno != ENOTDIR)
+        result |= 2;
+      if (!rmdir ("conftest.dir/./"))
+        result |= 4;
+      return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_rmdir_works=yes
+else
+  gl_cv_func_rmdir_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     rm -rf conftest.dir conftest.file
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
+$as_echo "$gl_cv_func_rmdir_works" >&6; }
+  if test x"$gl_cv_func_rmdir_works" != xyes; then
+    REPLACE_RMDIR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_RMDIR=1
+
+
+
+$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
+
+
+
+  # Code from module rpmatch:
+
+
+
+
+
+
+
+
+
+
+
+
+  for ac_func in rpmatch
+do :
+  ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
+if test "x$ac_cv_func_rpmatch" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_RPMATCH 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+  if test $ac_cv_func_rpmatch = no; then
+    HAVE_RPMATCH=0
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
+$as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
+if test "${gl_cv_langinfo_yesexpr+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(YESEXPR); return !cs;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_langinfo_yesexpr=yes
+else
+  gl_cv_langinfo_yesexpr=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
+$as_echo "$gl_cv_langinfo_yesexpr" >&6; }
+  if test $gl_cv_langinfo_yesexpr = yes; then
+
+$as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
+
+  fi
+
+  fi
+
+
+
+
+  GNULIB_RPMATCH=1
+
+
+
+$as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h
+
+
+
+  # Code from module same:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS same.$ac_objext"
+
+
+
+
+  :
+
+
+
+
+
+
+  # Code from module same-inode:
+  # Code from module save-cwd:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS save-cwd.$ac_objext"
+
+
+  :
+
+
+
+
+
+
+  # Code from module savedir:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS savedir.$ac_objext"
+
+
+  # Code from module selinux-at:
+  for ac_header in selinux/flask.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
+if test "x$ac_cv_header_selinux_flask_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SELINUX_FLASK_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext"
+
+  # Code from module selinux-h:
+
+
+  if test "$with_selinux" != no; then
+    for ac_header in selinux/selinux.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SELINUX_SELINUX_H 1
+_ACEOF
+
+fi
+
+done
+
+
+    if test "$ac_cv_header_selinux_selinux_h" = yes; then
+      # We do have <selinux/selinux.h>, so do compile getfilecon.c
+      # and arrange to use its wrappers.
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
+$as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
+if test "${gl_cv_next_selinux_selinux_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_selinux_selinux_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <selinux/selinux.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_selinux_selinux_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/selinux/selinux.h#{
+                    s#.*"\(.*/selinux/selinux.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
+$as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
+     fi
+     NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'selinux/selinux.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
+
+
+
+
+
+$as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
+
+
+$as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
+
+
+$as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
+
+    fi
+
+    case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
+      no:*) # already warned
+        ;;
+      *:no)
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
+$as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU findutils will be compiled without SELinux support." >&5
+$as_echo "$as_me: WARNING: GNU findutils will be compiled without SELinux support." >&2;}
+    esac
+  else
+    # Do as if <selinux/selinux.h> does not exist, even if
+    # AC_CHECK_HEADERS_ONCE has already determined that it exists.
+    $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
+
+  fi
+
+
+
+  if test "$with_selinux" != no; then
+    for ac_header in selinux/context.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
+if test "x$ac_cv_header_selinux_context_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SELINUX_CONTEXT_H 1
+_ACEOF
+ SELINUX_CONTEXT_H=
+else
+  SELINUX_CONTEXT_H=selinux/context.h
+fi
+
+done
+
+  else
+    SELINUX_CONTEXT_H=selinux/context.h
+  fi
+
+
+
+  # Code from module setenv:
+
+
+  if test $HAVE_SETENV$REPLACE_SETENV != 10; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_SETENV=1
+
+
+
+$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
+
+
+
+  # Code from module size_max:
+
+  for ac_header in stdint.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
+$as_echo_n "checking for SIZE_MAX... " >&6; }
+if test "${gl_cv_size_max+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    gl_cv_size_max=
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Found it" >/dev/null 2>&1; then :
+  gl_cv_size_max=yes
+fi
+rm -f conftest*
+
+    if test -z "$gl_cv_size_max"; then
+                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
+#include <limits.h>"; then :
+
+else
+  size_t_bits_minus_1=
+fi
+
+      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
+
+else
+  fits_in_uint=
+fi
+
+      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+        if test $fits_in_uint = 1; then
+                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+                 extern size_t foo;
+                 extern unsigned long foo;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  fits_in_uint=0
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        fi
+                                if test $fits_in_uint = 1; then
+          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        else
+          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        fi
+      else
+                gl_cv_size_max='((size_t)~(size_t)0)'
+      fi
+    fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
+$as_echo "$gl_cv_size_max" >&6; }
+  if test "$gl_cv_size_max" != yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define SIZE_MAX $gl_cv_size_max
+_ACEOF
+
+  fi
+
+
+  # Code from module snprintf:
+
+
+  gl_cv_func_snprintf_usable=no
+  for ac_func in snprintf
+do :
+  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SNPRINTF 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_snprintf = yes; then
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
+$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
+if test "${gl_cv_func_snprintf_size1+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      if test "$cross_compiling" = yes; then :
+  gl_cv_func_snprintf_size1="guessing yes"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+int main()
+{
+  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+  snprintf (buf, 1, "%d", 12345);
+  return buf[1] != 'E';
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_snprintf_size1=yes
+else
+  gl_cv_func_snprintf_size1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
+$as_echo "$gl_cv_func_snprintf_size1" >&6; }
+
+    case "$gl_cv_func_snprintf_size1" in
+      *yes)
+
+        case "$gl_cv_func_snprintf_retval_c99" in
+          *yes)
+            gl_cv_func_snprintf_usable=yes
+            ;;
+        esac
+        ;;
+    esac
+  fi
+  if test $gl_cv_func_snprintf_usable = no; then
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
+
+  if test $ac_cv_func_snprintf = yes; then
+    REPLACE_SNPRINTF=1
+  fi
+  :
+
+  fi
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_snprintf = no; then
+    HAVE_DECL_SNPRINTF=0
+  fi
+
+
+
+
+  GNULIB_SNPRINTF=1
+
+
+
+$as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_SNPRINTF 1
+_ACEOF
+
+
+  # Code from module ssize_t:
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
+$as_echo_n "checking for ssize_t... " >&6; }
+if test "${gt_cv_ssize_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+int
+main ()
+{
+int x = sizeof (ssize_t *) + sizeof (ssize_t);
+            return !x;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_ssize_t=yes
+else
+  gt_cv_ssize_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
+$as_echo "$gt_cv_ssize_t" >&6; }
+  if test $gt_cv_ssize_t = no; then
+
+$as_echo "#define ssize_t int" >>confdefs.h
+
+  fi
+
+  # Code from module stat:
+
+
+
+  :
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
+$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
+if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  case $host_os in
+            mingw*) gl_cv_func_stat_dir_slash="guessing no";;
+            *) gl_cv_func_stat_dir_slash="guessing yes";;
+          esac
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+
+int
+main ()
+{
+struct stat st; return stat (".", &st) != stat ("./", &st);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_stat_dir_slash=yes
+else
+  gl_cv_func_stat_dir_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
+$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
+$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
+if test "${gl_cv_func_stat_file_slash+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  touch conftest.tmp
+       # Assume that if we have lstat, we can also check symlinks.
+       if test $ac_cv_func_lstat = yes; then
+         ln -s conftest.tmp conftest.lnk
+       fi
+       if test "$cross_compiling" = yes; then :
+  gl_cv_func_stat_file_slash="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+
+int
+main ()
+{
+int result = 0;
+      struct stat st;
+      if (!stat ("conftest.tmp/", &st))
+        result |= 1;
+#if HAVE_LSTAT
+      if (!stat ("conftest.lnk/", &st))
+        result |= 2;
+#endif
+      return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_stat_file_slash=yes
+else
+  gl_cv_func_stat_file_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+       rm -f conftest.tmp conftest.lnk
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
+$as_echo "$gl_cv_func_stat_file_slash" >&6; }
+  case $gl_cv_func_stat_dir_slash in
+    *no) REPLACE_STAT=1
+
+$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
+;;
+  esac
+  case $gl_cv_func_stat_file_slash in
+    *no) REPLACE_STAT=1
+
+$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
+;;
+  esac
+  if test $REPLACE_STAT = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
+
+
+  fi
+
+
+
+
+  GNULIB_STAT=1
+
+
+
+$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
+
+
+
+  # Code from module stat-macros:
+  # Code from module stat-time:
+
+
+
+
+  :
+
+
+
+
+
+
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
+     #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
+$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
+if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+            #include <sys/types.h>
+            #include <sys/stat.h>
+            #if HAVE_SYS_TIME_H
+            # include <sys/time.h>
+            #endif
+            #include <time.h>
+            struct timespec ts;
+            struct stat st;
+
+int
+main ()
+{
+
+            st.st_atim = ts;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
+else
+  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
+$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
+     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
+
+$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
+
+     fi
+else
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
+        #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
+_ACEOF
+
+
+else
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
+           #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
+_ACEOF
+
+
+else
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
+              #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
+_ACEOF
+
+
+fi
+
+fi
+
+fi
+
+fi
+
+
+
+
+
+
+  :
+
+
+
+
+
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
+     #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
+_ACEOF
+
+
+else
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
+        #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
+_ACEOF
+
+
+else
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
+          #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
+_ACEOF
+
+
+fi
+
+fi
+
+fi
+
+
+  # Code from module stdarg:
+
+  STDARG_H='';
+  NEXT_STDARG_H='<stdarg.h>';
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
+$as_echo_n "checking for va_copy... " >&6; }
+  if test "${gl_cv_func_va_copy+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+int
+main ()
+{
+
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_va_copy=yes
+else
+  gl_cv_func_va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
+$as_echo "$gl_cv_func_va_copy" >&6; }
+  if test $gl_cv_func_va_copy = no; then
+                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined _AIX && !defined __GNUC__
+        AIX vaccine
+       #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "vaccine" >/dev/null 2>&1; then :
+  gl_aixcc=yes
+else
+  gl_aixcc=no
+fi
+rm -f conftest*
+
+    if test $gl_aixcc = yes; then
+            STDARG_H=stdarg.h
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdarg_h='<'stdarg.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
+$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
+if test "${gl_cv_next_stdarg_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/stdarg.h#{
+                    s#.*"\(.*/stdarg.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
+$as_echo "$gl_cv_next_stdarg_h" >&6; }
+     fi
+     NEXT_STDARG_H=$gl_cv_next_stdarg_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stdarg.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdarg_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
+
+
+
+
+            if test "$gl_cv_next_stdarg_h" = '""'; then
+        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
+        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
+      fi
+    else
+
+  saved_as_echo_n="$as_echo_n"
+  as_echo_n=':'
+  if test "${gl_cv_func___va_copy+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+int
+main ()
+{
+
+#ifndef __va_copy
+error, bail out
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func___va_copy=yes
+else
+  gl_cv_func___va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+  as_echo_n="$saved_as_echo_n"
+
+      if test $gl_cv_func___va_copy = yes; then
+
+$as_echo "#define va_copy __va_copy" >>confdefs.h
+
+      else
+
+
+$as_echo "#define va_copy gl_va_copy" >>confdefs.h
+
+      fi
+    fi
+  fi
+
+  # Code from module stdbool:
+
+
+
+  # Define two additional variables used in the Makefile substitution.
+
+  if test "$ac_cv_header_stdbool_h" = yes; then
+    STDBOOL_H=''
+  else
+    STDBOOL_H='stdbool.h'
+  fi
+
+
+  if test "$ac_cv_type__Bool" = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
+  fi
+
+
+  # Code from module stddef:
+
+
+
+  if test $gt_cv_c_wchar_t = no; then
+    HAVE_WCHAR_T=0
+    STDDEF_H=stddef.h
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if test "${gl_cv_decl_null_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+      int test[2 * (sizeof NULL == sizeof (void *)) -1];
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_decl_null_works=yes
+else
+  gl_cv_decl_null_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+$as_echo "$gl_cv_decl_null_works" >&6; }
+  if test $gl_cv_decl_null_works = no; then
+    REPLACE_NULL=1
+    STDDEF_H=stddef.h
+  fi
+  if test -n "$STDDEF_H"; then
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stddef_h='<'stddef.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
+if test "${gl_cv_next_stddef_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/stddef.h#{
+                    s#.*"\(.*/stddef.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+$as_echo "$gl_cv_next_stddef_h" >&6; }
+     fi
+     NEXT_STDDEF_H=$gl_cv_next_stddef_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stddef.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stddef_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
+
+
+
+
+  fi
+
+  # Code from module stdint:
+
+
+
+  if test $ac_cv_type_long_long_int = yes; then
+    HAVE_LONG_LONG_INT=1
+  else
+    HAVE_LONG_LONG_INT=0
+  fi
+
+
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    HAVE_UNSIGNED_LONG_LONG_INT=1
+  else
+    HAVE_UNSIGNED_LONG_LONG_INT=0
+  fi
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
+
+
+      if test $ac_cv_header_inttypes_h = yes; then
+    HAVE_INTTYPES_H=1
+  else
+    HAVE_INTTYPES_H=0
+  fi
+
+
+      if test $ac_cv_header_sys_types_h = yes; then
+    HAVE_SYS_TYPES_H=1
+  else
+    HAVE_SYS_TYPES_H=0
+  fi
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdint_h='<'stdint.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if test "${gl_cv_next_stdint_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_stdint_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdint.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/stdint.h#{
+                    s#.*"\(.*/stdint.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_stdint_h='<'stdint.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+$as_echo "$gl_cv_next_stdint_h" >&6; }
+     fi
+     NEXT_STDINT_H=$gl_cv_next_stdint_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stdint.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdint_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_stdint_h = yes; then
+    HAVE_STDINT_H=1
+  else
+    HAVE_STDINT_H=0
+  fi
+
+
+    if test $ac_cv_header_stdint_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_stdint_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_header_working_stdint_h=no
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t) \
+  ((t) ((t) 0 < (t) -1 \
+        ? (t) -1 \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+struct s {
+  int check_PTRDIFF:
+      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+      ? 1 : -1;
+  /* Detect bug in FreeBSD 6.0 / ia64.  */
+  int check_SIG_ATOMIC:
+      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+      ? 1 : -1;
+  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+  int check_WCHAR:
+      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+      ? 1 : -1;
+  /* Detect bug in mingw.  */
+  int check_WINT:
+      WINT_MIN == TYPE_MINIMUM (wint_t)
+      && WINT_MAX == TYPE_MAXIMUM (wint_t)
+      ? 1 : -1;
+
+  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
+  int check_UINT8_C:
+        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+  int check_UINT16_C:
+        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
+#ifdef UINT8_MAX
+  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+                                                    if test "$cross_compiling" = yes; then :
+                 gl_cv_header_working_stdint_h=yes
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+  {
+#ifdef INT8_MAX
+    MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+    MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+    MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+    MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+    MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+    MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+    MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+    MVAL (UINT64_MAX),
+#endif
+    NULL
+  };
+
+int
+main ()
+{
+
+  const char **mv;
+  for (mv = macro_values; *mv != NULL; mv++)
+    {
+      const char *value = *mv;
+      /* Test whether it looks like a cast expression.  */
+      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+          || strncmp (value, "((int)"/*)*/, 6) == 0
+          || strncmp (value, "((signed short)"/*)*/, 15) == 0
+          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+        return mv - macro_values + 1;
+    }
+  return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_header_working_stdint_h=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+  fi
+  if test "$gl_cv_header_working_stdint_h" = yes; then
+    STDINT_H=
+  else
+            for ac_header in sys/inttypes.h sys/bitypes.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    if test $ac_cv_header_sys_inttypes_h = yes; then
+      HAVE_SYS_INTTYPES_H=1
+    else
+      HAVE_SYS_INTTYPES_H=0
+    fi
+
+    if test $ac_cv_header_sys_bitypes_h = yes; then
+      HAVE_SYS_BITYPES_H=1
+    else
+      HAVE_SYS_BITYPES_H=0
+    fi
+
+
+
+
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+  for gltype in ptrdiff_t size_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+#include <limits.h>"; then :
+
+else
+  result=unknown
+fi
+
+       eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+                                                result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
+
+
+  fi
+
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+#include <limits.h>"; then :
+
+else
+  result=unknown
+fi
+
+       eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+                                                result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
+
+
+
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+$as_echo_n "checking whether $gltype is signed... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  result=yes
+else
+  result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       eval gl_cv_type_${gltype}_signed=\$result
+
+fi
+eval ac_res=\$gl_cv_type_${gltype}_signed
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_type_${gltype}_signed
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    if test "$result" = yes; then
+      cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+      eval HAVE_SIGNED_${GLTYPE}=1
+    else
+      eval HAVE_SIGNED_${GLTYPE}=0
+    fi
+  done
+
+
+  gl_cv_type_ptrdiff_t_signed=yes
+  gl_cv_type_size_t_signed=no
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+  for gltype in ptrdiff_t size_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
+         esac
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+              extern $gltype foo;
+              extern $gltype1 foo;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+  done
+
+
+  fi
+
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
+         esac
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+              extern $gltype foo;
+              extern $gltype1 foo;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+  done
+
+
+
+    STDINT_H=stdint.h
+  fi
+
+
+  # Code from module stdio:
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdio_h='<'stdio.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
+$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
+if test "${gl_cv_next_stdio_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/stdio.h#{
+                    s#.*"\(.*/stdio.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
+$as_echo "$gl_cv_next_stdio_h" >&6; }
+     fi
+     NEXT_STDIO_H=$gl_cv_next_stdio_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stdio.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdio_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
+
+
+
+
+      GNULIB_FPRINTF=1
+  GNULIB_PRINTF=1
+  GNULIB_VFPRINTF=1
+  GNULIB_VPRINTF=1
+  GNULIB_FPUTC=1
+  GNULIB_PUTC=1
+  GNULIB_PUTCHAR=1
+  GNULIB_FPUTS=1
+  GNULIB_PUTS=1
+  GNULIB_FWRITE=1
+
+
+
+    for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat     snprintf tmpfile vdprintf vsnprintf; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module stdlib:
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdlib_h='<'stdlib.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
+$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
+if test "${gl_cv_next_stdlib_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/stdlib.h#{
+                    s#.*"\(.*/stdlib.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
+$as_echo "$gl_cv_next_stdlib_h" >&6; }
+     fi
+     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stdlib.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdlib_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
+
+
+
+
+
+
+    for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp     mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r     setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt     unsetenv; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#if HAVE_SYS_LOADAVG_H
+# include <sys/loadavg.h>
+#endif
+#if HAVE_RANDOM_H
+# include <random.h>
+#endif
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module stpcpy:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  for ac_func in stpcpy
+do :
+  ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
+if test "x$ac_cv_func_stpcpy" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STPCPY 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+  if test $ac_cv_func_stpcpy = no; then
+    HAVE_STPCPY=0
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_STPCPY=1
+
+
+
+$as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
+
+
+
+  # Code from module strcase:
+
+
+
+
+
+
+
+
+
+
+
+  for ac_func in strcasecmp
+do :
+  ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRCASECMP 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+  if test $ac_cv_func_strcasecmp = no; then
+    HAVE_STRCASECMP=0
+
+  :
+
+  fi
+
+
+
+
+
+
+
+
+
+
+
+  for ac_func in strncasecmp
+do :
+  ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
+if test "x$ac_cv_func_strncasecmp" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRNCASECMP 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+  if test $ac_cv_func_strncasecmp = no; then
+
+  :
+
+  fi
+  ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strncasecmp" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNCASECMP $ac_have_decl
+_ACEOF
+
+  if test $ac_cv_have_decl_strncasecmp = no; then
+    HAVE_DECL_STRNCASECMP=0
+  fi
+
+
+  # Code from module strcasestr:
+
+
+  if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works in linear time" >&5
+$as_echo_n "checking whether strcasestr works in linear time... " >&6; }
+if test "${gl_cv_func_strcasestr_linear+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     && !defined __UCLIBC__
+  Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strcasestr_linear=yes
+else
+  gl_cv_func_strcasestr_linear="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <signal.h> /* for signal */
+#include <string.h> /* for strcasestr */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+static void quit (int sig) { exit (sig + 128); }
+
+int
+main ()
+{
+
+    int result = 0;
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    /* Failure to compile this test due to missing alarm is okay,
+       since all such platforms (mingw) also lack strcasestr.  */
+    signal (SIGALRM, quit);
+    alarm (5);
+    /* Check for quadratic performance.  */
+    if (haystack && needle)
+      {
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = 0;
+        memset (needle, 'A', m);
+        needle[m] = 'B';
+        needle[m + 1] = 0;
+        if (!strcasestr (haystack, needle))
+          result |= 1;
+      }
+    return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strcasestr_linear=yes
+else
+  gl_cv_func_strcasestr_linear=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_linear" >&5
+$as_echo "$gl_cv_func_strcasestr_linear" >&6; }
+    if test "$gl_cv_func_strcasestr_linear" != yes; then
+      REPLACE_STRCASESTR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
+
+
+  :
+
+    fi
+  fi
+
+  # Code from module strcasestr-simple:
+
+
+
+
+
+
+  for ac_func in strcasestr
+do :
+  ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
+if test "x$ac_cv_func_strcasestr" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRCASESTR 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_strcasestr = no; then
+    HAVE_STRCASESTR=0
+  else
+    if test "$gl_cv_func_memchr_works" != yes; then
+      REPLACE_STRCASESTR=1
+    else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5
+$as_echo_n "checking whether strcasestr works... " >&6; }
+if test "${gl_cv_func_strcasestr_works_always+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+                                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strcasestr_works_always=yes
+else
+  gl_cv_func_strcasestr_works_always="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <string.h> /* for strcasestr */
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
+
+int
+main ()
+{
+return !!strcasestr (HAYSTACK, NEEDLE);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strcasestr_works_always=yes
+else
+  gl_cv_func_strcasestr_works_always=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5
+$as_echo "$gl_cv_func_strcasestr_works_always" >&6; }
+      if test "$gl_cv_func_strcasestr_works_always" != yes; then
+        REPLACE_STRCASESTR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
+
+      fi
+    fi
+  fi
+  if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_STRCASESTR=1
+
+
+
+$as_echo "#define GNULIB_TEST_STRCASESTR 1" >>confdefs.h
+
+
+
+  # Code from module strdup-posix:
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_strdup = yes; then
+    if test $gl_cv_func_malloc_posix != yes; then
+      REPLACE_STRDUP=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
+
+      :
+    fi
+  else
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
+
+    :
+  fi
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_strdup = no; then
+    HAVE_DECL_STRDUP=0
+  fi
+
+
+
+
+  GNULIB_STRDUP=1
+
+
+
+$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
+
+
+
+  # Code from module streq:
+  # Code from module strerror:
+
+
+  if test $REPLACE_STRERROR = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
+
+
+cat >>confdefs.h <<_ACEOF
+#define REPLACE_STRERROR $REPLACE_STRERROR
+_ACEOF
+
+  fi
+
+
+
+
+  GNULIB_STRERROR=1
+
+
+
+$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
+
+
+
+  # Code from module strftime:
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strftime.$ac_objext"
+
+
+ # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+$as_echo "#define my_strftime nstrftime" >>confdefs.h
+
+
+
+  # Code from module string:
+
+
+
+  # Code from module strings:
+
+
+
+  # Code from module strndup:
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_strndup = no; then
+    HAVE_DECL_STRNDUP=0
+  fi
+
+  if test $ac_cv_func_strndup = yes; then
+    # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
+$as_echo_n "checking for working strndup... " >&6; }
+if test "${gl_cv_func_strndup_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+
+          case $host_os in
+            aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
+            *)               gl_cv_func_strndup_works="guessing yes";;
+          esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+         #include <string.h>
+                           #include <stdlib.h>
+int
+main ()
+{
+
+#ifndef HAVE_DECL_STRNDUP
+  extern char *strndup (const char *, size_t);
+#endif
+  char *s;
+  s = strndup ("some longer string", 15);
+  free (s);
+  s = strndup ("shorter string", 13);
+  return s[13] != '\0';
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strndup_works=yes
+else
+  gl_cv_func_strndup_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
+$as_echo "$gl_cv_func_strndup_works" >&6; }
+    case $gl_cv_func_strndup_works in
+      *no)
+        REPLACE_STRNDUP=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
+
+        ;;
+    esac
+  else
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_STRNDUP=1
+
+
+
+$as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
+
+
+
+  # Code from module strnlen:
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_strnlen = no; then
+    HAVE_DECL_STRNLEN=0
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
+$as_echo_n "checking for working strnlen... " >&6; }
+if test "${ac_cv_func_strnlen_working+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_strnlen_working=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+#define S "foobar"
+#define S_LEN (sizeof S - 1)
+
+  /* At least one implementation is buggy: that of AIX 4.3 would
+     give strnlen (S, 1) == 3.  */
+
+  int i;
+  for (i = 0; i < S_LEN + 1; ++i)
+    {
+      int expected = i <= S_LEN ? i : S_LEN;
+      if (strnlen (S, i) != expected)
+       return 1;
+    }
+  return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_strnlen_working=yes
+else
+  ac_cv_func_strnlen_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
+$as_echo "$ac_cv_func_strnlen_working" >&6; }
+test $ac_cv_func_strnlen_working = no &&
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
+
+
+        if test $ac_cv_func_strnlen_working = no; then
+      REPLACE_STRNLEN=1
+    fi
+  fi
+  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
+
+    :
+  fi
+
+
+
+
+  GNULIB_STRNLEN=1
+
+
+
+$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
+
+
+
+  # Code from module strnlen1:
+  # Code from module strstr:
+
+
+  if test $REPLACE_STRSTR = 0; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
+$as_echo_n "checking whether strstr works in linear time... " >&6; }
+if test "${gl_cv_func_strstr_linear+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     && !defined __UCLIBC__
+  Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strstr_linear=yes
+else
+  gl_cv_func_strstr_linear="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <signal.h> /* for signal */
+#include <string.h> /* for strstr */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+static void quit (int sig) { exit (sig + 128); }
+
+int
+main ()
+{
+
+    int result = 0;
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    /* Failure to compile this test due to missing alarm is okay,
+       since all such platforms (mingw) also have quadratic strstr.  */
+    signal (SIGALRM, quit);
+    alarm (5);
+    /* Check for quadratic performance.  */
+    if (haystack && needle)
+      {
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = 0;
+        memset (needle, 'A', m);
+        needle[m] = 'B';
+        needle[m + 1] = 0;
+        if (!strstr (haystack, needle))
+          result |= 1;
+      }
+    return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strstr_linear=yes
+else
+  gl_cv_func_strstr_linear=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
+$as_echo "$gl_cv_func_strstr_linear" >&6; }
+    if test "$gl_cv_func_strstr_linear" != yes; then
+      REPLACE_STRSTR=1
+    fi
+  fi
+  if test $REPLACE_STRSTR = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
+
+  fi
+
+  # Code from module strstr-simple:
+
+
+
+  if test "$gl_cv_func_memchr_works" != yes; then
+    REPLACE_STRSTR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
+
+  else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
+$as_echo_n "checking whether strstr works... " >&6; }
+if test "${gl_cv_func_strstr_works_always+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+                                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strstr_works_always=yes
+else
+  gl_cv_func_strstr_works_always="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <string.h> /* for strstr */
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
+
+int
+main ()
+{
+return !!strstr (HAYSTACK, NEEDLE);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strstr_works_always=yes
+else
+  gl_cv_func_strstr_works_always=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
+$as_echo "$gl_cv_func_strstr_works_always" >&6; }
+    if test "$gl_cv_func_strstr_works_always" != yes; then
+      REPLACE_STRSTR=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
+
+    fi
+  fi
+
+
+
+
+  GNULIB_STRSTR=1
+
+
+
+$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
+
+
+
+  # Code from module strtoimax:
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <inttypes.h> defines strtoimax as a macro" >&5
+$as_echo_n "checking whether <inttypes.h> defines strtoimax as a macro... " >&6; }
+if test "${gl_cv_func_strtoimax_macro+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <inttypes.h>
+#ifdef strtoimax
+ inttypes_h_defines_strtoimax
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "inttypes_h_defines_strtoimax" >/dev/null 2>&1; then :
+  gl_cv_func_strtoimax_macro=yes
+else
+  gl_cv_func_strtoimax_macro=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax_macro" >&5
+$as_echo "$gl_cv_func_strtoimax_macro" >&6; }
+
+  if test "$gl_cv_func_strtoimax_macro" != yes; then
+
+
+
+
+
+
+
+
+  for ac_func in strtoimax
+do :
+  ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
+if test "x$ac_cv_func_strtoimax" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOIMAX 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+    if test $ac_cv_func_strtoimax = no; then
+
+  ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOLL $ac_have_decl
+_ACEOF
+
+
+
+    fi
+  fi
+
+
+
+
+  GNULIB_STRTOIMAX=1
+
+
+  # Code from module strtol:
+
+
+
+
+
+
+
+
+
+  for ac_func in strtol
+do :
+  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
+if test "x$ac_cv_func_strtol" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOL 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+  # Code from module strtoll:
+
+
+
+  if test "$ac_cv_type_long_long_int" = yes; then
+
+
+
+
+
+
+
+
+  for ac_func in strtoll
+do :
+  ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
+if test "x$ac_cv_func_strtoll" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOLL 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+    if test $ac_cv_func_strtoll = no; then
+      HAVE_STRTOLL=0
+
+  :
+
+    fi
+  fi
+
+
+
+
+  GNULIB_STRTOLL=1
+
+
+
+$as_echo "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
+
+
+
+  # Code from module strtoul:
+
+
+
+
+
+
+
+
+
+  for ac_func in strtoul
+do :
+  ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
+if test "x$ac_cv_func_strtoul" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOUL 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+  # Code from module strtoull:
+
+
+
+  if test "$ac_cv_type_unsigned_long_long_int" = yes; then
+
+
+
+
+
+
+
+
+  for ac_func in strtoull
+do :
+  ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
+if test "x$ac_cv_func_strtoull" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOULL 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+    if test $ac_cv_func_strtoull = no; then
+      HAVE_STRTOULL=0
+
+  :
+
+    fi
+  fi
+
+
+
+
+  GNULIB_STRTOULL=1
+
+
+
+$as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
+
+
+
+  # Code from module strtoumax:
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <inttypes.h> defines strtoumax as a macro" >&5
+$as_echo_n "checking whether <inttypes.h> defines strtoumax as a macro... " >&6; }
+if test "${gl_cv_func_strtoumax_macro+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <inttypes.h>
+#ifdef strtoumax
+ inttypes_h_defines_strtoumax
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "inttypes_h_defines_strtoumax" >/dev/null 2>&1; then :
+  gl_cv_func_strtoumax_macro=yes
+else
+  gl_cv_func_strtoumax_macro=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoumax_macro" >&5
+$as_echo "$gl_cv_func_strtoumax_macro" >&6; }
+
+  if test "$gl_cv_func_strtoumax_macro" != yes; then
+
+
+
+
+
+
+
+
+  for ac_func in strtoumax
+do :
+  ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax"
+if test "x$ac_cv_func_strtoumax" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOUMAX 1
+_ACEOF
+
+else
+
+    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+    if test $ac_cv_func_strtoumax = no; then
+
+  ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOULL $ac_have_decl
+_ACEOF
+
+
+
+    fi
+  fi
+
+
+
+
+  GNULIB_STRTOUMAX=1
+
+
+  # Code from module sys_stat:
+
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
+$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
+if test "${gl_cv_next_sys_stat_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_sys_stat_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/sys/stat.h#{
+                    s#.*"\(.*/sys/stat.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
+$as_echo "$gl_cv_next_sys_stat_h" >&6; }
+     fi
+     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/stat.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
+
+
+
+
+
+      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
+     #include <sys/stat.h>
+"
+if test "x$ac_cv_type_nlink_t" = x""yes; then :
+
+else
+
+$as_echo "#define nlink_t int" >>confdefs.h
+
+fi
+
+
+
+    for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+
+  # Code from module sys_time:
+
+
+
+
+  # Code from module sys_wait:
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
+$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
+if test "${gl_cv_next_sys_wait_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_sys_wait_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/wait.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/sys/wait.h#{
+                    s#.*"\(.*/sys/wait.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
+$as_echo "$gl_cv_next_sys_wait_h" >&6; }
+     fi
+     NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/wait.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_wait_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
+
+
+
+
+
+
+    for gl_func in waitpid; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/wait.h>
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+
+  # Code from module time:
+
+
+
+  # Code from module time_r:
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_localtime_r = no; then
+    HAVE_DECL_LOCALTIME_R=0
+  fi
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_localtime_r = yes; then
+    HAVE_LOCALTIME_R=1
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
+$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
+if test "${gl_cv_time_r_posix+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+int
+main ()
+{
+/* We don't need to append 'restrict's to the argument types,
+                 even though the POSIX signature has the 'restrict's,
+                 since C99 says they can't affect type compatibility.  */
+              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
+              if (ptr) return 0;
+              /* Check the return type is a pointer.
+                 On HP-UX 10 it is 'int'.  */
+              *localtime_r (0, 0);
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_time_r_posix=yes
+else
+  gl_cv_time_r_posix=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
+$as_echo "$gl_cv_time_r_posix" >&6; }
+    if test $gl_cv_time_r_posix = yes; then
+      REPLACE_LOCALTIME_R=0
+    else
+      REPLACE_LOCALTIME_R=1
+    fi
+  else
+    HAVE_LOCALTIME_R=0
+  fi
+  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_TIME_R=1
+
+
+
+$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
+
+
+
+  # Code from module timespec:
+
+
+
+  # Code from module unistd:
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_unistd_h='<'unistd.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
+$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
+if test "${gl_cv_next_unistd_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_unistd_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/unistd.h#{
+                    s#.*"\(.*/unistd.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_unistd_h='<'unistd.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
+$as_echo "$gl_cv_next_unistd_h" >&6; }
+     fi
+     NEXT_UNISTD_H=$gl_cv_next_unistd_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'unistd.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_unistd_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_unistd_h = yes; then
+    HAVE_UNISTD_H=1
+  else
+    HAVE_UNISTD_H=0
+  fi
+
+
+
+    for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat     fsync ftruncate getcwd getdomainname getdtablesize getgroups     gethostname getlogin getlogin_r getpagesize getusershell setusershell     endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink     readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat     usleep; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+/* Some systems declare various items in the wrong headers.  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#  include <io.h>
+# endif
+#endif
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module unistd-safer:
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS dup-safer.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS fd-safer.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS pipe-safer.$ac_objext"
+
+
+  # Code from module unitypes:
+
+
+      if  { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+
+
+
+            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
+            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
+                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
+                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
+                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
+                         }
+                    }
+               }
+
+
+
+
+       }
+  }; then
+    LIBUNISTRING_UNITYPES_H='unitypes.h'
+  else
+    LIBUNISTRING_UNITYPES_H=
+  fi
+
+
+  # Code from module uniwidth/base:
+
+
+      if  { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+
+
+
+            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
+            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
+                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
+                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
+                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
+                         }
+                    }
+               }
+
+
+
+
+       }
+  }; then
+    LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
+  else
+    LIBUNISTRING_UNIWIDTH_H=
+  fi
+
+
+  # Code from module uniwidth/width:
+
+
+       if  { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+
+
+
+            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
+            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
+                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
+                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
+                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
+                         }
+                    }
+               }
+
+
+
+
+       }
+  }; then
+  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
+  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
+else
+  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
+  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
+fi
+
+
+  # Code from module unlink:
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
+$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
+if test "${gl_cv_func_unlink_honors_slashes+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  touch conftest.file
+     # Assume that if we have lstat, we can also check symlinks.
+     if test $ac_cv_func_lstat = yes; then
+       ln -s conftest.file conftest.lnk
+     fi
+     if test "$cross_compiling" = yes; then :
+  gl_cv_func_unlink_honors_slashes="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+           #include <errno.h>
+
+int
+main ()
+{
+int result = 0;
+           if (!unlink ("conftest.file/"))
+             result |= 1;
+           else if (errno != ENOTDIR)
+             result |= 2;
+#if HAVE_LSTAT
+           if (!unlink ("conftest.lnk/"))
+             result |= 4;
+           else if (errno != ENOTDIR)
+             result |= 8;
+#endif
+           return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_unlink_honors_slashes=yes
+else
+  gl_cv_func_unlink_honors_slashes=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     rm -f conftest.file conftest.lnk
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
+$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
+$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
+if test "${gl_cv_func_unlink_parent_fails+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$host_os" in
+       darwin*)
+                                                      if {
+              # Use the mktemp program if available. If not available, hide the error
+              # message.
+              tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
+              test -n "$tmp" && test -d "$tmp"
+            } ||
+            {
+              # Use a simple mkdir command. It is guaranteed to fail if the directory
+              # already exists.  $RANDOM is bash specific and expands to empty in shells
+              # other than bash, ksh and zsh.  Its use does not increase security;
+              # rather, it minimizes the probability of failure in a very cluttered /tmp
+              # directory.
+              tmp=/tmp/gt$$-$RANDOM
+              (umask 077 && mkdir "$tmp")
+            }; then
+           mkdir "$tmp/subdir"
+           GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
+           export GL_SUBDIR_FOR_UNLINK
+           if test "$cross_compiling" = yes; then :
+  gl_cv_func_unlink_parent_fails="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+                #include <stdlib.h>
+                #include <unistd.h>
+                int main ()
+                {
+                  int result = 0;
+                  if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
+                    result |= 1;
+                  else if (unlink ("..") == 0)
+                    result |= 2;
+                  return result;
+                }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_unlink_parent_fails=yes
+else
+  gl_cv_func_unlink_parent_fails=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+           unset GL_SUBDIR_FOR_UNLINK
+           rm -rf "$tmp"
+         else
+           gl_cv_func_unlink_parent_fails="guessing no"
+         fi
+         ;;
+       *)
+         gl_cv_func_unlink_parent_fails="guessing yes"
+         ;;
+     esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
+$as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
+  case "$gl_cv_func_unlink_parent_fails" in
+    *no)
+
+$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
+
+      ;;
+  esac
+  if test "$gl_cv_func_unlink_honors_slashes" != yes \
+     || { case "$gl_cv_func_unlink_parent_fails" in
+            *yes) false;;
+            *no) true;;
+          esac
+        }; then
+    REPLACE_UNLINK=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_UNLINK=1
+
+
+
+$as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
+
+
+
+  # Code from module unsetenv:
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_unsetenv = no; then
+    HAVE_DECL_UNSETENV=0
+  fi
+  for ac_func in unsetenv
+do :
+  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
+if test "x$ac_cv_func_unsetenv" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_UNSETENV 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_unsetenv = no; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
+
+
+
+
+  :
+
+
+
+
+
+
+  else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
+$as_echo_n "checking for unsetenv() return type... " >&6; }
+if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#undef _BSD
+#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
+#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+int unsetenv (const char *name);
+#else
+int unsetenv();
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_func_unsetenv_ret='int'
+else
+  gt_cv_func_unsetenv_ret='void'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
+$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
+    if test $gt_cv_func_unsetenv_ret = 'void'; then
+
+$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
+
+      REPLACE_UNSETENV=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
+
+    fi
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
+$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
+if test "${gl_cv_func_unsetenv_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_unsetenv_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+       #include <stdlib.h>
+       #include <errno.h>
+       extern char **environ;
+
+int
+main ()
+{
+
+       char entry1[] = "a=1";
+       char entry2[] = "b=2";
+       char *env[] = { entry1, entry2, NULL };
+       if (putenv ((char *) "a=1")) return 1;
+       if (putenv (entry2)) return 2;
+       entry2[0] = 'a';
+       unsetenv ("a");
+       if (getenv ("a")) return 3;
+       if (!unsetenv ("") || errno != EINVAL) return 4;
+       entry2[0] = 'b';
+       environ = env;
+       if (!getenv ("a")) return 5;
+       entry2[0] = 'a';
+       unsetenv ("a");
+       if (getenv ("a")) return 6;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_unsetenv_works=yes
+else
+  gl_cv_func_unsetenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
+$as_echo "$gl_cv_func_unsetenv_works" >&6; }
+    if test "$gl_cv_func_unsetenv_works" != yes; then
+      REPLACE_UNSETENV=1
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
+
+    fi
+  fi
+
+
+
+
+  GNULIB_UNSETENV=1
+
+
+
+$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
+
+
+
+  # Code from module unused-parameter:
+  # Code from module update-copyright:
+  # Code from module useless-if-before-free:
+  # Code from module vasnprintf:
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_vasnprintf = no; then
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
+
+  if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+
+
+
+
+
+  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "#define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+  fi
+
+  # Code from module vc-list-files:
+  # Code from module verify:
+  # Code from module version-etc:
+
+# Check whether --with-packager was given.
+if test "${with_packager+set}" = set; then :
+  withval=$with_packager;       case $withval in
+        yes|no) ;;
+        *)
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_PACKAGER "$withval"
+_ACEOF
+ ;;
+      esac
+
+fi
+
+
+
+# Check whether --with-packager-version was given.
+if test "${with_packager_version+set}" = set; then :
+  withval=$with_packager_version;       case $withval in
+        yes|no) ;;
+        *)
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_PACKAGER_VERSION "$withval"
+_ACEOF
+ ;;
+      esac
+
+fi
+
+
+
+# Check whether --with-packager-bug-reports was given.
+if test "${with_packager_bug_reports+set}" = set; then :
+  withval=$with_packager_bug_reports;       case $withval in
+        yes|no) ;;
+        *)
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
+_ACEOF
+ ;;
+      esac
+
+fi
+
+
+  if test "X$with_packager" = "X" && \
+     test "X$with_packager_version$with_packager_bug_reports" != "X"
+  then
+    as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
+  fi
+
+  # Code from module version-etc-fsf:
+  # Code from module warn-on-use:
+  # Code from module warnings:
+
+  # Code from module wchar:
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_wchar_h='<'wchar.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
+$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
+if test "${gl_cv_next_wchar_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_wchar_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <wchar.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/wchar.h#{
+                    s#.*"\(.*/wchar.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_wchar_h='<'wchar.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
+$as_echo "$gl_cv_next_wchar_h" >&6; }
+     fi
+     NEXT_WCHAR_H=$gl_cv_next_wchar_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'wchar.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_wchar_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
+
+
+
+
+
+  if test $gt_cv_c_wint_t = yes; then
+    HAVE_WINT_T=1
+  else
+    HAVE_WINT_T=0
+  fi
+
+
+
+    for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb      wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset      wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp      wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr      wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth     ; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module wcrtomb:
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                     # Guess no on AIX and OSF/1.
+        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+                     # Guess yes otherwise.
+        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+      esac
+      if test $LOCALE_JA != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        if (mbsinit (&state))
+          return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_incomplete_state=yes
+else
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                    # Guess no on Solaris 8.
+        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+                    # Guess yes otherwise.
+        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+      esac
+      if test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8:
+     mbrtowc returns 2, and sets wc to 0x00F0.
+     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 6, &state) != 4
+          && mbtowc (&wc, input + 3, 6) == 4)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_sanitycheck=yes
+else
+  gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+    REPLACE_MBSTATE_T=0
+    case "$gl_cv_func_mbrtowc_incomplete_state" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+    case "$gl_cv_func_mbrtowc_sanitycheck" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+  else
+    REPLACE_MBSTATE_T=1
+  fi
+  if test $REPLACE_MBSTATE_T = 1; then
+
+    :
+
+  fi
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_wcrtomb = no; then
+    HAVE_WCRTOMB=0
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_WCRTOMB=1
+    else
+
+
+
+
+
+             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
+$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
+if test "${gl_cv_func_wcrtomb_retval+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                              case "$host_os" in
+                                     # Guess no on AIX 4, OSF/1 and Solaris.
+            aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+                                     # Guess yes otherwise.
+            *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
+          esac
+          if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+            if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 1;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 2;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 4;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 8;
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_wcrtomb_retval=yes
+else
+  gl_cv_func_wcrtomb_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+          fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
+$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
+      case "$gl_cv_func_wcrtomb_retval" in
+        *yes) ;;
+        *) REPLACE_WCRTOMB=1 ;;
+      esac
+    fi
+  fi
+  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+
+    :
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_WCRTOMB=1
+
+
+
+$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
+
+
+
+  # Code from module wctype-h:
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_iswcntrl = yes; then
+    HAVE_ISWCNTRL=1
+  else
+    HAVE_ISWCNTRL=0
+  fi
+
+
+
+
+
+  if test $gt_cv_c_wint_t = yes; then
+    HAVE_WINT_T=1
+  else
+    HAVE_WINT_T=0
+  fi
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_wctype_h='<'wctype.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
+$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
+if test "${gl_cv_next_wctype_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_wctype_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <wctype.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+                                                            gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                  sed -n '\#/wctype.h#{
+                    s#.*"\(.*/wctype.h\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'
+          else
+               gl_cv_next_wctype_h='<'wctype.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
+$as_echo "$gl_cv_next_wctype_h" >&6; }
+     fi
+     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'wctype.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_wctype_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_wctype_h = yes; then
+    if test $ac_cv_func_iswcntrl = yes; then
+                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
+$as_echo_n "checking whether iswcntrl works... " >&6; }
+if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+          if test "$cross_compiling" = yes; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+                          #if __GNU_LIBRARY__ == 1
+                          Linux libc5 i18n is broken.
+                          #endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_iswcntrl_works=yes
+else
+  gl_cv_func_iswcntrl_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+                  included before <wchar.h>.
+                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+                  must be included before <wchar.h>.  */
+               #include <stddef.h>
+               #include <stdio.h>
+               #include <time.h>
+               #include <wchar.h>
+               #include <wctype.h>
+               int main () { return iswprint ('x') == 0; }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_iswcntrl_works=yes
+else
+  gl_cv_func_iswcntrl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
+$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
+    fi
+    HAVE_WCTYPE_H=1
+  else
+    HAVE_WCTYPE_H=0
+  fi
+
+
+  if test "$gl_cv_func_iswcntrl_works" = no; then
+    REPLACE_ISWCNTRL=1
+  else
+    REPLACE_ISWCNTRL=0
+  fi
+
+
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+        :
+  fi
+
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
+$as_echo_n "checking for wctype_t... " >&6; }
+if test "${gl_cv_type_wctype_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+               included before <wchar.h>.
+               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+               must be included before <wchar.h>.  */
+            #include <stddef.h>
+            #include <stdio.h>
+            #include <time.h>
+            #include <wchar.h>
+            #if HAVE_WCTYPE_H
+            # include <wctype.h>
+            #endif
+            wctype_t a;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_wctype_t=yes
+else
+  gl_cv_type_wctype_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
+$as_echo "$gl_cv_type_wctype_t" >&6; }
+  if test $gl_cv_type_wctype_t = no; then
+    HAVE_WCTYPE_T=0
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
+$as_echo_n "checking for wctrans_t... " >&6; }
+if test "${gl_cv_type_wctrans_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+               included before <wchar.h>.
+               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+               must be included before <wchar.h>.  */
+            #include <stddef.h>
+            #include <stdio.h>
+            #include <time.h>
+            #include <wchar.h>
+            #include <wctype.h>
+            wctrans_t a;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_wctrans_t=yes
+else
+  gl_cv_type_wctrans_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
+$as_echo "$gl_cv_type_wctrans_t" >&6; }
+  if test $gl_cv_type_wctrans_t = no; then
+    HAVE_WCTRANS_T=0
+  fi
+
+
+    for gl_func in wctype iswctype wctrans towctrans     ; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# include <wchar.h>
+#endif
+#include <wctype.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+  # Code from module wcwidth:
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_wcwidth" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_WCWIDTH $ac_have_decl
+_ACEOF
+
+  if test $ac_cv_have_decl_wcwidth != yes; then
+    HAVE_DECL_WCWIDTH=0
+  fi
+
+  if test $ac_cv_func_wcwidth = yes; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
+$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
+if test "${gl_cv_func_wcwidth_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        if test "$cross_compiling" = yes; then :
+
+           case "$host_os" in
+                     # Guess yes on glibc and AIX 7 systems.
+             *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
+             *)                  gl_cv_func_wcwidth_works="guessing no";;
+           esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#if !HAVE_DECL_WCWIDTH
+extern
+# ifdef __cplusplus
+"C"
+# endif
+int wcwidth (int);
+#endif
+int main ()
+{
+  int result = 0;
+  if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
+    {
+      if (wcwidth (0x0301) > 0)
+        result |= 1;
+      if (wcwidth (0x200B) > 0)
+        result |= 2;
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_wcwidth_works=yes
+else
+  gl_cv_func_wcwidth_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
+$as_echo "$gl_cv_func_wcwidth_works" >&6; }
+    case "$gl_cv_func_wcwidth_works" in
+      *yes) ;;
+      *no) REPLACE_WCWIDTH=1 ;;
+    esac
+  fi
+  if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
+
+  fi
+  if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1 \
+     || test $HAVE_DECL_WCWIDTH = 0; then
+
+    :
+
+  fi
+
+
+
+
+  GNULIB_WCWIDTH=1
+
+
+
+$as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
+
+
+
+  # Code from module xalloc:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext"
+
+
+
+
+  :
+
+
+  :
+
+
+  # Code from module xalloc-die:
+  # Code from module xgetcwd:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS xgetcwd.$ac_objext"
+
+
+
+
+  # Code from module xsize:
+
+
+
+  for ac_header in stdint.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+
+  # Code from module xstrndup:
+
+
+  :
+
+
+  # Code from module xstrtod:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS xstrtod.$ac_objext"
+
+
+  # Code from module xstrtol:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS xstrtol.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS xstrtoul.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS xstrtol-error.$ac_objext"
+
+
+  # Code from module xstrtoumax:
+  # Code from module yesno:
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS yesno.$ac_objext"
+
+
+    :
+
+  # End of code from modules
+
+
+
+
+
+
+
+
+
+  gltests_libdeps=
+  gltests_ltlibdeps=
+
+
+
+
+
+
+
+
+
+  gl_source_base='tests'
+  gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
+
+  gl_module_indicator_condition=$gltests_WITNESS
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+     one byte long. This excludes the UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Win32 locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
+            else
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
+              else
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+  LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+     one byte long. This excludes the UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Win32 locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
+            else
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
+              else
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+  LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
+$as_echo_n "checking for a turkish Unicode locale... " >&6; }
+if test "${gt_cv_locale_tr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  But BeOS does not
+     implement the Turkish upper-/lowercase mappings.  Therefore, let this
+     program return 1 on BeOS.  */
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the eighth month, the second
+     character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+    return 1;
+  /* Check whether the upper-/lowercase mappings are as expected for
+     Turkish.  */
+  if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+      || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+    return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_tr_utf8=Turkish_Turkey.65001
+          else
+            # None found.
+            gt_cv_locale_tr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_tr_utf8=tr_TR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_tr_utf8=tr_TR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_tr_utf8=tr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_tr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    else
+      gt_cv_locale_tr_utf8=none
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
+$as_echo "$gt_cv_locale_tr_utf8" >&6; }
+  LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+
+
+
+  :
+
+
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_FD_SAFER_FLAG $gl_module_indicator_condition
+_ACEOF
+
+
+
+
+
+
+    if test $REPLACE_FTELLO != 0; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS ftell.$ac_objext"
+
+    REPLACE_FTELL=1
+  fi
+
+
+
+
+  GNULIB_FTELL=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
+
+
+
+
+
+
+
+
+  for ac_func in getpagesize
+do :
+  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_getpagesize = no; then
+    HAVE_GETPAGESIZE=0
+    for ac_header in OS.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
+if test "x$ac_cv_header_OS_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OS_H 1
+_ACEOF
+
+fi
+
+done
+
+    if test $ac_cv_header_OS_h = yes; then
+      HAVE_OS_H=1
+    fi
+    for ac_header in sys/param.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_PARAM_H 1
+_ACEOF
+
+fi
+
+done
+
+    if test $ac_cv_header_sys_param_h = yes; then
+      HAVE_SYS_PARAM_H=1
+    fi
+  fi
+  case "$host_os" in
+    mingw*)
+      REPLACE_GETPAGESIZE=1
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext"
+
+      ;;
+  esac
+      ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getpagesize" = x""yes; then :
+
+else
+  HAVE_DECL_GETPAGESIZE=0
+fi
+
+
+
+
+
+  GNULIB_GETPAGESIZE=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS getugroups.$ac_objext"
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+  :
+
+  :
+  :
+  :
+  :
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+  for ac_func in setlocale uselocale
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+  :
+
+
+
+
+
+
+
+  if test "$gl_threads_api" = posix; then
+    # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+    # pthread_rwlock_* functions.
+    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
+"
+if test "x$ac_cv_type_pthread_rwlock_t" = x""yes; then :
+
+$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
+
+fi
+
+    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+      #include <pthread.h>
+int
+main ()
+{
+
+#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  fi
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+     one byte long. This excludes the UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Win32 locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
+            else
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
+              else
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+  LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
+     on Cygwin 1.5.x.  */
+  if (MB_CUR_MAX == 1)
+    return 1;
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
+          # and CP932 is very different from EUC-JP, so we cannot use it here.
+          gt_cv_locale_ja=none
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the AIX locale name.
+          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_ja=ja_JP
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_ja=ja_JP.EUC-JP
+            else
+              # Test for the HP-UX, OSF/1, NetBSD locale name.
+              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_ja=ja_JP.eucJP
+              else
+                # Test for the IRIX, FreeBSD locale name.
+                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_ja=ja_JP.EUC
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_ja=ja
+                  else
+                    # Special test for NetBSD 1.6.
+                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+                      gt_cv_locale_ja=ja_JP.eucJP
+                    else
+                      # None found.
+                      gt_cv_locale_ja=none
+                    fi
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+  LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  /* Check whether a typical GB18030 multibyte sequence is recognized as a
+     single wide character.  This excludes the GB2312 and GBK encodings.  */
+  if (mblen ("\203\062\332\066", 5) != 4)
+    return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
+    else
+      # If there was a link error, due to mblen(), the system is so old that
+      # it certainly doesn't have a chinese locale.
+      gt_cv_locale_zh_CN=none
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
+$as_echo_n "checking for a turkish Unicode locale... " >&6; }
+if test "${gt_cv_locale_tr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  But BeOS does not
+     implement the Turkish upper-/lowercase mappings.  Therefore, let this
+     program return 1 on BeOS.  */
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the eighth month, the second
+     character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+    return 1;
+  /* Check whether the upper-/lowercase mappings are as expected for
+     Turkish.  */
+  if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+      || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+    return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_tr_utf8=Turkish_Turkey.65001
+          else
+            # None found.
+            gt_cv_locale_tr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_tr_utf8=tr_TR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_tr_utf8=tr_TR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_tr_utf8=tr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_tr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    else
+      gt_cv_locale_tr_utf8=none
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
+$as_echo "$gt_cv_locale_tr_utf8" >&6; }
+  LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  /* Check whether a typical GB18030 multibyte sequence is recognized as a
+     single wide character.  This excludes the GB2312 and GBK encodings.  */
+  if (mblen ("\203\062\332\066", 5) != 4)
+    return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
+    else
+      # If there was a link error, due to mblen(), the system is so old that
+      # it certainly doesn't have a chinese locale.
+      gt_cv_locale_zh_CN=none
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+     one byte long. This excludes the UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Win32 locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
+            else
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
+              else
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+  LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
+     on Cygwin 1.5.x.  */
+  if (MB_CUR_MAX == 1)
+    return 1;
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
+          # and CP932 is very different from EUC-JP, so we cannot use it here.
+          gt_cv_locale_ja=none
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the AIX locale name.
+          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_ja=ja_JP
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_ja=ja_JP.EUC-JP
+            else
+              # Test for the HP-UX, OSF/1, NetBSD locale name.
+              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_ja=ja_JP.eucJP
+              else
+                # Test for the IRIX, FreeBSD locale name.
+                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_ja=ja_JP.EUC
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_ja=ja
+                  else
+                    # Special test for NetBSD 1.6.
+                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+                      gt_cv_locale_ja=ja_JP.eucJP
+                    else
+                      # None found.
+                      gt_cv_locale_ja=none
+                    fi
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+  LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  /* Check whether a typical GB18030 multibyte sequence is recognized as a
+     single wide character.  This excludes the GB2312 and GBK encodings.  */
+  if (mblen ("\203\062\332\066", 5) != 4)
+    return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
+    else
+      # If there was a link error, due to mblen(), the system is so old that
+      # it certainly doesn't have a chinese locale.
+      gt_cv_locale_zh_CN=none
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  /* Check whether a typical GB18030 multibyte sequence is recognized as a
+     single wide character.  This excludes the GB2312 and GBK encodings.  */
+  if (mblen ("\203\062\332\066", 5) != 4)
+    return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
+    else
+      # If there was a link error, due to mblen(), the system is so old that
+      # it certainly doesn't have a chinese locale.
+      gt_cv_locale_zh_CN=none
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+  # irrelevant for anonymous mappings.
+  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+  gl_have_mmap=yes
+else
+  gl_have_mmap=no
+fi
+
+
+  # Try to allow MAP_ANONYMOUS.
+  gl_have_mmap_anonymous=no
+  if test $gl_have_mmap = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+  gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    if test $gl_have_mmap_anonymous != yes; then
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+         gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+    if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+    fi
+  fi
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+  # irrelevant for anonymous mappings.
+  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+  gl_have_mmap=yes
+else
+  gl_have_mmap=no
+fi
+
+
+  # Try to allow MAP_ANONYMOUS.
+  gl_have_mmap_anonymous=no
+  if test $gl_have_mmap = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+  gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    if test $gl_have_mmap_anonymous != yes; then
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+         gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+    if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+    fi
+  fi
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS mgetgroups.$ac_objext"
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+     one byte long. This excludes the UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Win32 locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
+            else
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
+              else
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+  LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+  :
+
+
+
+
+
+
+
+  for ac_func in getppriv
+do :
+  ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
+if test "x$ac_cv_func_getppriv" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPPRIV 1
+_ACEOF
+
+fi
+done
+
+
+  :
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
+$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
+if test "${gl_cv_func_svid_putenv+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+               gl_cv_func_svid_putenv=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+    /* Put it in env.  */
+    if (putenv ("CONFTEST_putenv=val"))
+      return 1;
+
+    /* Try to remove it.  */
+    if (putenv ("CONFTEST_putenv"))
+      return 2;
+
+    /* Make sure it was deleted.  */
+    if (getenv ("CONFTEST_putenv") != 0)
+      return 3;
+
+    return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_svid_putenv=yes
+else
+  gl_cv_func_svid_putenv=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
+$as_echo "$gl_cv_func_svid_putenv" >&6; }
+  if test $gl_cv_func_svid_putenv = no; then
+    REPLACE_PUTENV=1
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_PUTENV=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
+
+
+
+
+
+
+  case "$host_os" in
+            mingw*) REPLACE_SETLOCALE=1 ;;
+  esac
+  if test $REPLACE_SETLOCALE = 1; then
+
+    :
+
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_SETLOCALE=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+     one byte long. This excludes the UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Win32 locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
+            else
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
+              else
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+  LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
+     on Cygwin 1.5.x.  */
+  if (MB_CUR_MAX == 1)
+    return 1;
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
+          # and CP932 is very different from EUC-JP, so we cannot use it here.
+          gt_cv_locale_ja=none
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the AIX locale name.
+          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_ja=ja_JP
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_ja=ja_JP.EUC-JP
+            else
+              # Test for the HP-UX, OSF/1, NetBSD locale name.
+              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_ja=ja_JP.eucJP
+              else
+                # Test for the IRIX, FreeBSD locale name.
+                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_ja=ja_JP.EUC
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_ja=ja
+                  else
+                    # Special test for NetBSD 1.6.
+                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+                      gt_cv_locale_ja=ja_JP.eucJP
+                    else
+                      # None found.
+                      gt_cv_locale_ja=none
+                    fi
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+  LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  /* Check whether a typical GB18030 multibyte sequence is recognized as a
+     single wide character.  This excludes the GB2312 and GBK encodings.  */
+  if (mblen ("\203\062\332\066", 5) != 4)
+    return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
+    else
+      # If there was a link error, due to mblen(), the system is so old that
+      # it certainly doesn't have a chinese locale.
+      gt_cv_locale_zh_CN=none
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+            ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
+"
+if test "x$ac_cv_have_decl_sleep" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SLEEP $ac_have_decl
+_ACEOF
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_have_decl_sleep != yes; then
+    HAVE_SLEEP=0
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
+
+  else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
+$as_echo_n "checking for working sleep... " >&6; }
+if test "${gl_cv_func_sleep_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_sleep_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+static void
+handle_alarm (int sig)
+{
+  if (sig != SIGALRM)
+    _exit (2);
+}
+
+int
+main ()
+{
+
+    /* Failure to compile this test due to missing alarm is okay,
+       since all such platforms (mingw) also lack sleep.  */
+    unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
+    unsigned int remaining;
+    signal (SIGALRM, handle_alarm);
+    alarm (1);
+    remaining = sleep (pentecost);
+    if (remaining > pentecost)
+      return 3;
+    if (remaining <= pentecost - 10)
+      return 4;
+    return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_sleep_works=yes
+else
+  gl_cv_func_sleep_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
+$as_echo "$gl_cv_func_sleep_works" >&6; }
+    if test "$gl_cv_func_sleep_works" != yes; then
+      REPLACE_SLEEP=1
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
+
+    fi
+  fi
+
+
+
+
+  GNULIB_SLEEP=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
+
+
+
+
+  :
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if test "${gt_cv_c_wchar_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+            wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wchar_t=yes
+else
+  gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+  if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if test "${gt_cv_c_wint_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+            wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wint_t=yes
+else
+  gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+  if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
+
+  fi
+
+
+  :
+
+
+
+
+
+
+
+
+  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+  # irrelevant for anonymous mappings.
+  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+  gl_have_mmap=yes
+else
+  gl_have_mmap=no
+fi
+
+
+  # Try to allow MAP_ANONYMOUS.
+  gl_have_mmap_anonymous=no
+  if test $gl_have_mmap = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+  gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    if test $gl_have_mmap_anonymous != yes; then
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+         gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+    if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+    fi
+  fi
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+  # irrelevant for anonymous mappings.
+  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+  gl_have_mmap=yes
+else
+  gl_have_mmap=no
+fi
+
+
+  # Try to allow MAP_ANONYMOUS.
+  gl_have_mmap_anonymous=no
+  if test $gl_have_mmap = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+  gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    if test $gl_have_mmap_anonymous != yes; then
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+         gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+    if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+    fi
+  fi
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+        if test $ac_cv_func_symlink = no; then
+    HAVE_SYMLINK=0
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
+
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
+$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_symlink_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_symlink_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+
+int
+main ()
+{
+int result = 0;
+             if (!symlink ("a", "conftest.link/"))
+               result |= 1;
+             if (symlink ("conftest.f", "conftest.lnk2"))
+               result |= 2;
+             else if (!symlink ("a", "conftest.lnk2/"))
+               result |= 4;
+             return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_symlink_works=yes
+else
+  gl_cv_func_symlink_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      rm -f conftest.f conftest.link conftest.lnk2
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
+$as_echo "$gl_cv_func_symlink_works" >&6; }
+    if test "$gl_cv_func_symlink_works" != yes; then
+      REPLACE_SYMLINK=1
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
+
+    fi
+  fi
+
+
+
+
+  GNULIB_SYMLINK=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_symlinkat = no; then
+    HAVE_SYMLINKAT=0
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS symlinkat.$ac_objext"
+
+  fi
+
+
+
+
+  GNULIB_SYMLINKAT=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h
+
+
+
+
+
+
+
+  if test $gl_threads_api = posix; then
+    gl_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIBMULTITHREAD"
+    for ac_func in pthread_atfork
+do :
+  ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
+if test "x$ac_cv_func_pthread_atfork" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_ATFORK 1
+_ACEOF
+
+fi
+done
+
+    LIBS="$gl_save_LIBS"
+  fi
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS unlinkdir.$ac_objext"
+
+
+  # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
+  # Cygwin, and mingw never let anyone (even root) unlink directories.
+  # If anyone knows of another system for which unlink can never
+  # remove a directory, please report it to <bug-coreutils@gnu.org>.
+  # Unfortunately this is difficult to test for, since it requires root access
+  # and might create garbage in the file system,
+  # so the code below simply relies on the kernel name and version number.
+  case $host_os in
+  gnu[0-9]* | \
+  linux-* | linux | \
+  freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
+  cygwin | \
+  mingw*)
+
+$as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
+;;
+  esac
+
+  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+
+
+
+
+  :
+
+
+
+
+
+  ac_fn_c_check_type "$LINENO" "useconds_t" "ac_cv_type_useconds_t" "$ac_includes_default"
+if test "x$ac_cv_type_useconds_t" = x""yes; then :
+
+else
+
+$as_echo "#define useconds_t unsigned int" >>confdefs.h
+
+fi
+
+  if test $ac_cv_func_usleep = no; then
+    HAVE_USLEEP=0
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS usleep.$ac_objext"
+
+  else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usleep allows large arguments" >&5
+$as_echo_n "checking whether usleep allows large arguments... " >&6; }
+if test "${gl_cv_func_usleep_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_func_usleep_works="guessing no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+
+int
+main ()
+{
+return !!usleep (1000000);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_usleep_works=yes
+else
+  gl_cv_func_usleep_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_usleep_works" >&5
+$as_echo "$gl_cv_func_usleep_works" >&6; }
+    if test "$gl_cv_func_usleep_works" != yes; then
+      REPLACE_USLEEP=1
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS usleep.$ac_objext"
+
+    fi
+  fi
+
+
+
+
+  GNULIB_USLEEP=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_USLEEP 1" >>confdefs.h
+
+
+
+  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+     one byte long. This excludes the UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Win32 locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
+            else
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
+              else
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+  LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
+     on Cygwin 1.5.x.  */
+  if (MB_CUR_MAX == 1)
+    return 1;
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
+          # and CP932 is very different from EUC-JP, so we cannot use it here.
+          gt_cv_locale_ja=none
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the AIX locale name.
+          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_ja=ja_JP
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_ja=ja_JP.EUC-JP
+            else
+              # Test for the HP-UX, OSF/1, NetBSD locale name.
+              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_ja=ja_JP.eucJP
+              else
+                # Test for the IRIX, FreeBSD locale name.
+                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_ja=ja_JP.EUC
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_ja=ja
+                  else
+                    # Special test for NetBSD 1.6.
+                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+                      gt_cv_locale_ja=ja_JP.eucJP
+                    else
+                      # None found.
+                      gt_cv_locale_ja=none
+                    fi
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+  LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  /* Check whether a typical GB18030 multibyte sequence is recognized as a
+     single wide character.  This excludes the GB2312 and GBK encodings.  */
+  if (mblen ("\203\062\332\066", 5) != 4)
+    return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
+    else
+      # If there was a link error, due to mblen(), the system is so old that
+      # it certainly doesn't have a chinese locale.
+      gt_cv_locale_zh_CN=none
+    fi
+    rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_wctob = no; then
+    HAVE_DECL_WCTOB=0
+
+    :
+
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
+
+
+  :
+
+  else
+
+
+
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
+$as_echo_n "checking whether wctob works... " >&6; }
+if test "${gl_cv_func_wctob_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                        case "$host_os" in
+            # Guess no on Solaris <= 9 and Cygwin.
+          solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
+            gl_cv_func_wctob_works="guessing no" ;;
+            # Guess yes otherwise.
+          *) gl_cv_func_wctob_works="guessing yes" ;;
+        esac
+        case "$host_os" in
+          cygwin*)
+            if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+register long global __asm__ ("%ebx");
+
+int main ()
+{
+  setlocale (LC_ALL, "en_US.UTF-8");
+
+  global = 0x12345678;
+  if (wctob (0x00FC) != -1)
+    return 1;
+  if (global != 0x12345678)
+    return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  :
+else
+  gl_cv_func_wctob_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+            ;;
+        esac
+        if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
+          if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      wchar_t wc;
+
+      if (mbtowc (&wc, "\374", 1) == 1)
+        if (wctob (wc) != (unsigned char) '\374')
+          return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_wctob_works=yes
+else
+  gl_cv_func_wctob_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+        fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
+$as_echo "$gl_cv_func_wctob_works" >&6; }
+    case "$gl_cv_func_wctob_works" in
+      *yes) ;;
+      *) REPLACE_WCTOB=1 ;;
+    esac
+    if test $REPLACE_WCTOB = 1; then
+
+    :
+
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
+
+
+  :
+
+    else
+
+            ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_wctob" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_WCTOB $ac_have_decl
+_ACEOF
+
+      if test $ac_cv_have_decl_wctob != yes; then
+        HAVE_DECL_WCTOB=0
+
+    :
+
+      fi
+    fi
+  fi
+
+
+
+
+  GNULIB_WCTOB=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
+
+
+
+
+
+
+  if false; then
+    REPLACE_WCTOMB=1
+  fi
+  if test $REPLACE_WCTOMB = 1; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+  GNULIB_WCTOMB=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
+
+
+
+
+
+    YIELD_LIB=
+  if test $gl_threads_api = posix; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+$as_echo_n "checking for sched_yield in -lrt... " >&6; }
+if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_sched_yield=yes
+else
+  ac_cv_lib_rt_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
+if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
+  YIELD_LIB=-lrt
+else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
+$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
+if test "${ac_cv_lib_posix4_sched_yield+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_posix4_sched_yield=yes
+else
+  ac_cv_lib_posix4_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
+$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
+if test "x$ac_cv_lib_posix4_sched_yield" = x""yes; then :
+  YIELD_LIB=-lposix4
+fi
+
+fi
+
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+  LIBGNULIB_LIBDEPS="$gl_libdeps"
+
+  LIBGNULIB_LTLIBDEPS="$gl_ltlibdeps"
+
+  LIBTESTS_LIBDEPS="$gltests_libdeps"
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wdeclaration-after-statement" >&5
+$as_echo_n "checking whether compiler handles -Wdeclaration-after-statement... " >&6; }
+if test "${gl_cv_warn__Wdeclaration_after_statement+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  save_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS="${CPPFLAGS} -Wdeclaration-after-statement"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  gl_cv_warn__Wdeclaration_after_statement=yes
+else
+  gl_cv_warn__Wdeclaration_after_statement=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+  CPPFLAGS="$save_CPPFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wdeclaration_after_statement" >&5
+$as_echo "$gl_cv_warn__Wdeclaration_after_statement" >&6; }
+if test "x$gl_cv_warn__Wdeclaration_after_statement" = x""yes; then :
+  as_fn_append WARN_CFLAGS " -Wdeclaration-after-statement"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wall" >&5
+$as_echo_n "checking whether compiler handles -Wall... " >&6; }
+if test "${gl_cv_warn__Wall+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  save_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS="${CPPFLAGS} -Wall"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  gl_cv_warn__Wall=yes
+else
+  gl_cv_warn__Wall=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+  CPPFLAGS="$save_CPPFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wall" >&5
+$as_echo "$gl_cv_warn__Wall" >&6; }
+if test "x$gl_cv_warn__Wall" = x""yes; then :
+  as_fn_append WARN_CFLAGS " -Wall"
+fi
+
+
+
+
+
+        MKINSTALLDIRS=
+  if test -n "$ac_aux_dir"; then
+    case "$ac_aux_dir" in
+      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+    esac
+  fi
+  if test -z "$MKINSTALLDIRS"; then
+    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+  fi
+
+
+
+ if test "x$cross_compiling" = xyes; then
+  CROSS_COMPILING_TRUE=
+  CROSS_COMPILING_FALSE='#'
+else
+  CROSS_COMPILING_TRUE='#'
+  CROSS_COMPILING_FALSE=
+fi
+
+
+
+ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
+if test "x$ac_cv_func_getpwnam" = x""yes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam in -lsun" >&5
+$as_echo_n "checking for getpwnam in -lsun... " >&6; }
+if test "${ac_cv_lib_sun_getpwnam+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsun  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getpwnam ();
+int
+main ()
+{
+return getpwnam ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_sun_getpwnam=yes
+else
+  ac_cv_lib_sun_getpwnam=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwnam" >&5
+$as_echo "$ac_cv_lib_sun_getpwnam" >&6; }
+if test "x$ac_cv_lib_sun_getpwnam" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSUN 1
+_ACEOF
+
+  LIBS="-lsun $LIBS"
+
+fi
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for modf in -lm" >&5
+$as_echo_n "checking for modf in -lm... " >&6; }
+if test "${ac_cv_lib_m_modf+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char modf ();
+int
+main ()
+{
+return modf ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_modf=yes
+else
+  ac_cv_lib_m_modf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_modf" >&5
+$as_echo "$ac_cv_lib_m_modf" >&6; }
+if test "x$ac_cv_lib_m_modf" = x""yes; then :
+  FINDLIBS="-lm $FINDLIBS"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_MODF_IN_LIBM 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabs in -lm" >&5
+$as_echo_n "checking for fabs in -lm... " >&6; }
+if test "${ac_cv_lib_m_fabs+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char fabs ();
+int
+main ()
+{
+return fabs ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_fabs=yes
+else
+  ac_cv_lib_m_fabs=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_fabs" >&5
+$as_echo "$ac_cv_lib_m_fabs" >&6; }
+if test "x$ac_cv_lib_m_fabs" = x""yes; then :
+  FINDLIBS="-lm $FINDLIBS"
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FABS_IN_LIBM 1
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+for ac_header in fcntl.h string.h limits.h errno.h stdlib.h stddef.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/utsname.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_utsname_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_UTSNAME_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/resource.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_resource_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_RESOURCE_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
+$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
+if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+int
+main ()
+{
+return makedev(0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_header_sys_types_h_makedev=yes
+else
+  ac_cv_header_sys_types_h_makedev=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
+$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
+
+if test $ac_cv_header_sys_types_h_makedev = no; then
+ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
+
+$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
+
+fi
+
+
+
+  if test $ac_cv_header_sys_mkdev_h = no; then
+    ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
+
+$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
+
+fi
+
+
+  fi
+fi
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if eval "test \"\${$as_ac_Header+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_ac_Header=yes"
+else
+  eval "$as_ac_Header=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Header
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_opendir+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then :
+
+else
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_opendir+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then :
+
+else
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
+$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
+if test "${ac_cv_header_stat_broken+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined S_ISBLK && defined S_IFDIR
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+#endif
+
+#if defined S_ISBLK && defined S_IFCHR
+extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+#endif
+
+#if defined S_ISLNK && defined S_IFREG
+extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+#endif
+
+#if defined S_ISSOCK && defined S_IFREG
+extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stat_broken=no
+else
+  ac_cv_header_stat_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
+$as_echo "$ac_cv_header_stat_broken" >&6; }
+if test $ac_cv_header_stat_broken = yes; then
+
+$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
+$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
+if test "${ac_cv_header_sys_wait_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_sys_wait_h=yes
+else
+  ac_cv_header_sys_wait_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
+$as_echo "$ac_cv_header_sys_wait_h" >&6; }
+if test $ac_cv_header_sys_wait_h = yes; then
+
+$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if test "${ac_cv_type_uid_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then :
+  ac_cv_type_uid_t=yes
+else
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "#define uid_t int" >>confdefs.h
+
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
+if test "x$ac_cv_type_ssize_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
+if test "x$ac_cv_type_ino_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ino_t unsigned long
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
+if test "x$ac_cv_type_dev_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define dev_t unsigned long
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define mode_t int
+_ACEOF
+
+fi
+
+ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLOCKS 1
+_ACEOF
+
+
+$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" fileblocks.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
+ ;;
+esac
+
+fi
+
+
+ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_RDEV 1
+_ACEOF
+
+
+fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
+$as_echo_n "checking for promoted mode_t type... " >&6; }
+if test "${gl_cv_promoted_mode_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+int
+main ()
+{
+typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_promoted_mode_t='int'
+else
+  gl_cv_promoted_mode_t='mode_t'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
+$as_echo "$gl_cv_promoted_mode_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
+_ACEOF
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test "${ac_cv_struct_tm+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+                                    int *p = &tm.tm_sec;
+                                    return !p;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_struct_tm=time.h
+else
+  ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+"
+if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TM_TM_ZONE 1
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
+
+else
+  ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
+"
+if test "x$ac_cv_have_decl_tzname" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_TZNAME $ac_have_decl
+_ACEOF
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
+$as_echo_n "checking for tzname... " >&6; }
+if test "${ac_cv_var_tzname+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+#if !HAVE_DECL_TZNAME
+extern char *tzname[];
+#endif
+
+int
+main ()
+{
+return tzname[0][0];
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_var_tzname=yes
+else
+  ac_cv_var_tzname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
+$as_echo "$ac_cv_var_tzname" >&6; }
+  if test $ac_cv_var_tzname = yes; then
+
+$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
+
+  fi
+fi
+
+
+for ac_func in strftime
+do :
+  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRFTIME 1
+_ACEOF
+
+else
+  # strftime is in -lintl on SCO UNIX.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
+$as_echo_n "checking for strftime in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_strftime+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strftime ();
+int
+main ()
+{
+return strftime ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_strftime=yes
+else
+  ac_cv_lib_intl_strftime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
+$as_echo "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
+  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+ac_fn_c_check_func "$LINENO" "memcmp" "ac_cv_func_memcmp"
+if test "x$ac_cv_func_memcmp" = x""yes; then :
+  $as_echo "#define HAVE_MEMCMP 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" memcmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
+if test "x$ac_cv_func_memset" = x""yes; then :
+  $as_echo "#define HAVE_MEMSET 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" memset.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS memset.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
+if test "x$ac_cv_func_stpcpy" = x""yes; then :
+  $as_echo "#define HAVE_STPCPY 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" stpcpy.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = x""yes; then :
+  $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" strdup.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
+if test "x$ac_cv_func_strstr" = x""yes; then :
+  $as_echo "#define HAVE_STRSTR 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" strstr.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
+if test "x$ac_cv_func_strtol" = x""yes; then :
+  $as_echo "#define HAVE_STRTOL 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" strtol.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strtol.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
+if test "x$ac_cv_func_strtoul" = x""yes; then :
+  $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" strtoul.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strtoul.$ac_objext"
+ ;;
+esac
+
+fi
+
+
+for ac_func in fchdir getcwd strerror endgrent endpwent setlocale
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_func in getrusage
+do :
+  ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
+if test "x$ac_cv_func_getrusage" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETRUSAGE 1
+_ACEOF
+
+fi
+done
+
+for ac_func in vprintf
+do :
+  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
+if test "x$ac_cv_func_vprintf" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_VPRINTF 1
+_ACEOF
+
+ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
+if test "x$ac_cv_func__doprnt" = x""yes; then :
+
+$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
+
+fi
+
+fi
+done
+
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+                         if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_working_alloca_h=yes
+else
+  ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  ifdef HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+                                   if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_func_alloca_works=yes
+else
+  ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then :
+  ac_cv_os_cray=yes
+else
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+    break
+fi
+
+  done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_c_stack_direction=0
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+  return find_stack_direction () < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_stack_direction=1
+else
+  ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
+$as_echo_n "checking whether closedir returns void... " >&6; }
+if test "${ac_cv_func_closedir_void+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_closedir_void=yes
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header_dirent>
+#ifndef __cplusplus
+int closedir ();
+#endif
+
+int
+main ()
+{
+return closedir (opendir (".")) != 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_closedir_void=no
+else
+  ac_cv_func_closedir_void=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
+$as_echo "$ac_cv_func_closedir_void" >&6; }
+if test $ac_cv_func_closedir_void = yes; then
+
+$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
+
+fi
+
+
+ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
+if test "x$ac_cv_func_getmntent" = x""yes; then :
+
+else
+  # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
+# -lseq on Dynix/PTX, -lgen on Unixware.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5
+$as_echo_n "checking for library containing getmntent... " >&6; }
+if test "${ac_cv_search_getmntent+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getmntent ();
+int
+main ()
+{
+return getmntent ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' sun seq gen; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_getmntent=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_getmntent+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_getmntent+set}" = set; then :
+
+else
+  ac_cv_search_getmntent=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5
+$as_echo "$ac_cv_search_getmntent" >&6; }
+ac_res=$ac_cv_search_getmntent
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+for ac_func in getmntent
+do :
+  ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
+if test "x$ac_cv_func_getmntent" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETMNTENT 1
+_ACEOF
+
+fi
+done
+
+
+fi
+
+for ac_func in getmntent
+do :
+  ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
+if test "x$ac_cv_func_getmntent" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETMNTENT 1
+_ACEOF
+
+fi
+done
+
+for ac_func in setmntent endmntent
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+for ac_func in waitpid strspn
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  case $FINDLIBOBJS in
+    "$ac_func.$ac_objext"   | \
+  *" $ac_func.$ac_objext"   | \
+    "$ac_func.$ac_objext "* | \
+  *" $ac_func.$ac_objext "* ) ;;
+  *) FINDLIBOBJS="$FINDLIBOBJS $ac_func.$ac_objext" ;;
+esac
+
+fi
+done
+
+
+for ac_func in forcefindlib
+do :
+  ac_fn_c_check_func "$LINENO" "forcefindlib" "ac_cv_func_forcefindlib"
+if test "x$ac_cv_func_forcefindlib" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_FORCEFINDLIB 1
+_ACEOF
+
+else
+  case $FINDLIBOBJS in
+    "$ac_func.$ac_objext"   | \
+  *" $ac_func.$ac_objext"   | \
+    "$ac_func.$ac_objext "* | \
+  *" $ac_func.$ac_objext "* ) ;;
+  *) FINDLIBOBJS="$FINDLIBOBJS $ac_func.$ac_objext" ;;
+esac
+
+fi
+done
+
+
+
+
+# Check for common but not-POSIX functions.
+for ac_func in setgroups
+do :
+  ac_fn_c_check_func "$LINENO" "setgroups" "ac_cv_func_setgroups"
+if test "x$ac_cv_func_setgroups" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SETGROUPS 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+  if test $ac_cv_func_alloca_works = no; then
+    :
+  fi
+
+  # Define an additional variable used in the Makefile substitution.
+  if test $ac_cv_working_alloca_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
+$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
+if test "${gl_cv_rpl_alloca+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+        Need own alloca
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Need own alloca" >/dev/null 2>&1; then :
+  gl_cv_rpl_alloca=yes
+else
+  gl_cv_rpl_alloca=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
+$as_echo "$gl_cv_rpl_alloca" >&6; }
+    if test $gl_cv_rpl_alloca = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+      ALLOCA_H=alloca.h
+    else
+                  ALLOCA_H=
+    fi
+  else
+    ALLOCA_H=alloca.h
+  fi
+
+
+
+
+
+# Check whether --with-included-regex was given.
+if test "${with_included_regex+set}" = set; then :
+  withval=$with_included_regex;
+fi
+
+
+  case $with_included_regex in #(
+  yes|no) ac_use_included_regex=$with_included_regex
+        ;;
+  '')
+    # If the system regex support is good enough that it passes the
+    # following run test, then default to *not* using the included regex.c.
+    # If cross compiling, assume the test would fail and use the included
+    # regex.c.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
+$as_echo_n "checking for working re_compile_pattern... " >&6; }
+if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+         gl_cv_func_re_compile_pattern_working=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+           #include <locale.h>
+           #include <limits.h>
+           #include <regex.h>
+
+int
+main ()
+{
+int result = 0;
+            static struct re_pattern_buffer regex;
+            unsigned char folded_chars[UCHAR_MAX + 1];
+            int i;
+            const char *s;
+            struct re_registers regs;
+
+            /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+               This test needs valgrind to catch the bug on Debian
+               GNU/Linux 3.1 x86, but it might catch the bug better
+               on other platforms and it shouldn't hurt to try the
+               test here.  */
+            if (setlocale (LC_ALL, "en_US.UTF-8"))
+              {
+                static char const pat[] = "insert into";
+                static char const data[] =
+                  "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+                re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+                               | RE_ICASE);
+                memset (&regex, 0, sizeof regex);
+                s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+                if (s)
+                  result |= 1;
+                else if (re_search (&regex, data, sizeof data - 1,
+                                    0, sizeof data - 1, &regs)
+                         != -1)
+                  result |= 1;
+                if (! setlocale (LC_ALL, "C"))
+                  return 1;
+              }
+
+            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
+            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("a[^x]b", 6, &regex);
+            if (s)
+              result |= 2;
+            /* This should fail, but succeeds for glibc-2.5.  */
+            else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+              result |= 2;
+
+            /* This regular expression is from Spencer ere test number 75
+               in grep-2.3.  */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+            memset (&regex, 0, sizeof regex);
+            for (i = 0; i <= UCHAR_MAX; i++)
+              folded_chars[i] = i;
+            regex.translate = folded_chars;
+            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
+            /* This should fail with _Invalid character class name_ error.  */
+            if (!s)
+              result |= 4;
+
+            /* Ensure that [b-a] is diagnosed as invalid, when
+               using RE_NO_EMPTY_RANGES. */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("a[b-a]", 6, &regex);
+            if (s == 0)
+              result |= 8;
+
+            /* This should succeed, but does not for glibc-2.1.3.  */
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("{1", 2, &regex);
+            if (s)
+              result |= 8;
+
+            /* The following example is derived from a problem report
+               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("[an\371]*n", 7, &regex);
+            if (s)
+              result |= 8;
+            /* This should match, but does not for glibc-2.2.1.  */
+            else if (re_match (&regex, "an", 2, 0, &regs) != 2)
+              result |= 8;
+
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("x", 1, &regex);
+            if (s)
+              result |= 8;
+            /* glibc-2.2.93 does not work with a negative RANGE argument.  */
+            else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+              result |= 8;
+
+            /* The version of regex.c in older versions of gnulib
+               ignored RE_ICASE.  Detect that problem too.  */
+            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("x", 1, &regex);
+            if (s)
+              result |= 16;
+            else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+              result |= 16;
+
+            /* Catch a bug reported by Vin Shelton in
+               http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+               */
+            re_set_syntax (RE_SYNTAX_POSIX_BASIC
+                           & ~RE_CONTEXT_INVALID_DUP
+                           & ~RE_NO_EMPTY_RANGES);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+            if (s)
+              result |= 32;
+
+            /* REG_STARTEND was added to glibc on 2004-01-15.
+               Reject older versions.  */
+            if (! REG_STARTEND)
+              result |= 64;
+
+#if 0
+            /* It would be nice to reject hosts whose regoff_t values are too
+               narrow (including glibc on hosts with 64-bit ptrdiff_t and
+               32-bit int), but we should wait until glibc implements this
+               feature.  Otherwise, support for equivalence classes and
+               multibyte collation symbols would always be broken except
+               when compiling --without-included-regex.   */
+            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+                || sizeof (regoff_t) < sizeof (ssize_t))
+              result |= 64;
+#endif
+
+            return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_re_compile_pattern_working=yes
+else
+  gl_cv_func_re_compile_pattern_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
+$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
+    case $gl_cv_func_re_compile_pattern_working in #(
+    yes) ac_use_included_regex=no;; #(
+    no) ac_use_included_regex=yes;;
+    esac
+    ;;
+  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
+    ;;
+  esac
+
+  if test $ac_use_included_regex = yes; then
+
+$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
+
+
+$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
+
+
+$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
+
+
+$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
+
+
+$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
+
+
+$as_echo "#define re_search rpl_re_search" >>confdefs.h
+
+
+$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
+
+
+$as_echo "#define re_match rpl_re_match" >>confdefs.h
+
+
+$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
+
+
+$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
+
+
+$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
+
+
+$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
+
+
+$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
+
+
+$as_echo "#define regexec rpl_regexec" >>confdefs.h
+
+
+$as_echo "#define regerror rpl_regerror" >>confdefs.h
+
+
+$as_echo "#define regfree rpl_regfree" >>confdefs.h
+
+    case " $LIBOBJS " in
+  *" regex.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS regex.$ac_objext"
+ ;;
+esac
+
+
+
+
+
+
+  for ac_header in libintl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBINTL_H 1
+_ACEOF
+
+fi
+
+done
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
+"
+if test "x$ac_cv_have_decl_isblank" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISBLANK $ac_have_decl
+_ACEOF
+
+
+  fi
+
+
+
+
+# Extract the first word of "sort", so it can be a program name with args.
+set dummy sort; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_SORT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $SORT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_SORT" && ac_cv_path_SORT="sort"
+  ;;
+esac
+fi
+SORT=$ac_cv_path_SORT
+if test -n "$SORT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
+$as_echo "$SORT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $SORT supports the -z option" >&5
+$as_echo_n "checking if $SORT supports the -z option... " >&6; }
+if test "x$cross_compiling" = xyes
+then
+        # We are cross-compiling, so cannot test the target's "sort".
+        ac_sort_has_z=false
+else
+    # find out if the sort command has a working -z option.
+    if $SORT -z -c < "${srcdir:-.}/m4/order-good.bin" 2>/dev/null  >/dev/null
+    then
+        # sort has a -z option, but we have not yet established that
+        # sort thinks there is more than one input line there.   We have
+        # to make sort -c do its thing with the input lines in the wrong
+        # order to determine that (we can't do it in one shot because
+        # if sort returns nonzero we cant tell that it wasn't just
+        # complaining about this unknown -z option.
+        if $SORT -z -c < "${srcdir:-.}/m4/order-bad.bin" 2>/dev/null >/dev/null
+        then
+                # sort likes -z but it doesn't seem to make \0
+                # a delimiter.
+                ac_sort_has_z=false
+        else
+                ac_sort_has_z=true
+        fi
+    else
+        # Doesn't like the z option.
+        ac_sort_has_z=false
+    fi
+fi
+
+if test "x$cross_compiling" = xyes
+then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume no, since we are cross compiling" >&5
+$as_echo "assume no, since we are cross compiling" >&6; }
+        SORT_SUPPORTS_Z=false
+
+elif $ac_sort_has_z
+then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        SORT_SUPPORTS_Z=true
+
+else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        SORT_SUPPORTS_Z=false
+
+fi
+
+
+
+ac_fn_c_check_member "$LINENO" "struct dirent" "d_type" "ac_cv_member_struct_dirent_d_type" "
+#include <sys/types.h>
+#include <dirent.h>
+"
+if test "x$ac_cv_member_struct_dirent_d_type" = x""yes; then :
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__noreturn__)) support" >&5
+$as_echo_n "checking for __attribute__ ((__noreturn__)) support... " >&6; }
+if test "${jy_cv_cc_attribute_noreturn+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+void report_fatal_error(void) __attribute__ ((__noreturn__));
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  jy_cv_cc_attribute_noreturn=yes
+else
+  jy_cv_cc_attribute_noreturn=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jy_cv_cc_attribute_noreturn" >&5
+$as_echo "$jy_cv_cc_attribute_noreturn" >&6; }
+if test $jy_cv_cc_attribute_noreturn = yes; then
+  HAVE_ATTRIBUTE_NORETURN=1
+else
+  HAVE_ATTRIBUTE_NORETURN=0
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATTRIBUTE_NORETURN $HAVE_ATTRIBUTE_NORETURN
+_ACEOF
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+    # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then :
+  enableval=$enable_nls; USE_NLS=$enableval
+else
+  USE_NLS=yes
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+      GETTEXT_MACRO_VERSION=0.18
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$MSGFMT" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+    ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
+
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$XGETTEXT" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+    ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+    rm -f messages.po
+
+    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$MSGMERGE" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+    ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+        test -n "$localedir" || localedir='${datadir}/locale'
+
+
+    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+
+
+  ac_config_commands="$ac_config_commands po-directories"
+
+
+
+
+
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then :
+  withval=$with_libiconv_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
+
+fi
+
+      LIBICONV=
+  LTLIBICONV=
+  INCICONV=
+  LIBICONV_PREFIX=
+      HAVE_LIBICONV=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='iconv '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+              else
+                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'iconv'; then
+                  LIBICONV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'iconv'; then
+                  LIBICONV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+    done
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <CoreFoundation/CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+  gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+  fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <CoreFoundation/CFLocale.h>
+int
+main ()
+{
+CFLocaleCopyCurrent();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_CFLocaleCopyCurrent=yes
+else
+  gt_cv_func_CFLocaleCopyCurrent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
+
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+
+
+
+
+
+
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+    case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+    if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
+$as_echo_n "checking for GNU gettext in libc... " >&6; }
+if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+
+int
+main ()
+{
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$gt_func_gnugettext_libc=yes"
+else
+  eval "$gt_func_gnugettext_libc=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$gt_func_gnugettext_libc
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+
+
+
+
+
+          am_save_CPPFLAGS="$CPPFLAGS"
+
+  for element in $INCICONV; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+      LIBS="$am_save_LIBS"
+    fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+  if test "$am_cv_func_iconv" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+            am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+           *)            am_cv_func_iconv_works="guessing yes" ;;
+         esac
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          return 1;
+      }
+  }
+  /* Test against Solaris 10 bug: Failures are not distinguishable from
+     successful returns.  */
+  {
+    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+    if (cd_ascii_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\263";
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_ascii_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          return 1;
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+        char buf[50];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          return 1;
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  if (/* Try standardized names.  */
+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+      /* Try IRIX, OSF/1 names.  */
+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+      /* Try AIX names.  */
+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+      /* Try HP-UX names.  */
+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+    return 1;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  am_cv_func_iconv_works=yes
+else
+  am_cv_func_iconv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
+
+$as_echo "#define HAVE_ICONV 1" >>confdefs.h
+
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+  else
+            CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+
+
+
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then :
+  withval=$with_libintl_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
+
+fi
+
+      LIBINTL=
+  LTLIBINTL=
+  INCINTL=
+  LIBINTL_PREFIX=
+      HAVE_LIBINTL=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='intl '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+              else
+                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'intl'; then
+                  LIBINTL_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'intl'; then
+                  LIBINTL_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+    done
+  fi
+
+
+
+
+
+
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
+$as_echo_n "checking for GNU gettext in libintl... " >&6; }
+if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+
+int
+main ()
+{
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$gt_func_gnugettext_libintl=yes"
+else
+  eval "$gt_func_gnugettext_libintl=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+
+int
+main ()
+{
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 eval "$gt_func_gnugettext_libintl=yes"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"
+fi
+eval ac_res=\$$gt_func_gnugettext_libintl
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+        fi
+
+                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+                    LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+
+$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
+$as_echo_n "checking whether to use NLS... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+  if test "$USE_NLS" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
+$as_echo_n "checking where the gettext function comes from... " >&6; }
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
+$as_echo "$gt_source" >&6; }
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
+$as_echo_n "checking how to link with libintl... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
+$as_echo "$LIBINTL" >&6; }
+
+  for element in $INCINTL; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+      fi
+
+
+$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
+
+    fi
+
+        POSUB=po
+  fi
+
+
+
+    INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+
+
+$as_echo "#define FINDUTILS 1" >>confdefs.h
+
+
+$as_echo "#define ALREADY_INCLUDED_CONFIG_H 1" >>confdefs.h
+
+
+# This is necessary so that .o files in LIBOBJS are also built via
+# the ANSI2KNR-filtering rules.
+#LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
+
+# Note that in the list below, po/Makefile.in should appear before
+# po/Makefile, so that po/Makefile can be created even if po/Makefile.in
+# starts off missing.
+ac_config_files="$ac_config_files Makefile build-aux/Makefile doc/Makefile find/Makefile find/testsuite/Makefile gnulib/Makefile gnulib/lib/Makefile lib/Makefile locate/Makefile locate/testsuite/Makefile m4/Makefile po/Makefile.in po/Makefile tests/Makefile xargs/Makefile xargs/testsuite/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${WITH_FTS_TRUE}" && test -z "${WITH_FTS_FALSE}"; then
+  as_fn_error $? "conditional \"WITH_FTS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
+  as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+CONFIG_INCLUDE=config.h
+
+if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
+  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+    gl_libobjs=
+    gl_ltlibobjs=
+    if test -n "$gl_LIBOBJS"; then
+      # Remove the extension.
+      sed_drop_objext='s/\.o$//;s/\.obj$//'
+      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+        gl_libobjs="$gl_libobjs $i.$ac_objext"
+        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
+      done
+    fi
+    gl_LIBOBJS=$gl_libobjs
+
+    gl_LTLIBOBJS=$gl_ltlibobjs
+
+
+
+    gltests_libobjs=
+    gltests_ltlibobjs=
+    if test -n "$gltests_LIBOBJS"; then
+      # Remove the extension.
+      sed_drop_objext='s/\.o$//;s/\.obj$//'
+      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
+        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
+      done
+    fi
+    gltests_LIBOBJS=$gltests_libobjs
+
+    gltests_LTLIBOBJS=$gltests_ltlibobjs
+
+
+if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
+  as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by GNU findutils $as_me 4.5.10, which was
+generated by GNU Autoconf 2.67.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_links="$ac_config_links"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration links:
+$config_links
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-findutils@gnu.org>.
+GNU findutils home page: <http://www.gnu.org/software/findutils/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+GNU findutils config.status 4.5.10
+configured by $0, generated by GNU Autoconf 2.67,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+GNUmakefile=$GNUmakefile
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake < 1.5.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
+    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "build-aux/Makefile") CONFIG_FILES="$CONFIG_FILES build-aux/Makefile" ;;
+    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+    "find/Makefile") CONFIG_FILES="$CONFIG_FILES find/Makefile" ;;
+    "find/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES find/testsuite/Makefile" ;;
+    "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
+    "gnulib/lib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/lib/Makefile" ;;
+    "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+    "locate/Makefile") CONFIG_FILES="$CONFIG_FILES locate/Makefile" ;;
+    "locate/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES locate/testsuite/Makefile" ;;
+    "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
+    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+    "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
+    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+    "xargs/Makefile") CONFIG_FILES="$CONFIG_FILES xargs/Makefile" ;;
+    "xargs/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES xargs/testsuite/Makefile" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = "\a"
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[      ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_t"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[    ]*#[    ]*define[       ][      ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+        # (if the path is not absolute).  The absolute path cannot be DOS-style,
+        # because $ac_f cannot contain `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+       `' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out" && rm -f "$tmp/out";;
+  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+    } >"$tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+  :L)
+  #
+  # CONFIG_LINK
+  #
+
+  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
+    :
+  else
+    # Prefer the file from the source tree if names are identical.
+    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
+      ac_source=$srcdir/$ac_source
+    fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
+$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
+
+    if test ! -r "$ac_source"; then
+      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
+    fi
+    rm -f "$ac_file"
+
+    # Try a relative symlink, then a hard link, then a copy.
+    case $ac_source in
+    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
+       *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
+    esac
+    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
+      ln "$ac_source" "$ac_file" 2>/dev/null ||
+      cp -p "$ac_source" "$ac_file" ||
+      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
+  fi
+ ;;
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$mf" : 'X\(//\)[^/]' \| \
+        X"$mf" : 'X\(//\)$' \| \
+        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$file" : 'X\(//\)[^/]' \| \
+        X"$file" : 'X\(//\)$' \| \
+        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+    "po-directories":C)
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..704b5ea
--- /dev/null
@@ -0,0 +1,238 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT([GNU findutils], 4.5.10, [bug-findutils@gnu.org])
+AC_CONFIG_AUX_DIR(build-aux)
+AM_INIT_AUTOMAKE
+
+AC_CONFIG_SRCDIR([find/pred.c])
+AC_CONFIG_HEADERS([config.h])
+AC_CANONICAL_HOST
+AC_CONFIG_MACRO_DIR(gnulib/m4)
+
+dnl Set of available languages.
+ALL_LINGUAS="be bg cs ca da de el eo es et fi fr ga gl hr hu id it ja ko lg lt ms nl pl pt pt_BR ro ru rw sk sl sr sv tr uk vi zh_CN zh_TW"
+
+AC_SUBST(INCLUDES)dnl
+AC_SUBST(AUXDIR,$ac_aux_dir)
+dnl check for --with-fts
+FIND_WITH_FTS
+
+AC_ARG_ENABLE(id-cache,
+[  --enable-id-cache       cache all UIDs & GIDs; avoid if using NIS or Hesiod],
+  AC_DEFINE([CACHE_IDS], 1, [Define if you want find -nouser and -nogroup to make tables of
+   used UIDs and GIDs at startup instead of using getpwuid or
+   getgrgid when needed.  Speeds up -nouser and -nogroup unless you
+   are running NIS or Hesiod, which make password and group calls
+   very expensive.]))
+
+AC_ARG_ENABLE(debug,
+       AS_HELP_STRING(--enable-debug,Enable debugging output which is likely to be interesting to people debugging findutils),
+       [ac_cv_debug=$enableval],[ac_cv_debug=no])
+
+AC_ARG_ENABLE(leaf-optimisation,
+       AS_HELP_STRING(--enable-leaf-optimisation,Enable an optimisation which saves lstat calls to identify subdirectories on filesystems having traditional Unix semantics),
+       [ac_cv_leaf_optimisation=$enableval],[ac_cv_leaf_optimisation=yes])
+
+AC_ARG_ENABLE(d_type-optimization,
+       AS_HELP_STRING(--enable-d_type-optimization,Make use of the file type data returned in struct dirent.d_type by readdir()),
+       [ac_cv_d_type=$enableval],[ac_cv_d_type=yes])
+
+dnl This one has no default, because otherwise we would have to say
+dnl both --enable-d_type-optimisation=no and --enable-d_type-optimization=no
+dnl to turn it off.
+AC_ARG_ENABLE(d_type-optimisation,
+       AS_HELP_STRING(--enable-d_type-optimisation,Synonym for --enable-d_type-optimization),
+       [ac_cv_d_type=$enableval],[])
+
+
+AC_MSG_CHECKING([whether debug output should be produced])
+if test x$ac_cv_debug = xno; then
+   AC_MSG_RESULT([no])
+else
+   AC_MSG_RESULT([yes])
+   AC_DEFINE([DEBUG], 1, [Define if you want to see find's innards])
+   AC_DEFINE([DEBUG_STAT], 1, [Define if you want to see a message every time find calls the stat() system call])
+fi
+
+AC_MSG_CHECKING([for leaf optimisation])
+if test x$ac_cv_leaf_optimisation = xno; then
+   AC_MSG_RESULT([no])
+else
+   AC_MSG_RESULT([yes])
+   AC_DEFINE([LEAF_OPTIMISATION], 1, [Define if you want to use the leaf optimisation (this can still be turned off with -noleaf)])
+fi
+
+AC_ARG_VAR([DEFAULT_ARG_SIZE], [Default size of arguments to child processes
+of find and xargs, 128k if unspecified])
+if test -n "$DEFAULT_ARG_SIZE"; then
+   AC_DEFINE_UNQUOTED([DEFAULT_ARG_SIZE], [$DEFAULT_ARG_SIZE],
+     [If defined, the default argument size used in child processes])
+fi
+
+
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_CPP
+
+dnl for gnulib
+gl_EARLY
+
+AM_C_PROTOTYPES
+
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+dnl AC_PROG_LIBTOOL
+AC_PROG_MAKE_SET
+AC_SYS_LARGEFILE
+
+
+gl_INIT
+
+dnl Enable various GCC warnings.
+gl_WARN_ADD([-Wdeclaration-after-statement])
+gl_WARN_ADD([-Wall])
+
+
+dnl Older versions of gnulib/m4/nls.m4 provide AM_MKINSTALLDIRS.
+dnl The current version of gnulib does not, but the version of
+dnl po/Makefile.in.in that comes with gettext-0.14.6 expects
+dnl that @MKINSTALLDIRS@ will be expanded.
+AM_MKINSTALLDIRS
+
+dnl lib/regexprops needs to be a native program, because we need to
+dnl run it in order to generate the documentation about the properties
+dnl of regular expressions.  See lib/Makefile.am.
+AM_CONDITIONAL(CROSS_COMPILING, [[test "x$cross_compiling" = xyes]])
+
+dnl Try to get a POSIX.1 environment.
+
+dnl Checks for libraries.  If getpwnam() isn't present in the
+dnl C library, try -lsun.
+AC_CHECK_FUNC(getpwnam, [],
+[AC_CHECK_LIB(sun, getpwnam)])
+
+AC_CHECK_LIB([m],[modf],[FINDLIBS="-lm $FINDLIBS"]
+  AC_DEFINE_UNQUOTED([HAVE_MODF_IN_LIBM],1,[modf is defined in -lm]))
+AC_CHECK_LIB([m],[fabs],[FINDLIBS="-lm $FINDLIBS"]
+  AC_DEFINE_UNQUOTED([HAVE_FABS_IN_LIBM],1,[fabs is defined in -lm]))
+AC_SUBST([FINDLIBS])
+
+dnl Checks for header files.
+AC_HEADER_STDC
+dnl Assume unistd.h is present - coreutils does too.
+AC_CHECK_HEADERS(fcntl.h string.h limits.h errno.h stdlib.h stddef.h)
+AC_CHECK_HEADERS(unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.h)
+AC_CHECK_HEADERS(sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h)
+dnl find.c needs sys/utsname.h because it calls uname(2).
+AC_CHECK_HEADERS(sys/utsname.h)
+dnl fdleak.c needs sys/resource.h because it calls getrlimit(2).
+AC_CHECK_HEADERS(sys/resource.h)
+AC_HEADER_MAJOR
+AC_HEADER_DIRENT
+AC_HEADER_STAT
+AC_HEADER_SYS_WAIT
+
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+
+AC_TYPE_UID_T
+AC_TYPE_SIZE_T
+AC_CHECK_TYPE(ssize_t, int)
+AC_TYPE_PID_T
+AC_CHECK_TYPE(ino_t, unsigned long)
+AC_CHECK_TYPE(dev_t, unsigned long)
+AC_TYPE_MODE_T
+AC_STRUCT_ST_BLOCKS
+AC_CHECK_MEMBERS([struct stat.st_rdev])
+
+dnl fdleak.c uses PROMOTED_MODE_T, which is defined by gnulib.
+gl_PROMOTED_TYPE_MODE_T
+
+
+AC_STRUCT_TM
+AC_STRUCT_TIMEZONE
+
+dnl Checks for library functions that are provided by gnulib.
+AC_FUNC_STRFTIME
+AC_REPLACE_FUNCS(memcmp memset stpcpy strdup strstr strtol strtoul)
+AC_CHECK_FUNCS(fchdir getcwd strerror endgrent endpwent setlocale)
+AC_CHECK_FUNCS(getrusage)
+AC_FUNC_VPRINTF
+AC_FUNC_ALLOCA
+AC_FUNC_CLOSEDIR_VOID
+
+dnl We don't just use AC_FUNC_GETMNTENT directly because it
+dnl will try to use -lsun on platforms which have getmntent() in the
+dnl C library, for example UNICOS.
+AC_CHECK_FUNC(getmntent, [], [AC_FUNC_GETMNTENT])
+AC_CHECK_FUNCS(getmntent)
+AC_CHECK_FUNCS(setmntent endmntent)
+
+
+dnl Checks for library functions that are provided by findlib.
+FINDLIB_REPLACE_FUNCS(waitpid strspn)
+FINDLIB_REPLACE_FUNCS(forcefindlib)
+
+
+# Check for common but not-POSIX functions.
+AC_CHECK_FUNCS(setgroups)
+
+
+dnl gl_XALLOC
+gl_FUNC_ALLOCA
+
+dnl Use gl_INCLUDED_REGEX so that findutils will build on systems like
+dnl Solaris, which lacks those functions in libc (see GNU Savannah bug
+dnl #11710) (Sun Sep  4 20:15:11 2005: gl_INCLUDED_REGEX no longer seems
+dnl to be available in gnulib CVS)
+gl_REGEX
+
+AC_PREREQ(2.59)
+
+jy_SORTZ
+
+
+AC_CHECK_MEMBER(struct dirent.d_type,,,[
+#include <sys/types.h>
+#include <dirent.h>])
+
+jy_AC_ATTRIBUTE_NORETURN
+
+dnl internationalization macros
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.18.1])
+
+dnl regextype.c and regexprops.c are designed to be usable outside findutils,
+dnl but findutils doesn't want to support all the regex types in gnulib,
+dnl and wants to support an additional one (RE_SYNTAX_EMACS|RE_DOT_NEWLINE).
+dnl Hence they need to know if they are being compiled into findutils or not.
+AC_DEFINE([FINDUTILS], 1, [Define if we are compiling GNU findutils])
+AC_DEFINE([ALREADY_INCLUDED_CONFIG_H], 1, [Define so that source code can verify that config.h was already included])
+
+# This is necessary so that .o files in LIBOBJS are also built via
+# the ANSI2KNR-filtering rules.
+#LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
+
+# Note that in the list below, po/Makefile.in should appear before
+# po/Makefile, so that po/Makefile can be created even if po/Makefile.in
+# starts off missing.
+AC_CONFIG_FILES([
+Makefile
+build-aux/Makefile
+doc/Makefile
+find/Makefile
+find/testsuite/Makefile
+gnulib/Makefile
+gnulib/lib/Makefile
+lib/Makefile
+locate/Makefile
+locate/testsuite/Makefile
+m4/Makefile
+po/Makefile.in
+po/Makefile
+tests/Makefile
+xargs/Makefile
+xargs/testsuite/Makefile
+])
+AC_OUTPUT
+dnl intl/Makefile
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..56ae953
--- /dev/null
@@ -0,0 +1,55 @@
+AM_CFLAGS = $(WARN_CFLAGS)
+
+info_TEXINFOS = find.texi find-maint.texi
+find_TEXINFOS = perm.texi parse-datetime.texi regexprops.texi fdl.texi
+find_maint_TEXINFOS = fdl.texi
+MOSTLYCLEANFILES = find.cps
+CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz
+
+MAKEINFOTXT = $(MAKEINFO) --plaintext
+
+find.txt: find.texi $(srcdir)/version.texi $(find_TEXINFOS)
+
+# find.txt is a file which we need to know how to build
+# because it gets put on the www.gnu.org website.
+# This rule is derived from the .texi.html rule.
+.texi.txt:
+       rm -rf $(@:.txt=.tmp)
+       if $(MAKEINFOTXT) $(AM_MAKEINFOTXTFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        -o $(@:.txt=.tmp) $<; \
+       then \
+         rm -rf $@; \
+         if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \
+           mv $(@:.txt=) $@; else mv $(@:.txt=.tmp) $@; fi; \
+       else \
+         if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \
+           rm -rf $(@:.txt=); else rm -Rf $(@:.txt=.tmp) $@; fi; \
+         exit 1; \
+       fi
+
+
+# find_mono.html is a file which we need to know how to build
+# because it gets put on the www.gnu.org website.
+# This rule is derived from the generic .texi.html rule.
+find_mono.html: find.texi
+       rm -rf $(@:.html=.htp)
+       if $(MAKEINFOHTML) --no-split $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        -o $(@:.html=.htp) $<; \
+       then \
+         rm -rf $@; \
+         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+           mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+       else \
+         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+           rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
+         exit 1; \
+       fi
+
+
+# findutils.texi_html_node.tar.gz is a file which we need to know
+# how to build because it gets put on the www.gnu.org website.
+# This rule depends on GNU tar, but it's principally used
+# by the maintainer, and we don't need to build the file
+# for "make all" or "make install" (or even "make check").
+findutils.texi_html_node.tar.gz: find.html
+       tar zcf $@ $<
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644 (file)
index 0000000..c8bbbf4
--- /dev/null
@@ -0,0 +1,1714 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+subdir = doc
+DIST_COMMON = $(find_TEXINFOS) $(find_maint_TEXINFOS) \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in $(srcdir)/stamp-1 \
+       $(srcdir)/stamp-vti $(srcdir)/version.texi \
+       $(srcdir)/versionmaint.texi mdate-sh
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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 =
+SOURCES =
+DIST_SOURCES =
+INFO_DEPS = $(srcdir)/find.info $(srcdir)/find-maint.info
+TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
+DVIS = find.dvi find-maint.dvi
+PDFS = find.pdf find-maint.pdf
+PSS = find.ps find-maint.ps
+HTMLS = find.html find-maint.html
+TEXINFOS = find.texi find-maint.texi
+TEXI2DVI = texi2dvi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
+DVIPS = dvips
+am__installdirs = "$(DESTDIR)$(infodir)"
+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'
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = @INCLUDES@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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@
+AM_CFLAGS = $(WARN_CFLAGS)
+info_TEXINFOS = find.texi find-maint.texi
+find_TEXINFOS = perm.texi parse-datetime.texi regexprops.texi fdl.texi
+find_maint_TEXINFOS = fdl.texi
+MOSTLYCLEANFILES = find.cps
+CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz
+MAKEINFOTXT = $(MAKEINFO) --plaintext
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .dvi .html .info .pdf .ps .texi .txt
+$(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 doc/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits doc/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):
+
+.texi.info:
+       restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+       am__cwd=`pwd` && $(am__cd) $(srcdir) && \
+       rm -rf $$backupdir && mkdir $$backupdir && \
+       if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+         for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+           if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+         done; \
+       else :; fi && \
+       cd "$$am__cwd"; \
+       if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        -o $@ $<; \
+       then \
+         rc=0; \
+         $(am__cd) $(srcdir); \
+       else \
+         rc=$$?; \
+         $(am__cd) $(srcdir) && \
+         $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+       fi; \
+       rm -rf $$backupdir; exit $$rc
+
+.texi.dvi:
+       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+       $(TEXI2DVI) $<
+
+.texi.pdf:
+       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+       $(TEXI2PDF) $<
+
+.texi.html:
+       rm -rf $(@:.html=.htp)
+       if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        -o $(@:.html=.htp) $<; \
+       then \
+         rm -rf $@; \
+         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+           mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+       else \
+         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+           rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
+         exit 1; \
+       fi
+$(srcdir)/find.info: find.texi $(srcdir)/version.texi $(find_TEXINFOS)
+find.dvi: find.texi $(srcdir)/version.texi $(find_TEXINFOS)
+find.pdf: find.texi $(srcdir)/version.texi $(find_TEXINFOS)
+find.html: find.texi $(srcdir)/version.texi $(find_TEXINFOS)
+$(srcdir)/version.texi:  $(srcdir)/stamp-vti
+$(srcdir)/stamp-vti: find.texi $(top_srcdir)/configure
+       @(dir=.; test -f ./find.texi || dir=$(srcdir); \
+       set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/find.texi`; \
+       echo "@set UPDATED $$1 $$2 $$3"; \
+       echo "@set UPDATED-MONTH $$2 $$3"; \
+       echo "@set EDITION $(VERSION)"; \
+       echo "@set VERSION $(VERSION)") > vti.tmp
+       @cmp -s vti.tmp $(srcdir)/version.texi \
+         || (echo "Updating $(srcdir)/version.texi"; \
+             cp vti.tmp $(srcdir)/version.texi)
+       -@rm -f vti.tmp
+       @cp $(srcdir)/version.texi $@
+
+mostlyclean-vti:
+       -rm -f vti.tmp
+
+maintainer-clean-vti:
+       -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
+$(srcdir)/find-maint.info: find-maint.texi $(srcdir)/versionmaint.texi $(find_maint_TEXINFOS)
+find-maint.dvi: find-maint.texi $(srcdir)/versionmaint.texi $(find_maint_TEXINFOS)
+find-maint.pdf: find-maint.texi $(srcdir)/versionmaint.texi $(find_maint_TEXINFOS)
+find-maint.html: find-maint.texi $(srcdir)/versionmaint.texi $(find_maint_TEXINFOS)
+$(srcdir)/versionmaint.texi:  $(srcdir)/stamp-1
+$(srcdir)/stamp-1: find-maint.texi $(top_srcdir)/configure
+       @(dir=.; test -f ./find-maint.texi || dir=$(srcdir); \
+       set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/find-maint.texi`; \
+       echo "@set UPDATED $$1 $$2 $$3"; \
+       echo "@set UPDATED-MONTH $$2 $$3"; \
+       echo "@set EDITION $(VERSION)"; \
+       echo "@set VERSION $(VERSION)") > 1.tmp
+       @cmp -s 1.tmp $(srcdir)/versionmaint.texi \
+         || (echo "Updating $(srcdir)/versionmaint.texi"; \
+             cp 1.tmp $(srcdir)/versionmaint.texi)
+       -@rm -f 1.tmp
+       @cp $(srcdir)/versionmaint.texi $@
+
+mostlyclean-1:
+       -rm -f 1.tmp
+
+maintainer-clean-1:
+       -rm -f $(srcdir)/stamp-1 $(srcdir)/versionmaint.texi
+.dvi.ps:
+       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(DVIPS) -o $@ $<
+
+uninstall-dvi-am:
+       @$(NORMAL_UNINSTALL)
+       @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
+         rm -f "$(DESTDIR)$(dvidir)/$$f"; \
+       done
+
+uninstall-html-am:
+       @$(NORMAL_UNINSTALL)
+       @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
+         rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
+       done
+
+uninstall-info-am:
+       @$(PRE_UNINSTALL)
+       @if test -d '$(DESTDIR)$(infodir)' && \
+           (install-info --version && \
+            install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+         list='$(INFO_DEPS)'; \
+         for file in $$list; do \
+           relfile=`echo "$$file" | sed 's|^.*/||'`; \
+           echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
+           if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
+           then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
+         done; \
+       else :; fi
+       @$(NORMAL_UNINSTALL)
+       @list='$(INFO_DEPS)'; \
+       for file in $$list; do \
+         relfile=`echo "$$file" | sed 's|^.*/||'`; \
+         relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
+         (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
+            echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+            rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+          else :; fi); \
+       done
+
+uninstall-pdf-am:
+       @$(NORMAL_UNINSTALL)
+       @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
+       done
+
+uninstall-ps-am:
+       @$(NORMAL_UNINSTALL)
+       @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(psdir)/$$f"; \
+       done
+
+dist-info: $(INFO_DEPS)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       list='$(INFO_DEPS)'; \
+       for base in $$list; do \
+         case $$base in \
+           $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
+         esac; \
+         if test -f $$base; then d=.; else d=$(srcdir); fi; \
+         base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
+         for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
+           if test -f $$file; then \
+             relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+             test -f "$(distdir)/$$relfile" || \
+               cp -p $$file "$(distdir)/$$relfile"; \
+           else :; fi; \
+         done; \
+       done
+
+mostlyclean-aminfo:
+       -rm -rf find.aux find.cp find.cps find.fn find.fns find.ky find.kys \
+         find.log find.pg find.pgs find.tmp find.toc find.tp find.tps \
+         find.vr find.vrs find-maint.aux find-maint.cp find-maint.cps \
+         find-maint.fn find-maint.fns find-maint.ky find-maint.kys \
+         find-maint.log find-maint.pg find-maint.pgs find-maint.tmp \
+         find-maint.toc find-maint.tp find-maint.tps find-maint.vr \
+         find-maint.vrs
+
+clean-aminfo:
+       -test -z "find.dvi find.pdf find.ps find.html find-maint.dvi find-maint.pdf \
+         find-maint.ps find-maint.html" \
+       || rm -rf find.dvi find.pdf find.ps find.html find-maint.dvi find-maint.pdf \
+         find-maint.ps find-maint.html
+
+maintainer-clean-aminfo:
+       @list='$(INFO_DEPS)'; for i in $$list; do \
+         i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+         echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
+         rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
+       done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+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
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-info
+check-am: all-am
+check: check-am
+all-am: Makefile $(INFO_DEPS)
+installdirs:
+       for dir in "$(DESTDIR)$(infodir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+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)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-aminfo clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am: $(DVIS)
+
+html: html-am
+
+html-am: $(HTMLS)
+
+info: info-am
+
+info-am: $(INFO_DEPS)
+
+install-data-am: install-info-am
+
+install-dvi: install-dvi-am
+
+install-dvi-am: $(DVIS)
+       @$(NORMAL_INSTALL)
+       test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
+       @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
+       done
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+       @$(NORMAL_INSTALL)
+       test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+       @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         $(am__strip_dir) \
+         if test -d "$$d$$p"; then \
+           echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
+           $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+           echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+           $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
+         else \
+           list2="$$list2 $$d$$p"; \
+         fi; \
+       done; \
+       test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+       done; }
+install-info: install-info-am
+
+install-info-am: $(INFO_DEPS)
+       @$(NORMAL_INSTALL)
+       test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+       for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+         esac; \
+         if test -f $$file; then d=.; else d=$(srcdir); fi; \
+         file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+         for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+                      $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+           if test -f $$ifile; then \
+             echo "$$ifile"; \
+           else : ; fi; \
+         done; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
+       @$(POST_INSTALL)
+       @if (install-info --version && \
+            install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+         list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+         for file in $$list; do \
+           relfile=`echo "$$file" | sed 's|^.*/||'`; \
+           echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
+           install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
+         done; \
+       else : ; fi
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am: $(PDFS)
+       @$(NORMAL_INSTALL)
+       test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
+       @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
+install-ps: install-ps-am
+
+install-ps-am: $(PSS)
+       @$(NORMAL_INSTALL)
+       test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
+       @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-1 \
+       maintainer-clean-aminfo maintainer-clean-generic \
+       maintainer-clean-vti
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-1 mostlyclean-aminfo mostlyclean-generic \
+       mostlyclean-vti
+
+pdf: pdf-am
+
+pdf-am: $(PDFS)
+
+ps: ps-am
+
+ps-am: $(PSS)
+
+uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
+       uninstall-pdf-am uninstall-ps-am
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
+       dist-info distclean distclean-generic 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-1 maintainer-clean-aminfo \
+       maintainer-clean-generic maintainer-clean-vti mostlyclean \
+       mostlyclean-1 mostlyclean-aminfo mostlyclean-generic \
+       mostlyclean-vti pdf pdf-am ps ps-am uninstall uninstall-am \
+       uninstall-dvi-am uninstall-html-am uninstall-info-am \
+       uninstall-pdf-am uninstall-ps-am
+
+
+find.txt: find.texi $(srcdir)/version.texi $(find_TEXINFOS)
+
+# find.txt is a file which we need to know how to build
+# because it gets put on the www.gnu.org website.
+# This rule is derived from the .texi.html rule.
+.texi.txt:
+       rm -rf $(@:.txt=.tmp)
+       if $(MAKEINFOTXT) $(AM_MAKEINFOTXTFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        -o $(@:.txt=.tmp) $<; \
+       then \
+         rm -rf $@; \
+         if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \
+           mv $(@:.txt=) $@; else mv $(@:.txt=.tmp) $@; fi; \
+       else \
+         if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \
+           rm -rf $(@:.txt=); else rm -Rf $(@:.txt=.tmp) $@; fi; \
+         exit 1; \
+       fi
+
+# find_mono.html is a file which we need to know how to build
+# because it gets put on the www.gnu.org website.
+# This rule is derived from the generic .texi.html rule.
+find_mono.html: find.texi
+       rm -rf $(@:.html=.htp)
+       if $(MAKEINFOHTML) --no-split $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        -o $(@:.html=.htp) $<; \
+       then \
+         rm -rf $@; \
+         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+           mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+       else \
+         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+           rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
+         exit 1; \
+       fi
+
+# findutils.texi_html_node.tar.gz is a file which we need to know
+# how to build because it gets put on the www.gnu.org website.
+# This rule depends on GNU tar, but it's principally used
+# by the maintainer, and we don't need to build the file
+# for "make all" or "make install" (or even "make check").
+findutils.texi_html_node.tar.gz: find.html
+       tar zcf $@ $<
+
+# 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/doc/fdl.texi b/doc/fdl.texi
new file mode 100644 (file)
index 0000000..fc19ddd
--- /dev/null
@@ -0,0 +1,506 @@
+@c The GNU Free Documentation License.
+@center Version 1.3, 3 November 2008
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
+@display
+Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+@uref{http://fsf.org/}
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document @dfn{free} in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense.  It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does.  But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book.  We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License.  Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein.  The ``Document'', below,
+refers to any such manual or work.  Any member of the public is a
+licensee, and is addressed as ``you''.  You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject.  (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.)  The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.  If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant.  The Document may contain zero
+Invariant Sections.  If the Document does not identify any Invariant
+Sections then there are none.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.  A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters.  A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text.  A copy that is not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, La@TeX{} input
+format, SGML or XML using a publicly available
+DTD, and standard-conforming simple HTML,
+PostScript or PDF designed for human modification.  Examples
+of transparent image formats include PNG, XCF and
+JPG.  Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, SGML or
+XML for which the DTD and/or processing tools are
+not generally available, and the machine-generated HTML,
+PostScript or PDF produced by some word processors for
+output purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page.  For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The ``publisher'' means any person or entity that distributes copies
+of the Document to the public.
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language.  (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.)  To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document.  These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License.  You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute.  However, you may accept
+compensation in exchange for copies.  If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover.  Both covers must also clearly and legibly identify
+you as the publisher of these copies.  The front cover must present
+the full title with all words of the title equally prominent and
+visible.  You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it.  In addition, you must do these things in the Modified Version:
+
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document).  You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page.  If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on.  These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles.  Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section Entitled ``Endorsements''.  Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section to be Entitled ``Endorsements'' or
+to conflict in title with any Invariant Section.
+
+@item
+Preserve any Warranty Disclaimers.
+@end enumerate
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant.  To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version.  Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity.  If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy.  If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''.  You must delete all
+sections Entitled ``Endorsements.''
+
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections.  You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers.  In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time.  Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.  See
+@uref{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation.  If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.  If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+@item
+RELICENSING
+
+``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works.  A
+public wiki that anybody can edit is an example of such a server.  A
+``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+
+``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+``Incorporate'' means to publish or republish a Document, in whole or
+in part, as part of another Document.
+
+An MMC is ``eligible for relicensing'' if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+@end enumerate
+
+@page
+@heading ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+  Copyright (C)  @var{year}  @var{your name}.
+  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 section entitled ``GNU
+  Free Documentation License''.
+@end group
+@end smallexample
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with@dots{}Texts.'' line with this:
+
+@smallexample
+@group
+    with the Invariant Sections being @var{list their titles}, with
+    the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
+    being @var{list}.
+@end group
+@end smallexample
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
+
diff --git a/doc/find-maint.info b/doc/find-maint.info
new file mode 100644 (file)
index 0000000..e571a52
--- /dev/null
@@ -0,0 +1,1684 @@
+This is
+/home/james/source/GNU/findutils/git/gnu/findutils/doc/find-maint.info,
+produced by makeinfo version 4.13 from
+/home/james/source/GNU/findutils/git/gnu/findutils/doc/find-maint.texi.
+
+INFO-DIR-SECTION GNU organization
+START-INFO-DIR-ENTRY
+* Maintaining Findutils: (find-maint).        Maintaining GNU findutils
+END-INFO-DIR-ENTRY
+
+   This manual explains how GNU findutils is maintained, how changes
+should be made and tested, and what resources exist to help developers.
+
+   This is edition 4.5.10, for findutils version 4.5.10.
+
+   Copyright (C) 2007, 2008, 2010 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, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled "GNU
+Free Documentation License".
+
+\1f
+File: find-maint.info,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)
+
+Maintaining GNU Findutils
+*************************
+
+This manual explains how GNU findutils is maintained, how changes should
+be made and tested, and what resources exist to help developers.
+
+   This is edition 4.5.10, for findutils version 4.5.10.
+
+   Copyright (C) 2007, 2008, 2010 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, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled "GNU
+Free Documentation License".
+
+* Menu:
+
+* Introduction::
+* Maintaining GNU Programs::
+* Design Issues::
+* Coding Conventions::
+* Tools::
+* Using the GNU Portability Library::
+* Documentation::
+* Testing::
+* Bugs::
+* Distributions::
+* Internationalisation::
+* Security::
+* Making Releases::
+* GNU Free Documentation License::
+
+\1f
+File: find-maint.info,  Node: Introduction,  Next: Maintaining GNU Programs,  Prev: Top,  Up: Top
+
+1 Introduction
+**************
+
+This document explains how to contribute to and maintain GNU Findutils.
+It concentrates on developer-specific issues.  For information about
+how to use the software please refer to *Note Introduction:
+(find)Introduction.
+
+   This manual aims to be useful without necessarily being verbose.
+It's also a recent document, so there will be a many areas in which
+improvements can be made.  If you find that the document misses out
+important information or any part of the document is be so terse as to
+be unuseful, please ask for help on the <bug-findutils@gnu.org> mailing
+list.  We'll try to improve this document too.
+
+\1f
+File: find-maint.info,  Node: Maintaining GNU Programs,  Next: Design Issues,  Prev: Introduction,  Up: Top
+
+2 Maintaining GNU Programs
+**************************
+
+GNU Findutils is part of the GNU Project and so there are a number of
+documents which set out standards for the maintenance of GNU software.
+
+`standards.texi'
+     GNU Project Coding Standards.  All changes to findutils should
+     comply with these standards.  In some areas we go somewhat beyond
+     the requirements of the standards, but these cases are explained
+     in this manual.
+
+`maintain.texi'
+     Information for Maintainers of GNU Software.  This document
+     provides guidance for GNU maintainers.  Everybody with commit
+     access should read this document.   Everybody else is welcome to
+     do so too, of course.
+
+\1f
+File: find-maint.info,  Node: Design Issues,  Next: Coding Conventions,  Prev: Maintaining GNU Programs,  Up: Top
+
+3 Design Issues
+***************
+
+The findutils package is installed on many many systems, usually as a
+fundamental component.  The programs in the package are often used in
+order to successfully boot or fix the system.
+
+   This fact means that for findutils we bear in mind considerations
+that may not apply so much as for other packages.  For example, the fact
+that findutils is often a base component motivates us to
+   * Limit dependencies on libraries
+
+   * Avoid dependencies on other large packages (for example,
+     interpreters)
+
+   * Be conservative when making changes to the 'stable' release branch
+
+   All those considerations come before functionality.  Functional
+enhancements are still made to findutils, but these are almost
+exclusively introduced in the 'development' release branch, to allow
+extensive testing and proving.
+
+   Sometimes it is useful to have a priority list to provide guidance
+when making design trade-offs.   For findutils, that priority list is:
+
+  1. Correctness
+
+  2. Standards compliance
+
+  3. Security
+
+  4. Backward compatibility
+
+  5. Performance
+
+  6. Functionality
+
+   For example, we support the `-exec' action because POSIX compliance
+requires this, even though there are security problems with it and we
+would otherwise prefer people to use `-execdir'.  There are also cases
+where some performance is sacrificed in the name of security.  For
+example, the sanity checks that `find' performs while traversing a
+directory tree may slow it down.   We adopt functional changes, and
+functional changes are allowed to make `find' slower, but only if there
+is no detectable impact on users who don't use the feature.
+
+   Backward-incompatible changes do get made in order to comply with
+standards (for example the behaviour of `-perm -...' changed in order
+to comply with POSIX).  However, they don't get made in order to
+provide better ease of use; for example the semantics of `-size -2G'
+are almost always unexpected by users, but we retain the current
+behaviour because of backward compatibility and for its similarity to
+the block-rounding behaviour of `-size -30'.  We might introduce a
+change which does not have the unfortunate rounding behaviour, but we
+would choose another syntax (for example `-size '<2G'') for this.
+
+   In a general sense, we try to do test-driven development of the
+findutils code; that is, we try to implement test cases for new
+features and bug fixes before modifying the code to make the test pass.
+Some features of the code are tested well, but the test coverage for
+other features is less good.  If you are about to modify the code for a
+predicate and aren't sure about the test coverage, use `grep' on the
+test directories and measure the coverage with `lcov' or another test
+coverage tool.
+
+   You should be able to use the `coverage' Makefile target (it's
+defined in `maint.mk' to generate a test coverage report for findutils.
+ Due to limitations in `lcov', this only works if your build directory
+is the same asthe source directory (that is, you're not using a VPATH
+build configuration).
+
+   Lastly, we try not to depend on having a "working system".  The
+findutils suite is used for diagnosis of problems, and this applies
+especially to `find'.  We should ensure that `find' still works on
+relatively broken systems, for example systems with damaged
+`/etc/passwd' or `/etc/fstab' files.  Another interesting example is
+the case where a system is a client of one or more unresponsive NFS
+servers.  On such a system, if you try to stat all mount points, your
+program will hang indefinitely, waiting for the remote NFS server to
+respond.
+
+   Another interesting but unusual case is broken NFS servers and
+corrupt filesystems; sometimes they return `impossible' file modes.
+It's important that find does not entirely fail when encountering such a
+file.
+
+\1f
+File: find-maint.info,  Node: Coding Conventions,  Next: Tools,  Prev: Design Issues,  Up: Top
+
+4 Coding Conventions
+********************
+
+Coding style documents which set out to establish a uniform look and
+feel to source code have worthy goals, for example greater ease of
+maintenance and readability.  However, I do not believe that in general
+coding style guide authors can envisage every situation, and it is
+always possible that it might on occasion be necessary to break the
+letter of the style guide in order to honour its spirit, or to better
+achieve the style guide's goals.
+
+   I've certainly seen many style guides outside the free software world
+which make bald statements such as "functions shall have exactly one
+return statement".  The desire to ensure consistency and obviousness of
+control flow is laudable, but it is all too common for such bald
+requirements to be followed unthinkingly.  Certainly I've seen such
+coding standards result in unmaintainable code with terrible
+infelicities such as functions containing `if' statements nested nine
+levels deep.  I suppose such coding standards don't survive in free
+software projects because they tend to drive away potential
+contributors or tend to generate heated discussions on mailing lists.
+Equally, a nine-level-deep function in a free software program would
+quickly get refactored, assuming it is obvious what the function is
+supposed to do...
+
+   Be that as it may, the approach I will take for this document is to
+explain some idioms and practices in use in the findutils source code,
+and leave it up to the reader's engineering judgement to decide which
+considerations apply to the code they are working on, and whether or
+not there is sufficient reason to ignore the guidance in current
+circumstances.
+
+* Menu:
+
+* Make the Compiler Find the Bugs::
+* The File System Is Being Modified::
+* Don't Trust the File System Contents::
+* Debugging is For Users Too::
+* Factor Out Repeated Code::
+
+\1f
+File: find-maint.info,  Node: Make the Compiler Find the Bugs,  Next: The File System Is Being Modified,  Up: Coding Conventions
+
+4.1 Make the Compiler Find the Bugs
+===================================
+
+Finding bugs is tedious.  If I have a filesystem containing two million
+files, and a find command line should print one million of them, but in
+fact it misses out 1%, you can tell the program is printing the wrong
+result only if you know the right answer for that filesystem at that
+time.  If you don't know this, you may just not find out about that
+bug.  For this reason it is important to have a comprehensive test
+suite.
+
+   The test suite is of course not the only way to find the bugs.  The
+findutils source code makes liberal use of the assert macro.  While on
+the one hand these might be a performance drain, the performance impact
+of most of these is negligible compared to the time taken to fetch even
+one sector from a disk drive.
+
+   Assertions should not be used to check the results of operations
+which may be affected by the program's external environment.  For
+example, never assert that a file could be opened successfully.  Errors
+relating to problems with the program's execution environment should be
+diagnosed with a user-oriented error message.  An assertion failure
+should always denote a bug in the program.
+
+   Don't use `assert' to catch not-fuly-implemented features of your
+code.  Finish the implementation, disable the code, or leave the
+unfinished version on a local branch.
+
+   Several programs in the findutils suite perform self-checks.  See for
+example the function `pred_sanity_check' in `find/pred.c'.  This is
+generally desirable.
+
+   There are also a number of small ways in which we can help the
+compiler to find the bugs for us.
+
+4.1.1 Constants in Equality Testing
+-----------------------------------
+
+It's a common error to write `=' when `==' is meant.  Sometimes this
+happens in new code and is simply due to finger trouble.  Sometimes it
+is the result of the inadvertent deletion of a character.  In any case,
+there is a subset of cases where we can persuade the compiler to
+generate an error message when we make this mistake; this is where the
+equality test is with a constant.
+
+   This is an example of a vulnerable piece of code.
+
+     if (x == 2)
+      ...
+
+   A simple typo converts the above into
+
+     if (x = 2)
+      ...
+
+   We've introduced a bug; the condition is always true, and the value
+of `x' has been changed.  However, a simple change to our practice
+would have made us immune to this problem:
+
+     if (2 == x)
+      ...
+
+   Usually, the Emacs keystroke `M-t' can be used to swap the operands.
+
+4.1.2 Spelling of ASCII NUL
+---------------------------
+
+Strings in C are just sequences of characters terminated by a NUL.  The
+ASCII NUL character has the numerical value zero.  It is normally
+represented in C code as `\0'.  Here is a typical piece of C code:
+
+     *p = '\0';
+
+   Consider what happens if there is an unfortunate typo:
+
+     *p = '0';
+
+   We have changed the meaning of our program and the compiler cannot
+diagnose this as an error.  Our string is no longer terminated.  Bad
+things will probably happen.  It would be better if the compiler could
+help us diagnose this problem.
+
+   In C, the type of `'\0'' is in fact int, not char.  This provides us
+with a simple way to avoid this error.  The constant `0' has the same
+value and type as the constant `'\0''.  However, it is not as
+vulnerable to typos.    For this reason I normally prefer to use this
+code:
+
+     *p = 0;
+
+\1f
+File: find-maint.info,  Node: Factor Out Repeated Code,  Prev: Debugging is For Users Too,  Up: Coding Conventions
+
+4.2 Factor Out Repeated Code
+============================
+
+Repeated code imposes a greater maintenance burden and increases the
+exposure to bugs.  For example, if you discover that something you want
+to implement has some similarity with an existing piece of code, don't
+cut and paste it.  Instead, factor the code out.  The risk of cutting
+and pasting the code, particularly if you do this several times, is
+that you end up with several copies of the same code.
+
+   If the original code had a bug, you now have N places where this
+needs to be fixed.  It's all to easy to miss some out when trying to
+fix the bug.  Equally, it's quite possible that when pasting the code
+into some function, the pasted code was not quite adapted correctly to
+its new environment.  To pick a contrived example, perhaps it modifies a
+global variable which it that code shouldn't be touching in its new
+home.  Worse, perhaps it makes some unstated assumption about the
+nature of the input arguments which is in fact not true for the context
+of the now duplicated code.
+
+   A good example of the use of refactoring in findutils is the
+`collect_arg' function in `find/parser.c'.  A less clear-cut but larger
+example is the factoring out of code which would otherwise have been
+duplicated between `find/find.c' and `find/ftsfind.c'.
+
+   The findutils test suite is comprehensive enough that refactoring
+code should not generally be a daunting prospect from a testing point of
+view.  Nevertheless there are some areas which are only lightly-tested:
+
+  1. Tests on the ages of files
+
+  2. Code which deals with the values returned by operating system
+     calls (for example handling of ENOENT)
+
+  3. Code dealing with OS limits (for example, limits on path length or
+     exec arguments)
+
+  4. Code relating to features not all systems have (for example
+     Solaris Doors)
+
+   Please exercise caution when working in those areas.
+
+\1f
+File: find-maint.info,  Node: Debugging is For Users Too,  Next: Factor Out Repeated Code,  Prev: Don't Trust the File System Contents,  Up: Coding Conventions
+
+4.3 Debugging is For Users Too
+==============================
+
+Debug and diagnostic code is often used to verify that a program is
+working in the way its author thinks it should be.  But users are often
+uncertain about what a program is doing, too.  Exposing them a little
+more diagnostic information can help.  Much of the diagnostic code in
+`find', for example, is controlled by the `-D' flag, as opposed to C
+preprocessor directives.
+
+   Making diagnostic messages available to users also means that the
+phrasing of the diagnostic messages becomes important, too.
+
+\1f
+File: find-maint.info,  Node: Don't Trust the File System Contents,  Next: Debugging is For Users Too,  Prev: The File System Is Being Modified,  Up: Coding Conventions
+
+4.4 Don't Trust the File System Contents
+========================================
+
+People use `find' to search in directories created by other people.
+Sometimes they do this to check to suspicious activity (for example to
+look for new setuid binaries).  This means that it would be bad if
+`find' were vulnerable to, say, a security problem exploitable by
+constructing a specially-crafted filename.  The same consideration
+would apply to `locate' and `updatedb'.
+
+   Henry Spencer said this well in his fifth commandment:
+
+     Thou shalt check the array bounds of all strings (indeed, all
+     arrays), for surely where thou typest `foo' someone someday shall
+     type `supercalifragilisticexpialidocious'.
+
+   Symbolic links can often be a problem.  If `find' calls `lstat' on
+something and discovers that it is a directory, it's normal for `find'
+to recurse into it.  Even if the `chdir' system call is used
+immediately, there is still a window of opportunity between the `lstat'
+and the `chdir' in which a malicious person could rename the directory
+and substitute a symbolic link to some other directory.
+
+\1f
+File: find-maint.info,  Node: The File System Is Being Modified,  Next: Don't Trust the File System Contents,  Prev: Make the Compiler Find the Bugs,  Up: Coding Conventions
+
+4.5 The File System Is Being Modified
+=====================================
+
+The filesystem gets modified while you are traversing it.  For,
+example, it's normal for files to get deleted while `find' is
+traversing a directory.  Issuing an error message seems helpful when a
+file is deleted from the one directory you are interested in, but if
+`find' is searching 15000 directories, such a message becomes less
+helpful.
+
+   Bear in mind also that it is possible for the directory `find' is
+currently searching could be moved to another point in the filesystem,
+and that the directory in which `find' was started could be deleted.
+
+   Henry Spencer's sixth commandment is also apposite here:
+
+     If a function be advertised to return an error code in the event of
+     difficulties, thou shalt check for that code, yea, even though the
+     checks triple the size of thy code and produce aches in thy typing
+     fingers, for if thou thinkest "it cannot happen to me", the gods
+     shall surely punish thee for thy arrogance.
+
+   There are a lot of files out there.  They come in all dates and
+sizes.  There is a condition out there in the real world to exercise
+every bit of the code base.  So we try to test that code base before
+someone falls over a bug.
+
+\1f
+File: find-maint.info,  Node: Tools,  Next: Using the GNU Portability Library,  Prev: Coding Conventions,  Up: Top
+
+5 Tools
+*******
+
+Most of the tools required to build findutils are mentioned in the file
+`README-hacking'.  We also use some other tools:
+
+System call traces
+     Much of the execution time of find is spent waiting for filesystem
+     operations.  A system call trace (for example, that provided by
+     `strace') shows what system calls are being made.   Using this
+     information we can work to remove unnecessary file system
+     operations.
+
+Valgrind
+     Valgrind is a tool which dynamically verifies the memory accesses a
+     program makes to ensure that they are valid (for example, that the
+     behaviour of the program does not in any way depend on the
+     contents of uninitialised memory).
+
+DejaGnu
+     DejaGnu is the test framework used to run the findutils test suite
+     (the `runtest' program is part of DejaGnu).  It would be ideal if
+     everybody building `findutils' also ran the test suite, but many
+     people don't have DejaGnu installed.  When changes are made to
+     findutils, DejaGnu is invoked a lot. *Note Testing::, for more
+     information.
+
+\1f
+File: find-maint.info,  Node: Using the GNU Portability Library,  Next: Documentation,  Prev: Tools,  Up: Top
+
+6 Using the GNU Portability Library
+***********************************
+
+The Gnulib library (`http://www.gnu.org/software/gnulib/') makes a
+variety of systems look more like a GNU/Linux system and also applies a
+bunch of automatic bug fixes and workarounds.  Some of these also apply
+to GNU/Linux systems too.  For example, the Gnulib regex implementation
+is used when we determine that we are building on a GNU libc system
+with a bug in the regex implementation.
+
+6.1 How and Why we Import the Gnulib Code
+=========================================
+
+Gnulib does not have a release process which results in a source
+tarball you can download.  Instead, the code is simply made available
+by GIT.   The code is also available via `git-cvspserver', but we
+decided not to use this, since `import-gnulib.sh' depended on `cvs
+update -D', which at the time `git-cvspserver' did not support.
+
+   GNU projects vary in how they interact with Gnulib.  Many import a
+selection of code from Gnulib into the working directory and then check
+the updated files into the repository for their project.  The coreutils
+project does this, for example.
+
+   At the last maintainer changeover for findutils (2003) it turned out
+that there was a lot of material in findutils in common with Gnulib,
+but it had not been updated in a long time.  It was difficult to figure
+out which source files were intended to track external sources and
+which were intended to contain incompatible changes, or diverge for
+other reasons.
+
+   To reduce this uncertainty, I decided to treat Gnulib much like
+Automake.  Files supplied by Automake are simply absent from the
+findutils source tree.  When Automake is run with `automake
+--add-missing --copy', it adds in all the files it thinks should be
+there which aren't there already.
+
+   An analogous approach is taken with Gnulib.  The Gnulib code is
+imported from the git repository for Gnulib with a findutils helper
+script, `import-gnulib.sh'.  That script fetches a copy of the Gnulib
+code into the subdirectory `gnulib-git' and then runs `gnulib-tool'.
+The `gnulib-tool' program copies the required parts of Gnulib into the
+findutils source tree in the subdirectory `gnulib'.  This process gives
+us the property that the code in `gnulib' and `gnulib-git' is not
+included in the findutils git tree.   Both directories are listed in
+`.gitignore' and so git ignores them.
+
+   Findutils does not use all the Gnulib code.  The modules we need are
+listed in the file `import-gnulib.config'.  The same file also
+indicates the version of Gnulib that we want to use.  Since Gnulib has
+no actual release process, we just use a date.  Both `import-gnulib.sh'
+and `import-gnulib.config' are in the findutils git repository.
+
+   The upshot of all this is that we can use the findutils git
+repository to track which version of Gnulib every findutils release
+uses.  That information is also provided when the user invokes a
+findutils program with the `--version' option.
+
+   A small number of files are installed by automake and will therefore
+vary according to which version of automake was used to generate a
+release.  This includes for example boiler-plate GNU files such as
+`ABOUT-NLS', `INSTALL' and `COPYING'.
+
+6.2 How We Fix Gnulib Bugs
+==========================
+
+If we always directly import the Gnulib code directly from the git
+repository in this way, it is impossible to maintain a locally
+different copy of Gnulib.  This is often a benefit in that accidental
+version skew is prevented.
+
+   However, sometimes we want deliberate version skew in order to use a
+findutils-specific patched version of a Gnulib file, for example
+because we fixed a bug.
+
+   Gnulib is used by quite a number of GNU projects, and this means that
+it gets plenty of testing.  Therefore there are relatively few bugs in
+the Gnulib code, but it does happen from time to time.
+
+   However, since there is no waiting around for a Gnulib source release
+tarball, Gnulib bugs are generally fixed quickly.  Here is an outline
+of the way we would contribute a fix to Gnulib (assuming you know it is
+not already fixed in the current Gnulib git tree):
+
+Check you already completed a copyright assignment for Gnulib
+
+Begin with a vanilla git tree
+     Download the Findutils source code from git (or use the tree you
+     have already)
+
+Check out a copy of the Gnulib source
+     Check out a copy of the Gnulib source tree.  The
+     `import-gnulib.sh' script may have generated a shallow git clone
+     as opposed to a normal, full clone in the directory `gnulib-git'.
+     This means that you may not be able to clone the repository that
+     `import-gnulib.sh' generates.  However, you can make a normal
+     (full) clone with `git clone
+     git_repo="git://git.savannah.gnu.org/gnulib.git"'.  Do this
+     somewhere outside the findutils source tree.
+
+Import Gnulib from your local copy
+     The `import-gnulib.sh' tool has a `-d' option which you can use to
+     import the code from a local copy of Gnulib.
+
+Build findutils
+     Build findutils and run the test suite, which should pass.  In our
+     example we assume you have just noticed a bug in Gnulib, not that
+     recent Gnulib changes broke the findutils regression tests.
+
+Write a test case
+     If in fact Gnulib did break the findutils regression tests, you
+     can probably skip this step, since you already have a test case
+     demonstrating the problem.  Otherwise, write a findutils test case
+     for the bug and/or a Gnulib test case.
+
+Fix the Gnulib bug
+     Make sure your editor follows symbolic links so that your changes
+     to `gnulib/...' actually affect the files in the git working
+     directory you checked out earlier.   Observe that your test now
+     passes.
+
+Prepare a Gnulib patch
+     Use `git format-patch' to prepare the patch.  Follow the normal
+     usage for checkin comments (take a look at the output of `git
+     log').  Check that the patch conforms with the GNU coding
+     standards, and email it to the Gnulib mailing list.
+
+Wait for the patch to be applied
+     Once your bug fix has been applied, you can update your local
+     directory from git, re-import the code into Findutils (still using
+     the `-d' option), and re-run the tests.  This verifies that the
+     fix the Gnulib team made actually fixes your problem.
+
+Reimport the Gnulib code
+     Update the findutils file `import-gnulib.config' to specify git
+     commit which is after the point at which the bug fix was committed
+     to Gnulib.  You can do this with `git rev-parse HEAD'.  Finally,
+     re-import the Gnulib code directly from git by using
+     `import-gnulib.sh' without the `-d' option, and run the tests
+     again.  This verifies that there was no remaining local change
+     that we were relying on to fix the bug.   Make sure you checked
+     everything in by running `git status'.
+
+   There is an alternative to the method above; it is possible to store
+local diffs to be patched into gnulib beneath the `gnulib-local'.
+Normally however, there is no need for this, since gnulib updates are
+very prompt.
+
+\1f
+File: find-maint.info,  Node: Documentation,  Next: Testing,  Prev: Using the GNU Portability Library,  Up: Top
+
+7 Documentation
+***************
+
+The findutils git tree includes several different types of
+documentation.
+
+7.1 User Documentation
+======================
+
+User-oriented documentation is provided as manual pages and in Texinfo.
+See *note Introduction: (find)Introduction.
+
+   Please make sure both sets of documentation are updated if you make a
+change to the code.  The GNU coding standards do not normally call for
+maintaining manual pages on the grounds of effort duplication.
+However, the manual page format is more convenient for quick reference,
+and so it's worth maintaining both types of documentation.  However,
+the manual pages are normally rather more terse than the Texinfo
+documentation.  The manual pages are suitable for reference use, but
+the Texinfo manual should also include introductory and tutorial
+material.
+
+7.2 Build Guidance
+==================
+
+`ABOUT-NLS'
+     Describes the Free Translation Project, the translation status of
+     various GNU projects, and how to participate by translating an
+     application.
+
+`AUTHORS'
+     Lists the authors of findutils.
+
+`COPYING'
+     The copyright license covering findutils; currently, the GNU GPL,
+     version 3.
+
+`INSTALL'
+     Generic installation instructions for installing GNU programs.
+
+`README'
+     Information about how to compile findutils in particular
+
+`README-alpha'
+     A README file which is included with testing releases of findutils.
+
+`README-hacking'
+     Describes how to build findutils from the code in git.
+
+`THANKS'
+     Thanks for people who contributed to findutils.  Generally, if
+     someone's contribution was significant enough to need a copyright
+     assignment, their name should go in here.
+
+`TODO'
+     Mainly obsolete.
+
+7.3 Release Information
+=======================
+
+`NEWS'
+     Enumerates the user-visible change in each release.  Typical
+     changes are fixed bugs, functionality changes and documentation
+     changes.  Include the date when a release is made.
+
+`ChangeLog'
+     This file enumerates all changes to the findutils source code (with
+     the possible exception of `.cvsignore' and `.gitignore' changes).
+     The level of detail used for this file should be sufficient to
+     answer the questions "what changed?" and "why was it changed?".
+     If a change fixes a bug, always give the bug reference number in
+     both the `ChangeLog' and `NEWS' files and of course also in the
+     checkin message.  In general, it should be possible to enumerate
+     all material changes to a function by searching for its name in
+     `ChangeLog'.  Mention when each release is made.
+
+\1f
+File: find-maint.info,  Node: Testing,  Next: Bugs,  Prev: Documentation,  Up: Top
+
+8 Testing
+*********
+
+This chapter will explain the general procedures for adding tests to
+the test suite, and the functions defined in the findutils-specific
+DejaGnu configuration.  Where appropriate references will be made to
+the DejaGnu documentation.
+
+\1f
+File: find-maint.info,  Node: Bugs,  Next: Distributions,  Prev: Testing,  Up: Top
+
+9 Bugs
+******
+
+Bugs are logged in the Savannah bug tracker
+`http://savannah.gnu.org/bugs/?group=findutils'.  The tracker offers
+several fields but their use is largely obvious.  The life-cycle of a
+bug is like this:
+
+Open
+     Someone, usually a maintainer, a distribution maintainer or a user,
+     creates a bug by filling in the form.   They fill in field values
+     as they see fit.  This will generate an email to
+     <bug-findutils@gnu.org>.
+
+Triage
+     The bug hangs around with `Status=None' until someone begins to
+     work on it.  At that point they set the "Assigned To" field and
+     will sometimes set the status to `In Progress', especially if the
+     bug will take a while to fix.
+
+Non-bugs
+     Quite a lot of reports are not actually bugs; for these the usual
+     procedure is to explain why the problem is not a bug, set the
+     status to `Invalid' and close the bug.   Make sure you set the
+     `Assigned to' field to yourself before closing the bug.
+
+Fixing
+     When you commit a bug fix into git (or in the case of a contributed
+     patch, commit the change), mark the bug as `Fixed'.  Make sure you
+     include a new test case where this is relevant.  If you can figure
+     out which releases are affected, please also set the `Release'
+     field to the earliest release which is affected by the bug.
+     Indicate which source branch the fix is included in (for example,
+     4.2.x or 4.3.x).  Don't close the bug yet.
+
+Release
+     When a release is made which includes the bug fix, make sure the
+     bug is listed in the NEWS file.  Once the release is made, fill in
+     the `Fixed Release' field and close the bug.
+
+\1f
+File: find-maint.info,  Node: Distributions,  Next: Internationalisation,  Prev: Bugs,  Up: Top
+
+10 Distributions
+****************
+
+Almost all GNU/Linux distributions include findutils, but only some of
+them have a package maintainer who is a member of the mailing list.
+Distributions don't often feed back patches to the
+<bug-findutils@gnu.org> list, but on the other hand many of their
+patches relate only to standards for file locations and so forth, and
+are therefore distribution specific.  On an irregular basis I check the
+current patches being used by one or two distributions, but the total
+number of GNU/Linux distributions is large enough that we could not
+hope to cover them all.
+
+   Often, bugs are raised against a distribution's bug tracker instead
+of GNU's.    Periodically (about every six months) I take a look at some
+of the more accessible bug trackers to indicate which bugs have been
+fixed upstream.
+
+   Many distributions include both findutils and the slocate package,
+which provides a replacement `locate'.
+
+\1f
+File: find-maint.info,  Node: Internationalisation,  Next: Security,  Prev: Distributions,  Up: Top
+
+11 Internationalisation
+***********************
+
+Translation is essentially automated from the maintainer's point of
+view.  The TP mails the maintainer when a new PO file is available, and
+we just download it and check it in.  We copy the `.po' files into the
+git repository.  For more information, please see
+`http://translationproject.org/domain/findutils.html'.
+
+\1f
+File: find-maint.info,  Node: Security,  Next: Making Releases,  Prev: Internationalisation,  Up: Top
+
+12 Security
+***********
+
+See *note Security Considerations: (find)Security Considerations, for a
+full description of the findutils approach to security considerations
+and discussion of particular tools.
+
+   If someone reports a security bug publicly, we should fix this as
+rapidly as possible.  If necessary, this can mean issuing a fixed
+release containing just the one bug fix.  We try to avoid issuing
+releases which include both significant security fixes and functional
+changes.
+
+   Where someone reports a security problem privately, we generally try
+to construct and test a patch without pushing the intermediate code to
+the public repository.
+
+   Once everything has been tested, this allows us to make a release and
+push the patch.  The advantage of doing things this way is that we
+avoid situations where people watching for git commits can figure out
+and exploit a security problem before a fixed release is available.
+
+   It's important that security problems be fixed promptly, but don't
+rush so much that things go wrong.  Make sure the new release really
+fixes the problem.  It's usually best not to include functional changes
+in your security-fix release.
+
+   If the security problem is serious, send an alert to
+<vendor-sec@lst.de>.  The members of the list include most GNU/Linux
+distributions.  The point of doing this is to allow them to prepare to
+release your security fix to their customers, once the fix becomes
+available.    Here is an example alert:-
+
+     GNU findutils heap buffer overrun (potential privilege escalation)
+
+
+
+     I. BACKGROUND
+     =============
+
+     GNU findutils is a set of programs which search for files on Unix-like
+     systems.  It is maintained by the GNU Project of the Free Software
+     Foundation.  For more information, see
+     `http://www.gnu.org/software/findutils'.
+
+
+     II. DESCRIPTION
+     ===============
+
+     When GNU locate reads filenames from an old-format locate database,
+     they are read into a fixed-length buffer allocated on the heap.
+     Filenames longer than the 1026-byte buffer can cause a buffer overrun.
+     The overrunning data can be chosen by any person able to control the
+     names of filenames created on the local system.  This will normally
+     include all local users, but in many cases also remote users (for
+     example in the case of FTP servers allowing uploads).
+
+     III. ANALYSIS
+     =============
+
+     Findutils supports three different formats of locate database, its
+     native format "LOCATE02", the slocate variant of LOCATE02, and a
+     traditional ("old") format that locate uses on other Unix systems.
+
+     When locate reads filenames from a LOCATE02 database (the default
+     format), the buffer into which data is read is automatically extended
+     to accomodate the length of the filenames.
+
+     This automatic buffer extension does not happen for old-format
+     databases.  Instead a 1026-byte buffer is used.  When a longer
+     pathname appears in the locate database, the end of this buffer is
+     overrun.  The buffer is allocated on the heap (not the stack).
+
+     If the locate database is in the default LOCATE02 format, the locate
+     program does perform automatic buffer extension, and the program is
+     not vulnerable to this problem.  The software used to build the
+     old-format locate database is not itself vulnerable to the same
+     attack.
+
+     Most installations of GNU findutils do not use the old database
+     format, and so will not be vulnerable.
+
+
+     IV. DETECTION
+     =============
+
+     Software
+     --------
+     All existing releases of findutils are affected.
+
+
+     Installations
+     -------------
+
+     To discover the longest path name on a given system, you can use the
+     following command (requires GNU findutils and GNU coreutils):
+
+     find / -print0 | tr -c '\0' 'x' | tr '\0' '\n' | wc -L
+
+
+     V. EXAMPLE
+     ==========
+
+     This section includes a shell script which determines which of a list
+     of locate binaries is vulnerable to the problem.  The shell script has
+     been tested only on glibc based systems having a mktemp binary.
+
+     NOTE: This script deliberately overruns the buffer in order to
+     determine if a binary is affected.  Therefore running it on your
+     system may have undesirable effects.  We recommend that you read the
+     script before running it.
+
+     #! /bin/sh
+     set +m
+     if vanilla_db="$(mktemp nicedb.XXXXXX)" ; then
+         if updatedb --prunepaths="" --old-format --localpaths="/tmp" \
+       --output="$@{vanilla_db@}" ; then
+       true
+         else
+       rm -f "$@{vanilla_db@}"
+       vanilla_db=""
+       echo "Failed to create old-format locate database; skipping the sanity checks" >&2
+         fi
+     fi
+
+     make_overrun_db() @{
+         # Start with a valid database
+         cat "$@{vanilla_db@}"
+         # Make the final entry really long
+         dd if=/dev/zero  bs=1 count=1500 2>/dev/null | tr '\000' 'x'
+     @}
+
+
+
+     ulimit -c 0
+
+     usage() @{ echo "usage: $0 binary [binary...]" >&2; exit $1; @}
+     [ $# -eq 0 ] && usage 1
+
+     bad=""
+     good=""
+     ugly=""
+     if dbfile="$(mktemp nasty.XXXXXX)"
+     then
+         make_overrun_db > "$dbfile"
+         for locate ; do
+           ver="$locate = $("$locate"  --version | head -1)"
+           if [ -z "$vanilla_db" ] || "$locate" -d "$vanilla_db" "" >/dev/null ; then
+         "$locate" -d "$dbfile" "" >/dev/null
+         if [ $? -gt 128 ] ; then
+             bad="$bad
+     vulnerable: $ver"
+         else
+             good="$good
+     good: $ver"
+         fi
+            else
+         # the regular locate failed
+         ugly="$ugly
+     buggy, may or may not be vulnerable: $ver"
+            fi
+         done
+         rm -f "$@{dbfile@}" "$@{vanilla_db@}"
+         # good: unaffected.  bad: affected (vulnerable).
+         # ugly: doesn't even work for a normal old-format database.
+         echo "$good"
+         echo "$bad"
+         echo "$ugly"
+     else
+       exit 1
+     fi
+
+
+
+
+
+     VI. VENDOR RESPONSE
+     ===================
+
+     The GNU project discovered the problem while 'locate' was being worked
+     on; this is the first public announcement of the problem.
+
+     The GNU findutils mantainer has issued a patch as p[art of this
+     announcement.  The patch appears below.
+
+     A source release of findutils-4.2.31 will be issued on 2007-05-30.
+     That release will of course include the patch.  The patch will be
+     committed to the public CVS repository at the same time.  Public
+     announcements of the release, including a description of the bug, will
+     be made at the same time as the release.
+
+     A release of findutils-4.3.x will follow and will also include the
+     patch.
+
+
+     VII. PATCH
+     ==========
+
+     This patch should apply to findutils-4.2.23 and later.
+     Findutils-4.2.23 was released almost two years ago.
+     Index: locate/locate.c
+     ===================================================================
+     RCS file: /cvsroot/findutils/findutils/locate/locate.c,v
+     retrieving revision 1.58.2.2
+     diff -u -p -r1.58.2.2 locate.c
+     --- locate/locate.c       22 Apr 2007 16:57:42 -0000      1.58.2.2
+     +++ locate/locate.c       28 May 2007 10:18:16 -0000
+     @@@@ -124,9 +124,9 @@@@ extern int errno;
+
+      #include "locatedb.h"
+      #include <getline.h>
+     -#include "../gnulib/lib/xalloc.h"
+     -#include "../gnulib/lib/error.h"
+     -#include "../gnulib/lib/human.h"
+     +#include "xalloc.h"
+     +#include "error.h"
+     +#include "human.h"
+      #include "dirname.h"
+      #include "closeout.h"
+      #include "nextelem.h"
+     @@@@ -468,10 +468,36 @@@@ visit_justprint_unquoted(struct process_
+        return VISIT_CONTINUE;
+      @}
+
+     +static void
+     +toolong (struct process_data *procdata)
+     +@{
+     +  error (EXIT_FAILURE, 0,
+     +  _("locate database %s contains a "
+     +    "filename longer than locate can handle"),
+     +  procdata->dbfile);
+     +@}
+     +
+     +static void
+     +extend (struct process_data *procdata, size_t siz1, size_t siz2)
+     +@{
+     +  /* Figure out if the addition operation is safe before performing it. */
+     +  if (SIZE_MAX - siz1 < siz2)
+     +    @{
+     +      toolong (procdata);
+     +    @}
+     +  else if (procdata->pathsize < (siz1+siz2))
+     +    @{
+     +      procdata->pathsize = siz1+siz2;
+     +      procdata->original_filename = x2nrealloc (procdata->original_filename,
+     +                                         &procdata->pathsize,
+     +                                         1);
+     +    @}
+     +@}
+     +
+      static int
+      visit_old_format(struct process_data *procdata, void *context)
+      @{
+     -  register char *s;
+     +  register size_t i;
+        (void) context;
+
+        /* Get the offset in the path where this path info starts.  */
+     @@@@ -479,20 +505,35 @@@@ visit_old_format(struct process_data *pr
+          procdata->count += getw (procdata->fp) - LOCATEDB_OLD_OFFSET;
+        else
+          procdata->count += procdata->c - LOCATEDB_OLD_OFFSET;
+     +  assert(procdata->count > 0);
+
+     -  /* Overlay the old path with the remainder of the new.  */
+     -  for (s = procdata->original_filename + procdata->count;
+     +  /* Overlay the old path with the remainder of the new.  Read
+     +   * more data until we get to the next filename.
+     +   */
+     +  for (i=procdata->count;
+             (procdata->c = getc (procdata->fp)) > LOCATEDB_OLD_ESCAPE;)
+     -    if (procdata->c < 0200)
+     -      *s++ = procdata->c;                /* An ordinary character.  */
+     -    else
+     -      @{
+     - /* Bigram markers have the high bit set. */
+     - procdata->c &= 0177;
+     - *s++ = procdata->bigram1[procdata->c];
+     - *s++ = procdata->bigram2[procdata->c];
+     -      @}
+     -  *s-- = '\0';
+     +    @{
+     +      if (procdata->c < 0200)
+     + @{
+     +   /* An ordinary character. */
+     +   extend (procdata, i, 1u);
+     +   procdata->original_filename[i++] = procdata->c;
+     + @}
+     +      else
+     + @{
+     +   /* Bigram markers have the high bit set. */
+     +   extend (procdata, i, 2u);
+     +   procdata->c &= 0177;
+     +   procdata->original_filename[i++] = procdata->bigram1[procdata->c];
+     +   procdata->original_filename[i++] = procdata->bigram2[procdata->c];
+     + @}
+     +    @}
+     +
+     +  /* Consider the case where we executed the loop body zero times; we
+     +   * still need space for the terminating null byte.
+     +   */
+     +  extend (procdata, i, 1u);
+     +  procdata->original_filename[i] = 0;
+
+        procdata->munged_filename = procdata->original_filename;
+
+
+
+     VIII. THANKS
+     ============
+
+     Thanks to Rob Holland <rob@inversepath.com> and Tavis Ormandy.
+
+
+     VIII. CVE INFORMATION
+     =====================
+
+     No CVE candidate number has yet been assigned for this vulnerability.
+     If someone provides one, I will include it in the public announcement
+     and change logs.
+
+   The original announcement above was sent out with a cleartext PGP
+signature, of course, but that has been omitted from the example.
+
+   Once a fixed release is available, announce the new release using the
+normal channels.  Any CVE number assigned for the problem should be
+included in the `ChangeLog' and `NEWS' entries. See
+`http://cve.mitre.org/' for an explanation of CVE numbers.
+
+\1f
+File: find-maint.info,  Node: Making Releases,  Next: GNU Free Documentation License,  Prev: Security,  Up: Top
+
+13 Making Releases
+******************
+
+This section will explain how to make a findutils release.   For the
+time being here is a terse description of the main steps:
+
+  1. Commit changes; make sure your working directory has no
+     uncommitted changes.
+
+  2. Test; make sure that all changes you have made have tests, and
+     that the tests pass.  Verify this with `make distcheck'.
+
+  3. Bugs; make sure all Savannah bug entries fixed in this release are
+     fixed.
+
+  4. NEWS; make sure that the NEWS and configure.in file are updated
+     with the new release number (and checked in).
+
+  5. Build the release tarball; do this with `make distcheck'.  Copy
+     the tarball somewhere safe.
+
+  6. Tag the release; findutils releases are tagged like this for
+     example: v4.5.5.  Previously a different format was in use:
+     FINDUTILS_4_3_8-1.  You can create a tag with the a command like
+     this: `git tag -s -m "Findutils release v4.5.7" v4.5.7'.
+
+  7. Prepare the upload and upload it.  *Note Automated FTP Uploads:
+     (maintain)Automated FTP Uploads, for detailed upload instructions.
+
+  8. Make a release announcement; include an extract from the NEWS file
+     which explains what's changed.  Announcements for test releases
+     should just go to <bug-findutils@gnu.org>.  Announcements for
+     stable releases should go to <info-gnu@gnu.org> as well.
+
+  9. Bump the release numbers in git; edit the `configure.in' and
+     `NEWS' files to advance the release numbers.   For example, if you
+     have just released `4.6.2', bump the release number to
+     `4.6.3-git'.  The point of the `-git' suffix here is that a
+     findutils binary built from git will bear a release number
+     indicating it's not built from the "official" source release.
+
+ 10. Close bugs; any bugs recorded on Savannah which were fixed in this
+     release should now be marked as closed.   Update the `Fixed
+     Release' field of these bugs appropriately and make sure the
+     `Assigned to' field is populated.
+
+\1f
+File: find-maint.info,  Node: GNU Free Documentation License,  Prev: Making Releases,  Up: Top
+
+Appendix A GNU Free Documentation License
+*****************************************
+
+                     Version 1.3, 3 November 2008
+
+     Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+     `http://fsf.org/'
+
+     Everyone is permitted to copy and distribute verbatim copies
+     of this license document, but changing it is not allowed.
+
+  0. PREAMBLE
+
+     The purpose of this License is to make a manual, textbook, or other
+     functional and useful document "free" in the sense of freedom: to
+     assure everyone the effective freedom to copy and redistribute it,
+     with or without modifying it, either commercially or
+     noncommercially.  Secondarily, this License preserves for the
+     author and publisher a way to get credit for their work, while not
+     being considered responsible for modifications made by others.
+
+     This License is a kind of "copyleft", which means that derivative
+     works of the document must themselves be free in the same sense.
+     It complements the GNU General Public License, which is a copyleft
+     license designed for free software.
+
+     We have designed this License in order to use it for manuals for
+     free software, because free software needs free documentation: a
+     free program should come with manuals providing the same freedoms
+     that the software does.  But this License is not limited to
+     software manuals; it can be used for any textual work, regardless
+     of subject matter or whether it is published as a printed book.
+     We recommend this License principally for works whose purpose is
+     instruction or reference.
+
+  1. APPLICABILITY AND DEFINITIONS
+
+     This License applies to any manual or other work, in any medium,
+     that contains a notice placed by the copyright holder saying it
+     can be distributed under the terms of this License.  Such a notice
+     grants a world-wide, royalty-free license, unlimited in duration,
+     to use that work under the conditions stated herein.  The
+     "Document", below, refers to any such manual or work.  Any member
+     of the public is a licensee, and is addressed as "you".  You
+     accept the license if you copy, modify or distribute the work in a
+     way requiring permission under copyright law.
+
+     A "Modified Version" of the Document means any work containing the
+     Document or a portion of it, either copied verbatim, or with
+     modifications and/or translated into another language.
+
+     A "Secondary Section" is a named appendix or a front-matter section
+     of the Document that deals exclusively with the relationship of the
+     publishers or authors of the Document to the Document's overall
+     subject (or to related matters) and contains nothing that could
+     fall directly within that overall subject.  (Thus, if the Document
+     is in part a textbook of mathematics, a Secondary Section may not
+     explain any mathematics.)  The relationship could be a matter of
+     historical connection with the subject or with related matters, or
+     of legal, commercial, philosophical, ethical or political position
+     regarding them.
+
+     The "Invariant Sections" are certain Secondary Sections whose
+     titles are designated, as being those of Invariant Sections, in
+     the notice that says that the Document is released under this
+     License.  If a section does not fit the above definition of
+     Secondary then it is not allowed to be designated as Invariant.
+     The Document may contain zero Invariant Sections.  If the Document
+     does not identify any Invariant Sections then there are none.
+
+     The "Cover Texts" are certain short passages of text that are
+     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
+     that says that the Document is released under this License.  A
+     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
+     be at most 25 words.
+
+     A "Transparent" copy of the Document means a machine-readable copy,
+     represented in a format whose specification is available to the
+     general public, that is suitable for revising the document
+     straightforwardly with generic text editors or (for images
+     composed of pixels) generic paint programs or (for drawings) some
+     widely available drawing editor, and that is suitable for input to
+     text formatters or for automatic translation to a variety of
+     formats suitable for input to text formatters.  A copy made in an
+     otherwise Transparent file format whose markup, or absence of
+     markup, has been arranged to thwart or discourage subsequent
+     modification by readers is not Transparent.  An image format is
+     not Transparent if used for any substantial amount of text.  A
+     copy that is not "Transparent" is called "Opaque".
+
+     Examples of suitable formats for Transparent copies include plain
+     ASCII without markup, Texinfo input format, LaTeX input format,
+     SGML or XML using a publicly available DTD, and
+     standard-conforming simple HTML, PostScript or PDF designed for
+     human modification.  Examples of transparent image formats include
+     PNG, XCF and JPG.  Opaque formats include proprietary formats that
+     can be read and edited only by proprietary word processors, SGML or
+     XML for which the DTD and/or processing tools are not generally
+     available, and the machine-generated HTML, PostScript or PDF
+     produced by some word processors for output purposes only.
+
+     The "Title Page" means, for a printed book, the title page itself,
+     plus such following pages as are needed to hold, legibly, the
+     material this License requires to appear in the title page.  For
+     works in formats which do not have any title page as such, "Title
+     Page" means the text near the most prominent appearance of the
+     work's title, preceding the beginning of the body of the text.
+
+     The "publisher" means any person or entity that distributes copies
+     of the Document to the public.
+
+     A section "Entitled XYZ" means a named subunit of the Document
+     whose title either is precisely XYZ or contains XYZ in parentheses
+     following text that translates XYZ in another language.  (Here XYZ
+     stands for a specific section name mentioned below, such as
+     "Acknowledgements", "Dedications", "Endorsements", or "History".)
+     To "Preserve the Title" of such a section when you modify the
+     Document means that it remains a section "Entitled XYZ" according
+     to this definition.
+
+     The Document may include Warranty Disclaimers next to the notice
+     which states that this License applies to the Document.  These
+     Warranty Disclaimers are considered to be included by reference in
+     this License, but only as regards disclaiming warranties: any other
+     implication that these Warranty Disclaimers may have is void and
+     has no effect on the meaning of this License.
+
+  2. VERBATIM COPYING
+
+     You may copy and distribute the Document in any medium, either
+     commercially or noncommercially, provided that this License, the
+     copyright notices, and the license notice saying this License
+     applies to the Document are reproduced in all copies, and that you
+     add no other conditions whatsoever to those of this License.  You
+     may not use technical measures to obstruct or control the reading
+     or further copying of the copies you make or distribute.  However,
+     you may accept compensation in exchange for copies.  If you
+     distribute a large enough number of copies you must also follow
+     the conditions in section 3.
+
+     You may also lend copies, under the same conditions stated above,
+     and you may publicly display copies.
+
+  3. COPYING IN QUANTITY
+
+     If you publish printed copies (or copies in media that commonly
+     have printed covers) of the Document, numbering more than 100, and
+     the Document's license notice requires Cover Texts, you must
+     enclose the copies in covers that carry, clearly and legibly, all
+     these Cover Texts: Front-Cover Texts on the front cover, and
+     Back-Cover Texts on the back cover.  Both covers must also clearly
+     and legibly identify you as the publisher of these copies.  The
+     front cover must present the full title with all words of the
+     title equally prominent and visible.  You may add other material
+     on the covers in addition.  Copying with changes limited to the
+     covers, as long as they preserve the title of the Document and
+     satisfy these conditions, can be treated as verbatim copying in
+     other respects.
+
+     If the required texts for either cover are too voluminous to fit
+     legibly, you should put the first ones listed (as many as fit
+     reasonably) on the actual cover, and continue the rest onto
+     adjacent pages.
+
+     If you publish or distribute Opaque copies of the Document
+     numbering more than 100, you must either include a
+     machine-readable Transparent copy along with each Opaque copy, or
+     state in or with each Opaque copy a computer-network location from
+     which the general network-using public has access to download
+     using public-standard network protocols a complete Transparent
+     copy of the Document, free of added material.  If you use the
+     latter option, you must take reasonably prudent steps, when you
+     begin distribution of Opaque copies in quantity, to ensure that
+     this Transparent copy will remain thus accessible at the stated
+     location until at least one year after the last time you
+     distribute an Opaque copy (directly or through your agents or
+     retailers) of that edition to the public.
+
+     It is requested, but not required, that you contact the authors of
+     the Document well before redistributing any large number of
+     copies, to give them a chance to provide you with an updated
+     version of the Document.
+
+  4. MODIFICATIONS
+
+     You may copy and distribute a Modified Version of the Document
+     under the conditions of sections 2 and 3 above, provided that you
+     release the Modified Version under precisely this License, with
+     the Modified Version filling the role of the Document, thus
+     licensing distribution and modification of the Modified Version to
+     whoever possesses a copy of it.  In addition, you must do these
+     things in the Modified Version:
+
+       A. Use in the Title Page (and on the covers, if any) a title
+          distinct from that of the Document, and from those of
+          previous versions (which should, if there were any, be listed
+          in the History section of the Document).  You may use the
+          same title as a previous version if the original publisher of
+          that version gives permission.
+
+       B. List on the Title Page, as authors, one or more persons or
+          entities responsible for authorship of the modifications in
+          the Modified Version, together with at least five of the
+          principal authors of the Document (all of its principal
+          authors, if it has fewer than five), unless they release you
+          from this requirement.
+
+       C. State on the Title page the name of the publisher of the
+          Modified Version, as the publisher.
+
+       D. Preserve all the copyright notices of the Document.
+
+       E. Add an appropriate copyright notice for your modifications
+          adjacent to the other copyright notices.
+
+       F. Include, immediately after the copyright notices, a license
+          notice giving the public permission to use the Modified
+          Version under the terms of this License, in the form shown in
+          the Addendum below.
+
+       G. Preserve in that license notice the full lists of Invariant
+          Sections and required Cover Texts given in the Document's
+          license notice.
+
+       H. Include an unaltered copy of this License.
+
+       I. Preserve the section Entitled "History", Preserve its Title,
+          and add to it an item stating at least the title, year, new
+          authors, and publisher of the Modified Version as given on
+          the Title Page.  If there is no section Entitled "History" in
+          the Document, create one stating the title, year, authors,
+          and publisher of the Document as given on its Title Page,
+          then add an item describing the Modified Version as stated in
+          the previous sentence.
+
+       J. Preserve the network location, if any, given in the Document
+          for public access to a Transparent copy of the Document, and
+          likewise the network locations given in the Document for
+          previous versions it was based on.  These may be placed in
+          the "History" section.  You may omit a network location for a
+          work that was published at least four years before the
+          Document itself, or if the original publisher of the version
+          it refers to gives permission.
+
+       K. For any section Entitled "Acknowledgements" or "Dedications",
+          Preserve the Title of the section, and preserve in the
+          section all the substance and tone of each of the contributor
+          acknowledgements and/or dedications given therein.
+
+       L. Preserve all the Invariant Sections of the Document,
+          unaltered in their text and in their titles.  Section numbers
+          or the equivalent are not considered part of the section
+          titles.
+
+       M. Delete any section Entitled "Endorsements".  Such a section
+          may not be included in the Modified Version.
+
+       N. Do not retitle any existing section to be Entitled
+          "Endorsements" or to conflict in title with any Invariant
+          Section.
+
+       O. Preserve any Warranty Disclaimers.
+
+     If the Modified Version includes new front-matter sections or
+     appendices that qualify as Secondary Sections and contain no
+     material copied from the Document, you may at your option
+     designate some or all of these sections as invariant.  To do this,
+     add their titles to the list of Invariant Sections in the Modified
+     Version's license notice.  These titles must be distinct from any
+     other section titles.
+
+     You may add a section Entitled "Endorsements", provided it contains
+     nothing but endorsements of your Modified Version by various
+     parties--for example, statements of peer review or that the text
+     has been approved by an organization as the authoritative
+     definition of a standard.
+
+     You may add a passage of up to five words as a Front-Cover Text,
+     and a passage of up to 25 words as a Back-Cover Text, to the end
+     of the list of Cover Texts in the Modified Version.  Only one
+     passage of Front-Cover Text and one of Back-Cover Text may be
+     added by (or through arrangements made by) any one entity.  If the
+     Document already includes a cover text for the same cover,
+     previously added by you or by arrangement made by the same entity
+     you are acting on behalf of, you may not add another; but you may
+     replace the old one, on explicit permission from the previous
+     publisher that added the old one.
+
+     The author(s) and publisher(s) of the Document do not by this
+     License give permission to use their names for publicity for or to
+     assert or imply endorsement of any Modified Version.
+
+  5. COMBINING DOCUMENTS
+
+     You may combine the Document with other documents released under
+     this License, under the terms defined in section 4 above for
+     modified versions, provided that you include in the combination
+     all of the Invariant Sections of all of the original documents,
+     unmodified, and list them all as Invariant Sections of your
+     combined work in its license notice, and that you preserve all
+     their Warranty Disclaimers.
+
+     The combined work need only contain one copy of this License, and
+     multiple identical Invariant Sections may be replaced with a single
+     copy.  If there are multiple Invariant Sections with the same name
+     but different contents, make the title of each such section unique
+     by adding at the end of it, in parentheses, the name of the
+     original author or publisher of that section if known, or else a
+     unique number.  Make the same adjustment to the section titles in
+     the list of Invariant Sections in the license notice of the
+     combined work.
+
+     In the combination, you must combine any sections Entitled
+     "History" in the various original documents, forming one section
+     Entitled "History"; likewise combine any sections Entitled
+     "Acknowledgements", and any sections Entitled "Dedications".  You
+     must delete all sections Entitled "Endorsements."
+
+  6. COLLECTIONS OF DOCUMENTS
+
+     You may make a collection consisting of the Document and other
+     documents released under this License, and replace the individual
+     copies of this License in the various documents with a single copy
+     that is included in the collection, provided that you follow the
+     rules of this License for verbatim copying of each of the
+     documents in all other respects.
+
+     You may extract a single document from such a collection, and
+     distribute it individually under this License, provided you insert
+     a copy of this License into the extracted document, and follow
+     this License in all other respects regarding verbatim copying of
+     that document.
+
+  7. AGGREGATION WITH INDEPENDENT WORKS
+
+     A compilation of the Document or its derivatives with other
+     separate and independent documents or works, in or on a volume of
+     a storage or distribution medium, is called an "aggregate" if the
+     copyright resulting from the compilation is not used to limit the
+     legal rights of the compilation's users beyond what the individual
+     works permit.  When the Document is included in an aggregate, this
+     License does not apply to the other works in the aggregate which
+     are not themselves derivative works of the Document.
+
+     If the Cover Text requirement of section 3 is applicable to these
+     copies of the Document, then if the Document is less than one half
+     of the entire aggregate, the Document's Cover Texts may be placed
+     on covers that bracket the Document within the aggregate, or the
+     electronic equivalent of covers if the Document is in electronic
+     form.  Otherwise they must appear on printed covers that bracket
+     the whole aggregate.
+
+  8. TRANSLATION
+
+     Translation is considered a kind of modification, so you may
+     distribute translations of the Document under the terms of section
+     4.  Replacing Invariant Sections with translations requires special
+     permission from their copyright holders, but you may include
+     translations of some or all Invariant Sections in addition to the
+     original versions of these Invariant Sections.  You may include a
+     translation of this License, and all the license notices in the
+     Document, and any Warranty Disclaimers, provided that you also
+     include the original English version of this License and the
+     original versions of those notices and disclaimers.  In case of a
+     disagreement between the translation and the original version of
+     this License or a notice or disclaimer, the original version will
+     prevail.
+
+     If a section in the Document is Entitled "Acknowledgements",
+     "Dedications", or "History", the requirement (section 4) to
+     Preserve its Title (section 1) will typically require changing the
+     actual title.
+
+  9. TERMINATION
+
+     You may not copy, modify, sublicense, or distribute the Document
+     except as expressly provided under this License.  Any attempt
+     otherwise to copy, modify, sublicense, or distribute it is void,
+     and will automatically terminate your rights under this License.
+
+     However, if you cease all violation of this License, then your
+     license from a particular copyright holder is reinstated (a)
+     provisionally, unless and until the copyright holder explicitly
+     and finally terminates your license, and (b) permanently, if the
+     copyright holder fails to notify you of the violation by some
+     reasonable means prior to 60 days after the cessation.
+
+     Moreover, your license from a particular copyright holder is
+     reinstated permanently if the copyright holder notifies you of the
+     violation by some reasonable means, this is the first time you have
+     received notice of violation of this License (for any work) from
+     that copyright holder, and you cure the violation prior to 30 days
+     after your receipt of the notice.
+
+     Termination of your rights under this section does not terminate
+     the licenses of parties who have received copies or rights from
+     you under this License.  If your rights have been terminated and
+     not permanently reinstated, receipt of a copy of some or all of
+     the same material does not give you any rights to use it.
+
+ 10. FUTURE REVISIONS OF THIS LICENSE
+
+     The Free Software Foundation may publish new, revised versions of
+     the GNU Free Documentation License from time to time.  Such new
+     versions will be similar in spirit to the present version, but may
+     differ in detail to address new problems or concerns.  See
+     `http://www.gnu.org/copyleft/'.
+
+     Each version of the License is given a distinguishing version
+     number.  If the Document specifies that a particular numbered
+     version of this License "or any later version" applies to it, you
+     have the option of following the terms and conditions either of
+     that specified version or of any later version that has been
+     published (not as a draft) by the Free Software Foundation.  If
+     the Document does not specify a version number of this License,
+     you may choose any version ever published (not as a draft) by the
+     Free Software Foundation.  If the Document specifies that a proxy
+     can decide which future versions of this License can be used, that
+     proxy's public statement of acceptance of a version permanently
+     authorizes you to choose that version for the Document.
+
+ 11. RELICENSING
+
+     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+     World Wide Web server that publishes copyrightable works and also
+     provides prominent facilities for anybody to edit those works.  A
+     public wiki that anybody can edit is an example of such a server.
+     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
+     site means any set of copyrightable works thus published on the MMC
+     site.
+
+     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+     license published by Creative Commons Corporation, a not-for-profit
+     corporation with a principal place of business in San Francisco,
+     California, as well as future copyleft versions of that license
+     published by that same organization.
+
+     "Incorporate" means to publish or republish a Document, in whole or
+     in part, as part of another Document.
+
+     An MMC is "eligible for relicensing" if it is licensed under this
+     License, and if all works that were first published under this
+     License somewhere other than this MMC, and subsequently
+     incorporated in whole or in part into the MMC, (1) had no cover
+     texts or invariant sections, and (2) were thus incorporated prior
+     to November 1, 2008.
+
+     The operator of an MMC Site may republish an MMC contained in the
+     site under CC-BY-SA on the same site at any time before August 1,
+     2009, provided the MMC is eligible for relicensing.
+
+
+ADDENDUM: How to use this License for your documents
+====================================================
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and license
+notices just after the title page:
+
+       Copyright (C)  YEAR  YOUR NAME.
+       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 section entitled ``GNU
+       Free Documentation License''.
+
+   If you have Invariant Sections, Front-Cover Texts and Back-Cover
+Texts, replace the "with...Texts." line with this:
+
+         with the Invariant Sections being LIST THEIR TITLES, with
+         the Front-Cover Texts being LIST, and with the Back-Cover Texts
+         being LIST.
+
+   If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+   If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License, to
+permit their use in free software.
+
+
+\1f
+Tag Table:
+Node: Top\7f988
+Node: Introduction\7f2066
+Node: Maintaining GNU Programs\7f2815
+Node: Design Issues\7f3617
+Node: Coding Conventions\7f7568
+Node: Make the Compiler Find the Bugs\7f9535
+Node: Factor Out Repeated Code\7f13092
+Node: Debugging is For Users Too\7f15118
+Node: Don't Trust the File System Contents\7f15849
+Node: The File System Is Being Modified\7f17132
+Node: Tools\7f18569
+Node: Using the GNU Portability Library\7f19770
+Node: Documentation\7f26951
+Node: Testing\7f29669
+Node: Bugs\7f30010
+Node: Distributions\7f31754
+Node: Internationalisation\7f32789
+Node: Security\7f33258
+Node: Making Releases\7f44621
+Node: GNU Free Documentation License\7f46746
+\1f
+End Tag Table
diff --git a/doc/find-maint.texi b/doc/find-maint.texi
new file mode 100644 (file)
index 0000000..59ab4a4
--- /dev/null
@@ -0,0 +1,1188 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename find-maint.info
+@settitle Maintaining Findutils
+@c For double-sided printing, uncomment:
+@c @setchapternewpage odd
+@c %**end of header
+
+@include versionmaint.texi
+
+@iftex
+@finalout
+@end iftex
+
+@dircategory GNU organization
+@direntry
+* Maintaining Findutils: (find-maint).        Maintaining GNU findutils
+@end direntry
+
+@copying
+This manual explains how GNU findutils is maintained, how changes should
+be made and tested, and what resources exist to help developers.
+
+This is edition @value{EDITION}, for findutils version @value{VERSION}.
+
+Copyright @copyright{} 2007, 2008, 2010 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, with no
+Front-Cover Texts, and with no Back-Cover Texts.
+A copy of the license is included in the section entitled ``GNU
+Free Documentation License''.
+@end copying
+
+@titlepage
+@title Maintaining Findutils
+@subtitle Edition @value{EDITION}, for GNU findutils version @value{VERSION}
+@subtitle @value{UPDATED}
+@author by James Youngman
+
+@page
+@vskip 0pt plus 1filll
+@insertcopying{}
+@end titlepage
+
+@contents
+
+@ifnottex
+@node Top, Introduction, (dir), (dir)
+@top Maintaining GNU Findutils
+
+@insertcopying
+@end ifnottex
+
+@menu
+* Introduction::
+* Maintaining GNU Programs::
+* Design Issues::
+* Coding Conventions::
+* Tools::
+* Using the GNU Portability Library::
+* Documentation::
+* Testing::
+* Bugs::
+* Distributions::
+* Internationalisation::
+* Security::
+* Making Releases::
+* GNU Free Documentation License::
+@end menu
+
+
+
+
+
+@node Introduction
+@chapter Introduction
+
+This document explains how to contribute to and maintain GNU
+Findutils.  It concentrates on developer-specific issues.  For
+information about how to use the software please refer to
+@xref{Introduction, ,Introduction,find,The Findutils manual}.
+
+This manual aims to be useful without necessarily being verbose.  It's
+also a recent document, so there will be a many areas in which
+improvements can be made.  If you find that the document misses out
+important information or any part of the document is be so terse as to
+be unuseful, please ask for help on the @email{bug-findutils@@gnu.org}
+mailing list.  We'll try to improve this document too.
+
+
+@node Maintaining GNU Programs
+@chapter Maintaining GNU Programs
+
+GNU Findutils is part of the GNU Project and so there are a number of
+documents which set out standards for the maintenance of GNU
+software.
+
+@table @file
+@item standards.texi
+GNU Project Coding Standards.  All changes to findutils should comply
+with these standards.  In some areas we go somewhat beyond the
+requirements of the standards, but these cases are explained in this
+manual.
+@item maintain.texi
+Information for Maintainers of GNU Software.  This document provides
+guidance for GNU maintainers.  Everybody with commit access should
+read this document.   Everybody else is welcome to do so too, of
+course.
+@end table
+
+
+
+@node Design Issues
+@chapter Design Issues
+
+The findutils package is installed on many many systems, usually as a
+fundamental component.  The programs in the package are often used in
+order to successfully boot or fix the system.
+
+This fact means that for findutils we bear in mind considerations that
+may not apply so much as for other packages.  For example, the fact
+that findutils is often a base component motivates us to
+@itemize
+@item Limit dependencies on libraries
+@item Avoid dependencies on other large packages (for example, interpreters)
+@item Be conservative when making changes to the 'stable' release branch
+@end itemize
+
+All those considerations come before functionality.  Functional
+enhancements are still made to findutils, but these are almost
+exclusively introduced in the 'development' release branch, to allow
+extensive testing and proving.
+
+Sometimes it is useful to have a priority list to provide guidance
+when making design trade-offs.   For findutils, that priority list is:
+
+@enumerate
+@item Correctness
+@item Standards compliance
+@item Security
+@item Backward compatibility
+@item Performance
+@item Functionality
+@end enumerate
+
+For example, we support the @code{-exec} action because POSIX
+compliance requires this, even though there are security problems with
+it and we would otherwise prefer people to use @code{-execdir}.  There
+are also cases where some performance is sacrificed in the name of
+security.  For example, the sanity checks that @code{find} performs
+while traversing a directory tree may slow it down.   We adopt
+functional changes, and functional changes are allowed to make
+@code{find} slower, but only if there is no detectable impact on users
+who don't use the feature.
+
+Backward-incompatible changes do get made in order to comply with
+standards (for example the behaviour of @code{-perm -...} changed in
+order to comply with POSIX).  However, they don't get made in order to
+provide better ease of use; for example the semantics of @code{-size
+-2G} are almost always unexpected by users, but we retain the current
+behaviour because of backward compatibility and for its similarity to
+the block-rounding behaviour of @code{-size -30}.  We might introduce
+a change which does not have the unfortunate rounding behaviour, but
+we would choose another syntax (for example @code{-size '<2G'}) for
+this.
+
+In a general sense, we try to do test-driven development of the
+findutils code; that is, we try to implement test cases for new
+features and bug fixes before modifying the code to make the test
+pass.  Some features of the code are tested well, but the test
+coverage for other features is less good.  If you are about to modify
+the code for a predicate and aren't sure about the test coverage, use
+@code{grep} on the test directories and measure the coverage with
+@code{lcov} or another test coverage tool.
+
+You should be able to use the @code{coverage} Makefile target (it's
+defined in @code{maint.mk} to generate a test coverage report for
+findutils.   Due to limitations in @code{lcov}, this only works if
+your build directory is the same asthe source directory (that is,
+you're not using a VPATH build configuration).
+
+Lastly, we try not to depend on having a ``working system''.  The
+findutils suite is used for diagnosis of problems, and this applies
+especially to @code{find}.  We should ensure that @code{find} still
+works on relatively broken systems, for example systems with damaged
+@file{/etc/passwd} or @code{/etc/fstab} files.  Another interesting
+example is the case where a system is a client of one or more
+unresponsive NFS servers.  On such a system, if you try to stat all
+mount points, your program will hang indefinitely, waiting for the
+remote NFS server to respond.
+
+Another interesting but unusual case is broken NFS servers and corrupt
+filesystems; sometimes they return `impossible' file modes.  It's
+important that find does not entirely fail when encountering such a
+file.
+
+
+@node Coding Conventions
+@chapter Coding Conventions
+
+Coding style documents which set out to establish a uniform look and
+feel to source code have worthy goals, for example greater ease of
+maintenance and readability.  However, I do not believe that in
+general coding style guide authors can envisage every situation, and
+it is always possible that it might on occasion be necessary to break
+the letter of the style guide in order to honour its spirit, or to
+better achieve the style guide's goals.
+
+I've certainly seen many style guides outside the free software world
+which make bald statements such as ``functions shall have exactly one
+return statement''.  The desire to ensure consistency and obviousness
+of control flow is laudable, but it is all too common for such bald
+requirements to be followed unthinkingly.  Certainly I've seen such
+coding standards result in unmaintainable code with terrible
+infelicities such as functions containing @code{if} statements nested
+nine levels deep.  I suppose such coding standards don't survive in
+free software projects because they tend to drive away potential
+contributors or tend to generate heated discussions on mailing lists.
+Equally, a nine-level-deep function in a free software program would
+quickly get refactored, assuming it is obvious what the function is
+supposed to do...
+
+Be that as it may, the approach I will take for this document is to
+explain some idioms and practices in use in the findutils source code,
+and leave it up to the reader's engineering judgement to decide which
+considerations apply to the code they are working on, and whether or
+not there is sufficient reason to ignore the guidance in current
+circumstances.
+
+
+@menu
+* Make the Compiler Find the Bugs::
+* The File System Is Being Modified::
+* Don't Trust the File System Contents::
+* Debugging is For Users Too::
+* Factor Out Repeated Code::
+@end menu
+
+@node    Make the Compiler Find the Bugs
+@section Make the Compiler Find the Bugs
+
+Finding bugs is tedious.  If I have a filesystem containing two
+million files, and a find command line should print one million of
+them, but in fact it misses out 1%, you can tell the program is
+printing the wrong result only if you know the right answer for that
+filesystem at that time.  If you don't know this, you may just not
+find out about that bug.  For this reason it is important to have a
+comprehensive test suite.
+
+The test suite is of course not the only way to find the bugs.  The
+findutils source code makes liberal use of the assert macro.  While on
+the one hand these might be a performance drain, the performance
+impact of most of these is negligible compared to the time taken to
+fetch even one sector from a disk drive.
+
+Assertions should not be used to check the results of operations which
+may be affected by the program's external environment.  For example,
+never assert that a file could be opened successfully.  Errors
+relating to problems with the program's execution environment should
+be diagnosed with a user-oriented error message.  An assertion failure
+should always denote a bug in the program.
+
+Don't use @code{assert} to catch not-fuly-implemented features of your
+code.  Finish the implementation, disable the code, or leave the
+unfinished version on a local branch.
+
+Several programs in the findutils suite perform self-checks.  See for
+example the function @code{pred_sanity_check} in @file{find/pred.c}.
+This is generally desirable.
+
+There are also a number of small ways in which we can help the
+compiler to find the bugs for us.
+
+@subsection Constants in Equality Testing
+
+It's a common error to write @code{=} when @code{==} is meant.
+Sometimes this happens in new code and is simply due to finger
+trouble.  Sometimes it is the result of the inadvertent deletion of a
+character.  In any case, there is a subset of cases where we can
+persuade the compiler to generate an error message when we make this
+mistake; this is where the equality test is with a constant.
+
+This is an example of a vulnerable piece of code.
+
+@example
+if (x == 2)
+ ...
+@end example
+
+A simple typo converts the above into
+
+@example
+if (x = 2)
+ ...
+@end example
+
+We've introduced a bug; the condition is always true, and the value of
+@code{x} has been changed.  However, a simple change to our practice
+would have made us immune to this problem:
+
+@example
+if (2 == x)
+ ...
+@end example
+
+Usually, the Emacs keystroke @kbd{M-t} can be used to swap the operands.
+
+
+@subsection Spelling of ASCII NUL
+
+Strings in C are just sequences of characters terminated by a NUL.
+The ASCII NUL character has the numerical value zero.  It is normally
+represented in C code as @samp{\0}.  Here is a typical piece of C
+code:
+
+@example
+*p = '\0';
+@end example
+
+Consider what happens if there is an unfortunate typo:
+
+@example
+*p = '0';
+@end example
+
+We have changed the meaning of our program and the compiler cannot
+diagnose this as an error.  Our string is no longer terminated.  Bad
+things will probably happen.  It would be better if the compiler could
+help us diagnose this problem.
+
+In C, the type of @code{'\0'} is in fact int, not char.  This provides
+us with a simple way to avoid this error.  The constant @code{0} has
+the same value and type as the constant @code{'\0'}.  However, it is
+not as vulnerable to typos.    For this reason I normally prefer to
+use this code:
+
+@example
+*p = 0;
+@end example
+
+
+@node    Factor Out Repeated Code
+@section Factor Out Repeated Code
+
+Repeated code imposes a greater maintenance burden and increases the
+exposure to bugs.  For example, if you discover that something you
+want to implement has some similarity with an existing piece of code,
+don't cut and paste it.  Instead, factor the code out.  The risk of
+cutting and pasting the code, particularly if you do this several
+times, is that you end up with several copies of the same code.
+
+If the original code had a bug, you now have N places where this needs
+to be fixed.  It's all to easy to miss some out when trying to fix the
+bug.  Equally, it's quite possible that when pasting the code into
+some function, the pasted code was not quite adapted correctly to its
+new environment.  To pick a contrived example, perhaps it modifies a
+global variable which it that code shouldn't be touching in its new
+home.  Worse, perhaps it makes some unstated assumption about the
+nature of the input arguments which is in fact not true for the
+context of the now duplicated code.
+
+A good example of the use of refactoring in findutils is the
+@code{collect_arg} function in @file{find/parser.c}.  A less clear-cut
+but larger example is the factoring out of code which would otherwise
+have been duplicated between @file{find/find.c} and
+@code{find/ftsfind.c}.
+
+The findutils test suite is comprehensive enough that refactoring code
+should not generally be a daunting prospect from a testing point of
+view.  Nevertheless there are some areas which are only
+lightly-tested:
+
+@enumerate
+@item Tests on the ages of files
+@item Code which deals with the values returned by operating system calls (for example handling of ENOENT)
+@item Code dealing with OS limits (for example, limits on path length
+or exec arguments)
+@item Code relating to features not all systems have (for example
+Solaris Doors)
+@end enumerate
+
+Please exercise caution when working in those areas.
+
+
+@node    Debugging is For Users Too
+@section Debugging is For Users Too
+
+Debug and diagnostic code is often used to verify that a program is
+working in the way its author thinks it should be.  But users are
+often uncertain about what a program is doing, too.  Exposing them a
+little more diagnostic information can help.  Much of the diagnostic
+code in @code{find}, for example, is controlled by the @samp{-D} flag,
+as opposed to C preprocessor directives.
+
+Making diagnostic messages available to users also means that the
+phrasing of the diagnostic messages becomes important, too.
+
+
+@node    Don't Trust the File System Contents
+@section Don't Trust the File System Contents
+
+People use @code{find} to search in directories created by other
+people.  Sometimes they do this to check to suspicious activity (for
+example to look for new setuid binaries).  This means that it would be
+bad if @code{find} were vulnerable to, say, a security problem
+exploitable by constructing a specially-crafted filename.  The same
+consideration would apply to @code{locate} and @code{updatedb}.
+
+Henry Spencer said this well in his fifth commandment:
+@quotation
+Thou shalt check the array bounds of all strings (indeed, all arrays),
+for surely where thou typest @samp{foo} someone someday shall type
+@samp{supercalifragilisticexpialidocious}.
+@end quotation
+
+Symbolic links can often be a problem.  If @code{find} calls
+@code{lstat} on something and discovers that it is a directory, it's
+normal for @code{find} to recurse into it.  Even if the @code{chdir}
+system call is used immediately, there is still a window of
+opportunity between the @code{lstat} and the @code{chdir} in which a
+malicious person could rename the directory and substitute a symbolic
+link to some other directory.
+
+@node    The File System Is Being Modified
+@section The File System Is Being Modified
+
+The filesystem gets modified while you are traversing it.  For,
+example, it's normal for files to get deleted while @code{find} is
+traversing a directory.  Issuing an error message seems helpful when a
+file is deleted from the one directory you are interested in, but if
+@code{find} is searching 15000 directories, such a message becomes
+less helpful.
+
+Bear in mind also that it is possible for the directory @code{find} is
+currently searching could be moved to another point in the filesystem,
+and that the directory in which @code{find} was started could be
+deleted.
+
+Henry Spencer's sixth commandment is also apposite here:
+@quotation
+If a function be advertised to return an error code in the event of
+difficulties, thou shalt check for that code, yea, even though the
+checks triple the size of thy code and produce aches in thy typing
+fingers, for if thou thinkest ``it cannot happen to me'', the gods
+shall surely punish thee for thy arrogance.
+@end quotation
+
+There are a lot of files out there.  They come in all dates and
+sizes.  There is a condition out there in the real world to exercise
+every bit of the code base.  So we try to test that code base before
+someone falls over a bug.
+
+
+@node Tools
+@chapter Tools
+Most of the tools required to build findutils are mentioned in the
+file @file{README-hacking}.  We also use some other tools:
+
+@table @asis
+@item System call traces
+Much of the execution time of find is spent waiting for filesystem
+operations.  A system call trace (for example, that provided by
+@code{strace}) shows what system calls are being made.   Using this
+information we can work to remove unnecessary file system operations.
+
+@item Valgrind
+Valgrind is a tool which dynamically verifies the memory accesses a
+program makes to ensure that they are valid (for example, that the
+behaviour of the program does not in any way depend on the contents of
+uninitialised memory).
+
+@item DejaGnu
+DejaGnu is the test framework used to run the findutils test suite
+(the @code{runtest} program is part of DejaGnu).  It would be ideal if
+everybody building @code{findutils} also ran the test suite, but many
+people don't have DejaGnu installed.  When changes are made to
+findutils, DejaGnu is invoked a lot. @xref{Testing}, for more
+information.
+@end table
+
+@node Using the GNU Portability Library
+@chapter Using the GNU Portability Library
+The Gnulib library (@url{http://www.gnu.org/software/gnulib/}) makes a
+variety of systems look more like a GNU/Linux system and also applies
+a bunch of automatic bug fixes and workarounds.  Some of these also
+apply to GNU/Linux systems too.  For example, the Gnulib regex
+implementation is used when we determine that we are building on a
+GNU libc system with a bug in the regex implementation.
+
+
+@section How and Why we Import the Gnulib Code
+Gnulib does not have a release process which results in a source
+tarball you can download.  Instead, the code is simply made available
+by GIT.   The code is also available via @code{git-cvspserver}, but
+we decided not to use this, since @code{import-gnulib.sh} depended on
+@code{cvs update -D}, which at the time @code{git-cvspserver} did not
+support.
+
+GNU projects vary in how they interact with Gnulib.  Many import a
+selection of code from Gnulib into the working directory and then
+check the updated files into the repository for their project.  The
+coreutils project does this, for example.
+
+At the last maintainer changeover for findutils (2003) it turned out
+that there was a lot of material in findutils in common with Gnulib,
+but it had not been updated in a long time.  It was difficult to
+figure out which source files were intended to track external sources
+and which were intended to contain incompatible changes, or diverge
+for other reasons.
+
+To reduce this uncertainty, I decided to treat Gnulib much like
+Automake.  Files supplied by Automake are simply absent from the
+findutils source tree.  When Automake is run with @code{automake
+--add-missing --copy}, it adds in all the files it thinks should be
+there which aren't there already.
+
+An analogous approach is taken with Gnulib.  The Gnulib code is
+imported from the git repository for Gnulib with a findutils helper
+script, @code{import-gnulib.sh}.  That script fetches a copy of the
+Gnulib code into the subdirectory @file{gnulib-git} and then runs
+@code{gnulib-tool}.  The @code{gnulib-tool} program copies the
+required parts of Gnulib into the findutils source tree in the
+subdirectory @file{gnulib}.  This process gives us the property that
+the code in @file{gnulib} and @code{gnulib-git} is not included in the
+findutils git tree.   Both directories are listed in @file{.gitignore}
+and so git ignores them.
+
+Findutils does not use all the Gnulib code.  The modules we need are
+listed in the file @file{import-gnulib.config}.  The same file also
+indicates the version of Gnulib that we want to use.  Since Gnulib has
+no actual release process, we just use a date.  Both
+@file{import-gnulib.sh} and @file{import-gnulib.config} are in the
+findutils git repository.
+
+The upshot of all this is that we can use the findutils git repository
+to track which version of Gnulib every findutils release uses.  That
+information is also provided when the user invokes a findutils program
+with the @samp{--version} option.
+
+A small number of files are installed by automake and will therefore
+vary according to which version of automake was used to generate a
+release.  This includes for example boiler-plate GNU files such as
+@file{ABOUT-NLS}, @file{INSTALL} and @file{COPYING}.
+
+
+@section How We Fix Gnulib Bugs
+If we always directly import the Gnulib code directly from the git
+repository in this way, it is impossible to maintain a locally
+different copy of Gnulib.  This is often a benefit in that accidental
+version skew is prevented.
+
+However, sometimes we want deliberate version skew in order to use a
+findutils-specific patched version of a Gnulib file, for example
+because we fixed a bug.
+
+Gnulib is used by quite a number of GNU projects, and this means that
+it gets plenty of testing.  Therefore there are relatively few bugs in
+the Gnulib code, but it does happen from time to time.
+
+However, since there is no waiting around for a Gnulib source release
+tarball, Gnulib bugs are generally fixed quickly.  Here is an outline
+of the way we would contribute a fix to Gnulib (assuming you know it
+is not already fixed in the current Gnulib git tree):
+
+@table @asis
+@item Check you already completed a copyright assignment for Gnulib
+@item Begin with a vanilla git tree
+Download the Findutils source code from git (or use the tree you have
+already)
+@item Check out a copy of the Gnulib source
+Check out a copy of the Gnulib source tree.  The
+@code{import-gnulib.sh} script may have generated a shallow git clone
+as opposed to a normal, full clone in the directory @file{gnulib-git}.
+This means that you may not be able to clone the repository that
+@code{import-gnulib.sh} generates.  However, you can make a normal
+(full) clone with @code{git clone
+git_repo="git://git.savannah.gnu.org/gnulib.git"}.  Do this somewhere
+outside the findutils source tree.
+@item Import Gnulib from your local copy
+The @code{import-gnulib.sh} tool has a @samp{-d} option which you can
+use to import the code from a local copy of Gnulib.
+@item Build findutils
+Build findutils and run the test suite, which should pass.  In our
+example we assume you have just noticed a bug in Gnulib, not that
+recent Gnulib changes broke the findutils regression tests.
+@item Write a test case
+If in fact Gnulib did break the findutils regression tests, you can probably
+skip this step, since you already have a test case demonstrating the problem.
+Otherwise, write a findutils test case for the bug and/or a Gnulib test case.
+@item Fix the Gnulib bug
+Make sure your editor follows symbolic links so that your changes to
+@file{gnulib/...} actually affect the files in the git working
+directory you checked out earlier.   Observe that your test now passes.
+@item Prepare a Gnulib patch
+Use @code{git format-patch} to prepare the patch.  Follow the normal
+usage for checkin comments (take a look at the output of @code{git
+log}).  Check that the patch conforms with the GNU coding standards,
+and email it to the Gnulib mailing list.
+@item Wait for the patch to be applied
+Once your bug fix has been applied, you can update your local directory
+from git, re-import the code into Findutils (still using the @code{-d}
+option), and re-run the tests.  This verifies that the fix the Gnulib
+team made actually fixes your problem.
+@item Reimport the Gnulib code
+Update the findutils file @file{import-gnulib.config} to specify git
+commit which is after the point at which the bug fix was committed to
+Gnulib.  You can do this with @code{git rev-parse HEAD}.  Finally,
+re-import the Gnulib code directly from git by using
+@samp{import-gnulib.sh} without the @samp{-d} option, and run the
+tests again.  This verifies that there was no remaining local change
+that we were relying on to fix the bug.   Make sure you checked
+everything in by running @code{git status}.
+@end table
+
+There is an alternative to the method above; it is possible to store
+local diffs to be patched into gnulib beneath the
+@file{gnulib-local}.  Normally however, there is no need for this,
+since gnulib updates are very prompt.
+
+
+@node Documentation
+@chapter Documentation
+
+The findutils git tree includes several different types of
+documentation.
+
+@section User Documentation
+User-oriented documentation is provided as manual pages and in
+Texinfo.  See
+@ref{Introduction,,Introduction,find,The Findutils manual}.
+
+Please make sure both sets of documentation are updated if you make a
+change to the code.  The GNU coding standards do not normally call for
+maintaining manual pages on the grounds of effort duplication.
+However, the manual page format is more convenient for quick
+reference, and so it's worth maintaining both types of documentation.
+However, the manual pages are normally rather more terse than the
+Texinfo documentation.  The manual pages are suitable for reference
+use, but the Texinfo manual should also include introductory and
+tutorial material.
+
+
+@section Build Guidance
+
+@table @file
+@item ABOUT-NLS
+Describes the Free Translation Project, the translation status of
+various GNU projects, and how to participate by translating an
+application.
+@item AUTHORS
+Lists the authors of findutils.
+@item COPYING
+The copyright license covering findutils; currently, the GNU GPL,
+version 3.
+@item INSTALL
+Generic installation instructions for installing GNU programs.
+@item README
+Information about how to compile findutils in particular
+@item README-alpha
+A README file which is included with testing releases of findutils.
+@item README-hacking
+Describes how to build findutils from the code in git.
+@item THANKS
+Thanks for people who contributed to findutils.  Generally, if
+someone's contribution was significant enough to need a copyright
+assignment, their name should go in here.
+@item TODO
+Mainly obsolete.
+@end table
+
+
+@section Release Information
+@table @file
+@item NEWS
+Enumerates the user-visible change in each release.  Typical changes
+are fixed bugs, functionality changes and documentation changes.
+Include the date when a release is made.
+@item ChangeLog
+This file enumerates all changes to the findutils source code (with
+the possible exception of @file{.cvsignore} and @code{.gitignore}
+changes).  The level of detail used for this file should be sufficient
+to answer the questions ``what changed?'' and ``why was it changed?''.
+If a change fixes a bug, always give the bug reference number in both
+the @file{ChangeLog} and @file{NEWS} files and of course also in the
+checkin message.  In general, it should be possible to enumerate all
+material changes to a function by searching for its name in
+@file{ChangeLog}.  Mention when each release is made.
+@end table
+
+@node Testing
+@chapter Testing
+This chapter will explain the general procedures for adding tests to
+the test suite, and the functions defined in the findutils-specific
+DejaGnu configuration.  Where appropriate references will be made to
+the DejaGnu documentation.
+
+@node Bugs
+@chapter Bugs
+
+Bugs are logged in the Savannah bug tracker
+@url{http://savannah.gnu.org/bugs/?group=findutils}.  The tracker
+offers several fields but their use is largely obvious.  The
+life-cycle of a bug is like this:
+
+
+@table @asis
+@item Open
+Someone, usually a maintainer, a distribution maintainer or a user,
+creates a bug by filling in the form.   They fill in field values as
+they see fit.  This will generate an email to
+@email{bug-findutils@@gnu.org}.
+
+@item Triage
+The bug hangs around with @samp{Status=None} until someone begins to
+work on it.  At that point they set the ``Assigned To'' field and will
+sometimes set the status to @samp{In Progress}, especially if the bug
+will take a while to fix.
+
+@item Non-bugs
+Quite a lot of reports are not actually bugs; for these the usual
+procedure is to explain why the problem is not a bug, set the status
+to @samp{Invalid} and close the bug.   Make sure you set the
+@samp{Assigned to} field to yourself before closing the bug.
+
+@item Fixing
+When you commit a bug fix into git (or in the case of a contributed
+patch, commit the change), mark the bug as @samp{Fixed}.  Make sure
+you include a new test case where this is relevant.  If you can figure
+out which releases are affected, please also set the @samp{Release}
+field to the earliest release which is affected by the bug.
+Indicate which source branch the fix is included in (for example,
+4.2.x or 4.3.x).  Don't close the bug yet.
+
+@item Release
+When a release is made which includes the bug fix, make sure the bug
+is listed in the NEWS file.  Once the release is made, fill in the
+@samp{Fixed Release} field and close the bug.
+@end table
+
+
+@node Distributions
+@chapter Distributions
+Almost all GNU/Linux distributions include findutils, but only some of
+them have a package maintainer who is a member of the mailing list.
+Distributions don't often feed back patches to the
+@email{bug-findutils@@gnu.org} list, but on the other hand many of
+their patches relate only to standards for file locations and so
+forth, and are therefore distribution specific.  On an irregular basis
+I check the current patches being used by one or two distributions,
+but the total number of GNU/Linux distributions is large enough that
+we could not hope to cover them all.
+
+Often, bugs are raised against a distribution's bug tracker instead of
+GNU's.    Periodically (about every six months) I take a look at some
+of the more accessible bug trackers to indicate which bugs have been
+fixed upstream.
+
+Many distributions include both findutils and the slocate package,
+which provides a replacement @code{locate}.
+
+
+@node Internationalisation
+@chapter Internationalisation
+Translation is essentially automated from the maintainer's point of
+view.  The TP mails the maintainer when a new PO file is available,
+and we just download it and check it in.  We copy the @file{.po} files
+into the git repository.  For more information, please see
+@url{http://translationproject.org/domain/findutils.html}.
+
+
+@node Security
+@chapter Security
+
+See @ref{Security Considerations, ,Security Considerations,find,The
+Findutils manual}, for a full description of the findutils approach to
+security considerations and discussion of particular tools.
+
+If someone reports a security bug publicly, we should fix this as
+rapidly as possible.  If necessary, this can mean issuing a fixed
+release containing just the one bug fix.  We try to avoid issuing
+releases which include both significant security fixes and functional
+changes.
+
+Where someone reports a security problem privately, we generally try
+to construct and test a patch without pushing the intermediate code to
+the public repository.
+
+Once everything has been tested, this allows us to make a release and
+push the patch.  The advantage of doing things this way is that we
+avoid situations where people watching for git commits can figure out
+and exploit a security problem before a fixed release is available.
+
+It's important that security problems be fixed promptly, but don't
+rush so much that things go wrong.  Make sure the new release really
+fixes the problem.  It's usually best not to include functional
+changes in your security-fix release.
+
+If the security problem is serious, send an alert to
+@email{vendor-sec@@lst.de}.  The members of the list include most
+GNU/Linux distributions.  The point of doing this is to allow them to
+prepare to release your security fix to their customers, once the fix
+becomes available.    Here is an example alert:-
+
+@smallexample
+GNU findutils heap buffer overrun (potential privilege escalation)
+
+
+
+I. BACKGROUND
+=============
+
+GNU findutils is a set of programs which search for files on Unix-like
+systems.  It is maintained by the GNU Project of the Free Software
+Foundation.  For more information, see
+@url{http://www.gnu.org/software/findutils}.
+
+
+II. DESCRIPTION
+===============
+
+When GNU locate reads filenames from an old-format locate database,
+they are read into a fixed-length buffer allocated on the heap.
+Filenames longer than the 1026-byte buffer can cause a buffer overrun.
+The overrunning data can be chosen by any person able to control the
+names of filenames created on the local system.  This will normally
+include all local users, but in many cases also remote users (for
+example in the case of FTP servers allowing uploads).
+
+III. ANALYSIS
+=============
+
+Findutils supports three different formats of locate database, its
+native format "LOCATE02", the slocate variant of LOCATE02, and a
+traditional ("old") format that locate uses on other Unix systems.
+
+When locate reads filenames from a LOCATE02 database (the default
+format), the buffer into which data is read is automatically extended
+to accomodate the length of the filenames.
+
+This automatic buffer extension does not happen for old-format
+databases.  Instead a 1026-byte buffer is used.  When a longer
+pathname appears in the locate database, the end of this buffer is
+overrun.  The buffer is allocated on the heap (not the stack).
+
+If the locate database is in the default LOCATE02 format, the locate
+program does perform automatic buffer extension, and the program is
+not vulnerable to this problem.  The software used to build the
+old-format locate database is not itself vulnerable to the same
+attack.
+
+Most installations of GNU findutils do not use the old database
+format, and so will not be vulnerable.
+
+
+IV. DETECTION
+=============
+
+Software
+--------
+All existing releases of findutils are affected.
+
+
+Installations
+-------------
+
+To discover the longest path name on a given system, you can use the
+following command (requires GNU findutils and GNU coreutils):
+
+@verbatim
+find / -print0 | tr -c '\0' 'x' | tr '\0' '\n' | wc -L
+@end verbatim
+
+V. EXAMPLE
+==========
+
+This section includes a shell script which determines which of a list
+of locate binaries is vulnerable to the problem.  The shell script has
+been tested only on glibc based systems having a mktemp binary.
+
+NOTE: This script deliberately overruns the buffer in order to
+determine if a binary is affected.  Therefore running it on your
+system may have undesirable effects.  We recommend that you read the
+script before running it.
+
+@verbatim
+#! /bin/sh
+set +m
+if vanilla_db="$(mktemp nicedb.XXXXXX)" ; then
+    if updatedb --prunepaths="" --old-format --localpaths="/tmp" \
+       --output="$@{vanilla_db@}" ; then
+       true
+    else
+       rm -f "$@{vanilla_db@}"
+       vanilla_db=""
+       echo "Failed to create old-format locate database; skipping the sanity checks" >&2
+    fi
+fi
+
+make_overrun_db() @{
+    # Start with a valid database
+    cat "$@{vanilla_db@}"
+    # Make the final entry really long
+    dd if=/dev/zero  bs=1 count=1500 2>/dev/null | tr '\000' 'x'
+@}
+
+
+
+ulimit -c 0
+
+usage() @{ echo "usage: $0 binary [binary...]" >&2; exit $1; @}
+[ $# -eq 0 ] && usage 1
+
+bad=""
+good=""
+ugly=""
+if dbfile="$(mktemp nasty.XXXXXX)"
+then
+    make_overrun_db > "$dbfile"
+    for locate ; do
+      ver="$locate = $("$locate"  --version | head -1)"
+      if [ -z "$vanilla_db" ] || "$locate" -d "$vanilla_db" "" >/dev/null ; then
+         "$locate" -d "$dbfile" "" >/dev/null
+         if [ $? -gt 128 ] ; then
+             bad="$bad
+vulnerable: $ver"
+         else
+             good="$good
+good: $ver"
+         fi
+       else
+         # the regular locate failed
+         ugly="$ugly
+buggy, may or may not be vulnerable: $ver"
+       fi
+    done
+    rm -f "$@{dbfile@}" "$@{vanilla_db@}"
+    # good: unaffected.  bad: affected (vulnerable).
+    # ugly: doesn't even work for a normal old-format database.
+    echo "$good"
+    echo "$bad"
+    echo "$ugly"
+else
+  exit 1
+fi
+@end verbatim
+
+
+
+
+VI. VENDOR RESPONSE
+===================
+
+The GNU project discovered the problem while 'locate' was being worked
+on; this is the first public announcement of the problem.
+
+The GNU findutils mantainer has issued a patch as p[art of this
+announcement.  The patch appears below.
+
+A source release of findutils-4.2.31 will be issued on 2007-05-30.
+That release will of course include the patch.  The patch will be
+committed to the public CVS repository at the same time.  Public
+announcements of the release, including a description of the bug, will
+be made at the same time as the release.
+
+A release of findutils-4.3.x will follow and will also include the
+patch.
+
+
+VII. PATCH
+==========
+
+This patch should apply to findutils-4.2.23 and later.
+Findutils-4.2.23 was released almost two years ago.
+@verbatim
+Index: locate/locate.c
+===================================================================
+RCS file: /cvsroot/findutils/findutils/locate/locate.c,v
+retrieving revision 1.58.2.2
+diff -u -p -r1.58.2.2 locate.c
+--- locate/locate.c    22 Apr 2007 16:57:42 -0000      1.58.2.2
++++ locate/locate.c    28 May 2007 10:18:16 -0000
+@@@@ -124,9 +124,9 @@@@ extern int errno;
+
+ #include "locatedb.h"
+ #include <getline.h>
+-#include "../gnulib/lib/xalloc.h"
+-#include "../gnulib/lib/error.h"
+-#include "../gnulib/lib/human.h"
++#include "xalloc.h"
++#include "error.h"
++#include "human.h"
+ #include "dirname.h"
+ #include "closeout.h"
+ #include "nextelem.h"
+@@@@ -468,10 +468,36 @@@@ visit_justprint_unquoted(struct process_
+   return VISIT_CONTINUE;
+ @}
+
++static void
++toolong (struct process_data *procdata)
++@{
++  error (EXIT_FAILURE, 0,
++       _("locate database %s contains a "
++         "filename longer than locate can handle"),
++       procdata->dbfile);
++@}
++
++static void
++extend (struct process_data *procdata, size_t siz1, size_t siz2)
++@{
++  /* Figure out if the addition operation is safe before performing it. */
++  if (SIZE_MAX - siz1 < siz2)
++    @{
++      toolong (procdata);
++    @}
++  else if (procdata->pathsize < (siz1+siz2))
++    @{
++      procdata->pathsize = siz1+siz2;
++      procdata->original_filename = x2nrealloc (procdata->original_filename,
++                                              &procdata->pathsize,
++                                              1);
++    @}
++@}
++
+ static int
+ visit_old_format(struct process_data *procdata, void *context)
+ @{
+-  register char *s;
++  register size_t i;
+   (void) context;
+
+   /* Get the offset in the path where this path info starts.  */
+@@@@ -479,20 +505,35 @@@@ visit_old_format(struct process_data *pr
+     procdata->count += getw (procdata->fp) - LOCATEDB_OLD_OFFSET;
+   else
+     procdata->count += procdata->c - LOCATEDB_OLD_OFFSET;
++  assert(procdata->count > 0);
+
+-  /* Overlay the old path with the remainder of the new.  */
+-  for (s = procdata->original_filename + procdata->count;
++  /* Overlay the old path with the remainder of the new.  Read
++   * more data until we get to the next filename.
++   */
++  for (i=procdata->count;
+        (procdata->c = getc (procdata->fp)) > LOCATEDB_OLD_ESCAPE;)
+-    if (procdata->c < 0200)
+-      *s++ = procdata->c;             /* An ordinary character.  */
+-    else
+-      @{
+-      /* Bigram markers have the high bit set. */
+-      procdata->c &= 0177;
+-      *s++ = procdata->bigram1[procdata->c];
+-      *s++ = procdata->bigram2[procdata->c];
+-      @}
+-  *s-- = '\0';
++    @{
++      if (procdata->c < 0200)
++      @{
++        /* An ordinary character. */
++        extend (procdata, i, 1u);
++        procdata->original_filename[i++] = procdata->c;
++      @}
++      else
++      @{
++        /* Bigram markers have the high bit set. */
++        extend (procdata, i, 2u);
++        procdata->c &= 0177;
++        procdata->original_filename[i++] = procdata->bigram1[procdata->c];
++        procdata->original_filename[i++] = procdata->bigram2[procdata->c];
++      @}
++    @}
++
++  /* Consider the case where we executed the loop body zero times; we
++   * still need space for the terminating null byte.
++   */
++  extend (procdata, i, 1u);
++  procdata->original_filename[i] = 0;
+
+   procdata->munged_filename = procdata->original_filename;
+@end verbatim
+
+
+VIII. THANKS
+============
+
+Thanks to Rob Holland <rob@@inversepath.com> and Tavis Ormandy.
+
+
+VIII. CVE INFORMATION
+=====================
+
+No CVE candidate number has yet been assigned for this vulnerability.
+If someone provides one, I will include it in the public announcement
+and change logs.
+@end smallexample
+
+The original announcement above was sent out with a cleartext PGP
+signature, of course, but that has been omitted from the example.
+
+Once a fixed release is available, announce the new release using the
+normal channels.  Any CVE number assigned for the problem should be
+included in the @file{ChangeLog} and @file{NEWS} entries. See
+@url{http://cve.mitre.org/} for an explanation of CVE numbers.
+
+
+
+@node Making Releases
+@chapter Making Releases
+This section will explain how to make a findutils release.   For the
+time being here is a terse description of the main steps:
+
+@enumerate
+@item Commit changes; make sure your working directory has no
+uncommitted changes.
+@item Test; make sure that all changes you have made have tests, and
+that the tests pass.  Verify this with @code{make distcheck}.
+@item Bugs; make sure all Savannah bug entries fixed in this release
+are fixed.
+@item NEWS; make sure that the NEWS and configure.in file are updated
+with the new release number (and checked in).
+@item Build the release tarball; do this with @code{make distcheck}.
+Copy the tarball somewhere safe.
+@item Tag the release; findutils releases are tagged like this for
+example: v4.5.5.  Previously a different format was in use:
+FINDUTILS_4_3_8-1.  You can create a tag with the a command like this:
+@code{git tag -s -m "Findutils release v4.5.7" v4.5.7}.
+@item Prepare the upload and upload it.
+@xref{Automated FTP Uploads, ,Automated FTP
+Uploads, maintain, Information for Maintainers of GNU Software},
+for detailed upload instructions.
+@item Make a release announcement; include an extract from the NEWS
+file which explains what's changed.  Announcements for test releases
+should just go to @email{bug-findutils@@gnu.org}.  Announcements for
+stable releases should go to @email{info-gnu@@gnu.org} as well.
+@item Bump the release numbers in git; edit the @file{configure.in}
+and @file{NEWS} files to advance the release numbers.   For example,
+if you have just released @samp{4.6.2}, bump the release number to
+@samp{4.6.3-git}.  The point of the @samp{-git} suffix here is that a
+findutils binary built from git will bear a release number indicating
+it's not built from the ``official'' source release.
+@item Close bugs; any bugs recorded on Savannah which were fixed in this
+release should now be marked as closed.   Update the @samp{Fixed
+Release} field of these bugs appropriately and make sure the
+@samp{Assigned to} field is populated.
+@end enumerate
+
+
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+@include fdl.texi
+
+@bye
+
+@comment texi related words used by Emacs' spell checker ispell.el
+
+@comment LocalWords: texinfo setfilename settitle setchapternewpage
+@comment LocalWords: iftex finalout ifinfo DIR titlepage vskip pt
+@comment LocalWords: filll dir samp dfn noindent xref pxref
+@comment LocalWords: var deffn texi deffnx itemx emph asis
+@comment LocalWords: findex smallexample subsubsection cindex
+@comment LocalWords: dircategory direntry itemize
+
+@comment other words used by Emacs' spell checker ispell.el
+@comment LocalWords: README fred updatedb xargs Plett Rendell akefile
+@comment LocalWords: args grep Filesystems fo foo fOo wildcards iname
+@comment LocalWords: ipath regex iregex expr fubar regexps
+@comment LocalWords: metacharacters macs sr sc inode lname ilname
+@comment LocalWords: sysdep noleaf ls inum xdev filesystems usr atime
+@comment LocalWords: ctime mtime amin cmin mmin al daystart Sladkey rm
+@comment LocalWords: anewer cnewer bckw rf xtype uname gname uid gid
+@comment LocalWords: nouser nogroup chown chgrp perm ch maxdepth
+@comment LocalWords: mindepth cpio src CD AFS statted stat fstype ufs
+@comment LocalWords: nfs tmp mfs printf fprint dils rw djm Nov lwall
+@comment LocalWords: POSIXLY fls fprintf strftime locale's EDT GMT AP
+@comment LocalWords: EST diff perl backquotes sprintf Falstad Oct cron
+@comment LocalWords: eg vmunix mkdir afs allexec allwrite ARG bigram
+@comment LocalWords: bigrams cd chmod comp crc CVS dbfile dum eof
+@comment LocalWords: fileserver filesystem fn frcode Ghazi Hnewc iXX
+@comment LocalWords: joeuser Kaveh localpaths localuser LOGNAME
+@comment LocalWords: Meyering mv netpaths netuser nonblank nonblanks
+@comment LocalWords: ois ok Pinard printindex proc procs prunefs
+@comment LocalWords: prunepaths pwd RFS rmadillo rmdir rsh sbins str
+@comment LocalWords: su Timar ubins ug unstripped vf VM Weitzel
+@comment LocalWords: wildcard zlogout basename execdir wholename iwholename
+@comment LocalWords: timestamp timestamps Solaris FreeBSD OpenBSD POSIX
diff --git a/doc/find.info b/doc/find.info
new file mode 100644 (file)
index 0000000..555fb65
--- /dev/null
@@ -0,0 +1,185 @@
+This is
+/home/james/source/GNU/findutils/git/gnu/findutils/doc/find.info,
+produced by makeinfo version 4.13 from
+/home/james/source/GNU/findutils/git/gnu/findutils/doc/find.texi.
+
+INFO-DIR-SECTION Basics
+START-INFO-DIR-ENTRY
+* Finding files: (find).        Operating on files matching certain criteria.
+END-INFO-DIR-ENTRY
+
+INFO-DIR-SECTION Individual utilities
+START-INFO-DIR-ENTRY
+* find: (find)Invoking find.                    Finding and acting on files.
+* locate: (find)Invoking locate.                Finding files in a database.
+* updatedb: (find)Invoking updatedb.            Building the locate database.
+* xargs: (find)Invoking xargs.                  Operating on many files.
+END-INFO-DIR-ENTRY
+
+   This file documents the GNU utilities for finding files that match
+certain criteria and performing various operations on them.
+
+   Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006,
+2007, 2008, 2009, 2010 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, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled "GNU
+Free Documentation License."
+
+\1f
+Indirect:
+find.info-1: 1347
+find.info-2: 295249
+\1f
+Tag Table:
+(Indirect)
+Node: Top\7f1347
+Node: Introduction\7f3185
+Node: Scope\7f6113
+Node: Overview\7f8059
+Node: find Expressions\7f9930
+Node: Finding Files\7f11762
+Node: Name\7f12227
+Node: Base Name Patterns\7f12855
+Ref: Base Name Patterns-Footnote-1\7f14183
+Node: Full Name Patterns\7f14395
+Node: Fast Full Name Search\7f18398
+Node: Shell Pattern Matching\7f21445
+Node: Links\7f23535
+Node: Symbolic Links\7f23970
+Node: Hard Links\7f28475
+Node: Time\7f31029
+Node: Age Ranges\7f32007
+Node: Comparing Timestamps\7f33696
+Node: Size\7f36561
+Node: Type\7f38405
+Node: Owner\7f40073
+Node: Mode Bits\7f40898
+Node: Contents\7f46358
+Node: Directories\7f47529
+Node: Filesystems\7f52807
+Node: Combining Primaries With Operators\7f54158
+Node: Actions\7f55776
+Node: Print File Name\7f56338
+Node: Print File Information\7f57355
+Node: Escapes\7f60364
+Node: Format Directives\7f61115
+Node: Name Directives\7f62599
+Node: Ownership Directives\7f63585
+Node: Size Directives\7f64593
+Node: Location Directives\7f65964
+Node: Time Directives\7f67083
+Node: Other Directives\7f67986
+Node: Time Formats\7f68246
+Node: Time Components\7f68682
+Node: Date Components\7f69648
+Node: Combined Time Formats\7f70471
+Node: Formatting Flags\7f71356
+Node: Run Commands\7f71969
+Node: Single File\7f72327
+Node: Multiple Files\7f74825
+Node: Unsafe File Name Handling\7f79516
+Node: Safe File Name Handling\7f81229
+Node: Unusual Characters in File Names\7f82805
+Node: Limiting Command Size\7f85970
+Node: Controlling Parallelism\7f88406
+Node: Interspersing File Names\7f93185
+Node: Querying\7f95638
+Ref: Querying-Footnote-1\7f97878
+Node: Delete Files\7f97934
+Node: Adding Tests\7f98581
+Node: Databases\7f101221
+Node: Database Locations\7f101939
+Node: Database Formats\7f103386
+Node: LOCATE02 Database Format\7f104495
+Node: Sample LOCATE02 Database\7f106186
+Node: slocate Database Format\7f106870
+Node: Old Database Format\7f107877
+Node: Newline Handling\7f111063
+Node: File Permissions\7f112509
+Node: Mode Structure\7f113087
+Node: Symbolic Modes\7f116228
+Node: Setting Permissions\7f117325
+Node: Copying Permissions\7f119873
+Node: Changing Special Permissions\7f120687
+Node: Conditional Executability\7f122231
+Node: Multiple Changes\7f122763
+Node: Umask and Protection\7f124420
+Node: Numeric Modes\7f125518
+Node: Date input formats\7f127210
+Node: General date syntax\7f129543
+Node: Calendar date items\7f132495
+Node: Time of day items\7f134493
+Node: Time zone items\7f136690
+Node: Day of week items\7f137925
+Node: Relative items in date strings\7f138915
+Node: Pure numbers in date strings\7f141718
+Node: Seconds since the Epoch\7f142700
+Node: Specifying time zone rules\7f144322
+Node: Authors of parse_datetime\7f146693
+Ref: Authors of get_date\7f146873
+Node: Reference\7f147836
+Node: Invoking find\7f148186
+Node: Filesystem Traversal Options\7f149668
+Node: Warning Messages\7f150761
+Node: Optimisation Options\7f152822
+Node: Debug Options\7f154767
+Node: Find Expressions\7f155821
+Node: Invoking locate\7f156187
+Node: Invoking updatedb\7f162486
+Node: Invoking xargs\7f166726
+Node: xargs options\7f167452
+Node: Invoking the shell from xargs\7f171958
+Node: Regular Expressions\7f175757
+Node: findutils-default regular expression syntax\7f177236
+Node: awk regular expression syntax\7f179741
+Node: egrep regular expression syntax\7f181626
+Node: emacs regular expression syntax\7f183837
+Node: gnu-awk regular expression syntax\7f186365
+Node: grep regular expression syntax\7f188705
+Node: posix-awk regular expression syntax\7f191430
+Node: posix-basic regular expression syntax\7f193701
+Node: posix-egrep regular expression syntax\7f194002
+Node: posix-extended regular expression syntax\7f196375
+Node: Environment Variables\7f198850
+Node: Common Tasks\7f201922
+Node: Viewing And Editing\7f202347
+Node: Archiving\7f204064
+Node: Cleaning Up\7f205696
+Node: Strange File Names\7f208585
+Node: Fixing Permissions\7f210235
+Node: Classifying Files\7f210799
+Node: Worked Examples\7f211517
+Node: Deleting Files\7f212220
+Node: Copying A Subset of Files\7f225232
+Node: Updating A Timestamp File\7f227247
+Node: Finding the Shallowest Instance\7f233211
+Node: Security Considerations\7f235145
+Node: Levels of Risk\7f236713
+Ref: Levels of Risk-Footnote-1\7f239513
+Node: Security Considerations for find\7f239692
+Ref: Security Considerations for find-Footnote-1\7f242016
+Node: Problems with -exec and filenames\7f242089
+Node: Changing the Current Working Directory\7f243718
+Node: O_NOFOLLOW\7f245489
+Ref: O_NOFOLLOW-Footnote-1\7f247133
+Node: Systems without O_NOFOLLOW\7f247235
+Ref: Systems without O_NOFOLLOW-Footnote-1\7f249380
+Node: Race Conditions with -exec\7f249442
+Node: Race Conditions with -print and -print0\7f252355
+Node: Security Considerations for xargs\7f253276
+Node: Security Considerations for locate\7f255780
+Node: Security Summary\7f258162
+Node: Further Reading on Security\7f258957
+Node: Error Messages\7f260141
+Node: Error Messages From find\7f261170
+Node: Error Messages From xargs\7f266295
+Node: Error Messages From locate\7f268440
+Node: Error Messages From updatedb\7f269672
+Node: GNU Free Documentation License\7f270075
+Node: Primary Index\7f295249
+\1f
+End Tag Table
diff --git a/doc/find.info-1 b/doc/find.info-1
new file mode 100644 (file)
index 0000000..e24eea5
--- /dev/null
@@ -0,0 +1,7390 @@
+This is
+/home/james/source/GNU/findutils/git/gnu/findutils/doc/find.info,
+produced by makeinfo version 4.13 from
+/home/james/source/GNU/findutils/git/gnu/findutils/doc/find.texi.
+
+INFO-DIR-SECTION Basics
+START-INFO-DIR-ENTRY
+* Finding files: (find).        Operating on files matching certain criteria.
+END-INFO-DIR-ENTRY
+
+INFO-DIR-SECTION Individual utilities
+START-INFO-DIR-ENTRY
+* find: (find)Invoking find.                    Finding and acting on files.
+* locate: (find)Invoking locate.                Finding files in a database.
+* updatedb: (find)Invoking updatedb.            Building the locate database.
+* xargs: (find)Invoking xargs.                  Operating on many files.
+END-INFO-DIR-ENTRY
+
+   This file documents the GNU utilities for finding files that match
+certain criteria and performing various operations on them.
+
+   Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006,
+2007, 2008, 2009, 2010 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, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled "GNU
+Free Documentation License."
+
+\1f
+File: find.info,  Node: Top,  Next: Introduction,  Up: (dir)
+
+GNU Findutils
+*************
+
+This file documents the GNU utilities for finding files that match
+certain criteria and performing various operations on them.
+
+   Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006,
+2007, 2008, 2009, 2010 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, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled "GNU
+Free Documentation License."
+
+   This file documents the GNU utilities for finding files that match
+certain criteria and performing various actions on them.
+
+   This is edition 4.5.10, for `find' version 4.5.10.
+
+* Menu:
+
+* Introduction::                Summary of the tasks this manual describes.
+* Finding Files::               Finding files that match certain criteria.
+* Actions::                     Doing things to files you have found.
+* Databases::                   Maintaining file name databases.
+* File Permissions::            How to control access to files.
+* Date input formats::          Specifying literal times.
+* Reference::                   Summary of how to invoke the programs.
+* Common Tasks::                Solutions to common real-world problems.
+* Worked Examples::             Examples demonstrating more complex points.
+* Security Considerations::     Security issues relating to findutils.
+* Error Messages::              Explanations of some messages you might see.
+* GNU Free Documentation License::  Copying and sharing this manual.
+* Primary Index::               The components of `find' expressions.
+
+\1f
+File: find.info,  Node: Introduction,  Next: Finding Files,  Prev: Top,  Up: Top
+
+1 Introduction
+**************
+
+This manual shows how to find files that meet criteria you specify, and
+how to perform various actions on the files that you find.  The
+principal programs that you use to perform these tasks are `find',
+`locate', and `xargs'.  Some of the examples in this manual use
+capabilities specific to the GNU versions of those programs.
+
+   GNU `find' was originally written by Eric Decker, with enhancements
+by David MacKenzie, Jay Plett, and Tim Wood.  GNU `xargs' was
+originally written by Mike Rendell, with enhancements by David
+MacKenzie.  GNU `locate' and its associated utilities were originally
+written by James Woods, with enhancements by David MacKenzie.  The idea
+for `find -print0' and `xargs -0' came from Dan Bernstein.  The current
+maintainer of GNU findutils (and this manual) is James Youngman.  Many
+other people have contributed bug fixes, small improvements, and
+helpful suggestions.  Thanks!
+
+   To report a bug in GNU findutils, please use the form on the Savannah
+web site at `http://savannah.gnu.org/bugs/?group=findutils'.  Reporting
+bugs this way means that you will then be able to track progress in
+fixing the problem.
+
+   If you don't have web access, you can also just send mail to the
+mailing list.  The mailing list <bug-findutils@gnu.org> carries
+discussion of bugs in findutils, questions and answers about the
+software and discussion of the development of the programs.  To join
+the list, send email to <bug-findutils-request@gnu.org>.
+
+   Please read any relevant sections of this manual before asking for
+help on the mailing list.  You may also find it helpful to read the
+NON-BUGS section of the `find' manual page.
+
+   If you ask for help on the mailing list, people will be able to help
+you much more effectively if you include the following things:
+
+   * The version of the software you are running.  You can find this
+     out by running `locate --version'.
+
+   * What you were trying to do
+
+   * The _exact_ command line you used
+
+   * The _exact_ output you got (if this is very long, try to find a
+     smaller example which exhibits the same problem)
+
+   * The output you expected to get
+
+   It may also be the case that the bug you are describing has already
+been fixed, if it is a bug.  Please check the most recent findutils
+releases at `ftp://ftp.gnu.org/gnu/findutils' and, if possible, the
+development branch at `ftp://alpha.gnu.org/gnu/findutils'.  If you take
+the time to check that your bug still exists in current releases, this
+will greatly help people who want to help you solve your problem.
+Please also be aware that if you obtained findutils as part of the
+GNU/Linux 'distribution', the distributions often lag seriously behind
+findutils releases, even the stable release.  Please check the GNU FTP
+site.
+
+* Menu:
+
+* Scope::
+* Overview::
+* find Expressions::
+
+\1f
+File: find.info,  Node: Scope,  Next: Overview,  Up: Introduction
+
+1.1 Scope
+=========
+
+For brevity, the word "file" in this manual means a regular file, a
+directory, a symbolic link, or any other kind of node that has a
+directory entry.  A directory entry is also called a "file name".  A
+file name may contain some, all, or none of the directories in a path
+that leads to the file.  These are all examples of what this manual
+calls "file names":
+
+     parser.c
+     README
+     ./budget/may-94.sc
+     fred/.cshrc
+     /usr/local/include/termcap.h
+
+   A "directory tree" is a directory and the files it contains, all of
+its subdirectories and the files they contain, etc.  It can also be a
+single non-directory file.
+
+   These programs enable you to find the files in one or more directory
+trees that:
+
+   * have names that contain certain text or match a certain pattern;
+
+   * are links to certain files;
+
+   * were last used during a certain period of time;
+
+   * are within a certain size range;
+
+   * are of a certain type (regular file, directory, symbolic link,
+     etc.);
+
+   * are owned by a certain user or group;
+
+   * have certain access permissions or special mode bits;
+
+   * contain text that matches a certain pattern;
+
+   * are within a certain depth in the directory tree;
+
+   * or some combination of the above.
+
+   Once you have found the files you're looking for (or files that are
+potentially the ones you're looking for), you can do more to them than
+simply list their names.  You can get any combination of the files'
+attributes, or process the files in many ways, either individually or
+in groups of various sizes.  Actions that you might want to perform on
+the files you have found include, but are not limited to:
+
+   * view or edit
+
+   * store in an archive
+
+   * remove or rename
+
+   * change access permissions
+
+   * classify into groups
+
+   This manual describes how to perform each of those tasks, and more.
+
+\1f
+File: find.info,  Node: Overview,  Next: find Expressions,  Prev: Scope,  Up: Introduction
+
+1.2 Overview
+============
+
+The principal programs used for making lists of files that match given
+criteria and running commands on them are `find', `locate', and
+`xargs'.  An additional command, `updatedb', is used by system
+administrators to create databases for `locate' to use.
+
+   `find' searches for files in a directory hierarchy and prints
+information about the files it found.  It is run like this:
+
+     find [FILE...] [EXPRESSION]
+
+Here is a typical use of `find'.  This example prints the names of all
+files in the directory tree rooted in `/usr/src' whose name ends with
+`.c' and that are larger than 100 Kilobytes.
+     find /usr/src -name '*.c' -size +100k -print
+
+   Notice that the wildcard must be enclosed in quotes in order to
+protect it from expansion by the shell.
+
+   `locate' searches special file name databases for file names that
+match patterns.  The system administrator runs the `updatedb' program
+to create the databases.  `locate' is run like this:
+
+     locate [OPTION...] PATTERN...
+
+This example prints the names of all files in the default file name
+database whose name ends with `Makefile' or `makefile'.  Which file
+names are stored in the database depends on how the system
+administrator ran `updatedb'.
+     locate '*[Mm]akefile'
+
+   The name `xargs', pronounced EX-args, means "combine arguments."
+`xargs' builds and executes command lines by gathering together
+arguments it reads on the standard input.  Most often, these arguments
+are lists of file names generated by `find'.  `xargs' is run like this:
+
+     xargs [OPTION...] [COMMAND [INITIAL-ARGUMENTS]]
+
+The following command searches the files listed in the file `file-list'
+and prints all of the lines in them that contain the word `typedef'.
+     xargs grep typedef < file-list
+
+\1f
+File: find.info,  Node: find Expressions,  Prev: Overview,  Up: Introduction
+
+1.3 `find' Expressions
+======================
+
+The expression that `find' uses to select files consists of one or more
+"primaries", each of which is a separate command line argument to
+`find'.  `find' evaluates the expression each time it processes a file.
+An expression can contain any of the following types of primaries:
+
+"options"
+     affect overall operation rather than the processing of a specific
+     file;
+
+"tests"
+     return a true or false value, depending on the file's attributes;
+
+"actions"
+     have side effects and return a true or false value; and
+
+"operators"
+     connect the other arguments and affect when and whether they are
+     evaluated.
+
+   You can omit the operator between two primaries; it defaults to
+`-and'.  *Note Combining Primaries With Operators::, for ways to
+connect primaries into more complex expressions.  If the expression
+contains no actions other than `-prune', `-print' is performed on all
+files for which the entire expression is true (*note Print File Name::).
+
+   Options take effect immediately, rather than being evaluated for each
+file when their place in the expression is reached.  Therefore, for
+clarity, it is best to place them at the beginning of the expression.
+There are two exceptions to this; `-daystart' and `-follow' have
+different effects depending on where in the command line they appear.
+This can be confusing, so it's best to keep them at the beginning, too.
+
+   Many of the primaries take arguments, which immediately follow them
+in the next command line argument to `find'.  Some arguments are file
+names, patterns, or other strings; others are numbers.  Numeric
+arguments can be specified as
+
+`+N'
+     for greater than N,
+
+`-N'
+     for less than N,
+
+`N'
+     for exactly N.
+
+\1f
+File: find.info,  Node: Finding Files,  Next: Actions,  Prev: Introduction,  Up: Top
+
+2 Finding Files
+***************
+
+By default, `find' prints to the standard output the names of the files
+that match the given criteria.  *Note Actions::, for how to get more
+information about the matching files.
+
+* Menu:
+
+* Name::
+* Links::
+* Time::
+* Size::
+* Type::
+* Owner::
+* Mode Bits::
+* Contents::
+* Directories::
+* Filesystems::
+* Combining Primaries With Operators::
+
+\1f
+File: find.info,  Node: Name,  Next: Links,  Up: Finding Files
+
+2.1 Name
+========
+
+Here are ways to search for files whose name matches a certain pattern.
+*Note Shell Pattern Matching::, for a description of the PATTERN
+arguments to these tests.
+
+   Each of these tests has a case-sensitive version and a
+case-insensitive version, whose name begins with `i'.  In a
+case-insensitive comparison, the patterns `fo*' and `F??' match the
+file names `Foo', `FOO', `foo', `fOo', etc.
+
+* Menu:
+
+* Base Name Patterns::
+* Full Name Patterns::
+* Fast Full Name Search::
+* Shell Pattern Matching::      Wildcards used by these programs.
+
+\1f
+File: find.info,  Node: Base Name Patterns,  Next: Full Name Patterns,  Up: Name
+
+2.1.1 Base Name Patterns
+------------------------
+
+ -- Test: -name pattern
+ -- Test: -iname pattern
+     True if the base of the file name (the path with the leading
+     directories removed) matches shell pattern PATTERN.  For `-iname',
+     the match is case-insensitive.(1) To ignore a whole directory
+     tree, use `-prune' (*note Directories::).  As an example, to find
+     Texinfo source files in `/usr/local/doc':
+
+          find /usr/local/doc -name '*.texi'
+
+     Notice that the wildcard must be enclosed in quotes in order to
+     protect it from expansion by the shell.
+
+     As of findutils version 4.2.2, patterns for `-name' and `-iname'
+     will match a file name with a leading `.'.  For example the
+     command `find /tmp -name \*bar' will match the file
+     `/tmp/.foobar'.  Braces within the pattern (`{}') are not
+     considered to be special (that is, `find . -name 'foo{1,2}''
+     matches a file named `foo{1,2}', not the files `foo1' and `foo2'.
+
+     Because the leading directories are removed, the file names
+     considered for a match with `-name' will never include a slash, so
+     `-name a/b' will never match anything (you probably need to use
+     `-path' instead).
+
+   ---------- Footnotes ----------
+
+   (1) Because we need to perform case-insensitive matching, the GNU
+fnmatch implementation is always used; if the C library includes the GNU
+implementation, we use that and otherwise we use the one from gnulib
+
+\1f
+File: find.info,  Node: Full Name Patterns,  Next: Fast Full Name Search,  Prev: Base Name Patterns,  Up: Name
+
+2.1.2 Full Name Patterns
+------------------------
+
+ -- Test: -path pattern
+ -- Test: -wholename pattern
+     True if the entire file name, starting with the command line
+     argument under which the file was found, matches shell pattern
+     PATTERN.  To ignore a whole directory tree, use `-prune' rather
+     than checking every file in the tree (*note Directories::).  The
+     "entire file name" as used by `find' starts with the starting-point
+     specified on the command line, and is not converted to an absolute
+     pathname, so for example `cd /; find tmp -wholename /tmp' will
+     never match anything.
+
+     Find compares the `-path' argument with the concatenation of a
+     directory name and the base name of the file it's considering.
+     Since the concatenation will never end with a slash, `-path'
+     arguments ending in `/' will match nothing (except perhaps a start
+     point specified on the command line).
+
+     The name `-wholename' is GNU-specific, but `-path' is more
+     portable; it is supported by HP-UX `find' and is part of the POSIX
+     2008 standard.
+
+
+ -- Test: -ipath pattern
+ -- Test: -iwholename pattern
+     These tests are like `-wholename' and `-path', but the match is
+     case-insensitive.
+
+   In the context of the tests `-path', `-wholename', `-ipath' and
+`-wholename', a "full path" is the name of all the directories
+traversed from `find''s start point to the file being tested, followed
+by the base name of the file itself.  These paths are often not
+absolute paths; for example
+
+     $ cd /tmp
+     $ mkdir -p foo/bar/baz
+     $ find foo -path foo/bar -print
+     foo/bar
+     $ find foo -path /tmp/foo/bar -print
+     $ find /tmp/foo -path /tmp/foo/bar -print
+     /tmp/foo/bar
+
+   Notice that the second `find' command prints nothing, even though
+`/tmp/foo/bar' exists and was examined by `find'.
+
+   Unlike file name expansion on the command line, a `*' in the pattern
+will match both `/' and leading dots in file names:
+
+     $ find .  -path '*f'
+     ./quux/bar/baz/f
+     $ find .  -path '*/*config'
+     ./quux/bar/baz/.config
+
+ -- Test: -regex expr
+ -- Test: -iregex expr
+     True if the entire file name matches regular expression EXPR.
+     This is a match on the whole path, not a search.  For example, to
+     match a file named `./fubar3', you can use the regular expression
+     `.*bar.' or `.*b.*3', but not `f.*r3'.  *Note Syntax of Regular
+     Expressions: (emacs)Regexps, for a description of the syntax of
+     regular expressions.  For `-iregex', the match is case-insensitive.
+
+     As for `-path', the candidate file name never ends with a slash,
+     so regular expressions which only match something that ends in
+     slash will always fail.
+
+     There are several varieties of regular expressions; by default this
+     test uses POSIX basic regular expressions, but this can be changed
+     with the option `-regextype'.
+
+ -- Option: -regextype name
+     This option controls the variety of regular expression syntax
+     understood by the `-regex' and `-iregex' tests.  This option is
+     positional; that is, it only affects regular expressions which
+     occur later in the command line.  If this option is not given, GNU
+     Emacs regular expressions are assumed.  Currently-implemented types
+     are
+
+    `emacs'
+          Regular expressions compatible with GNU Emacs; this is also
+          the default behaviour if this option is not used.
+
+    `posix-awk'
+          Regular expressions compatible with the POSIX awk command
+          (not GNU awk)
+
+    `posix-basic'
+          POSIX Basic Regular Expressions.
+
+    `posix-egrep'
+          Regular expressions compatible with the POSIX egrep command
+
+    `posix-extended'
+          POSIX Extended Regular Expressions
+
+     *note Regular Expressions:: for more information on the regular
+     expression dialects understood by GNU findutils.
+
+
+\1f
+File: find.info,  Node: Fast Full Name Search,  Next: Shell Pattern Matching,  Prev: Full Name Patterns,  Up: Name
+
+2.1.3 Fast Full Name Search
+---------------------------
+
+To search for files by name without having to actually scan the
+directories on the disk (which can be slow), you can use the `locate'
+program.  For each shell pattern you give it, `locate' searches one or
+more databases of file names and displays the file names that contain
+the pattern.  *Note Shell Pattern Matching::, for details about shell
+patterns.
+
+   If a pattern is a plain string--it contains no
+metacharacters--`locate' displays all file names in the database that
+contain that string.  If a pattern contains metacharacters, `locate'
+only displays file names that match the pattern exactly.  As a result,
+patterns that contain metacharacters should usually begin with a `*',
+and will most often end with one as well.  The exceptions are patterns
+that are intended to explicitly match the beginning or end of a file
+name.
+
+   If you only want `locate' to match against the last component of the
+file names (the "base name" of the files) you can use the `--basename'
+option.  The opposite behaviour is the default, but can be selected
+explicitly by using the option `--wholename'.
+
+   The command
+     locate PATTERN
+
+   is almost equivalent to
+     find DIRECTORIES -name PATTERN
+
+   where DIRECTORIES are the directories for which the file name
+databases contain information.  The differences are that the `locate'
+information might be out of date, and that `locate' handles wildcards
+in the pattern slightly differently than `find' (*note Shell Pattern
+Matching::).
+
+   The file name databases contain lists of files that were on the
+system when the databases were last updated.  The system administrator
+can choose the file name of the default database, the frequency with
+which the databases are updated, and the directories for which they
+contain entries.
+
+   Here is how to select which file name databases `locate' searches.
+The default is system-dependent.  At the time this document was
+generated, the default was `/usr/local/var/locatedb'.
+
+`--database=PATH'
+`-d PATH'
+     Instead of searching the default file name database, search the
+     file name databases in PATH, which is a colon-separated list of
+     database file names.  You can also use the environment variable
+     `LOCATE_PATH' to set the list of database files to search.  The
+     option overrides the environment variable if both are used.
+
+   GNU `locate' can read file name databases generated by the `slocate'
+package.  However, these generally contain a list of all the files on
+the system, and so when using this database, `locate' will produce
+output only for files which are accessible to you.  *Note Invoking
+locate::, for a description of the `--existing' option which is used to
+do this.
+
+   The `updatedb' program can also generate database in a format
+compatible with `slocate'.  *Note Invoking updatedb::, for a
+description of its `--dbformat' and `--output' options.
+
+\1f
+File: find.info,  Node: Shell Pattern Matching,  Prev: Fast Full Name Search,  Up: Name
+
+2.1.4 Shell Pattern Matching
+----------------------------
+
+`find' and `locate' can compare file names, or parts of file names, to
+shell patterns.  A "shell pattern" is a string that may contain the
+following special characters, which are known as "wildcards" or
+"metacharacters".
+
+   You must quote patterns that contain metacharacters to prevent the
+shell from expanding them itself.  Double and single quotes both work;
+so does escaping with a backslash.
+
+`*'
+     Matches any zero or more characters.
+
+`?'
+     Matches any one character.
+
+`[STRING]'
+     Matches exactly one character that is a member of the string
+     STRING.  This is called a "character class".  As a shorthand,
+     STRING may contain ranges, which consist of two characters with a
+     dash between them.  For example, the class `[a-z0-9_]' matches a
+     lowercase letter, a number, or an underscore.  You can negate a
+     class by placing a `!' or `^' immediately after the opening
+     bracket.  Thus, `[^A-Z@]' matches any character except an
+     uppercase letter or an at sign.
+
+`\'
+     Removes the special meaning of the character that follows it.  This
+     works even in character classes.
+
+   In the `find' tests that do shell pattern matching (`-name',
+`-wholename', etc.), wildcards in the pattern will match a `.'  at the
+beginning of a file name.  This is also the case for `locate'.  Thus,
+`find -name '*macs'' will match a file named `.emacs', as will `locate
+'*macs''.
+
+   Slash characters have no special significance in the shell pattern
+matching that `find' and `locate' do, unlike in the shell, in which
+wildcards do not match them.  Therefore, a pattern `foo*bar' can match
+a file name `foo3/bar', and a pattern `./sr*sc' can match a file name
+`./src/misc'.
+
+   If you want to locate some files with the `locate' command but don't
+need to see the full list you can use the `--limit' option to see just
+a small number of results, or the `--count' option to display only the
+total number of matches.
+
+\1f
+File: find.info,  Node: Links,  Next: Time,  Prev: Name,  Up: Finding Files
+
+2.2 Links
+=========
+
+There are two ways that files can be linked together.  "Symbolic links"
+are a special type of file whose contents are a portion of the name of
+another file.  "Hard links" are multiple directory entries for one
+file; the file names all have the same index node ("inode") number on
+the disk.
+
+* Menu:
+
+* Symbolic Links::
+* Hard Links::
+
+\1f
+File: find.info,  Node: Symbolic Links,  Next: Hard Links,  Up: Links
+
+2.2.1 Symbolic Links
+--------------------
+
+Symbolic links are names that reference other files.  GNU `find' will
+handle symbolic links in one of two ways; firstly, it can dereference
+the links for you - this means that if it comes across a symbolic link,
+it examines the file that the link points to, in order to see if it
+matches the criteria you have specified.  Secondly, it can check the
+link itself in case you might be looking for the actual link.  If the
+file that the symbolic link points to is also within the directory
+hierarchy you are searching with the `find' command, you may not see a
+great deal of difference between these two alternatives.
+
+   By default, `find' examines symbolic links themselves when it finds
+them (and, if it later comes across the linked-to file, it will examine
+that, too).  If you would prefer `find' to dereference the links and
+examine the file that each link points to, specify the `-L' option to
+`find'.  You can explicitly specify the default behaviour by using the
+`-P' option.  The `-H' option is a half-way-between option which
+ensures that any symbolic links listed on the command line are
+dereferenced, but other symbolic links are not.
+
+   Symbolic links are different from "hard links" in the sense that you
+need permission to search the directories in the linked-to file name to
+dereference the link.  This can mean that even if you specify the `-L'
+option, `find' may not be able to determine the properties of the file
+that the link points to (because you don't have sufficient permission).
+In this situation, `find' uses the properties of the link itself.  This
+also occurs if a symbolic link exists but points to a file that is
+missing.
+
+   The options controlling the behaviour of `find' with respect to
+links are as follows :-
+
+`-P'
+     `find' does not dereference symbolic links at all.  This is the
+     default behaviour.  This option must be specified before any of the
+     file names on the command line.
+
+`-H'
+     `find' does not dereference symbolic links (except in the case of
+     file names on the command line, which are dereferenced).  If a
+     symbolic link cannot be dereferenced, the information for the
+     symbolic link itself is used.  This option must be specified
+     before any of the file names on the command line.
+
+`-L'
+     `find' dereferences symbolic links where possible, and where this
+     is not possible it uses the properties of the symbolic link itself.
+     This option must be specified before any of the file names on the
+     command line.  Use of this option also implies the same behaviour
+     as the `-noleaf' option.  If you later use the `-H' or `-P'
+     options, this does not turn off `-noleaf'.
+
+`-follow'
+     This option forms part of the "expression" and must be specified
+     after the file names, but it is otherwise equivalent to `-L'.  The
+     `-follow' option affects only those tests which appear after it on
+     the command line.  This option is deprecated.  Where possible, you
+     should use `-L' instead.
+
+   The following differences in behavior occur when the `-L' option is
+used:
+
+   * `find' follows symbolic links to directories when searching
+     directory trees.
+
+   * `-lname' and `-ilname' always return false (unless they happen to
+     match broken symbolic links).
+
+   * `-type' reports the types of the files that symbolic links point
+     to.  This means that in combination with `-L', `-type l' will be
+     true only for broken symbolic links.  To check for symbolic links
+     when `-L' has been specified, use `-xtype l'.
+
+   * Implies `-noleaf' (*note Directories::).
+
+   If the `-L' option or the `-H' option is used, the file names used
+as arguments to `-newer', `-anewer', and `-cnewer' are dereferenced and
+the timestamp from the pointed-to file is used instead (if possible -
+otherwise the timestamp from the symbolic link is used).
+
+ -- Test: -lname pattern
+ -- Test: -ilname pattern
+     True if the file is a symbolic link whose contents match shell
+     pattern PATTERN.  For `-ilname', the match is case-insensitive.
+     *Note Shell Pattern Matching::, for details about the PATTERN
+     argument.  If the `-L' option is in effect, this test will always
+     return false for symbolic links unless they are broken.  So, to
+     list any symbolic links to `sysdep.c' in the current directory and
+     its subdirectories, you can do:
+
+          find . -lname '*sysdep.c'
+
+\1f
+File: find.info,  Node: Hard Links,  Prev: Symbolic Links,  Up: Links
+
+2.2.2 Hard Links
+----------------
+
+Hard links allow more than one name to refer to the same file.  To find
+all the names which refer to the same file as NAME, use `-samefile
+NAME'.  If you are not using the `-L' option, you can confine your
+search to one filesystem using the `-xdev' option.  This is useful
+because hard links cannot point outside a single filesystem, so this
+can cut down on needless searching.
+
+   If the `-L' option is in effect, and NAME is in fact a symbolic
+link, the symbolic link will be dereferenced.  Hence you are searching
+for other links (hard or symbolic) to the file pointed to by NAME.  If
+`-L' is in effect but NAME is not itself a symbolic link, other
+symbolic links to the file NAME will be matched.
+
+   You can also search for files by inode number.  This can occasionally
+be useful in diagnosing problems with filesystems for example, because
+`fsck' tends to print inode numbers.  Inode numbers also occasionally
+turn up in log messages for some types of software, and are used to
+support the `ftok()' library function.
+
+   You can learn a file's inode number and the number of links to it by
+running `ls -li' or `find -ls'.
+
+   You can search for hard links to inode number NUM by using `-inum
+NUM'. If there are any filesystem mount points below the directory
+where you are starting the search, use the `-xdev' option unless you
+are also using the `-L' option.  Using `-xdev' this saves needless
+searching, since hard links to a file must be on the same filesystem.
+*Note Filesystems::.
+
+ -- Test: -samefile NAME
+     File is a hard link to the same inode as NAME.  If the `-L' option
+     is in effect, symbolic links to the same file as NAME points to
+     are also matched.
+
+ -- Test: -inum n
+     File has inode number N.  The `+' and `-' qualifiers also work,
+     though these are rarely useful.  Much of the time it is easier to
+     use `-samefile' rather than this option.
+
+   You can also search for files that have a certain number of links,
+with `-links'.  Directories normally have at least two hard links;
+their `.' entry is the second one.  If they have subdirectories, each
+of those also has a hard link called `..' to its parent directory.  The
+`.' and `..' directory entries are not normally searched unless they
+are mentioned on the `find' command line.
+
+ -- Test: -links n
+     File has N hard links.
+
+ -- Test: -links +n
+     File has more than N hard links.
+
+ -- Test: -links -n
+     File has fewer than N hard links.
+
+\1f
+File: find.info,  Node: Time,  Next: Size,  Prev: Links,  Up: Finding Files
+
+2.3 Time
+========
+
+Each file has three time stamps, which record the last time that
+certain operations were performed on the file:
+
+  1. access (read the file's contents)
+
+  2. change the status (modify the file or its attributes)
+
+  3. modify (change the file's contents)
+
+   Some systems also provide a timestamp that indicates when a file was
+_created_.   For example, the UFS2 filesystem under NetBSD-3.1 records
+the _birth time_ of each file.  This information is also available
+under other versions of BSD and some versions of Cygwin.  However, even
+on systems which support file birth time, files may exist for which
+this information was not recorded (for example, UFS1 file systems
+simply do not contain this information).
+
+   You can search for files whose time stamps are within a certain age
+range, or compare them to other time stamps.
+
+* Menu:
+
+* Age Ranges::
+* Comparing Timestamps::
+
+\1f
+File: find.info,  Node: Age Ranges,  Next: Comparing Timestamps,  Up: Time
+
+2.3.1 Age Ranges
+----------------
+
+These tests are mainly useful with ranges (`+N' and `-N').
+
+ -- Test: -atime n
+ -- Test: -ctime n
+ -- Test: -mtime n
+     True if the file was last accessed (or its status changed, or it
+     was modified) N*24 hours ago.  The number of 24-hour periods since
+     the file's timestamp is always rounded down; therefore 0 means
+     "less than 24 hours ago", 1 means "between 24 and 48 hours ago",
+     and so forth.  Fractional values are supported but this only
+     really makes sense for the case where ranges (`+N' and `-N') are
+     used.
+
+ -- Test: -amin n
+ -- Test: -cmin n
+ -- Test: -mmin n
+     True if the file was last accessed (or its status changed, or it
+     was modified) N minutes ago.  These tests provide finer granularity
+     of measurement than `-atime' et al., but rounding is done in a
+     similar way (again, fractions are supported).  For example, to list
+     files in `/u/bill' that were last read from 2 to 6 minutes ago:
+
+          find /u/bill -amin +2 -amin -6
+
+ -- Option: -daystart
+     Measure times from the beginning of today rather than from 24 hours
+     ago.  So, to list the regular files in your home directory that
+     were modified yesterday, do
+
+          find ~/ -daystart -type f -mtime 1
+
+     The `-daystart' option is unlike most other options in that it has
+     an effect on the way that other tests are performed.  The affected
+     tests are `-amin', `-cmin', `-mmin', `-atime', `-ctime' and
+     `-mtime'.  The `-daystart' option only affects the behaviour of
+     any tests which appear after it on the command line.
+
+\1f
+File: find.info,  Node: Comparing Timestamps,  Prev: Age Ranges,  Up: Time
+
+2.3.2 Comparing Timestamps
+--------------------------
+
+ -- Test: -newerXY reference
+     Succeeds if timestamp `X' of the file being considered is newer
+     than timestamp `Y' of the file `reference'.   The letters `X' and
+     `Y' can be any of the following letters:
+
+    `a'
+          Last-access time of `reference'
+
+    `B'
+          Birth time of `reference' (when this is not known, the test
+          cannot succeed)
+
+    `c'
+          Last-change time of `reference'
+
+    `m'
+          Last-modification time of `reference'
+
+    `t'
+          The `reference' argument is interpreted as a literal time,
+          rather than the name of a file.  *Note Date input formats::,
+          for a description of how the timestamp is understood.  Tests
+          of the form `-newerXt' are valid but tests of the form
+          `-newertY' are not.
+
+     For example the test `-newerac /tmp/foo' succeeds for all files
+     which have been accessed more recently than `/tmp/foo' was
+     changed.   Here `X' is `a' and `Y' is `c'.
+
+     Not all files have a known birth time.  If `Y' is `b' and the
+     birth time of `reference' is not available, `find' exits with an
+     explanatory error message.  If `X' is `b' and we do not know the
+     birth time the file currently being considered, the test simply
+     fails (that is, it behaves like `-false' does).
+
+     Some operating systems (for example, most implementations of Unix)
+     do not support file birth times.  Some others, for example
+     NetBSD-3.1, do.  Even on operating systems which support file
+     birth times, the information may not be available for specific
+     files.  For example, under NetBSD, file birth times are supported
+     on UFS2 file systems, but not UFS1 file systems.
+
+
+   There are two ways to list files in `/usr' modified after February 1
+of the current year.  One uses `-newermt':
+
+     find /usr -newermt "Feb 1"
+
+   The other way of doing this works on the versions of find before
+4.3.3:
+
+     touch -t 02010000 /tmp/stamp$$
+     find /usr -newer /tmp/stamp$$
+     rm -f /tmp/stamp$$
+
+ -- Test: -anewer file
+ -- Test: -cnewer file
+ -- Test: -newer file
+     True if the file was last accessed (or its status changed, or it
+     was modified) more recently than FILE was modified.  These tests
+     are affected by `-follow' only if `-follow' comes before them on
+     the command line.  *Note Symbolic Links::, for more information on
+     `-follow'.  As an example, to list any files modified since
+     `/bin/sh' was last modified:
+
+          find . -newer /bin/sh
+
+ -- Test: -used n
+     True if the file was last accessed N days after its status was
+     last changed.  Useful for finding files that are not being used,
+     and could perhaps be archived or removed to save disk space.
+
+\1f
+File: find.info,  Node: Size,  Next: Type,  Prev: Time,  Up: Finding Files
+
+2.4 Size
+========
+
+ -- Test: -size n[bckwMG]
+     True if the file uses N units of space, rounding up.  The units
+     are 512-byte blocks by default, but they can be changed by adding a
+     one-character suffix to N:
+
+    `b'
+          512-byte blocks (never 1024)
+
+    `c'
+          bytes
+
+    `k'
+          kilobytes (1024 bytes)
+
+    `w'
+          2-byte words
+
+    `M'
+          Megabytes (units of 1048576 bytes)
+
+    `G'
+          Gigabytes (units of 1073741824 bytes)
+
+     The `b' suffix always considers blocks to be 512 bytes.  This is
+     not affected by the setting (or non-setting) of the POSIXLY_CORRECT
+     environment variable.  This behaviour is different from the
+     behaviour of the `-ls' action).  If you want to use 1024-byte
+     units, use the `k' suffix instead.
+
+     The number can be prefixed with a `+' or a `-'.  A plus sign
+     indicates that the test should succeed if the file uses at least N
+     units of storage (a common use of this test) and a minus sign
+     indicates that the test should succeed if the file uses less than
+     N units of storage.  There is no `=' prefix, because that's the
+     default anyway.
+
+     The size does not count indirect blocks, but it does count blocks
+     in sparse files that are not actually allocated.  In other words,
+     it's consistent with the result you get for `ls -l' or `wc -c'.
+     This handling of sparse files differs from the output of the `%k'
+     and `%b' format specifiers for the `-printf' predicate.
+
+
+ -- Test: -empty
+     True if the file is empty and is either a regular file or a
+     directory.  This might help determine good candidates for
+     deletion.  This test is useful with `-depth' (*note Directories::)
+     and `-delete' (*note Single File::).
+
+\1f
+File: find.info,  Node: Type,  Next: Owner,  Prev: Size,  Up: Finding Files
+
+2.5 Type
+========
+
+ -- Test: -type c
+     True if the file is of type C:
+
+    `b'
+          block (buffered) special
+
+    `c'
+          character (unbuffered) special
+
+    `d'
+          directory
+
+    `p'
+          named pipe (FIFO)
+
+    `f'
+          regular file
+
+    `l'
+          symbolic link; if `-L' is in effect, this is true only for
+          broken symbolic links.  If you want to search for symbolic
+          links when `-L' is in effect, use `-xtype' instead of `-type'.
+
+    `s'
+          socket
+
+    `D'
+          door (Solaris)
+
+ -- Test: -xtype c
+     This test behaves the same as `-type' unless the file is a
+     symbolic link.  If the file is a symbolic link, the result is as
+     follows (in the table below, `X' should be understood to represent
+     any letter except `l'):
+
+    ``-P -xtype l''
+          True if the symbolic link is broken
+
+    ``-P -xtype X''
+          True if the (ultimate) target file is of type `X'.
+
+    ``-L -xtype l''
+          Always true
+
+    ``-L -xtype X''
+          False unless the symbolic link is broken
+
+     In other words, for symbolic links, `-xtype' checks the type of
+     the file that `-type' does not check.
+
+     The `-H' option also affects the behaviour of `-xtype'.  When `-H'
+     is in effect, `-xtype' behaves as if `-L' had been specified when
+     examining files listed on the command line, and as if `-P' had
+     been specified otherwise.  If neither `-H' nor `-L' was specified,
+     `-xtype' behaves as if `-P' had been specified.
+
+     *Note Symbolic Links::, for more information on `-follow' and `-L'.
+
+\1f
+File: find.info,  Node: Owner,  Next: Mode Bits,  Prev: Type,  Up: Finding Files
+
+2.6 Owner
+=========
+
+ -- Test: -user uname
+ -- Test: -group gname
+     True if the file is owned by user UNAME (belongs to group GNAME).
+     A numeric ID is allowed.
+
+ -- Test: -uid n
+ -- Test: -gid n
+     True if the file's numeric user ID (group ID) is N.  These tests
+     support ranges (`+N' and `-N'), unlike `-user' and `-group'.
+
+ -- Test: -nouser
+ -- Test: -nogroup
+     True if no user corresponds to the file's numeric user ID (no group
+     corresponds to the numeric group ID).  These cases usually mean
+     that the files belonged to users who have since been removed from
+     the system.  You probably should change the ownership of such
+     files to an existing user or group, using the `chown' or `chgrp'
+     program.
+
+\1f
+File: find.info,  Node: Mode Bits,  Next: Contents,  Prev: Owner,  Up: Finding Files
+
+2.7 File Mode Bits
+==================
+
+*Note File Permissions::, for information on how file mode bits are
+structured and how to specify them.
+
+   Four tests determine what users can do with files.  These are
+`-readable', `-writable', `-executable' and `-perm'.  The first three
+tests ask the operating system if the current user can perform the
+relevant operation on a file, while `-perm' just examines the file's
+mode.  The file mode may give a misleading impression of what the user
+can actually do, because the file may have an access control list, or
+exist on a read-only filesystem, for example.  Of these four tests
+though, only `-perm' is specified by the POSIX standard.
+
+   The `-readable', `-writable' and `-executable' tests are implemented
+via the `access' system call.  This is implemented within the operating
+system itself.  If the file being considered is on an NFS filesystem,
+the remote system may allow or forbid read or write operations for
+reasons of which the NFS client cannot take account.  This includes
+user-ID mapping, either in the general sense or the more restricted
+sense in which remote superusers are treated by the NFS server as if
+they are the local user `nobody' on the NFS server.
+
+   None of the tests in this section should be used to verify that a
+user is authorised to perform any operation (on the file being tested or
+any other file) because of the possibility of a race condition.  That
+is, the situation may change between the test and an action being taken
+on the basis of the result of that test.
+
+ -- Test: -readable
+     True if the file can be read by the invoking user.
+
+ -- Test: -writable
+     True if the file can be written by the invoking user.  This is an
+     in-principle check, and other things may prevent a successful write
+     operation; for example, the filesystem might be full.
+
+ -- Test: -executable
+     True if the file can be executed/searched by the invoking user.
+
+ -- Test: -perm pmode
+     True if the file's mode bits match PMODE, which can be either a
+     symbolic or numeric MODE (*note File Permissions::) optionally
+     prefixed by `-' or `/'.
+
+     A PMODE that starts with neither `-' nor `/' matches if MODE
+     exactly matches the file mode bits.
+
+     A PMODE that starts with `+' but which is not valid (for example
+     `+a+x') is an error if the POSIXLY_CORRECT environment variable it
+     set.  Otherwise this is treated as if the initial `+' were a `/',
+     for backward compatibility.
+
+     A PMODE that starts with `-' matches if _all_ the file mode bits
+     set in MODE are set for the file; bits not set in MODE are ignored.
+
+     A PMODE that starts with `/' matches if _any_ of the file mode
+     bits set in MODE are set for the file; bits not set in MODE are
+     ignored.  This is a GNU extension.
+
+     If you don't use the `/' or `-' form with a symbolic mode string,
+     you may have to specify a rather complex mode string.  For example
+     `-perm g=w' will only match files that have mode 0020 (that is,
+     ones for which group write permission is the only file mode bit
+     set).  It is more likely that you will want to use the `/' or `-'
+     forms, for example `-perm -g=w', which matches any file with group
+     write permission.
+
+    `-perm 664'
+          Match files that have read and write permission for their
+          owner, and group, but that the rest of the world can read but
+          not write to.  Do not match files that meet these criteria
+          but have other file mode bits set (for example if someone can
+          execute/search the file).
+
+    `-perm -664'
+          Match files that have read and write permission for their
+          owner, and group, but that the rest of the world can read but
+          not write to, without regard to the presence of any extra
+          file mode bits (for example the executable bit).  This
+          matches a file with mode 0777, for example.
+
+    `-perm /222'
+          Match files that are writable by somebody (their owner, or
+          their group, or anybody else).
+
+    `-perm /022'
+          Match files that are writable by either their owner or their
+          group.  The files don't have to be writable by both the owner
+          and group to be matched; either will do.
+
+    `-perm /g+w,o+w'
+          As above.
+
+    `-perm /g=w,o=w'
+          As above.
+
+    `-perm -022'
+          Match files that are writable by both their owner and their
+          group.
+
+    `-perm -444 -perm /222 ! -perm /111'
+          Match files that are readable for everybody, have at least one
+          write bit set (i.e., somebody can write to them), but that
+          cannot be executed/searched by anybody.  Note that in some
+          shells the `!' must be escaped;.
+
+    `-perm -a+r -perm /a+w ! -perm /a+x'
+          As above.
+
+    `-perm -g+w,o+w'
+          As above.
+
+          Warning: If you specify `-perm /000' or `-perm /mode' where
+          the symbolic mode `mode' has no bits set, the test matches
+          all files.  Versions of GNU `find' prior to 4.3.3 matched no
+          files in this situation.
+
+
+ -- Test: -context pattern
+     True if file's SELinux context matches the pattern PATTERN.  The
+     pattern uses shell glob matching.
+
+     This predicate is supported only on `find' versions compiled with
+     SELinux support and only when SELinux is enabled.
+
+\1f
+File: find.info,  Node: Contents,  Next: Directories,  Prev: Mode Bits,  Up: Finding Files
+
+2.8 Contents
+============
+
+To search for files based on their contents, you can use the `grep'
+program.  For example, to find out which C source files in the current
+directory contain the string `thing', you can do:
+
+     grep -l thing *.[ch]
+
+   If you also want to search for the string in files in subdirectories,
+you can combine `grep' with `find' and `xargs', like this:
+
+     find . -name '*.[ch]' | xargs grep -l thing
+
+   The `-l' option causes `grep' to print only the names of files that
+contain the string, rather than the lines that contain it.  The string
+argument (`thing') is actually a regular expression, so it can contain
+metacharacters.  This method can be refined a little by using the `-r'
+option to make `xargs' not run `grep' if `find' produces no output, and
+using the `find' action `-print0' and the `xargs' option `-0' to avoid
+misinterpreting files whose names contain spaces:
+
+     find . -name '*.[ch]' -print0 | xargs -r -0 grep -l thing
+
+   For a fuller treatment of finding files whose contents match a
+pattern, see the manual page for `grep'.
+
+\1f
+File: find.info,  Node: Directories,  Next: Filesystems,  Prev: Contents,  Up: Finding Files
+
+2.9 Directories
+===============
+
+Here is how to control which directories `find' searches, and how it
+searches them.  These two options allow you to process a horizontal
+slice of a directory tree.
+
+ -- Option: -maxdepth levels
+     Descend at most LEVELS (a non-negative integer) levels of
+     directories below the command line arguments.  `-maxdepth 0' means
+     only apply the tests and actions to the command line arguments.
+
+ -- Option: -mindepth levels
+     Do not apply any tests or actions at levels less than LEVELS (a
+     non-negative integer).  `-mindepth 1' means process all files
+     except the command line arguments.
+
+ -- Option: -depth
+     Process each directory's contents before the directory itself.
+     Doing this is a good idea when producing lists of files to archive
+     with `cpio' or `tar'.  If a directory does not have write
+     permission for its owner, its contents can still be restored from
+     the archive since the directory's permissions are restored after
+     its contents.
+
+ -- Option: -d
+     This is a deprecated synonym for `-depth', for compatibility with
+     Mac OS X, FreeBSD and OpenBSD.  The `-depth' option is a POSIX
+     feature, so it is better to use that.
+
+ -- Action: -prune
+     If the file is a directory, do not descend into it.  The result is
+     true.  For example, to skip the directory `src/emacs' and all
+     files and directories under it, and print the names of the other
+     files found:
+
+          find . -wholename './src/emacs' -prune -o -print
+
+     The above command will not print `./src/emacs' among its list of
+     results.  This however is not due to the effect of the `-prune'
+     action (which only prevents further descent, it doesn't make sure
+     we ignore that item).  Instead, this effect is due to the use of
+     `-o'.  Since the left hand side of the "or" condition has
+     succeeded for `./src/emacs', it is not necessary to evaluate the
+     right-hand-side (`-print') at all for this particular file.  If
+     you wanted to print that directory name you could use either an
+     extra `-print' action:
+
+          find . -wholename './src/emacs' -prune -print -o -print
+
+     or use the comma operator:
+
+          find . -wholename './src/emacs' -prune , -print
+
+     If the `-depth' option is in effect, the subdirectories will have
+     already been visited in any case.  Hence `-prune' has no effect in
+     this case.
+
+     Because `-delete' implies `-depth', using `-prune' in combination
+     with `-delete' may well result in the deletion of more files than
+     you intended.
+
+ -- Action: -quit
+     Exit immediately (with return value zero if no errors have
+     occurred).  This is different to `-prune' because `-prune' only
+     applies to the contents of pruned directories, while `-quit'
+     simply makes `find' stop immediately.  No child processes will be
+     left running, but no more files specified on the command line will
+     be processed.  For example, `find /tmp/foo /tmp/bar -print -quit'
+     will print only `/tmp/foo'.  Any command lines which have been
+     built by `-exec ... \+' or `-execdir ... \+' are invoked before
+     the program is exited.
+
+ -- Option: -noleaf
+     Do not optimize by assuming that directories contain 2 fewer
+     subdirectories than their hard link count.  This option is needed
+     when searching filesystems that do not follow the Unix
+     directory-link convention, such as CD-ROM or MS-DOS filesystems or
+     AFS volume mount points.  Each directory on a normal Unix
+     filesystem has at least 2 hard links: its name and its `.'  entry.
+     Additionally, its subdirectories (if any) each have a `..'  entry
+     linked to that directory.  When `find' is examining a directory,
+     after it has statted 2 fewer subdirectories than the directory's
+     link count, it knows that the rest of the entries in the directory
+     are non-directories ("leaf" files in the directory tree).  If only
+     the files' names need to be examined, there is no need to stat
+     them; this gives a significant increase in search speed.
+
+ -- Option: -ignore_readdir_race
+     If a file disappears after its name has been read from a directory
+     but before `find' gets around to examining the file with `stat',
+     don't issue an error message.  If you don't specify this option, an
+     error message will be issued.  This option can be useful in system
+     scripts (cron scripts, for example) that examine areas of the
+     filesystem that change frequently (mail queues, temporary
+     directories, and so forth), because this scenario is common for
+     those sorts of directories.  Completely silencing error messages
+     from `find' is undesirable, so this option neatly solves the
+     problem.  There is no way to search one part of the filesystem
+     with this option on and part of it with this option off, though.
+     When this option is turned on and find discovers that one of the
+     start-point files specified on the command line does not exist, no
+     error message will be issued.
+
+
+ -- Option: -noignore_readdir_race
+     This option reverses the effect of the `-ignore_readdir_race'
+     option.
+
+\1f
+File: find.info,  Node: Filesystems,  Next: Combining Primaries With Operators,  Prev: Directories,  Up: Finding Files
+
+2.10 Filesystems
+================
+
+A "filesystem" is a section of a disk, either on the local host or
+mounted from a remote host over a network.  Searching network
+filesystems can be slow, so it is common to make `find' avoid them.
+
+   There are two ways to avoid searching certain filesystems.  One way
+is to tell `find' to only search one filesystem:
+
+ -- Option: -xdev
+ -- Option: -mount
+     Don't descend directories on other filesystems.  These options are
+     synonyms.
+
+   The other way is to check the type of filesystem each file is on, and
+not descend directories that are on undesirable filesystem types:
+
+ -- Test: -fstype type
+     True if the file is on a filesystem of type TYPE.  The valid
+     filesystem types vary among different versions of Unix; an
+     incomplete list of filesystem types that are accepted on some
+     version of Unix or another is:
+          ext2 ext3 proc sysfs ufs 4.2 4.3 nfs tmp mfs S51K S52K
+     You can use `-printf' with the `%F' directive to see the types of
+     your filesystems.  The `%D' directive shows the device number.
+     *Note Print File Information::.  `-fstype' is usually used with
+     `-prune' to avoid searching remote filesystems (*note
+     Directories::).
+
+\1f
+File: find.info,  Node: Combining Primaries With Operators,  Prev: Filesystems,  Up: Finding Files
+
+2.11 Combining Primaries With Operators
+=======================================
+
+Operators build a complex expression from tests and actions.  The
+operators are, in order of decreasing precedence:
+
+`( EXPR )'
+     Force precedence.  True if EXPR is true.
+
+`! EXPR'
+`-not EXPR'
+     True if EXPR is false.  In some shells, it is necessary to protect
+     the `!' from shell interpretation by quoting it.
+
+`EXPR1 EXPR2'
+`EXPR1 -a EXPR2'
+`EXPR1 -and EXPR2'
+     And; EXPR2 is not evaluated if EXPR1 is false.
+
+`EXPR1 -o EXPR2'
+`EXPR1 -or EXPR2'
+     Or; EXPR2 is not evaluated if EXPR1 is true.
+
+`EXPR1 , EXPR2'
+     List; both EXPR1 and EXPR2 are always evaluated.  True if EXPR2 is
+     true.  The value of EXPR1 is discarded.  This operator lets you do
+     multiple independent operations on one traversal, without
+     depending on whether other operations succeeded.  The two
+     operations EXPR1 and EXPR2 are not always fully independent, since
+     EXPR1 might have side effects like touching or deleting files, or
+     it might use `-prune' which would also affect EXPR2.
+
+   `find' searches the directory tree rooted at each file name by
+evaluating the expression from left to right, according to the rules of
+precedence, until the outcome is known (the left hand side is false for
+`-and', true for `-or'), at which point `find' moves on to the next
+file name.
+
+   There are two other tests that can be useful in complex expressions:
+
+ -- Test: -true
+     Always true.
+
+ -- Test: -false
+     Always false.
+
+\1f
+File: find.info,  Node: Actions,  Next: Databases,  Prev: Finding Files,  Up: Top
+
+3 Actions
+*********
+
+There are several ways you can print information about the files that
+match the criteria you gave in the `find' expression.  You can print
+the information either to the standard output or to a file that you
+name.  You can also execute commands that have the file names as
+arguments.  You can use those commands as further filters to select
+files.
+
+* Menu:
+
+* Print File Name::
+* Print File Information::
+* Run Commands::
+* Delete Files::
+* Adding Tests::
+
+\1f
+File: find.info,  Node: Print File Name,  Next: Print File Information,  Up: Actions
+
+3.1 Print File Name
+===================
+
+ -- Action: -print
+     True; print the entire file name on the standard output, followed
+     by a newline.  If there is the faintest possibility that one of
+     the files for which you are searching might contain a newline, you
+     should use `-print0' instead.
+
+ -- Action: -fprint file
+     True; print the entire file name into file FILE, followed by a
+     newline.  If FILE does not exist when `find' is run, it is
+     created; if it does exist, it is truncated to 0 bytes.  The named
+     output file is always created, even if no output is sent to it.
+     The file names `/dev/stdout' and `/dev/stderr' are handled
+     specially; they refer to the standard output and standard error
+     output, respectively.
+
+     If there is the faintest possibility that one of the files for
+     which you are searching might contain a newline, you should use
+     `-fprint0' instead.
+
+\1f
+File: find.info,  Node: Print File Information,  Next: Run Commands,  Prev: Print File Name,  Up: Actions
+
+3.2 Print File Information
+==========================
+
+ -- Action: -ls
+     True; list the current file in `ls -dils' format on the standard
+     output.  The output looks like this:
+
+          204744   17 -rw-r--r--   1 djm      staff       17337 Nov  2  1992 ./lwall-quotes
+
+     The fields are:
+
+       1. The inode number of the file.  *Note Hard Links::, for how to
+          find files based on their inode number.
+
+       2. the number of blocks in the file.  The block counts are of 1K
+          blocks, unless the environment variable `POSIXLY_CORRECT' is
+          set, in which case 512-byte blocks are used.  *Note Size::,
+          for how to find files based on their size.
+
+       3. The file's type and file mode bits.  The type is shown as a
+          dash for a regular file; for other file types, a letter like
+          for `-type' is used (*note Type::).  The file mode bits are
+          read, write, and execute/search for the file's owner, its
+          group, and other users, respectively; a dash means the
+          permission is not granted.  *Note File Permissions::, for
+          more details about file permissions.  *Note Mode Bits::, for
+          how to find files based on their file mode bits.
+
+       4. The number of hard links to the file.
+
+       5. The user who owns the file.
+
+       6. The file's group.
+
+       7. The file's size in bytes.
+
+       8. The date the file was last modified.
+
+       9. The file's name.  `-ls' quotes non-printable characters in the
+          file names using C-like backslash escapes.  This may change
+          soon, as the treatment of unprintable characters is
+          harmonised for `-ls', `-fls', `-print', `-fprint', `-printf'
+          and `-fprintf'.
+
+ -- Action: -fls file
+     True; like `-ls' but write to FILE like `-fprint' (*note Print
+     File Name::).  The named output file is always created, even if no
+     output is sent to it.
+
+ -- Action: -printf format
+     True; print FORMAT on the standard output, interpreting `\'
+     escapes and `%' directives.  Field widths and precisions can be
+     specified as with the `printf' C function.  Format flags (like `#'
+     for example) may not work as you expect because many of the
+     fields, even numeric ones, are printed with %s.  Numeric flags
+     which are affected in this way include G, U, b, D, k and n.  This
+     difference in behaviour means though that the format flag `-' will
+     work; it forces left-alignment of the field.  Unlike `-print',
+     `-printf' does not add a newline at the end of the string.  If you
+     want a newline at the end of the string, add a `\n'.
+
+ -- Action: -fprintf file format
+     True; like `-printf' but write to FILE like `-fprint' (*note Print
+     File Name::).  The output file is always created, even if no
+     output is ever sent to it.
+
+* Menu:
+
+* Escapes::
+* Format Directives::
+* Time Formats::
+
+\1f
+File: find.info,  Node: Escapes,  Next: Format Directives,  Up: Print File Information
+
+3.2.1 Escapes
+-------------
+
+The escapes that `-printf' and `-fprintf' recognise are:
+
+`\a'
+     Alarm bell.
+
+`\b'
+     Backspace.
+
+`\c'
+     Stop printing from this format immediately and flush the output.
+
+`\f'
+     Form feed.
+
+`\n'
+     Newline.
+
+`\r'
+     Carriage return.
+
+`\t'
+     Horizontal tab.
+
+`\v'
+     Vertical tab.
+
+`\\'
+     A literal backslash (`\').
+
+`\0'
+     ASCII NUL.
+
+`\NNN'
+     The character whose ASCII code is NNN (octal).
+
+   A `\' character followed by any other character is treated as an
+ordinary character, so they both are printed, and a warning message is
+printed to the standard error output (because it was probably a typo).
+
+\1f
+File: find.info,  Node: Format Directives,  Next: Time Formats,  Prev: Escapes,  Up: Print File Information
+
+3.2.2 Format Directives
+-----------------------
+
+`-printf' and `-fprintf' support the following format directives to
+print information about the file being processed.  The C `printf'
+function, field width and precision specifiers are supported, as
+applied to string (%s) types. That is, you can specify "minimum field
+width"."maximum field width" for each directive.  Format flags (like
+`#' for example) may not work as you expect because many of the fields,
+even numeric ones, are printed with %s.  The format flag `-' does work;
+it forces left-alignment of the field.
+
+   `%%' is a literal percent sign.  A `%' character followed by an
+unrecognised character (i.e., not a known directive or `printf' field
+width and precision specifier), is discarded (but the unrecognised
+character is printed), and a warning message is printed to the standard
+error output (because it was probably a typo).  Don't rely on this
+behaviour, because other directives may be added in the future.
+
+   A `%' at the end of the format argument causes undefined behaviour
+since there is no following character.  In some locales, it may hide
+your door keys, while in others it may remove the final page from the
+novel you are reading.
+
+* Menu:
+
+* Name Directives::
+* Ownership Directives::
+* Size Directives::
+* Location Directives::
+* Time Directives::
+* Other Directives::
+* Formatting Flags::
+
+\1f
+File: find.info,  Node: Name Directives,  Next: Ownership Directives,  Up: Format Directives
+
+3.2.2.1 Name Directives
+.......................
+
+`%p'
+     File's name (not the absolute path name, but the name of the file
+     as it was encountered by `find' - that is, as a relative path from
+     one of the starting points).
+
+`%f'
+     File's name with any leading directories removed (only the last
+     element).
+
+`%h'
+     Leading directories of file's name (all but the last element and
+     the slash before it).  If the file's name contains no slashes (for
+     example because it was named on the command line and is in the
+     current working directory), then "%h" expands to ".".  This
+     prevents "%h/%f" expanding to "/foo", which would be surprising
+     and probably not desirable.
+
+`%P'
+     File's name with the name of the command line argument under which
+     it was found removed from the beginning.
+
+`%H'
+     Command line argument under which file was found.
+
+\1f
+File: find.info,  Node: Ownership Directives,  Next: Size Directives,  Prev: Name Directives,  Up: Format Directives
+
+3.2.2.2 Ownership Directives
+............................
+
+`%g'
+     File's group name, or numeric group ID if the group has no name.
+
+`%G'
+     File's numeric group ID.
+
+`%u'
+     File's user name, or numeric user ID if the user has no name.
+
+`%U'
+     File's numeric user ID.
+
+`%m'
+     File's mode bits (in octal).  If you always want to have a leading
+     zero on the number, use the '#' format flag, for example '%#m'.
+
+     The file mode bit numbers used are the traditional Unix numbers,
+     which will be as expected on most systems, but if your system's
+     file mode bit layout differs from the traditional Unix semantics,
+     you will see a difference between the mode as printed by `%m' and
+     the mode as it appears in `struct stat'.
+
+`%M'
+     File's type and mode bits (in symbolic form, as for `ls').  This
+     directive is supported in findutils 4.2.5 and later.
+
+\1f
+File: find.info,  Node: Size Directives,  Next: Location Directives,  Prev: Ownership Directives,  Up: Format Directives
+
+3.2.2.3 Size Directives
+.......................
+
+`%k'
+     The amount of disk space used for this file in 1K blocks. Since
+     disk space is allocated in multiples of the filesystem block size
+     this is usually greater than %s/1024, but it can also be smaller
+     if the file is a sparse file (that is, it has "holes").
+
+`%b'
+     The amount of disk space used for this file in 512-byte blocks.
+     Since disk space is allocated in multiples of the filesystem block
+     size this is usually greater than %s/512, but it can also be
+     smaller if the file is a sparse file (that is, it has "holes").
+
+`%s'
+     File's size in bytes.
+
+`%S'
+     File's sparseness.  This is calculated as `(BLOCKSIZE*st_blocks /
+     st_size)'.  The exact value you will get for an ordinary file of a
+     certain length is system-dependent.  However, normally sparse files
+     will have values less than 1.0, and files which use indirect blocks
+     and have few holes may have a value which is greater than 1.0.  The
+     value used for BLOCKSIZE is system-dependent, but is usually 512
+     bytes.  If the file size is zero, the value printed is undefined.
+     On systems which lack support for st_blocks, a file's sparseness is
+     assumed to be 1.0.
+
+\1f
+File: find.info,  Node: Location Directives,  Next: Time Directives,  Prev: Size Directives,  Up: Format Directives
+
+3.2.2.4 Location Directives
+...........................
+
+`%d'
+     File's depth in the directory tree (depth below a file named on the
+     command line, not depth below the root directory).  Files named on
+     the command line have a depth of 0.  Subdirectories immediately
+     below them have a depth of 1, and so on.
+
+`%D'
+     The device number on which the file exists (the `st_dev' field of
+     `struct stat'), in decimal.
+
+`%F'
+     Type of the filesystem the file is on; this value can be used for
+     `-fstype' (*note Directories::).
+
+`%l'
+     Object of symbolic link (empty string if file is not a symbolic
+     link).
+
+`%i'
+     File's inode number (in decimal).
+
+`%n'
+     Number of hard links to file.
+
+`%y'
+     Type of the file as used with `-type'.  If the file is a symbolic
+     link, `l' will be printed.
+
+`%Y'
+     Type of the file as used with `-type'.  If the file is a symbolic
+     link, it is dereferenced.  If the file is a broken symbolic link,
+     `N' is printed.
+
+
+\1f
+File: find.info,  Node: Time Directives,  Next: Other Directives,  Prev: Location Directives,  Up: Format Directives
+
+3.2.2.5 Time Directives
+.......................
+
+Some of these directives use the C `ctime' function.  Its output
+depends on the current locale, but it typically looks like
+
+     Wed Nov  2 00:42:36 1994
+
+`%a'
+     File's last access time in the format returned by the C `ctime'
+     function.
+
+`%AK'
+     File's last access time in the format specified by K (*note Time
+     Formats::).
+
+`%c'
+     File's last status change time in the format returned by the C
+     `ctime' function.
+
+`%CK'
+     File's last status change time in the format specified by K (*note
+     Time Formats::).
+
+`%t'
+     File's last modification time in the format returned by the C
+     `ctime' function.
+
+`%TK'
+     File's last modification time in the format specified by K (*note
+     Time Formats::).
+
+\1f
+File: find.info,  Node: Other Directives,  Next: Formatting Flags,  Prev: Time Directives,  Up: Format Directives
+
+3.2.2.6 Other Directives
+........................
+
+`%Z'
+     File's SELinux context, or empty string if the file has no SELinux
+     context.
+
+\1f
+File: find.info,  Node: Time Formats,  Prev: Format Directives,  Up: Print File Information
+
+3.2.3 Time Formats
+------------------
+
+Below are the formats for the directives `%A', `%C', and `%T', which
+print the file's timestamps.  Some of these formats might not be
+available on all systems, due to differences in the C `strftime'
+function between systems.
+
+* Menu:
+
+* Time Components::
+* Date Components::
+* Combined Time Formats::
+
+\1f
+File: find.info,  Node: Time Components,  Next: Date Components,  Up: Time Formats
+
+3.2.3.1 Time Components
+.......................
+
+The following format directives print single components of the time.
+
+`H'
+     hour (00..23)
+
+`I'
+     hour (01..12)
+
+`k'
+     hour ( 0..23)
+
+`l'
+     hour ( 1..12)
+
+`p'
+     locale's AM or PM
+
+`Z'
+     time zone (e.g., EDT), or nothing if no time zone is determinable
+
+`M'
+     minute (00..59)
+
+`S'
+     second (00..61).  There is a fractional part.
+
+`@'
+     seconds since Jan. 1, 1970, 00:00 GMT, with fractional part.
+
+   The fractional part of the seconds field is of indeterminate length
+and precision.  That is, the length of the fractional part of the
+seconds field will in general vary between findutils releases and
+between systems.  This means that it is unwise to assume that field has
+any specific length.  The length of this field is not usually a guide
+to the precision of timestamps in the underlying file system.
+
+\1f
+File: find.info,  Node: Date Components,  Next: Combined Time Formats,  Prev: Time Components,  Up: Time Formats
+
+3.2.3.2 Date Components
+.......................
+
+The following format directives print single components of the date.
+
+`a'
+     locale's abbreviated weekday name (Sun..Sat)
+
+`A'
+     locale's full weekday name, variable length (Sunday..Saturday)
+
+`b'
+`h'
+     locale's abbreviated month name (Jan..Dec)
+
+`B'
+     locale's full month name, variable length (January..December)
+
+`m'
+     month (01..12)
+
+`d'
+     day of month (01..31)
+
+`w'
+     day of week (0..6)
+
+`j'
+     day of year (001..366)
+
+`U'
+     week number of year with Sunday as first day of week (00..53)
+
+`W'
+     week number of year with Monday as first day of week (00..53)
+
+`Y'
+     year (1970...)
+
+`y'
+     last two digits of year (00..99)
+
+\1f
+File: find.info,  Node: Combined Time Formats,  Prev: Date Components,  Up: Time Formats
+
+3.2.3.3 Combined Time Formats
+.............................
+
+The following format directives print combinations of time and date
+components.
+
+`r'
+     time, 12-hour (hh:mm:ss [AP]M)
+
+`T'
+     time, 24-hour (hh:mm:ss)
+
+`X'
+     locale's time representation (H:M:S)
+
+`c'
+     locale's date and time in ctime format (Sat Nov 04 12:02:33 EST
+     1989).  This format does not include any fractional part in the
+     seconds field.
+
+`D'
+     date (mm/dd/yy)
+
+`x'
+     locale's date representation (mm/dd/yy)
+
+`+'
+     Date and time, separated by '+', for example
+     `2004-04-28+22:22:05.0000000000'.  The time is given in the
+     current timezone (which may be affected by setting the TZ
+     environment variable).  This is a GNU extension.  The seconds
+     field includes a fractional part.
+
+\1f
+File: find.info,  Node: Formatting Flags,  Prev: Other Directives,  Up: Format Directives
+
+3.2.3.4 Formatting Flags
+........................
+
+The `%m' and `%d' directives support the `#', `0' and `+' flags, but
+the other directives do not, even if they print numbers.  Numeric
+directives that do not support these flags include
+
+   `G', `U', `b', `D', `k' and `n'.
+
+   All fields support the format flag `-', which makes fields
+left-aligned.  That is, if the field width is greater than the actual
+contents of the field, the requisite number of spaces are printed after
+the field content instead of before it.
+
+\1f
+File: find.info,  Node: Run Commands,  Next: Delete Files,  Prev: Print File Information,  Up: Actions
+
+3.3 Run Commands
+================
+
+You can use the list of file names created by `find' or `locate' as
+arguments to other commands.  In this way you can perform arbitrary
+actions on the files.
+
+* Menu:
+
+* Single File::
+* Multiple Files::
+* Querying::
+
+\1f
+File: find.info,  Node: Single File,  Next: Multiple Files,  Up: Run Commands
+
+3.3.1 Single File
+-----------------
+
+Here is how to run a command on one file at a time.
+
+ -- Action: -execdir command ;
+     Execute COMMAND; true if zero status is returned.  `find' takes
+     all arguments after `-execdir' to be part of the command until an
+     argument consisting of `;' is reached.  It replaces the string
+     `{}' by the current file name being processed everywhere it occurs
+     in the command.  Both of these constructions need to be escaped
+     (with a `\') or quoted to protect them from expansion by the
+     shell.  The command is executed in the directory in which `find'
+     was run.
+
+     For example, to compare each C header file in or below the current
+     directory with the file `/tmp/master':
+
+          find . -name '*.h' -execdir diff -u '{}' /tmp/master ';'
+
+   If you use `-execdir', you must ensure that the `$PATH' variable
+contains only absolute directory names.  Having an empty element in
+`$PATH' or explicitly including `.' (or any other non-absolute name) is
+insecure.  GNU find will refuse to run if you use `-execdir' and it
+thinks your `$PATH' setting is insecure.  For example:
+
+`/bin:/usr/bin:'
+     Insecure; empty path element (at the end)
+
+`:/bin:/usr/bin:/usr/local/bin'
+     Insecure; empty path element (at the start)
+
+`/bin:/usr/bin::/usr/local/bin'
+     Insecure; empty path element (two colons in a row)
+
+`/bin:/usr/bin:.:/usr/local/bin'
+     Insecure; `.' is a path element (`.' is not an absolute file name)
+
+`/bin:/usr/bin:sbin:/usr/local/bin'
+     Insecure; `sbin' is not an absolute file name
+
+`/bin:/usr/bin:/sbin:/usr/local/bin'
+     Secure (if you control the contents of those directories and any
+     access to them)
+
+   Another similar option, `-exec' is supported, but is less secure.
+*Note Security Considerations::, for a discussion of the security
+problems surrounding `-exec'.
+
+ -- Action: -exec command ;
+     This insecure variant of the `-execdir' action is specified by
+     POSIX.  The main difference is that the command is executed in the
+     directory from which `find' was invoked, meaning that `{}' is
+     expanded to a relative path starting with the name of one of the
+     starting directories, rather than just the basename of the matched
+     file.
+
+     While some implementations of `find' replace the `{}' only where
+     it appears on its own in an argument, GNU `find' replaces `{}'
+     wherever it appears.
+
+\1f
+File: find.info,  Node: Multiple Files,  Next: Querying,  Prev: Single File,  Up: Run Commands
+
+3.3.2 Multiple Files
+--------------------
+
+Sometimes you need to process files one at a time.  But usually this is
+not necessary, and, it is faster to run a command on as many files as
+possible at a time, rather than once per file.  Doing this saves on the
+time it takes to start up the command each time.
+
+   The `-execdir' and `-exec' actions have variants that build command
+lines containing as many matched files as possible.
+
+ -- Action: -execdir command {} +
+     This works as for `-execdir command ;', except that the `{}' at
+     the end of the command is expanded to a list of names of matching
+     files.  This expansion is done in such a way as to avoid exceeding
+     the maximum command line length available on the system.  Only one
+     `{}' is allowed within the command, and it must appear at the end,
+     immediately before the `+'.  A `+' appearing in any position other
+     than immediately after `{}' is not considered to be special (that
+     is, it does not terminate the command).
+
+ -- Action: -exec command {} +
+     This insecure variant of the `-execdir' action is specified by
+     POSIX.  The main difference is that the command is executed in the
+     directory from which `find' was invoked, meaning that `{}' is
+     expanded to a relative path starting with the name of one of the
+     starting directories, rather than just the basename of the matched
+     file.
+
+   Before `find' exits, any partially-built command lines are executed.
+This happens even if the exit was caused by the `-quit' action.
+However, some types of error (for example not being able to invoke
+`stat()' on the current directory) can cause an immediate fatal exit.
+In this situation, any partially-built command lines will not be
+invoked (this prevents possible infinite loops).
+
+   At first sight, it looks like the list of filenames to be processed
+can only be at the end of the command line, and that this might be a
+problem for some commands (`cp' and `rsync' for example).
+
+   However, there is a slightly obscure but powerful workaround for this
+problem which takes advantage of the behaviour of `sh -c':-
+
+     find startpoint -tests ... -exec sh -c 'scp "$@" remote:/dest' sh {} +
+
+   In the example above, the filenames we want to work on need to occur
+on the `scp' command line before the name of the destination.  We use
+the shell to invoke the command `scp "$@" remote:/dest' and the shell
+expands `"$@"' to the list of filenames we want to process.
+
+   Another, but less secure, way to run a command on more than one file
+at once, is to use the `xargs' command, which is invoked like this:
+
+     xargs [OPTION...] [COMMAND [INITIAL-ARGUMENTS]]
+
+   `xargs' normally reads arguments from the standard input.  These
+arguments are delimited by blanks (which can be protected with double
+or single quotes or a backslash) or newlines.  It executes the COMMAND
+(default is `/bin/echo') one or more times with any INITIAL-ARGUMENTS
+followed by arguments read from standard input.  Blank lines on the
+standard input are ignored.  If the `-L' option is in use, trailing
+blanks indicate that `xargs' should consider the following line to be
+part of this one.
+
+   Instead of blank-delimited names, it is safer to use `find -print0'
+or `find -fprint0' and process the output by giving the `-0' or
+`--null' option to GNU `xargs', GNU `tar', GNU `cpio', or `perl'.  The
+`locate' command also has a `-0' or `--null' option which does the same
+thing.
+
+   You can use shell command substitution (backquotes) to process a list
+of arguments, like this:
+
+     grep -l sprintf `find $HOME -name '*.c' -print`
+
+   However, that method produces an error if the length of the `.c'
+file names exceeds the operating system's command line length limit.
+`xargs' avoids that problem by running the command as many times as
+necessary without exceeding the limit:
+
+     find $HOME -name '*.c' -print | xargs grep -l sprintf
+
+   However, if the command needs to have its standard input be a
+terminal (`less', for example), you have to use the shell command
+substitution method or use the `--arg-file' option of `xargs'.
+
+   The `xargs' command will process all its input, building command
+lines and executing them, unless one of the commands exits with a
+status of 255 (this will cause xargs to issue an error message and
+stop) or it reads a line contains the end of file string specified with
+the `--eof' option.
+
+* Menu:
+
+* Unsafe File Name Handling::
+* Safe File Name Handling::
+* Unusual Characters in File Names::
+* Limiting Command Size::
+* Controlling Parallelism::
+* Interspersing File Names::
+
+\1f
+File: find.info,  Node: Unsafe File Name Handling,  Next: Safe File Name Handling,  Up: Multiple Files
+
+3.3.2.1 Unsafe File Name Handling
+.................................
+
+Because file names can contain quotes, backslashes, blank characters,
+and even newlines, it is not safe to process them using `xargs' in its
+default mode of operation.  But since most files' names do not contain
+blanks, this problem occurs only infrequently.  If you are only
+searching through files that you know have safe names, then you need
+not be concerned about it.
+
+   Error messages issued by `find' and `locate' quote unusual
+characters in file names in order to prevent unwanted changes in the
+terminal's state.
+
+   In many applications, if `xargs' botches processing a file because
+its name contains special characters, some data might be lost.  The
+importance of this problem depends on the importance of the data and
+whether anyone notices the loss soon enough to correct it.  However,
+here is an extreme example of the problems that using blank-delimited
+names can cause.  If the following command is run daily from `cron',
+then any user can remove any file on the system:
+
+     find / -name '#*' -atime +7 -print | xargs rm
+
+   For example, you could do something like this:
+
+     eg$ echo > '#
+     vmunix'
+
+and then `cron' would delete `/vmunix', if it ran `xargs' with `/' as
+its current directory.
+
+   To delete other files, for example `/u/joeuser/.plan', you could do
+this:
+
+     eg$ mkdir '#
+     '
+     eg$ cd '#
+     '
+     eg$ mkdir u u/joeuser u/joeuser/.plan'
+     '
+     eg$ echo > u/joeuser/.plan'
+     /#foo'
+     eg$ cd ..
+     eg$ find . -name '#*' -print | xargs echo
+     ./# ./# /u/joeuser/.plan /#foo
+
+\1f
+File: find.info,  Node: Safe File Name Handling,  Next: Unusual Characters in File Names,  Prev: Unsafe File Name Handling,  Up: Multiple Files
+
+3.3.2.2 Safe File Name Handling
+...............................
+
+Here is how to make `find' output file names so that they can be used
+by other programs without being mangled or misinterpreted.  You can
+process file names generated this way by giving the `-0' or `--null'
+option to GNU `xargs', GNU `tar', GNU `cpio', or `perl'.
+
+ -- Action: -print0
+     True; print the entire file name on the standard output, followed
+     by a null character.
+
+ -- Action: -fprint0 file
+     True; like `-print0' but write to FILE like `-fprint' (*note Print
+     File Name::).  The output file is always created.
+
+   As of findutils version 4.2.4, the `locate' program also has a
+`--null' option which does the same thing.  For similarity with
+`xargs', the short form of the option `-0' can also be used.
+
+   If you want to be able to handle file names safely but need to run
+commands which want to be connected to a terminal on their input, you
+can use the `--arg-file' option to `xargs' like this:
+
+     find / -name xyzzy -print0 > list
+     xargs --null --arg-file=list munge
+
+   The example above runs the `munge' program on all the files named
+`xyzzy' that we can find, but `munge''s input will still be the
+terminal (or whatever the shell was using as standard input).  If your
+shell has the "process substitution" feature `<(...)', you can do this
+in just one step:
+
+     xargs --null --arg-file=<(find / -name xyzzy -print0) munge
+
+\1f
+File: find.info,  Node: Unusual Characters in File Names,  Next: Limiting Command Size,  Prev: Safe File Name Handling,  Up: Multiple Files
+
+3.3.2.3 Unusual Characters in File Names
+........................................
+
+As discussed above, you often need to be careful about how the names of
+files are handled by `find' and other programs.  If the output of
+`find' is not going to another program but instead is being shown on a
+terminal, this can still be a problem.  For example, some character
+sequences can reprogram the function keys on some terminals.  *Note
+Security Considerations::, for a discussion of other security problems
+relating to `find'.
+
+   Unusual characters are handled differently by various actions, as
+described below.
+
+`-print0'
+`-fprint0'
+     Always print the exact file name, unchanged, even if the output is
+     going to a terminal.
+
+`-ok'
+`-okdir'
+     Always print the exact file name, unchanged.  This will probably
+     change in a future release.
+
+`-ls'
+`-fls'
+     Unusual characters are always escaped.  White space, backslash, and
+     double quote characters are printed using C-style escaping (for
+     example `\f', `\"').  Other unusual characters are printed using
+     an octal escape.  Other printable characters (for `-ls' and `-fls'
+     these are the characters between octal 041 and 0176) are printed
+     as-is.
+
+`-printf'
+`-fprintf'
+     If the output is not going to a terminal, it is printed as-is.
+     Otherwise, the result depends on which directive is in use:
+
+    %D, %F, %H, %Y, %y
+          These expand to values which are not under control of files'
+          owners, and so are printed as-is.
+
+    %a, %b, %c, %d, %g, %G, %i, %k, %m, %M, %n, %s, %t, %u, %U
+          These have values which are under the control of files'
+          owners but which cannot be used to send arbitrary data to the
+          terminal, and so these are printed as-is.
+
+    %f, %h, %l, %p, %P
+          The output of these directives is quoted if the output is
+          going to a terminal.  The setting of the `LC_CTYPE'
+          environment variable is used to determine which characters
+          need to be quoted.
+
+          This quoting is performed in the same way as for GNU `ls'.
+          This is not the same quoting mechanism as the one used for
+          `-ls' and `fls'.  If you are able to decide what format to
+          use for the output of `find' then it is normally better to
+          use `\0' as a terminator than to use newline, as file names
+          can contain white space and newline characters.
+
+`-print'
+`-fprint'
+     Quoting is handled in the same way as for the `%p' directive of
+     `-printf' and `-fprintf'.  If you are using `find' in a script or
+     in a situation where the matched files might have arbitrary names,
+     you should consider using `-print0' instead of `-print'.
+
+   The `locate' program quotes and escapes unusual characters in file
+names in the same way as `find''s `-print' action.
+
+   The behaviours described above may change soon, as the treatment of
+unprintable characters is harmonised for `-ls', `-fls', `-print',
+`-fprint', `-printf' and `-fprintf'.
+
+\1f
+File: find.info,  Node: Limiting Command Size,  Next: Controlling Parallelism,  Prev: Unusual Characters in File Names,  Up: Multiple Files
+
+3.3.2.4 Limiting Command Size
+.............................
+
+`xargs' gives you control over how many arguments it passes to the
+command each time it executes it.  By default, it uses up to `ARG_MAX'
+- 2k, or 128k, whichever is smaller, characters per command.  It uses
+as many lines and arguments as fit within that limit.  The following
+options modify those values.
+
+`--no-run-if-empty'
+`-r'
+     If the standard input does not contain any nonblanks, do not run
+     the command.  By default, the command is run once even if there is
+     no input.  This option is a GNU extension.
+
+`--max-lines[=MAX-LINES]'
+`-L MAX-LINES'
+`-l[MAX-LINES]'
+     Use at most MAX-LINES nonblank input lines per command line;
+     MAX-LINES defaults to 1 if omitted; omitting the argument is not
+     allowed in the case of the `-L' option.  Trailing blanks cause an
+     input line to be logically continued on the next input line, for
+     the purpose of counting the lines.  Implies `-x'.  The preferred
+     name for this option is `-L' as this is specified by POSIX.
+
+`--max-args=MAX-ARGS'
+`-n MAX-ARGS'
+     Use at most MAX-ARGS arguments per command line.  Fewer than
+     MAX-ARGS arguments will be used if the size (see the `-s' option)
+     is exceeded, unless the `-x' option is given, in which case
+     `xargs' will exit.
+
+`--max-chars=MAX-CHARS'
+`-s MAX-CHARS'
+     Use at most MAX-CHARS characters per command line, including the
+     command initial arguments and the terminating nulls at the ends of
+     the argument strings.  If you specify a value for this option
+     which is too large or small, a warning message is printed and the
+     appropriate upper or lower limit is used instead.  You can use
+     `--show-limits' option to understand the command-line limits
+     applying to `xargs' and how this is affected by any other options.
+     The POSIX limits shown when you do this have already been adjusted
+     to take into account the size of your environment variables.
+
+     The largest allowed value is system-dependent, and is calculated as
+     the argument length limit for exec, less the size of your
+     environment, less 2048 bytes of headroom.  If this value is more
+     than 128KiB, 128Kib is used as the default value; otherwise, the
+     default value is the maximum.
+
+\1f
+File: find.info,  Node: Controlling Parallelism,  Next: Interspersing File Names,  Prev: Limiting Command Size,  Up: Multiple Files
+
+3.3.2.5 Controlling Parallelism
+...............................
+
+Normally, `xargs' runs one command at a time.  This is called "serial"
+execution; the commands happen in a series, one after another.  If
+you'd like `xargs' to do things in "parallel", you can ask it to do so,
+either when you invoke it, or later while it is running.  Running
+several commands at one time can make the entire operation go more
+quickly, if the commands are independent, and if your system has enough
+resources to handle the load.  When parallelism works in your
+application, `xargs' provides an easy way to get your work done faster.
+
+`--max-procs=MAX-PROCS'
+`-P MAX-PROCS'
+     Run up to MAX-PROCS processes at a time; the default is 1.  If
+     MAX-PROCS is 0, `xargs' will run as many processes as possible at
+     a time.  Use the `-n', `-s', or `-L' option with `-P'; otherwise
+     chances are that the command will be run only once.
+
+   For example, suppose you have a directory tree of large image files
+and a `makeallsizes' script that takes a single file name and creates
+various sized images from it (thumbnail-sized, web-page-sized,
+printer-sized, and the original large file).  The script is doing enough
+work that it takes significant time to run, even on a single image.
+You could run:
+
+     find originals -name '*.jpg' | xargs -1 makeallsizes
+
+   This will run `makeallsizes FILENAME' once for each `.jpg' file in
+the `originals' directory.  However, if your system has two central
+processors, this script will only keep one of them busy.  Instead, you
+could probably finish in about half the time by running:
+
+     find originals -name '*.jpg' | xargs -1 -P 2 makeallsizes
+
+   `xargs' will run the first two commands in parallel, and then
+whenever one of them terminates, it will start another one, until the
+entire job is done.
+
+   The same idea can be generalized to as many processors as you have
+handy.  It also generalizes to other resources besides processors.  For
+example, if xargs is running commands that are waiting for a response
+from a distant network connection, running a few in parallel may reduce
+the overall latency by overlapping their waiting time.
+
+   `xargs' also allows you to "turn up" or "turn down" its parallelism
+in the middle of a run.  Suppose you are keeping your four-processor
+system busy for hours, processing thousands of images using `-P 4'.
+Now, in the middle of the run, you or someone else wants you to reduce
+your load on the system, so that something else will run faster.  If
+you interrupt `xargs', your job will be half-done, and it may take
+significant manual work to resume it only for the remaining images.  If
+you suspend `xargs' using your shell's job controls (e.g. `control-Z'),
+then it will get no work done while suspended.
+
+   Find out the process ID of the `xargs' process, either from your
+shell or with the `ps' command.  After you send it the signal
+`SIGUSR2', `xargs' will run one fewer command in parallel.  If you send
+it the signal `SIGUSR1', it will run one more command in parallel.  For
+example:
+
+     shell$ xargs <allimages -1 -P 4 makeallsizes &
+     [4] 27643
+        ... at some later point ...
+     shell$ kill -USR2 27643
+     shell$ kill -USR2 %4
+
+   The first `kill' command will cause `xargs' to wait for two commands
+to terminate before starting the next command (reducing the parallelism
+from 4 to 3).  The second `kill' will reduce it from 3 to 2.  (`%4'
+works in some shells as a shorthand for the process ID of the
+background job labeled `[4]'.)
+
+   Similarly, if you started a long xargs job without parallelism, you
+can easily switch it to start running two commands in parallel by
+sending it a `SIGUSR1'.
+
+   `xargs' will never terminate any existing commands when you ask it
+to run fewer processes.  It merely waits for the excess commands to
+finish.  If you ask it to run more commands, it will start the next one
+immediately (if it has more work to do).
+
+   If you send several identical signals quickly, the operating system
+does not guarantee that each of them will be delivered to `xargs'.
+This means that you can't rapidly increase or decrease the parallelism
+by more than one command at a time.  You can avoid this problem by
+sending a signal, observing the result, then sending the next one; or
+merely by delaying for a few seconds between signals (unless your
+system is very heavily loaded).
+
+   Whether or not parallel execution will work well for you depends on
+the nature of the commmand you are running in parallel, on the
+configuration of the system on which you are running the command, and
+on the other work being done on the system at the time.
+
+\1f
+File: find.info,  Node: Interspersing File Names,  Prev: Controlling Parallelism,  Up: Multiple Files
+
+3.3.2.6 Interspersing File Names
+................................
+
+`xargs' can insert the name of the file it is processing between
+arguments you give for the command.  Unless you also give options to
+limit the command size (*note Limiting Command Size::), this mode of
+operation is equivalent to `find -exec' (*note Single File::).
+
+`--replace[=REPLACE-STR]'
+`-I REPLACE-STR'
+`-i REPLACE-STR'
+     Replace occurrences of REPLACE-STR in the initial arguments with
+     names read from the input.  Also, unquoted blanks do not terminate
+     arguments; instead, the input is split at newlines only.  For the
+     `-i' option, if REPLACE-STR is omitted for `--replace' or `-i', it
+     defaults to `{}' (like for `find -exec').  Implies `-x' and `-l
+     1'.  `-i' is deprecated in favour of `-I'. As an example, to sort
+     each file in the `bills' directory, leaving the output in that
+     file name with `.sorted' appended, you could do:
+
+          find bills -type f | xargs -I XX sort -o XX.sorted XX
+
+     The equivalent command using `find -execdir' is:
+
+          find bills -type f -execdir sort -o '{}.sorted' '{}' ';'
+
+   When you use the `-I' option, each line read from the input is
+buffered internally.  This means that there is an upper limit on the
+length of input line that xargs will accept when used with the `-I'
+option.  To work around this limitation, you can use the `-s' option to
+increase the amount of buffer space that xargs uses, and you can also
+use an extra invocation of xargs to ensure that very long lines do not
+occur.  For example:
+
+     somecommand | xargs -s 50000 echo | xargs -I '{}' -s 100000 rm '{}'
+
+   Here, the first invocation of `xargs' has no input line length limit
+because it doesn't use the `-I' option. The second invocation of
+`xargs' does have such a limit, but we have ensured that it never
+encounters a line which is longer than it can handle.
+
+   This is not an ideal solution.  Instead, the `-I' option should not
+impose a line length limit (apart from any limit imposed by the
+operating system) and so one might consider this limitation to be a
+bug.  A better solution would be to allow `xargs -I' to automatically
+move to a larger value for the `-s' option when this is needed.
+
+   This sort of problem doesn't occur with the output of `find' because
+it emits just one filename per line.
+
+\1f
+File: find.info,  Node: Querying,  Prev: Multiple Files,  Up: Run Commands
+
+3.3.3 Querying
+--------------
+
+To ask the user whether to execute a command on a single file, you can
+use the `find' primary `-okdir' instead of `-execdir', and the `find'
+primary `-ok' instead of `-exec':
+
+ -- Action: -okdir command ;
+     Like `-execdir' (*note Single File::), but ask the user first.  If
+     the user does not agree to run the command, just return false.
+     Otherwise, run it, with  standard input redirected from
+     `/dev/null'.
+
+     The response to the prompt is matched against a pair of regular
+     expressions to determine if it is a yes or no response.  These
+     regular expressions are obtained from the system(1) if the
+     POSIXLY_CORRECT environment variable is set and the system has
+     such patterns available.  Otherwise, `find''s message translations
+     are used.  In either case, the LC_MESSAGES environment variable
+     will determine the regular expressions used to determine if the
+     answer is affirmative or negative.  The interpretation of the
+     regular expressions themselves will be affected by the environment
+     variables LC_CTYPE (character classes) and LC_COLLATE (character
+     ranges and equivalence classes).
+
+ -- Action: -ok command ;
+     This insecure variant of the `-okdir' action is specified by
+     POSIX.  The main difference is that the command is executed in the
+     directory from which `find' was invoked, meaning that `{}' is
+     expanded to a relative path starting with the name of one of the
+     starting directories, rather than just the basename of the matched
+     file.  If the command is run, its standard input is redirected from
+     `/dev/null'.
+
+   When processing multiple files with a single command, to query the
+user you give `xargs' the following option.  When using this option,
+you might find it useful to control the number of files processed per
+invocation of the command (*note Limiting Command Size::).
+
+`--interactive'
+`-p'
+     Prompt the user about whether to run each command line and read a
+     line from the terminal.  Only run the command line if the response
+     starts with `y' or `Y'.  Implies `-t'.
+
+   ---------- Footnotes ----------
+
+   (1) `nl_langinfo' items YESEXPR and NOEXPR are used
+
+\1f
+File: find.info,  Node: Delete Files,  Next: Adding Tests,  Prev: Run Commands,  Up: Actions
+
+3.4 Delete Files
+================
+
+ -- Action: -delete
+     Delete files or directories; true if removal succeeded.  If the
+     removal failed, an error message is issued.
+
+     The use of the `-delete' action on the command line automatically
+     turns on the `-depth' option (*note find Expressions::).  This can
+     be surprising if you were previously just testing with `-print',
+     so it is usually best to remember to use `-depth' explicitly.
+
+     If `-delete' fails, `find''s exit status will be nonzero (when it
+     eventually exits).
+
+\1f
+File: find.info,  Node: Adding Tests,  Prev: Delete Files,  Up: Actions
+
+3.5 Adding Tests
+================
+
+You can test for file attributes that none of the `find' builtin tests
+check.  To do this, use `xargs' to run a program that filters a list of
+files printed by `find'.  If possible, use `find' builtin tests to pare
+down the list, so the program run by `xargs' has less work to do.  The
+tests builtin to `find' will likely run faster than tests that other
+programs perform.
+
+   For reasons of efficiency it is often useful to limit the number of
+times an external program has to be run.  For this reason, it is often
+a good idea to implement "extended" tests by using `xargs'.
+
+   For example, here is a way to print the names of all of the
+unstripped binaries in the `/usr/local' directory tree.  Builtin tests
+avoid running `file' on files that are not regular files or are not
+executable.
+
+     find /usr/local -type f -perm /a=x | xargs file |
+       grep 'not stripped' | cut -d: -f1
+
+The `cut' program removes everything after the file name from the
+output of `file'.
+
+   However, using `xargs' can present important security problems
+(*note Security Considerations::).  These can be avoided by using
+`-execdir'.  The `-execdir' action is also a useful way of putting your
+own test in the middle of a set of other tests or actions for `find'
+(for example, you might want to use `-prune').
+
+   To place a special test somewhere in the middle of a `find'
+expression, you can use `-execdir' (or, less securely, `-exec') to run
+a program that performs the test.  Because `-execdir' evaluates to the
+exit status of the executed program, you can use a program (which can
+be a shell script) that tests for a special attribute and make it exit
+with a true (zero) or false (non-zero) status.  It is a good idea to
+place such a special test _after_ the builtin tests, because it starts
+a new process which could be avoided if a builtin test evaluates to
+false.
+
+   Here is a shell script called `unstripped' that checks whether its
+argument is an unstripped binary file:
+
+     #! /bin/sh
+     file "$1" | grep -q "not stripped"
+
+   This script relies on the shell exiting with the status of the last
+command in the pipeline, in this case `grep'.  The `grep' command exits
+with a true status if it found any matches, false if not.  Here is an
+example of using the script (assuming it is in your search path).  It
+lists the stripped executables (and shell scripts) in the file `sbins'
+and the unstripped ones in `ubins'.
+
+     find /usr/local -type f -perm /a=x \
+       \( -execdir unstripped '{}' \; -fprint ubins -o -fprint sbins \)
+
+\1f
+File: find.info,  Node: Databases,  Next: File Permissions,  Prev: Actions,  Up: Top
+
+4 File Name Databases
+*********************
+
+The file name databases used by `locate' contain lists of files that
+were in particular directory trees when the databases were last
+updated.  The file name of the default database is determined when
+`locate' and `updatedb' are configured and installed.  The frequency
+with which the databases are updated and the directories for which they
+contain entries depend on how often `updatedb' is run, and with which
+arguments.
+
+   You can obtain some statistics about the databases by using `locate
+--statistics'.
+
+* Menu:
+
+* Database Locations::
+* Database Formats::
+* Newline Handling::
+
+\1f
+File: find.info,  Node: Database Locations,  Next: Database Formats,  Up: Databases
+
+4.1 Database Locations
+======================
+
+There can be multiple file name databases.  Users can select which
+databases `locate' searches using the `LOCATE_PATH' environment
+variable or a command line option.  The system administrator can choose
+the file name of the default database, the frequency with which the
+databases are updated, and the directories for which they contain
+entries.  File name databases are updated by running the `updatedb'
+program, typically nightly.
+
+   In networked environments, it often makes sense to build a database
+at the root of each filesystem, containing the entries for that
+filesystem.  `updatedb' is then run for each filesystem on the
+fileserver where that filesystem is on a local disk, to prevent
+thrashing the network.
+
+   *Note Invoking updatedb::, for the description of the options to
+`updatedb'.  These options can be used to specify which directories are
+indexed by each database file.
+
+   The default location for the locate database depends on how findutils
+is built, but the findutils installation accompanying this manual uses
+the default location `/usr/local/var/locatedb'.
+
+   If no database exists at `/usr/local/var/locatedb' but the user did
+not specify where to look (by using `-d' or setting `LOCATE_PATH'),
+then `locate' will also check for a "secure" database in
+`/var/lib/slocate/slocate.db'.
+
+\1f
+File: find.info,  Node: Database Formats,  Next: Newline Handling,  Prev: Database Locations,  Up: Databases
+
+4.2 Database Formats
+====================
+
+The file name databases contain lists of files that were in particular
+directory trees when the databases were last updated.  The file name
+database format changed starting with GNU `locate' version 4.0 to allow
+machines with different byte orderings to share the databases.
+
+   GNU `locate' can read both the old and new database formats.
+However, old versions of `locate' (on other Unix systems, or GNU
+`locate' before version 4.0) produce incorrect results if run against a
+database in something other than the old format.
+
+   Support for the old database format will eventually be discontinued,
+first in `updatedb' and later in `locate'.
+
+   If you run `locate --statistics', the resulting summary indicates
+the type of each `locate' database.   You select which database format
+`updatedb' will use with the `--dbformat' option.
+
+* Menu:
+
+* LOCATE02 Database Format::
+* Sample LOCATE02 Database::
+* slocate Database Format::
+* Old Database Format::
+
+\1f
+File: find.info,  Node: LOCATE02 Database Format,  Next: Sample LOCATE02 Database,  Up: Database Formats
+
+4.2.1 LOCATE02 Database Format
+------------------------------
+
+`updatedb' runs a program called `frcode' to "front-compress" the list
+of file names, which reduces the database size by a factor of 4 to 5.
+Front-compression (also known as incremental encoding) works as follows.
+
+   The database entries are a sorted list (case-insensitively, for
+users' convenience).  Since the list is sorted, each entry is likely to
+share a prefix (initial string) with the previous entry.  Each database
+entry begins with an offset-differential count byte, which is the
+additional number of characters of prefix of the preceding entry to use
+beyond the number that the preceding entry is using of its predecessor.
+(The counts can be negative.)  Following the count is a null-terminated
+ASCII remainder--the part of the name that follows the shared prefix.
+
+   If the offset-differential count is larger than can be stored in a
+byte (+/-127), the byte has the value 0x80 and the count follows in a
+2-byte word, with the high byte first (network byte order).
+
+   Every database begins with a dummy entry for a file called
+`LOCATE02', which `locate' checks for to ensure that the database file
+has the correct format; it ignores the entry in doing the search.
+
+   Databases cannot be concatenated together, even if the first (dummy)
+entry is trimmed from all but the first database.  This is because the
+offset-differential count in the first entry of the second and
+following databases will be wrong.
+
+   In the output of `locate --statistics', the new database format is
+referred to as `LOCATE02'.
+
+\1f
+File: find.info,  Node: Sample LOCATE02 Database,  Next: slocate Database Format,  Prev: LOCATE02 Database Format,  Up: Database Formats
+
+4.2.2 Sample LOCATE02 Database
+------------------------------
+
+Sample input to `frcode':
+
+     /usr/src
+     /usr/src/cmd/aardvark.c
+     /usr/src/cmd/armadillo.c
+     /usr/tmp/zoo
+
+   Length of the longest prefix of the preceding entry to share:
+
+     0 /usr/src
+     8 /cmd/aardvark.c
+     14 rmadillo.c
+     5 tmp/zoo
+
+   Output from `frcode', with trailing nulls changed to newlines and
+count bytes made printable:
+
+     0 LOCATE02
+     0 /usr/src
+     8 /cmd/aardvark.c
+     6 rmadillo.c
+     -9 tmp/zoo
+
+   (6 = 14 - 8, and -9 = 5 - 14)
+
+\1f
+File: find.info,  Node: slocate Database Format,  Next: Old Database Format,  Prev: Sample LOCATE02 Database,  Up: Database Formats
+
+4.2.3 slocate Database Format
+-----------------------------
+
+The `slocate' program uses a database format similar to, but not quite
+the same as, GNU `locate'.  The first byte of the database specifies
+its "security level".  If the security level is 0, `slocate' will read,
+match and print filenames on the basis of the information in the
+database only.  However, if the security level byte is 1, `slocate'
+omits entries from its output if the invoking user is unable to access
+them.  The second byte of the database is zero.  The second byte is
+immediately followed by the first database entry.  The first entry in
+the database is not preceded by any differential count or dummy entry.
+Instead the differential count for the first item is assumed to be zero.
+.P Starting with the second entry (if any) in the database, data is
+interpreted as for the GNU LOCATE02 format.
+
+\1f
+File: find.info,  Node: Old Database Format,  Prev: slocate Database Format,  Up: Database Formats
+
+4.2.4 Old Database Format
+-------------------------
+
+The old database format is used by Unix `locate' and `find' programs
+and earlier releases of the GNU ones.  `updatedb' produces this format
+if given the `--old-format' option.
+
+   `updatedb' runs programs called `bigram' and `code' to produce
+old-format databases.  The old format differs from the new one in the
+following ways.  Instead of each entry starting with an
+offset-differential count byte and ending with a null, byte values from
+0 through 28 indicate offset-differential counts from -14 through 14.
+The byte value indicating that a long offset-differential count follows
+is 0x1e (30), not 0x80.  The long counts are stored in host byte order,
+which is not necessarily network byte order, and host integer word
+size, which is usually 4 bytes.  They also represent a count 14 less
+than their value.  The database lines have no termination byte; the
+start of the next line is indicated by its first byte having a value <=
+30.
+
+   In addition, instead of starting with a dummy entry, the old database
+format starts with a 256 byte table containing the 128 most common
+bigrams in the file list.  A bigram is a pair of adjacent bytes.  Bytes
+in the database that have the high bit set are indexes (with the high
+bit cleared) into the bigram table.  The bigram and offset-differential
+count coding makes these databases 20-25% smaller than the new format,
+but makes them not 8-bit clean.  Any byte in a file name that is in the
+ranges used for the special codes is replaced in the database by a
+question mark, which not coincidentally is the shell wildcard to match
+a single character.
+
+   The old format therefore cannot faithfully store entries with
+non-ASCII characters. It therefore should not be used in
+internationalised environments.  That is, most installations should not
+use it.
+
+   Because the long counts are stored by the `code' program as
+native-order machine words, the database format is not easily used in
+environments which differ in terms of byte order.  If locate databases
+are to be shared between machines, the LOCATE02 database format should
+be used.  This has other benefits as discussed above.  However, the
+length of the filename currently being processed can normally be used
+to place reasonable limits on the long counts and so this information
+is used by locate to help it guess the byte ordering of the old format
+database.  Unless it finds evidence to the contrary, `locate' will
+assume that the byte order of the database is the same as the native
+byte order of the machine running `locate'.  The output of `locate
+--statistics' also includes information about the byte order of
+old-format databases.
+
+   The output of `locate --statistics' will give an incorrect count of
+the number of file names containing newlines or high-bit characters for
+old-format databases.
+
+   Old versions of GNU `locate' fail to correctly handle very long file
+names, possibly leading to security problems relating to a heap buffer
+overrun.  *Note Security Considerations for locate::, for a detailed
+explanation.
+
+\1f
+File: find.info,  Node: Newline Handling,  Prev: Database Formats,  Up: Databases
+
+4.3 Newline Handling
+====================
+
+Within the database, file names are terminated with a null character.
+This is the case for both the old and the new format.
+
+   When the new database format is being used, the compression technique
+used to generate the database though relies on the ability to sort the
+list of files before they are presented to `frcode'.
+
+   If the system's sort command allows its input list of files to be
+separated with null characters via the `-z' option, this option is used
+and therefore `updatedb' and `locate' will both correctly handle file
+names containing newlines.  If the `sort' command lacks support for
+this, the list of files is delimited with the newline character,
+meaning that parts of file names containing newlines will be
+incorrectly sorted.  This can result in both incorrect matches and
+incorrect failures to match.
+
+   On the other hand, if you are using the old database format, file
+names with embedded newlines are not correctly handled.  There is no
+technical limitation which enforces this, it's just that the `bigram'
+program has not been updated to support lists of file names separated
+by nulls.
+
+   So, if you are using the new database format (this is the default)
+and your system uses GNU `sort', newlines will be correctly handled at
+all times.  Otherwise, newlines may not be correctly handled.
+
+\1f
+File: find.info,  Node: File Permissions,  Next: Date input formats,  Prev: Databases,  Up: Top
+
+5 File Permissions
+******************
+
+Each file has a set of "permissions" that control the kinds of access
+that users have to that file.  The permissions for a file are also
+called its "access mode".  They can be represented either in symbolic
+form or as an octal number.
+
+* Menu:
+
+* Mode Structure::              Structure of file permissions.
+* Symbolic Modes::              Mnemonic permissions representation.
+* Numeric Modes::               Permissions as octal numbers.
+
+\1f
+File: find.info,  Node: Mode Structure,  Next: Symbolic Modes,  Up: File Permissions
+
+5.1 Structure of File Permissions
+=================================
+
+There are three kinds of permissions that a user can have for a file:
+
+  1. permission to read the file.  For directories, this means
+     permission to list the contents of the directory.
+
+  2. permission to write to (change) the file.  For directories, this
+     means permission to create and remove files in the directory.
+
+  3. permission to execute the file (run it as a program).  For
+     directories, this means permission to access files in the
+     directory.
+
+   There are three categories of users who may have different
+permissions to perform any of the above operations on a file:
+
+  1. the file's owner;
+
+  2. other users who are in the file's group;
+
+  3. everyone else.
+
+   Files are given an owner and group when they are created.  Usually
+the owner is the current user and the group is the group of the
+directory the file is in, but this varies with the operating system, the
+file system the file is created on, and the way the file is created.
+You can change the owner and group of a file by using the `chown' and
+`chgrp' commands.
+
+   In addition to the three sets of three permissions listed above, a
+file's permissions have three special components, which affect only
+executable files (programs) and, on some systems, directories:
+
+  1. Set the process's effective user ID to that of the file upon
+     execution (called the "setuid bit").  No effect on directories.
+
+  2. Set the process's effective group ID to that of the file upon
+     execution (called the "setgid bit").  For directories on some
+     systems, put files created in the directory into the same group as
+     the directory, no matter what group the user who creates them is
+     in.
+
+  3. prevent users from removing or renaming a file in a directory
+     unless they own the file or the directory; this is called the
+     "restricted deletion flag" for the directory.  For regular files
+     on some systems, save the program's text image on the swap device
+     so it will load more quickly when run; this is called the "sticky
+     bit".
+
+   In addition to the permissions listed above, there may be file
+attributes specific to the file system, e.g: access control lists
+(ACLs), whether a file is compressed, whether a file can be modified
+(immutability), whether a file can be dumped.  These are usually set
+using programs specific to the file system.  For example:
+
+ext2
+     On GNU and GNU/Linux the file permissions ("attributes") specific
+     to the ext2 file system are set using `chattr'.
+
+FFS
+     On FreeBSD the file permissions ("flags") specific to the FFS file
+     system are set using `chrflags'.
+
+   Although a file's permission "bits" allow an operation on that file,
+that operation may still fail, because:
+
+   * the file-system-specific permissions do not permit it;
+
+   * the file system is mounted as read-only.
+
+   For example, if the immutable attribute is set on a file, it cannot
+be modified, regardless of the fact that you may have just run `chmod
+a+w FILE'.
+
+\1f
+File: find.info,  Node: Symbolic Modes,  Next: Numeric Modes,  Prev: Mode Structure,  Up: File Permissions
+
+5.2 Symbolic Modes
+==================
+
+"Symbolic modes" represent changes to files' permissions as operations
+on single-character symbols.  They allow you to modify either all or
+selected parts of files' permissions, optionally based on their
+previous values, and perhaps on the current `umask' as well (*note
+Umask and Protection::).
+
+   The format of symbolic modes is:
+
+     [ugoa...][+-=]PERMS...[,...]
+
+where PERMS is either zero or more letters from the set `rwxXst', or a
+single letter from the set `ugo'.
+
+   The following sections describe the operators and other details of
+symbolic modes.
+
+* Menu:
+
+* Setting Permissions::          Basic operations on permissions.
+* Copying Permissions::          Copying existing permissions.
+* Changing Special Permissions:: Special permissions.
+* Conditional Executability::    Conditionally affecting executability.
+* Multiple Changes::             Making multiple changes.
+* Umask and Protection::              The effect of the umask.
+
+\1f
+File: find.info,  Node: Setting Permissions,  Next: Copying Permissions,  Up: Symbolic Modes
+
+5.2.1 Setting Permissions
+-------------------------
+
+The basic symbolic operations on a file's permissions are adding,
+removing, and setting the permission that certain users have to read,
+write, and execute the file.  These operations have the following
+format:
+
+     USERS OPERATION PERMISSIONS
+
+The spaces between the three parts above are shown for readability only;
+symbolic modes cannot contain spaces.
+
+   The USERS part tells which users' access to the file is changed.  It
+consists of one or more of the following letters (or it can be empty;
+*note Umask and Protection::, for a description of what happens then).
+When more than one of these letters is given, the order that they are
+in does not matter.
+
+`u'
+     the user who owns the file;
+
+`g'
+     other users who are in the file's group;
+
+`o'
+     all other users;
+
+`a'
+     all users; the same as `ugo'.
+
+   The OPERATION part tells how to change the affected users' access to
+the file, and is one of the following symbols:
+
+`+'
+     to add the PERMISSIONS to whatever permissions the USERS already
+     have for the file;
+
+`-'
+     to remove the PERMISSIONS from whatever permissions the USERS
+     already have for the file;
+
+`='
+     to make the PERMISSIONS the only permissions that the USERS have
+     for the file.
+
+   The PERMISSIONS part tells what kind of access to the file should be
+changed; it is normally zero or more of the following letters.  As with
+the USERS part, the order does not matter when more than one letter is
+given.  Omitting the PERMISSIONS part is useful only with the `='
+operation, where it gives the specified USERS no access at all to the
+file.
+
+`r'
+     the permission the USERS have to read the file;
+
+`w'
+     the permission the USERS have to write to the file;
+
+`x'
+     the permission the USERS have to execute the file.
+
+   For example, to give everyone permission to read and write a file,
+but not to execute it, use:
+
+     a=rw
+
+   To remove write permission for all users other than the file's
+owner, use:
+
+     go-w
+
+The above command does not affect the access that the owner of the file
+has to it, nor does it affect whether other users can read or execute
+the file.
+
+   To give everyone except a file's owner no permission to do anything
+with that file, use the mode below.  Other users could still remove the
+file, if they have write permission on the directory it is in.
+
+     go=
+
+Another way to specify the same thing is:
+
+     og-rwx
+
+\1f
+File: find.info,  Node: Copying Permissions,  Next: Changing Special Permissions,  Prev: Setting Permissions,  Up: Symbolic Modes
+
+5.2.2 Copying Existing Permissions
+----------------------------------
+
+You can base a file's permissions on its existing permissions.  To do
+this, instead of using a series of `r', `w', or `x' letters after the
+operator, you use the letter `u', `g', or `o'.  For example, the mode
+
+     o+g
+
+adds the permissions for users who are in a file's group to the
+permissions that other users have for the file.  Thus, if the file
+started out as mode 664 (`rw-rw-r--'), the above mode would change it
+to mode 666 (`rw-rw-rw-').  If the file had started out as mode 741
+(`rwxr----x'), the above mode would change it to mode 745
+(`rwxr--r-x').  The `-' and `=' operations work analogously.
+
+\1f
+File: find.info,  Node: Changing Special Permissions,  Next: Conditional Executability,  Prev: Copying Permissions,  Up: Symbolic Modes
+
+5.2.3 Changing Special Permissions
+----------------------------------
+
+In addition to changing a file's read, write, and execute permissions,
+you can change its special permissions.  *Note Mode Structure::, for a
+summary of these permissions.
+
+   To change a file's permission to set the user ID on execution, use
+`u' in the USERS part of the symbolic mode and `s' in the PERMISSIONS
+part.
+
+   To change a file's permission to set the group ID on execution, use
+`g' in the USERS part of the symbolic mode and `s' in the PERMISSIONS
+part.
+
+   To change a file's permission to set the restricted deletion flag or
+sticky bit, omit the USERS part of the symbolic mode (or use `a') and
+put `t' in the PERMISSIONS part.
+
+   For example, to add set-user-ID permission to a program, you can use
+the mode:
+
+     u+s
+
+   To remove both set-user-ID and set-group-ID permission from it, you
+can use the mode:
+
+     ug-s
+
+   To set the restricted deletion flag or sticky bit, you can use the
+mode:
+
+     +t
+
+   The combination `o+s' has no effect.  On GNU systems the
+combinations `u+t' and `g+t' have no effect, and `o+t' acts like plain
+`+t'.
+
+   The `=' operator is not very useful with special permissions; for
+example, the mode:
+
+     o=t
+
+does set the restricted deletion flag or sticky bit, but it also
+removes all read, write, and execute permissions that users not in the
+file's group might have had for it.
+
+\1f
+File: find.info,  Node: Conditional Executability,  Next: Multiple Changes,  Prev: Changing Special Permissions,  Up: Symbolic Modes
+
+5.2.4 Conditional Executability
+-------------------------------
+
+There is one more special type of symbolic permission: if you use `X'
+instead of `x', execute permission is affected only if the file is a
+directory or already had execute permission.
+
+   For example, this mode:
+
+     a+X
+
+gives all users permission to search directories, or to execute files if
+anyone could execute them before.
+
+\1f
+File: find.info,  Node: Multiple Changes,  Next: Umask and Protection,  Prev: Conditional Executability,  Up: Symbolic Modes
+
+5.2.5 Making Multiple Changes
+-----------------------------
+
+The format of symbolic modes is actually more complex than described
+above (*note Setting Permissions::).  It provides two ways to make
+multiple changes to files' permissions.
+
+   The first way is to specify multiple OPERATION and PERMISSIONS parts
+after a USERS part in the symbolic mode.
+
+   For example, the mode:
+
+     og+rX-w
+
+gives users other than the owner of the file read permission and, if it
+is a directory or if someone already had execute permission to it,
+gives them execute permission; and it also denies them write permission
+to the file.  It does not affect the permission that the owner of the
+file has for it.  The above mode is equivalent to the two modes:
+
+     og+rX
+     og-w
+
+   The second way to make multiple changes is to specify more than one
+simple symbolic mode, separated by commas.  For example, the mode:
+
+     a+r,go-w
+
+gives everyone permission to read the file and removes write permission
+on it for all users except its owner.  Another example:
+
+     u=rwx,g=rx,o=
+
+sets all of the non-special permissions for the file explicitly.  (It
+gives users who are not in the file's group no permission at all for
+it.)
+
+   The two methods can be combined.  The mode:
+
+     a+r,g+x-w
+
+gives all users permission to read the file, and gives users who are in
+the file's group permission to execute it, as well, but not permission
+to write to it.  The above mode could be written in several different
+ways; another is:
+
+     u+r,g+rx,o+r,g-w
+
+\1f
+File: find.info,  Node: Umask and Protection,  Prev: Multiple Changes,  Up: Symbolic Modes
+
+5.2.6 The Umask and Protection
+------------------------------
+
+If the USERS part of a symbolic mode is omitted, it defaults to `a'
+(affect all users), except that any permissions that are _set_ in the
+system variable `umask' are _not affected_.  The value of `umask' can
+be set using the `umask' command.  Its default value varies from system
+to system.
+
+   Omitting the USERS part of a symbolic mode is generally not useful
+with operations other than `+'.  It is useful with `+' because it
+allows you to use `umask' as an easily customizable protection against
+giving away more permission to files than you intended to.
+
+   As an example, if `umask' has the value 2, which removes write
+permission for users who are not in the file's group, then the mode:
+
+     +w
+
+adds permission to write to the file to its owner and to other users who
+are in the file's group, but _not_ to other users.  In contrast, the
+mode:
+
+     a+w
+
+ignores `umask', and _does_ give write permission for the file to all
+users.
+
+\1f
+File: find.info,  Node: Numeric Modes,  Prev: Symbolic Modes,  Up: File Permissions
+
+5.3 Numeric Modes
+=================
+
+As an alternative to giving a symbolic mode, you can give an octal
+(base 8) number that represents the new mode.  This number is always
+interpreted in octal; you do not have to add a leading 0, as you do in
+C.  Mode 0055 is the same as mode 55.
+
+   A numeric mode is usually shorter than the corresponding symbolic
+mode, but it is limited in that it cannot take into account a file's
+previous permissions; it can only set them absolutely.
+
+   The permissions granted to the user, to other users in the file's
+group, and to other users not in the file's group each require three
+bits, which are represented as one octal digit.  The three special
+permissions also require one bit each, and they are as a group
+represented as another octal digit.  Here is how the bits are arranged,
+starting with the lowest valued bit:
+
+     Value in  Corresponding
+     Mode      Permission
+
+               Other users not in the file's group:
+        1      Execute
+        2      Write
+        4      Read
+
+               Other users in the file's group:
+       10      Execute
+       20      Write
+       40      Read
+
+               The file's owner:
+      100      Execute
+      200      Write
+      400      Read
+
+               Special permissions:
+     1000      Restricted deletion flag or sticky bit
+     2000      Set group ID on execution
+     4000      Set user ID on execution
+
+   For example, numeric mode 4755 corresponds to symbolic mode
+`u=rwxs,go=rx', and numeric mode 664 corresponds to symbolic mode
+`ug=rw,o=r'.  Numeric mode 0 corresponds to symbolic mode `a='.
+
+\1f
+File: find.info,  Node: Date input formats,  Next: Reference,  Prev: File Permissions,  Up: Top
+
+6 Date input formats
+********************
+
+First, a quote:
+
+     Our units of temporal measurement, from seconds on up to months,
+     are so complicated, asymmetrical and disjunctive so as to make
+     coherent mental reckoning in time all but impossible.  Indeed, had
+     some tyrannical god contrived to enslave our minds to time, to
+     make it all but impossible for us to escape subjection to sodden
+     routines and unpleasant surprises, he could hardly have done
+     better than handing down our present system.  It is like a set of
+     trapezoidal building blocks, with no vertical or horizontal
+     surfaces, like a language in which the simplest thought demands
+     ornate constructions, useless particles and lengthy
+     circumlocutions.  Unlike the more successful patterns of language
+     and science, which enable us to face experience boldly or at least
+     level-headedly, our system of temporal calculation silently and
+     persistently encourages our terror of time.
+
+     ...  It is as though architects had to measure length in feet,
+     width in meters and height in ells; as though basic instruction
+     manuals demanded a knowledge of five different languages.  It is
+     no wonder then that we often look into our own immediate past or
+     future, last Tuesday or a week from Sunday, with feelings of
+     helpless confusion.  ...
+
+     -- Robert Grudin, `Time and the Art of Living'.
+
+   This section describes the textual date representations that GNU
+programs accept.  These are the strings you, as a user, can supply as
+arguments to the various programs.  The C interface (via the
+`parse_datetime' function) is not described here.
+
+* Menu:
+
+* General date syntax::            Common rules.
+* Calendar date items::            19 Dec 1994.
+* Time of day items::              9:20pm.
+* Time zone items::                EST, PDT, GMT.
+* Day of week items::              Monday and others.
+* Relative items in date strings:: next tuesday, 2 years ago.
+* Pure numbers in date strings::   19931219, 1440.
+* Seconds since the Epoch::        @1078100502.
+* Specifying time zone rules::     TZ="America/New_York", TZ="UTC0".
+* Authors of parse_datetime::      Bellovin, Eggert, Salz, Berets, et al.
+
+\1f
+File: find.info,  Node: General date syntax,  Next: Calendar date items,  Up: Date input formats
+
+6.1 General date syntax
+=======================
+
+A "date" is a string, possibly empty, containing many items separated
+by whitespace.  The whitespace may be omitted when no ambiguity arises.
+The empty string means the beginning of today (i.e., midnight).  Order
+of the items is immaterial.  A date string may contain many flavors of
+items:
+
+   * calendar date items
+
+   * time of day items
+
+   * time zone items
+
+   * day of the week items
+
+   * relative items
+
+   * pure numbers.
+
+We describe each of these item types in turn, below.
+
+   A few ordinal numbers may be written out in words in some contexts.
+This is most useful for specifying day of the week items or relative
+items (see below).  Among the most commonly used ordinal numbers, the
+word `last' stands for -1, `this' stands for 0, and `first' and `next'
+both stand for 1.  Because the word `second' stands for the unit of
+time there is no way to write the ordinal number 2, but for convenience
+`third' stands for 3, `fourth' for 4, `fifth' for 5, `sixth' for 6,
+`seventh' for 7, `eighth' for 8, `ninth' for 9, `tenth' for 10,
+`eleventh' for 11 and `twelfth' for 12.
+
+   When a month is written this way, it is still considered to be
+written numerically, instead of being "spelled in full"; this changes
+the allowed strings.
+
+   In the current implementation, only English is supported for words
+and abbreviations like `AM', `DST', `EST', `first', `January',
+`Sunday', `tomorrow', and `year'.
+
+   The output of the `date' command is not always acceptable as a date
+string, not only because of the language problem, but also because
+there is no standard meaning for time zone items like `IST'.  When using
+`date' to generate a date string intended to be parsed later, specify a
+date format that is independent of language and that does not use time
+zone items other than `UTC' and `Z'.  Here are some ways to do this:
+
+     $ LC_ALL=C TZ=UTC0 date
+     Mon Mar  1 00:21:42 UTC 2004
+     $ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ'
+     2004-03-01 00:21:42Z
+     $ date --iso-8601=ns | tr T ' '  # --iso-8601 is a GNU extension.
+     2004-02-29 16:21:42,692722128-0800
+     $ date --rfc-2822  # a GNU extension
+     Sun, 29 Feb 2004 16:21:42 -0800
+     $ date +'%Y-%m-%d %H:%M:%S %z'  # %z is a GNU extension.
+     2004-02-29 16:21:42 -0800
+     $ date +'@%s.%N'  # %s and %N are GNU extensions.
+     @1078100502.692722128
+
+   Alphabetic case is completely ignored in dates.  Comments may be
+introduced between round parentheses, as long as included parentheses
+are properly nested.  Hyphens not followed by a digit are currently
+ignored.  Leading zeros on numbers are ignored.
+
+   Invalid dates like `2005-02-29' or times like `24:00' are rejected.
+In the typical case of a host that does not support leap seconds, a
+time like `23:59:60' is rejected even if it corresponds to a valid leap
+second.
+
+\1f
+File: find.info,  Node: Calendar date items,  Next: Time of day items,  Prev: General date syntax,  Up: Date input formats
+
+6.2 Calendar date items
+=======================
+
+A "calendar date item" specifies a day of the year.  It is specified
+differently, depending on whether the month is specified numerically or
+literally.  All these strings specify the same calendar date:
+
+     1972-09-24     # ISO 8601.
+     72-9-24        # Assume 19xx for 69 through 99,
+                    # 20xx for 00 through 68.
+     72-09-24       # Leading zeros are ignored.
+     9/24/72        # Common U.S. writing.
+     24 September 1972
+     24 Sept 72     # September has a special abbreviation.
+     24 Sep 72      # Three-letter abbreviations always allowed.
+     Sep 24, 1972
+     24-sep-72
+     24sep72
+
+   The year can also be omitted.  In this case, the last specified year
+is used, or the current year if none.  For example:
+
+     9/24
+     sep 24
+
+   Here are the rules.
+
+   For numeric months, the ISO 8601 format `YEAR-MONTH-DAY' is allowed,
+where YEAR is any positive number, MONTH is a number between 01 and 12,
+and DAY is a number between 01 and 31.  A leading zero must be present
+if a number is less than ten.  If YEAR is 68 or smaller, then 2000 is
+added to it; otherwise, if YEAR is less than 100, then 1900 is added to
+it.  The construct `MONTH/DAY/YEAR', popular in the United States, is
+accepted.  Also `MONTH/DAY', omitting the year.
+
+   Literal months may be spelled out in full: `January', `February',
+`March', `April', `May', `June', `July', `August', `September',
+`October', `November' or `December'.  Literal months may be abbreviated
+to their first three letters, possibly followed by an abbreviating dot.
+It is also permitted to write `Sept' instead of `September'.
+
+   When months are written literally, the calendar date may be given as
+any of the following:
+
+     DAY MONTH YEAR
+     DAY MONTH
+     MONTH DAY YEAR
+     DAY-MONTH-YEAR
+
+   Or, omitting the year:
+
+     MONTH DAY
+
+\1f
+File: find.info,  Node: Time of day items,  Next: Time zone items,  Prev: Calendar date items,  Up: Date input formats
+
+6.3 Time of day items
+=====================
+
+A "time of day item" in date strings specifies the time on a given day.
+Here are some examples, all of which represent the same time:
+
+     20:02:00.000000
+     20:02
+     8:02pm
+     20:02-0500      # In EST (U.S. Eastern Standard Time).
+
+   More generally, the time of day may be given as
+`HOUR:MINUTE:SECOND', where HOUR is a number between 0 and 23, MINUTE
+is a number between 0 and 59, and SECOND is a number between 0 and 59
+possibly followed by `.' or `,' and a fraction containing one or more
+digits.  Alternatively, `:SECOND' can be omitted, in which case it is
+taken to be zero.  On the rare hosts that support leap seconds, SECOND
+may be 60.
+
+   If the time is followed by `am' or `pm' (or `a.m.' or `p.m.'), HOUR
+is restricted to run from 1 to 12, and `:MINUTE' may be omitted (taken
+to be zero).  `am' indicates the first half of the day, `pm' indicates
+the second half of the day.  In this notation, 12 is the predecessor of
+1: midnight is `12am' while noon is `12pm'.  (This is the zero-oriented
+interpretation of `12am' and `12pm', as opposed to the old tradition
+derived from Latin which uses `12m' for noon and `12pm' for midnight.)
+
+   The time may alternatively be followed by a time zone correction,
+expressed as `SHHMM', where S is `+' or `-', HH is a number of zone
+hours and MM is a number of zone minutes.  The zone minutes term, MM,
+may be omitted, in which case the one- or two-digit correction is
+interpreted as a number of hours.  You can also separate HH from MM
+with a colon.  When a time zone correction is given this way, it forces
+interpretation of the time relative to Coordinated Universal Time
+(UTC), overriding any previous specification for the time zone or the
+local time zone.  For example, `+0530' and `+05:30' both stand for the
+time zone 5.5 hours ahead of UTC (e.g., India).  This is the best way to
+specify a time zone correction by fractional parts of an hour.  The
+maximum zone correction is 24 hours.
+
+   Either `am'/`pm' or a time zone correction may be specified, but not
+both.
+
+\1f
+File: find.info,  Node: Time zone items,  Next: Day of week items,  Prev: Time of day items,  Up: Date input formats
+
+6.4 Time zone items
+===================
+
+A "time zone item" specifies an international time zone, indicated by a
+small set of letters, e.g., `UTC' or `Z' for Coordinated Universal
+Time.  Any included periods are ignored.  By following a
+non-daylight-saving time zone by the string `DST' in a separate word
+(that is, separated by some white space), the corresponding daylight
+saving time zone may be specified.  Alternatively, a
+non-daylight-saving time zone can be followed by a time zone
+correction, to add the two values.  This is normally done only for
+`UTC'; for example, `UTC+05:30' is equivalent to `+05:30'.
+
+   Time zone items other than `UTC' and `Z' are obsolescent and are not
+recommended, because they are ambiguous; for example, `EST' has a
+different meaning in Australia than in the United States.  Instead,
+it's better to use unambiguous numeric time zone corrections like
+`-0500', as described in the previous section.
+
+   If neither a time zone item nor a time zone correction is supplied,
+time stamps are interpreted using the rules of the default time zone
+(*note Specifying time zone rules::).
+
+\1f
+File: find.info,  Node: Day of week items,  Next: Relative items in date strings,  Prev: Time zone items,  Up: Date input formats
+
+6.5 Day of week items
+=====================
+
+The explicit mention of a day of the week will forward the date (only
+if necessary) to reach that day of the week in the future.
+
+   Days of the week may be spelled out in full: `Sunday', `Monday',
+`Tuesday', `Wednesday', `Thursday', `Friday' or `Saturday'.  Days may
+be abbreviated to their first three letters, optionally followed by a
+period.  The special abbreviations `Tues' for `Tuesday', `Wednes' for
+`Wednesday' and `Thur' or `Thurs' for `Thursday' are also allowed.
+
+   A number may precede a day of the week item to move forward
+supplementary weeks.  It is best used in expression like `third
+monday'.  In this context, `last DAY' or `next DAY' is also acceptable;
+they move one week before or after the day that DAY by itself would
+represent.
+
+   A comma following a day of the week item is ignored.
+
+\1f
+File: find.info,  Node: Relative items in date strings,  Next: Pure numbers in date strings,  Prev: Day of week items,  Up: Date input formats
+
+6.6 Relative items in date strings
+==================================
+
+"Relative items" adjust a date (or the current date if none) forward or
+backward.  The effects of relative items accumulate.  Here are some
+examples:
+
+     1 year
+     1 year ago
+     3 years
+     2 days
+
+   The unit of time displacement may be selected by the string `year'
+or `month' for moving by whole years or months.  These are fuzzy units,
+as years and months are not all of equal duration.  More precise units
+are `fortnight' which is worth 14 days, `week' worth 7 days, `day'
+worth 24 hours, `hour' worth 60 minutes, `minute' or `min' worth 60
+seconds, and `second' or `sec' worth one second.  An `s' suffix on
+these units is accepted and ignored.
+
+   The unit of time may be preceded by a multiplier, given as an
+optionally signed number.  Unsigned numbers are taken as positively
+signed.  No number at all implies 1 for a multiplier.  Following a
+relative item by the string `ago' is equivalent to preceding the unit
+by a multiplier with value -1.
+
+   The string `tomorrow' is worth one day in the future (equivalent to
+`day'), the string `yesterday' is worth one day in the past (equivalent
+to `day ago').
+
+   The strings `now' or `today' are relative items corresponding to
+zero-valued time displacement, these strings come from the fact a
+zero-valued time displacement represents the current time when not
+otherwise changed by previous items.  They may be used to stress other
+items, like in `12:00 today'.  The string `this' also has the meaning
+of a zero-valued time displacement, but is preferred in date strings
+like `this thursday'.
+
+   When a relative item causes the resulting date to cross a boundary
+where the clocks were adjusted, typically for daylight saving time, the
+resulting date and time are adjusted accordingly.
+
+   The fuzz in units can cause problems with relative items.  For
+example, `2003-07-31 -1 month' might evaluate to 2003-07-01, because
+2003-06-31 is an invalid date.  To determine the previous month more
+reliably, you can ask for the month before the 15th of the current
+month.  For example:
+
+     $ date -R
+     Thu, 31 Jul 2003 13:02:39 -0700
+     $ date --date='-1 month' +'Last month was %B?'
+     Last month was July?
+     $ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!'
+     Last month was June!
+
+   Also, take care when manipulating dates around clock changes such as
+daylight saving leaps.  In a few cases these have added or subtracted
+as much as 24 hours from the clock, so it is often wise to adopt
+universal time by setting the `TZ' environment variable to `UTC0'
+before embarking on calendrical calculations.
+
+\1f
+File: find.info,  Node: Pure numbers in date strings,  Next: Seconds since the Epoch,  Prev: Relative items in date strings,  Up: Date input formats
+
+6.7 Pure numbers in date strings
+================================
+
+The precise interpretation of a pure decimal number depends on the
+context in the date string.
+
+   If the decimal number is of the form YYYYMMDD and no other calendar
+date item (*note Calendar date items::) appears before it in the date
+string, then YYYY is read as the year, MM as the month number and DD as
+the day of the month, for the specified calendar date.
+
+   If the decimal number is of the form HHMM and no other time of day
+item appears before it in the date string, then HH is read as the hour
+of the day and MM as the minute of the hour, for the specified time of
+day.  MM can also be omitted.
+
+   If both a calendar date and a time of day appear to the left of a
+number in the date string, but no relative item, then the number
+overrides the year.
+
+\1f
+File: find.info,  Node: Seconds since the Epoch,  Next: Specifying time zone rules,  Prev: Pure numbers in date strings,  Up: Date input formats
+
+6.8 Seconds since the Epoch
+===========================
+
+If you precede a number with `@', it represents an internal time stamp
+as a count of seconds.  The number can contain an internal decimal
+point (either `.' or `,'); any excess precision not supported by the
+internal representation is truncated toward minus infinity.  Such a
+number cannot be combined with any other date item, as it specifies a
+complete time stamp.
+
+   Internally, computer times are represented as a count of seconds
+since an epoch--a well-defined point of time.  On GNU and POSIX
+systems, the epoch is 1970-01-01 00:00:00 UTC, so `@0' represents this
+time, `@1' represents 1970-01-01 00:00:01 UTC, and so forth.  GNU and
+most other POSIX-compliant systems support such times as an extension
+to POSIX, using negative counts, so that `@-1' represents 1969-12-31
+23:59:59 UTC.
+
+   Traditional Unix systems count seconds with 32-bit two's-complement
+integers and can represent times from 1901-12-13 20:45:52 through
+2038-01-19 03:14:07 UTC.  More modern systems use 64-bit counts of
+seconds with nanosecond subcounts, and can represent all the times in
+the known lifetime of the universe to a resolution of 1 nanosecond.
+
+   On most hosts, these counts ignore the presence of leap seconds.
+For example, on most hosts `@915148799' represents 1998-12-31 23:59:59
+UTC, `@915148800' represents 1999-01-01 00:00:00 UTC, and there is no
+way to represent the intervening leap second 1998-12-31 23:59:60 UTC.
+
+\1f
+File: find.info,  Node: Specifying time zone rules,  Next: Authors of parse_datetime,  Prev: Seconds since the Epoch,  Up: Date input formats
+
+6.9 Specifying time zone rules
+==============================
+
+Normally, dates are interpreted using the rules of the current time
+zone, which in turn are specified by the `TZ' environment variable, or
+by a system default if `TZ' is not set.  To specify a different set of
+default time zone rules that apply just to one date, start the date
+with a string of the form `TZ="RULE"'.  The two quote characters (`"')
+must be present in the date, and any quotes or backslashes within RULE
+must be escaped by a backslash.
+
+   For example, with the GNU `date' command you can answer the question
+"What time is it in New York when a Paris clock shows 6:30am on October
+31, 2004?" by using a date beginning with `TZ="Europe/Paris"' as shown
+in the following shell transcript:
+
+     $ export TZ="America/New_York"
+     $ date --date='TZ="Europe/Paris" 2004-10-31 06:30'
+     Sun Oct 31 01:30:00 EDT 2004
+
+   In this example, the `--date' operand begins with its own `TZ'
+setting, so the rest of that operand is processed according to
+`Europe/Paris' rules, treating the string `2004-10-31 06:30' as if it
+were in Paris.  However, since the output of the `date' command is
+processed according to the overall time zone rules, it uses New York
+time.  (Paris was normally six hours ahead of New York in 2004, but
+this example refers to a brief Halloween period when the gap was five
+hours.)
+
+   A `TZ' value is a rule that typically names a location in the `tz'
+database (http://www.twinsun.com/tz/tz-link.htm).  A recent catalog of
+location names appears in the TWiki Date and Time Gateway
+(http://twiki.org/cgi-bin/xtra/tzdate).  A few non-GNU hosts require a
+colon before a location name in a `TZ' setting, e.g.,
+`TZ=":America/New_York"'.
+
+   The `tz' database includes a wide variety of locations ranging from
+`Arctic/Longyearbyen' to `Antarctica/South_Pole', but if you are at sea
+and have your own private time zone, or if you are using a non-GNU host
+that does not support the `tz' database, you may need to use a POSIX
+rule instead.  Simple POSIX rules like `UTC0' specify a time zone
+without daylight saving time; other rules can specify simple daylight
+saving regimes.  *Note Specifying the Time Zone with `TZ': (libc)TZ
+Variable.
+
+\1f
+File: find.info,  Node: Authors of parse_datetime,  Prev: Specifying time zone rules,  Up: Date input formats
+
+6.10 Authors of `parse_datetime'
+================================
+
+`parse_datetime' started life as `getdate', as originally implemented
+by Steven M. Bellovin (<smb@research.att.com>) while at the University
+of North Carolina at Chapel Hill.  The code was later tweaked by a
+couple of people on Usenet, then completely overhauled by Rich $alz
+(<rsalz@bbn.com>) and Jim Berets (<jberets@bbn.com>) in August, 1990.
+Various revisions for the GNU system were made by David MacKenzie, Jim
+Meyering, Paul Eggert and others, including renaming it to `get_date' to
+avoid a conflict with the alternative Posix function `getdate', and a
+later rename to `parse_datetime'.  The Posix function `getdate' can
+parse more locale-specific dates using `strptime', but relies on an
+environment variable and external file, and lacks the thread-safety of
+`parse_datetime'.
+
+   This chapter was originally produced by Franc,ois Pinard
+(<pinard@iro.umontreal.ca>) from the `parse_datetime.y' source code,
+and then edited by K. Berry (<kb@cs.umb.edu>).
+
+\1f
+File: find.info,  Node: Reference,  Next: Common Tasks,  Prev: Date input formats,  Up: Top
+
+7 Reference
+***********
+
+Below are summaries of the command line syntax for the programs
+discussed in this manual.
+
+* Menu:
+
+* Invoking find::
+* Invoking locate::
+* Invoking updatedb::
+* Invoking xargs::
+* Regular Expressions::
+* Environment Variables::
+
+\1f
+File: find.info,  Node: Invoking find,  Next: Invoking locate,  Up: Reference
+
+7.1 Invoking `find'
+===================
+
+     find [-H] [-L] [-P] [-D DEBUGOPTIONS] [-OLEVEL] [FILE...] [EXPRESSION]
+
+   `find' searches the directory tree rooted at each file name FILE by
+evaluating the EXPRESSION on each file it finds in the tree.
+
+   The command line may begin with the `-H', `-L', `-P', `-D' and `-O'
+options.  These are followed by a list of files or directories that
+should be searched.  If no files to search are specified, the current
+directory (`.') is used.
+
+   This list of files to search is followed by a list of expressions
+describing the files we wish to search for.  The first part of the
+expression is recognised by the fact that it begins with `-' followed
+by some other letters (for example `-print'), or is either `(' or `!'.
+Any arguments after it are the rest of the expression.
+
+   If no expression is given, the expression `-print' is used.
+
+   The `find' command exits with status zero if all files matched are
+processed successfully, greater than zero if errors occur.
+
+   The `find' program also recognises two options for administrative
+use:
+
+`--help'
+     Print a summary of the command line usage and exit.
+
+`--version'
+     Print the version number of `find' and exit.
+
+   The `-version' option is a synonym for `--version'
+
+* Menu:
+
+* Filesystem Traversal Options::
+* Warning Messages::
+* Optimisation Options::
+* Debug Options::
+* Find Expressions::
+
+\1f
+File: find.info,  Node: Filesystem Traversal Options,  Next: Warning Messages,  Up: Invoking find
+
+7.1.1 Filesystem Traversal Options
+----------------------------------
+
+The options `-H', `-L' or `-P' may be specified at the start of the
+command line (if none of these is specified, `-P' is assumed).  If you
+specify more than one of these options, the last one specified takes
+effect (but note that the `-follow' option is equivalent to `-L').
+
+`-P'
+     Never follow symbolic links (this is the default), except in the
+     case of the `-xtype' predicate.
+
+`-L'
+     Always follow symbolic links, except in the case of the `-xtype'
+     predicate.
+
+`-H'
+     Follow symbolic links specified in the list of files to search, or
+     which are otherwise specified on the command line.
+
+   If `find' would follow a symbolic link, but cannot for any reason
+(for example, because it has insufficient permissions or the link is
+broken), it falls back on using the properties of the symbolic link
+itself.  *note Symbolic Links:: for a more complete description of how
+symbolic links are handled.
+
+\1f
+File: find.info,  Node: Warning Messages,  Next: Optimisation Options,  Prev: Filesystem Traversal Options,  Up: Invoking find
+
+7.1.2 Warning Messages
+----------------------
+
+If there is an error on the `find' command line, an error message is
+normally issued.  However, there are some usages that are inadvisable
+but which `find' should still accept.  Under these circumstances,
+`find' may issue a warning message.
+
+   By default, warnings are enabled only if `find' is being run
+interactively (specifically, if the standard input is a terminal) and
+the POSIXLY_CORRECT environment variable is not set.  Warning messages
+can be controlled explicitly by the use of options on the command line:
+
+`-warn'
+     Issue warning messages where appropriate.
+
+`-nowarn'
+     Do not issue warning messages.
+
+   These options take effect at the point on the command line where they
+are specified.  Therefore it's not useful to specify `-nowarn' at the
+end of the command line.  The warning messages affected by the above
+options are triggered by:
+
+   - Use of the `-d' option which is deprecated; please use `-depth'
+     instead, since the latter is POSIX-compliant.
+
+   - Use of the `-ipath' option which is deprecated; please use
+     `-iwholename' instead.
+
+   - Specifying an option (for example `-mindepth') after a non-option
+     (for example `-type' or `-print') on the command line.
+
+   - Use of the `-name' or `-iname' option with a slash character in
+     the pattern.  Since the name predicates only compare against the
+     basename of the visited files, the only file that can match a
+     slash is the root directory itself.
+
+   The default behaviour above is designed to work in that way so that
+existing shell scripts don't generate spurious errors, but people will
+be made aware of the problem.
+
+   Some warning messages are issued for less common or more serious
+problems, and consequently cannot be turned off:
+
+   - Use of an unrecognised backslash escape sequence with `-fprintf'
+
+   - Use of an unrecognised formatting directive with `-fprintf'
+
+\1f
+File: find.info,  Node: Optimisation Options,  Next: Debug Options,  Prev: Warning Messages,  Up: Invoking find
+
+7.1.3 Optimisation Options
+--------------------------
+
+The `-OLEVEL' option sets `find''s optimisation level to LEVEL.  The
+default optimisation level is 1.
+
+   At certain optimisation levels, `find' reorders tests to speed up
+execution while preserving the overall effect; that is, predicates with
+side effects are not reordered relative to each other.  The
+optimisations performed at each optimisation level are as follows.
+
+`0'
+     Currently equivalent to optimisation level 1.
+
+`1'
+     This is the default optimisation level and corresponds to the
+     traditional behaviour.  Expressions are reordered so that tests
+     based only on the names of files (for example` -name' and
+     `-regex') are performed first.
+
+`2'
+     Any `-type' or `-xtype' tests are performed after any tests based
+     only on the names of files, but before any tests that require
+     information from the inode.  On many modern versions of Unix, file
+     types are returned by `readdir()' and so these predicates are
+     faster to evaluate than predicates which need to stat the file
+     first.
+
+     If you use the `-fstype FOO' predicate and specify a filsystem
+     type `FOO' which is not known (that is, present in `/etc/mtab') at
+     the time `find' starts, that predicate is equivalent to `-false'.
+
+`3'
+     At this optimisation level, the full cost-based query optimiser is
+     enabled.  The order of tests is modified so that cheap (i.e., fast)
+     tests are performed first and more expensive ones are performed
+     later, if necessary.  Within each cost band, predicates are
+     evaluated earlier or later according to whether they are likely to
+     succeed or not.  For `-o', predicates which are likely to succeed
+     are evaluated earlier, and for `-a', predicates which are likely
+     to fail are evaluated earlier.
+
+\1f
+File: find.info,  Node: Debug Options,  Next: Find Expressions,  Prev: Optimisation Options,  Up: Invoking find
+
+7.1.4 Debug Options
+-------------------
+
+The `-D' option makes `find' produce diagnostic output.  Much of the
+information is useful only for diagnosing problems, and so most people
+will not find this option helpful.
+
+   The list of debug options should be comma separated.  Compatibility
+of the debug options is not guaranteed between releases of findutils.
+For a complete list of valid debug options, see the output of `find -D
+help'.  Valid debug options include:
+`help'
+     Explain the debugging options.
+
+`tree'
+     Show the expression tree in its original and optimised form.
+
+`stat'
+     Print messages as files are examined with the stat and lstat system
+     calls.  The find program tries to minimise such calls.
+
+`opt'
+     Prints diagnostic information relating to the optimisation of the
+     expression tree; see the `-O' option.
+
+`rates'
+     Prints a summary indicating how often each predicate succeeded or
+     failed.
+
+\1f
+File: find.info,  Node: Find Expressions,  Prev: Debug Options,  Up: Invoking find
+
+7.1.5 Find Expressions
+----------------------
+
+The final part of the `find' command line is a list of expressions.
+*Note Primary Index::, for a summary of all of the tests, actions, and
+options that the expression can contain.  If the expression is missing,
+`-print' is assumed.
+
+\1f
+File: find.info,  Node: Invoking locate,  Next: Invoking updatedb,  Prev: Invoking find,  Up: Reference
+
+7.2 Invoking `locate'
+=====================
+
+     locate [OPTION...] PATTERN...
+
+   For each PATTERN given `locate' searches one or more file name
+databases returning each match of PATTERN.
+
+   For each PATTERN given `locate' searches one or more file name
+databases returning each match of PATTERN.
+
+`--all'
+`-A'
+     Print only names which match all non-option arguments, not those
+     matching one or more non-option arguments.
+
+`--basename'
+`-b'
+     The specified pattern is matched against just the last component of
+     the name of a file in the `locate' database.  This last component
+     is also called the "base name".  For example, the base name of
+     `/tmp/mystuff/foo.old.c' is `foo.old.c'.  If the pattern contains
+     metacharacters, it must match the base name exactly.  If not, it
+     must match part of the base name.
+
+`--count'
+`-c'
+     Instead of printing the matched file names, just print the total
+     number of matches found, unless `--print' (`-p') is also present.
+
+`--database=PATH'
+`-d PATH'
+     Instead of searching the default `locate' database
+     `/usr/local/var/locatedb', `locate' searches the file name
+     databases in PATH, which is a colon-separated list of database
+     file names.  You can also use the environment variable
+     `LOCATE_PATH' to set the list of database files to search.  The
+     option overrides the environment variable if both are used.  Empty
+     elements in PATH (that is, a leading or trailing colon, or two
+     colons in a row) are taken to stand for the default database.  A
+     database can be supplied on stdin, using `-' as an element of
+     `path'. If more than one element of `path' is `-', later instances
+     are ignored (but a warning message is printed).
+
+`--existing'
+`-e'
+     Only print out such names which currently exist (instead of such
+     names which existed when the database was created).  Note that
+     this may slow down the program a lot, if there are many matches in
+     the database.  The way in which broken symbolic links are treated
+     is affected by the `-L', `-P' and `-H' options.  Please note that
+     it is possible for the file to be deleted after `locate' has
+     checked that it exists, but before you use it.  This option is
+     automatically turned on when reading an `slocate' database in
+     secure mode (*note slocate Database Format::).
+
+`--non-existing'
+`-E'
+     Only print out such names which currently do not exist (instead of
+     such names which existed when the database was created).  Note that
+     this may slow down the program a lot, if there are many matches in
+     the database.  The way in which broken symbolic links are treated
+     is affected by the `-L', `-P' and `-H' options.  Please note that
+     `locate' checks that the file does not exist, but a file of the
+     same name might be created after `locate''s check but before you
+     read `locate''s output.
+
+`--follow'
+`-L'
+     If testing for the existence of files (with the `-e' or `-E'
+     options), consider broken symbolic links to be non-existing.  This
+     is the default behaviour.
+
+`--nofollow'
+`-P'
+`-H'
+     If testing for the existence of files (with the `-e' or `-E'
+     options), treat broken symbolic links as if they were existing
+     files.  The `-H' form of this option is provided purely for
+     similarity with `find'; the use of `-P' is recommended over `-H'.
+
+`--ignore-case'
+`-i'
+     Ignore case distinctions in both the pattern and the file names.
+
+`--limit=N'
+`-l N'
+     Limit the number of results printed to N.  When used with the
+     `--count' option, the value printed will never be larger than this
+     limit.
+
+`--max-database-age=D'
+     Normally, `locate' will issue a warning message when it searches a
+     database which is more than 8 days old.  This option changes that
+     value to something other than 8.  The effect of specifying a
+     negative value is undefined.
+
+`--mmap'
+`-m'
+     Accepted but does nothing.  The option is supported only to provide
+     compatibility with BSD's `locate'.
+
+`--null'
+`-0'
+     Results are separated with the ASCII NUL character rather than the
+     newline character.  To get the full benefit of this option, use
+     the new `locate' database format (that is the default anyway).
+
+`--print'
+`-p'
+     Print search results when they normally would not be due to use of
+     `--statistics' (`-S') or `--count' (`-c').
+
+`--wholename'
+`-w'
+     The specified pattern is matched against the whole name of the
+     file in the `locate' database.  If the pattern contains
+     metacharacters, it must match exactly.  If not, it must match part
+     of the whole file name.  This is the default behaviour.
+
+`--regex'
+`-r'
+     Instead of using substring or shell glob matching, the pattern
+     specified on the command line is understood to be a regular
+     expression.  GNU Emacs-style regular expressions are assumed unless
+     the `--regextype' option is also given.  File names from the
+     `locate' database are matched using the specified regular
+     expression.  If the `-i' flag is also given, matching is
+     case-insensitive.  Matches are performed against the whole path
+     name, and so by default a pathname will be matched if any part of
+     it matches the specified regular expression.  The regular
+     expression may use `^' or `$' to anchor a match at the beginning
+     or end of a pathname.
+
+`--regextype'
+     This option changes the regular expression syntax and behaviour
+     used by the `--regex' option.  *note Regular Expressions:: for more
+     information on the regular expression dialects understood by GNU
+     findutils.
+
+`--stdio'
+`-s'
+     Accepted but does nothing.  The option is supported only to provide
+     compatibility with BSD's `locate'.
+
+`--statistics'
+`-S'
+     Print some summary information for each `locate' database.  No
+     search is performed unless non-option arguments are given.
+     Although the BSD version of locate also has this option, the
+     format of the output is different.
+
+`--help'
+     Print a summary of the command line usage for `locate' and exit.
+
+`--version'
+     Print the version number of `locate' and exit.
+
+\1f
+File: find.info,  Node: Invoking updatedb,  Next: Invoking xargs,  Prev: Invoking locate,  Up: Reference
+
+7.3 Invoking `updatedb'
+=======================
+
+     updatedb [OPTION...]
+
+   `updatedb' creates and updates the database of file names used by
+`locate'.  `updatedb' generates a list of files similar to the output
+of `find' and then uses utilities for optimizing the database for
+performance.  `updatedb' is often run periodically as a `cron' job and
+configured with environment variables or command options.  Typically,
+operating systems have a shell script that "exports" configurations for
+variable definitions and uses another shell script that "sources" the
+configuration file into the environment and then executes `updatedb' in
+the environment.
+
+   `updatedb' creates and updates the database of file names used by
+`locate'.  `updatedb' generates a list of files similar to the output
+of `find' and then uses utilities for optimizing the database for
+performance.  `updatedb' is often run periodically as a `cron' job and
+configured with environment variables or command options.  Typically,
+operating systems have a shell script that "exports" configurations for
+variable definitions and uses another shell script that "sources" the
+configuration file into the environment and then executes `updatedb' in
+the environment.
+
+`--findoptions='OPTION...''
+     Global options to pass on to `find'.  The environment variable
+     `FINDOPTIONS' also sets this value.  Default is none.
+
+`--localpaths='PATH...''
+     Non-network directories to put in the database.  Default is `/'.
+
+`--netpaths='PATH...''
+     Network (NFS, AFS, RFS, etc.) directories to put in the database.
+     The environment variable `NETPATHS' also sets this value.  Default
+     is none.
+
+`--prunepaths='PATH...''
+     Directories to omit from the database, which would otherwise be
+     included.  The environment variable `PRUNEPATHS' also sets this
+     value.  Default is `/tmp /usr/tmp /var/tmp /afs'.  The paths are
+     used as regular expressions (with `find ... -regex', so you need
+     to specify these paths in the same way that `find' will encounter
+     them.  This means for example that the paths must not include
+     trailing slashes.
+
+`--prunefs='PATH...''
+     Filesystems to omit from the database, which would otherwise be
+     included.  Note that files are pruned when a filesystem is reached;
+     Any filesystem mounted under an undesired filesystem will be
+     ignored.  The environment variable `PRUNEFS' also sets this value.
+     Default is `nfs NFS proc'.
+
+`--output=DBFILE'
+     The database file to build.  The default is system-dependent, but
+     when this document was formatted it was `/usr/local/var/locatedb'.
+
+`--localuser=USER'
+     The user to search the non-network directories as, using `su'.
+     Default is to search the non-network directories as the current
+     user.  You can also use the environment variable `LOCALUSER' to
+     set this user.
+
+`--netuser=USER'
+     The user to search network directories as, using `su'.  Default
+     `user' is `daemon'.  You can also use the environment variable
+     `NETUSER' to set this user.
+
+`--old-format'
+     Generate a `locate' database in the old format, for compatibility
+     with versions of `locate' other than GNU `locate'.  Using this
+     option means that `locate' will not be able to properly handle
+     non-ASCII characters in file names (that is, file names containing
+     characters which have the eighth bit set, such as many of the
+     characters from the ISO-8859-1 character set).  *Note Database
+     Formats::, for a detailed description of the supported database
+     formats.
+
+`--dbformat=FORMAT'
+     Generate the locate database in format `FORMAT'.  Supported
+     database formats include `LOCATE02' (which is the default), `old'
+     and `slocate'.  The `old' format exists for compatibility with
+     implementations of `locate' on other Unix systems.  The `slocate'
+     format exists for compatibility with `slocate'.  *Note Database
+     Formats::, for a detailed description of each format.
+
+`--help'
+     Print a summary of the command line usage and exit.
+
+`--version'
+     Print the version number of `updatedb' and exit.
+
+\1f
+File: find.info,  Node: Invoking xargs,  Next: Regular Expressions,  Prev: Invoking updatedb,  Up: Reference
+
+7.4 Invoking `xargs'
+====================
+
+     xargs [OPTION...] [COMMAND [INITIAL-ARGUMENTS]]
+
+   `xargs' exits with the following status:
+
+0
+     if it succeeds
+
+123
+     if any invocation of the command exited with status 1-125
+
+124
+     if the command exited with status 255
+
+125
+     if the command is killed by a signal
+
+126
+     if the command cannot be run
+
+127
+     if the command is not found
+
+1
+     if some other error occurred.
+
+   Exit codes greater than 128 are used by the shell to indicate that a
+program died due to a fatal signal.
+
+* Menu:
+
+* xargs options::
+* Invoking the shell from xargs::
+
+\1f
+File: find.info,  Node: xargs options,  Next: Invoking the shell from xargs,  Up: Invoking xargs
+
+7.4.1 xargs options
+-------------------
+
+`--arg-file=INPUTFILE'
+`-a INPUTFILE'
+     Read names from the file INPUTFILE instead of standard input.  If
+     you use this option, the standard input stream remains unchanged
+     when commands are run. Otherwise, stdin is redirected from
+     `/dev/null'.
+
+`--null'
+`-0'
+     Input file names are terminated by a null character instead of by
+     whitespace, and any quotes and backslash characters are not
+     considered special (every character is taken literally).  Disables
+     the end of file string, which is treated like any other argument.
+
+`--delimiter DELIM'
+`-d DELIM'
+     Input file names are terminated by the specified character DELIM
+     instead of by whitespace, and any quotes and backslash characters
+     are not considered special (every character is taken literally).
+     Disables the end of file string, which is treated like any other
+     argument.
+
+     The specified delimiter may be a single character, a C-style
+     character escape such as `\n', or an octal or hexadecimal escape
+     code.  Octal and hexadecimal escape codes are understood as for the
+     `printf' command.  Multibyte characters are not supported.
+
+`-E EOF-STR'
+`--eof[=EOF-STR]'
+`-e[EOF-STR]'
+     Set the end of file string to EOF-STR.  If the end of file string
+     occurs as a line of input, the rest of the input is ignored.  If
+     EOF-STR is omitted (`-e') or blank (either `-e' or `-E'), there is
+     no end of file string.  The `-e' form of this option is deprecated
+     in favour of the POSIX-compliant `-E' option, which you should use
+     instead.  As of GNU xargs version 4.2.9, the default behaviour of
+     xargs is not to have a logical end-of-file marker.  The POSIX
+     standard (IEEE Std 1003.1, 2004 Edition) allows this.
+
+`--help'
+     Print a summary of the options to `xargs' and exit.
+
+`-I REPLACE-STR'
+`--replace[=REPLACE-STR]'
+`-i[REPLACE-STR]'
+     Replace occurrences of REPLACE-STR in the initial arguments with
+     names read from standard input.  Also, unquoted blanks do not
+     terminate arguments; instead, the input is split at newlines only.
+     If REPLACE-STR is omitted (omitting it is allowed only for `-i'),
+     it defaults to `{}' (like for `find -exec').  Implies `-x' and `-l
+     1'.  The `-i' option is deprecated in favour of the `-I' option.
+
+`-L MAX-LINES'
+`--max-lines[=MAX-LINES]'
+`-l[MAX-LINES]'
+     Use at most MAX-LINES non-blank input lines per command line.  For
+     `-l', MAX-LINES defaults to 1 if omitted.  For `-L', the argument
+     is mandatory.  Trailing blanks cause an input line to be logically
+     continued on the next input line, for the purpose of counting the
+     lines.  Implies `-x'.  The `-l' form of this option is deprecated
+     in favour of the POSIX-compliant `-L' option.
+
+`--max-args=MAX-ARGS'
+`-n MAX-ARGS'
+     Use at most MAX-ARGS arguments per command line.  Fewer than
+     MAX-ARGS arguments will be used if the size (see the `-s' option)
+     is exceeded, unless the `-x' option is given, in which case
+     `xargs' will exit.
+
+`--interactive'
+`-p'
+     Prompt the user about whether to run each command line and read a
+     line from the terminal.  Only run the command line if the response
+     starts with `y' or `Y'.  Implies `-t'.
+
+`--no-run-if-empty'
+`-r'
+     If the standard input is completely empty, do not run the command.
+     By default, the command is run once even if there is no input.
+
+`--max-chars=MAX-CHARS'
+`-s MAX-CHARS'
+     Use at most MAX-CHARS characters per command line, including the
+     command, initial arguments and any terminating nulls at the ends of
+     the argument strings.
+
+`--show-limits'
+     Display the limits on the command-line length which are imposed by
+     the operating system, `xargs'' choice of buffer size and the `-s'
+     option.  Pipe the input from `/dev/null' (and perhaps specify
+     `--no-run-if-empty') if you don't want `xargs' to do anything.
+
+`--verbose'
+`-t'
+     Print the command line on the standard error output before
+     executing it.
+
+`--version'
+     Print the version number of `xargs' and exit.
+
+`--exit'
+`-x'
+     Exit if the size (see the `-s' option) is exceeded.
+
+`--max-procs=MAX-PROCS'
+`-P MAX-PROCS'
+     Run simultaneously up to MAX-PROCS processes at once; the default
+     is 1.  If MAX-PROCS is 0, `xargs' will run as many processes as
+     possible simultaneously.
+
+\1f
+File: find.info,  Node: Invoking the shell from xargs,  Prev: xargs options,  Up: Invoking xargs
+
+7.4.2 Invoking the shell from xargs
+-----------------------------------
+
+Normally, `xargs' will exec the command you specified directly, without
+invoking a shell.  This is normally the behaviour one would want.  It's
+somewhat more efficient and avoids problems with shell metacharacters,
+for example.  However, sometimes it is necessary to manipulate the
+environment of a command before it is run, in a way that `xargs' does
+not directly support.
+
+   Invoking a shell from `xargs' is a good way of performing such
+manipulations.  However, some care must be taken to prevent problems,
+for example unwanted interpretation of shell metacharacters.
+
+   This command moves a set of files into an archive directory:
+
+     find /foo -maxdepth 1 -atime +366 -exec mv {} /archive \;
+
+   However, this will only move one file at a time.  We cannot in this
+case use `-exec ... +' because the matched file names are added at the
+end of the command line, while the destination directory would need to
+be specified last.  We also can't use `xargs' in the obvious way for
+the same reason.  One way of working around this problem is to make use
+of the special properties of GNU `mv'; it has a `-t' option that allows
+the target directory to be specified before the list of files to be
+moved.  However, while this technique works for GNU `mv', it doesn't
+solve the more general problem.
+
+   Here is a more general technique for solving this problem:
+
+     find /foo -maxdepth 1 -atime +366 -print0 |
+     xargs -r0 sh -c 'mv "$@" /archive' move
+
+   Here, a shell is being invoked.  There are two shell instances to
+think about.  The first is the shell which launches the xargs command
+(this might be the shell into which you are typing, for example).  The
+second is the shell launched by `xargs' (in fact it will probably
+launch several, one after the other, depending on how many files need
+to be archived).  We'll refer to this second shell as a subshell.
+
+   Our example uses the `-c' option of `sh'.  Its argument is a shell
+command to be executed by the subshell.  Along with the rest of that
+command, the $@ is enclosed by single quotes to make sure it is passed
+to the subshell without being expanded by the parent shell.  It is also
+enclosed with double quotes so that the subshell will expand `$@'
+correctly even if one of the file names contains a space or newline.
+
+   The subshell will use any non-option arguments as positional
+parameters (that is, in the expansion of `$@').  Because `xargs'
+launches the `sh -c' subshell with a list of files, those files will
+end up as the expansion of `$@'.
+
+   You may also notice the `move' at the end of the command line.  This
+is used as the value of `$0' by the subshell.  We include it because
+otherwise the name of the first file to be moved would be used instead.
+If that happened it would not be included in the subshell's expansion
+of `$@', and so it wouldn't actually get moved.
+
+   Another reason to use the `sh -c' construct could be to perform
+redirection:
+
+     find /usr/include -name '*.h' | xargs grep -wl mode_t |
+     xargs -r sh -c 'exec emacs "$@" < /dev/tty' Emacs
+
+   Notice that we use the shell builtin `exec' here.  That's simply
+because the subshell needs to do nothing once Emacs has been invoked.
+Therefore instead of keeping a `sh' process around for no reason, we
+just arrange for the subshell to exec Emacs, saving an extra process
+creation.
+
+   Sometimes, though, it can be helpful to keep the shell process
+around:
+
+     find /foo -maxdepth 1 -atime +366 -print0 |
+     xargs -r0 sh -c 'mv "$@" /archive || exit 255' move
+
+   Here, the shell will exit with status 255 if any `mv' failed.  This
+causes `xargs' to stop immediately.
+
+\1f
+File: find.info,  Node: Regular Expressions,  Next: Environment Variables,  Prev: Invoking xargs,  Up: Reference
+
+7.5 Regular Expressions
+=======================
+
+The `-regex' and `-iregex' tests of `find' allow matching by regular
+expression, as does the `--regex' option of `locate'.
+
+   Your locale configuration affects how regular expressions are
+interpreted.  *Note Environment Variables::, for a description of how
+your locale setup affects the interpretation of regular expressions.
+
+   There are also several different types of regular expression, and
+these are interpreted differently.  Normally, the type of regular
+expression used by `find' and `locate' is the same as is used in GNU
+Emacs.  Both programs provide an option which allows you to select an
+alternative regular expression syntax; for `find' this is the
+`-regextype' option, and for `locate' this is the `--regextype' option.
+
+   These options take a single argument, which indicates the specific
+regular expression syntax and behaviour that should be used.  This
+should be one of the following:
+
+* Menu:
+
+* findutils-default regular expression syntax::
+* awk regular expression syntax::
+* egrep regular expression syntax::
+* emacs regular expression syntax::
+* gnu-awk regular expression syntax::
+* grep regular expression syntax::
+* posix-awk regular expression syntax::
+* posix-basic regular expression syntax::
+* posix-egrep regular expression syntax::
+* posix-extended regular expression syntax::
+
+\1f
+File: find.info,  Node: findutils-default regular expression syntax,  Next: awk regular expression syntax,  Up: Regular Expressions
+
+7.5.1 `findutils-default' regular expression syntax
+---------------------------------------------------
+
+The character `.' matches any single character.
+
+`+'
+     indicates that the regular expression should match one or more
+     occurrences of the previous atom or regexp.
+
+`?'
+     indicates that the regular expression should match zero or one
+     occurrence of the previous atom or regexp.
+
+`\+'
+     matches a `+'
+
+`\?'
+     matches a `?'.
+
+   Bracket expressions are used to match ranges of characters.  Bracket
+expressions where the range is backward, for example `[z-a]', are
+ignored.  Within square brackets, `\' is taken literally.  Character
+classes are not supported, so for example you would need to use `[0-9]'
+instead of `[[:digit:]]'.
+
+   GNU extensions are supported:
+  1. `\w' matches a character within a word
+
+  2. `\W' matches a character which is not within a word
+
+  3. `\<' matches the beginning of a word
+
+  4. `\>' matches the end of a word
+
+  5. `\b' matches a word boundary
+
+  6. `\B' matches characters which are not a word boundary
+
+  7. `\`' matches the beginning of the whole input
+
+  8. `\'' matches the end of the whole input
+
+
+   Grouping is performed with backslashes followed by parentheses `\(',
+`\)'.  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 `\2' matches the second group expression.
+The order of group expressions is determined by the position of their
+opening parenthesis `\('.
+
+   The alternation operator is `\|'.
+
+   The character `^' only represents the beginning of a string when it
+appears:
+  1. At the beginning of a regular expression
+
+  2. After an open-group, signified by `\('
+
+  3. After the alternation operator `\|'
+
+
+   The character `$' only represents the end of a string when it
+appears:
+  1. At the end of a regular expression
+
+  2. Before a close-group, signified by `\)'
+
+  3. Before the alternation operator `\|'
+
+
+   `*', `+' and `?' are special at any point in a regular expression
+except:
+  1. At the beginning of a regular expression
+
+  2. After an open-group, signified by `\('
+
+  3. After the alternation operator `\|'
+
+
+   The longest possible match is returned; this applies to the regular
+expression as a whole and (subject to this constraint) to
+subexpressions within groups.
+
+\1f
+File: find.info,  Node: awk regular expression syntax,  Next: egrep regular expression syntax,  Prev: findutils-default regular expression syntax,  Up: Regular Expressions
+
+7.5.2 `awk' regular expression syntax
+-------------------------------------
+
+The character `.' matches any single character except the null
+character.
+
+`+'
+     indicates that the regular expression should match one or more
+     occurrences of the previous atom or regexp.
+
+`?'
+     indicates that the regular expression should match zero or one
+     occurrence of the previous atom or regexp.
+
+`\+'
+     matches a `+'
+
+`\?'
+     matches a `?'.
+
+   Bracket expressions are used to match ranges of characters.  Bracket
+expressions where the range is backward, for example `[z-a]', are
+invalid.  Within square brackets, `\' can be used to quote the
+following character.  Character classes are not supported, so for
+example you would need to use `[0-9]' instead of `[[:digit:]]'.
+
+   GNU extensions are not supported and so `\w', `\W', `\<', `\>',
+`\b', `\B', `\`', and `\'' match `w', `W', `<', `>', `b', `B', ``', and
+`'' respectively.
+
+   Grouping is performed with parentheses `()'.  An unmatched `)'
+matches just itself.  A backslash followed by a digit matches that
+digit.
+
+   The alternation operator is `|'.
+
+   The characters `^' and `$' always represent the beginning and end of
+a string respectively, except within square brackets.  Within brackets,
+`^' can be used to invert the membership of the character class being
+specified.
+
+   `*', `+' and `?' are special at any point in a regular expression
+except:
+  1. At the beginning of a regular expression
+
+  2. After an open-group, signified by `('
+
+  3. After the alternation operator `|'
+
+
+   The longest possible match is returned; this applies to the regular
+expression as a whole and (subject to this constraint) to
+subexpressions within groups.
+
+\1f
+File: find.info,  Node: egrep regular expression syntax,  Next: emacs regular expression syntax,  Prev: awk regular expression syntax,  Up: Regular Expressions
+
+7.5.3 `egrep' regular expression syntax
+---------------------------------------
+
+The character `.' matches any single character except newline.
+
+`+'
+     indicates that the regular expression should match one or more
+     occurrences of the previous atom or regexp.
+
+`?'
+     indicates that the regular expression should match zero or one
+     occurrence of the previous atom or regexp.
+
+`\+'
+     matches a `+'
+
+`\?'
+     matches a `?'.
+
+   Bracket expressions are used to match ranges of characters.  Bracket
+expressions where the range is backward, for example `[z-a]', are
+ignored.  Within square brackets, `\' is taken literally.  Character
+classes are supported; for example `[[:digit:]]' will match a single
+decimal digit.  Non-matching lists `[^...]' do not ever match newline.
+
+   GNU extensions are supported:
+  1. `\w' matches a character within a word
+
+  2. `\W' matches a character which is not within a word
+
+  3. `\<' matches the beginning of a word
+
+  4. `\>' matches the end of a word
+
+  5. `\b' matches a word boundary
+
+  6. `\B' matches characters which are not a word boundary
+
+  7. `\`' matches the beginning of the whole input
+
+  8. `\'' matches the end of the whole input
+
+
+   Grouping is performed with parentheses `()'.  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 `\2'
+matches the second group expression.  The order of group expressions is
+determined by the position of their opening parenthesis `('.
+
+   The alternation operator is `|'.
+
+   The characters `^' and `$' always represent the beginning and end of
+a string respectively, except within square brackets.  Within brackets,
+`^' can be used to invert the membership of the character class being
+specified.
+
+   The characters `*', `+' and `?' are special anywhere in a regular
+expression.
+
+   The longest possible match is returned; this applies to the regular
+expression as a whole and (subject to this constraint) to
+subexpressions within groups.
+
+\1f
+File: find.info,  Node: emacs regular expression syntax,  Next: gnu-awk regular expression syntax,  Prev: egrep regular expression syntax,  Up: Regular Expressions
+
+7.5.4 `emacs' regular expression syntax
+---------------------------------------
+
+The character `.' matches any single character except newline.
+
+`+'
+     indicates that the regular expression should match one or more
+     occurrences of the previous atom or regexp.
+
+`?'
+     indicates that the regular expression should match zero or one
+     occurrence of the previous atom or regexp.
+
+`\+'
+     matches a `+'
+
+`\?'
+     matches a `?'.
+
+   Bracket expressions are used to match ranges of characters.  Bracket
+expressions where the range is backward, for example `[z-a]', are
+ignored.  Within square brackets, `\' is taken literally.  Character
+classes are not supported, so for example you would need to use `[0-9]'
+instead of `[[:digit:]]'.
+
+   GNU extensions are supported:
+  1. `\w' matches a character within a word
+
+  2. `\W' matches a character which is not within a word
+
+  3. `\<' matches the beginning of a word
+
+  4. `\>' matches the end of a word
+
+  5. `\b' matches a word boundary
+
+  6. `\B' matches characters which are not a word boundary
+
+  7. `\`' matches the beginning of the whole input
+
+  8. `\'' matches the end of the whole input
+
+
+   Grouping is performed with backslashes followed by parentheses `\(',
+`\)'.  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 `\2' matches the second group expression.
+The order of group expressions is determined by the position of their
+opening parenthesis `\('.
+
+   The alternation operator is `\|'.
+
+   The character `^' only represents the beginning of a string when it
+appears:
+  1. At the beginning of a regular expression
+
+  2. After an open-group, signified by `\('
+
+  3. After the alternation operator `\|'
+
+
+   The character `$' only represents the end of a string when it
+appears:
+  1. At the end of a regular expression
+
+  2. Before a close-group, signified by `\)'
+
+  3. Before the alternation operator `\|'
+
+
+   `*', `+' and `?' are special at any point in a regular expression
+except:
+  1. At the beginning of a regular expression
+
+  2. After an open-group, signified by `\('
+
+  3. After the alternation operator `\|'
+
+
+   The longest possible match is returned; this applies to the regular
+expression as a whole and (subject to this constraint) to
+subexpressions within groups.
+
+\1f
+File: find.info,  Node: gnu-awk regular expression syntax,  Next: grep regular expression syntax,  Prev: emacs regular expression syntax,  Up: Regular Expressions
+
+7.5.5 `gnu-awk' regular expression syntax
+-----------------------------------------
+
+The character `.' matches any single character.
+
+`+'
+     indicates that the regular expression should match one or more
+     occurrences of the previous atom or regexp.
+
+`?'
+     indicates that the regular expression should match zero or one
+     occurrence of the previous atom or regexp.
+
+`\+'
+     matches a `+'
+
+`\?'
+     matches a `?'.
+
+   Bracket expressions are used to match ranges of characters.  Bracket
+expressions where the range is backward, for example `[z-a]', are
+invalid.  Within square brackets, `\' can be used to quote the
+following character.  Character classes are supported; for example
+`[[:digit:]]' will match a single decimal digit.
+
+   GNU extensions are supported:
+  1. `\w' matches a character within a word
+
+  2. `\W' matches a character which is not within a word
+
+  3. `\<' matches the beginning of a word
+
+  4. `\>' matches the end of a word
+
+  5. `\b' matches a word boundary
+
+  6. `\B' matches characters which are not a word boundary
+
+  7. `\`' matches the beginning of the whole input
+
+  8. `\'' matches the end of the whole input
+
+
+   Grouping is performed with parentheses `()'.  An unmatched `)'
+matches just itself.  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 `\2' matches the
+second group expression.  The order of group expressions is determined
+by the position of their opening parenthesis `('.
+
+   The alternation operator is `|'.
+
+   The characters `^' and `$' always represent the beginning and end of
+a string respectively, except within square brackets.  Within brackets,
+`^' can be used to invert the membership of the character class being
+specified.
+
+   `*', `+' and `?' are special at any point in a regular expression
+except:
+  1. At the beginning of a regular expression
+
+  2. After an open-group, signified by `('
+
+  3. After the alternation operator `|'
+
+
+   The longest possible match is returned; this applies to the regular
+expression as a whole and (subject to this constraint) to
+subexpressions within groups.
+
+\1f
+File: find.info,  Node: grep regular expression syntax,  Next: posix-awk regular expression syntax,  Prev: gnu-awk regular expression syntax,  Up: Regular Expressions
+
+7.5.6 `grep' regular expression syntax
+--------------------------------------
+
+The character `.' matches any single character except newline.
+
+`\+'
+     indicates that the regular expression should match one or more
+     occurrences of the previous atom or regexp.
+
+`\?'
+     indicates that the regular expression should match zero or one
+     occurrence of the previous atom or regexp.
+
+`+ and ?'
+     match themselves.
+
+   Bracket expressions are used to match ranges of characters.  Bracket
+expressions where the range is backward, for example `[z-a]', are
+ignored.  Within square brackets, `\' is taken literally.  Character
+classes are supported; for example `[[:digit:]]' will match a single
+decimal digit.  Non-matching lists `[^...]' do not ever match newline.
+
+   GNU extensions are supported:
+  1. `\w' matches a character within a word
+
+  2. `\W' matches a character which is not within a word
+
+  3. `\<' matches the beginning of a word
+
+  4. `\>' matches the end of a word
+
+  5. `\b' matches a word boundary
+
+  6. `\B' matches characters which are not a word boundary
+
+  7. `\`' matches the beginning of the whole input
+
+  8. `\'' matches the end of the whole input
+
+
+   Grouping is performed with backslashes followed by parentheses `\(',
+`\)'.  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 `\2' matches the second group expression.
+The order of group expressions is determined by the position of their
+opening parenthesis `\('.
+
+   The alternation operator is `\|'.
+
+   The character `^' only represents the beginning of a string when it
+appears:
+  1. At the beginning of a regular expression
+
+  2. After an open-group, signified by `\('
+
+  3. After a newline
+
+  4. After the alternation operator `\|'
+
+
+   The character `$' only represents the end of a string when it
+appears:
+  1. At the end of a regular expression
+
+  2. Before a close-group, signified by `\)'
+
+  3. Before a newline
+
+  4. Before the alternation operator `\|'
+
+
+   `\*', `\+' and `\?' are special at any point in a regular expression
+except:
+  1. At the beginning of a regular expression
+
+  2. After an open-group, signified by `\('
+
+  3. After a newline
+
+  4. After the alternation operator `\|'
+
+
+   Intervals are specified by `\{' and `\}'.  Invalid intervals such as
+`a\{1z' are not accepted.
+
+   The longest possible match is returned; this applies to the regular
+expression as a whole and (subject to this constraint) to
+subexpressions within groups.
+
+\1f
+File: find.info,  Node: posix-awk regular expression syntax,  Next: posix-basic regular expression syntax,  Prev: grep regular expression syntax,  Up: Regular Expressions
+
+7.5.7 `posix-awk' regular expression syntax
+-------------------------------------------
+
+The character `.' matches any single character except the null
+character.
+
+`+'
+     indicates that the regular expression should match one or more
+     occurrences of the previous atom or regexp.
+
+`?'
+     indicates that the regular expression should match zero or one
+     occurrence of the previous atom or regexp.
+
+`\+'
+     matches a `+'
+
+`\?'
+     matches a `?'.
+
+   Bracket expressions are used to match ranges of characters.  Bracket
+expressions where the range is backward, for example `[z-a]', are
+invalid.  Within square brackets, `\' can be used to quote the
+following character.  Character classes are supported; for example
+`[[:digit:]]' will match a single decimal digit.
+
+   GNU extensions are not supported and so `\w', `\W', `\<', `\>',
+`\b', `\B', `\`', and `\'' match `w', `W', `<', `>', `b', `B', ``', and
+`'' respectively.
+
+   Grouping is performed with parentheses `()'.  An unmatched `)'
+matches just itself.  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 `\2' matches the
+second group expression.  The order of group expressions is determined
+by the position of their opening parenthesis `('.
+
+   The alternation operator is `|'.
+
+   The characters `^' and `$' always represent the beginning and end of
+a string respectively, except within square brackets.  Within brackets,
+`^' can be used to invert the membership of the character class being
+specified.
+
+   `*', `+' and `?' are special at any point in a regular expression
+except the following places, where they are not allowed:
+  1. At the beginning of a regular expression
+
+  2. After an open-group, signified by `('
+
+  3. After the alternation operator `|'
+
+
+   Intervals are specified by `{' and `}'.  Invalid intervals such as
+`a{1z' are not accepted.
+
+   The longest possible match is returned; this applies to the regular
+expression as a whole and (subject to this constraint) to
+subexpressions within groups.
+
+\1f
+File: find.info,  Node: posix-basic regular expression syntax,  Next: posix-egrep regular expression syntax,  Prev: posix-awk regular expression syntax,  Up: Regular Expressions
+
+7.5.8 `posix-basic' regular expression syntax
+---------------------------------------------
+
+This is a synonym for ed.
+
+\1f
+File: find.info,  Node: posix-egrep regular expression syntax,  Next: posix-extended regular expression syntax,  Prev: posix-basic regular expression syntax,  Up: Regular Expressions
+
+7.5.9 `posix-egrep' regular expression syntax
+---------------------------------------------
+
+The character `.' matches any single character except newline.
+
+`+'
+     indicates that the regular expression should match one or more
+     occurrences of the previous atom or regexp.
+
+`?'
+     indicates that the regular expression should match zero or one
+     occurrence of the previous atom or regexp.
+
+`\+'
+     matches a `+'
+
+`\?'
+     matches a `?'.
+
+   Bracket expressions are used to match ranges of characters.  Bracket
+expressions where the range is backward, for example `[z-a]', are
+ignored.  Within square brackets, `\' is taken literally.  Character
+classes are supported; for example `[[:digit:]]' will match a single
+decimal digit.  Non-matching lists `[^...]' do not ever match newline.
+
+   GNU extensions are supported:
+  1. `\w' matches a character within a word
+
+  2. `\W' matches a character which is not within a word
+
+  3. `\<' matches the beginning of a word
+
+  4. `\>' matches the end of a word
+
+  5. `\b' matches a word boundary
+
+  6. `\B' matches characters which are not a word boundary
+
+  7. `\`' matches the beginning of the whole input
+
+  8. `\'' matches the end of the whole input
+
+
+   Grouping is performed with parentheses `()'.  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 `\2'
+matches the second group expression.  The order of group expressions is
+determined by the position of their opening parenthesis `('.
+
+   The alternation operator is `|'.
+
+   The characters `^' and `$' always represent the beginning and end of
+a string respectively, except within square brackets.  Within brackets,
+`^' can be used to invert the membership of the character class being
+specified.
+
+   The characters `*', `+' and `?' are special anywhere in a regular
+expression.
+
+   Intervals are specified by `{' and `}'.  Invalid intervals are
+treated as literals, for example `a{1' is treated as `a\{1'
+
+   The longest possible match is returned; this applies to the regular
+expression as a whole and (subject to this constraint) to
+subexpressions within groups.
+
+\1f
+File: find.info,  Node: posix-extended regular expression syntax,  Prev: posix-egrep regular expression syntax,  Up: Regular Expressions
+
+7.5.10 `posix-extended' regular expression syntax
+-------------------------------------------------
+
+The character `.' matches any single character except the null
+character.
+
+`+'
+     indicates that the regular expression should match one or more
+     occurrences of the previous atom or regexp.
+
+`?'
+     indicates that the regular expression should match zero or one
+     occurrence of the previous atom or regexp.
+
+`\+'
+     matches a `+'
+
+`\?'
+     matches a `?'.
+
+   Bracket expressions are used to match ranges of characters.  Bracket
+expressions where the range is backward, for example `[z-a]', are
+invalid.  Within square brackets, `\' is taken literally.  Character
+classes are supported; for example `[[:digit:]]' will match a single
+decimal digit.
+
+   GNU extensions are supported:
+  1. `\w' matches a character within a word
+
+  2. `\W' matches a character which is not within a word
+
+  3. `\<' matches the beginning of a word
+
+  4. `\>' matches the end of a word
+
+  5. `\b' matches a word boundary
+
+  6. `\B' matches characters which are not a word boundary
+
+  7. `\`' matches the beginning of the whole input
+
+  8. `\'' matches the end of the whole input
+
+
+   Grouping is performed with parentheses `()'.  An unmatched `)'
+matches just itself.  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 `\2' matches the
+second group expression.  The order of group expressions is determined
+by the position of their opening parenthesis `('.
+
+   The alternation operator is `|'.
+
+   The characters `^' and `$' always represent the beginning and end of
+a string respectively, except within square brackets.  Within brackets,
+`^' can be used to invert the membership of the character class being
+specified.
+
+   `*', `+' and `?' are special at any point in a regular expression
+except the following places, where they are not allowed:
+  1. At the beginning of a regular expression
+
+  2. After an open-group, signified by `('
+
+  3. After the alternation operator `|'
+
+
+   Intervals are specified by `{' and `}'.  Invalid intervals such as
+`a{1z' are not accepted.
+
+   The longest possible match is returned; this applies to the regular
+expression as a whole and (subject to this constraint) to
+subexpressions within groups.
+
+\1f
+File: find.info,  Node: Environment Variables,  Prev: Regular Expressions,  Up: Reference
+
+7.6 Environment Variables
+=========================
+
+LANG
+     Provides a default value for the internationalisation variables
+     that are unset or null.
+
+LC_ALL
+     If set to a non-empty string value, override the values of all the
+     other internationalisation variables.
+
+LC_COLLATE
+     The POSIX standard specifies that this variable affects the pattern
+     matching to be used for the `\-name' option.  GNU find uses the
+     GNU version of the `fnmatch' library function.
+
+     This variable also affects the interpretation of the response to
+     `-ok'; while the LC_MESSAGES variable selects the actual pattern
+     used to interpret the response to `-ok', the interpretation of any
+     bracket expressions in the pattern will be affected by the
+     LC_COLLATE variable.
+
+LC_CTYPE
+     This variable affects the treatment of character classes used in
+     regular expression and with the `-name' test, if the `fnmatch'
+     function supports this.
+
+     This variable also affects the interpretation of any character
+     classes in the regular expressions used to interpret the response
+     to the prompt issued by `-ok'.  The LC_CTYPE environment variable
+     will also affect which characters are considered to be unprintable
+     when filenames are printed (*note Unusual Characters in File
+     Names::).
+
+LC_MESSAGES
+     Determines the locale to be used for internationalised messages,
+     including the interpretation of the response to the prompt made by
+     the `-ok' action.
+
+NLSPATH
+     Determines the location of the internationalisation message
+     catalogues.
+
+PATH
+     Affects the directories which are searched to find the executables
+     invoked by `-exec', `-execdir' `-ok' and `-okdir'.  If the PATH
+     environment variable includes the current directory (by explicitly
+     including `.' or by having an empty element), and the find command
+     line includes `-execdir' or `-okdir', `find' will refuse to run.
+     *Note Security Considerations::, for a more detailed discussion of
+     security matters.
+
+POSIXLY_CORRECT
+     Determines the block size used by `-ls' and `-fls'.  If
+     POSIXLY_CORRECT is set, blocks are units of 512 bytes.  Otherwise
+     they are units of 1024 bytes.
+
+     Setting this variable also turns off warning messages (that is,
+     implies `-nowarn') by default, because POSIX requires that apart
+     from the output for `-ok', all messages printed on stderr are
+     diagnostics and must result in a non-zero exit status.
+
+     Arguments to `-perm' beginning with `+' are treated differently
+     when POSIXLY_CORRECT is set. See *note -perm: Mode Bits.
+
+     When POSIXLY_CORRECT is set, the response to the prompt made by the
+     `-ok' action is interpreted according to the system's message
+     catalogue, as opposed to according to `find''s own message
+     translations.
+
+TZ
+     Affects the time zone used for some of the time-related format
+     directives of `-printf' and `-fprintf'.
+
+\1f
+File: find.info,  Node: Common Tasks,  Next: Worked Examples,  Prev: Reference,  Up: Top
+
+8 Common Tasks
+**************
+
+The sections that follow contain some extended examples that both give
+a good idea of the power of these programs, and show you how to solve
+common real-world problems.
+
+* Menu:
+
+* Viewing And Editing::
+* Archiving::
+* Cleaning Up::
+* Strange File Names::
+* Fixing Permissions::
+* Classifying Files::
+
+\1f
+File: find.info,  Node: Viewing And Editing,  Next: Archiving,  Up: Common Tasks
+
+8.1 Viewing And Editing
+=======================
+
+To view a list of files that meet certain criteria, simply run your
+file viewing program with the file names as arguments.  Shells
+substitute a command enclosed in backquotes with its output, so the
+whole command looks like this:
+
+     less `find /usr/include -name '*.h' | xargs grep -l mode_t`
+
+You can edit those files by giving an editor name instead of a file
+viewing program:
+
+     emacs `find /usr/include -name '*.h' | xargs grep -l mode_t`
+
+   Because there is a limit to the length of any individual command
+line, there is a limit to the number of files that can be handled in
+this way.  We can get around this difficulty by using xargs like this:
+
+     find /usr/include -name '*.h' | xargs grep -l mode_t > todo
+     xargs --arg-file=todo emacs
+
+   Here, `xargs' will run `emacs' as many times as necessary to visit
+all of the files listed in the file `todo'.  Generating a temporary
+file is not always convenient, though.  This command does much the same
+thing without needing one:
+
+     find /usr/include -name '*.h' | xargs grep -l mode_t |
+     xargs sh -c 'emacs "$@" < /dev/tty' Emacs
+
+   The example above illustrates a useful trick; Using `sh -c' you can
+invoke a shell command from `xargs'.  The `$@' in the command line is
+expanded by the shell to a list of arguments as provided by `xargs'.
+The single quotes in the command line protect the `$@' against
+expansion by your interactive shell (which will normally have no
+arguments and thus expand `$@' to nothing).  The capitalised `Emacs' on
+the command line is used as `$0' by the shell that `xargs' launches.
+
+\1f
+File: find.info,  Node: Archiving,  Next: Cleaning Up,  Prev: Viewing And Editing,  Up: Common Tasks
+
+8.2 Archiving
+=============
+
+You can pass a list of files produced by `find' to a file archiving
+program.  GNU `tar' and `cpio' can both read lists of file names from
+the standard input--either delimited by nulls (the safe way) or by
+blanks (the lazy, risky default way).  To use null-delimited names,
+give them the `--null' option.  You can store a file archive in a file,
+write it on a tape, or send it over a network to extract on another
+machine.
+
+   One common use of `find' to archive files is to send a list of the
+files in a directory tree to `cpio'.  Use `-depth' so if a directory
+does not have write permission for its owner, its contents can still be
+restored from the archive since the directory's permissions are
+restored after its contents.  Here is an example of doing this using
+`cpio'; you could use a more complex `find' expression to archive only
+certain files.
+
+     find . -depth -print0 |
+       cpio --create --null --format=crc --file=/dev/nrst0
+
+   You could restore that archive using this command:
+
+     cpio --extract --null --make-dir --unconditional \
+       --preserve --file=/dev/nrst0
+
+   Here are the commands to do the same things using `tar':
+
+     find . -depth -print0 |
+       tar --create --null --files-from=- --file=/dev/nrst0
+
+     tar --extract --null --preserve-perm --same-owner \
+       --file=/dev/nrst0
+
+   Here is an example of copying a directory from one machine to
+another:
+
+     find . -depth -print0 | cpio -0o -Hnewc |
+       rsh OTHER-MACHINE "cd `pwd` && cpio -i0dum"
+
+\1f
+File: find.info,  Node: Cleaning Up,  Next: Strange File Names,  Prev: Archiving,  Up: Common Tasks
+
+8.3 Cleaning Up
+===============
+
+This section gives examples of removing unwanted files in various
+situations.  Here is a command to remove the CVS backup files created
+when an update requires a merge:
+
+     find . -name '.#*' -print0 | xargs -0r rm -f
+
+   If your `find' command removes directories, you may find that you
+get a spurious error message when `find' tries to recurse into a
+directory that has now been removed.  Using the `-depth' option will
+normally resolve this problem.
+
+   It is also possible to use the `-delete' action:
+
+     find . -depth -name '.#*' -delete
+
+   You can run this command to clean out your clutter in `/tmp'.  You
+might place it in the file your shell runs when you log out
+(`.bash_logout', `.logout', or `.zlogout', depending on which shell you
+use).
+
+     find /tmp -depth -user "$LOGNAME" -type f -delete
+
+   To remove old Emacs backup and auto-save files, you can use a command
+like the following.  It is especially important in this case to use
+null-terminated file names because Emacs packages like the VM mailer
+often create temporary file names with spaces in them, like `#reply to
+David J. MacKenzie<1>#'.
+
+     find ~ \( -name '*~' -o -name '#*#' \) -print0 |
+       xargs --no-run-if-empty --null rm -vf
+
+   Removing old files from `/tmp' is commonly done from `cron':
+
+     find /tmp /var/tmp -depth -not        -type d -mtime +3 -delete
+     find /tmp /var/tmp -depth -mindepth 1 -type d -empty    -delete
+
+   The second `find' command above cleans out empty directories
+depth-first (`-delete' implies `-depth' anyway), hoping that the
+parents become empty and can be removed too.  It uses `-mindepth' to
+avoid removing `/tmp' itself if it becomes totally empty.
+
+   Lastly, an example of a program that almost certainly does not do
+what the user intended:
+
+     find dirname -delete -name quux
+
+   If the user hoped to delete only files named `quux' they will get an
+unpleasant surprise; this command will attempt to delete everything at
+or below the starting point `dirname'.  This is because `find'
+evaluates the items on the command line as an expression.  The `find'
+program will normally execute an action if the preceding action
+succeeds.  Here, there is no action or test before the `-delete' so it
+will always be executed.  The `-name quux' test will be performed for
+files we successfully deleted, but that test has no effect since
+`-delete' also disables the default `-print' operation.   So the above
+example will probably delete a lot of files the user didn't want to
+delete.
+
+   This command is also likely to do something you did not intend:
+     find dirname -path dirname/foo -prune -o -delete
+
+   Because `-delete' turns on `-depth', the `-prune' action has no
+effect and files in `dirname/foo' will be deleted too.
+
+\1f
+File: find.info,  Node: Strange File Names,  Next: Fixing Permissions,  Prev: Cleaning Up,  Up: Common Tasks
+
+8.4 Strange File Names
+======================
+
+`find' can help you remove or rename a file with strange characters in
+its name.  People are sometimes stymied by files whose names contain
+characters such as spaces, tabs, control characters, or characters with
+the high bit set.  The simplest way to remove such files is:
+
+     rm -i SOME*PATTERN*THAT*MATCHES*THE*PROBLEM*FILE
+
+   `rm' asks you whether to remove each file matching the given
+pattern.  If you are using an old shell, this approach might not work
+if the file name contains a character with the high bit set; the shell
+may strip it off.  A more reliable way is:
+
+     find . -maxdepth 1 TESTS -okdir rm '{}' \;
+
+where TESTS uniquely identify the file.  The `-maxdepth 1' option
+prevents `find' from wasting time searching for the file in any
+subdirectories; if there are no subdirectories, you may omit it.  A
+good way to uniquely identify the problem file is to figure out its
+inode number; use
+
+     ls -i
+
+   Suppose you have a file whose name contains control characters, and
+you have found that its inode number is 12345.  This command prompts
+you for whether to remove it:
+
+     find . -maxdepth 1 -inum 12345 -okdir rm -f '{}' \;
+
+   If you don't want to be asked, perhaps because the file name may
+contain a strange character sequence that will mess up your screen when
+printed, then use `-execdir' instead of `-okdir'.
+
+   If you want to rename the file instead, you can use `mv' instead of
+`rm':
+
+     find . -maxdepth 1 -inum 12345 -okdir mv '{}' NEW-FILE-NAME \;
+
+\1f
+File: find.info,  Node: Fixing Permissions,  Next: Classifying Files,  Prev: Strange File Names,  Up: Common Tasks
+
+8.5 Fixing Permissions
+======================
+
+Suppose you want to make sure that everyone can write to the
+directories in a certain directory tree.  Here is a way to find
+directories lacking either user or group write permission (or both),
+and fix their permissions:
+
+     find . -type d -not -perm -ug=w | xargs chmod ug+w
+
+You could also reverse the operations, if you want to make sure that
+directories do _not_ have world write permission.
+
+\1f
+File: find.info,  Node: Classifying Files,  Prev: Fixing Permissions,  Up: Common Tasks
+
+8.6 Classifying Files
+=====================
+
+If you want to classify a set of files into several groups based on
+different criteria, you can use the comma operator to perform multiple
+independent tests on the files.  Here is an example:
+
+     find / -type d \( -perm -o=w -fprint allwrite , \
+       -perm -o=x -fprint allexec \)
+
+     echo "Directories that can be written to by everyone:"
+     cat allwrite
+     echo ""
+     echo "Directories with search permissions for everyone:"
+     cat allexec
+
+   `find' has only to make one scan through the directory tree (which
+is one of the most time consuming parts of its work).
+
+\1f
+File: find.info,  Node: Worked Examples,  Next: Security Considerations,  Prev: Common Tasks,  Up: Top
+
+9 Worked Examples
+*****************
+
+The tools in the findutils package, and in particular `find', have a
+large number of options.  This means that quite often, there is more
+than one way to do things.  Some of the options and facilities only
+exist for compatibility with other tools, and findutils provides
+improved ways of doing things.
+
+   This chapter describes a number of useful tasks that are commonly
+performed, and compares the different ways of achieving them.
+
+* Menu:
+
+* Deleting Files::
+* Copying A Subset of Files::
+* Updating A Timestamp File::
+* Finding the Shallowest Instance::
+
+\1f
+File: find.info,  Node: Deleting Files,  Next: Copying A Subset of Files,  Up: Worked Examples
+
+9.1 Deleting Files
+==================
+
+One of the most common tasks that `find' is used for is locating files
+that can be deleted.  This might include:
+
+   * Files last modified more than 3 years ago which haven't been
+     accessed for at least 2 years
+
+   * Files belonging to a certain user
+
+   * Temporary files which are no longer required
+
+   This example concentrates on the actual deletion task rather than on
+sophisticated ways of locating the files that need to be deleted.
+We'll assume that the files we want to delete are old files underneath
+`/var/tmp/stuff'.
+
+9.1.1 The Traditional Way
+-------------------------
+
+The traditional way to delete files in `/var/tmp/stuff' that have not
+been modified in over 90 days would have been:
+
+     find /var/tmp/stuff -mtime +90 -exec /bin/rm {} \;
+
+   The above command uses `-exec' to run the `/bin/rm' command to
+remove each file.  This approach works and in fact would have worked in
+Version 7 Unix in 1979.  However, there are a number of problems with
+this approach.
+
+   The most obvious problem with the approach above is that it causes
+`find' to fork every time it finds a file that needs to delete, and the
+child process then has to use the `exec' system call to launch
+`/bin/rm'.   All this is quite inefficient.  If we are going to use
+`/bin/rm' to do this job, it is better to make it delete more than one
+file at a time.
+
+   The most obvious way of doing this is to use the shell's command
+expansion feature:
+
+     /bin/rm `find /var/tmp/stuff -mtime +90 -print`
+   or you could use the more modern form
+     /bin/rm $(find /var/tmp/stuff -mtime +90 -print)
+
+   The commands above are much more efficient than the first attempt.
+However, there is a problem with them.  The shell has a maximum command
+length which is imposed by the operating system (the actual limit
+varies between systems).  This means that while the command expansion
+technique will usually work, it will suddenly fail when there are lots
+of files to delete.  Since the task is to delete unwanted files, this
+is precisely the time we don't want things to go wrong.
+
+9.1.2 Making Use of xargs
+-------------------------
+
+So, is there a way to be more efficient in the use of `fork()' and
+`exec()' without running up against this limit?  Yes, we can be almost
+optimally efficient by making use of the `xargs' command.  The `xargs'
+command reads arguments from its standard input and builds them into
+command lines.  We can use it like this:
+
+     find /var/tmp/stuff -mtime +90 -print | xargs /bin/rm
+
+   For example if the files found by `find' are `/var/tmp/stuff/A',
+`/var/tmp/stuff/B' and `/var/tmp/stuff/C' then `xargs' might issue the
+commands
+
+     /bin/rm /var/tmp/stuff/A /var/tmp/stuff/B
+     /bin/rm /var/tmp/stuff/C
+
+   The above assumes that `xargs' has a very small maximum command line
+length.  The real limit is much larger but the idea is that `xargs'
+will run `/bin/rm' as many times as necessary to get the job done,
+given the limits on command line length.
+
+   This usage of `xargs' is pretty efficient, and the `xargs' command
+is widely implemented (all modern versions of Unix offer it).  So far
+then, the news is all good.  However, there is bad news too.
+
+9.1.3 Unusual characters in filenames
+-------------------------------------
+
+Unix-like systems allow any characters to appear in file names with the
+exception of the ASCII NUL character and the slash.  Slashes can occur
+in path names (as the directory separator) but not in the names of
+actual directory entries.  This means that the list of files that
+`xargs' reads could in fact contain white space characters -- spaces,
+tabs and newline characters.  Since by default, `xargs' assumes that
+the list of files it is reading uses white space as an argument
+separator, it cannot correctly handle the case where a filename
+actually includes white space.  This makes the default behaviour of
+`xargs' almost useless for handling arbitrary data.
+
+   To solve this problem, GNU findutils introduced the `-print0' action
+for `find'.  This uses the ASCII NUL character to separate the entries
+in the file list that it produces.  This is the ideal choice of
+separator since it is the only character that cannot appear within a
+path name.  The `-0' option to `xargs' makes it assume that arguments
+are separated with ASCII NUL instead of white space.  It also turns off
+another misfeature in the default behaviour of `xargs', which is that
+it pays attention to quote characters in its input.  Some versions of
+`xargs' also terminate when they see a lone `_' in the input, but GNU
+`find' no longer does that (since it has become an optional behaviour
+in the Unix standard).
+
+   So, putting `find -print0' together with `xargs -0' we get this
+command:
+
+     find /var/tmp/stuff -mtime +90 -print0 | xargs -0 /bin/rm
+
+   The result is an efficient way of proceeding that correctly handles
+all the possible characters that could appear in the list of files to
+delete.  This is good news.  However, there is, as I'm sure you're
+expecting, also more bad news.  The problem is that this is not a
+portable construct; although other versions of Unix (notably
+BSD-derived ones) support `-print0', it's not universal.  So, is there
+a more universal mechanism?
+
+9.1.4 Going back to -exec
+-------------------------
+
+There is indeed a more universal mechanism, which is a slight
+modification to the `-exec' action.  The normal `-exec' action assumes
+that the command to run is terminated with a semicolon (the semicolon
+normally has to be quoted in order to protect it from interpretation as
+the shell command separator).  The SVR4 edition of Unix introduced a
+slight variation, which involves terminating the command with `+'
+instead:
+
+     find /var/tmp/stuff -mtime +90 -exec /bin/rm {} \+
+
+   The above use of `-exec' causes `find' to build up a long command
+line and then issue it.  This can be less efficient than some uses of
+`xargs'; for example `xargs' allows new command lines to be built up
+while the previous command is still executing, and allows you to
+specify a number of commands to run in parallel.  However, the `find
+... -exec ... +' construct has the advantage of wide portability.  GNU
+findutils did not support `-exec ... +' until version 4.2.12; one of
+the reasons for this is that it already had the `-print0' action in any
+case.
+
+9.1.5 A more secure version of -exec
+------------------------------------
+
+The command above seems to be efficient and portable.  However, within
+it lurks a security problem.  The problem is shared with all the
+commands we've tried in this worked example so far, too.  The security
+problem is a race condition; that is, if it is possible for somebody to
+manipulate the filesystem that you are searching while you are
+searching it, it is possible for them to persuade your `find' command
+to cause the deletion of a file that you can delete but they normally
+cannot.
+
+   The problem occurs because the `-exec' action is defined by the
+POSIX standard to invoke its command with the same working directory as
+`find' had when it was started.  This means that the arguments which
+replace the {} include a relative path from `find''s starting point
+down the file that needs to be deleted.  For example,
+
+     find /var/tmp/stuff -mtime +90 -exec /bin/rm {} \+
+
+   might actually issue the command:
+
+     /bin/rm /var/tmp/stuff/A /var/tmp/stuff/B /var/tmp/stuff/passwd
+
+   Notice the file `/var/tmp/stuff/passwd'.  Likewise, the command:
+
+     cd /var/tmp && find stuff -mtime +90 -exec /bin/rm {} \+
+
+   might actually issue the command:
+
+     /bin/rm stuff/A stuff/B stuff/passwd
+
+   If an attacker can rename `stuff' to something else (making use of
+their write permissions in `/var/tmp') they can replace it with a
+symbolic link to `/etc'.  That means that the `/bin/rm' command will be
+invoked on `/etc/passwd'.  If you are running your `find' command as
+root, the attacker has just managed to delete a vital file.  All they
+needed to do to achieve this was replace a subdirectory with a symbolic
+link at the vital moment.
+
+   There is however, a simple solution to the problem.  This is an
+action which works a lot like `-exec' but doesn't need to traverse a
+chain of directories to reach the file that it needs to work on.  This
+is the `-execdir' action, which was introduced by the BSD family of
+operating systems.   The command,
+
+     find /var/tmp/stuff -mtime +90 -execdir /bin/rm {} \+
+
+   might delete a set of files by performing these actions:
+
+  1. Change directory to /var/tmp/stuff/foo
+
+  2. Invoke `/bin/rm ./file1 ./file2 ./file3'
+
+  3. Change directory to /var/tmp/stuff/bar
+
+  4. Invoke `/bin/rm ./file99 ./file100 ./file101'
+
+   This is a much more secure method.  We are no longer exposed to a
+race condition.  For many typical uses of `find', this is the best
+strategy.   It's reasonably efficient, but the length of the command
+line is limited not just by the operating system limits, but also by
+how many files we actually need to delete from each directory.
+
+   Is it possible to do any better?   In the case of general file
+processing, no.  However, in the specific case of deleting files it is
+indeed possible to do better.
+
+9.1.6 Using the -delete action
+------------------------------
+
+The most efficient and secure method of solving this problem is to use
+the `-delete' action:
+
+     find /var/tmp/stuff -mtime +90 -delete
+
+   This alternative is more efficient than any of the `-exec' or
+`-execdir' actions, since it entirely avoids the overhead of forking a
+new process and using `exec' to run `/bin/rm'.  It is also normally
+more efficient than `xargs' for the same reason.   The file deletion is
+performed from the directory containing the entry to be deleted, so the
+`-delete' action has the same security advantages as the `-execdir'
+action has.
+
+   The `-delete' action was introduced by the BSD family of operating
+systems.
+
+9.1.7 Improving things still further
+------------------------------------
+
+Is it possible to improve things still further?  Not without either
+modifying the system library to the operating system or having more
+specific knowledge of the layout of the filesystem and disk I/O
+subsystem, or both.
+
+   The `find' command traverses the filesystem, reading directories.
+It then issues a separate system call for each file to be deleted.  If
+we could modify the operating system, there are potential gains that
+could be made:
+
+   * We could have a system call to which we pass more than one filename
+     for deletion
+
+   * Alternatively, we could pass in a list of inode numbers (on
+     GNU/Linux systems, `readdir()' also returns the inode number of
+     each directory entry) to be deleted.
+
+   The above possibilities sound interesting, but from the kernel's
+point of view it is difficult to enforce standard Unix access controls
+for such processing by inode number.  Such a facility would probably
+need to be restricted to the superuser.
+
+   Another way of improving performance would be to increase the
+parallelism of the process.  For example if the directory hierarchy we
+are searching is actually spread across a number of disks, we might
+somehow be able to arrange for `find' to process each disk in parallel.
+In practice GNU `find' doesn't have such an intimate understanding of
+the system's filesystem layout and disk I/O subsystem.
+
+   However, since the system administrator can have such an
+understanding they can take advantage of it like so:
+
+     find /var/tmp/stuff1 -mtime +90 -delete &
+     find /var/tmp/stuff2 -mtime +90 -delete &
+     find /var/tmp/stuff3 -mtime +90 -delete &
+     find /var/tmp/stuff4 -mtime +90 -delete &
+     wait
+
+   In the example above, four separate instances of `find' are used to
+search four subdirectories in parallel.  The `wait' command simply
+waits for all of these to complete.  Whether this approach is more or
+less efficient than a single instance of `find' depends on a number of
+things:
+
+   * Are the directories being searched in parallel actually on separate
+     disks?  If not, this parallel search might just result in a lot of
+     disk head movement and so the speed might even be slower.
+
+   * Other activity - are other programs also doing things on those
+     disks?
+
+9.1.8 Conclusion
+----------------
+
+The fastest and most secure way to delete files with the help of `find'
+is to use `-delete'.  Using `xargs -0 -P N' can also make effective use
+of the disk, but it is not as secure.
+
+   In the case where we're doing things other than deleting files, the
+most secure alternative is `-execdir ... +', but this is not as
+portable as the insecure action `-exec ... +'.
+
+   The `-delete' action is not completely portable, but the only other
+possibility which is as secure (`-execdir') is no more portable.  The
+most efficient portable alternative is `-exec ...+', but this is
+insecure and isn't supported by versions of GNU findutils prior to
+4.2.12.
+
+\1f
+File: find.info,  Node: Copying A Subset of Files,  Next: Updating A Timestamp File,  Prev: Deleting Files,  Up: Worked Examples
+
+9.2 Copying A Subset of Files
+=============================
+
+Suppose you want to copy some files from `/source-dir' to `/dest-dir',
+but there are a small number of files in `/source-dir' you don't want
+to copy.
+
+   One option of course is `cp /source-dir /dest-dir' followed by
+deletion of the unwanted material under `/dest-dir'.  But often that
+can be inconvenient, because for example we would have copied a large
+amount of extraneous material, or because `/dest-dir' is too small.
+Naturally there are many other possible reasons why this strategy may
+be unsuitable.
+
+   So we need to have some way of identifying which files we want to
+copy, and we need to have a way of copying that file list.  The second
+part of this condition is met by `cpio -p'.  Of course, we can identify
+the files we wish to copy by using `find'.  Here is a command that
+solves our problem:
+
+     cd /source-dir
+     find . -name '.snapshot' -prune -o \( \! -name '*~' -print0 \) |
+     cpio -pmd0   /dest-dir
+
+   The first part of the `find' command here identifies files or
+directories named `.snapshot' and tells `find' not to recurse into them
+(since they do not need to be copied).  The combination `-name
+'.snapshot' -prune' yields false for anything that didn't get pruned,
+but it is exactly those files we want to copy.  Therefore we need to
+use an OR (`-o') condition to introduce the rest of our expression.
+The remainder of the expression simply arranges for the name of any
+file not ending in `~' to be printed.
+
+   Using `-print0' ensures that white space characters in file names do
+not pose a problem.  The `cpio' command does the actual work of copying
+files.  The program as a whole fails if the `cpio' program returns
+nonzero.  If the `find' command returns non-zero on the other hand, the
+Unix shell will not diagnose a problem (since `find' is not the last
+command in the pipeline).
+
+\1f
+File: find.info,  Node: Updating A Timestamp File,  Next: Finding the Shallowest Instance,  Prev: Copying A Subset of Files,  Up: Worked Examples
+
+9.3 Updating A Timestamp File
+=============================
+
+Suppose we have a directory full of files which is maintained with a
+set of automated tools; perhaps one set of tools updates them and
+another set of tools uses the result.  In this situation, it might be
+useful for the second set of tools to know if the files have recently
+been changed.  It might be useful, for example, to have a 'timestamp'
+file which gives the timestamp on the newest file in the collection.
+
+   We can use `find' to achieve this, but there are several different
+ways to do it.
+
+9.3.1 Updating the Timestamp The Wrong Way
+------------------------------------------
+
+The obvious but wrong answer is just to use `-newer':-
+
+     find subdir -newer timestamp -exec touch -r {} timestamp \;
+
+   This does the right sort of thing but has a bug.  Suppose that two
+files in the subdirectory have been updated, and that these are called
+`file1' and `file2'.  The command above will update `timestamp' with
+the modification time of `file1' or that of `file2', but we don't know
+which one.  Since the timestamps on `file1' and `file2' will in general
+be different, this could well be the wrong value.
+
+   One solution to this problem is to modify `find' to recheck the
+modification time of `timestamp' every time a file is to be compared
+against it, but that will reduce the performance of `find'.
+
+9.3.2 Using the test utility to compare timestamps
+--------------------------------------------------
+
+The `test' command can be used to compare timestamps:
+
+     find subdir -exec test {} -nt timestamp \; -exec touch -r {} timestamp \;
+
+   This will ensure that any changes made to the modification time of
+`timestamp' that take place during the execution of `find' are taken
+into account.  This resolves our earlier problem, but unfortunately
+this runs much more slowly.
+
+9.3.3 A combined approach
+-------------------------
+
+We can of course still use `-newer' to cut down on the number of calls
+to `test':
+
+     find subdir -newer timestamp -and \
+          -exec test {} -nt timestamp \; -and \
+          -exec touch -r {} timestamp \;
+
+   Here, the `-newer' test excludes all the files which are definitely
+older than the timestamp, but all the files which are newer than the
+old value of the timestamp are compared against the current updated
+timestamp.
+
+   This is indeed faster in general, but the speed difference will
+depend on how many updated files there are.
+
+9.3.4 Using -printf and sort to compare timestamps
+--------------------------------------------------
+
+It is possible to use the `-printf' action to abandon the use of `test'
+entirely:
+
+     newest=$(find subdir -newer timestamp -printf "%A%p\n" |
+                sort -n |
+                tail -1 |
+                cut -d: -f2- )
+     touch -r "${newest:-timestamp}" timestamp
+
+   The command above works by generating a list of the timestamps and
+names of all the files which are newer than the timestamp.  The `sort',
+`tail' and `cut' commands simply pull out the name of the file with the
+largest timestamp value (that is, the latest file).  The `touch'
+command is then used to update the timestamp,
+
+   The `"${newest:-timestamp}"' expression simply expands to the value
+of `$newest' if that variable is set, but to `timestamp' otherwise.
+This ensures that an argument is always given to the `-r' option of the
+`touch' command.
+
+   This approach seems quite efficient, but unfortunately it has a
+problem.  Many operating systems now keep file modification time
+information at a granularity which is finer than one second.  Findutils
+version 4.3.3 and later will print a fractional part with %A@, but
+older versions will not.
+
+9.3.5 Solving the problem with make
+-----------------------------------
+
+Another tool which often works with timestamps is `make'.  We can use
+`find' to generate a `Makefile' file on the fly and then use `make' to
+update the timestamps:
+
+     makefile=$(mktemp)
+     find subdir \
+       \( \! -xtype l \) \
+       -newer timestamp \
+       -printf "timestamp:: %p\n\ttouch -r %p timestamp\n\n" > "$makefile"
+     make -f "$makefile"
+     rm   -f "$makefile"
+
+   Unfortunately although the solution above is quite elegant, it fails
+to cope with white space within file names, and adjusting it to do so
+would require a rather complex shell script.
+
+9.3.6 Coping with odd filenames too
+-----------------------------------
+
+We can fix both of these problems (looping and problems with white
+space), and do things more efficiently too.  The following command
+works with newlines and doesn't need to sort the list of filenames.
+
+     find subdir -newer timestamp -printf "%A@:%p\0" |
+        perl -0 newest.pl |
+        xargs --no-run-if-empty --null -i \
+           find {} -maxdepth 0 -newer timestamp -exec touch -r {} timestamp \;
+
+   The first `find' command generates a list of files which are newer
+than the original timestamp file, and prints a list of them with their
+timestamps.  The `newest.pl' script simply filters out all the
+filenames which have timestamps which are older than whatever the
+newest file is:-
+
+     #! /usr/bin/perl -0
+     my @newest = ();
+     my $latest_stamp = undef;
+     while (<>) {
+         my ($stamp, $name) = split(/:/);
+         if (!defined($latest_stamp) || ($tstamp > $latest_stamp)) {
+             $latest_stamp = $stamp;
+             @newest = ();
+         }
+         if ($tstamp >= $latest_stamp) {
+             push @newest, $name;
+         }
+     }
+     print join("\0", @newest);
+
+   This prints a list of zero or more files, all of which are newer than
+the original timestamp file, and which have the same timestamp as each
+other, to the nearest second.  The second `find' command takes each
+resulting file one at a time, and if that is newer than the timestamp
+file, the timestamp is updated.
+
+\1f
+File: find.info,  Node: Finding the Shallowest Instance,  Prev: Updating A Timestamp File,  Up: Worked Examples
+
+9.4 Finding the Shallowest Instance
+===================================
+
+Suppose you maintain local copies of sources from various projects,
+each with their own choice of directory organisation and source code
+management (SCM) tool.  You need to periodically synchronize each
+project with its upstream tree.  As the number local repositories
+grows, so does the work involved in maintaining synchronization.  SCM
+utilities typically create some sort of administrative directory: .svn
+for Subversion, CVS for CVS, and so on.  These directories can be used
+as a key to search for the bases of the project source trees.  Suppose
+we have the following directory structure:
+
+     repo/project1/CVS
+     repo/gnu/project2/.svn
+     repo/gnu/project3/.svn
+     repo/gnu/project3/src/.svn
+     repo/gnu/project3/doc/.svn
+     repo/project4/.git
+
+   One would expect to update each of the `projectX' directories, but
+not their subdirectories (src, doc, etc.).  To locate the project
+roots, we would need to find the least deeply nested directories
+containing an SCM-related subdirectory.  The following command
+discovers those roots efficiently.  It is efficient because it avoids
+searching subdirectories inside projects whose SCM directory we already
+found.
+
+     find repo/ \
+     -exec test -d {}/.svn \; -or \
+     -exec test -d {}/.git \; -or \
+     -exec test -d {}/CVS \; -print -prune
+
+   In this example, `test' is used to tell if we are currently
+examining a directory which appears to the a project's root directory
+(because it has an SCM subdirectory).  When we find a project root,
+there is no need to search inside it, and `-prune' makes sure that we
+descend no further.
+
+   For large, complex trees like the Linux kernel, this will prevent
+searching a large portion of the structure, saving a good deal of time.
+
+\1f
+File: find.info,  Node: Security Considerations,  Next: Error Messages,  Prev: Worked Examples,  Up: Top
+
+10 Security Considerations
+**************************
+
+Security considerations are important if you are using `find' or
+`xargs' to search for or process files that don't belong to you or
+which other people have control.  Security considerations relating to
+`locate' may also apply if you have files which you do not want others
+to see.
+
+   The most severe forms of security problems affecting `find' and
+related programs are when third parties bring about a situation
+allowing them to do something they would normally not be able to
+accomplish.  This is called _privilege elevation_.  This might include
+deleting files they would not normally be able to delete.  It is common
+for the operating system to periodically invoke `find' for
+self-maintenance purposes.  These invocations of `find' are
+particularly problematic from a security point of view as these are
+often invoked by the superuser and search the entire filesystem
+hierarchy.  Generally, the severity of any associated problem depends
+on what the system is going to do with the files found by `find'.
+
+* Menu:
+
+* Levels of Risk::      What is your level of exposure to security problems?
+* Security Considerations for find::  Security problems with find
+* Security Considerations for xargs:: Security problems with xargs
+* Security Considerations for locate:: Security problems with locate
+* Security Summary:: That was all very complex, what does it boil down to?
+* Further Reading on Security::
+
+\1f
+File: find.info,  Node: Levels of Risk,  Next: Security Considerations for find,  Up: Security Considerations
+
+10.1 Levels of Risk
+===================
+
+There are some security risks inherent in the use of `find', `xargs'
+and (to a lesser extent) `locate'.  The severity of these risks depends
+on what sort of system you are using:
+
+*High risk*
+     Multi-user systems where you do not control (or trust) the other
+     users, and on which you execute `find', including areas where
+     those other users can manipulate the filesystem (for example
+     beneath `/home' or `/tmp').
+
+*Medium Risk*
+     Systems where the actions of other users can create file names
+     chosen by them, but to which they don't have access while `find' is
+     being run.  This access might include leaving programs running
+     (shell background jobs, `at' or `cron' tasks, for example).  On
+     these sorts of systems, carefully written commands (avoiding use of
+     `-print' for example) should not expose you to a high degree of
+     risk.  Most systems fall into this category.
+
+*Low Risk*
+     Systems to which untrusted parties do not have access, cannot
+     create file names of their own choice (even remotely) and which
+     contain no security flaws which might enable an untrusted third
+     party to gain access.  Most systems do not fall into this category
+     because there are many ways in which external parties can affect
+     the names of files that are created on your system.  The system on
+     which I am writing this for example automatically downloads
+     software updates from the Internet; the names of the files in
+     which these updates exist are chosen by third parties(1).
+
+   In the discussion above, "risk" denotes the likelihood that someone
+can cause `find', `xargs', `locate' or some other program which is
+controlled by them to do something you did not intend.  The levels of
+risk suggested do not take any account of the consequences of this sort
+of event.  That is, if you operate a "low risk" type system, but the
+consequences of a security problem are disastrous, then you should
+still give serious thought to all the possible security problems, many
+of which of course will not be discussed here - this section of the
+manual is intended to be informative but not comprehensive or
+exhaustive.
+
+   If you are responsible for the operation of a system where the
+consequences of a security problem could be very important, you should
+do two things:-
+
+  1. Define a security policy which defines who is allowed to do what
+     on your system.
+
+  2. Seek competent advice on how to enforce your policy, detect
+     breaches of that policy, and take account of any potential problems
+     that might fall outside the scope of your policy.
+
+   ---------- Footnotes ----------
+
+   (1) Of course, I trust these parties to a large extent anyway,
+because I install software provided by them; I choose to trust them in
+this way, and that's a deliberate choice
+
+\1f
+File: find.info,  Node: Security Considerations for find,  Next: Security Considerations for xargs,  Prev: Levels of Risk,  Up: Security Considerations
+
+10.2 Security Considerations for `find'
+=======================================
+
+Some of the actions `find' might take have a direct effect; these
+include `-exec' and `-delete'.  However, it is also common to use
+`-print' explicitly or implicitly, and so if `find' produces the wrong
+list of file names, that can also be a security problem; consider the
+case for example where `find' is producing a list of files to be
+deleted.
+
+   We normally assume that the `find' command line expresses the file
+selection criteria and actions that the user had in mind - that is, the
+command line is "trusted" data.
+
+   From a security analysis point of view, the output of `find' should
+be correct; that is, the output should contain only the names of those
+files which meet the user's criteria specified on the command line.
+This applies for the `-exec' and `-delete' actions; one can consider
+these to be part of the output.
+
+   On the other hand, the contents of the filesystem can be manipulated
+by other people, and hence we regard this as "untrusted" data.  This
+implies that the `find' command line is a filter which converts the
+untrusted contents of the filesystem into a correct list of output
+files.
+
+   The filesystem will in general change while `find' is searching it;
+in fact, most of the potential security problems with `find' relate to
+this issue in some way.
+
+   "Race conditions" are a general class of security problem where the
+relative ordering of actions taken by `find' (for example) and
+something else are critically important in getting the correct and
+expected result(1) .
+
+   For `find', an attacker might move or rename files or directories in
+the hope that an action might be taken against a file which was not
+normally intended to be affected.  Alternatively, this sort of attack
+might be intended to persuade `find' to search part of the filesystem
+which would not normally be included in the search (defeating the
+`-prune' action for example).
+
+* Menu:
+
+* Problems with -exec and filenames::
+* Changing the Current Working Directory::
+* Race Conditions with -exec::
+* Race Conditions with -print and -print0::
+
+   ---------- Footnotes ----------
+
+   (1) This is more or less the definition of the term "race condition"
+
+\1f
+File: find.info,  Node: Problems with -exec and filenames,  Next: Changing the Current Working Directory,  Up: Security Considerations for find
+
+10.2.1 Problems with -exec and filenames
+----------------------------------------
+
+It is safe in many cases to use the `-execdir' action with any file
+name.  Because `-execdir' prefixes the arguments it passes to programs
+with `./', you will not accidentally pass an argument which is
+interpreted as an option.  For example the file `-f' would be passed to
+`rm' as `./-f', which is harmless.
+
+   However, your degree of safety does depend on the nature of the
+program you are running.  For example constructs such as these two
+commands
+
+     # risky
+     find -exec sh -c "something {}" \;
+     find -execdir sh -c "something {}" \;
+
+   are very dangerous.  The reason for this is that the `{}' is
+expanded to a filename which might contain a semicolon or other
+characters special to the shell.  If for example someone creates the
+file `/tmp/foo; rm -rf $HOME' then the two commands above could delete
+someone's home directory.
+
+   So for this reason do not run any command which will pass untrusted
+data (such as the names of files) to commands which interpret arguments
+as commands to be further interpreted (for example `sh').
+
+   In the case of the shell, there is a clever workaround for this
+problem:
+
+     # safer
+     find -exec sh -c 'something "$@"' sh {} \;
+     find -execdir sh -c 'something "$@"' sh {}\;
+
+   This approach is not guaranteed to avoid every problem, but it is
+much safer than substituting data of an attacker's choice into the text
+of a shell command.
+
+\1f
+File: find.info,  Node: Changing the Current Working Directory,  Next: Race Conditions with -exec,  Prev: Problems with -exec and filenames,  Up: Security Considerations for find
+
+10.2.2 Changing the Current Working Directory
+---------------------------------------------
+
+As `find' searches the filesystem, it finds subdirectories and then
+searches within them by changing its working directory.  First, `find'
+reaches and recognises a subdirectory.  It then decides if that
+subdirectory meets the criteria for being searched; that is, any
+`-xdev' or `-prune' expressions are taken into account.  The `find'
+program will then change working directory and proceed to search the
+directory.
+
+   A race condition attack might take the form that once the checks
+relevant to `-xdev' and `-prune' have been done, an attacker might
+rename the directory that was being considered, and put in its place a
+symbolic link that actually points somewhere else.
+
+   The idea behind this attack is to fool `find' into going into the
+wrong directory.  This would leave `find' with a working directory
+chosen by an attacker, bypassing any protection apparently provided by
+`-xdev' and `-prune', and any protection provided by being able to
+_not_ list particular directories on the `find' command line.  This
+form of attack is particularly problematic if the attacker can predict
+when the `find' command will be run, as is the case with `cron' tasks
+for example.
+
+   GNU `find' has specific safeguards to prevent this general class of
+problem.  The exact form of these safeguards depends on the properties
+of your system.
+
+* Menu:
+
+* O_NOFOLLOW::                     Safely changing directory using fchdir().
+* Systems without O_NOFOLLOW::     Checking for symbolic links after chdir().
+
+\1f
+File: find.info,  Node: O_NOFOLLOW,  Next: Systems without O_NOFOLLOW,  Up: Changing the Current Working Directory
+
+10.2.2.1 O_NOFOLLOW
+...................
+
+If your system supports the O_NOFOLLOW flag (1) to the `open(2)' system
+call, `find' uses it to safely change directories.  The target
+directory is first opened and then `find' changes working directory
+with the `fchdir()' system call.  This ensures that symbolic links are
+not followed, preventing the sort of race condition attack in which use
+is made of symbolic links.
+
+   If for any reason this approach does not work, `find' will fall back
+on the method which is normally used if O_NOFOLLOW is not supported.
+
+   You can tell if your system supports O_NOFOLLOW by running
+
+     find --version
+
+   This will tell you the version number and which features are enabled.
+For example, if I run this on my system now, this gives:
+     GNU find version 4.2.18-CVS
+     Features enabled: D_TYPE O_NOFOLLOW(enabled)
+
+   Here, you can see that I am running a version of `find' which was
+built from the development (CVS) code prior to the release of
+findutils-4.2.18, and that the D_TYPE and O_NOFOLLOW features are
+present.  O_NOFOLLOW is qualified with "enabled".  This simply means
+that the current system seems to support O_NOFOLLOW.  This check is
+needed because it is possible to build `find' on a system that defines
+O_NOFOLLOW and then run it on a system that ignores the O_NOFOLLOW
+flag.  We try to detect such cases at startup by checking the operating
+system and version number; when this happens you will see
+"O_NOFOLLOW(disabled)" instead.
+
+   ---------- Footnotes ----------
+
+   (1) GNU/Linux (kernel version 2.1.126 and later) and FreeBSD
+(3.0-CURRENT and later) support this
+
+\1f
+File: find.info,  Node: Systems without O_NOFOLLOW,  Prev: O_NOFOLLOW,  Up: Changing the Current Working Directory
+
+10.2.2.2 Systems without O_NOFOLLOW
+...................................
+
+The strategy for preventing this type of problem on systems that lack
+support for the O_NOFOLLOW flag is more complex.  Each time `find'
+changes directory, it examines the directory it is about to move to,
+issues the `chdir()' system call, and then checks that it has ended up
+in the subdirectory it expected.  If all is as expected, processing
+continues as normal.  However, there are two main reasons why the
+directory might change: the use of an automounter and the someone
+removing the old directory and replacing it with something else while
+`find' is trying to descend into it.
+
+   Where a filesystem "automounter" is in use it can be the case that
+the use of the `chdir()' system call can itself cause a new filesystem
+to be mounted at that point.  On systems that do not support
+O_NOFOLLOW, this will cause `find''s security check to fail.
+
+   However, this does not normally represent a security problem, since
+the automounter configuration is normally set up by the system
+administrator.  Therefore, if the `chdir()' sanity check fails, `find'
+will make one more attempt(1).  If that succeeds, execution carries on
+as normal.  This is the usual case for automounters.
+
+   Where an attacker is trying to exploit a race condition, the problem
+may not have gone away on the second attempt.  If this is the case,
+`find' will issue a warning message and then ignore that subdirectory.
+When this happens, actions such as `-exec' or `-print' may already have
+taken place for the problematic subdirectory.  This is because `find'
+applies tests and actions to directories before searching within them
+(unless `-depth' was specified).
+
+   Because of the nature of the directory-change operation and security
+check, in the worst case the only things that `find' would have done
+with the directory are to move into it and back out to the original
+parent.  No operations would have been performed within that directory.
+
+   ---------- Footnotes ----------
+
+   (1) This may not be the case for the fts-based executable
+
+\1f
+File: find.info,  Node: Race Conditions with -exec,  Next: Race Conditions with -print and -print0,  Prev: Changing the Current Working Directory,  Up: Security Considerations for find
+
+10.2.3 Race Conditions with -exec
+---------------------------------
+
+The `-exec' action causes another program to be run.  It passes to the
+program the name of the file which is being considered at the time.
+The invoked program will typically then perform some action on that
+file.  Once again, there is a race condition which can be exploited
+here.  We shall take as a specific example the command
+
+     find /tmp -path /tmp/umsp/passwd -exec /bin/rm
+
+   In this simple example, we are identifying just one file to be
+deleted and invoking `/bin/rm' to delete it.  A problem exists because
+there is a time gap between the point where `find' decides that it
+needs to process the `-exec' action and the point where the `/bin/rm'
+command actually issues the `unlink()' system call to delete the file
+from the filesystem.  Within this time period, an attacker can rename
+the `/tmp/umsp' directory, replacing it with a symbolic link to `/etc'.
+There is no way for `/bin/rm' to determine that it is working on the
+same file that `find' had in mind.  Once the symbolic link is in place,
+the attacker has persuaded `find' to cause the deletion of the
+`/etc/passwd' file, which is not the effect intended by the command
+which was actually invoked.
+
+   One possible defence against this type of attack is to modify the
+behaviour of `-exec' so that the `/bin/rm' command is run with the
+argument `./passwd' and a suitable choice of working directory.  This
+would allow the normal sanity check that `find' performs to protect
+against this form of attack too.  Unfortunately, this strategy cannot
+be used as the POSIX standard specifies that the current working
+directory for commands invoked with `-exec' must be the same as the
+current working directory from which `find' was invoked.  This means
+that the `-exec' action is inherently insecure and can't be fixed.
+
+   GNU `find' implements a more secure variant of the `-exec' action,
+`-execdir'.  The `-execdir' action ensures that it is not necessary to
+dereference subdirectories to process target files.  The current
+directory used to invoke programs is the same as the directory in which
+the file to be processed exists (`/tmp/umsp' in our example, and only
+the basename of the file to be processed is passed to the invoked
+command, with a `./' prepended (giving `./passwd' in our example).
+
+   The `-execdir' action refuses to do anything if the current
+directory is included in the $PATH environment variable.  This is
+necessary because `-execdir' runs programs in the same directory in
+which it finds files - in general, such a directory might be writable
+by untrusted users.  For similar reasons, `-execdir' does not allow
+`{}' to appear in the name of the command to be run.
+
+\1f
+File: find.info,  Node: Race Conditions with -print and -print0,  Prev: Race Conditions with -exec,  Up: Security Considerations for find
+
+10.2.4 Race Conditions with -print and -print0
+----------------------------------------------
+
+The `-print' and `-print0' actions can be used to produce a list of
+files matching some criteria, which can then be used with some other
+command, perhaps with `xargs'.  Unfortunately, this means that there is
+an unavoidable time gap between `find' deciding that one or more files
+meet its criteria and the relevant command being executed.  For this
+reason, the `-print' and `-print0' actions are just as insecure as
+`-exec'.
+
+   In fact, since the construction
+
+     find ...  -print | xargs ...
+
+   does not cope correctly with newlines or other "white space" in file
+names, and copes poorly with file names containing quotes, the `-print'
+action is less secure even than `-print0'.
+
+\1f
+File: find.info,  Node: Security Considerations for xargs,  Next: Security Considerations for locate,  Prev: Security Considerations for find,  Up: Security Considerations
+
+10.3 Security Considerations for `xargs'
+========================================
+
+The description of the race conditions affecting the `-print' action of
+`find' shows that `xargs' cannot be secure if it is possible for an
+attacker to modify a filesystem after `find' has started but before
+`xargs' has completed all its actions.
+
+   However, there are other security issues that exist even if it is not
+possible for an attacker to have access to the filesystem in real time.
+Firstly, if it is possible for an attacker to create files with names
+of their choice on the filesystem, then `xargs' is insecure unless the
+`-0' option is used.  If a file with the name
+`/home/someuser/foo/bar\n/etc/passwd' exists (assume that `\n' stands
+for a newline character), then `find ... -print' can be persuaded to
+print three separate lines:
+
+     /home/someuser/foo/bar
+
+     /etc/passwd
+
+   If it finds a blank line in the input, `xargs' will ignore it.
+Therefore, if some action is to be taken on the basis of this list of
+files, the `/etc/passwd' file would be included even if this was not
+the intent of the person running find.  There are circumstances in
+which an attacker can use this to their advantage.  The same
+consideration applies to file names containing ordinary spaces rather
+than newlines, except that of course the list of file names will no
+longer contain an "extra" newline.
+
+   This problem is an unavoidable consequence of the default behaviour
+of the `xargs' command, which is specified by the POSIX standard.  The
+only ways to avoid this problem are either to avoid all use of `xargs'
+in favour for example of `find -exec' or (where available) `find
+-execdir', or to use the `-0' option, which ensures that `xargs'
+considers file names to be separated by ASCII NUL characters rather
+than whitespace.  However, useful as this option is, the POSIX standard
+does not make it mandatory.
+
+   POSIX also specifies that `xargs' interprets quoting and trailing
+whitespace specially in filenames, too.  This means that using `find
+... -print | xargs ...' can cause the commands run by `xargs' to
+receive a list of file names which is not the same as the list printed
+by `find'.   The interpretation of quotes and trailing whitespace is
+turned off by the `-0' argument to `xargs', which is another reason to
+use that option.
+
+\1f
+File: find.info,  Node: Security Considerations for locate,  Next: Security Summary,  Prev: Security Considerations for xargs,  Up: Security Considerations
+
+10.4 Security Considerations for `locate'
+=========================================
+
+10.4.1 Race Conditions
+----------------------
+
+It is fairly unusual for the output of `locate' to be fed into another
+command.  However, if this were to be done, this would raise the same
+set of security issues as the use of `find ... -print'.  Although the
+problems relating to whitespace in file names can be resolved by using
+`locate''s `-0' option, this still leaves the race condition problems
+associated with `find ... -print0'.  There is no way to avoid these
+problems in the case of `locate'.
+
+10.4.2 Long File Name Bugs with Old-Format Databases
+----------------------------------------------------
+
+Old versions of `locate' have a bug in the way that old-format
+databases are read.  This bug affects the following versions of
+`locate':
+
+  1. All releases prior to 4.2.31
+
+  2. All 4.3.x releases prior to 4.3.7
+
+   The affected versions of `locate' read file names into a
+fixed-length 1026 byte buffer, allocated on the heap.  This buffer is
+not extended if file names are too long to fit into the buffer.  No
+range checking on the length of the filename is performed.  This could
+in theory lead to a privilege escalation attack.  Findutils versions
+4.3.0 to 4.3.6 are also affected.
+
+   On systems using the old database format and affected versions of
+`locate', carefully-chosen long file names could in theory allow
+malicious users to run code of their choice as any user invoking locate.
+
+   If remote users can choose the names of files stored on your system,
+and these files are indexed by `updatedb', this may be a remote
+security vulnerability.  Findutils version 4.2.31 and findutils version
+4.3.7 include fixes for this problem.  The `updatedb', `bigram' and
+`code' programs do no appear to be affected.
+
+   If you are also using GNU coreutils, you can use the following
+command to determine the length of the longest file name on a given
+system:
+
+     find / -print0 | tr -c '\0' 'x' | tr '\0' '\n' | wc -L
+
+   Although this problem is significant, the old database format is not
+the default, and use of the old database format is not common.  Most
+installations and most users will not be affected by this problem.
+
+\1f
+File: find.info,  Node: Security Summary,  Next: Further Reading on Security,  Prev: Security Considerations for locate,  Up: Security Considerations
+
+10.5 Summary
+============
+
+Where untrusted parties can create files on the system, or affect the
+names of files that are created, all uses for `find', `locate' and
+`xargs' have known security problems except the following:
+
+Informational use only
+     Uses where the programs are used to prepare lists of file names
+     upon which no further action will ever be taken.
+
+`-delete'
+     Use of the `-delete' action with `find' to delete files which meet
+     specified criteria
+
+`-execdir'
+     Use of the `-execdir' action with `find' where the `PATH'
+     environment variable contains directories which contain only
+     trusted programs.
+
+\1f
+File: find.info,  Node: Further Reading on Security,  Prev: Security Summary,  Up: Security Considerations
+
+10.6 Further Reading on Security
+================================
+
+While there are a number of books on computer security, there are also
+useful articles on the web that touch on the issues described above:
+
+`http://goo.gl/DAvh'
+     This article describes some of the unfortunate effects of allowing
+     free choice of file names.
+
+`http://cwe.mitre.org/data/definitions/78.html'
+     Describes OS Command Injection
+
+`https://cwe.mitre.org/data/definitions/73.html'
+     Describes problems arising from allowing remote computers to send
+     requests which specify file names of their choice
+
+`http://cwe.mitre.org/data/definitions/116.html'
+     Describes problems relating to encoding file names and escaping
+     characters.  This article is relevant to findutils because for
+     command lines processed via the shell, the encoding and escaping
+     rules are already set by the shell.   For example command lines
+     like `find ... -print | some-shell-script' require specific care.
+
+`http://xkcd.com/327/'
+     A humorous and pithy summary of the broader problem.
+
+\1f
+File: find.info,  Node: Error Messages,  Next: GNU Free Documentation License,  Prev: Security Considerations,  Up: Top
+
+11 Error Messages
+*****************
+
+This section describes some of the error messages sometimes made by
+`find', `xargs', or `locate', explains them and in some cases provides
+advice as to what you should do about this.
+
+   This manual is written in English.  The GNU findutils software
+features translations of error messages for many languages.  For this
+reason the error messages produced by the programs are made to be as
+self-explanatory as possible.  This approach avoids leaving people to
+figure out which test an English-language error message corresponds to.
+Error messages which are self-explanatory will not normally be
+mentioned in this document.  For those messages mentioned in this
+document, only the English-language version of the message will be
+listed.
+
+* Menu:
+
+* Error Messages From find::
+* Error Messages From xargs::
+* Error Messages From locate::
+* Error Messages From updatedb::
+
+\1f
+File: find.info,  Node: Error Messages From find,  Next: Error Messages From xargs,  Up: Error Messages
+
+11.1 Error Messages From `find'
+===============================
+
+Most error messages produced by find are self-explanatory.  Error
+messages sometimes include a filename.  When this happens, the filename
+is quoted in order to prevent any unusual characters in the filename
+making unwanted changes in the state of the terminal.
+
+`invalid predicate `-foo''
+     This means that the `find' command line included something that
+     started with a dash or other special character.  The `find'
+     program tried to interpret this as a test, action or option, but
+     didn't recognise it.  If it was intended to be a test, check what
+     was specified against the documentation.  If, on the other hand,
+     the string is the name of a file which has been expanded from a
+     wildcard (for example because you have a `*' on the command line),
+     consider using `./*' or just `.' instead.
+
+`unexpected extra predicate'
+     This usually happens if you have an extra bracket on the command
+     line (for example `find . -print \)').
+
+`Warning: filesystem /path/foo has recently been mounted'
+`Warning: filesystem /path/foo has recently been unmounted'
+     These messages might appear when `find' moves into a directory and
+     finds that the device number and inode are different from what it
+     expected them to be.  If the directory `find' has moved into is on
+     an network filesystem (NFS), it will not issue this message,
+     because `automount' frequently mounts new filesystems on
+     directories as you move into them (that is how it knows you want
+     to use the filesystem).  So, if you do see this message, be wary --
+     `automount' may not have been responsible.  Consider the
+     possibility that someone else is manipulating the filesystem while
+     `find' is running.  Some people might do this in order to mislead
+     `find' or persuade it to look at one set of files when it thought
+     it was looking at another set.
+
+`/path/foo changed during execution of find (old device number 12345, new device number 6789, filesystem type is <whatever>) [ref XXX]'
+     This message is issued when `find' moves into a directory and ends
+     up somewhere it didn't expect to be.  This happens in one of two
+     circumstances.  Firstly, this happens when `automount' intervenes
+     on a system where `find' doesn't know how to determine what the
+     current set of mounted filesystems is.
+
+     Secondly, this can happen when the device number of a directory
+     appears to change during a change of current directory, but `find'
+     is moving up the filesystem hierarchy rather than down into it.
+     In order to prevent `find' wandering off into some unexpected part
+     of the filesystem, we stop it at this point.
+
+`Don't know how to use getmntent() to read `/etc/mtab'.  This is a bug.'
+     This message is issued when a problem similar to the above occurs
+     on a system where `find' doesn't know how to figure out the current
+     list of mount points.  Ask for help on <bug-findutils@gnu.org>.
+
+`/path/foo/bar changed during execution of find (old inode number 12345, new inode number 67893, filesystem type is <whatever>) [ref XXX]"),'
+     This message is issued when `find' moves into a directory and
+     discovers that the inode number of that directory is different
+     from the inode number that it obtained when it examined the
+     directory previously.  This usually means that while `find' was
+     deep in a directory hierarchy doing a time consuming operation,
+     somebody has moved one of the parent directories to another
+     location in the same filesystem.  This may or may not have been
+     done maliciously.  In any case, `find' stops at this point to
+     avoid traversing parts of the filesystem that it wasn't intended
+     to.  You can use `ls -li' or `find /path -inum 12345 -o -inum
+     67893' to find out more about what has happened.
+
+`sanity check of the fnmatch() library function failed.'
+     Please submit a bug report.  You may well be asked questions about
+     your system, and if you compiled the `findutils' code yourself,
+     you should keep your copy of the build tree around.  The likely
+     explanation is that your system has a buggy implementation of
+     `fnmatch' that looks enough like the GNU version to fool
+     `configure', but which doesn't work properly.
+
+`cannot fork'
+     This normally happens if you use the `-exec' action or something
+     similar (`-ok' and so forth) but the system has run out of free
+     process slots.  This is either because the system is very busy and
+     the system has reached its maximum process limit, or because you
+     have a resource limit in place and you've reached it.  Check the
+     system for runaway processes (with `ps', if possible).  Some
+     process slots are normally reserved for use by `root'.
+
+`some-program terminated by signal 99'
+     Some program which was launched with `-exec' or similar was killed
+     with a fatal signal.  This is just an advisory message.
+
+\1f
+File: find.info,  Node: Error Messages From xargs,  Next: Error Messages From locate,  Prev: Error Messages From find,  Up: Error Messages
+
+11.2 Error Messages From xargs
+==============================
+
+`environment is too large for exec'
+     This message means that you have so many environment variables set
+     (or such large values for them) that there is no room within the
+     system-imposed limits on program command line argument length to
+     invoke any program.  This is an unlikely situation and is more
+     likely result of an attempt to test the limits of `xargs', or
+     break it.  Please try unsetting some environment variables, or
+     exiting the current shell.  You can also use `xargs --show-limits'
+     to understand the relevant sizes.
+
+`can not fit single argument within argument list size limit'
+     You are using the `-I' option and `xargs' doesn't have enough
+     space to build a command line because it has read a really large
+     item and it doesn't fit.  You can probably work around this
+     problem with the `-s' option, but the default size is pretty
+     large.  This is a rare situation and is more likely an attempt to
+     test the limits of `xargs', or break it.  Otherwise, you will need
+     to try to shorten the problematic argument or not use `xargs'.
+
+`cannot fork'
+     See the description of the similar message for `find'.
+
+`<program>: exited with status 255; aborting'
+     When a command run by `xargs' exits with status 255, `xargs' is
+     supposed to stop.  If this is not what you intended, wrap the
+     program you are trying to invoke in a shell script which doesn't
+     return status 255.
+
+`<program>: terminated by signal 99'
+     See the description of the similar message for `find'.
+
+`cannot set SIGUSR1 signal handler'
+     `xargs' is having trouble preparing for you to be able to send it
+     signals to increase or decrease the parallelism of its processing.
+     If you don't plan to send it those signals, this warning can be
+     ignored (though if you're a programmer, you may want to help us
+     figure out why `xargs' is confused by your operating system).
+
+\1f
+File: find.info,  Node: Error Messages From locate,  Next: Error Messages From updatedb,  Prev: Error Messages From xargs,  Up: Error Messages
+
+11.3 Error Messages From `locate'
+=================================
+
+`warning: database `/usr/local/var/locatedb' is more than 8 days old'
+     The `locate' program relies on a database which is periodically
+     built by the `updatedb' program.  That hasn't happened in a long
+     time.  To fix this problem, run `updatedb' manually.  This can
+     often happen on systems that are generally not left on, so the
+     periodic "cron" task which normally does this doesn't get a chance
+     to run.
+
+`locate database `/usr/local/var/locatedb' is corrupt or invalid'
+     This should not happen.  Re-run `updatedb'.  If that works, but
+     `locate' still produces this error, run `locate --version' and
+     `updatedb --version'.  These should produce the same output.  If
+     not, you are using a mixed toolset; check your `$PATH' environment
+     variable and your shell aliases (if you have any).  If both
+     programs claim to be GNU versions, this is a bug; all versions of
+     these programs should interoperate without problem.  Ask for help
+     on <bug-findutils@gnu.org>.
+
+\1f
+File: find.info,  Node: Error Messages From updatedb,  Prev: Error Messages From locate,  Up: Error Messages
+
+11.4 Error Messages From updatedb
+=================================
+
+The `updatedb' program (and the programs it invokes) do issue error
+messages, but none seem to be candidates for guidance.  If you are
+having a problem understanding one of these, ask for help on
+<bug-findutils@gnu.org>.
+
+\1f
+File: find.info,  Node: GNU Free Documentation License,  Next: Primary Index,  Prev: Error Messages,  Up: Top
+
+Appendix A GNU Free Documentation License
+*****************************************
+
+                     Version 1.3, 3 November 2008
+
+     Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+     `http://fsf.org/'
+
+     Everyone is permitted to copy and distribute verbatim copies
+     of this license document, but changing it is not allowed.
+
+  0. PREAMBLE
+
+     The purpose of this License is to make a manual, textbook, or other
+     functional and useful document "free" in the sense of freedom: to
+     assure everyone the effective freedom to copy and redistribute it,
+     with or without modifying it, either commercially or
+     noncommercially.  Secondarily, this License preserves for the
+     author and publisher a way to get credit for their work, while not
+     being considered responsible for modifications made by others.
+
+     This License is a kind of "copyleft", which means that derivative
+     works of the document must themselves be free in the same sense.
+     It complements the GNU General Public License, which is a copyleft
+     license designed for free software.
+
+     We have designed this License in order to use it for manuals for
+     free software, because free software needs free documentation: a
+     free program should come with manuals providing the same freedoms
+     that the software does.  But this License is not limited to
+     software manuals; it can be used for any textual work, regardless
+     of subject matter or whether it is published as a printed book.
+     We recommend this License principally for works whose purpose is
+     instruction or reference.
+
+  1. APPLICABILITY AND DEFINITIONS
+
+     This License applies to any manual or other work, in any medium,
+     that contains a notice placed by the copyright holder saying it
+     can be distributed under the terms of this License.  Such a notice
+     grants a world-wide, royalty-free license, unlimited in duration,
+     to use that work under the conditions stated herein.  The
+     "Document", below, refers to any such manual or work.  Any member
+     of the public is a licensee, and is addressed as "you".  You
+     accept the license if you copy, modify or distribute the work in a
+     way requiring permission under copyright law.
+
+     A "Modified Version" of the Document means any work containing the
+     Document or a portion of it, either copied verbatim, or with
+     modifications and/or translated into another language.
+
+     A "Secondary Section" is a named appendix or a front-matter section
+     of the Document that deals exclusively with the relationship of the
+     publishers or authors of the Document to the Document's overall
+     subject (or to related matters) and contains nothing that could
+     fall directly within that overall subject.  (Thus, if the Document
+     is in part a textbook of mathematics, a Secondary Section may not
+     explain any mathematics.)  The relationship could be a matter of
+     historical connection with the subject or with related matters, or
+     of legal, commercial, philosophical, ethical or political position
+     regarding them.
+
+     The "Invariant Sections" are certain Secondary Sections whose
+     titles are designated, as being those of Invariant Sections, in
+     the notice that says that the Document is released under this
+     License.  If a section does not fit the above definition of
+     Secondary then it is not allowed to be designated as Invariant.
+     The Document may contain zero Invariant Sections.  If the Document
+     does not identify any Invariant Sections then there are none.
+
+     The "Cover Texts" are certain short passages of text that are
+     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
+     that says that the Document is released under this License.  A
+     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
+     be at most 25 words.
+
+     A "Transparent" copy of the Document means a machine-readable copy,
+     represented in a format whose specification is available to the
+     general public, that is suitable for revising the document
+     straightforwardly with generic text editors or (for images
+     composed of pixels) generic paint programs or (for drawings) some
+     widely available drawing editor, and that is suitable for input to
+     text formatters or for automatic translation to a variety of
+     formats suitable for input to text formatters.  A copy made in an
+     otherwise Transparent file format whose markup, or absence of
+     markup, has been arranged to thwart or discourage subsequent
+     modification by readers is not Transparent.  An image format is
+     not Transparent if used for any substantial amount of text.  A
+     copy that is not "Transparent" is called "Opaque".
+
+     Examples of suitable formats for Transparent copies include plain
+     ASCII without markup, Texinfo input format, LaTeX input format,
+     SGML or XML using a publicly available DTD, and
+     standard-conforming simple HTML, PostScript or PDF designed for
+     human modification.  Examples of transparent image formats include
+     PNG, XCF and JPG.  Opaque formats include proprietary formats that
+     can be read and edited only by proprietary word processors, SGML or
+     XML for which the DTD and/or processing tools are not generally
+     available, and the machine-generated HTML, PostScript or PDF
+     produced by some word processors for output purposes only.
+
+     The "Title Page" means, for a printed book, the title page itself,
+     plus such following pages as are needed to hold, legibly, the
+     material this License requires to appear in the title page.  For
+     works in formats which do not have any title page as such, "Title
+     Page" means the text near the most prominent appearance of the
+     work's title, preceding the beginning of the body of the text.
+
+     The "publisher" means any person or entity that distributes copies
+     of the Document to the public.
+
+     A section "Entitled XYZ" means a named subunit of the Document
+     whose title either is precisely XYZ or contains XYZ in parentheses
+     following text that translates XYZ in another language.  (Here XYZ
+     stands for a specific section name mentioned below, such as
+     "Acknowledgements", "Dedications", "Endorsements", or "History".)
+     To "Preserve the Title" of such a section when you modify the
+     Document means that it remains a section "Entitled XYZ" according
+     to this definition.
+
+     The Document may include Warranty Disclaimers next to the notice
+     which states that this License applies to the Document.  These
+     Warranty Disclaimers are considered to be included by reference in
+     this License, but only as regards disclaiming warranties: any other
+     implication that these Warranty Disclaimers may have is void and
+     has no effect on the meaning of this License.
+
+  2. VERBATIM COPYING
+
+     You may copy and distribute the Document in any medium, either
+     commercially or noncommercially, provided that this License, the
+     copyright notices, and the license notice saying this License
+     applies to the Document are reproduced in all copies, and that you
+     add no other conditions whatsoever to those of this License.  You
+     may not use technical measures to obstruct or control the reading
+     or further copying of the copies you make or distribute.  However,
+     you may accept compensation in exchange for copies.  If you
+     distribute a large enough number of copies you must also follow
+     the conditions in section 3.
+
+     You may also lend copies, under the same conditions stated above,
+     and you may publicly display copies.
+
+  3. COPYING IN QUANTITY
+
+     If you publish printed copies (or copies in media that commonly
+     have printed covers) of the Document, numbering more than 100, and
+     the Document's license notice requires Cover Texts, you must
+     enclose the copies in covers that carry, clearly and legibly, all
+     these Cover Texts: Front-Cover Texts on the front cover, and
+     Back-Cover Texts on the back cover.  Both covers must also clearly
+     and legibly identify you as the publisher of these copies.  The
+     front cover must present the full title with all words of the
+     title equally prominent and visible.  You may add other material
+     on the covers in addition.  Copying with changes limited to the
+     covers, as long as they preserve the title of the Document and
+     satisfy these conditions, can be treated as verbatim copying in
+     other respects.
+
+     If the required texts for either cover are too voluminous to fit
+     legibly, you should put the first ones listed (as many as fit
+     reasonably) on the actual cover, and continue the rest onto
+     adjacent pages.
+
+     If you publish or distribute Opaque copies of the Document
+     numbering more than 100, you must either include a
+     machine-readable Transparent copy along with each Opaque copy, or
+     state in or with each Opaque copy a computer-network location from
+     which the general network-using public has access to download
+     using public-standard network protocols a complete Transparent
+     copy of the Document, free of added material.  If you use the
+     latter option, you must take reasonably prudent steps, when you
+     begin distribution of Opaque copies in quantity, to ensure that
+     this Transparent copy will remain thus accessible at the stated
+     location until at least one year after the last time you
+     distribute an Opaque copy (directly or through your agents or
+     retailers) of that edition to the public.
+
+     It is requested, but not required, that you contact the authors of
+     the Document well before redistributing any large number of
+     copies, to give them a chance to provide you with an updated
+     version of the Document.
+
+  4. MODIFICATIONS
+
+     You may copy and distribute a Modified Version of the Document
+     under the conditions of sections 2 and 3 above, provided that you
+     release the Modified Version under precisely this License, with
+     the Modified Version filling the role of the Document, thus
+     licensing distribution and modification of the Modified Version to
+     whoever possesses a copy of it.  In addition, you must do these
+     things in the Modified Version:
+
+       A. Use in the Title Page (and on the covers, if any) a title
+          distinct from that of the Document, and from those of
+          previous versions (which should, if there were any, be listed
+          in the History section of the Document).  You may use the
+          same title as a previous version if the original publisher of
+          that version gives permission.
+
+       B. List on the Title Page, as authors, one or more persons or
+          entities responsible for authorship of the modifications in
+          the Modified Version, together with at least five of the
+          principal authors of the Document (all of its principal
+          authors, if it has fewer than five), unless they release you
+          from this requirement.
+
+       C. State on the Title page the name of the publisher of the
+          Modified Version, as the publisher.
+
+       D. Preserve all the copyright notices of the Document.
+
+       E. Add an appropriate copyright notice for your modifications
+          adjacent to the other copyright notices.
+
+       F. Include, immediately after the copyright notices, a license
+          notice giving the public permission to use the Modified
+          Version under the terms of this License, in the form shown in
+          the Addendum below.
+
+       G. Preserve in that license notice the full lists of Invariant
+          Sections and required Cover Texts given in the Document's
+          license notice.
+
+       H. Include an unaltered copy of this License.
+
+       I. Preserve the section Entitled "History", Preserve its Title,
+          and add to it an item stating at least the title, year, new
+          authors, and publisher of the Modified Version as given on
+          the Title Page.  If there is no section Entitled "History" in
+          the Document, create one stating the title, year, authors,
+          and publisher of the Document as given on its Title Page,
+          then add an item describing the Modified Version as stated in
+          the previous sentence.
+
+       J. Preserve the network location, if any, given in the Document
+          for public access to a Transparent copy of the Document, and
+          likewise the network locations given in the Document for
+          previous versions it was based on.  These may be placed in
+          the "History" section.  You may omit a network location for a
+          work that was published at least four years before the
+          Document itself, or if the original publisher of the version
+          it refers to gives permission.
+
+       K. For any section Entitled "Acknowledgements" or "Dedications",
+          Preserve the Title of the section, and preserve in the
+          section all the substance and tone of each of the contributor
+          acknowledgements and/or dedications given therein.
+
+       L. Preserve all the Invariant Sections of the Document,
+          unaltered in their text and in their titles.  Section numbers
+          or the equivalent are not considered part of the section
+          titles.
+
+       M. Delete any section Entitled "Endorsements".  Such a section
+          may not be included in the Modified Version.
+
+       N. Do not retitle any existing section to be Entitled
+          "Endorsements" or to conflict in title with any Invariant
+          Section.
+
+       O. Preserve any Warranty Disclaimers.
+
+     If the Modified Version includes new front-matter sections or
+     appendices that qualify as Secondary Sections and contain no
+     material copied from the Document, you may at your option
+     designate some or all of these sections as invariant.  To do this,
+     add their titles to the list of Invariant Sections in the Modified
+     Version's license notice.  These titles must be distinct from any
+     other section titles.
+
+     You may add a section Entitled "Endorsements", provided it contains
+     nothing but endorsements of your Modified Version by various
+     parties--for example, statements of peer review or that the text
+     has been approved by an organization as the authoritative
+     definition of a standard.
+
+     You may add a passage of up to five words as a Front-Cover Text,
+     and a passage of up to 25 words as a Back-Cover Text, to the end
+     of the list of Cover Texts in the Modified Version.  Only one
+     passage of Front-Cover Text and one of Back-Cover Text may be
+     added by (or through arrangements made by) any one entity.  If the
+     Document already includes a cover text for the same cover,
+     previously added by you or by arrangement made by the same entity
+     you are acting on behalf of, you may not add another; but you may
+     replace the old one, on explicit permission from the previous
+     publisher that added the old one.
+
+     The author(s) and publisher(s) of the Document do not by this
+     License give permission to use their names for publicity for or to
+     assert or imply endorsement of any Modified Version.
+
+  5. COMBINING DOCUMENTS
+
+     You may combine the Document with other documents released under
+     this License, under the terms defined in section 4 above for
+     modified versions, provided that you include in the combination
+     all of the Invariant Sections of all of the original documents,
+     unmodified, and list them all as Invariant Sections of your
+     combined work in its license notice, and that you preserve all
+     their Warranty Disclaimers.
+
+     The combined work need only contain one copy of this License, and
+     multiple identical Invariant Sections may be replaced with a single
+     copy.  If there are multiple Invariant Sections with the same name
+     but different contents, make the title of each such section unique
+     by adding at the end of it, in parentheses, the name of the
+     original author or publisher of that section if known, or else a
+     unique number.  Make the same adjustment to the section titles in
+     the list of Invariant Sections in the license notice of the
+     combined work.
+
+     In the combination, you must combine any sections Entitled
+     "History" in the various original documents, forming one section
+     Entitled "History"; likewise combine any sections Entitled
+     "Acknowledgements", and any sections Entitled "Dedications".  You
+     must delete all sections Entitled "Endorsements."
+
+  6. COLLECTIONS OF DOCUMENTS
+
+     You may make a collection consisting of the Document and other
+     documents released under this License, and replace the individual
+     copies of this License in the various documents with a single copy
+     that is included in the collection, provided that you follow the
+     rules of this License for verbatim copying of each of the
+     documents in all other respects.
+
+     You may extract a single document from such a collection, and
+     distribute it individually under this License, provided you insert
+     a copy of this License into the extracted document, and follow
+     this License in all other respects regarding verbatim copying of
+     that document.
+
+  7. AGGREGATION WITH INDEPENDENT WORKS
+
+     A compilation of the Document or its derivatives with other
+     separate and independent documents or works, in or on a volume of
+     a storage or distribution medium, is called an "aggregate" if the
+     copyright resulting from the compilation is not used to limit the
+     legal rights of the compilation's users beyond what the individual
+     works permit.  When the Document is included in an aggregate, this
+     License does not apply to the other works in the aggregate which
+     are not themselves derivative works of the Document.
+
+     If the Cover Text requirement of section 3 is applicable to these
+     copies of the Document, then if the Document is less than one half
+     of the entire aggregate, the Document's Cover Texts may be placed
+     on covers that bracket the Document within the aggregate, or the
+     electronic equivalent of covers if the Document is in electronic
+     form.  Otherwise they must appear on printed covers that bracket
+     the whole aggregate.
+
+  8. TRANSLATION
+
+     Translation is considered a kind of modification, so you may
+     distribute translations of the Document under the terms of section
+     4.  Replacing Invariant Sections with translations requires special
+     permission from their copyright holders, but you may include
+     translations of some or all Invariant Sections in addition to the
+     original versions of these Invariant Sections.  You may include a
+     translation of this License, and all the license notices in the
+     Document, and any Warranty Disclaimers, provided that you also
+     include the original English version of this License and the
+     original versions of those notices and disclaimers.  In case of a
+     disagreement between the translation and the original version of
+     this License or a notice or disclaimer, the original version will
+     prevail.
+
+     If a section in the Document is Entitled "Acknowledgements",
+     "Dedications", or "History", the requirement (section 4) to
+     Preserve its Title (section 1) will typically require changing the
+     actual title.
+
+  9. TERMINATION
+
+     You may not copy, modify, sublicense, or distribute the Document
+     except as expressly provided under this License.  Any attempt
+     otherwise to copy, modify, sublicense, or distribute it is void,
+     and will automatically terminate your rights under this License.
+
+     However, if you cease all violation of this License, then your
+     license from a particular copyright holder is reinstated (a)
+     provisionally, unless and until the copyright holder explicitly
+     and finally terminates your license, and (b) permanently, if the
+     copyright holder fails to notify you of the violation by some
+     reasonable means prior to 60 days after the cessation.
+
+     Moreover, your license from a particular copyright holder is
+     reinstated permanently if the copyright holder notifies you of the
+     violation by some reasonable means, this is the first time you have
+     received notice of violation of this License (for any work) from
+     that copyright holder, and you cure the violation prior to 30 days
+     after your receipt of the notice.
+
+     Termination of your rights under this section does not terminate
+     the licenses of parties who have received copies or rights from
+     you under this License.  If your rights have been terminated and
+     not permanently reinstated, receipt of a copy of some or all of
+     the same material does not give you any rights to use it.
+
+ 10. FUTURE REVISIONS OF THIS LICENSE
+
+     The Free Software Foundation may publish new, revised versions of
+     the GNU Free Documentation License from time to time.  Such new
+     versions will be similar in spirit to the present version, but may
+     differ in detail to address new problems or concerns.  See
+     `http://www.gnu.org/copyleft/'.
+
+     Each version of the License is given a distinguishing version
+     number.  If the Document specifies that a particular numbered
+     version of this License "or any later version" applies to it, you
+     have the option of following the terms and conditions either of
+     that specified version or of any later version that has been
+     published (not as a draft) by the Free Software Foundation.  If
+     the Document does not specify a version number of this License,
+     you may choose any version ever published (not as a draft) by the
+     Free Software Foundation.  If the Document specifies that a proxy
+     can decide which future versions of this License can be used, that
+     proxy's public statement of acceptance of a version permanently
+     authorizes you to choose that version for the Document.
+
+ 11. RELICENSING
+
+     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+     World Wide Web server that publishes copyrightable works and also
+     provides prominent facilities for anybody to edit those works.  A
+     public wiki that anybody can edit is an example of such a server.
+     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
+     site means any set of copyrightable works thus published on the MMC
+     site.
+
+     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+     license published by Creative Commons Corporation, a not-for-profit
+     corporation with a principal place of business in San Francisco,
+     California, as well as future copyleft versions of that license
+     published by that same organization.
+
+     "Incorporate" means to publish or republish a Document, in whole or
+     in part, as part of another Document.
+
+     An MMC is "eligible for relicensing" if it is licensed under this
+     License, and if all works that were first published under this
+     License somewhere other than this MMC, and subsequently
+     incorporated in whole or in part into the MMC, (1) had no cover
+     texts or invariant sections, and (2) were thus incorporated prior
+     to November 1, 2008.
+
+     The operator of an MMC Site may republish an MMC contained in the
+     site under CC-BY-SA on the same site at any time before August 1,
+     2009, provided the MMC is eligible for relicensing.
+
+
+ADDENDUM: How to use this License for your documents
+====================================================
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and license
+notices just after the title page:
+
+       Copyright (C)  YEAR  YOUR NAME.
+       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 section entitled ``GNU
+       Free Documentation License''.
+
+   If you have Invariant Sections, Front-Cover Texts and Back-Cover
+Texts, replace the "with...Texts." line with this:
+
+         with the Invariant Sections being LIST THEIR TITLES, with
+         the Front-Cover Texts being LIST, and with the Back-Cover Texts
+         being LIST.
+
+   If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+   If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License, to
+permit their use in free software.
+
diff --git a/doc/find.info-2 b/doc/find.info-2
new file mode 100644 (file)
index 0000000..79cd5b5
Binary files /dev/null and b/doc/find.info-2 differ
diff --git a/doc/find.texi b/doc/find.texi
new file mode 100644 (file)
index 0000000..1f278de
--- /dev/null
@@ -0,0 +1,5568 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename find.info
+@settitle Finding Files
+@c For double-sided printing, uncomment:
+@c @setchapternewpage odd
+@c %**end of header
+
+@include version.texi
+@include ../locate/dblocation.texi
+
+@iftex
+@finalout
+@end iftex
+
+@dircategory Basics
+@direntry
+* Finding files: (find).        Operating on files matching certain criteria.
+@end direntry
+
+@dircategory Individual utilities
+@direntry
+* find: (find)Invoking find.                    Finding and acting on files.
+* locate: (find)Invoking locate.                Finding files in a database.
+* updatedb: (find)Invoking updatedb.            Building the locate database.
+* xargs: (find)Invoking xargs.                  Operating on many files.
+@end direntry
+
+@copying
+
+This file documents the GNU utilities for finding files that match
+certain criteria and performing various operations on them.
+
+Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006,
+2007, 2008, 2009, 2010 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, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled
+``GNU Free Documentation License.''
+@end copying
+
+@titlepage
+@title Finding Files
+@subtitle Edition @value{EDITION}, for GNU @code{find} version @value{VERSION}
+@subtitle @value{UPDATED}
+@author by David MacKenzie and James Youngman
+
+@page
+@vskip 0pt plus 1filll
+@insertcopying{}
+@end titlepage
+
+@contents
+
+@ifnottex
+@node Top
+@top GNU Findutils
+@comment  node-name,  next,  previous,  up
+@insertcopying
+
+This file documents the GNU utilities for finding files that match
+certain criteria and performing various actions on them.
+
+This is edition @value{EDITION}, for @code{find} version @value{VERSION}.
+@end ifnottex
+
+@c The master menu, created with texinfo-master-menu, goes here.
+
+@menu
+* Introduction::                Summary of the tasks this manual describes.
+* Finding Files::               Finding files that match certain criteria.
+* Actions::                     Doing things to files you have found.
+* Databases::                   Maintaining file name databases.
+* File Permissions::            How to control access to files.
+* Date input formats::          Specifying literal times.
+* Reference::                   Summary of how to invoke the programs.
+* Common Tasks::                Solutions to common real-world problems.
+* Worked Examples::             Examples demonstrating more complex points.
+* Security Considerations::     Security issues relating to findutils.
+* Error Messages::              Explanations of some messages you might see.
+* GNU Free Documentation License::  Copying and sharing this manual.
+* Primary Index::               The components of @code{find} expressions.
+@end menu
+
+@node Introduction
+@chapter Introduction
+
+This manual shows how to find files that meet criteria you specify,
+and how to perform various actions on the files that you find.  The
+principal programs that you use to perform these tasks are
+@code{find}, @code{locate}, and @code{xargs}.  Some of the examples in
+this manual use capabilities specific to the GNU versions of those
+programs.
+
+GNU @code{find} was originally written by Eric Decker, with
+enhancements by David MacKenzie, Jay Plett, and Tim Wood.  GNU
+@code{xargs} was originally written by Mike Rendell, with enhancements
+by David MacKenzie.  GNU @code{locate} and its associated utilities
+were originally written by James Woods, with enhancements by David
+MacKenzie.  The idea for @samp{find -print0} and @samp{xargs -0} came
+from Dan Bernstein.  The current maintainer of GNU findutils (and this
+manual) is James Youngman.  Many other people have contributed bug
+fixes, small improvements, and helpful suggestions.  Thanks!
+
+To report a bug in GNU findutils, please use the form on the Savannah
+web site at
+@code{http://savannah.gnu.org/bugs/?group=findutils}.  Reporting bugs
+this way means that you will then be able to track progress in fixing
+the problem.
+
+If you don't have web access, you can also just send mail to the
+mailing list.  The mailing list @email{bug-findutils@@gnu.org} carries
+discussion of bugs in findutils, questions and answers about the
+software and discussion of the development of the programs.  To join
+the list, send email to @email{bug-findutils-request@@gnu.org}.
+
+Please read any relevant sections of this manual before asking for
+help on the mailing list.  You may also find it helpful to read the
+NON-BUGS section of the @code{find} manual page.
+
+If you ask for help on the mailing list, people will be able to help
+you much more effectively if you include the following things:
+
+@itemize @bullet
+@item The version of the software you are running.  You can find this
+out by running @samp{locate --version}.
+@item What you were trying to do
+@item The @emph{exact} command line you used
+@item The @emph{exact} output you got (if this is very long, try to
+find a smaller example which exhibits the same problem)
+@item The output you expected to get
+@end itemize
+
+It may also be the case that the bug you are describing has already
+been fixed, if it is a bug.  Please check the most recent findutils
+releases at @url{ftp://ftp.gnu.org/gnu/findutils} and, if possible,
+the development branch at @url{ftp://alpha.gnu.org/gnu/findutils}.
+If you take the time to check that your bug still exists in current
+releases, this will greatly help people who want to help you solve
+your problem.  Please also be aware that if you obtained findutils as
+part of the GNU/Linux 'distribution', the distributions often lag
+seriously behind findutils releases, even the stable release.  Please
+check the GNU FTP site.
+
+@menu
+* Scope::
+* Overview::
+* find Expressions::
+@end menu
+
+@node Scope
+@section Scope
+
+For brevity, the word @dfn{file} in this manual means a regular file,
+a directory, a symbolic link, or any other kind of node that has a
+directory entry.  A directory entry is also called a @dfn{file name}.
+A file name may contain some, all, or none of the directories in a
+path that leads to the file.  These are all examples of what this
+manual calls ``file names'':
+
+@example
+parser.c
+README
+./budget/may-94.sc
+fred/.cshrc
+/usr/local/include/termcap.h
+@end example
+
+A @dfn{directory tree} is a directory and the files it contains, all
+of its subdirectories and the files they contain, etc.  It can also be
+a single non-directory file.
+
+These programs enable you to find the files in one or more directory
+trees that:
+
+@itemize @bullet
+@item
+have names that contain certain text or match a certain pattern;
+@item
+are links to certain files;
+@item
+were last used during a certain period of time;
+@item
+are within a certain size range;
+@item
+are of a certain type (regular file, directory, symbolic link, etc.);
+@item
+are owned by a certain user or group;
+@item
+have certain access permissions or special mode bits;
+@item
+contain text that matches a certain pattern;
+@item
+are within a certain depth in the directory tree;
+@item
+or some combination of the above.
+@end itemize
+
+Once you have found the files you're looking for (or files that are
+potentially the ones you're looking for), you can do more to them than
+simply list their names.  You can get any combination of the files'
+attributes, or process the files in many ways, either individually or
+in groups of various sizes.  Actions that you might want to perform on
+the files you have found include, but are not limited to:
+
+@itemize @bullet
+@item
+view or edit
+@item
+store in an archive
+@item
+remove or rename
+@item
+change access permissions
+@item
+classify into groups
+@end itemize
+
+This manual describes how to perform each of those tasks, and more.
+
+@node Overview
+@section Overview
+
+The principal programs used for making lists of files that match given
+criteria and running commands on them are @code{find}, @code{locate},
+and @code{xargs}.  An additional command, @code{updatedb}, is used by
+system administrators to create databases for @code{locate} to use.
+
+@code{find} searches for files in a directory hierarchy and prints
+information about the files it found.  It is run like this:
+
+@example
+find @r{[}@var{file}@dots{}@r{]} @r{[}@var{expression}@r{]}
+@end example
+
+@noindent
+Here is a typical use of @code{find}.  This example prints the names
+of all files in the directory tree rooted in @file{/usr/src} whose
+name ends with @samp{.c} and that are larger than 100 Kilobytes.
+@example
+find /usr/src -name '*.c' -size +100k -print
+@end example
+
+Notice that the wildcard must be enclosed in quotes in order to
+protect it from expansion by the shell.
+
+@code{locate} searches special file name databases for file names that
+match patterns.  The system administrator runs the @code{updatedb}
+program to create the databases.  @code{locate} is run like this:
+
+@example
+locate @r{[}@var{option}@dots{}@r{]} @var{pattern}@dots{}
+@end example
+
+@noindent
+This example prints the names of all files in the default file name
+database whose name ends with @samp{Makefile} or @samp{makefile}.
+Which file names are stored in the database depends on how the system
+administrator ran @code{updatedb}.
+@example
+locate '*[Mm]akefile'
+@end example
+
+The name @code{xargs}, pronounced EX-args, means ``combine
+arguments.''  @code{xargs} builds and executes command lines by
+gathering together arguments it reads on the standard input.  Most
+often, these arguments are lists of file names generated by
+@code{find}.  @code{xargs} is run like this:
+
+@example
+xargs @r{[}@var{option}@dots{}@r{]} @r{[}@var{command} @r{[}@var{initial-arguments}@r{]}@r{]}
+@end example
+
+@noindent
+The following command searches the files listed in the file
+@file{file-list} and prints all of the lines in them that contain the
+word @samp{typedef}.
+@example
+xargs grep typedef < file-list
+@end example
+
+@node find Expressions
+@section @code{find} Expressions
+
+The expression that @code{find} uses to select files consists of one
+or more @dfn{primaries}, each of which is a separate command line
+argument to @code{find}.  @code{find} evaluates the expression each
+time it processes a file.  An expression can contain any of the
+following types of primaries:
+
+@table @dfn
+@item options
+affect overall operation rather than the processing of a specific
+file;
+@item tests
+return a true or false value, depending on the file's attributes;
+@item actions
+have side effects and return a true or false value; and
+@item operators
+connect the other arguments and affect when and whether they are
+evaluated.
+@end table
+
+You can omit the operator between two primaries; it defaults to
+@samp{-and}.  @xref{Combining Primaries With Operators}, for ways to
+connect primaries into more complex expressions.  If the expression
+contains no actions other than @samp{-prune}, @samp{-print} is
+performed on all files for which the entire expression is true
+(@pxref{Print File Name}).
+
+Options take effect immediately, rather than being evaluated for each
+file when their place in the expression is reached.  Therefore, for
+clarity, it is best to place them at the beginning of the expression.
+There are two exceptions to this; @samp{-daystart} and @samp{-follow}
+have different effects depending on where in the command line they
+appear.  This can be confusing, so it's best to keep them at the
+beginning, too.
+
+Many of the primaries take arguments, which immediately follow them in
+the next command line argument to @code{find}.  Some arguments are
+file names, patterns, or other strings; others are numbers.  Numeric
+arguments can be specified as
+
+@table @code
+@item +@var{n}
+for greater than @var{n},
+@item -@var{n}
+for less than @var{n},
+@item @var{n}
+for exactly @var{n}.
+@end table
+
+@node Finding Files
+@chapter Finding Files
+
+By default, @code{find} prints to the standard output the names of the
+files that match the given criteria.  @xref{Actions}, for how to get
+more information about the matching files.
+
+
+@menu
+* Name::
+* Links::
+* Time::
+* Size::
+* Type::
+* Owner::
+* Mode Bits::
+* Contents::
+* Directories::
+* Filesystems::
+* Combining Primaries With Operators::
+@end menu
+
+@node Name
+@section Name
+
+Here are ways to search for files whose name matches a certain
+pattern.  @xref{Shell Pattern Matching}, for a description of the
+@var{pattern} arguments to these tests.
+
+Each of these tests has a case-sensitive version and a
+case-insensitive version, whose name begins with @samp{i}.  In a
+case-insensitive comparison, the patterns @samp{fo*} and @samp{F??}
+match the file names @file{Foo}, @samp{FOO}, @samp{foo}, @samp{fOo},
+etc.
+
+@menu
+* Base Name Patterns::
+* Full Name Patterns::
+* Fast Full Name Search::
+* Shell Pattern Matching::      Wildcards used by these programs.
+@end menu
+
+@node Base Name Patterns
+@subsection Base Name Patterns
+
+@deffn Test -name pattern
+@deffnx Test -iname pattern
+True if the base of the file name (the path with the leading
+directories removed) matches shell pattern @var{pattern}.  For
+@samp{-iname}, the match is case-insensitive.@footnote{Because we
+need to perform case-insensitive matching, the GNU fnmatch
+implementation is always used; if the C library includes the GNU
+implementation, we use that and otherwise we use the one from gnulib}
+To ignore a whole directory tree, use @samp{-prune}
+(@pxref{Directories}).  As an example, to find Texinfo source files in
+@file{/usr/local/doc}:
+
+@example
+find /usr/local/doc -name '*.texi'
+@end example
+
+Notice that the wildcard must be enclosed in quotes in order to
+protect it from expansion by the shell.
+
+As of findutils version 4.2.2, patterns for @samp{-name} and
+@samp{-iname} will match a file name with a leading @samp{.}.  For
+example the command @samp{find /tmp -name \*bar} will match the file
+@file{/tmp/.foobar}.  Braces within the pattern (@samp{@{@}}) are not
+considered to be special (that is, @code{find . -name 'foo@{1,2@}'}
+matches a file named @file{foo@{1,2@}}, not the files @file{foo1} and
+@file{foo2}.
+
+Because the leading directories are removed, the file names considered
+for a match with @samp{-name} will never include a slash, so
+@samp{-name a/b} will never match anything (you probably need to use
+@samp{-path} instead).
+@end deffn
+
+
+@node Full Name Patterns
+@subsection Full Name Patterns
+
+@deffn Test -path pattern
+@deffnx Test -wholename pattern
+True if the entire file name, starting with the command line argument
+under which the file was found, matches shell pattern @var{pattern}.
+To ignore a whole directory tree, use @samp{-prune} rather than
+checking every file in the tree (@pxref{Directories}).  The ``entire
+file name'' as used by @code{find} starts with the starting-point
+specified on the command line, and is not converted to an absolute
+pathname, so for example @code{cd /; find tmp -wholename /tmp} will
+never match anything.
+
+Find compares the @samp{-path} argument with the concatenation of a
+directory name and the base name of the file it's considering.
+Since the concatenation will never end with a slash, @samp{-path}
+arguments ending in @samp{/} will match nothing (except perhaps a
+start point specified on the command line).
+
+The name @samp{-wholename} is GNU-specific, but @samp{-path} is more
+portable; it is supported by HP-UX @code{find} and is part of the
+POSIX 2008 standard.
+
+@end deffn
+
+@deffn Test -ipath pattern
+@deffnx Test -iwholename pattern
+These tests are like @samp{-wholename} and @samp{-path}, but the match
+is case-insensitive.
+@end deffn
+
+
+In the context of the tests @samp{-path}, @samp{-wholename},
+@samp{-ipath} and @samp{-wholename}, a ``full path'' is the name of
+all the directories traversed from @code{find}'s start point to the
+file being tested, followed by the base name of the file itself.
+These paths are often not absolute paths; for example
+
+@example
+$ cd /tmp
+$ mkdir -p foo/bar/baz
+$ find foo -path foo/bar -print
+foo/bar
+$ find foo -path /tmp/foo/bar -print
+$ find /tmp/foo -path /tmp/foo/bar -print
+/tmp/foo/bar
+@end example
+
+Notice that the second @code{find} command prints nothing, even though
+@file{/tmp/foo/bar} exists and was examined by @code{find}.
+
+Unlike file name expansion on the command line, a @samp{*} in the pattern
+will match both @samp{/} and leading dots in file names:
+
+@example
+$ find .  -path '*f'
+./quux/bar/baz/f
+$ find .  -path '*/*config'
+./quux/bar/baz/.config
+@end example
+
+
+@deffn Test -regex expr
+@deffnx Test -iregex expr
+True if the entire file name matches regular expression @var{expr}.
+This is a match on the whole path, not a search.  For example, to
+match a file named @file{./fubar3}, you can use the regular expression
+@samp{.*bar.} or @samp{.*b.*3}, but not @samp{f.*r3}.  @xref{Regexps,
+, Syntax of Regular Expressions, emacs, The GNU Emacs Manual}, for a
+description of the syntax of regular expressions.  For @samp{-iregex},
+the match is case-insensitive.
+
+As for @samp{-path}, the candidate file name never ends with a slash,
+so regular expressions which only match something that ends in slash
+will always fail.
+
+There are several varieties of regular expressions; by default this
+test uses POSIX basic regular expressions, but this can be changed
+with the option @samp{-regextype}.
+@end deffn
+
+@deffn Option -regextype name
+This option controls the variety of regular expression syntax
+understood by the @samp{-regex} and @samp{-iregex} tests.  This option
+is positional; that is, it only affects regular expressions which
+occur later in the command line.  If this option is not given, GNU
+Emacs regular expressions are assumed.  Currently-implemented types
+are
+
+
+@table @samp
+@item emacs
+Regular expressions compatible with GNU Emacs; this is also the
+default behaviour if this option is not used.
+@item posix-awk
+Regular expressions compatible with the POSIX awk command (not GNU awk)
+@item posix-basic
+POSIX Basic Regular Expressions.
+@item posix-egrep
+Regular expressions compatible with the POSIX egrep command
+@item posix-extended
+POSIX Extended Regular Expressions
+@end table
+
+@ref{Regular Expressions} for more information on the regular
+expression dialects understood by GNU findutils.
+
+
+@end deffn
+
+@node Fast Full Name Search
+@subsection Fast Full Name Search
+
+To search for files by name without having to actually scan the
+directories on the disk (which can be slow), you can use the
+@code{locate} program.  For each shell pattern you give it,
+@code{locate} searches one or more databases of file names and
+displays the file names that contain the pattern.  @xref{Shell Pattern
+Matching}, for details about shell patterns.
+
+If a pattern is a plain string---it contains no
+metacharacters---@code{locate} displays all file names in the database
+that contain that string.  If a pattern contains
+metacharacters, @code{locate} only displays file names that match the
+pattern exactly.  As a result, patterns that contain metacharacters
+should usually begin with a @samp{*}, and will most often end with one
+as well.  The exceptions are patterns that are intended to explicitly
+match the beginning or end of a file name.
+
+If you only want @code{locate} to match against the last component of
+the file names (the ``base name'' of the files) you can use the
+@samp{--basename} option.  The opposite behaviour is the default, but
+can be selected explicitly by using the option @samp{--wholename}.
+
+The command
+@example
+locate @var{pattern}
+@end example
+
+is almost equivalent to
+@example
+find @var{directories} -name @var{pattern}
+@end example
+
+where @var{directories} are the directories for which the file name
+databases contain information.  The differences are that the
+@code{locate} information might be out of date, and that @code{locate}
+handles wildcards in the pattern slightly differently than @code{find}
+(@pxref{Shell Pattern Matching}).
+
+The file name databases contain lists of files that were on the system
+when the databases were last updated.  The system administrator can
+choose the file name of the default database, the frequency with which
+the databases are updated, and the directories for which they contain
+entries.
+
+Here is how to select which file name databases @code{locate}
+searches.  The default is system-dependent.  At the time this document
+was generated, the default was @file{@value{LOCATE_DB}}.
+
+@table @code
+@item --database=@var{path}
+@itemx -d @var{path}
+Instead of searching the default file name database, search the file
+name databases in @var{path}, which is a colon-separated list of
+database file names.  You can also use the environment variable
+@code{LOCATE_PATH} to set the list of database files to search.  The
+option overrides the environment variable if both are used.
+@end table
+
+GNU @code{locate} can read file name databases generated by the
+@code{slocate} package.  However, these generally contain a list of
+all the files on the system, and so when using this database,
+@code{locate} will produce output only for files which are accessible
+to you.  @xref{Invoking locate}, for a description of the
+@samp{--existing} option which is used to do this.
+
+The @code{updatedb} program can also generate database in a format
+compatible with @code{slocate}.  @xref{Invoking updatedb}, for a
+description of its @samp{--dbformat} and @samp{--output} options.
+
+
+@node Shell Pattern Matching
+@subsection Shell Pattern Matching
+
+@code{find} and @code{locate} can compare file names, or parts of file
+names, to shell patterns.  A @dfn{shell pattern} is a string that may
+contain the following special characters, which are known as
+@dfn{wildcards} or @dfn{metacharacters}.
+
+You must quote patterns that contain metacharacters to prevent the
+shell from expanding them itself.  Double and single quotes both work;
+so does escaping with a backslash.
+
+@table @code
+@item *
+Matches any zero or more characters.
+
+@item ?
+Matches any one character.
+
+@item [@var{string}]
+Matches exactly one character that is a member of the string
+@var{string}.  This is called a @dfn{character class}.  As a
+shorthand, @var{string} may contain ranges, which consist of two
+characters with a dash between them.  For example, the class
+@samp{[a-z0-9_]} matches a lowercase letter, a number, or an
+underscore.  You can negate a class by placing a @samp{!} or @samp{^}
+immediately after the opening bracket.  Thus, @samp{[^A-Z@@]} matches
+any character except an uppercase letter or an at sign.
+
+@item \
+Removes the special meaning of the character that follows it.  This
+works even in character classes.
+@end table
+
+In the @code{find} tests that do shell pattern matching (@samp{-name},
+@samp{-wholename}, etc.), wildcards in the pattern will match a
+@samp{.}  at the beginning of a file name.  This is also the case for
+@code{locate}.  Thus, @samp{find -name '*macs'} will match a file
+named @file{.emacs}, as will @samp{locate '*macs'}.
+
+Slash characters have no special significance in the shell pattern
+matching that @code{find} and @code{locate} do, unlike in the shell,
+in which wildcards do not match them.  Therefore, a pattern
+@samp{foo*bar} can match a file name @samp{foo3/bar}, and a pattern
+@samp{./sr*sc} can match a file name @samp{./src/misc}.
+
+If you want to locate some files with the @samp{locate} command but
+don't need to see the full list you can use the @samp{--limit} option
+to see just a small number of results, or the @samp{--count} option to
+display only the total number of matches.
+
+@node Links
+@section Links
+
+There are two ways that files can be linked together.  @dfn{Symbolic
+links} are a special type of file whose contents are a portion of the
+name of another file.  @dfn{Hard links} are multiple directory entries
+for one file; the file names all have the same index node
+(@dfn{inode}) number on the disk.
+
+@menu
+* Symbolic Links::
+* Hard Links::
+@end menu
+
+@node Symbolic Links
+@subsection Symbolic Links
+
+Symbolic links are names that reference other files.  GNU @code{find}
+will handle symbolic links in one of two ways; firstly, it can
+dereference the links for you - this means that if it comes across a
+symbolic link, it examines the file that the link points to, in order
+to see if it matches the criteria you have specified.  Secondly, it
+can check the link itself in case you might be looking for the actual
+link.  If the file that the symbolic link points to is also within the
+directory hierarchy you are searching with the @code{find} command,
+you may not see a great deal of difference between these two
+alternatives.
+
+By default, @code{find} examines symbolic links themselves when it
+finds them (and, if it later comes across the linked-to file, it will
+examine that, too).  If you would prefer @code{find} to dereference
+the links and examine the file that each link points to, specify the
+@samp{-L} option to @code{find}.  You can explicitly specify the
+default behaviour by using the @samp{-P} option.  The @samp{-H}
+option is a half-way-between option which ensures that any symbolic
+links listed on the command line are dereferenced, but other symbolic
+links are not.
+
+Symbolic links are different from ``hard links'' in the sense that you
+need permission to search the directories
+in the linked-to file name to
+dereference the link.  This can mean that even if you specify the
+@samp{-L} option, @code{find} may not be able to determine the
+properties of the file that the link points to (because you don't have
+sufficient permission).  In this situation, @code{find} uses the
+properties of the link itself.  This also occurs if a symbolic link
+exists but points to a file that is missing.
+
+The options controlling the behaviour of @code{find} with respect to
+links are as follows :-
+
+@table @samp
+@item -P
+@code{find} does not dereference symbolic links at all.  This is the
+default behaviour.  This option must be specified before any of the
+file names on the command line.
+@item -H
+@code{find} does not dereference symbolic links (except in the case of
+file names on the command line, which are dereferenced).  If a
+symbolic link cannot be dereferenced, the information for the symbolic
+link itself is used.  This option must be specified before any of the
+file names on the command line.
+@item -L
+@code{find} dereferences symbolic links where possible, and where this
+is not possible it uses the properties of the symbolic link itself.
+This option must be specified before any of the file names on the
+command line.  Use of this option also implies the same behaviour as
+the @samp{-noleaf} option.  If you later use the @samp{-H} or
+@samp{-P} options, this does not turn off @samp{-noleaf}.
+
+@item -follow
+This option forms part of the ``expression'' and must be specified
+after the file names, but it is otherwise equivalent to @samp{-L}.
+The @samp{-follow} option affects only those tests which appear after
+it on the command line.  This option is deprecated.  Where possible,
+you should use @samp{-L} instead.
+@end table
+
+The following differences in behavior occur when the @samp{-L} option
+is used:
+
+@itemize @bullet
+@item
+@code{find} follows symbolic links to directories when searching
+directory trees.
+@item
+@samp{-lname} and @samp{-ilname} always return false (unless they
+happen to match broken symbolic links).
+@item
+@samp{-type} reports the types of the files that symbolic links point
+to.  This means that in combination with @samp{-L}, @samp{-type l}
+will be true only for broken symbolic links.  To check for symbolic
+links when @samp{-L} has been specified, use @samp{-xtype l}.
+@item
+Implies @samp{-noleaf} (@pxref{Directories}).
+@end itemize
+
+If the @samp{-L} option or the @samp{-H} option is used,
+the file names used as arguments to @samp{-newer}, @samp{-anewer}, and
+@samp{-cnewer} are dereferenced and the timestamp from the pointed-to
+file is used instead (if possible -- otherwise the timestamp from the
+symbolic link is used).
+
+@deffn Test -lname pattern
+@deffnx Test -ilname pattern
+True if the file is a symbolic link whose contents match shell pattern
+@var{pattern}.  For @samp{-ilname}, the match is case-insensitive.
+@xref{Shell Pattern Matching}, for details about the @var{pattern}
+argument.  If the @samp{-L} option is in effect, this test will always
+return false for symbolic links unless they are broken.  So, to list
+any symbolic links to @file{sysdep.c} in the current directory and its
+subdirectories, you can do:
+
+@example
+find . -lname '*sysdep.c'
+@end example
+@end deffn
+
+@node Hard Links
+@subsection Hard Links
+
+Hard links allow more than one name to refer to the same file.  To
+find all the names which refer to the same file as NAME, use
+@samp{-samefile NAME}.  If you are not using the @samp{-L} option, you
+can confine your search to one filesystem using the @samp{-xdev}
+option.  This is useful because hard links cannot point outside a
+single filesystem, so this can cut down on needless searching.
+
+If the @samp{-L} option is in effect, and NAME is in fact a symbolic
+link, the symbolic link will be dereferenced.  Hence you are searching
+for other links (hard or symbolic) to the file pointed to by NAME.  If
+@samp{-L} is in effect but NAME is not itself a symbolic link, other
+symbolic links to the file NAME will be matched.
+
+You can also search for files by inode number.  This can occasionally
+be useful in diagnosing problems with filesystems for example, because
+@code{fsck} tends to print inode numbers.  Inode numbers also
+occasionally turn up in log messages for some types of software, and
+are used to support the @code{ftok()} library function.
+
+You can learn a file's inode number and the number of links to it by
+running @samp{ls -li} or @samp{find -ls}.
+
+You can search for hard links to inode number NUM by using @samp{-inum
+NUM}. If there are any filesystem mount points below the directory
+where you are starting the search, use the @samp{-xdev} option unless
+you are also using the @samp{-L} option.  Using @samp{-xdev} this
+saves needless searching, since hard links to a file must be on the
+same filesystem.  @xref{Filesystems}.
+
+@deffn Test -samefile NAME
+File is a hard link to the same inode as NAME.  If the @samp{-L}
+option is in effect, symbolic links to the same file as NAME points to
+are also matched.
+@end deffn
+
+@deffn Test -inum n
+File has inode number @var{n}.  The @samp{+} and @samp{-} qualifiers
+also work, though these are rarely useful.  Much of the time it is
+easier to use @samp{-samefile} rather than this option.
+@end deffn
+
+You can also search for files that have a certain number of links,
+with @samp{-links}.  Directories normally have at least two hard
+links; their @file{.} entry is the second one.  If they have
+subdirectories, each of those also has a hard link called @file{..} to
+its parent directory.  The @file{.} and @file{..} directory entries
+are not normally searched unless they are mentioned on the @code{find}
+command line.
+
+@deffn Test -links n
+File has @var{n} hard links.
+@end deffn
+
+@deffn Test -links +n
+File has more than @var{n} hard links.
+@end deffn
+
+@deffn Test -links -n
+File has fewer than @var{n} hard links.
+@end deffn
+
+@node Time
+@section Time
+
+Each file has three time stamps, which record the last time that
+certain operations were performed on the file:
+
+@enumerate
+@item
+access (read the file's contents)
+@item
+change the status (modify the file or its attributes)
+@item
+modify (change the file's contents)
+@end enumerate
+
+Some systems also provide a timestamp that indicates when a file was
+@emph{created}.   For example, the UFS2 filesystem under NetBSD-3.1
+records the @emph{birth time} of each file.  This information is also
+available under other versions of BSD and some versions of Cygwin.
+However, even on systems which support file birth time, files may
+exist for which this information was not recorded (for example, UFS1
+file systems simply do not contain this information).
+
+You can search for files whose time stamps are within a certain age
+range, or compare them to other time stamps.
+
+@menu
+* Age Ranges::
+* Comparing Timestamps::
+@end menu
+
+@node Age Ranges
+@subsection Age Ranges
+
+These tests are mainly useful with ranges (@samp{+@var{n}} and
+@samp{-@var{n}}).
+
+@deffn Test -atime n
+@deffnx Test -ctime n
+@deffnx Test -mtime n
+True if the file was last accessed (or its status changed, or it was
+modified) @var{n}*24 hours ago.  The number of 24-hour periods since
+the file's timestamp is always rounded down; therefore 0 means ``less
+than 24 hours ago'', 1 means ``between 24 and 48 hours ago'', and so
+forth.  Fractional values are supported but this only really makes
+sense for the case where ranges (@samp{+@var{n}} and @samp{-@var{n}})
+are used.
+@end deffn
+
+@deffn Test -amin n
+@deffnx Test -cmin n
+@deffnx Test -mmin n
+True if the file was last accessed (or its status changed, or it was
+modified) @var{n} minutes ago.  These tests provide finer granularity
+of measurement than @samp{-atime} et al., but rounding is done in a
+similar way (again, fractions are supported).  For example, to list
+files in @file{/u/bill} that were last read from 2 to 6 minutes ago:
+
+@example
+find /u/bill -amin +2 -amin -6
+@end example
+@end deffn
+
+@deffn Option -daystart
+Measure times from the beginning of today rather than from 24 hours
+ago.  So, to list the regular files in your home directory that were
+modified yesterday, do
+
+@example
+find ~/ -daystart -type f -mtime 1
+@end example
+
+The @samp{-daystart} option is unlike most other options in that it
+has an effect on the way that other tests are performed.  The affected
+tests are @samp{-amin}, @samp{-cmin}, @samp{-mmin}, @samp{-atime},
+@samp{-ctime} and @samp{-mtime}.  The @samp{-daystart} option only
+affects the behaviour of any tests which appear after it on the
+command line.
+@end deffn
+
+@node Comparing Timestamps
+@subsection Comparing Timestamps
+
+@deffn Test -newerXY reference
+Succeeds if timestamp @samp{X} of the file being considered is newer
+than timestamp @samp{Y} of the file @file{reference}.   The letters
+@samp{X} and @samp{Y} can be any of the following letters:
+
+@table @samp
+@item a
+Last-access time of @file{reference}
+@item B
+Birth time of @file{reference} (when this is not known, the test cannot succeed)
+@item c
+Last-change time of @file{reference}
+@item m
+Last-modification time of @file{reference}
+@item t
+The @file{reference} argument is interpreted as a literal time, rather
+than the name of a file.  @xref{Date input formats}, for a description
+of how the timestamp is understood.  Tests of the form @samp{-newerXt}
+are valid but tests of the form @samp{-newertY} are not.
+@end table
+
+For example the test @code{-newerac /tmp/foo} succeeds for all files
+which have been accessed more recently than @file{/tmp/foo} was
+changed.   Here @samp{X} is @samp{a} and @samp{Y} is @samp{c}.
+
+Not all files have a known birth time.  If @samp{Y} is @samp{b} and
+the birth time of @file{reference} is not available, @code{find} exits
+with an explanatory error message.  If @samp{X} is @samp{b} and we do
+not know the birth time the file currently being considered, the test
+simply fails (that is, it behaves like @code{-false} does).
+
+Some operating systems (for example, most implementations of Unix) do
+not support file birth times.  Some others, for example NetBSD-3.1,
+do.  Even on operating systems which support file birth times, the
+information may not be available for specific files.  For example,
+under NetBSD, file birth times are supported on UFS2 file systems, but
+not UFS1 file systems.
+
+@end deffn
+
+
+
+There are two ways to list files in @file{/usr} modified after
+February 1 of the current year.  One uses @samp{-newermt}:
+
+@example
+find /usr -newermt "Feb 1"
+@end example
+
+The other way of doing this works on the versions of find before 4.3.3:
+
+@c Idea from Rick Sladkey.
+@example
+touch -t 02010000 /tmp/stamp$$
+find /usr -newer /tmp/stamp$$
+rm -f /tmp/stamp$$
+@end example
+
+@deffn Test -anewer file
+@deffnx Test -cnewer file
+@deffnx Test -newer file
+True if the file was last accessed (or its status changed, or it was
+modified) more recently than @var{file} was modified.  These tests are
+affected by @samp{-follow} only if @samp{-follow} comes before them on
+the command line.  @xref{Symbolic Links}, for more information on
+@samp{-follow}.  As an example, to list any files modified since
+@file{/bin/sh} was last modified:
+
+@example
+find . -newer /bin/sh
+@end example
+@end deffn
+
+@deffn Test -used n
+True if the file was last accessed @var{n} days after its status was
+last changed.  Useful for finding files that are not being used, and
+could perhaps be archived or removed to save disk space.
+@end deffn
+
+@node Size
+@section Size
+
+@deffn Test -size n@r{[}bckwMG@r{]}
+True if the file uses @var{n} units of space, rounding up.  The units
+are 512-byte blocks by default, but they can be changed by adding a
+one-character suffix to @var{n}:
+
+@table @code
+@item b
+512-byte blocks (never 1024)
+@item c
+bytes
+@item k
+kilobytes (1024 bytes)
+@item w
+2-byte words
+@item M
+Megabytes (units of 1048576 bytes)
+@item G
+Gigabytes (units of 1073741824 bytes)
+@end table
+
+The `b' suffix always considers blocks to be 512 bytes.  This is not
+affected by the setting (or non-setting) of the POSIXLY_CORRECT
+environment variable.  This behaviour is different from the behaviour of
+the @samp{-ls} action).  If you want to use 1024-byte units, use the
+`k' suffix instead.
+
+The number can be prefixed with a `+' or a `-'.  A plus sign indicates
+that the test should succeed if the file uses at least @var{n} units
+of storage (a common use of this test) and a minus sign
+indicates that the test should succeed if the file uses less than
+@var{n} units of storage.  There is no `=' prefix, because that's the
+default anyway.
+
+The size does not count indirect blocks, but it does count blocks in
+sparse files that are not actually allocated.  In other words, it's
+consistent with the result you get for @samp{ls -l} or @samp{wc -c}.
+This handling of sparse files differs from the output of the @samp{%k}
+and @samp{%b} format specifiers for the @samp{-printf} predicate.
+
+@end deffn
+
+@deffn Test -empty
+True if the file is empty and is either a regular file or a directory.
+This might help determine good candidates for deletion.  This test is
+useful with @samp{-depth} (@pxref{Directories}) and @samp{-delete}
+(@pxref{Single File}).
+@end deffn
+
+@node Type
+@section Type
+
+@deffn Test -type c
+True if the file is of type @var{c}:
+
+@table @code
+@item b
+block (buffered) special
+@item c
+character (unbuffered) special
+@item d
+directory
+@item p
+named pipe (FIFO)
+@item f
+regular file
+@item l
+symbolic link; if @samp{-L} is in effect, this is true only for broken
+symbolic links.  If you want to search for symbolic links when
+@samp{-L} is in effect, use @samp{-xtype} instead of @samp{-type}.
+@item s
+socket
+@item D
+door (Solaris)
+@end table
+@end deffn
+
+@deffn Test -xtype c
+This test behaves the same as @samp{-type} unless the file is a
+symbolic link.  If the file is a symbolic link, the result is as
+follows (in the table below, @samp{X} should be understood to
+represent any letter except @samp{l}):
+
+@table @samp
+@item @samp{-P -xtype l}
+True if the symbolic link is broken
+@item @samp{-P -xtype X}
+True if the (ultimate) target file is of type @samp{X}.
+@item @samp{-L -xtype l}
+Always true
+@item @samp{-L -xtype X}
+False unless the symbolic link is broken
+@end table
+
+In other words, for symbolic links, @samp{-xtype} checks the type of
+the file that @samp{-type} does not check.
+
+The @samp{-H} option also affects the behaviour of @samp{-xtype}.
+When @samp{-H} is in effect, @samp{-xtype} behaves as if @samp{-L} had
+been specified when examining files listed on the command line, and as
+if @samp{-P} had been specified otherwise.  If neither @samp{-H} nor
+@samp{-L} was specified, @samp{-xtype} behaves as if @samp{-P} had
+been specified.
+
+@xref{Symbolic Links}, for more information on @samp{-follow} and
+@samp{-L}.
+@end deffn
+
+@node Owner
+@section Owner
+
+@deffn Test -user uname
+@deffnx Test -group gname
+True if the file is owned by user @var{uname} (belongs to group
+@var{gname}).  A numeric ID is allowed.
+@end deffn
+
+@deffn Test -uid n
+@deffnx Test -gid n
+True if the file's numeric user ID (group ID) is @var{n}.  These tests
+support ranges (@samp{+@var{n}} and @samp{-@var{n}}), unlike
+@samp{-user} and @samp{-group}.
+@end deffn
+
+@deffn Test -nouser
+@deffnx Test -nogroup
+True if no user corresponds to the file's numeric user ID (no group
+corresponds to the numeric group ID).  These cases usually mean that
+the files belonged to users who have since been removed from the
+system.  You probably should change the ownership of such files to an
+existing user or group, using the @code{chown} or @code{chgrp}
+program.
+@end deffn
+
+@node Mode Bits
+@section File Mode Bits
+
+@xref{File Permissions}, for information on how file mode bits are
+structured and how to specify them.
+
+Four tests determine what users can do with files.  These are
+@samp{-readable}, @samp{-writable}, @samp{-executable} and
+@samp{-perm}.  The first three tests ask the operating system if the
+current user can perform the relevant operation on a file, while
+@samp{-perm} just examines the file's mode.  The file mode may give
+a misleading impression of what the user can actually do, because the
+file may have an access control list, or exist on a read-only
+filesystem, for example.  Of these four tests though, only
+@samp{-perm} is specified by the POSIX standard.
+
+The @samp{-readable}, @samp{-writable} and @samp{-executable} tests
+are implemented via the @code{access} system call.  This is
+implemented within the operating system itself.  If the file being
+considered is on an NFS filesystem, the remote system may allow or
+forbid read or write operations for reasons of which the NFS client
+cannot take account.  This includes user-ID mapping, either in the
+general sense or the more restricted sense in which remote superusers
+are treated by the NFS server as if they are the local user
+@samp{nobody} on the NFS server.
+
+None of the tests in this section should be used to verify that a user
+is authorised to perform any operation (on the file being tested or
+any other file) because of the possibility of a race condition.  That
+is, the situation may change between the test and an action being
+taken on the basis of the result of that test.
+
+
+@deffn Test -readable
+True if the file can be read by the invoking user.
+@end deffn
+
+@deffn Test -writable
+True if the file can be written by the invoking user.  This is an
+in-principle check, and other things may prevent a successful write
+operation; for example, the filesystem might be full.
+@end deffn
+
+@deffn Test -executable
+True if the file can be executed/searched by the invoking user.
+@end deffn
+
+@deffn Test -perm pmode
+
+True if the file's mode bits match @var{pmode}, which can be
+either a symbolic or numeric @var{mode} (@pxref{File Permissions})
+optionally prefixed by @samp{-} or @samp{/}.
+
+A @var{pmode} that starts with neither @samp{-} nor @samp{/} matches
+if @var{mode} exactly matches the file mode bits.
+
+A @var{pmode} that starts with @samp{+} but which is not valid (for
+example @samp{+a+x}) is an error if the POSIXLY_CORRECT environment
+variable it set.  Otherwise this is treated as if the initial
+@samp{+} were a @samp{/}, for backward compatibility.
+
+A @var{pmode} that starts with @samp{-} matches if
+@emph{all} the file mode bits set in @var{mode} are set for the file;
+bits not set in @var{mode} are ignored.
+
+A @var{pmode} that starts with @samp{/} matches if
+@emph{any} of the file mode bits set in @var{mode} are set for the file;
+bits not set in @var{mode} are ignored.
+This is a GNU extension.
+
+If you don't use the @samp{/} or @samp{-} form with a symbolic mode
+string, you may have to specify a rather complex mode string.  For
+example @samp{-perm g=w} will only match files that have mode 0020
+(that is, ones for which group write permission is the only file mode bit
+set).  It is more likely that you will want to use the @samp{/} or
+@samp{-} forms, for example @samp{-perm -g=w}, which matches any file
+with group write permission.
+
+
+@table @samp
+@item -perm 664
+Match files that have read and write permission for their owner,
+and group, but that the rest of the world can read but not write to.
+Do not match files that meet these criteria but have other file mode
+bits set (for example if someone can execute/search the file).
+
+@item -perm -664
+Match files that have read and write permission for their owner,
+and group, but that the rest of the world can read but not write to,
+without regard to the presence of any extra file mode bits (for
+example the executable bit).  This matches a file with mode
+0777, for example.
+
+@item -perm /222
+Match files that are writable by somebody (their owner, or
+their group, or anybody else).
+
+@item -perm /022
+Match files that are writable by either their owner or their
+group.  The files don't have to be writable by both the owner and
+group to be matched; either will do.
+
+@item -perm /g+w,o+w
+As above.
+
+@item -perm /g=w,o=w
+As above.
+
+@item -perm -022
+Match files that are writable by both their owner and their
+group.
+
+@item -perm -444 -perm /222 ! -perm /111
+Match files that are readable for everybody, have at least one
+write bit set (i.e., somebody can write to them), but that cannot be
+executed/searched by anybody.  Note that in some shells the @samp{!} must be
+escaped;.
+
+@item -perm -a+r -perm /a+w ! -perm /a+x
+As above.
+
+
+@item -perm -g+w,o+w
+As above.
+@end table
+
+@quotation Warning
+If you specify @samp{-perm /000} or @samp{-perm /mode} where the
+symbolic mode @samp{mode} has no bits set, the test matches all files.
+Versions of GNU @code{find} prior to 4.3.3 matched no files in this
+situation.
+@end quotation
+
+@end deffn
+
+@deffn Test -context pattern
+True if file's SELinux context matches the pattern @var{pattern}.
+The pattern uses shell glob matching.
+
+This predicate is supported only on @code{find} versions compiled with
+SELinux support and only when SELinux is enabled.
+@end deffn
+
+@node Contents
+@section Contents
+
+To search for files based on their contents, you can use the
+@code{grep} program.  For example, to find out which C source files in
+the current directory contain the string @samp{thing}, you can do:
+
+@example
+grep -l thing *.[ch]
+@end example
+
+If you also want to search for the string in files in subdirectories,
+you can combine @code{grep} with @code{find} and @code{xargs}, like
+this:
+
+@example
+find . -name '*.[ch]' | xargs grep -l thing
+@end example
+
+The @samp{-l} option causes @code{grep} to print only the names of
+files that contain the string, rather than the lines that contain it.
+The string argument (@samp{thing}) is actually a regular expression,
+so it can contain metacharacters.  This method can be refined a little
+by using the @samp{-r} option to make @code{xargs} not run @code{grep}
+if @code{find} produces no output, and using the @code{find} action
+@samp{-print0} and the @code{xargs} option @samp{-0} to avoid
+misinterpreting files whose names contain spaces:
+
+@example
+find . -name '*.[ch]' -print0 | xargs -r -0 grep -l thing
+@end example
+
+For a fuller treatment of finding files whose contents match a
+pattern, see the manual page for @code{grep}.
+
+@node Directories
+@section Directories
+
+Here is how to control which directories @code{find} searches, and how
+it searches them.  These two options allow you to process a horizontal
+slice of a directory tree.
+
+@deffn Option -maxdepth levels
+Descend at most @var{levels} (a non-negative integer) levels of
+directories below the command line arguments.  @samp{-maxdepth 0}
+means only apply the tests and actions to the command line arguments.
+@end deffn
+
+@deffn Option -mindepth levels
+Do not apply any tests or actions at levels less than @var{levels} (a
+non-negative integer).  @samp{-mindepth 1} means process all files
+except the command line arguments.
+@end deffn
+
+@deffn Option -depth
+Process each directory's contents before the directory itself.  Doing
+this is a good idea when producing lists of files to archive with
+@code{cpio} or @code{tar}.  If a directory does not have write
+permission for its owner, its contents can still be restored from the
+archive since the directory's permissions are restored after its
+contents.
+@end deffn
+
+@deffn Option -d
+This is a deprecated synonym for @samp{-depth}, for compatibility with
+Mac OS X, FreeBSD and OpenBSD.  The @samp{-depth} option is a POSIX
+feature, so it is better to use that.
+@end deffn
+
+@deffn Action -prune
+If the file is a directory, do not descend into it.  The result is
+true.  For example, to skip the directory @file{src/emacs} and all
+files and directories under it, and print the names of the other files
+found:
+
+@example
+find . -wholename './src/emacs' -prune -o -print
+@end example
+
+The above command will not print @file{./src/emacs} among its list of
+results.  This however is not due to the effect of the @samp{-prune}
+action (which only prevents further descent, it doesn't make sure we
+ignore that item).  Instead, this effect is due to the use of
+@samp{-o}.  Since the left hand side of the ``or'' condition has
+succeeded for @file{./src/emacs}, it is not necessary to evaluate the
+right-hand-side (@samp{-print}) at all for this particular file.  If
+you wanted to print that directory name you could use either an extra
+@samp{-print} action:
+
+@example
+find . -wholename './src/emacs' -prune -print -o -print
+@end example
+
+or use the comma operator:
+
+@example
+find . -wholename './src/emacs' -prune , -print
+@end example
+
+If the @samp{-depth} option is in effect, the subdirectories will have
+already been visited in any case.  Hence @samp{-prune} has no effect
+in this case.
+
+Because @samp{-delete} implies @samp{-depth}, using @samp{-prune} in
+combination with @samp{-delete} may well result in the deletion of
+more files than you intended.
+@end deffn
+
+
+@deffn Action -quit
+Exit immediately (with return value zero if no errors have occurred).
+This is different to @samp{-prune} because @samp{-prune} only applies
+to the contents of pruned directories, while @samp{-quit} simply makes
+@code{find} stop immediately.  No child processes will be left
+running, but no more files specified on the command line will be
+processed.  For example, @code{find /tmp/foo /tmp/bar -print -quit}
+will print only @samp{/tmp/foo}.  Any command lines which have been
+built by @samp{-exec ... \+} or @samp{-execdir ... \+} are invoked
+before the program is exited.
+@end deffn
+
+@deffn Option -noleaf
+Do not optimize by assuming that directories contain 2 fewer
+subdirectories than their hard link count.  This option is needed when
+searching filesystems that do not follow the Unix directory-link
+convention, such as CD-ROM or MS-DOS filesystems or AFS volume mount
+points.  Each directory on a normal Unix filesystem has at least 2
+hard links: its name and its @file{.}  entry.  Additionally, its
+subdirectories (if any) each have a @file{..}  entry linked to that
+directory.  When @code{find} is examining a directory, after it has
+statted 2 fewer subdirectories than the directory's link count, it
+knows that the rest of the entries in the directory are
+non-directories (@dfn{leaf} files in the directory tree).  If only the
+files' names need to be examined, there is no need to stat them; this
+gives a significant increase in search speed.
+@end deffn
+
+@deffn Option -ignore_readdir_race
+If a file disappears after its name has been read from a directory but
+before @code{find} gets around to examining the file with @code{stat},
+don't issue an error message.  If you don't specify this option, an
+error message will be issued.  This option can be useful in system
+scripts (cron scripts, for example) that examine areas of the
+filesystem that change frequently (mail queues, temporary directories,
+and so forth), because this scenario is common for those sorts of
+directories.  Completely silencing error messages from @code{find} is
+undesirable, so this option neatly solves the problem.  There is no
+way to search one part of the filesystem with this option on and part
+of it with this option off, though.  When this option is turned on and
+find discovers that one of the start-point files specified on the
+command line does not exist, no error message will be issued.
+
+@end deffn
+
+@deffn Option -noignore_readdir_race
+This option reverses the effect of the @samp{-ignore_readdir_race}
+option.
+@end deffn
+
+
+@node Filesystems
+@section Filesystems
+
+A @dfn{filesystem} is a section of a disk, either on the local host or
+mounted from a remote host over a network.  Searching network
+filesystems can be slow, so it is common to make @code{find} avoid
+them.
+
+There are two ways to avoid searching certain filesystems.  One way is
+to tell @code{find} to only search one filesystem:
+
+@deffn Option -xdev
+@deffnx Option -mount
+Don't descend directories on other filesystems.  These options are
+synonyms.
+@end deffn
+
+The other way is to check the type of filesystem each file is on, and
+not descend directories that are on undesirable filesystem types:
+
+@deffn Test -fstype type
+True if the file is on a filesystem of type @var{type}.  The valid
+filesystem types vary among different versions of Unix; an incomplete
+list of filesystem types that are accepted on some version of Unix or
+another is:
+@example
+ext2 ext3 proc sysfs ufs 4.2 4.3 nfs tmp mfs S51K S52K
+@end example
+You can use @samp{-printf} with the @samp{%F} directive to see the
+types of your filesystems.  The @samp{%D} directive shows the device
+number.  @xref{Print File Information}.  @samp{-fstype} is usually
+used with @samp{-prune} to avoid searching remote filesystems
+(@pxref{Directories}).
+@end deffn
+
+@node Combining Primaries With Operators
+@section Combining Primaries With Operators
+
+Operators build a complex expression from tests and actions.
+The operators are, in order of decreasing precedence:
+
+@table @code
+@item @asis{( @var{expr} )}
+@findex ()
+Force precedence.  True if @var{expr} is true.
+
+@item @asis{! @var{expr}}
+@itemx @asis{-not @var{expr}}
+@findex !
+@findex -not
+True if @var{expr} is false.  In some shells, it is necessary to
+protect the @samp{!} from shell interpretation by quoting it.
+
+@item @asis{@var{expr1 expr2}}
+@itemx @asis{@var{expr1} -a @var{expr2}}
+@itemx @asis{@var{expr1} -and @var{expr2}}
+@findex -a
+@findex -and
+And; @var{expr2} is not evaluated if @var{expr1} is false.
+
+@item @asis{@var{expr1} -o @var{expr2}}
+@itemx @asis{@var{expr1} -or @var{expr2}}
+@findex -o
+@findex -or
+Or; @var{expr2} is not evaluated if @var{expr1} is true.
+
+@item @asis{@var{expr1} , @var{expr2}}
+@findex ,
+List; both @var{expr1} and @var{expr2} are always evaluated.  True if
+@var{expr2} is true.  The value of @var{expr1} is discarded.  This
+operator lets you do multiple independent operations on one traversal,
+without depending on whether other operations succeeded.  The two
+operations @var{expr1} and @var{expr2} are not always fully
+independent, since @var{expr1} might have side effects like touching
+or deleting files, or it might use @samp{-prune} which would also
+affect @var{expr2}.
+@end table
+
+@code{find} searches the directory tree rooted at each file name by
+evaluating the expression from left to right, according to the rules
+of precedence, until the outcome is known (the left hand side is false
+for @samp{-and}, true for @samp{-or}), at which point @code{find}
+moves on to the next file name.
+
+There are two other tests that can be useful in complex expressions:
+
+@deffn Test -true
+Always true.
+@end deffn
+
+@deffn Test -false
+Always false.
+@end deffn
+
+@node Actions
+@chapter Actions
+
+There are several ways you can print information about the files that
+match the criteria you gave in the @code{find} expression.  You can
+print the information either to the standard output or to a file that
+you name.  You can also execute commands that have the file names as
+arguments.  You can use those commands as further filters to select
+files.
+
+@menu
+* Print File Name::
+* Print File Information::
+* Run Commands::
+* Delete Files::
+* Adding Tests::
+@end menu
+
+@node Print File Name
+@section Print File Name
+
+@deffn Action -print
+True; print the entire file name on the standard output, followed by a
+newline.  If there is the faintest possibility that one of the files
+for which you are searching might contain a newline, you should use
+@samp{-print0} instead.
+@end deffn
+
+@deffn Action -fprint file
+True; print the entire file name into file @var{file}, followed by a
+newline.  If @var{file} does not exist when @code{find} is run, it is
+created; if it does exist, it is truncated to 0 bytes.  The named
+output file is always created, even if no output is sent to it.  The
+file names @file{/dev/stdout} and @file{/dev/stderr} are handled
+specially; they refer to the standard output and standard error
+output, respectively.
+
+If there is the faintest possibility that one of the files for which
+you are searching might contain a newline, you should use
+@samp{-fprint0} instead.
+@end deffn
+
+
+@c @deffn Option -show-control-chars how
+@c This option affects how some of @code{find}'s actions treat
+@c unprintable characters in file names.  If @samp{how} is
+@c @samp{literal}, any subsequent actions (i.e., actions further on in the
+@c command line) print file names as-is.
+@c
+@c If this option is not specified, it currently defaults to @samp{safe}.
+@c If @samp{how} is @samp{safe}, C-like backslash escapes are used to
+@c indicate the non-printable characters for @samp{-ls} and @samp{-fls}.
+@c On the other hand, @samp{-print}, @samp{-fprint}, @samp{-fprintf} and
+@c @code{-printf} all quote unprintable characters if the data is going
+@c to a tty, and otherwise the data is emitted literally.
+@c
+@c @table @code
+@c @item -ls
+@c Escaped if @samp{how} is @samp{safe}
+@c @item -fls
+@c Escaped if @samp{how} is @samp{safe}
+@c @item -print
+@c Always quoted if stdout is a tty,
+@c @samp{-show-control-chars} is ignored
+@c @item -print0
+@c Always literal, never escaped
+@c @item -fprint
+@c Always quoted if the destination is a tty;
+@c @samp{-show-control-chars} is ignored
+@c @item -fprint0
+@c Always literal, never escaped
+@c @item -fprintf
+@c If the destination is a tty, the @samp{%f},
+@c @samp{%F}, @samp{%h}, @samp{%l}, @samp{%p},
+@c and @samp{%P} directives produce quoted
+@c strings if stdout is a tty and are treated
+@c literally otherwise.
+@c @item -printf
+@c As for @code{-fprintf}.
+@c @end table
+@c @end deffn
+
+
+@node Print File Information
+@section Print File Information
+
+@deffn Action -ls
+True; list the current file in @samp{ls -dils} format on the standard
+output.  The output looks like this:
+
+@smallexample
+204744   17 -rw-r--r--   1 djm      staff       17337 Nov  2  1992 ./lwall-quotes
+@end smallexample
+
+The fields are:
+
+@enumerate
+@item
+The inode number of the file.  @xref{Hard Links}, for how to find
+files based on their inode number.
+
+@item
+the number of blocks in the file.  The block counts are of 1K blocks,
+unless the environment variable @code{POSIXLY_CORRECT} is set, in
+which case 512-byte blocks are used.  @xref{Size}, for how to find
+files based on their size.
+
+@item
+The file's type and file mode bits.  The type is shown as a dash for a
+regular file; for other file types, a letter like for @samp{-type} is
+used (@pxref{Type}).  The file mode bits are read, write, and execute/search for
+the file's owner, its group, and other users, respectively; a dash
+means the permission is not granted.  @xref{File Permissions}, for
+more details about file permissions.  @xref{Mode Bits}, for how to
+find files based on their file mode bits.
+
+@item
+The number of hard links to the file.
+
+@item
+The user who owns the file.
+
+@item
+The file's group.
+
+@item
+The file's size in bytes.
+
+@item
+The date the file was last modified.
+
+@item
+The file's name.  @samp{-ls} quotes non-printable characters in the
+file names using C-like backslash escapes.  This may change soon, as
+the treatment of unprintable characters is harmonised for @samp{-ls},
+@samp{-fls}, @samp{-print}, @samp{-fprint}, @samp{-printf} and
+@samp{-fprintf}.
+@end enumerate
+@end deffn
+
+@deffn Action -fls file
+True; like @samp{-ls} but write to @var{file} like @samp{-fprint}
+(@pxref{Print File Name}).  The named output file is always created,
+even if no output is sent to it.
+@end deffn
+
+@deffn Action -printf format
+True; print @var{format} on the standard output, interpreting @samp{\}
+escapes and @samp{%} directives.  Field widths and precisions can be
+specified as with the @code{printf} C function.  Format flags (like
+@samp{#} for example) may not work as you expect because many of the
+fields, even numeric ones, are printed with %s.  Numeric flags which
+are affected in this way include G, U, b, D, k and n.  This difference
+in behaviour means though that the format flag @samp{-} will work; it
+forces left-alignment of the field.  Unlike @samp{-print},
+@samp{-printf} does not add a newline at the end of the string.  If
+you want a newline at the end of the string, add a @samp{\n}.
+@end deffn
+
+@deffn Action -fprintf file format
+True; like @samp{-printf} but write to @var{file} like @samp{-fprint}
+(@pxref{Print File Name}).  The output file is always created, even if
+no output is ever sent to it.
+@end deffn
+
+@menu
+* Escapes::
+* Format Directives::
+* Time Formats::
+@end menu
+
+@node Escapes
+@subsection Escapes
+
+The escapes that @samp{-printf} and @samp{-fprintf} recognise are:
+
+@table @code
+@item \a
+Alarm bell.
+@item \b
+Backspace.
+@item \c
+Stop printing from this format immediately and flush the output.
+@item \f
+Form feed.
+@item \n
+Newline.
+@item \r
+Carriage return.
+@item \t
+Horizontal tab.
+@item \v
+Vertical tab.
+@item \\
+A literal backslash (@samp{\}).
+@item \0
+ASCII NUL.
+@item \NNN
+The character whose ASCII code is NNN (octal).
+@end table
+
+A @samp{\} character followed by any other character is treated as an
+ordinary character, so they both are printed, and a warning message is
+printed to the standard error output (because it was probably a typo).
+
+@node Format Directives
+@subsection Format Directives
+
+@samp{-printf} and @samp{-fprintf} support the following format
+directives to print information about the file being processed.  The C
+@code{printf} function, field width and precision specifiers are
+supported, as applied to string (%s) types. That is, you can specify
+"minimum field width"."maximum field width" for each directive.
+Format flags (like @samp{#} for example) may not work as you expect
+because many of the fields, even numeric ones, are printed with %s.
+The format flag @samp{-} does work; it forces left-alignment of the
+field.
+
+@samp{%%} is a literal percent sign.  A @samp{%} character followed by
+an unrecognised character (i.e., not a known directive or @code{printf}
+field width and precision specifier), is discarded (but the
+unrecognised character is printed), and a warning message is printed
+to the standard error output (because it was probably a typo).  Don't
+rely on this behaviour, because other directives may be added in the
+future.
+
+A @samp{%} at the end of the format argument causes undefined
+behaviour since there is no following character.  In some locales, it
+may hide your door keys, while in others it may remove the final page
+from the novel you are reading.
+
+@menu
+* Name Directives::
+* Ownership Directives::
+* Size Directives::
+* Location Directives::
+* Time Directives::
+* Other Directives::
+* Formatting Flags::
+@end menu
+
+@node Name Directives
+@subsubsection Name Directives
+
+@table @code
+@item %p
+@c supports %-X.Yp
+File's name (not the absolute path name, but the name of the file as
+it was encountered by @code{find} - that is, as a relative path from
+one of the starting points).
+@item %f
+File's name with any leading directories removed (only the last
+element).
+@c supports %-X.Yf
+@item %h
+Leading directories of file's name (all but the last element and the
+slash before it).  If the file's name contains no slashes (for example
+because it was named on the command line and is in the current working
+directory), then ``%h'' expands to ``.''.  This prevents ``%h/%f''
+expanding to ``/foo'', which would be surprising and probably not
+desirable.
+@c supports %-X.Yh
+@item %P
+File's name with the name of the command line argument under which
+it was found removed from the beginning.
+@c supports %-X.YP
+@item %H
+Command line argument under which file was found.
+@c supports %-X.YH
+@end table
+
+@node Ownership Directives
+@subsubsection Ownership Directives
+
+@table @code
+@item %g
+@c supports %-X.Yg
+File's group name, or numeric group ID if the group has no name.
+@item %G
+@c supports %-X.Yg
+@c TODO: Needs to support # flag and 0 flag
+File's numeric group ID.
+@item %u
+@c supports %-X.Yu
+File's user name, or numeric user ID if the user has no name.
+@item %U
+@c supports %-X.Yu
+@c TODO: Needs to support # flag
+File's numeric user ID.
+@item %m
+@c full support, including # and 0.
+File's mode bits (in octal).  If you always want to have a leading
+zero on the number, use the '#' format flag, for example '%#m'.
+
+The file mode bit numbers used are the traditional Unix
+numbers, which will be as expected on most systems, but if your
+system's file mode bit layout differs from the traditional Unix
+semantics, you will see a difference between the mode as printed by
+@samp{%m} and the mode as it appears in @code{struct stat}.
+
+@item %M
+File's type and mode bits (in symbolic form, as for @code{ls}).  This
+directive is supported in findutils 4.2.5 and later.
+@end table
+
+@node Size Directives
+@subsubsection Size Directives
+
+@table @code
+@item %k
+The amount of disk space used for this file in 1K blocks. Since disk
+space is allocated in multiples of the filesystem block size this is
+usually greater than %s/1024, but it can also be smaller if the file
+is a sparse file (that is, it has ``holes'').
+@item %b
+The amount of disk space used for this file in 512-byte blocks. Since
+disk space is allocated in multiples of the filesystem block size this
+is usually greater than %s/512, but it can also be smaller if the
+file is a sparse file (that is, it has ``holes'').
+@item %s
+File's size in bytes.
+@item %S
+File's sparseness.  This is calculated as @code{(BLOCKSIZE*st_blocks /
+st_size)}.  The exact value you will get for an ordinary file of a
+certain length is system-dependent.  However, normally sparse files
+will have values less than 1.0, and files which use indirect blocks
+and have few holes may have a value which is greater than 1.0.  The
+value used for BLOCKSIZE is system-dependent, but is usually 512
+bytes.  If the file size is zero, the value printed is undefined.  On
+systems which lack support for st_blocks, a file's sparseness is
+assumed to be 1.0.
+@end table
+
+@node Location Directives
+@subsubsection Location Directives
+
+@table @code
+@item %d
+File's depth in the directory tree (depth below a file named on the
+command line, not depth below the root directory).  Files named on the
+command line have a depth of 0.  Subdirectories immediately below them
+have a depth of 1, and so on.
+@item %D
+The device number on which the file exists (the @code{st_dev} field of
+@code{struct stat}), in decimal.
+@item %F
+Type of the filesystem the file is on; this value can be used for
+@samp{-fstype} (@pxref{Directories}).
+@item %l
+Object of symbolic link (empty string if file is not a symbolic link).
+@item %i
+File's inode number (in decimal).
+@item %n
+Number of hard links to file.
+@item %y
+Type of the file as used with @samp{-type}.  If the file is a symbolic
+link, @samp{l} will be printed.
+@item %Y
+Type of the file as used with @samp{-type}.  If the file is a symbolic
+link, it is dereferenced.  If the file is a broken symbolic link,
+@samp{N} is printed.
+
+@end table
+
+@node Time Directives
+@subsubsection Time Directives
+
+Some of these directives use the C @code{ctime} function.  Its output
+depends on the current locale, but it typically looks like
+
+@example
+Wed Nov  2 00:42:36 1994
+@end example
+
+@table @code
+@item %a
+File's last access time in the format returned by the C @code{ctime}
+function.
+@item %A@var{k}
+File's last access time in the format specified by @var{k}
+(@pxref{Time Formats}).
+@item %c
+File's last status change time in the format returned by the C
+@code{ctime} function.
+@item %C@var{k}
+File's last status change time in the format specified by @var{k}
+(@pxref{Time Formats}).
+@item %t
+File's last modification time in the format returned by the C
+@code{ctime} function.
+@item %T@var{k}
+File's last modification time in the format specified by @var{k}
+(@pxref{Time Formats}).
+@end table
+
+@node Other Directives
+@subsubsection Other Directives
+
+@table @code
+@item %Z
+File's SELinux context, or empty string if the file has no SELinux context.
+@end table
+
+@node Time Formats
+@subsection Time Formats
+
+Below are the formats for the directives @samp{%A}, @samp{%C}, and
+@samp{%T}, which print the file's timestamps.  Some of these formats
+might not be available on all systems, due to differences in the C
+@code{strftime} function between systems.
+
+@menu
+* Time Components::
+* Date Components::
+* Combined Time Formats::
+@end menu
+
+@node Time Components
+@subsubsection Time Components
+
+The following format directives print single components of the time.
+
+@table @code
+@item H
+hour (00..23)
+@item I
+hour (01..12)
+@item k
+hour ( 0..23)
+@item l
+hour ( 1..12)
+@item p
+locale's AM or PM
+@item Z
+time zone (e.g., EDT), or nothing if no time zone is determinable
+@item M
+minute (00..59)
+@item S
+second (00..61).  There is a fractional part.
+@item @@
+seconds since Jan. 1, 1970, 00:00 GMT, with fractional part.
+@end table
+
+The fractional part of the seconds field is of indeterminate length
+and precision.  That is, the length of the fractional part of the
+seconds field will in general vary between findutils releases and
+between systems.  This means that it is unwise to assume that field
+has any specific length.  The length of this field is not usually a
+guide to the precision of timestamps in the underlying file system.
+
+
+
+@node Date Components
+@subsubsection Date Components
+
+The following format directives print single components of the date.
+
+@table @code
+@item a
+locale's abbreviated weekday name (Sun..Sat)
+@item A
+locale's full weekday name, variable length (Sunday..Saturday)
+@item b
+@itemx h
+locale's abbreviated month name (Jan..Dec)
+@item B
+locale's full month name, variable length (January..December)
+@item m
+month (01..12)
+@item d
+day of month (01..31)
+@item w
+day of week (0..6)
+@item j
+day of year (001..366)
+@item U
+week number of year with Sunday as first day of week (00..53)
+@item W
+week number of year with Monday as first day of week (00..53)
+@item Y
+year (1970@dots{})
+@item y
+last two digits of year (00..99)
+@end table
+
+@node Combined Time Formats
+@subsubsection Combined Time Formats
+
+The following format directives print combinations of time and date
+components.
+
+@table @code
+@item r
+time, 12-hour (hh:mm:ss [AP]M)
+@item T
+time, 24-hour (hh:mm:ss)
+@item X
+locale's time representation (H:M:S)
+@item c
+locale's date and time in ctime format (Sat Nov 04 12:02:33 EST
+1989).  This format does not include any fractional part in the
+seconds field.
+@item D
+date (mm/dd/yy)
+@item x
+locale's date representation (mm/dd/yy)
+@item +
+Date and time, separated by '+', for example
+`2004-04-28+22:22:05.0000000000'.
+The time is given in the current timezone (which may be affected by
+setting the TZ environment variable).  This is a GNU extension.  The
+seconds field includes a fractional part.
+@end table
+
+@node Formatting Flags
+@subsubsection Formatting Flags
+
+The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0}
+and @samp{+} flags, but the other directives do not, even if they
+print numbers.  Numeric directives that do not support these flags
+include
+
+@samp{G},
+@samp{U},
+@samp{b},
+@samp{D},
+@samp{k} and
+@samp{n}.
+
+All fields support the format flag @samp{-}, which makes fields
+left-aligned.  That is, if the field width is greater than the actual
+contents of the field, the requisite number of spaces are printed
+after the field content instead of before it.
+
+@node Run Commands
+@section Run Commands
+
+You can use the list of file names created by @code{find} or
+@code{locate} as arguments to other commands.  In this way you can
+perform arbitrary actions on the files.
+
+@menu
+* Single File::
+* Multiple Files::
+* Querying::
+@end menu
+
+@node Single File
+@subsection Single File
+
+Here is how to run a command on one file at a time.
+
+@deffn Action -execdir command ;
+Execute @var{command}; true if zero status is returned.  @code{find}
+takes all arguments after @samp{-execdir} to be part of the command until
+an argument consisting of @samp{;} is reached.  It replaces the string
+@samp{@{@}} by the current file name being processed everywhere it
+occurs in the command.  Both of these constructions need to be escaped
+(with a @samp{\}) or quoted to protect them from expansion by the
+shell.  The command is executed in the directory in which @code{find}
+was run.
+
+For example, to compare each C header file in or below the current
+directory with the file @file{/tmp/master}:
+
+@example
+find . -name '*.h' -execdir diff -u '@{@}' /tmp/master ';'
+@end example
+@end deffn
+
+If you use @samp{-execdir}, you must ensure that the @samp{$PATH}
+variable contains only absolute directory names.  Having an empty
+element in @samp{$PATH} or explicitly including @samp{.} (or any other
+non-absolute name) is insecure.  GNU find will refuse to run if you
+use @samp{-execdir} and it thinks your @samp{$PATH} setting is
+insecure.  For example:
+
+@table @samp
+@item /bin:/usr/bin:
+Insecure; empty path element (at the end)
+@item :/bin:/usr/bin:/usr/local/bin
+Insecure; empty path element (at the start)
+@item /bin:/usr/bin::/usr/local/bin
+Insecure; empty path element (two colons in a row)
+@item /bin:/usr/bin:.:/usr/local/bin
+Insecure; @samp{.} is a path element (@file{.} is not an absolute file name)
+@item /bin:/usr/bin:sbin:/usr/local/bin
+Insecure; @samp{sbin} is not an absolute file name
+@item /bin:/usr/bin:/sbin:/usr/local/bin
+Secure (if you control the contents of those directories and any access to them)
+@end table
+
+Another similar option, @samp{-exec} is supported, but is less secure.
+@xref{Security Considerations}, for a discussion of the security
+problems surrounding @samp{-exec}.
+
+
+@deffn Action -exec command ;
+This insecure variant of the @samp{-execdir} action is specified by
+POSIX.  The main difference is that the command is executed in the
+directory from which @code{find} was invoked, meaning that @samp{@{@}}
+is expanded to a relative path starting with the name of one of the
+starting directories, rather than just the basename of the matched
+file.
+
+While some implementations of @code{find} replace the @samp{@{@}} only
+where it appears on its own in an argument, GNU @code{find} replaces
+@samp{@{@}} wherever it appears.
+@end deffn
+
+
+@node Multiple Files
+@subsection Multiple Files
+
+Sometimes you need to process files one at a time.  But usually this
+is not necessary, and, it is faster to run a command on as many files
+as possible at a time, rather than once per file.  Doing this saves on
+the time it takes to start up the command each time.
+
+The @samp{-execdir} and @samp{-exec} actions have variants that build
+command lines containing as many matched files as possible.
+
+@deffn Action -execdir command @{@} +
+This works as for @samp{-execdir command ;}, except that the
+@samp{@{@}} at the end of the command is expanded to a list of names
+of matching files.  This expansion is done in such a way as to avoid
+exceeding the maximum command line length available on the system.
+Only one @samp{@{@}} is allowed within the command, and it must appear
+at the end, immediately before the @samp{+}.  A @samp{+} appearing in
+any position other than immediately after @samp{@{@}} is not
+considered to be special (that is, it does not terminate the command).
+@end deffn
+
+
+@deffn Action -exec command @{@} +
+This insecure variant of the @samp{-execdir} action is specified by
+POSIX.  The main difference is that the command is executed in the
+directory from which @code{find} was invoked, meaning that @samp{@{@}}
+is expanded to a relative path starting with the name of one of the
+starting directories, rather than just the basename of the matched
+file.
+@end deffn
+
+Before @code{find} exits, any partially-built command lines are
+executed.  This happens even if the exit was caused by the
+@samp{-quit} action.  However, some types of error (for example not
+being able to invoke @code{stat()} on the current directory) can cause
+an immediate fatal exit.  In this situation, any partially-built
+command lines will not be invoked (this prevents possible infinite
+loops).
+
+At first sight, it looks like the list of filenames to be processed
+can only be at the end of the command line, and that this might be a
+problem for some commands (@code{cp} and @code{rsync} for example).
+
+However, there is a slightly obscure but powerful workaround for this
+problem which takes advantage of the behaviour of @code{sh -c}:-
+
+@example
+find startpoint -tests @dots{} -exec sh -c 'scp "$@@" remote:/dest' sh @{@} +
+@end example
+
+In the example above, the filenames we want to work on need to occur
+on the @code{scp} command line before the name of the destination.  We
+use the shell to invoke the command @code{scp "$@@" remote:/dest} and
+the shell expands @code{"$@@"} to the list of filenames we want to
+process.
+
+Another, but less secure, way to run a command on more than one file
+at once, is to use the @code{xargs} command, which is invoked like
+this:
+
+@example
+xargs @r{[}@var{option}@dots{}@r{]} @r{[}@var{command} @r{[}@var{initial-arguments}@r{]}@r{]}
+@end example
+
+@code{xargs} normally reads arguments from the standard input.  These
+arguments are delimited by blanks (which can be protected with double
+or single quotes or a backslash) or newlines.  It executes the
+@var{command} (default is @file{/bin/echo}) one or more times with any
+@var{initial-arguments} followed by arguments read from standard
+input.  Blank lines on the standard input are ignored.  If the
+@samp{-L} option is in use, trailing blanks indicate that @code{xargs}
+should consider the following line to be part of this one.
+
+Instead of blank-delimited names, it is safer to use @samp{find
+-print0} or @samp{find -fprint0} and process the output by giving the
+@samp{-0} or @samp{--null} option to GNU @code{xargs}, GNU @code{tar},
+GNU @code{cpio}, or @code{perl}.  The @code{locate} command also has a
+@samp{-0} or @samp{--null} option which does the same thing.
+
+You can use shell command substitution (backquotes) to process a list
+of arguments, like this:
+
+@example
+grep -l sprintf `find $HOME -name '*.c' -print`
+@end example
+
+However, that method produces an error if the length of the @samp{.c}
+file names exceeds the operating system's command line length limit.
+@code{xargs} avoids that problem by running the command as many times
+as necessary without exceeding the limit:
+
+@example
+find $HOME -name '*.c' -print | xargs grep -l sprintf
+@end example
+
+However, if the command needs to have its standard input be a terminal
+(@code{less}, for example), you have to use the shell command
+substitution method or use the @samp{--arg-file} option of
+@code{xargs}.
+
+The @code{xargs} command will process all its input, building command
+lines and executing them, unless one of the commands exits with a
+status of 255 (this will cause xargs to issue an error message and
+stop) or it reads a line contains the end of file string specified
+with the @samp{--eof} option.
+
+@menu
+* Unsafe File Name Handling::
+* Safe File Name Handling::
+* Unusual Characters in File Names::
+* Limiting Command Size::
+* Controlling Parallelism::
+* Interspersing File Names::
+@end menu
+
+@node Unsafe File Name Handling
+@subsubsection Unsafe File Name Handling
+
+Because file names can contain quotes, backslashes, blank characters,
+and even newlines, it is not safe to process them using @code{xargs}
+in its default mode of operation.  But since most files' names do not
+contain blanks, this problem occurs only infrequently.  If you are
+only searching through files that you know have safe names, then you
+need not be concerned about it.
+
+Error messages issued by @code{find} and @code{locate} quote unusual
+characters in file names in order to prevent unwanted changes in the
+terminal's state.
+
+
+@c This example is adapted from:
+@c From: pfalstad@stone.Princeton.EDU (Paul John Falstad)
+@c Newsgroups: comp.unix.shell
+@c Subject: Re: Beware xargs security holes
+@c Date: 16 Oct 90 19:12:06 GMT
+@c
+In many applications, if @code{xargs} botches processing a file
+because its name contains special characters, some data might be lost.
+The importance of this problem depends on the importance of the data
+and whether anyone notices the loss soon enough to correct it.
+However, here is an extreme example of the problems that using
+blank-delimited names can cause.  If the following command is run
+daily from @code{cron}, then any user can remove any file on the
+system:
+
+@example
+find / -name '#*' -atime +7 -print | xargs rm
+@end example
+
+For example, you could do something like this:
+
+@example
+eg$ echo > '#
+vmunix'
+@end example
+
+@noindent
+and then @code{cron} would delete @file{/vmunix}, if it ran
+@code{xargs} with @file{/} as its current directory.
+
+To delete other files, for example @file{/u/joeuser/.plan}, you could
+do this:
+
+@example
+eg$ mkdir '#
+'
+eg$ cd '#
+'
+eg$ mkdir u u/joeuser u/joeuser/.plan'
+'
+eg$ echo > u/joeuser/.plan'
+/#foo'
+eg$ cd ..
+eg$ find . -name '#*' -print | xargs echo
+./# ./# /u/joeuser/.plan /#foo
+@end example
+
+@node Safe File Name Handling
+@subsubsection Safe File Name Handling
+
+Here is how to make @code{find} output file names so that they can be
+used by other programs without being mangled or misinterpreted.  You
+can process file names generated this way by giving the @samp{-0} or
+@samp{--null} option to GNU @code{xargs}, GNU @code{tar}, GNU
+@code{cpio}, or @code{perl}.
+
+@deffn Action -print0
+True; print the entire file name on the standard output, followed by a
+null character.
+@end deffn
+
+@deffn Action -fprint0 file
+True; like @samp{-print0} but write to @var{file} like @samp{-fprint}
+(@pxref{Print File Name}).  The output file is always created.
+@end deffn
+
+As of findutils version 4.2.4, the @code{locate} program also has a
+@samp{--null} option which does the same thing.  For similarity with
+@code{xargs}, the short form of the option @samp{-0} can also be used.
+
+If you want to be able to handle file names safely but need to run
+commands which want to be connected to a terminal on their input, you
+can use the @samp{--arg-file} option to @code{xargs} like this:
+
+@example
+find / -name xyzzy -print0 > list
+xargs --null --arg-file=list munge
+@end example
+
+The example above runs the @code{munge} program on all the files named
+@file{xyzzy} that we can find, but @code{munge}'s input will still be
+the terminal (or whatever the shell was using as standard input).  If
+your shell has the ``process substitution'' feature @samp{<(...)}, you
+can do this in just one step:
+
+@example
+xargs --null --arg-file=<(find / -name xyzzy -print0) munge
+@end example
+
+@node Unusual Characters in File Names
+@subsubsection Unusual Characters in File Names
+As discussed above, you often need to be careful about how the names
+of files are handled by @code{find} and other programs.  If the output
+of @code{find} is not going to another program but instead is being
+shown on a terminal, this can still be a problem.  For example, some
+character sequences can reprogram the function keys on some terminals.
+@xref{Security Considerations}, for a discussion of other security
+problems relating to @code{find}.
+
+Unusual characters are handled differently by various
+actions, as described below.
+
+@table @samp
+@item -print0
+@itemx -fprint0
+Always print the exact file name, unchanged, even if the output is
+going to a terminal.
+@item -ok
+@itemx -okdir
+Always print the exact file name, unchanged.  This will probably
+change in a future release.
+@item -ls
+@itemx -fls
+Unusual characters are always escaped.  White space, backslash, and
+double quote characters are printed using C-style escaping (for
+example @samp{\f}, @samp{\"}).  Other unusual characters are printed
+using an octal escape.  Other printable characters (for @samp{-ls} and
+@samp{-fls} these are the characters between octal 041 and 0176) are
+printed as-is.
+@item -printf
+@itemx -fprintf
+If the output is not going to a terminal, it is printed as-is.
+Otherwise, the result depends on which directive is in use:
+
+@table @asis
+@item %D, %F, %H, %Y, %y
+These expand to values which are not under control of files' owners,
+and so are printed as-is.
+@item  %a, %b, %c, %d, %g, %G, %i, %k, %m, %M, %n, %s, %t, %u, %U
+These have values which are under the control of files' owners but
+which cannot be used to send arbitrary data to the terminal, and so
+these are printed as-is.
+@item %f, %h, %l, %p, %P
+The output of these directives is quoted if the output is going to a
+terminal.  The setting of the `LC_CTYPE' environment
+variable is used to determine which characters need to be quoted.
+
+This quoting is performed in the same way as for GNU @code{ls}.  This
+is not the same quoting mechanism as the one used for @samp{-ls} and
+@samp{fls}.  If you are able to decide what format to use for the
+output of @code{find} then it is normally better to use @samp{\0} as a
+terminator than to use newline, as file names can contain white space
+and newline characters.
+@end table
+@item -print
+@itemx -fprint
+Quoting is handled in the same way as for the @samp{%p} directive of
+@samp{-printf} and @samp{-fprintf}.  If you are using @code{find} in a
+script or in a situation where the matched files might have arbitrary
+names, you should consider using @samp{-print0} instead of
+@samp{-print}.
+@end table
+
+
+The @code{locate} program quotes and escapes unusual characters in
+file names in the same way as @code{find}'s @samp{-print} action.
+
+The behaviours described above may change soon, as the treatment of
+unprintable characters is harmonised for @samp{-ls}, @samp{-fls},
+@samp{-print}, @samp{-fprint}, @samp{-printf} and @samp{-fprintf}.
+
+@node Limiting Command Size
+@subsubsection Limiting Command Size
+
+@code{xargs} gives you control over how many arguments it passes to
+the command each time it executes it.  By default, it uses up to
+@code{ARG_MAX} - 2k, or 128k, whichever is smaller, characters per
+command.  It uses as many lines and arguments as fit within that
+limit.  The following options modify those values.
+
+@table @code
+@item --no-run-if-empty
+@itemx -r
+If the standard input does not contain any nonblanks, do not run the
+command.  By default, the command is run once even if there is no
+input.  This option is a GNU extension.
+
+@item --max-lines@r{[}=@var{max-lines}@r{]}
+@itemx -L @var{max-lines}
+@itemx -l@r{[}@var{max-lines}@r{]}
+Use at most @var{max-lines} nonblank input lines per command line;
+@var{max-lines} defaults to 1 if omitted; omitting the argument is not
+allowed in the case of the @samp{-L} option.  Trailing blanks cause an
+input line to be logically continued on the next input line, for the
+purpose of counting the lines.  Implies @samp{-x}.  The preferred name
+for this option is @samp{-L} as this is specified by POSIX.
+
+@item --max-args=@var{max-args}
+@itemx -n @var{max-args}
+Use at most @var{max-args} arguments per command line.  Fewer than
+@var{max-args} arguments will be used if the size (see the @samp{-s}
+option) is exceeded, unless the @samp{-x} option is given, in which
+case @code{xargs} will exit.
+
+@item --max-chars=@var{max-chars}
+@itemx -s @var{max-chars}
+Use at most @var{max-chars} characters per command line, including the
+command initial arguments and the terminating nulls at the ends of the
+argument strings.  If you specify a value for this option which is too
+large or small, a warning message is printed and the appropriate upper
+or lower limit is used instead.  You can use @samp{--show-limits}
+option to understand the command-line limits applying to @code{xargs}
+and how this is affected by any other options.  The POSIX limits shown
+when you do this have already been adjusted to take into account the
+size of your environment variables.
+
+The largest allowed value is system-dependent, and is calculated as
+the argument length limit for exec, less the size of your environment,
+less 2048 bytes of headroom.  If this value is more than 128KiB,
+128Kib is used as the default value; otherwise, the default value is
+the maximum.
+@end table
+
+@node Controlling Parallelism
+@subsubsection Controlling Parallelism
+
+Normally, @code{xargs} runs one command at a time.  This is called
+"serial" execution; the commands happen in a series, one after another.
+If you'd like @code{xargs} to do things in "parallel", you can ask it
+to do so, either when you invoke it, or later while it is running.
+Running several commands at one time can make the entire operation
+go more quickly, if the commands are independent, and if your system
+has enough resources to handle the load.  When parallelism works in
+your application, @code{xargs} provides an easy way to get your work
+done faster.
+
+@table @code
+@item --max-procs=@var{max-procs}
+@itemx -P @var{max-procs}
+Run up to @var{max-procs} processes at a time; the default is 1.  If
+@var{max-procs} is 0, @code{xargs} will run as many processes as
+possible at a time.  Use the @samp{-n}, @samp{-s}, or @samp{-L} option
+with @samp{-P}; otherwise chances are that the command will be run
+only once.
+@end table
+
+For example, suppose you have a directory tree of large image files
+and a @code{makeallsizes} script that takes a single file name and
+creates various sized images from it (thumbnail-sized, web-page-sized,
+printer-sized, and the original large file).  The script is doing enough
+work that it takes significant time to run, even on a single image.
+You could run:
+
+@example
+find originals -name '*.jpg' | xargs -1 makeallsizes
+@end example
+
+This will run @code{makeallsizes @var{filename}} once for each @code{.jpg}
+file in the @code{originals} directory.  However, if your system has
+two central processors, this script will only keep one of them busy.
+Instead, you could probably finish in about half the time by running:
+
+@example
+find originals -name '*.jpg' | xargs -1 -P 2 makeallsizes
+@end example
+
+@code{xargs} will run the first two commands in parallel, and then
+whenever one of them terminates, it will start another one, until
+the entire job is done.
+
+The same idea can be generalized to as many processors as you have handy.
+It also generalizes to other resources besides processors.  For example,
+if xargs is running commands that are waiting for a response from a
+distant network connection, running a few in parallel may reduce the
+overall latency by overlapping their waiting time.
+
+@code{xargs} also allows you to "turn up" or "turn down" its parallelism
+in the middle of a run.  Suppose you are keeping your four-processor
+system busy for hours, processing thousands of images using @code{-P 4}.
+Now, in the middle of the run, you or someone else wants you to reduce
+your load on the system, so that something else will run faster.
+If you interrupt @code{xargs}, your job will be half-done, and it
+may take significant manual work to resume it only for the remaining
+images.  If you suspend @code{xargs} using your shell's job controls
+(e.g. @code{control-Z}), then it will get no work done while suspended.
+
+Find out the process ID of the @code{xargs} process, either from your
+shell or with the @code{ps} command.  After you send it the signal
+@code{SIGUSR2}, @code{xargs} will run one fewer command in parallel.
+If you send it the signal @code{SIGUSR1}, it will run one more command
+in parallel.  For example:
+
+@example
+shell$ xargs <allimages -1 -P 4 makeallsizes &
+[4] 27643
+   ... at some later point ...
+shell$ kill -USR2 27643
+shell$ kill -USR2 %4
+@end example
+
+The first @code{kill} command will cause @code{xargs} to wait for
+two commands to terminate before starting the next command (reducing
+the parallelism from 4 to 3).  The second @code{kill} will reduce it from
+3 to 2.  (@code{%4} works in some shells as a shorthand for the process
+ID of the background job labeled @code{[4]}.)
+
+Similarly, if you started a long xargs job without parallelism, you
+can easily switch it to start running two commands in parallel by sending
+it a @code{SIGUSR1}.
+
+@code{xargs} will never terminate any existing commands when you ask it
+to run fewer processes.  It merely waits for the excess commands to
+finish.  If you ask it to run more commands, it will start the next
+one immediately (if it has more work to do).
+
+If you send several identical signals quickly, the operating system
+does not guarantee that each of them will be delivered to @code{xargs}.
+This means that you can't rapidly increase or decrease the parallelism by
+more than one command at a time.  You can avoid this problem by sending
+a signal, observing the result, then sending the next one; or merely by
+delaying for a few seconds between signals (unless your system is very
+heavily loaded).
+
+Whether or not parallel execution will work well for you depends on
+the nature of the commmand you are running in parallel, on the
+configuration of the system on which you are running the command, and
+on the other work being done on the system at the time.
+
+@node Interspersing File Names
+@subsubsection Interspersing File Names
+
+@code{xargs} can insert the name of the file it is processing between
+arguments you give for the command.  Unless you also give options to
+limit the command size (@pxref{Limiting Command Size}), this mode of
+operation is equivalent to @samp{find -exec} (@pxref{Single File}).
+
+@table @code
+@item --replace@r{[}=@var{replace-str}@r{]}
+@itemx -I @var{replace-str}
+@itemx -i @var{replace-str}
+Replace occurrences of @var{replace-str} in the initial arguments with
+names read from the input.  Also, unquoted blanks do not terminate
+arguments; instead, the input is split at newlines only.  For the
+@samp{-i} option, if @var{replace-str} is omitted for @samp{--replace}
+or @samp{-i}, it defaults to @samp{@{@}} (like for @samp{find -exec}).
+Implies @samp{-x} and @samp{-l 1}.  @samp{-i} is deprecated in favour
+of @samp{-I}. As an example, to sort each file in the @file{bills}
+directory, leaving the output in that file name with @file{.sorted}
+appended, you could do:
+
+@example
+find bills -type f | xargs -I XX sort -o XX.sorted XX
+@end example
+
+@noindent
+The equivalent command using @samp{find -execdir} is:
+
+@example
+find bills -type f -execdir sort -o '@{@}.sorted' '@{@}' ';'
+@end example
+@end table
+
+
+When you use the @samp{-I} option, each line read from the input is
+buffered internally.  This means that there is an upper limit on the
+length of input line that xargs will accept when used with the
+@samp{-I} option.  To work around this limitation, you can use the
+@samp{-s} option to increase the amount of buffer space that xargs
+uses, and you can also use an extra invocation of xargs to ensure that
+very long lines do not occur.  For example:
+
+@example
+somecommand | xargs -s 50000 echo | xargs -I '@{@}' -s 100000 rm '@{@}'
+@end example
+
+Here, the first invocation of @code{xargs} has no input line length
+limit because it doesn't use the @samp{-I} option. The second
+invocation of @code{xargs} does have such a limit, but we have ensured
+that it never encounters a line which is longer than it can
+handle.
+
+This is not an ideal solution.  Instead, the @samp{-I} option should
+not impose a line length limit (apart from any limit imposed by the
+operating system) and so one might consider this limitation to be a
+bug.  A better solution would be to allow @code{xargs -I} to
+automatically move to a larger value for the @samp{-s} option when
+this is needed.
+
+This sort of problem doesn't occur with the output of @code{find}
+because it emits just one filename per line.
+
+@node Querying
+@subsection Querying
+
+To ask the user whether to execute a command on a single file, you can
+use the @code{find} primary @samp{-okdir} instead of @samp{-execdir},
+and the @code{find} primary @samp{-ok} instead of @samp{-exec}:
+
+@deffn Action -okdir command ;
+Like @samp{-execdir} (@pxref{Single File}), but ask the user first.
+If the user does not agree to run the command, just return false.
+Otherwise, run it, with  standard input redirected from
+@file{/dev/null}.
+
+The response to the prompt is matched against a pair of regular
+expressions to determine if it is a yes or no response.  These regular
+expressions are obtained from the system@footnote{@code{nl_langinfo} items YESEXPR and NOEXPR are used}
+if the POSIXLY_CORRECT environment variable is set and the system has
+such patterns available.
+Otherwise, @code{find}'s message translations are used.
+In either case, the LC_MESSAGES environment variable
+will determine the regular expressions used to determine if the answer
+is affirmative or negative.  The interpretation of the regular
+expressions themselves will be affected by the environment variables
+LC_CTYPE (character classes) and LC_COLLATE (character ranges and
+equivalence classes).
+@end deffn
+
+@deffn Action -ok command ;
+This insecure variant of the @samp{-okdir} action is specified by
+POSIX.  The main difference is that the command is executed in the
+directory from which @code{find} was invoked, meaning that @samp{@{@}}
+is expanded to a relative path starting with the name of one of the
+starting directories, rather than just the basename of the matched
+file.  If the command is run, its standard input is redirected from
+@file{/dev/null}.
+@end deffn
+
+When processing multiple files with a single command, to query the
+user you give @code{xargs} the following option.  When using this
+option, you might find it useful to control the number of files
+processed per invocation of the command (@pxref{Limiting Command
+Size}).
+
+@table @code
+@item --interactive
+@itemx -p
+Prompt the user about whether to run each command line and read a line
+from the terminal.  Only run the command line if the response starts
+with @samp{y} or @samp{Y}.  Implies @samp{-t}.
+@end table
+
+@node Delete Files
+@section Delete Files
+
+@deffn Action -delete
+Delete files or directories; true if removal succeeded.  If the
+removal failed, an error message is issued.
+
+The use of the @samp{-delete} action on the command line automatically
+turns on the @samp{-depth} option (@pxref{find Expressions}).  This
+can be surprising if you were previously just testing with
+@samp{-print}, so it is usually best to remember to use @samp{-depth}
+explicitly.
+
+If @samp{-delete} fails, @code{find}'s exit status will be nonzero
+(when it eventually exits).
+@end deffn
+
+@node Adding Tests
+@section Adding Tests
+
+You can test for file attributes that none of the @code{find} builtin
+tests check.  To do this, use @code{xargs} to run a program that
+filters a list of files printed by @code{find}.  If possible, use
+@code{find} builtin tests to pare down the list, so the program run by
+@code{xargs} has less work to do.  The tests builtin to @code{find}
+will likely run faster than tests that other programs perform.
+
+For reasons of efficiency it is often useful to limit the number of
+times an external program has to be run.  For this reason, it is often
+a good idea to implement ``extended'' tests by using @code{xargs}.
+
+For example, here is a way to print the names of all of the unstripped
+binaries in the @file{/usr/local} directory tree.  Builtin tests avoid
+running @code{file} on files that are not regular files or are not
+executable.
+
+@example
+find /usr/local -type f -perm /a=x | xargs file |
+  grep 'not stripped' | cut -d: -f1
+@end example
+
+@noindent
+The @code{cut} program removes everything after the file name from the
+output of @code{file}.
+
+However, using @code{xargs} can present important security problems
+(@pxref{Security Considerations}).  These can be avoided by using
+@samp{-execdir}.  The @samp{-execdir} action is also a useful way of
+putting your own test in the middle of a set of other tests or actions
+for @code{find} (for example, you might want to use @samp{-prune}).
+
+@c Idea from Martin Weitzel.
+To place a special test somewhere in the middle of a @code{find}
+expression, you can use @samp{-execdir} (or, less securely,
+@samp{-exec}) to run a program that performs the test.  Because
+@samp{-execdir} evaluates to the exit status of the executed program,
+you can use a program (which can be a shell script) that tests for a
+special attribute and make it exit with a true (zero) or false
+(non-zero) status.  It is a good idea to place such a special test
+@emph{after} the builtin tests, because it starts a new process which
+could be avoided if a builtin test evaluates to false.
+
+Here is a shell script called @code{unstripped} that checks whether
+its argument is an unstripped binary file:
+
+@example
+#! /bin/sh
+file "$1" | grep -q "not stripped"
+@end example
+
+
+This script relies on the shell exiting with the status of
+the last command in the pipeline, in this case @code{grep}.  The
+@code{grep} command exits with a true status if it found any matches,
+false if not.  Here is an example of using the script (assuming it is
+in your search path).  It lists the stripped executables (and shell
+scripts) in the file @file{sbins} and the unstripped ones in
+@file{ubins}.
+
+@example
+find /usr/local -type f -perm /a=x \
+  \( -execdir unstripped '@{@}' \; -fprint ubins -o -fprint sbins \)
+@end example
+
+
+@node Databases
+@chapter File Name Databases
+
+The file name databases used by @code{locate} contain lists of files
+that were in particular directory trees when the databases were last
+updated.  The file name of the default database is determined when
+@code{locate} and @code{updatedb} are configured and installed.  The
+frequency with which the databases are updated and the directories for
+which they contain entries depend on how often @code{updatedb} is run,
+and with which arguments.
+
+You can obtain some statistics about the databases by using
+@samp{locate --statistics}.
+
+@menu
+* Database Locations::
+* Database Formats::
+* Newline Handling::
+@end menu
+
+
+@node Database Locations
+@section Database Locations
+
+There can be multiple file name databases.  Users can select which
+databases @code{locate} searches using the @code{LOCATE_PATH}
+environment variable or a command line option.  The system
+administrator can choose the file name of the default database, the
+frequency with which the databases are updated, and the directories
+for which they contain entries.  File name databases are updated by
+running the @code{updatedb} program, typically nightly.
+
+In networked environments, it often makes sense to build a database at
+the root of each filesystem, containing the entries for that
+filesystem.  @code{updatedb} is then run for each filesystem on the
+fileserver where that filesystem is on a local disk, to prevent
+thrashing the network.
+
+@xref{Invoking updatedb}, for the description of the options to
+@code{updatedb}.  These options can be used to specify which
+directories are indexed by each database file.
+
+The default location for the locate database depends on how findutils
+is built, but the findutils installation accompanying this manual uses
+the default location @file{@value{LOCATE_DB}}.
+
+If no database exists at @file{@value{LOCATE_DB}} but the user did not
+specify where to look (by using @samp{-d} or setting
+@code{LOCATE_PATH}), then @code{locate} will also check for a
+``secure'' database in @file{/var/lib/slocate/slocate.db}.
+
+@node Database Formats
+@section Database Formats
+
+The file name databases contain lists of files that were in particular
+directory trees when the databases were last updated.  The file name
+database format changed starting with GNU @code{locate} version 4.0 to
+allow machines with different byte orderings to share the databases.
+
+GNU @code{locate} can read both the old and new database formats.
+However, old versions of @code{locate} (on other Unix systems, or GNU
+@code{locate} before version 4.0) produce incorrect results if run
+against a database in something other than the old format.
+
+Support for the old database format will eventually be discontinued,
+first in @code{updatedb} and later in @code{locate}.
+
+If you run @samp{locate --statistics}, the resulting summary indicates
+the type of each @code{locate} database.   You select which database
+format @code{updatedb} will use with the @samp{--dbformat} option.
+
+
+@menu
+* LOCATE02 Database Format::
+* Sample LOCATE02 Database::
+* slocate Database Format::
+* Old Database Format::
+@end menu
+
+@node LOCATE02 Database Format
+@subsection LOCATE02 Database Format
+
+@code{updatedb} runs a program called @code{frcode} to
+@dfn{front-compress} the list of file names, which reduces the
+database size by a factor of 4 to 5.  Front-compression (also known as
+incremental encoding) works as follows.
+
+The database entries are a sorted list (case-insensitively, for users'
+convenience).  Since the list is sorted, each entry is likely to share
+a prefix (initial string) with the previous entry.  Each database
+entry begins with an offset-differential count byte, which is the
+additional number of characters of prefix of the preceding entry to
+use beyond the number that the preceding entry is using of its
+predecessor.  (The counts can be negative.)  Following the count is a
+null-terminated ASCII remainder---the part of the name that follows
+the shared prefix.
+
+If the offset-differential count is larger than can be stored in a
+byte (+/-127), the byte has the value 0x80 and the count follows in a
+2-byte word, with the high byte first (network byte order).
+
+Every database begins with a dummy entry for a file called
+@file{LOCATE02}, which @code{locate} checks for to ensure that the
+database file has the correct format; it ignores the entry in doing
+the search.
+
+Databases cannot be concatenated together, even if the first (dummy)
+entry is trimmed from all but the first database.  This is because the
+offset-differential count in the first entry of the second and
+following databases will be wrong.
+
+In the output of @samp{locate --statistics}, the new database format
+is referred to as @samp{LOCATE02}.
+
+@node Sample LOCATE02 Database
+@subsection Sample LOCATE02 Database
+
+Sample input to @code{frcode}:
+@c with nulls changed to newlines:
+
+@example
+/usr/src
+/usr/src/cmd/aardvark.c
+/usr/src/cmd/armadillo.c
+/usr/tmp/zoo
+@end example
+
+Length of the longest prefix of the preceding entry to share:
+
+@example
+0 /usr/src
+8 /cmd/aardvark.c
+14 rmadillo.c
+5 tmp/zoo
+@end example
+
+Output from @code{frcode}, with trailing nulls changed to newlines
+and count bytes made printable:
+
+@example
+0 LOCATE02
+0 /usr/src
+8 /cmd/aardvark.c
+6 rmadillo.c
+-9 tmp/zoo
+@end example
+
+(6 = 14 - 8, and -9 = 5 - 14)
+
+@node slocate Database Format
+@subsection slocate Database Format
+
+The @code{slocate} program uses a database format similar to, but not
+quite the same as, GNU @code{locate}.  The first byte of the database
+specifies its @dfn{security level}.  If the security level is 0,
+@code{slocate} will read, match and print filenames on the basis of
+the information in the database only.  However, if the security level
+byte is 1, @code{slocate} omits entries from its output if the
+invoking user is unable to access them.  The second byte of the
+database is zero.  The second byte is immediately followed by the
+first database entry.  The first entry in the database is not preceded
+by any differential count or dummy entry.  Instead the differential
+count for the first item is assumed to be zero.
+.P
+Starting with the second entry (if any) in the database, data is
+interpreted as for the GNU LOCATE02 format.
+
+@node Old Database Format
+@subsection Old Database Format
+
+The old database format is used by Unix @code{locate} and @code{find}
+programs and earlier releases of the GNU ones.  @code{updatedb}
+produces this format if given the @samp{--old-format} option.
+
+@code{updatedb} runs programs called @code{bigram} and @code{code} to
+produce old-format databases.  The old format differs from the new one
+in the following ways.  Instead of each entry starting with an
+offset-differential count byte and ending with a null, byte values
+from 0 through 28 indicate offset-differential counts from -14 through
+14.  The byte value indicating that a long offset-differential count
+follows is 0x1e (30), not 0x80.  The long counts are stored in host
+byte order, which is not necessarily network byte order, and host
+integer word size, which is usually 4 bytes.  They also represent a
+count 14 less than their value.  The database lines have no
+termination byte; the start of the next line is indicated by its first
+byte having a value <= 30.
+
+In addition, instead of starting with a dummy entry, the old database
+format starts with a 256 byte table containing the 128 most common
+bigrams in the file list.  A bigram is a pair of adjacent bytes.
+Bytes in the database that have the high bit set are indexes (with the
+high bit cleared) into the bigram table.  The bigram and
+offset-differential count coding makes these databases 20-25% smaller
+than the new format, but makes them not 8-bit clean.  Any byte in a
+file name that is in the ranges used for the special codes is replaced
+in the database by a question mark, which not coincidentally is the
+shell wildcard to match a single character.
+
+The old format therefore cannot faithfully store entries with
+non-ASCII characters. It therefore should not be used in
+internationalised environments.  That is, most installations should
+not use it.
+
+Because the long counts are stored by the @code{code} program as
+native-order machine words, the database format is not easily used in
+environments which differ in terms of byte order.  If locate databases
+are to be shared between machines, the LOCATE02 database format should
+be used.  This has other benefits as discussed above.  However, the
+length of the filename currently being processed can normally be used
+to place reasonable limits on the long counts and so this information
+is used by locate to help it guess the byte ordering of the old format
+database.  Unless it finds evidence to the contrary, @code{locate}
+will assume that the byte order of the database is the same as the
+native byte order of the machine running @code{locate}.  The output of
+@samp{locate --statistics} also includes information about the byte
+order of old-format databases.
+
+The output of @samp{locate --statistics} will give an incorrect count
+of the number of file names containing newlines or high-bit characters
+for old-format databases.
+
+Old versions of GNU @code{locate} fail to correctly handle very long
+file names, possibly leading to security problems relating to a heap
+buffer overrun.  @xref{Security Considerations for locate}, for a
+detailed explanation.
+
+@node Newline Handling
+@section Newline Handling
+
+Within the database, file names are terminated with a null character.
+This is the case for both the old and the new format.
+
+When the new database format is being used, the compression technique
+used to generate the database though relies on the ability to sort the
+list of files before they are presented to @code{frcode}.
+
+If the system's sort command allows its input list of files to be
+separated with null characters via the @samp{-z} option, this option
+is used and therefore @code{updatedb} and @code{locate} will both
+correctly handle file names containing newlines.  If the @code{sort}
+command lacks support for this, the list of files is delimited with
+the newline character, meaning that parts of file names containing
+newlines will be incorrectly sorted.  This can result in both
+incorrect matches and incorrect failures to match.
+
+On the other hand, if you are using the old database format, file
+names with embedded newlines are not correctly handled.  There is no
+technical limitation which enforces this, it's just that the
+@code{bigram} program has not been updated to support lists of file
+names separated by nulls.
+
+So, if you are using the new database format (this is the default) and
+your system uses GNU @code{sort}, newlines will be correctly handled
+at all times.  Otherwise, newlines may not be correctly handled.
+
+@node File Permissions
+@chapter File Permissions
+
+@include perm.texi
+
+@include parse-datetime.texi
+
+@node Reference
+@chapter Reference
+
+Below are summaries of the command line syntax for the programs
+discussed in this manual.
+
+@menu
+* Invoking find::
+* Invoking locate::
+* Invoking updatedb::
+* Invoking xargs::
+* Regular Expressions::
+* Environment Variables::
+@end menu
+
+@node Invoking find
+@section Invoking @code{find}
+
+@example
+find @r{[-H] [-L] [-P] [-D @var{debugoptions}] [-O@var{level}]} @r{[}@var{file}@dots{}@r{]} @r{[}@var{expression}@r{]}
+@end example
+
+@code{find} searches the directory tree rooted at each file name
+@var{file} by evaluating the @var{expression} on each file it finds in
+the tree.
+
+The command line may begin with the @samp{-H}, @samp{-L}, @samp{-P},
+@samp{-D} and @samp{-O} options.  These are followed by a list of
+files or directories that should be searched.  If no files to search
+are specified, the current directory (@file{.}) is used.
+
+This list of files to search is followed by a list of expressions
+describing the files we wish to search for.  The first part of the
+expression is recognised by the fact that it begins with @samp{-}
+followed by some other letters (for example @samp{-print}), or is
+either @samp{(} or @samp{!}.  Any arguments after it are the rest of
+the expression.
+
+If no expression is given, the expression @samp{-print} is used.
+
+The @code{find} command exits with status zero if all files matched
+are processed successfully, greater than zero if errors occur.
+
+The @code{find} program also recognises two options for administrative
+use:
+
+@table @samp
+@item --help
+Print a summary of the command line usage and exit.
+@item --version
+Print the version number of @code{find} and exit.
+@end table
+
+The @samp{-version} option is a synonym for @samp{--version}
+
+
+@menu
+* Filesystem Traversal Options::
+* Warning Messages::
+* Optimisation Options::
+* Debug Options::
+* Find Expressions::
+@end menu
+
+@node Filesystem Traversal Options
+@subsection Filesystem Traversal Options
+
+The options @samp{-H}, @samp{-L} or @samp{-P} may be specified at the
+start of the command line (if none of these is specified, @samp{-P} is
+assumed).  If you specify more than one of these options, the last one
+specified takes effect (but note that the @samp{-follow} option is
+equivalent to @samp{-L}).
+
+@table @code
+@item -P
+Never follow symbolic links (this is the default), except in the case
+of the @samp{-xtype} predicate.
+@item -L
+Always follow symbolic links, except in the case of the @samp{-xtype}
+predicate.
+@item -H
+Follow symbolic links specified in the list of files to search, or
+which are otherwise specified on the command line.
+@end table
+
+If @code{find} would follow a symbolic link, but cannot for any reason
+(for example, because it has insufficient permissions or the link is
+broken), it falls back on using the properties of the symbolic link
+itself.  @ref{Symbolic Links} for a more complete description of how
+symbolic links are handled.
+
+@node Warning Messages
+@subsection Warning Messages
+
+If there is an error on the @code{find} command line, an error message
+is normally issued.  However, there are some usages that are
+inadvisable but which @code{find} should still accept.  Under these
+circumstances, @code{find} may issue a warning message.
+
+By default, warnings are enabled only if @code{find} is being run
+interactively (specifically, if the standard input is a terminal) and
+the POSIXLY_CORRECT environment variable is not set.  Warning messages
+can be controlled explicitly by the use of options on the command
+line:
+
+@table @code
+@item -warn
+Issue warning messages where appropriate.
+@item -nowarn
+Do not issue warning messages.
+@end table
+
+These options take effect at the point on the command line where they
+are specified.  Therefore it's not useful to specify @samp{-nowarn} at
+the end of the command line.  The warning messages affected by the
+above options are triggered by:
+
+@itemize @minus
+@item
+Use of the @samp{-d} option which is deprecated; please use
+@samp{-depth} instead, since the latter is POSIX-compliant.
+@item
+Use of the @samp{-ipath} option which is deprecated; please use
+@samp{-iwholename} instead.
+@item
+Specifying an option (for example @samp{-mindepth}) after a non-option
+(for example @samp{-type} or @samp{-print}) on the command line.
+@item
+Use of the @samp{-name} or @samp{-iname} option with a slash character
+in the pattern.  Since the name predicates only compare against the
+basename of the visited files, the only file that can match a slash is
+the root directory itself.
+@end itemize
+
+The default behaviour above is designed to work in that way so that
+existing shell scripts don't generate spurious errors, but people will
+be made aware of the problem.
+
+Some warning messages are issued for less common or more serious
+problems, and consequently cannot be turned off:
+
+@itemize @minus
+@item
+Use of an unrecognised backslash escape sequence with @samp{-fprintf}
+@item
+Use of an unrecognised formatting directive with @samp{-fprintf}
+@end itemize
+
+@node Optimisation Options
+@subsection Optimisation Options
+
+The @samp{-O@var{level}} option sets @code{find}'s optimisation level
+to @var{level}.  The default optimisation level is 1.
+
+At certain optimisation levels, @code{find} reorders tests to speed up
+execution while preserving the overall effect; that is, predicates
+with side effects are not reordered relative to each other.  The
+optimisations performed at each optimisation level are as follows.
+
+@table @samp
+@item 0
+Currently equivalent to optimisation level 1.
+
+@item 1
+This is the default optimisation level and corresponds to the
+traditional behaviour.  Expressions are reordered so that tests based
+only on the names of files (for example@samp{ -name} and
+@samp{-regex}) are performed first.
+
+@item 2
+Any @samp{-type} or @samp{-xtype} tests are performed after any tests
+based only on the names of files, but before any tests that require
+information from the inode.  On many modern versions of Unix, file
+types are returned by @code{readdir()} and so these predicates are
+faster to evaluate than predicates which need to stat the file first.
+
+If you use the @samp{-fstype FOO} predicate and specify a filsystem
+type @samp{FOO} which is not known (that is, present in
+@file{/etc/mtab}) at the time @code{find} starts, that predicate is
+equivalent to @samp{-false}.
+
+
+@item 3
+At this optimisation level, the full cost-based query optimiser is
+enabled.  The order of tests is modified so that cheap (i.e., fast)
+tests are performed first and more expensive ones are performed later,
+if necessary.  Within each cost band, predicates are evaluated earlier
+or later according to whether they are likely to succeed or not.  For
+@samp{-o}, predicates which are likely to succeed are evaluated
+earlier, and for @samp{-a}, predicates which are likely to fail are
+evaluated earlier.
+@end table
+
+
+@node Debug Options
+@subsection Debug Options
+
+The @samp{-D} option makes @code{find} produce diagnostic output.
+Much of the information is useful only for diagnosing problems, and so
+most people will not find this option helpful.
+
+The list of debug options should be comma separated.  Compatibility of
+the debug options is not guaranteed between releases of findutils.
+For a complete list of valid debug options, see the output of
+@code{find -D help}.  Valid debug options include:
+@table @samp
+@item help
+Explain the debugging options.
+@item tree
+Show the expression tree in its original and optimised form.
+@item stat
+Print messages as files are examined with the stat and lstat system
+calls.  The find program tries to minimise such calls.
+@item opt
+Prints diagnostic information relating to the optimisation of the
+expression tree; see the @samp{-O} option.
+@item rates
+Prints a summary indicating how often each predicate succeeded or
+failed.
+@end table
+
+@node Find Expressions
+@subsection Find Expressions
+
+The final part of the @code{find} command line is a list of
+expressions.  @xref{Primary Index}, for a summary of all of the tests,
+actions, and options that the expression can contain.  If the
+expression is missing, @samp{-print} is assumed.
+
+@node Invoking locate
+@section Invoking @code{locate}
+
+@example
+locate @r{[}@var{option}@dots{}@r{]} @var{pattern}@dots{}
+@end example
+
+For each @var{pattern} given @code{locate} searches one or more file
+name databases returning each match of @var{pattern}.
+
+For each @var{pattern} given @code{locate} searches one or more file
+name databases returning each match of @var{pattern}.
+
+@table @code
+@item --all
+@itemx -A
+Print only names which match all non-option arguments, not those
+matching one or more non-option arguments.
+
+@item --basename
+@itemx -b
+The specified pattern is matched against just the last component of
+the name of a file in the @code{locate} database.  This last
+component is also called the ``base name''.  For example, the base
+name of @file{/tmp/mystuff/foo.old.c} is @file{foo.old.c}.  If the
+pattern contains metacharacters, it must match the base name exactly.
+If not, it must match part of the base name.
+
+@item --count
+@itemx -c
+Instead of printing the matched file names, just print the total
+number of matches found, unless @samp{--print} (@samp{-p}) is also
+present.
+
+
+@item --database=@var{path}
+@itemx -d @var{path}
+Instead of searching the default @code{locate} database
+@file{@value{LOCATE_DB}}, @code{locate} searches the file
+name databases in @var{path}, which is a colon-separated list of
+database file names.  You can also use the environment variable
+@code{LOCATE_PATH} to set the list of database files to search.  The
+option overrides the environment variable if both are used.  Empty
+elements in @var{path} (that is, a leading or trailing colon, or two
+colons in a row) are taken to stand for the default database.
+A database can be supplied on stdin, using @samp{-} as an element
+of @samp{path}. If more than one element of @samp{path} is @samp{-},
+later instances are ignored (but a warning message is printed).
+
+@item --existing
+@itemx -e
+Only print out such names which currently exist (instead of such names
+which existed when the database was created).  Note that this may slow
+down the program a lot, if there are many matches in the database.
+The way in which broken symbolic links are treated is affected by the
+@samp{-L}, @samp{-P} and @samp{-H} options.  Please note that it is
+possible for the file to be deleted after @code{locate} has checked
+that it exists, but before you use it.  This option is automatically
+turned on when reading an @code{slocate} database in secure mode
+(@pxref{slocate Database Format}).
+
+@item --non-existing
+@itemx -E
+Only print out such names which currently do not exist (instead of
+such names which existed when the database was created).  Note that
+this may slow down the program a lot, if there are many matches in the
+database.  The way in which broken symbolic links are treated is
+affected by the @samp{-L}, @samp{-P} and @samp{-H} options.  Please
+note that @code{locate} checks that the file does not exist, but a
+file of the same name might be created after @code{locate}'s check but
+before you read @code{locate}'s output.
+
+@item --follow
+@itemx -L
+If testing for the existence of files (with the @samp{-e} or @samp{-E}
+options), consider broken symbolic links to be non-existing.  This is
+the default behaviour.
+
+@item --nofollow
+@itemx -P
+@itemx -H
+If testing for the existence of files (with the @samp{-e} or @samp{-E}
+options), treat broken symbolic links as if they were existing files.
+The @samp{-H} form of this option is provided purely for similarity
+with @code{find}; the use of @samp{-P} is recommended over @samp{-H}.
+
+@item --ignore-case
+@itemx -i
+Ignore case distinctions in both the pattern and the file names.
+
+@item --limit=N
+@itemx -l N
+Limit the number of results printed to N.  When used with the
+@samp{--count} option, the value printed will never be larger than
+this limit.
+@item --max-database-age=D
+Normally, @code{locate} will issue a warning message when it searches
+a database which is more than 8 days old.  This option changes that
+value to something other than 8.  The effect of specifying a negative
+value is undefined.
+@item --mmap
+@itemx -m
+Accepted but does nothing.  The option is supported only to provide
+compatibility with BSD's @code{locate}.
+
+@item --null
+@itemx -0
+Results are separated with the ASCII NUL character rather than the
+newline character.  To get the full benefit of this option,
+use the new @code{locate} database format (that is the default
+anyway).
+
+@item --print
+@itemx -p
+Print search results when they normally would not be due to
+use of @samp{--statistics} (@samp{-S}) or @samp{--count}
+(@samp{-c}).
+
+@item --wholename
+@itemx -w
+The specified pattern is matched against the whole name of the file in
+the @code{locate} database.  If the pattern contains metacharacters,
+it must match exactly.  If not, it must match part of the whole file
+name.  This is the default behaviour.
+
+@item --regex
+@itemx -r
+Instead of using substring or shell glob matching, the pattern
+specified on the command line is understood to be a regular
+expression.  GNU Emacs-style regular expressions are assumed unless
+the @samp{--regextype} option is also given.  File names from the
+@code{locate} database are matched using the specified regular
+expression.  If the @samp{-i} flag is also given, matching is
+case-insensitive.  Matches are performed against the whole path name,
+and so by default a pathname will be matched if any part of it matches
+the specified regular expression.  The regular expression may use
+@samp{^} or @samp{$} to anchor a match at the beginning or end of a
+pathname.
+
+@item --regextype
+This option changes the regular expression syntax and behaviour used
+by the @samp{--regex} option.  @ref{Regular Expressions} for more
+information on the regular expression dialects understood by GNU
+findutils.
+
+@item --stdio
+@itemx -s
+Accepted but does nothing.  The option is supported only to provide
+compatibility with BSD's @code{locate}.
+
+@item --statistics
+@itemx -S
+Print some summary information for each @code{locate} database.  No
+search is performed unless non-option arguments are given.
+Although the BSD version of locate also has this option, the format of the
+output is different.
+
+@item --help
+Print a summary of the command line usage for @code{locate} and exit.
+
+@item --version
+Print the version number of @code{locate} and exit.
+@end table
+
+@node Invoking updatedb
+@section Invoking @code{updatedb}
+
+@example
+updatedb @r{[}@var{option}@dots{}@r{]}
+@end example
+
+@code{updatedb} creates and updates the database of file names used by
+@code{locate}.  @code{updatedb} generates a list of files similar to
+the output of @code{find} and then uses utilities for optimizing the
+database for performance.  @code{updatedb} is often run periodically
+as a @code{cron} job and configured with environment variables or
+command options.  Typically, operating systems have a shell script
+that ``exports'' configurations for variable definitions and uses
+another shell script that ``sources'' the configuration file into the
+environment and then executes @code{updatedb} in the environment.
+
+@code{updatedb} creates and updates the database of file names used by
+@code{locate}.  @code{updatedb} generates a list of files similar to
+the output of @code{find} and then uses utilities for optimizing the
+database for performance.  @code{updatedb} is often run periodically
+as a @code{cron} job and configured with environment variables or
+command options.  Typically, operating systems have a shell script
+that ``exports'' configurations for variable definitions and uses
+another shell script that ``sources'' the configuration file into the
+environment and then executes @code{updatedb} in the environment.
+
+@table @code
+@item --findoptions='@var{OPTION}@dots{}'
+Global options to pass on to @code{find}.
+The environment variable @code{FINDOPTIONS} also sets this value.
+Default is none.
+
+@item --localpaths='@var{path}@dots{}'
+Non-network directories to put in the database.
+Default is @file{/}.
+
+@item --netpaths='@var{path}@dots{}'
+Network (NFS, AFS, RFS, etc.) directories to put in the database.
+The environment variable @code{NETPATHS} also sets this value.
+Default is none.
+
+@item --prunepaths='@var{path}@dots{}'
+Directories to omit from the database, which would otherwise be
+included.  The environment variable @code{PRUNEPATHS} also sets this
+value.  Default is @file{/tmp /usr/tmp /var/tmp /afs}.  The paths are
+used as regular expressions (with @code{find ... -regex}, so you need
+to specify these paths in the same way that @code{find} will encounter
+them.  This means for example that the paths must not include trailing
+slashes.
+
+@item --prunefs='@var{path}@dots{}'
+Filesystems to omit from the database, which would otherwise be
+included.  Note that files are pruned when a filesystem is reached;
+Any filesystem mounted under an undesired filesystem will be ignored.
+The environment variable @code{PRUNEFS} also sets this value.  Default
+is @file{nfs NFS proc}.
+
+@item --output=@var{dbfile}
+The database file to build.  The default is system-dependent, but
+when this document was formatted it was @file{@value{LOCATE_DB}}.
+
+@item --localuser=@var{user}
+The user to search the non-network directories as, using @code{su}.
+Default is to search the non-network directories as the current user.
+You can also use the environment variable @code{LOCALUSER} to set this user.
+
+@item --netuser=@var{user}
+The user to search network directories as, using @code{su}.  Default
+@code{user} is @code{daemon}.  You can also use the environment variable
+@code{NETUSER} to set this user.
+
+@item --old-format
+Generate a @code{locate} database in the old format, for compatibility
+with versions of @code{locate} other than GNU @code{locate}.  Using
+this option means that @code{locate} will not be able to properly
+handle non-ASCII characters in file names (that is, file names
+containing characters which have the eighth bit set, such as many of
+the characters from the ISO-8859-1 character set).  @xref{Database
+Formats}, for a detailed description of the supported database
+formats.
+
+@item --dbformat=@var{FORMAT}
+Generate the locate database in format @code{FORMAT}.  Supported
+database formats include @code{LOCATE02} (which is the default),
+@code{old} and @code{slocate}.  The @code{old} format exists for
+compatibility with implementations of @code{locate} on other Unix
+systems.  The @code{slocate} format exists for compatibility with
+@code{slocate}.  @xref{Database Formats}, for a detailed description
+of each format.
+
+@item --help
+Print a summary of the command line usage and exit.
+@item --version
+Print the version number of @code{updatedb} and exit.
+@end table
+
+@node Invoking xargs
+@section Invoking @code{xargs}
+
+@example
+xargs @r{[}@var{option}@dots{}@r{]} @r{[}@var{command} @r{[}@var{initial-arguments}@r{]}@r{]}
+@end example
+
+@code{xargs} exits with the following status:
+
+@table @asis
+@item 0
+if it succeeds
+@item 123
+if any invocation of the command exited with status 1-125
+@item 124
+if the command exited with status 255
+@item 125
+if the command is killed by a signal
+@item 126
+if the command cannot be run
+@item 127
+if the command is not found
+@item 1
+if some other error occurred.
+@end table
+
+Exit codes greater than 128 are used by the shell to indicate that
+a program died due to a fatal signal.
+
+
+@menu
+* xargs options::
+* Invoking the shell from xargs::
+@end menu
+
+@node xargs options
+@subsection xargs options
+
+@table @code
+@item --arg-file@r{=@var{inputfile}}
+@itemx -a @r{@var{inputfile}}
+Read names from the file @var{inputfile} instead of standard input.
+If you use this option, the standard input stream remains unchanged
+when commands are run. Otherwise, stdin is redirected from
+@file{/dev/null}.
+
+@item --null
+@itemx -0
+Input file names are terminated by a null character instead of by
+whitespace, and any quotes and backslash characters are not considered
+special (every character is taken literally).  Disables the end of
+file string, which is treated like any other argument.
+
+@item --delimiter @var{delim}
+@itemx -d @var{delim}
+
+Input file names are terminated by the specified character @var{delim}
+instead of by whitespace, and any quotes and backslash characters are
+not considered special (every character is taken literally).  Disables
+the end of file string, which is treated like any other argument.
+
+The specified delimiter may be a single character, a C-style character
+escape such as @samp{\n}, or an octal or hexadecimal escape code.
+Octal and hexadecimal escape codes are understood as for the
+@code{printf} command.  Multibyte characters are not supported.
+
+
+@item -E @var{eof-str}
+@itemx --eof@r{[}=@var{eof-str}@r{]}
+@itemx -e@r{[}@var{eof-str}@r{]}
+Set the end of file string to @var{eof-str}.  If the end of file
+string occurs as a line of input, the rest of the input is ignored.
+If @var{eof-str} is omitted (@samp{-e}) or blank (either @samp{-e} or
+@samp{-E}), there is no end of file string.  The @samp{-e} form of
+this option is deprecated in favour of the POSIX-compliant @samp{-E}
+option, which you should use instead.  As of GNU xargs version 4.2.9,
+the default behaviour of xargs is not to have a logical end-of-file
+marker.  The POSIX standard (IEEE Std 1003.1, 2004 Edition) allows
+this.
+
+@item --help
+Print a summary of the options to @code{xargs} and exit.
+
+@item -I @var{replace-str}
+@itemx --replace@r{[}=@var{replace-str}@r{]}
+@itemx -i@r{[}@var{replace-str}@r{]}
+Replace occurrences of @var{replace-str} in the initial arguments with
+names read from standard input.  Also, unquoted blanks do not
+terminate arguments; instead, the input is split at newlines only.  If
+@var{replace-str} is omitted (omitting it is allowed only for
+@samp{-i}), it defaults to @samp{@{@}} (like for @samp{find -exec}).
+Implies @samp{-x} and @samp{-l 1}.  The @samp{-i} option is deprecated
+in favour of the @samp{-I} option.
+
+@item -L @var{max-lines}
+@itemx --max-lines@r{[}=@var{max-lines}@r{]}
+@itemx -l@r{[}@var{max-lines}@r{]}
+Use at most @var{max-lines} non-blank input lines per command line.
+For @samp{-l}, @var{max-lines} defaults to 1 if omitted.  For
+@samp{-L}, the argument is mandatory.  Trailing blanks cause an input
+line to be logically continued on the next input line, for the purpose
+of counting the lines.  Implies @samp{-x}.  The @samp{-l} form of this
+option is deprecated in favour of the POSIX-compliant @samp{-L}
+option.
+
+@item --max-args=@var{max-args}
+@itemx -n @var{max-args}
+Use at most @var{max-args} arguments per command line.  Fewer than
+@var{max-args} arguments will be used if the size (see the @samp{-s}
+option) is exceeded, unless the @samp{-x} option is given, in which
+case @code{xargs} will exit.
+
+@item --interactive
+@itemx -p
+Prompt the user about whether to run each command line and read a line
+from the terminal.  Only run the command line if the response starts
+with @samp{y} or @samp{Y}.  Implies @samp{-t}.
+
+@item --no-run-if-empty
+@itemx -r
+If the standard input is completely empty, do not run the
+command.  By default, the command is run once even if there is no
+input.
+
+@item --max-chars=@var{max-chars}
+@itemx -s @var{max-chars}
+Use at most @var{max-chars} characters per command line, including the
+command, initial arguments and any terminating nulls at the ends of
+the argument strings.
+
+@item --show-limits
+Display the limits on the command-line length which are imposed by the
+operating system, @code{xargs}' choice of buffer size and the
+@samp{-s} option.  Pipe the input from @file{/dev/null} (and perhaps
+specify @samp{--no-run-if-empty}) if you don't want @code{xargs} to do
+anything.
+
+@item --verbose
+@itemx -t
+Print the command line on the standard error output before executing
+it.
+
+@item --version
+Print the version number of @code{xargs} and exit.
+
+@item --exit
+@itemx -x
+Exit if the size (see the @samp{-s} option) is exceeded.
+
+
+@item --max-procs=@var{max-procs}
+@itemx -P @var{max-procs}
+Run simultaneously up to @var{max-procs} processes at once; the default is 1.  If
+@var{max-procs} is 0, @code{xargs} will run as many processes as
+possible simultaneously.
+@end table
+
+@node Invoking the shell from xargs
+@subsection Invoking the shell from xargs
+
+Normally, @code{xargs} will exec the command you specified directly,
+without invoking a shell.  This is normally the behaviour one would
+want.  It's somewhat more efficient and avoids problems with shell
+metacharacters, for example.  However, sometimes it is necessary to
+manipulate the environment of a command before it is run, in a way
+that @code{xargs} does not directly support.
+
+Invoking a shell from @code{xargs} is a good way of performing such
+manipulations.  However, some care must be taken to prevent problems,
+for example unwanted interpretation of shell metacharacters.
+
+This command moves a set of files into an archive directory:
+
+@example
+find /foo -maxdepth 1 -atime +366 -exec mv @{@} /archive \;
+@end example
+
+However, this will only move one file at a time.  We cannot in this
+case use @code{-exec ... +} because the matched file names are added
+at the end of the command line, while the destination directory would
+need to be specified last.  We also can't use @code{xargs} in the
+obvious way for the same reason.  One way of working around this
+problem is to make use of the special properties of GNU @code{mv}; it
+has a @code{-t} option that allows the target directory to be
+specified before the list of files to be moved.  However, while this
+technique works for GNU @code{mv}, it doesn't solve the more general
+problem.
+
+Here is a more general technique for solving this problem:
+
+@example
+find /foo -maxdepth 1 -atime +366 -print0 |
+xargs -r0 sh -c 'mv "$@@" /archive' move
+@end example
+
+Here, a shell is being invoked.  There are two shell instances to
+think about.  The first is the shell which launches the xargs command
+(this might be the shell into which you are typing, for example).  The
+second is the shell launched by @code{xargs} (in fact it will probably
+launch several, one after the other, depending on how many files need
+to be archived).  We'll refer to this second shell as a subshell.
+
+Our example uses the @code{-c} option of @code{sh}.  Its argument is a
+shell command to be executed by the subshell.  Along with the rest of
+that command, the $@@ is enclosed by single quotes to make sure it is
+passed to the subshell without being expanded by the parent shell.  It
+is also enclosed with double quotes so that the subshell will expand
+@code{$@@} correctly even if one of the file names contains a space or
+newline.
+
+The subshell will use any non-option arguments as positional
+parameters (that is, in the expansion of @code{$@@}).  Because
+@code{xargs} launches the @code{sh -c} subshell with a list of files,
+those files will end up as the expansion of @code{$@@}.
+
+You may also notice the @samp{move} at the end of the command line.
+This is used as the value of @code{$0} by the subshell.  We include it
+because otherwise the name of the first file to be moved would be used
+instead.  If that happened it would not be included in the subshell's
+expansion of @code{$@@}, and so it wouldn't actually get moved.
+
+
+Another reason to use the @code{sh -c} construct could be to
+perform redirection:
+
+@example
+find /usr/include -name '*.h' | xargs grep -wl mode_t |
+xargs -r sh -c 'exec emacs "$@@" < /dev/tty' Emacs
+@end example
+
+Notice that we use the shell builtin @code{exec} here.  That's simply
+because the subshell needs to do nothing once Emacs has been invoked.
+Therefore instead of keeping a @code{sh} process around for no reason,
+we just arrange for the subshell to exec Emacs, saving an extra
+process creation.
+
+Sometimes, though, it can be helpful to keep the shell process around:
+
+@example
+find /foo -maxdepth 1 -atime +366 -print0 |
+xargs -r0 sh -c 'mv "$@@" /archive || exit 255' move
+@end example
+
+Here, the shell will exit with status 255 if any @code{mv} failed.
+This causes @code{xargs} to stop immediately.
+
+
+@node Regular Expressions
+@section Regular Expressions
+
+The @samp{-regex} and @samp{-iregex} tests of @code{find} allow
+matching by regular expression, as does the @samp{--regex} option of
+@code{locate}.
+
+Your locale configuration affects how regular expressions are
+interpreted.  @xref{Environment Variables}, for a description of how
+your locale setup affects the interpretation of regular expressions.
+
+There are also several different types of regular expression, and
+these are interpreted differently.  Normally, the type of regular
+expression used by @code{find} and @code{locate} is the same as is
+used in GNU Emacs.  Both programs provide an option which allows you
+to select an alternative regular expression syntax; for @code{find}
+this is the @samp{-regextype} option, and for @code{locate} this is
+the @samp{--regextype} option.
+
+These options take a single argument, which indicates the specific
+regular expression syntax and behaviour that should be used.  This
+should be one of the following:
+
+@include regexprops.texi
+
+@node Environment Variables
+@section Environment Variables
+@table @var
+@item LANG
+Provides a default value for the internationalisation variables that
+are unset or null.
+@item LC_ALL
+If set to a non-empty string value, override the values of all the
+other internationalisation variables.
+@item LC_COLLATE
+The POSIX standard specifies that this variable affects the pattern
+matching to be used for the `\-name' option.  GNU find uses the
+GNU version of the @code{fnmatch} library function.
+
+This variable also affects the interpretation of
+the response to @code{-ok}; while the LC_MESSAGES variable selects the
+actual pattern used to interpret the response to @code{-ok},
+the interpretation of any bracket expressions in the pattern will be
+affected by the LC_COLLATE variable.
+
+@item LC_CTYPE
+This variable affects the treatment of character classes used in
+regular expression and with
+the @samp{-name} test, if the @code{fnmatch} function supports this.
+
+This variable also affects the interpretation of any character classes
+in the regular expressions used to interpret the response to the
+prompt issued by @code{-ok}.  The LC_CTYPE environment variable will
+also affect which characters are considered to be unprintable when
+filenames are printed (@pxref{Unusual Characters in File Names}).
+
+@item LC_MESSAGES
+Determines the locale to be used for internationalised messages,
+including the interpretation of the response to the prompt made by the
+@code{-ok} action.
+
+@item NLSPATH
+Determines the location of the internationalisation message catalogues.
+@item PATH
+Affects the directories which are searched to find the executables
+invoked by @samp{-exec}, @samp{-execdir} @samp{-ok} and @samp{-okdir}.
+If the @var{PATH} environment variable includes the current directory
+(by explicitly including @samp{.} or by having an empty element), and
+the find command line includes @samp{-execdir} or @samp{-okdir},
+@code{find} will refuse to run.  @xref{Security Considerations}, for a
+more detailed discussion of security matters.
+
+@item POSIXLY_CORRECT
+Determines the block size used by @samp{-ls} and @samp{-fls}.
+If @var{POSIXLY_CORRECT} is set, blocks are units of 512 bytes.  Otherwise
+they are units of 1024 bytes.
+
+Setting this variable also turns off warning messages (that is, implies
+@samp{-nowarn}) by default, because POSIX requires that apart from
+the output for @samp{-ok}, all messages printed on stderr are
+diagnostics and must result in a non-zero exit status.
+
+Arguments to @samp{-perm} beginning with @samp{+} are treated
+differently when POSIXLY_CORRECT is set. See
+@ref{Mode Bits,-perm,File Mode Bits}.
+
+When POSIXLY_CORRECT is set, the response to the prompt made by the
+@code{-ok} action is interpreted according to the system's message
+catalogue, as opposed to according to @code{find}'s own message
+translations.
+
+@item TZ
+Affects the time zone used for some of the time-related format
+directives of @samp{-printf} and @samp{-fprintf}.
+@end table
+
+
+
+@node Common Tasks
+@chapter Common Tasks
+
+The sections that follow contain some extended examples that both give
+a good idea of the power of these programs, and show you how to solve
+common real-world problems.
+
+@menu
+* Viewing And Editing::
+* Archiving::
+* Cleaning Up::
+* Strange File Names::
+* Fixing Permissions::
+* Classifying Files::
+@end menu
+
+@node Viewing And Editing
+@section Viewing And Editing
+
+To view a list of files that meet certain criteria, simply run your
+file viewing program with the file names as arguments.  Shells
+substitute a command enclosed in backquotes with its output, so the
+whole command looks like this:
+
+@example
+less `find /usr/include -name '*.h' | xargs grep -l mode_t`
+@end example
+
+@noindent
+You can edit those files by giving an editor name instead of a file
+viewing program:
+
+@example
+emacs `find /usr/include -name '*.h' | xargs grep -l mode_t`
+@end example
+
+Because there is a limit to the length of any individual command line,
+there is a limit to the number of files that can be handled in this
+way.  We can get around this difficulty by using xargs like this:
+
+@example
+find /usr/include -name '*.h' | xargs grep -l mode_t > todo
+xargs --arg-file=todo emacs
+@end example
+
+Here, @code{xargs} will run @code{emacs} as many times as necessary to
+visit all of the files listed in the file @file{todo}.  Generating a
+temporary file is not always convenient, though.  This command does
+much the same thing without needing one:
+
+@example
+find /usr/include -name '*.h' | xargs grep -l mode_t |
+xargs sh -c 'emacs "$@@" < /dev/tty' Emacs
+@end example
+
+The example above illustrates a useful trick; Using @code{sh -c} you
+can invoke a shell command from @code{xargs}.  The @code{$@@} in the
+command line is expanded by the shell to a list of arguments as
+provided by @code{xargs}.  The single quotes in the command line
+protect the @code{$@@} against expansion by your interactive shell
+(which will normally have no arguments and thus expand @code{$@@} to
+nothing).  The capitalised @samp{Emacs} on the command line is used as
+@code{$0} by the shell that @code{xargs} launches.
+
+@node Archiving
+@section Archiving
+
+You can pass a list of files produced by @code{find} to a file
+archiving program.  GNU @code{tar} and @code{cpio} can both read lists
+of file names from the standard input---either delimited by nulls (the
+safe way) or by blanks (the lazy, risky default way).  To use
+null-delimited names, give them the @samp{--null} option.  You can
+store a file archive in a file, write it on a tape, or send it over a
+network to extract on another machine.
+
+One common use of @code{find} to archive files is to send a list of
+the files in a directory tree to @code{cpio}.  Use @samp{-depth} so if
+a directory does not have write permission for its owner, its contents
+can still be restored from the archive since the directory's
+permissions are restored after its contents.  Here is an example of
+doing this using @code{cpio}; you could use a more complex @code{find}
+expression to archive only certain files.
+
+@example
+find . -depth -print0 |
+  cpio --create --null --format=crc --file=/dev/nrst0
+@end example
+
+You could restore that archive using this command:
+
+@example
+cpio --extract --null --make-dir --unconditional \
+  --preserve --file=/dev/nrst0
+@end example
+
+Here are the commands to do the same things using @code{tar}:
+
+@example
+find . -depth -print0 |
+  tar --create --null --files-from=- --file=/dev/nrst0
+
+tar --extract --null --preserve-perm --same-owner \
+  --file=/dev/nrst0
+@end example
+
+@c Idea from Rick Sladkey.
+Here is an example of copying a directory from one machine to another:
+
+@example
+find . -depth -print0 | cpio -0o -Hnewc |
+  rsh @var{other-machine} "cd `pwd` && cpio -i0dum"
+@end example
+
+@node Cleaning Up
+@section Cleaning Up
+
+@c Idea from Jim Meyering.
+This section gives examples of removing unwanted files in various
+situations.  Here is a command to remove the CVS backup files created
+when an update requires a merge:
+
+@example
+find . -name '.#*' -print0 | xargs -0r rm -f
+@end example
+
+If your @code{find} command removes directories, you may find that
+you get a spurious error message when @code{find} tries to recurse
+into a directory that has now been removed.  Using the @samp{-depth}
+option will normally resolve this problem.
+
+@c What does the following sentence mean? Why is -delete safer? --kasal
+@c The command above works, but the following is safer:
+
+It is also possible to use the @samp{-delete} action:
+
+@example
+find . -depth -name '.#*' -delete
+@end example
+
+@c Idea from Franc,ois Pinard.
+You can run this command to clean out your clutter in @file{/tmp}.
+You might place it in the file your shell runs when you log out
+(@file{.bash_logout}, @file{.logout}, or @file{.zlogout}, depending on
+which shell you use).
+
+@example
+find /tmp -depth -user "$LOGNAME" -type f -delete
+@end example
+
+@c Idea from Noah Friedman.
+To remove old Emacs backup and auto-save files, you can use a command
+like the following.  It is especially important in this case to use
+null-terminated file names because Emacs packages like the VM mailer
+often create temporary file names with spaces in them, like
+@file{#reply to David J. MacKenzie<1>#}.
+
+@example
+find ~ \( -name '*~' -o -name '#*#' \) -print0 |
+  xargs --no-run-if-empty --null rm -vf
+@end example
+
+Removing old files from @file{/tmp} is commonly done from @code{cron}:
+
+@c Idea from Kaveh Ghazi.
+@example
+find /tmp /var/tmp -depth -not        -type d -mtime +3 -delete
+find /tmp /var/tmp -depth -mindepth 1 -type d -empty    -delete
+@end example
+
+The second @code{find} command above cleans out empty directories
+depth-first (@samp{-delete} implies @samp{-depth} anyway), hoping that
+the parents become empty and can be removed too.  It uses
+@samp{-mindepth} to avoid removing @file{/tmp} itself if it becomes
+totally empty.
+
+
+Lastly, an example of a program that almost certainly does not do what
+the user intended:
+
+@c inspired by Savannah bug #20865 (Bruno De Fraine)
+@example
+find dirname -delete -name quux
+@end example
+
+If the user hoped to delete only files named @file{quux} they will get
+an unpleasant surprise; this command will attempt to delete everything
+at or below the starting point @file{dirname}.  This is because
+@code{find} evaluates the items on the command line as an expression.
+The @code{find} program will normally execute an action if the
+preceding action succeeds.  Here, there is no action or test before
+the @samp{-delete} so it will always be executed.  The @samp{-name
+quux} test will be performed for files we successfully deleted, but
+that test has no effect since @samp{-delete} also disables the default
+@samp{-print} operation.   So the above example will probably delete a
+lot of files the user didn't want to delete.
+
+This command is also likely to do something you did not intend:
+@example
+find dirname -path dirname/foo -prune -o -delete
+@end example
+
+Because @samp{-delete} turns on @samp{-depth}, the @samp{-prune}
+action has no effect and files in @file{dirname/foo} will be deleted
+too.
+
+
+@node Strange File Names
+@section Strange File Names
+
+@c Idea from:
+@c From: tmatimar@isgtec.com (Ted Timar)
+@c Newsgroups: comp.unix.questions,comp.unix.shell,comp.answers,news.answers
+@c Subject: Unix - Frequently Asked Questions (2/7) [Frequent posting]
+@c Subject: How do I remove a file with funny characters in the filename ?
+@c Date: Thu Mar 18 17:16:55 EST 1993
+@code{find} can help you remove or rename a file with strange
+characters in its name.  People are sometimes stymied by files whose
+names contain characters such as spaces, tabs, control characters, or
+characters with the high bit set.  The simplest way to remove such
+files is:
+
+@example
+rm -i @var{some*pattern*that*matches*the*problem*file}
+@end example
+
+@code{rm} asks you whether to remove each file matching the given
+pattern.  If you are using an old shell, this approach might not work
+if the file name contains a character with the high bit set; the shell
+may strip it off.  A more reliable way is:
+
+@example
+find . -maxdepth 1 @var{tests} -okdir rm '@{@}' \;
+@end example
+
+@noindent
+where @var{tests} uniquely identify the file.  The @samp{-maxdepth 1}
+option prevents @code{find} from wasting time searching for the file
+in any subdirectories; if there are no subdirectories, you may omit
+it.  A good way to uniquely identify the problem file is to figure out
+its inode number; use
+
+@example
+ls -i
+@end example
+
+Suppose you have a file whose name contains control characters, and
+you have found that its inode number is 12345.  This command prompts
+you for whether to remove it:
+
+@example
+find . -maxdepth 1 -inum 12345 -okdir rm -f '@{@}' \;
+@end example
+
+If you don't want to be asked, perhaps because the file name may
+contain a strange character sequence that will mess up your screen
+when printed, then use @samp{-execdir} instead of @samp{-okdir}.
+
+If you want to rename the file instead, you can use @code{mv} instead
+of @code{rm}:
+
+@example
+find . -maxdepth 1 -inum 12345 -okdir mv '@{@}' @var{new-file-name} \;
+@end example
+
+@node Fixing Permissions
+@section Fixing Permissions
+
+Suppose you want to make sure that everyone can write to the
+directories in a certain directory tree.  Here is a way to find
+directories lacking either user or group write permission (or both),
+and fix their permissions:
+
+@example
+find . -type d -not -perm -ug=w | xargs chmod ug+w
+@end example
+
+@noindent
+You could also reverse the operations, if you want to make sure that
+directories do @emph{not} have world write permission.
+
+@node Classifying Files
+@section Classifying Files
+
+@c Idea from:
+@c From: martin@mwtech.UUCP (Martin Weitzel)
+@c Newsgroups: comp.unix.wizards,comp.unix.questions
+@c Subject: Advanced usage of 'find' (Re: Unix security automating script)
+@c Date: 22 Mar 90 15:05:19 GMT
+If you want to classify a set of files into several groups based on
+different criteria, you can use the comma operator to perform multiple
+independent tests on the files.  Here is an example:
+
+@example
+find / -type d \( -perm -o=w -fprint allwrite , \
+  -perm -o=x -fprint allexec \)
+
+echo "Directories that can be written to by everyone:"
+cat allwrite
+echo ""
+echo "Directories with search permissions for everyone:"
+cat allexec
+@end example
+
+@code{find} has only to make one scan through the directory tree
+(which is one of the most time consuming parts of its work).
+
+@node Worked Examples
+@chapter Worked Examples
+
+The tools in the findutils package, and in particular @code{find},
+have a large number of options.  This means that quite often,
+there is more than one way to do things.  Some of the options
+and facilities only exist for compatibility with other tools, and
+findutils provides improved ways of doing things.
+
+This chapter describes a number of useful tasks that are commonly
+performed, and compares the different ways of achieving them.
+
+@menu
+* Deleting Files::
+* Copying A Subset of Files::
+* Updating A Timestamp File::
+* Finding the Shallowest Instance::
+@end menu
+
+@node Deleting Files
+@section Deleting Files
+
+One of the most common tasks that @code{find} is used for is locating
+files that can be deleted.  This might include:
+
+@itemize
+@item
+Files last modified more than 3 years ago which haven't been accessed
+for at least 2 years
+@item
+Files belonging to a certain user
+@item
+Temporary files which are no longer required
+@end itemize
+
+This example concentrates on the actual deletion task rather than on
+sophisticated ways of locating the files that need to be deleted.
+We'll assume that the files we want to delete are old files underneath
+@file{/var/tmp/stuff}.
+
+@subsection The Traditional Way
+
+The traditional way to delete files in @file{/var/tmp/stuff} that have
+not been modified in over 90 days would have been:
+
+@smallexample
+find /var/tmp/stuff -mtime +90 -exec /bin/rm @{@} \;
+@end smallexample
+
+The above command uses @samp{-exec} to run the @code{/bin/rm} command
+to remove each file.  This approach works and in fact would have
+worked in Version 7 Unix in 1979.  However, there are a number of
+problems with this approach.
+
+
+The most obvious problem with the approach above is that it causes
+@code{find} to fork every time it finds a file that needs to delete,
+and the child process then has to use the @code{exec} system call to
+launch @code{/bin/rm}.   All this is quite inefficient.  If we are
+going to use @code{/bin/rm} to do this job, it is better to make it
+delete more than one file at a time.
+
+The most obvious way of doing this is to use the shell's command
+expansion feature:
+
+@smallexample
+/bin/rm `find /var/tmp/stuff -mtime +90 -print`
+@end smallexample
+or you could use the more modern form
+@smallexample
+/bin/rm $(find /var/tmp/stuff -mtime +90 -print)
+@end smallexample
+
+The commands above are much more efficient than the first attempt.
+However, there is a problem with them.  The shell has a maximum
+command length which is imposed by the operating system (the actual
+limit varies between systems).  This means that while the command
+expansion technique will usually work, it will suddenly fail when
+there are lots of files to delete.  Since the task is to delete
+unwanted files, this is precisely the time we don't want things to go
+wrong.
+
+@subsection Making Use of xargs
+
+So, is there a way to be more efficient in the use of @code{fork()}
+and @code{exec()} without running up against this limit?
+Yes, we can be almost optimally efficient by making use
+of the @code{xargs} command.  The @code{xargs} command reads arguments
+from its standard input and builds them into command lines.  We can
+use it like this:
+
+@smallexample
+find /var/tmp/stuff -mtime +90 -print | xargs /bin/rm
+@end smallexample
+
+For example if the files found by @code{find} are
+@file{/var/tmp/stuff/A},
+@file{/var/tmp/stuff/B} and
+@file{/var/tmp/stuff/C} then @code{xargs} might issue the commands
+
+@smallexample
+/bin/rm /var/tmp/stuff/A /var/tmp/stuff/B
+/bin/rm /var/tmp/stuff/C
+@end smallexample
+
+The above assumes that @code{xargs} has a very small maximum command
+line length.  The real limit is much larger but the idea is that
+@code{xargs} will run @code{/bin/rm} as many times as necessary to get
+the job done, given the limits on command line length.
+
+This usage of @code{xargs} is pretty efficient, and the @code{xargs}
+command is widely implemented (all modern versions of Unix offer it).
+So far then, the news is all good.  However, there is bad news too.
+
+@subsection Unusual characters in filenames
+
+Unix-like systems allow any characters to appear in file names with
+the exception of the ASCII NUL character and the slash.
+Slashes can occur in path names (as the directory separator) but
+not in the names of actual directory entries.  This means that the
+list of files that @code{xargs} reads could in fact contain white space
+characters --- spaces, tabs and newline characters.  Since by default,
+@code{xargs} assumes that the list of files it is reading uses white
+space as an argument separator, it cannot correctly handle the case
+where a filename actually includes white space.  This makes the
+default behaviour of @code{xargs} almost useless for handling
+arbitrary data.
+
+To solve this problem, GNU findutils introduced the @samp{-print0}
+action for @code{find}.  This uses the ASCII NUL character to separate
+the entries in the file list that it produces.  This is the ideal
+choice of separator since it is the only character that cannot appear
+within a path name.  The @samp{-0} option to @code{xargs} makes it
+assume that arguments are separated with ASCII NUL instead of white
+space.  It also turns off another misfeature in the default behaviour
+of @code{xargs}, which is that it pays attention to quote characters
+in its input.  Some versions of @code{xargs} also terminate when they
+see a lone @samp{_} in the input, but GNU @code{find} no longer does
+that (since it has become an optional behaviour in the Unix standard).
+
+So, putting @code{find -print0} together with @code{xargs -0} we get
+this command:
+
+@smallexample
+find /var/tmp/stuff -mtime +90 -print0 | xargs -0 /bin/rm
+@end smallexample
+
+The result is an efficient way of proceeding that
+correctly handles all the possible characters that could appear in the
+list of files to delete.  This is good news.  However, there is, as
+I'm sure you're expecting, also more bad news.  The problem is that
+this is not a portable construct; although other versions of Unix
+(notably BSD-derived ones) support @samp{-print0}, it's not
+universal.  So, is there a more universal mechanism?
+
+@subsection Going back to -exec
+
+There is indeed a more universal mechanism, which is a slight
+modification to the @samp{-exec} action.  The normal @samp{-exec}
+action assumes that the command to run is terminated with a semicolon
+(the semicolon normally has to be quoted in order to protect it from
+interpretation as the shell command separator).  The SVR4 edition of
+Unix introduced a slight variation, which involves terminating the
+command with @samp{+} instead:
+
+@smallexample
+find /var/tmp/stuff -mtime +90 -exec /bin/rm @{@} \+
+@end smallexample
+
+The above use of @samp{-exec} causes @code{find} to build up a long
+command line and then issue it.  This can be less efficient than some
+uses of @code{xargs}; for example @code{xargs} allows new command
+lines to be built up while the previous command is still executing, and
+allows you to specify a number of commands to run in parallel.
+However, the @code{find @dots{} -exec @dots{} +} construct has the advantage
+of wide portability.  GNU findutils did not support @samp{-exec @dots{} +}
+until version 4.2.12; one of the reasons for this is that it already
+had the @samp{-print0} action in any case.
+
+
+@subsection A more secure version of -exec
+
+The command above seems to be efficient and portable.  However,
+within it lurks a security problem.  The problem is shared with
+all the commands we've tried in this worked example so far, too.  The
+security problem is a race condition; that is, if it is possible for
+somebody to manipulate the filesystem that you are searching while you
+are searching it, it is possible for them to persuade your @code{find}
+command to cause the deletion of a file that you can delete but they
+normally cannot.
+
+The problem occurs because the @samp{-exec} action is defined by the
+@acronym{POSIX} standard to invoke its command with the same working directory
+as @code{find} had when it was started.  This means that the arguments
+which replace the @{@} include a relative path from @code{find}'s
+starting point down the file that needs to be deleted.  For example,
+
+@smallexample
+find /var/tmp/stuff -mtime +90 -exec /bin/rm @{@} \+
+@end smallexample
+
+might actually issue the command:
+
+@smallexample
+/bin/rm /var/tmp/stuff/A /var/tmp/stuff/B /var/tmp/stuff/passwd
+@end smallexample
+
+Notice the file @file{/var/tmp/stuff/passwd}.  Likewise, the command:
+
+@smallexample
+cd /var/tmp && find stuff -mtime +90 -exec /bin/rm @{@} \+
+@end smallexample
+
+might actually issue the command:
+
+@smallexample
+/bin/rm stuff/A stuff/B stuff/passwd
+@end smallexample
+
+If an attacker can rename @file{stuff} to something else (making use
+of their write permissions in @file{/var/tmp}) they can replace it
+with a symbolic link to @file{/etc}.  That means that the
+@code{/bin/rm} command will be invoked on @file{/etc/passwd}.  If you
+are running your @code{find} command as root, the attacker has just managed
+to delete a vital file.  All they needed to do to achieve this was
+replace a subdirectory with a symbolic link at the vital moment.
+
+There is however, a simple solution to the problem.  This is an action
+which works a lot like @code{-exec} but doesn't need to traverse a
+chain of directories to reach the file that it needs to work on.  This
+is the @samp{-execdir} action, which was introduced by the BSD family
+of operating systems.   The command,
+
+@smallexample
+find /var/tmp/stuff -mtime +90 -execdir /bin/rm @{@} \+
+@end smallexample
+
+might delete a set of files by performing these actions:
+
+@enumerate
+@item
+Change directory to /var/tmp/stuff/foo
+@item
+Invoke @code{/bin/rm ./file1 ./file2 ./file3}
+@item
+Change directory to /var/tmp/stuff/bar
+@item
+Invoke @code{/bin/rm ./file99 ./file100 ./file101}
+@end enumerate
+
+This is a much more secure method.  We are no longer exposed to a race
+condition.  For many typical uses of @code{find}, this is the best
+strategy.   It's reasonably efficient, but the length of the command
+line is limited not just by the operating system limits, but also by
+how many files we actually need to delete from each directory.
+
+Is it possible to do any better?   In the case of general file
+processing, no.  However, in the specific case of deleting files it is
+indeed possible to do better.
+
+@subsection Using the -delete action
+
+The most efficient and secure method of solving this problem is to use
+the @samp{-delete} action:
+
+@smallexample
+find /var/tmp/stuff -mtime +90 -delete
+@end smallexample
+
+This alternative is more efficient than any of the @samp{-exec} or
+@samp{-execdir} actions, since it entirely avoids the overhead of
+forking a new process and using @code{exec} to run @code{/bin/rm}.  It
+is also normally more efficient than @code{xargs} for the same
+reason.   The file deletion is performed from the directory containing
+the entry to be deleted, so the @samp{-delete} action has the same
+security advantages as the @samp{-execdir} action has.
+
+The @samp{-delete} action was introduced by the BSD family of
+operating systems.
+
+@subsection Improving things still further
+
+Is it possible to improve things still further?  Not without either
+modifying the system library to the operating system or having more specific
+knowledge of the layout of the filesystem and disk I/O subsystem, or
+both.
+
+The @code{find} command traverses the filesystem, reading
+directories.  It then issues a separate system call for each file to
+be deleted.  If we could modify the operating system, there are
+potential gains that could be made:
+
+@itemize
+@item
+We could have a system call to which we pass more than one filename
+for deletion
+@item
+Alternatively, we could pass in a list of inode numbers (on GNU/Linux
+systems, @code{readdir()} also returns the inode number of each
+directory entry) to be deleted.
+@end itemize
+
+The above possibilities sound interesting, but from the kernel's point
+of view it is difficult to enforce standard Unix access controls for
+such processing by inode number.  Such a facility would probably
+need to be restricted to the superuser.
+
+Another way of improving performance would be to increase the
+parallelism of the process.  For example if the directory hierarchy we
+are searching is actually spread across a number of disks, we might
+somehow be able to arrange for @code{find} to process each disk in
+parallel.  In practice GNU @code{find} doesn't have such an intimate
+understanding of the system's filesystem layout and disk I/O
+subsystem.
+
+However, since the system administrator can have such an understanding
+they can take advantage of it like so:
+
+@smallexample
+find /var/tmp/stuff1 -mtime +90 -delete &
+find /var/tmp/stuff2 -mtime +90 -delete &
+find /var/tmp/stuff3 -mtime +90 -delete &
+find /var/tmp/stuff4 -mtime +90 -delete &
+wait
+@end smallexample
+
+In the example above, four separate instances of @code{find} are used
+to search four subdirectories in parallel.  The @code{wait} command
+simply waits for all of these to complete.  Whether this approach is
+more or less efficient than a single instance of @code{find} depends
+on a number of things:
+
+@itemize
+@item
+Are the directories being searched in parallel actually on separate
+disks?  If not, this parallel search might just result in a lot of
+disk head movement and so the speed might even be slower.
+@item
+Other activity - are other programs also doing things on those disks?
+@end itemize
+
+
+@subsection Conclusion
+
+The fastest and most secure way to delete files with the help of
+@code{find} is to use @samp{-delete}.  Using @code{xargs -0 -P N} can
+also make effective use of the disk, but it is not as secure.
+
+In the case where we're doing things other than deleting files, the
+most secure alternative is @samp{-execdir @dots{} +}, but this is not as
+portable as the insecure action @samp{-exec @dots{} +}.
+
+The @samp{-delete} action is not completely portable, but the only
+other possibility which is as secure (@samp{-execdir}) is no more
+portable.  The most efficient portable alternative is @samp{-exec
+@dots{}+}, but this is insecure and isn't supported by versions of GNU
+findutils prior to 4.2.12.
+
+@node Copying A Subset of Files
+@section Copying A Subset of Files
+
+Suppose you want to copy some files from @file{/source-dir} to
+@file{/dest-dir}, but there are a small number of files in
+@file{/source-dir} you don't want to copy.
+
+One option of course is @code{cp /source-dir /dest-dir} followed by
+deletion of the unwanted material under @file{/dest-dir}.  But often
+that can be inconvenient, because for example we would have copied a
+large amount of extraneous material, or because @file{/dest-dir} is
+too small.  Naturally there are many other possible reasons why this
+strategy may be unsuitable.
+
+So we need to have some way of identifying which files we want to
+copy, and we need to have a way of copying that file list.  The second
+part of this condition is met by @code{cpio -p}.  Of course, we can
+identify the files we wish to copy by using @code{find}.  Here is a
+command that solves our problem:
+
+@example
+cd /source-dir
+find . -name '.snapshot' -prune -o \( \! -name '*~' -print0 \) |
+cpio -pmd0   /dest-dir
+@end example
+
+The first part of the @code{find} command here identifies files or
+directories named @file{.snapshot} and tells @code{find} not to
+recurse into them (since they do not need to be copied).  The
+combination @code{-name '.snapshot' -prune} yields false for anything
+that didn't get pruned, but it is exactly those files we want to
+copy.  Therefore we need to use an OR (@samp{-o}) condition to
+introduce the rest of our expression.  The remainder of the expression
+simply arranges for the name of any file not ending in @samp{~} to be
+printed.
+
+Using @code{-print0} ensures that white space characters in file names
+do not pose a problem.  The @code{cpio} command does the actual work
+of copying files.  The program as a whole fails if the @code{cpio}
+program returns nonzero.  If the @code{find} command returns non-zero
+on the other hand, the Unix shell will not diagnose a problem (since
+@code{find} is not the last command in the pipeline).
+
+
+@node Updating A Timestamp File
+@section Updating A Timestamp File
+
+Suppose we have a directory full of files which is maintained with a
+set of automated tools; perhaps one set of tools updates them and
+another set of tools uses the result.  In this situation, it might be
+useful for the second set of tools to know if the files have recently
+been changed.  It might be useful, for example, to have a 'timestamp'
+file which gives the timestamp on the newest file in the collection.
+
+We can use @code{find} to achieve this, but there are several
+different ways to do it.
+
+@subsection Updating the Timestamp The Wrong Way
+
+The obvious but wrong answer is just to use @samp{-newer}:-
+
+@smallexample
+find subdir -newer timestamp -exec touch -r @{@} timestamp \;
+@end smallexample
+
+This does the right sort of thing but has a bug.  Suppose that two
+files in the subdirectory have been updated, and that these are called
+@file{file1} and @file{file2}.  The command above will update
+@file{timestamp} with the modification time of @file{file1} or that of
+@file{file2}, but we don't know which one.  Since the timestamps on
+@file{file1} and @file{file2} will in general be different, this could
+well be the wrong value.
+
+One solution to this problem is to modify @code{find} to recheck the
+modification time of @file{timestamp} every time a file is to be
+compared against it, but that will reduce the performance of
+@code{find}.
+
+@subsection Using the test utility to compare timestamps
+
+The @code{test} command can be used to compare timestamps:
+
+@smallexample
+find subdir -exec test @{@} -nt timestamp \; -exec touch -r @{@} timestamp \;
+@end smallexample
+
+This will ensure that any changes made to the modification time of
+@file{timestamp} that take place during the execution of @code{find}
+are taken into account.  This resolves our earlier problem, but
+unfortunately this runs much more slowly.
+
+@subsection A combined approach
+
+We can of course still use @samp{-newer} to cut down on the number of
+calls to @code{test}:
+
+@smallexample
+find subdir -newer timestamp -and \
+     -exec test @{@} -nt timestamp \; -and \
+     -exec touch -r @{@} timestamp \;
+@end smallexample
+
+Here, the @samp{-newer} test excludes all the files which are
+definitely older than the timestamp, but all the files which are newer
+than the old value of the timestamp are compared against the current
+updated timestamp.
+
+This is indeed faster in general, but the speed difference will depend
+on how many updated files there are.
+
+@subsection Using -printf and sort to compare timestamps
+
+It is possible to use the @samp{-printf} action to abandon the use of
+@code{test} entirely:
+
+@smallexample
+newest=$(find subdir -newer timestamp -printf "%A@:%p\n" |
+           sort -n |
+           tail -1 |
+           cut -d: -f2- )
+touch -r "$@{newest:-timestamp@}" timestamp
+@end smallexample
+
+The command above works by generating a list of the timestamps and
+names of all the files which are newer than the timestamp.  The
+@code{sort}, @code{tail} and @code{cut} commands simply pull out the
+name of the file with the largest timestamp value (that is, the latest
+file).  The @code{touch} command is then used to update the timestamp,
+
+The @code{"$@{newest:-timestamp@}"} expression simply expands to the
+value of @code{$newest} if that variable is set, but to
+@file{timestamp} otherwise.  This ensures that an argument is always
+given to the @samp{-r} option of the @code{touch} command.
+
+This approach seems quite efficient, but unfortunately it has a
+problem.  Many operating systems now keep file modification time
+information at a granularity which is finer than one second.
+Findutils version 4.3.3 and later will print a fractional part with
+%A@@, but older versions will not.
+
+
+@subsection Solving the problem with make
+
+Another tool which often works with timestamps is @code{make}.  We can
+use @code{find} to generate a @file{Makefile} file on the fly and then
+use @code{make} to update the timestamps:
+
+@smallexample
+makefile=$(mktemp)
+find subdir \
+       \( \! -xtype l \) \
+       -newer timestamp \
+       -printf "timestamp:: %p\n\ttouch -r %p timestamp\n\n" > "$makefile"
+make -f "$makefile"
+rm   -f "$makefile"
+@end smallexample
+
+Unfortunately although the solution above is quite elegant, it fails
+to cope with white space within file names, and adjusting it to do so
+would require a rather complex shell script.
+
+
+@subsection Coping with odd filenames too
+
+We can fix both of these problems (looping and problems with white
+space), and do things more efficiently too.  The following command
+works with newlines and doesn't need to sort the list of filenames.
+
+@smallexample
+find subdir -newer timestamp -printf "%A@@:%p\0" |
+   perl -0 newest.pl |
+   xargs --no-run-if-empty --null -i \
+      find @{@} -maxdepth 0 -newer timestamp -exec touch -r @{@} timestamp \;
+@end smallexample
+
+The first @code{find} command generates a list of files which are
+newer than the original timestamp file, and prints a list of them with
+their timestamps.  The @file{newest.pl} script simply filters out all
+the filenames which have timestamps which are older than whatever the
+newest file is:-
+
+@smallexample
+@verbatim
+#! /usr/bin/perl -0
+my @newest = ();
+my $latest_stamp = undef;
+while (<>) {
+    my ($stamp, $name) = split(/:/);
+    if (!defined($latest_stamp) || ($tstamp > $latest_stamp)) {
+        $latest_stamp = $stamp;
+        @newest = ();
+    }
+    if ($tstamp >= $latest_stamp) {
+        push @newest, $name;
+    }
+}
+print join("\0", @newest);
+@end verbatim
+@end smallexample
+
+This prints a list of zero or more files, all of which are newer than
+the original timestamp file, and which have the same timestamp as each
+other, to the nearest second.  The second @code{find} command takes
+each resulting file one at a time, and if that is newer than the
+timestamp file, the timestamp is updated.
+
+@node Finding the Shallowest Instance
+@section Finding the Shallowest Instance
+
+Suppose you maintain local copies of sources from various projects,
+each with their own choice of directory organisation and source code
+management (SCM) tool.  You need to periodically synchronize each
+project with its upstream tree.  As the number local repositories
+grows, so does the work involved in maintaining synchronization.  SCM
+utilities typically create some sort of administrative directory: .svn
+for Subversion, CVS for CVS, and so on.  These directories can be used
+as a key to search for the bases of the project source trees.  Suppose
+we have the following directory structure:
+
+@smallexample
+repo/project1/CVS
+repo/gnu/project2/.svn
+repo/gnu/project3/.svn
+repo/gnu/project3/src/.svn
+repo/gnu/project3/doc/.svn
+repo/project4/.git
+@end smallexample
+
+One would expect to update each of the @file{projectX} directories,
+but not their subdirectories (src, doc, etc.).  To locate the project
+roots, we would need to find the least deeply nested directories
+containing an SCM-related subdirectory.  The following command
+discovers those roots efficiently.  It is efficient because it avoids
+searching subdirectories inside projects whose SCM directory we
+already found.
+
+@smallexample
+find repo/ \
+-exec test -d @{@}/.svn \; -or \
+-exec test -d @{@}/.git \; -or \
+-exec test -d @{@}/CVS \; -print -prune
+@end smallexample
+
+In this example, @command{test} is used to tell if we are currently
+examining a directory which appears to the a project's root directory
+(because it has an SCM subdirectory).  When we find a project root,
+there is no need to search inside it, and @code{-prune} makes sure
+that we descend no further.
+
+For large, complex trees like the Linux kernel, this will prevent
+searching a large portion of the structure, saving a good deal of
+time.
+
+
+@node Security Considerations
+@chapter Security Considerations
+
+Security considerations are important if you are using @code{find} or
+@code{xargs} to search for or process files that don't belong to you
+or which other people have control.  Security considerations
+relating to @code{locate} may also apply if you have files which you
+do not want others to see.
+
+The most severe forms of security problems affecting
+@code{find} and related programs are when third parties bring
+about a situation allowing them to do something
+they would normally not be able to accomplish.  This is called @emph{privilege
+elevation}.  This might include deleting files they would not normally
+be able to delete.  It is common for the operating system to periodically
+invoke @code{find} for self-maintenance purposes.  These invocations of
+@code{find} are particularly problematic from a security point of view
+as these are often invoked by the superuser and search the entire
+filesystem hierarchy.  Generally, the severity of any associated problem depends
+on what the system is going to do with the files found by @code{find}.
+
+@menu
+* Levels of Risk::      What is your level of exposure to security problems?
+* Security Considerations for find::  Security problems with find
+* Security Considerations for xargs:: Security problems with xargs
+* Security Considerations for locate:: Security problems with locate
+* Security Summary:: That was all very complex, what does it boil down to?
+* Further Reading on Security::
+@end menu
+
+
+@node Levels of Risk
+@section Levels of Risk
+
+There are some security risks inherent in the use of @code{find},
+@code{xargs} and (to a lesser extent) @code{locate}.  The severity of
+these risks depends on what sort of system you are using:
+
+@table @strong
+@item High risk
+Multi-user systems where you do not control (or trust) the other
+users, and on which you execute @code{find}, including areas where
+those other users can manipulate the filesystem (for example beneath
+@file{/home} or @file{/tmp}).
+
+@item Medium Risk
+Systems where the actions of other users can create file names chosen
+by them, but to which they don't have access while @code{find} is
+being run.  This access might include leaving programs running (shell
+background jobs, @code{at} or @code{cron} tasks, for example).  On
+these sorts of systems, carefully written commands (avoiding use of
+@samp{-print} for example) should not expose you to a high degree of
+risk.  Most systems fall into this category.
+
+@item Low Risk
+Systems to which untrusted parties do not have access, cannot create
+file names of their own choice (even remotely) and which contain no
+security flaws which might enable an untrusted third party to gain
+access.  Most systems do not fall into this category because there are
+many ways in which external parties can affect the names of files that
+are created on your system.  The system on which I am writing this for
+example automatically downloads software updates from the Internet;
+the names of the files in which these updates exist are chosen by
+third parties@footnote{Of course, I trust these parties to a large
+extent anyway, because I install software provided by them; I choose
+to trust them in this way, and that's a deliberate choice}.
+@end table
+
+In the discussion above, ``risk'' denotes the likelihood that someone
+can cause @code{find}, @code{xargs}, @code{locate} or some other
+program which is controlled by them to do something you did not
+intend.  The levels of risk suggested do not take any account of the
+consequences of this sort of event.  That is, if you operate a ``low
+risk'' type system, but the consequences of a security problem are
+disastrous, then you should still give serious thought to all the
+possible security problems, many of which of course will not be
+discussed here -- this section of the manual is intended to be
+informative but not comprehensive or exhaustive.
+
+If you are responsible for the operation of a system where the
+consequences of a security problem could be very important, you should
+do two things:-
+
+@enumerate
+@item Define a security policy which defines who is allowed to do what
+on your system.
+@item Seek competent advice on how to enforce your policy, detect
+breaches of that policy, and take account of any potential problems
+that might fall outside the scope of your policy.
+@end enumerate
+
+
+@node Security Considerations for find
+@section Security Considerations for @code{find}
+
+
+Some of the actions @code{find} might take have a direct effect;
+these include @code{-exec} and @code{-delete}.  However, it is also
+common to use @code{-print} explicitly or implicitly, and so if
+@code{find} produces the wrong list of file names, that can also be a
+security problem; consider the case for example where @code{find} is
+producing a list of files to be deleted.
+
+We normally assume that the @code{find} command line expresses the
+file selection criteria and actions that the user had in mind -- that
+is, the command line is ``trusted'' data.
+
+From a security analysis point of view, the output of @code{find}
+should be correct; that is, the output should contain only the names
+of those files which meet the user's criteria specified on the command
+line.  This applies for the @code{-exec} and @code{-delete} actions;
+one can consider these to be part of the output.
+
+On the other hand, the contents of the filesystem can be manipulated
+by other people, and hence we regard this as ``untrusted'' data.  This
+implies that the @code{find} command line is a filter which converts
+the untrusted contents of the filesystem into a correct list of output
+files.
+
+The filesystem will in general change while @code{find} is searching
+it; in fact, most of the potential security problems with @code{find}
+relate to this issue in some way.
+
+@dfn{Race conditions} are a general class of security problem where the
+relative ordering of actions taken by @code{find} (for example) and
+something else are critically important in getting the correct and expected result@footnote{This is more or less the
+definition of the term ``race condition''} .
+
+For @code{find}, an attacker might move or rename files or directories in
+the hope that an action might be taken against a file which was not
+normally intended to be affected.  Alternatively, this sort of attack
+might be intended to persuade @code{find} to search part of the
+filesystem which would not normally be included in the search
+(defeating the @code{-prune} action for example).
+
+@menu
+* Problems with -exec and filenames::
+* Changing the Current Working Directory::
+* Race Conditions with -exec::
+* Race Conditions with -print and -print0::
+@end menu
+
+@node Problems with -exec and filenames
+@subsection Problems with -exec and filenames
+
+It is safe in many cases to use the @samp{-execdir} action with any
+file name.  Because @samp{-execdir} prefixes the arguments it passes
+to programs with @samp{./}, you will not accidentally pass an argument
+which is interpreted as an option.  For example the file @file{-f}
+would be passed to @code{rm} as @file{./-f}, which is harmless.
+
+However, your degree of safety does depend on the nature of the
+program you are running.  For example constructs such as these two commands
+
+@example
+# risky
+find -exec sh -c "something @{@}" \;
+find -execdir sh -c "something @{@}" \;
+@end example
+
+are very dangerous.  The reason for this is that the @samp{@{@}} is
+expanded to a filename which might contain a semicolon or other
+characters special to the shell.  If for example someone creates the
+file @file{/tmp/foo; rm -rf $HOME} then the two commands above could
+delete someone's home directory.
+
+So for this reason do not run any command which will pass untrusted
+data (such as the names of files) to commands which interpret
+arguments as commands to be further interpreted (for example
+@samp{sh}).
+
+In the case of the shell, there is a clever workaround for this
+problem:
+
+@example
+# safer
+find -exec sh -c 'something "$@@"' sh @{@} \;
+find -execdir sh -c 'something "$@@"' sh @{@}\;
+@end example
+
+This approach is not guaranteed to avoid every problem, but it is much
+safer than substituting data of an attacker's choice into the text of
+a shell command.
+
+@node Changing the Current Working Directory
+@subsection Changing the Current Working Directory
+
+As @code{find} searches the filesystem, it finds subdirectories and
+then searches within them by changing its working directory.  First,
+@code{find} reaches and recognises a subdirectory.  It then decides if that
+subdirectory meets the criteria for being searched; that is, any
+@samp{-xdev} or @samp{-prune} expressions are taken into account.  The
+@code{find} program will then change working directory and proceed to
+search the directory.
+
+A race condition attack might take the form that once the checks
+relevant to @samp{-xdev} and @samp{-prune} have been done, an attacker
+might rename the directory that was being considered, and put in its
+place a symbolic link that actually points somewhere else.
+
+The idea behind this attack is to fool @code{find} into going into the
+wrong directory.  This would leave @code{find} with a working
+directory chosen by an attacker, bypassing any protection apparently
+provided by @samp{-xdev} and @samp{-prune}, and any protection
+provided by being able to @emph{not} list particular directories on
+the @code{find} command line.  This form of attack is particularly
+problematic if the attacker can predict when the @code{find} command
+will be run, as is the case with @code{cron} tasks for example.
+
+GNU @code{find} has specific safeguards to prevent this general class
+of problem.  The exact form of these safeguards depends on the
+properties of your system.
+
+@menu
+* O_NOFOLLOW::                     Safely changing directory using fchdir().
+* Systems without O_NOFOLLOW::     Checking for symbolic links after chdir().
+@end menu
+
+@node O_NOFOLLOW
+@subsubsection O_NOFOLLOW
+
+If your system supports the O_NOFOLLOW flag @footnote{GNU/Linux
+(kernel version 2.1.126 and later) and FreeBSD (3.0-CURRENT and later)
+support this} to the @code{open(2)} system call, @code{find} uses it
+to safely change directories.  The target directory is first opened
+and then @code{find} changes working directory with the
+@code{fchdir()} system call.  This ensures that symbolic links are not
+followed, preventing the sort of race condition attack in which use
+is made of symbolic links.
+
+If for any reason this approach does not work, @code{find} will fall
+back on the method which is normally used if O_NOFOLLOW is not
+supported.
+
+You can tell if your system supports O_NOFOLLOW by running
+
+@example
+find --version
+@end example
+
+This will tell you the version number and which features are enabled.
+For example, if I run this on my system now, this gives:
+@example
+GNU find version 4.2.18-CVS
+Features enabled: D_TYPE O_NOFOLLOW(enabled)
+@end example
+
+Here, you can see that I am running a version of @code{find} which was
+built from the development (CVS) code prior to the release of
+findutils-4.2.18, and that the D_TYPE and O_NOFOLLOW features are
+present.  O_NOFOLLOW is qualified with ``enabled''.  This simply means
+that the current system seems to support O_NOFOLLOW.  This check is
+needed because it is possible to build @code{find} on a system that
+defines O_NOFOLLOW and then run it on a system that ignores the
+O_NOFOLLOW flag.  We try to detect such cases at startup by checking
+the operating system and version number; when this happens you will
+see ``O_NOFOLLOW(disabled)'' instead.
+
+@node Systems without O_NOFOLLOW
+@subsubsection Systems without O_NOFOLLOW
+
+The strategy for preventing this type of problem on systems that lack
+support for the O_NOFOLLOW flag is more complex.  Each time
+@code{find} changes directory, it examines the directory it is about
+to move to, issues the @code{chdir()} system call, and then checks
+that it has ended up in the subdirectory it expected.  If all is as
+expected, processing continues as normal.  However, there are two main
+reasons why the directory might change: the use of an automounter and
+the someone removing the old directory and replacing it with something
+else while @code{find} is trying to descend into it.
+
+Where a filesystem ``automounter'' is in use it can be the case that
+the use of the @code{chdir()} system call can itself cause a new
+filesystem to be mounted at that point.  On systems that do not
+support O_NOFOLLOW, this will cause @code{find}'s security check to
+fail.
+
+However, this does not normally represent a security problem, since
+the automounter configuration is normally set up by the system
+administrator.  Therefore, if the @code{chdir()} sanity check fails,
+@code{find} will make one more attempt@footnote{This may not be the
+case for the fts-based executable}.  If that succeeds, execution
+carries on as normal.  This is the usual case for automounters.
+
+Where an attacker is trying to exploit a race condition, the problem
+may not have gone away on the second attempt.  If this is the case,
+@code{find} will issue a warning message and then ignore that
+subdirectory.  When this happens, actions such as @samp{-exec} or
+@samp{-print} may already have taken place for the problematic
+subdirectory.  This is because @code{find} applies tests and actions
+to directories before searching within them (unless @samp{-depth} was
+specified).
+
+Because of the nature of the directory-change operation and security
+check, in the worst case the only things that @code{find} would have
+done with the directory are to move into it and back out to the
+original parent.  No operations would have been performed within that
+directory.
+
+@node Race Conditions with -exec
+@subsection Race Conditions with -exec
+
+The @samp{-exec} action causes another program to be run.  It passes
+to the program the name of the file which is being considered at the
+time.  The invoked program will typically then perform some action
+on that file.  Once again, there is a race condition which can be
+exploited here.  We shall take as a specific example the command
+
+@example
+find /tmp -path /tmp/umsp/passwd -exec /bin/rm
+@end example
+
+In this simple example, we are identifying just one file to be deleted
+and invoking @code{/bin/rm} to delete it.  A problem exists because
+there is a time gap between the point where @code{find} decides that
+it needs to process the @samp{-exec} action and the point where the
+@code{/bin/rm} command actually issues the @code{unlink()} system
+call to delete the file from the filesystem.  Within this time period, an attacker can rename the
+@file{/tmp/umsp} directory, replacing it with a symbolic link to
+@file{/etc}.  There is no way for @code{/bin/rm} to determine that it
+is working on the same file that @code{find} had in mind.  Once the
+symbolic link is in place, the attacker has persuaded @code{find} to
+cause the deletion of the @file{/etc/passwd} file, which is not the
+effect intended by the command which was actually invoked.
+
+One possible defence against this type of attack is to modify the
+behaviour of @samp{-exec} so that the @code{/bin/rm} command is run
+with the argument @file{./passwd} and a suitable choice of working
+directory.  This would allow the normal sanity check that @code{find}
+performs to protect against this form of attack too.  Unfortunately,
+this strategy cannot be used as the POSIX standard specifies that the
+current working directory for commands invoked with @samp{-exec} must
+be the same as the current working directory from which @code{find}
+was invoked.  This means that the @samp{-exec} action is inherently
+insecure and can't be fixed.
+
+GNU @code{find} implements a more secure variant of the @samp{-exec}
+action, @samp{-execdir}.  The @samp{-execdir} action
+ensures that it is not necessary to dereference subdirectories to
+process target files.  The current directory used to invoke programs
+is the same as the directory in which the file to be processed exists
+(@file{/tmp/umsp} in our example, and only the basename of the file to
+be processed is passed to the invoked command, with a @samp{./}
+prepended (giving @file{./passwd} in our example).
+
+The @samp{-execdir} action refuses to do anything if the current
+directory is included in the @var{$PATH} environment variable.  This
+is necessary because @samp{-execdir} runs programs in the same
+directory in which it finds files -- in general, such a directory
+might be writable by untrusted users.  For similar reasons,
+@samp{-execdir} does not allow @samp{@{@}} to appear in the name of
+the command to be run.
+
+@node Race Conditions with -print and -print0
+@subsection Race Conditions with -print and -print0
+
+The @samp{-print} and @samp{-print0} actions can be used to produce a
+list of files matching some criteria, which can then be used with some
+other command, perhaps with @code{xargs}.  Unfortunately, this means
+that there is an unavoidable time gap between @code{find} deciding
+that one or more files meet its criteria and the relevant command
+being executed.  For this reason, the @samp{-print} and @samp{-print0}
+actions are just as insecure as @samp{-exec}.
+
+In fact, since the construction
+
+@example
+find @dots{}  -print | xargs @enddots{}
+@end example
+
+does not cope correctly with newlines or other ``white space'' in
+file names, and copes poorly with file names containing quotes, the
+@samp{-print} action is less secure even than @samp{-print0}.
+
+
+@comment  node-name,  next,  previous,  up
+@comment @node Security Considerations for xargs
+@node Security Considerations for xargs
+@section Security Considerations for @code{xargs}
+
+The description of the race conditions affecting the @samp{-print}
+action of @code{find} shows that @code{xargs} cannot be secure if it
+is possible for an attacker to modify a filesystem after @code{find}
+has started but before @code{xargs} has completed all its actions.
+
+However, there are other security issues that exist even if it is not
+possible for an attacker to have access to the filesystem in real
+time.  Firstly, if it is possible for an attacker to create files with
+names of their choice on the filesystem, then @code{xargs} is
+insecure unless the @samp{-0} option is used.  If a file with the name
+@file{/home/someuser/foo/bar\n/etc/passwd} exists (assume that
+@samp{\n} stands for a newline character), then @code{find @dots{} -print}
+can be persuaded to print three separate lines:
+
+@example
+/home/someuser/foo/bar
+
+/etc/passwd
+@end example
+
+If it finds a blank line in the input, @code{xargs} will ignore it.
+Therefore, if some action is to be taken on the basis of this list of
+files, the @file{/etc/passwd} file would be included even if this was
+not the intent of the person running find.  There are circumstances in
+which an attacker can use this to their advantage.  The same
+consideration applies to file names containing ordinary spaces rather
+than newlines, except that of course the list of file names will no
+longer contain an ``extra'' newline.
+
+This problem is an unavoidable consequence of the default behaviour of
+the @code{xargs} command, which is specified by the POSIX standard.
+The only ways to avoid this problem are either to avoid all use of
+@code{xargs} in favour for example of @samp{find -exec} or (where
+available) @samp{find -execdir}, or to use the @samp{-0} option, which
+ensures that @code{xargs} considers file names to be separated by
+ASCII NUL characters rather than whitespace.  However, useful as this
+option is, the POSIX standard does not make it mandatory.
+
+POSIX also specifies that @code{xargs} interprets quoting and trailing
+whitespace specially in filenames, too.  This means that using
+@code{find ... -print | xargs ...} can cause the commands run by
+@code{xargs} to receive a list of file names which is not the same as
+the list printed by @code{find}.   The interpretation of quotes and
+trailing whitespace is turned off by the @samp{-0} argument to
+@code{xargs}, which is another reason to use that option.
+
+@comment  node-name,  next,  previous,  up
+@node Security Considerations for locate
+@section Security Considerations for @code{locate}
+
+@subsection Race Conditions
+It is fairly unusual for the output of @code{locate} to be fed into
+another command.  However, if this were to be done, this would raise
+the same set of security issues as the use of @samp{find @dots{} -print}.
+Although the problems relating to whitespace in file names can be
+resolved by using @code{locate}'s @samp{-0} option, this still leaves
+the race condition problems associated with @samp{find @dots{} -print0}.
+There is no way to avoid these problems in the case of @code{locate}.
+
+@subsection Long File Name Bugs with Old-Format Databases
+Old versions of @code{locate} have a bug in the way that old-format
+databases are read.  This bug affects the following versions of
+@code{locate}:
+
+@enumerate
+@item All releases prior to 4.2.31
+@item All 4.3.x releases prior to 4.3.7
+@end enumerate
+
+The affected versions of @code{locate} read file names into a
+fixed-length 1026 byte buffer, allocated on the heap.  This buffer is
+not extended if file names are too long to fit into the buffer.  No
+range checking on the length of the filename is performed.  This could
+in theory lead to a privilege escalation attack.  Findutils versions
+4.3.0 to 4.3.6 are also affected.
+
+On systems using the old database format and affected versions of
+@code{locate}, carefully-chosen long file names could in theory allow
+malicious users to run code of their choice as any user invoking
+locate.
+
+If remote users can choose the names of files stored on your system,
+and these files are indexed by @code{updatedb}, this may be a remote
+security vulnerability.  Findutils version 4.2.31 and findutils
+version 4.3.7 include fixes for this problem.  The @code{updatedb},
+@code{bigram} and @code{code} programs do no appear to be affected.
+
+If you are also using GNU coreutils, you can use the following command
+to determine the length of the longest file name on a given system:
+
+@example
+find / -print0 | tr -c '\0' 'x' | tr '\0' '\n' | wc -L
+@end example
+
+Although this problem is significant, the old database format is not
+the default, and use of the old database format is not common.  Most
+installations and most users will not be affected by this problem.
+
+
+
+@node Security Summary
+@section Summary
+
+Where untrusted parties can create files on the system, or affect the
+names of files that are created, all uses for @code{find},
+@code{locate} and @code{xargs} have known security problems except the
+following:
+
+@table @asis
+@item Informational use only
+Uses where the programs are used to prepare lists of file names upon
+which no further action will ever be taken.
+
+@item @samp{-delete}
+Use of the @samp{-delete} action with @code{find} to delete files
+which meet specified criteria
+
+@item @samp{-execdir}
+Use of the @samp{-execdir} action with @code{find} where the
+@env{PATH} environment variable contains directories which contain
+only trusted programs.
+@end table
+
+
+@node Further Reading on Security
+@section Further Reading on Security
+
+While there are a number of books on computer security, there are also
+useful articles on the web that touch on the issues described above:
+
+@table @url
+@item http://goo.gl/DAvh
+@c https://www.securecoding.cert.org/confluence/display/seccode/MSC09-C.+Character+Encoding+-+Use+Subset+of+ASCII+for+Safety
+This article describes some of the unfortunate effects of allowing
+free choice of file names.
+@item http://cwe.mitre.org/data/definitions/78.html
+Describes OS Command Injection
+@item https://cwe.mitre.org/data/definitions/73.html
+Describes problems arising from allowing remote computers to send
+requests which specify file names of their choice
+@item http://cwe.mitre.org/data/definitions/116.html
+Describes problems relating to encoding file names and escaping
+characters.  This article is relevant to findutils because for command
+lines processed via the shell, the encoding and escaping rules are
+already set by the shell.   For example command lines like @code{find
+... -print | some-shell-script} require specific care.
+@item http://xkcd.com/327/
+A humorous and pithy summary of the broader problem.
+@end table
+
+@comment  node-name,  next,  previous,  up
+@node Error Messages
+@chapter Error Messages
+
+This section describes some of the error messages sometimes made by
+@code{find}, @code{xargs}, or @code{locate}, explains them and in some
+cases provides advice as to what you should do about this.
+
+This manual is written in English.  The GNU findutils software
+features translations of error messages for many languages.  For this
+reason the error messages produced by the programs are made to be as
+self-explanatory as possible.  This approach avoids leaving people to
+figure out which test an English-language error message corresponds
+to.  Error messages which are self-explanatory will not normally be
+mentioned in this document.  For those messages mentioned in this
+document, only the English-language version of the message will be
+listed.
+
+@menu
+* Error Messages From find::
+* Error Messages From xargs::
+* Error Messages From locate::
+* Error Messages From updatedb::
+@end menu
+
+@node Error Messages From find
+@section Error Messages From @code{find}
+
+Most error messages produced by find are self-explanatory.  Error
+messages sometimes include a filename.  When this happens, the
+filename is quoted in order to prevent any unusual characters in the
+filename making unwanted changes in the state of the terminal.
+
+@table @samp
+@item invalid predicate `-foo'
+This means that the @code{find} command line included something that
+started with a dash or other special character.  The @code{find}
+program tried to interpret this as a test, action or option, but
+didn't recognise it.  If it was intended to be a test, check what was
+specified against the documentation.  If, on the other hand, the
+string is the name of a file which has been expanded from a wildcard
+(for example because you have a @samp{*} on the command line),
+consider using @samp{./*} or just @samp{.} instead.
+
+@item unexpected extra predicate
+This usually happens if you have an extra bracket on the command line
+(for example @samp{find . -print \)}).
+
+@item Warning: filesystem /path/foo has recently been mounted
+@itemx Warning: filesystem /path/foo has recently been unmounted
+These messages might appear when @code{find} moves into a directory
+and finds that the device number and inode are different from what it
+expected them to be.  If the directory @code{find} has moved into is
+on an network filesystem (NFS), it will not issue this message, because
+@code{automount} frequently mounts new filesystems on directories as
+you move into them (that is how it knows you want to use the
+filesystem).  So, if you do see this message, be wary ---
+@code{automount} may not have been responsible.  Consider the
+possibility that someone else is manipulating the filesystem while
+@code{find} is running.  Some people might do this in order to mislead
+@code{find} or persuade it to look at one set of files when it thought
+it was looking at another set.
+
+@item /path/foo changed during execution of find (old device number 12345, new device number 6789, filesystem type is <whatever>) [ref XXX]
+This message is issued when @code{find} moves into a directory and ends up
+somewhere it didn't expect to be.  This happens in one of two
+circumstances.  Firstly, this happens when @code{automount} intervenes
+on a system where @code{find} doesn't know how to determine what
+the current set of mounted filesystems is.
+
+Secondly, this can happen when the device number of a directory
+appears to change during a change of current directory, but
+@code{find} is moving up the filesystem hierarchy rather than down into it.
+In order to prevent @code{find} wandering off into some unexpected
+part of the filesystem, we stop it at this point.
+
+@item Don't know how to use getmntent() to read `/etc/mtab'.  This is a bug.
+This message is issued when a problem similar to the above occurs on a
+system where @code{find} doesn't know how to figure out the current
+list of mount points.  Ask for help on @email{bug-findutils@@gnu.org}.
+
+@item /path/foo/bar changed during execution of find (old inode number 12345, new inode number 67893, filesystem type is <whatever>) [ref XXX]"),
+This message is issued when @code{find} moves into a directory and
+discovers that the inode number of that directory
+is different from the inode number that it obtained when it examined the
+directory previously.  This usually means that while
+@code{find} was deep in a directory hierarchy doing a
+time consuming operation, somebody has moved one of the parent directories to
+another location in the same filesystem.  This may or may not have been done
+maliciously.  In any case, @code{find} stops at this point
+to avoid traversing parts of the filesystem that it wasn't
+intended to.  You can use @code{ls -li} or @code{find /path -inum
+12345 -o -inum 67893} to find out more about what has happened.
+
+@item sanity check of the fnmatch() library function failed.
+Please submit a bug report.  You may well be asked questions about
+your system, and if you compiled the @code{findutils} code yourself,
+you should keep your copy of the build tree around.  The likely
+explanation is that your system has a buggy implementation of
+@code{fnmatch} that looks enough like the GNU version to fool
+@code{configure}, but which doesn't work properly.
+
+@item cannot fork
+This normally happens if you use the @code{-exec} action or
+something similar (@code{-ok} and so forth) but the system has run out
+of free process slots.  This is either because the system is very busy
+and the system has reached its maximum process limit, or because you
+have a resource limit in place and you've reached it.  Check the
+system for runaway processes (with @code{ps}, if possible).  Some process
+slots are normally reserved for use by @samp{root}.
+
+@item some-program terminated by signal 99
+Some program which was launched with @code{-exec} or similar was killed
+with a fatal signal.  This is just an advisory message.
+@end table
+
+
+@node Error Messages From xargs
+@section Error Messages From xargs
+
+@table @samp
+@item environment is too large for exec
+This message means that you have so many environment variables set (or
+such large values for them) that there is no room within the
+system-imposed limits on program command line argument length to
+invoke any program.  This is an unlikely situation and is more likely
+result of an attempt to test the limits of @code{xargs}, or break it.
+Please try unsetting some environment variables, or exiting the
+current shell.  You can also use @samp{xargs --show-limits} to
+understand the relevant sizes.
+
+@item can not fit single argument within argument list size limit
+You are using the @samp{-I} option and @code{xargs} doesn't have
+enough space to build a command line because it has read a really
+large item and it doesn't fit.  You can probably work around this
+problem with the @samp{-s} option, but the default size is pretty
+large.  This is a rare situation and is more likely an attempt to test
+the limits of @code{xargs}, or break it.  Otherwise, you will need to
+try to shorten the problematic argument or not use @code{xargs}.
+
+@item cannot fork
+See the description of the similar message for @code{find}.
+
+@item <program>: exited with status 255; aborting
+When a command run by @code{xargs} exits with status 255, @code{xargs}
+is supposed to stop.  If this is not what you intended, wrap the
+program you are trying to invoke in a shell script which doesn't
+return status 255.
+
+@item <program>: terminated by signal 99
+See the description of the similar message for @code{find}.
+
+@item cannot set SIGUSR1 signal handler
+@code{xargs} is having trouble preparing for you to be able to send it
+signals to increase or decrease the parallelism of its processing.
+If you don't plan to send it those signals, this warning can be ignored
+(though if you're a programmer, you may want to help us figure out
+why @code{xargs} is confused by your operating system).
+@end table
+
+@node Error Messages From locate
+@section Error Messages From @code{locate}
+
+@table @samp
+@item warning: database @file{@value{LOCATE_DB}} is more than 8 days old
+The @code{locate} program relies on a database which is periodically
+built by the @code{updatedb} program.  That hasn't happened in a long
+time.  To fix this problem, run @code{updatedb} manually.  This can
+often happen on systems that are generally not left on, so the
+periodic ``cron'' task which normally does this doesn't get a chance
+to run.
+
+@item locate database @file{@value{LOCATE_DB}} is corrupt or invalid
+This should not happen.  Re-run @code{updatedb}.  If that works, but
+@code{locate} still produces this error, run @code{locate --version}
+and @code{updatedb --version}.  These should produce the same output.
+If not, you are using a mixed toolset; check your @samp{$PATH}
+environment variable and your shell aliases (if you have any).  If
+both programs claim to be GNU versions, this is a bug; all versions of
+these programs should interoperate without problem.  Ask for help on
+@email{bug-findutils@@gnu.org}.
+@end table
+
+
+@node Error Messages From updatedb
+@section Error Messages From updatedb
+
+The @code{updatedb} program (and the programs it invokes) do issue
+error messages, but none seem to be candidates for guidance.  If
+you are having a problem understanding one of these, ask for help on
+@email{bug-findutils@@gnu.org}.
+
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+@include fdl.texi
+
+@node Primary Index
+@unnumbered @code{find} Primary Index
+
+This is a list of all of the primaries (tests, actions, and options)
+that make up @code{find} expressions for selecting files.  @xref{find
+Expressions}, for more information on expressions.
+
+@printindex fn
+
+@bye
+
+@comment texi related words used by Emacs' spell checker ispell.el
+
+@comment LocalWords: texinfo setfilename settitle setchapternewpage
+@comment LocalWords: iftex finalout ifinfo DIR titlepage vskip pt
+@comment LocalWords: filll dir samp dfn noindent xref pxref
+@comment LocalWords: var deffn texi deffnx itemx emph asis
+@comment LocalWords: findex smallexample subsubsection cindex
+@comment LocalWords: dircategory direntry itemize
+
+@comment other words used by Emacs' spell checker ispell.el
+@comment LocalWords: README fred updatedb xargs Plett Rendell akefile
+@comment LocalWords: args grep Filesystems fo foo fOo wildcards iname
+@comment LocalWords: ipath regex iregex expr fubar regexps
+@comment LocalWords: metacharacters macs sr sc inode lname ilname
+@comment LocalWords: sysdep noleaf ls inum xdev filesystems usr atime
+@comment LocalWords: ctime mtime amin cmin mmin al daystart Sladkey rm
+@comment LocalWords: anewer cnewer bckw rf xtype uname gname uid gid
+@comment LocalWords: nouser nogroup chown chgrp perm ch maxdepth
+@comment LocalWords: mindepth cpio src CD AFS statted stat fstype ufs
+@comment LocalWords: nfs tmp mfs printf fprint dils rw djm Nov lwall
+@comment LocalWords: POSIXLY fls fprintf strftime locale's EDT GMT AP
+@comment LocalWords: EST diff perl backquotes sprintf Falstad Oct cron
+@comment LocalWords: eg vmunix mkdir afs allexec allwrite ARG bigram
+@comment LocalWords: bigrams cd chmod comp crc CVS dbfile dum eof
+@comment LocalWords: fileserver filesystem fn frcode Ghazi Hnewc iXX
+@comment LocalWords: joeuser Kaveh localpaths localuser LOGNAME
+@comment LocalWords: Meyering mv netpaths netuser nonblank nonblanks
+@comment LocalWords: ois ok Pinard printindex proc procs prunefs
+@comment LocalWords: prunepaths pwd RFS rmadillo rmdir rsh sbins str
+@comment LocalWords: su Timar ubins ug unstripped vf VM Weitzel
+@comment LocalWords: wildcard zlogout basename execdir wholename iwholename
+@comment LocalWords: timestamp timestamps Solaris FreeBSD OpenBSD POSIX
diff --git a/doc/mdate-sh b/doc/mdate-sh
new file mode 100755 (executable)
index 0000000..683d007
--- /dev/null
@@ -0,0 +1,225 @@
+#!/bin/sh
+# Get modification time of a file or directory and pretty-print it.
+
+scriptversion=2010-08-21.06; # UTC
+
+# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010
+# Free Software Foundation, Inc.
+# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
+#
+# 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, 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/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+fi
+
+case $1 in
+  '')
+     echo "$0: No file.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: mdate-sh [--help] [--version] FILE
+
+Pretty-print the modification day of FILE, in the format:
+1 January 1970
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "mdate-sh $scriptversion"
+    exit $?
+    ;;
+esac
+
+error ()
+{
+  echo "$0: $1" >&2
+  exit 1
+}
+
+
+# Prevent date giving response in another language.
+LANG=C
+export LANG
+LC_ALL=C
+export LC_ALL
+LC_TIME=C
+export LC_TIME
+
+# GNU ls changes its time format in response to the TIME_STYLE
+# variable.  Since we cannot assume `unset' works, revert this
+# variable to its documented default.
+if test "${TIME_STYLE+set}" = set; then
+  TIME_STYLE=posix-long-iso
+  export TIME_STYLE
+fi
+
+save_arg1=$1
+
+# Find out how to get the extended ls output of a file or directory.
+if ls -L /dev/null 1>/dev/null 2>&1; then
+  ls_command='ls -L -l -d'
+else
+  ls_command='ls -l -d'
+fi
+# Avoid user/group names that might have spaces, when possible.
+if ls -n /dev/null 1>/dev/null 2>&1; then
+  ls_command="$ls_command -n"
+fi
+
+# A `ls -l' line looks as follows on OS/2.
+#  drwxrwx---        0 Aug 11  2001 foo
+# This differs from Unix, which adds ownership information.
+#  drwxrwx---   2 root  root      4096 Aug 11  2001 foo
+#
+# To find the date, we split the line on spaces and iterate on words
+# until we find a month.  This cannot work with files whose owner is a
+# user named `Jan', or `Feb', etc.  However, it's unlikely that `/'
+# will be owned by a user whose name is a month.  So we first look at
+# the extended ls output of the root directory to decide how many
+# words should be skipped to get the date.
+
+# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
+set x`$ls_command /`
+
+# Find which argument is the month.
+month=
+command=
+until test $month
+do
+  test $# -gt 0 || error "failed parsing \`$ls_command /' output"
+  shift
+  # Add another shift to the command.
+  command="$command shift;"
+  case $1 in
+    Jan) month=January; nummonth=1;;
+    Feb) month=February; nummonth=2;;
+    Mar) month=March; nummonth=3;;
+    Apr) month=April; nummonth=4;;
+    May) month=May; nummonth=5;;
+    Jun) month=June; nummonth=6;;
+    Jul) month=July; nummonth=7;;
+    Aug) month=August; nummonth=8;;
+    Sep) month=September; nummonth=9;;
+    Oct) month=October; nummonth=10;;
+    Nov) month=November; nummonth=11;;
+    Dec) month=December; nummonth=12;;
+  esac
+done
+
+test -n "$month" || error "failed parsing \`$ls_command /' output"
+
+# Get the extended ls output of the file or directory.
+set dummy x`eval "$ls_command \"\\\$save_arg1\""`
+
+# Remove all preceding arguments
+eval $command
+
+# Because of the dummy argument above, month is in $2.
+#
+# On a POSIX system, we should have
+#
+# $# = 5
+# $1 = file size
+# $2 = month
+# $3 = day
+# $4 = year or time
+# $5 = filename
+#
+# On Darwin 7.7.0 and 7.6.0, we have
+#
+# $# = 4
+# $1 = day
+# $2 = month
+# $3 = year or time
+# $4 = filename
+
+# Get the month.
+case $2 in
+  Jan) month=January; nummonth=1;;
+  Feb) month=February; nummonth=2;;
+  Mar) month=March; nummonth=3;;
+  Apr) month=April; nummonth=4;;
+  May) month=May; nummonth=5;;
+  Jun) month=June; nummonth=6;;
+  Jul) month=July; nummonth=7;;
+  Aug) month=August; nummonth=8;;
+  Sep) month=September; nummonth=9;;
+  Oct) month=October; nummonth=10;;
+  Nov) month=November; nummonth=11;;
+  Dec) month=December; nummonth=12;;
+esac
+
+case $3 in
+  ???*) day=$1;;
+  *) day=$3; shift;;
+esac
+
+# Here we have to deal with the problem that the ls output gives either
+# the time of day or the year.
+case $3 in
+  *:*) set `date`; eval year=\$$#
+       case $2 in
+        Jan) nummonthtod=1;;
+        Feb) nummonthtod=2;;
+        Mar) nummonthtod=3;;
+        Apr) nummonthtod=4;;
+        May) nummonthtod=5;;
+        Jun) nummonthtod=6;;
+        Jul) nummonthtod=7;;
+        Aug) nummonthtod=8;;
+        Sep) nummonthtod=9;;
+        Oct) nummonthtod=10;;
+        Nov) nummonthtod=11;;
+        Dec) nummonthtod=12;;
+       esac
+       # For the first six month of the year the time notation can also
+       # be used for files modified in the last year.
+       if (expr $nummonth \> $nummonthtod) > /dev/null;
+       then
+        year=`expr $year - 1`
+       fi;;
+  *) year=$3;;
+esac
+
+# The result.
+echo $day $month $year
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/doc/parse-datetime.texi b/doc/parse-datetime.texi
new file mode 100644 (file)
index 0000000..2f1ab34
--- /dev/null
@@ -0,0 +1,563 @@
+@c GNU date syntax documentation
+
+@c Copyright (C) 1994-2006, 2009-2011 Free Software Foundation, Inc.
+
+@c Permission is granted to copy, distribute and/or modify this document
+@c under the terms of the GNU Free Documentation License, Version 1.3 or
+@c any later version published by the Free Software Foundation; with no
+@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+@c Texts.  A copy of the license is included in the ``GNU Free
+@c Documentation License'' file as part of this distribution.
+
+@node Date input formats
+@chapter Date input formats
+
+@cindex date input formats
+@findex parse_datetime
+
+First, a quote:
+
+@quotation
+Our units of temporal measurement, from seconds on up to months, are so
+complicated, asymmetrical and disjunctive so as to make coherent mental
+reckoning in time all but impossible.  Indeed, had some tyrannical god
+contrived to enslave our minds to time, to make it all but impossible
+for us to escape subjection to sodden routines and unpleasant surprises,
+he could hardly have done better than handing down our present system.
+It is like a set of trapezoidal building blocks, with no vertical or
+horizontal surfaces, like a language in which the simplest thought
+demands ornate constructions, useless particles and lengthy
+circumlocutions.  Unlike the more successful patterns of language and
+science, which enable us to face experience boldly or at least
+level-headedly, our system of temporal calculation silently and
+persistently encourages our terror of time.
+
+@dots{}  It is as though architects had to measure length in feet, width
+in meters and height in ells; as though basic instruction manuals
+demanded a knowledge of five different languages.  It is no wonder then
+that we often look into our own immediate past or future, last Tuesday
+or a week from Sunday, with feelings of helpless confusion.  @dots{}
+
+--- Robert Grudin, @cite{Time and the Art of Living}.
+@end quotation
+
+This section describes the textual date representations that @sc{gnu}
+programs accept.  These are the strings you, as a user, can supply as
+arguments to the various programs.  The C interface (via the
+@code{parse_datetime} function) is not described here.
+
+@menu
+* General date syntax::            Common rules.
+* Calendar date items::            19 Dec 1994.
+* Time of day items::              9:20pm.
+* Time zone items::                @sc{est}, @sc{pdt}, @sc{gmt}.
+* Day of week items::              Monday and others.
+* Relative items in date strings:: next tuesday, 2 years ago.
+* Pure numbers in date strings::   19931219, 1440.
+* Seconds since the Epoch::        @@1078100502.
+* Specifying time zone rules::     TZ="America/New_York", TZ="UTC0".
+* Authors of parse_datetime::      Bellovin, Eggert, Salz, Berets, et al.
+@end menu
+
+
+@node General date syntax
+@section General date syntax
+
+@cindex general date syntax
+
+@cindex items in date strings
+A @dfn{date} is a string, possibly empty, containing many items
+separated by whitespace.  The whitespace may be omitted when no
+ambiguity arises.  The empty string means the beginning of today (i.e.,
+midnight).  Order of the items is immaterial.  A date string may contain
+many flavors of items:
+
+@itemize @bullet
+@item calendar date items
+@item time of day items
+@item time zone items
+@item day of the week items
+@item relative items
+@item pure numbers.
+@end itemize
+
+@noindent We describe each of these item types in turn, below.
+
+@cindex numbers, written-out
+@cindex ordinal numbers
+@findex first @r{in date strings}
+@findex next @r{in date strings}
+@findex last @r{in date strings}
+A few ordinal numbers may be written out in words in some contexts.  This is
+most useful for specifying day of the week items or relative items (see
+below).  Among the most commonly used ordinal numbers, the word
+@samp{last} stands for @math{-1}, @samp{this} stands for 0, and
+@samp{first} and @samp{next} both stand for 1.  Because the word
+@samp{second} stands for the unit of time there is no way to write the
+ordinal number 2, but for convenience @samp{third} stands for 3,
+@samp{fourth} for 4, @samp{fifth} for 5,
+@samp{sixth} for 6, @samp{seventh} for 7, @samp{eighth} for 8,
+@samp{ninth} for 9, @samp{tenth} for 10, @samp{eleventh} for 11 and
+@samp{twelfth} for 12.
+
+@cindex months, written-out
+When a month is written this way, it is still considered to be written
+numerically, instead of being ``spelled in full''; this changes the
+allowed strings.
+
+@cindex language, in dates
+In the current implementation, only English is supported for words and
+abbreviations like @samp{AM}, @samp{DST}, @samp{EST}, @samp{first},
+@samp{January}, @samp{Sunday}, @samp{tomorrow}, and @samp{year}.
+
+@cindex language, in dates
+@cindex time zone item
+The output of the @command{date} command
+is not always acceptable as a date string,
+not only because of the language problem, but also because there is no
+standard meaning for time zone items like @samp{IST}.  When using
+@command{date} to generate a date string intended to be parsed later,
+specify a date format that is independent of language and that does not
+use time zone items other than @samp{UTC} and @samp{Z}.  Here are some
+ways to do this:
+
+@example
+$ LC_ALL=C TZ=UTC0 date
+Mon Mar  1 00:21:42 UTC 2004
+$ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ'
+2004-03-01 00:21:42Z
+$ date --iso-8601=ns | tr T ' '  # --iso-8601 is a GNU extension.
+2004-02-29 16:21:42,692722128-0800
+$ date --rfc-2822  # a GNU extension
+Sun, 29 Feb 2004 16:21:42 -0800
+$ date +'%Y-%m-%d %H:%M:%S %z'  # %z is a GNU extension.
+2004-02-29 16:21:42 -0800
+$ date +'@@%s.%N'  # %s and %N are GNU extensions.
+@@1078100502.692722128
+@end example
+
+@cindex case, ignored in dates
+@cindex comments, in dates
+Alphabetic case is completely ignored in dates.  Comments may be introduced
+between round parentheses, as long as included parentheses are properly
+nested.  Hyphens not followed by a digit are currently ignored.  Leading
+zeros on numbers are ignored.
+
+Invalid dates like @samp{2005-02-29} or times like @samp{24:00} are
+rejected.  In the typical case of a host that does not support leap
+seconds, a time like @samp{23:59:60} is rejected even if it
+corresponds to a valid leap second.
+
+
+@node Calendar date items
+@section Calendar date items
+
+@cindex calendar date item
+
+A @dfn{calendar date item} specifies a day of the year.  It is
+specified differently, depending on whether the month is specified
+numerically or literally.  All these strings specify the same calendar date:
+
+@example
+1972-09-24     # @sc{iso} 8601.
+72-9-24        # Assume 19xx for 69 through 99,
+               # 20xx for 00 through 68.
+72-09-24       # Leading zeros are ignored.
+9/24/72        # Common U.S. writing.
+24 September 1972
+24 Sept 72     # September has a special abbreviation.
+24 Sep 72      # Three-letter abbreviations always allowed.
+Sep 24, 1972
+24-sep-72
+24sep72
+@end example
+
+The year can also be omitted.  In this case, the last specified year is
+used, or the current year if none.  For example:
+
+@example
+9/24
+sep 24
+@end example
+
+Here are the rules.
+
+@cindex @sc{iso} 8601 date format
+@cindex date format, @sc{iso} 8601
+For numeric months, the @sc{iso} 8601 format
+@samp{@var{year}-@var{month}-@var{day}} is allowed, where @var{year} is
+any positive number, @var{month} is a number between 01 and 12, and
+@var{day} is a number between 01 and 31.  A leading zero must be present
+if a number is less than ten.  If @var{year} is 68 or smaller, then 2000
+is added to it; otherwise, if @var{year} is less than 100,
+then 1900 is added to it.  The construct
+@samp{@var{month}/@var{day}/@var{year}}, popular in the United States,
+is accepted.  Also @samp{@var{month}/@var{day}}, omitting the year.
+
+@cindex month names in date strings
+@cindex abbreviations for months
+Literal months may be spelled out in full: @samp{January},
+@samp{February}, @samp{March}, @samp{April}, @samp{May}, @samp{June},
+@samp{July}, @samp{August}, @samp{September}, @samp{October},
+@samp{November} or @samp{December}.  Literal months may be abbreviated
+to their first three letters, possibly followed by an abbreviating dot.
+It is also permitted to write @samp{Sept} instead of @samp{September}.
+
+When months are written literally, the calendar date may be given as any
+of the following:
+
+@example
+@var{day} @var{month} @var{year}
+@var{day} @var{month}
+@var{month} @var{day} @var{year}
+@var{day}-@var{month}-@var{year}
+@end example
+
+Or, omitting the year:
+
+@example
+@var{month} @var{day}
+@end example
+
+
+@node Time of day items
+@section Time of day items
+
+@cindex time of day item
+
+A @dfn{time of day item} in date strings specifies the time on a given
+day.  Here are some examples, all of which represent the same time:
+
+@example
+20:02:00.000000
+20:02
+8:02pm
+20:02-0500      # In @sc{est} (U.S. Eastern Standard Time).
+@end example
+
+More generally, the time of day may be given as
+@samp{@var{hour}:@var{minute}:@var{second}}, where @var{hour} is
+a number between 0 and 23, @var{minute} is a number between 0 and
+59, and @var{second} is a number between 0 and 59 possibly followed by
+@samp{.} or @samp{,} and a fraction containing one or more digits.
+Alternatively,
+@samp{:@var{second}} can be omitted, in which case it is taken to
+be zero.  On the rare hosts that support leap seconds, @var{second}
+may be 60.
+
+@findex am @r{in date strings}
+@findex pm @r{in date strings}
+@findex midnight @r{in date strings}
+@findex noon @r{in date strings}
+If the time is followed by @samp{am} or @samp{pm} (or @samp{a.m.}
+or @samp{p.m.}), @var{hour} is restricted to run from 1 to 12, and
+@samp{:@var{minute}} may be omitted (taken to be zero).  @samp{am}
+indicates the first half of the day, @samp{pm} indicates the second
+half of the day.  In this notation, 12 is the predecessor of 1:
+midnight is @samp{12am} while noon is @samp{12pm}.
+(This is the zero-oriented interpretation of @samp{12am} and @samp{12pm},
+as opposed to the old tradition derived from Latin
+which uses @samp{12m} for noon and @samp{12pm} for midnight.)
+
+@cindex time zone correction
+@cindex minutes, time zone correction by
+The time may alternatively be followed by a time zone correction,
+expressed as @samp{@var{s}@var{hh}@var{mm}}, where @var{s} is @samp{+}
+or @samp{-}, @var{hh} is a number of zone hours and @var{mm} is a number
+of zone minutes.
+The zone minutes term, @var{mm}, may be omitted, in which case
+the one- or two-digit correction is interpreted as a number of hours.
+You can also separate @var{hh} from @var{mm} with a colon.
+When a time zone correction is given this way, it
+forces interpretation of the time relative to
+Coordinated Universal Time (@sc{utc}), overriding any previous
+specification for the time zone or the local time zone.  For example,
+@samp{+0530} and @samp{+05:30} both stand for the time zone 5.5 hours
+ahead of @sc{utc} (e.g., India).
+This is the best way to
+specify a time zone correction by fractional parts of an hour.
+The maximum zone correction is 24 hours.
+
+Either @samp{am}/@samp{pm} or a time zone correction may be specified,
+but not both.
+
+
+@node Time zone items
+@section Time zone items
+
+@cindex time zone item
+
+A @dfn{time zone item} specifies an international time zone, indicated
+by a small set of letters, e.g., @samp{UTC} or @samp{Z}
+for Coordinated Universal
+Time.  Any included periods are ignored.  By following a
+non-daylight-saving time zone by the string @samp{DST} in a separate
+word (that is, separated by some white space), the corresponding
+daylight saving time zone may be specified.
+Alternatively, a non-daylight-saving time zone can be followed by a
+time zone correction, to add the two values.  This is normally done
+only for @samp{UTC}; for example, @samp{UTC+05:30} is equivalent to
+@samp{+05:30}.
+
+Time zone items other than @samp{UTC} and @samp{Z}
+are obsolescent and are not recommended, because they
+are ambiguous; for example, @samp{EST} has a different meaning in
+Australia than in the United States.  Instead, it's better to use
+unambiguous numeric time zone corrections like @samp{-0500}, as
+described in the previous section.
+
+If neither a time zone item nor a time zone correction is supplied,
+time stamps are interpreted using the rules of the default time zone
+(@pxref{Specifying time zone rules}).
+
+
+@node Day of week items
+@section Day of week items
+
+@cindex day of week item
+
+The explicit mention of a day of the week will forward the date
+(only if necessary) to reach that day of the week in the future.
+
+Days of the week may be spelled out in full: @samp{Sunday},
+@samp{Monday}, @samp{Tuesday}, @samp{Wednesday}, @samp{Thursday},
+@samp{Friday} or @samp{Saturday}.  Days may be abbreviated to their
+first three letters, optionally followed by a period.  The special
+abbreviations @samp{Tues} for @samp{Tuesday}, @samp{Wednes} for
+@samp{Wednesday} and @samp{Thur} or @samp{Thurs} for @samp{Thursday} are
+also allowed.
+
+@findex next @var{day}
+@findex last @var{day}
+A number may precede a day of the week item to move forward
+supplementary weeks.  It is best used in expression like @samp{third
+monday}.  In this context, @samp{last @var{day}} or @samp{next
+@var{day}} is also acceptable; they move one week before or after
+the day that @var{day} by itself would represent.
+
+A comma following a day of the week item is ignored.
+
+
+@node Relative items in date strings
+@section Relative items in date strings
+
+@cindex relative items in date strings
+@cindex displacement of dates
+
+@dfn{Relative items} adjust a date (or the current date if none) forward
+or backward.  The effects of relative items accumulate.  Here are some
+examples:
+
+@example
+1 year
+1 year ago
+3 years
+2 days
+@end example
+
+@findex year @r{in date strings}
+@findex month @r{in date strings}
+@findex fortnight @r{in date strings}
+@findex week @r{in date strings}
+@findex day @r{in date strings}
+@findex hour @r{in date strings}
+@findex minute @r{in date strings}
+The unit of time displacement may be selected by the string @samp{year}
+or @samp{month} for moving by whole years or months.  These are fuzzy
+units, as years and months are not all of equal duration.  More precise
+units are @samp{fortnight} which is worth 14 days, @samp{week} worth 7
+days, @samp{day} worth 24 hours, @samp{hour} worth 60 minutes,
+@samp{minute} or @samp{min} worth 60 seconds, and @samp{second} or
+@samp{sec} worth one second.  An @samp{s} suffix on these units is
+accepted and ignored.
+
+@findex ago @r{in date strings}
+The unit of time may be preceded by a multiplier, given as an optionally
+signed number.  Unsigned numbers are taken as positively signed.  No
+number at all implies 1 for a multiplier.  Following a relative item by
+the string @samp{ago} is equivalent to preceding the unit by a
+multiplier with value @math{-1}.
+
+@findex day @r{in date strings}
+@findex tomorrow @r{in date strings}
+@findex yesterday @r{in date strings}
+The string @samp{tomorrow} is worth one day in the future (equivalent
+to @samp{day}), the string @samp{yesterday} is worth
+one day in the past (equivalent to @samp{day ago}).
+
+@findex now @r{in date strings}
+@findex today @r{in date strings}
+@findex this @r{in date strings}
+The strings @samp{now} or @samp{today} are relative items corresponding
+to zero-valued time displacement, these strings come from the fact
+a zero-valued time displacement represents the current time when not
+otherwise changed by previous items.  They may be used to stress other
+items, like in @samp{12:00 today}.  The string @samp{this} also has
+the meaning of a zero-valued time displacement, but is preferred in
+date strings like @samp{this thursday}.
+
+When a relative item causes the resulting date to cross a boundary
+where the clocks were adjusted, typically for daylight saving time,
+the resulting date and time are adjusted accordingly.
+
+The fuzz in units can cause problems with relative items.  For
+example, @samp{2003-07-31 -1 month} might evaluate to 2003-07-01,
+because 2003-06-31 is an invalid date.  To determine the previous
+month more reliably, you can ask for the month before the 15th of the
+current month.  For example:
+
+@example
+$ date -R
+Thu, 31 Jul 2003 13:02:39 -0700
+$ date --date='-1 month' +'Last month was %B?'
+Last month was July?
+$ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!'
+Last month was June!
+@end example
+
+Also, take care when manipulating dates around clock changes such as
+daylight saving leaps.  In a few cases these have added or subtracted
+as much as 24 hours from the clock, so it is often wise to adopt
+universal time by setting the @env{TZ} environment variable to
+@samp{UTC0} before embarking on calendrical calculations.
+
+@node Pure numbers in date strings
+@section Pure numbers in date strings
+
+@cindex pure numbers in date strings
+
+The precise interpretation of a pure decimal number depends
+on the context in the date string.
+
+If the decimal number is of the form @var{yyyy}@var{mm}@var{dd} and no
+other calendar date item (@pxref{Calendar date items}) appears before it
+in the date string, then @var{yyyy} is read as the year, @var{mm} as the
+month number and @var{dd} as the day of the month, for the specified
+calendar date.
+
+If the decimal number is of the form @var{hh}@var{mm} and no other time
+of day item appears before it in the date string, then @var{hh} is read
+as the hour of the day and @var{mm} as the minute of the hour, for the
+specified time of day.  @var{mm} can also be omitted.
+
+If both a calendar date and a time of day appear to the left of a number
+in the date string, but no relative item, then the number overrides the
+year.
+
+
+@node Seconds since the Epoch
+@section Seconds since the Epoch
+
+If you precede a number with @samp{@@}, it represents an internal time
+stamp as a count of seconds.  The number can contain an internal
+decimal point (either @samp{.} or @samp{,}); any excess precision not
+supported by the internal representation is truncated toward minus
+infinity.  Such a number cannot be combined with any other date
+item, as it specifies a complete time stamp.
+
+@cindex beginning of time, for @acronym{POSIX}
+@cindex epoch, for @acronym{POSIX}
+Internally, computer times are represented as a count of seconds since
+an epoch---a well-defined point of time.  On @acronym{GNU} and
+@acronym{POSIX} systems, the epoch is 1970-01-01 00:00:00 @sc{utc}, so
+@samp{@@0} represents this time, @samp{@@1} represents 1970-01-01
+00:00:01 @sc{utc}, and so forth.  @acronym{GNU} and most other
+@acronym{POSIX}-compliant systems support such times as an extension
+to @acronym{POSIX}, using negative counts, so that @samp{@@-1}
+represents 1969-12-31 23:59:59 @sc{utc}.
+
+Traditional Unix systems count seconds with 32-bit two's-complement
+integers and can represent times from 1901-12-13 20:45:52 through
+2038-01-19 03:14:07 @sc{utc}.  More modern systems use 64-bit counts
+of seconds with nanosecond subcounts, and can represent all the times
+in the known lifetime of the universe to a resolution of 1 nanosecond.
+
+On most hosts, these counts ignore the presence of leap seconds.
+For example, on most hosts @samp{@@915148799} represents 1998-12-31
+23:59:59 @sc{utc}, @samp{@@915148800} represents 1999-01-01 00:00:00
+@sc{utc}, and there is no way to represent the intervening leap second
+1998-12-31 23:59:60 @sc{utc}.
+
+@node Specifying time zone rules
+@section Specifying time zone rules
+
+@vindex TZ
+Normally, dates are interpreted using the rules of the current time
+zone, which in turn are specified by the @env{TZ} environment
+variable, or by a system default if @env{TZ} is not set.  To specify a
+different set of default time zone rules that apply just to one date,
+start the date with a string of the form @samp{TZ="@var{rule}"}.  The
+two quote characters (@samp{"}) must be present in the date, and any
+quotes or backslashes within @var{rule} must be escaped by a
+backslash.
+
+For example, with the @acronym{GNU} @command{date} command you can
+answer the question ``What time is it in New York when a Paris clock
+shows 6:30am on October 31, 2004?'' by using a date beginning with
+@samp{TZ="Europe/Paris"} as shown in the following shell transcript:
+
+@example
+$ export TZ="America/New_York"
+$ date --date='TZ="Europe/Paris" 2004-10-31 06:30'
+Sun Oct 31 01:30:00 EDT 2004
+@end example
+
+In this example, the @option{--date} operand begins with its own
+@env{TZ} setting, so the rest of that operand is processed according
+to @samp{Europe/Paris} rules, treating the string @samp{2004-10-31
+06:30} as if it were in Paris.  However, since the output of the
+@command{date} command is processed according to the overall time zone
+rules, it uses New York time.  (Paris was normally six hours ahead of
+New York in 2004, but this example refers to a brief Halloween period
+when the gap was five hours.)
+
+A @env{TZ} value is a rule that typically names a location in the
+@uref{http://www.twinsun.com/tz/tz-link.htm, @samp{tz} database}.
+A recent catalog of location names appears in the
+@uref{http://twiki.org/cgi-bin/xtra/tzdate, TWiki Date and Time
+Gateway}.  A few non-@acronym{GNU} hosts require a colon before a
+location name in a @env{TZ} setting, e.g.,
+@samp{TZ=":America/New_York"}.
+
+The @samp{tz} database includes a wide variety of locations ranging
+from @samp{Arctic/Longyearbyen} to @samp{Antarctica/South_Pole}, but
+if you are at sea and have your own private time zone, or if you are
+using a non-@acronym{GNU} host that does not support the @samp{tz}
+database, you may need to use a @acronym{POSIX} rule instead.  Simple
+@acronym{POSIX} rules like @samp{UTC0} specify a time zone without
+daylight saving time; other rules can specify simple daylight saving
+regimes.  @xref{TZ Variable,, Specifying the Time Zone with @code{TZ},
+libc, The GNU C Library}.
+
+@node Authors of parse_datetime
+@section Authors of @code{parse_datetime}
+@c the anchor keeps the old node name, to try to avoid breaking links
+@anchor{Authors of get_date}
+
+@cindex authors of @code{parse_datetime}
+
+@cindex Bellovin, Steven M.
+@cindex Salz, Rich
+@cindex Berets, Jim
+@cindex MacKenzie, David
+@cindex Meyering, Jim
+@cindex Eggert, Paul
+@code{parse_datetime} started life as @code{getdate}, as originally
+implemented by Steven M. Bellovin
+(@email{smb@@research.att.com}) while at the University of North Carolina
+at Chapel Hill.  The code was later tweaked by a couple of people on
+Usenet, then completely overhauled by Rich $alz (@email{rsalz@@bbn.com})
+and Jim Berets (@email{jberets@@bbn.com}) in August, 1990.  Various
+revisions for the @sc{gnu} system were made by David MacKenzie, Jim Meyering,
+Paul Eggert and others, including renaming it to @code{get_date} to
+avoid a conflict with the alternative Posix function @code{getdate},
+and a later rename to @code{parse_datetime}.  The Posix function
+@code{getdate} can parse more locale-specific dates using
+@code{strptime}, but relies on an environment variable and external
+file, and lacks the thread-safety of @code{parse_datetime}.
+
+@cindex Pinard, F.
+@cindex Berry, K.
+This chapter was originally produced by Fran@,{c}ois Pinard
+(@email{pinard@@iro.umontreal.ca}) from the @file{parse_datetime.y} source code,
+and then edited by K.@: Berry (@email{kb@@cs.umb.edu}).
diff --git a/doc/perm.texi b/doc/perm.texi
new file mode 100644 (file)
index 0000000..41b24f6
--- /dev/null
@@ -0,0 +1,508 @@
+Each file has a set of @dfn{permissions} that control the kinds of
+access that users have to that file.  The permissions for a file are
+also called its @dfn{access mode}.  They can be represented either in
+symbolic form or as an octal number.
+
+@menu
+* Mode Structure::              Structure of file permissions.
+* Symbolic Modes::              Mnemonic permissions representation.
+* Numeric Modes::               Permissions as octal numbers.
+@end menu
+
+@node Mode Structure
+@section Structure of File Permissions
+
+There are three kinds of permissions that a user can have for a file:
+
+@enumerate
+@item
+@cindex read permission
+permission to read the file.  For directories, this means permission to
+list the contents of the directory.
+@item
+@cindex write permission
+permission to write to (change) the file.  For directories, this means
+permission to create and remove files in the directory.
+@item
+@cindex execute permission
+permission to execute the file (run it as a program).  For directories,
+this means permission to access files in the directory.
+@end enumerate
+
+There are three categories of users who may have different permissions
+to perform any of the above operations on a file:
+
+@enumerate
+@item
+the file's owner;
+@item
+other users who are in the file's group;
+@item
+everyone else.
+@end enumerate
+
+@cindex owner, default
+@cindex group owner, default
+Files are given an owner and group when they are created.  Usually the
+owner is the current user and the group is the group of the directory
+the file is in, but this varies with the operating system, the
+file system the file is created on, and the way the file is created.  You
+can change the owner and group of a file by using the @command{chown} and
+@command{chgrp} commands.
+
+In addition to the three sets of three permissions listed above, a
+file's permissions have three special components, which affect only
+executable files (programs) and, on some systems, directories:
+
+@enumerate
+@item
+@cindex setuid
+Set the process's effective user ID to that of the file upon execution
+(called the @dfn{setuid bit}).  No effect on directories.
+@item
+@cindex setgid
+Set the process's effective group ID to that of the file upon execution
+(called the @dfn{setgid bit}).  For directories on some systems, put
+files created in the directory into the same group as the directory, no
+matter what group the user who creates them is in.
+@item
+@cindex sticky
+@cindex swap space, saving text image in
+@cindex text image, saving in swap space
+@cindex restricted deletion flag
+prevent users from removing or renaming a file in a directory
+unless they own the file or the directory; this is called the
+@dfn{restricted deletion flag} for the directory.
+For regular files on some systems, save the program's text image on the
+swap device so it will load more quickly when run; this is called the
+@dfn{sticky bit}.
+@end enumerate
+
+In addition to the permissions listed above, there may be file attributes
+specific to the file system, e.g: access control lists (ACLs), whether a
+file is compressed, whether a file can be modified (immutability), whether
+a file can be dumped.  These are usually set using programs
+specific to the file system.  For example:
+@c should probably say a lot more about ACLs... someday
+
+@table @asis
+@item ext2
+On @acronym{GNU} and @acronym{GNU}/Linux the file permissions
+(``attributes'') specific to
+the ext2 file system are set using @command{chattr}.
+
+@item FFS
+On FreeBSD the file permissions (``flags'') specific to the FFS
+file system are set using @command{chrflags}.
+@end table
+
+Although a file's permission ``bits'' allow an operation on that file,
+that operation may still fail, because:
+
+@itemize
+@item
+the file-system-specific permissions do not permit it;
+
+@item
+the file system is mounted as read-only.
+@end itemize
+
+For example, if the immutable attribute is set on a file,
+it cannot be modified, regardless of the fact that you
+may have just run @code{chmod a+w FILE}.
+
+@node Symbolic Modes
+@section Symbolic Modes
+
+@cindex symbolic modes
+@dfn{Symbolic modes} represent changes to files' permissions as
+operations on single-character symbols.  They allow you to modify either
+all or selected parts of files' permissions, optionally based on
+their previous values, and perhaps on the current @code{umask} as well
+(@pxref{Umask and Protection}).
+
+The format of symbolic modes is:
+
+@example
+@r{[}ugoa@dots{}@r{][}+-=@r{]}@var{perms}@dots{}@r{[},@dots{}@r{]}
+@end example
+
+@noindent
+where @var{perms} is either zero or more letters from the set
+@samp{rwxXst}, or a single letter from the set @samp{ugo}.
+
+The following sections describe the operators and other details of
+symbolic modes.
+
+@menu
+* Setting Permissions::          Basic operations on permissions.
+* Copying Permissions::          Copying existing permissions.
+* Changing Special Permissions:: Special permissions.
+* Conditional Executability::    Conditionally affecting executability.
+* Multiple Changes::             Making multiple changes.
+* Umask and Protection::              The effect of the umask.
+@end menu
+
+@node Setting Permissions
+@subsection Setting Permissions
+
+The basic symbolic operations on a file's permissions are adding,
+removing, and setting the permission that certain users have to read,
+write, and execute the file.  These operations have the following
+format:
+
+@example
+@var{users} @var{operation} @var{permissions}
+@end example
+
+@noindent
+The spaces between the three parts above are shown for readability only;
+symbolic modes cannot contain spaces.
+
+The @var{users} part tells which users' access to the file is changed.
+It consists of one or more of the following letters (or it can be empty;
+@pxref{Umask and Protection}, for a description of what happens then).  When
+more than one of these letters is given, the order that they are in does
+not matter.
+
+@table @code
+@item u
+@cindex owner of file, permissions for
+the user who owns the file;
+@item g
+@cindex group, permissions for
+other users who are in the file's group;
+@item o
+@cindex other permissions
+all other users;
+@item a
+all users; the same as @samp{ugo}.
+@end table
+
+The @var{operation} part tells how to change the affected users' access
+to the file, and is one of the following symbols:
+
+@table @code
+@item +
+@cindex adding permissions
+to add the @var{permissions} to whatever permissions the @var{users}
+already have for the file;
+@item -
+@cindex removing permissions
+@cindex subtracting permissions
+to remove the @var{permissions} from whatever permissions the
+@var{users} already have for the file;
+@item =
+@cindex setting permissions
+to make the @var{permissions} the only permissions that the @var{users}
+have for the file.
+@end table
+
+The @var{permissions} part tells what kind of access to the file should
+be changed; it is normally zero or more of the following letters.  As with the
+@var{users} part, the order does not matter when more than one letter is
+given.  Omitting the @var{permissions} part is useful only with the
+@samp{=} operation, where it gives the specified @var{users} no access
+at all to the file.
+
+@table @code
+@item r
+@cindex read permission, symbolic
+the permission the @var{users} have to read the file;
+@item w
+@cindex write permission, symbolic
+the permission the @var{users} have to write to the file;
+@item x
+@cindex execute permission, symbolic
+the permission the @var{users} have to execute the file.
+@end table
+
+For example, to give everyone permission to read and write a file,
+but not to execute it, use:
+
+@example
+a=rw
+@end example
+
+To remove write permission for all users other than the file's
+owner, use:
+
+@example
+go-w
+@end example
+
+@noindent
+The above command does not affect the access that the owner of
+the file has to it, nor does it affect whether other users can
+read or execute the file.
+
+To give everyone except a file's owner no permission to do anything with
+that file, use the mode below.  Other users could still remove the file,
+if they have write permission on the directory it is in.
+
+@example
+go=
+@end example
+
+@noindent
+Another way to specify the same thing is:
+
+@example
+og-rwx
+@end example
+
+@node Copying Permissions
+@subsection Copying Existing Permissions
+
+@cindex copying existing permissions
+@cindex permissions, copying existing
+You can base a file's permissions on its existing permissions.  To do
+this, instead of using a series of @samp{r}, @samp{w}, or @samp{x}
+letters after the
+operator, you use the letter @samp{u}, @samp{g}, or @samp{o}.  For
+example, the mode
+
+@example
+o+g
+@end example
+
+@noindent
+adds the permissions for users who are in a file's group to the
+permissions that other users have for the file.  Thus, if the file
+started out as mode 664 (@samp{rw-rw-r--}), the above mode would change
+it to mode 666 (@samp{rw-rw-rw-}).  If the file had started out as mode
+741 (@samp{rwxr----x}), the above mode would change it to mode 745
+(@samp{rwxr--r-x}).  The @samp{-} and @samp{=} operations work
+analogously.
+
+@node Changing Special Permissions
+@subsection Changing Special Permissions
+
+@cindex changing special permissions
+In addition to changing a file's read, write, and execute permissions,
+you can change its special permissions.  @xref{Mode Structure}, for a
+summary of these permissions.
+
+To change a file's permission to set the user ID on execution, use
+@samp{u} in the @var{users} part of the symbolic mode and
+@samp{s} in the @var{permissions} part.
+
+To change a file's permission to set the group ID on execution, use
+@samp{g} in the @var{users} part of the symbolic mode and
+@samp{s} in the @var{permissions} part.
+
+To change a file's permission to set the restricted deletion flag or sticky bit,
+omit the @var{users} part of the symbolic mode (or use @samp{a}) and put
+@samp{t} in the @var{permissions} part.
+
+For example, to add set-user-ID permission to a program,
+you can use the mode:
+
+@example
+u+s
+@end example
+
+To remove both set-user-ID and set-group-ID permission from
+it, you can use the mode:
+
+@example
+ug-s
+@end example
+
+To set the restricted deletion flag or sticky bit, you can use
+the mode:
+
+@example
++t
+@end example
+
+The combination @samp{o+s} has no effect.  On @acronym{GNU} systems
+the combinations @samp{u+t} and @samp{g+t} have no effect, and
+@samp{o+t} acts like plain @samp{+t}.
+
+The @samp{=} operator is not very useful with special permissions; for
+example, the mode:
+
+@example
+o=t
+@end example
+
+@noindent
+does set the restricted deletion flag or sticky bit, but it also
+removes all read, write, and execute permissions that users not in the
+file's group might have had for it.
+
+@node Conditional Executability
+@subsection Conditional Executability
+
+@cindex conditional executability
+There is one more special type of symbolic permission: if you use
+@samp{X} instead of @samp{x}, execute permission is affected only if the
+file is a directory or already had execute permission.
+
+For example, this mode:
+
+@example
+a+X
+@end example
+
+@noindent
+gives all users permission to search directories, or to execute files if
+anyone could execute them before.
+
+@node Multiple Changes
+@subsection Making Multiple Changes
+
+@cindex multiple changes to permissions
+The format of symbolic modes is actually more complex than described
+above (@pxref{Setting Permissions}).  It provides two ways to make
+multiple changes to files' permissions.
+
+The first way is to specify multiple @var{operation} and
+@var{permissions} parts after a @var{users} part in the symbolic mode.
+
+For example, the mode:
+
+@example
+og+rX-w
+@end example
+
+@noindent
+gives users other than the owner of the file read permission and, if
+it is a directory or if someone already had execute permission
+to it, gives them execute permission; and it also denies them write
+permission to the file.  It does not affect the permission that the
+owner of the file has for it.  The above mode is equivalent to
+the two modes:
+
+@example
+og+rX
+og-w
+@end example
+
+The second way to make multiple changes is to specify more than one
+simple symbolic mode, separated by commas.  For example, the mode:
+
+@example
+a+r,go-w
+@end example
+
+@noindent
+gives everyone permission to read the file and removes write
+permission on it for all users except its owner.  Another example:
+
+@example
+u=rwx,g=rx,o=
+@end example
+
+@noindent
+sets all of the non-special permissions for the file explicitly.  (It
+gives users who are not in the file's group no permission at all for
+it.)
+
+The two methods can be combined.  The mode:
+
+@example
+a+r,g+x-w
+@end example
+
+@noindent
+gives all users permission to read the file, and gives users who are in
+the file's group permission to execute it, as well, but not permission
+to write to it.  The above mode could be written in several different
+ways; another is:
+
+@example
+u+r,g+rx,o+r,g-w
+@end example
+
+@node Umask and Protection
+@subsection The Umask and Protection
+
+@cindex umask and modes
+@cindex modes and umask
+If the @var{users} part of a symbolic mode is omitted, it defaults to
+@samp{a} (affect all users), except that any permissions that are
+@emph{set} in the system variable @code{umask} are @emph{not affected}.
+The value of @code{umask} can be set using the
+@code{umask} command.  Its default value varies from system to system.
+
+@cindex giving away permissions
+Omitting the @var{users} part of a symbolic mode is generally not useful
+with operations other than @samp{+}.  It is useful with @samp{+} because
+it allows you to use @code{umask} as an easily customizable protection
+against giving away more permission to files than you intended to.
+
+As an example, if @code{umask} has the value 2, which removes write
+permission for users who are not in the file's group, then the mode:
+
+@example
++w
+@end example
+
+@noindent
+adds permission to write to the file to its owner and to other users who
+are in the file's group, but @emph{not} to other users.  In contrast,
+the mode:
+
+@example
+a+w
+@end example
+
+@noindent
+ignores @code{umask}, and @emph{does} give write permission for
+the file to all users.
+
+@node Numeric Modes
+@section Numeric Modes
+
+@cindex numeric modes
+@cindex file permissions, numeric
+@cindex octal numbers for file modes
+As an
+alternative to giving a symbolic mode, you can give an octal (base 8)
+number that represents the new mode.
+This number is always interpreted in octal; you do not have to add a
+leading 0, as you do in C.  Mode 0055 is the same as mode 55.
+
+A numeric mode is usually shorter than the corresponding symbolic
+mode, but it is limited in that it cannot take into account a file's
+previous permissions; it can only set them absolutely.
+
+The permissions granted to the user,
+to other users in the file's group,
+and to other users not in the file's group each require three
+bits, which are represented as one octal digit.  The three special
+permissions also require one bit each, and they are as a group
+represented as another octal digit.  Here is how the bits are arranged,
+starting with the lowest valued bit:
+
+@example
+Value in  Corresponding
+Mode      Permission
+
+          Other users not in the file's group:
+   1      Execute
+   2      Write
+   4      Read
+
+          Other users in the file's group:
+  10      Execute
+  20      Write
+  40      Read
+
+          The file's owner:
+ 100      Execute
+ 200      Write
+ 400      Read
+
+          Special permissions:
+1000      Restricted deletion flag or sticky bit
+2000      Set group ID on execution
+4000      Set user ID on execution
+@end example
+
+For example, numeric mode 4755 corresponds to symbolic mode
+@samp{u=rwxs,go=rx}, and numeric mode 664 corresponds to symbolic mode
+@samp{ug=rw,o=r}.  Numeric mode 0 corresponds to symbolic mode
+@samp{a=}.
diff --git a/doc/regexprops.texi b/doc/regexprops.texi
new file mode 100644 (file)
index 0000000..e94720f
--- /dev/null
@@ -0,0 +1,646 @@
+@c Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006,
+@c 2007, 2009, 2010 Free Software Foundation, Inc.
+@c
+@c Permission is granted to copy, distribute and/or modify this document
+@c under the terms of the GNU Free Documentation License, Version 1.3 or
+@c any later version published by the Free Software Foundation; with no
+@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+@c Texts.  A copy of the license is included in the ``GNU Free
+@c Documentation License'' file as part of this distribution.
+
+@c this regular expression description is for: findutils
+
+@menu
+* findutils-default regular expression syntax::
+* awk regular expression syntax::
+* egrep regular expression syntax::
+* emacs regular expression syntax::
+* gnu-awk regular expression syntax::
+* grep regular expression syntax::
+* posix-awk regular expression syntax::
+* posix-basic regular expression syntax::
+* posix-egrep regular expression syntax::
+* posix-extended regular expression syntax::
+@end menu
+
+@node findutils-default regular expression syntax
+@subsection @samp{findutils-default} regular expression syntax
+
+
+The character @samp{.} matches any single character.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters.  Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored.  Within square brackets, @samp{\} is taken literally.  Character classes are not supported, so for example you would need to use @samp{[0-9]} instead of @samp{[[:digit:]]}.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}.  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 @samp{\(}.
+
+The alternation operator is @samp{\|}.
+
+The character @samp{^} only represents the beginning of a string when it appears:
+@enumerate
+
+@item
+At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+The character @samp{$} only represents the end of a string when it appears:
+@enumerate
+
+@item At the end of a regular expression
+
+@item Before a close-group, signified by
+@samp{\)}
+@item Before the alternation operator @samp{\|}
+
+@end enumerate
+
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node awk regular expression syntax
+@subsection @samp{awk} regular expression syntax
+
+
+The character @samp{.} matches any single character except the null character.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters.  Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid.  Within square brackets, @samp{\} can be used to quote the following character.  Character classes are not supported, so for example you would need to use @samp{[0-9]} instead of @samp{[[:digit:]]}.
+
+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.
+
+Grouping is performed with parentheses @samp{()}.  An unmatched @samp{)} matches just itself.  A backslash followed by a digit matches that digit.
+
+The alternation operator is @samp{|}.
+
+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.
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{(}
+@item After the alternation operator @samp{|}
+
+@end enumerate
+
+
+
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node egrep regular expression syntax
+@subsection @samp{egrep} regular expression syntax
+
+
+The character @samp{.} matches any single character except newline.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters.  Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored.  Within square brackets, @samp{\} is taken literally.  Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.  Non-matching lists @samp{[^@dots{}]} do not ever match newline.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with parentheses @samp{()}.  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 @samp{(}.
+
+The alternation operator is @samp{|}.
+
+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.
+
+The characters @samp{*}, @samp{+} and @samp{?} are special anywhere in a regular expression.
+
+
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node emacs regular expression syntax
+@subsection @samp{emacs} regular expression syntax
+
+
+The character @samp{.} matches any single character except newline.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters.  Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored.  Within square brackets, @samp{\} is taken literally.  Character classes are not supported, so for example you would need to use @samp{[0-9]} instead of @samp{[[:digit:]]}.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}.  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 @samp{\(}.
+
+The alternation operator is @samp{\|}.
+
+The character @samp{^} only represents the beginning of a string when it appears:
+@enumerate
+
+@item
+At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+The character @samp{$} only represents the end of a string when it appears:
+@enumerate
+
+@item At the end of a regular expression
+
+@item Before a close-group, signified by
+@samp{\)}
+@item Before the alternation operator @samp{\|}
+
+@end enumerate
+
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node gnu-awk regular expression syntax
+@subsection @samp{gnu-awk} regular expression syntax
+
+
+The character @samp{.} matches any single character.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters.  Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid.  Within square brackets, @samp{\} can be used to quote the following character.  Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with parentheses @samp{()}.  An unmatched @samp{)} matches just itself.  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 @samp{(}.
+
+The alternation operator is @samp{|}.
+
+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.
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{(}
+@item After the alternation operator @samp{|}
+
+@end enumerate
+
+
+
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node grep regular expression syntax
+@subsection @samp{grep} regular expression syntax
+
+
+The character @samp{.} matches any single character except newline.
+
+
+@table @samp
+
+@item \+
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item \?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item + and ?
+match themselves.
+@end table
+
+
+Bracket expressions are used to match ranges of characters.  Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored.  Within square brackets, @samp{\} is taken literally.  Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.  Non-matching lists @samp{[^@dots{}]} do not ever match newline.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}.  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 @samp{\(}.
+
+The alternation operator is @samp{\|}.
+
+The character @samp{^} only represents the beginning of a string when it appears:
+@enumerate
+
+@item
+At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+
+@item After a newline
+
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+The character @samp{$} only represents the end of a string when it appears:
+@enumerate
+
+@item At the end of a regular expression
+
+@item Before a close-group, signified by
+@samp{\)}
+@item Before a newline
+
+@item Before the alternation operator @samp{\|}
+
+@end enumerate
+
+
+@samp{\*}, @samp{\+} and @samp{\?} are special at any point in a regular expression except:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+@item After a newline
+
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+Intervals are specified by @samp{\@{} and @samp{\@}}.  Invalid intervals such as @samp{a\@{1z} are not accepted.
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node posix-awk regular expression syntax
+@subsection @samp{posix-awk} regular expression syntax
+
+
+The character @samp{.} matches any single character except the null character.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters.  Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid.  Within square brackets, @samp{\} can be used to quote the following character.  Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.
+
+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.
+
+Grouping is performed with parentheses @samp{()}.  An unmatched @samp{)} matches just itself.  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 @samp{(}.
+
+The alternation operator is @samp{|}.
+
+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.
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except the following places, where they are not allowed:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{(}
+@item After the alternation operator @samp{|}
+
+@end enumerate
+
+
+Intervals are specified by @samp{@{} and @samp{@}}.  Invalid intervals such as @samp{a@{1z} are not accepted.
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node posix-basic regular expression syntax
+@subsection @samp{posix-basic} regular expression syntax
+This is a synonym for ed.
+@node posix-egrep regular expression syntax
+@subsection @samp{posix-egrep} regular expression syntax
+
+
+The character @samp{.} matches any single character except newline.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters.  Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored.  Within square brackets, @samp{\} is taken literally.  Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.  Non-matching lists @samp{[^@dots{}]} do not ever match newline.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with parentheses @samp{()}.  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 @samp{(}.
+
+The alternation operator is @samp{|}.
+
+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.
+
+The characters @samp{*}, @samp{+} and @samp{?} are special anywhere in a regular expression.
+
+Intervals are specified by @samp{@{} and @samp{@}}.  Invalid intervals are treated as literals, for example @samp{a@{1} is treated as @samp{a\@{1}
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node posix-extended regular expression syntax
+@subsection @samp{posix-extended} regular expression syntax
+
+
+The character @samp{.} matches any single character except the null character.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters.  Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid.  Within square brackets, @samp{\} is taken literally.  Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with parentheses @samp{()}.  An unmatched @samp{)} matches just itself.  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 @samp{(}.
+
+The alternation operator is @samp{|}.
+
+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.
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except the following places, where they are not allowed:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{(}
+@item After the alternation operator @samp{|}
+
+@end enumerate
+
+
+Intervals are specified by @samp{@{} and @samp{@}}.  Invalid intervals such as @samp{a@{1z} are not accepted.
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
diff --git a/doc/stamp-1 b/doc/stamp-1
new file mode 100644 (file)
index 0000000..be2510b
--- /dev/null
@@ -0,0 +1,4 @@
+@set UPDATED 3 April 2011
+@set UPDATED-MONTH April 2011
+@set EDITION 4.5.10
+@set VERSION 4.5.10
diff --git a/doc/stamp-vti b/doc/stamp-vti
new file mode 100644 (file)
index 0000000..be2510b
--- /dev/null
@@ -0,0 +1,4 @@
+@set UPDATED 3 April 2011
+@set UPDATED-MONTH April 2011
+@set EDITION 4.5.10
+@set VERSION 4.5.10
diff --git a/doc/version.texi b/doc/version.texi
new file mode 100644 (file)
index 0000000..be2510b
--- /dev/null
@@ -0,0 +1,4 @@
+@set UPDATED 3 April 2011
+@set UPDATED-MONTH April 2011
+@set EDITION 4.5.10
+@set VERSION 4.5.10
diff --git a/doc/versionmaint.texi b/doc/versionmaint.texi
new file mode 100644 (file)
index 0000000..be2510b
--- /dev/null
@@ -0,0 +1,4 @@
+@set UPDATED 3 April 2011
+@set UPDATED-MONTH April 2011
+@set EDITION 4.5.10
+@set VERSION 4.5.10
diff --git a/find/Makefile.am b/find/Makefile.am
new file mode 100644 (file)
index 0000000..e3f62a6
--- /dev/null
@@ -0,0 +1,39 @@
+AUTOMAKE_OPTIONS = std-options
+AM_CFLAGS = $(WARN_CFLAGS)
+localedir = $(datadir)/locale
+# noinst_PROGRAMS = regexprops
+# regexprops_SOURCES = regexprops.c
+
+noinst_LIBRARIES = libfindtools.a
+libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c tree.c util.c sharefile.c
+
+
+# We always build two versions of find, one with fts, one without.
+# Their names depend on whether the user specified --with-fts.
+#
+# --with-fts            find            extra binary
+#       yes             with fts        'oldfind', without fts
+#        no             without fts     'ftsfind', with fts
+#
+if WITH_FTS
+bin_PROGRAMS     = find oldfind
+find_SOURCES     = ftsfind.c
+oldfind_SOURCES  = find.c
+else
+bin_PROGRAMS      = find ftsfind
+find_SOURCES      = find.c
+ftsfind_SOURCES   = ftsfind.c
+endif
+
+EXTRA_DIST = defs.h sharefile.h $(man_MANS)
+INCLUDES = -I../gnulib/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
+LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) @FINDLIBS@
+man_MANS = find.1
+SUBDIRS = . testsuite
+
+#$(PROGRAMS): ../lib/libfind.a
+
+dist-hook: findutils-check-manpages
+
+findutils-check-manpages:
+       $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)
diff --git a/find/Makefile.in b/find/Makefile.in
new file mode 100644 (file)
index 0000000..9a19f15
--- /dev/null
@@ -0,0 +1,1801 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+@WITH_FTS_FALSE@bin_PROGRAMS = find$(EXEEXT) ftsfind$(EXEEXT)
+@WITH_FTS_TRUE@bin_PROGRAMS = find$(EXEEXT) oldfind$(EXEEXT)
+subdir = find
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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)
+AR = ar
+ARFLAGS = cru
+libfindtools_a_AR = $(AR) $(ARFLAGS)
+libfindtools_a_LIBADD =
+am_libfindtools_a_OBJECTS = finddata.$(OBJEXT) fstype.$(OBJEXT) \
+       parser.$(OBJEXT) pred.$(OBJEXT) tree.$(OBJEXT) util.$(OBJEXT) \
+       sharefile.$(OBJEXT)
+libfindtools_a_OBJECTS = $(am_libfindtools_a_OBJECTS)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__find_SOURCES_DIST = find.c ftsfind.c
+@WITH_FTS_FALSE@am_find_OBJECTS = find.$(OBJEXT)
+@WITH_FTS_TRUE@am_find_OBJECTS = ftsfind.$(OBJEXT)
+find_OBJECTS = $(am_find_OBJECTS)
+find_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+find_DEPENDENCIES = ./libfindtools.a ../lib/libfind.a \
+       ../gnulib/lib/libgnulib.a $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__ftsfind_SOURCES_DIST = ftsfind.c
+@WITH_FTS_FALSE@am_ftsfind_OBJECTS = ftsfind.$(OBJEXT)
+ftsfind_OBJECTS = $(am_ftsfind_OBJECTS)
+ftsfind_LDADD = $(LDADD)
+ftsfind_DEPENDENCIES = ./libfindtools.a ../lib/libfind.a \
+       ../gnulib/lib/libgnulib.a $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__oldfind_SOURCES_DIST = find.c
+@WITH_FTS_TRUE@am_oldfind_OBJECTS = find.$(OBJEXT)
+oldfind_OBJECTS = $(am_oldfind_OBJECTS)
+oldfind_LDADD = $(LDADD)
+oldfind_DEPENDENCIES = ./libfindtools.a ../lib/libfind.a \
+       ../gnulib/lib/libgnulib.a $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_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)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libfindtools_a_SOURCES) $(find_SOURCES) $(ftsfind_SOURCES) \
+       $(oldfind_SOURCES)
+DIST_SOURCES = $(libfindtools_a_SOURCES) $(am__find_SOURCES_DIST) \
+       $(am__ftsfind_SOURCES_DIST) $(am__oldfind_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+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'
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = -I../gnulib/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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 = $(datadir)/locale
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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 = std-options
+AM_CFLAGS = $(WARN_CFLAGS)
+# noinst_PROGRAMS = regexprops
+# regexprops_SOURCES = regexprops.c
+noinst_LIBRARIES = libfindtools.a
+libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c tree.c util.c sharefile.c
+@WITH_FTS_FALSE@find_SOURCES = find.c
+@WITH_FTS_TRUE@find_SOURCES = ftsfind.c
+@WITH_FTS_TRUE@oldfind_SOURCES = find.c
+@WITH_FTS_FALSE@ftsfind_SOURCES = ftsfind.c
+EXTRA_DIST = defs.h sharefile.h $(man_MANS)
+LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) @FINDLIBS@
+man_MANS = find.1
+SUBDIRS = . testsuite
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(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 find/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits find/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)
+libfindtools.a: $(libfindtools_a_OBJECTS) $(libfindtools_a_DEPENDENCIES) 
+       -rm -f libfindtools.a
+       $(libfindtools_a_AR) libfindtools.a $(libfindtools_a_OBJECTS) $(libfindtools_a_LIBADD)
+       $(RANLIB) libfindtools.a
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+installcheck-binPROGRAMS: $(bin_PROGRAMS)
+       bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
+         case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+          *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+         esac; \
+         f=`echo "$$p" | \
+            sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         for opt in --help --version; do \
+           if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+                2>c$${pid}_.err </dev/null \
+                && test -n "`cat c$${pid}_.out`" \
+                && test -z "`cat c$${pid}_.err`"; then :; \
+           else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+         done; \
+       done; rm -f c$${pid}_.???; exit $$bad
+find$(EXEEXT): $(find_OBJECTS) $(find_DEPENDENCIES) 
+       @rm -f find$(EXEEXT)
+       $(LINK) $(find_OBJECTS) $(find_LDADD) $(LIBS)
+ftsfind$(EXEEXT): $(ftsfind_OBJECTS) $(ftsfind_DEPENDENCIES) 
+       @rm -f ftsfind$(EXEEXT)
+       $(LINK) $(ftsfind_OBJECTS) $(ftsfind_LDADD) $(LIBS)
+oldfind$(EXEEXT): $(oldfind_OBJECTS) $(oldfind_DEPENDENCIES) 
+       @rm -f oldfind$(EXEEXT)
+       $(LINK) $(oldfind_OBJECTS) $(oldfind_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/finddata.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstype.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftsfind.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pred.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sharefile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man1: $(man_MANS)
+       @$(NORMAL_INSTALL)
+       test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       { for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+         fi; \
+       done; \
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+       done; }
+
+uninstall-man1:
+       @$(NORMAL_UNINSTALL)
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       test -z "$$files" || { \
+         echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+         cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @list='$(MANS)'; if test -n "$$list"; then \
+         list=`for p in $$list; do \
+           if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+           if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+         if test -n "$$list" && \
+           grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+           echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+           grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+           echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+           echo "       typically \`make maintainer-clean' will remove them" >&2; \
+           exit 1; \
+         else :; fi; \
+       else :; fi
+       @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
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS)
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am: installcheck-binPROGRAMS
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+       install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-binPROGRAMS \
+       clean-generic clean-noinstLIBRARIES ctags ctags-recursive \
+       dist-hook distclean distclean-compile distclean-generic \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-binPROGRAMS 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-man1 install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installcheck-binPROGRAMS \
+       installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am uninstall-binPROGRAMS uninstall-man \
+       uninstall-man1
+
+
+#$(PROGRAMS): ../lib/libfind.a
+
+dist-hook: findutils-check-manpages
+
+findutils-check-manpages:
+       $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)
+
+# 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/find/defs.h b/find/defs.h
new file mode 100644 (file)
index 0000000..11d1d00
--- /dev/null
@@ -0,0 +1,678 @@
+/* defs.h -- data types and declarations.
+   Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2004, 2005, 2006,
+   2007, 2008, 2009, 2010 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_DEFS_H
+#define INC_DEFS_H 1
+
+#if !defined(ALREADY_INCLUDED_CONFIG_H)
+/*
+ * Savannah bug #20128: if we include some system header and it
+ * includes some othersecond system header, the second system header
+ * may in fact turn out to be a file provided by gnulib.  For that
+ * situation, we need to have already included <config.h> so that the
+ * Gnulib files have access to the information probed by their
+ * configure script fragments.  So <config.h> should be the first
+ * thing included.
+ */
+#error "<config.h> should be #included before defs.h, and indeed before any other header"
+Please stop compiling the program now
+#endif
+
+
+#include <sys/types.h>
+
+/* XXX: some of these includes probably don't belong in a common header file */
+#include <sys/stat.h>
+#include <stdio.h>             /* for FILE* */
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <time.h>
+#include <limits.h>            /* for CHAR_BIT */
+#include <stdbool.h>           /* for bool */
+#include <stdint.h>            /* for uintmax_t */
+#include <sys/stat.h> /* S_ISUID etc. */
+#include <selinux/selinux.h>
+
+
+
+#ifndef CHAR_BIT
+# define CHAR_BIT 8
+#endif
+
+# include <inttypes.h>
+
+#include "regex.h"
+#include "timespec.h"
+#include "buildcmd.h"
+#include "quotearg.h"
+#include "sharefile.h"
+
+#ifndef ATTRIBUTE_NORETURN
+# if HAVE_ATTRIBUTE_NORETURN
+#  define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+# else
+#  define ATTRIBUTE_NORETURN /* nothing */
+# endif
+#endif
+
+int optionl_stat (const char *name, struct stat *p);
+int optionp_stat (const char *name, struct stat *p);
+int optionh_stat (const char *name, struct stat *p);
+int debug_stat   (const char *file, struct stat *bufp);
+
+void set_stat_placeholders (struct stat *p);
+int get_statinfo (const char *pathname, const char *name, struct stat *p);
+
+
+#define MODE_WXUSR     (S_IWUSR | S_IXUSR)
+#define MODE_R         (S_IRUSR | S_IRGRP | S_IROTH)
+#define MODE_RW                (S_IWUSR | S_IWGRP | S_IWOTH | MODE_R)
+#define MODE_RWX       (S_IXUSR | S_IXGRP | S_IXOTH | MODE_RW)
+#define MODE_ALL       (S_ISUID | S_ISGID | S_ISVTX | MODE_RWX)
+
+
+struct predicate;
+struct options;
+
+/* Pointer to a predicate function. */
+typedef bool (*PRED_FUNC)(const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr);
+
+/* The number of seconds in a day. */
+#define                DAYSECS     86400
+
+/* Argument structures for predicates. */
+
+enum comparison_type
+{
+  COMP_GT,
+  COMP_LT,
+  COMP_EQ
+};
+
+enum permissions_type
+{
+  PERM_AT_LEAST,
+  PERM_ANY,
+  PERM_EXACT
+};
+
+enum predicate_type
+{
+  NO_TYPE,
+  PRIMARY_TYPE,
+  UNI_OP,
+  BI_OP,
+  OPEN_PAREN,
+  CLOSE_PAREN
+};
+
+enum predicate_precedence
+{
+  NO_PREC,
+  COMMA_PREC,
+  OR_PREC,
+  AND_PREC,
+  NEGATE_PREC,
+  MAX_PREC
+};
+
+struct long_val
+{
+  enum comparison_type kind;
+  bool negative;        /* Defined only when representing time_t.  */
+  uintmax_t l_val;
+};
+
+struct perm_val
+{
+  enum permissions_type kind;
+  mode_t val[2];
+};
+
+/* dir_id is used to support loop detection in find.c
+ */
+struct dir_id
+{
+  ino_t ino;
+  dev_t dev;
+};
+
+/* samefile_file_id is used to support the -samefile test.
+ */
+struct samefile_file_id
+{
+  ino_t ino;
+  dev_t dev;
+  int   fd;
+};
+
+struct size_val
+{
+  enum comparison_type kind;
+  int blocksize;
+  uintmax_t size;
+};
+
+
+enum xval
+  {
+    XVAL_ATIME, XVAL_BIRTHTIME, XVAL_CTIME, XVAL_MTIME, XVAL_TIME
+  };
+
+struct time_val
+{
+  enum xval            xval;
+  enum comparison_type kind;
+  struct timespec      ts;
+};
+
+
+struct exec_val
+{
+  bool multiple;               /* -exec {} \+ denotes multiple argument. */
+  struct buildcmd_control ctl;
+  struct buildcmd_state   state;
+  char **replace_vec;          /* Command arguments (for ";" style) */
+  int num_args;
+  bool close_stdin;            /* If true, close stdin in the child. */
+  struct saved_cwd *wd_for_exec; /* What directory to perform the exec in. */
+  int last_child_status;       /* Status of the most recent child. */
+};
+
+/* The format string for a -printf or -fprintf is chopped into one or
+   more `struct segment', linked together into a list.
+   Each stretch of plain text is a segment, and
+   each \c and `%' conversion is a segment. */
+
+/* Special values for the `kind' field of `struct segment'. */
+enum SegmentKind
+  {
+    KIND_PLAIN=0,              /* Segment containing just plain text. */
+    KIND_STOP=1,               /* \c -- stop printing and flush output. */
+    KIND_FORMAT,               /* Regular format */
+  };
+
+struct segment
+{
+  enum SegmentKind segkind;     /* KIND_FORMAT, KIND_PLAIN, KIND_STOP */
+  char format_char[2];         /* Format chars if kind is KIND_FORMAT */
+  char *text;                  /* Plain text or `%' format string. */
+  int text_len;                        /* Length of `text'. */
+  struct segment *next;                /* Next segment for this predicate. */
+};
+
+struct format_val
+{
+  struct segment *segment;     /* Linked list of segments. */
+  FILE *stream;                        /* Output stream to print on. */
+  const char *filename;                /* We need the filename for error messages. */
+  bool dest_is_tty;            /* True if the destination is a terminal. */
+  struct quoting_options *quote_opts;
+};
+
+/* Profiling information for a predicate */
+struct predicate_performance_info
+{
+  unsigned long visits;
+  unsigned long successes;
+};
+
+/* evaluation cost of a predicate */
+enum EvaluationCost
+{
+  NeedsNothing,
+  NeedsInodeNumber,
+  NeedsType,
+  NeedsStatInfo,
+  NeedsLinkName,
+  NeedsAccessInfo,
+  NeedsSyncDiskHit,
+  NeedsEventualExec,
+  NeedsImmediateExec,
+  NeedsUserInteraction,
+  NeedsUnknown,
+  NumEvaluationCosts
+};
+
+struct predicate
+{
+  /* Pointer to the function that implements this predicate.  */
+  PRED_FUNC pred_func;
+
+  /* Only used for debugging, but defined unconditionally so individual
+     modules can be compiled with -DDEBUG.  */
+  char *p_name;
+
+  /* The type of this node.  There are two kinds.  The first is real
+     predicates ("primaries") such as -perm, -print, or -exec.  The
+     other kind is operators for combining predicates. */
+  enum predicate_type p_type;
+
+  /* The precedence of this node.  Only has meaning for operators. */
+  enum predicate_precedence p_prec;
+
+  /* True if this predicate node produces side effects.
+     If side_effects are produced
+     then optimization will not be performed */
+  bool side_effects;
+
+  /* True if this predicate node requires default print be turned off. */
+  bool no_default_print;
+
+  /* True if this predicate node requires a stat system call to execute. */
+  bool need_stat;
+
+  /* True if this predicate node requires knowledge of the file type. */
+  bool need_type;
+
+  /* True if this predicate node requires knowledge of the inode number. */
+  bool need_inum;
+
+  enum EvaluationCost p_cost;
+
+  /* est_success_rate is a number between 0.0 and 1.0 */
+  float est_success_rate;
+
+  /* True if this predicate should display control characters literally */
+  bool literal_control_chars;
+
+  /* True if this predicate didn't originate from the user. */
+  bool artificial;
+
+  /* The raw text of the argument of this predicate. */
+  const char *arg_text;
+
+  /* Information needed by the predicate processor.
+     Next to each member are listed the predicates that use it. */
+  union
+  {
+    const char *str;           /* fstype [i]lname [i]name [i]path */
+    struct re_pattern_buffer *regex; /* regex */
+    struct exec_val exec_vec;  /* exec ok */
+    struct long_val numinfo;   /* gid inum links  uid */
+    struct size_val size;      /* size */
+    uid_t uid;                 /* user */
+    gid_t gid;                 /* group */
+    struct time_val reftime;   /* newer newerXY anewer cnewer mtime atime ctime mmin amin cmin */
+    struct perm_val perm;      /* perm */
+    struct samefile_file_id samefileid; /* samefile */
+    mode_t type;               /* type */
+    struct format_val printf_vec; /* printf fprintf fprint ls fls print0 fprint0 print */
+    security_context_t scontext; /* security context */
+  } args;
+
+  /* The next predicate in the user input sequence,
+     which represents the order in which the user supplied the
+     predicates on the command line. */
+  struct predicate *pred_next;
+
+  /* The right and left branches from this node in the expression
+     tree, which represents the order in which the nodes should be
+     processed. */
+  struct predicate *pred_left;
+  struct predicate *pred_right;
+
+  struct predicate_performance_info perf;
+
+  const struct parser_table* parser_entry;
+};
+
+/* find.c, ftsfind.c */
+bool is_fts_enabled(int *ftsoptions);
+
+/* find library function declarations.  */
+
+/* find global function declarations.  */
+
+/* find.c */
+/* SymlinkOption represents the choice of
+ * -P, -L or -P (default) on the command line.
+ */
+enum SymlinkOption
+  {
+    SYMLINK_NEVER_DEREF,       /* Option -P */
+    SYMLINK_ALWAYS_DEREF,      /* Option -L */
+    SYMLINK_DEREF_ARGSONLY     /* Option -H */
+  };
+extern enum SymlinkOption symlink_handling; /* defined in find.c. */
+
+void set_follow_state (enum SymlinkOption opt);
+void cleanup(void);
+
+/* fstype.c */
+char *filesystem_type (const struct stat *statp, const char *path);
+char * get_mounted_filesystems (void);
+dev_t * get_mounted_devices (size_t *);
+
+
+
+enum arg_type
+  {
+    ARG_OPTION,                        /* regular options like -maxdepth */
+    ARG_NOOP,                  /* does nothing, returns true, internal use only */
+    ARG_POSITIONAL_OPTION,     /* options whose position is important (-follow) */
+    ARG_TEST,                  /* a like -name */
+    ARG_SPECIAL_PARSE,         /* complex to parse, don't eat the test name before calling parse_xx(). */
+    ARG_PUNCTUATION,           /* like -o or ( */
+    ARG_ACTION                 /* like -print */
+  };
+
+
+struct parser_table;
+/* Pointer to a parser function. */
+typedef bool (*PARSE_FUNC)(const struct parser_table *p,
+                          char *argv[], int *arg_ptr);
+struct parser_table
+{
+  enum arg_type type;
+  char *parser_name;
+  PARSE_FUNC parser_func;
+  PRED_FUNC    pred_func;
+};
+
+/* parser.c */
+const struct parser_table* find_parser (char *search_name);
+bool parse_print (const struct parser_table*, char *argv[], int *arg_ptr);
+void pred_sanity_check (const struct predicate *predicates);
+void check_option_combinations (const struct predicate *p);
+void parse_begin_user_args (char **args, int argno, const struct predicate *last, const struct predicate *predicates);
+void parse_end_user_args (char **args, int argno, const struct predicate *last, const struct predicate *predicates);
+bool parse_openparen  (const struct parser_table* entry, char *argv[], int *arg_ptr);
+bool parse_closeparen (const struct parser_table* entry, char *argv[], int *arg_ptr);
+
+/* pred.c */
+
+typedef bool PREDICATEFUNCTION(const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr);
+PREDICATEFUNCTION pred_amin;
+PREDICATEFUNCTION pred_and;
+PREDICATEFUNCTION pred_anewer;
+PREDICATEFUNCTION pred_atime;
+PREDICATEFUNCTION pred_closeparen;
+PREDICATEFUNCTION pred_cmin;
+PREDICATEFUNCTION pred_cnewer;
+PREDICATEFUNCTION pred_comma;
+PREDICATEFUNCTION pred_ctime;
+PREDICATEFUNCTION pred_delete;
+PREDICATEFUNCTION pred_empty;
+PREDICATEFUNCTION pred_exec;
+PREDICATEFUNCTION pred_execdir;
+PREDICATEFUNCTION pred_executable;
+PREDICATEFUNCTION pred_false;
+PREDICATEFUNCTION pred_fls;
+PREDICATEFUNCTION pred_fprint;
+PREDICATEFUNCTION pred_fprint0;
+PREDICATEFUNCTION pred_fprintf;
+PREDICATEFUNCTION pred_fstype;
+PREDICATEFUNCTION pred_gid;
+PREDICATEFUNCTION pred_group;
+PREDICATEFUNCTION pred_ilname;
+PREDICATEFUNCTION pred_iname;
+PREDICATEFUNCTION pred_inum;
+PREDICATEFUNCTION pred_ipath;
+PREDICATEFUNCTION pred_links;
+PREDICATEFUNCTION pred_lname;
+PREDICATEFUNCTION pred_ls;
+PREDICATEFUNCTION pred_mmin;
+PREDICATEFUNCTION pred_mtime;
+PREDICATEFUNCTION pred_name;
+PREDICATEFUNCTION pred_negate;
+PREDICATEFUNCTION pred_newer;
+PREDICATEFUNCTION pred_newerXY;
+PREDICATEFUNCTION pred_nogroup;
+PREDICATEFUNCTION pred_nouser;
+PREDICATEFUNCTION pred_ok;
+PREDICATEFUNCTION pred_okdir;
+PREDICATEFUNCTION pred_openparen;
+PREDICATEFUNCTION pred_or;
+PREDICATEFUNCTION pred_path;
+PREDICATEFUNCTION pred_perm;
+PREDICATEFUNCTION pred_print;
+PREDICATEFUNCTION pred_print0;
+PREDICATEFUNCTION pred_prune;
+PREDICATEFUNCTION pred_quit;
+PREDICATEFUNCTION pred_readable;
+PREDICATEFUNCTION pred_regex;
+PREDICATEFUNCTION pred_samefile;
+PREDICATEFUNCTION pred_size;
+PREDICATEFUNCTION pred_true;
+PREDICATEFUNCTION pred_type;
+PREDICATEFUNCTION pred_uid;
+PREDICATEFUNCTION pred_used;
+PREDICATEFUNCTION pred_user;
+PREDICATEFUNCTION pred_writable;
+PREDICATEFUNCTION pred_xtype;
+PREDICATEFUNCTION pred_context;
+
+
+
+int launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv);
+
+
+char *find_pred_name (PRED_FUNC pred_func);
+
+
+
+void print_predicate (FILE *fp, const struct predicate *p);
+void print_tree (FILE*, struct predicate *node, int indent);
+void print_list (FILE*, struct predicate *node);
+void print_optlist (FILE *fp, const struct predicate *node);
+void show_success_rates(const struct predicate *node);
+
+
+/* tree.c */
+bool matches_start_point(const char * glob, bool foldcase);
+struct predicate * build_expression_tree (int argc, char *argv[], int end_of_leading_options);
+struct predicate * get_eval_tree (void);
+struct predicate *get_new_pred_noarg (const struct parser_table *entry);
+struct predicate *get_new_pred (const struct parser_table *entry);
+struct predicate *get_new_pred_chk_op (const struct parser_table *entry,
+                                             const char *arg);
+float  calculate_derived_rates (struct predicate *p);
+
+/* util.c */
+bool fd_leak_check_is_enabled (void);
+struct predicate *insert_primary (const struct parser_table *entry, const char *arg);
+struct predicate *insert_primary_noarg (const struct parser_table *entry);
+struct predicate *insert_primary_withpred (const struct parser_table *entry, PRED_FUNC fptr, const char *arg);
+void usage (FILE *fp, int status, char *msg);
+extern bool check_nofollow(void);
+void complete_pending_execs(struct predicate *p);
+void complete_pending_execdirs (void);
+const char *safely_quote_err_filename (int n, char const *arg);
+void record_initial_cwd (void);
+bool is_exec_in_local_dir(const PRED_FUNC pred_func);
+
+void fatal_target_file_error (int errno_value, const char *name) ATTRIBUTE_NORETURN;
+void fatal_nontarget_file_error (int errno_value, const char *name) ATTRIBUTE_NORETURN;
+void nonfatal_target_file_error (int errno_value, const char *name);
+void nonfatal_nontarget_file_error (int errno_value, const char *name);
+
+
+int process_leading_options (int argc, char *argv[]);
+void set_option_defaults (struct options *p);
+void error_severity (int level);
+
+#if 0
+#define apply_predicate(pathname, stat_buf_ptr, node)  \
+  (*(node)->pred_func)((pathname), (stat_buf_ptr), (node))
+#else
+bool apply_predicate(const char *pathname, struct stat *stat_buf, struct predicate *p);
+#endif
+
+#define pred_is(node, fn) ( ((node)->pred_func) == (fn) )
+
+
+/* find.c. */
+int get_info (const char *pathname, struct stat *p, struct predicate *pred_ptr);
+bool following_links (void);
+bool digest_mode (mode_t *mode, const char *pathname, const char *name, struct stat *pstat, bool leaf);
+bool default_prints (struct predicate *pred);
+bool looks_like_expression (const char *arg, bool leading);
+
+
+enum DebugOption
+  {
+    DebugNone             = 0,
+    DebugExpressionTree   = 1,
+    DebugStat             = 2,
+    DebugSearch           = 4,
+    DebugTreeOpt          = 8,
+    DebugHelp             = 16,
+    DebugExec             = 32,
+    DebugSuccessRates     = 64
+  };
+
+struct options
+{
+  /* If true, process directory before contents.  True unless -depth given. */
+  bool do_dir_first;
+  /* If true, -depth was EXPLICITLY set (as opposed to having been turned
+   * on by -delete, for example).
+   */
+   bool explicit_depth;
+
+  /* If >=0, don't descend more than this many levels of subdirectories. */
+  int maxdepth;
+
+  /* If >=0, don't process files above this level. */
+  int mindepth;
+
+  /* If true, do not assume that files in directories with nlink == 2
+     are non-directories. */
+  bool no_leaf_check;
+
+  /* If true, don't cross filesystem boundaries. */
+  bool stay_on_filesystem;
+
+  /* If true, we ignore the problem where we find that a directory entry
+   * no longer exists by the time we get around to processing it.
+   */
+  bool ignore_readdir_race;
+
+  /* If true, pass control characters through.  If false, escape them
+   * or turn them into harmless things.
+   */
+  bool literal_control_chars;
+
+  /* If true, we issue warning messages
+   */
+  bool warnings;
+
+  /* If true, avoid POSIX-incompatible behaviours
+   * (this functionality is currently incomplete
+   * and at the moment affects mainly warning messages).
+   */
+  bool posixly_correct;
+
+  struct timespec      start_time;             /* Time at start of execution.  */
+
+  /* Either one day before now (the default), or the start of today (if -daystart is given). */
+  struct timespec      cur_day_start;
+
+  /* If true, cur_day_start has been adjusted to the start of the day. */
+  bool full_days;
+
+  int output_block_size;       /* Output block size.  */
+
+  /* bitmask for debug options */
+  unsigned long debug_options;
+
+  enum SymlinkOption symlink_handling;
+
+
+  /* Pointer to the function used to stat files. */
+  int (*xstat) (const char *name, struct stat *statbuf);
+
+
+  /* Indicate if we can implement safely_chdir() using the O_NOFOLLOW
+   * flag to open(2).
+   */
+  bool open_nofollow_available;
+
+  /* The variety of regular expression that we support.
+   * The default is POSIX Basic Regular Expressions, but this
+   * can be changed with the positional option, -regextype.
+   */
+  int regex_options;
+
+  /* function used to get file context */
+  int (*x_getfilecon) (int, const char *, security_context_t *);
+
+  /* Optimisation level.  One is the default.
+   */
+  unsigned short optimisation_level;
+
+
+  /* How should we quote filenames in error messages and so forth?
+   */
+  enum quoting_style err_quoting_style;
+};
+extern struct options options;
+
+
+struct state
+{
+  /* Current depth; 0 means current path is a command line arg. */
+  int curdepth;
+
+  /* If true, we have called stat on the current path. */
+  bool have_stat;
+
+  /* If true, we know the type of the current path. */
+  bool have_type;
+  mode_t type;                 /* this is the actual type */
+
+  /* The file being operated on, relative to the current directory.
+     Used for stat, readlink, remove, and opendir.  */
+  char *rel_pathname;
+  /* The directory fd to which rel_pathname is relative.  Thsi is relevant
+   * when we're navigating the hierarchy with fts() and using FTS_CWDFD.
+   */
+  int cwd_dir_fd;
+
+  /* Length of starting path. */
+  int starting_path_length;
+
+  /* If true, don't descend past current directory.
+     Can be set by -prune, -maxdepth, and -xdev/-mount. */
+  bool stop_at_current_level;
+
+  /* Status value to return to system. */
+  int exit_status;
+
+  /* True if there are any execdirs.  This saves us a pair of fchdir()
+   * calls for every directory we leave if it is false.  This is just
+   * an optimisation.  Set to true if you want to be conservative.
+   */
+  bool execdirs_outstanding;
+
+  /* Shared files, opened via the interface in sharefile.h. */
+  sharefile_handle shared_files;
+
+  /* Avoid multiple error messages for the same file. */
+  bool already_issued_stat_error_msg;
+};
+
+/* finddata.c */
+extern struct options options;
+extern struct state state;
+extern struct saved_cwd *initial_wd;
+
+#endif
diff --git a/find/find.1 b/find/find.1
new file mode 100644 (file)
index 0000000..e851f82
--- /dev/null
@@ -0,0 +1,2126 @@
+.TH FIND 1 \" -*- nroff -*-
+.SH NAME
+find \- search for files in a directory hierarchy
+.SH SYNOPSIS
+.B find
+[\-H] [\-L] [\-P] [\-D debugopts] [\-Olevel] [path...] [expression]
+.SH DESCRIPTION
+This manual page
+documents the GNU version of
+.BR find .
+GNU
+.B find
+searches the directory tree rooted at each given file name by
+evaluating the given expression from left to right, according to the
+rules of precedence (see section OPERATORS), until the outcome is
+known (the left hand side is false for \fIand\fR operations, true for
+\fIor\fR), at which point
+.B find
+moves on to the next file name.
+.PP
+If you are using
+.B find
+in an environment where security is important (for example if you are
+using it to search directories that are writable by other users), you
+should read the "Security Considerations" chapter of the findutils
+documentation, which is called \fBFinding Files\fP and comes with
+findutils.   That document also includes a lot more detail
+and discussion than this manual page, so you may find it a more useful
+source of information.
+.SH OPTIONS
+The
+.BR \-H ,
+.B \-L
+and
+.B \-P
+options control the treatment of symbolic
+links.  Command-line arguments following these are taken to be names
+of files or directories to be examined, up to the first argument that
+begins with `\-', or the argument `(' or `!'.  That argument and any
+following arguments are taken to be the expression describing what is
+to be searched for.  If no paths are given, the current directory is
+used.  If no expression is given, the expression
+.B \-print
+is used
+(but you should probably consider using
+.B \-print0
+instead, anyway).
+.PP
+This manual page talks about `options' within the expression list.
+These options control the behaviour of
+.B find
+but are specified immediately after the last path name.  The five
+`real' options
+.BR \-H ,
+.BR \-L ,
+.BR \-P ,
+.B  \-D
+and
+.B  \-O
+must appear before
+the first path name, if at all.  A double dash
+.B \-\-
+can also be used
+to signal that any remaining arguments are not options (though
+ensuring that all start points begin with either `./' or `/' is
+generally safer if you use wildcards in the list of start points).
+.IP \-P
+Never follow symbolic links.  This is the default behaviour.  When
+.B find
+examines or prints information a file, and the file is a symbolic
+link, the information used shall be taken from the properties of the
+symbolic link itself.
+
+.IP \-L
+Follow symbolic links.  When
+.B find
+examines or prints information about files, the information used shall
+be taken from the properties of the file to which the link points, not
+from the link itself (unless it is a broken symbolic link or
+.B find
+is unable to examine the file to which the link points).  Use of this
+option implies
+.BR \-noleaf .
+If you later use the
+.B \-P
+option,
+.B \-noleaf
+will still be in effect.  If
+.B \-L
+is in effect and
+.B find
+discovers a symbolic link to a subdirectory during its search,
+the subdirectory pointed to by the symbolic link will be searched.
+.IP
+When the
+.B \-L
+option is in effect, the
+.B \-type
+predicate will always
+match against the type of the file that a symbolic link points to
+rather than the link itself (unless the symbolic link is broken).
+Using
+.B \-L
+causes the
+.B \-lname
+and
+.B \-ilname
+predicates always to return
+false.
+
+.IP \-H
+Do not follow symbolic links, except while processing the command
+line arguments.  When
+.B find
+examines or prints information about files, the information used
+shall be taken from the properties of the symbolic link itself.   The
+only exception to this behaviour is when a file specified on the
+command line is a symbolic link, and the link can be resolved.  For
+that situation, the information used is taken from whatever the link
+points to (that is, the link is followed).  The information about the
+link itself is used as a fallback if the file pointed to by the
+symbolic link cannot be examined.  If
+.B \-H
+is in effect and one of the
+paths specified on the command line is a symbolic link to a directory,
+the contents of that directory will be examined (though of course
+\-maxdepth 0 would prevent this).
+.P
+If more than one of
+.BR \-H ,
+.B \-L
+and
+.B \-P
+is specified, each overrides the
+others; the last one appearing on the command line takes effect.
+Since it is the default, the
+.B \-P
+option should be considered to be in
+effect unless either
+.B \-H
+or
+.B \-L
+is specified.
+
+GNU
+.B find
+frequently stats files during the processing of the command line
+itself, before any searching has begun.  These options also affect how
+those arguments are processed.  Specifically, there are a number of
+tests that compare files listed on the command line against a file we
+are currently considering.  In each case, the file specified on the
+command line will have been examined and some of its properties will
+have been saved.  If the named file is in fact a symbolic link, and
+the
+.B \-P
+option is in effect (or if neither
+.B \-H
+nor
+.B \-L
+were specified), the information used for the comparison will be taken from
+the properties of the symbolic link.  Otherwise, it will be taken from
+the properties of the file the link points to.  If
+.B find
+cannot follow the link (for example because it has insufficient
+privileges or the link points to a nonexistent file) the properties of
+the link itself will be used.
+.P
+When the
+.B \-H
+or
+.B \-L options are in effect, any symbolic links listed
+as the argument of
+.B \-newer
+will be dereferenced, and the timestamp
+will be taken from the file to which the symbolic link points.  The
+same consideration applies to
+.BR \-newerXY ,
+.B \-anewer
+and
+.BR \-cnewer .
+
+The
+.B \-follow
+option has a similar effect to
+.BR \-L ,
+though it takes
+effect at the point where it appears (that is, if
+.B \-L
+is not used but
+.B \-follow
+is, any symbolic links appearing after
+.B \-follow
+on the
+command line will be dereferenced, and those before it will not).
+
+.IP "\-D debugoptions"
+Print diagnostic information; this can be helpful to diagnose problems
+with why
+.B find
+is not doing what you want.  The list of debug options should be comma
+separated.  Compatibility of the debug options is not guaranteed
+between releases of findutils.  For a complete list of valid debug
+options, see the output of
+.B find \-D
+.BR help .
+Valid debug options include
+.RS
+.IP help
+Explain the debugging options
+.IP tree
+Show the expression tree in its original and optimised form.
+.IP stat
+Print messages as files are examined with the
+.B stat
+and
+.B lstat
+system calls.  The
+.B find
+program tries to minimise such calls.
+.IP opt
+Prints diagnostic information relating to the optimisation of the
+expression tree; see the \-O option.
+.IP rates
+Prints a summary indicating how often each predicate succeeded or
+failed.
+.RE
+.IP \-Olevel
+Enables query optimisation.   The
+.B find
+program reorders tests to speed up execution while preserving the
+overall effect; that is, predicates with side effects are not
+reordered relative to each other.  The optimisations performed at each
+optimisation level are as follows.
+.RS
+.IP 0
+Equivalent to optimisation level 1.
+.IP 1
+This is the default optimisation level and corresponds to the
+traditional behaviour.  Expressions are reordered so that tests based
+only on the names of files (for example
+.B \-name
+and
+.BR \-regex )
+are performed first.
+.IP 2
+Any
+.B \-type
+or
+.B \-xtype
+tests are performed after any tests based only on the names of files,
+but before any tests that require information from the inode.  On many
+modern versions of Unix, file types are returned by
+.B readdir()
+and so these predicates are faster to evaluate than predicates which
+need to stat the file first.
+If you use the
+.B \-fstype
+.I FOO
+predicate and specify a filsystem type
+.I FOO
+which is not known (that is, present in `/etc/mtab') at the time
+.B find
+starts, that predicate is equivalent to
+.BR \-false .
+.IP 3
+At this optimisation level, the full cost-based query optimiser is
+enabled.  The order of tests is modified so that cheap (i.e. fast)
+tests are performed first and more expensive ones are performed later,
+if necessary.  Within each cost band, predicates are evaluated earlier
+or later according to whether they are likely to succeed or not.  For
+.BR \-o ,
+predicates which are likely to succeed are evaluated earlier, and for
+.BR \-a ,
+predicates which are likely to fail are evaluated earlier.
+.RE
+.IP
+The cost-based optimiser has a fixed idea of how likely any given test
+is to succeed.  In some cases the probability takes account of the
+specific nature of the test (for example,
+.B \-type f
+is assumed to be more likely to succeed than
+.BR "\-type c" ).
+The cost-based optimiser is currently being evaluated.   If it does
+not actually improve the performance of
+.BR find ,
+it will be removed again.  Conversely, optimisations that prove to be
+reliable, robust and effective may be enabled at lower optimisation
+levels over time.  However, the default behaviour (i.e. optimisation
+level 1) will not be changed in the 4.3.x release series.  The
+findutils test suite runs all the tests on
+.B find
+at each optimisation level and ensures that the result is the same.
+.P
+.SH EXPRESSIONS
+The expression is made up of options (which affect overall operation
+rather than the processing of a specific file, and always return
+true), tests (which return a true or false value), and actions (which
+have side effects and return a true or false value), all separated by
+operators.
+.B \-and
+is assumed where the operator is omitted.
+
+If the expression contains no actions other than
+.BR \-prune ,
+.B \-print
+is
+performed on all files for which the expression is true.
+
+.SS OPTIONS
+.P
+All options always return true.  Except for
+.BR \-daystart ,
+.B \-follow
+and
+.BR \-regextype ,
+the options affect all tests, including tests specified
+before the option.  This is because the options are processed when the
+command line is parsed, while the tests don't do anything until files
+are examined.  The
+.BR \-daystart ,
+.B \-follow
+and
+.B \-regextype
+options are different in this respect, and have an effect only on tests which
+appear later in the command line.  Therefore, for clarity, it is best
+to place them at the beginning of the expression.  A warning is issued
+if you don't do this.
+
+.IP \-d
+A synonym for \-depth, for compatibility with FreeBSD, NetBSD, MacOS X and OpenBSD.
+
+.IP \-daystart
+Measure times (for
+.BR \-amin ,
+.BR \-atime ,
+.BR \-cmin ,
+.BR \-ctime ,
+.BR \-mmin ,
+and
+.BR \-mtime )
+from the beginning of today rather than from 24 hours ago.  This
+option only affects tests which appear later on the command line.
+
+.IP \-depth
+Process each directory's contents before the directory itself.  The
+\-delete action also implies
+.BR \-depth .
+
+.IP \-follow
+Deprecated; use the
+.B \-L
+option instead.  Dereference symbolic links.
+Implies
+.BR \-noleaf .
+The
+.B \-follow
+option affects only those tests which
+appear after it on the command line.  Unless the
+.B \-H
+or
+.B \-L
+option has
+been specified, the position of the
+.B \-follow
+option changes the behaviour of the
+.B \-newer
+predicate; any files listed as the argument
+of
+.B \-newer
+will be dereferenced if they are symbolic links.  The same
+consideration applies to
+.BR \-newerXY ,
+.B \-anewer
+and
+.BR \-cnewer .
+Similarly, the
+.B \-type
+predicate will always match against the type of the file
+that a symbolic link points to rather than the link itself.  Using
+.B \-follow
+causes the
+.B \-lname and
+.B \-ilname
+predicates always to return false.
+
+.IP "\-help, \-\-help"
+Print a summary of the command-line usage of
+.B find
+and exit.
+
+.IP \-ignore_readdir_race
+Normally, \fBfind\fR will emit an error message when it fails to stat a file.
+If you give this option and a file is deleted between the time \fBfind\fR
+reads the name of the file from the directory and the time it tries to stat
+the file, no error message will be issued.    This also applies to files
+or directories whose names are given on the command line.  This option takes
+effect at the time the command line is read, which means that you cannot search
+one part of the filesystem with this option on and part of it with this option
+off (if you need to do that, you will need to issue two \fBfind\fR commands
+instead, one with the option and one without it).
+
+.IP "\-maxdepth \fIlevels\fR"
+Descend at most \fIlevels\fR (a non-negative integer) levels of
+directories below the command line arguments.
+.B \-maxdepth 0
+ means only apply the tests and actions to the command line arguments.
+
+.IP "\-mindepth \fIlevels\fR"
+Do not apply any tests or actions at levels less than \fIlevels\fR (a
+non-negative integer).
+.B \-mindepth 1
+means process all files except the command line arguments.
+
+.IP \-mount
+Don't descend directories on other filesystems.  An alternate name for
+.BR \-xdev ,
+for compatibility with some other versions of
+.BR find .
+
+.IP \-noignore_readdir_race
+Turns off the effect of
+.BR \-ignore_readdir_race .
+
+.IP "\-noleaf"
+Do not optimize by assuming that directories contain 2 fewer
+subdirectories than their hard link count.  This option is needed when
+searching filesystems that do not follow the Unix directory-link
+convention, such as CD-ROM or MS-DOS filesystems or AFS volume mount
+points.  Each directory on a normal Unix filesystem has at least 2
+hard links: its name and its `.'  entry.  Additionally, its
+subdirectories (if any) each have a `..'  entry linked to that
+directory.  When
+.B find
+is examining a directory, after it has statted 2 fewer subdirectories
+than the directory's link count, it knows that the rest of the entries
+in the directory are non-directories (`leaf' files in the directory
+tree).  If only the files' names need to be examined, there is no need
+to stat them; this gives a significant increase in search speed.
+
+.IP "\-regextype \fItype\fR"
+Changes the regular expression syntax understood by
+.B \-regex
+and
+.B \-iregex
+tests which occur later on the command line.  Currently-implemented
+types are emacs (this is the default), posix-awk, posix-basic,
+posix-egrep and posix-extended.
+
+.IP "\-version, \-\-version"
+Print the \fBfind\fR version number and exit.
+
+.IP "\-warn, \-nowarn"
+Turn warning messages on or off.  These warnings apply only to the
+command line usage, not to any conditions that
+.B find
+might encounter when it searches directories.  The default behaviour
+corresponds to
+.B \-warn
+if standard input is a tty, and to
+.B \-nowarn
+otherwise.
+
+.IP \-xdev
+Don't descend directories on other filesystems.
+
+.SS TESTS
+Some tests, for example
+.B \-newerXY
+and
+.BR -samefile ,
+allow comparison between the file currently being examined and some
+reference file specified on the command line.  When these tests are
+used, the interpretation of the reference file is determined by the
+options
+.BR \-H ,
+.B \-L
+and
+.B \-P
+and any previous
+.BR \-follow ,
+but the reference file is only examined once, at the time the command
+line is parsed.  If the reference file cannot be examined (for
+example, the
+.BR stat (2)
+system call fails for it), an error message is issued, and
+.B find
+exits with a nonzero status.
+.P
+Numeric arguments can be specified as
+.IP \fI+n\fP
+for greater than
+.IR n ,
+.IP \fI\-n\fP
+for less than
+.IR n ,
+.IP \fIn\fP
+for exactly
+.IR n .
+.P
+
+.IP "\-amin \fIn\fR"
+File was last accessed \fIn\fR minutes ago.
+
+.IP "\-anewer \fIfile\fR"
+File was last accessed more recently than \fIfile\fR was modified.  If
+\fIfile\fR is a symbolic link and the
+.B \-H
+option or the
+.B \-L
+option is in effect, the access time of the file it points to is
+always used.
+
+.IP "\-atime \fIn\fR"
+File was last accessed \fIn\fR*24 hours ago.
+When find figures out how many 24-hour periods ago the file
+was last accessed, any fractional part is ignored, so to match
+.B \-atime
+.BR +1 ,
+a file has to have been accessed at least
+.I two
+days ago.
+
+.IP "\-cmin \fIn\fR"
+File's status was last changed \fIn\fR minutes ago.
+
+.IP "\-cnewer \fIfile\fR"
+File's status was last changed more recently than \fIfile\fR was
+modified.  If \fIfile\fR is a symbolic link and the
+.B \-H
+option or the
+.B \-L
+option is in effect, the status-change time of the file it points
+to is always used.
+
+.IP "\-ctime \fIn\fR"
+File's status was last changed \fIn\fR*24 hours ago.
+See the comments for
+.B \-atime
+to understand how rounding affects the interpretation of file status
+change times.
+
+.IP \-empty
+File is empty and is either a regular file or a directory.
+
+.IP \-executable
+Matches files which are executable and directories which are
+searchable (in a file name resolution sense).  This takes into account
+access control lists and other permissions artefacts which the
+.B \-perm
+test ignores.  This test makes use of the
+.BR access (2)
+system call, and so can be fooled by NFS servers which do UID
+mapping (or root-squashing), since many systems implement
+.BR access (2)
+in the client's kernel and so cannot make use of the UID mapping
+information held on the server.  Because this test is based only on
+the result of the
+.BR access (2)
+system call, there is no guarantee that a file for which this test
+succeeds can actually be executed.
+
+.IP \-false
+Always false.
+
+.IP "\-fstype \fItype\fR"
+File is on a filesystem of type \fItype\fR.  The valid filesystem
+types vary among different versions of Unix; an incomplete list of
+filesystem types that are accepted on some version of Unix or another
+is: ufs, 4.2, 4.3, nfs, tmp, mfs, S51K, S52K.  You can use
+.B \-printf
+with the %F directive to see the types of your filesystems.
+
+.IP "\-gid \fIn\fR"
+File's numeric group ID is \fIn\fR.
+
+.IP "\-group \fIgname\fR"
+File belongs to group \fIgname\fR (numeric group ID allowed).
+
+.IP "\-ilname \fIpattern\fR"
+Like
+.BR \-lname ,
+but the match is case insensitive.
+If the
+.B \-L
+option or the
+.B \-follow
+option is in effect, this test returns false unless the symbolic link
+is broken.
+
+
+.IP "\-iname \fIpattern\fR"
+Like
+.BR \-name ,
+but the match is case insensitive.  For example, the
+patterns `fo*' and `F??' match the file names `Foo', `FOO', `foo',
+`fOo', etc.   The pattern `*foo*` will also match a file
+called '.foobar'.
+
+.IP "\-inum \fIn\fR"
+File has inode number \fIn\fR.  It is normally easier to use the
+.B \-samefile
+test instead.
+
+.IP "\-ipath \fIpattern\fR"
+Like
+.BR \-path .
+but the match is case insensitive.
+
+.IP "\-iregex \fIpattern\fR"
+Like
+.BR \-regex ,
+but the match is case insensitive.
+
+.IP "\-iwholename \fIpattern\fR"
+See \-ipath.    This alternative is less portable than
+.BR \-ipath .
+
+.IP "\-links \fIn\fR"
+File has \fIn\fR links.
+
+.IP "\-lname \fIpattern\fR"
+File is a symbolic link whose contents match shell pattern
+\fIpattern\fR.  The metacharacters do not treat `/' or `.' specially.
+If the
+.B \-L
+option or the
+.B \-follow
+option is in effect, this test returns false unless the symbolic link
+is broken.
+
+.IP "\-mmin \fIn\fR"
+File's data was last modified \fIn\fR minutes ago.
+
+.IP "\-mtime \fIn\fR"
+File's data was last modified \fIn\fR*24 hours ago.
+See the comments for
+.B \-atime
+to understand how rounding affects the interpretation of file
+modification times.
+
+.IP "\-name \fIpattern\fR"
+Base of file name (the path with the leading directories removed)
+matches shell pattern \fIpattern\fR.  Because the leading directories
+are removed, the file names considered for a match with
+.B \-name
+will never include a slash, so `\-name a/b' will never match anything
+(you probably need to use
+.B \-path
+instead).  The metacharacters (`*', `?',
+and `[]') match a `.' at the start of the base name (this is a change
+in findutils-4.2.2; see section STANDARDS CONFORMANCE below).  To ignore a
+directory and the files under it, use
+.BR \-prune ;
+see an example in the
+description of
+.BR \-path .
+Braces are not recognised as being
+special, despite the fact that some shells including Bash imbue braces
+with a special meaning in shell patterns.  The filename matching is
+performed with the use of the
+.BR fnmatch (3)
+library function.   Don't forget to enclose the pattern in quotes
+in order to protect it from expansion by the shell.
+
+.IP "\-newer \fIfile\fR"
+File was modified more recently than \fIfile\fR.  If \fIfile\fR is a
+symbolic link and the
+.B \-H
+option or the
+.B \-L
+option is in effect, the
+modification time of the file it points to is always used.
+
+.IP "\-newerXY \fIreference\fR"
+Compares the timestamp of the current file with \fIreference\fR.
+The
+.I reference
+argument is normally the name of a file (and one of its timestamps is
+used for the comparison) but it may also be a string describing an
+absolute time.
+.I X
+and
+.I Y
+are placeholders for other letters, and these letters select which
+time belonging to
+how
+.I reference
+is used for the comparison.
+.TS
+ll
+ll
+ll
+ll
+llw(2i).
+a      The access time of the file \fIreference\fR
+B      The birth time of the file \fIreference\fR
+c      The inode status change time of \fIreference\fR
+m      The modification time of the file \fIreference\fR
+t      \fIreference\fR is interpreted directly as a time
+.TE
+
+Some combinations are invalid; for example, it is invalid for
+.I X
+to be
+.IR t .
+Some combinations are not implemented on all systems; for example
+.I B
+is not supported on all systems.  If an invalid or unsupported
+combination of
+.I XY
+is specified, a fatal error results.  Time specifications are
+interpreted as for the argument to the
+.B \-d
+option of GNU
+.BR date .
+If you try to use the birth time of a reference file, and the birth
+time cannot be determined, a fatal error message results.  If you
+specify a test which refers to the birth time of files being examined,
+this test will fail for any files where the birth time is unknown.
+
+.IP \-nogroup
+No group corresponds to file's numeric group ID.
+
+.IP \-nouser
+No user corresponds to file's numeric user ID.
+
+.IP "\-path \fIpattern\fR"
+File name matches shell pattern \fIpattern\fR.  The metacharacters do
+not treat `/' or `.' specially; so, for example,
+.br
+.in +1i
+find . \-path "./sr*sc"
+.br
+.in -1i
+will print an entry for a directory called `./src/misc' (if one
+exists).  To ignore a whole directory tree, use
+.B \-prune
+rather than
+checking every file in the tree.  For example, to skip the
+directory `src/emacs' and all files and directories under it, and
+print the names of the other files found, do something like this:
+.br
+.in +1i
+find . \-path ./src/emacs \-prune \-o \-print
+.br
+.in -1i
+Note that the pattern match test applies to the whole file name,
+starting from one of the start points named on the command line.  It
+would only make sense to use an absolute path name here if the
+relevant start point is also an absolute path.  This means that this
+command will never match anything:
+.br
+.in +1i
+find bar \-path /foo/bar/myfile \-print
+.br
+.in -1i
+Find compares the
+.B \-path
+argument with the concatenation of a directory name and the base name
+of the file it's examining.  Since the concatenation will never end
+with a slash,
+.B \-path
+arguments ending in a slash will match nothing (except perhaps a start
+point specified on the command line).
+The predicate
+.B \-path
+is also supported by HP-UX
+.B find
+and will be in a forthcoming version of the POSIX standard.
+
+.IP "\-perm \fImode\fR"
+File's permission bits are exactly \fImode\fR (octal or symbolic).
+Since an exact match is required, if you want to use this form for
+symbolic modes, you may have to specify a rather complex mode string.
+For example `\-perm g=w' will only match files which have mode 0020
+(that is, ones for which group write permission is the only permission
+set).  It is more likely that you will want to use the `/' or `-'
+forms, for example `\-perm \-g=w', which matches any file with group
+write permission.  See the
+.B EXAMPLES
+section for some illustrative examples.
+
+.IP "\-perm \-\fImode\fR"
+All of the permission bits \fImode\fR are set for the file.
+Symbolic modes are accepted in this form, and this is usually the way
+in which would want to use them.  You must specify `u', `g' or `o' if
+you use a symbolic mode.   See the
+.B EXAMPLES
+section for some illustrative examples.
+
+.IP "\-perm /\fImode\fR"
+Any of the permission bits \fImode\fR are set for the file.  Symbolic
+modes are accepted in this form.  You must specify `u', `g' or `o' if
+you use a symbolic mode.  See the
+.B EXAMPLES
+section for some illustrative examples.  If no permission bits in
+.I mode
+are set, this test matches any file (the idea here is to be consistent
+with the behaviour of
+.B \-perm
+.BR \-000 ).
+
+.IP "\-perm +\fImode\fR"
+Deprecated, old way of searching for files with any of the permission
+bits in \fImode\fR set.  You should use
+.B \-perm \fI/mode\fR
+instead. Trying to use the `+' syntax with symbolic modes will yield
+surprising results.  For example, `+u+x' is a valid symbolic mode
+(equivalent to +u,+x, i.e. 0111) and will therefore not be evaluated
+as
+.B \-perm +\fImode\fR
+but instead as the exact mode specifier
+.B \-perm \fImode\fR
+and so it matches files with exact permissions 0111 instead of files with any
+execute bit set.  If you found this paragraph confusing, you're not
+alone - just use
+.B \-perm /\fImode\fR.
+This form of the
+.B \-perm
+test is deprecated because the POSIX specification requires the
+interpretation of a leading `+' as being part of a symbolic mode, and
+so we switched to using `/' instead.
+
+.IP \-readable
+Matches files which are readable.  This takes into account access
+control lists and other permissions artefacts which the
+.B \-perm
+test ignores.  This test makes use of the
+.BR access (2)
+system call, and so can be fooled by NFS servers which do UID
+mapping (or root-squashing), since many systems implement
+.BR access (2)
+in the client's kernel and so cannot make use of the UID mapping
+information held on the server.
+
+.IP "\-regex \fIpattern\fR"
+File name matches regular expression \fIpattern\fR.  This is a match
+on the whole path, not a search.  For example, to match a file named
+`./fubar3', you can use the regular expression `.*bar.' or `.*b.*3',
+but not `f.*r3'.  The regular expressions understood by
+.B find
+are by default Emacs Regular Expressions, but this can be
+changed with the
+.B \-regextype
+option.
+
+.IP "\-samefile \fIname\fR"
+File refers to the same inode as \fIname\fR.   When
+.B \-L
+is in effect, this can include symbolic links.
+
+.IP "\-size \fIn\fR[cwbkMG]"
+File uses \fIn\fP units of space.  The following suffixes
+can be used:
+.RS
+.IP `b'
+for 512-byte blocks (this is the default if no suffix is used)
+.IP `c'
+for bytes
+.IP `w'
+for two-byte words
+.IP `k'
+for Kilobytes (units of 1024 bytes)
+.IP `M'
+for Megabytes (units of 1048576 bytes)
+.IP `G'
+for Gigabytes (units of 1073741824 bytes)
+.RE
+.IP
+The size does not count indirect blocks, but it does count blocks in
+sparse files that are not actually allocated.  Bear in mind that the
+`%k' and `%b' format specifiers of
+.B \-printf
+handle sparse files
+differently.  The `b' suffix always denotes 512-byte blocks and never
+1 Kilobyte blocks, which is different to the behaviour of
+.BR \-ls .
+
+.IP \-true
+Always true.
+
+.IP "\-type \fIc\fR"
+File is of type \fIc\fR:
+.RS
+.IP b
+block (buffered) special
+.IP c
+character (unbuffered) special
+.IP d
+directory
+.IP p
+named pipe (FIFO)
+.IP f
+regular file
+.IP l
+symbolic link; this is never true if the
+.B \-L
+option or the
+.B \-follow
+option is in effect, unless the symbolic link is broken.  If you want
+to search for symbolic links when
+.B \-L
+is in effect, use
+.BR \-xtype .
+.IP s
+socket
+.IP D
+door (Solaris)
+.RE
+.IP "\-uid \fIn\fR"
+File's numeric user ID is \fIn\fR.
+
+.IP "\-used \fIn\fR"
+File was last accessed \fIn\fR days after its status was last changed.
+
+.IP "\-user \fIuname\fR"
+File is owned by user \fIuname\fR (numeric user ID allowed).
+
+.IP "\-wholename \fIpattern\fR"
+See \-path.    This alternative is less portable than
+.BR \-path .
+
+.IP "\-writable"
+Matches files which are writable.  This takes into account access
+control lists and other permissions artefacts which the
+.B \-perm
+test ignores.  This test makes use of the
+.BR access (2)
+system call, and so can be fooled by NFS servers which do UID
+mapping (or root-squashing), since many systems implement
+.BR access (2)
+in the client's kernel and so cannot make use of the UID mapping
+information held on the server.
+
+.IP "\-xtype \fIc\fR"
+The same as
+.B \-type
+unless the file is a symbolic link.  For symbolic
+links: if the
+.B \-H
+or
+.B \-P
+option was specified, true if the file is a
+link to a file of type \fIc\fR; if the
+.B \-L
+option has been given, true
+if \fIc\fR is `l'.  In other words, for symbolic links,
+.B \-xtype
+checks the type of the file that
+.B \-type
+does not check.
+.IP "\-context \fIpattern\fR"
+(SELinux only) Security context of the file matches glob \fIpattern\fR.
+
+.SS ACTIONS
+.IP "\-delete\fR"
+Delete files; true if removal succeeded.  If the removal failed, an
+error message is issued.
+If
+.B \-delete
+fails,
+.BR find 's
+exit status will be nonzero
+(when it eventually exits).
+Use of
+.B \-delete
+automatically turns on the
+.RB ` \-depth '
+option.
+
+.BR Warnings :
+Don't forget that the find command line is
+evaluated as an expression, so putting
+.B \-delete
+first will make
+.B find
+try to delete everything below the starting points you specified.
+When testing a
+.B find
+command line that you later intend to use with
+.BR \-delete ,
+you should explicitly specify
+.B \-depth
+in order to avoid later surprises.  Because
+.B \-delete
+implies
+.BR \-depth ,
+you cannot usefully use
+.B \-prune
+and
+.B \-delete
+together.
+
+.IP "\-exec \fIcommand\fR ;"
+Execute \fIcommand\fR; true if 0 status is returned.  All following
+arguments to
+.B find
+are taken to be arguments to the command until an argument consisting
+of `;' is encountered.  The string `{}' is replaced by the current
+file name being processed everywhere it occurs in the arguments to the
+command, not just in arguments where it is alone, as in some versions
+of
+.BR find .
+Both of these constructions might need to be escaped (with a `\e') or
+quoted to protect them from expansion by the shell.  See the
+.B EXAMPLES
+section for examples of the use of the
+.B \-exec
+option.  The specified
+command is run once for each matched file.
+The command is executed in the starting directory.   There are
+unavoidable security problems surrounding use of the
+.B \-exec
+action;
+you should use the
+.B \-execdir
+option instead.
+
+.IP "\-exec \fIcommand\fR {} +"
+This variant of the
+.B \-exec
+action runs the specified command on the
+selected files, but the command line is built by appending each
+selected file name at the end; the total number of invocations of the
+command will be much less than the number of matched files.  The
+command line is built in much the same way that
+.B xargs
+builds its command lines.  Only one instance of `{}' is allowed within
+the command.  The command is executed in the starting directory.
+
+.IP "\-execdir \fIcommand\fR ;"
+.IP "\-execdir \fIcommand\fR {} +"
+Like
+.BR \-exec ,
+but the specified command is run from the subdirectory
+containing the matched file, which is not normally the directory in
+which you started
+.BR find .
+This a much more secure method for invoking commands, as it avoids
+race conditions during resolution of the paths to the matched files.
+As with the
+.B \-exec
+action, the `+' form of
+.B \-execdir
+will build a
+command line to process more than one matched file, but any given
+invocation of
+.I command
+will only list files that exist in the same subdirectory.  If you use
+this option, you must ensure that your
+.B $PATH
+environment variable does not reference `.';
+otherwise, an attacker can run any commands they like by leaving an
+appropriately-named file in a directory in which you will run
+.BR \-execdir .
+The same applies to having entries in
+.B $PATH
+which are empty or which are not absolute directory names.
+
+.IP "\-fls \fIfile\fR"
+True; like
+.B \-ls
+but write to \fIfile\fR like
+.BR \-fprint .
+The output file is always created, even if the predicate is never
+matched.
+See the
+.B UNUSUAL FILENAMES
+section for information about how unusual characters in filenames are handled.
+
+.IP "\-fprint \fIfile\fR"
+True; print the full file name into file \fIfile\fR.  If \fIfile\fR
+does not exist when \fBfind\fR is run, it is created; if it does
+exist, it is truncated.  The file names `/dev/stdout' and
+`/dev/stderr' are handled specially; they refer to the standard
+output and standard error output, respectively.
+The output file is always created, even if the predicate is never matched.
+See the
+.B UNUSUAL FILENAMES
+section for information about how unusual characters in filenames are handled.
+
+.IP "\-fprint0 \fIfile\fR"
+True; like
+.B \-print0
+but write to \fIfile\fR like
+.BR \-fprint .
+The output file is always created, even if the predicate is never matched.
+See the
+.B UNUSUAL FILENAMES
+section for information about how unusual characters in filenames are handled.
+
+.IP "\-fprintf \fIfile\fR \fIformat\fR"
+True; like
+.B \-printf
+but write to \fIfile\fR like
+.BR \-fprint .
+The output file is always created, even if the predicate is never matched.
+See the
+.B UNUSUAL FILENAMES
+section for information about how unusual characters in filenames are handled.
+
+.IP \-ls
+True; list current file in
+.B ls \-dils
+format on standard output.
+The block counts are of 1K blocks, unless the environment variable
+POSIXLY_CORRECT is set, in which case 512-byte blocks are used.
+See the
+.B UNUSUAL FILENAMES
+section for information about how unusual characters in filenames are handled.
+
+.IP "\-ok \fIcommand\fR ;"
+Like
+.B \-exec
+but ask the user first.  If the user agrees, run the command.  Otherwise
+just return false.  If the command is run, its standard input is redirected
+from
+.BR /dev/null .
+
+.IP
+The response to the prompt is matched against a pair of regular
+expressions to determine if it is an affirmative or negative
+response.  This regular expression is obtained from the system if the
+`POSIXLY_CORRECT' environment variable is set, or otherwise from
+.BR find 's
+message translations.  If the system has no suitable
+definition,
+.BR find 's
+own definition will be used.   In either case, the interpretation of
+the regular expression itself will be affected by the environment
+variables 'LC_CTYPE' (character classes) and 'LC_COLLATE' (character
+ranges and equivalence classes).
+
+
+
+.IP "\-okdir \fIcommand\fR ;"
+Like
+.B \-execdir
+but ask the user first in the same way as for
+.BR \-ok .
+If the user does not agree, just return false.
+If the command is run, its standard input is redirected from
+.BR /dev/null .
+
+.IP \-print
+True; print the full file name on the standard output, followed by a
+newline.   If you are piping the output of
+.B find
+into another program and there is the faintest possibility that the files
+which you are searching for might contain a newline, then you should
+seriously consider using the
+.B \-print0
+option instead of
+.BR \-print .
+See the
+.B UNUSUAL FILENAMES
+section for information about how unusual characters in filenames are handled.
+
+.IP \-print0
+True; print the full file name on the standard output, followed by a
+null character (instead of the newline character that
+.B \-print
+uses).
+This allows file names that contain newlines or other types of white
+space to be correctly interpreted by programs that process the
+\fBfind\fR output.  This option corresponds to the
+.B \-0
+option of
+.BR xargs .
+
+.IP "\-printf \fIformat\fR"
+True; print \fIformat\fR on the standard output, interpreting `\e'
+escapes and `%' directives.  Field widths and precisions can be
+specified as with the `printf' C function.  Please note that many of
+the fields are printed as %s rather than %d, and this may mean that
+flags don't work as you might expect.  This also means that the `\-'
+flag does work (it forces fields to be left-aligned).  Unlike
+.BR \-print ,
+.B \-printf
+does not add a newline at the end of the string.  The escapes
+and directives are:
+.RS
+.IP \ea
+Alarm bell.
+.IP \eb
+Backspace.
+.IP \ec
+Stop printing from this format immediately and flush the output.
+.IP \ef
+Form feed.
+.IP \en
+Newline.
+.IP \er
+Carriage return.
+.IP \et
+Horizontal tab.
+.IP \ev
+Vertical tab.
+.IP \e0
+ASCII NUL.
+.IP \e\e
+A literal backslash (`\e').
+.IP \eNNN
+The character whose ASCII code is NNN (octal).
+.PP
+A `\e' character followed by any other character is treated as an
+ordinary character, so they both are printed.
+.IP %%
+A literal percent sign.
+.IP %a
+File's last access time in the format returned by the C `ctime' function.
+.IP %A\fIk\fP
+File's last access time in the format specified by \fIk\fR, which is
+either `@' or a directive for the C `strftime' function.  The possible
+values for \fIk\fR are listed below; some of them might not be
+available on all systems, due to differences in `strftime' between
+systems.
+.RS
+.IP @
+seconds since Jan. 1, 1970, 00:00 GMT, with fractional part.
+.PP
+Time fields:
+.IP H
+hour (00..23)
+.IP I
+hour (01..12)
+.IP k
+hour ( 0..23)
+.IP l
+hour ( 1..12)
+.IP M
+minute (00..59)
+.IP p
+locale's AM or PM
+.IP r
+time, 12-hour (hh:mm:ss [AP]M)
+.IP S
+Second (00.00 .. 61.00).  There is a fractional part.
+.IP T
+time, 24-hour (hh:mm:ss)
+.IP +
+Date and time, separated by `+', for example
+`2004\-04\-28+22:22:05.0'.  This is a GNU extension.  The time is
+given in the current timezone (which may be affected by setting the TZ
+environment variable).  The seconds field includes a fractional part.
+.IP X
+locale's time representation (H:M:S)
+.IP Z
+time zone (e.g., EDT), or nothing if no time zone is determinable
+.PP
+Date fields:
+.IP a
+locale's abbreviated weekday name (Sun..Sat)
+.IP A
+locale's full weekday name, variable length (Sunday..Saturday)
+.IP b
+locale's abbreviated month name (Jan..Dec)
+.IP B
+locale's full month name, variable length (January..December)
+.IP c
+locale's date and time (Sat Nov 04 12:02:33 EST 1989).  The format is
+the same as for
+.BR ctime (3)
+and so to preserve compatibility with that format, there is no fractional part
+in the seconds field.
+.IP d
+day of month (01..31)
+.IP D
+date (mm/dd/yy)
+.IP h
+same as b
+.IP j
+day of year (001..366)
+.IP m
+month (01..12)
+.IP U
+week number of year with Sunday as first day of week (00..53)
+.IP w
+day of week (0..6)
+.IP W
+week number of year with Monday as first day of week (00..53)
+.IP x
+locale's date representation (mm/dd/yy)
+.IP y
+last two digits of year (00..99)
+.IP Y
+year (1970...)
+.RE
+.IP %b
+The amount of disk space used for this file in 512-byte blocks. Since disk
+space is allocated in multiples of the filesystem block size this is usually
+greater than %s/512, but it can also be smaller if the file is a sparse file.
+.IP %c
+File's last status change time in the format returned by the C `ctime'
+function.
+.IP %C\fIk\fP
+File's last status change time in the format specified by \fIk\fR,
+which is the same as for %A.
+.IP %d
+File's depth in the directory tree; 0 means the file is a command line
+argument.
+.IP %D
+The device number on which the file exists (the st_dev field of struct
+stat), in decimal.
+.IP %f
+File's name with any leading directories removed (only the last element).
+.IP %F
+Type of the filesystem the file is on; this value can be used for
+\-fstype.
+.IP %g
+File's group name, or numeric group ID if the group has no name.
+.IP %G
+File's numeric group ID.
+.IP %h
+Leading directories of file's name (all but the last element).
+If the file name contains no slashes (since it is in the current
+directory) the %h specifier expands to ".".
+.IP %H
+Command line argument under which file was found.
+.IP %i
+File's inode number (in decimal).
+.IP %k
+The amount of disk space used for this file in 1K blocks. Since disk space is
+allocated in multiples of the filesystem block size this is usually greater
+than %s/1024, but it can also be smaller if the file is a sparse file.
+.IP %l
+Object of symbolic link (empty string if file is not a symbolic link).
+.IP %m
+File's permission bits (in octal).  This option uses the `traditional'
+numbers which most Unix implementations use, but if your particular
+implementation uses an unusual ordering of octal permissions bits, you
+will see a difference between the actual value of the file's mode and
+the output of %m.   Normally you will want to have a leading
+zero on this number, and to do this, you should use the
+.B #
+flag (as in, for example, `%#m').
+.IP %M
+File's permissions (in symbolic form, as for
+.BR ls ).
+This directive is supported in findutils 4.2.5 and later.
+.IP %n
+Number of hard links to file.
+.IP %p
+File's name.
+.IP %P
+File's name with the name of the command line argument under which
+it was found removed.
+.IP %s
+File's size in bytes.
+.IP %S
+File's sparseness.  This is calculated as (BLOCKSIZE*st_blocks /
+st_size).  The exact value you will get for an ordinary file of a
+certain length is system-dependent.  However, normally sparse files
+will have values less than 1.0, and files which use indirect blocks
+may have a value which is greater than 1.0.   The value used for
+BLOCKSIZE is system-dependent, but is usually 512 bytes.   If the file
+size is zero, the value printed is undefined.  On systems which lack
+support for st_blocks, a file's sparseness is assumed to be 1.0.
+.IP %t
+File's last modification time in the format returned by the C `ctime'
+function.
+.IP %T\fIk\fP
+File's last modification time in the format specified by \fIk\fR,
+which is the same as for %A.
+.IP %u
+File's user name, or numeric user ID if the user has no name.
+.IP %U
+File's numeric user ID.
+.IP %y
+File's type (like in
+.BR "ls \-l" ),
+U=unknown type (shouldn't happen)
+.IP %Y
+File's type (like %y), plus follow symlinks: L=loop, N=nonexistent
+.IP %Z
+(SELinux only) file's security context.
+.PP
+A `%' character followed by any other character is discarded, but the
+other character is printed (don't rely on this, as further format
+characters may be introduced).  A `%' at the end of the format
+argument causes undefined behaviour since there is no following
+character.  In some locales, it may hide your door keys, while in
+others it may remove the final page from the novel you are reading.
+
+The %m and %d directives support the
+.B #
+,
+.B 0
+and
+.B +
+flags, but the other directives do not, even if they
+print numbers.  Numeric directives that do not support these flags
+include
+.BR G ,
+.BR U ,
+.BR b ,
+.BR D ,
+.B  k
+and
+.BR n .
+The `\-' format flag is supported and changes the alignment of a field
+from right-justified (which is the default) to left-justified.
+.PP
+See the
+.B UNUSUAL FILENAMES
+section for information about how unusual characters in filenames are handled.
+
+
+.RE
+.IP \-prune
+True; if the file is a directory, do not descend into it. If
+.B \-depth
+is given, false; no effect.  Because
+.B \-delete
+implies
+.BR \-depth ,
+you cannot usefully use
+.B \-prune
+and
+.B \-delete together.
+
+.IP "\-quit"
+Exit immediately.  No child processes will be left running, but no more
+paths specified on the command line will be processed.  For example,
+.B find /tmp/foo /tmp/bar \-print \-quit
+will print only
+.BR /tmp/foo .
+Any command lines which have been built up with
+.B \-execdir ... {} +
+will be invoked before
+.B find
+exits.   The exit status may or may not be zero, depending on whether
+an error has already occurred.
+
+.SS UNUSUAL FILENAMES
+Many of the actions of
+.B find
+result in the printing of data which is under the control of other
+users.  This includes file names, sizes, modification times and so
+forth.  File names are a potential problem since they can contain any
+character except `\e0' and `/'.  Unusual characters in file names can
+do unexpected and often undesirable things to your terminal (for
+example, changing the settings of your function keys on some
+terminals).  Unusual characters are handled differently by various
+actions, as described below.
+
+.IP "\-print0, \-fprint0\"
+Always print the exact filename, unchanged, even if the output is
+going to a terminal.
+
+.IP "\-ls, \-fls"
+Unusual characters are always escaped.  White space, backslash, and
+double quote characters are printed using C-style escaping (for
+example `\ef', `\e"').  Other unusual characters are printed using an
+octal escape.  Other printable characters (for
+.B \-ls
+and
+.B \-fls
+these are the characters between octal 041 and 0176) are printed as-is.
+
+.IP "\-printf, \-fprintf"
+If the output is not going to a terminal, it is printed as-is.
+Otherwise, the result depends on which directive is in use.  The
+directives %D, %F, %g, %G, %H, %Y, and %y expand to values which are
+not under control of files' owners, and so are printed as-is.  The
+directives %a, %b, %c, %d, %i, %k, %m, %M, %n, %s, %t, %u and %U have
+values which are under the control of files' owners but which cannot
+be used to send arbitrary data to the terminal, and so these are
+printed as-is.  The directives %f, %h, %l, %p and %P are quoted.  This
+quoting is performed in the same way as for GNU
+.BR ls .
+This is not the same quoting mechanism as the one used for
+.B \-ls
+and
+.BR \-fls .
+If you are able to decide what format to use for the output of
+.B find
+then it is normally better to use `\e0' as a terminator
+than to use newline, as file names can contain white space and newline
+characters.  The setting of the `LC_CTYPE' environment
+variable is used to determine which characters need to be quoted.
+
+.IP "\-print, \-fprint"
+Quoting is handled in the same way as for
+.B \-printf
+and
+.BR \-fprintf .
+If you are using
+.B find
+in a script or in a situation where the matched files might have
+arbitrary names, you should consider using
+.B \-print0
+instead of
+.BR \-print .
+.P
+The
+.B \-ok
+and
+.B \-okdir
+actions print the current filename as-is.  This may change in a future release.
+
+.SS OPERATORS
+.P
+Listed in order of decreasing precedence:
+
+.IP "( \fIexpr\fR )"
+Force precedence.  Since parentheses are special to the shell, you
+will normally need to quote them.  Many of the examples in this manual
+page use backslashes for this purpose: `\e(...\e)' instead of `(...)'.
+
+.IP "! \fIexpr\fR"
+True if \fIexpr\fR is false.  This character will also usually need
+protection from interpretation by the shell.
+
+.IP "\-not \fIexpr\fR"
+Same as ! \fIexpr\fR, but not POSIX compliant.
+
+.IP "\fIexpr1 expr2\fR"
+Two expressions in a row are taken to be joined with an
+implied "and"; \fIexpr2\fR is not evaluated if \fIexpr1\fR is false.
+
+.IP "\fIexpr1\fR \-a \fIexpr2\fR"
+Same as \fIexpr1 expr2\fR.
+
+.IP "\fIexpr1\fR \-and \fIexpr2\fR"
+Same as \fIexpr1 expr2\fR, but not POSIX compliant.
+
+.IP "\fIexpr1\fR \-o \fIexpr2\fR"
+Or; \fIexpr2\fR is not evaluated if \fIexpr1\fR is true.
+
+.IP "\fIexpr1\fR \-or \fIexpr2\fR"
+Same as \fIexpr1\fR
+.B \-o
+\fIexpr2\fR, but not POSIX compliant.
+
+.IP "\fIexpr1\fR , \fIexpr2\fR"
+List; both \fIexpr1\fR and \fIexpr2\fR are always evaluated.  The
+value of \fIexpr1\fR is discarded; the value of the list is the value
+of \fIexpr2\fR. The comma operator can be useful for searching for
+several different types of thing, but traversing the filesystem
+hierarchy only once.  The
+.B \-fprintf
+action can be used to list the various matched items into several
+different output files.
+
+
+.SH "STANDARDS CONFORMANCE"
+For closest compliance to the POSIX standard, you should set the
+POSIXLY_CORRECT environment variable.  The following options are
+specified in the POSIX standard (IEEE Std 1003.1, 2003 Edition):
+
+.IP \fB\-H\fR
+This option is supported.
+
+.IP \fB\-L\fR
+This option is supported.
+
+.IP \fB\-name\fR
+This option is supported, but POSIX conformance depends on the
+POSIX conformance of the system's
+.BR fnmatch (3)
+library function.  As of findutils-4.2.2, shell metacharacters
+(`*', `?' or `[]' for example) will match a leading `.', because
+IEEE PASC interpretation 126 requires this.   This is a change from
+previous versions of findutils.
+
+.IP \fB\-type\fR
+Supported.   POSIX specifies `b', `c', `d', `l', `p', `f' and `s'.
+GNU find also supports `D', representing a Door, where the OS provides these.
+
+.IP \fB\-ok\fR
+Supported.
+Interpretation of the response is according to the "yes" and "no"
+patterns selected by setting the `LC_MESSAGES' environment variable.
+When the `POSIXLY_CORRECT' environment variable is set, these patterns
+are taken system's definition of a positive (yes) or negative (no)
+response. See the system's
+documentation for \fBnl_langinfo\fP(3), in particular YESEXPR and
+NOEXPR.    When `POSIXLY_CORRECT' is not set, the patterns are instead
+taken from
+.BR find 's
+own message catalogue.
+
+.IP \fB\-newer\fR
+Supported.  If the file specified is a symbolic link, it is always
+dereferenced.  This is a change from previous behaviour, which used to
+take the relevant time from the symbolic link; see the HISTORY section
+below.
+
+.IP \fB\-perm\fR
+Supported.  If the POSIXLY_CORRECT environment variable is not set,
+some mode arguments (for example +a+x) which are not valid in POSIX
+are supported for backward-compatibility.
+
+.IP "Other predicates"
+The predicates
+.BR \-atime ,
+.BR \-ctime ,
+.BR \-depth ,
+.BR \-group ,
+.BR \-links ,
+.BR \-mtime ,
+.BR \-nogroup ,
+.BR \-nouser ,
+.BR \-print ,
+.BR \-prune ,
+.BR \-size ,
+.BR \-user
+and
+.B \-xdev
+`\-atime',
+`\-ctime',
+`\-depth',
+`\-group',
+`\-links',
+`\-mtime',
+`\-nogroup',
+`\-nouser',
+`\-perm',
+`\-print',
+`\-prune',
+`\-size',
+`\-user' and
+`\-xdev',
+are all supported.
+
+.P
+The POSIX standard specifies parentheses `(', `)', negation `!' and the
+`and' and `or' operators (
+.BR \-a ,
+.BR \-o ).
+.P
+All other options, predicates, expressions and so forth are extensions
+beyond the POSIX standard.  Many of these extensions are not unique to
+GNU find, however.
+.P
+The POSIX standard requires that
+.B find
+detects loops:
+.IP
+The
+.B find
+utility shall detect infinite loops; that is, entering a
+previously visited directory that is an ancestor of the last file
+encountered. When it detects an infinite loop, find shall write a
+diagnostic message to standard error and shall either recover its
+position in the hierarchy or terminate.
+.P
+GNU
+.B find
+complies with these requirements.  The link count of
+directories which contain entries which are hard links to an ancestor
+will often be lower than they otherwise should be.  This can mean that
+GNU find will sometimes optimise away the visiting of a subdirectory
+which is actually a link to an ancestor.  Since
+.B find
+does not actually enter such a subdirectory, it is allowed to avoid
+emitting a diagnostic message.  Although this behaviour may be
+somewhat confusing, it is unlikely that anybody actually depends on
+this behaviour.  If the leaf optimisation has been turned off with
+.BR \-noleaf ,
+the directory entry will always be examined and the diagnostic message
+will be issued where it is appropriate.  Symbolic links cannot be used
+to create filesystem cycles as such, but if the
+.B \-L
+option or the
+.B \-follow
+option is in use, a diagnostic message is issued when
+.B find
+encounters a loop of symbolic links.  As with loops containing hard
+links, the leaf optimisation will often mean that
+.B find
+knows that it doesn't need to call
+.I stat()
+or
+.I chdir()
+on the symbolic link, so this diagnostic is frequently not necessary.
+.P
+The
+.B \-d
+option is supported for compatibility with various BSD systems,
+but you should use the POSIX-compliant option
+.B \-depth
+instead.
+.P
+The POSIXLY_CORRECT environment variable does not affect the behaviour
+of the
+.B \-regex
+or
+.B \-iregex
+tests because those tests aren't specified in the POSIX standard.
+.SH "ENVIRONMENT VARIABLES"
+
+.IP LANG
+Provides a default value for the internationalization variables that
+are unset or null.
+
+.IP LC_ALL
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+
+.IP LC_COLLATE
+The POSIX standard specifies that this variable affects the pattern
+matching to be used for the
+.B \-name
+option.   GNU find uses the
+.BR fnmatch (3)
+library function, and so support for `LC_COLLATE' depends on the
+system library.    This variable also affects the interpretation of
+the response to
+.BR \-ok;
+while the `LC_MESSAGES' variable selects the actual pattern used to
+interpret the response to
+.BR \-ok ,
+the interpretation of any bracket expressions in the pattern will be
+affected by `LC_COLLATE'.
+
+.IP LC_CTYPE
+This variable affects the treatment of character classes used in
+regular expressions and also with
+the
+.B \-name
+test, if the system's
+.BR fnmatch (3)
+library function supports this.  This variable also affects the
+interpretation of any character classes in the regular expressions
+used to interpret the response to the prompt issued by
+.BR \-ok .
+The `LC_CTYPE' environment variable will
+also affect which characters are considered to be unprintable when
+filenames are printed; see the section UNUSUAL FILENAMES.
+
+.IP LC_MESSAGES
+Determines the locale to be used for internationalised messages.  If
+the `POSIXLY_CORRECT' environment variable is set, this also
+determines the interpretation of the response to the prompt made by the
+.BR \-ok
+action.
+
+.IP NLSPATH
+Determines the location of the internationalisation message catalogues.
+
+.IP PATH
+Affects the directories which are searched to find the executables
+invoked by
+.BR \-exec ,
+.BR \-execdir ,
+.B \-ok
+and
+.BR \-okdir .
+
+.IP POSIXLY_CORRECT
+Determines the block size used by
+.B \-ls
+and
+.BR \-fls .
+If
+.B POSIXLY_CORRECT
+is set, blocks are units of 512 bytes.  Otherwise they are units of 1024 bytes.
+.IP
+Setting this variable also turns off
+warning messages (that is, implies
+.BR \-nowarn )
+by default, because POSIX requires that apart from
+the output for
+.BR \-ok ,
+all messages printed on stderr are diagnostics and must result in a
+non-zero exit status.
+.IP
+When POSIXLY_CORRECT is not set,
+.B \-perm
++zzz
+is treated just like
+.B \-perm
+/zzz
+if
++zzz is not a valid symbolic mode.  When POSIXLY_CORRECT is set, such
+constructs are treated as an error.
+.IP
+When POSIXLY_CORRECT is set, the response to the prompt made by the
+.B \-ok
+action is interpreted according to the system's message catalogue, as
+opposed to according to
+.BR find 's
+own message translations.
+
+.IP TZ
+Affects the time zone used for some of the time-related format
+directives of
+.B \-printf
+and
+.BR \-fprintf .
+.SH "EXAMPLES"
+.nf
+.B find /tmp \-name core \-type f \-print | xargs /bin/rm \-f
+
+.fi
+Find files named
+.B core
+in or below the directory
+.B /tmp
+and delete them.  Note that this will work incorrectly if there are
+any filenames containing newlines, single or double quotes, or spaces.
+.P
+.B find /tmp \-name core \-type f \-print0 | xargs \-0 /bin/rm \-f
+
+.fi
+Find files named
+.B core
+in or below the directory
+.B /tmp
+and delete them, processing filenames in such a way that file or
+directory names containing single or double quotes, spaces or newlines
+are correctly handled.  The
+.B \-name
+test comes before the
+.B \-type
+test in order to avoid having to call
+.B stat(2)
+on every file.
+
+.P
+.nf
+.B find . \-type f \-exec file \(aq{}\(aq \e\;
+
+.fi
+Runs `file' on every file in or below the current directory.  Notice
+that the braces are enclosed in single quote marks to protect them
+from interpretation as shell script punctuation.  The semicolon is
+similarly protected by the use of a backslash, though single quotes
+could have been used in that case also.
+
+.P
+.nf
+.B find / \e( \-perm \-4000 \-fprintf /root/suid.txt \(aq%#m %u %p\en\(aq \e) , \e
+.B  \e( \-size +100M \-fprintf /root/big.txt  \(aq%\-10s %p\en\(aq \e)
+
+.fi
+Traverse the filesystem just once, listing setuid files and
+directories into
+.B /root/suid.txt
+and large files into
+.BR /root/big.txt .
+
+.P
+.nf
+.B find $HOME  \-mtime 0
+
+.fi
+Search for files in your home directory which have been modified in
+the last twenty-four hours.  This command works this way because the
+time since each file was last modified is divided by 24 hours and any
+remainder is discarded.  That means that to match
+.B \-mtime
+.BR 0 ,
+a file will have to have a modification in the past which is less than
+24 hours ago.
+
+.P
+.nf
+.B find /sbin /usr/sbin -executable \e! -readable \-print
+
+.fi
+Search for files which are executable but not readable.
+
+.P
+.nf
+.B find . \-perm 664
+
+.fi
+Search for files which have read and write permission for their owner,
+and group, but which other users can read but not write to.  Files
+which meet these criteria but have other permissions bits set (for
+example if someone can execute the file) will not be matched.
+
+.P
+.nf
+.B find . \-perm \-664
+
+.fi
+Search for files which have read and write permission for their owner
+and group, and which other users can read, without regard to the
+presence of any extra permission bits (for example the executable
+bit).  This will match a file which has mode 0777, for example.
+
+.P
+.nf
+.B find . \-perm /222
+
+.fi
+Search for files which are writable by somebody (their owner, or
+their group, or anybody else).
+
+.P
+.nf
+.B find . \-perm /220
+.B find . \-perm /u+w,g+w
+.B find . \-perm /u=w,g=w
+
+.fi
+All three of these commands do the same thing, but the first one uses
+the octal representation of the file mode, and the other two use the
+symbolic form.  These commands all search for files which are
+writable by either their owner or their group.  The files don't have
+to be writable by both the owner and group to be matched; either will
+do.
+
+.P
+.nf
+.B find . \-perm \-220
+.B find . \-perm \-g+w,u+w
+
+.fi
+Both these commands do the same thing; search for files which are
+writable by both their owner and their group.
+
+.P
+.nf
+.B find . \-perm \-444 \-perm /222 ! \-perm /111
+.B find . \-perm \-a+r \-perm /a+w ! \-perm /a+x
+
+.fi
+These two commands both search for files that are readable for
+everybody (
+.B \-perm \-444
+or
+.BR "\-perm \-a+r" ),
+have at least one write bit
+set (
+.B \-perm /222
+or
+.BR "\-perm /a+w" )
+but are not executable for anybody (
+.B ! \-perm /111
+and
+.B ! \-perm /a+x
+respectively).
+
+.P
+.nf
+.B cd /source-dir
+.B find . \-name .snapshot \-prune \-o \e( \e! \-name "*~" \-print0 \e)|
+.B cpio \-pmd0   /dest-dir
+
+.fi
+This command copies the contents of
+.B /source-dir
+to
+.BR /dest-dir ,
+but omits files and directories named
+.B .snapshot
+(and anything in them).  It also omits files or directories whose name
+ends in
+.BR ~ ,
+but not their contents.  The construct
+.B \-prune \-o \e( ... \-print0 \e)
+is quite common.  The idea here is that the expression before
+.B \-prune
+matches things which are to be pruned.  However, the
+.B \-prune
+action itself returns true, so the following
+.B \-o
+ensures that the right hand side is evaluated only for those
+directories which didn't get pruned (the contents of the pruned
+directories are not even visited, so their contents are irrelevant).
+The expression on the right hand side of the
+.B \-o
+is in parentheses only for clarity.  It emphasises that the
+.B \-print0
+action takes place only for things that didn't have
+.B \-prune
+applied to them.  Because the default `and' condition between tests
+binds more tightly than
+.BR \-o ,
+this is the default anyway, but the parentheses help to show
+what is going on.
+
+.P
+.nf
+.B find repo/ -exec test -d {}/.svn \e; -or \e
+.B -exec test -d {}/.git \e; -or -exec test  -d {}/CVS \e; \e
+.B -print -prune
+.fi
+
+Given the following directory of projects and their associated SCM
+administrative directories, perform an efficient search for the
+projects' roots:
+
+.nf
+.B repo/project1/CVS
+.B repo/gnu/project2/.svn
+.B repo/gnu/project3/.svn
+.B repo/gnu/project3/src/.svn
+.B repo/project4/.git
+
+.fi
+In this example,
+.B \-prune
+prevents unnecessary descent into directories that have already been
+discovered (for example we do not search project3/src because we
+already found project3/.svn), but ensures sibling directories
+(project2 and project3) are found.
+
+.SH EXIT STATUS
+.PP
+.B find
+exits with status 0 if all files are processed successfully, greater
+than 0 if errors occur.   This is deliberately a very broad
+description, but if the return value is non-zero, you should not rely
+on the correctness of the results of
+.BR find .
+
+.SH "SEE ALSO"
+\fBlocate\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1), \fBxargs\fP(1),
+\fBchmod\fP(1), \fBfnmatch\fP(3), \fBregex\fP(7), \fBstat\fP(2),
+\fBlstat\fP(2), \fBls\fP(1), \fBprintf\fP(3), \fBstrftime\fP(3),
+\fBctime\fP(3), \fBFinding Files\fP (on-line in Info, or printed).
+.SH "HISTORY"
+As of findutils-4.2.2, shell metacharacters (`*', `?' or `[]' for
+example) used in filename patterns will match a leading `.', because
+IEEE POSIX interpretation 126 requires this.
+.P
+The syntax
+\.B \-perm +MODE
+was deprecated in findutils-4.2.21, in favour of
+\.B \-perm
+.BR /MODE .
+As of findutils-4.3.3,
+.B \-perm /000
+now matches all files instead of none.
+.P
+Nanosecond-resolution
+timestamps were implemented in findutils-4.3.3.
+.P
+As of findutils-4.3.11, the
+.B \-delete
+action sets
+.BR find 's
+exit status to a nonzero value when it fails.
+However,
+.B find
+will not exit immediately.  Previously,
+.BR find 's
+exit status was unaffected by the failure of
+.BR \-delete .
+.TS
+l l l .
+Feature        Added in        Also occurs in
+\-newerXY      4.3.3   BSD
+\-D    4.3.1
+\-O    4.3.1
+\-readable     4.3.0
+\-writable     4.3.0
+\-executable   4.3.0
+\-regextype    4.2.24
+\-exec ... +   4.2.12  POSIX
+\-execdir      4.2.12  BSD
+\-okdir        4.2.12
+\-samefile     4.2.11
+\-H    4.2.5   POSIX
+\-L    4.2.5   POSIX
+\-P    4.2.5   BSD
+\-delete       4.2.3
+\-quit 4.2.3
+\-d    4.2.3   BSD
+\-wholename    4.2.0
+\-iwholename   4.2.0
+\-ignore_readdir_race  4.2.0
+\-fls  4.0
+\-ilname       3.8
+\-iname        3.8
+\-ipath        3.8
+\-iregex       3.8
+.TE
+.SH "NON-BUGS"
+.nf
+.B $ find . \-name *.c \-print
+find: paths must precede expression
+Usage: find [\-H] [\-L] [\-P] [\-Olevel] [\-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
+.fi
+.P
+This happens because
+.I *.c
+has been expanded by the shell
+resulting in
+.B find
+actually receiving a command line like this:
+.nf
+
+.B find . \-name bigram.c code.c frcode.c locate.c \-print
+
+.fi
+That command is of course not going to work.  Instead of doing things
+this way, you should enclose the pattern in quotes or escape the wildcard:
+.nf
+.B $ find . \-name \(aq*.c\(aq \-print
+.B $ find . \-name \e*.c \-print
+.fi
+
+.SH "BUGS"
+.P
+There are security problems inherent in the behaviour that the POSIX
+standard specifies for
+.BR find ,
+which therefore cannot be fixed.  For example, the
+.B \-exec
+action is
+inherently insecure, and
+.B \-execdir
+should be used instead.
+Please see \fBFinding Files\fP for more information.
+.P
+The environment variable
+.B  LC_COLLATE
+has no effect on the
+.B \-ok
+action.
+.P
+The best way to report a bug is to use the form at
+http://savannah.gnu.org/bugs/?group=findutils.
+The reason for this is that you will then be able to track progress in
+fixing the problem.   Other comments about \fBfind\fP(1) and about
+the findutils package in general can be sent to the
+.I bug\-findutils
+mailing list.  To join the list, send email to
+.IR bug\-findutils\-request@gnu.org .
diff --git a/find/find.c b/find/find.c
new file mode 100644 (file)
index 0000000..98d5a37
--- /dev/null
@@ -0,0 +1,1495 @@
+/* find -- search for files in a directory hierarchy
+   Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005,
+                 2007, 2008, 2009, 2010 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/>.
+*/
+/* GNU find was written by Eric Decker <cire@soe.ucsc.edu>,
+   with enhancements by David MacKenzie <djm@gnu.org>,
+   Jay Plett <jay@silence.princeton.nj.us>,
+   and Tim Wood <axolotl!tim@toad.com>.
+   The idea for -print0 and xargs -0 came from
+   Dan Bernstein <brnstnd@kramden.acf.nyu.edu>.
+   Improvements have been made by James Youngman <jay@gnu.org>.
+*/
+
+
+#include <config.h>
+#include "defs.h"
+
+#define USE_SAFE_CHDIR 1
+#undef  STAT_MOUNTPOINTS
+
+
+#include <errno.h>
+#include <assert.h>
+
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "fcntl--.h"
+#include "xalloc.h"
+#include "human.h"
+#include "canonicalize.h"
+
+#include "closein.h"
+#include "savedirinfo.h"
+#include "buildcmd.h"
+#include "dirname.h"
+#include "xgetcwd.h"
+#include "error.h"
+#include "fdleak.h"
+#include "progname.h"
+#include "save-cwd.h"
+
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define _(Text) Text
+#define textdomain(Domain)
+#define bindtextdomain(Package, Directory)
+#define ngettext(singular,plural,n) ((1==n) ? singular : plural)
+#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
+
+#ifdef STAT_MOUNTPOINTS
+static void init_mounted_dev_list (int mandatory);
+#endif
+
+static void process_top_path (char *pathname, mode_t mode);
+static int process_path (char *pathname, char *name, bool leaf, char *parent, mode_t type);
+static void process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, char *parent);
+
+
+
+/* A file descriptor open to the initial working directory.
+   Doing it this way allows us to work when the i.w.d. has
+   unreadable parents.  */
+extern int starting_desc;
+
+/* The stat buffer of the initial working directory. */
+static struct stat starting_stat_buf;
+
+enum ChdirSymlinkHandling
+  {
+    SymlinkHandleDefault,      /* Normally the right choice */
+    SymlinkFollowOk            /* see comment in process_top_path() */
+  };
+
+
+enum TraversalDirection
+  {
+    TraversingUp,
+    TraversingDown
+  };
+
+enum WdSanityCheckFatality
+  {
+    FATAL_IF_SANITY_CHECK_FAILS,
+    RETRY_IF_SANITY_CHECK_FAILS,
+    NON_FATAL_IF_SANITY_CHECK_FAILS
+  };
+
+
+int
+get_current_dirfd (void)
+{
+  return AT_FDCWD;
+}
+
+
+int
+main (int argc, char **argv)
+{
+  int i;
+  int end_of_leading_options = 0; /* First arg after any -H/-L etc. */
+  struct predicate *eval_tree;
+
+  if (argv[0])
+    set_program_name (argv[0]);
+  else
+    set_program_name ("find");
+
+  state.exit_status = 0;
+
+  if (fd_leak_check_is_enabled ())
+    {
+      remember_non_cloexec_fds ();
+    }
+
+  record_initial_cwd ();
+
+  state.already_issued_stat_error_msg = false;
+  state.shared_files = sharefile_init ("w");
+  if (NULL == state.shared_files)
+    {
+      error (EXIT_FAILURE, errno,
+            _("Failed initialise shared-file hash table"));
+    }
+
+  /* Set the option defaults before we do the locale
+   * initialisation as check_nofollow () needs to be executed in the
+   * POSIX locale.
+   */
+  set_option_defaults (&options);
+
+#ifdef HAVE_SETLOCALE
+  setlocale (LC_ALL, "");
+#endif
+  bindtextdomain (PACKAGE, LOCALEDIR);
+  textdomain (PACKAGE);
+  atexit (close_stdin);
+
+  /* Check for -P, -H or -L options. */
+  end_of_leading_options = process_leading_options (argc, argv);
+
+  if (options.debug_options & DebugStat)
+    options.xstat = debug_stat;
+
+#ifdef DEBUG
+  fprintf (stderr, "cur_day_start = %s", ctime (&options.cur_day_start));
+#endif /* DEBUG */
+
+  /* state.cwd_dir_fd has to be initialised before we call build_expression_tree ()
+   * because command-line parsing may lead us to stat some files.
+   */
+  state.cwd_dir_fd = AT_FDCWD;
+
+  /* We are now processing the part of the "find" command line
+   * after the -H/-L options (if any).
+   */
+  eval_tree = build_expression_tree (argc, argv, end_of_leading_options);
+
+
+  /* safely_chdir () needs to check that it has ended up in the right place.
+   * To avoid bailing out when something gets automounted, it checks if
+   * the target directory appears to have had a directory mounted on it as
+   * we chdir ()ed.  The problem with this is that in order to notice that
+   * a file system was mounted, we would need to lstat () all the mount points.
+   * That strategy loses if our machine is a client of a dead NFS server.
+   *
+   * Hence if safely_chdir () and wd_sanity_check () can manage without needing
+   * to know the mounted device list, we do that.
+   */
+  if (!options.open_nofollow_available)
+    {
+#ifdef STAT_MOUNTPOINTS
+      init_mounted_dev_list (0);
+#endif
+    }
+
+
+  set_stat_placeholders (&starting_stat_buf);
+  if ((*options.xstat) (".", &starting_stat_buf) != 0)
+    error (EXIT_FAILURE, errno, _("cannot stat current directory"));
+
+  /* If no paths are given, default to ".".  */
+  for (i = end_of_leading_options; i < argc && !looks_like_expression (argv[i], true); i++)
+    {
+      process_top_path (argv[i], 0);
+    }
+
+  /* If there were no path arguments, default to ".". */
+  if (i == end_of_leading_options)
+    {
+      /*
+       * We use a temporary variable here because some actions modify
+       * the path temporarily.  Hence if we use a string constant,
+       * we get a coredump.  The best example of this is if we say
+       * "find -printf %H" (note, not "find . -printf %H").
+       */
+      char defaultpath[2] = ".";
+      process_top_path (defaultpath, 0);
+    }
+
+  /* If "-exec ... {} +" has been used, there may be some
+   * partially-full command lines which have been built,
+   * but which are not yet complete.   Execute those now.
+   */
+  show_success_rates (eval_tree);
+  cleanup ();
+  return state.exit_status;
+}
+
+bool is_fts_enabled (int *ftsoptions)
+{
+  /* this version of find (i.e. this main ()) does not use fts. */
+  *ftsoptions = 0;
+  return false;
+}
+
+
+static char *
+specific_dirname (const char *dir)
+{
+  char dirbuf[1024];
+
+  if (0 == strcmp (".", dir))
+    {
+      /* OK, what's '.'? */
+      if (NULL != getcwd (dirbuf, sizeof (dirbuf)))
+       {
+         return strdup (dirbuf);
+       }
+      else
+       {
+         return strdup (dir);
+       }
+    }
+  else
+    {
+      char *result = canonicalize_filename_mode (dir, CAN_EXISTING);
+      if (NULL == result)
+       return strdup (dir);
+      else
+       return result;
+    }
+}
+
+
+
+/* Return non-zero if FS is the name of a file system that is likely to
+ * be automounted
+ */
+static int
+fs_likely_to_be_automounted (const char *fs)
+{
+  return ( (0==strcmp (fs, "nfs")) || (0==strcmp (fs, "autofs")) || (0==strcmp (fs, "subfs")));
+}
+
+
+
+#ifdef STAT_MOUNTPOINTS
+static dev_t *mounted_devices = NULL;
+static size_t num_mounted_devices = 0u;
+
+
+static void
+init_mounted_dev_list (int mandatory)
+{
+  assert (NULL == mounted_devices);
+  assert (0 == num_mounted_devices);
+  mounted_devices = get_mounted_devices (&num_mounted_devices);
+  if (mandatory && (NULL == mounted_devices))
+    {
+      error (EXIT_FAILURE, 0, _("Cannot read list of mounted devices."));
+    }
+}
+
+static void
+refresh_mounted_dev_list (void)
+{
+  if (mounted_devices)
+    {
+      free (mounted_devices);
+      mounted_devices = 0;
+    }
+  num_mounted_devices = 0u;
+  init_mounted_dev_list (1);
+}
+
+
+/* Search for device DEV in the array LIST, which is of size N. */
+static int
+dev_present (dev_t dev, const dev_t *list, size_t n)
+{
+  if (list)
+    {
+      while (n-- > 0u)
+       {
+         if ( (*list++) == dev )
+           return 1;
+       }
+    }
+  return 0;
+}
+
+enum MountPointStateChange
+  {
+    MountPointRecentlyMounted,
+    MountPointRecentlyUnmounted,
+    MountPointStateUnchanged
+  };
+
+
+
+static enum MountPointStateChange
+get_mount_state (dev_t newdev)
+{
+  int new_is_present, new_was_present;
+
+  new_was_present = dev_present (newdev, mounted_devices, num_mounted_devices);
+  refresh_mounted_dev_list ();
+  new_is_present  = dev_present (newdev, mounted_devices, num_mounted_devices);
+
+  if (new_was_present == new_is_present)
+    return MountPointStateUnchanged;
+  else if (new_is_present)
+    return MountPointRecentlyMounted;
+  else
+    return MountPointRecentlyUnmounted;
+}
+
+
+
+/* We stat()ed a directory, chdir()ed into it (we know this
+ * since direction is TraversingDown), stat()ed it again,
+ * and noticed that the device numbers are different.  Check
+ * if the file system was recently mounted.
+ *
+ * If it was, it looks like chdir()ing into the directory
+ * caused a file system to be mounted.  Maybe automount is
+ * running.  Anyway, that's probably OK - but it happens
+ * only when we are moving downward.
+ *
+ * We also allow for the possibility that a similar thing
+ * has happened with the unmounting of a file system.  This
+ * is much rarer, as it relies on an automounter timeout
+ * occurring at exactly the wrong moment.
+ */
+static enum WdSanityCheckFatality
+dirchange_is_fatal (const char *specific_what,
+                   enum WdSanityCheckFatality isfatal,
+                   int silent,
+                   struct stat *newinfo)
+{
+  enum MountPointStateChange transition = get_mount_state (newinfo->st_dev);
+  switch (transition)
+    {
+    case MountPointRecentlyUnmounted:
+      isfatal = NON_FATAL_IF_SANITY_CHECK_FAILS;
+      if (!silent)
+       {
+         error (0, 0,
+                _("WARNING: file system %s has recently been unmounted."),
+                safely_quote_err_filename (0, specific_what));
+       }
+      break;
+
+    case MountPointRecentlyMounted:
+      isfatal = NON_FATAL_IF_SANITY_CHECK_FAILS;
+      if (!silent)
+       {
+         error (0, 0,
+                _("WARNING: file system %s has recently been mounted."),
+                safely_quote_err_filename (0, specific_what));
+       }
+      break;
+
+    case MountPointStateUnchanged:
+      /* leave isfatal as it is */
+      break;
+    }
+
+  return isfatal;
+}
+
+
+#endif
+
+
+
+/* Examine the results of the stat() of a directory from before we
+ * entered or left it, with the results of stat()ing it afterward.  If
+ * these are different, the file system tree has been modified while we
+ * were traversing it.  That might be an attempt to use a race
+ * condition to persuade find to do something it didn't intend
+ * (e.g. an attempt by an ordinary user to exploit the fact that root
+ * sometimes runs find on the whole file system).  However, this can
+ * also happen if automount is running (certainly on Solaris).  With
+ * automount, moving into a directory can cause a file system to be
+ * mounted there.
+ *
+ * To cope sensibly with this, we will raise an error if we see the
+ * device number change unless we are chdir()ing into a subdirectory,
+ * and the directory we moved into has been mounted or unmounted "recently".
+ * Here "recently" means since we started "find" or we last re-read
+ * the /etc/mnttab file.
+ *
+ * If the device number does not change but the inode does, that is a
+ * problem.
+ *
+ * If the device number and inode are both the same, we are happy.
+ *
+ * If a file system is (un)mounted as we chdir() into the directory, that
+ * may mean that we're now examining a section of the file system that might
+ * have been excluded from consideration (via -prune or -quit for example).
+ * Hence we print a warning message to indicate that the output of find
+ * might be inconsistent due to the change in the file system.
+ */
+static bool
+wd_sanity_check (const char *thing_to_stat,
+               const char *progname,
+               const char *what,
+               dev_t old_dev,
+               ino_t old_ino,
+               struct stat *newinfo,
+               int parent,
+               int line_no,
+               enum TraversalDirection direction,
+               enum WdSanityCheckFatality isfatal,
+               bool *changed) /* output parameter */
+{
+  const char *fstype;
+  char *specific_what = NULL;
+  int silent = 0;
+  const char *current_dir = ".";
+
+  *changed = false;
+
+  set_stat_placeholders (newinfo);
+  if ((*options.xstat) (current_dir, newinfo) != 0)
+    fatal_target_file_error (errno, thing_to_stat);
+
+  if (old_dev != newinfo->st_dev)
+    {
+      *changed = true;
+      specific_what = specific_dirname (what);
+      fstype = filesystem_type (newinfo, current_dir);
+      silent = fs_likely_to_be_automounted (fstype);
+
+      /* This condition is rare, so once we are here it is
+       * reasonable to perform an expensive computation to
+       * determine if we should continue or fail.
+       */
+      if (TraversingDown == direction)
+       {
+#ifdef STAT_MOUNTPOINTS
+         isfatal = dirchange_is_fatal (specific_what,isfatal,silent,newinfo);
+#else
+         isfatal = RETRY_IF_SANITY_CHECK_FAILS;
+#endif
+       }
+
+      switch (isfatal)
+       {
+       case FATAL_IF_SANITY_CHECK_FAILS:
+         {
+           fstype = filesystem_type (newinfo, current_dir);
+           error (EXIT_FAILURE, 0,
+                  _("%s%s changed during execution of %s (old device number %ld, new device number %ld, file system type is %s) [ref %ld]"),
+                  safely_quote_err_filename (0, specific_what),
+                  parent ? "/.." : "",
+                  safely_quote_err_filename (1, progname),
+                  (long) old_dev,
+                  (long) newinfo->st_dev,
+                  fstype,
+                  (long)line_no);
+           /*NOTREACHED*/
+           return false;
+         }
+
+       case NON_FATAL_IF_SANITY_CHECK_FAILS:
+         {
+           /* Since the device has changed under us, the inode number
+            * will almost certainly also be different. However, we have
+            * already decided that this is not a problem.  Hence we return
+            * without checking the inode number.
+            */
+           free (specific_what);
+           return true;
+         }
+
+       case RETRY_IF_SANITY_CHECK_FAILS:
+         return false;
+       }
+    }
+
+  /* Device number was the same, check if the inode has changed. */
+  if (old_ino != newinfo->st_ino)
+    {
+      *changed = true;
+      specific_what = specific_dirname (what);
+      fstype = filesystem_type (newinfo, current_dir);
+
+      error ((isfatal == FATAL_IF_SANITY_CHECK_FAILS) ? 1 : 0,
+            0,                 /* no relevant errno value */
+            _("%s%s changed during execution of %s "
+              "(old inode number %" PRIuMAX ", new inode number %" PRIuMAX
+              ", file system type is %s) [ref %ld]"),
+            safely_quote_err_filename (0, specific_what),
+            parent ? "/.." : "",
+            safely_quote_err_filename (1, progname),
+            (uintmax_t) old_ino,
+            (uintmax_t) newinfo->st_ino,
+            fstype,
+            (long)line_no);
+      free (specific_what);
+      return false;
+    }
+
+  return true;
+}
+
+enum SafeChdirStatus
+  {
+    SafeChdirOK,
+    SafeChdirFailSymlink,
+    SafeChdirFailNotDir,
+    SafeChdirFailStat,
+    SafeChdirFailWouldBeUnableToReturn,
+    SafeChdirFailChdirFailed,
+    SafeChdirFailNonexistent,
+    SafeChdirFailDestUnreadable
+  };
+
+/* Safely perform a change in directory.  We do this by calling
+ * lstat() on the subdirectory, using chdir() to move into it, and
+ * then lstat()ing ".".  We compare the results of the two stat calls
+ * to see if they are consistent.  If not, we sound the alarm.
+ *
+ * If following_links() is true, we do follow symbolic links.
+ */
+static enum SafeChdirStatus
+safely_chdir_lstat (const char *dest,
+                   enum TraversalDirection direction,
+                   struct stat *statbuf_dest,
+                   enum ChdirSymlinkHandling symlink_follow_option,
+                   bool *did_stat)
+{
+  struct stat statbuf_arrived;
+  int rv, dotfd=-1;
+  int saved_errno;             /* specific_dirname() changes errno. */
+  bool rv_set = false;
+  bool statflag = false;
+  int tries = 0;
+  enum WdSanityCheckFatality isfatal = RETRY_IF_SANITY_CHECK_FAILS;
+
+  saved_errno = errno = 0;
+
+  dotfd = open_cloexec (".", O_RDONLY
+#if defined O_LARGEFILE
+                       |O_LARGEFILE
+#endif
+                       );
+
+  /* We jump back to here if wd_sanity_check()
+   * recoverably triggers an alert.
+   */
+ retry:
+  ++tries;
+
+  if (dotfd >= 0)
+    {
+      /* Stat the directory we're going to. */
+      set_stat_placeholders (statbuf_dest);
+      if (0 == options.xstat (dest, statbuf_dest))
+       {
+         statflag = true;
+
+#ifdef S_ISLNK
+         /* symlink_follow_option might be set to SymlinkFollowOk, which
+          * would allow us to chdir() into a symbolic link.  This is
+          * only useful for the case where the directory we're
+          * chdir()ing into is the basename of a command line
+          * argument, for example where "foo/bar/baz" is specified on
+          * the command line.  When -P is in effect (the default),
+          * baz will not be followed if it is a symlink, but if bar
+          * is a symlink, it _should_ be followed.  Hence we need the
+          * ability to override the policy set by following_links().
+          */
+         if (!following_links () && S_ISLNK(statbuf_dest->st_mode))
+           {
+             /* We're not supposed to be following links, but this is
+              * a link.  Check symlink_follow_option to see if we should
+              * make a special exception.
+              */
+             if (symlink_follow_option == SymlinkFollowOk)
+               {
+                 /* We need to re-stat() the file so that the
+                  * sanity check can pass.
+                  */
+                 if (0 != stat (dest, statbuf_dest))
+                   {
+                     rv = SafeChdirFailNonexistent;
+                     rv_set = true;
+                     saved_errno = errno;
+                     goto fail;
+                   }
+                 statflag = true;
+               }
+             else
+               {
+                 /* Not following symlinks, so the attempt to
+                  * chdir() into a symlink should be prevented.
+                  */
+                 rv = SafeChdirFailSymlink;
+                 rv_set = true;
+                 saved_errno = 0;      /* silence the error message */
+                 goto fail;
+               }
+           }
+#endif
+#ifdef S_ISDIR
+         /* Although the immediately following chdir() would detect
+          * the fact that this is not a directory for us, this would
+          * result in an extra system call that fails.  Anybody
+          * examining the system-call trace should ideally not be
+          * concerned that something is actually failing.
+          */
+         if (!S_ISDIR(statbuf_dest->st_mode))
+           {
+             rv = SafeChdirFailNotDir;
+             rv_set = true;
+             saved_errno = 0;  /* silence the error message */
+             goto fail;
+           }
+#endif
+
+         if (options.debug_options & DebugSearch)
+           fprintf (stderr, "safely_chdir(): chdir(\"%s\")\n", dest);
+
+         if (0 == chdir (dest))
+           {
+             /* check we ended up where we wanted to go */
+             bool changed = false;
+             if (!wd_sanity_check (".", program_name, ".",
+                                   statbuf_dest->st_dev,
+                                   statbuf_dest->st_ino,
+                                   &statbuf_arrived,
+                                   0, __LINE__, direction,
+                                   isfatal,
+                                   &changed))
+               {
+                 /* Only allow one failure. */
+                 if (RETRY_IF_SANITY_CHECK_FAILS == isfatal)
+                   {
+                     if (0 == fchdir (dotfd))
+                       {
+                         isfatal = FATAL_IF_SANITY_CHECK_FAILS;
+                         goto retry;
+                       }
+                     else
+                       {
+                         /* Failed to return to original directory,
+                          * but we know that the current working
+                          * directory is not the one that we intend
+                          * to be in.  Since fchdir() failed, we
+                          * can't recover from this and so this error
+                          * is fatal.
+                          */
+                         error (EXIT_FAILURE, errno,
+                                _("failed to return to parent directory"));
+                       }
+                   }
+                 else
+                   {
+                     /* XXX: not sure what to use as an excuse here. */
+                     rv = SafeChdirFailNonexistent;
+                     rv_set = true;
+                     saved_errno = 0;
+                     goto fail;
+                   }
+               }
+
+             close (dotfd);
+             return SafeChdirOK;
+           }
+         else
+           {
+             saved_errno = errno;
+             if (ENOENT == saved_errno)
+               {
+                 rv = SafeChdirFailNonexistent;
+                 rv_set = true;
+                 if (options.ignore_readdir_race)
+                   errno = 0;  /* don't issue err msg */
+               }
+             else if (ENOTDIR == saved_errno)
+               {
+                 /* This can happen if the we stat a directory,
+                  * and then file system activity changes it into
+                  * a non-directory.
+                  */
+                 saved_errno = 0;      /* don't issue err msg */
+                 rv = SafeChdirFailNotDir;
+                 rv_set = true;
+               }
+             else
+               {
+                 rv = SafeChdirFailChdirFailed;
+                 rv_set = true;
+               }
+             goto fail;
+           }
+       }
+      else
+       {
+         saved_errno = errno;
+         rv = SafeChdirFailStat;
+         rv_set = true;
+
+         if ( (ENOENT == saved_errno) || (0 == state.curdepth))
+           saved_errno = 0;    /* don't issue err msg */
+         goto fail;
+       }
+    }
+  else
+    {
+      /* We do not have read permissions on "." */
+      rv = SafeChdirFailWouldBeUnableToReturn;
+      rv_set = true;
+      goto fail;
+    }
+
+  /* This is the success path, so we clear errno.  The caller probably
+   * won't be calling error() anyway.
+   */
+  saved_errno = 0;
+
+  /* We use the same exit path for success or failure.
+   * which has occurred is recorded in RV.
+   */
+ fail:
+  /* We do not call error() as this would result in a duplicate error
+   * message when the caller does the same thing.
+   */
+  if (saved_errno)
+    errno = saved_errno;
+
+  if (dotfd >= 0)
+    {
+      close (dotfd);
+      dotfd = -1;
+    }
+
+  *did_stat = statflag;
+  assert (rv_set);
+  return rv;
+}
+
+#if defined O_NOFOLLOW
+/* Safely change working directory to the specified subdirectory.  If
+ * we are not allowed to follow symbolic links, we use open() with
+ * O_NOFOLLOW, followed by fchdir().  This ensures that we don't
+ * follow symbolic links (of course, we do follow them if the -L
+ * option is in effect).
+ */
+static enum SafeChdirStatus
+safely_chdir_nofollow (const char *dest,
+                      enum TraversalDirection direction,
+                      struct stat *statbuf_dest,
+                      enum ChdirSymlinkHandling symlink_follow_option,
+                      bool *did_stat)
+{
+  int extraflags, fd;
+
+  (void) direction;
+  (void) statbuf_dest;
+
+  extraflags = 0;
+  *did_stat = false;
+
+  switch (symlink_follow_option)
+    {
+    case SymlinkFollowOk:
+      extraflags = 0;
+      break;
+
+    case SymlinkHandleDefault:
+      if (following_links ())
+       extraflags = 0;
+      else
+       extraflags = O_NOFOLLOW;
+      break;
+    }
+
+  errno = 0;
+  fd = open (dest, O_RDONLY
+#if defined O_LARGEFILE
+           |O_LARGEFILE
+#endif
+#if defined O_CLOEXEC
+           |O_CLOEXEC
+#endif
+           |extraflags);
+  if (fd < 0)
+    {
+      switch (errno)
+       {
+       case ELOOP:
+         return SafeChdirFailSymlink; /* This is why we use O_NOFOLLOW */
+       case ENOENT:
+         return SafeChdirFailNonexistent;
+       default:
+         return SafeChdirFailDestUnreadable;
+       }
+    }
+
+  errno = 0;
+  if (0 == fchdir (fd))
+    {
+      close (fd);
+      return SafeChdirOK;
+    }
+  else
+    {
+      int saved_errno = errno;
+      close (fd);
+      errno = saved_errno;
+
+      switch (errno)
+       {
+       case ENOTDIR:
+         return SafeChdirFailNotDir;
+
+       case EACCES:
+       case EBADF:             /* Shouldn't happen */
+       case EINTR:
+       case EIO:
+       default:
+         return SafeChdirFailChdirFailed;
+       }
+    }
+}
+#endif
+
+static enum SafeChdirStatus
+safely_chdir (const char *dest,
+             enum TraversalDirection direction,
+             struct stat *statbuf_dest,
+             enum ChdirSymlinkHandling symlink_follow_option,
+             bool *did_stat)
+{
+  enum SafeChdirStatus result;
+
+  /* We're about to leave a directory.  If there are any -execdir
+   * argument lists which have been built but have not yet been
+   * processed, do them now because they must be done in the same
+   * directory.
+   */
+  complete_pending_execdirs ();
+
+#if !defined(O_NOFOLLOW)
+  options.open_nofollow_available = false;
+#endif
+  if (options.open_nofollow_available)
+    {
+      result = safely_chdir_nofollow (dest, direction, statbuf_dest,
+                                    symlink_follow_option, did_stat);
+      if (SafeChdirFailDestUnreadable != result)
+       {
+         return result;
+       }
+      else
+       {
+         /* Savannah bug #15384: fall through to use safely_chdir_lstat
+          * if the directory is not readable.
+          */
+         /* Do nothing. */
+       }
+    }
+  /* Even if O_NOFOLLOW is available, we may need to use the alternative
+   * method, since parent of the start point may be executable but not
+   * readable.
+   */
+  return safely_chdir_lstat (dest, direction, statbuf_dest,
+                            symlink_follow_option, did_stat);
+}
+
+
+
+/* Safely go back to the starting directory. */
+static void
+chdir_back (void)
+{
+  if (options.debug_options & DebugSearch)
+    fprintf (stderr, "chdir_back(): chdir to start point\n");
+
+  restore_cwd (initial_wd);
+}
+
+/* Move to the parent of a given directory and then call a function,
+ * restoring the cwd.  Don't bother changing directory if the
+ * specified directory is a child of "." or is the root directory.
+ */
+static void
+at_top (char *pathname,
+       mode_t mode,
+       struct stat *pstat,
+       void (*action)(char *pathname,
+                      char *basename,
+                      int mode,
+                      struct stat *pstat))
+{
+  int dirchange;
+  char *parent_dir = dir_name (pathname);
+  char *base = last_component (pathname);
+
+  state.curdepth = 0;
+  state.starting_path_length = strlen (pathname);
+
+  if (0 == *base
+      || 0 == strcmp (parent_dir, "."))
+    {
+      dirchange = 0;
+      base = pathname;
+    }
+  else
+    {
+      enum TraversalDirection direction;
+      enum SafeChdirStatus chdir_status;
+      struct stat st;
+      bool did_stat = false;
+
+      dirchange = 1;
+      if (0 == strcmp (base, ".."))
+       direction = TraversingUp;
+      else
+       direction = TraversingDown;
+
+      /* We pass SymlinkFollowOk to safely_chdir(), which allows it to
+       * chdir() into a symbolic link.  This is only useful for the
+       * case where the directory we're chdir()ing into is the
+       * basename of a command line argument, for example where
+       * "foo/bar/baz" is specified on the command line.  When -P is
+       * in effect (the default), baz will not be followed if it is a
+       * symlink, but if bar is a symlink, it _should_ be followed.
+       * Hence we need the ability to override the policy set by
+       * following_links().
+       */
+      chdir_status = safely_chdir (parent_dir, direction, &st, SymlinkFollowOk, &did_stat);
+      if (SafeChdirOK != chdir_status)
+       {
+         const char *what = (SafeChdirFailWouldBeUnableToReturn == chdir_status) ? "." : parent_dir;
+         if (errno)
+           error (0, errno, "%s",
+                  safely_quote_err_filename (0, what));
+         else
+           error (0, 0, _("Failed to safely change directory into %s"),
+                  safely_quote_err_filename (0, parent_dir));
+
+         /* We can't process this command-line argument. */
+         state.exit_status = 1;
+         return;
+       }
+    }
+
+  free (parent_dir);
+  parent_dir = NULL;
+
+  action (pathname, base, mode, pstat);
+
+  if (dirchange)
+    {
+      chdir_back ();
+    }
+}
+
+
+static void do_process_top_dir (char *pathname,
+                               char *base,
+                               int mode,
+                               struct stat *pstat)
+{
+  (void) pstat;
+
+  process_path (pathname, base, false, ".", mode);
+  complete_pending_execdirs ();
+}
+
+static void
+do_process_predicate (char *pathname,
+                     char *base,
+                     int mode,
+                     struct stat *pstat)
+{
+  (void) mode;
+
+  state.rel_pathname = base;   /* cwd_dir_fd was already set by safely_chdir */
+  apply_predicate (pathname, pstat, get_eval_tree ());
+}
+
+
+
+
+/* Descend PATHNAME, which is a command-line argument.
+
+   Actions like -execdir assume that we are in the
+   parent directory of the file we're examining,
+   and on entry to this function our working directory
+   is whatever it was when find was invoked.  Therefore
+   If PATHNAME is "." we just leave things as they are.
+   Otherwise, we figure out what the parent directory is,
+   and move to that.
+*/
+static void
+process_top_path (char *pathname, mode_t mode)
+{
+  at_top (pathname, mode, NULL, do_process_top_dir);
+}
+
+
+/* Info on each directory in the current tree branch, to avoid
+   getting stuck in symbolic link loops.  */
+static struct dir_id *dir_ids = NULL;
+/* Entries allocated in `dir_ids'.  */
+static int dir_alloc = 0;
+/* Index in `dir_ids' of directory currently being searched.
+   This is always the last valid entry.  */
+static int dir_curr = -1;
+/* (Arbitrary) number of entries to grow `dir_ids' by.  */
+#define DIR_ALLOC_STEP 32
+
+
+
+/* We've detected a file system loop.   This is caused by one of
+ * two things:
+ *
+ * 1. Option -L is in effect and we've hit a symbolic link that
+ *    points to an ancestor.  This is harmless.  We won't traverse the
+ *    symbolic link.
+ *
+ * 2. We have hit a real cycle in the directory hierarchy.  In this
+ *    case, we issue a diagnostic message (POSIX requires this) and we
+ *    skip that directory entry.
+ */
+static void
+issue_loop_warning (const char *name, const char *pathname, int level)
+{
+  struct stat stbuf_link;
+  if (lstat (name, &stbuf_link) != 0)
+    stbuf_link.st_mode = S_IFREG;
+
+  if (S_ISLNK(stbuf_link.st_mode))
+    {
+      error (0, 0,
+            _("Symbolic link %s is part of a loop in the directory hierarchy; we have already visited the directory to which it points."),
+            safely_quote_err_filename (0, pathname));
+      /* XXX: POSIX appears to require that the exit status be non-zero if a
+       * diagnostic is issued.
+       */
+    }
+  else
+    {
+      int distance = 1 + (dir_curr-level);
+      /* We have found an infinite loop.  POSIX requires us to
+       * issue a diagnostic.  Usually we won't get to here
+       * because when the leaf optimisation is on, it will cause
+       * the subdirectory to be skipped.  If /a/b/c/d is a hard
+       * link to /a/b, then the link count of /a/b/c is 2,
+       * because the ".." entry of /b/b/c/d points to /a, not
+       * to /a/b/c.
+       */
+      error (0, 0,
+            ngettext (
+                      "Filesystem loop detected; %s has the same device number and inode as "
+                      "a directory which is %d level higher in the file system hierarchy",
+                      "Filesystem loop detected; %s has the same device number and inode as "
+                      "a directory which is %d levels higher in the file system hierarchy",
+                      (long)distance),
+            safely_quote_err_filename (0, pathname),
+            distance);
+    }
+}
+
+
+
+/* Recursively descend path PATHNAME, applying the predicates.
+   LEAF is true if PATHNAME is known to be in a directory that has no
+   more unexamined subdirectories, and therefore it is not a directory.
+   Knowing this allows us to avoid calling stat as long as possible for
+   leaf files.
+
+   NAME is PATHNAME relative to the current directory.  We access NAME
+   but print PATHNAME.
+
+   PARENT is the path of the parent of NAME, relative to find's
+   starting directory.
+
+   Return nonzero iff PATHNAME is a directory. */
+
+static int
+process_path (char *pathname, char *name, bool leaf, char *parent,
+             mode_t mode)
+{
+  struct stat stat_buf;
+  static dev_t root_dev;       /* Device ID of current argument pathname. */
+  int i;
+  struct predicate *eval_tree;
+
+  eval_tree = get_eval_tree ();
+  /* Assume it is a non-directory initially. */
+  stat_buf.st_mode = 0;
+  state.rel_pathname = name;
+  state.type = 0;
+  state.have_stat = false;
+  state.have_type = false;
+  state.already_issued_stat_error_msg = false;
+
+  if (!digest_mode (&mode, pathname, name, &stat_buf, leaf))
+    return 0;
+
+  if (!S_ISDIR (state.type))
+    {
+      if (state.curdepth >= options.mindepth)
+       apply_predicate (pathname, &stat_buf, eval_tree);
+      return 0;
+    }
+
+  /* From here on, we're working on a directory.  */
+
+
+  /* Now we really need to stat the directory, even if we know the
+   * type, because we need information like struct stat.st_rdev.
+   */
+  if (get_statinfo (pathname, name, &stat_buf) != 0)
+    return 0;
+
+  state.have_stat = true;
+  mode = state.type = stat_buf.st_mode;        /* use full info now that we have it. */
+  state.stop_at_current_level =
+    options.maxdepth >= 0
+    && state.curdepth >= options.maxdepth;
+
+  /* If we've already seen this directory on this branch,
+     don't descend it again.  */
+  for (i = 0; i <= dir_curr; i++)
+    if (stat_buf.st_ino == dir_ids[i].ino &&
+       stat_buf.st_dev == dir_ids[i].dev)
+      {
+       state.stop_at_current_level = true;
+       issue_loop_warning (name, pathname, i);
+      }
+
+  if (dir_alloc <= ++dir_curr)
+    {
+      dir_alloc += DIR_ALLOC_STEP;
+      dir_ids = (struct dir_id *)
+       xrealloc ((char *) dir_ids, dir_alloc * sizeof (struct dir_id));
+    }
+  dir_ids[dir_curr].ino = stat_buf.st_ino;
+  dir_ids[dir_curr].dev = stat_buf.st_dev;
+
+  if (options.stay_on_filesystem)
+    {
+      if (state.curdepth == 0)
+       root_dev = stat_buf.st_dev;
+      else if (stat_buf.st_dev != root_dev)
+       state.stop_at_current_level = true;
+    }
+
+  if (options.do_dir_first && state.curdepth >= options.mindepth)
+    apply_predicate (pathname, &stat_buf, eval_tree);
+
+  if (options.debug_options & DebugSearch)
+    fprintf (stderr, "pathname = %s, stop_at_current_level = %d\n",
+            pathname, state.stop_at_current_level);
+
+  if (state.stop_at_current_level == false)
+    {
+      /* Scan directory on disk. */
+      process_dir (pathname, name, strlen (pathname), &stat_buf, parent);
+    }
+
+  if (options.do_dir_first == false && state.curdepth >= options.mindepth)
+    {
+      /* The fields in 'state' are now out of date.  Correct them.
+       */
+      if (!digest_mode (&mode, pathname, name, &stat_buf, leaf))
+       return 0;
+
+      if (0 == dir_curr)
+       {
+         at_top (pathname, mode, &stat_buf, do_process_predicate);
+       }
+      else
+       {
+         do_process_predicate (pathname, name, mode, &stat_buf);
+       }
+    }
+
+  dir_curr--;
+
+  return 1;
+}
+
+
+/* Scan directory PATHNAME and recurse through process_path for each entry.
+
+   PATHLEN is the length of PATHNAME.
+
+   NAME is PATHNAME relative to the current directory.
+
+   STATP is the results of *options.xstat on it.
+
+   PARENT is the path of the parent of NAME, relative to find's
+   starting directory.  */
+
+static void
+process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, char *parent)
+{
+  int subdirs_left;            /* Number of unexamined subdirs in PATHNAME. */
+  bool subdirs_unreliable;     /* if true, cannot use dir link count as subdir limif (if false, it may STILL be unreliable) */
+  unsigned int idx;            /* Which entry are we on? */
+  struct stat stat_buf;
+  size_t dircount = 0u;
+  struct savedir_dirinfo *dirinfo;
+
+  if (statp->st_nlink < 2)
+    {
+      subdirs_unreliable = true;
+      subdirs_left = 0;
+    }
+  else
+    {
+      subdirs_unreliable = false; /* not necessarily right */
+      subdirs_left = statp->st_nlink - 2; /* Account for name and ".". */
+    }
+
+  errno = 0;
+  dirinfo = xsavedir (name, 0);
+
+
+  if (dirinfo == NULL)
+    {
+      assert (errno != 0);
+      error (0, errno, "%s", safely_quote_err_filename (0, pathname));
+      state.exit_status = 1;
+    }
+  else
+    {
+      register char *namep;    /* Current point in `name_space'. */
+      char *cur_path;          /* Full path of each file to process. */
+      char *cur_name;          /* Base name of each file to process. */
+      unsigned cur_path_size;  /* Bytes allocated for `cur_path'. */
+      register unsigned file_len; /* Length of each path to process. */
+      register unsigned pathname_len; /* PATHLEN plus trailing '/'. */
+      bool did_stat = false;
+
+      if (pathname[pathlen - 1] == '/')
+       pathname_len = pathlen + 1; /* For '\0'; already have '/'. */
+      else
+       pathname_len = pathlen + 2; /* For '/' and '\0'. */
+      cur_path_size = 0;
+      cur_path = NULL;
+
+      /* We're about to leave the directory.  If there are any
+       * -execdir argument lists which have been built but have not
+       * yet been processed, do them now because they must be done in
+       * the same directory.
+       */
+      complete_pending_execdirs ();
+
+      if (strcmp (name, "."))
+       {
+         enum SafeChdirStatus status = safely_chdir (name, TraversingDown, &stat_buf, SymlinkHandleDefault, &did_stat);
+         switch (status)
+           {
+           case SafeChdirOK:
+             /* If there had been a change but wd_sanity_check()
+              * accepted it, we need to accept that on the
+              * way back up as well, so modify our record
+              * of what we think we should see later.
+              * If there was no change, the assignments are a no-op.
+              *
+              * However, before performing the assignment, we need to
+              * check that we have the stat information.   If O_NOFOLLOW
+              * is available, safely_chdir() will not have needed to use
+              * stat(), and so stat_buf will just contain random data.
+              */
+             if (!did_stat)
+               {
+                 /* If there is a link we need to follow it.  Hence
+                  * the direct call to stat() not through (options.xstat)
+                  */
+                 set_stat_placeholders (&stat_buf);
+                 if (0 != stat (".", &stat_buf))
+                   break;      /* skip the assignment. */
+               }
+             dir_ids[dir_curr].dev = stat_buf.st_dev;
+             dir_ids[dir_curr].ino = stat_buf.st_ino;
+
+             break;
+
+           case SafeChdirFailWouldBeUnableToReturn:
+             error (0, errno, ".");
+             state.exit_status = 1;
+             break;
+
+           case SafeChdirFailNonexistent:
+           case SafeChdirFailDestUnreadable:
+           case SafeChdirFailStat:
+           case SafeChdirFailNotDir:
+           case SafeChdirFailChdirFailed:
+             error (0, errno, "%s",
+                    safely_quote_err_filename (0, pathname));
+             state.exit_status = 1;
+             return;
+
+           case SafeChdirFailSymlink:
+             error (0, 0,
+                    _("warning: not following the symbolic link %s"),
+                    safely_quote_err_filename (0, pathname));
+             state.exit_status = 1;
+             return;
+           }
+       }
+
+      for (idx=0; idx < dirinfo->size; ++idx)
+       {
+         /* savedirinfo() may return dirinfo=NULL if extended information
+          * is not available.
+          */
+         mode_t mode = (dirinfo->entries[idx].flags & SavedirHaveFileType) ?
+           dirinfo->entries[idx].type_info : 0;
+         namep = dirinfo->entries[idx].name;
+
+         /* Append this directory entry's name to the path being searched. */
+         file_len = pathname_len + strlen (namep);
+         if (file_len > cur_path_size)
+           {
+             while (file_len > cur_path_size)
+               cur_path_size += 1024;
+             free (cur_path);
+             cur_path = xmalloc (cur_path_size);
+             strcpy (cur_path, pathname);
+             cur_path[pathname_len - 2] = '/';
+           }
+         cur_name = cur_path + pathname_len - 1;
+         strcpy (cur_name, namep);
+
+         state.curdepth++;
+         if (!options.no_leaf_check && !subdirs_unreliable)
+           {
+             if (mode && S_ISDIR(mode) && (subdirs_left == 0))
+               {
+                 /* This is a subdirectory, but the number of directories we
+                  * have found now exceeds the number we would expect given
+                  * the hard link count on the parent.   This is likely to be
+                  * a bug in the file system driver (e.g. Linux's
+                  * /proc file system) or may just be a fact that the OS
+                  * doesn't really handle hard links with Unix semantics.
+                  * In the latter case, -noleaf should be used routinely.
+                  */
+                 error (0, 0, _("WARNING: Hard link count is wrong for %s (saw only st_nlink=%" PRIuMAX  " but we already saw %" PRIuMAX " subdirectories): this may be a bug in your file system driver.  Automatically turning on find's -noleaf option.  Earlier results may have failed to include directories that should have been searched."),
+                        safely_quote_err_filename(0, pathname),
+                        (uintmax_t) statp->st_nlink,
+                        (uintmax_t) dircount);
+                 state.exit_status = 1; /* We know the result is wrong, now */
+                 options.no_leaf_check = true; /* Don't make same
+                                                  mistake again */
+                 subdirs_unreliable = 1;
+                 subdirs_left = 1; /* band-aid for this iteration. */
+               }
+
+             /* Normal case optimization.  On normal Unix
+                file systems, a directory that has no subdirectories
+                has two links: its name, and ".".  Any additional
+                links are to the ".." entries of its subdirectories.
+                Once we have processed as many subdirectories as
+                there are additional links, we know that the rest of
+                the entries are non-directories -- in other words,
+                leaf files. */
+             {
+               int count;
+               count = process_path (cur_path, cur_name,
+                                           subdirs_left == 0, pathname,
+                                           mode);
+               subdirs_left -= count;
+               dircount += count;
+             }
+           }
+         else
+           {
+             /* There might be weird (e.g., CD-ROM or MS-DOS) file systems
+                mounted, which don't have Unix-like directory link counts. */
+             process_path (cur_path, cur_name, false, pathname, mode);
+           }
+
+         state.curdepth--;
+       }
+
+
+      /* We're about to leave the directory.  If there are any
+       * -execdir argument lists which have been built but have not
+       * yet been processed, do them now because they must be done in
+       * the same directory.
+       */
+      complete_pending_execdirs ();
+
+      if (strcmp (name, "."))
+       {
+         enum SafeChdirStatus status;
+         struct dir_id did;
+
+         /* We could go back and do the next command-line arg
+            instead, maybe using longjmp.  */
+         char const *dir;
+         bool deref = following_links () ? true : false;
+
+         if ( (state.curdepth>0) && !deref)
+           dir = "..";
+         else
+           {
+             chdir_back ();
+             dir = parent;
+           }
+
+         did_stat = false;
+         status = safely_chdir (dir, TraversingUp, &stat_buf, SymlinkHandleDefault, &did_stat);
+         switch (status)
+           {
+           case SafeChdirOK:
+             break;
+
+           case SafeChdirFailWouldBeUnableToReturn:
+             error (EXIT_FAILURE, errno, ".");
+             return;
+
+           case SafeChdirFailNonexistent:
+           case SafeChdirFailDestUnreadable:
+           case SafeChdirFailStat:
+           case SafeChdirFailSymlink:
+           case SafeChdirFailNotDir:
+           case SafeChdirFailChdirFailed:
+             error (EXIT_FAILURE, errno,
+                    "%s", safely_quote_err_filename (0, pathname));
+             return;
+           }
+
+         if (dir_curr > 0)
+           {
+             did.dev = dir_ids[dir_curr-1].dev;
+             did.ino = dir_ids[dir_curr-1].ino;
+           }
+         else
+           {
+             did.dev = starting_stat_buf.st_dev;
+             did.ino = starting_stat_buf.st_ino;
+           }
+       }
+
+      free (cur_path);
+      free_dirinfo (dirinfo);
+    }
+
+  if (subdirs_unreliable)
+    {
+      /* Make sure we hasn't used the variable subdirs_left if we knew
+       * we shouldn't do so.
+       */
+      assert (0 == subdirs_left || options.no_leaf_check);
+    }
+}
diff --git a/find/finddata.c b/find/finddata.c
new file mode 100644 (file)
index 0000000..b776962
--- /dev/null
@@ -0,0 +1,27 @@
+/* finddata.c -- global data for "find".
+   Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005,
+   2007, 2010 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/>.
+*/
+
+#include <config.h>
+
+#include "defs.h"
+#include "save-cwd.h"
+
+
+struct options options;
+struct state state;
+struct saved_cwd *initial_wd = NULL;
diff --git a/find/fstype.c b/find/fstype.c
new file mode 100644 (file)
index 0000000..c6dbe8b
--- /dev/null
@@ -0,0 +1,331 @@
+/* fstype.c -- determine type of file systems that files are on
+   Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000,
+                 2004, 2010 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 David MacKenzie <djm@gnu.org>.
+ *
+ * Converted to use gnulib's read_file_system_list()
+ * by James Youngman <jay@gnu.org> (which saves a lot
+ * of manual hacking of configure.in).
+ */
+
+
+#include <config.h>
+#include <errno.h>
+#include <stdbool.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <sys/stat.h>
+
+/* The presence of unistd.h is assumed by gnulib these days, so we
+ * might as well assume it too.
+ */
+#include <unistd.h>
+
+#include <fcntl.h>
+#ifdef HAVE_SYS_MNTIO_H
+#include <sys/mntio.h>
+#endif
+#ifdef HAVE_SYS_MKDEV_H
+#include <sys/mkdev.h>
+#endif
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#else
+extern int errno;
+#endif
+
+#include "defs.h"
+#include "../gnulib/lib/dirname.h"
+#include "xalloc.h"
+
+/* Need declaration of function `xstrtoumax' */
+#include "../gnulib/lib/xstrtol.h"
+
+#include "extendbuf.h"
+#include "mountlist.h"
+#include "error.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
+
+static char *file_system_type_uncached (const struct stat *statp, const char *path);
+
+
+/* Get MNTTYPE_IGNORE if it is available. */
+#if HAVE_MNTENT_H
+# include <mntent.h>
+#endif
+#if HAVE_SYS_MNTTAB_H
+# include <stdio.h>
+# include <sys/mnttab.h>
+#endif
+
+
+
+
+
+static void
+free_file_system_list (struct mount_entry *p)
+{
+  while (p)
+    {
+      struct mount_entry *pnext = p->me_next;
+
+      free (p->me_devname);
+      free (p->me_mountdir);
+
+      if (p->me_type_malloced)
+       free (p->me_type);
+      p->me_next = NULL;
+      free (p);
+      p = pnext;
+    }
+}
+
+
+
+
+#ifdef AFS
+#include <netinet/in.h>
+#include <afs/venus.h>
+#if __STDC__
+/* On SunOS 4, afs/vice.h defines this to rely on a pre-ANSI cpp.  */
+#undef _VICEIOCTL
+#define _VICEIOCTL(id)  ((unsigned int ) _IOW('V', id, struct ViceIoctl))
+#endif
+#ifndef _IOW
+/* AFS on Solaris 2.3 doesn't get this definition.  */
+#include <sys/ioccom.h>
+#endif
+
+static int
+in_afs (char *path)
+{
+  static char space[2048];
+  struct ViceIoctl vi;
+
+  vi.in_size = 0;
+  vi.out_size = sizeof (space);
+  vi.out = space;
+
+  if (pioctl (path, VIOC_FILE_CELL_NAME, &vi, 1)
+      && (errno == EINVAL || errno == ENOENT))
+       return 0;
+  return 1;
+}
+#endif /* AFS */
+
+/* Nonzero if the current file system's type is known.  */
+static int fstype_known = 0;
+
+/* Return a static string naming the type of file system that the file PATH,
+   described by STATP, is on.
+   RELPATH is the file name relative to the current directory.
+   Return "unknown" if its file system type is unknown.  */
+
+char *
+filesystem_type (const struct stat *statp, const char *path)
+{
+  static char *current_fstype = NULL;
+  static dev_t current_dev;
+
+  if (current_fstype != NULL)
+    {
+      if (fstype_known && statp->st_dev == current_dev)
+       return current_fstype;  /* Cached value.  */
+      free (current_fstype);
+    }
+  current_dev = statp->st_dev;
+  current_fstype = file_system_type_uncached (statp, path);
+  return current_fstype;
+}
+
+static int
+set_fstype_devno (struct mount_entry *p)
+{
+  struct stat stbuf;
+
+  if (p->me_dev == (dev_t)-1)
+    {
+      set_stat_placeholders (&stbuf);
+      if (0 == (options.xstat)(p->me_mountdir, &stbuf))
+       {
+         p->me_dev = stbuf.st_dev;
+         return 0;
+       }
+      else
+       {
+         return -1;
+       }
+    }
+  return 0;                    /* not needed */
+}
+
+static struct mount_entry *
+must_read_fs_list (bool need_fs_type)
+{
+  struct mount_entry *entries = read_file_system_list (need_fs_type);
+  if (NULL == entries)
+    {
+      /* We cannot determine for sure which file we were trying to
+       * use because gnulib has abstracted all that stuff away.
+       * Hence we cannot issue a specific error message here.
+       */
+      error (EXIT_FAILURE, 0, _("Cannot read mounted file system list"));
+    }
+  return entries;
+}
+
+
+
+/* Return a newly allocated string naming the type of file system that the
+   file PATH, described by STATP, is on.
+   RELPATH is the file name relative to the current directory.
+   Return "unknown" if its file system type is unknown.  */
+
+static char *
+file_system_type_uncached (const struct stat *statp, const char *path)
+{
+  struct mount_entry *entries, *entry;
+  char *type;
+
+  (void) path;
+
+#ifdef AFS
+  if (in_afs (path))
+    {
+      fstype_known = 1;
+      return xstrdup ("afs");
+    }
+#endif
+
+  entries = must_read_fs_list (true);
+  for (type=NULL, entry=entries; entry; entry=entry->me_next)
+    {
+#ifdef MNTTYPE_IGNORE
+      if (!strcmp (entry->me_type, MNTTYPE_IGNORE))
+       continue;
+#endif
+      set_fstype_devno (entry);
+      if (entry->me_dev == statp->st_dev)
+       {
+         type = xstrdup (entry->me_type);
+         break;
+       }
+    }
+  free_file_system_list (entries);
+
+  /* Don't cache unknown values. */
+  fstype_known = (type != NULL);
+
+  return type ? type : xstrdup (_("unknown"));
+}
+
+
+char *
+get_mounted_filesystems (void)
+{
+  char *result = NULL;
+  size_t alloc_size = 0u;
+  size_t used = 0u;
+  struct mount_entry *entries, *entry;
+  void *p;
+
+  entries = must_read_fs_list (false);
+  for (entry=entries; entry; entry=entry->me_next)
+    {
+      size_t len;
+
+#ifdef MNTTYPE_IGNORE
+      if (!strcmp (entry->me_type, MNTTYPE_IGNORE))
+       continue;
+#endif
+      set_fstype_devno (entry);
+
+      len = strlen (entry->me_mountdir) + 1;
+      p = extendbuf (result, used+len, &alloc_size);
+      if (p)
+       {
+         result = p;
+         strcpy (&result[used], entry->me_mountdir);
+         used += len;          /* len already includes one for the \0 */
+       }
+      else
+       {
+         break;
+       }
+    }
+
+  free_file_system_list (entries);
+  return result;
+}
+
+
+dev_t *
+get_mounted_devices (size_t *n)
+{
+  size_t alloc_size = 0u;
+  size_t used = 0u;
+  struct mount_entry *entries, *entry;
+  dev_t *result = NULL;
+
+  /* Use read_file_system_list () rather than must_read_fs_list()
+   * because on some system this is always called at startup,
+   * and find should only exit fatally if it needs to use the
+   * result of this operation.   If we can't get the fs list
+   * but we never need the information, there is no need to fail.
+   */
+  for (entry = entries = read_file_system_list (false);
+       entry;
+       entry = entry->me_next)
+    {
+      void *p = extendbuf (result, sizeof(dev_t)*(used+1), &alloc_size);
+      if (p)
+       {
+         result = p;
+         set_fstype_devno (entry);
+         result[used] = entry->me_dev;
+         ++used;
+       }
+      else
+       {
+         free (result);
+         result = NULL;
+       }
+    }
+  free_file_system_list (entries);
+  if (result)
+    {
+      *n = used;
+    }
+  return result;
+}
diff --git a/find/ftsfind.c b/find/ftsfind.c
new file mode 100644 (file)
index 0000000..9fdb8ef
--- /dev/null
@@ -0,0 +1,744 @@
+/* find -- search for files in a directory hierarchy (fts version)
+   Copyright (C) 1990, 1091, 1992, 1993, 1994, 2000, 2003, 2004,
+                 2005, 2006, 2007, 2008, 2009,
+                 2010 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 find.c.
+
+   GNU find was written by Eric Decker <cire@soe.ucsc.edu>,
+   with enhancements by David MacKenzie <djm@gnu.org>,
+   Jay Plett <jay@silence.princeton.nj.us>,
+   and Tim Wood <axolotl!tim@toad.com>.
+   The idea for -print0 and xargs -0 came from
+   Dan Bernstein <brnstnd@kramden.acf.nyu.edu>.
+*/
+
+
+#include <config.h>
+#include "defs.h"
+
+
+#define USE_SAFE_CHDIR 1
+#undef  STAT_MOUNTPOINTS
+
+
+#include <errno.h>
+#include <assert.h>
+
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#include <unistd.h>
+
+#include "progname.h"
+#include "closeout.h"
+#include "quotearg.h"
+#include "fts_.h"
+#include "save-cwd.h"
+#include "xgetcwd.h"
+#include "error.h"
+#include "dircallback.h"
+#include "cloexec.h"
+#include "fdleak.h"
+#include "unused-result.h"
+
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
+#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
+
+
+/* FTS_TIGHT_CYCLE_CHECK tries to work around Savannah bug #17877
+ * (but actually using it doesn't fix the bug).
+ */
+static int ftsoptions = FTS_NOSTAT|FTS_TIGHT_CYCLE_CHECK|FTS_CWDFD;
+
+static int prev_depth = INT_MIN; /* fts_level can be < 0 */
+static int curr_fd = -1;
+
+
+static bool find (char *arg) __attribute_warn_unused_result__;
+static bool process_all_startpoints (int argc, char *argv[]) __attribute_warn_unused_result__;
+
+
+
+static void
+left_dir (void)
+{
+  if (ftsoptions & FTS_CWDFD)
+    {
+      if (curr_fd >= 0)
+       {
+         close (curr_fd);
+         curr_fd = -1;
+       }
+    }
+  else
+    {
+      /* do nothing. */
+    }
+}
+
+/*
+ * Signal that we are now inside a directory pointed to by dir_fd.
+ * The caller can't tell if this is the first time this happens, so
+ * we have to be careful not to call dup() more than once
+ */
+static void
+inside_dir (int dir_fd)
+{
+  if (ftsoptions & FTS_CWDFD)
+    {
+      assert (dir_fd == AT_FDCWD || dir_fd >= 0);
+
+      state.cwd_dir_fd = dir_fd;
+      if (curr_fd < 0)
+       {
+         if (AT_FDCWD == dir_fd)
+           {
+             curr_fd = AT_FDCWD;
+           }
+         else if (dir_fd >= 0)
+           {
+             curr_fd = dup_cloexec (dir_fd);
+           }
+         else
+           {
+             /* curr_fd is invalid, but dir_fd is also invalid.
+              * This should not have happened.
+              */
+             assert (curr_fd >= 0 || dir_fd >= 0);
+           }
+       }
+    }
+  else
+    {
+      /* FTS_CWDFD is not in use.  We can always assume that
+       * AT_FDCWD refers to the directory we are currentl searching.
+       *
+       * Therefore there is nothing to do.
+       */
+    }
+}
+
+
+
+#ifdef STAT_MOUNTPOINTS
+static void init_mounted_dev_list (void);
+#endif
+
+#define STRINGIFY(X) #X
+#define HANDLECASE(N) case N: return #N;
+
+static char *
+get_fts_info_name (int info)
+{
+  static char buf[10];
+  switch (info)
+    {
+      HANDLECASE(FTS_D);
+      HANDLECASE(FTS_DC);
+      HANDLECASE(FTS_DEFAULT);
+      HANDLECASE(FTS_DNR);
+      HANDLECASE(FTS_DOT);
+      HANDLECASE(FTS_DP);
+      HANDLECASE(FTS_ERR);
+      HANDLECASE(FTS_F);
+      HANDLECASE(FTS_INIT);
+      HANDLECASE(FTS_NS);
+      HANDLECASE(FTS_NSOK);
+      HANDLECASE(FTS_SL);
+      HANDLECASE(FTS_SLNONE);
+      HANDLECASE(FTS_W);
+    default:
+      sprintf (buf, "[%d]", info);
+      return buf;
+    }
+}
+
+static void
+visit (FTS *p, FTSENT *ent, struct stat *pstat)
+{
+  struct predicate *eval_tree;
+
+  state.have_stat = (ent->fts_info != FTS_NS) && (ent->fts_info != FTS_NSOK);
+  state.rel_pathname = ent->fts_accpath;
+  state.cwd_dir_fd   = p->fts_cwd_fd;
+
+  /* Apply the predicates to this path. */
+  eval_tree = get_eval_tree ();
+  apply_predicate (ent->fts_path, pstat, eval_tree);
+
+  /* Deal with any side effects of applying the predicates. */
+  if (state.stop_at_current_level)
+    {
+      fts_set (p, ent, FTS_SKIP);
+    }
+}
+
+static const char*
+partial_quotearg_n (int n, char *s, size_t len, enum quoting_style style)
+{
+  if (0 == len)
+    {
+      return quotearg_n_style (n, style, "");
+    }
+  else
+    {
+      char saved;
+      const char *result;
+
+      saved = s[len];
+      s[len] = 0;
+      result = quotearg_n_style (n, style, s);
+      s[len] = saved;
+      return result;
+    }
+}
+
+
+/* We've detected a file system loop.   This is caused by one of
+ * two things:
+ *
+ * 1. Option -L is in effect and we've hit a symbolic link that
+ *    points to an ancestor.  This is harmless.  We won't traverse the
+ *    symbolic link.
+ *
+ * 2. We have hit a real cycle in the directory hierarchy.  In this
+ *    case, we issue a diagnostic message (POSIX requires this) and we
+ *    skip that directory entry.
+ */
+static void
+issue_loop_warning (FTSENT * ent)
+{
+  if (S_ISLNK(ent->fts_statp->st_mode))
+    {
+      error (0, 0,
+            _("Symbolic link %s is part of a loop in the directory hierarchy; we have already visited the directory to which it points."),
+            safely_quote_err_filename (0, ent->fts_path));
+    }
+  else
+    {
+      /* We have found an infinite loop.  POSIX requires us to
+       * issue a diagnostic.  Usually we won't get to here
+       * because when the leaf optimisation is on, it will cause
+       * the subdirectory to be skipped.  If /a/b/c/d is a hard
+       * link to /a/b, then the link count of /a/b/c is 2,
+       * because the ".." entry of /a/b/c/d points to /a, not
+       * to /a/b/c.
+       */
+      error (0, 0,
+            _("File system loop detected; "
+              "%s is part of the same file system loop as %s."),
+            safely_quote_err_filename (0, ent->fts_path),
+            partial_quotearg_n (1,
+                                ent->fts_cycle->fts_path,
+                                ent->fts_cycle->fts_pathlen,
+                                options.err_quoting_style));
+    }
+}
+
+/*
+ * Return true if NAME corresponds to a file which forms part of a
+ * symbolic link loop.  The command
+ *      rm -f a b; ln -s a b; ln -s b a
+ * produces such a loop.
+ */
+static bool
+symlink_loop (const char *name)
+{
+  struct stat stbuf;
+  const int rv = options.xstat (name, &stbuf);
+  return (0 != rv) && (ELOOP == errno);
+}
+
+
+static void
+show_outstanding_execdirs (FILE *fp)
+{
+  if (options.debug_options & DebugExec)
+    {
+      int seen=0;
+      struct predicate *p;
+      p = get_eval_tree ();
+      fprintf (fp, "Outstanding execdirs:");
+
+      while (p)
+       {
+         const char *pfx;
+
+         if (pred_is (p, pred_execdir))
+           pfx = "-execdir";
+         else if (pred_is (p, pred_okdir))
+           pfx = "-okdir";
+         else
+           pfx = NULL;
+         if (pfx)
+           {
+             int i;
+             const struct exec_val *execp = &p->args.exec_vec;
+             ++seen;
+
+             fprintf (fp, "%s ", pfx);
+             if (execp->multiple)
+               fprintf (fp, "multiple ");
+             fprintf (fp, "%d args: ", execp->state.cmd_argc);
+             for (i=0; i<execp->state.cmd_argc; ++i)
+               {
+                 fprintf (fp, "%s ", execp->state.cmd_argv[i]);
+               }
+             fprintf (fp, "\n");
+           }
+         p = p->pred_next;
+       }
+      if (!seen)
+       fprintf (fp, " none\n");
+    }
+  else
+    {
+      /* No debug output is wanted. */
+    }
+}
+
+static void
+consider_visiting (FTS *p, FTSENT *ent)
+{
+  struct stat statbuf;
+  mode_t mode;
+  int ignore, isdir;
+
+  if (options.debug_options & DebugSearch)
+    fprintf (stderr,
+            "consider_visiting (early): %s: "
+            "fts_info=%-6s, fts_level=%2d, prev_depth=%d "
+            "fts_path=%s, fts_accpath=%s\n",
+            quotearg_n_style (0, options.err_quoting_style, ent->fts_path),
+            get_fts_info_name (ent->fts_info),
+            (int)ent->fts_level, prev_depth,
+            quotearg_n_style (1, options.err_quoting_style, ent->fts_path),
+            quotearg_n_style (2, options.err_quoting_style, ent->fts_accpath));
+
+  if (ent->fts_info == FTS_DP)
+    {
+      left_dir ();
+    }
+  else if (ent->fts_level > prev_depth || ent->fts_level==0)
+    {
+      left_dir ();
+    }
+  inside_dir (p->fts_cwd_fd);
+  prev_depth = ent->fts_level;
+
+  statbuf.st_ino = ent->fts_statp->st_ino;
+
+  /* Cope with various error conditions. */
+  if (ent->fts_info == FTS_ERR
+      || ent->fts_info == FTS_DNR)
+    {
+      nonfatal_target_file_error (ent->fts_errno, ent->fts_path);
+      return;
+    }
+  else if (ent->fts_info == FTS_DC)
+    {
+      issue_loop_warning (ent);
+      error_severity (EXIT_FAILURE);
+      return;
+    }
+  else if (ent->fts_info == FTS_SLNONE)
+    {
+      /* fts_read() claims that ent->fts_accpath is a broken symbolic
+       * link.  That would be fine, but if this is part of a symbolic
+       * link loop, we diagnose the problem and also ensure that the
+       * eventual return value is nonzero.   Note that while the path
+       * we stat is local (fts_accpath), we print the full path name
+       * of the file (fts_path) in the error message.
+       */
+      if (symlink_loop (ent->fts_accpath))
+       {
+         nonfatal_target_file_error (ELOOP, ent->fts_path);
+         return;
+       }
+    }
+  else if (ent->fts_info == FTS_NS)
+    {
+      if (ent->fts_level == 0)
+       {
+         /* e.g., nonexistent starting point */
+         nonfatal_target_file_error (ent->fts_errno, ent->fts_path);
+         return;
+       }
+      else
+       {
+         /* The following if statement fixes Savannah bug #19605
+          * (failure to diagnose a symbolic link loop)
+          */
+         if (symlink_loop (ent->fts_accpath))
+           {
+             nonfatal_target_file_error (ELOOP, ent->fts_path);
+             return;
+           }
+         else
+           {
+             nonfatal_target_file_error (ent->fts_errno, ent->fts_path);
+             /* Continue despite the error, as file name without stat info
+              * might be better than not even processing the file name. This
+              * can lead to repeated error messages later on, though, if a
+              * predicate requires stat information.
+              *
+              * Not printing an error message here would be even more wrong,
+              * though, as this could cause the contents of a directory to be
+              * silently ignored, as the directory wouldn't be identified as
+              * such.
+              */
+           }
+
+       }
+    }
+
+  /* Cope with the usual cases. */
+  if (ent->fts_info == FTS_NSOK
+      || ent->fts_info == FTS_NS /* e.g. symlink loop */)
+    {
+      assert (!state.have_stat);
+      assert (ent->fts_info == FTS_NSOK || state.type == 0);
+      mode = state.type;
+    }
+  else
+    {
+      state.have_stat = true;
+      state.have_type = true;
+      statbuf = *(ent->fts_statp);
+      state.type = mode = statbuf.st_mode;
+
+      if (00000 == mode)
+       {
+         /* Savannah bug #16378. */
+         error (0, 0, _("WARNING: file %s appears to have mode 0000"),
+                quotearg_n_style (0, options.err_quoting_style, ent->fts_path));
+       }
+    }
+
+  /* update state.curdepth before calling digest_mode(), because digest_mode
+   * may call following_links().
+   */
+  state.curdepth = ent->fts_level;
+  if (mode)
+    {
+      if (!digest_mode (&mode, ent->fts_path, ent->fts_name, &statbuf, 0))
+       return;
+    }
+
+  /* examine this item. */
+  ignore = 0;
+  isdir = S_ISDIR(mode)
+    || (FTS_D  == ent->fts_info)
+    || (FTS_DP == ent->fts_info)
+    || (FTS_DC == ent->fts_info);
+
+  if (isdir && (ent->fts_info == FTS_NSOK))
+    {
+      /* This is a directory, but fts did not stat it, so
+       * presumably would not be planning to search its
+       * children.  Force a stat of the file so that the
+       * children can be checked.
+       */
+      fts_set (p, ent, FTS_AGAIN);
+      return;
+    }
+
+  if (options.maxdepth >= 0)
+    {
+      if (ent->fts_level >= options.maxdepth)
+       {
+         fts_set (p, ent, FTS_SKIP); /* descend no further */
+
+         if (ent->fts_level > options.maxdepth)
+           ignore = 1;         /* don't even look at this one */
+       }
+    }
+
+  if ( (ent->fts_info == FTS_D) && !options.do_dir_first )
+    {
+      /* this is the preorder visit, but user said -depth */
+      ignore = 1;
+    }
+  else if ( (ent->fts_info == FTS_DP) && options.do_dir_first )
+    {
+      /* this is the postorder visit, but user didn't say -depth */
+      ignore = 1;
+    }
+  else if (ent->fts_level < options.mindepth)
+    {
+      ignore = 1;
+    }
+
+  if (options.debug_options & DebugSearch)
+    fprintf (stderr,
+            "consider_visiting (late): %s: "
+            "fts_info=%-6s, isdir=%d ignore=%d have_stat=%d have_type=%d \n",
+            quotearg_n_style (0, options.err_quoting_style, ent->fts_path),
+            get_fts_info_name (ent->fts_info),
+            isdir, ignore, state.have_stat, state.have_type);
+
+  if (!ignore)
+    {
+      visit (p, ent, &statbuf);
+    }
+
+  if (ent->fts_info == FTS_DP)
+    {
+      /* we're leaving a directory. */
+      state.stop_at_current_level = false;
+    }
+}
+
+
+
+static bool
+find (char *arg)
+{
+  char * arglist[2];
+  FTS *p;
+  FTSENT *ent;
+
+  state.starting_path_length = strlen (arg);
+  inside_dir (AT_FDCWD);
+
+  arglist[0] = arg;
+  arglist[1] = NULL;
+
+  switch (options.symlink_handling)
+    {
+    case SYMLINK_ALWAYS_DEREF:
+      ftsoptions |= FTS_COMFOLLOW|FTS_LOGICAL;
+      break;
+
+    case SYMLINK_DEREF_ARGSONLY:
+      ftsoptions |= FTS_COMFOLLOW|FTS_PHYSICAL;
+      break;
+
+    case SYMLINK_NEVER_DEREF:
+      ftsoptions |= FTS_PHYSICAL;
+      break;
+    }
+
+  if (options.stay_on_filesystem)
+    ftsoptions |= FTS_XDEV;
+
+  p = fts_open (arglist, ftsoptions, NULL);
+  if (NULL == p)
+    {
+      error (0, errno, _("cannot search %s"),
+            safely_quote_err_filename (0, arg));
+      error_severity (EXIT_FAILURE);
+    }
+  else
+    {
+      int level = INT_MIN;
+
+      while ( (ent=fts_read (p)) != NULL )
+       {
+         if (state.execdirs_outstanding)
+           {
+             /* If we changed level, perform any outstanding
+              * execdirs.  If we see a sequence of directory entries
+              * like this: fffdfffdfff, we could build a command line
+              * of 9 files, but this simple-minded implementation
+              * builds a command line for only 3 files at a time
+              * (since fts descends into the directories).
+              */
+             if ((int)ent->fts_level != level)
+               {
+                 show_outstanding_execdirs (stderr);
+                 complete_pending_execdirs ();
+               }
+           }
+         level = (int)ent->fts_level;
+
+         state.already_issued_stat_error_msg = false;
+         state.have_stat = false;
+         state.have_type = !!ent->fts_statp->st_mode;
+         state.type = state.have_type ? ent->fts_statp->st_mode : 0;
+         consider_visiting (p, ent);
+       }
+      if (0 != fts_close (p))
+       {
+         /* Here we break the abstraction of fts_close a bit, because we
+          * are going to skip the rest of the start points, and return with
+          * nonzero exit status.  Hence we need to issue a diagnostic on
+          * stderr. */
+         error (0, errno,
+                _("failed to restore working directory after searching %s"),
+                arg);
+         error_severity (EXIT_FAILURE);
+         return false;
+       }
+      p = NULL;
+    }
+  return true;
+}
+
+
+static bool
+process_all_startpoints (int argc, char *argv[])
+{
+  int i;
+
+  /* figure out how many start points there are */
+  for (i = 0; i < argc && !looks_like_expression (argv[i], true); i++)
+    {
+      state.starting_path_length = strlen (argv[i]); /* TODO: is this redundant? */
+      if (!find (argv[i]))
+       return false;
+    }
+
+  if (i == 0)
+    {
+      /*
+       * We use a temporary variable here because some actions modify
+       * the path temporarily.  Hence if we use a string constant,
+       * we get a coredump.  The best example of this is if we say
+       * "find -printf %H" (note, not "find . -printf %H").
+       */
+      char defaultpath[2] = ".";
+      return find (defaultpath);
+    }
+  return true;
+}
+
+
+
+
+int
+main (int argc, char **argv)
+{
+  int end_of_leading_options = 0; /* First arg after any -H/-L etc. */
+  struct predicate *eval_tree;
+
+  if (argv[0])
+    set_program_name (argv[0]);
+  else
+    set_program_name ("find");
+
+  record_initial_cwd ();
+
+  state.already_issued_stat_error_msg = false;
+  state.exit_status = 0;
+  state.execdirs_outstanding = false;
+  state.cwd_dir_fd = AT_FDCWD;
+
+  if (fd_leak_check_is_enabled ())
+    {
+      remember_non_cloexec_fds ();
+    }
+
+  state.shared_files = sharefile_init ("w");
+  if (NULL == state.shared_files)
+    {
+      error (EXIT_FAILURE, errno,
+            _("Failed initialise shared-file hash table"));
+    }
+
+  /* Set the option defaults before we do the locale initialisation as
+   * check_nofollow() needs to be executed in the POSIX locale.
+   */
+  set_option_defaults (&options);
+
+#ifdef HAVE_SETLOCALE
+  setlocale (LC_ALL, "");
+#endif
+
+  bindtextdomain (PACKAGE, LOCALEDIR);
+  textdomain (PACKAGE);
+  atexit (close_stdout);
+
+  /* Check for -P, -H or -L options.  Also -D and -O, which are
+   * both GNU extensions.
+   */
+  end_of_leading_options = process_leading_options (argc, argv);
+
+  if (options.debug_options & DebugStat)
+    options.xstat = debug_stat;
+
+#ifdef DEBUG
+  fprintf (stderr, "cur_day_start = %s", ctime (&options.cur_day_start));
+#endif /* DEBUG */
+
+
+  /* We are now processing the part of the "find" command line
+   * after the -H/-L options (if any).
+   */
+  eval_tree = build_expression_tree (argc, argv, end_of_leading_options);
+
+  /* safely_chdir() needs to check that it has ended up in the right place.
+   * To avoid bailing out when something gets automounted, it checks if
+   * the target directory appears to have had a directory mounted on it as
+   * we chdir()ed.  The problem with this is that in order to notice that
+   * a file system was mounted, we would need to lstat() all the mount points.
+   * That strategy loses if our machine is a client of a dead NFS server.
+   *
+   * Hence if safely_chdir() and wd_sanity_check() can manage without needing
+   * to know the mounted device list, we do that.
+   */
+  if (!options.open_nofollow_available)
+    {
+#ifdef STAT_MOUNTPOINTS
+      init_mounted_dev_list ();
+#endif
+    }
+
+
+  /* process_all_startpoints processes the starting points named on
+   * the command line.  A false return value from it means that we
+   * failed to restore the original context.  That means it would not
+   * be safe to call cleanup() since we might complete an execdir in
+   * the wrong directory for example.
+   */
+  if (process_all_startpoints (argc-end_of_leading_options,
+                              argv+end_of_leading_options))
+    {
+      /* If "-exec ... {} +" has been used, there may be some
+       * partially-full command lines which have been built,
+       * but which are not yet complete.   Execute those now.
+       */
+      show_success_rates (eval_tree);
+      cleanup ();
+    }
+  return state.exit_status;
+}
+
+bool
+is_fts_enabled (int *fts_options)
+{
+  /* this version of find (i.e. this main()) uses fts. */
+  *fts_options = ftsoptions;
+  return true;
+}
diff --git a/find/parser.c b/find/parser.c
new file mode 100644 (file)
index 0000000..52a1ef6
--- /dev/null
@@ -0,0 +1,3811 @@
+/* parser.c -- convert the command line args into an expression tree.
+   Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
+     2004, 2005, 2006, 2007, 2008, 2009, 2010 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/>.
+*/
+
+#include <config.h>
+
+#include "defs.h"
+#include <ctype.h>
+#include <math.h>
+#include <assert.h>
+#include <pwd.h>
+#include <errno.h>
+#include <grp.h>
+#include <fnmatch.h>
+#include <sys/stat.h>
+#include "mountlist.h"
+#include "modechange.h"
+#include "xstrtol.h"
+#include "xalloc.h"
+#include "quotearg.h"
+#include "buildcmd.h"
+#include "nextelem.h"
+#include "stdio-safer.h"
+#include "regextype.h"
+#include "stat-time.h"
+#include "xstrtod.h"
+#include "fts_.h"
+#include "parse-datetime.h"
+#include "error.h"
+#include "findutils-version.h"
+#include "safe-atoi.h"
+#include "fdleak.h"
+
+#include <fcntl.h>
+
+
+/* The presence of unistd.h is assumed by gnulib these days, so we
+ * might as well assume it too.
+ */
+/* We need <unistd.h> for isatty(). */
+#include <unistd.h>
+#include <sys/stat.h>
+
+#include "selinux-at.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
+
+#if !defined (isascii) || defined (STDC_HEADERS)
+#ifdef isascii
+#undef isascii
+#endif
+#define isascii(c) 1
+#endif
+
+#define ISDIGIT(c) (isascii ((unsigned char)c) && isdigit ((unsigned char)c))
+
+#ifndef HAVE_ENDGRENT
+#define endgrent ()
+#endif
+#ifndef HAVE_ENDPWENT
+#define endpwent ()
+#endif
+
+static bool parse_accesscheck   (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_amin          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_and           (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_anewer        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_cmin          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_cnewer        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_comma         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_daystart      (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_delete        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_d             (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_depth         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_empty         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_exec          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_execdir       (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_false         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_fls           (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_fprintf       (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_follow        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_fprint        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_fprint0       (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_fstype        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_gid           (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_group         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_help          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_ilname        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_iname         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_inum          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_ipath         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_iregex        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_iwholename    (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_links         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_lname         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_ls            (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_maxdepth      (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_mindepth      (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_mmin          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_name          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_negate        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_newer         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_newerXY       (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_noleaf        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_nogroup       (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_nouser        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_nowarn        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_ok            (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_okdir         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_or            (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_path          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_perm          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_print0        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_printf        (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_prune         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_regex         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_regextype     (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_samefile      (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_size          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_time          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_true          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_type          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_uid           (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_used          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_user          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_version       (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_wholename     (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_xdev          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_ignore_race   (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_noignore_race (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_warn          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_xtype         (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_quit          (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_context       (const struct parser_table*, char *argv[], int *arg_ptr);
+bool   parse_print              (const struct parser_table*, char *argv[], int *arg_ptr);
+#if 0
+static bool parse_show_control_chars (const struct parser_table*, char *argv[], int *arg_ptr);
+#endif
+
+
+
+static bool insert_type (char **argv, int *arg_ptr,
+                        const struct parser_table *entry,
+                        PRED_FUNC which_pred);
+static bool insert_regex (char *argv[], int *arg_ptr,
+                         const struct parser_table *entry,
+                         int regex_options);
+static bool insert_fprintf (struct format_val *vec,
+                           const struct parser_table *entry,
+                           PRED_FUNC func,
+                           const char *format);
+
+static struct segment **make_segment (struct segment **segment,
+                                     char *format, int len,
+                                     int kind, char format_char,
+                                     char aux_format_char,
+                                     struct predicate *pred);
+static bool insert_exec_ok (const char *action,
+                           const struct parser_table *entry,
+                           char *argv[],
+                           int *arg_ptr);
+static bool get_comp_type (const char **str,
+                          enum comparison_type *comp_type);
+static bool get_relative_timestamp (const char *str,
+                                   struct time_val *tval,
+                                   struct timespec origin,
+                                   double sec_per_unit,
+                                   const char *overflowmessage);
+static bool get_num (const char *str,
+                    uintmax_t *num,
+                    enum comparison_type *comp_type);
+static struct predicate* insert_num (char *argv[], int *arg_ptr,
+                                    const struct parser_table *entry);
+static void open_output_file (const char *path, struct format_val *p);
+static void open_stdout (struct format_val *p);
+static bool stream_is_tty(FILE *fp);
+static bool parse_noop (const struct parser_table* entry,
+                       char **argv, int *arg_ptr);
+
+#define PASTE(x,y) x##y
+#define STRINGIFY(s) #s
+
+#define PARSE_OPTION(what,suffix) \
+  { (ARG_OPTION), (what), PASTE(parse_,suffix), NULL }
+
+#define PARSE_POSOPT(what,suffix) \
+  { (ARG_POSITIONAL_OPTION), (what), PASTE(parse_,suffix), NULL }
+
+#define PARSE_TEST(what,suffix) \
+  { (ARG_TEST), (what), PASTE(parse_,suffix), PASTE(pred_,suffix) }
+
+#define PARSE_TEST_NP(what,suffix) \
+  { (ARG_TEST), (what), PASTE(parse_,suffix), NULL }
+
+#define PARSE_ACTION(what,suffix) \
+  { (ARG_ACTION), (what), PASTE(parse_,suffix), PASTE(pred_,suffix) }
+
+#define PARSE_ACTION_NP(what,suffix) \
+  { (ARG_ACTION), (what), PASTE(parse_,suffix), NULL }
+
+#define PARSE_PUNCTUATION(what,suffix) \
+  { (ARG_PUNCTUATION), (what), PASTE(parse_,suffix), PASTE(pred_,suffix) }
+
+
+/* Predicates we cannot handle in the usual way.  If you add an entry
+ * to this table, double-check the switch statement in
+ * pred_sanity_check() to make sure that the new case is being
+ * correctly handled.
+ */
+static struct parser_table const parse_entry_newerXY =
+  {
+    ARG_SPECIAL_PARSE, "newerXY",            parse_newerXY, pred_newerXY /* BSD  */
+  };
+
+/* GNU find predicates that are not mentioned in POSIX.2 are marked `GNU'.
+   If they are in some Unix versions of find, they are marked `Unix'. */
+
+static struct parser_table const parse_table[] =
+{
+  PARSE_PUNCTUATION("!",                     negate), /* POSIX */
+  PARSE_PUNCTUATION("not",                   negate),       /* GNU */
+  PARSE_PUNCTUATION("(",                     openparen), /* POSIX */
+  PARSE_PUNCTUATION(")",                     closeparen), /* POSIX */
+  PARSE_PUNCTUATION(",",                     comma),        /* GNU */
+  PARSE_PUNCTUATION("a",                     and), /* POSIX */
+  PARSE_TEST       ("amin",                  amin),         /* GNU */
+  PARSE_PUNCTUATION("and",                   and),             /* GNU */
+  PARSE_TEST       ("anewer",                anewer),       /* GNU */
+  {ARG_TEST,       "atime",                  parse_time, pred_atime}, /* POSIX */
+  PARSE_TEST       ("cmin",                  cmin),         /* GNU */
+  PARSE_TEST       ("cnewer",                cnewer),       /* GNU */
+  {ARG_TEST,       "ctime",                  parse_time, pred_ctime}, /* POSIX */
+  PARSE_TEST       ("context",               context),      /* GNU */
+  PARSE_POSOPT     ("daystart",              daystart),             /* GNU */
+  PARSE_ACTION     ("delete",                delete), /* GNU, Mac OS, FreeBSD */
+  PARSE_OPTION     ("d",                     d), /* Mac OS X, FreeBSD, NetBSD, OpenBSD, but deprecated  in favour of -depth */
+  PARSE_OPTION     ("depth",                 depth), /* POSIX */
+  PARSE_TEST       ("empty",                 empty),        /* GNU */
+  {ARG_ACTION,      "exec",    parse_exec, pred_exec}, /* POSIX */
+  {ARG_TEST,        "executable",            parse_accesscheck, pred_executable}, /* GNU, 4.3.0+ */
+  PARSE_ACTION     ("execdir",               execdir), /* *BSD, GNU */
+  PARSE_ACTION     ("fls",                   fls),          /* GNU */
+  PARSE_POSOPT     ("follow",                follow),  /* GNU, Unix */
+  PARSE_ACTION     ("fprint",                fprint),       /* GNU */
+  PARSE_ACTION     ("fprint0",               fprint0),      /* GNU */
+  {ARG_ACTION,      "fprintf", parse_fprintf, pred_fprintf}, /* GNU */
+  PARSE_TEST       ("fstype",                fstype),  /* GNU, Unix */
+  PARSE_TEST       ("gid",                   gid),          /* GNU */
+  PARSE_TEST       ("group",                 group), /* POSIX */
+  PARSE_OPTION     ("ignore_readdir_race",   ignore_race),   /* GNU */
+  PARSE_TEST       ("ilname",                ilname),       /* GNU */
+  PARSE_TEST       ("iname",                 iname),        /* GNU */
+  PARSE_TEST       ("inum",                  inum),    /* GNU, Unix */
+  PARSE_TEST       ("ipath",                 ipath), /* GNU, deprecated in favour of iwholename */
+  PARSE_TEST_NP    ("iregex",                iregex),       /* GNU */
+  PARSE_TEST_NP    ("iwholename",            iwholename),    /* GNU */
+  PARSE_TEST       ("links",                 links), /* POSIX */
+  PARSE_TEST       ("lname",                 lname),        /* GNU */
+  PARSE_ACTION     ("ls",                    ls),      /* GNU, Unix */
+  PARSE_OPTION     ("maxdepth",              maxdepth),             /* GNU */
+  PARSE_OPTION     ("mindepth",              mindepth),             /* GNU */
+  PARSE_TEST       ("mmin",                  mmin),         /* GNU */
+  PARSE_OPTION     ("mount",                 xdev),        /* Unix */
+  {ARG_TEST,       "mtime",                  parse_time, pred_mtime}, /* POSIX */
+  PARSE_TEST       ("name",                  name),
+#ifdef UNIMPLEMENTED_UNIX
+  PARSE(ARG_UNIMPLEMENTED, "ncpio",          ncpio),       /* Unix */
+#endif
+  PARSE_TEST       ("newer",                 newer), /* POSIX */
+  {ARG_TEST,       "atime",                  parse_time, pred_atime}, /* POSIX */
+  PARSE_OPTION     ("noleaf",                noleaf),       /* GNU */
+  PARSE_TEST       ("nogroup",               nogroup), /* POSIX */
+  PARSE_TEST       ("nouser",                nouser), /* POSIX */
+  PARSE_OPTION     ("noignore_readdir_race", noignore_race), /* GNU */
+  PARSE_POSOPT     ("nowarn",                nowarn),       /* GNU */
+  PARSE_PUNCTUATION("o",                     or), /* POSIX */
+  PARSE_PUNCTUATION("or",                    or),           /* GNU */
+  PARSE_ACTION     ("ok",                    ok), /* POSIX */
+  PARSE_ACTION     ("okdir",                 okdir), /* GNU (-execdir is BSD) */
+  PARSE_TEST       ("path",                  path), /* GNU, HP-UX, RMS prefers wholename, but anyway soon POSIX */
+  PARSE_TEST       ("perm",                  perm), /* POSIX */
+  PARSE_ACTION     ("print",                 print), /* POSIX */
+  PARSE_ACTION     ("print0",                print0),       /* GNU */
+  {ARG_ACTION,      "printf",   parse_printf, NULL},        /* GNU */
+  PARSE_ACTION     ("prune",                 prune), /* POSIX */
+  PARSE_ACTION     ("quit",                  quit),         /* GNU */
+  {ARG_TEST,       "readable",            parse_accesscheck, pred_readable}, /* GNU, 4.3.0+ */
+  PARSE_TEST       ("regex",                 regex),        /* GNU */
+  PARSE_POSOPT     ("regextype",             regextype),     /* GNU */
+  PARSE_TEST       ("samefile",              samefile),             /* GNU */
+#if 0
+  PARSE_OPTION     ("show-control-chars",    show_control_chars), /* GNU, 4.3.0+ */
+#endif
+  PARSE_TEST       ("size",                  size), /* POSIX */
+  PARSE_TEST       ("type",                  type), /* POSIX */
+  PARSE_TEST       ("uid",                   uid),          /* GNU */
+  PARSE_TEST       ("used",                  used),         /* GNU */
+  PARSE_TEST       ("user",                  user), /* POSIX */
+  PARSE_OPTION     ("warn",                  warn),         /* GNU */
+  PARSE_TEST_NP    ("wholename",             wholename), /* GNU, replaced -path, but anyway -path will soon be in POSIX */
+  {ARG_TEST,       "writable",               parse_accesscheck, pred_writable}, /* GNU, 4.3.0+ */
+  PARSE_OPTION     ("xdev",                  xdev), /* POSIX */
+  PARSE_TEST       ("xtype",                 xtype),        /* GNU */
+#ifdef UNIMPLEMENTED_UNIX
+  /* It's pretty ugly for find to know about archive formats.
+     Plus what it could do with cpio archives is very limited.
+     Better to leave it out.  */
+  PARSE(ARG_UNIMPLEMENTED,      "cpio",                  cpio),        /* Unix */
+#endif
+  /* gnulib's stdbool.h might have made true and false into macros,
+   * so we can't leave named 'true' and 'false' tokens, so we have
+   * to expeant the relevant entries longhand.
+   */
+  {ARG_TEST, "false",                 parse_false,   pred_false}, /* GNU */
+  {ARG_TEST, "true",                  parse_true,    pred_true }, /* GNU */
+  {ARG_NOOP, "noop",                  NULL,          pred_true }, /* GNU, internal use only */
+
+  /* Various other cases that don't fit neatly into our macro scheme. */
+  {ARG_TEST, "help",                  parse_help,    NULL},       /* GNU */
+  {ARG_TEST, "-help",                 parse_help,    NULL},       /* GNU */
+  {ARG_TEST, "version",               parse_version, NULL},      /* GNU */
+  {ARG_TEST, "-version",              parse_version, NULL},      /* GNU */
+  {0, 0, 0, 0}
+};
+
+
+static const char *first_nonoption_arg = NULL;
+static const struct parser_table *noop = NULL;
+
+static int
+fallback_getfilecon (int fd, const char *name, security_context_t *p,
+                    int prev_rv)
+{
+  /* Our original getfilecon () call failed.  Perhaps we can't follow a
+   * symbolic link.  If that might be the problem, lgetfilecon () the link.
+   * Otherwise, admit defeat. */
+  switch (errno)
+    {
+      case ENOENT:
+      case ENOTDIR:
+#ifdef DEBUG_STAT
+       fprintf (stderr, "fallback_getfilecon(): getfilecon(%s) failed; falling "
+                       "back on lgetfilecon()\n", name);
+#endif
+       return lgetfileconat (fd, name, p);
+
+      case EACCES:
+      case EIO:
+      case ELOOP:
+      case ENAMETOOLONG:
+#ifdef EOVERFLOW
+      case EOVERFLOW:        /* EOVERFLOW is not #defined on UNICOS. */
+#endif
+      default:
+       return prev_rv;
+    }
+}
+
+/* optionh_getfilecon () implements the getfilecon operation when the
+ * -H option is in effect.
+ *
+ * If the item to be examined is a command-line argument, we follow
+ * symbolic links.  If the getfilecon () call fails on the command-line
+ * item, we fall back on the properties of the symbolic link.
+ *
+ * If the item to be examined is not a command-line argument, we
+ * examine the link itself. */
+int
+optionh_getfilecon (int fd, const char *name, security_context_t *p)
+{
+  int rv;
+  if (0 == state.curdepth)
+    {
+      /* This file is from the command line; dereference the link (if it is
+        a link). */
+      rv = getfileconat (fd, name, p);
+      if (0 == rv)
+       return 0;               /* success */
+      else
+       return fallback_getfilecon (fd, name, p, rv);
+    }
+  else
+    {
+      /* Not a file on the command line; do not dereference the link. */
+      return lgetfileconat (fd, name, p);
+    }
+}
+
+/* optionl_getfilecon () implements the getfilecon operation when the
+ * -L option is in effect.  That option makes us examine the thing the
+ * symbolic link points to, not the symbolic link itself. */
+int
+optionl_getfilecon (int fd, const char *name, security_context_t *p)
+{
+  int rv = getfileconat (fd, name, p);
+  if (0 == rv)
+    return 0;                  /* normal case. */
+  else
+    return fallback_getfilecon (fd, name, p, rv);
+}
+
+/* optionp_getfilecon () implements the stat operation when the -P
+ * option is in effect (this is also the default).  That option makes
+ * us examine the symbolic link itself, not the thing it points to. */
+int
+optionp_getfilecon (int fd, const char *name, security_context_t *p)
+{
+  return lgetfileconat (fd, name, p);
+}
+
+void
+check_option_combinations (const struct predicate *p)
+{
+  enum { seen_delete=1u, seen_prune=2u };
+  unsigned int predicates = 0u;
+
+  while (p)
+    {
+      if (p->pred_func == pred_delete)
+       predicates |= seen_delete;
+      else if (p->pred_func == pred_prune)
+       predicates |= seen_prune;
+      p = p->pred_next;
+    }
+
+  if ((predicates & seen_prune) && (predicates & seen_delete))
+    {
+      /* The user specified both -delete and -prune.  One might test
+       * this by first doing
+       *    find dirs   .... -prune ..... -print
+       * to fnd out what's going to get deleted, and then switch to
+       *    find dirs   .... -prune ..... -delete
+       * once we are happy.  Unfortunately, the -delete action also
+       * implicitly turns on -depth, which will affect the behaviour
+       * of -prune (in fact, it makes it a no-op).  In this case we
+       * would like to prevent unfortunate accidents, so we require
+       * the user to have explicitly used -depth.
+       *
+       * We only get away with this because the -delete predicate is not
+       * in POSIX.   If it was, we couldn't issue a fatal error here.
+       */
+      if (!options.explicit_depth)
+       {
+         /* This fixes Savannah bug #20865. */
+         error (EXIT_FAILURE, 0,
+                _("The -delete action automatically turns on -depth, "
+                  "but -prune does nothing when -depth is in effect.  "
+                  "If you want to carry on anyway, just explicitly use "
+                  "the -depth option."));
+       }
+    }
+}
+
+
+static const struct parser_table*
+get_noop (void)
+{
+  int i;
+  if (NULL == noop)
+    {
+      for (i = 0; parse_table[i].parser_name != 0; i++)
+       {
+         if (ARG_NOOP ==parse_table[i].type)
+           {
+             noop = &(parse_table[i]);
+             break;
+           }
+       }
+    }
+  return noop;
+}
+
+static int
+get_stat_Ytime (const struct stat *p,
+               char what,
+               struct timespec *ret)
+{
+  switch (what)
+    {
+    case 'a':
+      *ret = get_stat_atime (p);
+      return 1;
+    case 'B':
+      *ret = get_stat_birthtime (p);
+      return (ret->tv_nsec >= 0);
+    case 'c':
+      *ret = get_stat_ctime (p);
+      return 1;
+    case 'm':
+      *ret = get_stat_mtime (p);
+      return 1;
+    default:
+      assert (0);
+      abort ();
+    }
+}
+
+void
+set_follow_state (enum SymlinkOption opt)
+{
+  if (options.debug_options & DebugStat)
+    {
+      /* For DebugStat, the choice is made at runtime within debug_stat()
+       * by checking the contents of the symlink_handling variable.
+       */
+      options.xstat = debug_stat;
+    }
+  else
+    {
+      switch (opt)
+       {
+       case SYMLINK_ALWAYS_DEREF:  /* -L */
+         options.xstat = optionl_stat;
+         options.x_getfilecon = optionl_getfilecon;
+         options.no_leaf_check = true;
+         break;
+
+       case SYMLINK_NEVER_DEREF:       /* -P (default) */
+         options.xstat = optionp_stat;
+         options.x_getfilecon = optionp_getfilecon;
+         /* Can't turn no_leaf_check off because the user might have specified
+          * -noleaf anyway
+          */
+         break;
+
+       case SYMLINK_DEREF_ARGSONLY: /* -H */
+         options.xstat = optionh_stat;
+         options.x_getfilecon = optionh_getfilecon;
+         options.no_leaf_check = true;
+       }
+    }
+  options.symlink_handling = opt;
+}
+
+
+void
+parse_begin_user_args (char **args, int argno,
+                      const struct predicate *last,
+                      const struct predicate *predicates)
+{
+  (void) args;
+  (void) argno;
+  (void) last;
+  (void) predicates;
+  first_nonoption_arg = NULL;
+}
+
+void
+parse_end_user_args (char **args, int argno,
+                    const struct predicate *last,
+                    const struct predicate *predicates)
+{
+  /* does nothing */
+  (void) args;
+  (void) argno;
+  (void) last;
+  (void) predicates;
+}
+
+
+/* Check that it is legal to fid the given primary in its
+ * position and return it.
+ */
+const struct parser_table*
+found_parser (const char *original_arg, const struct parser_table *entry)
+{
+  /* If this is an option, but we have already had a
+   * non-option argument, the user may be under the
+   * impression that the behaviour of the option
+   * argument is conditional on some preceding
+   * tests.  This might typically be the case with,
+   * for example, -maxdepth.
+   *
+   * The options -daystart and -follow are exempt
+   * from this treatment, since their positioning
+   * in the command line does have an effect on
+   * subsequent tests but not previous ones.  That
+   * might be intentional on the part of the user.
+   */
+  if (entry->type != ARG_POSITIONAL_OPTION)
+    {
+      /* Something other than -follow/-daystart.
+       * If this is an option, check if it followed
+       * a non-option and if so, issue a warning.
+       */
+      if (entry->type == ARG_OPTION)
+       {
+         if ((first_nonoption_arg != NULL)
+             && options.warnings )
+           {
+             /* option which follows a non-option */
+             error (0, 0,
+                    _("warning: you have specified the %s "
+                      "option after a non-option argument %s, "
+                      "but options are not positional (%s affects "
+                      "tests specified before it as well as those "
+                      "specified after it).  Please specify options "
+                      "before other arguments.\n"),
+                    original_arg,
+                    first_nonoption_arg,
+                    original_arg);
+           }
+       }
+      else
+       {
+         /* Not an option or a positional option,
+          * so remember we've seen it in order to
+          * use it in a possible future warning message.
+          */
+         if (first_nonoption_arg == NULL)
+           {
+             first_nonoption_arg = original_arg;
+           }
+       }
+    }
+
+  return entry;
+}
+
+
+/* Return a pointer to the parser function to invoke for predicate
+   SEARCH_NAME.
+   Return NULL if SEARCH_NAME is not a valid predicate name. */
+
+const struct parser_table*
+find_parser (char *search_name)
+{
+  int i;
+  const char *original_arg = search_name;
+
+  /* Ugh.  Special case -newerXY. */
+  if (0 == strncmp ("-newer", search_name, 6)
+      && (8 == strlen (search_name)))
+    {
+      return found_parser (original_arg, &parse_entry_newerXY);
+    }
+
+  if (*search_name == '-')
+    search_name++;
+
+  for (i = 0; parse_table[i].parser_name != 0; i++)
+    {
+      if (strcmp (parse_table[i].parser_name, search_name) == 0)
+       {
+         return found_parser (original_arg, &parse_table[i]);
+       }
+    }
+  return NULL;
+}
+
+static float
+estimate_file_age_success_rate (float num_days)
+{
+  if (num_days < 0.1)
+    {
+      /* Assume 1% of files have timestamps in the future */
+      return 0.01f;
+    }
+  else if (num_days < 1)
+    {
+      /* Assume 30% of files have timestamps today */
+      return 0.3f;
+    }
+  else if (num_days > 100)
+    {
+      /* Assume 30% of files are very old */
+      return 0.3f;
+    }
+  else
+    {
+      /* Assume 39% of files are between 1 and 100 days old. */
+      return 0.39f;
+    }
+}
+
+static float
+estimate_timestamp_success_rate (time_t when)
+{
+  /* This calculation ignores the nanoseconds field of the
+   * origin, but I don't think that makes much difference
+   * to our estimate.
+   */
+  int num_days = (options.cur_day_start.tv_sec - when) / 86400;
+  return estimate_file_age_success_rate (num_days);
+}
+
+/* Collect an argument from the argument list, or
+ * return false.
+ */
+static bool
+collect_arg (char **argv, int *arg_ptr, const char **collected_arg)
+{
+  if ((argv == NULL) || (argv[*arg_ptr] == NULL))
+    {
+      *collected_arg = NULL;
+      return false;
+    }
+  else
+    {
+      *collected_arg = argv[*arg_ptr];
+      (*arg_ptr)++;
+      return true;
+    }
+}
+
+static bool
+collect_arg_stat_info (char **argv, int *arg_ptr, struct stat *p,
+                      const char **argument)
+{
+  const char *filename;
+  if (collect_arg (argv, arg_ptr, &filename))
+    {
+      *argument = filename;
+      if (0 == (options.xstat)(filename, p))
+       {
+         return true;
+       }
+      else
+       {
+         fatal_target_file_error (errno, filename);
+       }
+    }
+  else
+    {
+      *argument = NULL;
+      return false;
+    }
+}
+
+/* The parsers are responsible to continue scanning ARGV for
+   their arguments.  Each parser knows what is and isn't
+   allowed for itself.
+
+   ARGV is the argument array.
+   *ARG_PTR is the index to start at in ARGV,
+   updated to point beyond the last element consumed.
+
+   The predicate structure is updated with the new information. */
+
+
+static bool
+parse_and (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  (void) argv;
+  (void) arg_ptr;
+
+  our_pred = get_new_pred_noarg (entry);
+  our_pred->pred_func = pred_and;
+  our_pred->p_type = BI_OP;
+  our_pred->p_prec = AND_PREC;
+  our_pred->need_stat = our_pred->need_type = false;
+  return true;
+}
+
+static bool
+parse_anewer (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct stat stat_newer;
+  const char *arg;
+
+  set_stat_placeholders (&stat_newer);
+  if (collect_arg_stat_info (argv, arg_ptr, &stat_newer, &arg))
+    {
+      struct predicate *our_pred = insert_primary (entry, arg);
+      our_pred->args.reftime.xval = XVAL_ATIME;
+      our_pred->args.reftime.ts = get_stat_mtime (&stat_newer);
+      our_pred->args.reftime.kind = COMP_GT;
+      our_pred->est_success_rate = estimate_timestamp_success_rate (stat_newer.st_mtime);
+      return true;
+    }
+  return false;
+}
+
+bool
+parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  (void) argv;
+  (void) arg_ptr;
+
+  our_pred = get_new_pred_noarg (entry);
+  our_pred->pred_func = pred_closeparen;
+  our_pred->p_type = CLOSE_PAREN;
+  our_pred->p_prec = NO_PREC;
+  our_pred->need_stat = our_pred->need_type = false;
+  return true;
+}
+
+static bool
+parse_cnewer (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct stat stat_newer;
+  const char *arg;
+
+  set_stat_placeholders (&stat_newer);
+  if (collect_arg_stat_info (argv, arg_ptr, &stat_newer, &arg))
+    {
+      struct predicate *our_pred = insert_primary (entry, arg);
+      our_pred->args.reftime.xval = XVAL_CTIME; /* like -newercm */
+      our_pred->args.reftime.ts = get_stat_mtime (&stat_newer);
+      our_pred->args.reftime.kind = COMP_GT;
+      our_pred->est_success_rate = estimate_timestamp_success_rate (stat_newer.st_mtime);
+      return true;
+    }
+  return false;
+}
+
+static bool
+parse_comma (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  (void) argv;
+  (void) arg_ptr;
+
+  our_pred = get_new_pred_noarg (entry);
+  our_pred->pred_func = pred_comma;
+  our_pred->p_type = BI_OP;
+  our_pred->p_prec = COMMA_PREC;
+  our_pred->need_stat = our_pred->need_type = false;
+  our_pred->est_success_rate = 1.0f;
+  return true;
+}
+
+static bool
+parse_daystart (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct tm *local;
+
+  (void) entry;
+  (void) argv;
+  (void) arg_ptr;
+
+  if (options.full_days == false)
+    {
+      options.cur_day_start.tv_sec += DAYSECS;
+      options.cur_day_start.tv_nsec = 0;
+      local = localtime (&options.cur_day_start.tv_sec);
+      options.cur_day_start.tv_sec -= (local
+                                      ? (local->tm_sec + local->tm_min * 60
+                                         + local->tm_hour * 3600)
+                                      : options.cur_day_start.tv_sec % DAYSECS);
+      options.full_days = true;
+    }
+  return true;
+}
+
+static bool
+parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr)
+{
+  struct predicate *our_pred;
+  (void) argv;
+  (void) arg_ptr;
+
+  our_pred = insert_primary_noarg (entry);
+  our_pred->side_effects = our_pred->no_default_print = true;
+  /* -delete implies -depth */
+  options.do_dir_first = false;
+
+  /* We do not need stat information because we check for the case
+   * (errno==EISDIR) in pred_delete.
+   */
+  our_pred->need_stat = our_pred->need_type = false;
+
+  our_pred->est_success_rate = 1.0f;
+  return true;
+}
+
+static bool
+parse_depth (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  (void) entry;
+  (void) argv;
+
+  options.do_dir_first = false;
+  options.explicit_depth = true;
+  return parse_noop (entry, argv, arg_ptr);
+}
+
+static bool
+parse_d (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  if (options.warnings)
+    {
+      error (0, 0,
+            _("warning: the -d option is deprecated; please use "
+              "-depth instead, because the latter is a "
+              "POSIX-compliant feature."));
+    }
+  return parse_depth (entry, argv, arg_ptr);
+}
+
+static bool
+parse_empty (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+  (void) argv;
+  (void) arg_ptr;
+
+  our_pred = insert_primary_noarg (entry);
+  our_pred->est_success_rate = 0.01f; /* assume 1% of files are empty. */
+  return true;
+}
+
+static bool
+parse_exec (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_exec_ok ("-exec", entry, argv, arg_ptr);
+}
+
+static bool
+parse_execdir (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_exec_ok ("-execdir", entry, argv, arg_ptr);
+}
+
+static bool
+insert_false(void)
+{
+  struct predicate *our_pred;
+  const struct parser_table *entry_false;
+
+  entry_false = find_parser("false");
+  our_pred = insert_primary_noarg (entry_false);
+  our_pred->need_stat = our_pred->need_type = false;
+  our_pred->side_effects = our_pred->no_default_print = false;
+  our_pred->est_success_rate = 0.0f;
+  return true;
+}
+
+
+static bool
+parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_false ();
+}
+
+static bool
+insert_fls (const struct parser_table* entry, const char *filename)
+{
+  struct predicate *our_pred = insert_primary_noarg (entry);
+  if (filename)
+    open_output_file (filename, &our_pred->args.printf_vec);
+  else
+    open_stdout (&our_pred->args.printf_vec);
+  our_pred->side_effects = our_pred->no_default_print = true;
+  our_pred->est_success_rate = 1.0f;
+  return true;
+}
+
+
+static bool
+parse_fls (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *filename;
+  if (collect_arg (argv, arg_ptr, &filename))
+    {
+      if (insert_fls (entry, filename))
+       return true;
+      else
+       --*arg_ptr;             /* don't consume the invalid arg. */
+    }
+  return false;
+}
+
+static bool
+parse_follow (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  set_follow_state (SYMLINK_ALWAYS_DEREF);
+  return parse_noop (entry, argv, arg_ptr);
+}
+
+static bool
+parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+  const char *filename;
+  if (collect_arg (argv, arg_ptr, &filename))
+    {
+      our_pred = insert_primary (entry, filename);
+      open_output_file (filename, &our_pred->args.printf_vec);
+      our_pred->side_effects = our_pred->no_default_print = true;
+      our_pred->need_stat = our_pred->need_type = false;
+      our_pred->est_success_rate = 1.0f;
+      return true;
+    }
+  else
+    {
+      return false;
+    }
+}
+
+static bool
+insert_fprint (const struct parser_table* entry, const char *filename)
+{
+  struct predicate *our_pred = insert_primary (entry, filename);
+  if (filename)
+    open_output_file (filename, &our_pred->args.printf_vec);
+  else
+    open_stdout (&our_pred->args.printf_vec);
+  our_pred->side_effects = our_pred->no_default_print = true;
+  our_pred->need_stat = our_pred->need_type = false;
+  our_pred->est_success_rate = 1.0f;
+  return true;
+}
+
+
+static bool
+parse_fprint0 (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *filename;
+  if (collect_arg (argv, arg_ptr, &filename))
+    {
+      if (insert_fprint (entry, filename))
+       return true;
+      else
+       --*arg_ptr;             /* don't consume the bad arg. */
+    }
+  return false;
+}
+
+static float estimate_fstype_success_rate (const char *fsname)
+{
+  struct stat dir_stat;
+  const char *the_root_dir = "/";
+  if (0 == stat (the_root_dir, &dir_stat)) /* it's an absolute path anyway */
+    {
+      const char *fstype = filesystem_type (&dir_stat, the_root_dir);
+      /* Assume most files are on the same file system type as the root fs. */
+      if (0 == strcmp (fsname, fstype))
+         return 0.7f;
+      else
+       return 0.3f;
+    }
+  return 1.0f;
+}
+
+
+
+static bool
+is_used_fs_type(const char *name)
+{
+  if (0 == strcmp("afs", name))
+    {
+      /* I guess AFS may not appear in /etc/mtab (or equivalent) but still be in use,
+        so assume we always need to check for AFS.  */
+      return true;
+    }
+  else
+    {
+      const struct mount_entry *entries = read_file_system_list(false);
+      if (entries)
+       {
+         const struct mount_entry *entry;
+         for (entry = entries; entry; entry = entry->me_next)
+           {
+             if (0 == strcmp(name, entry->me_type))
+               return true;
+           }
+       }
+      else
+       {
+         return true;
+       }
+    }
+  return false;
+}
+
+
+static bool
+parse_fstype (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *typename;
+  if (collect_arg (argv, arg_ptr, &typename))
+    {
+      if (options.optimisation_level < 2 || is_used_fs_type (typename))
+       {
+         struct predicate *our_pred = insert_primary (entry, typename);
+         our_pred->args.str = typename;
+
+         /* This is an expensive operation, so although there are
+          * circumstances where it is selective, we ignore this fact
+          * because we probably don't want to promote this test to the
+          * front anyway.
+          */
+         our_pred->est_success_rate = estimate_fstype_success_rate (typename);
+         return true;
+       }
+      else
+       {
+         /* This filesystem type is not listed in the mount table.
+          * Hence this predicate will always return false (with this argument).
+          * Substitute a predicate with the same effect as -false.
+          */
+         if (options.debug_options & DebugTreeOpt)
+           {
+             fprintf (stderr,
+                      "-fstype %s can never succeed, substituting -false\n",
+                      typename);
+           }
+         return insert_false ();
+       }
+    }
+  else
+    {
+      return false;
+    }
+}
+
+static bool
+parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *p = insert_num (argv, arg_ptr, entry);
+  if (p)
+    {
+      p->est_success_rate = (p->args.numinfo.l_val < 100) ? 0.99 : 0.2;
+      return true;
+    }
+  else
+    {
+      --*arg_ptr;              /* don't consume the invalid argument. */
+      return false;
+    }
+}
+
+
+static bool
+parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *groupname;
+  const int saved_argc = *arg_ptr;
+
+  if (collect_arg (argv, arg_ptr, &groupname))
+    {
+      gid_t gid;
+      struct predicate *our_pred;
+      struct group *cur_gr = getgrnam (groupname);
+      endgrent ();
+      if (cur_gr)
+       {
+         gid = cur_gr->gr_gid;
+       }
+      else
+       {
+         const int gid_len = strspn (groupname, "0123456789");
+         if (gid_len)
+           {
+             if (groupname[gid_len] == 0)
+               {
+                 gid = safe_atoi (groupname, options.err_quoting_style);
+               }
+             else
+               {
+                 /* XXX: no test in test suite for this */
+                 error (EXIT_FAILURE, 0,
+                        _("%s is not the name of an existing group and"
+                          " it does not look like a numeric group ID "
+                          "because it has the unexpected suffix %s"),
+                        quotearg_n_style (0, options.err_quoting_style, groupname),
+                        quotearg_n_style (1, options.err_quoting_style, groupname+gid_len));
+                 *arg_ptr = saved_argc; /* don't consume the invalid argument. */
+                 return false;
+               }
+           }
+         else
+           {
+             if (*groupname)
+               {
+                 /* XXX: no test in test suite for this */
+                 error (EXIT_FAILURE, 0,
+                        _("%s is not the name of an existing group"),
+                        quotearg_n_style (0, options.err_quoting_style, groupname));
+               }
+             else
+               {
+                 error (EXIT_FAILURE, 0,
+                        _("argument to -group is empty, but should be a group name"));
+               }
+             *arg_ptr = saved_argc; /* don't consume the invalid argument. */
+             return false;
+           }
+       }
+      our_pred = insert_primary (entry, groupname);
+      our_pred->args.gid = gid;
+      our_pred->est_success_rate = (our_pred->args.numinfo.l_val < 100) ? 0.99 : 0.2;
+      return true;
+    }
+  return false;
+}
+
+static bool
+parse_help (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  (void) entry;
+  (void) argv;
+  (void) arg_ptr;
+
+  usage (stdout, 0, NULL);
+  puts (_("\n\
+default path is the current directory; default expression is -print\n\
+expression may consist of: operators, options, tests, and actions:\n"));
+  puts (_("\
+operators (decreasing precedence; -and is implicit where no others are given):\n\
+      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n\
+      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"));
+  puts (_("\
+positional options (always true): -daystart -follow -regextype\n\n\
+normal options (always true, specified before other expressions):\n\
+      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n\
+      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"));
+  puts (_("\
+tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n\
+      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n\
+      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex PATTERN\n\
+      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"));
+  puts (_("\
+      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n\
+      -readable -writable -executable\n\
+      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n\
+      -used N -user NAME -xtype [bcdpfls]"));
+  puts (_("\
+      -context CONTEXT\n"));
+  puts (_("\n\
+actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n\
+      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n\
+      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n\
+      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n\
+"));
+  puts (_("Report (and track progress on fixing) bugs via the findutils bug-reporting\n\
+page at http://savannah.gnu.org/ or, if you have no web access, by sending\n\
+email to <bug-findutils@gnu.org>."));
+  exit (EXIT_SUCCESS);
+}
+
+static float
+estimate_pattern_match_rate (const char *pattern, int is_regex)
+{
+  if (strpbrk (pattern, "*?[") || (is_regex && strpbrk(pattern, ".")))
+    {
+      /* A wildcard; assume the pattern matches most files. */
+      return 0.8f;
+    }
+  else
+    {
+      return 0.1f;
+    }
+}
+
+static bool
+parse_ilname (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *name;
+  if (collect_arg (argv, arg_ptr, &name))
+    {
+      struct predicate *our_pred = insert_primary (entry, name);
+      our_pred->args.str = name;
+      /* Use the generic glob pattern estimator to figure out how many
+       * links will match, but bear in mind that most files won't be links.
+       */
+      our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate (name, 0);
+      return true;
+    }
+  else
+    {
+      return false;
+    }
+}
+
+
+/* sanity check the fnmatch() function to make sure that case folding
+ * is supported (as opposed to just having the flag ignored).
+ */
+static bool
+fnmatch_sanitycheck (void)
+{
+  static bool checked = false;
+  if (!checked)
+    {
+      if (0 != fnmatch ("foo", "foo", 0)
+         || 0 == fnmatch ("Foo", "foo", 0)
+         || 0 != fnmatch ("Foo", "foo", FNM_CASEFOLD))
+       {
+         error (EXIT_FAILURE, 0,
+                _("sanity check of the fnmatch() library function failed."));
+         return false;
+       }
+      checked = true;
+    }
+  return checked;
+}
+
+
+static bool
+check_name_arg (const char *pred, const char *arg)
+{
+  if (options.warnings && strchr (arg, '/'))
+    {
+      error (0, 0,_("warning: Unix filenames usually don't contain slashes "
+                   "(though pathnames do).  That means that '%s %s' will "
+                   "probably evaluate to false all the time on this system.  "
+                   "You might find the '-wholename' test more useful, or "
+                   "perhaps '-samefile'.  Alternatively, if you are using "
+                   "GNU grep, you could "
+                   "use 'find ... -print0 | grep -FzZ %s'."),
+           pred,
+           safely_quote_err_filename (0, arg),
+           safely_quote_err_filename (1, arg));
+    }
+  return true;                 /* allow it anyway */
+}
+
+
+
+static bool
+parse_iname (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *name;
+  fnmatch_sanitycheck ();
+  if (collect_arg (argv, arg_ptr, &name))
+    {
+      if (check_name_arg ("-iname", name))
+       {
+         struct predicate *our_pred = insert_primary (entry, name);
+         our_pred->need_stat = our_pred->need_type = false;
+         our_pred->args.str = name;
+         our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
+         return true;
+       }
+    }
+  return false;
+}
+
+static bool
+parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *p =  insert_num (argv, arg_ptr, entry);
+  if (p)
+    {
+      /* inode number is exact match only, so very low proportions of
+       * files match
+       */
+      p->est_success_rate = 1e-6;
+      p->need_inum = true;
+      p->need_stat = false;
+      p->need_type = false;
+      return true;
+    }
+  else
+    {
+      --*arg_ptr;              /* don't consume the invalid argument. */
+      return false;
+    }
+}
+
+static bool
+parse_iregex (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_regex (argv, arg_ptr, entry, RE_ICASE|options.regex_options);
+}
+
+static bool
+parse_links (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *p = insert_num (argv, arg_ptr, entry);
+  if (p)
+    {
+      if (p->args.numinfo.l_val == 1)
+       p->est_success_rate = 0.99;
+      else if (p->args.numinfo.l_val == 2)
+       p->est_success_rate = 0.01;
+      else
+       p->est_success_rate = 1e-3;
+      return true;
+    }
+  else
+    {
+      --*arg_ptr;              /* don't consume the invalid argument. */
+      return false;
+    }
+}
+
+static bool
+parse_lname (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *name;
+  fnmatch_sanitycheck ();
+  if (collect_arg (argv, arg_ptr, &name))
+    {
+      struct predicate *our_pred = insert_primary (entry, name);
+      our_pred->args.str = name;
+      our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate (name, 0);
+      return true;
+    }
+  return false;
+}
+
+static bool
+parse_ls (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  (void) &argv;
+  (void) &arg_ptr;
+  return insert_fls (entry, NULL);
+}
+
+static bool
+insert_depthspec (const struct parser_table* entry, char **argv, int *arg_ptr,
+                 int *limitptr)
+{
+  const char *depthstr;
+  int depth_len;
+  const char *predicate = argv[(*arg_ptr)-1];
+  if (collect_arg (argv, arg_ptr, &depthstr))
+    {
+      depth_len = strspn (depthstr, "0123456789");
+      if ((depth_len > 0) && (depthstr[depth_len] == 0))
+       {
+         (*limitptr) = safe_atoi (depthstr, options.err_quoting_style);
+         if (*limitptr >= 0)
+           {
+             return parse_noop (entry, argv, arg_ptr);
+           }
+       }
+      error (EXIT_FAILURE, 0,
+            _("Expected a positive decimal integer argument to %s, but got %s"),
+            predicate,
+            quotearg_n_style (0, options.err_quoting_style, depthstr));
+      /* NOTREACHED */
+      return false;
+    }
+  /* missing argument */
+  return false;
+}
+
+
+static bool
+parse_maxdepth (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_depthspec (entry, argv, arg_ptr, &options.maxdepth);
+}
+
+static bool
+parse_mindepth (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_depthspec (entry, argv, arg_ptr, &options.mindepth);
+}
+
+
+static bool
+do_parse_xmin (const struct parser_table* entry,
+              char **argv,
+              int *arg_ptr,
+              enum xval xv)
+{
+  const char *minutes;
+  const int saved_argc = *arg_ptr;
+
+  if (collect_arg (argv, arg_ptr, &minutes))
+    {
+      struct time_val tval;
+      struct timespec origin = options.cur_day_start;
+      tval.xval = xv;
+      origin.tv_sec += DAYSECS;
+      if (get_relative_timestamp (minutes, &tval, origin, 60,
+                                 "arithmetic overflow while converting %s "
+                                 "minutes to a number of seconds"))
+       {
+         struct predicate *our_pred = insert_primary (entry, minutes);
+         our_pred->args.reftime = tval;
+         our_pred->est_success_rate = estimate_timestamp_success_rate (tval.ts.tv_sec);
+         return true;
+       }
+      else
+       {
+         /* Don't consume the invalid argument. */
+         *arg_ptr = saved_argc;
+       }
+    }
+  return false;
+}
+static bool
+parse_amin (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return do_parse_xmin (entry, argv, arg_ptr, XVAL_ATIME);
+}
+
+static bool
+parse_cmin (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return do_parse_xmin (entry, argv, arg_ptr, XVAL_CTIME);
+}
+
+
+static bool
+parse_mmin (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return do_parse_xmin (entry, argv, arg_ptr, XVAL_MTIME);
+}
+
+static bool
+parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *name;
+  const int saved_argc = *arg_ptr;
+
+  if (collect_arg (argv, arg_ptr, &name))
+    {
+      fnmatch_sanitycheck ();
+      if (check_name_arg ("-name", name))
+       {
+         struct predicate *our_pred = insert_primary (entry, name);
+         our_pred->need_stat = our_pred->need_type = false;
+         our_pred->args.str = name;
+         our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
+         return true;
+       }
+      else
+       {
+         *arg_ptr = saved_argc; /* don't consume the invalid argument. */
+       }
+    }
+  return false;
+}
+
+static bool
+parse_negate (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  (void) &argv;
+  (void) &arg_ptr;
+
+  our_pred = get_new_pred_chk_op (entry, NULL);
+  our_pred->pred_func = pred_negate;
+  our_pred->p_type = UNI_OP;
+  our_pred->p_prec = NEGATE_PREC;
+  our_pred->need_stat = our_pred->need_type = false;
+  return true;
+}
+
+static bool
+parse_newer (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+  struct stat stat_newer;
+  const char *arg;
+
+  set_stat_placeholders (&stat_newer);
+  if (collect_arg_stat_info (argv, arg_ptr, &stat_newer, &arg))
+    {
+      our_pred = insert_primary (entry, arg);
+      our_pred->args.reftime.ts = get_stat_mtime (&stat_newer);
+      our_pred->args.reftime.xval = XVAL_MTIME;
+      our_pred->args.reftime.kind = COMP_GT;
+      our_pred->est_success_rate = estimate_timestamp_success_rate (stat_newer.st_mtime);
+      return true;
+    }
+  return false;
+}
+
+
+static bool
+parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  (void) argv;
+  (void) arg_ptr;
+
+  if ((argv == NULL) || (argv[*arg_ptr] == NULL))
+    {
+      return false;
+    }
+  else if (8u != strlen (argv[*arg_ptr]))
+    {
+      return false;
+    }
+  else
+    {
+      char x, y;
+      const char validchars[] = "aBcmt";
+
+      assert (0 == strncmp ("-newer", argv[*arg_ptr], 6));
+      x = argv[*arg_ptr][6];
+      y = argv[*arg_ptr][7];
+
+
+#if !defined(HAVE_STRUCT_STAT_ST_BIRTHTIME) && !defined(HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) && !defined(HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC) && !defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC
+      if ('B' == x || 'B' == y)
+       {
+         error (0, 0,
+                _("This system does not provide a way to find the birth time of a file."));
+         return false;
+       }
+#endif
+
+      /* -newertY (for any Y) is invalid. */
+      if (x == 't'
+         || 0 == strchr (validchars, x)
+         || 0 == strchr ( validchars, y))
+       {
+         return false;
+       }
+      else
+       {
+         struct predicate *our_pred;
+
+         /* Because this item is ARG_SPECIAL_PARSE, we have to advance arg_ptr
+          * past the test name (for most other tests, this is already done)
+          */
+         if (argv[1+*arg_ptr] == NULL)
+           {
+             error (EXIT_FAILURE, 0, _("The %s test needs an argument"),
+                    quotearg_n_style (0, options.err_quoting_style, argv[*arg_ptr]));
+           }
+         else
+           {
+             (*arg_ptr)++;
+           }
+
+         our_pred = insert_primary (entry, argv[*arg_ptr]);
+
+
+         switch (x)
+           {
+           case 'a':
+             our_pred->args.reftime.xval = XVAL_ATIME;
+             break;
+           case 'B':
+             our_pred->args.reftime.xval = XVAL_BIRTHTIME;
+             break;
+           case 'c':
+             our_pred->args.reftime.xval = XVAL_CTIME;
+             break;
+           case 'm':
+             our_pred->args.reftime.xval = XVAL_MTIME;
+             break;
+           default:
+             assert (strchr (validchars, x));
+             assert (0);
+           }
+
+         if ('t' == y)
+           {
+             if (!parse_datetime (&our_pred->args.reftime.ts,
+                                  argv[*arg_ptr],
+                                  &options.start_time))
+               {
+                 error (EXIT_FAILURE, 0,
+                        _("I cannot figure out how to interpret %s as a date or time"),
+                        quotearg_n_style (0, options.err_quoting_style, argv[*arg_ptr]));
+               }
+           }
+         else
+           {
+             struct stat stat_newer;
+
+             /* Stat the named file. */
+             set_stat_placeholders (&stat_newer);
+             if ((*options.xstat) (argv[*arg_ptr], &stat_newer))
+               fatal_target_file_error (errno, argv[*arg_ptr]);
+
+             if (!get_stat_Ytime (&stat_newer, y, &our_pred->args.reftime.ts))
+               {
+                 /* We cannot extract a timestamp from the struct stat. */
+                 error (EXIT_FAILURE, 0,
+                        _("Cannot obtain birth time of file %s"),
+                        safely_quote_err_filename (0, argv[*arg_ptr]));
+               }
+           }
+         our_pred->args.reftime.kind = COMP_GT;
+         our_pred->est_success_rate = estimate_timestamp_success_rate (our_pred->args.reftime.ts.tv_sec);
+         (*arg_ptr)++;
+
+         assert (our_pred->pred_func != NULL);
+         assert (our_pred->pred_func == pred_newerXY);
+         assert (our_pred->need_stat);
+         return true;
+       }
+    }
+}
+
+
+static bool
+parse_noleaf (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  options.no_leaf_check = true;
+  return parse_noop (entry, argv, arg_ptr);
+}
+
+#ifdef CACHE_IDS
+/* Arbitrary amount by which to increase size
+   of `uid_unused' and `gid_unused'. */
+#define ALLOC_STEP 2048
+
+/* Boolean: if uid_unused[n] is nonzero, then UID n has no passwd entry. */
+char *uid_unused = NULL;
+
+/* Number of elements in `uid_unused'. */
+unsigned uid_allocated;
+
+/* Similar for GIDs and group entries. */
+char *gid_unused = NULL;
+unsigned gid_allocated;
+#endif
+
+static bool
+parse_nogroup (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  (void) &argv;
+  (void) &arg_ptr;
+
+  our_pred = insert_primary (entry, NULL);
+  our_pred->est_success_rate = 1e-4;
+#ifdef CACHE_IDS
+  if (gid_unused == NULL)
+    {
+      struct group *gr;
+
+      gid_allocated = ALLOC_STEP;
+      gid_unused = xmalloc (gid_allocated);
+      memset (gid_unused, 1, gid_allocated);
+      setgrent ();
+      while ((gr = getgrent ()) != NULL)
+       {
+         if ((unsigned) gr->gr_gid >= gid_allocated)
+           {
+             unsigned new_allocated = (unsigned) gr->gr_gid + ALLOC_STEP;
+             gid_unused = xrealloc (gid_unused, new_allocated);
+             memset (gid_unused + gid_allocated, 1,
+                     new_allocated - gid_allocated);
+             gid_allocated = new_allocated;
+           }
+         gid_unused[(unsigned) gr->gr_gid] = 0;
+       }
+      endgrent ();
+    }
+#endif
+  return true;
+}
+
+static bool
+parse_nouser (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+  (void) argv;
+  (void) arg_ptr;
+
+
+  our_pred = insert_primary_noarg (entry);
+  our_pred->est_success_rate = 1e-3;
+#ifdef CACHE_IDS
+  if (uid_unused == NULL)
+    {
+      struct passwd *pw;
+
+      uid_allocated = ALLOC_STEP;
+      uid_unused = xmalloc (uid_allocated);
+      memset (uid_unused, 1, uid_allocated);
+      setpwent ();
+      while ((pw = getpwent ()) != NULL)
+       {
+         if ((unsigned) pw->pw_uid >= uid_allocated)
+           {
+             unsigned new_allocated = (unsigned) pw->pw_uid + ALLOC_STEP;
+             uid_unused = xrealloc (uid_unused, new_allocated);
+             memset (uid_unused + uid_allocated, 1,
+                     new_allocated - uid_allocated);
+             uid_allocated = new_allocated;
+           }
+         uid_unused[(unsigned) pw->pw_uid] = 0;
+       }
+      endpwent ();
+    }
+#endif
+  return true;
+}
+
+static bool
+parse_nowarn (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  options.warnings = false;
+  return parse_noop (entry, argv, arg_ptr);
+}
+
+static bool
+parse_ok (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_exec_ok ("-ok", entry, argv, arg_ptr);
+}
+
+static bool
+parse_okdir (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_exec_ok ("-okdir", entry, argv, arg_ptr);
+}
+
+bool
+parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  (void) argv;
+  (void) arg_ptr;
+
+  our_pred = get_new_pred_chk_op (entry, NULL);
+  our_pred->pred_func = pred_openparen;
+  our_pred->p_type = OPEN_PAREN;
+  our_pred->p_prec = NO_PREC;
+  our_pred->need_stat = our_pred->need_type = false;
+  return true;
+}
+
+static bool
+parse_or (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  (void) argv;
+  (void) arg_ptr;
+
+  our_pred = get_new_pred_noarg (entry);
+  our_pred->pred_func = pred_or;
+  our_pred->p_type = BI_OP;
+  our_pred->p_prec = OR_PREC;
+  our_pred->need_stat = our_pred->need_type = false;
+  return true;
+}
+
+static bool
+is_feasible_path_argument (const char *arg, bool foldcase)
+{
+  const char *last = strrchr (arg, '/');
+  if (last && !last[1])
+    {
+      /* The name ends with "/". */
+      if (matches_start_point (arg, foldcase))
+       {
+         /* "-path foo/" can succeed if one of the start points is "foo/". */
+         return true;
+       }
+      else
+       {
+         return false;
+       }
+    }
+  return true;
+}
+
+
+static bool
+insert_path_check (const struct parser_table* entry, char **argv, int *arg_ptr,
+                  const char *pred_name, PREDICATEFUNCTION pred)
+{
+  const char *name;
+  bool foldcase = false;
+
+  if (pred == pred_ipath)
+    foldcase = true;
+
+  fnmatch_sanitycheck ();
+
+  if (collect_arg (argv, arg_ptr, &name))
+    {
+      struct predicate *our_pred = insert_primary_withpred (entry, pred, name);
+      our_pred->need_stat = our_pred->need_type = false;
+      our_pred->args.str = name;
+      our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
+
+      if (!options.posixly_correct
+         && !is_feasible_path_argument (name, foldcase))
+       {
+         error (0, 0, _("warning: -%s %s will not match anything "
+                        "because it ends with /."),
+                pred_name, name);
+         our_pred->est_success_rate = 1.0e-8;
+       }
+      return true;
+    }
+  return false;
+}
+
+/* For some time, -path was deprecated (at RMS's request) in favour of
+ * -iwholename.  See the node "GNU Manuals" in standards.texi for the
+ * rationale for this (basically, GNU prefers the use of the phrase
+ * "file name" to "path name".
+ *
+ * We do not issue a warning that this usage is deprecated
+ * since
+ * (a) HPUX find supports this predicate also and
+ * (b) it will soon be in POSIX anyway.
+ */
+static bool
+parse_path (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_path_check (entry, argv, arg_ptr, "path", pred_path);
+}
+
+static bool
+parse_wholename (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_path_check (entry, argv, arg_ptr, "wholename", pred_path);
+}
+
+/* -ipath was deprecated (at RMS's request) in favour of
+ * -iwholename.   See the node "GNU Manuals" in standards.texi
+ * for the rationale for this (basically, GNU prefers the use
+ * of the phrase "file name" to "path name".
+ * However, -path is now standardised so I un-deprecated -ipath.
+ */
+static bool
+parse_ipath (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_path_check (entry, argv, arg_ptr, "ipath", pred_ipath);
+}
+
+static bool
+parse_iwholename (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_path_check (entry, argv, arg_ptr, "iwholename", pred_ipath);
+}
+
+static void
+non_posix_mode (const char *mode)
+{
+  if (options.posixly_correct)
+    {
+      error (EXIT_FAILURE, 0,
+            _("Mode %s is not valid when POSIXLY_CORRECT is on."),
+            quotearg_n_style (0, options.err_quoting_style, mode));
+    }
+}
+
+
+static bool
+parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  mode_t perm_val[2];
+  float rate;
+  int mode_start = 0;
+  bool havekind = false;
+  enum permissions_type kind = PERM_EXACT;
+  struct mode_change *change = NULL;
+  struct predicate *our_pred;
+  const char *perm_expr;
+
+  if (!collect_arg (argv, arg_ptr, &perm_expr))
+    return false;
+
+  switch (perm_expr[0])
+    {
+    case '-':
+      mode_start = 1;
+      kind = PERM_AT_LEAST;
+      havekind = true;
+      rate = 0.2;
+      break;
+
+     case '+':
+       change = mode_compile (perm_expr);
+       if (NULL == change)
+        {
+          /* Most likely the caller is an old script that is still
+           * using the obsolete GNU syntax '-perm +MODE'.  This old
+           * syntax was withdrawn in favor of '-perm /MODE' because
+           * it is incompatible with POSIX in some cases, but we
+           * still support uses of it that are not incompatible with
+           * POSIX.
+           *
+           * Example: POSIXLY_CORRECT=y find -perm +a+x
+           */
+          non_posix_mode (perm_expr);
+
+          /* support the previous behaviour. */
+          mode_start = 1;
+          kind = PERM_ANY;
+          rate = 0.3;
+        }
+       else
+        {
+          /* This is a POSIX-compatible usage */
+          mode_start = 0;
+          kind = PERM_EXACT;
+          rate = 0.1;
+        }
+       havekind = true;
+       break;
+
+    case '/':                  /* GNU extension */
+      non_posix_mode (perm_expr);
+      mode_start = 1;
+      kind = PERM_ANY;
+      havekind = true;
+      rate = 0.3;
+      break;
+
+    default:
+      /* For example, '-perm 0644', which is valid and matches
+       * only files whose mode is exactly 0644.
+       */
+      mode_start = 0;
+      kind = PERM_EXACT;
+      havekind = true;
+      rate = 0.01;
+      break;
+    }
+
+  if (NULL == change)
+    {
+      change = mode_compile (perm_expr + mode_start);
+      if (NULL == change)
+       error (EXIT_FAILURE, 0, _("invalid mode %s"),
+              quotearg_n_style (0, options.err_quoting_style, perm_expr));
+    }
+  perm_val[0] = mode_adjust (0, false, 0, change, NULL);
+  perm_val[1] = mode_adjust (0, true, 0, change, NULL);
+  free (change);
+
+  if (('/' == perm_expr[0]) && (0 == perm_val[0]) && (0 == perm_val[1]))
+    {
+      /* The meaning of -perm /000 will change in the future.  It
+       * currently matches no files, but like -perm -000 it should
+       * match all files.
+       *
+       * Starting in 2005, we used to issue a warning message
+       * informing the user that the behaviour would change in the
+       * future.  We have now changed the behaviour and issue a
+       * warning message that the behaviour recently changed.
+       */
+      error (0, 0,
+            _("warning: you have specified a mode pattern %s (which is "
+              "equivalent to /000). The meaning of -perm /000 has now been "
+              "changed to be consistent with -perm -000; that is, while it "
+              "used to match no files, it now matches all files."),
+            perm_expr);
+
+      kind = PERM_AT_LEAST;
+      havekind = true;
+
+      /* The "magic" number below is just the fraction of files on my
+       * own system that "-type l -xtype l" fails for (i.e. unbroken symlinks).
+       * Actual totals are 1472 and 1073833.
+       */
+      rate = 0.9986; /* probably matches anything but a broken symlink */
+    }
+
+  our_pred = insert_primary (entry, perm_expr);
+  our_pred->est_success_rate = rate;
+  if (havekind)
+    {
+      our_pred->args.perm.kind = kind;
+    }
+  else
+    {
+
+      switch (perm_expr[0])
+       {
+       case '-':
+         our_pred->args.perm.kind = PERM_AT_LEAST;
+         break;
+       case '+':
+         our_pred->args.perm.kind = PERM_ANY;
+         break;
+       default:
+         our_pred->args.perm.kind = PERM_EXACT;
+         break;
+       }
+    }
+  memcpy (our_pred->args.perm.val, perm_val, sizeof perm_val);
+  return true;
+}
+
+bool
+parse_print (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  (void) argv;
+  (void) arg_ptr;
+
+  our_pred = insert_primary_noarg (entry);
+  /* -print has the side effect of printing.  This prevents us
+     from doing undesired multiple printing when the user has
+     already specified -print. */
+  our_pred->side_effects = our_pred->no_default_print = true;
+  our_pred->need_stat = our_pred->need_type = false;
+  open_stdout (&our_pred->args.printf_vec);
+  return true;
+}
+
+static bool
+parse_print0 (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_fprint (entry, NULL);
+}
+
+static bool
+parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *format;
+  const int saved_argc = *arg_ptr;
+
+  if (collect_arg (argv, arg_ptr, &format))
+    {
+      struct format_val fmt;
+      open_stdout (&fmt);
+      if (insert_fprintf (&fmt, entry, pred_fprintf, format))
+       {
+         return true;
+       }
+      else
+       {
+         *arg_ptr = saved_argc; /* don't consume the invalid argument. */
+         return false;
+       }
+    }
+  return false;
+}
+
+static bool
+parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *format, *filename;
+  int saved_argc = *arg_ptr;
+
+  if (collect_arg (argv, arg_ptr, &filename))
+    {
+      if (collect_arg (argv, arg_ptr, &format))
+       {
+         struct format_val fmt;
+         open_output_file (filename, &fmt);
+         saved_argc = *arg_ptr;
+
+         if (insert_fprintf (&fmt, entry, pred_fprintf, format))
+           return true;
+       }
+    }
+  *arg_ptr = saved_argc; /* don't consume the invalid argument. */
+  return false;
+}
+
+static bool
+parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  (void) argv;
+  (void) arg_ptr;
+
+  our_pred = insert_primary_noarg (entry);
+  if (options.do_dir_first == false)
+    our_pred->need_stat = our_pred->need_type = false;
+  /* -prune has a side effect that it does not descend into
+     the current directory. */
+  our_pred->side_effects = true;
+  our_pred->no_default_print = false;
+  return true;
+}
+
+static bool
+parse_quit  (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred = insert_primary_noarg (entry);
+  (void) argv;
+  (void) arg_ptr;
+  our_pred->need_stat = our_pred->need_type = false;
+  our_pred->side_effects = true; /* Exiting is a side effect... */
+  our_pred->no_default_print = false; /* Don't inhibit the default print, though. */
+  our_pred->est_success_rate = 1.0f;
+  return true;
+}
+
+
+static bool
+parse_regextype (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *type_name;
+  if (collect_arg (argv, arg_ptr, &type_name))
+    {
+      /* collect the regex type name */
+      options.regex_options = get_regex_type (type_name);
+      return parse_noop (entry, argv, arg_ptr);
+    }
+  return false;
+}
+
+
+static bool
+parse_regex (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_regex (argv, arg_ptr, entry, options.regex_options);
+}
+
+static bool
+insert_regex (char **argv,
+             int *arg_ptr,
+             const struct parser_table *entry,
+             int regex_options)
+{
+  const char *rx;
+  if (collect_arg (argv, arg_ptr, &rx))
+    {
+      struct re_pattern_buffer *re;
+      const char *error_message;
+      struct predicate *our_pred = insert_primary_withpred (entry, pred_regex, rx);
+      our_pred->need_stat = our_pred->need_type = false;
+      re = xmalloc (sizeof (struct re_pattern_buffer));
+      our_pred->args.regex = re;
+      re->allocated = 100;
+      re->buffer = xmalloc (re->allocated);
+      re->fastmap = NULL;
+
+      re_set_syntax (regex_options);
+      re->syntax = regex_options;
+      re->translate = NULL;
+
+      error_message = re_compile_pattern (rx, strlen (rx), re);
+      if (error_message)
+       error (EXIT_FAILURE, 0, "%s", error_message);
+      our_pred->est_success_rate = estimate_pattern_match_rate (rx, 1);
+      return true;
+    }
+  return false;
+}
+
+static bool
+parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+  char *arg;
+  uintmax_t num;
+  char suffix;
+  enum comparison_type c_type;
+
+  int blksize = 512;
+  int len;
+
+  /* XXX: cannot (yet) convert to ue collect_arg() as this
+   * function modifies the args in-place.
+   */
+  if ((argv == NULL) || (argv[*arg_ptr] == NULL))
+    return false;
+  arg = argv[*arg_ptr];
+
+  len = strlen (arg);
+  if (len == 0)
+    error (EXIT_FAILURE, 0, _("invalid null argument to -size"));
+
+  suffix = arg[len - 1];
+  switch (suffix)
+    {
+    case 'b':
+      blksize = 512;
+      arg[len - 1] = '\0';
+      break;
+
+    case 'c':
+      blksize = 1;
+      arg[len - 1] = '\0';
+      break;
+
+    case 'k':
+      blksize = 1024;
+      arg[len - 1] = '\0';
+      break;
+
+    case 'M':                  /* Megabytes */
+      blksize = 1024*1024;
+      arg[len - 1] = '\0';
+      break;
+
+    case 'G':                  /* Gigabytes */
+      blksize = 1024*1024*1024;
+      arg[len - 1] = '\0';
+      break;
+
+    case 'w':
+      blksize = 2;
+      arg[len - 1] = '\0';
+      break;
+
+    case '0':
+    case '1':
+    case '2':
+    case '3':
+    case '4':
+    case '5':
+    case '6':
+    case '7':
+    case '8':
+    case '9':
+      suffix = 0;
+      break;
+
+    default:
+      error (EXIT_FAILURE, 0,
+            _("invalid -size type `%c'"), argv[*arg_ptr][len - 1]);
+    }
+  /* TODO: accept fractional megabytes etc. ? */
+  if (!get_num (arg, &num, &c_type))
+    {
+      char tail[2];
+      tail[0] = suffix;
+      tail[1] = 0;
+
+      error (EXIT_FAILURE, 0,
+            _("Invalid argument `%s%s' to -size"),
+            arg, tail);
+      return false;
+    }
+  our_pred = insert_primary (entry, arg);
+  our_pred->args.size.kind = c_type;
+  our_pred->args.size.blocksize = blksize;
+  our_pred->args.size.size = num;
+  our_pred->need_stat = true;
+  our_pred->need_type = false;
+
+  if (COMP_GT == c_type)
+    our_pred->est_success_rate = (num*blksize > 20480) ? 0.1 : 0.9;
+  else if (COMP_LT == c_type)
+    our_pred->est_success_rate = (num*blksize > 20480) ? 0.9 : 0.1;
+  else
+    our_pred->est_success_rate = 0.01;
+
+  (*arg_ptr)++;
+  return true;
+}
+
+
+static bool
+parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  /* General idea: stat the file, remember device and inode numbers.
+   * If a candidate file matches those, it's the same file.
+   */
+  struct predicate *our_pred;
+  struct stat st, fst;
+  int fd, openflags;
+  const char *filename;
+
+  set_stat_placeholders (&st);
+  if (!collect_arg_stat_info (argv, arg_ptr, &st, &filename))
+    return false;
+
+  set_stat_placeholders (&fst);
+  /* POSIX systems are free to re-use the inode number of a deleted
+   * file.  To ensure that we are not fooled by inode reuse, we hold
+   * the file open if we can.  This would prevent the system reusing
+   * the file.
+   */
+  fd = -3;                     /* means, uninitialised */
+  openflags = O_RDONLY;
+
+  if (options.symlink_handling == SYMLINK_NEVER_DEREF)
+    {
+      if (options.open_nofollow_available)
+       {
+         assert (O_NOFOLLOW != 0);
+         openflags |= O_NOFOLLOW;
+         fd = -1;              /* safe to open it. */
+       }
+      else
+       {
+         if (S_ISLNK(st.st_mode))
+           {
+             /* no way to ensure that a symlink will not be followed
+              * by open(2), so fall back on using lstat().  Accept
+              * the risk that the named file will be deleted and
+              * replaced with another having the same inode.
+              *
+              * Avoid opening the file.
+              */
+             fd = -2;          /* Do not open it */
+           }
+         else
+           {
+             fd = -1;
+             /* Race condition here: the file might become a symlink here. */
+           }
+       }
+    }
+  else
+    {
+      /* We want to dereference the symlink anyway */
+      fd = -1;                 /* safe to open it without O_NOFOLLOW */
+    }
+
+  assert (fd != -3);           /* check we made a decision */
+  if (fd == -1)
+    {
+      /* Race condition here.  The file might become a
+       * symbolic link in between our call to stat and
+       * the call to open_cloexec.
+       */
+      fd = open_cloexec (filename, openflags);
+
+      if (fd >= 0)
+       {
+         /* We stat the file again here to prevent a race condition
+          * between the first stat and the call to open(2).
+          */
+         if (0 != fstat (fd, &fst))
+           {
+             fatal_target_file_error (errno, filename);
+           }
+         else
+           {
+             /* Worry about the race condition.  If the file became a
+              * symlink after our first stat and before our call to
+              * open, fst may contain the stat information for the
+              * destination of the link, not the link itself.
+              */
+             if ((*options.xstat) (filename, &st))
+               fatal_target_file_error (errno, filename);
+
+             if ((options.symlink_handling == SYMLINK_NEVER_DEREF)
+                 && (!options.open_nofollow_available))
+               {
+                 if (S_ISLNK(st.st_mode))
+                   {
+                     /* We lost the race.  Leave the data in st.  The
+                      * file descriptor points to the wrong thing.
+                      */
+                     close (fd);
+                     fd = -1;
+                   }
+                 else
+                   {
+                     /* Several possibilities here:
+                      * 1. There was no race
+                      * 2. The file changed into a symlink after the stat and
+                      *    before the open, and then back into a non-symlink
+                      *    before the second stat.
+                      *
+                      * In case (1) there is no problem.  In case (2),
+                      * the stat() and fstat() calls will have returned
+                      * different data.  O_NOFOLLOW was not available,
+                      * so the open() call may have followed a symlink
+                      * even if the -P option is in effect.
+                      */
+                     if ((st.st_dev == fst.st_dev)
+                         && (st.st_ino == fst.st_ino))
+                       {
+                         /* No race.  No need to copy fst to st,
+                          * since they should be identical (modulo
+                          * differences in padding bytes).
+                          */
+                       }
+                     else
+                       {
+                         /* We lost the race.  Leave the data in st.  The
+                          * file descriptor points to the wrong thing.
+                          */
+                         close (fd);
+                         fd = -1;
+                       }
+                   }
+               }
+             else
+               {
+                 st = fst;
+               }
+           }
+       }
+    }
+
+  our_pred = insert_primary (entry, filename);
+  our_pred->args.samefileid.ino = st.st_ino;
+  our_pred->args.samefileid.dev = st.st_dev;
+  our_pred->args.samefileid.fd  = fd;
+  our_pred->need_type = false;
+  /* smarter way: compare type and inode number first. */
+  /* TODO: maybe optimise this away by being optimistic */
+  our_pred->need_stat = true;
+  our_pred->est_success_rate = 0.01f;
+  return true;
+}
+
+#if 0
+/* This function is commented out partly because support for it is
+ * uneven.
+ */
+static bool
+parse_show_control_chars (const struct parser_table* entry,
+                         char **argv,
+                         int *arg_ptr)
+{
+  const char *arg;
+  const char *errmsg = _("The -show-control-chars option takes "
+                        "a single argument which "
+                        "must be 'literal' or 'safe'");
+
+  if ((argv == NULL) || (argv[*arg_ptr] == NULL))
+    {
+      error (EXIT_FAILURE, errno, "%s", errmsg);
+      return false;
+    }
+  else
+    {
+      arg = argv[*arg_ptr];
+
+      if (0 == strcmp ("literal", arg))
+       {
+         options.literal_control_chars = true;
+       }
+      else if (0 == strcmp ("safe", arg))
+       {
+         options.literal_control_chars = false;
+       }
+      else
+       {
+         error (EXIT_FAILURE, errno, "%s", errmsg);
+         return false;
+       }
+      (*arg_ptr)++;            /* consume the argument. */
+      return true;
+    }
+}
+#endif
+
+
+static bool
+parse_true (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  (void) argv;
+  (void) arg_ptr;
+
+  our_pred = insert_primary_noarg (entry);
+  our_pred->need_stat = our_pred->need_type = false;
+  our_pred->est_success_rate = 1.0f;
+  return true;
+}
+
+static bool
+parse_noop (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  (void) entry;
+  return parse_true (get_noop (), argv, arg_ptr);
+}
+
+static bool
+parse_accesscheck (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+  (void) argv;
+  (void) arg_ptr;
+  our_pred = insert_primary_noarg (entry);
+  our_pred->need_stat = our_pred->need_type = false;
+  our_pred->side_effects = our_pred->no_default_print = false;
+  if (pred_is(our_pred, pred_executable))
+    our_pred->est_success_rate = 0.2;
+  else
+    our_pred->est_success_rate = 0.9;
+  return true;
+}
+
+static bool
+parse_type (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_type (argv, arg_ptr, entry, pred_type);
+}
+
+static bool
+parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *p = insert_num (argv, arg_ptr, entry);
+  if (p)
+    {
+      p->est_success_rate = (p->args.numinfo.l_val < 100) ? 0.99 : 0.2;
+      return true;
+    }
+  else
+    {
+      --*arg_ptr;              /* don't consume the invalid argument. */
+      return false;
+    }
+}
+
+static bool
+parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+  struct time_val tval;
+  const char *offset_str;
+  const char *errmsg = "arithmetic overflow while converting %s days to a number of seconds";
+
+  if (collect_arg (argv, arg_ptr, &offset_str))
+    {
+      /* The timespec is actually a delta value, so we use an origin of 0. */
+      struct timespec zero = {0,0};
+      if (get_relative_timestamp (offset_str, &tval, zero, DAYSECS, errmsg))
+       {
+         our_pred = insert_primary (entry, offset_str);
+         our_pred->args.reftime = tval;
+         our_pred->est_success_rate = estimate_file_age_success_rate (tval.ts.tv_sec / DAYSECS);
+         return true;
+       }
+      else
+       {
+         error (EXIT_FAILURE, 0,
+                _("Invalid argument %s to -used"), offset_str);
+         /*NOTREACHED*/
+         return false;
+       }
+    }
+  else
+    {
+      return false;            /* missing argument */
+    }
+}
+
+static bool
+parse_user (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  const char *username;
+
+  if (collect_arg (argv, arg_ptr, &username))
+    {
+      struct predicate *our_pred;
+      uid_t uid;
+      struct passwd *cur_pwd = getpwnam (username);
+      endpwent ();
+      if (cur_pwd != NULL)
+       {
+         uid = cur_pwd->pw_uid;
+       }
+      else
+       {
+         const size_t uid_len = strspn (username, "0123456789");
+         if (uid_len && (username[uid_len]==0))
+           {
+             uid = safe_atoi (username, options.err_quoting_style);
+           }
+         else
+           {
+             /* This is a fatal error (if we just return false, the caller
+              * will say "invalid argument `username' to -user", which is
+              * not as helpful). */
+             if (username[0])
+               {
+                 error (EXIT_FAILURE, 0,
+                        _("%s is not the name of a known user"),
+                        quotearg_n_style (0, options.err_quoting_style,
+                                          username));
+               }
+             else
+               {
+                 error (EXIT_FAILURE, 0,
+                        _("The argument to -user should not be empty"));
+               }
+             /*NOTREACHED*/
+             return false;
+           }
+       }
+      our_pred = insert_primary (entry, username);
+      our_pred->args.uid = uid;
+      our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2;
+      return true;
+    }
+  return false;
+}
+
+static bool
+parse_version (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  int features = 0;
+  int flags;
+
+  (void) argv;
+  (void) arg_ptr;
+  (void) entry;
+
+  display_findutils_version ("find");
+  printf (_("Features enabled: "));
+
+#if CACHE_IDS
+  printf ("CACHE_IDS ");
+  ++features;
+#endif
+#if DEBUG
+  printf ("DEBUG ");
+  ++features;
+#endif
+#if DEBUG_STAT
+  printf ("DEBUG_STAT ");
+  ++features;
+#endif
+#if defined HAVE_STRUCT_DIRENT_D_TYPE
+  printf ("D_TYPE ");
+  ++features;
+#endif
+#if defined O_NOFOLLOW
+  printf ("O_NOFOLLOW(%s) ",
+         (options.open_nofollow_available ? "enabled" : "disabled"));
+  ++features;
+#endif
+#if defined LEAF_OPTIMISATION
+  printf ("LEAF_OPTIMISATION ");
+  ++features;
+#endif
+  if (0 < is_selinux_enabled ())
+    {
+      printf ("SELINUX ");
+      ++features;
+    }
+
+  flags = 0;
+  if (is_fts_enabled (&flags))
+    {
+      int nflags = 0;
+      printf ("FTS(");
+      ++features;
+
+      if (flags & FTS_CWDFD)
+       {
+         if (nflags)
+           {
+             printf (",");
+           }
+         printf ("FTS_CWDFD");
+         ++nflags;
+       }
+      printf (") ");
+    }
+
+  printf ("CBO(level=%d) ", (int)(options.optimisation_level));
+  ++features;
+
+  if (0 == features)
+    {
+      /* For the moment, leave this as English in case someone wants
+        to parse these strings. */
+      printf ("none");
+    }
+  printf ("\n");
+
+  exit (EXIT_SUCCESS);
+}
+
+static bool
+parse_context (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  struct predicate *our_pred;
+
+  if ((argv == NULL) || (argv[*arg_ptr] == NULL))
+    return false;
+
+  if (is_selinux_enabled () <= 0)
+    {
+      error (EXIT_FAILURE, 0,
+            _("invalid predicate -context: SELinux is not enabled."));
+      return false;
+    }
+  our_pred = insert_primary (entry, NULL);
+  our_pred->est_success_rate = 0.01f;
+  our_pred->need_stat = false;
+#ifdef DEBUG
+  our_pred->p_name = find_pred_name (pred_context);
+#endif /*DEBUG*/
+  our_pred->args.scontext = argv[*arg_ptr];
+
+  (*arg_ptr)++;
+  return true;
+}
+
+static bool
+parse_xdev (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  options.stay_on_filesystem = true;
+  return parse_noop (entry, argv, arg_ptr);
+}
+
+static bool
+parse_ignore_race (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  options.ignore_readdir_race = true;
+  return parse_noop (entry, argv, arg_ptr);
+}
+
+static bool
+parse_noignore_race (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  options.ignore_readdir_race = false;
+  return parse_noop (entry, argv, arg_ptr);
+}
+
+static bool
+parse_warn (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  options.warnings = true;
+  return parse_noop (entry, argv, arg_ptr);
+}
+
+static bool
+parse_xtype (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+  return insert_type (argv, arg_ptr, entry, pred_xtype);
+}
+
+static bool
+insert_type (char **argv, int *arg_ptr,
+            const struct parser_table *entry,
+            PRED_FUNC which_pred)
+{
+  mode_t type_cell;
+  struct predicate *our_pred;
+  float rate = 0.5;
+  const char *typeletter;
+
+  if (collect_arg (argv, arg_ptr, &typeletter))
+    {
+      if (strlen (typeletter) != 1u)
+       {
+         error (EXIT_FAILURE, 0,
+                _("Arguments to -type should contain only one letter"));
+         /*NOTREACHED*/
+         return false;
+       }
+
+      switch (typeletter[0])
+       {
+       case 'b':                       /* block special */
+         type_cell = S_IFBLK;
+         rate = 0.01f;
+         break;
+       case 'c':                       /* character special */
+         type_cell = S_IFCHR;
+         rate = 0.01f;
+         break;
+       case 'd':                       /* directory */
+         type_cell = S_IFDIR;
+         rate = 0.4f;
+         break;
+       case 'f':                       /* regular file */
+         type_cell = S_IFREG;
+         rate = 0.95f;
+         break;
+#ifdef S_IFLNK
+       case 'l':                       /* symbolic link */
+         type_cell = S_IFLNK;
+         rate = 0.1f;
+         break;
+#endif
+#ifdef S_IFIFO
+       case 'p':                       /* pipe */
+         type_cell = S_IFIFO;
+         rate = 0.01f;
+         break;
+#endif
+#ifdef S_IFSOCK
+       case 's':                       /* socket */
+         type_cell = S_IFSOCK;
+         rate = 0.01f;
+         break;
+#endif
+#ifdef S_IFDOOR
+       case 'D':                       /* Solaris door */
+         type_cell = S_IFDOOR;
+         rate = 0.01f;
+         break;
+#endif
+       default:                        /* None of the above ... nuke 'em. */
+         error (EXIT_FAILURE, 0,
+                _("Unknown argument to -type: %c"), (*typeletter));
+         /*NOTREACHED*/
+         return false;
+       }
+      our_pred = insert_primary_withpred (entry, which_pred, typeletter);
+      our_pred->est_success_rate = rate;
+
+      /* Figure out if we will need to stat the file, because if we don't
+       * need to follow symlinks, we can avoid a stat call by using
+       * struct dirent.d_type.
+       */
+      if (which_pred == pred_xtype)
+       {
+         our_pred->need_stat = true;
+         our_pred->need_type = false;
+       }
+      else
+       {
+         our_pred->need_stat = false; /* struct dirent is enough */
+         our_pred->need_type = true;
+       }
+      our_pred->args.type = type_cell;
+      return true;
+    }
+  return false;
+}
+
+
+/* Return true if the file accessed via FP is a terminal.
+ */
+static bool
+stream_is_tty (FILE *fp)
+{
+  int fd = fileno (fp);
+  if (-1 == fd)
+    {
+      return false; /* not a valid stream */
+    }
+  else
+    {
+      return isatty (fd) ? true : false;
+    }
+
+}
+
+
+
+
+/* XXX: do we need to pass FUNC to this function? */
+static bool
+insert_fprintf (struct format_val *vec,
+               const struct parser_table *entry, PRED_FUNC func,
+               const char *format_const)
+{
+  char *format = (char*)format_const; /* XXX: casting away constness */
+  register char *scan;         /* Current address in scanning `format'. */
+  register char *scan2;                /* Address inside of element being scanned. */
+  struct segment **segmentp;   /* Address of current segment. */
+  struct predicate *our_pred;
+
+  our_pred = insert_primary_withpred (entry, func, format_const);
+  our_pred->side_effects = our_pred->no_default_print = true;
+  our_pred->args.printf_vec = *vec;
+  our_pred->need_type = false;
+  our_pred->need_stat = false;
+  our_pred->p_cost    = NeedsNothing;
+
+  segmentp = &our_pred->args.printf_vec.segment;
+  *segmentp = NULL;
+
+  for (scan = format; *scan; scan++)
+    {
+      if (*scan == '\\')
+       {
+         scan2 = scan + 1;
+         if (*scan2 >= '0' && *scan2 <= '7')
+           {
+             register int n, i;
+
+             for (i = n = 0; i < 3 && (*scan2 >= '0' && *scan2 <= '7');
+                  i++, scan2++)
+               n = 8 * n + *scan2 - '0';
+             scan2--;
+             *scan = n;
+           }
+         else
+           {
+             switch (*scan2)
+               {
+               case 'a':
+                 *scan = 7;
+                 break;
+               case 'b':
+                 *scan = '\b';
+                 break;
+               case 'c':
+                 make_segment (segmentp, format, scan - format,
+                               KIND_STOP, 0, 0,
+                               our_pred);
+                 if (our_pred->need_stat && (our_pred->p_cost < NeedsStatInfo))
+                   our_pred->p_cost = NeedsStatInfo;
+                 return true;
+               case 'f':
+                 *scan = '\f';
+                 break;
+               case 'n':
+                 *scan = '\n';
+                 break;
+               case 'r':
+                 *scan = '\r';
+                 break;
+               case 't':
+                 *scan = '\t';
+                 break;
+               case 'v':
+                 *scan = '\v';
+                 break;
+               case '\\':
+                 /* *scan = '\\'; * it already is */
+                 break;
+               default:
+                 error (0, 0,
+                        _("warning: unrecognized escape `\\%c'"), *scan2);
+                 scan++;
+                 continue;
+               }
+           }
+         segmentp = make_segment (segmentp, format, scan - format + 1,
+                                  KIND_PLAIN, 0, 0,
+                                  our_pred);
+         format = scan2 + 1;   /* Move past the escape. */
+         scan = scan2;         /* Incremented immediately by `for'. */
+       }
+      else if (*scan == '%')
+       {
+         if (scan[1] == 0)
+           {
+             /* Trailing %.  We don't like those. */
+             error (EXIT_FAILURE, 0,
+                    _("error: %s at end of format string"), scan);
+           }
+         else if (scan[1] == '%')
+           {
+             segmentp = make_segment (segmentp, format, scan - format + 1,
+                                      KIND_PLAIN, 0, 0,
+                                      our_pred);
+             scan++;
+             format = scan + 1;
+             continue;
+           }
+         /* Scan past flags, width and precision, to verify kind. */
+         for (scan2 = scan; *++scan2 && strchr ("-+ #", *scan2);)
+           /* Do nothing. */ ;
+         while (ISDIGIT (*scan2))
+           scan2++;
+         if (*scan2 == '.')
+           for (scan2++; ISDIGIT (*scan2); scan2++)
+             /* Do nothing. */ ;
+         if (strchr ("abcdDfFgGhHiklmMnpPsStuUyYZ", *scan2))
+           {
+             segmentp = make_segment (segmentp, format, scan2 - format,
+                                      KIND_FORMAT, *scan2, 0,
+                                      our_pred);
+             scan = scan2;
+             format = scan + 1;
+           }
+         else if (strchr ("ABCT", *scan2) && scan2[1])
+           {
+             segmentp = make_segment (segmentp, format, scan2 - format,
+                                      KIND_FORMAT, scan2[0], scan2[1],
+                                      our_pred);
+             scan = scan2 + 1;
+             format = scan + 1;
+             continue;
+           }
+         else
+           {
+             /* An unrecognized % escape.  Print the char after the %. */
+             error (0, 0, _("warning: unrecognized format directive `%%%c'"),
+                    *scan2);
+             segmentp = make_segment (segmentp, format, scan - format,
+                                      KIND_PLAIN, 0, 0,
+                                      our_pred);
+             format = scan + 1;
+             continue;
+           }
+       }
+    }
+
+  if (scan > format)
+    make_segment (segmentp, format, scan - format, KIND_PLAIN, 0, 0,
+                 our_pred);
+  return true;
+}
+
+/* Create a new fprintf segment in *SEGMENT, with type KIND,
+   from the text in FORMAT, which has length LEN.
+   Return the address of the `next' pointer of the new segment. */
+
+static struct segment **
+make_segment (struct segment **segment,
+             char *format,
+             int len,
+             int kind,
+             char format_char,
+             char aux_format_char,
+             struct predicate *pred)
+{
+  enum EvaluationCost mycost = NeedsNothing;
+  char *fmt;
+
+  *segment = xmalloc (sizeof (struct segment));
+
+  (*segment)->segkind = kind;
+  (*segment)->format_char[0] = format_char;
+  (*segment)->format_char[1] = aux_format_char;
+  (*segment)->next = NULL;
+  (*segment)->text_len = len;
+
+  fmt = (*segment)->text = xmalloc (len + sizeof "d");
+  strncpy (fmt, format, len);
+  fmt += len;
+
+  switch (kind)
+    {
+    case KIND_PLAIN:           /* Plain text string, no % conversion. */
+    case KIND_STOP:            /* Terminate argument, no newline. */
+      assert (0 == format_char);
+      assert (0 == aux_format_char);
+      *fmt = '\0';
+      if (mycost > pred->p_cost)
+       pred->p_cost = NeedsNothing;
+      return &(*segment)->next;
+      break;
+    }
+
+  assert (kind == KIND_FORMAT);
+  switch (format_char)
+    {
+    case 'l':                  /* object of symlink */
+      pred->need_stat = true;
+      mycost = NeedsLinkName;
+      *fmt++ = 's';
+      break;
+
+    case 'y':                  /* file type */
+      pred->need_type = true;
+      mycost = NeedsType;
+      *fmt++ = 's';
+      break;
+
+    case 'i':                  /* inode number */
+      pred->need_inum = true;
+      mycost = NeedsInodeNumber;
+      *fmt++ = 's';
+      break;
+
+    case 'a':                  /* atime in `ctime' format */
+    case 'A':                  /* atime in user-specified strftime format */
+    case 'B':                  /* birth time in user-specified strftime format */
+    case 'c':                  /* ctime in `ctime' format */
+    case 'C':                  /* ctime in user-specified strftime format */
+    case 'F':                  /* file system type */
+    case 'g':                  /* group name */
+    case 'M':                  /* mode in `ls -l' format (eg., "drwxr-xr-x") */
+    case 's':                  /* size in bytes */
+    case 't':                  /* mtime in `ctime' format */
+    case 'T':                  /* mtime in user-specified strftime format */
+    case 'u':                  /* user name */
+      pred->need_stat = true;
+      mycost = NeedsStatInfo;
+      *fmt++ = 's';
+      break;
+
+    case 'S':                  /* sparseness */
+      pred->need_stat = true;
+      mycost = NeedsStatInfo;
+      *fmt++ = 'g';
+      break;
+
+    case 'Y':                  /* symlink pointed file type */
+      pred->need_stat = true;
+      mycost = NeedsType;      /* true for amortised effect */
+      *fmt++ = 's';
+      break;
+
+    case 'f':                  /* basename of path */
+    case 'h':                  /* leading directories part of path */
+    case 'p':                  /* pathname */
+    case 'P':                  /* pathname with ARGV element stripped */
+      *fmt++ = 's';
+      break;
+
+    case 'Z':                  /* SELinux security context */
+      mycost = NeedsAccessInfo;
+      *fmt++ = 's';
+      break;
+
+    case 'H':                  /* ARGV element file was found under */
+      *fmt++ = 's';
+      break;
+
+      /* Numeric items that one might expect to honour
+       * #, 0, + flags but which do not.
+       */
+    case 'G':                  /* GID number */
+    case 'U':                  /* UID number */
+    case 'b':                  /* size in 512-byte blocks (NOT birthtime in ctime fmt)*/
+    case 'D':                   /* Filesystem device on which the file exits */
+    case 'k':                  /* size in 1K blocks */
+    case 'n':                  /* number of links */
+      pred->need_stat = true;
+      mycost = NeedsStatInfo;
+      *fmt++ = 's';
+      break;
+
+      /* Numeric items that DO honour #, 0, + flags.
+       */
+    case 'd':                  /* depth in search tree (0 = ARGV element) */
+      *fmt++ = 'd';
+      break;
+
+    case 'm':                  /* mode as octal number (perms only) */
+      *fmt++ = 'o';
+      pred->need_stat = true;
+      mycost = NeedsStatInfo;
+      break;
+
+    case '{':
+    case '[':
+    case '(':
+      error (EXIT_FAILURE, 0,
+            _("error: the format directive `%%%c' is reserved for future use"),
+            (int)kind);
+      /*NOTREACHED*/
+      break;
+    }
+  *fmt = '\0';
+
+  if (mycost > pred->p_cost)
+    pred->p_cost = mycost;
+  return &(*segment)->next;
+}
+
+static void
+check_path_safety (const char *action, char **argv)
+{
+  char *s;
+  const char *path = getenv ("PATH");
+  if (NULL == path)
+    {
+      /* $PATH is not set.  Assume the OS default is safe.
+       * That may not be true on Windows, but I'm not aware
+       * of a way to get Windows to avoid searching the
+       * current directory anyway.
+       */
+      return;
+    }
+
+  (void)argv;
+
+  s = next_element (path, 1);
+  while ((s = next_element ((char *) NULL, 1)) != NULL)
+    {
+      if (0 == strcmp (s, "."))
+       {
+         error (EXIT_FAILURE, 0,
+                _("The current directory is included in the PATH "
+                  "environment variable, which is insecure in "
+                  "combination with the %s action of find.  "
+                  "Please remove the current directory from your "
+                  "$PATH (that is, remove \".\" or leading or trailing "
+                  "colons)"),
+                action);
+       }
+      else if ('/' != s[0])
+       {
+         /* Relative paths are also dangerous in $PATH. */
+         error (EXIT_FAILURE, 0,
+                _("The relative path %s is included in the PATH "
+                  "environment variable, which is insecure in "
+                  "combination with the %s action of find.  "
+                  "Please remove that entry from $PATH"),
+                safely_quote_err_filename (0, s),
+                action);
+       }
+    }
+}
+
+
+/* handles both exec and ok predicate */
+static bool
+insert_exec_ok (const char *action,
+               const struct parser_table *entry,
+               char **argv,
+               int *arg_ptr)
+{
+  int start, end;              /* Indexes in ARGV of start & end of cmd. */
+  int i;                       /* Index into cmd args */
+  int saw_braces;              /* True if previous arg was '{}'. */
+  bool allow_plus;             /* True if + is a valid terminator */
+  int brace_count;             /* Number of instances of {}. */
+  const char *brace_arg;       /* Which arg did {} appear in? */
+  PRED_FUNC func = entry->pred_func;
+  enum BC_INIT_STATUS bcstatus;
+
+  struct predicate *our_pred;
+  struct exec_val *execp;      /* Pointer for efficiency. */
+
+  if ((argv == NULL) || (argv[*arg_ptr] == NULL))
+    return false;
+
+  our_pred = insert_primary_withpred (entry, func, "(some -exec* arguments)");
+  our_pred->side_effects = our_pred->no_default_print = true;
+  our_pred->need_type = our_pred->need_stat = false;
+
+  execp = &our_pred->args.exec_vec;
+  execp->wd_for_exec = NULL;
+
+  if ((func != pred_okdir) && (func != pred_ok))
+    {
+      allow_plus = true;
+      execp->close_stdin = false;
+    }
+  else
+    {
+      allow_plus = false;
+      /* If find reads stdin (i.e. for -ok and similar), close stdin
+       * in the child to prevent some script from consiming the output
+       * intended for find.
+       */
+      execp->close_stdin = true;
+    }
+
+
+  if ((func == pred_execdir) || (func == pred_okdir))
+    {
+      execp->wd_for_exec = NULL;
+      options.ignore_readdir_race = false;
+      check_path_safety (action, argv);
+    }
+  else
+    {
+      assert (NULL != initial_wd);
+      execp->wd_for_exec = initial_wd;
+    }
+
+  our_pred->args.exec_vec.multiple = 0;
+
+  /* Count the number of args with path replacements, up until the ';'.
+   * Also figure out if the command is terminated by ";" or by "+".
+   */
+  start = *arg_ptr;
+  for (end = start, saw_braces=0, brace_count=0, brace_arg=NULL;
+       (argv[end] != NULL)
+       && ((argv[end][0] != ';') || (argv[end][1] != '\0'));
+       end++)
+    {
+      /* For -exec and -execdir, "{} +" can terminate the command. */
+      if ( allow_plus
+          && argv[end][0] == '+' && argv[end][1] == 0
+          && saw_braces)
+       {
+         our_pred->args.exec_vec.multiple = 1;
+         break;
+       }
+
+      saw_braces = 0;
+      if (mbsstr (argv[end], "{}"))
+       {
+         saw_braces = 1;
+         brace_arg = argv[end];
+         ++brace_count;
+
+         if (0 == end && (func == pred_execdir || func == pred_okdir))
+           {
+             /* The POSIX standard says that {} replacement should
+              * occur even in the utility name.  This is insecure
+              * since it means we will be executing a command whose
+              * name is chosen according to whatever find finds in
+              * the file system.  That can be influenced by an
+              * attacker.  Hence for -execdir and -okdir this is not
+              * allowed.  We can specify this as those options are
+              * not defined by POSIX.
+              */
+             error (EXIT_FAILURE, 0,
+                    _("You may not use {} within the utility name for "
+                      "-execdir and -okdir, because this is a potential "
+                      "security problem."));
+           }
+       }
+    }
+
+  /* Fail if no command given or no semicolon found. */
+  if ((end == start) || (argv[end] == NULL))
+    {
+      *arg_ptr = end;
+      free (our_pred);
+      return false;
+    }
+
+  if (our_pred->args.exec_vec.multiple)
+    {
+      const char *suffix;
+      if (func == pred_execdir)
+       suffix = "dir";
+      else
+       suffix = "";
+
+      if (brace_count > 1)
+       {
+         error (EXIT_FAILURE, 0,
+                _("Only one instance of {} is supported with -exec%s ... +"),
+                suffix);
+       }
+      else if (strlen (brace_arg) != 2u)
+       {
+         enum { MsgBufSize = 19 };
+         char buf[MsgBufSize];
+         const size_t needed = snprintf (buf, MsgBufSize, "-exec%s ... {} +", suffix);
+         assert (needed <= MsgBufSize);  /* If this assertion fails, correct the value of MsgBufSize. */
+         error (EXIT_FAILURE, 0,
+                _("In %s the %s must appear by itself, but you specified %s"),
+                quotearg_n_style (0, options.err_quoting_style, buf),
+                quotearg_n_style (1, options.err_quoting_style, "{}"),
+                quotearg_n_style (2, options.err_quoting_style, brace_arg));
+       }
+    }
+
+  /* We use a switch statement here so that the compiler warns us when
+   * we forget to handle a newly invented enum value.
+   *
+   * Like xargs, we allow 2KiB of headroom for the launched utility to
+   * export its own environment variables before calling something
+   * else.
+   */
+  bcstatus = bc_init_controlinfo (&execp->ctl, 2048u);
+  switch (bcstatus)
+    {
+    case BC_INIT_ENV_TOO_BIG:
+    case BC_INIT_CANNOT_ACCOMODATE_HEADROOM:
+      error (EXIT_FAILURE, 0,
+            _("The environment is too large for exec()."));
+      break;
+    case BC_INIT_OK:
+      /* Good news.  Carry on. */
+      break;
+    }
+  bc_use_sensible_arg_max (&execp->ctl);
+
+
+  execp->ctl.exec_callback = launch;
+
+  if (our_pred->args.exec_vec.multiple)
+    {
+      /* "+" terminator, so we can just append our arguments after the
+       * command and initial arguments.
+       */
+      execp->replace_vec = NULL;
+      execp->ctl.replace_pat = NULL;
+      execp->ctl.rplen = 0;
+      execp->ctl.lines_per_exec = 0; /* no limit */
+      execp->ctl.args_per_exec = 0; /* no limit */
+
+      /* remember how many arguments there are */
+      execp->ctl.initial_argc = (end-start) - 1;
+
+      /* execp->state = xmalloc(sizeof struct buildcmd_state); */
+      bc_init_state (&execp->ctl, &execp->state, execp);
+
+      /* Gather the initial arguments.  Skip the {}. */
+      for (i=start; i<end-1; ++i)
+       {
+         bc_push_arg (&execp->ctl, &execp->state,
+                      argv[i], strlen (argv[i])+1,
+                      NULL, 0,
+                      1);
+       }
+    }
+  else
+    {
+      /* Semicolon terminator - more than one {} is supported, so we
+       * have to do brace-replacement.
+       */
+      execp->num_args = end - start;
+
+      execp->ctl.replace_pat = "{}";
+      execp->ctl.rplen = strlen (execp->ctl.replace_pat);
+      execp->ctl.lines_per_exec = 0; /* no limit */
+      execp->ctl.args_per_exec = 0; /* no limit */
+      execp->replace_vec = xmalloc (sizeof(char*)*execp->num_args);
+
+
+      /* execp->state = xmalloc(sizeof(*(execp->state))); */
+      bc_init_state (&execp->ctl, &execp->state, execp);
+
+      /* Remember the (pre-replacement) arguments for later. */
+      for (i=0; i<execp->num_args; ++i)
+       {
+         execp->replace_vec[i] = argv[i+start];
+       }
+    }
+
+  if (argv[end] == NULL)
+    *arg_ptr = end;
+  else
+    *arg_ptr = end + 1;
+
+  return true;
+}
+
+
+
+/* Get a timestamp and comparison type.
+
+   STR is the ASCII representation.
+   Set *NUM_DAYS to the number of days/minutes/whatever, taken as being
+   relative to ORIGIN (usually the current moment or midnight).
+   Thus the sense of the comparison type appears to be reversed.
+   Set *COMP_TYPE to the kind of comparison that is requested.
+   Issue OVERFLOWMESSAGE if overflow occurs.
+   Return true if all okay, false if input error.
+
+   Used by -atime, -ctime and -mtime (parsers) to
+   get the appropriate information for a time predicate processor. */
+
+static bool
+get_relative_timestamp (const char *str,
+                       struct time_val *result,
+                       struct timespec origin,
+                       double sec_per_unit,
+                       const char *overflowmessage)
+{
+  double offset, seconds, nanosec;
+  static const long nanosec_per_sec = 1000000000;
+
+  if (get_comp_type (&str, &result->kind))
+    {
+      /* Invert the sense of the comparison */
+      switch (result->kind)
+       {
+       case COMP_LT: result->kind = COMP_GT; break;
+       case COMP_GT: result->kind = COMP_LT; break;
+       default: break;
+       }
+
+      /* Convert the ASCII number into floating-point. */
+      if (xstrtod (str, NULL, &offset, strtod))
+       {
+         /* Separate the floating point number the user specified
+          * (which is a number of days, or minutes, etc) into an
+          * integral number of seconds (SECONDS) and a fraction (NANOSEC).
+          */
+         nanosec = modf (offset * sec_per_unit, &seconds);
+         nanosec *= 1.0e9;     /* convert from fractional seconds to ns. */
+         assert (nanosec < nanosec_per_sec);
+
+         /* Perform the subtraction, and then check for overflow.
+          * On systems where signed aritmetic overflow does not
+          * wrap, this check may be unreliable.   The C standard
+          * does not require this approach to work, but I am aware
+          * of no platforms where it fails.
+          */
+         result->ts.tv_sec  = origin.tv_sec - seconds;
+         if ((origin.tv_sec < result->ts.tv_sec) != (seconds < 0))
+           {
+             /* an overflow has occurred. */
+             error (EXIT_FAILURE, 0, overflowmessage, str);
+           }
+
+         result->ts.tv_nsec = origin.tv_nsec - nanosec;
+         if (origin.tv_nsec < nanosec)
+           {
+             /* Perform a carry operation */
+             result->ts.tv_nsec += nanosec_per_sec;
+             result->ts.tv_sec  -= 1;
+           }
+         return true;
+       }
+      else
+       {
+         /* Conversion from ASCII to double failed. */
+         return false;
+       }
+    }
+  else
+    {
+      return false;
+    }
+}
+
+/* Insert a time predicate based on the information in ENTRY.
+   ARGV is a pointer to the argument array.
+   ARG_PTR is a pointer to an index into the array, incremented if
+   all went well.
+
+   Return true if input is valid, false if not.
+
+   A new predicate node is assigned, along with an argument node
+   obtained with malloc.
+
+   Used by -atime, -ctime, and -mtime parsers. */
+
+static bool
+parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
+{
+  struct predicate *our_pred;
+  struct time_val tval;
+  enum comparison_type comp;
+  const char *timearg, *orig_timearg;
+  const char *errmsg = _("arithmetic overflow while converting %s "
+                        "days to a number of seconds");
+  struct timespec origin;
+  const int saved_argc = *arg_ptr;
+
+  if (!collect_arg (argv, arg_ptr, &timearg))
+    return false;
+  orig_timearg = timearg;
+
+  /* Decide the origin by previewing the comparison type. */
+  origin = options.cur_day_start;
+
+  if (get_comp_type (&timearg, &comp))
+    {
+      /* Remember, we invert the sense of the comparison, so this tests
+       * against COMP_LT instead of COMP_GT...
+       */
+      if (COMP_LT == comp)
+       {
+         uintmax_t expected = origin.tv_sec + (DAYSECS-1);
+         origin.tv_sec += (DAYSECS-1);
+         if (origin.tv_sec != expected)
+           {
+             error (EXIT_FAILURE, 0,
+                    _("arithmetic overflow when trying to calculate the end of today"));
+           }
+       }
+    }
+  /* We discard the value of comp here, as get_relative_timestamp
+   * will set tval.kind.  For that to work, we have to restore
+   * timearg so that it points to the +/- prefix, if any.  get_comp_type()
+   * will have advanced timearg, so we restore it.
+   */
+  timearg = orig_timearg;
+
+  if (!get_relative_timestamp (timearg, &tval, origin, DAYSECS, errmsg))
+    {
+      *arg_ptr = saved_argc;   /* don't consume the invalid argument */
+      return false;
+    }
+
+  our_pred = insert_primary (entry, orig_timearg);
+  our_pred->args.reftime = tval;
+  our_pred->est_success_rate = estimate_timestamp_success_rate (tval.ts.tv_sec);
+
+  if (options.debug_options & DebugExpressionTree)
+    {
+      time_t t;
+
+      fprintf (stderr, "inserting %s\n", our_pred->p_name);
+      fprintf (stderr, "    type: %s    %s  ",
+              (tval.kind == COMP_GT) ? "gt" :
+              ((tval.kind == COMP_LT) ? "lt" : ((tval.kind == COMP_EQ) ? "eq" : "?")),
+              (tval.kind == COMP_GT) ? " >" :
+              ((tval.kind == COMP_LT) ? " <" : ((tval.kind == COMP_EQ) ? ">=" : " ?")));
+      t = our_pred->args.reftime.ts.tv_sec;
+      fprintf (stderr, "%ju %s",
+              (uintmax_t) our_pred->args.reftime.ts.tv_sec,
+              ctime (&t));
+      if (tval.kind == COMP_EQ)
+       {
+         t = our_pred->args.reftime.ts.tv_sec + DAYSECS;
+         fprintf (stderr, "                 <  %ju %s",
+                  (uintmax_t) t, ctime (&t));
+       }
+    }
+
+  return true;
+}
+
+/* Get the comparison type prefix (if any) from a number argument.
+   The prefix is at *STR.
+   Set *COMP_TYPE to the kind of comparison that is requested.
+   Advance *STR beyond any initial comparison prefix.
+
+   Return true if all okay, false if input error.  */
+static bool
+get_comp_type (const char **str, enum comparison_type *comp_type)
+{
+  switch (**str)
+    {
+    case '+':
+      *comp_type = COMP_GT;
+      (*str)++;
+      break;
+    case '-':
+      *comp_type = COMP_LT;
+      (*str)++;
+      break;
+    default:
+      *comp_type = COMP_EQ;
+      break;
+    }
+  return true;
+}
+
+
+
+
+
+/* Get a number with comparison information.
+   The sense of the comparison information is 'normal'; that is,
+   '+' looks for a count > than the number and '-' less than.
+
+   STR is the ASCII representation of the number.
+   Set *NUM to the number.
+   Set *COMP_TYPE to the kind of comparison that is requested.
+
+   Return true if all okay, false if input error.  */
+
+static bool
+get_num (const char *str,
+        uintmax_t *num,
+        enum comparison_type *comp_type)
+{
+  char *pend;
+
+  if (str == NULL)
+    return false;
+
+  /* Figure out the comparison type if the caller accepts one. */
+  if (comp_type)
+    {
+      if (!get_comp_type (&str, comp_type))
+       return false;
+    }
+
+  return xstrtoumax (str, &pend, 10, num, "") == LONGINT_OK;
+}
+
+/* Insert a number predicate.
+   ARGV is a pointer to the argument array.
+   *ARG_PTR is an index into ARGV, incremented if all went well.
+   *PRED is the predicate processor to insert.
+
+   Return true if input is valid, false if error.
+
+   A new predicate node is assigned, along with an argument node
+   obtained with malloc.
+
+   Used by -inum and -links parsers. */
+
+static struct predicate *
+insert_num (char **argv, int *arg_ptr, const struct parser_table *entry)
+{
+  const char *numstr;
+
+  if (collect_arg (argv, arg_ptr, &numstr))
+  {
+    uintmax_t num;
+    enum comparison_type c_type;
+
+    if (get_num (numstr, &num, &c_type))
+      {
+       struct predicate *our_pred = insert_primary (entry, numstr);
+       our_pred->args.numinfo.kind = c_type;
+       our_pred->args.numinfo.l_val = num;
+
+       if (options.debug_options & DebugExpressionTree)
+         {
+           fprintf (stderr, "inserting %s\n", our_pred->p_name);
+           fprintf (stderr, "    type: %s    %s  ",
+                    (c_type == COMP_GT) ? "gt" :
+                    ((c_type == COMP_LT) ? "lt" : ((c_type == COMP_EQ) ? "eq" : "?")),
+                    (c_type == COMP_GT) ? " >" :
+                    ((c_type == COMP_LT) ? " <" : ((c_type == COMP_EQ) ? " =" : " ?")));
+           fprintf (stderr, "%ju\n", our_pred->args.numinfo.l_val);
+         }
+       return our_pred;
+      }
+  }
+  return NULL;
+}
+
+static void
+open_output_file (const char *path, struct format_val *p)
+{
+  p->segment = NULL;
+  p->quote_opts = clone_quoting_options (NULL);
+
+  if (!strcmp (path, "/dev/stderr"))
+    {
+      p->stream = stderr;
+      p->filename = _("standard error");
+    }
+  else if (!strcmp (path, "/dev/stdout"))
+    {
+      p->stream = stdout;
+      p->filename = _("standard output");
+    }
+  else
+    {
+      p->stream = sharefile_fopen (state.shared_files, path);
+      p->filename = path;
+
+      if (p->stream == NULL)
+       {
+         fatal_nontarget_file_error (errno, path);
+       }
+    }
+
+  p->dest_is_tty = stream_is_tty (p->stream);
+}
+
+static void
+open_stdout (struct format_val *p)
+{
+  open_output_file ("/dev/stdout", p);
+}
diff --git a/find/pred.c b/find/pred.c
new file mode 100644 (file)
index 0000000..3acfe9f
--- /dev/null
@@ -0,0 +1,2701 @@
+/* pred.c -- execute the expression tree.
+   Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003,
+                 2004, 2005, 2006, 2007, 2008, 2009,
+                 2010 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/>.
+*/
+
+#include <config.h>
+#include "defs.h"
+
+#include <fnmatch.h>
+#include <signal.h>
+#include <math.h>
+#include <pwd.h>
+#include <grp.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <assert.h>
+#include <stdarg.h>
+#include <fcntl.h>
+#include <locale.h>
+#include <ctype.h>
+#include <unistd.h> /* for unlinkat() */
+#include "xalloc.h"
+#include "dirname.h"
+#include "human.h"
+#include "filemode.h"
+#include "printquoted.h"
+#include "buildcmd.h"
+#include "yesno.h"
+#include "listfile.h"
+#include "stat-time.h"
+#include "dircallback.h"
+#include "error.h"
+#include "verify.h"
+#include "fdleak.h"
+#include "areadlink.h"
+#include "cloexec.h"
+#include "save-cwd.h"
+
+#include <selinux/selinux.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
+
+#if !defined(SIGCHLD) && defined(SIGCLD)
+#define SIGCHLD SIGCLD
+#endif
+
+
+#include <sys/wait.h>
+
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+#  include <ndir.h>
+# endif
+#endif
+
+#ifdef CLOSEDIR_VOID
+/* Fake a return value. */
+#define CLOSEDIR(d) (closedir (d), 0)
+#else
+#define CLOSEDIR(d) closedir (d)
+#endif
+
+
+
+
+/* Get or fake the disk device blocksize.
+   Usually defined by sys/param.h (if at all).  */
+#ifndef DEV_BSIZE
+# ifdef BSIZE
+#  define DEV_BSIZE BSIZE
+# else /* !BSIZE */
+#  define DEV_BSIZE 4096
+# endif /* !BSIZE */
+#endif /* !DEV_BSIZE */
+
+/* Extract or fake data from a `struct stat'.
+   ST_BLKSIZE: Preferred I/O blocksize for the file, in bytes.
+   ST_NBLOCKS: Number of blocks in the file, including indirect blocks.
+   ST_NBLOCKSIZE: Size of blocks used when calculating ST_NBLOCKS.  */
+#ifndef HAVE_STRUCT_STAT_ST_BLOCKS
+# define ST_BLKSIZE(statbuf) DEV_BSIZE
+# if defined _POSIX_SOURCE || !defined BSIZE /* fileblocks.c uses BSIZE.  */
+#  define ST_NBLOCKS(statbuf) \
+  (S_ISREG ((statbuf).st_mode) \
+   || S_ISDIR ((statbuf).st_mode) \
+   ? (statbuf).st_size / ST_NBLOCKSIZE + ((statbuf).st_size % ST_NBLOCKSIZE != 0) : 0)
+# else /* !_POSIX_SOURCE && BSIZE */
+#  define ST_NBLOCKS(statbuf) \
+  (S_ISREG ((statbuf).st_mode) \
+   || S_ISDIR ((statbuf).st_mode) \
+   ? st_blocks ((statbuf).st_size) : 0)
+# endif /* !_POSIX_SOURCE && BSIZE */
+#else /* HAVE_STRUCT_STAT_ST_BLOCKS */
+/* Some systems, like Sequents, return st_blksize of 0 on pipes. */
+# define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \
+                              ? (statbuf).st_blksize : DEV_BSIZE)
+# if defined hpux || defined __hpux__ || defined __hpux
+/* HP-UX counts st_blocks in 1024-byte units.
+   This loses when mixing HP-UX and BSD file systems with NFS.  */
+#  define ST_NBLOCKSIZE 1024
+# else /* !hpux */
+#  if defined _AIX && defined _I386
+/* AIX PS/2 counts st_blocks in 4K units.  */
+#   define ST_NBLOCKSIZE (4 * 1024)
+#  else /* not AIX PS/2 */
+#   if defined _CRAY
+#    define ST_NBLOCKS(statbuf) \
+  (S_ISREG ((statbuf).st_mode) \
+   || S_ISDIR ((statbuf).st_mode) \
+   ? (statbuf).st_blocks * ST_BLKSIZE(statbuf)/ST_NBLOCKSIZE : 0)
+#   endif /* _CRAY */
+#  endif /* not AIX PS/2 */
+# endif /* !hpux */
+#endif /* HAVE_STRUCT_STAT_ST_BLOCKS */
+
+#ifndef ST_NBLOCKS
+# define ST_NBLOCKS(statbuf) \
+  (S_ISREG ((statbuf).st_mode) \
+   || S_ISDIR ((statbuf).st_mode) \
+   ? (statbuf).st_blocks : 0)
+#endif
+
+#ifndef ST_NBLOCKSIZE
+# define ST_NBLOCKSIZE 512
+#endif
+
+
+#undef MAX
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+
+static bool match_lname (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr, bool ignore_case);
+
+static char *format_date (struct timespec ts, int kind);
+static char *ctime_format (struct timespec ts);
+
+#ifdef DEBUG
+struct pred_assoc
+{
+  PRED_FUNC pred_func;
+  char *pred_name;
+};
+
+struct pred_assoc pred_table[] =
+{
+  {pred_amin, "amin    "},
+  {pred_and, "and     "},
+  {pred_anewer, "anewer  "},
+  {pred_atime, "atime   "},
+  {pred_closeparen, ")       "},
+  {pred_cmin, "cmin    "},
+  {pred_cnewer, "cnewer  "},
+  {pred_comma, ",       "},
+  {pred_ctime, "ctime   "},
+  {pred_delete, "delete  "},
+  {pred_empty, "empty   "},
+  {pred_exec, "exec    "},
+  {pred_execdir, "execdir "},
+  {pred_executable, "executable "},
+  {pred_false, "false   "},
+  {pred_fprint, "fprint  "},
+  {pred_fprint0, "fprint0 "},
+  {pred_fprintf, "fprintf "},
+  {pred_fstype, "fstype  "},
+  {pred_gid, "gid     "},
+  {pred_group, "group   "},
+  {pred_ilname, "ilname  "},
+  {pred_iname, "iname   "},
+  {pred_inum, "inum    "},
+  {pred_ipath, "ipath   "},
+  {pred_links, "links   "},
+  {pred_lname, "lname   "},
+  {pred_ls, "ls      "},
+  {pred_mmin, "mmin    "},
+  {pred_mtime, "mtime   "},
+  {pred_name, "name    "},
+  {pred_negate, "not     "},
+  {pred_newer, "newer   "},
+  {pred_newerXY, "newerXY   "},
+  {pred_nogroup, "nogroup "},
+  {pred_nouser, "nouser  "},
+  {pred_ok, "ok      "},
+  {pred_okdir, "okdir   "},
+  {pred_openparen, "(       "},
+  {pred_or, "or      "},
+  {pred_path, "path    "},
+  {pred_perm, "perm    "},
+  {pred_print, "print   "},
+  {pred_print0, "print0  "},
+  {pred_prune, "prune   "},
+  {pred_quit, "quit    "},
+  {pred_readable, "readable    "},
+  {pred_regex, "regex   "},
+  {pred_samefile,"samefile "},
+  {pred_size, "size    "},
+  {pred_true, "true    "},
+  {pred_type, "type    "},
+  {pred_uid, "uid     "},
+  {pred_used, "used    "},
+  {pred_user, "user    "},
+  {pred_writable, "writable "},
+  {pred_xtype, "xtype   "},
+  {pred_context, "context"},
+  {0, "none    "}
+};
+#endif
+
+/* Returns ts1 - ts2 */
+static double ts_difference (struct timespec ts1,
+                            struct timespec ts2)
+{
+  double d =  difftime (ts1.tv_sec, ts2.tv_sec)
+    + (1.0e-9 * (ts1.tv_nsec - ts2.tv_nsec));
+  return d;
+}
+
+
+static int
+compare_ts (struct timespec ts1,
+           struct timespec ts2)
+{
+  if ((ts1.tv_sec == ts2.tv_sec) &&
+      (ts1.tv_nsec == ts2.tv_nsec))
+    {
+      return 0;
+    }
+  else
+    {
+      double diff = ts_difference (ts1, ts2);
+      return diff < 0.0 ? -1 : +1;
+    }
+}
+
+/* Predicate processing routines.
+
+   PATHNAME is the full pathname of the file being checked.
+   *STAT_BUF contains information about PATHNAME.
+   *PRED_PTR contains information for applying the predicate.
+
+   Return true if the file passes this predicate, false if not. */
+
+
+/* pred_timewindow
+ *
+ * Returns true if THE_TIME is
+ * COMP_GT: after the specified time
+ * COMP_LT: before the specified time
+ * COMP_EQ: after the specified time but by not more than WINDOW seconds.
+ */
+static bool
+pred_timewindow (struct timespec ts, struct predicate const *pred_ptr, int window)
+{
+  switch (pred_ptr->args.reftime.kind)
+    {
+    case COMP_GT:
+      return compare_ts (ts, pred_ptr->args.reftime.ts) > 0;
+
+    case COMP_LT:
+      return compare_ts (ts, pred_ptr->args.reftime.ts) < 0;
+
+    case COMP_EQ:
+      {
+       /* consider "find . -mtime 0".
+        *
+        * Here, the origin is exactly 86400 seconds before the start
+        * of the program (since -daystart was not specified).   This
+        * function will be called with window=86400 and
+        * pred_ptr->args.reftime.ts as the origin.  Hence a file
+        * created the instant the program starts will show a time
+        * difference (value of delta) of 86400.   Similarly, a file
+        * created exactly 24h ago would be the newest file which was
+        * _not_ created today.   So, if delta is 0.0, the file
+        * was not created today.  If the delta is 86400, the file
+        * was created this instant.
+        */
+       double delta = ts_difference (ts, pred_ptr->args.reftime.ts);
+       return (delta > 0.0 && delta <= window);
+      }
+    }
+  assert (0);
+  abort ();
+}
+
+
+bool
+pred_amin (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) &pathname;
+  return pred_timewindow (get_stat_atime(stat_buf), pred_ptr, 60);
+}
+
+bool
+pred_and (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  if (pred_ptr->pred_left == NULL
+      || apply_predicate (pathname, stat_buf, pred_ptr->pred_left))
+    {
+      return apply_predicate (pathname, stat_buf, pred_ptr->pred_right);
+    }
+  else
+    return false;
+}
+
+bool
+pred_anewer (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) &pathname;
+  assert (COMP_GT == pred_ptr->args.reftime.kind);
+  return compare_ts (get_stat_atime(stat_buf), pred_ptr->args.reftime.ts) > 0;
+}
+
+bool
+pred_atime (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) &pathname;
+  return pred_timewindow (get_stat_atime(stat_buf), pred_ptr, DAYSECS);
+}
+
+bool
+pred_closeparen (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) &pathname;
+  (void) &stat_buf;
+  (void) &pred_ptr;
+
+  return true;
+}
+
+bool
+pred_cmin (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  return pred_timewindow (get_stat_ctime(stat_buf), pred_ptr, 60);
+}
+
+bool
+pred_cnewer (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+
+  assert (COMP_GT == pred_ptr->args.reftime.kind);
+  return compare_ts (get_stat_ctime(stat_buf), pred_ptr->args.reftime.ts) > 0;
+}
+
+bool
+pred_comma (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  if (pred_ptr->pred_left != NULL)
+    {
+      apply_predicate (pathname, stat_buf,pred_ptr->pred_left);
+    }
+  return apply_predicate (pathname, stat_buf, pred_ptr->pred_right);
+}
+
+bool
+pred_ctime (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) &pathname;
+  return pred_timewindow (get_stat_ctime(stat_buf), pred_ptr, DAYSECS);
+}
+
+static bool
+perform_delete (int flags)
+{
+  return 0 == unlinkat (state.cwd_dir_fd, state.rel_pathname, flags);
+}
+
+
+bool
+pred_delete (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pred_ptr;
+  (void) stat_buf;
+  if (strcmp (state.rel_pathname, "."))
+    {
+      int flags=0;
+      if (state.have_stat && S_ISDIR(stat_buf->st_mode))
+       flags |= AT_REMOVEDIR;
+      if (perform_delete (flags))
+       {
+         return true;
+       }
+      else
+       {
+         if (EISDIR == errno)
+           {
+             if ((flags & AT_REMOVEDIR) == 0)
+               {
+                 /* unlink() operation failed because we should have done rmdir(). */
+                 flags |= AT_REMOVEDIR;
+                 if (perform_delete (flags))
+                   return true;
+               }
+           }
+       }
+      error (0, errno, _("cannot delete %s"),
+            safely_quote_err_filename (0, pathname));
+      /* Previously I had believed that having the -delete action
+       * return false provided the user with control over whether an
+       * error message is issued.  While this is true, the policy of
+       * not affecting the exit status is contrary to the POSIX
+       * requirement that diagnostic messages are accompanied by a
+       * nonzero exit status.  While -delete is not a POSIX option and
+       * we can therefore opt not to follow POSIX in this case, that
+       * seems somewhat arbitrary and confusing.  So, as of
+       * findutils-4.3.11, we also set the exit status in this case.
+       */
+      state.exit_status = 1;
+      return false;
+    }
+  else
+    {
+      /* nothing to do. */
+      return true;
+    }
+}
+
+bool
+pred_empty (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  (void) pred_ptr;
+
+  if (S_ISDIR (stat_buf->st_mode))
+    {
+      int fd;
+      DIR *d;
+      struct dirent *dp;
+      bool empty = true;
+
+      errno = 0;
+      if ((fd = openat (state.cwd_dir_fd, state.rel_pathname, O_RDONLY
+#if defined O_LARGEFILE
+                       |O_LARGEFILE
+#endif
+                      )) < 0)
+       {
+         error (0, errno, "%s", safely_quote_err_filename (0, pathname));
+         state.exit_status = 1;
+         return false;
+       }
+      d = fdopendir (fd);
+      if (d == NULL)
+       {
+         error (0, errno, "%s", safely_quote_err_filename (0, pathname));
+         state.exit_status = 1;
+         return false;
+       }
+      for (dp = readdir (d); dp; dp = readdir (d))
+       {
+         if (dp->d_name[0] != '.'
+             || (dp->d_name[1] != '\0'
+                 && (dp->d_name[1] != '.' || dp->d_name[2] != '\0')))
+           {
+             empty = false;
+             break;
+           }
+       }
+      if (CLOSEDIR (d))
+       {
+         error (0, errno, "%s", safely_quote_err_filename (0, pathname));
+         state.exit_status = 1;
+         return false;
+       }
+      return (empty);
+    }
+  else if (S_ISREG (stat_buf->st_mode))
+    return (stat_buf->st_size == 0);
+  else
+    return (false);
+}
+
+
+/* Initialise exec->wd_for_exec.
+
+   We save in exec->wd_for_exec the directory whose path relative to
+   cwd_df is dir.
+ */
+static bool
+initialise_wd_for_exec (struct exec_val *execp, int cwd_fd, const char *dir)
+{
+  execp->wd_for_exec = xmalloc (sizeof (*execp->wd_for_exec));
+  execp->wd_for_exec->name = NULL;
+  execp->wd_for_exec->desc = openat (cwd_fd, dir, O_RDONLY);
+  if (execp->wd_for_exec->desc < 0)
+    return false;
+  set_cloexec_flag (execp->wd_for_exec->desc, true);
+  return true;
+}
+
+
+static bool
+record_exec_dir (struct exec_val *execp)
+{
+  if (!execp->state.todo)
+    {
+      /* Record the WD. If we're using -L or fts chooses to do so for
+        any other reason, state.cwd_dir_fd may in fact not be the
+        directory containing the target file.  When this happens,
+        rel_path will contain directory components (since it is the
+        path from state.cwd_dir_fd to the target file).
+
+        We deal with this by extracting any directory part and using
+        that to adjust what goes into execp->wd_for_exec.
+      */
+      if (strchr (state.rel_pathname, '/'))
+       {
+         char *dir = mdir_name (state.rel_pathname);
+         bool result = initialise_wd_for_exec (execp, state.cwd_dir_fd, dir);
+         free (dir);
+         return result;
+       }
+      else
+       {
+         return initialise_wd_for_exec (execp, state.cwd_dir_fd, ".");
+       }
+    }
+  return true;
+}
+
+
+static bool
+impl_pred_exec (const char *pathname,
+               struct stat *stat_buf,
+               struct predicate *pred_ptr)
+{
+  struct exec_val *execp = &pred_ptr->args.exec_vec;
+  char *target;
+  bool result;
+  const bool local = is_exec_in_local_dir (pred_ptr->pred_func);
+  char *prefix;
+  size_t pfxlen;
+
+  (void) stat_buf;
+  if (local)
+    {
+      /* For -execdir/-okdir predicates, the parser did not fill in
+        the wd_for_exec member of sturct exec_val.  So for those
+        predicates, we do so now.
+      */
+      if (!record_exec_dir (execp))
+       {
+         error (EXIT_FAILURE, errno,
+                _("Failed to save working directory in order to "
+                  "run a command on %s"),
+                safely_quote_err_filename (0, pathname));
+         /*NOTREACHED*/
+       }
+      target = base_name (state.rel_pathname);
+      if ('/' == target[0])
+       {
+         /* find / execdir ls -d {} \; */
+         prefix = NULL;
+         pfxlen = 0;
+       }
+      else
+       {
+         prefix = "./";
+         pfxlen = 2u;
+       }
+    }
+  else
+    {
+      /* For the others (-exec, -ok), the parser should
+        have set wd_for_exec to initial_wd, indicating
+        that the exec should take place from find's initial
+        working directory.
+      */
+      assert (execp->wd_for_exec == initial_wd);
+      target = pathname;
+      prefix = NULL;
+      pfxlen = 0u;
+    }
+
+  if (execp->multiple)
+    {
+      /* Push the argument onto the current list.
+       * The command may or may not be run at this point,
+       * depending on the command line length limits.
+       */
+      bc_push_arg (&execp->ctl,
+                  &execp->state,
+                  target, strlen (target)+1,
+                  prefix, pfxlen,
+                  0);
+
+      /* remember that there are pending execdirs. */
+      state.execdirs_outstanding = true;
+
+      /* POSIX: If the primary expression is punctuated by a plus
+       * sign, the primary shall always evaluate as true
+       */
+      result = true;
+    }
+  else
+    {
+      int i;
+
+      for (i=0; i<execp->num_args; ++i)
+       {
+         bc_do_insert (&execp->ctl,
+                       &execp->state,
+                       execp->replace_vec[i],
+                       strlen (execp->replace_vec[i]),
+                       prefix, pfxlen,
+                       target, strlen (target),
+                       0);
+       }
+
+      /* Actually invoke the command. */
+      bc_do_exec (&execp->ctl, &execp->state);
+      if (WIFEXITED(execp->last_child_status))
+       {
+         if (0 == WEXITSTATUS(execp->last_child_status))
+           result = true;      /* The child succeeded. */
+         else
+           result = false;
+       }
+      else
+       {
+         result = false;
+       }
+    }
+  if (target != pathname)
+    {
+      assert (local);
+      free (target);
+    }
+  return result;
+}
+
+
+bool
+pred_exec (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  return impl_pred_exec (pathname, stat_buf, pred_ptr);
+}
+
+bool
+pred_execdir (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+   (void) &pathname;
+   return impl_pred_exec (state.rel_pathname, stat_buf, pred_ptr);
+}
+
+bool
+pred_false (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) &pathname;
+  (void) &stat_buf;
+  (void) &pred_ptr;
+
+
+  return (false);
+}
+
+bool
+pred_fls (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  FILE * stream = pred_ptr->args.printf_vec.stream;
+  list_file (pathname, state.cwd_dir_fd, state.rel_pathname, stat_buf,
+            options.start_time.tv_sec,
+            options.output_block_size,
+            pred_ptr->literal_control_chars, stream);
+  return true;
+}
+
+bool
+pred_fprint (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) &pathname;
+  (void) &stat_buf;
+
+  print_quoted (pred_ptr->args.printf_vec.stream,
+               pred_ptr->args.printf_vec.quote_opts,
+               pred_ptr->args.printf_vec.dest_is_tty,
+               "%s\n",
+               pathname);
+  return true;
+}
+
+bool
+pred_fprint0 (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  FILE * fp = pred_ptr->args.printf_vec.stream;
+
+  (void) &stat_buf;
+
+  fputs (pathname, fp);
+  putc (0, fp);
+  return true;
+}
+
+
+
+static char*
+mode_to_filetype (mode_t m)
+{
+#define HANDLE_TYPE(t,letter) if (m==t) { return letter; }
+#ifdef S_IFREG
+  HANDLE_TYPE(S_IFREG,  "f");  /* regular file */
+#endif
+#ifdef S_IFDIR
+  HANDLE_TYPE(S_IFDIR,  "d");  /* directory */
+#endif
+#ifdef S_IFLNK
+  HANDLE_TYPE(S_IFLNK,  "l");  /* symbolic link */
+#endif
+#ifdef S_IFSOCK
+  HANDLE_TYPE(S_IFSOCK, "s");  /* Unix domain socket */
+#endif
+#ifdef S_IFBLK
+  HANDLE_TYPE(S_IFBLK,  "b");  /* block device */
+#endif
+#ifdef S_IFCHR
+  HANDLE_TYPE(S_IFCHR,  "c");  /* character device */
+#endif
+#ifdef S_IFIFO
+  HANDLE_TYPE(S_IFIFO,  "p");  /* FIFO */
+#endif
+#ifdef S_IFDOOR
+  HANDLE_TYPE(S_IFDOOR, "D");  /* Door (e.g. on Solaris) */
+#endif
+  return "U";                  /* Unknown */
+}
+
+static double
+file_sparseness (const struct stat *p)
+{
+#if defined HAVE_STRUCT_STAT_ST_BLOCKS
+  if (0 == p->st_size)
+    {
+      if (0 == p->st_blocks)
+       return 1.0;
+      else
+       return p->st_blocks < 0 ? -HUGE_VAL : HUGE_VAL;
+    }
+  else
+    {
+      double blklen = file_blocksize (p) * (double)p->st_blocks;
+      return blklen / p->st_size;
+    }
+#else
+  return 1.0;
+#endif
+}
+
+
+
+static void
+checked_fprintf (struct format_val *dest, const char *fmt, ...)
+{
+  int rv;
+  va_list ap;
+
+  va_start (ap, fmt);
+  rv = vfprintf (dest->stream, fmt, ap);
+  if (rv < 0)
+    nonfatal_nontarget_file_error (errno, dest->filename);
+}
+
+
+static void
+checked_print_quoted (struct format_val *dest,
+                          const char *format, const char *s)
+{
+  int rv = print_quoted (dest->stream, dest->quote_opts, dest->dest_is_tty,
+                        format, s);
+  if (rv < 0)
+    nonfatal_nontarget_file_error (errno, dest->filename);
+}
+
+
+static void
+checked_fwrite (void *p, size_t siz, size_t nmemb, struct format_val *dest)
+{
+  int items_written = fwrite (p, siz, nmemb, dest->stream);
+  if (items_written < nmemb)
+    nonfatal_nontarget_file_error (errno, dest->filename);
+}
+
+static void
+checked_fflush (struct format_val *dest)
+{
+  if (0 != fflush (dest->stream))
+    {
+      nonfatal_nontarget_file_error (errno, dest->filename);
+    }
+}
+
+static void
+do_fprintf (struct format_val *dest,
+           struct segment *segment,
+           const char *pathname,
+           const struct stat *stat_buf)
+{
+  char hbuf[LONGEST_HUMAN_READABLE + 1];
+  const char *cp;
+
+  switch (segment->segkind)
+    {
+    case KIND_PLAIN:   /* Plain text string (no % conversion). */
+      /* trusted */
+      checked_fwrite(segment->text, 1, segment->text_len, dest);
+      break;
+
+    case KIND_STOP:            /* Terminate argument and flush output. */
+      /* trusted */
+      checked_fwrite (segment->text, 1, segment->text_len, dest);
+      checked_fflush (dest);
+      break;
+
+    case KIND_FORMAT:
+      switch (segment->format_char[0])
+       {
+       case 'a':               /* atime in `ctime' format. */
+         /* UNTRUSTED, probably unexploitable */
+         checked_fprintf (dest, segment->text, ctime_format (get_stat_atime (stat_buf)));
+         break;
+       case 'b':               /* size in 512-byte blocks */
+         /* UNTRUSTED, probably unexploitable */
+         checked_fprintf (dest, segment->text,
+                          human_readable ((uintmax_t) ST_NBLOCKS (*stat_buf),
+                                          hbuf, human_ceiling,
+                                          ST_NBLOCKSIZE, 512));
+         break;
+       case 'c':               /* ctime in `ctime' format */
+         /* UNTRUSTED, probably unexploitable */
+         checked_fprintf (dest, segment->text, ctime_format (get_stat_ctime (stat_buf)));
+         break;
+       case 'd':               /* depth in search tree */
+         /* UNTRUSTED, probably unexploitable */
+         checked_fprintf (dest, segment->text, state.curdepth);
+         break;
+       case 'D':               /* Device on which file exists (stat.st_dev) */
+         /* trusted */
+         checked_fprintf (dest, segment->text,
+                          human_readable ((uintmax_t) stat_buf->st_dev, hbuf,
+                                          human_ceiling, 1, 1));
+         break;
+       case 'f':               /* base name of path */
+         /* sanitised */
+         {
+           char *base = base_name (pathname);
+           checked_print_quoted (dest, segment->text, base);
+           free (base);
+         }
+         break;
+       case 'F':               /* file system type */
+         /* trusted */
+         checked_print_quoted (dest, segment->text, filesystem_type (stat_buf, pathname));
+         break;
+       case 'g':               /* group name */
+         /* trusted */
+         /* (well, the actual group is selected by the user but
+          * its name was selected by the system administrator)
+          */
+         {
+           struct group *g;
+
+           g = getgrgid (stat_buf->st_gid);
+           if (g)
+             {
+               segment->text[segment->text_len] = 's';
+               checked_fprintf (dest, segment->text, g->gr_name);
+               break;
+             }
+           else
+             {
+               /* Do nothing. */
+               /*FALLTHROUGH*/
+             }
+         }
+         /*FALLTHROUGH*/ /*...sometimes, so 'G' case.*/
+
+       case 'G':               /* GID number */
+         /* UNTRUSTED, probably unexploitable */
+         checked_fprintf (dest, segment->text,
+                          human_readable ((uintmax_t) stat_buf->st_gid, hbuf,
+                                          human_ceiling, 1, 1));
+         break;
+       case 'h':               /* leading directories part of path */
+         /* sanitised */
+         {
+           cp = strrchr (pathname, '/');
+           if (cp == NULL)     /* No leading directories. */
+             {
+               /* If there is no slash in the pathname, we still
+                * print the string because it contains characters
+                * other than just '%s'.  The %h expands to ".".
+                */
+               checked_print_quoted (dest, segment->text, ".");
+             }
+           else
+             {
+               char *s = strdup (pathname);
+               s[cp - pathname] = 0;
+               checked_print_quoted (dest, segment->text, s);
+               free (s);
+             }
+         }
+         break;
+
+       case 'H':               /* ARGV element file was found under */
+         /* trusted */
+         {
+           char *s = xmalloc (state.starting_path_length+1);
+           memcpy (s, pathname, state.starting_path_length);
+           s[state.starting_path_length] = 0;
+           checked_fprintf (dest, segment->text, s);
+           free (s);
+         }
+         break;
+
+       case 'i':               /* inode number */
+         /* UNTRUSTED, but not exploitable I think */
+         checked_fprintf (dest, segment->text,
+                          human_readable ((uintmax_t) stat_buf->st_ino, hbuf,
+                                          human_ceiling,
+                                          1, 1));
+         break;
+       case 'k':               /* size in 1K blocks */
+         /* UNTRUSTED, but not exploitable I think */
+         checked_fprintf (dest, segment->text,
+                          human_readable ((uintmax_t) ST_NBLOCKS (*stat_buf),
+                                          hbuf, human_ceiling,
+                                          ST_NBLOCKSIZE, 1024));
+         break;
+       case 'l':               /* object of symlink */
+         /* sanitised */
+#ifdef S_ISLNK
+         {
+           char *linkname = 0;
+
+           if (S_ISLNK (stat_buf->st_mode))
+             {
+               linkname = areadlinkat (state.cwd_dir_fd, state.rel_pathname);
+               if (linkname == NULL)
+                 {
+                   nonfatal_target_file_error (errno, pathname);
+                   state.exit_status = 1;
+                 }
+             }
+           if (linkname)
+             {
+               checked_print_quoted (dest, segment->text, linkname);
+             }
+           else
+             {
+               /* We still need to honour the field width etc., so this is
+                * not a no-op.
+                */
+               checked_print_quoted (dest, segment->text, "");
+             }
+           free (linkname);
+         }
+#endif                         /* S_ISLNK */
+         break;
+
+       case 'M':               /* mode as 10 chars (eg., "-rwxr-x--x" */
+         /* UNTRUSTED, probably unexploitable */
+         {
+           char modestring[16] ;
+           filemodestring (stat_buf, modestring);
+           modestring[10] = '\0';
+           checked_fprintf (dest, segment->text, modestring);
+         }
+         break;
+
+       case 'm':               /* mode as octal number (perms only) */
+         /* UNTRUSTED, probably unexploitable */
+         {
+           /* Output the mode portably using the traditional numbers,
+              even if the host unwisely uses some other numbering
+              scheme.  But help the compiler in the common case where
+              the host uses the traditional numbering scheme.  */
+           mode_t m = stat_buf->st_mode;
+           bool traditional_numbering_scheme =
+             (S_ISUID == 04000 && S_ISGID == 02000 && S_ISVTX == 01000
+              && S_IRUSR == 00400 && S_IWUSR == 00200 && S_IXUSR == 00100
+              && S_IRGRP == 00040 && S_IWGRP == 00020 && S_IXGRP == 00010
+              && S_IROTH == 00004 && S_IWOTH == 00002 && S_IXOTH == 00001);
+           checked_fprintf (dest, segment->text,
+                    (traditional_numbering_scheme
+                     ? m & MODE_ALL
+                     : ((m & S_ISUID ? 04000 : 0)
+                        | (m & S_ISGID ? 02000 : 0)
+                        | (m & S_ISVTX ? 01000 : 0)
+                        | (m & S_IRUSR ? 00400 : 0)
+                        | (m & S_IWUSR ? 00200 : 0)
+                        | (m & S_IXUSR ? 00100 : 0)
+                        | (m & S_IRGRP ? 00040 : 0)
+                        | (m & S_IWGRP ? 00020 : 0)
+                        | (m & S_IXGRP ? 00010 : 0)
+                        | (m & S_IROTH ? 00004 : 0)
+                        | (m & S_IWOTH ? 00002 : 0)
+                        | (m & S_IXOTH ? 00001 : 0))));
+         }
+         break;
+
+       case 'n':               /* number of links */
+         /* UNTRUSTED, probably unexploitable */
+         checked_fprintf (dest, segment->text,
+                  human_readable ((uintmax_t) stat_buf->st_nlink,
+                                  hbuf,
+                                  human_ceiling,
+                                  1, 1));
+         break;
+
+       case 'p':               /* pathname */
+         /* sanitised */
+         checked_print_quoted (dest, segment->text, pathname);
+         break;
+
+       case 'P':               /* pathname with ARGV element stripped */
+         /* sanitised */
+         if (state.curdepth > 0)
+           {
+             cp = pathname + state.starting_path_length;
+             if (*cp == '/')
+               /* Move past the slash between the ARGV element
+                  and the rest of the pathname.  But if the ARGV element
+                  ends in a slash, we didn't add another, so we've
+                  already skipped past it.  */
+               cp++;
+           }
+         else
+           {
+             cp = "";
+           }
+         checked_print_quoted (dest, segment->text, cp);
+         break;
+
+       case 's':               /* size in bytes */
+         /* UNTRUSTED, probably unexploitable */
+         checked_fprintf (dest, segment->text,
+                  human_readable ((uintmax_t) stat_buf->st_size,
+                                  hbuf, human_ceiling, 1, 1));
+         break;
+
+       case 'S':               /* sparseness */
+         /* UNTRUSTED, probably unexploitable */
+         checked_fprintf (dest, segment->text, file_sparseness (stat_buf));;
+         break;
+
+       case 't':               /* mtime in `ctime' format */
+         /* UNTRUSTED, probably unexploitable */
+         checked_fprintf (dest, segment->text,
+                          ctime_format (get_stat_mtime (stat_buf)));
+         break;
+
+       case 'u':               /* user name */
+         /* trusted */
+         /* (well, the actual user is selected by the user on systems
+          * where chown is not restricted, but the user name was
+          * selected by the system administrator)
+          */
+         {
+           struct passwd *p;
+
+           p = getpwuid (stat_buf->st_uid);
+           if (p)
+             {
+               segment->text[segment->text_len] = 's';
+               checked_fprintf (dest, segment->text, p->pw_name);
+               break;
+             }
+           /* else fallthru */
+         }
+         /* FALLTHROUGH*/ /* .. to case U */
+
+       case 'U':               /* UID number */
+         /* UNTRUSTED, probably unexploitable */
+         checked_fprintf (dest, segment->text,
+                          human_readable ((uintmax_t) stat_buf->st_uid, hbuf,
+                                          human_ceiling, 1, 1));
+         break;
+
+         /* %Y: type of file system entry like `ls -l`:
+          *     (d,-,l,s,p,b,c,n) n=nonexistent (symlink)
+          */
+       case 'Y':               /* in case of symlink */
+         /* trusted */
+         {
+#ifdef S_ISLNK
+           if (S_ISLNK (stat_buf->st_mode))
+             {
+               struct stat sbuf;
+               /* If we would normally follow links, do not do so.
+                * If we would normally not follow links, do so.
+                */
+               if ((following_links () ? optionp_stat : optionl_stat)
+                   (state.rel_pathname, &sbuf) != 0)
+                 {
+                   if ( errno == ENOENT )
+                     {
+                       checked_fprintf (dest, segment->text, "N");
+                       break;
+                     }
+                   else if ( errno == ELOOP )
+                     {
+                       checked_fprintf (dest, segment->text, "L");
+                       break;
+                     }
+                   else
+                     {
+                       checked_fprintf (dest, segment->text, "?");
+                       error (0, errno, "%s",
+                              safely_quote_err_filename (0, pathname));
+                       /* exit_status = 1;
+                          return ; */
+                       break;
+                     }
+                 }
+               checked_fprintf (dest, segment->text,
+                                mode_to_filetype (sbuf.st_mode & S_IFMT));
+             }
+#endif /* S_ISLNK */
+           else
+             {
+               checked_fprintf (dest, segment->text,
+                                mode_to_filetype (stat_buf->st_mode & S_IFMT));
+             }
+         }
+         break;
+
+       case 'y':
+         /* trusted */
+         {
+           checked_fprintf (dest, segment->text,
+                            mode_to_filetype (stat_buf->st_mode & S_IFMT));
+         }
+         break;
+
+       case 'Z':               /* SELinux security context */
+         {
+           security_context_t scontext;
+           int rv = (*options.x_getfilecon) (state.cwd_dir_fd, state.rel_pathname,
+                                             &scontext);
+           if (rv < 0)
+             {
+               /* If getfilecon fails, there will in the general case
+                  still be some text to print.   We just make %Z expand
+                  to an empty string. */
+               checked_fprintf (dest, segment->text, "");
+
+               error (0, errno, _("getfilecon failed: %s"),
+                   safely_quote_err_filename (0, pathname));
+               state.exit_status = 1;
+             }
+           else
+             {
+               checked_fprintf (dest, segment->text, scontext);
+               freecon (scontext);
+             }
+         }
+         break;
+       }
+      /* end of KIND_FORMAT case */
+      break;
+    }
+}
+
+bool
+pred_fprintf (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  struct format_val *dest = &pred_ptr->args.printf_vec;
+  struct segment *segment;
+
+  for (segment = dest->segment; segment; segment = segment->next)
+    {
+      if ( (KIND_FORMAT == segment->segkind) && segment->format_char[1]) /* Component of date. */
+       {
+         struct timespec ts;
+         int valid = 0;
+
+         switch (segment->format_char[0])
+           {
+           case 'A':
+             ts = get_stat_atime (stat_buf);
+             valid = 1;
+             break;
+           case 'B':
+             ts = get_stat_birthtime (stat_buf);
+             if ('@' == segment->format_char[1])
+               valid = 1;
+             else
+               valid = (ts.tv_nsec >= 0);
+             break;
+           case 'C':
+             ts = get_stat_ctime (stat_buf);
+             valid = 1;
+             break;
+           case 'T':
+             ts = get_stat_mtime (stat_buf);
+             valid = 1;
+             break;
+           default:
+             assert (0);
+             abort ();
+           }
+         /* We trust the output of format_date not to contain
+          * nasty characters, though the value of the date
+          * is itself untrusted data.
+          */
+         if (valid)
+           {
+             /* trusted */
+             checked_fprintf (dest, segment->text,
+                              format_date (ts, segment->format_char[1]));
+           }
+         else
+           {
+             /* The specified timestamp is not available, output
+              * nothing for the timestamp, but use the rest (so that
+              * for example find foo -printf '[%Bs] %p\n' can print
+              * "[] foo").
+              */
+             /* trusted */
+             checked_fprintf (dest, segment->text, "");
+           }
+       }
+      else
+       {
+         /* Print a segment which is not a date. */
+         do_fprintf (dest, segment, pathname, stat_buf);
+       }
+    }
+  return true;
+}
+
+bool
+pred_fstype (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+
+  if (strcmp (filesystem_type (stat_buf, pathname), pred_ptr->args.str) == 0)
+    return true;
+  else
+    return false;
+}
+
+bool
+pred_gid (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+
+  switch (pred_ptr->args.numinfo.kind)
+    {
+    case COMP_GT:
+      if (stat_buf->st_gid > pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    case COMP_LT:
+      if (stat_buf->st_gid < pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    case COMP_EQ:
+      if (stat_buf->st_gid == pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    }
+  return (false);
+}
+
+bool
+pred_group (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+
+  if (pred_ptr->args.gid == stat_buf->st_gid)
+    return (true);
+  else
+    return (false);
+}
+
+bool
+pred_ilname (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  return match_lname (pathname, stat_buf, pred_ptr, true);
+}
+
+/* Common code between -name, -iname.  PATHNAME is being visited, STR
+   is name to compare basename against, and FLAGS are passed to
+   fnmatch.  Recall that 'find / -name /' is one of the few times where a '/'
+   in the -name must actually find something. */
+static bool
+pred_name_common (const char *pathname, const char *str, int flags)
+{
+  bool b;
+  /* We used to use last_component() here, but that would not allow us to modify the
+   * input string, which is const.   We could optimise by duplicating the string only
+   * if we need to modify it, and I'll do that if there is a measurable
+   * performance difference on a machine built after 1990...
+   */
+  char *base = base_name (pathname);
+  /* remove trailing slashes, but leave  "/" or "//foo" unchanged. */
+  strip_trailing_slashes (base);
+
+  /* FNM_PERIOD is not used here because POSIX requires that it not be.
+   * See http://standards.ieee.org/reading/ieee/interp/1003-2-92_int/pasc-1003.2-126.html
+   */
+  b = fnmatch (str, base, flags) == 0;
+  free (base);
+  return b;
+}
+
+bool
+pred_iname (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) stat_buf;
+  return pred_name_common (pathname, pred_ptr->args.str, FNM_CASEFOLD);
+}
+
+bool
+pred_inum (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+
+  assert (stat_buf->st_ino != 0);
+
+  switch (pred_ptr->args.numinfo.kind)
+    {
+    case COMP_GT:
+      if (stat_buf->st_ino > pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    case COMP_LT:
+      if (stat_buf->st_ino < pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    case COMP_EQ:
+      if (stat_buf->st_ino == pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    }
+  return (false);
+}
+
+bool
+pred_ipath (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) stat_buf;
+
+  if (fnmatch (pred_ptr->args.str, pathname, FNM_CASEFOLD) == 0)
+    return (true);
+  return (false);
+}
+
+bool
+pred_links (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+
+  switch (pred_ptr->args.numinfo.kind)
+    {
+    case COMP_GT:
+      if (stat_buf->st_nlink > pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    case COMP_LT:
+      if (stat_buf->st_nlink < pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    case COMP_EQ:
+      if (stat_buf->st_nlink == pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    }
+  return (false);
+}
+
+bool
+pred_lname (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  return match_lname (pathname, stat_buf, pred_ptr, false);
+}
+
+static bool
+match_lname (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr, bool ignore_case)
+{
+  bool ret = false;
+#ifdef S_ISLNK
+  if (S_ISLNK (stat_buf->st_mode))
+    {
+      char *linkname = areadlinkat (state.cwd_dir_fd, state.rel_pathname);
+      if (linkname)
+       {
+         if (fnmatch (pred_ptr->args.str, linkname,
+                      ignore_case ? FNM_CASEFOLD : 0) == 0)
+           ret = true;
+       }
+      else
+       {
+         nonfatal_target_file_error (errno, pathname);
+         state.exit_status = 1;
+       }
+      free (linkname);
+    }
+#endif /* S_ISLNK */
+  return ret;
+}
+
+bool
+pred_ls (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  return pred_fls (pathname, stat_buf, pred_ptr);
+}
+
+bool
+pred_mmin (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) &pathname;
+  return pred_timewindow (get_stat_mtime(stat_buf), pred_ptr, 60);
+}
+
+bool
+pred_mtime (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  return pred_timewindow (get_stat_mtime(stat_buf), pred_ptr, DAYSECS);
+}
+
+bool
+pred_name (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) stat_buf;
+  return pred_name_common (pathname, pred_ptr->args.str, 0);
+}
+
+bool
+pred_negate (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  return !apply_predicate (pathname, stat_buf, pred_ptr->pred_right);
+}
+
+bool
+pred_newer (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+
+  assert (COMP_GT == pred_ptr->args.reftime.kind);
+  return compare_ts (get_stat_mtime(stat_buf), pred_ptr->args.reftime.ts) > 0;
+}
+
+bool
+pred_newerXY (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  struct timespec ts;
+  bool collected = false;
+
+  assert (COMP_GT == pred_ptr->args.reftime.kind);
+
+  switch (pred_ptr->args.reftime.xval)
+    {
+    case XVAL_TIME:
+      assert (pred_ptr->args.reftime.xval != XVAL_TIME);
+      return false;
+
+    case XVAL_ATIME:
+      ts = get_stat_atime (stat_buf);
+      collected = true;
+      break;
+
+    case XVAL_BIRTHTIME:
+      ts = get_stat_birthtime (stat_buf);
+      collected = true;
+      if (ts.tv_nsec < 0);
+       {
+         /* XXX: Cannot determine birth time.  Warn once. */
+         error (0, 0, _("WARNING: cannot determine birth time of file %s"),
+                safely_quote_err_filename (0, pathname));
+         return false;
+       }
+      break;
+
+    case XVAL_CTIME:
+      ts = get_stat_ctime (stat_buf);
+      collected = true;
+      break;
+
+    case XVAL_MTIME:
+      ts = get_stat_mtime (stat_buf);
+      collected = true;
+      break;
+    }
+
+  assert (collected);
+  return compare_ts (ts, pred_ptr->args.reftime.ts) > 0;
+}
+
+bool
+pred_nogroup (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  (void) pred_ptr;
+
+#ifdef CACHE_IDS
+  extern char *gid_unused;
+
+  return gid_unused[(unsigned) stat_buf->st_gid];
+#else
+  return getgrgid (stat_buf->st_gid) == NULL;
+#endif
+}
+
+bool
+pred_nouser (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+#ifdef CACHE_IDS
+  extern char *uid_unused;
+#endif
+
+  (void) pathname;
+  (void) pred_ptr;
+
+#ifdef CACHE_IDS
+  return uid_unused[(unsigned) stat_buf->st_uid];
+#else
+  return getpwuid (stat_buf->st_uid) == NULL;
+#endif
+}
+
+
+static bool
+is_ok (const char *program, const char *arg)
+{
+  fflush (stdout);
+  /* The draft open standard requires that, in the POSIX locale,
+     the last non-blank character of this prompt be '?'.
+     The exact format is not specified.
+     This standard does not have requirements for locales other than POSIX
+  */
+  /* XXX: printing UNTRUSTED data here. */
+  fprintf (stderr, _("< %s ... %s > ? "), program, arg);
+  fflush (stderr);
+  return yesno ();
+}
+
+bool
+pred_ok (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  if (is_ok (pred_ptr->args.exec_vec.replace_vec[0], pathname))
+    return impl_pred_exec (pathname, stat_buf, pred_ptr);
+  else
+    return false;
+}
+
+bool
+pred_okdir (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  if (is_ok (pred_ptr->args.exec_vec.replace_vec[0], pathname))
+    return impl_pred_exec (state.rel_pathname, stat_buf, pred_ptr);
+  else
+    return false;
+}
+
+bool
+pred_openparen (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  (void) stat_buf;
+  (void) pred_ptr;
+  return true;
+}
+
+bool
+pred_or (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  if (pred_ptr->pred_left == NULL
+      || !apply_predicate (pathname, stat_buf, pred_ptr->pred_left))
+    {
+      return apply_predicate (pathname, stat_buf, pred_ptr->pred_right);
+    }
+  else
+    return true;
+}
+
+bool
+pred_path (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) stat_buf;
+  if (fnmatch (pred_ptr->args.str, pathname, 0) == 0)
+    return (true);
+  return (false);
+}
+
+bool
+pred_perm (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  mode_t mode = stat_buf->st_mode;
+  mode_t perm_val = pred_ptr->args.perm.val[S_ISDIR (mode) != 0];
+  (void) pathname;
+  switch (pred_ptr->args.perm.kind)
+    {
+    case PERM_AT_LEAST:
+      return (mode & perm_val) == perm_val;
+      break;
+
+    case PERM_ANY:
+      /* True if any of the bits set in the mask are also set in the file's mode.
+       *
+       *
+       * Otherwise, if onum is prefixed by a hyphen, the primary shall
+       * evaluate as true if at least all of the bits specified in
+       * onum that are also set in the octal mask 07777 are set.
+       *
+       * Eric Blake's interpretation is that the mode argument is zero,
+
+       */
+      if (0 == perm_val)
+       return true;            /* Savannah bug 14748; we used to return false */
+      else
+       return (mode & perm_val) != 0;
+      break;
+
+    case PERM_EXACT:
+      return (mode & MODE_ALL) == perm_val;
+      break;
+
+    default:
+      abort ();
+      break;
+    }
+}
+
+
+bool
+pred_executable (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  (void) stat_buf;
+  (void) pred_ptr;
+
+  /* As for access, the check is performed with the real user id. */
+  return 0 == faccessat (state.cwd_dir_fd, state.rel_pathname, X_OK, 0);
+}
+
+bool
+pred_readable (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  (void) stat_buf;
+  (void) pred_ptr;
+
+  /* As for access, the check is performed with the real user id. */
+  return 0 == faccessat (state.cwd_dir_fd, state.rel_pathname, R_OK, 0);
+}
+
+bool
+pred_writable (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  (void) stat_buf;
+  (void) pred_ptr;
+
+  /* As for access, the check is performed with the real user id. */
+  return 0 == faccessat (state.cwd_dir_fd, state.rel_pathname, W_OK, 0);
+}
+
+bool
+pred_print (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) stat_buf;
+  (void) pred_ptr;
+
+  print_quoted (pred_ptr->args.printf_vec.stream,
+               pred_ptr->args.printf_vec.quote_opts,
+               pred_ptr->args.printf_vec.dest_is_tty,
+               "%s\n", pathname);
+  return true;
+}
+
+bool
+pred_print0 (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  return pred_fprint0(pathname, stat_buf, pred_ptr);
+}
+
+bool
+pred_prune (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  (void) pred_ptr;
+
+  if (options.do_dir_first == true) { /* no effect with -depth */
+    assert (state.have_stat);
+    if (stat_buf != NULL &&
+       S_ISDIR(stat_buf->st_mode))
+      state.stop_at_current_level = true;
+  }
+
+  /* findutils used to return options.do_dir_first here, so that -prune
+   * returns true only if -depth is not in effect.   But POSIX requires
+   * that -prune always evaluate as true.
+   */
+  return true;
+}
+
+bool
+pred_quit (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  (void) stat_buf;
+  (void) pred_ptr;
+
+  /* Run any cleanups.  This includes executing any command lines
+   * we have partly built but not executed.
+   */
+  cleanup ();
+
+  /* Since -exec and friends don't leave child processes running in the
+   * background, there is no need to wait for them here.
+   */
+  exit (state.exit_status);    /* 0 for success, etc. */
+}
+
+bool
+pred_regex (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  int len = strlen (pathname);
+(void) stat_buf;
+  if (re_match (pred_ptr->args.regex, pathname, len, 0,
+               (struct re_registers *) NULL) == len)
+    return (true);
+  return (false);
+}
+
+bool
+pred_size (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  uintmax_t f_val;
+
+  (void) pathname;
+  f_val = ((stat_buf->st_size / pred_ptr->args.size.blocksize)
+          + (stat_buf->st_size % pred_ptr->args.size.blocksize != 0));
+  switch (pred_ptr->args.size.kind)
+    {
+    case COMP_GT:
+      if (f_val > pred_ptr->args.size.size)
+       return (true);
+      break;
+    case COMP_LT:
+      if (f_val < pred_ptr->args.size.size)
+       return (true);
+      break;
+    case COMP_EQ:
+      if (f_val == pred_ptr->args.size.size)
+       return (true);
+      break;
+    }
+  return (false);
+}
+
+bool
+pred_samefile (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  /* Potential optimisation: because of the loop protection, we always
+   * know the device of the current directory, hence the device number
+   * of the file we're currently considering.  If -L is not in effect,
+   * and the device number of the file we're looking for is not the
+   * same as the device number of the current directory, this
+   * predicate cannot return true.  Hence there would be no need to
+   * stat the file we're looking at.
+   *
+   * For the moment, we simply compare inode numbers, which should cut
+   * down greatly on the number of calls to stat.  Some of the
+   * remainder will be unnecessary, but the additional complexity
+   * probably isn't worthwhile.
+   */
+  (void) pathname;
+
+  /* We will often still have an fd open on the file under consideration,
+   * but that's just to ensure inode number stability by maintaining
+   * a reference to it; we don't need the file for anything else.
+   */
+  if (stat_buf->st_ino)
+    {
+      if (stat_buf->st_ino != pred_ptr->args.samefileid.ino)
+       return false;
+    }
+  /* Now stat the file to check the device number. */
+  if (0 == get_statinfo (pathname, state.rel_pathname, stat_buf))
+    {
+      /* the repeated test here is necessary in case stat_buf.st_ino had been zero. */
+      return stat_buf->st_ino == pred_ptr->args.samefileid.ino
+       && stat_buf->st_dev == pred_ptr->args.samefileid.dev;
+    }
+  else
+    {
+      /* get_statinfo will already have emitted an error message. */
+      return false;
+    }
+}
+
+bool
+pred_true (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  (void) stat_buf;
+  (void) pred_ptr;
+  return true;
+}
+
+bool
+pred_type (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  mode_t mode;
+  mode_t type = pred_ptr->args.type;
+
+  assert (state.have_type);
+
+  if (0 == state.type)
+    {
+      /* This can sometimes happen with broken NFS servers.
+       * See Savannah bug #16378.
+       */
+      return false;
+    }
+
+  (void) pathname;
+
+  if (state.have_stat)
+     mode = stat_buf->st_mode;
+  else
+     mode = state.type;
+
+#ifndef S_IFMT
+  /* POSIX system; check `mode' the slow way. */
+  if ((S_ISBLK (mode) && type == S_IFBLK)
+      || (S_ISCHR (mode) && type == S_IFCHR)
+      || (S_ISDIR (mode) && type == S_IFDIR)
+      || (S_ISREG (mode) && type == S_IFREG)
+#ifdef S_IFLNK
+      || (S_ISLNK (mode) && type == S_IFLNK)
+#endif
+#ifdef S_IFIFO
+      || (S_ISFIFO (mode) && type == S_IFIFO)
+#endif
+#ifdef S_IFSOCK
+      || (S_ISSOCK (mode) && type == S_IFSOCK)
+#endif
+#ifdef S_IFDOOR
+      || (S_ISDOOR (mode) && type == S_IFDOOR)
+#endif
+      )
+#else /* S_IFMT */
+  /* Unix system; check `mode' the fast way. */
+  if ((mode & S_IFMT) == type)
+#endif /* S_IFMT */
+    return (true);
+  else
+    return (false);
+}
+
+bool
+pred_uid (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  switch (pred_ptr->args.numinfo.kind)
+    {
+    case COMP_GT:
+      if (stat_buf->st_uid > pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    case COMP_LT:
+      if (stat_buf->st_uid < pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    case COMP_EQ:
+      if (stat_buf->st_uid == pred_ptr->args.numinfo.l_val)
+       return (true);
+      break;
+    }
+  return (false);
+}
+
+bool
+pred_used (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  struct timespec delta, at, ct;
+
+  (void) pathname;
+
+  /* TODO: this needs to be retested carefully (manually, if necessary) */
+  at = get_stat_atime (stat_buf);
+  ct = get_stat_ctime (stat_buf);
+  delta.tv_sec  = at.tv_sec  - ct.tv_sec;
+  delta.tv_nsec = at.tv_nsec - ct.tv_nsec;
+  if (delta.tv_nsec < 0)
+    {
+      delta.tv_nsec += 1000000000;
+      delta.tv_sec  -=          1;
+    }
+  return pred_timewindow (delta, pred_ptr, DAYSECS);
+}
+
+bool
+pred_user (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  (void) pathname;
+  if (pred_ptr->args.uid == stat_buf->st_uid)
+    return (true);
+  else
+    return (false);
+}
+
+bool
+pred_xtype (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+{
+  struct stat sbuf;            /* local copy, not stat_buf because we're using a different stat method */
+  int (*ystat) (const char*, struct stat *p);
+
+  /* If we would normally stat the link itself, stat the target instead.
+   * If we would normally follow the link, stat the link itself instead.
+   */
+  if (following_links ())
+    ystat = optionp_stat;
+  else
+    ystat = optionl_stat;
+
+  set_stat_placeholders (&sbuf);
+  if ((*ystat) (state.rel_pathname, &sbuf) != 0)
+    {
+      if (following_links () && errno == ENOENT)
+       {
+         /* If we failed to follow the symlink,
+          * fall back on looking at the symlink itself.
+          */
+         /* Mimic behavior of ls -lL. */
+         return (pred_type (pathname, stat_buf, pred_ptr));
+       }
+      else
+       {
+         error (0, errno, "%s", safely_quote_err_filename (0, pathname));
+         state.exit_status = 1;
+       }
+      return false;
+    }
+  /* Now that we have our stat() information, query it in the same
+   * way that -type does.
+   */
+  return (pred_type (pathname, &sbuf, pred_ptr));
+}
+
+
+bool
+pred_context (const char *pathname, struct stat *stat_buf,
+             struct predicate *pred_ptr)
+{
+  security_context_t scontext;
+  int rv = (*options.x_getfilecon) (state.cwd_dir_fd, state.rel_pathname,
+                                   &scontext);
+  if (rv < 0)
+    {
+      error (0, errno, _("getfilecon failed: %s"),
+            safely_quote_err_filename (0, pathname));
+      return false;
+    }
+
+  rv = (fnmatch (pred_ptr->args.scontext, scontext, 0) == 0);
+  freecon (scontext);
+  return rv;
+}
+
+
+/*  1) fork to get a child; parent remembers the child pid
+    2) child execs the command requested
+    3) parent waits for child; checks for proper pid of child
+
+    Possible returns:
+
+    ret                errno   status(h)   status(l)
+
+    pid                x       signal#     0177        stopped
+    pid                x       exit arg    0           term by _exit
+    pid                x       0           signal #    term by signal
+    -1         EINTR                           parent got signal
+    -1         other                           some other kind of error
+
+    Return true only if the pid matches, status(l) is
+    zero, and the exit arg (status high) is 0.
+    Otherwise return false, possibly printing an error message. */
+
+
+static bool
+prep_child_for_exec (bool close_stdin, const struct saved_cwd *wd)
+{
+  bool ok = true;
+  if (close_stdin)
+    {
+      const char inputfile[] = "/dev/null";
+
+      if (close (0) < 0)
+       {
+         error (0, errno, _("Cannot close standard input"));
+         ok = false;
+       }
+      else
+       {
+         if (open (inputfile, O_RDONLY
+#if defined O_LARGEFILE
+                  |O_LARGEFILE
+#endif
+                  ) < 0)
+           {
+             /* This is not entirely fatal, since
+              * executing the child with a closed
+              * stdin is almost as good as executing it
+              * with its stdin attached to /dev/null.
+              */
+             error (0, errno, "%s", safely_quote_err_filename (0, inputfile));
+             /* do not set ok=false, it is OK to continue anyway. */
+           }
+       }
+    }
+
+  /* Even if DebugSearch is set, don't announce our change of
+   * directory, since we're not going to emit a subsequent
+   * announcement of a call to stat() anyway, as we're about to exec
+   * something.
+   */
+  if (0 != restore_cwd (wd))
+    {
+      error (0, errno, _("Failed to change directory"));
+      ok = false;
+    }
+  return ok;
+}
+
+
+
+
+
+
+int
+launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv)
+{
+  pid_t child_pid;
+  static int first_time = 1;
+  struct exec_val *execp = usercontext;
+
+  /* Make sure output of command doesn't get mixed with find output. */
+  fflush (stdout);
+  fflush (stderr);
+
+  /* Make sure to listen for the kids.  */
+  if (first_time)
+    {
+      first_time = 0;
+      signal (SIGCHLD, SIG_DFL);
+    }
+
+  child_pid = fork ();
+  if (child_pid == -1)
+    error (EXIT_FAILURE, errno, _("cannot fork"));
+  if (child_pid == 0)
+    {
+      /* We are the child. */
+      assert (NULL != execp->wd_for_exec);
+      if (!prep_child_for_exec (execp->close_stdin, execp->wd_for_exec))
+       {
+         _exit (1);
+       }
+      else
+       {
+         if (fd_leak_check_is_enabled ())
+           {
+             complain_about_leaky_fds ();
+           }
+       }
+
+      if (bc_args_exceed_testing_limit (argv))
+       errno = E2BIG;
+      else
+       execvp (argv[0], argv);
+      /* TODO: use a pipe to pass back the errno value, like xargs does */
+      error (0, errno, "%s",
+            safely_quote_err_filename (0, argv[0]));
+      _exit (1);
+    }
+
+  while (waitpid (child_pid, &(execp->last_child_status), 0) == (pid_t) -1)
+    {
+      if (errno != EINTR)
+       {
+         error (0, errno, _("error waiting for %s"),
+                safely_quote_err_filename (0, argv[0]));
+         state.exit_status = 1;
+         return 0;             /* FAIL */
+       }
+    }
+
+  if (WIFSIGNALED (execp->last_child_status))
+    {
+      error (0, 0, _("%s terminated by signal %d"),
+            quotearg_n_style (0, options.err_quoting_style, argv[0]),
+            WTERMSIG (execp->last_child_status));
+
+      if (execp->multiple)
+       {
+         /* -exec   \; just returns false if the invoked command fails.
+          * -exec {} + returns true if the invoked command fails, but
+          *            sets the program exit status.
+          */
+         state.exit_status = 1;
+       }
+
+      return 1;                        /* OK */
+    }
+
+  if (0 == WEXITSTATUS (execp->last_child_status))
+    {
+      return 1;                        /* OK */
+    }
+  else
+    {
+      if (execp->multiple)
+       {
+         /* -exec   \; just returns false if the invoked command fails.
+          * -exec {} + returns true if the invoked command fails, but
+          *            sets the program exit status.
+          */
+         state.exit_status = 1;
+       }
+      /* The child failed, but this is the exec callback.  We
+       * don't want to run the child again in this case anwyay.
+       */
+      return 1;                        /* FAIL (but don't try again) */
+    }
+
+}
+
+
+static bool
+scan_for_digit_differences (const char *p, const char *q,
+                           size_t *first, size_t *n)
+{
+  bool seen = false;
+  size_t i;
+
+  for (i=0; p[i] && q[i]; i++)
+    {
+      if (p[i] != q[i])
+       {
+         if (!isdigit ((unsigned char)q[i]) || !isdigit ((unsigned char)q[i]))
+           return false;
+
+         if (!seen)
+           {
+             *first = i;
+             *n = 1;
+             seen = 1;
+           }
+         else
+           {
+             if (i-*first == *n)
+               {
+                 /* Still in the first sequence of differing digits. */
+                 ++*n;
+               }
+             else
+               {
+                 /* More than one differing contiguous character sequence. */
+                 return false;
+               }
+           }
+       }
+    }
+  if (p[i] || q[i])
+    {
+      /* strings are different lengths. */
+      return false;
+    }
+  return true;
+}
+
+
+static char*
+do_time_format (const char *fmt, const struct tm *p, const char *ns, size_t ns_size)
+{
+  static char *buf = NULL;
+  static size_t buf_size;
+  char *timefmt = NULL;
+  struct tm altered_time;
+
+
+  /* If the format expands to nothing (%p in some locales, for
+   * example), strftime can return 0.  We actually want to distinguish
+   * the error case where the buffer is too short, so we just prepend
+   * an otherwise uninteresting character to prevent the no-output
+   * case.
+   */
+  timefmt = xmalloc (strlen (fmt) + 2u);
+  sprintf (timefmt, "_%s", fmt);
+
+  /* altered_time is a similar time, but in which both
+   * digits of the seconds field are different.
+   */
+  altered_time = *p;
+  if (altered_time.tm_sec >= 11)
+    altered_time.tm_sec -= 11;
+  else
+    altered_time.tm_sec += 11;
+
+  /* If we call strftime() with buf_size=0, the program will coredump
+   * on Solaris, since it unconditionally writes the terminating null
+   * character.
+   */
+  buf_size = 1u;
+  buf = xmalloc (buf_size);
+  while (true)
+    {
+      /* I'm not sure that Solaris will return 0 when the buffer is too small.
+       * Therefore we do not check for (buf_used != 0) as the termination
+       * condition.
+       */
+      size_t buf_used = strftime (buf, buf_size, timefmt, p);
+      if (buf_used             /* Conforming POSIX system */
+         && (buf_used < buf_size)) /* Solaris workaround */
+       {
+         char *altbuf;
+         size_t i = 0, n = 0;
+         size_t final_len = (buf_used
+                             + 1u /* for \0 */
+                             + ns_size);
+         buf = xrealloc (buf, final_len);
+         altbuf = xmalloc (final_len);
+         strftime (altbuf, buf_size, timefmt, &altered_time);
+
+         /* Find the seconds digits; they should be the only changed part.
+          * In theory the result of the two formatting operations could differ in
+          * more than just one sequence of decimal digits (for example %X might
+          * in theory return a spelled-out time like "thirty seconds past noon").
+          * When that happens, we just avoid inserting the nanoseconds field.
+          */
+         if (scan_for_digit_differences (buf, altbuf, &i, &n)
+             && (2==n) && !isdigit ((unsigned char)buf[i+n]))
+           {
+             const size_t end_of_seconds = i + n;
+             const size_t suffix_len = buf_used-(end_of_seconds)+1;
+
+             /* Move the tail (including the \0).  Note that this
+              * is a move of an overlapping memory block, so we
+              * must use memmove instead of memcpy.  Then insert
+              * the nanoseconds (but not its trailing \0).
+              */
+             assert (end_of_seconds + ns_size + suffix_len == final_len);
+             memmove (buf+end_of_seconds+ns_size,
+                      buf+end_of_seconds,
+                      suffix_len);
+             memcpy (buf+i+n, ns, ns_size);
+           }
+         else
+           {
+             /* No seconds digits.  No need to insert anything. */
+           }
+         /* The first character of buf is the underscore, which we actually
+          * don't want.
+          */
+         free (timefmt);
+         return buf+1;
+       }
+      else
+       {
+         buf = x2nrealloc (buf, &buf_size, 2u);
+       }
+    }
+}
+
+
+
+/* Return a static string formatting the time WHEN according to the
+ * strftime format character KIND.
+ *
+ * This function contains a number of assertions.  These look like
+ * runtime checks of the results of computations, which would be a
+ * problem since external events should not be tested for with
+ * "assert" (instead you should use "if").  However, they are not
+ * really runtime checks.  The assertions actually exist to verify
+ * that the various buffers are correctly sized.
+ */
+static char *
+format_date (struct timespec ts, int kind)
+{
+  /* In theory, we use an extra 10 characters for 9 digits of
+   * nanoseconds and 1 for the decimal point.  However, the real
+   * world is more complex than that.
+   *
+   * For example, some systems return junk in the tv_nsec part of
+   * st_birthtime.  An example of this is the NetBSD-4.0-RELENG kernel
+   * (at Sat Mar 24 18:46:46 2007) running a NetBSD-3.1-RELEASE
+   * runtime and examining files on an msdos filesytem.  So for that
+   * reason we set NS_BUF_LEN to 32, which is simply "long enough" as
+   * opposed to "exactly the right size".  Note that the behaviour of
+   * NetBSD appears to be a result of the use of uninitialised data,
+   * as it's not 100% reproducible (more like 25%).
+   */
+  enum {
+    NS_BUF_LEN = 32,
+    DATE_LEN_PERCENT_APLUS=21  /* length of result of %A+ (it's longer than %c)*/
+  };
+  static char buf[128u+10u + MAX(DATE_LEN_PERCENT_APLUS,
+                           MAX (LONGEST_HUMAN_READABLE + 2, NS_BUF_LEN+64+200))];
+  char ns_buf[NS_BUF_LEN]; /* -.9999999990 (- sign can happen!)*/
+  int  charsprinted, need_ns_suffix;
+  struct tm *tm;
+  char fmt[6];
+
+  /* human_readable() assumes we pass a buffer which is at least as
+   * long as LONGEST_HUMAN_READABLE.  We use an assertion here to
+   * ensure that no nasty unsigned overflow happend in our calculation
+   * of the size of buf.  Do the assertion here rather than in the
+   * code for %@ so that we find the problem quickly if it exists.  If
+   * you want to submit a patch to move this into the if statement, go
+   * ahead, I'll apply it.  But include performance timings
+   * demonstrating that the performance difference is actually
+   * measurable.
+   */
+  verify (sizeof (buf) >= LONGEST_HUMAN_READABLE);
+
+  charsprinted = 0;
+  need_ns_suffix = 0;
+
+  /* Format the main part of the time. */
+  if (kind == '+')
+    {
+      strcpy (fmt, "%F+%T");
+      need_ns_suffix = 1;
+    }
+  else
+    {
+      fmt[0] = '%';
+      fmt[1] = kind;
+      fmt[2] = '\0';
+
+      /* %a, %c, and %t are handled in ctime_format() */
+      switch (kind)
+       {
+       case 'S':
+       case 'T':
+       case 'X':
+       case '@':
+         need_ns_suffix = 1;
+         break;
+       default:
+         need_ns_suffix = 0;
+         break;
+       }
+    }
+
+  if (need_ns_suffix)
+    {
+      /* Format the nanoseconds part.  Leave a trailing zero to
+       * discourage people from writing scripts which extract the
+       * fractional part of the timestamp by using column offsets.
+       * The reason for discouraging this is that in the future, the
+       * granularity may not be nanoseconds.
+       */
+      charsprinted = snprintf (ns_buf, NS_BUF_LEN, ".%09ld0", (long int)ts.tv_nsec);
+      assert (charsprinted < NS_BUF_LEN);
+    }
+  else
+    {
+      charsprinted = 0;
+      ns_buf[0] = 0;
+    }
+
+  if (kind != '@')
+    {
+      tm = localtime (&ts.tv_sec);
+      if (tm)
+       {
+         char *s = do_time_format (fmt, tm, ns_buf, charsprinted);
+         if (s)
+           return s;
+       }
+    }
+
+  /* If we get to here, either the format was %@, or we have fallen back to it
+   * because strftime failed.
+   */
+  if (1)
+    {
+      uintmax_t w = ts.tv_sec;
+      size_t used, len, remaining;
+
+      /* XXX: note that we are negating an unsigned type which is the
+       * widest possible unsigned type.
+       */
+      char *p = human_readable (ts.tv_sec < 0 ? -w : w, buf + 1,
+                               human_ceiling, 1, 1);
+      assert (p > buf);
+      assert (p < (buf + (sizeof buf)));
+      if (ts.tv_sec < 0)
+       *--p = '-'; /* XXX: Ugh, relying on internal details of human_readable(). */
+
+      /* Add the nanoseconds part.  Because we cannot enforce a
+       * particlar implementation of human_readable, we cannot assume
+       * any particular value for (p-buf).  So we need to be careful
+       * that there is enough space remaining in the buffer.
+       */
+      if (need_ns_suffix)
+       {
+         len = strlen (p);
+         used = (p-buf) + len; /* Offset into buf of current end */
+         assert (sizeof buf > used); /* Ensure we can perform subtraction safely. */
+         remaining = sizeof buf - used - 1u; /* allow space for NUL */
+
+         if (strlen (ns_buf) >= remaining)
+           {
+             error (0, 0,
+                    "charsprinted=%ld but remaining=%lu: ns_buf=%s",
+                    (long)charsprinted, (unsigned long)remaining, ns_buf);
+           }
+         assert (strlen (ns_buf) < remaining);
+         strcat (p, ns_buf);
+       }
+      return p;
+    }
+}
+
+static const char *weekdays[] =
+  {
+    "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+  };
+static char * months[] =
+  {
+    "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+  };
+
+
+static char *
+ctime_format (struct timespec ts)
+{
+  const struct tm * ptm;
+#define TIME_BUF_LEN 1024u
+  static char resultbuf[TIME_BUF_LEN];
+  int nout;
+
+  ptm = localtime (&ts.tv_sec);
+  if (ptm)
+    {
+      assert (ptm->tm_wday >=  0);
+      assert (ptm->tm_wday <   7);
+      assert (ptm->tm_mon  >=  0);
+      assert (ptm->tm_mon  <  12);
+      assert (ptm->tm_hour >=  0);
+      assert (ptm->tm_hour <  24);
+      assert (ptm->tm_min  <  60);
+      assert (ptm->tm_sec  <= 61); /* allows 2 leap seconds. */
+
+      /* wkday mon mday hh:mm:ss.nnnnnnnnn yyyy */
+      nout = snprintf (resultbuf, TIME_BUF_LEN,
+                      "%3s %3s %2d %02d:%02d:%02d.%010ld %04d",
+                      weekdays[ptm->tm_wday],
+                      months[ptm->tm_mon],
+                      ptm->tm_mday,
+                      ptm->tm_hour,
+                      ptm->tm_min,
+                      ptm->tm_sec,
+                      (long int)ts.tv_nsec,
+                      1900 + ptm->tm_year);
+
+      assert (nout < TIME_BUF_LEN);
+      return resultbuf;
+    }
+  else
+    {
+      /* The time cannot be represented as a struct tm.
+        Output it as an integer.  */
+      return format_date (ts, '@');
+    }
+}
+
+/* Copy STR into BUF and trim blanks from the end of BUF.
+   Return BUF. */
+
+static char *
+blank_rtrim (str, buf)
+     char *str;
+     char *buf;
+{
+  int i;
+
+  if (str == NULL)
+    return (NULL);
+  strcpy (buf, str);
+  i = strlen (buf) - 1;
+  while ((i >= 0) && ((buf[i] == ' ') || buf[i] == '\t'))
+    i--;
+  buf[++i] = '\0';
+  return (buf);
+}
+
+/* Print out the predicate list starting at NODE. */
+void
+print_list (FILE *fp, struct predicate *node)
+{
+  struct predicate *cur;
+  char name[256];
+
+  cur = node;
+  while (cur != NULL)
+    {
+      fprintf (fp, "[%s] ", blank_rtrim (cur->p_name, name));
+      cur = cur->pred_next;
+    }
+  fprintf (fp, "\n");
+}
+
+/* Print out the predicate list starting at NODE. */
+static void
+print_parenthesised (FILE *fp, struct predicate *node)
+{
+  int parens = 0;
+
+  if (node)
+    {
+      if ((pred_is (node, pred_or) || pred_is (node, pred_and))
+         && node->pred_left == NULL)
+       {
+         /* We print "<nothing> or  X" as just "X"
+          * We print "<nothing> and X" as just "X"
+          */
+         print_parenthesised(fp, node->pred_right);
+       }
+      else
+       {
+         if (node->pred_left || node->pred_right)
+           parens = 1;
+
+         if (parens)
+           fprintf (fp, "%s", " ( ");
+         print_optlist (fp, node);
+         if (parens)
+           fprintf (fp, "%s", " ) ");
+       }
+    }
+}
+
+void
+print_optlist (FILE *fp, const struct predicate *p)
+{
+  if (p)
+    {
+      print_parenthesised (fp, p->pred_left);
+      fprintf (fp,
+              "%s%s%s",
+              p->need_stat ? "[call stat] " : "",
+              p->need_type ? "[need type] " : "",
+              p->need_inum ? "[need inum] " : "");
+      print_predicate (fp, p);
+      fprintf (fp, " [%g] ", p->est_success_rate);
+      if (options.debug_options & DebugSuccessRates)
+       {
+         fprintf (fp, "[%ld/%ld", p->perf.successes, p->perf.visits);
+         if (p->perf.visits)
+           {
+             double real_rate = (double)p->perf.successes / (double)p->perf.visits;
+             fprintf (fp, "=%g] ", real_rate);
+           }
+         else
+           {
+             fprintf (fp, "=_] ");
+           }
+       }
+      print_parenthesised (fp, p->pred_right);
+    }
+}
+
+void show_success_rates (const struct predicate *p)
+{
+  if (options.debug_options & DebugSuccessRates)
+    {
+      fprintf (stderr, "Predicate success rates after completion:\n");
+      print_optlist (stderr, p);
+      fprintf (stderr, "\n");
+    }
+}
+
+
+
+
+#ifdef _NDEBUG
+/* If _NDEBUG is defined, the assertions will do nothing.   Hence
+ * there is no point in having a function body for pred_sanity_check()
+ * if that preprocessor macro is defined.
+ */
+void
+pred_sanity_check (const struct predicate *predicates)
+{
+  /* Do nothing, since assert is a no-op with _NDEBUG set */
+  return;
+}
+#else
+void
+pred_sanity_check (const struct predicate *predicates)
+{
+  const struct predicate *p;
+
+  for (p=predicates; p != NULL; p=p->pred_next)
+    {
+      /* All predicates must do something. */
+      assert (p->pred_func != NULL);
+
+      /* All predicates must have a parser table entry. */
+      assert (p->parser_entry != NULL);
+
+      /* If the parser table tells us that just one predicate function is
+       * possible, verify that that is still the one that is in effect.
+       * If the parser has NULL for the predicate function, that means that
+       * the parse_xxx function fills it in, so we can't check it.
+       */
+      if (p->parser_entry->pred_func)
+       {
+         assert (p->parser_entry->pred_func == p->pred_func);
+       }
+
+      switch (p->parser_entry->type)
+       {
+         /* Options all take effect during parsing, so there should
+          * be no predicate entries corresponding to them.  Hence we
+          * should not see any ARG_OPTION or ARG_POSITIONAL_OPTION
+          * items.
+          *
+          * This is a silly way of coding this test, but it prevents
+          * a compiler warning (i.e. otherwise it would think that
+          * there would be case statements missing).
+          */
+       case ARG_OPTION:
+       case ARG_POSITIONAL_OPTION:
+         assert (p->parser_entry->type != ARG_OPTION);
+         assert (p->parser_entry->type != ARG_POSITIONAL_OPTION);
+         break;
+
+       case ARG_ACTION:
+         assert (p->side_effects); /* actions have side effects. */
+         if (!pred_is (p, pred_prune) && !pred_is(p, pred_quit))
+           {
+             /* actions other than -prune and -quit should
+              * inhibit the default -print
+              */
+             assert (p->no_default_print);
+           }
+         break;
+
+       /* We happen to know that the only user of ARG_SPECIAL_PARSE
+        * is a test, so handle it like ARG_TEST.
+        */
+       case ARG_SPECIAL_PARSE:
+       case ARG_TEST:
+       case ARG_PUNCTUATION:
+       case ARG_NOOP:
+         /* Punctuation and tests should have no side
+          * effects and not inhibit default print.
+          */
+         assert (!p->no_default_print);
+         assert (!p->side_effects);
+         break;
+       }
+    }
+}
+#endif
diff --git a/find/sharefile.c b/find/sharefile.c
new file mode 100644 (file)
index 0000000..1442d7b
--- /dev/null
@@ -0,0 +1,199 @@
+/* sharefile.c -- open files just once.
+   Copyright (C) 2008, 2009, 2010 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/>.
+*/
+
+
+#include <config.h>
+
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "stdio-safer.h"
+#include "hash.h"
+#include "sharefile.h"
+#include "cloexec.h"
+#include "defs.h"
+
+
+enum
+  {
+    DefaultHashTableSize = 11
+  };
+
+struct sharefile
+{
+  char *mode;
+  Hash_table *table;
+};
+
+
+/*
+ * We cannot use the name to determine that two strings represent the
+ * same file, since that test would be fooled by symbolic links.
+ * Instead we use the device and inode number.
+ *
+ * However, we remember the name of each file that we opened.  This
+ * allows us to issue a fatal error message when (flushing and)
+ * closing a file fails.
+ */
+struct SharefileEntry
+{
+  dev_t device;
+  ino_t inode;
+  char *name; /* not the only name for this file; error messages only */
+  FILE *fp;
+};
+
+
+static bool
+entry_comparator (const void *av, const void *bv)
+{
+  const struct SharefileEntry *a=av, *b=bv;
+  return (a->inode == b->inode) && (a->device == b->device);
+}
+
+static void
+entry_free (void *pv)
+{
+  struct SharefileEntry *p = pv;
+  if (p->fp)
+    {
+      if (0 != fclose (p->fp))
+       fatal_nontarget_file_error (errno, p->name);
+    }
+  free (p->name);
+  free (p);
+}
+
+static size_t
+entry_hashfunc (const void *pv, size_t buckets)
+{
+  const struct SharefileEntry *p = pv;
+  return (p->device ^ p->inode) % buckets;
+}
+
+
+
+sharefile_handle
+sharefile_init (const char *mode)
+{
+  struct Hash_tuning;
+
+  struct sharefile *p = malloc (sizeof (struct sharefile));
+  if (p)
+    {
+      p->mode = strdup (mode);
+      if (p->mode)
+       {
+         p->table = hash_initialize (DefaultHashTableSize, NULL,
+                                     entry_hashfunc,
+                                     entry_comparator,
+                                     entry_free);
+         if (p->table)
+           {
+             return p;
+           }
+         else
+           {
+             free (p->mode);
+             free (p);
+           }
+       }
+      else
+       {
+         free (p);
+       }
+    }
+  return NULL;
+}
+
+void
+sharefile_destroy (sharefile_handle pv)
+{
+  struct sharefile *p = pv;
+  free (p->mode);
+  hash_free (p->table);
+}
+
+
+FILE *
+sharefile_fopen (sharefile_handle h, const char *filename)
+{
+  struct sharefile *p = h;
+  struct SharefileEntry *new_entry;
+
+  new_entry = malloc (sizeof (struct SharefileEntry));
+  if (!new_entry)
+    return NULL;
+
+  new_entry->name = strdup (filename);
+  if (NULL == new_entry->name)
+    {
+      free (new_entry);
+      return NULL;
+    }
+
+  if (NULL == (new_entry->fp = fopen_safer (filename, p->mode)))
+    {
+      free (new_entry);
+      return NULL;
+    }
+  else
+    {
+      struct stat st;
+      const int fd = fileno (new_entry->fp);
+      assert (fd >= 0);
+
+      set_cloexec_flag (fd, true);
+      if (fstat (fd, &st) < 0)
+        {
+         entry_free (new_entry);
+          return NULL;
+        }
+      else
+        {
+         void *existing;
+
+          new_entry->device = st.st_dev;
+          new_entry->inode = st.st_ino;
+
+          existing = hash_lookup (p->table, new_entry);
+          if (existing)            /* We have previously opened that file. */
+           {
+             entry_free (new_entry); /* don't need new_entry. */
+             return ((const struct SharefileEntry*)existing)->fp;
+           }
+          else /* We didn't open it already */
+           {
+             if (hash_insert (p->table, new_entry))
+               {
+                 return new_entry->fp;
+               }
+             else                      /* failed to insert in hashtable. */
+               {
+                 const int save_errno = errno;
+                 entry_free (new_entry);
+                 errno = save_errno;
+                 return NULL;
+               }
+           }
+        }
+    }
+}
diff --git a/find/sharefile.h b/find/sharefile.h
new file mode 100644 (file)
index 0000000..c6ef37d
--- /dev/null
@@ -0,0 +1,31 @@
+/* sharefile.h -- open files just once.
+   Copyright (C) 2008, 2009, 2010 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_SHAREFILE_H
+#define INC_SHAREFILE_H 1
+
+#include <stdlib.h>
+#include <stdio.h>
+
+typedef void * sharefile_handle;
+
+sharefile_handle sharefile_init(const char *mode);
+FILE *sharefile_fopen(sharefile_handle, const char *filename);
+void sharefile_destroy(sharefile_handle);
+
+#endif
diff --git a/find/testsuite/Makefile.am b/find/testsuite/Makefile.am
new file mode 100644 (file)
index 0000000..f8e86ad
--- /dev/null
@@ -0,0 +1,257 @@
+AUTOMAKE_OPTIONS=dejagnu
+FIND = ../find
+FINDFLAGS =
+
+DEJATOOL = find
+
+EXTRA_DIST_XO = \
+find.gnu/access.xo \
+find.gnu/comma.xo \
+find.gnu/delete.xo \
+find.gnu/deletedir.xo \
+find.gnu/deletefile.xo \
+find.gnu/depth.xo \
+find.gnu/depth-d.xo \
+find.gnu/empty.xo \
+find.gnu/execdir-hier.xo   \
+find.gnu/execdir-multiple.xo \
+find.gnu/execdir-one.xo   \
+find.gnu/execdir-root-only.xo   \
+find.gnu/exec-many-rtn-failure.xo   \
+find.gnu/exec-many-rtn-success.xo   \
+find.gnu/exec-one-rtn-fail.xo       \
+find.gnu/exec-one-rtn-success.xo \
+find.gnu/false.xo \
+find.gnu/follow-arg-parent-symlink.xo \
+find.gnu/follow-basic.xo \
+find.gnu/fprint0_stdout.xo \
+find.gnu/gnuand.xo \
+find.gnu/gnunot.xo \
+find.gnu/gnu-or.xo \
+find.gnu/ilname.xo \
+find.gnu/iname.xo \
+find.gnu/inum.xo \
+find.gnu/ipath.xo \
+find.gnu/iregex1.xo \
+find.gnu/iwholename.xo \
+find.gnu/lname.xo \
+find.gnu/mindepth-arg.xo \
+find.gnu/name-opt.xo \
+find.gnu/name-period.xo \
+find.gnu/name-slash.xo \
+find.gnu/no-fdleak-test.xo \
+find.gnu/path.xo \
+find.gnu/print_stdout.xo \
+find.gnu/perm.xo \
+find.gnu/perm000.xo \
+find.gnu/perm-slash.xo \
+find.gnu/posix-dflt.xo \
+find.gnu/posix-h.xo \
+find.gnu/posix-l.xo \
+find.gnu/printfHdfl.xo \
+find.gnu/printf-nonlocal-symlink.xo \
+find.gnu/printf-slash.xo \
+find.gnu/printf-symlink.xo \
+find.gnu/printf-h.xo \
+find.gnu/printf.xo \
+find.gnu/print0.xo \
+find.gnu/prune-default-print.xo  \
+find.gnu/regex1.xo \
+find.gnu/regex2.xo \
+find.gnu/samefile-copy.xo \
+find.gnu/samefile-link.xo \
+find.gnu/samefile-p-brokenlink.xo \
+find.gnu/samefile-same.xo \
+find.gnu/samefile-symlink.xo \
+find.gnu/sv-bug-17782.xo \
+find.gnu/sv-bug-18222.xo \
+find.gnu/sv-bug-27563-execdir.xo \
+find.gnu/true.xo \
+find.gnu/wholename.xo \
+find.gnu/xtype-symlink.xo \
+find.gnu/quit.xo \
+find.gnu/xtype.xo \
+find.posix/and.xo \
+find.posix/depth1.xo \
+find.posix/exec-nogaps.xo \
+find.posix/exec-one.xo \
+find.posix/files-not-expressions1.xo \
+find.posix/files-not-expressions2.xo \
+find.posix/files-not-expressions3.xo \
+find.posix/grouping.xo \
+find.posix/links.xo \
+find.posix/sv-bug-11175.xo \
+find.posix/sv-bug-12181.xo \
+find.posix/sv-bug-25359.xo \
+find.posix/sv-bug-27563-exec.xo \
+find.posix/depth1.xo \
+find.posix/mtime0.xo \
+find.posix/sizes.xo \
+find.posix/name.xo \
+find.posix/nameslash.xo \
+find.posix/parent.xo \
+find.posix/perm-X.xo \
+find.posix/perm-vanilla.xo \
+find.posix/posixnot.xo \
+find.posix/prune.xo \
+find.posix/prune-result.xo \
+find.posix/prune-stat.xo \
+find.posix/sizes.xo \
+find.posix/sizetype.xo \
+find.posix/sv-bug-11175.xo \
+find.posix/sv-bug-12181.xo \
+find.posix/sv-bug-15235.xo \
+find.posix/sv-bug-19613.xo \
+find.posix/typesize.xo \
+find.posix/posixnot.xo \
+find.posix/grouping.xo \
+find.posix/and.xo \
+find.posix/exec-one.xo \
+find.gnu/follow-arg-parent-symlink.xo
+
+EXTRA_DIST_EXP = \
+config/unix.exp \
+find.gnu/access.exp \
+find.gnu/comma.exp \
+find.gnu/delete.exp \
+find.gnu/deletedir.exp \
+find.gnu/deletefile.exp \
+find.gnu/depth.exp \
+find.gnu/depth-d.exp \
+find.gnu/empty.exp \
+find.gnu/execdir-hier.exp \
+find.gnu/execdir-in-unreadable.exp \
+find.gnu/execdir-multiple.exp \
+find.gnu/execdir-one.exp \
+find.gnu/execdir-pwd.exp \
+find.gnu/execdir-pwd1.exp \
+find.gnu/execdir-root-only.exp \
+find.gnu/exec-many-rtn-failure.exp  \
+find.gnu/exec-many-rtn-success.exp  \
+find.gnu/exec-one-rtn-fail.exp      \
+find.gnu/exec-one-rtn-success.exp   \
+find.gnu/false.exp \
+find.gnu/follow-arg-parent-symlink.exp \
+find.gnu/follow-basic.exp \
+find.gnu/fprint0_stdout.exp \
+find.gnu/fprintf-samefile.exp \
+find.gnu/fprint-unwritable.exp \
+find.gnu/gnuand.exp \
+find.gnu/gnunot.exp \
+find.gnu/gnu-or.exp \
+find.gnu/ilname.exp \
+find.gnu/iname.exp \
+find.gnu/inum.exp \
+find.gnu/ipath.exp \
+find.gnu/iregex1.exp \
+find.gnu/iwholename.exp \
+find.gnu/lname.exp \
+find.gnu/mindepth-arg.exp \
+find.gnu/mindepth-badarg.exp \
+find.gnu/name-opt.exp \
+find.gnu/name-period.exp \
+find.gnu/name-slash.exp \
+find.gnu/no-fdleak-test.exp \
+find.posix/parent.exp \
+find.gnu/path.exp \
+find.gnu/print_stdout.exp \
+find.gnu/print0.exp \
+find.gnu/perm.exp \
+find.gnu/perm000.exp \
+find.gnu/perm-slash.exp \
+find.gnu/posix-dflt.exp \
+find.gnu/posix-h.exp \
+find.gnu/posix-l.exp \
+find.gnu/posix-perminvalid.exp \
+find.gnu/printfHdfl.exp \
+find.gnu/printf.exp \
+find.gnu/printf.exp \
+find.gnu/printf-nonlocal-symlink.exp \
+find.gnu/printf-slash.exp \
+find.gnu/printf-symlink.exp \
+find.gnu/printf-h.exp \
+find.gnu/prune-default-print.exp \
+find.gnu/regex1.exp \
+find.gnu/regex2.exp \
+find.gnu/samefile-copy.exp \
+find.gnu/samefile-link.exp \
+find.gnu/samefile-missing.exp \
+find.gnu/samefile-p-brokenlink.exp \
+find.gnu/samefile-same.exp \
+find.gnu/samefile-symlink.exp \
+find.gnu/true.exp \
+find.gnu/wholename.exp \
+find.gnu/xtype-symlink.exp \
+find.gnu/sv-bug-12230.exp \
+find.gnu/sv-bug-17477.exp \
+find.gnu/sv-bug-17490.exp \
+find.gnu/sv-bug-17782.exp \
+find.gnu/sv-bug-18222.exp \
+find.gnu/sv-bug-24169.exp \
+find.gnu/sv-bug-27563-execdir.exp \
+find.gnu/quit.exp \
+find.gnu/used-invarg.exp \
+find.gnu/used-missing.exp \
+find.gnu/user-invalid.exp \
+find.gnu/xtype.exp \
+find.posix/and.exp \
+find.posix/bracket-depth.exp \
+find.posix/depth1.exp \
+find.posix/empty-parens.exp \
+find.posix/exec-nogaps.exp \
+find.posix/exec-one.exp \
+find.posix/files-not-expressions1.exp \
+find.posix/files-not-expressions2.exp \
+find.posix/files-not-expressions3.exp \
+find.posix/grouping.exp \
+find.posix/group-empty.exp \
+find.posix/group-missing.exp \
+find.posix/links.exp \
+find.posix/mtime0.exp \
+find.posix/sv-bug-11175.exp \
+find.posix/sv-bug-12181.exp \
+find.posix/sv-bug-25359.exp \
+find.posix/sv-bug-27563-exec.exp \
+find.posix/sv-bug-30777.exp \
+find.posix/depth1.exp \
+find.posix/sizes.exp \
+find.posix/name.exp \
+find.posix/nameslash.exp \
+find.posix/name-missing.exp \
+find.posix/perm-X.exp \
+find.posix/perm-vanilla.exp \
+find.posix/posixnot.exp \
+find.posix/prune.exp \
+find.posix/prune-result.exp \
+find.posix/prune-stat.exp \
+find.posix/size-invalid.exp \
+find.posix/size-missing.exp \
+find.posix/sizes.exp \
+find.posix/sizetype.exp \
+find.posix/typearg.exp \
+find.posix/sv-bug-11175.exp \
+find.posix/sv-bug-12181.exp \
+find.posix/sv-bug-15235.exp \
+find.posix/sv-bug-19605.exp \
+find.posix/sv-bug-19613.exp \
+find.posix/sv-bug-19617.exp \
+find.posix/typesize.exp \
+find.posix/grouping.exp \
+find.posix/and.exp \
+find.posix/exec-one.exp \
+find.posix/user-empty.exp \
+find.posix/user-missing.exp
+
+EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO)
+
+CLEANFILES = *.log *.sum site.exp site.bak
+
+#DIST_SUBDIRS = config
+
+
+checklists:
+       cd $(srcdir) && \
+       ( find config find.gnu find.posix \( -name "*.exp" -o -name "*.xo" \) -print ; \
+         ls $(EXTRA_DIST_XO)  ; \
+         ls  $(EXTRA_DIST_EXP)  ; ) | \
+       sort | uniq -c | awk '$$1 != 2 { print; }'
diff --git a/find/testsuite/Makefile.in b/find/testsuite/Makefile.in
new file mode 100644 (file)
index 0000000..86f4bb4
--- /dev/null
@@ -0,0 +1,1631 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+subdir = find/testsuite
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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 =
+SOURCES =
+DIST_SOURCES =
+RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+EXPECT = expect
+RUNTEST = runtest
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = @INCLUDES@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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 = dejagnu
+FIND = ../find
+FINDFLAGS = 
+DEJATOOL = find
+EXTRA_DIST_XO = \
+find.gnu/access.xo \
+find.gnu/comma.xo \
+find.gnu/delete.xo \
+find.gnu/deletedir.xo \
+find.gnu/deletefile.xo \
+find.gnu/depth.xo \
+find.gnu/depth-d.xo \
+find.gnu/empty.xo \
+find.gnu/execdir-hier.xo   \
+find.gnu/execdir-multiple.xo \
+find.gnu/execdir-one.xo   \
+find.gnu/execdir-root-only.xo   \
+find.gnu/exec-many-rtn-failure.xo   \
+find.gnu/exec-many-rtn-success.xo   \
+find.gnu/exec-one-rtn-fail.xo       \
+find.gnu/exec-one-rtn-success.xo \
+find.gnu/false.xo \
+find.gnu/follow-arg-parent-symlink.xo \
+find.gnu/follow-basic.xo \
+find.gnu/fprint0_stdout.xo \
+find.gnu/gnuand.xo \
+find.gnu/gnunot.xo \
+find.gnu/gnu-or.xo \
+find.gnu/ilname.xo \
+find.gnu/iname.xo \
+find.gnu/inum.xo \
+find.gnu/ipath.xo \
+find.gnu/iregex1.xo \
+find.gnu/iwholename.xo \
+find.gnu/lname.xo \
+find.gnu/mindepth-arg.xo \
+find.gnu/name-opt.xo \
+find.gnu/name-period.xo \
+find.gnu/name-slash.xo \
+find.gnu/no-fdleak-test.xo \
+find.gnu/path.xo \
+find.gnu/print_stdout.xo \
+find.gnu/perm.xo \
+find.gnu/perm000.xo \
+find.gnu/perm-slash.xo \
+find.gnu/posix-dflt.xo \
+find.gnu/posix-h.xo \
+find.gnu/posix-l.xo \
+find.gnu/printfHdfl.xo \
+find.gnu/printf-nonlocal-symlink.xo \
+find.gnu/printf-slash.xo \
+find.gnu/printf-symlink.xo \
+find.gnu/printf-h.xo \
+find.gnu/printf.xo \
+find.gnu/print0.xo \
+find.gnu/prune-default-print.xo  \
+find.gnu/regex1.xo \
+find.gnu/regex2.xo \
+find.gnu/samefile-copy.xo \
+find.gnu/samefile-link.xo \
+find.gnu/samefile-p-brokenlink.xo \
+find.gnu/samefile-same.xo \
+find.gnu/samefile-symlink.xo \
+find.gnu/sv-bug-17782.xo \
+find.gnu/sv-bug-18222.xo \
+find.gnu/sv-bug-27563-execdir.xo \
+find.gnu/true.xo \
+find.gnu/wholename.xo \
+find.gnu/xtype-symlink.xo \
+find.gnu/quit.xo \
+find.gnu/xtype.xo \
+find.posix/and.xo \
+find.posix/depth1.xo \
+find.posix/exec-nogaps.xo \
+find.posix/exec-one.xo \
+find.posix/files-not-expressions1.xo \
+find.posix/files-not-expressions2.xo \
+find.posix/files-not-expressions3.xo \
+find.posix/grouping.xo \
+find.posix/links.xo \
+find.posix/sv-bug-11175.xo \
+find.posix/sv-bug-12181.xo \
+find.posix/sv-bug-25359.xo \
+find.posix/sv-bug-27563-exec.xo \
+find.posix/depth1.xo \
+find.posix/mtime0.xo \
+find.posix/sizes.xo \
+find.posix/name.xo \
+find.posix/nameslash.xo \
+find.posix/parent.xo \
+find.posix/perm-X.xo \
+find.posix/perm-vanilla.xo \
+find.posix/posixnot.xo \
+find.posix/prune.xo \
+find.posix/prune-result.xo \
+find.posix/prune-stat.xo \
+find.posix/sizes.xo \
+find.posix/sizetype.xo \
+find.posix/sv-bug-11175.xo \
+find.posix/sv-bug-12181.xo \
+find.posix/sv-bug-15235.xo \
+find.posix/sv-bug-19613.xo \
+find.posix/typesize.xo \
+find.posix/posixnot.xo \
+find.posix/grouping.xo \
+find.posix/and.xo \
+find.posix/exec-one.xo \
+find.gnu/follow-arg-parent-symlink.xo
+
+EXTRA_DIST_EXP = \
+config/unix.exp \
+find.gnu/access.exp \
+find.gnu/comma.exp \
+find.gnu/delete.exp \
+find.gnu/deletedir.exp \
+find.gnu/deletefile.exp \
+find.gnu/depth.exp \
+find.gnu/depth-d.exp \
+find.gnu/empty.exp \
+find.gnu/execdir-hier.exp \
+find.gnu/execdir-in-unreadable.exp \
+find.gnu/execdir-multiple.exp \
+find.gnu/execdir-one.exp \
+find.gnu/execdir-pwd.exp \
+find.gnu/execdir-pwd1.exp \
+find.gnu/execdir-root-only.exp \
+find.gnu/exec-many-rtn-failure.exp  \
+find.gnu/exec-many-rtn-success.exp  \
+find.gnu/exec-one-rtn-fail.exp      \
+find.gnu/exec-one-rtn-success.exp   \
+find.gnu/false.exp \
+find.gnu/follow-arg-parent-symlink.exp \
+find.gnu/follow-basic.exp \
+find.gnu/fprint0_stdout.exp \
+find.gnu/fprintf-samefile.exp \
+find.gnu/fprint-unwritable.exp \
+find.gnu/gnuand.exp \
+find.gnu/gnunot.exp \
+find.gnu/gnu-or.exp \
+find.gnu/ilname.exp \
+find.gnu/iname.exp \
+find.gnu/inum.exp \
+find.gnu/ipath.exp \
+find.gnu/iregex1.exp \
+find.gnu/iwholename.exp \
+find.gnu/lname.exp \
+find.gnu/mindepth-arg.exp \
+find.gnu/mindepth-badarg.exp \
+find.gnu/name-opt.exp \
+find.gnu/name-period.exp \
+find.gnu/name-slash.exp \
+find.gnu/no-fdleak-test.exp \
+find.posix/parent.exp \
+find.gnu/path.exp \
+find.gnu/print_stdout.exp \
+find.gnu/print0.exp \
+find.gnu/perm.exp \
+find.gnu/perm000.exp \
+find.gnu/perm-slash.exp \
+find.gnu/posix-dflt.exp \
+find.gnu/posix-h.exp \
+find.gnu/posix-l.exp \
+find.gnu/posix-perminvalid.exp \
+find.gnu/printfHdfl.exp \
+find.gnu/printf.exp \
+find.gnu/printf.exp \
+find.gnu/printf-nonlocal-symlink.exp \
+find.gnu/printf-slash.exp \
+find.gnu/printf-symlink.exp \
+find.gnu/printf-h.exp \
+find.gnu/prune-default-print.exp \
+find.gnu/regex1.exp \
+find.gnu/regex2.exp \
+find.gnu/samefile-copy.exp \
+find.gnu/samefile-link.exp \
+find.gnu/samefile-missing.exp \
+find.gnu/samefile-p-brokenlink.exp \
+find.gnu/samefile-same.exp \
+find.gnu/samefile-symlink.exp \
+find.gnu/true.exp \
+find.gnu/wholename.exp \
+find.gnu/xtype-symlink.exp \
+find.gnu/sv-bug-12230.exp \
+find.gnu/sv-bug-17477.exp \
+find.gnu/sv-bug-17490.exp \
+find.gnu/sv-bug-17782.exp \
+find.gnu/sv-bug-18222.exp \
+find.gnu/sv-bug-24169.exp \
+find.gnu/sv-bug-27563-execdir.exp \
+find.gnu/quit.exp \
+find.gnu/used-invarg.exp \
+find.gnu/used-missing.exp \
+find.gnu/user-invalid.exp \
+find.gnu/xtype.exp \
+find.posix/and.exp \
+find.posix/bracket-depth.exp \
+find.posix/depth1.exp \
+find.posix/empty-parens.exp \
+find.posix/exec-nogaps.exp \
+find.posix/exec-one.exp \
+find.posix/files-not-expressions1.exp \
+find.posix/files-not-expressions2.exp \
+find.posix/files-not-expressions3.exp \
+find.posix/grouping.exp \
+find.posix/group-empty.exp \
+find.posix/group-missing.exp \
+find.posix/links.exp \
+find.posix/mtime0.exp \
+find.posix/sv-bug-11175.exp \
+find.posix/sv-bug-12181.exp \
+find.posix/sv-bug-25359.exp \
+find.posix/sv-bug-27563-exec.exp \
+find.posix/sv-bug-30777.exp \
+find.posix/depth1.exp \
+find.posix/sizes.exp \
+find.posix/name.exp \
+find.posix/nameslash.exp \
+find.posix/name-missing.exp \
+find.posix/perm-X.exp \
+find.posix/perm-vanilla.exp \
+find.posix/posixnot.exp \
+find.posix/prune.exp \
+find.posix/prune-result.exp \
+find.posix/prune-stat.exp \
+find.posix/size-invalid.exp \
+find.posix/size-missing.exp \
+find.posix/sizes.exp \
+find.posix/sizetype.exp \
+find.posix/typearg.exp \
+find.posix/sv-bug-11175.exp \
+find.posix/sv-bug-12181.exp \
+find.posix/sv-bug-15235.exp \
+find.posix/sv-bug-19605.exp \
+find.posix/sv-bug-19613.exp \
+find.posix/sv-bug-19617.exp \
+find.posix/typesize.exp \
+find.posix/grouping.exp \
+find.posix/and.exp \
+find.posix/exec-one.exp \
+find.posix/user-empty.exp \
+find.posix/user-missing.exp
+
+EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO)
+CLEANFILES = *.log *.sum site.exp site.bak
+all: all-am
+
+.SUFFIXES:
+$(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 find/testsuite/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits find/testsuite/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):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+check-DEJAGNU: site.exp
+       srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
+       EXPECT=$(EXPECT); export EXPECT; \
+       runtest=$(RUNTEST); \
+       if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+         exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
+           if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+           then :; else exit_status=1; fi; \
+         done; \
+       else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+       fi; \
+       exit $$exit_status
+site.exp: Makefile
+       @echo 'Making a new site.exp file...'
+       @echo '## these variables are automatically generated by make ##' >site.tmp
+       @echo '# Do not edit here.  If you wish to override these values' >>site.tmp
+       @echo '# edit the last section' >>site.tmp
+       @echo 'set srcdir $(srcdir)' >>site.tmp
+       @echo "set objdir `pwd`" >>site.tmp
+       @echo 'set build_alias "$(build_alias)"' >>site.tmp
+       @echo 'set build_triplet $(build_triplet)' >>site.tmp
+       @echo 'set host_alias "$(host_alias)"' >>site.tmp
+       @echo 'set host_triplet $(host_triplet)' >>site.tmp
+       @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+       @test ! -f site.exp || \
+         sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+       @-rm -f site.bak
+       @test ! -f site.exp || mv site.exp site.bak
+       @mv site.tmp site.exp
+
+distclean-DEJAGNU:
+       -rm -f site.exp site.bak
+       -l='$(DEJATOOL)'; for tool in $$l; do \
+         rm -f $$tool.sum $$tool.log; \
+       done
+
+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-DEJAGNU
+check: check-am
+all-am: Makefile
+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:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+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)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-DEJAGNU distclean-generic
+
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
+       distclean distclean-DEJAGNU distclean-generic 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-generic pdf \
+       pdf-am ps ps-am uninstall uninstall-am
+
+
+#DIST_SUBDIRS = config
+
+checklists:
+       cd $(srcdir) && \
+       ( find config find.gnu find.posix \( -name "*.exp" -o -name "*.xo" \) -print ; \
+         ls $(EXTRA_DIST_XO)  ; \
+         ls  $(EXTRA_DIST_EXP)  ; ) | \
+       sort | uniq -c | awk '$$1 != 2 { print; }'
+
+# 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/find/testsuite/config/unix.exp b/find/testsuite/config/unix.exp
new file mode 100644 (file)
index 0000000..0c1baff
--- /dev/null
@@ -0,0 +1,313 @@
+# -*- TCL -*-
+# Test-specific TCL procedures required by DejaGNU.
+# Copyright (C) 2000, 2003, 2004, 2005, 2006,
+#               2010 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/>.
+
+# Modified by Kevin Dalley <kevind@rahul.net> from the xargs files.
+# Modified by David MacKenzie <djm@gnu.ai.mit.edu> from the gcc files
+# written by Rob Savoye <rob@cygnus.com>.
+\f
+
+global OLDFIND
+global FTSFIND
+
+verbose "base_dir is $base_dir" 2
+global env;
+set env(GNU_FINDUTILS_FD_LEAK_CHECK) "1"
+
+# look for OLDFIND and FTSFIND
+if { ![info exists OLDFIND] || ![info exists FTSFIND] } {
+    verbose "Searching for oldfind"
+    set dir "$base_dir/.."
+
+    set objfile "find.o"
+    if ![file exists "$dir/$objfile"] then {
+       error "dir is $dir, but I cannot see $objfile in that directory"
+    }
+    if ([findfile $dir/oldfind 1 0]) {
+       verbose "found oldfind, so ftsfind must be called find"
+       set OLDFIND [findfile $dir/oldfind $dir/oldfind [transform oldfind]]
+       set FTSFIND [findfile $dir/find    $dir/find    [transform find   ]]
+    } else {
+       verbose "did not find oldfind, so ftsfind must be called ftsfind"
+       set OLDFIND [findfile $dir/find    $dir/find    [transform find   ]]
+       set FTSFIND [findfile $dir/ftsfind $dir/ftsfind [transform ftsfind]]
+    }
+}
+
+verbose "ftsfind is at $FTSFIND" 2
+verbose "oldfind is at $OLDFIND" 2
+
+if { [ string equal $FTSFIND $OLDFIND ] } {
+    error "OLDFIND and FTSFIND are set to $FTSFIND, which can't be right"
+}
+
+if [file exists $FTSFIND] then {
+    if [file exists $OLDFIND] then {
+       verbose "FTSFIND=$FTSFIND and OLDFIND=$OLDFIND both exist." 2
+    } else {
+       error "OLDFIND=$OLDFIND, but that program does not exist"
+    }
+} else {
+    error "FTSFIND=$FTSFIND, but that program does not exist (base_dir is $base_dir)"
+}
+
+
+global FINDFLAGS
+if ![info exists FINDFLAGS] then {
+    set FINDFLAGS ""
+}
+
+# Called by runtest.
+# Extract and print the version number of find.
+proc find_version {} {
+    global FTSFIND
+    global FINDFLAGS
+
+    if {[which $FTSFIND] != 0} then {
+       set tmp [ eval exec $FTSFIND $FINDFLAGS --version </dev/null | sed 1q ]
+       clone_output $tmp
+    } else {
+       warning "$FTSFIND, program does not exist"
+    }
+}
+
+# Run find
+# Called by individual test scripts.
+proc do_find_start { suffix findprogram flags passfail options infile output } {
+    global verbose
+
+    set scriptname [uplevel {info script}]
+    set testbase [file rootname $scriptname]
+
+
+    if { [string match "f*" $passfail] } {
+       set fail_good 1
+    } else {
+       if { [string match "p*" $passfail] } {
+           set fail_good 0
+       } else {
+           if { [string match "xf*" $passfail] } {
+               setup_xfail "*-*-*"
+               set fail_good 1
+           } else {
+               if { [string match "xp*" $passfail] } {
+                   setup_xfail "*-*-*"
+                   set fail_good 0
+               } else {
+                   # badly formed
+                   untested "Badly defined test"
+                   error "The first argument to find_start was $passfail but it should begin with p (pass) or f (fail) or xf (should fail but we know it passes) or xp (should pass but we know it fails)"
+               }
+           }
+       }
+    }
+
+    set test [file tail $testbase]
+    set testname "$test.$suffix"
+
+    # set compareprog "cmp"
+    set compareprog "diff -u"
+
+    set tmpout ""
+    if { $output != "" } {
+       error "The output option is not supported yet"
+    }
+
+    set outfile "$testbase.xo"
+    if {$infile != ""} then {
+       set infile "[file dirname [file dirname $testbase]]/inputs/$infile"
+    } else {
+       set infile /dev/null
+    }
+
+    set cmd "$findprogram $flags $options < $infile > find.out.uns"
+    send_log "$cmd\n"
+    if $verbose>1 then {
+       send_user "Spawning \"$cmd\"\n"
+    }
+
+    if $fail_good then {
+       send_log "Hoping for this command to return nonzero\n"
+    } else {
+       send_log "Hoping for this command to return 0\n"
+    }
+    set failed [ catch "exec $cmd" result ]
+    send_log "return value is $failed, result is '$result'\n"
+    if $failed {
+       # The command failed.
+       if $fail_good then {
+           send_log "As expected, $cmd returned nonzero\n"
+       } else {
+           fail "$testname, $result"
+       }
+    } else {
+       # The command returned 0.
+       if $fail_good then {
+           fail "$testname, $result"
+       } else {
+           send_log "As expected, $cmd returned 0\n"
+       }
+    }
+
+    exec sort < find.out.uns > find.out
+    file delete find.out.uns
+
+    if [file exists $outfile] then {
+       # We use the 'sort' above to sort the output of find to ensure
+       # that the directory entries appear in a predictable order.
+       # Because in the general case the person compiling and running
+       # "make check" will have a different collating order to the
+       # maintainer, we can't guarantee that our "correct" answer
+       # is already sorted in the correct order.  To avoid trying
+       # to figure out how to select a POSIX environment on a
+       # random system, we just sort the data again here, using
+       # the local user's environment.
+       exec sort < $outfile > cmp.out
+       set cmp_cmd "$compareprog find.out cmp.out"
+
+       send_log "$cmp_cmd\n"
+       catch "exec $cmp_cmd" cmpout
+       if {$cmpout != ""} then {
+           fail "$testname, standard output differs from the expected result:\n$cmpout"
+           return
+       }
+    } else {
+       if {[file size find.out] != 0} then {
+           fail "$testname, output should be empty"
+           return
+       }
+    }
+    pass "$testname"
+}
+
+proc optimisation_levels_to_test {} {
+    global OPTIMISATION_LEVELS
+    if [info exists OPTIMISATION_LEVELS] {
+       send_log "Running find at optimisation levels $OPTIMISATION_LEVELS\n"
+       return $OPTIMISATION_LEVELS
+    } else {
+       send_log "Running find at default optimisation levels\n"
+       return {0 1 2 3}
+    }
+}
+
+proc find_start { passfail options {infile ""} {output ""} {setup ""}} {
+    global OLDFIND
+    global FTSFIND
+    global FINDFLAGS
+    global SKIP_OLD
+    global SKIP_NEW
+
+    if {$infile != ""} then {
+       set msg "Did not expect infile parameter to be set"
+       untested $msg
+       error $msg
+    }
+
+    if {[which $FTSFIND] == 0} then {
+       error "$FTSFIND, program does not exist"
+       exit 1
+    }
+    if {[which $OLDFIND] == 0} then {
+       error "$OLDFIND, program does not exist"
+       exit 1
+    }
+
+    # Now run the test with each binary, once with each optimisation level.
+    foreach optlevel [optimisation_levels_to_test] {
+       set flags "$FINDFLAGS -O$optlevel"
+       if { ![info exists SKIP_OLD] || ! $SKIP_OLD } {
+           eval $setup
+           do_find_start old-O$optlevel  $OLDFIND $flags $passfail $options $infile $output
+       }
+       if { ![info exists SKIP_NEW] || !$SKIP_NEW } {
+           eval $setup
+           do_find_start new-O$optlevel  $FTSFIND $flags $passfail $options $infile $output
+       }
+    }
+}
+
+# Called by runtest.
+# Clean up (remove temporary files) before runtest exits.
+proc find_exit {} {
+    catch "exec rm -f find.out cmp.out"
+}
+
+proc path_setting_is_unsafe {} {
+    global env;
+    set itemlist [ split $env(PATH) : ]
+    foreach item $itemlist {
+       if { [ string equal $item "" ] } {
+           return 1;
+       }
+       if { [ string equal $item "." ] } {
+           return 1;
+       }
+       if { ! [ string match "/*" $item ] } {
+           # not an absolute path element.
+           return 1
+       }
+    }
+    return 0;
+}
+
+proc touch args {
+    foreach filename $args {
+       set f [open "$filename" "a"]
+       close $f
+    }
+}
+
+proc mkdir { dirname } {
+    # Not all versions of Tcl offer 'file mkdir'.
+    set failed [ catch "file mkdir $dirname" result ]
+    if $failed {
+       # Fall back on the external command.
+       send_log "file mkdir does not work, falling back on exec mkdir\n"
+       exec mkdir "$dirname"
+    }
+}
+
+
+proc safe_path [ ] {
+    if { [ path_setting_is_unsafe ] } {
+       warning { Cannot perform test as your $PATH environment variable includes a reference to the current directory or a directory name which is not absolute }
+       untested { skipping this test because your $PATH variable is wrongly set }
+       return 0
+    } else {
+       return 1
+    }
+}
+
+
+proc fs_superuser [ ] {
+    set tmpfile "tmp000"
+    exec rm -f $tmpfile
+    touch $tmpfile
+    exec chmod 000 $tmpfile
+    set retval 0
+
+    if [ file readable $tmpfile ] {
+       # On Cygwin, a user with admin rights can read all files, and
+       # access(foo,R_OK) correctly returns 1 for all files.
+       warning "You have superuser privileges, skipping this test."
+       untested {skipping this test because you have superuser privileges}
+       set retval 1
+    }
+    exec rm -f $tmpfile
+    return $retval
+}
diff --git a/find/testsuite/find.gnu/access.exp b/find/testsuite/find.gnu/access.exp
new file mode 100644 (file)
index 0000000..867bc80
--- /dev/null
@@ -0,0 +1,14 @@
+# tests for -readable, -writable, -executable
+exec rm -rf tmp
+exec mkdir tmp
+if { ! [ fs_superuser ] } {
+    touch tmp/x tmp/w tmp/r tmp/rw tmp/rwx tmp/0 
+    exec chmod 400 tmp/r
+    exec chmod 200 tmp/w
+    exec chmod 100 tmp/x
+    exec chmod 000 tmp/0
+    exec chmod 600 tmp/rw
+    exec chmod 700 tmp/rwx
+    find_start p {tmp -readable -printf "r %p\n" , -writable -printf "w %p\n" , -executable  -printf "x %p\n"}
+    exec rm -rf tmp
+}
diff --git a/find/testsuite/find.gnu/access.xo b/find/testsuite/find.gnu/access.xo
new file mode 100644 (file)
index 0000000..464957d
--- /dev/null
@@ -0,0 +1,11 @@
+r tmp
+r tmp/r
+r tmp/rw
+r tmp/rwx
+w tmp
+w tmp/rw
+w tmp/rwx
+w tmp/w
+x tmp
+x tmp/rwx
+x tmp/x
diff --git a/find/testsuite/find.gnu/comma.exp b/find/testsuite/find.gnu/comma.exp
new file mode 100644 (file)
index 0000000..07a768b
--- /dev/null
@@ -0,0 +1 @@
+find_start p {. -maxdepth 2 -false , -name .}
diff --git a/find/testsuite/find.gnu/comma.xo b/find/testsuite/find.gnu/comma.xo
new file mode 100644 (file)
index 0000000..9c558e3
--- /dev/null
@@ -0,0 +1 @@
+.
diff --git a/find/testsuite/find.gnu/delete.exp b/find/testsuite/find.gnu/delete.exp
new file mode 100644 (file)
index 0000000..f748321
--- /dev/null
@@ -0,0 +1,7 @@
+global FTSFIND
+global FINDFLAGS
+exec rm -rf tmp
+exec mkdir tmp tmp/top tmp/top/one tmp/top/one/foo tmp/top/two
+eval exec $FTSFIND tmp $FINDFLAGS -path tmp/top/two -delete
+find_start p {tmp -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/delete.xo b/find/testsuite/find.gnu/delete.xo
new file mode 100644 (file)
index 0000000..c84cffb
--- /dev/null
@@ -0,0 +1,4 @@
+tmp
+tmp/top
+tmp/top/one
+tmp/top/one/foo
diff --git a/find/testsuite/find.gnu/deletedir.exp b/find/testsuite/find.gnu/deletedir.exp
new file mode 100644 (file)
index 0000000..0d849d9
--- /dev/null
@@ -0,0 +1,9 @@
+global FTSFIND
+global FINDFLAGS
+exec rm -rf tmp
+exec mkdir tmp tmp/top 
+proc createdir {} {
+    exec mkdir tmp/top/dir
+}
+find_start p {tmp -path tmp/top/dir -delete -print} "" "" createdir
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/deletedir.xo b/find/testsuite/find.gnu/deletedir.xo
new file mode 100644 (file)
index 0000000..9f0155f
--- /dev/null
@@ -0,0 +1 @@
+tmp/top/dir
diff --git a/find/testsuite/find.gnu/deletefile.exp b/find/testsuite/find.gnu/deletefile.exp
new file mode 100644 (file)
index 0000000..5473a26
--- /dev/null
@@ -0,0 +1,9 @@
+global FTSFIND
+global FINDFLAGS
+exec rm -rf tmp
+exec mkdir tmp tmp/top 
+proc touchfile {} {
+    exec touch tmp/top/file
+}
+find_start p {tmp -path tmp/top/file -delete -print} "" "" touchfile
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/deletefile.xo b/find/testsuite/find.gnu/deletefile.xo
new file mode 100644 (file)
index 0000000..425c112
--- /dev/null
@@ -0,0 +1 @@
+tmp/top/file
diff --git a/find/testsuite/find.gnu/depth-d.exp b/find/testsuite/find.gnu/depth-d.exp
new file mode 100644 (file)
index 0000000..8e264a8
--- /dev/null
@@ -0,0 +1,8 @@
+exec rm -rf tmp
+exec mkdir tmp
+exec mkdir tmp/top
+exec mkdir tmp/top/one
+exec touch tmp/top/one/foo
+exec mkdir tmp/top/two
+find_start p {tmp/top -d -mindepth 1 -type d -empty -print}
+# exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/depth-d.xo b/find/testsuite/find.gnu/depth-d.xo
new file mode 100644 (file)
index 0000000..e5f6986
--- /dev/null
@@ -0,0 +1 @@
+tmp/top/two
diff --git a/find/testsuite/find.gnu/depth.exp b/find/testsuite/find.gnu/depth.exp
new file mode 100644 (file)
index 0000000..d4913b2
--- /dev/null
@@ -0,0 +1,8 @@
+exec rm -rf tmp
+exec mkdir tmp
+exec mkdir tmp/top
+exec mkdir tmp/top/one
+exec touch tmp/top/one/foo
+exec mkdir tmp/top/two
+find_start p {tmp/top -depth -mindepth 1 -type d -empty -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/depth.xo b/find/testsuite/find.gnu/depth.xo
new file mode 100644 (file)
index 0000000..e5f6986
--- /dev/null
@@ -0,0 +1 @@
+tmp/top/two
diff --git a/find/testsuite/find.gnu/empty.exp b/find/testsuite/find.gnu/empty.exp
new file mode 100644 (file)
index 0000000..78f94d7
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for -empty
+exec rm -rf tmp
+exec mkdir tmp
+exec true > tmp/empty
+exec echo > tmp/notempty
+find_start p { tmp -type f -empty }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/empty.xo b/find/testsuite/find.gnu/empty.xo
new file mode 100644 (file)
index 0000000..f352040
--- /dev/null
@@ -0,0 +1 @@
+tmp/empty
\ No newline at end of file
diff --git a/find/testsuite/find.gnu/exec-many-rtn-failure.exp b/find/testsuite/find.gnu/exec-many-rtn-failure.exp
new file mode 100644 (file)
index 0000000..463f8e2
--- /dev/null
@@ -0,0 +1,4 @@
+# POSIX: If the invoked command fails, -exec still returns true if it
+# was punctuated with +, because that always returns true.  However,
+# the program as a whole should return a NON-zero exit status.
+find_start f { /tmp -exec false \{\} + -printf "yep\n" -quit }
diff --git a/find/testsuite/find.gnu/exec-many-rtn-failure.xo b/find/testsuite/find.gnu/exec-many-rtn-failure.xo
new file mode 100644 (file)
index 0000000..3b6f27e
--- /dev/null
@@ -0,0 +1 @@
+yep
diff --git a/find/testsuite/find.gnu/exec-many-rtn-success.exp b/find/testsuite/find.gnu/exec-many-rtn-success.exp
new file mode 100644 (file)
index 0000000..142929f
--- /dev/null
@@ -0,0 +1,4 @@
+# POSIX: If the invoked command succeeds, -exec should return true if
+# it was punctuated with +, because that always returns true.  However,
+# the program as a whole should also return a zero exit status.
+find_start p { /tmp -exec true \{\} + -printf "yep\n" -quit }
diff --git a/find/testsuite/find.gnu/exec-many-rtn-success.xo b/find/testsuite/find.gnu/exec-many-rtn-success.xo
new file mode 100644 (file)
index 0000000..3b6f27e
--- /dev/null
@@ -0,0 +1 @@
+yep
diff --git a/find/testsuite/find.gnu/exec-one-rtn-fail.exp b/find/testsuite/find.gnu/exec-one-rtn-fail.exp
new file mode 100644 (file)
index 0000000..8022585
--- /dev/null
@@ -0,0 +1,4 @@
+# If -exec \; fails, it should return false.   The return 
+# value of find shoudl stil; be 0, unless another error has
+# happened.
+find_start p { /tmp -exec false \; -o \( -printf "yep\n" -quit \) }
diff --git a/find/testsuite/find.gnu/exec-one-rtn-fail.xo b/find/testsuite/find.gnu/exec-one-rtn-fail.xo
new file mode 100644 (file)
index 0000000..3b6f27e
--- /dev/null
@@ -0,0 +1 @@
+yep
diff --git a/find/testsuite/find.gnu/exec-one-rtn-success.exp b/find/testsuite/find.gnu/exec-one-rtn-success.exp
new file mode 100644 (file)
index 0000000..d3c8b99
--- /dev/null
@@ -0,0 +1,3 @@
+# POSIX: If the invoked command succeeds, -exec should return true if
+# it was punctuated with ;
+find_start p { /tmp -exec true \; -printf "yep\n" -quit }
diff --git a/find/testsuite/find.gnu/exec-one-rtn-success.xo b/find/testsuite/find.gnu/exec-one-rtn-success.xo
new file mode 100644 (file)
index 0000000..3b6f27e
--- /dev/null
@@ -0,0 +1 @@
+yep
diff --git a/find/testsuite/find.gnu/execdir-hier.exp b/find/testsuite/find.gnu/execdir-hier.exp
new file mode 100644 (file)
index 0000000..8b43c55
--- /dev/null
@@ -0,0 +1,8 @@
+# tests for -execdir ... \+ 
+# Specifically, ensure that output for separate directoires is not mixed.
+if { [ safe_path ] } {
+    exec rm -rf tmp
+    exec mkdir tmp tmp/two
+    find_start p { tmp -execdir echo \{\} \+ }
+    exec rm -rf tmp
+}
diff --git a/find/testsuite/find.gnu/execdir-hier.xo b/find/testsuite/find.gnu/execdir-hier.xo
new file mode 100644 (file)
index 0000000..d9fc49d
--- /dev/null
@@ -0,0 +1,2 @@
+./tmp
+./two
diff --git a/find/testsuite/find.gnu/execdir-in-unreadable.exp b/find/testsuite/find.gnu/execdir-in-unreadable.exp
new file mode 100644 (file)
index 0000000..fe78d5a
--- /dev/null
@@ -0,0 +1,11 @@
+# tests for -execdir ... \+ in a directory which is not readable
+if { [ safe_path ] } {
+    exec rm -rf tmp
+    exec mkdir tmp
+    exec chmod 755 tmp
+    exec mkdir tmp/sub
+    exec chmod 300 tmp/sub
+    find_start p { tmp -maxdepth 1 -execdir true \{\} \+ }
+    exec chmod 700 tmp/sub
+    exec rm -rf tmp
+}
diff --git a/find/testsuite/find.gnu/execdir-multiple.exp b/find/testsuite/find.gnu/execdir-multiple.exp
new file mode 100644 (file)
index 0000000..f292fff
--- /dev/null
@@ -0,0 +1,58 @@
+# tests for -execdir ... \+
+
+# Create 4 empty files in each of 6 directories.
+# Also create a shell script in each of those 6 directories.
+# Run a find command which runs the shell script for each empty file.
+# Check to make sure that each file is mentioned exactly once, and that
+# the command was run with the correct working directory.
+#
+# The output is a sequence of lines of this form:
+#
+# cwd ./basename
+#
+# cmd is the basename of the current directory at the time the command
+# is run by -execidr.   ./basename is the name of the file that was matched
+# (that is, it's the value passed in {}).
+
+# $body is the body of a shell script we use for testing.
+# It prints a series of lines of the form described above.
+# One line is printed for each command-line argument.
+set body {#! /bin/sh
+set -e
+here=`pwd`
+d=`basename $here`
+
+for arg;
+do
+  echo "$d" "$arg"
+done | LC_ALL=C sort
+}
+
+
+if { [ safe_path ] } {
+    global SKIP_OLD
+
+    exec rm -rf tmp
+    mkdir tmp
+
+    # Put a copy of our shell script in each
+    # directory, plus some files.
+    foreach dir { a b c d e f } {
+       mkdir "tmp/$dir"
+       set script_name "tmp/$dir/runme"
+       set f [open "$script_name" "w" 0700 ]
+       puts $f "$body"
+       close $f
+       foreach item { one two three four } {
+           touch "tmp/$dir/$item"
+       }
+    }
+
+    set SKIP_OLD 1
+    find_start p {tmp -type f -empty -execdir sh ./runme  \{\} + } ""
+    # We also repeat this test (with the same expected output) for the
+    # non-multiple case (this detects Savannah bug #29949).
+    find_start p {tmp -type f -empty -execdir sh ./runme  \{\} \; } ""
+    set SKIP_OLD 0
+    exec rm -rf tmp
+}
diff --git a/find/testsuite/find.gnu/execdir-multiple.xo b/find/testsuite/find.gnu/execdir-multiple.xo
new file mode 100644 (file)
index 0000000..a4f93d9
--- /dev/null
@@ -0,0 +1,24 @@
+a ./one
+a ./two
+a ./three
+a ./four
+b ./one
+b ./two
+b ./three
+b ./four
+c ./one
+c ./two
+c ./three
+c ./four
+d ./one
+d ./two
+d ./three
+d ./four
+e ./one
+e ./two
+e ./three
+e ./four
+f ./one
+f ./two
+f ./three
+f ./four
diff --git a/find/testsuite/find.gnu/execdir-one.exp b/find/testsuite/find.gnu/execdir-one.exp
new file mode 100644 (file)
index 0000000..53f2e00
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for -name
+if { [ safe_path ] } {
+    exec rm -rf tmp
+    exec mkdir tmp tmp/fred tmp/jim
+    find_start p {tmp -name fred -execdir echo \{\} \; }
+    exec rm -rf tmp
+}
diff --git a/find/testsuite/find.gnu/execdir-one.xo b/find/testsuite/find.gnu/execdir-one.xo
new file mode 100644 (file)
index 0000000..8584084
--- /dev/null
@@ -0,0 +1 @@
+./fred
diff --git a/find/testsuite/find.gnu/execdir-pwd.exp b/find/testsuite/find.gnu/execdir-pwd.exp
new file mode 100644 (file)
index 0000000..7726f6e
--- /dev/null
@@ -0,0 +1,20 @@
+# tests for -execdir pwd \+
+if { [ safe_path ] } {
+    global SKIP_OLD
+
+    exec rm -rf tmp
+    exec mkdir tmp
+
+    # Create an empty shell script.
+    exec touch    tmp/foo
+    exec chmod +x tmp/foo
+
+    # The -execdir should find the "foo" in the current directory.
+    # If not, the find command is probably executing the command
+    # built up by -execdir in the wrong directory.
+
+    set SKIP_OLD 1
+    find_start p {tmp -name foo -execdir sh ./foo  \{\} + } "" 
+    set SKIP_OLD 0
+    exec rm -rf tmp
+}
diff --git a/find/testsuite/find.gnu/execdir-pwd1.exp b/find/testsuite/find.gnu/execdir-pwd1.exp
new file mode 100644 (file)
index 0000000..e9863ac
--- /dev/null
@@ -0,0 +1,20 @@
+# tests for working directory of -execdir {} \;
+if { [ safe_path ] } {
+    global SKIP_OLD
+
+    exec rm -rf tmp
+    exec mkdir tmp
+
+    # Create an empty shell script.
+    exec touch    tmp/foo
+    exec chmod +x tmp/foo
+
+    # The -execdir should find the "foo" in the current directory.
+    # If not, the find command is probably executing the command
+    # built up by -execdir in the wrong directory.
+
+    set SKIP_OLD 1
+    find_start p {tmp -name foo -execdir sh ./foo  \{\} \; } ""
+    set SKIP_OLD 0
+    exec rm -rf tmp
+}
diff --git a/find/testsuite/find.gnu/execdir-root-only.exp b/find/testsuite/find.gnu/execdir-root-only.exp
new file mode 100644 (file)
index 0000000..a957e7e
--- /dev/null
@@ -0,0 +1,21 @@
+# Bug report by Bas van Gompel:
+# 
+# This appears to work well. However when the rootdir is passed,
+# something looks fishy:
+# 
+# find / -mindepth 0 -maxdepth 0 -execdir echo {} \;
+# .//
+# 
+# I also spotted, when `+' is used:
+# 
+# find / -mindepth 0 -maxdepth 0 -execdir echo == {} +
+# ==
+# == .//
+# 
+# (Notice the first line of output, which should not be there.)
+
+
+# This test checks the second of these two cases.
+if { [ safe_path ] } {
+    find_start p { / -mindepth 0 -maxdepth 0 -execdir echo == "{}" + }
+}
diff --git a/find/testsuite/find.gnu/execdir-root-only.xo b/find/testsuite/find.gnu/execdir-root-only.xo
new file mode 100644 (file)
index 0000000..c975392
--- /dev/null
@@ -0,0 +1 @@
+== /
diff --git a/find/testsuite/find.gnu/false.exp b/find/testsuite/find.gnu/false.exp
new file mode 100644 (file)
index 0000000..31f98a5
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -false.
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/fred/jim
+find_start p { tmp -depth -print -false -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/false.xo b/find/testsuite/find.gnu/false.xo
new file mode 100644 (file)
index 0000000..9baad64
--- /dev/null
@@ -0,0 +1,3 @@
+tmp/fred/jim
+tmp/fred
+tmp
diff --git a/find/testsuite/find.gnu/follow-arg-parent-symlink.exp b/find/testsuite/find.gnu/follow-arg-parent-symlink.exp
new file mode 100644 (file)
index 0000000..52f374a
--- /dev/null
@@ -0,0 +1,6 @@
+exec rm -rf tmp
+exec mkdir tmp tmp/dir1 tmp/dir1/dir2 
+exec touch              tmp/dir1/dir2/foo
+exec ln -s dir1 tmp/link1
+find_start p {tmp/link1/dir2 -type f -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/follow-arg-parent-symlink.xo b/find/testsuite/find.gnu/follow-arg-parent-symlink.xo
new file mode 100644 (file)
index 0000000..0cf5187
--- /dev/null
@@ -0,0 +1 @@
+tmp/link1/dir2/foo
diff --git a/find/testsuite/find.gnu/follow-basic.exp b/find/testsuite/find.gnu/follow-basic.exp
new file mode 100644 (file)
index 0000000..bc62a2d
--- /dev/null
@@ -0,0 +1,10 @@
+# Verifies that the -follow option is correctly implemented,
+# but does this by using the GNU extension -printf.
+exec rm -rf tmp
+
+exec mkdir tmp
+exec ln -s /etc/passwd  tmp/LINK
+exec ln -s /NOSUCHFILE  tmp/BROKEN
+
+# Links should all be dereferenced unless they are broken.
+find_start p {  tmp/LINK tmp/BROKEN tmp -follow -printf "%y %d %p\n" }
diff --git a/find/testsuite/find.gnu/follow-basic.xo b/find/testsuite/find.gnu/follow-basic.xo
new file mode 100644 (file)
index 0000000..f2c7940
--- /dev/null
@@ -0,0 +1,5 @@
+d 0 tmp
+f 0 tmp/LINK
+f 1 tmp/LINK
+l 0 tmp/BROKEN
+l 1 tmp/BROKEN
diff --git a/find/testsuite/find.gnu/fprint-unwritable.exp b/find/testsuite/find.gnu/fprint-unwritable.exp
new file mode 100644 (file)
index 0000000..905894d
--- /dev/null
@@ -0,0 +1,9 @@
+# test for -fprint to unwritable dest (we expect this to fail)
+if { ! [ fs_superuser ] } {
+    exec rm -rf tmp
+    file mkdir tmp
+    exec touch tmp/unwritable
+    exec chmod 444 tmp/unwritable
+    find_start f { tmp -fprint tmp/unwritable }
+    exec rm -rf tmp
+}
diff --git a/find/testsuite/find.gnu/fprint0_stdout.exp b/find/testsuite/find.gnu/fprint0_stdout.exp
new file mode 100644 (file)
index 0000000..c5a5aa8
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -fprint
+exec rm -rf tmp
+exec touch tmp
+find_start p { tmp -fprint0 /dev/stdout }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/fprint0_stdout.xo b/find/testsuite/find.gnu/fprint0_stdout.xo
new file mode 100644 (file)
index 0000000..60688dd
Binary files /dev/null and b/find/testsuite/find.gnu/fprint0_stdout.xo differ
diff --git a/find/testsuite/find.gnu/fprintf-samefile.exp b/find/testsuite/find.gnu/fprintf-samefile.exp
new file mode 100644 (file)
index 0000000..63e6fb7
--- /dev/null
@@ -0,0 +1,26 @@
+# This test was added as part of the fix for Savannah bug #24873, but it
+# does not exercise the relevant condition (which is a race).  While making
+# the fix I found that there were no tests for -fprintf at all, so I added
+# one.
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/file tmp/top
+exec ln -s file tmp/same
+# This command line should exercise the case where sharefile_fopen
+# Detects that two destination files are actually the same.
+find_start p {tmp/top -fprintf tmp/file "1: %p\n" -fprintf tmp/same "2: %p\n" }
+
+# We get here after the final iteration through the various
+# find binaries and -O option.  However -fprintf truncates the
+# output file, so there should be just one set of output in there
+# from
+
+# Check that we got the right output in tmp/file.
+set f [open "tmp/file" "r"]
+set data [read $f]
+close $f
+set expected "1: tmp/top\n2: tmp/top\n"
+if { [string compare $data $expected] } {
+    fail "fprintf-samefile: expected output:\n$expected\nbut got:\n$data"
+}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/gnu-or.exp b/find/testsuite/find.gnu/gnu-or.exp
new file mode 100644 (file)
index 0000000..92a2939
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -false.
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/fred/jim
+find_start p { tmp -depth -print -false -or -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/gnu-or.xo b/find/testsuite/find.gnu/gnu-or.xo
new file mode 100644 (file)
index 0000000..8484390
--- /dev/null
@@ -0,0 +1,6 @@
+tmp/fred/jim
+tmp/fred/jim
+tmp/fred
+tmp/fred
+tmp
+tmp
diff --git a/find/testsuite/find.gnu/gnuand.exp b/find/testsuite/find.gnu/gnuand.exp
new file mode 100644 (file)
index 0000000..2e685ca
--- /dev/null
@@ -0,0 +1,5 @@
+# tests for -name
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/jim
+find_start p {tmp -name fred -and -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/gnuand.xo b/find/testsuite/find.gnu/gnuand.xo
new file mode 100644 (file)
index 0000000..8cc8940
--- /dev/null
@@ -0,0 +1 @@
+tmp/fred
diff --git a/find/testsuite/find.gnu/gnunot.exp b/find/testsuite/find.gnu/gnunot.exp
new file mode 100644 (file)
index 0000000..4951c1e
--- /dev/null
@@ -0,0 +1,5 @@
+# tests for !
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/jim
+find_start p {tmp -not -name fred -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/gnunot.xo b/find/testsuite/find.gnu/gnunot.xo
new file mode 100644 (file)
index 0000000..776fed4
--- /dev/null
@@ -0,0 +1,2 @@
+tmp
+tmp/jim
\ No newline at end of file
diff --git a/find/testsuite/find.gnu/ilname.exp b/find/testsuite/find.gnu/ilname.exp
new file mode 100644 (file)
index 0000000..9b77b6a
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for -ilname
+exec rm -rf tmp
+exec mkdir tmp 
+exec touch tmp/one
+exec ln -s one tmp/two
+find_start p {tmp -ilname One -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/ilname.xo b/find/testsuite/find.gnu/ilname.xo
new file mode 100644 (file)
index 0000000..c7b45df
--- /dev/null
@@ -0,0 +1 @@
+tmp/two
diff --git a/find/testsuite/find.gnu/iname.exp b/find/testsuite/find.gnu/iname.exp
new file mode 100644 (file)
index 0000000..c8c26a4
--- /dev/null
@@ -0,0 +1,5 @@
+# tests for -name
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/jim
+find_start p {tmp -iname frED -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/iname.xo b/find/testsuite/find.gnu/iname.xo
new file mode 100644 (file)
index 0000000..8cc8940
--- /dev/null
@@ -0,0 +1 @@
+tmp/fred
diff --git a/find/testsuite/find.gnu/inum.exp b/find/testsuite/find.gnu/inum.exp
new file mode 100644 (file)
index 0000000..75614f5
--- /dev/null
@@ -0,0 +1,7 @@
+# test for -inum
+exec rm -rf tmp tmp2
+exec touch tmp tmp2
+set list  [ split [ exec ls -1i tmp ] ]
+set inode [ lindex $list 0 ]
+find_start p " tmp tmp2 -inum $inode -print "
+exec rm -rf tmp tmp2
diff --git a/find/testsuite/find.gnu/inum.xo b/find/testsuite/find.gnu/inum.xo
new file mode 100644 (file)
index 0000000..a9a5aec
--- /dev/null
@@ -0,0 +1 @@
+tmp
diff --git a/find/testsuite/find.gnu/ipath.exp b/find/testsuite/find.gnu/ipath.exp
new file mode 100644 (file)
index 0000000..0013e48
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -path
+exec rm -rf tmp
+exec mkdir tmp tmp/top tmp/top/ONE tmp/top/ONE/two
+find_start p {tmp/top -ipath Tmp/TOP/one -print 2>/dev/null }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/ipath.xo b/find/testsuite/find.gnu/ipath.xo
new file mode 100644 (file)
index 0000000..6ac3ca0
--- /dev/null
@@ -0,0 +1 @@
+tmp/top/ONE
diff --git a/find/testsuite/find.gnu/iregex1.exp b/find/testsuite/find.gnu/iregex1.exp
new file mode 100644 (file)
index 0000000..c24cdf0
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -iregex
+exec rm -rf tmp
+exec mkdir tmp tmp/d tmp/d/D tmp/d/D/d tmp/d/D/d/e
+find_start p {tmp  -iregex {tmp\(/d\)*} -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/iregex1.xo b/find/testsuite/find.gnu/iregex1.xo
new file mode 100644 (file)
index 0000000..8901de0
--- /dev/null
@@ -0,0 +1,4 @@
+tmp
+tmp/d
+tmp/d/D
+tmp/d/D/d
diff --git a/find/testsuite/find.gnu/iwholename.exp b/find/testsuite/find.gnu/iwholename.exp
new file mode 100644 (file)
index 0000000..d58656a
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -iwholename
+exec rm -rf tmp
+exec mkdir tmp tmp/top tmp/top/one tmp/top/one/two
+find_start p {tmp/top -iwholename tmP/TOP/One -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/iwholename.xo b/find/testsuite/find.gnu/iwholename.xo
new file mode 100644 (file)
index 0000000..66d2877
--- /dev/null
@@ -0,0 +1 @@
+tmp/top/one
diff --git a/find/testsuite/find.gnu/lname.exp b/find/testsuite/find.gnu/lname.exp
new file mode 100644 (file)
index 0000000..ada635f
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for -lname
+exec rm -rf tmp
+exec mkdir tmp 
+exec touch tmp/one
+exec ln -s one tmp/two
+find_start p {tmp -lname one -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/lname.xo b/find/testsuite/find.gnu/lname.xo
new file mode 100644 (file)
index 0000000..c7b45df
--- /dev/null
@@ -0,0 +1 @@
+tmp/two
diff --git a/find/testsuite/find.gnu/mindepth-arg.exp b/find/testsuite/find.gnu/mindepth-arg.exp
new file mode 100644 (file)
index 0000000..ba4d0dc
--- /dev/null
@@ -0,0 +1,9 @@
+# Argument validation for -mindepth and -maxdepth
+proc prepare {} {
+    exec rm -rf tmp
+    exec mkdir tmp tmp/top tmp/top/one
+}
+foreach predicate { -mindepth -maxdepth } {
+    find_start p "tmp/top $predicate 0 -print -quit" {} {} prepare
+}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/mindepth-arg.xo b/find/testsuite/find.gnu/mindepth-arg.xo
new file mode 100644 (file)
index 0000000..ddcb130
--- /dev/null
@@ -0,0 +1 @@
+tmp/top
\ No newline at end of file
diff --git a/find/testsuite/find.gnu/mindepth-badarg.exp b/find/testsuite/find.gnu/mindepth-badarg.exp
new file mode 100644 (file)
index 0000000..d098af0
--- /dev/null
@@ -0,0 +1,12 @@
+# Argument validation for -mindepth and -maxdepth
+
+exec rm -rf tmp
+exec mkdir tmp tmp/top tmp/top/one
+
+foreach predicate { -mindepth -maxdepth } {
+    # Try a variety of bad arguments.
+    foreach arg { x 0x01 Fnord "" +1 1.2 -3 3e1 } {
+       find_start f "tmp/top $predicate $arg -quit"
+    }
+}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/name-opt.exp b/find/testsuite/find.gnu/name-opt.exp
new file mode 100644 (file)
index 0000000..0ec1d8d
--- /dev/null
@@ -0,0 +1,8 @@
+# Verifies that -name is not optimized in front of -prune
+exec rm -rf tmp
+exec mkdir tmp
+exec mkdir tmp/top
+exec mkdir tmp/top/one
+exec touch tmp/top/one/foo
+find_start p {tmp/top -prune -name foo}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/name-opt.xo b/find/testsuite/find.gnu/name-opt.xo
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/find/testsuite/find.gnu/name-period.exp b/find/testsuite/find.gnu/name-period.exp
new file mode 100644 (file)
index 0000000..42858fe
--- /dev/null
@@ -0,0 +1,10 @@
+# Verifies that -name '*bar' will match quux/.foobar.
+# See http://standards.ieee.org/reading/ieee/interp/1003-2-92_int/pasc-1003.2-126.html
+# Also see http://savannah.gnu.org/bugs/?func=detailitem&item_id=10757
+exec rm -rf tmp
+exec mkdir tmp
+exec mkdir tmp/top
+exec mkdir tmp/top/.one
+exec mkdir tmp/top/bane
+find_start p {tmp/top -name \*ne -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/name-period.xo b/find/testsuite/find.gnu/name-period.xo
new file mode 100644 (file)
index 0000000..53cbcdc
--- /dev/null
@@ -0,0 +1,2 @@
+tmp/top/bane
+tmp/top/.one
diff --git a/find/testsuite/find.gnu/name-slash.exp b/find/testsuite/find.gnu/name-slash.exp
new file mode 100644 (file)
index 0000000..bd9a187
--- /dev/null
@@ -0,0 +1,2 @@
+# tests for '-name /'
+find_start p {/ /// -maxdepth 0 -name /}
diff --git a/find/testsuite/find.gnu/name-slash.xo b/find/testsuite/find.gnu/name-slash.xo
new file mode 100644 (file)
index 0000000..6c24144
--- /dev/null
@@ -0,0 +1,2 @@
+/
+///
diff --git a/find/testsuite/find.gnu/no-fdleak-test.exp b/find/testsuite/find.gnu/no-fdleak-test.exp
new file mode 100644 (file)
index 0000000..f823047
--- /dev/null
@@ -0,0 +1,13 @@
+# Test with the FD leak check turned off.  We make this test, just to
+# avoid failing to detect problems that only occur when the leak check
+# is turned off.
+set oldval $env(GNU_FINDUTILS_FD_LEAK_CHECK)
+unset env(GNU_FINDUTILS_FD_LEAK_CHECK)
+
+if { [ safe_path ] } {
+    exec rm -rf tmp
+    exec mkdir tmp tmp/fred tmp/jim
+    find_start p {tmp -name fred -execdir echo \{\} \; }
+    exec rm -rf tmp
+}
+set env(GNU_FINDUTILS_FD_LEAK_CHECK) $oldval
diff --git a/find/testsuite/find.gnu/no-fdleak-test.xo b/find/testsuite/find.gnu/no-fdleak-test.xo
new file mode 100644 (file)
index 0000000..8584084
--- /dev/null
@@ -0,0 +1 @@
+./fred
diff --git a/find/testsuite/find.gnu/path.exp b/find/testsuite/find.gnu/path.exp
new file mode 100644 (file)
index 0000000..40fa01e
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -path
+exec rm -rf tmp
+exec mkdir tmp tmp/top tmp/top/one tmp/top/one/two
+find_start p {tmp/top -path tmp/top/one -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/path.xo b/find/testsuite/find.gnu/path.xo
new file mode 100644 (file)
index 0000000..66d2877
--- /dev/null
@@ -0,0 +1 @@
+tmp/top/one
diff --git a/find/testsuite/find.gnu/perm-slash.exp b/find/testsuite/find.gnu/perm-slash.exp
new file mode 100644 (file)
index 0000000..a5be0ab
--- /dev/null
@@ -0,0 +1,19 @@
+# tests for -perm /nnn
+# The slash is a GNU extension
+
+exec rm -rf tmp 
+exec mkdir tmp 
+
+## set up a selection of test files
+foreach perm  { 400 200 555 700 000 050 } {
+    exec touch "tmp/$perm"
+    exec chmod $perm "tmp/$perm"
+}
+
+# 
+# The -o operator normally has a short-circuit effect,
+# so we have to use "-exec false \;" to make sure that
+# all the parenthesised expression actually fail.
+# 
+find_start p {tmp -mindepth 1 -perm /555 -printf "p/555 %p\n" }
+# exec rm -rf tmp tmp2
diff --git a/find/testsuite/find.gnu/perm-slash.xo b/find/testsuite/find.gnu/perm-slash.xo
new file mode 100644 (file)
index 0000000..f84e5b7
--- /dev/null
@@ -0,0 +1,4 @@
+p/555 tmp/050
+p/555 tmp/555
+p/555 tmp/400
+p/555 tmp/700
\ No newline at end of file
diff --git a/find/testsuite/find.gnu/perm.exp b/find/testsuite/find.gnu/perm.exp
new file mode 100644 (file)
index 0000000..d4913f8
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for -perm -0100 (-perm with -)
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/fred
+exec chmod 444 tmp/fred
+find_start p {tmp -perm -0100}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/perm.xo b/find/testsuite/find.gnu/perm.xo
new file mode 100644 (file)
index 0000000..a9a5aec
--- /dev/null
@@ -0,0 +1 @@
+tmp
diff --git a/find/testsuite/find.gnu/perm000.exp b/find/testsuite/find.gnu/perm000.exp
new file mode 100644 (file)
index 0000000..9217129
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for -perm /000 (Savannah bug #14748).
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/fred tmp/wilma
+exec chmod 000 tmp/fred
+find_start p {tmp -perm /000 -print 2>/dev/null }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/perm000.xo b/find/testsuite/find.gnu/perm000.xo
new file mode 100644 (file)
index 0000000..7a1f6e9
--- /dev/null
@@ -0,0 +1,3 @@
+tmp
+tmp/fred
+tmp/wilma
diff --git a/find/testsuite/find.gnu/posix-dflt.exp b/find/testsuite/find.gnu/posix-dflt.exp
new file mode 100644 (file)
index 0000000..3e7d573
--- /dev/null
@@ -0,0 +1,10 @@
+# Verifies that the POSIX behaviour without -P or -L options is
+# correctly implemented, but does this by using the GNU extension
+# -printf.
+exec rm -rf tmp
+
+exec mkdir tmp
+exec ln -s /etc/passwd  tmp/LINK
+exec ln -s /NOSUCHFILE  tmp/BROKEN
+
+find_start p { -P tmp/LINK tmp/BROKEN tmp -printf "%y %d %p\n" }
diff --git a/find/testsuite/find.gnu/posix-dflt.xo b/find/testsuite/find.gnu/posix-dflt.xo
new file mode 100644 (file)
index 0000000..7359d24
--- /dev/null
@@ -0,0 +1,5 @@
+d 0 tmp
+l 0 tmp/BROKEN
+l 0 tmp/LINK
+l 1 tmp/BROKEN
+l 1 tmp/LINK
diff --git a/find/testsuite/find.gnu/posix-h.exp b/find/testsuite/find.gnu/posix-h.exp
new file mode 100644 (file)
index 0000000..4023b25
--- /dev/null
@@ -0,0 +1,13 @@
+# Verifies that the POSIX -H option is correctly implemented,
+# but does this by using the GNU extension -printf.
+exec rm -rf tmp
+
+exec mkdir tmp
+exec ln -s /etc/passwd  tmp/LINK
+exec ln -s /NOSUCHFILE  tmp/BROKEN
+
+# If the file is not on the command line, the link is not 
+# dereferenced, and so tmp/LINK should appear at depth 1
+# but as type "l".  tmp itself appears first at depth 0 as 
+# a directory.
+find_start p { -H tmp/LINK tmp/BROKEN tmp -printf "H1: %y %d %p\n" }
diff --git a/find/testsuite/find.gnu/posix-h.xo b/find/testsuite/find.gnu/posix-h.xo
new file mode 100644 (file)
index 0000000..4d503f7
--- /dev/null
@@ -0,0 +1,5 @@
+H1: d 0 tmp
+H1: f 0 tmp/LINK
+H1: l 0 tmp/BROKEN
+H1: l 1 tmp/BROKEN
+H1: l 1 tmp/LINK
diff --git a/find/testsuite/find.gnu/posix-l.exp b/find/testsuite/find.gnu/posix-l.exp
new file mode 100644 (file)
index 0000000..6055edf
--- /dev/null
@@ -0,0 +1,10 @@
+# Verifies that the POSIX -L option is correctly implemented,
+# but does this by using the GNU extension -printf.
+exec rm -rf tmp
+
+exec mkdir tmp
+exec ln -s /etc/passwd  tmp/LINK
+exec ln -s /NOSUCHFILE  tmp/BROKEN
+
+# Links should all be dereferenced unless they are broken.
+find_start p { -L tmp/LINK tmp/BROKEN tmp -printf "%y %d %p\n" }
diff --git a/find/testsuite/find.gnu/posix-l.xo b/find/testsuite/find.gnu/posix-l.xo
new file mode 100644 (file)
index 0000000..f2c7940
--- /dev/null
@@ -0,0 +1,5 @@
+d 0 tmp
+f 0 tmp/LINK
+f 1 tmp/LINK
+l 0 tmp/BROKEN
+l 1 tmp/BROKEN
diff --git a/find/testsuite/find.gnu/posix-perminvalid.exp b/find/testsuite/find.gnu/posix-perminvalid.exp
new file mode 100644 (file)
index 0000000..b773511
--- /dev/null
@@ -0,0 +1,16 @@
+# tests for non-POSIX-compliant argument to -perm
+# Remember any previous value of POSIXLY_CORRECT (if there was one)
+if [info exists env(POSIXLY_CORRECT)] {
+    set oldval env(POSIXLY_CORRECT)
+}
+
+# Set POSIXLY_CORRECT and perform the test
+set env(POSIXLY_CORRECT) 1
+find_start f {. -perm +a+x}
+
+# Set POSIXLY_CORRECT to its previous value
+if [info exists oldval] {
+    set env(POSIXLY_CORRECT) $oldval
+} else {
+    unset env(POSIXLY_CORRECT)
+}
diff --git a/find/testsuite/find.gnu/print0.exp b/find/testsuite/find.gnu/print0.exp
new file mode 100644 (file)
index 0000000..11a3cb6
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -print0.
+exec rm -rf tmp
+exec touch tmp
+find_start p { tmp -print0 }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/print0.xo b/find/testsuite/find.gnu/print0.xo
new file mode 100644 (file)
index 0000000..b947b3b
Binary files /dev/null and b/find/testsuite/find.gnu/print0.xo differ
diff --git a/find/testsuite/find.gnu/print_stdout.exp b/find/testsuite/find.gnu/print_stdout.exp
new file mode 100644 (file)
index 0000000..5bbeefa
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -fprint
+exec rm -rf tmp
+exec touch tmp
+find_start p { tmp -fprint /dev/stdout }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/print_stdout.xo b/find/testsuite/find.gnu/print_stdout.xo
new file mode 100644 (file)
index 0000000..a9a5aec
--- /dev/null
@@ -0,0 +1 @@
+tmp
diff --git a/find/testsuite/find.gnu/printf-h.exp b/find/testsuite/find.gnu/printf-h.exp
new file mode 100644 (file)
index 0000000..fb0187c
--- /dev/null
@@ -0,0 +1,5 @@
+# Test case for Savannah bug ID #12085.
+exec rm -rf tmp
+exec touch tmp
+find_start p {tmp  -printf "RESULT: %h %f\n" }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/printf-h.xo b/find/testsuite/find.gnu/printf-h.xo
new file mode 100644 (file)
index 0000000..dc6ce01
--- /dev/null
@@ -0,0 +1 @@
+RESULT: . tmp
diff --git a/find/testsuite/find.gnu/printf-nonlocal-symlink.exp b/find/testsuite/find.gnu/printf-nonlocal-symlink.exp
new file mode 100644 (file)
index 0000000..f8e61e1
--- /dev/null
@@ -0,0 +1,7 @@
+exec rm -rf tmp
+exec mkdir tmp
+exec mkdir tmp/foo
+exec touch tmp/foo/file
+exec ln -s file tmp/foo/LINK
+find_start p {tmp  -type l -printf "%p: %Y %y\n" }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/printf-nonlocal-symlink.xo b/find/testsuite/find.gnu/printf-nonlocal-symlink.xo
new file mode 100644 (file)
index 0000000..fcb338a
--- /dev/null
@@ -0,0 +1 @@
+tmp/foo/LINK: f l
diff --git a/find/testsuite/find.gnu/printf-slash.exp b/find/testsuite/find.gnu/printf-slash.exp
new file mode 100644 (file)
index 0000000..3f46023
--- /dev/null
@@ -0,0 +1 @@
+find_start p {/ /// -maxdepth 0 -printf "%p %f\\n"}
diff --git a/find/testsuite/find.gnu/printf-slash.xo b/find/testsuite/find.gnu/printf-slash.xo
new file mode 100644 (file)
index 0000000..50f8192
--- /dev/null
@@ -0,0 +1,2 @@
+/ /
+/// /
diff --git a/find/testsuite/find.gnu/printf-symlink.exp b/find/testsuite/find.gnu/printf-symlink.exp
new file mode 100644 (file)
index 0000000..6acc3e6
--- /dev/null
@@ -0,0 +1,6 @@
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/file
+exec ln -s file tmp/LINK
+find_start p {tmp/LINK  -printf "RESULT: %y %Y %p\n" -printf "RESULT2: %Y %y %p\n" }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/printf-symlink.xo b/find/testsuite/find.gnu/printf-symlink.xo
new file mode 100644 (file)
index 0000000..cc2b69c
--- /dev/null
@@ -0,0 +1,2 @@
+RESULT: l f tmp/LINK
+RESULT2: f l tmp/LINK
diff --git a/find/testsuite/find.gnu/printf.exp b/find/testsuite/find.gnu/printf.exp
new file mode 100644 (file)
index 0000000..c504d85
--- /dev/null
@@ -0,0 +1,6 @@
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/file
+exec chmod 600 tmp/file
+find_start p {tmp -type f -printf "a %d\n" -printf "b %f\n" -printf "c %h\n" -printf "d %H\n" -printf "e %l\n" -printf "f %m\n" -printf "g %n\n" -printf "h %p\n" -printf "i %P\n" -printf "j %y\n" -printf "k %Y\n"}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/printf.xo b/find/testsuite/find.gnu/printf.xo
new file mode 100644 (file)
index 0000000..4eda7e3
--- /dev/null
@@ -0,0 +1,11 @@
+a 1
+b file
+c tmp
+d tmp
+e 
+f 600
+g 1
+h tmp/file
+i file
+j f
+k f
diff --git a/find/testsuite/find.gnu/printfHdfl.exp b/find/testsuite/find.gnu/printfHdfl.exp
new file mode 100644 (file)
index 0000000..517ecc5
--- /dev/null
@@ -0,0 +1,2 @@
+# verify that %H with no argument assumes "."
+find_start p { -maxdepth 0 -printf "%H" }
diff --git a/find/testsuite/find.gnu/printfHdfl.xo b/find/testsuite/find.gnu/printfHdfl.xo
new file mode 100644 (file)
index 0000000..9c558e3
--- /dev/null
@@ -0,0 +1 @@
+.
diff --git a/find/testsuite/find.gnu/prune-default-print.exp b/find/testsuite/find.gnu/prune-default-print.exp
new file mode 100644 (file)
index 0000000..b43a6b9
--- /dev/null
@@ -0,0 +1,5 @@
+# Verifies that default -print is used with -prune
+exec rm -rf tmp
+exec mkdir tmp
+find_start p {tmp -prune}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/prune-default-print.xo b/find/testsuite/find.gnu/prune-default-print.xo
new file mode 100644 (file)
index 0000000..a9a5aec
--- /dev/null
@@ -0,0 +1 @@
+tmp
diff --git a/find/testsuite/find.gnu/quit.exp b/find/testsuite/find.gnu/quit.exp
new file mode 100644 (file)
index 0000000..610ad7f
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -quit.
+exec rm -rf tmp
+exec mkdir tmp tmp/top tmp/top/one tmp/top/one/foo tmp/top/two
+find_start p {tmp/top/one tmp/top/two -depth -print -name one -quit }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/quit.xo b/find/testsuite/find.gnu/quit.xo
new file mode 100644 (file)
index 0000000..14c1d8d
--- /dev/null
@@ -0,0 +1,2 @@
+tmp/top/one/foo
+tmp/top/one
diff --git a/find/testsuite/find.gnu/regex1.exp b/find/testsuite/find.gnu/regex1.exp
new file mode 100644 (file)
index 0000000..071dcaf
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -regex
+exec rm -rf tmp
+exec mkdir tmp tmp/d tmp/d/d tmp/d/d/d tmp/d/d/d/e
+find_start p {tmp  -regex {tmp\(/d\)*} -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/regex1.xo b/find/testsuite/find.gnu/regex1.xo
new file mode 100644 (file)
index 0000000..c4259bb
--- /dev/null
@@ -0,0 +1,4 @@
+tmp
+tmp/d
+tmp/d/d
+tmp/d/d/d
diff --git a/find/testsuite/find.gnu/regex2.exp b/find/testsuite/find.gnu/regex2.exp
new file mode 100644 (file)
index 0000000..71cc1e3
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -regex
+exec rm -rf tmp
+exec mkdir tmp tmp/d tmp/d/d tmp/d/d/d tmp/d/d/d/e
+find_start p {tmp -regextype posix-extended  -regex {tmp(/d)*} -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/regex2.xo b/find/testsuite/find.gnu/regex2.xo
new file mode 100644 (file)
index 0000000..c4259bb
--- /dev/null
@@ -0,0 +1,4 @@
+tmp
+tmp/d
+tmp/d/d
+tmp/d/d/d
diff --git a/find/testsuite/find.gnu/samefile-copy.exp b/find/testsuite/find.gnu/samefile-copy.exp
new file mode 100644 (file)
index 0000000..69e47cd
--- /dev/null
@@ -0,0 +1,8 @@
+# test for -samefile
+exec rm -rf tmp
+exec mkdir tmp tmp/one tmp/two
+exec touch tmp/file1 tmp/file2
+exec cp    tmp/file1 tmp/one/link
+exec cp    tmp/file2 tmp/two/link
+find_start p {tmp/one tmp/two -samefile tmp/file1 -print}
+# exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/samefile-copy.xo b/find/testsuite/find.gnu/samefile-copy.xo
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/find/testsuite/find.gnu/samefile-link.exp b/find/testsuite/find.gnu/samefile-link.exp
new file mode 100644 (file)
index 0000000..e288160
--- /dev/null
@@ -0,0 +1,9 @@
+# test for -samefile
+exec rm -rf tmp
+exec mkdir tmp tmp/one tmp/two
+exec touch tmp/file1 tmp/file2
+exec ln    tmp/file1 tmp/one/link
+exec ln -s tmp/file1 tmp/one/symlink
+exec ln    tmp/file2 tmp/two/link
+find_start p {tmp/one tmp/two -samefile tmp/file1 -print}
+# exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/samefile-link.xo b/find/testsuite/find.gnu/samefile-link.xo
new file mode 100644 (file)
index 0000000..e53b73e
--- /dev/null
@@ -0,0 +1 @@
+tmp/one/link
diff --git a/find/testsuite/find.gnu/samefile-missing.exp b/find/testsuite/find.gnu/samefile-missing.exp
new file mode 100644 (file)
index 0000000..2d509c4
--- /dev/null
@@ -0,0 +1,2 @@
+# test for diagnosis of the fact that the argument to -samefile is missing
+find_start f ". -samefile"
diff --git a/find/testsuite/find.gnu/samefile-p-brokenlink.exp b/find/testsuite/find.gnu/samefile-p-brokenlink.exp
new file mode 100644 (file)
index 0000000..8ae1fad
--- /dev/null
@@ -0,0 +1,11 @@
+# test for find -P -samefile with a broken link
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/file1
+exec ln    tmp/file1 tmp/link
+exec ln -s tmp/file1 tmp/symlink
+exec ln -s tmp/file2 tmp/broken
+exec ln    tmp/broken tmp/blink
+
+find_start p { -P tmp -samefile tmp/broken -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/samefile-p-brokenlink.xo b/find/testsuite/find.gnu/samefile-p-brokenlink.xo
new file mode 100644 (file)
index 0000000..aaa98f3
--- /dev/null
@@ -0,0 +1,2 @@
+tmp/blink
+tmp/broken
\ No newline at end of file
diff --git a/find/testsuite/find.gnu/samefile-same.exp b/find/testsuite/find.gnu/samefile-same.exp
new file mode 100644 (file)
index 0000000..739f6c6
--- /dev/null
@@ -0,0 +1,6 @@
+# test for -samefile
+exec rm -rf tmp
+exec mkdir tmp tmp/one tmp/two
+exec touch tmp/file
+find_start p {tmp tmp/file -samefile tmp/file -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/samefile-same.xo b/find/testsuite/find.gnu/samefile-same.xo
new file mode 100644 (file)
index 0000000..061fd95
--- /dev/null
@@ -0,0 +1,2 @@
+tmp/file
+tmp/file
diff --git a/find/testsuite/find.gnu/samefile-symlink.exp b/find/testsuite/find.gnu/samefile-symlink.exp
new file mode 100644 (file)
index 0000000..1c6aa1f
--- /dev/null
@@ -0,0 +1,10 @@
+# test for -samefile
+exec rm -rf tmp
+exec mkdir tmp tmp/one tmp/two
+exec touch tmp/file1 tmp/file2
+exec ln    tmp/file1 tmp/one/link
+exec ln -s ../file1 tmp/one/symlink
+exec ln    tmp/file2 tmp/two/link
+exec ln -s ../file2 tmp/two/symlink
+find_start p { -L tmp/one tmp/two -samefile tmp/file1 -print}
+# exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/samefile-symlink.xo b/find/testsuite/find.gnu/samefile-symlink.xo
new file mode 100644 (file)
index 0000000..ca1e727
--- /dev/null
@@ -0,0 +1,2 @@
+tmp/one/link
+tmp/one/symlink
diff --git a/find/testsuite/find.gnu/sv-bug-12230.exp b/find/testsuite/find.gnu/sv-bug-12230.exp
new file mode 100644 (file)
index 0000000..3af22c6
--- /dev/null
@@ -0,0 +1,14 @@
+# Bug report by Dmitry V. Levin.
+#
+# The command:
+#   find tmp -false -execdir echo == {} +
+# Actually produces one line of output.  It
+# should produce none, because the echo command
+# should never be invoked.
+#
+if { [ safe_path ] } {
+    exec rm -rf tmp
+    exec mkdir tmp
+    find_start p { tmp -false -execdir echo == "{}" + }
+    exec rm -rf tmp
+}
diff --git a/find/testsuite/find.gnu/sv-bug-17477.exp b/find/testsuite/find.gnu/sv-bug-17477.exp
new file mode 100644 (file)
index 0000000..2cc7fe3
--- /dev/null
@@ -0,0 +1,2 @@
+# verify that % with no argument fails gracefully
+find_start f { -maxdepth 0 -printf "test: %" }
diff --git a/find/testsuite/find.gnu/sv-bug-17490.exp b/find/testsuite/find.gnu/sv-bug-17490.exp
new file mode 100644 (file)
index 0000000..f29bebf
--- /dev/null
@@ -0,0 +1,4 @@
+# test for Savannah bug #17490
+#
+# That bug was a coredump if the argument to -regex was the final argument.
+find_start p {. -maxdepth 0 -regex x }
diff --git a/find/testsuite/find.gnu/sv-bug-17782.exp b/find/testsuite/find.gnu/sv-bug-17782.exp
new file mode 100644 (file)
index 0000000..6771f28
--- /dev/null
@@ -0,0 +1,15 @@
+# Savannah bug #17782.
+# While -execdir echo blah {} works, -execdir echo "blah {}" doesn't.
+# The bug is that the ./ prefix is prepended to the argument containing the 
+# braces, not to the expansion of the braces, so you get output like 
+# ./blah foo
+# instead of 
+# blah ./foo
+#
+if { [ safe_path ] } {
+    exec rm -rf tmp
+    exec mkdir tmp
+    exec touch tmp/foo
+    find_start p { tmp -name foo -execdir echo "saw {}" \; }
+    exec rm -rf tmp
+}
diff --git a/find/testsuite/find.gnu/sv-bug-17782.xo b/find/testsuite/find.gnu/sv-bug-17782.xo
new file mode 100644 (file)
index 0000000..2bde550
--- /dev/null
@@ -0,0 +1 @@
+saw ./foo
\ No newline at end of file
diff --git a/find/testsuite/find.gnu/sv-bug-18222.exp b/find/testsuite/find.gnu/sv-bug-18222.exp
new file mode 100644 (file)
index 0000000..148010a
--- /dev/null
@@ -0,0 +1,8 @@
+# Test for Savannah bug #18222
+#
+# That bug was a case were the expansion of %H is truncated if the name
+# of the second start point is longer than that of the first.
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/short tmp/longer
+find_start p { tmp/short tmp/longer -printf "%H\n" }
diff --git a/find/testsuite/find.gnu/sv-bug-18222.xo b/find/testsuite/find.gnu/sv-bug-18222.xo
new file mode 100644 (file)
index 0000000..4f5f863
--- /dev/null
@@ -0,0 +1,2 @@
+tmp/short
+tmp/longer
diff --git a/find/testsuite/find.gnu/sv-bug-24169.exp b/find/testsuite/find.gnu/sv-bug-24169.exp
new file mode 100644 (file)
index 0000000..349e823
--- /dev/null
@@ -0,0 +1,47 @@
+# Bug report by Joey Hess.
+#
+# The command:
+#   find -neweraa
+# is not valid because there is a missing argument. 
+# The result should be a clean exit with nonzero status.
+# However, it segfaults in 4.4.0.
+#
+
+global FTSFIND
+if {[which $FTSFIND] == 0} then {
+    error "$FTSFIND, program does not exist"
+    exit 1
+}
+
+set scriptname [info script]
+set testbase [file rootname $scriptname]
+set test [file tail $testbase] 
+set testname "$test.generic"
+
+set cmd "$FTSFIND -neweraa"
+set expected 1 
+
+send_log "$cmd\n"
+eval spawn -noecho $cmd
+expect {
+    eof { set result [wait] }
+}
+send_log "result is '$result'\n"
+if { [ lindex $result 2 ] == 0  } then {
+    set status [ lindex $result 3]
+    if { [llength $result] > 4 } then {
+       if { [lindex $result 4] == "CHILDKILLED" } then {
+           fail "$testname, $cmd was killed: [lrange $result 5 end]" 
+       } else {
+           unresolved "$testname, $cmd had unexpected extended status $result" 
+       }
+    } else {
+       if { $status != 1 } then {
+           unresolved "$testname, $cmd had unexpected status $status" 
+       } else {
+           pass "$testname"
+       }
+    }
+} else {
+    unresolved "$testname, failed to run $cmd" 
+}
diff --git a/find/testsuite/find.gnu/sv-bug-27563-execdir.exp b/find/testsuite/find.gnu/sv-bug-27563-execdir.exp
new file mode 100644 (file)
index 0000000..c67fc88
--- /dev/null
@@ -0,0 +1,6 @@
+# tests for Savannah bug 27563 (result of find -L -exec ls {} \;)
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/yyyy
+find_start p {-L tmp -name yyyy -execdir ls \{\} \; }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/sv-bug-27563-execdir.xo b/find/testsuite/find.gnu/sv-bug-27563-execdir.xo
new file mode 100644 (file)
index 0000000..285260b
--- /dev/null
@@ -0,0 +1 @@
+./yyyy
diff --git a/find/testsuite/find.gnu/true.exp b/find/testsuite/find.gnu/true.exp
new file mode 100644 (file)
index 0000000..3da595b
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -true.
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/fred/jim
+find_start p { tmp -depth -print -true -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/true.xo b/find/testsuite/find.gnu/true.xo
new file mode 100644 (file)
index 0000000..8484390
--- /dev/null
@@ -0,0 +1,6 @@
+tmp/fred/jim
+tmp/fred/jim
+tmp/fred
+tmp/fred
+tmp
+tmp
diff --git a/find/testsuite/find.gnu/used-invarg.exp b/find/testsuite/find.gnu/used-invarg.exp
new file mode 100644 (file)
index 0000000..be5eed1
--- /dev/null
@@ -0,0 +1,2 @@
+# tests for invalid argument to -used 
+find_start f {. -used ZZ}
diff --git a/find/testsuite/find.gnu/used-missing.exp b/find/testsuite/find.gnu/used-missing.exp
new file mode 100644 (file)
index 0000000..b8b8674
--- /dev/null
@@ -0,0 +1,2 @@
+# tests for missing argument to -used 
+find_start f {. -used }
diff --git a/find/testsuite/find.gnu/user-invalid.exp b/find/testsuite/find.gnu/user-invalid.exp
new file mode 100644 (file)
index 0000000..ee1d02a
--- /dev/null
@@ -0,0 +1,4 @@
+# tests for invalid argument to -user
+foreach user { : "" 14JJ 10.3 -4 } {
+    find_start f ". -user $user"
+}
diff --git a/find/testsuite/find.gnu/wholename.exp b/find/testsuite/find.gnu/wholename.exp
new file mode 100644 (file)
index 0000000..128d1ac
--- /dev/null
@@ -0,0 +1,5 @@
+# test for -wholename
+exec rm -rf tmp
+exec mkdir tmp tmp/top tmp/top/one tmp/top/one/two
+find_start p {tmp/top -wholename tmp/top/one -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/wholename.xo b/find/testsuite/find.gnu/wholename.xo
new file mode 100644 (file)
index 0000000..66d2877
--- /dev/null
@@ -0,0 +1 @@
+tmp/top/one
diff --git a/find/testsuite/find.gnu/xtype-symlink.exp b/find/testsuite/find.gnu/xtype-symlink.exp
new file mode 100644 (file)
index 0000000..d66a5c0
--- /dev/null
@@ -0,0 +1,6 @@
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/file
+exec ln -s file tmp/LINK
+find_start p {tmp/LINK  -xtype f }
+exec rm -rf tmp
diff --git a/find/testsuite/find.gnu/xtype-symlink.xo b/find/testsuite/find.gnu/xtype-symlink.xo
new file mode 100644 (file)
index 0000000..f46bde2
--- /dev/null
@@ -0,0 +1 @@
+tmp/LINK
diff --git a/find/testsuite/find.gnu/xtype.exp b/find/testsuite/find.gnu/xtype.exp
new file mode 100644 (file)
index 0000000..62cb749
--- /dev/null
@@ -0,0 +1,8 @@
+# checks for the -xtype test.
+exec rm -rf tmp
+
+exec mkdir tmp
+exec ln -s /etc/passwd  tmp/LINK
+exec ln -s /NOSUCHFILE  tmp/BROKEN
+
+find_start p { -H tmp/LINK tmp/BROKEN tmp -xtype l -printf "xtype is l: %p\n" , \! -xtype l -printf "xtype is not l: %p\n" }
diff --git a/find/testsuite/find.gnu/xtype.xo b/find/testsuite/find.gnu/xtype.xo
new file mode 100644 (file)
index 0000000..92b74ed
--- /dev/null
@@ -0,0 +1,5 @@
+xtype is l: tmp/LINK
+xtype is l: tmp/BROKEN
+xtype is not l: tmp
+xtype is not l: tmp/LINK
+xtype is l: tmp/BROKEN
diff --git a/find/testsuite/find.posix/and.exp b/find/testsuite/find.posix/and.exp
new file mode 100644 (file)
index 0000000..ac1d622
--- /dev/null
@@ -0,0 +1,5 @@
+# tests for -name
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/jim
+find_start p {tmp -name fred -a -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/and.xo b/find/testsuite/find.posix/and.xo
new file mode 100644 (file)
index 0000000..8cc8940
--- /dev/null
@@ -0,0 +1 @@
+tmp/fred
diff --git a/find/testsuite/find.posix/bracket-depth.exp b/find/testsuite/find.posix/bracket-depth.exp
new file mode 100644 (file)
index 0000000..e748f06
--- /dev/null
@@ -0,0 +1,4 @@
+exec rm -rf tmp
+exec mkdir tmp
+# shoud not result in a fatal error.  
+find_start p { tmp \( -depth \) -false -print }
diff --git a/find/testsuite/find.posix/depth1.exp b/find/testsuite/find.posix/depth1.exp
new file mode 100644 (file)
index 0000000..c730d22
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for the bug reported at http://lists.gnu.org/archive/html/bug-findutils/2005-02/msg00077.html
+exec rm -rf tmp
+exec mkdir tmp
+exec mkdir tmp/1 tmp/1/2 tmp/1/2/3 tmp/1/2/20 tmp/1/2/37 tmp/1/2/54 tmp/1/2/55 tmp/1/2/55/56 tmp/1/2/55/57 tmp/1/2/55/58 tmp/1/2/55/59
+touch tmp/1/2/3/4 tmp/1/2/3/5 tmp/1/2/3/6 tmp/1/2/3/7 tmp/1/2/3/8 tmp/1/2/3/9 tmp/1/2/3/10 tmp/1/2/3/11 tmp/1/2/3/12 tmp/1/2/3/13 tmp/1/2/3/14 tmp/1/2/3/15 tmp/1/2/3/16 tmp/1/2/3/17 tmp/1/2/3/18 tmp/1/2/3/19 tmp/1/2/20/21 tmp/1/2/20/22 tmp/1/2/20/23 tmp/1/2/20/24 tmp/1/2/20/25 tmp/1/2/20/26 tmp/1/2/20/27 tmp/1/2/20/28 tmp/1/2/20/29 tmp/1/2/20/30 tmp/1/2/20/31 tmp/1/2/20/32 tmp/1/2/20/33 tmp/1/2/20/34 tmp/1/2/20/35 tmp/1/2/20/36 tmp/1/2/37/38 tmp/1/2/37/39 tmp/1/2/37/40 tmp/1/2/37/41 tmp/1/2/37/42 tmp/1/2/37/43 tmp/1/2/37/44 tmp/1/2/37/45 tmp/1/2/37/46 tmp/1/2/37/47 tmp/1/2/37/48 tmp/1/2/37/49 tmp/1/2/37/50 tmp/1/2/37/51 tmp/1/2/37/52 tmp/1/2/37/53 tmp/1/2/60 tmp/1/2/61 tmp/1/2/62 tmp/1/2/63 tmp/1/2/64 tmp/1/2/65 tmp/1/66 tmp/1/67 tmp/1/68 tmp/1/69 tmp/1/70 tmp/1/71 tmp/1/72 tmp/1/73 tmp/1/74 tmp/1/75 tmp/1/76 tmp/1/77 tmp/1/78 tmp/1/79 tmp/1/80 tmp/1/81
+find_start p {tmp/1 -depth -type d -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/depth1.xo b/find/testsuite/find.posix/depth1.xo
new file mode 100644 (file)
index 0000000..0147ad5
--- /dev/null
@@ -0,0 +1,11 @@
+tmp/1
+tmp/1/2
+tmp/1/2/20
+tmp/1/2/3
+tmp/1/2/37
+tmp/1/2/54
+tmp/1/2/55
+tmp/1/2/55/56
+tmp/1/2/55/57
+tmp/1/2/55/58
+tmp/1/2/55/59
diff --git a/find/testsuite/find.posix/empty-parens.exp b/find/testsuite/find.posix/empty-parens.exp
new file mode 100644 (file)
index 0000000..abe43df
--- /dev/null
@@ -0,0 +1,2 @@
+# empty parentheses should be rejected as being invalid.
+find_start f { . \( -\)  }
diff --git a/find/testsuite/find.posix/exec-nogaps.exp b/find/testsuite/find.posix/exec-nogaps.exp
new file mode 100644 (file)
index 0000000..108a7a1
--- /dev/null
@@ -0,0 +1,34 @@
+exec rm -rf tmp
+exec mkdir tmp tmp/a
+
+set testbase [file rootname [info script]]
+set outfile "$testbase.xo"
+send_log "outfile is $outfile\n"
+set file_list {}
+
+set f [open $outfile]
+while {[gets $f filename] >= 0} {
+    lappend flie_list $filename
+    set ftmp [open "$filename" "w"]
+    close $ftmp
+}
+close $f
+
+set script [open tmp/list.sh "w"]
+puts $script {#! /bin/sh
+for f; do echo "$f"; done
+}
+close $script
+exec chmod 0500 tmp/list.sh
+
+send_log "creeating files $file_list\n"
+foreach filename $file_list {
+}
+
+set OPTIMISATION_LEVELS {3}
+find_start p { tmp/a/ -type f -exec echo \{\} \; }
+
+find_start p { tmp/a/ -type f -exec sh tmp/list.sh \{\} \+ }
+
+exec rm -rf tmp/a tmp/list.sh
+exec rmdir tmp
diff --git a/find/testsuite/find.posix/exec-nogaps.xo b/find/testsuite/find.posix/exec-nogaps.xo
new file mode 100644 (file)
index 0000000..9330067
--- /dev/null
@@ -0,0 +1,7200 @@
+tmp/a/1
+tmp/a/2
+tmp/a/3
+tmp/a/4
+tmp/a/5
+tmp/a/6
+tmp/a/7
+tmp/a/8
+tmp/a/9
+tmp/a/10
+tmp/a/11
+tmp/a/12
+tmp/a/13
+tmp/a/14
+tmp/a/15
+tmp/a/16
+tmp/a/17
+tmp/a/18
+tmp/a/19
+tmp/a/20
+tmp/a/21
+tmp/a/22
+tmp/a/23
+tmp/a/24
+tmp/a/25
+tmp/a/26
+tmp/a/27
+tmp/a/28
+tmp/a/29
+tmp/a/30
+tmp/a/31
+tmp/a/32
+tmp/a/33
+tmp/a/34
+tmp/a/35
+tmp/a/36
+tmp/a/37
+tmp/a/38
+tmp/a/39
+tmp/a/40
+tmp/a/41
+tmp/a/42
+tmp/a/43
+tmp/a/44
+tmp/a/45
+tmp/a/46
+tmp/a/47
+tmp/a/48
+tmp/a/49
+tmp/a/50
+tmp/a/51
+tmp/a/52
+tmp/a/53
+tmp/a/54
+tmp/a/55
+tmp/a/56
+tmp/a/57
+tmp/a/58
+tmp/a/59
+tmp/a/60
+tmp/a/61
+tmp/a/62
+tmp/a/63
+tmp/a/64
+tmp/a/65
+tmp/a/66
+tmp/a/67
+tmp/a/68
+tmp/a/69
+tmp/a/70
+tmp/a/71
+tmp/a/72
+tmp/a/73
+tmp/a/74
+tmp/a/75
+tmp/a/76
+tmp/a/77
+tmp/a/78
+tmp/a/79
+tmp/a/80
+tmp/a/81
+tmp/a/82
+tmp/a/83
+tmp/a/84
+tmp/a/85
+tmp/a/86
+tmp/a/87
+tmp/a/88
+tmp/a/89
+tmp/a/90
+tmp/a/91
+tmp/a/92
+tmp/a/93
+tmp/a/94
+tmp/a/95
+tmp/a/96
+tmp/a/97
+tmp/a/98
+tmp/a/99
+tmp/a/100
+tmp/a/101
+tmp/a/102
+tmp/a/103
+tmp/a/104
+tmp/a/105
+tmp/a/106
+tmp/a/107
+tmp/a/108
+tmp/a/109
+tmp/a/110
+tmp/a/111
+tmp/a/112
+tmp/a/113
+tmp/a/114
+tmp/a/115
+tmp/a/116
+tmp/a/117
+tmp/a/118
+tmp/a/119
+tmp/a/120
+tmp/a/121
+tmp/a/122
+tmp/a/123
+tmp/a/124
+tmp/a/125
+tmp/a/126
+tmp/a/127
+tmp/a/128
+tmp/a/129
+tmp/a/130
+tmp/a/131
+tmp/a/132
+tmp/a/133
+tmp/a/134
+tmp/a/135
+tmp/a/136
+tmp/a/137
+tmp/a/138
+tmp/a/139
+tmp/a/140
+tmp/a/141
+tmp/a/142
+tmp/a/143
+tmp/a/144
+tmp/a/145
+tmp/a/146
+tmp/a/147
+tmp/a/148
+tmp/a/149
+tmp/a/150
+tmp/a/151
+tmp/a/152
+tmp/a/153
+tmp/a/154
+tmp/a/155
+tmp/a/156
+tmp/a/157
+tmp/a/158
+tmp/a/159
+tmp/a/160
+tmp/a/161
+tmp/a/162
+tmp/a/163
+tmp/a/164
+tmp/a/165
+tmp/a/166
+tmp/a/167
+tmp/a/168
+tmp/a/169
+tmp/a/170
+tmp/a/171
+tmp/a/172
+tmp/a/173
+tmp/a/174
+tmp/a/175
+tmp/a/176
+tmp/a/177
+tmp/a/178
+tmp/a/179
+tmp/a/180
+tmp/a/181
+tmp/a/182
+tmp/a/183
+tmp/a/184
+tmp/a/185
+tmp/a/186
+tmp/a/187
+tmp/a/188
+tmp/a/189
+tmp/a/190
+tmp/a/191
+tmp/a/192
+tmp/a/193
+tmp/a/194
+tmp/a/195
+tmp/a/196
+tmp/a/197
+tmp/a/198
+tmp/a/199
+tmp/a/200
+tmp/a/201
+tmp/a/202
+tmp/a/203
+tmp/a/204
+tmp/a/205
+tmp/a/206
+tmp/a/207
+tmp/a/208
+tmp/a/209
+tmp/a/210
+tmp/a/211
+tmp/a/212
+tmp/a/213
+tmp/a/214
+tmp/a/215
+tmp/a/216
+tmp/a/217
+tmp/a/218
+tmp/a/219
+tmp/a/220
+tmp/a/221
+tmp/a/222
+tmp/a/223
+tmp/a/224
+tmp/a/225
+tmp/a/226
+tmp/a/227
+tmp/a/228
+tmp/a/229
+tmp/a/230
+tmp/a/231
+tmp/a/232
+tmp/a/233
+tmp/a/234
+tmp/a/235
+tmp/a/236
+tmp/a/237
+tmp/a/238
+tmp/a/239
+tmp/a/240
+tmp/a/241
+tmp/a/242
+tmp/a/243
+tmp/a/244
+tmp/a/245
+tmp/a/246
+tmp/a/247
+tmp/a/248
+tmp/a/249
+tmp/a/250
+tmp/a/251
+tmp/a/252
+tmp/a/253
+tmp/a/254
+tmp/a/255
+tmp/a/256
+tmp/a/257
+tmp/a/258
+tmp/a/259
+tmp/a/260
+tmp/a/261
+tmp/a/262
+tmp/a/263
+tmp/a/264
+tmp/a/265
+tmp/a/266
+tmp/a/267
+tmp/a/268
+tmp/a/269
+tmp/a/270
+tmp/a/271
+tmp/a/272
+tmp/a/273
+tmp/a/274
+tmp/a/275
+tmp/a/276
+tmp/a/277
+tmp/a/278
+tmp/a/279
+tmp/a/280
+tmp/a/281
+tmp/a/282
+tmp/a/283
+tmp/a/284
+tmp/a/285
+tmp/a/286
+tmp/a/287
+tmp/a/288
+tmp/a/289
+tmp/a/290
+tmp/a/291
+tmp/a/292
+tmp/a/293
+tmp/a/294
+tmp/a/295
+tmp/a/296
+tmp/a/297
+tmp/a/298
+tmp/a/299
+tmp/a/300
+tmp/a/301
+tmp/a/302
+tmp/a/303
+tmp/a/304
+tmp/a/305
+tmp/a/306
+tmp/a/307
+tmp/a/308
+tmp/a/309
+tmp/a/310
+tmp/a/311
+tmp/a/312
+tmp/a/313
+tmp/a/314
+tmp/a/315
+tmp/a/316
+tmp/a/317
+tmp/a/318
+tmp/a/319
+tmp/a/320
+tmp/a/321
+tmp/a/322
+tmp/a/323
+tmp/a/324
+tmp/a/325
+tmp/a/326
+tmp/a/327
+tmp/a/328
+tmp/a/329
+tmp/a/330
+tmp/a/331
+tmp/a/332
+tmp/a/333
+tmp/a/334
+tmp/a/335
+tmp/a/336
+tmp/a/337
+tmp/a/338
+tmp/a/339
+tmp/a/340
+tmp/a/341
+tmp/a/342
+tmp/a/343
+tmp/a/344
+tmp/a/345
+tmp/a/346
+tmp/a/347
+tmp/a/348
+tmp/a/349
+tmp/a/350
+tmp/a/351
+tmp/a/352
+tmp/a/353
+tmp/a/354
+tmp/a/355
+tmp/a/356
+tmp/a/357
+tmp/a/358
+tmp/a/359
+tmp/a/360
+tmp/a/361
+tmp/a/362
+tmp/a/363
+tmp/a/364
+tmp/a/365
+tmp/a/366
+tmp/a/367
+tmp/a/368
+tmp/a/369
+tmp/a/370
+tmp/a/371
+tmp/a/372
+tmp/a/373
+tmp/a/374
+tmp/a/375
+tmp/a/376
+tmp/a/377
+tmp/a/378
+tmp/a/379
+tmp/a/380
+tmp/a/381
+tmp/a/382
+tmp/a/383
+tmp/a/384
+tmp/a/385
+tmp/a/386
+tmp/a/387
+tmp/a/388
+tmp/a/389
+tmp/a/390
+tmp/a/391
+tmp/a/392
+tmp/a/393
+tmp/a/394
+tmp/a/395
+tmp/a/396
+tmp/a/397
+tmp/a/398
+tmp/a/399
+tmp/a/400
+tmp/a/401
+tmp/a/402
+tmp/a/403
+tmp/a/404
+tmp/a/405
+tmp/a/406
+tmp/a/407
+tmp/a/408
+tmp/a/409
+tmp/a/410
+tmp/a/411
+tmp/a/412
+tmp/a/413
+tmp/a/414
+tmp/a/415
+tmp/a/416
+tmp/a/417
+tmp/a/418
+tmp/a/419
+tmp/a/420
+tmp/a/421
+tmp/a/422
+tmp/a/423
+tmp/a/424
+tmp/a/425
+tmp/a/426
+tmp/a/427
+tmp/a/428
+tmp/a/429
+tmp/a/430
+tmp/a/431
+tmp/a/432
+tmp/a/433
+tmp/a/434
+tmp/a/435
+tmp/a/436
+tmp/a/437
+tmp/a/438
+tmp/a/439
+tmp/a/440
+tmp/a/441
+tmp/a/442
+tmp/a/443
+tmp/a/444
+tmp/a/445
+tmp/a/446
+tmp/a/447
+tmp/a/448
+tmp/a/449
+tmp/a/450
+tmp/a/451
+tmp/a/452
+tmp/a/453
+tmp/a/454
+tmp/a/455
+tmp/a/456
+tmp/a/457
+tmp/a/458
+tmp/a/459
+tmp/a/460
+tmp/a/461
+tmp/a/462
+tmp/a/463
+tmp/a/464
+tmp/a/465
+tmp/a/466
+tmp/a/467
+tmp/a/468
+tmp/a/469
+tmp/a/470
+tmp/a/471
+tmp/a/472
+tmp/a/473
+tmp/a/474
+tmp/a/475
+tmp/a/476
+tmp/a/477
+tmp/a/478
+tmp/a/479
+tmp/a/480
+tmp/a/481
+tmp/a/482
+tmp/a/483
+tmp/a/484
+tmp/a/485
+tmp/a/486
+tmp/a/487
+tmp/a/488
+tmp/a/489
+tmp/a/490
+tmp/a/491
+tmp/a/492
+tmp/a/493
+tmp/a/494
+tmp/a/495
+tmp/a/496
+tmp/a/497
+tmp/a/498
+tmp/a/499
+tmp/a/500
+tmp/a/501
+tmp/a/502
+tmp/a/503
+tmp/a/504
+tmp/a/505
+tmp/a/506
+tmp/a/507
+tmp/a/508
+tmp/a/509
+tmp/a/510
+tmp/a/511
+tmp/a/512
+tmp/a/513
+tmp/a/514
+tmp/a/515
+tmp/a/516
+tmp/a/517
+tmp/a/518
+tmp/a/519
+tmp/a/520
+tmp/a/521
+tmp/a/522
+tmp/a/523
+tmp/a/524
+tmp/a/525
+tmp/a/526
+tmp/a/527
+tmp/a/528
+tmp/a/529
+tmp/a/530
+tmp/a/531
+tmp/a/532
+tmp/a/533
+tmp/a/534
+tmp/a/535
+tmp/a/536
+tmp/a/537
+tmp/a/538
+tmp/a/539
+tmp/a/540
+tmp/a/541
+tmp/a/542
+tmp/a/543
+tmp/a/544
+tmp/a/545
+tmp/a/546
+tmp/a/547
+tmp/a/548
+tmp/a/549
+tmp/a/550
+tmp/a/551
+tmp/a/552
+tmp/a/553
+tmp/a/554
+tmp/a/555
+tmp/a/556
+tmp/a/557
+tmp/a/558
+tmp/a/559
+tmp/a/560
+tmp/a/561
+tmp/a/562
+tmp/a/563
+tmp/a/564
+tmp/a/565
+tmp/a/566
+tmp/a/567
+tmp/a/568
+tmp/a/569
+tmp/a/570
+tmp/a/571
+tmp/a/572
+tmp/a/573
+tmp/a/574
+tmp/a/575
+tmp/a/576
+tmp/a/577
+tmp/a/578
+tmp/a/579
+tmp/a/580
+tmp/a/581
+tmp/a/582
+tmp/a/583
+tmp/a/584
+tmp/a/585
+tmp/a/586
+tmp/a/587
+tmp/a/588
+tmp/a/589
+tmp/a/590
+tmp/a/591
+tmp/a/592
+tmp/a/593
+tmp/a/594
+tmp/a/595
+tmp/a/596
+tmp/a/597
+tmp/a/598
+tmp/a/599
+tmp/a/600
+tmp/a/601
+tmp/a/602
+tmp/a/603
+tmp/a/604
+tmp/a/605
+tmp/a/606
+tmp/a/607
+tmp/a/608
+tmp/a/609
+tmp/a/610
+tmp/a/611
+tmp/a/612
+tmp/a/613
+tmp/a/614
+tmp/a/615
+tmp/a/616
+tmp/a/617
+tmp/a/618
+tmp/a/619
+tmp/a/620
+tmp/a/621
+tmp/a/622
+tmp/a/623
+tmp/a/624
+tmp/a/625
+tmp/a/626
+tmp/a/627
+tmp/a/628
+tmp/a/629
+tmp/a/630
+tmp/a/631
+tmp/a/632
+tmp/a/633
+tmp/a/634
+tmp/a/635
+tmp/a/636
+tmp/a/637
+tmp/a/638
+tmp/a/639
+tmp/a/640
+tmp/a/641
+tmp/a/642
+tmp/a/643
+tmp/a/644
+tmp/a/645
+tmp/a/646
+tmp/a/647
+tmp/a/648
+tmp/a/649
+tmp/a/650
+tmp/a/651
+tmp/a/652
+tmp/a/653
+tmp/a/654
+tmp/a/655
+tmp/a/656
+tmp/a/657
+tmp/a/658
+tmp/a/659
+tmp/a/660
+tmp/a/661
+tmp/a/662
+tmp/a/663
+tmp/a/664
+tmp/a/665
+tmp/a/666
+tmp/a/667
+tmp/a/668
+tmp/a/669
+tmp/a/670
+tmp/a/671
+tmp/a/672
+tmp/a/673
+tmp/a/674
+tmp/a/675
+tmp/a/676
+tmp/a/677
+tmp/a/678
+tmp/a/679
+tmp/a/680
+tmp/a/681
+tmp/a/682
+tmp/a/683
+tmp/a/684
+tmp/a/685
+tmp/a/686
+tmp/a/687
+tmp/a/688
+tmp/a/689
+tmp/a/690
+tmp/a/691
+tmp/a/692
+tmp/a/693
+tmp/a/694
+tmp/a/695
+tmp/a/696
+tmp/a/697
+tmp/a/698
+tmp/a/699
+tmp/a/700
+tmp/a/701
+tmp/a/702
+tmp/a/703
+tmp/a/704
+tmp/a/705
+tmp/a/706
+tmp/a/707
+tmp/a/708
+tmp/a/709
+tmp/a/710
+tmp/a/711
+tmp/a/712
+tmp/a/713
+tmp/a/714
+tmp/a/715
+tmp/a/716
+tmp/a/717
+tmp/a/718
+tmp/a/719
+tmp/a/720
+tmp/a/721
+tmp/a/722
+tmp/a/723
+tmp/a/724
+tmp/a/725
+tmp/a/726
+tmp/a/727
+tmp/a/728
+tmp/a/729
+tmp/a/730
+tmp/a/731
+tmp/a/732
+tmp/a/733
+tmp/a/734
+tmp/a/735
+tmp/a/736
+tmp/a/737
+tmp/a/738
+tmp/a/739
+tmp/a/740
+tmp/a/741
+tmp/a/742
+tmp/a/743
+tmp/a/744
+tmp/a/745
+tmp/a/746
+tmp/a/747
+tmp/a/748
+tmp/a/749
+tmp/a/750
+tmp/a/751
+tmp/a/752
+tmp/a/753
+tmp/a/754
+tmp/a/755
+tmp/a/756
+tmp/a/757
+tmp/a/758
+tmp/a/759
+tmp/a/760
+tmp/a/761
+tmp/a/762
+tmp/a/763
+tmp/a/764
+tmp/a/765
+tmp/a/766
+tmp/a/767
+tmp/a/768
+tmp/a/769
+tmp/a/770
+tmp/a/771
+tmp/a/772
+tmp/a/773
+tmp/a/774
+tmp/a/775
+tmp/a/776
+tmp/a/777
+tmp/a/778
+tmp/a/779
+tmp/a/780
+tmp/a/781
+tmp/a/782
+tmp/a/783
+tmp/a/784
+tmp/a/785
+tmp/a/786
+tmp/a/787
+tmp/a/788
+tmp/a/789
+tmp/a/790
+tmp/a/791
+tmp/a/792
+tmp/a/793
+tmp/a/794
+tmp/a/795
+tmp/a/796
+tmp/a/797
+tmp/a/798
+tmp/a/799
+tmp/a/800
+tmp/a/801
+tmp/a/802
+tmp/a/803
+tmp/a/804
+tmp/a/805
+tmp/a/806
+tmp/a/807
+tmp/a/808
+tmp/a/809
+tmp/a/810
+tmp/a/811
+tmp/a/812
+tmp/a/813
+tmp/a/814
+tmp/a/815
+tmp/a/816
+tmp/a/817
+tmp/a/818
+tmp/a/819
+tmp/a/820
+tmp/a/821
+tmp/a/822
+tmp/a/823
+tmp/a/824
+tmp/a/825
+tmp/a/826
+tmp/a/827
+tmp/a/828
+tmp/a/829
+tmp/a/830
+tmp/a/831
+tmp/a/832
+tmp/a/833
+tmp/a/834
+tmp/a/835
+tmp/a/836
+tmp/a/837
+tmp/a/838
+tmp/a/839
+tmp/a/840
+tmp/a/841
+tmp/a/842
+tmp/a/843
+tmp/a/844
+tmp/a/845
+tmp/a/846
+tmp/a/847
+tmp/a/848
+tmp/a/849
+tmp/a/850
+tmp/a/851
+tmp/a/852
+tmp/a/853
+tmp/a/854
+tmp/a/855
+tmp/a/856
+tmp/a/857
+tmp/a/858
+tmp/a/859
+tmp/a/860
+tmp/a/861
+tmp/a/862
+tmp/a/863
+tmp/a/864
+tmp/a/865
+tmp/a/866
+tmp/a/867
+tmp/a/868
+tmp/a/869
+tmp/a/870
+tmp/a/871
+tmp/a/872
+tmp/a/873
+tmp/a/874
+tmp/a/875
+tmp/a/876
+tmp/a/877
+tmp/a/878
+tmp/a/879
+tmp/a/880
+tmp/a/881
+tmp/a/882
+tmp/a/883
+tmp/a/884
+tmp/a/885
+tmp/a/886
+tmp/a/887
+tmp/a/888
+tmp/a/889
+tmp/a/890
+tmp/a/891
+tmp/a/892
+tmp/a/893
+tmp/a/894
+tmp/a/895
+tmp/a/896
+tmp/a/897
+tmp/a/898
+tmp/a/899
+tmp/a/900
+tmp/a/901
+tmp/a/902
+tmp/a/903
+tmp/a/904
+tmp/a/905
+tmp/a/906
+tmp/a/907
+tmp/a/908
+tmp/a/909
+tmp/a/910
+tmp/a/911
+tmp/a/912
+tmp/a/913
+tmp/a/914
+tmp/a/915
+tmp/a/916
+tmp/a/917
+tmp/a/918
+tmp/a/919
+tmp/a/920
+tmp/a/921
+tmp/a/922
+tmp/a/923
+tmp/a/924
+tmp/a/925
+tmp/a/926
+tmp/a/927
+tmp/a/928
+tmp/a/929
+tmp/a/930
+tmp/a/931
+tmp/a/932
+tmp/a/933
+tmp/a/934
+tmp/a/935
+tmp/a/936
+tmp/a/937
+tmp/a/938
+tmp/a/939
+tmp/a/940
+tmp/a/941
+tmp/a/942
+tmp/a/943
+tmp/a/944
+tmp/a/945
+tmp/a/946
+tmp/a/947
+tmp/a/948
+tmp/a/949
+tmp/a/950
+tmp/a/951
+tmp/a/952
+tmp/a/953
+tmp/a/954
+tmp/a/955
+tmp/a/956
+tmp/a/957
+tmp/a/958
+tmp/a/959
+tmp/a/960
+tmp/a/961
+tmp/a/962
+tmp/a/963
+tmp/a/964
+tmp/a/965
+tmp/a/966
+tmp/a/967
+tmp/a/968
+tmp/a/969
+tmp/a/970
+tmp/a/971
+tmp/a/972
+tmp/a/973
+tmp/a/974
+tmp/a/975
+tmp/a/976
+tmp/a/977
+tmp/a/978
+tmp/a/979
+tmp/a/980
+tmp/a/981
+tmp/a/982
+tmp/a/983
+tmp/a/984
+tmp/a/985
+tmp/a/986
+tmp/a/987
+tmp/a/988
+tmp/a/989
+tmp/a/990
+tmp/a/991
+tmp/a/992
+tmp/a/993
+tmp/a/994
+tmp/a/995
+tmp/a/996
+tmp/a/997
+tmp/a/998
+tmp/a/999
+tmp/a/1000
+tmp/a/1001
+tmp/a/1002
+tmp/a/1003
+tmp/a/1004
+tmp/a/1005
+tmp/a/1006
+tmp/a/1007
+tmp/a/1008
+tmp/a/1009
+tmp/a/1010
+tmp/a/1011
+tmp/a/1012
+tmp/a/1013
+tmp/a/1014
+tmp/a/1015
+tmp/a/1016
+tmp/a/1017
+tmp/a/1018
+tmp/a/1019
+tmp/a/1020
+tmp/a/1021
+tmp/a/1022
+tmp/a/1023
+tmp/a/1024
+tmp/a/1025
+tmp/a/1026
+tmp/a/1027
+tmp/a/1028
+tmp/a/1029
+tmp/a/1030
+tmp/a/1031
+tmp/a/1032
+tmp/a/1033
+tmp/a/1034
+tmp/a/1035
+tmp/a/1036
+tmp/a/1037
+tmp/a/1038
+tmp/a/1039
+tmp/a/1040
+tmp/a/1041
+tmp/a/1042
+tmp/a/1043
+tmp/a/1044
+tmp/a/1045
+tmp/a/1046
+tmp/a/1047
+tmp/a/1048
+tmp/a/1049
+tmp/a/1050
+tmp/a/1051
+tmp/a/1052
+tmp/a/1053
+tmp/a/1054
+tmp/a/1055
+tmp/a/1056
+tmp/a/1057
+tmp/a/1058
+tmp/a/1059
+tmp/a/1060
+tmp/a/1061
+tmp/a/1062
+tmp/a/1063
+tmp/a/1064
+tmp/a/1065
+tmp/a/1066
+tmp/a/1067
+tmp/a/1068
+tmp/a/1069
+tmp/a/1070
+tmp/a/1071
+tmp/a/1072
+tmp/a/1073
+tmp/a/1074
+tmp/a/1075
+tmp/a/1076
+tmp/a/1077
+tmp/a/1078
+tmp/a/1079
+tmp/a/1080
+tmp/a/1081
+tmp/a/1082
+tmp/a/1083
+tmp/a/1084
+tmp/a/1085
+tmp/a/1086
+tmp/a/1087
+tmp/a/1088
+tmp/a/1089
+tmp/a/1090
+tmp/a/1091
+tmp/a/1092
+tmp/a/1093
+tmp/a/1094
+tmp/a/1095
+tmp/a/1096
+tmp/a/1097
+tmp/a/1098
+tmp/a/1099
+tmp/a/1100
+tmp/a/1101
+tmp/a/1102
+tmp/a/1103
+tmp/a/1104
+tmp/a/1105
+tmp/a/1106
+tmp/a/1107
+tmp/a/1108
+tmp/a/1109
+tmp/a/1110
+tmp/a/1111
+tmp/a/1112
+tmp/a/1113
+tmp/a/1114
+tmp/a/1115
+tmp/a/1116
+tmp/a/1117
+tmp/a/1118
+tmp/a/1119
+tmp/a/1120
+tmp/a/1121
+tmp/a/1122
+tmp/a/1123
+tmp/a/1124
+tmp/a/1125
+tmp/a/1126
+tmp/a/1127
+tmp/a/1128
+tmp/a/1129
+tmp/a/1130
+tmp/a/1131
+tmp/a/1132
+tmp/a/1133
+tmp/a/1134
+tmp/a/1135
+tmp/a/1136
+tmp/a/1137
+tmp/a/1138
+tmp/a/1139
+tmp/a/1140
+tmp/a/1141
+tmp/a/1142
+tmp/a/1143
+tmp/a/1144
+tmp/a/1145
+tmp/a/1146
+tmp/a/1147
+tmp/a/1148
+tmp/a/1149
+tmp/a/1150
+tmp/a/1151
+tmp/a/1152
+tmp/a/1153
+tmp/a/1154
+tmp/a/1155
+tmp/a/1156
+tmp/a/1157
+tmp/a/1158
+tmp/a/1159
+tmp/a/1160
+tmp/a/1161
+tmp/a/1162
+tmp/a/1163
+tmp/a/1164
+tmp/a/1165
+tmp/a/1166
+tmp/a/1167
+tmp/a/1168
+tmp/a/1169
+tmp/a/1170
+tmp/a/1171
+tmp/a/1172
+tmp/a/1173
+tmp/a/1174
+tmp/a/1175
+tmp/a/1176
+tmp/a/1177
+tmp/a/1178
+tmp/a/1179
+tmp/a/1180
+tmp/a/1181
+tmp/a/1182
+tmp/a/1183
+tmp/a/1184
+tmp/a/1185
+tmp/a/1186
+tmp/a/1187
+tmp/a/1188
+tmp/a/1189
+tmp/a/1190
+tmp/a/1191
+tmp/a/1192
+tmp/a/1193
+tmp/a/1194
+tmp/a/1195
+tmp/a/1196
+tmp/a/1197
+tmp/a/1198
+tmp/a/1199
+tmp/a/1200
+tmp/a/1201
+tmp/a/1202
+tmp/a/1203
+tmp/a/1204
+tmp/a/1205
+tmp/a/1206
+tmp/a/1207
+tmp/a/1208
+tmp/a/1209
+tmp/a/1210
+tmp/a/1211
+tmp/a/1212
+tmp/a/1213
+tmp/a/1214
+tmp/a/1215
+tmp/a/1216
+tmp/a/1217
+tmp/a/1218
+tmp/a/1219
+tmp/a/1220
+tmp/a/1221
+tmp/a/1222
+tmp/a/1223
+tmp/a/1224
+tmp/a/1225
+tmp/a/1226
+tmp/a/1227
+tmp/a/1228
+tmp/a/1229
+tmp/a/1230
+tmp/a/1231
+tmp/a/1232
+tmp/a/1233
+tmp/a/1234
+tmp/a/1235
+tmp/a/1236
+tmp/a/1237
+tmp/a/1238
+tmp/a/1239
+tmp/a/1240
+tmp/a/1241
+tmp/a/1242
+tmp/a/1243
+tmp/a/1244
+tmp/a/1245
+tmp/a/1246
+tmp/a/1247
+tmp/a/1248
+tmp/a/1249
+tmp/a/1250
+tmp/a/1251
+tmp/a/1252
+tmp/a/1253
+tmp/a/1254
+tmp/a/1255
+tmp/a/1256
+tmp/a/1257
+tmp/a/1258
+tmp/a/1259
+tmp/a/1260
+tmp/a/1261
+tmp/a/1262
+tmp/a/1263
+tmp/a/1264
+tmp/a/1265
+tmp/a/1266
+tmp/a/1267
+tmp/a/1268
+tmp/a/1269
+tmp/a/1270
+tmp/a/1271
+tmp/a/1272
+tmp/a/1273
+tmp/a/1274
+tmp/a/1275
+tmp/a/1276
+tmp/a/1277
+tmp/a/1278
+tmp/a/1279
+tmp/a/1280
+tmp/a/1281
+tmp/a/1282
+tmp/a/1283
+tmp/a/1284
+tmp/a/1285
+tmp/a/1286
+tmp/a/1287
+tmp/a/1288
+tmp/a/1289
+tmp/a/1290
+tmp/a/1291
+tmp/a/1292
+tmp/a/1293
+tmp/a/1294
+tmp/a/1295
+tmp/a/1296
+tmp/a/1297
+tmp/a/1298
+tmp/a/1299
+tmp/a/1300
+tmp/a/1301
+tmp/a/1302
+tmp/a/1303
+tmp/a/1304
+tmp/a/1305
+tmp/a/1306
+tmp/a/1307
+tmp/a/1308
+tmp/a/1309
+tmp/a/1310
+tmp/a/1311
+tmp/a/1312
+tmp/a/1313
+tmp/a/1314
+tmp/a/1315
+tmp/a/1316
+tmp/a/1317
+tmp/a/1318
+tmp/a/1319
+tmp/a/1320
+tmp/a/1321
+tmp/a/1322
+tmp/a/1323
+tmp/a/1324
+tmp/a/1325
+tmp/a/1326
+tmp/a/1327
+tmp/a/1328
+tmp/a/1329
+tmp/a/1330
+tmp/a/1331
+tmp/a/1332
+tmp/a/1333
+tmp/a/1334
+tmp/a/1335
+tmp/a/1336
+tmp/a/1337
+tmp/a/1338
+tmp/a/1339
+tmp/a/1340
+tmp/a/1341
+tmp/a/1342
+tmp/a/1343
+tmp/a/1344
+tmp/a/1345
+tmp/a/1346
+tmp/a/1347
+tmp/a/1348
+tmp/a/1349
+tmp/a/1350
+tmp/a/1351
+tmp/a/1352
+tmp/a/1353
+tmp/a/1354
+tmp/a/1355
+tmp/a/1356
+tmp/a/1357
+tmp/a/1358
+tmp/a/1359
+tmp/a/1360
+tmp/a/1361
+tmp/a/1362
+tmp/a/1363
+tmp/a/1364
+tmp/a/1365
+tmp/a/1366
+tmp/a/1367
+tmp/a/1368
+tmp/a/1369
+tmp/a/1370
+tmp/a/1371
+tmp/a/1372
+tmp/a/1373
+tmp/a/1374
+tmp/a/1375
+tmp/a/1376
+tmp/a/1377
+tmp/a/1378
+tmp/a/1379
+tmp/a/1380
+tmp/a/1381
+tmp/a/1382
+tmp/a/1383
+tmp/a/1384
+tmp/a/1385
+tmp/a/1386
+tmp/a/1387
+tmp/a/1388
+tmp/a/1389
+tmp/a/1390
+tmp/a/1391
+tmp/a/1392
+tmp/a/1393
+tmp/a/1394
+tmp/a/1395
+tmp/a/1396
+tmp/a/1397
+tmp/a/1398
+tmp/a/1399
+tmp/a/1400
+tmp/a/1401
+tmp/a/1402
+tmp/a/1403
+tmp/a/1404
+tmp/a/1405
+tmp/a/1406
+tmp/a/1407
+tmp/a/1408
+tmp/a/1409
+tmp/a/1410
+tmp/a/1411
+tmp/a/1412
+tmp/a/1413
+tmp/a/1414
+tmp/a/1415
+tmp/a/1416
+tmp/a/1417
+tmp/a/1418
+tmp/a/1419
+tmp/a/1420
+tmp/a/1421
+tmp/a/1422
+tmp/a/1423
+tmp/a/1424
+tmp/a/1425
+tmp/a/1426
+tmp/a/1427
+tmp/a/1428
+tmp/a/1429
+tmp/a/1430
+tmp/a/1431
+tmp/a/1432
+tmp/a/1433
+tmp/a/1434
+tmp/a/1435
+tmp/a/1436
+tmp/a/1437
+tmp/a/1438
+tmp/a/1439
+tmp/a/1440
+tmp/a/1441
+tmp/a/1442
+tmp/a/1443
+tmp/a/1444
+tmp/a/1445
+tmp/a/1446
+tmp/a/1447
+tmp/a/1448
+tmp/a/1449
+tmp/a/1450
+tmp/a/1451
+tmp/a/1452
+tmp/a/1453
+tmp/a/1454
+tmp/a/1455
+tmp/a/1456
+tmp/a/1457
+tmp/a/1458
+tmp/a/1459
+tmp/a/1460
+tmp/a/1461
+tmp/a/1462
+tmp/a/1463
+tmp/a/1464
+tmp/a/1465
+tmp/a/1466
+tmp/a/1467
+tmp/a/1468
+tmp/a/1469
+tmp/a/1470
+tmp/a/1471
+tmp/a/1472
+tmp/a/1473
+tmp/a/1474
+tmp/a/1475
+tmp/a/1476
+tmp/a/1477
+tmp/a/1478
+tmp/a/1479
+tmp/a/1480
+tmp/a/1481
+tmp/a/1482
+tmp/a/1483
+tmp/a/1484
+tmp/a/1485
+tmp/a/1486
+tmp/a/1487
+tmp/a/1488
+tmp/a/1489
+tmp/a/1490
+tmp/a/1491
+tmp/a/1492
+tmp/a/1493
+tmp/a/1494
+tmp/a/1495
+tmp/a/1496
+tmp/a/1497
+tmp/a/1498
+tmp/a/1499
+tmp/a/1500
+tmp/a/1501
+tmp/a/1502
+tmp/a/1503
+tmp/a/1504
+tmp/a/1505
+tmp/a/1506
+tmp/a/1507
+tmp/a/1508
+tmp/a/1509
+tmp/a/1510
+tmp/a/1511
+tmp/a/1512
+tmp/a/1513
+tmp/a/1514
+tmp/a/1515
+tmp/a/1516
+tmp/a/1517
+tmp/a/1518
+tmp/a/1519
+tmp/a/1520
+tmp/a/1521
+tmp/a/1522
+tmp/a/1523
+tmp/a/1524
+tmp/a/1525
+tmp/a/1526
+tmp/a/1527
+tmp/a/1528
+tmp/a/1529
+tmp/a/1530
+tmp/a/1531
+tmp/a/1532
+tmp/a/1533
+tmp/a/1534
+tmp/a/1535
+tmp/a/1536
+tmp/a/1537
+tmp/a/1538
+tmp/a/1539
+tmp/a/1540
+tmp/a/1541
+tmp/a/1542
+tmp/a/1543
+tmp/a/1544
+tmp/a/1545
+tmp/a/1546
+tmp/a/1547
+tmp/a/1548
+tmp/a/1549
+tmp/a/1550
+tmp/a/1551
+tmp/a/1552
+tmp/a/1553
+tmp/a/1554
+tmp/a/1555
+tmp/a/1556
+tmp/a/1557
+tmp/a/1558
+tmp/a/1559
+tmp/a/1560
+tmp/a/1561
+tmp/a/1562
+tmp/a/1563
+tmp/a/1564
+tmp/a/1565
+tmp/a/1566
+tmp/a/1567
+tmp/a/1568
+tmp/a/1569
+tmp/a/1570
+tmp/a/1571
+tmp/a/1572
+tmp/a/1573
+tmp/a/1574
+tmp/a/1575
+tmp/a/1576
+tmp/a/1577
+tmp/a/1578
+tmp/a/1579
+tmp/a/1580
+tmp/a/1581
+tmp/a/1582
+tmp/a/1583
+tmp/a/1584
+tmp/a/1585
+tmp/a/1586
+tmp/a/1587
+tmp/a/1588
+tmp/a/1589
+tmp/a/1590
+tmp/a/1591
+tmp/a/1592
+tmp/a/1593
+tmp/a/1594
+tmp/a/1595
+tmp/a/1596
+tmp/a/1597
+tmp/a/1598
+tmp/a/1599
+tmp/a/1600
+tmp/a/1601
+tmp/a/1602
+tmp/a/1603
+tmp/a/1604
+tmp/a/1605
+tmp/a/1606
+tmp/a/1607
+tmp/a/1608
+tmp/a/1609
+tmp/a/1610
+tmp/a/1611
+tmp/a/1612
+tmp/a/1613
+tmp/a/1614
+tmp/a/1615
+tmp/a/1616
+tmp/a/1617
+tmp/a/1618
+tmp/a/1619
+tmp/a/1620
+tmp/a/1621
+tmp/a/1622
+tmp/a/1623
+tmp/a/1624
+tmp/a/1625
+tmp/a/1626
+tmp/a/1627
+tmp/a/1628
+tmp/a/1629
+tmp/a/1630
+tmp/a/1631
+tmp/a/1632
+tmp/a/1633
+tmp/a/1634
+tmp/a/1635
+tmp/a/1636
+tmp/a/1637
+tmp/a/1638
+tmp/a/1639
+tmp/a/1640
+tmp/a/1641
+tmp/a/1642
+tmp/a/1643
+tmp/a/1644
+tmp/a/1645
+tmp/a/1646
+tmp/a/1647
+tmp/a/1648
+tmp/a/1649
+tmp/a/1650
+tmp/a/1651
+tmp/a/1652
+tmp/a/1653
+tmp/a/1654
+tmp/a/1655
+tmp/a/1656
+tmp/a/1657
+tmp/a/1658
+tmp/a/1659
+tmp/a/1660
+tmp/a/1661
+tmp/a/1662
+tmp/a/1663
+tmp/a/1664
+tmp/a/1665
+tmp/a/1666
+tmp/a/1667
+tmp/a/1668
+tmp/a/1669
+tmp/a/1670
+tmp/a/1671
+tmp/a/1672
+tmp/a/1673
+tmp/a/1674
+tmp/a/1675
+tmp/a/1676
+tmp/a/1677
+tmp/a/1678
+tmp/a/1679
+tmp/a/1680
+tmp/a/1681
+tmp/a/1682
+tmp/a/1683
+tmp/a/1684
+tmp/a/1685
+tmp/a/1686
+tmp/a/1687
+tmp/a/1688
+tmp/a/1689
+tmp/a/1690
+tmp/a/1691
+tmp/a/1692
+tmp/a/1693
+tmp/a/1694
+tmp/a/1695
+tmp/a/1696
+tmp/a/1697
+tmp/a/1698
+tmp/a/1699
+tmp/a/1700
+tmp/a/1701
+tmp/a/1702
+tmp/a/1703
+tmp/a/1704
+tmp/a/1705
+tmp/a/1706
+tmp/a/1707
+tmp/a/1708
+tmp/a/1709
+tmp/a/1710
+tmp/a/1711
+tmp/a/1712
+tmp/a/1713
+tmp/a/1714
+tmp/a/1715
+tmp/a/1716
+tmp/a/1717
+tmp/a/1718
+tmp/a/1719
+tmp/a/1720
+tmp/a/1721
+tmp/a/1722
+tmp/a/1723
+tmp/a/1724
+tmp/a/1725
+tmp/a/1726
+tmp/a/1727
+tmp/a/1728
+tmp/a/1729
+tmp/a/1730
+tmp/a/1731
+tmp/a/1732
+tmp/a/1733
+tmp/a/1734
+tmp/a/1735
+tmp/a/1736
+tmp/a/1737
+tmp/a/1738
+tmp/a/1739
+tmp/a/1740
+tmp/a/1741
+tmp/a/1742
+tmp/a/1743
+tmp/a/1744
+tmp/a/1745
+tmp/a/1746
+tmp/a/1747
+tmp/a/1748
+tmp/a/1749
+tmp/a/1750
+tmp/a/1751
+tmp/a/1752
+tmp/a/1753
+tmp/a/1754
+tmp/a/1755
+tmp/a/1756
+tmp/a/1757
+tmp/a/1758
+tmp/a/1759
+tmp/a/1760
+tmp/a/1761
+tmp/a/1762
+tmp/a/1763
+tmp/a/1764
+tmp/a/1765
+tmp/a/1766
+tmp/a/1767
+tmp/a/1768
+tmp/a/1769
+tmp/a/1770
+tmp/a/1771
+tmp/a/1772
+tmp/a/1773
+tmp/a/1774
+tmp/a/1775
+tmp/a/1776
+tmp/a/1777
+tmp/a/1778
+tmp/a/1779
+tmp/a/1780
+tmp/a/1781
+tmp/a/1782
+tmp/a/1783
+tmp/a/1784
+tmp/a/1785
+tmp/a/1786
+tmp/a/1787
+tmp/a/1788
+tmp/a/1789
+tmp/a/1790
+tmp/a/1791
+tmp/a/1792
+tmp/a/1793
+tmp/a/1794
+tmp/a/1795
+tmp/a/1796
+tmp/a/1797
+tmp/a/1798
+tmp/a/1799
+tmp/a/1800
+tmp/a/1801
+tmp/a/1802
+tmp/a/1803
+tmp/a/1804
+tmp/a/1805
+tmp/a/1806
+tmp/a/1807
+tmp/a/1808
+tmp/a/1809
+tmp/a/1810
+tmp/a/1811
+tmp/a/1812
+tmp/a/1813
+tmp/a/1814
+tmp/a/1815
+tmp/a/1816
+tmp/a/1817
+tmp/a/1818
+tmp/a/1819
+tmp/a/1820
+tmp/a/1821
+tmp/a/1822
+tmp/a/1823
+tmp/a/1824
+tmp/a/1825
+tmp/a/1826
+tmp/a/1827
+tmp/a/1828
+tmp/a/1829
+tmp/a/1830
+tmp/a/1831
+tmp/a/1832
+tmp/a/1833
+tmp/a/1834
+tmp/a/1835
+tmp/a/1836
+tmp/a/1837
+tmp/a/1838
+tmp/a/1839
+tmp/a/1840
+tmp/a/1841
+tmp/a/1842
+tmp/a/1843
+tmp/a/1844
+tmp/a/1845
+tmp/a/1846
+tmp/a/1847
+tmp/a/1848
+tmp/a/1849
+tmp/a/1850
+tmp/a/1851
+tmp/a/1852
+tmp/a/1853
+tmp/a/1854
+tmp/a/1855
+tmp/a/1856
+tmp/a/1857
+tmp/a/1858
+tmp/a/1859
+tmp/a/1860
+tmp/a/1861
+tmp/a/1862
+tmp/a/1863
+tmp/a/1864
+tmp/a/1865
+tmp/a/1866
+tmp/a/1867
+tmp/a/1868
+tmp/a/1869
+tmp/a/1870
+tmp/a/1871
+tmp/a/1872
+tmp/a/1873
+tmp/a/1874
+tmp/a/1875
+tmp/a/1876
+tmp/a/1877
+tmp/a/1878
+tmp/a/1879
+tmp/a/1880
+tmp/a/1881
+tmp/a/1882
+tmp/a/1883
+tmp/a/1884
+tmp/a/1885
+tmp/a/1886
+tmp/a/1887
+tmp/a/1888
+tmp/a/1889
+tmp/a/1890
+tmp/a/1891
+tmp/a/1892
+tmp/a/1893
+tmp/a/1894
+tmp/a/1895
+tmp/a/1896
+tmp/a/1897
+tmp/a/1898
+tmp/a/1899
+tmp/a/1900
+tmp/a/1901
+tmp/a/1902
+tmp/a/1903
+tmp/a/1904
+tmp/a/1905
+tmp/a/1906
+tmp/a/1907
+tmp/a/1908
+tmp/a/1909
+tmp/a/1910
+tmp/a/1911
+tmp/a/1912
+tmp/a/1913
+tmp/a/1914
+tmp/a/1915
+tmp/a/1916
+tmp/a/1917
+tmp/a/1918
+tmp/a/1919
+tmp/a/1920
+tmp/a/1921
+tmp/a/1922
+tmp/a/1923
+tmp/a/1924
+tmp/a/1925
+tmp/a/1926
+tmp/a/1927
+tmp/a/1928
+tmp/a/1929
+tmp/a/1930
+tmp/a/1931
+tmp/a/1932
+tmp/a/1933
+tmp/a/1934
+tmp/a/1935
+tmp/a/1936
+tmp/a/1937
+tmp/a/1938
+tmp/a/1939
+tmp/a/1940
+tmp/a/1941
+tmp/a/1942
+tmp/a/1943
+tmp/a/1944
+tmp/a/1945
+tmp/a/1946
+tmp/a/1947
+tmp/a/1948
+tmp/a/1949
+tmp/a/1950
+tmp/a/1951
+tmp/a/1952
+tmp/a/1953
+tmp/a/1954
+tmp/a/1955
+tmp/a/1956
+tmp/a/1957
+tmp/a/1958
+tmp/a/1959
+tmp/a/1960
+tmp/a/1961
+tmp/a/1962
+tmp/a/1963
+tmp/a/1964
+tmp/a/1965
+tmp/a/1966
+tmp/a/1967
+tmp/a/1968
+tmp/a/1969
+tmp/a/1970
+tmp/a/1971
+tmp/a/1972
+tmp/a/1973
+tmp/a/1974
+tmp/a/1975
+tmp/a/1976
+tmp/a/1977
+tmp/a/1978
+tmp/a/1979
+tmp/a/1980
+tmp/a/1981
+tmp/a/1982
+tmp/a/1983
+tmp/a/1984
+tmp/a/1985
+tmp/a/1986
+tmp/a/1987
+tmp/a/1988
+tmp/a/1989
+tmp/a/1990
+tmp/a/1991
+tmp/a/1992
+tmp/a/1993
+tmp/a/1994
+tmp/a/1995
+tmp/a/1996
+tmp/a/1997
+tmp/a/1998
+tmp/a/1999
+tmp/a/2000
+tmp/a/2001
+tmp/a/2002
+tmp/a/2003
+tmp/a/2004
+tmp/a/2005
+tmp/a/2006
+tmp/a/2007
+tmp/a/2008
+tmp/a/2009
+tmp/a/2010
+tmp/a/2011
+tmp/a/2012
+tmp/a/2013
+tmp/a/2014
+tmp/a/2015
+tmp/a/2016
+tmp/a/2017
+tmp/a/2018
+tmp/a/2019
+tmp/a/2020
+tmp/a/2021
+tmp/a/2022
+tmp/a/2023
+tmp/a/2024
+tmp/a/2025
+tmp/a/2026
+tmp/a/2027
+tmp/a/2028
+tmp/a/2029
+tmp/a/2030
+tmp/a/2031
+tmp/a/2032
+tmp/a/2033
+tmp/a/2034
+tmp/a/2035
+tmp/a/2036
+tmp/a/2037
+tmp/a/2038
+tmp/a/2039
+tmp/a/2040
+tmp/a/2041
+tmp/a/2042
+tmp/a/2043
+tmp/a/2044
+tmp/a/2045
+tmp/a/2046
+tmp/a/2047
+tmp/a/2048
+tmp/a/2049
+tmp/a/2050
+tmp/a/2051
+tmp/a/2052
+tmp/a/2053
+tmp/a/2054
+tmp/a/2055
+tmp/a/2056
+tmp/a/2057
+tmp/a/2058
+tmp/a/2059
+tmp/a/2060
+tmp/a/2061
+tmp/a/2062
+tmp/a/2063
+tmp/a/2064
+tmp/a/2065
+tmp/a/2066
+tmp/a/2067
+tmp/a/2068
+tmp/a/2069
+tmp/a/2070
+tmp/a/2071
+tmp/a/2072
+tmp/a/2073
+tmp/a/2074
+tmp/a/2075
+tmp/a/2076
+tmp/a/2077
+tmp/a/2078
+tmp/a/2079
+tmp/a/2080
+tmp/a/2081
+tmp/a/2082
+tmp/a/2083
+tmp/a/2084
+tmp/a/2085
+tmp/a/2086
+tmp/a/2087
+tmp/a/2088
+tmp/a/2089
+tmp/a/2090
+tmp/a/2091
+tmp/a/2092
+tmp/a/2093
+tmp/a/2094
+tmp/a/2095
+tmp/a/2096
+tmp/a/2097
+tmp/a/2098
+tmp/a/2099
+tmp/a/2100
+tmp/a/2101
+tmp/a/2102
+tmp/a/2103
+tmp/a/2104
+tmp/a/2105
+tmp/a/2106
+tmp/a/2107
+tmp/a/2108
+tmp/a/2109
+tmp/a/2110
+tmp/a/2111
+tmp/a/2112
+tmp/a/2113
+tmp/a/2114
+tmp/a/2115
+tmp/a/2116
+tmp/a/2117
+tmp/a/2118
+tmp/a/2119
+tmp/a/2120
+tmp/a/2121
+tmp/a/2122
+tmp/a/2123
+tmp/a/2124
+tmp/a/2125
+tmp/a/2126
+tmp/a/2127
+tmp/a/2128
+tmp/a/2129
+tmp/a/2130
+tmp/a/2131
+tmp/a/2132
+tmp/a/2133
+tmp/a/2134
+tmp/a/2135
+tmp/a/2136
+tmp/a/2137
+tmp/a/2138
+tmp/a/2139
+tmp/a/2140
+tmp/a/2141
+tmp/a/2142
+tmp/a/2143
+tmp/a/2144
+tmp/a/2145
+tmp/a/2146
+tmp/a/2147
+tmp/a/2148
+tmp/a/2149
+tmp/a/2150
+tmp/a/2151
+tmp/a/2152
+tmp/a/2153
+tmp/a/2154
+tmp/a/2155
+tmp/a/2156
+tmp/a/2157
+tmp/a/2158
+tmp/a/2159
+tmp/a/2160
+tmp/a/2161
+tmp/a/2162
+tmp/a/2163
+tmp/a/2164
+tmp/a/2165
+tmp/a/2166
+tmp/a/2167
+tmp/a/2168
+tmp/a/2169
+tmp/a/2170
+tmp/a/2171
+tmp/a/2172
+tmp/a/2173
+tmp/a/2174
+tmp/a/2175
+tmp/a/2176
+tmp/a/2177
+tmp/a/2178
+tmp/a/2179
+tmp/a/2180
+tmp/a/2181
+tmp/a/2182
+tmp/a/2183
+tmp/a/2184
+tmp/a/2185
+tmp/a/2186
+tmp/a/2187
+tmp/a/2188
+tmp/a/2189
+tmp/a/2190
+tmp/a/2191
+tmp/a/2192
+tmp/a/2193
+tmp/a/2194
+tmp/a/2195
+tmp/a/2196
+tmp/a/2197
+tmp/a/2198
+tmp/a/2199
+tmp/a/2200
+tmp/a/2201
+tmp/a/2202
+tmp/a/2203
+tmp/a/2204
+tmp/a/2205
+tmp/a/2206
+tmp/a/2207
+tmp/a/2208
+tmp/a/2209
+tmp/a/2210
+tmp/a/2211
+tmp/a/2212
+tmp/a/2213
+tmp/a/2214
+tmp/a/2215
+tmp/a/2216
+tmp/a/2217
+tmp/a/2218
+tmp/a/2219
+tmp/a/2220
+tmp/a/2221
+tmp/a/2222
+tmp/a/2223
+tmp/a/2224
+tmp/a/2225
+tmp/a/2226
+tmp/a/2227
+tmp/a/2228
+tmp/a/2229
+tmp/a/2230
+tmp/a/2231
+tmp/a/2232
+tmp/a/2233
+tmp/a/2234
+tmp/a/2235
+tmp/a/2236
+tmp/a/2237
+tmp/a/2238
+tmp/a/2239
+tmp/a/2240
+tmp/a/2241
+tmp/a/2242
+tmp/a/2243
+tmp/a/2244
+tmp/a/2245
+tmp/a/2246
+tmp/a/2247
+tmp/a/2248
+tmp/a/2249
+tmp/a/2250
+tmp/a/2251
+tmp/a/2252
+tmp/a/2253
+tmp/a/2254
+tmp/a/2255
+tmp/a/2256
+tmp/a/2257
+tmp/a/2258
+tmp/a/2259
+tmp/a/2260
+tmp/a/2261
+tmp/a/2262
+tmp/a/2263
+tmp/a/2264
+tmp/a/2265
+tmp/a/2266
+tmp/a/2267
+tmp/a/2268
+tmp/a/2269
+tmp/a/2270
+tmp/a/2271
+tmp/a/2272
+tmp/a/2273
+tmp/a/2274
+tmp/a/2275
+tmp/a/2276
+tmp/a/2277
+tmp/a/2278
+tmp/a/2279
+tmp/a/2280
+tmp/a/2281
+tmp/a/2282
+tmp/a/2283
+tmp/a/2284
+tmp/a/2285
+tmp/a/2286
+tmp/a/2287
+tmp/a/2288
+tmp/a/2289
+tmp/a/2290
+tmp/a/2291
+tmp/a/2292
+tmp/a/2293
+tmp/a/2294
+tmp/a/2295
+tmp/a/2296
+tmp/a/2297
+tmp/a/2298
+tmp/a/2299
+tmp/a/2300
+tmp/a/2301
+tmp/a/2302
+tmp/a/2303
+tmp/a/2304
+tmp/a/2305
+tmp/a/2306
+tmp/a/2307
+tmp/a/2308
+tmp/a/2309
+tmp/a/2310
+tmp/a/2311
+tmp/a/2312
+tmp/a/2313
+tmp/a/2314
+tmp/a/2315
+tmp/a/2316
+tmp/a/2317
+tmp/a/2318
+tmp/a/2319
+tmp/a/2320
+tmp/a/2321
+tmp/a/2322
+tmp/a/2323
+tmp/a/2324
+tmp/a/2325
+tmp/a/2326
+tmp/a/2327
+tmp/a/2328
+tmp/a/2329
+tmp/a/2330
+tmp/a/2331
+tmp/a/2332
+tmp/a/2333
+tmp/a/2334
+tmp/a/2335
+tmp/a/2336
+tmp/a/2337
+tmp/a/2338
+tmp/a/2339
+tmp/a/2340
+tmp/a/2341
+tmp/a/2342
+tmp/a/2343
+tmp/a/2344
+tmp/a/2345
+tmp/a/2346
+tmp/a/2347
+tmp/a/2348
+tmp/a/2349
+tmp/a/2350
+tmp/a/2351
+tmp/a/2352
+tmp/a/2353
+tmp/a/2354
+tmp/a/2355
+tmp/a/2356
+tmp/a/2357
+tmp/a/2358
+tmp/a/2359
+tmp/a/2360
+tmp/a/2361
+tmp/a/2362
+tmp/a/2363
+tmp/a/2364
+tmp/a/2365
+tmp/a/2366
+tmp/a/2367
+tmp/a/2368
+tmp/a/2369
+tmp/a/2370
+tmp/a/2371
+tmp/a/2372
+tmp/a/2373
+tmp/a/2374
+tmp/a/2375
+tmp/a/2376
+tmp/a/2377
+tmp/a/2378
+tmp/a/2379
+tmp/a/2380
+tmp/a/2381
+tmp/a/2382
+tmp/a/2383
+tmp/a/2384
+tmp/a/2385
+tmp/a/2386
+tmp/a/2387
+tmp/a/2388
+tmp/a/2389
+tmp/a/2390
+tmp/a/2391
+tmp/a/2392
+tmp/a/2393
+tmp/a/2394
+tmp/a/2395
+tmp/a/2396
+tmp/a/2397
+tmp/a/2398
+tmp/a/2399
+tmp/a/2400
+tmp/a/2401
+tmp/a/2402
+tmp/a/2403
+tmp/a/2404
+tmp/a/2405
+tmp/a/2406
+tmp/a/2407
+tmp/a/2408
+tmp/a/2409
+tmp/a/2410
+tmp/a/2411
+tmp/a/2412
+tmp/a/2413
+tmp/a/2414
+tmp/a/2415
+tmp/a/2416
+tmp/a/2417
+tmp/a/2418
+tmp/a/2419
+tmp/a/2420
+tmp/a/2421
+tmp/a/2422
+tmp/a/2423
+tmp/a/2424
+tmp/a/2425
+tmp/a/2426
+tmp/a/2427
+tmp/a/2428
+tmp/a/2429
+tmp/a/2430
+tmp/a/2431
+tmp/a/2432
+tmp/a/2433
+tmp/a/2434
+tmp/a/2435
+tmp/a/2436
+tmp/a/2437
+tmp/a/2438
+tmp/a/2439
+tmp/a/2440
+tmp/a/2441
+tmp/a/2442
+tmp/a/2443
+tmp/a/2444
+tmp/a/2445
+tmp/a/2446
+tmp/a/2447
+tmp/a/2448
+tmp/a/2449
+tmp/a/2450
+tmp/a/2451
+tmp/a/2452
+tmp/a/2453
+tmp/a/2454
+tmp/a/2455
+tmp/a/2456
+tmp/a/2457
+tmp/a/2458
+tmp/a/2459
+tmp/a/2460
+tmp/a/2461
+tmp/a/2462
+tmp/a/2463
+tmp/a/2464
+tmp/a/2465
+tmp/a/2466
+tmp/a/2467
+tmp/a/2468
+tmp/a/2469
+tmp/a/2470
+tmp/a/2471
+tmp/a/2472
+tmp/a/2473
+tmp/a/2474
+tmp/a/2475
+tmp/a/2476
+tmp/a/2477
+tmp/a/2478
+tmp/a/2479
+tmp/a/2480
+tmp/a/2481
+tmp/a/2482
+tmp/a/2483
+tmp/a/2484
+tmp/a/2485
+tmp/a/2486
+tmp/a/2487
+tmp/a/2488
+tmp/a/2489
+tmp/a/2490
+tmp/a/2491
+tmp/a/2492
+tmp/a/2493
+tmp/a/2494
+tmp/a/2495
+tmp/a/2496
+tmp/a/2497
+tmp/a/2498
+tmp/a/2499
+tmp/a/2500
+tmp/a/2501
+tmp/a/2502
+tmp/a/2503
+tmp/a/2504
+tmp/a/2505
+tmp/a/2506
+tmp/a/2507
+tmp/a/2508
+tmp/a/2509
+tmp/a/2510
+tmp/a/2511
+tmp/a/2512
+tmp/a/2513
+tmp/a/2514
+tmp/a/2515
+tmp/a/2516
+tmp/a/2517
+tmp/a/2518
+tmp/a/2519
+tmp/a/2520
+tmp/a/2521
+tmp/a/2522
+tmp/a/2523
+tmp/a/2524
+tmp/a/2525
+tmp/a/2526
+tmp/a/2527
+tmp/a/2528
+tmp/a/2529
+tmp/a/2530
+tmp/a/2531
+tmp/a/2532
+tmp/a/2533
+tmp/a/2534
+tmp/a/2535
+tmp/a/2536
+tmp/a/2537
+tmp/a/2538
+tmp/a/2539
+tmp/a/2540
+tmp/a/2541
+tmp/a/2542
+tmp/a/2543
+tmp/a/2544
+tmp/a/2545
+tmp/a/2546
+tmp/a/2547
+tmp/a/2548
+tmp/a/2549
+tmp/a/2550
+tmp/a/2551
+tmp/a/2552
+tmp/a/2553
+tmp/a/2554
+tmp/a/2555
+tmp/a/2556
+tmp/a/2557
+tmp/a/2558
+tmp/a/2559
+tmp/a/2560
+tmp/a/2561
+tmp/a/2562
+tmp/a/2563
+tmp/a/2564
+tmp/a/2565
+tmp/a/2566
+tmp/a/2567
+tmp/a/2568
+tmp/a/2569
+tmp/a/2570
+tmp/a/2571
+tmp/a/2572
+tmp/a/2573
+tmp/a/2574
+tmp/a/2575
+tmp/a/2576
+tmp/a/2577
+tmp/a/2578
+tmp/a/2579
+tmp/a/2580
+tmp/a/2581
+tmp/a/2582
+tmp/a/2583
+tmp/a/2584
+tmp/a/2585
+tmp/a/2586
+tmp/a/2587
+tmp/a/2588
+tmp/a/2589
+tmp/a/2590
+tmp/a/2591
+tmp/a/2592
+tmp/a/2593
+tmp/a/2594
+tmp/a/2595
+tmp/a/2596
+tmp/a/2597
+tmp/a/2598
+tmp/a/2599
+tmp/a/2600
+tmp/a/2601
+tmp/a/2602
+tmp/a/2603
+tmp/a/2604
+tmp/a/2605
+tmp/a/2606
+tmp/a/2607
+tmp/a/2608
+tmp/a/2609
+tmp/a/2610
+tmp/a/2611
+tmp/a/2612
+tmp/a/2613
+tmp/a/2614
+tmp/a/2615
+tmp/a/2616
+tmp/a/2617
+tmp/a/2618
+tmp/a/2619
+tmp/a/2620
+tmp/a/2621
+tmp/a/2622
+tmp/a/2623
+tmp/a/2624
+tmp/a/2625
+tmp/a/2626
+tmp/a/2627
+tmp/a/2628
+tmp/a/2629
+tmp/a/2630
+tmp/a/2631
+tmp/a/2632
+tmp/a/2633
+tmp/a/2634
+tmp/a/2635
+tmp/a/2636
+tmp/a/2637
+tmp/a/2638
+tmp/a/2639
+tmp/a/2640
+tmp/a/2641
+tmp/a/2642
+tmp/a/2643
+tmp/a/2644
+tmp/a/2645
+tmp/a/2646
+tmp/a/2647
+tmp/a/2648
+tmp/a/2649
+tmp/a/2650
+tmp/a/2651
+tmp/a/2652
+tmp/a/2653
+tmp/a/2654
+tmp/a/2655
+tmp/a/2656
+tmp/a/2657
+tmp/a/2658
+tmp/a/2659
+tmp/a/2660
+tmp/a/2661
+tmp/a/2662
+tmp/a/2663
+tmp/a/2664
+tmp/a/2665
+tmp/a/2666
+tmp/a/2667
+tmp/a/2668
+tmp/a/2669
+tmp/a/2670
+tmp/a/2671
+tmp/a/2672
+tmp/a/2673
+tmp/a/2674
+tmp/a/2675
+tmp/a/2676
+tmp/a/2677
+tmp/a/2678
+tmp/a/2679
+tmp/a/2680
+tmp/a/2681
+tmp/a/2682
+tmp/a/2683
+tmp/a/2684
+tmp/a/2685
+tmp/a/2686
+tmp/a/2687
+tmp/a/2688
+tmp/a/2689
+tmp/a/2690
+tmp/a/2691
+tmp/a/2692
+tmp/a/2693
+tmp/a/2694
+tmp/a/2695
+tmp/a/2696
+tmp/a/2697
+tmp/a/2698
+tmp/a/2699
+tmp/a/2700
+tmp/a/2701
+tmp/a/2702
+tmp/a/2703
+tmp/a/2704
+tmp/a/2705
+tmp/a/2706
+tmp/a/2707
+tmp/a/2708
+tmp/a/2709
+tmp/a/2710
+tmp/a/2711
+tmp/a/2712
+tmp/a/2713
+tmp/a/2714
+tmp/a/2715
+tmp/a/2716
+tmp/a/2717
+tmp/a/2718
+tmp/a/2719
+tmp/a/2720
+tmp/a/2721
+tmp/a/2722
+tmp/a/2723
+tmp/a/2724
+tmp/a/2725
+tmp/a/2726
+tmp/a/2727
+tmp/a/2728
+tmp/a/2729
+tmp/a/2730
+tmp/a/2731
+tmp/a/2732
+tmp/a/2733
+tmp/a/2734
+tmp/a/2735
+tmp/a/2736
+tmp/a/2737
+tmp/a/2738
+tmp/a/2739
+tmp/a/2740
+tmp/a/2741
+tmp/a/2742
+tmp/a/2743
+tmp/a/2744
+tmp/a/2745
+tmp/a/2746
+tmp/a/2747
+tmp/a/2748
+tmp/a/2749
+tmp/a/2750
+tmp/a/2751
+tmp/a/2752
+tmp/a/2753
+tmp/a/2754
+tmp/a/2755
+tmp/a/2756
+tmp/a/2757
+tmp/a/2758
+tmp/a/2759
+tmp/a/2760
+tmp/a/2761
+tmp/a/2762
+tmp/a/2763
+tmp/a/2764
+tmp/a/2765
+tmp/a/2766
+tmp/a/2767
+tmp/a/2768
+tmp/a/2769
+tmp/a/2770
+tmp/a/2771
+tmp/a/2772
+tmp/a/2773
+tmp/a/2774
+tmp/a/2775
+tmp/a/2776
+tmp/a/2777
+tmp/a/2778
+tmp/a/2779
+tmp/a/2780
+tmp/a/2781
+tmp/a/2782
+tmp/a/2783
+tmp/a/2784
+tmp/a/2785
+tmp/a/2786
+tmp/a/2787
+tmp/a/2788
+tmp/a/2789
+tmp/a/2790
+tmp/a/2791
+tmp/a/2792
+tmp/a/2793
+tmp/a/2794
+tmp/a/2795
+tmp/a/2796
+tmp/a/2797
+tmp/a/2798
+tmp/a/2799
+tmp/a/2800
+tmp/a/2801
+tmp/a/2802
+tmp/a/2803
+tmp/a/2804
+tmp/a/2805
+tmp/a/2806
+tmp/a/2807
+tmp/a/2808
+tmp/a/2809
+tmp/a/2810
+tmp/a/2811
+tmp/a/2812
+tmp/a/2813
+tmp/a/2814
+tmp/a/2815
+tmp/a/2816
+tmp/a/2817
+tmp/a/2818
+tmp/a/2819
+tmp/a/2820
+tmp/a/2821
+tmp/a/2822
+tmp/a/2823
+tmp/a/2824
+tmp/a/2825
+tmp/a/2826
+tmp/a/2827
+tmp/a/2828
+tmp/a/2829
+tmp/a/2830
+tmp/a/2831
+tmp/a/2832
+tmp/a/2833
+tmp/a/2834
+tmp/a/2835
+tmp/a/2836
+tmp/a/2837
+tmp/a/2838
+tmp/a/2839
+tmp/a/2840
+tmp/a/2841
+tmp/a/2842
+tmp/a/2843
+tmp/a/2844
+tmp/a/2845
+tmp/a/2846
+tmp/a/2847
+tmp/a/2848
+tmp/a/2849
+tmp/a/2850
+tmp/a/2851
+tmp/a/2852
+tmp/a/2853
+tmp/a/2854
+tmp/a/2855
+tmp/a/2856
+tmp/a/2857
+tmp/a/2858
+tmp/a/2859
+tmp/a/2860
+tmp/a/2861
+tmp/a/2862
+tmp/a/2863
+tmp/a/2864
+tmp/a/2865
+tmp/a/2866
+tmp/a/2867
+tmp/a/2868
+tmp/a/2869
+tmp/a/2870
+tmp/a/2871
+tmp/a/2872
+tmp/a/2873
+tmp/a/2874
+tmp/a/2875
+tmp/a/2876
+tmp/a/2877
+tmp/a/2878
+tmp/a/2879
+tmp/a/2880
+tmp/a/2881
+tmp/a/2882
+tmp/a/2883
+tmp/a/2884
+tmp/a/2885
+tmp/a/2886
+tmp/a/2887
+tmp/a/2888
+tmp/a/2889
+tmp/a/2890
+tmp/a/2891
+tmp/a/2892
+tmp/a/2893
+tmp/a/2894
+tmp/a/2895
+tmp/a/2896
+tmp/a/2897
+tmp/a/2898
+tmp/a/2899
+tmp/a/2900
+tmp/a/2901
+tmp/a/2902
+tmp/a/2903
+tmp/a/2904
+tmp/a/2905
+tmp/a/2906
+tmp/a/2907
+tmp/a/2908
+tmp/a/2909
+tmp/a/2910
+tmp/a/2911
+tmp/a/2912
+tmp/a/2913
+tmp/a/2914
+tmp/a/2915
+tmp/a/2916
+tmp/a/2917
+tmp/a/2918
+tmp/a/2919
+tmp/a/2920
+tmp/a/2921
+tmp/a/2922
+tmp/a/2923
+tmp/a/2924
+tmp/a/2925
+tmp/a/2926
+tmp/a/2927
+tmp/a/2928
+tmp/a/2929
+tmp/a/2930
+tmp/a/2931
+tmp/a/2932
+tmp/a/2933
+tmp/a/2934
+tmp/a/2935
+tmp/a/2936
+tmp/a/2937
+tmp/a/2938
+tmp/a/2939
+tmp/a/2940
+tmp/a/2941
+tmp/a/2942
+tmp/a/2943
+tmp/a/2944
+tmp/a/2945
+tmp/a/2946
+tmp/a/2947
+tmp/a/2948
+tmp/a/2949
+tmp/a/2950
+tmp/a/2951
+tmp/a/2952
+tmp/a/2953
+tmp/a/2954
+tmp/a/2955
+tmp/a/2956
+tmp/a/2957
+tmp/a/2958
+tmp/a/2959
+tmp/a/2960
+tmp/a/2961
+tmp/a/2962
+tmp/a/2963
+tmp/a/2964
+tmp/a/2965
+tmp/a/2966
+tmp/a/2967
+tmp/a/2968
+tmp/a/2969
+tmp/a/2970
+tmp/a/2971
+tmp/a/2972
+tmp/a/2973
+tmp/a/2974
+tmp/a/2975
+tmp/a/2976
+tmp/a/2977
+tmp/a/2978
+tmp/a/2979
+tmp/a/2980
+tmp/a/2981
+tmp/a/2982
+tmp/a/2983
+tmp/a/2984
+tmp/a/2985
+tmp/a/2986
+tmp/a/2987
+tmp/a/2988
+tmp/a/2989
+tmp/a/2990
+tmp/a/2991
+tmp/a/2992
+tmp/a/2993
+tmp/a/2994
+tmp/a/2995
+tmp/a/2996
+tmp/a/2997
+tmp/a/2998
+tmp/a/2999
+tmp/a/3000
+tmp/a/3001
+tmp/a/3002
+tmp/a/3003
+tmp/a/3004
+tmp/a/3005
+tmp/a/3006
+tmp/a/3007
+tmp/a/3008
+tmp/a/3009
+tmp/a/3010
+tmp/a/3011
+tmp/a/3012
+tmp/a/3013
+tmp/a/3014
+tmp/a/3015
+tmp/a/3016
+tmp/a/3017
+tmp/a/3018
+tmp/a/3019
+tmp/a/3020
+tmp/a/3021
+tmp/a/3022
+tmp/a/3023
+tmp/a/3024
+tmp/a/3025
+tmp/a/3026
+tmp/a/3027
+tmp/a/3028
+tmp/a/3029
+tmp/a/3030
+tmp/a/3031
+tmp/a/3032
+tmp/a/3033
+tmp/a/3034
+tmp/a/3035
+tmp/a/3036
+tmp/a/3037
+tmp/a/3038
+tmp/a/3039
+tmp/a/3040
+tmp/a/3041
+tmp/a/3042
+tmp/a/3043
+tmp/a/3044
+tmp/a/3045
+tmp/a/3046
+tmp/a/3047
+tmp/a/3048
+tmp/a/3049
+tmp/a/3050
+tmp/a/3051
+tmp/a/3052
+tmp/a/3053
+tmp/a/3054
+tmp/a/3055
+tmp/a/3056
+tmp/a/3057
+tmp/a/3058
+tmp/a/3059
+tmp/a/3060
+tmp/a/3061
+tmp/a/3062
+tmp/a/3063
+tmp/a/3064
+tmp/a/3065
+tmp/a/3066
+tmp/a/3067
+tmp/a/3068
+tmp/a/3069
+tmp/a/3070
+tmp/a/3071
+tmp/a/3072
+tmp/a/3073
+tmp/a/3074
+tmp/a/3075
+tmp/a/3076
+tmp/a/3077
+tmp/a/3078
+tmp/a/3079
+tmp/a/3080
+tmp/a/3081
+tmp/a/3082
+tmp/a/3083
+tmp/a/3084
+tmp/a/3085
+tmp/a/3086
+tmp/a/3087
+tmp/a/3088
+tmp/a/3089
+tmp/a/3090
+tmp/a/3091
+tmp/a/3092
+tmp/a/3093
+tmp/a/3094
+tmp/a/3095
+tmp/a/3096
+tmp/a/3097
+tmp/a/3098
+tmp/a/3099
+tmp/a/3100
+tmp/a/3101
+tmp/a/3102
+tmp/a/3103
+tmp/a/3104
+tmp/a/3105
+tmp/a/3106
+tmp/a/3107
+tmp/a/3108
+tmp/a/3109
+tmp/a/3110
+tmp/a/3111
+tmp/a/3112
+tmp/a/3113
+tmp/a/3114
+tmp/a/3115
+tmp/a/3116
+tmp/a/3117
+tmp/a/3118
+tmp/a/3119
+tmp/a/3120
+tmp/a/3121
+tmp/a/3122
+tmp/a/3123
+tmp/a/3124
+tmp/a/3125
+tmp/a/3126
+tmp/a/3127
+tmp/a/3128
+tmp/a/3129
+tmp/a/3130
+tmp/a/3131
+tmp/a/3132
+tmp/a/3133
+tmp/a/3134
+tmp/a/3135
+tmp/a/3136
+tmp/a/3137
+tmp/a/3138
+tmp/a/3139
+tmp/a/3140
+tmp/a/3141
+tmp/a/3142
+tmp/a/3143
+tmp/a/3144
+tmp/a/3145
+tmp/a/3146
+tmp/a/3147
+tmp/a/3148
+tmp/a/3149
+tmp/a/3150
+tmp/a/3151
+tmp/a/3152
+tmp/a/3153
+tmp/a/3154
+tmp/a/3155
+tmp/a/3156
+tmp/a/3157
+tmp/a/3158
+tmp/a/3159
+tmp/a/3160
+tmp/a/3161
+tmp/a/3162
+tmp/a/3163
+tmp/a/3164
+tmp/a/3165
+tmp/a/3166
+tmp/a/3167
+tmp/a/3168
+tmp/a/3169
+tmp/a/3170
+tmp/a/3171
+tmp/a/3172
+tmp/a/3173
+tmp/a/3174
+tmp/a/3175
+tmp/a/3176
+tmp/a/3177
+tmp/a/3178
+tmp/a/3179
+tmp/a/3180
+tmp/a/3181
+tmp/a/3182
+tmp/a/3183
+tmp/a/3184
+tmp/a/3185
+tmp/a/3186
+tmp/a/3187
+tmp/a/3188
+tmp/a/3189
+tmp/a/3190
+tmp/a/3191
+tmp/a/3192
+tmp/a/3193
+tmp/a/3194
+tmp/a/3195
+tmp/a/3196
+tmp/a/3197
+tmp/a/3198
+tmp/a/3199
+tmp/a/3200
+tmp/a/3201
+tmp/a/3202
+tmp/a/3203
+tmp/a/3204
+tmp/a/3205
+tmp/a/3206
+tmp/a/3207
+tmp/a/3208
+tmp/a/3209
+tmp/a/3210
+tmp/a/3211
+tmp/a/3212
+tmp/a/3213
+tmp/a/3214
+tmp/a/3215
+tmp/a/3216
+tmp/a/3217
+tmp/a/3218
+tmp/a/3219
+tmp/a/3220
+tmp/a/3221
+tmp/a/3222
+tmp/a/3223
+tmp/a/3224
+tmp/a/3225
+tmp/a/3226
+tmp/a/3227
+tmp/a/3228
+tmp/a/3229
+tmp/a/3230
+tmp/a/3231
+tmp/a/3232
+tmp/a/3233
+tmp/a/3234
+tmp/a/3235
+tmp/a/3236
+tmp/a/3237
+tmp/a/3238
+tmp/a/3239
+tmp/a/3240
+tmp/a/3241
+tmp/a/3242
+tmp/a/3243
+tmp/a/3244
+tmp/a/3245
+tmp/a/3246
+tmp/a/3247
+tmp/a/3248
+tmp/a/3249
+tmp/a/3250
+tmp/a/3251
+tmp/a/3252
+tmp/a/3253
+tmp/a/3254
+tmp/a/3255
+tmp/a/3256
+tmp/a/3257
+tmp/a/3258
+tmp/a/3259
+tmp/a/3260
+tmp/a/3261
+tmp/a/3262
+tmp/a/3263
+tmp/a/3264
+tmp/a/3265
+tmp/a/3266
+tmp/a/3267
+tmp/a/3268
+tmp/a/3269
+tmp/a/3270
+tmp/a/3271
+tmp/a/3272
+tmp/a/3273
+tmp/a/3274
+tmp/a/3275
+tmp/a/3276
+tmp/a/3277
+tmp/a/3278
+tmp/a/3279
+tmp/a/3280
+tmp/a/3281
+tmp/a/3282
+tmp/a/3283
+tmp/a/3284
+tmp/a/3285
+tmp/a/3286
+tmp/a/3287
+tmp/a/3288
+tmp/a/3289
+tmp/a/3290
+tmp/a/3291
+tmp/a/3292
+tmp/a/3293
+tmp/a/3294
+tmp/a/3295
+tmp/a/3296
+tmp/a/3297
+tmp/a/3298
+tmp/a/3299
+tmp/a/3300
+tmp/a/3301
+tmp/a/3302
+tmp/a/3303
+tmp/a/3304
+tmp/a/3305
+tmp/a/3306
+tmp/a/3307
+tmp/a/3308
+tmp/a/3309
+tmp/a/3310
+tmp/a/3311
+tmp/a/3312
+tmp/a/3313
+tmp/a/3314
+tmp/a/3315
+tmp/a/3316
+tmp/a/3317
+tmp/a/3318
+tmp/a/3319
+tmp/a/3320
+tmp/a/3321
+tmp/a/3322
+tmp/a/3323
+tmp/a/3324
+tmp/a/3325
+tmp/a/3326
+tmp/a/3327
+tmp/a/3328
+tmp/a/3329
+tmp/a/3330
+tmp/a/3331
+tmp/a/3332
+tmp/a/3333
+tmp/a/3334
+tmp/a/3335
+tmp/a/3336
+tmp/a/3337
+tmp/a/3338
+tmp/a/3339
+tmp/a/3340
+tmp/a/3341
+tmp/a/3342
+tmp/a/3343
+tmp/a/3344
+tmp/a/3345
+tmp/a/3346
+tmp/a/3347
+tmp/a/3348
+tmp/a/3349
+tmp/a/3350
+tmp/a/3351
+tmp/a/3352
+tmp/a/3353
+tmp/a/3354
+tmp/a/3355
+tmp/a/3356
+tmp/a/3357
+tmp/a/3358
+tmp/a/3359
+tmp/a/3360
+tmp/a/3361
+tmp/a/3362
+tmp/a/3363
+tmp/a/3364
+tmp/a/3365
+tmp/a/3366
+tmp/a/3367
+tmp/a/3368
+tmp/a/3369
+tmp/a/3370
+tmp/a/3371
+tmp/a/3372
+tmp/a/3373
+tmp/a/3374
+tmp/a/3375
+tmp/a/3376
+tmp/a/3377
+tmp/a/3378
+tmp/a/3379
+tmp/a/3380
+tmp/a/3381
+tmp/a/3382
+tmp/a/3383
+tmp/a/3384
+tmp/a/3385
+tmp/a/3386
+tmp/a/3387
+tmp/a/3388
+tmp/a/3389
+tmp/a/3390
+tmp/a/3391
+tmp/a/3392
+tmp/a/3393
+tmp/a/3394
+tmp/a/3395
+tmp/a/3396
+tmp/a/3397
+tmp/a/3398
+tmp/a/3399
+tmp/a/3400
+tmp/a/3401
+tmp/a/3402
+tmp/a/3403
+tmp/a/3404
+tmp/a/3405
+tmp/a/3406
+tmp/a/3407
+tmp/a/3408
+tmp/a/3409
+tmp/a/3410
+tmp/a/3411
+tmp/a/3412
+tmp/a/3413
+tmp/a/3414
+tmp/a/3415
+tmp/a/3416
+tmp/a/3417
+tmp/a/3418
+tmp/a/3419
+tmp/a/3420
+tmp/a/3421
+tmp/a/3422
+tmp/a/3423
+tmp/a/3424
+tmp/a/3425
+tmp/a/3426
+tmp/a/3427
+tmp/a/3428
+tmp/a/3429
+tmp/a/3430
+tmp/a/3431
+tmp/a/3432
+tmp/a/3433
+tmp/a/3434
+tmp/a/3435
+tmp/a/3436
+tmp/a/3437
+tmp/a/3438
+tmp/a/3439
+tmp/a/3440
+tmp/a/3441
+tmp/a/3442
+tmp/a/3443
+tmp/a/3444
+tmp/a/3445
+tmp/a/3446
+tmp/a/3447
+tmp/a/3448
+tmp/a/3449
+tmp/a/3450
+tmp/a/3451
+tmp/a/3452
+tmp/a/3453
+tmp/a/3454
+tmp/a/3455
+tmp/a/3456
+tmp/a/3457
+tmp/a/3458
+tmp/a/3459
+tmp/a/3460
+tmp/a/3461
+tmp/a/3462
+tmp/a/3463
+tmp/a/3464
+tmp/a/3465
+tmp/a/3466
+tmp/a/3467
+tmp/a/3468
+tmp/a/3469
+tmp/a/3470
+tmp/a/3471
+tmp/a/3472
+tmp/a/3473
+tmp/a/3474
+tmp/a/3475
+tmp/a/3476
+tmp/a/3477
+tmp/a/3478
+tmp/a/3479
+tmp/a/3480
+tmp/a/3481
+tmp/a/3482
+tmp/a/3483
+tmp/a/3484
+tmp/a/3485
+tmp/a/3486
+tmp/a/3487
+tmp/a/3488
+tmp/a/3489
+tmp/a/3490
+tmp/a/3491
+tmp/a/3492
+tmp/a/3493
+tmp/a/3494
+tmp/a/3495
+tmp/a/3496
+tmp/a/3497
+tmp/a/3498
+tmp/a/3499
+tmp/a/3500
+tmp/a/3501
+tmp/a/3502
+tmp/a/3503
+tmp/a/3504
+tmp/a/3505
+tmp/a/3506
+tmp/a/3507
+tmp/a/3508
+tmp/a/3509
+tmp/a/3510
+tmp/a/3511
+tmp/a/3512
+tmp/a/3513
+tmp/a/3514
+tmp/a/3515
+tmp/a/3516
+tmp/a/3517
+tmp/a/3518
+tmp/a/3519
+tmp/a/3520
+tmp/a/3521
+tmp/a/3522
+tmp/a/3523
+tmp/a/3524
+tmp/a/3525
+tmp/a/3526
+tmp/a/3527
+tmp/a/3528
+tmp/a/3529
+tmp/a/3530
+tmp/a/3531
+tmp/a/3532
+tmp/a/3533
+tmp/a/3534
+tmp/a/3535
+tmp/a/3536
+tmp/a/3537
+tmp/a/3538
+tmp/a/3539
+tmp/a/3540
+tmp/a/3541
+tmp/a/3542
+tmp/a/3543
+tmp/a/3544
+tmp/a/3545
+tmp/a/3546
+tmp/a/3547
+tmp/a/3548
+tmp/a/3549
+tmp/a/3550
+tmp/a/3551
+tmp/a/3552
+tmp/a/3553
+tmp/a/3554
+tmp/a/3555
+tmp/a/3556
+tmp/a/3557
+tmp/a/3558
+tmp/a/3559
+tmp/a/3560
+tmp/a/3561
+tmp/a/3562
+tmp/a/3563
+tmp/a/3564
+tmp/a/3565
+tmp/a/3566
+tmp/a/3567
+tmp/a/3568
+tmp/a/3569
+tmp/a/3570
+tmp/a/3571
+tmp/a/3572
+tmp/a/3573
+tmp/a/3574
+tmp/a/3575
+tmp/a/3576
+tmp/a/3577
+tmp/a/3578
+tmp/a/3579
+tmp/a/3580
+tmp/a/3581
+tmp/a/3582
+tmp/a/3583
+tmp/a/3584
+tmp/a/3585
+tmp/a/3586
+tmp/a/3587
+tmp/a/3588
+tmp/a/3589
+tmp/a/3590
+tmp/a/3591
+tmp/a/3592
+tmp/a/3593
+tmp/a/3594
+tmp/a/3595
+tmp/a/3596
+tmp/a/3597
+tmp/a/3598
+tmp/a/3599
+tmp/a/3600
+tmp/a/3601
+tmp/a/3602
+tmp/a/3603
+tmp/a/3604
+tmp/a/3605
+tmp/a/3606
+tmp/a/3607
+tmp/a/3608
+tmp/a/3609
+tmp/a/3610
+tmp/a/3611
+tmp/a/3612
+tmp/a/3613
+tmp/a/3614
+tmp/a/3615
+tmp/a/3616
+tmp/a/3617
+tmp/a/3618
+tmp/a/3619
+tmp/a/3620
+tmp/a/3621
+tmp/a/3622
+tmp/a/3623
+tmp/a/3624
+tmp/a/3625
+tmp/a/3626
+tmp/a/3627
+tmp/a/3628
+tmp/a/3629
+tmp/a/3630
+tmp/a/3631
+tmp/a/3632
+tmp/a/3633
+tmp/a/3634
+tmp/a/3635
+tmp/a/3636
+tmp/a/3637
+tmp/a/3638
+tmp/a/3639
+tmp/a/3640
+tmp/a/3641
+tmp/a/3642
+tmp/a/3643
+tmp/a/3644
+tmp/a/3645
+tmp/a/3646
+tmp/a/3647
+tmp/a/3648
+tmp/a/3649
+tmp/a/3650
+tmp/a/3651
+tmp/a/3652
+tmp/a/3653
+tmp/a/3654
+tmp/a/3655
+tmp/a/3656
+tmp/a/3657
+tmp/a/3658
+tmp/a/3659
+tmp/a/3660
+tmp/a/3661
+tmp/a/3662
+tmp/a/3663
+tmp/a/3664
+tmp/a/3665
+tmp/a/3666
+tmp/a/3667
+tmp/a/3668
+tmp/a/3669
+tmp/a/3670
+tmp/a/3671
+tmp/a/3672
+tmp/a/3673
+tmp/a/3674
+tmp/a/3675
+tmp/a/3676
+tmp/a/3677
+tmp/a/3678
+tmp/a/3679
+tmp/a/3680
+tmp/a/3681
+tmp/a/3682
+tmp/a/3683
+tmp/a/3684
+tmp/a/3685
+tmp/a/3686
+tmp/a/3687
+tmp/a/3688
+tmp/a/3689
+tmp/a/3690
+tmp/a/3691
+tmp/a/3692
+tmp/a/3693
+tmp/a/3694
+tmp/a/3695
+tmp/a/3696
+tmp/a/3697
+tmp/a/3698
+tmp/a/3699
+tmp/a/3700
+tmp/a/3701
+tmp/a/3702
+tmp/a/3703
+tmp/a/3704
+tmp/a/3705
+tmp/a/3706
+tmp/a/3707
+tmp/a/3708
+tmp/a/3709
+tmp/a/3710
+tmp/a/3711
+tmp/a/3712
+tmp/a/3713
+tmp/a/3714
+tmp/a/3715
+tmp/a/3716
+tmp/a/3717
+tmp/a/3718
+tmp/a/3719
+tmp/a/3720
+tmp/a/3721
+tmp/a/3722
+tmp/a/3723
+tmp/a/3724
+tmp/a/3725
+tmp/a/3726
+tmp/a/3727
+tmp/a/3728
+tmp/a/3729
+tmp/a/3730
+tmp/a/3731
+tmp/a/3732
+tmp/a/3733
+tmp/a/3734
+tmp/a/3735
+tmp/a/3736
+tmp/a/3737
+tmp/a/3738
+tmp/a/3739
+tmp/a/3740
+tmp/a/3741
+tmp/a/3742
+tmp/a/3743
+tmp/a/3744
+tmp/a/3745
+tmp/a/3746
+tmp/a/3747
+tmp/a/3748
+tmp/a/3749
+tmp/a/3750
+tmp/a/3751
+tmp/a/3752
+tmp/a/3753
+tmp/a/3754
+tmp/a/3755
+tmp/a/3756
+tmp/a/3757
+tmp/a/3758
+tmp/a/3759
+tmp/a/3760
+tmp/a/3761
+tmp/a/3762
+tmp/a/3763
+tmp/a/3764
+tmp/a/3765
+tmp/a/3766
+tmp/a/3767
+tmp/a/3768
+tmp/a/3769
+tmp/a/3770
+tmp/a/3771
+tmp/a/3772
+tmp/a/3773
+tmp/a/3774
+tmp/a/3775
+tmp/a/3776
+tmp/a/3777
+tmp/a/3778
+tmp/a/3779
+tmp/a/3780
+tmp/a/3781
+tmp/a/3782
+tmp/a/3783
+tmp/a/3784
+tmp/a/3785
+tmp/a/3786
+tmp/a/3787
+tmp/a/3788
+tmp/a/3789
+tmp/a/3790
+tmp/a/3791
+tmp/a/3792
+tmp/a/3793
+tmp/a/3794
+tmp/a/3795
+tmp/a/3796
+tmp/a/3797
+tmp/a/3798
+tmp/a/3799
+tmp/a/3800
+tmp/a/3801
+tmp/a/3802
+tmp/a/3803
+tmp/a/3804
+tmp/a/3805
+tmp/a/3806
+tmp/a/3807
+tmp/a/3808
+tmp/a/3809
+tmp/a/3810
+tmp/a/3811
+tmp/a/3812
+tmp/a/3813
+tmp/a/3814
+tmp/a/3815
+tmp/a/3816
+tmp/a/3817
+tmp/a/3818
+tmp/a/3819
+tmp/a/3820
+tmp/a/3821
+tmp/a/3822
+tmp/a/3823
+tmp/a/3824
+tmp/a/3825
+tmp/a/3826
+tmp/a/3827
+tmp/a/3828
+tmp/a/3829
+tmp/a/3830
+tmp/a/3831
+tmp/a/3832
+tmp/a/3833
+tmp/a/3834
+tmp/a/3835
+tmp/a/3836
+tmp/a/3837
+tmp/a/3838
+tmp/a/3839
+tmp/a/3840
+tmp/a/3841
+tmp/a/3842
+tmp/a/3843
+tmp/a/3844
+tmp/a/3845
+tmp/a/3846
+tmp/a/3847
+tmp/a/3848
+tmp/a/3849
+tmp/a/3850
+tmp/a/3851
+tmp/a/3852
+tmp/a/3853
+tmp/a/3854
+tmp/a/3855
+tmp/a/3856
+tmp/a/3857
+tmp/a/3858
+tmp/a/3859
+tmp/a/3860
+tmp/a/3861
+tmp/a/3862
+tmp/a/3863
+tmp/a/3864
+tmp/a/3865
+tmp/a/3866
+tmp/a/3867
+tmp/a/3868
+tmp/a/3869
+tmp/a/3870
+tmp/a/3871
+tmp/a/3872
+tmp/a/3873
+tmp/a/3874
+tmp/a/3875
+tmp/a/3876
+tmp/a/3877
+tmp/a/3878
+tmp/a/3879
+tmp/a/3880
+tmp/a/3881
+tmp/a/3882
+tmp/a/3883
+tmp/a/3884
+tmp/a/3885
+tmp/a/3886
+tmp/a/3887
+tmp/a/3888
+tmp/a/3889
+tmp/a/3890
+tmp/a/3891
+tmp/a/3892
+tmp/a/3893
+tmp/a/3894
+tmp/a/3895
+tmp/a/3896
+tmp/a/3897
+tmp/a/3898
+tmp/a/3899
+tmp/a/3900
+tmp/a/3901
+tmp/a/3902
+tmp/a/3903
+tmp/a/3904
+tmp/a/3905
+tmp/a/3906
+tmp/a/3907
+tmp/a/3908
+tmp/a/3909
+tmp/a/3910
+tmp/a/3911
+tmp/a/3912
+tmp/a/3913
+tmp/a/3914
+tmp/a/3915
+tmp/a/3916
+tmp/a/3917
+tmp/a/3918
+tmp/a/3919
+tmp/a/3920
+tmp/a/3921
+tmp/a/3922
+tmp/a/3923
+tmp/a/3924
+tmp/a/3925
+tmp/a/3926
+tmp/a/3927
+tmp/a/3928
+tmp/a/3929
+tmp/a/3930
+tmp/a/3931
+tmp/a/3932
+tmp/a/3933
+tmp/a/3934
+tmp/a/3935
+tmp/a/3936
+tmp/a/3937
+tmp/a/3938
+tmp/a/3939
+tmp/a/3940
+tmp/a/3941
+tmp/a/3942
+tmp/a/3943
+tmp/a/3944
+tmp/a/3945
+tmp/a/3946
+tmp/a/3947
+tmp/a/3948
+tmp/a/3949
+tmp/a/3950
+tmp/a/3951
+tmp/a/3952
+tmp/a/3953
+tmp/a/3954
+tmp/a/3955
+tmp/a/3956
+tmp/a/3957
+tmp/a/3958
+tmp/a/3959
+tmp/a/3960
+tmp/a/3961
+tmp/a/3962
+tmp/a/3963
+tmp/a/3964
+tmp/a/3965
+tmp/a/3966
+tmp/a/3967
+tmp/a/3968
+tmp/a/3969
+tmp/a/3970
+tmp/a/3971
+tmp/a/3972
+tmp/a/3973
+tmp/a/3974
+tmp/a/3975
+tmp/a/3976
+tmp/a/3977
+tmp/a/3978
+tmp/a/3979
+tmp/a/3980
+tmp/a/3981
+tmp/a/3982
+tmp/a/3983
+tmp/a/3984
+tmp/a/3985
+tmp/a/3986
+tmp/a/3987
+tmp/a/3988
+tmp/a/3989
+tmp/a/3990
+tmp/a/3991
+tmp/a/3992
+tmp/a/3993
+tmp/a/3994
+tmp/a/3995
+tmp/a/3996
+tmp/a/3997
+tmp/a/3998
+tmp/a/3999
+tmp/a/4000
+tmp/a/4001
+tmp/a/4002
+tmp/a/4003
+tmp/a/4004
+tmp/a/4005
+tmp/a/4006
+tmp/a/4007
+tmp/a/4008
+tmp/a/4009
+tmp/a/4010
+tmp/a/4011
+tmp/a/4012
+tmp/a/4013
+tmp/a/4014
+tmp/a/4015
+tmp/a/4016
+tmp/a/4017
+tmp/a/4018
+tmp/a/4019
+tmp/a/4020
+tmp/a/4021
+tmp/a/4022
+tmp/a/4023
+tmp/a/4024
+tmp/a/4025
+tmp/a/4026
+tmp/a/4027
+tmp/a/4028
+tmp/a/4029
+tmp/a/4030
+tmp/a/4031
+tmp/a/4032
+tmp/a/4033
+tmp/a/4034
+tmp/a/4035
+tmp/a/4036
+tmp/a/4037
+tmp/a/4038
+tmp/a/4039
+tmp/a/4040
+tmp/a/4041
+tmp/a/4042
+tmp/a/4043
+tmp/a/4044
+tmp/a/4045
+tmp/a/4046
+tmp/a/4047
+tmp/a/4048
+tmp/a/4049
+tmp/a/4050
+tmp/a/4051
+tmp/a/4052
+tmp/a/4053
+tmp/a/4054
+tmp/a/4055
+tmp/a/4056
+tmp/a/4057
+tmp/a/4058
+tmp/a/4059
+tmp/a/4060
+tmp/a/4061
+tmp/a/4062
+tmp/a/4063
+tmp/a/4064
+tmp/a/4065
+tmp/a/4066
+tmp/a/4067
+tmp/a/4068
+tmp/a/4069
+tmp/a/4070
+tmp/a/4071
+tmp/a/4072
+tmp/a/4073
+tmp/a/4074
+tmp/a/4075
+tmp/a/4076
+tmp/a/4077
+tmp/a/4078
+tmp/a/4079
+tmp/a/4080
+tmp/a/4081
+tmp/a/4082
+tmp/a/4083
+tmp/a/4084
+tmp/a/4085
+tmp/a/4086
+tmp/a/4087
+tmp/a/4088
+tmp/a/4089
+tmp/a/4090
+tmp/a/4091
+tmp/a/4092
+tmp/a/4093
+tmp/a/4094
+tmp/a/4095
+tmp/a/4096
+tmp/a/4097
+tmp/a/4098
+tmp/a/4099
+tmp/a/4100
+tmp/a/4101
+tmp/a/4102
+tmp/a/4103
+tmp/a/4104
+tmp/a/4105
+tmp/a/4106
+tmp/a/4107
+tmp/a/4108
+tmp/a/4109
+tmp/a/4110
+tmp/a/4111
+tmp/a/4112
+tmp/a/4113
+tmp/a/4114
+tmp/a/4115
+tmp/a/4116
+tmp/a/4117
+tmp/a/4118
+tmp/a/4119
+tmp/a/4120
+tmp/a/4121
+tmp/a/4122
+tmp/a/4123
+tmp/a/4124
+tmp/a/4125
+tmp/a/4126
+tmp/a/4127
+tmp/a/4128
+tmp/a/4129
+tmp/a/4130
+tmp/a/4131
+tmp/a/4132
+tmp/a/4133
+tmp/a/4134
+tmp/a/4135
+tmp/a/4136
+tmp/a/4137
+tmp/a/4138
+tmp/a/4139
+tmp/a/4140
+tmp/a/4141
+tmp/a/4142
+tmp/a/4143
+tmp/a/4144
+tmp/a/4145
+tmp/a/4146
+tmp/a/4147
+tmp/a/4148
+tmp/a/4149
+tmp/a/4150
+tmp/a/4151
+tmp/a/4152
+tmp/a/4153
+tmp/a/4154
+tmp/a/4155
+tmp/a/4156
+tmp/a/4157
+tmp/a/4158
+tmp/a/4159
+tmp/a/4160
+tmp/a/4161
+tmp/a/4162
+tmp/a/4163
+tmp/a/4164
+tmp/a/4165
+tmp/a/4166
+tmp/a/4167
+tmp/a/4168
+tmp/a/4169
+tmp/a/4170
+tmp/a/4171
+tmp/a/4172
+tmp/a/4173
+tmp/a/4174
+tmp/a/4175
+tmp/a/4176
+tmp/a/4177
+tmp/a/4178
+tmp/a/4179
+tmp/a/4180
+tmp/a/4181
+tmp/a/4182
+tmp/a/4183
+tmp/a/4184
+tmp/a/4185
+tmp/a/4186
+tmp/a/4187
+tmp/a/4188
+tmp/a/4189
+tmp/a/4190
+tmp/a/4191
+tmp/a/4192
+tmp/a/4193
+tmp/a/4194
+tmp/a/4195
+tmp/a/4196
+tmp/a/4197
+tmp/a/4198
+tmp/a/4199
+tmp/a/4200
+tmp/a/4201
+tmp/a/4202
+tmp/a/4203
+tmp/a/4204
+tmp/a/4205
+tmp/a/4206
+tmp/a/4207
+tmp/a/4208
+tmp/a/4209
+tmp/a/4210
+tmp/a/4211
+tmp/a/4212
+tmp/a/4213
+tmp/a/4214
+tmp/a/4215
+tmp/a/4216
+tmp/a/4217
+tmp/a/4218
+tmp/a/4219
+tmp/a/4220
+tmp/a/4221
+tmp/a/4222
+tmp/a/4223
+tmp/a/4224
+tmp/a/4225
+tmp/a/4226
+tmp/a/4227
+tmp/a/4228
+tmp/a/4229
+tmp/a/4230
+tmp/a/4231
+tmp/a/4232
+tmp/a/4233
+tmp/a/4234
+tmp/a/4235
+tmp/a/4236
+tmp/a/4237
+tmp/a/4238
+tmp/a/4239
+tmp/a/4240
+tmp/a/4241
+tmp/a/4242
+tmp/a/4243
+tmp/a/4244
+tmp/a/4245
+tmp/a/4246
+tmp/a/4247
+tmp/a/4248
+tmp/a/4249
+tmp/a/4250
+tmp/a/4251
+tmp/a/4252
+tmp/a/4253
+tmp/a/4254
+tmp/a/4255
+tmp/a/4256
+tmp/a/4257
+tmp/a/4258
+tmp/a/4259
+tmp/a/4260
+tmp/a/4261
+tmp/a/4262
+tmp/a/4263
+tmp/a/4264
+tmp/a/4265
+tmp/a/4266
+tmp/a/4267
+tmp/a/4268
+tmp/a/4269
+tmp/a/4270
+tmp/a/4271
+tmp/a/4272
+tmp/a/4273
+tmp/a/4274
+tmp/a/4275
+tmp/a/4276
+tmp/a/4277
+tmp/a/4278
+tmp/a/4279
+tmp/a/4280
+tmp/a/4281
+tmp/a/4282
+tmp/a/4283
+tmp/a/4284
+tmp/a/4285
+tmp/a/4286
+tmp/a/4287
+tmp/a/4288
+tmp/a/4289
+tmp/a/4290
+tmp/a/4291
+tmp/a/4292
+tmp/a/4293
+tmp/a/4294
+tmp/a/4295
+tmp/a/4296
+tmp/a/4297
+tmp/a/4298
+tmp/a/4299
+tmp/a/4300
+tmp/a/4301
+tmp/a/4302
+tmp/a/4303
+tmp/a/4304
+tmp/a/4305
+tmp/a/4306
+tmp/a/4307
+tmp/a/4308
+tmp/a/4309
+tmp/a/4310
+tmp/a/4311
+tmp/a/4312
+tmp/a/4313
+tmp/a/4314
+tmp/a/4315
+tmp/a/4316
+tmp/a/4317
+tmp/a/4318
+tmp/a/4319
+tmp/a/4320
+tmp/a/4321
+tmp/a/4322
+tmp/a/4323
+tmp/a/4324
+tmp/a/4325
+tmp/a/4326
+tmp/a/4327
+tmp/a/4328
+tmp/a/4329
+tmp/a/4330
+tmp/a/4331
+tmp/a/4332
+tmp/a/4333
+tmp/a/4334
+tmp/a/4335
+tmp/a/4336
+tmp/a/4337
+tmp/a/4338
+tmp/a/4339
+tmp/a/4340
+tmp/a/4341
+tmp/a/4342
+tmp/a/4343
+tmp/a/4344
+tmp/a/4345
+tmp/a/4346
+tmp/a/4347
+tmp/a/4348
+tmp/a/4349
+tmp/a/4350
+tmp/a/4351
+tmp/a/4352
+tmp/a/4353
+tmp/a/4354
+tmp/a/4355
+tmp/a/4356
+tmp/a/4357
+tmp/a/4358
+tmp/a/4359
+tmp/a/4360
+tmp/a/4361
+tmp/a/4362
+tmp/a/4363
+tmp/a/4364
+tmp/a/4365
+tmp/a/4366
+tmp/a/4367
+tmp/a/4368
+tmp/a/4369
+tmp/a/4370
+tmp/a/4371
+tmp/a/4372
+tmp/a/4373
+tmp/a/4374
+tmp/a/4375
+tmp/a/4376
+tmp/a/4377
+tmp/a/4378
+tmp/a/4379
+tmp/a/4380
+tmp/a/4381
+tmp/a/4382
+tmp/a/4383
+tmp/a/4384
+tmp/a/4385
+tmp/a/4386
+tmp/a/4387
+tmp/a/4388
+tmp/a/4389
+tmp/a/4390
+tmp/a/4391
+tmp/a/4392
+tmp/a/4393
+tmp/a/4394
+tmp/a/4395
+tmp/a/4396
+tmp/a/4397
+tmp/a/4398
+tmp/a/4399
+tmp/a/4400
+tmp/a/4401
+tmp/a/4402
+tmp/a/4403
+tmp/a/4404
+tmp/a/4405
+tmp/a/4406
+tmp/a/4407
+tmp/a/4408
+tmp/a/4409
+tmp/a/4410
+tmp/a/4411
+tmp/a/4412
+tmp/a/4413
+tmp/a/4414
+tmp/a/4415
+tmp/a/4416
+tmp/a/4417
+tmp/a/4418
+tmp/a/4419
+tmp/a/4420
+tmp/a/4421
+tmp/a/4422
+tmp/a/4423
+tmp/a/4424
+tmp/a/4425
+tmp/a/4426
+tmp/a/4427
+tmp/a/4428
+tmp/a/4429
+tmp/a/4430
+tmp/a/4431
+tmp/a/4432
+tmp/a/4433
+tmp/a/4434
+tmp/a/4435
+tmp/a/4436
+tmp/a/4437
+tmp/a/4438
+tmp/a/4439
+tmp/a/4440
+tmp/a/4441
+tmp/a/4442
+tmp/a/4443
+tmp/a/4444
+tmp/a/4445
+tmp/a/4446
+tmp/a/4447
+tmp/a/4448
+tmp/a/4449
+tmp/a/4450
+tmp/a/4451
+tmp/a/4452
+tmp/a/4453
+tmp/a/4454
+tmp/a/4455
+tmp/a/4456
+tmp/a/4457
+tmp/a/4458
+tmp/a/4459
+tmp/a/4460
+tmp/a/4461
+tmp/a/4462
+tmp/a/4463
+tmp/a/4464
+tmp/a/4465
+tmp/a/4466
+tmp/a/4467
+tmp/a/4468
+tmp/a/4469
+tmp/a/4470
+tmp/a/4471
+tmp/a/4472
+tmp/a/4473
+tmp/a/4474
+tmp/a/4475
+tmp/a/4476
+tmp/a/4477
+tmp/a/4478
+tmp/a/4479
+tmp/a/4480
+tmp/a/4481
+tmp/a/4482
+tmp/a/4483
+tmp/a/4484
+tmp/a/4485
+tmp/a/4486
+tmp/a/4487
+tmp/a/4488
+tmp/a/4489
+tmp/a/4490
+tmp/a/4491
+tmp/a/4492
+tmp/a/4493
+tmp/a/4494
+tmp/a/4495
+tmp/a/4496
+tmp/a/4497
+tmp/a/4498
+tmp/a/4499
+tmp/a/4500
+tmp/a/4501
+tmp/a/4502
+tmp/a/4503
+tmp/a/4504
+tmp/a/4505
+tmp/a/4506
+tmp/a/4507
+tmp/a/4508
+tmp/a/4509
+tmp/a/4510
+tmp/a/4511
+tmp/a/4512
+tmp/a/4513
+tmp/a/4514
+tmp/a/4515
+tmp/a/4516
+tmp/a/4517
+tmp/a/4518
+tmp/a/4519
+tmp/a/4520
+tmp/a/4521
+tmp/a/4522
+tmp/a/4523
+tmp/a/4524
+tmp/a/4525
+tmp/a/4526
+tmp/a/4527
+tmp/a/4528
+tmp/a/4529
+tmp/a/4530
+tmp/a/4531
+tmp/a/4532
+tmp/a/4533
+tmp/a/4534
+tmp/a/4535
+tmp/a/4536
+tmp/a/4537
+tmp/a/4538
+tmp/a/4539
+tmp/a/4540
+tmp/a/4541
+tmp/a/4542
+tmp/a/4543
+tmp/a/4544
+tmp/a/4545
+tmp/a/4546
+tmp/a/4547
+tmp/a/4548
+tmp/a/4549
+tmp/a/4550
+tmp/a/4551
+tmp/a/4552
+tmp/a/4553
+tmp/a/4554
+tmp/a/4555
+tmp/a/4556
+tmp/a/4557
+tmp/a/4558
+tmp/a/4559
+tmp/a/4560
+tmp/a/4561
+tmp/a/4562
+tmp/a/4563
+tmp/a/4564
+tmp/a/4565
+tmp/a/4566
+tmp/a/4567
+tmp/a/4568
+tmp/a/4569
+tmp/a/4570
+tmp/a/4571
+tmp/a/4572
+tmp/a/4573
+tmp/a/4574
+tmp/a/4575
+tmp/a/4576
+tmp/a/4577
+tmp/a/4578
+tmp/a/4579
+tmp/a/4580
+tmp/a/4581
+tmp/a/4582
+tmp/a/4583
+tmp/a/4584
+tmp/a/4585
+tmp/a/4586
+tmp/a/4587
+tmp/a/4588
+tmp/a/4589
+tmp/a/4590
+tmp/a/4591
+tmp/a/4592
+tmp/a/4593
+tmp/a/4594
+tmp/a/4595
+tmp/a/4596
+tmp/a/4597
+tmp/a/4598
+tmp/a/4599
+tmp/a/4600
+tmp/a/4601
+tmp/a/4602
+tmp/a/4603
+tmp/a/4604
+tmp/a/4605
+tmp/a/4606
+tmp/a/4607
+tmp/a/4608
+tmp/a/4609
+tmp/a/4610
+tmp/a/4611
+tmp/a/4612
+tmp/a/4613
+tmp/a/4614
+tmp/a/4615
+tmp/a/4616
+tmp/a/4617
+tmp/a/4618
+tmp/a/4619
+tmp/a/4620
+tmp/a/4621
+tmp/a/4622
+tmp/a/4623
+tmp/a/4624
+tmp/a/4625
+tmp/a/4626
+tmp/a/4627
+tmp/a/4628
+tmp/a/4629
+tmp/a/4630
+tmp/a/4631
+tmp/a/4632
+tmp/a/4633
+tmp/a/4634
+tmp/a/4635
+tmp/a/4636
+tmp/a/4637
+tmp/a/4638
+tmp/a/4639
+tmp/a/4640
+tmp/a/4641
+tmp/a/4642
+tmp/a/4643
+tmp/a/4644
+tmp/a/4645
+tmp/a/4646
+tmp/a/4647
+tmp/a/4648
+tmp/a/4649
+tmp/a/4650
+tmp/a/4651
+tmp/a/4652
+tmp/a/4653
+tmp/a/4654
+tmp/a/4655
+tmp/a/4656
+tmp/a/4657
+tmp/a/4658
+tmp/a/4659
+tmp/a/4660
+tmp/a/4661
+tmp/a/4662
+tmp/a/4663
+tmp/a/4664
+tmp/a/4665
+tmp/a/4666
+tmp/a/4667
+tmp/a/4668
+tmp/a/4669
+tmp/a/4670
+tmp/a/4671
+tmp/a/4672
+tmp/a/4673
+tmp/a/4674
+tmp/a/4675
+tmp/a/4676
+tmp/a/4677
+tmp/a/4678
+tmp/a/4679
+tmp/a/4680
+tmp/a/4681
+tmp/a/4682
+tmp/a/4683
+tmp/a/4684
+tmp/a/4685
+tmp/a/4686
+tmp/a/4687
+tmp/a/4688
+tmp/a/4689
+tmp/a/4690
+tmp/a/4691
+tmp/a/4692
+tmp/a/4693
+tmp/a/4694
+tmp/a/4695
+tmp/a/4696
+tmp/a/4697
+tmp/a/4698
+tmp/a/4699
+tmp/a/4700
+tmp/a/4701
+tmp/a/4702
+tmp/a/4703
+tmp/a/4704
+tmp/a/4705
+tmp/a/4706
+tmp/a/4707
+tmp/a/4708
+tmp/a/4709
+tmp/a/4710
+tmp/a/4711
+tmp/a/4712
+tmp/a/4713
+tmp/a/4714
+tmp/a/4715
+tmp/a/4716
+tmp/a/4717
+tmp/a/4718
+tmp/a/4719
+tmp/a/4720
+tmp/a/4721
+tmp/a/4722
+tmp/a/4723
+tmp/a/4724
+tmp/a/4725
+tmp/a/4726
+tmp/a/4727
+tmp/a/4728
+tmp/a/4729
+tmp/a/4730
+tmp/a/4731
+tmp/a/4732
+tmp/a/4733
+tmp/a/4734
+tmp/a/4735
+tmp/a/4736
+tmp/a/4737
+tmp/a/4738
+tmp/a/4739
+tmp/a/4740
+tmp/a/4741
+tmp/a/4742
+tmp/a/4743
+tmp/a/4744
+tmp/a/4745
+tmp/a/4746
+tmp/a/4747
+tmp/a/4748
+tmp/a/4749
+tmp/a/4750
+tmp/a/4751
+tmp/a/4752
+tmp/a/4753
+tmp/a/4754
+tmp/a/4755
+tmp/a/4756
+tmp/a/4757
+tmp/a/4758
+tmp/a/4759
+tmp/a/4760
+tmp/a/4761
+tmp/a/4762
+tmp/a/4763
+tmp/a/4764
+tmp/a/4765
+tmp/a/4766
+tmp/a/4767
+tmp/a/4768
+tmp/a/4769
+tmp/a/4770
+tmp/a/4771
+tmp/a/4772
+tmp/a/4773
+tmp/a/4774
+tmp/a/4775
+tmp/a/4776
+tmp/a/4777
+tmp/a/4778
+tmp/a/4779
+tmp/a/4780
+tmp/a/4781
+tmp/a/4782
+tmp/a/4783
+tmp/a/4784
+tmp/a/4785
+tmp/a/4786
+tmp/a/4787
+tmp/a/4788
+tmp/a/4789
+tmp/a/4790
+tmp/a/4791
+tmp/a/4792
+tmp/a/4793
+tmp/a/4794
+tmp/a/4795
+tmp/a/4796
+tmp/a/4797
+tmp/a/4798
+tmp/a/4799
+tmp/a/4800
+tmp/a/4801
+tmp/a/4802
+tmp/a/4803
+tmp/a/4804
+tmp/a/4805
+tmp/a/4806
+tmp/a/4807
+tmp/a/4808
+tmp/a/4809
+tmp/a/4810
+tmp/a/4811
+tmp/a/4812
+tmp/a/4813
+tmp/a/4814
+tmp/a/4815
+tmp/a/4816
+tmp/a/4817
+tmp/a/4818
+tmp/a/4819
+tmp/a/4820
+tmp/a/4821
+tmp/a/4822
+tmp/a/4823
+tmp/a/4824
+tmp/a/4825
+tmp/a/4826
+tmp/a/4827
+tmp/a/4828
+tmp/a/4829
+tmp/a/4830
+tmp/a/4831
+tmp/a/4832
+tmp/a/4833
+tmp/a/4834
+tmp/a/4835
+tmp/a/4836
+tmp/a/4837
+tmp/a/4838
+tmp/a/4839
+tmp/a/4840
+tmp/a/4841
+tmp/a/4842
+tmp/a/4843
+tmp/a/4844
+tmp/a/4845
+tmp/a/4846
+tmp/a/4847
+tmp/a/4848
+tmp/a/4849
+tmp/a/4850
+tmp/a/4851
+tmp/a/4852
+tmp/a/4853
+tmp/a/4854
+tmp/a/4855
+tmp/a/4856
+tmp/a/4857
+tmp/a/4858
+tmp/a/4859
+tmp/a/4860
+tmp/a/4861
+tmp/a/4862
+tmp/a/4863
+tmp/a/4864
+tmp/a/4865
+tmp/a/4866
+tmp/a/4867
+tmp/a/4868
+tmp/a/4869
+tmp/a/4870
+tmp/a/4871
+tmp/a/4872
+tmp/a/4873
+tmp/a/4874
+tmp/a/4875
+tmp/a/4876
+tmp/a/4877
+tmp/a/4878
+tmp/a/4879
+tmp/a/4880
+tmp/a/4881
+tmp/a/4882
+tmp/a/4883
+tmp/a/4884
+tmp/a/4885
+tmp/a/4886
+tmp/a/4887
+tmp/a/4888
+tmp/a/4889
+tmp/a/4890
+tmp/a/4891
+tmp/a/4892
+tmp/a/4893
+tmp/a/4894
+tmp/a/4895
+tmp/a/4896
+tmp/a/4897
+tmp/a/4898
+tmp/a/4899
+tmp/a/4900
+tmp/a/4901
+tmp/a/4902
+tmp/a/4903
+tmp/a/4904
+tmp/a/4905
+tmp/a/4906
+tmp/a/4907
+tmp/a/4908
+tmp/a/4909
+tmp/a/4910
+tmp/a/4911
+tmp/a/4912
+tmp/a/4913
+tmp/a/4914
+tmp/a/4915
+tmp/a/4916
+tmp/a/4917
+tmp/a/4918
+tmp/a/4919
+tmp/a/4920
+tmp/a/4921
+tmp/a/4922
+tmp/a/4923
+tmp/a/4924
+tmp/a/4925
+tmp/a/4926
+tmp/a/4927
+tmp/a/4928
+tmp/a/4929
+tmp/a/4930
+tmp/a/4931
+tmp/a/4932
+tmp/a/4933
+tmp/a/4934
+tmp/a/4935
+tmp/a/4936
+tmp/a/4937
+tmp/a/4938
+tmp/a/4939
+tmp/a/4940
+tmp/a/4941
+tmp/a/4942
+tmp/a/4943
+tmp/a/4944
+tmp/a/4945
+tmp/a/4946
+tmp/a/4947
+tmp/a/4948
+tmp/a/4949
+tmp/a/4950
+tmp/a/4951
+tmp/a/4952
+tmp/a/4953
+tmp/a/4954
+tmp/a/4955
+tmp/a/4956
+tmp/a/4957
+tmp/a/4958
+tmp/a/4959
+tmp/a/4960
+tmp/a/4961
+tmp/a/4962
+tmp/a/4963
+tmp/a/4964
+tmp/a/4965
+tmp/a/4966
+tmp/a/4967
+tmp/a/4968
+tmp/a/4969
+tmp/a/4970
+tmp/a/4971
+tmp/a/4972
+tmp/a/4973
+tmp/a/4974
+tmp/a/4975
+tmp/a/4976
+tmp/a/4977
+tmp/a/4978
+tmp/a/4979
+tmp/a/4980
+tmp/a/4981
+tmp/a/4982
+tmp/a/4983
+tmp/a/4984
+tmp/a/4985
+tmp/a/4986
+tmp/a/4987
+tmp/a/4988
+tmp/a/4989
+tmp/a/4990
+tmp/a/4991
+tmp/a/4992
+tmp/a/4993
+tmp/a/4994
+tmp/a/4995
+tmp/a/4996
+tmp/a/4997
+tmp/a/4998
+tmp/a/4999
+tmp/a/5000
+tmp/a/5001
+tmp/a/5002
+tmp/a/5003
+tmp/a/5004
+tmp/a/5005
+tmp/a/5006
+tmp/a/5007
+tmp/a/5008
+tmp/a/5009
+tmp/a/5010
+tmp/a/5011
+tmp/a/5012
+tmp/a/5013
+tmp/a/5014
+tmp/a/5015
+tmp/a/5016
+tmp/a/5017
+tmp/a/5018
+tmp/a/5019
+tmp/a/5020
+tmp/a/5021
+tmp/a/5022
+tmp/a/5023
+tmp/a/5024
+tmp/a/5025
+tmp/a/5026
+tmp/a/5027
+tmp/a/5028
+tmp/a/5029
+tmp/a/5030
+tmp/a/5031
+tmp/a/5032
+tmp/a/5033
+tmp/a/5034
+tmp/a/5035
+tmp/a/5036
+tmp/a/5037
+tmp/a/5038
+tmp/a/5039
+tmp/a/5040
+tmp/a/5041
+tmp/a/5042
+tmp/a/5043
+tmp/a/5044
+tmp/a/5045
+tmp/a/5046
+tmp/a/5047
+tmp/a/5048
+tmp/a/5049
+tmp/a/5050
+tmp/a/5051
+tmp/a/5052
+tmp/a/5053
+tmp/a/5054
+tmp/a/5055
+tmp/a/5056
+tmp/a/5057
+tmp/a/5058
+tmp/a/5059
+tmp/a/5060
+tmp/a/5061
+tmp/a/5062
+tmp/a/5063
+tmp/a/5064
+tmp/a/5065
+tmp/a/5066
+tmp/a/5067
+tmp/a/5068
+tmp/a/5069
+tmp/a/5070
+tmp/a/5071
+tmp/a/5072
+tmp/a/5073
+tmp/a/5074
+tmp/a/5075
+tmp/a/5076
+tmp/a/5077
+tmp/a/5078
+tmp/a/5079
+tmp/a/5080
+tmp/a/5081
+tmp/a/5082
+tmp/a/5083
+tmp/a/5084
+tmp/a/5085
+tmp/a/5086
+tmp/a/5087
+tmp/a/5088
+tmp/a/5089
+tmp/a/5090
+tmp/a/5091
+tmp/a/5092
+tmp/a/5093
+tmp/a/5094
+tmp/a/5095
+tmp/a/5096
+tmp/a/5097
+tmp/a/5098
+tmp/a/5099
+tmp/a/5100
+tmp/a/5101
+tmp/a/5102
+tmp/a/5103
+tmp/a/5104
+tmp/a/5105
+tmp/a/5106
+tmp/a/5107
+tmp/a/5108
+tmp/a/5109
+tmp/a/5110
+tmp/a/5111
+tmp/a/5112
+tmp/a/5113
+tmp/a/5114
+tmp/a/5115
+tmp/a/5116
+tmp/a/5117
+tmp/a/5118
+tmp/a/5119
+tmp/a/5120
+tmp/a/5121
+tmp/a/5122
+tmp/a/5123
+tmp/a/5124
+tmp/a/5125
+tmp/a/5126
+tmp/a/5127
+tmp/a/5128
+tmp/a/5129
+tmp/a/5130
+tmp/a/5131
+tmp/a/5132
+tmp/a/5133
+tmp/a/5134
+tmp/a/5135
+tmp/a/5136
+tmp/a/5137
+tmp/a/5138
+tmp/a/5139
+tmp/a/5140
+tmp/a/5141
+tmp/a/5142
+tmp/a/5143
+tmp/a/5144
+tmp/a/5145
+tmp/a/5146
+tmp/a/5147
+tmp/a/5148
+tmp/a/5149
+tmp/a/5150
+tmp/a/5151
+tmp/a/5152
+tmp/a/5153
+tmp/a/5154
+tmp/a/5155
+tmp/a/5156
+tmp/a/5157
+tmp/a/5158
+tmp/a/5159
+tmp/a/5160
+tmp/a/5161
+tmp/a/5162
+tmp/a/5163
+tmp/a/5164
+tmp/a/5165
+tmp/a/5166
+tmp/a/5167
+tmp/a/5168
+tmp/a/5169
+tmp/a/5170
+tmp/a/5171
+tmp/a/5172
+tmp/a/5173
+tmp/a/5174
+tmp/a/5175
+tmp/a/5176
+tmp/a/5177
+tmp/a/5178
+tmp/a/5179
+tmp/a/5180
+tmp/a/5181
+tmp/a/5182
+tmp/a/5183
+tmp/a/5184
+tmp/a/5185
+tmp/a/5186
+tmp/a/5187
+tmp/a/5188
+tmp/a/5189
+tmp/a/5190
+tmp/a/5191
+tmp/a/5192
+tmp/a/5193
+tmp/a/5194
+tmp/a/5195
+tmp/a/5196
+tmp/a/5197
+tmp/a/5198
+tmp/a/5199
+tmp/a/5200
+tmp/a/5201
+tmp/a/5202
+tmp/a/5203
+tmp/a/5204
+tmp/a/5205
+tmp/a/5206
+tmp/a/5207
+tmp/a/5208
+tmp/a/5209
+tmp/a/5210
+tmp/a/5211
+tmp/a/5212
+tmp/a/5213
+tmp/a/5214
+tmp/a/5215
+tmp/a/5216
+tmp/a/5217
+tmp/a/5218
+tmp/a/5219
+tmp/a/5220
+tmp/a/5221
+tmp/a/5222
+tmp/a/5223
+tmp/a/5224
+tmp/a/5225
+tmp/a/5226
+tmp/a/5227
+tmp/a/5228
+tmp/a/5229
+tmp/a/5230
+tmp/a/5231
+tmp/a/5232
+tmp/a/5233
+tmp/a/5234
+tmp/a/5235
+tmp/a/5236
+tmp/a/5237
+tmp/a/5238
+tmp/a/5239
+tmp/a/5240
+tmp/a/5241
+tmp/a/5242
+tmp/a/5243
+tmp/a/5244
+tmp/a/5245
+tmp/a/5246
+tmp/a/5247
+tmp/a/5248
+tmp/a/5249
+tmp/a/5250
+tmp/a/5251
+tmp/a/5252
+tmp/a/5253
+tmp/a/5254
+tmp/a/5255
+tmp/a/5256
+tmp/a/5257
+tmp/a/5258
+tmp/a/5259
+tmp/a/5260
+tmp/a/5261
+tmp/a/5262
+tmp/a/5263
+tmp/a/5264
+tmp/a/5265
+tmp/a/5266
+tmp/a/5267
+tmp/a/5268
+tmp/a/5269
+tmp/a/5270
+tmp/a/5271
+tmp/a/5272
+tmp/a/5273
+tmp/a/5274
+tmp/a/5275
+tmp/a/5276
+tmp/a/5277
+tmp/a/5278
+tmp/a/5279
+tmp/a/5280
+tmp/a/5281
+tmp/a/5282
+tmp/a/5283
+tmp/a/5284
+tmp/a/5285
+tmp/a/5286
+tmp/a/5287
+tmp/a/5288
+tmp/a/5289
+tmp/a/5290
+tmp/a/5291
+tmp/a/5292
+tmp/a/5293
+tmp/a/5294
+tmp/a/5295
+tmp/a/5296
+tmp/a/5297
+tmp/a/5298
+tmp/a/5299
+tmp/a/5300
+tmp/a/5301
+tmp/a/5302
+tmp/a/5303
+tmp/a/5304
+tmp/a/5305
+tmp/a/5306
+tmp/a/5307
+tmp/a/5308
+tmp/a/5309
+tmp/a/5310
+tmp/a/5311
+tmp/a/5312
+tmp/a/5313
+tmp/a/5314
+tmp/a/5315
+tmp/a/5316
+tmp/a/5317
+tmp/a/5318
+tmp/a/5319
+tmp/a/5320
+tmp/a/5321
+tmp/a/5322
+tmp/a/5323
+tmp/a/5324
+tmp/a/5325
+tmp/a/5326
+tmp/a/5327
+tmp/a/5328
+tmp/a/5329
+tmp/a/5330
+tmp/a/5331
+tmp/a/5332
+tmp/a/5333
+tmp/a/5334
+tmp/a/5335
+tmp/a/5336
+tmp/a/5337
+tmp/a/5338
+tmp/a/5339
+tmp/a/5340
+tmp/a/5341
+tmp/a/5342
+tmp/a/5343
+tmp/a/5344
+tmp/a/5345
+tmp/a/5346
+tmp/a/5347
+tmp/a/5348
+tmp/a/5349
+tmp/a/5350
+tmp/a/5351
+tmp/a/5352
+tmp/a/5353
+tmp/a/5354
+tmp/a/5355
+tmp/a/5356
+tmp/a/5357
+tmp/a/5358
+tmp/a/5359
+tmp/a/5360
+tmp/a/5361
+tmp/a/5362
+tmp/a/5363
+tmp/a/5364
+tmp/a/5365
+tmp/a/5366
+tmp/a/5367
+tmp/a/5368
+tmp/a/5369
+tmp/a/5370
+tmp/a/5371
+tmp/a/5372
+tmp/a/5373
+tmp/a/5374
+tmp/a/5375
+tmp/a/5376
+tmp/a/5377
+tmp/a/5378
+tmp/a/5379
+tmp/a/5380
+tmp/a/5381
+tmp/a/5382
+tmp/a/5383
+tmp/a/5384
+tmp/a/5385
+tmp/a/5386
+tmp/a/5387
+tmp/a/5388
+tmp/a/5389
+tmp/a/5390
+tmp/a/5391
+tmp/a/5392
+tmp/a/5393
+tmp/a/5394
+tmp/a/5395
+tmp/a/5396
+tmp/a/5397
+tmp/a/5398
+tmp/a/5399
+tmp/a/5400
+tmp/a/5401
+tmp/a/5402
+tmp/a/5403
+tmp/a/5404
+tmp/a/5405
+tmp/a/5406
+tmp/a/5407
+tmp/a/5408
+tmp/a/5409
+tmp/a/5410
+tmp/a/5411
+tmp/a/5412
+tmp/a/5413
+tmp/a/5414
+tmp/a/5415
+tmp/a/5416
+tmp/a/5417
+tmp/a/5418
+tmp/a/5419
+tmp/a/5420
+tmp/a/5421
+tmp/a/5422
+tmp/a/5423
+tmp/a/5424
+tmp/a/5425
+tmp/a/5426
+tmp/a/5427
+tmp/a/5428
+tmp/a/5429
+tmp/a/5430
+tmp/a/5431
+tmp/a/5432
+tmp/a/5433
+tmp/a/5434
+tmp/a/5435
+tmp/a/5436
+tmp/a/5437
+tmp/a/5438
+tmp/a/5439
+tmp/a/5440
+tmp/a/5441
+tmp/a/5442
+tmp/a/5443
+tmp/a/5444
+tmp/a/5445
+tmp/a/5446
+tmp/a/5447
+tmp/a/5448
+tmp/a/5449
+tmp/a/5450
+tmp/a/5451
+tmp/a/5452
+tmp/a/5453
+tmp/a/5454
+tmp/a/5455
+tmp/a/5456
+tmp/a/5457
+tmp/a/5458
+tmp/a/5459
+tmp/a/5460
+tmp/a/5461
+tmp/a/5462
+tmp/a/5463
+tmp/a/5464
+tmp/a/5465
+tmp/a/5466
+tmp/a/5467
+tmp/a/5468
+tmp/a/5469
+tmp/a/5470
+tmp/a/5471
+tmp/a/5472
+tmp/a/5473
+tmp/a/5474
+tmp/a/5475
+tmp/a/5476
+tmp/a/5477
+tmp/a/5478
+tmp/a/5479
+tmp/a/5480
+tmp/a/5481
+tmp/a/5482
+tmp/a/5483
+tmp/a/5484
+tmp/a/5485
+tmp/a/5486
+tmp/a/5487
+tmp/a/5488
+tmp/a/5489
+tmp/a/5490
+tmp/a/5491
+tmp/a/5492
+tmp/a/5493
+tmp/a/5494
+tmp/a/5495
+tmp/a/5496
+tmp/a/5497
+tmp/a/5498
+tmp/a/5499
+tmp/a/5500
+tmp/a/5501
+tmp/a/5502
+tmp/a/5503
+tmp/a/5504
+tmp/a/5505
+tmp/a/5506
+tmp/a/5507
+tmp/a/5508
+tmp/a/5509
+tmp/a/5510
+tmp/a/5511
+tmp/a/5512
+tmp/a/5513
+tmp/a/5514
+tmp/a/5515
+tmp/a/5516
+tmp/a/5517
+tmp/a/5518
+tmp/a/5519
+tmp/a/5520
+tmp/a/5521
+tmp/a/5522
+tmp/a/5523
+tmp/a/5524
+tmp/a/5525
+tmp/a/5526
+tmp/a/5527
+tmp/a/5528
+tmp/a/5529
+tmp/a/5530
+tmp/a/5531
+tmp/a/5532
+tmp/a/5533
+tmp/a/5534
+tmp/a/5535
+tmp/a/5536
+tmp/a/5537
+tmp/a/5538
+tmp/a/5539
+tmp/a/5540
+tmp/a/5541
+tmp/a/5542
+tmp/a/5543
+tmp/a/5544
+tmp/a/5545
+tmp/a/5546
+tmp/a/5547
+tmp/a/5548
+tmp/a/5549
+tmp/a/5550
+tmp/a/5551
+tmp/a/5552
+tmp/a/5553
+tmp/a/5554
+tmp/a/5555
+tmp/a/5556
+tmp/a/5557
+tmp/a/5558
+tmp/a/5559
+tmp/a/5560
+tmp/a/5561
+tmp/a/5562
+tmp/a/5563
+tmp/a/5564
+tmp/a/5565
+tmp/a/5566
+tmp/a/5567
+tmp/a/5568
+tmp/a/5569
+tmp/a/5570
+tmp/a/5571
+tmp/a/5572
+tmp/a/5573
+tmp/a/5574
+tmp/a/5575
+tmp/a/5576
+tmp/a/5577
+tmp/a/5578
+tmp/a/5579
+tmp/a/5580
+tmp/a/5581
+tmp/a/5582
+tmp/a/5583
+tmp/a/5584
+tmp/a/5585
+tmp/a/5586
+tmp/a/5587
+tmp/a/5588
+tmp/a/5589
+tmp/a/5590
+tmp/a/5591
+tmp/a/5592
+tmp/a/5593
+tmp/a/5594
+tmp/a/5595
+tmp/a/5596
+tmp/a/5597
+tmp/a/5598
+tmp/a/5599
+tmp/a/5600
+tmp/a/5601
+tmp/a/5602
+tmp/a/5603
+tmp/a/5604
+tmp/a/5605
+tmp/a/5606
+tmp/a/5607
+tmp/a/5608
+tmp/a/5609
+tmp/a/5610
+tmp/a/5611
+tmp/a/5612
+tmp/a/5613
+tmp/a/5614
+tmp/a/5615
+tmp/a/5616
+tmp/a/5617
+tmp/a/5618
+tmp/a/5619
+tmp/a/5620
+tmp/a/5621
+tmp/a/5622
+tmp/a/5623
+tmp/a/5624
+tmp/a/5625
+tmp/a/5626
+tmp/a/5627
+tmp/a/5628
+tmp/a/5629
+tmp/a/5630
+tmp/a/5631
+tmp/a/5632
+tmp/a/5633
+tmp/a/5634
+tmp/a/5635
+tmp/a/5636
+tmp/a/5637
+tmp/a/5638
+tmp/a/5639
+tmp/a/5640
+tmp/a/5641
+tmp/a/5642
+tmp/a/5643
+tmp/a/5644
+tmp/a/5645
+tmp/a/5646
+tmp/a/5647
+tmp/a/5648
+tmp/a/5649
+tmp/a/5650
+tmp/a/5651
+tmp/a/5652
+tmp/a/5653
+tmp/a/5654
+tmp/a/5655
+tmp/a/5656
+tmp/a/5657
+tmp/a/5658
+tmp/a/5659
+tmp/a/5660
+tmp/a/5661
+tmp/a/5662
+tmp/a/5663
+tmp/a/5664
+tmp/a/5665
+tmp/a/5666
+tmp/a/5667
+tmp/a/5668
+tmp/a/5669
+tmp/a/5670
+tmp/a/5671
+tmp/a/5672
+tmp/a/5673
+tmp/a/5674
+tmp/a/5675
+tmp/a/5676
+tmp/a/5677
+tmp/a/5678
+tmp/a/5679
+tmp/a/5680
+tmp/a/5681
+tmp/a/5682
+tmp/a/5683
+tmp/a/5684
+tmp/a/5685
+tmp/a/5686
+tmp/a/5687
+tmp/a/5688
+tmp/a/5689
+tmp/a/5690
+tmp/a/5691
+tmp/a/5692
+tmp/a/5693
+tmp/a/5694
+tmp/a/5695
+tmp/a/5696
+tmp/a/5697
+tmp/a/5698
+tmp/a/5699
+tmp/a/5700
+tmp/a/5701
+tmp/a/5702
+tmp/a/5703
+tmp/a/5704
+tmp/a/5705
+tmp/a/5706
+tmp/a/5707
+tmp/a/5708
+tmp/a/5709
+tmp/a/5710
+tmp/a/5711
+tmp/a/5712
+tmp/a/5713
+tmp/a/5714
+tmp/a/5715
+tmp/a/5716
+tmp/a/5717
+tmp/a/5718
+tmp/a/5719
+tmp/a/5720
+tmp/a/5721
+tmp/a/5722
+tmp/a/5723
+tmp/a/5724
+tmp/a/5725
+tmp/a/5726
+tmp/a/5727
+tmp/a/5728
+tmp/a/5729
+tmp/a/5730
+tmp/a/5731
+tmp/a/5732
+tmp/a/5733
+tmp/a/5734
+tmp/a/5735
+tmp/a/5736
+tmp/a/5737
+tmp/a/5738
+tmp/a/5739
+tmp/a/5740
+tmp/a/5741
+tmp/a/5742
+tmp/a/5743
+tmp/a/5744
+tmp/a/5745
+tmp/a/5746
+tmp/a/5747
+tmp/a/5748
+tmp/a/5749
+tmp/a/5750
+tmp/a/5751
+tmp/a/5752
+tmp/a/5753
+tmp/a/5754
+tmp/a/5755
+tmp/a/5756
+tmp/a/5757
+tmp/a/5758
+tmp/a/5759
+tmp/a/5760
+tmp/a/5761
+tmp/a/5762
+tmp/a/5763
+tmp/a/5764
+tmp/a/5765
+tmp/a/5766
+tmp/a/5767
+tmp/a/5768
+tmp/a/5769
+tmp/a/5770
+tmp/a/5771
+tmp/a/5772
+tmp/a/5773
+tmp/a/5774
+tmp/a/5775
+tmp/a/5776
+tmp/a/5777
+tmp/a/5778
+tmp/a/5779
+tmp/a/5780
+tmp/a/5781
+tmp/a/5782
+tmp/a/5783
+tmp/a/5784
+tmp/a/5785
+tmp/a/5786
+tmp/a/5787
+tmp/a/5788
+tmp/a/5789
+tmp/a/5790
+tmp/a/5791
+tmp/a/5792
+tmp/a/5793
+tmp/a/5794
+tmp/a/5795
+tmp/a/5796
+tmp/a/5797
+tmp/a/5798
+tmp/a/5799
+tmp/a/5800
+tmp/a/5801
+tmp/a/5802
+tmp/a/5803
+tmp/a/5804
+tmp/a/5805
+tmp/a/5806
+tmp/a/5807
+tmp/a/5808
+tmp/a/5809
+tmp/a/5810
+tmp/a/5811
+tmp/a/5812
+tmp/a/5813
+tmp/a/5814
+tmp/a/5815
+tmp/a/5816
+tmp/a/5817
+tmp/a/5818
+tmp/a/5819
+tmp/a/5820
+tmp/a/5821
+tmp/a/5822
+tmp/a/5823
+tmp/a/5824
+tmp/a/5825
+tmp/a/5826
+tmp/a/5827
+tmp/a/5828
+tmp/a/5829
+tmp/a/5830
+tmp/a/5831
+tmp/a/5832
+tmp/a/5833
+tmp/a/5834
+tmp/a/5835
+tmp/a/5836
+tmp/a/5837
+tmp/a/5838
+tmp/a/5839
+tmp/a/5840
+tmp/a/5841
+tmp/a/5842
+tmp/a/5843
+tmp/a/5844
+tmp/a/5845
+tmp/a/5846
+tmp/a/5847
+tmp/a/5848
+tmp/a/5849
+tmp/a/5850
+tmp/a/5851
+tmp/a/5852
+tmp/a/5853
+tmp/a/5854
+tmp/a/5855
+tmp/a/5856
+tmp/a/5857
+tmp/a/5858
+tmp/a/5859
+tmp/a/5860
+tmp/a/5861
+tmp/a/5862
+tmp/a/5863
+tmp/a/5864
+tmp/a/5865
+tmp/a/5866
+tmp/a/5867
+tmp/a/5868
+tmp/a/5869
+tmp/a/5870
+tmp/a/5871
+tmp/a/5872
+tmp/a/5873
+tmp/a/5874
+tmp/a/5875
+tmp/a/5876
+tmp/a/5877
+tmp/a/5878
+tmp/a/5879
+tmp/a/5880
+tmp/a/5881
+tmp/a/5882
+tmp/a/5883
+tmp/a/5884
+tmp/a/5885
+tmp/a/5886
+tmp/a/5887
+tmp/a/5888
+tmp/a/5889
+tmp/a/5890
+tmp/a/5891
+tmp/a/5892
+tmp/a/5893
+tmp/a/5894
+tmp/a/5895
+tmp/a/5896
+tmp/a/5897
+tmp/a/5898
+tmp/a/5899
+tmp/a/5900
+tmp/a/5901
+tmp/a/5902
+tmp/a/5903
+tmp/a/5904
+tmp/a/5905
+tmp/a/5906
+tmp/a/5907
+tmp/a/5908
+tmp/a/5909
+tmp/a/5910
+tmp/a/5911
+tmp/a/5912
+tmp/a/5913
+tmp/a/5914
+tmp/a/5915
+tmp/a/5916
+tmp/a/5917
+tmp/a/5918
+tmp/a/5919
+tmp/a/5920
+tmp/a/5921
+tmp/a/5922
+tmp/a/5923
+tmp/a/5924
+tmp/a/5925
+tmp/a/5926
+tmp/a/5927
+tmp/a/5928
+tmp/a/5929
+tmp/a/5930
+tmp/a/5931
+tmp/a/5932
+tmp/a/5933
+tmp/a/5934
+tmp/a/5935
+tmp/a/5936
+tmp/a/5937
+tmp/a/5938
+tmp/a/5939
+tmp/a/5940
+tmp/a/5941
+tmp/a/5942
+tmp/a/5943
+tmp/a/5944
+tmp/a/5945
+tmp/a/5946
+tmp/a/5947
+tmp/a/5948
+tmp/a/5949
+tmp/a/5950
+tmp/a/5951
+tmp/a/5952
+tmp/a/5953
+tmp/a/5954
+tmp/a/5955
+tmp/a/5956
+tmp/a/5957
+tmp/a/5958
+tmp/a/5959
+tmp/a/5960
+tmp/a/5961
+tmp/a/5962
+tmp/a/5963
+tmp/a/5964
+tmp/a/5965
+tmp/a/5966
+tmp/a/5967
+tmp/a/5968
+tmp/a/5969
+tmp/a/5970
+tmp/a/5971
+tmp/a/5972
+tmp/a/5973
+tmp/a/5974
+tmp/a/5975
+tmp/a/5976
+tmp/a/5977
+tmp/a/5978
+tmp/a/5979
+tmp/a/5980
+tmp/a/5981
+tmp/a/5982
+tmp/a/5983
+tmp/a/5984
+tmp/a/5985
+tmp/a/5986
+tmp/a/5987
+tmp/a/5988
+tmp/a/5989
+tmp/a/5990
+tmp/a/5991
+tmp/a/5992
+tmp/a/5993
+tmp/a/5994
+tmp/a/5995
+tmp/a/5996
+tmp/a/5997
+tmp/a/5998
+tmp/a/5999
+tmp/a/6000
+tmp/a/6001
+tmp/a/6002
+tmp/a/6003
+tmp/a/6004
+tmp/a/6005
+tmp/a/6006
+tmp/a/6007
+tmp/a/6008
+tmp/a/6009
+tmp/a/6010
+tmp/a/6011
+tmp/a/6012
+tmp/a/6013
+tmp/a/6014
+tmp/a/6015
+tmp/a/6016
+tmp/a/6017
+tmp/a/6018
+tmp/a/6019
+tmp/a/6020
+tmp/a/6021
+tmp/a/6022
+tmp/a/6023
+tmp/a/6024
+tmp/a/6025
+tmp/a/6026
+tmp/a/6027
+tmp/a/6028
+tmp/a/6029
+tmp/a/6030
+tmp/a/6031
+tmp/a/6032
+tmp/a/6033
+tmp/a/6034
+tmp/a/6035
+tmp/a/6036
+tmp/a/6037
+tmp/a/6038
+tmp/a/6039
+tmp/a/6040
+tmp/a/6041
+tmp/a/6042
+tmp/a/6043
+tmp/a/6044
+tmp/a/6045
+tmp/a/6046
+tmp/a/6047
+tmp/a/6048
+tmp/a/6049
+tmp/a/6050
+tmp/a/6051
+tmp/a/6052
+tmp/a/6053
+tmp/a/6054
+tmp/a/6055
+tmp/a/6056
+tmp/a/6057
+tmp/a/6058
+tmp/a/6059
+tmp/a/6060
+tmp/a/6061
+tmp/a/6062
+tmp/a/6063
+tmp/a/6064
+tmp/a/6065
+tmp/a/6066
+tmp/a/6067
+tmp/a/6068
+tmp/a/6069
+tmp/a/6070
+tmp/a/6071
+tmp/a/6072
+tmp/a/6073
+tmp/a/6074
+tmp/a/6075
+tmp/a/6076
+tmp/a/6077
+tmp/a/6078
+tmp/a/6079
+tmp/a/6080
+tmp/a/6081
+tmp/a/6082
+tmp/a/6083
+tmp/a/6084
+tmp/a/6085
+tmp/a/6086
+tmp/a/6087
+tmp/a/6088
+tmp/a/6089
+tmp/a/6090
+tmp/a/6091
+tmp/a/6092
+tmp/a/6093
+tmp/a/6094
+tmp/a/6095
+tmp/a/6096
+tmp/a/6097
+tmp/a/6098
+tmp/a/6099
+tmp/a/6100
+tmp/a/6101
+tmp/a/6102
+tmp/a/6103
+tmp/a/6104
+tmp/a/6105
+tmp/a/6106
+tmp/a/6107
+tmp/a/6108
+tmp/a/6109
+tmp/a/6110
+tmp/a/6111
+tmp/a/6112
+tmp/a/6113
+tmp/a/6114
+tmp/a/6115
+tmp/a/6116
+tmp/a/6117
+tmp/a/6118
+tmp/a/6119
+tmp/a/6120
+tmp/a/6121
+tmp/a/6122
+tmp/a/6123
+tmp/a/6124
+tmp/a/6125
+tmp/a/6126
+tmp/a/6127
+tmp/a/6128
+tmp/a/6129
+tmp/a/6130
+tmp/a/6131
+tmp/a/6132
+tmp/a/6133
+tmp/a/6134
+tmp/a/6135
+tmp/a/6136
+tmp/a/6137
+tmp/a/6138
+tmp/a/6139
+tmp/a/6140
+tmp/a/6141
+tmp/a/6142
+tmp/a/6143
+tmp/a/6144
+tmp/a/6145
+tmp/a/6146
+tmp/a/6147
+tmp/a/6148
+tmp/a/6149
+tmp/a/6150
+tmp/a/6151
+tmp/a/6152
+tmp/a/6153
+tmp/a/6154
+tmp/a/6155
+tmp/a/6156
+tmp/a/6157
+tmp/a/6158
+tmp/a/6159
+tmp/a/6160
+tmp/a/6161
+tmp/a/6162
+tmp/a/6163
+tmp/a/6164
+tmp/a/6165
+tmp/a/6166
+tmp/a/6167
+tmp/a/6168
+tmp/a/6169
+tmp/a/6170
+tmp/a/6171
+tmp/a/6172
+tmp/a/6173
+tmp/a/6174
+tmp/a/6175
+tmp/a/6176
+tmp/a/6177
+tmp/a/6178
+tmp/a/6179
+tmp/a/6180
+tmp/a/6181
+tmp/a/6182
+tmp/a/6183
+tmp/a/6184
+tmp/a/6185
+tmp/a/6186
+tmp/a/6187
+tmp/a/6188
+tmp/a/6189
+tmp/a/6190
+tmp/a/6191
+tmp/a/6192
+tmp/a/6193
+tmp/a/6194
+tmp/a/6195
+tmp/a/6196
+tmp/a/6197
+tmp/a/6198
+tmp/a/6199
+tmp/a/6200
+tmp/a/6201
+tmp/a/6202
+tmp/a/6203
+tmp/a/6204
+tmp/a/6205
+tmp/a/6206
+tmp/a/6207
+tmp/a/6208
+tmp/a/6209
+tmp/a/6210
+tmp/a/6211
+tmp/a/6212
+tmp/a/6213
+tmp/a/6214
+tmp/a/6215
+tmp/a/6216
+tmp/a/6217
+tmp/a/6218
+tmp/a/6219
+tmp/a/6220
+tmp/a/6221
+tmp/a/6222
+tmp/a/6223
+tmp/a/6224
+tmp/a/6225
+tmp/a/6226
+tmp/a/6227
+tmp/a/6228
+tmp/a/6229
+tmp/a/6230
+tmp/a/6231
+tmp/a/6232
+tmp/a/6233
+tmp/a/6234
+tmp/a/6235
+tmp/a/6236
+tmp/a/6237
+tmp/a/6238
+tmp/a/6239
+tmp/a/6240
+tmp/a/6241
+tmp/a/6242
+tmp/a/6243
+tmp/a/6244
+tmp/a/6245
+tmp/a/6246
+tmp/a/6247
+tmp/a/6248
+tmp/a/6249
+tmp/a/6250
+tmp/a/6251
+tmp/a/6252
+tmp/a/6253
+tmp/a/6254
+tmp/a/6255
+tmp/a/6256
+tmp/a/6257
+tmp/a/6258
+tmp/a/6259
+tmp/a/6260
+tmp/a/6261
+tmp/a/6262
+tmp/a/6263
+tmp/a/6264
+tmp/a/6265
+tmp/a/6266
+tmp/a/6267
+tmp/a/6268
+tmp/a/6269
+tmp/a/6270
+tmp/a/6271
+tmp/a/6272
+tmp/a/6273
+tmp/a/6274
+tmp/a/6275
+tmp/a/6276
+tmp/a/6277
+tmp/a/6278
+tmp/a/6279
+tmp/a/6280
+tmp/a/6281
+tmp/a/6282
+tmp/a/6283
+tmp/a/6284
+tmp/a/6285
+tmp/a/6286
+tmp/a/6287
+tmp/a/6288
+tmp/a/6289
+tmp/a/6290
+tmp/a/6291
+tmp/a/6292
+tmp/a/6293
+tmp/a/6294
+tmp/a/6295
+tmp/a/6296
+tmp/a/6297
+tmp/a/6298
+tmp/a/6299
+tmp/a/6300
+tmp/a/6301
+tmp/a/6302
+tmp/a/6303
+tmp/a/6304
+tmp/a/6305
+tmp/a/6306
+tmp/a/6307
+tmp/a/6308
+tmp/a/6309
+tmp/a/6310
+tmp/a/6311
+tmp/a/6312
+tmp/a/6313
+tmp/a/6314
+tmp/a/6315
+tmp/a/6316
+tmp/a/6317
+tmp/a/6318
+tmp/a/6319
+tmp/a/6320
+tmp/a/6321
+tmp/a/6322
+tmp/a/6323
+tmp/a/6324
+tmp/a/6325
+tmp/a/6326
+tmp/a/6327
+tmp/a/6328
+tmp/a/6329
+tmp/a/6330
+tmp/a/6331
+tmp/a/6332
+tmp/a/6333
+tmp/a/6334
+tmp/a/6335
+tmp/a/6336
+tmp/a/6337
+tmp/a/6338
+tmp/a/6339
+tmp/a/6340
+tmp/a/6341
+tmp/a/6342
+tmp/a/6343
+tmp/a/6344
+tmp/a/6345
+tmp/a/6346
+tmp/a/6347
+tmp/a/6348
+tmp/a/6349
+tmp/a/6350
+tmp/a/6351
+tmp/a/6352
+tmp/a/6353
+tmp/a/6354
+tmp/a/6355
+tmp/a/6356
+tmp/a/6357
+tmp/a/6358
+tmp/a/6359
+tmp/a/6360
+tmp/a/6361
+tmp/a/6362
+tmp/a/6363
+tmp/a/6364
+tmp/a/6365
+tmp/a/6366
+tmp/a/6367
+tmp/a/6368
+tmp/a/6369
+tmp/a/6370
+tmp/a/6371
+tmp/a/6372
+tmp/a/6373
+tmp/a/6374
+tmp/a/6375
+tmp/a/6376
+tmp/a/6377
+tmp/a/6378
+tmp/a/6379
+tmp/a/6380
+tmp/a/6381
+tmp/a/6382
+tmp/a/6383
+tmp/a/6384
+tmp/a/6385
+tmp/a/6386
+tmp/a/6387
+tmp/a/6388
+tmp/a/6389
+tmp/a/6390
+tmp/a/6391
+tmp/a/6392
+tmp/a/6393
+tmp/a/6394
+tmp/a/6395
+tmp/a/6396
+tmp/a/6397
+tmp/a/6398
+tmp/a/6399
+tmp/a/6400
+tmp/a/6401
+tmp/a/6402
+tmp/a/6403
+tmp/a/6404
+tmp/a/6405
+tmp/a/6406
+tmp/a/6407
+tmp/a/6408
+tmp/a/6409
+tmp/a/6410
+tmp/a/6411
+tmp/a/6412
+tmp/a/6413
+tmp/a/6414
+tmp/a/6415
+tmp/a/6416
+tmp/a/6417
+tmp/a/6418
+tmp/a/6419
+tmp/a/6420
+tmp/a/6421
+tmp/a/6422
+tmp/a/6423
+tmp/a/6424
+tmp/a/6425
+tmp/a/6426
+tmp/a/6427
+tmp/a/6428
+tmp/a/6429
+tmp/a/6430
+tmp/a/6431
+tmp/a/6432
+tmp/a/6433
+tmp/a/6434
+tmp/a/6435
+tmp/a/6436
+tmp/a/6437
+tmp/a/6438
+tmp/a/6439
+tmp/a/6440
+tmp/a/6441
+tmp/a/6442
+tmp/a/6443
+tmp/a/6444
+tmp/a/6445
+tmp/a/6446
+tmp/a/6447
+tmp/a/6448
+tmp/a/6449
+tmp/a/6450
+tmp/a/6451
+tmp/a/6452
+tmp/a/6453
+tmp/a/6454
+tmp/a/6455
+tmp/a/6456
+tmp/a/6457
+tmp/a/6458
+tmp/a/6459
+tmp/a/6460
+tmp/a/6461
+tmp/a/6462
+tmp/a/6463
+tmp/a/6464
+tmp/a/6465
+tmp/a/6466
+tmp/a/6467
+tmp/a/6468
+tmp/a/6469
+tmp/a/6470
+tmp/a/6471
+tmp/a/6472
+tmp/a/6473
+tmp/a/6474
+tmp/a/6475
+tmp/a/6476
+tmp/a/6477
+tmp/a/6478
+tmp/a/6479
+tmp/a/6480
+tmp/a/6481
+tmp/a/6482
+tmp/a/6483
+tmp/a/6484
+tmp/a/6485
+tmp/a/6486
+tmp/a/6487
+tmp/a/6488
+tmp/a/6489
+tmp/a/6490
+tmp/a/6491
+tmp/a/6492
+tmp/a/6493
+tmp/a/6494
+tmp/a/6495
+tmp/a/6496
+tmp/a/6497
+tmp/a/6498
+tmp/a/6499
+tmp/a/6500
+tmp/a/6501
+tmp/a/6502
+tmp/a/6503
+tmp/a/6504
+tmp/a/6505
+tmp/a/6506
+tmp/a/6507
+tmp/a/6508
+tmp/a/6509
+tmp/a/6510
+tmp/a/6511
+tmp/a/6512
+tmp/a/6513
+tmp/a/6514
+tmp/a/6515
+tmp/a/6516
+tmp/a/6517
+tmp/a/6518
+tmp/a/6519
+tmp/a/6520
+tmp/a/6521
+tmp/a/6522
+tmp/a/6523
+tmp/a/6524
+tmp/a/6525
+tmp/a/6526
+tmp/a/6527
+tmp/a/6528
+tmp/a/6529
+tmp/a/6530
+tmp/a/6531
+tmp/a/6532
+tmp/a/6533
+tmp/a/6534
+tmp/a/6535
+tmp/a/6536
+tmp/a/6537
+tmp/a/6538
+tmp/a/6539
+tmp/a/6540
+tmp/a/6541
+tmp/a/6542
+tmp/a/6543
+tmp/a/6544
+tmp/a/6545
+tmp/a/6546
+tmp/a/6547
+tmp/a/6548
+tmp/a/6549
+tmp/a/6550
+tmp/a/6551
+tmp/a/6552
+tmp/a/6553
+tmp/a/6554
+tmp/a/6555
+tmp/a/6556
+tmp/a/6557
+tmp/a/6558
+tmp/a/6559
+tmp/a/6560
+tmp/a/6561
+tmp/a/6562
+tmp/a/6563
+tmp/a/6564
+tmp/a/6565
+tmp/a/6566
+tmp/a/6567
+tmp/a/6568
+tmp/a/6569
+tmp/a/6570
+tmp/a/6571
+tmp/a/6572
+tmp/a/6573
+tmp/a/6574
+tmp/a/6575
+tmp/a/6576
+tmp/a/6577
+tmp/a/6578
+tmp/a/6579
+tmp/a/6580
+tmp/a/6581
+tmp/a/6582
+tmp/a/6583
+tmp/a/6584
+tmp/a/6585
+tmp/a/6586
+tmp/a/6587
+tmp/a/6588
+tmp/a/6589
+tmp/a/6590
+tmp/a/6591
+tmp/a/6592
+tmp/a/6593
+tmp/a/6594
+tmp/a/6595
+tmp/a/6596
+tmp/a/6597
+tmp/a/6598
+tmp/a/6599
+tmp/a/6600
+tmp/a/6601
+tmp/a/6602
+tmp/a/6603
+tmp/a/6604
+tmp/a/6605
+tmp/a/6606
+tmp/a/6607
+tmp/a/6608
+tmp/a/6609
+tmp/a/6610
+tmp/a/6611
+tmp/a/6612
+tmp/a/6613
+tmp/a/6614
+tmp/a/6615
+tmp/a/6616
+tmp/a/6617
+tmp/a/6618
+tmp/a/6619
+tmp/a/6620
+tmp/a/6621
+tmp/a/6622
+tmp/a/6623
+tmp/a/6624
+tmp/a/6625
+tmp/a/6626
+tmp/a/6627
+tmp/a/6628
+tmp/a/6629
+tmp/a/6630
+tmp/a/6631
+tmp/a/6632
+tmp/a/6633
+tmp/a/6634
+tmp/a/6635
+tmp/a/6636
+tmp/a/6637
+tmp/a/6638
+tmp/a/6639
+tmp/a/6640
+tmp/a/6641
+tmp/a/6642
+tmp/a/6643
+tmp/a/6644
+tmp/a/6645
+tmp/a/6646
+tmp/a/6647
+tmp/a/6648
+tmp/a/6649
+tmp/a/6650
+tmp/a/6651
+tmp/a/6652
+tmp/a/6653
+tmp/a/6654
+tmp/a/6655
+tmp/a/6656
+tmp/a/6657
+tmp/a/6658
+tmp/a/6659
+tmp/a/6660
+tmp/a/6661
+tmp/a/6662
+tmp/a/6663
+tmp/a/6664
+tmp/a/6665
+tmp/a/6666
+tmp/a/6667
+tmp/a/6668
+tmp/a/6669
+tmp/a/6670
+tmp/a/6671
+tmp/a/6672
+tmp/a/6673
+tmp/a/6674
+tmp/a/6675
+tmp/a/6676
+tmp/a/6677
+tmp/a/6678
+tmp/a/6679
+tmp/a/6680
+tmp/a/6681
+tmp/a/6682
+tmp/a/6683
+tmp/a/6684
+tmp/a/6685
+tmp/a/6686
+tmp/a/6687
+tmp/a/6688
+tmp/a/6689
+tmp/a/6690
+tmp/a/6691
+tmp/a/6692
+tmp/a/6693
+tmp/a/6694
+tmp/a/6695
+tmp/a/6696
+tmp/a/6697
+tmp/a/6698
+tmp/a/6699
+tmp/a/6700
+tmp/a/6701
+tmp/a/6702
+tmp/a/6703
+tmp/a/6704
+tmp/a/6705
+tmp/a/6706
+tmp/a/6707
+tmp/a/6708
+tmp/a/6709
+tmp/a/6710
+tmp/a/6711
+tmp/a/6712
+tmp/a/6713
+tmp/a/6714
+tmp/a/6715
+tmp/a/6716
+tmp/a/6717
+tmp/a/6718
+tmp/a/6719
+tmp/a/6720
+tmp/a/6721
+tmp/a/6722
+tmp/a/6723
+tmp/a/6724
+tmp/a/6725
+tmp/a/6726
+tmp/a/6727
+tmp/a/6728
+tmp/a/6729
+tmp/a/6730
+tmp/a/6731
+tmp/a/6732
+tmp/a/6733
+tmp/a/6734
+tmp/a/6735
+tmp/a/6736
+tmp/a/6737
+tmp/a/6738
+tmp/a/6739
+tmp/a/6740
+tmp/a/6741
+tmp/a/6742
+tmp/a/6743
+tmp/a/6744
+tmp/a/6745
+tmp/a/6746
+tmp/a/6747
+tmp/a/6748
+tmp/a/6749
+tmp/a/6750
+tmp/a/6751
+tmp/a/6752
+tmp/a/6753
+tmp/a/6754
+tmp/a/6755
+tmp/a/6756
+tmp/a/6757
+tmp/a/6758
+tmp/a/6759
+tmp/a/6760
+tmp/a/6761
+tmp/a/6762
+tmp/a/6763
+tmp/a/6764
+tmp/a/6765
+tmp/a/6766
+tmp/a/6767
+tmp/a/6768
+tmp/a/6769
+tmp/a/6770
+tmp/a/6771
+tmp/a/6772
+tmp/a/6773
+tmp/a/6774
+tmp/a/6775
+tmp/a/6776
+tmp/a/6777
+tmp/a/6778
+tmp/a/6779
+tmp/a/6780
+tmp/a/6781
+tmp/a/6782
+tmp/a/6783
+tmp/a/6784
+tmp/a/6785
+tmp/a/6786
+tmp/a/6787
+tmp/a/6788
+tmp/a/6789
+tmp/a/6790
+tmp/a/6791
+tmp/a/6792
+tmp/a/6793
+tmp/a/6794
+tmp/a/6795
+tmp/a/6796
+tmp/a/6797
+tmp/a/6798
+tmp/a/6799
+tmp/a/6800
+tmp/a/6801
+tmp/a/6802
+tmp/a/6803
+tmp/a/6804
+tmp/a/6805
+tmp/a/6806
+tmp/a/6807
+tmp/a/6808
+tmp/a/6809
+tmp/a/6810
+tmp/a/6811
+tmp/a/6812
+tmp/a/6813
+tmp/a/6814
+tmp/a/6815
+tmp/a/6816
+tmp/a/6817
+tmp/a/6818
+tmp/a/6819
+tmp/a/6820
+tmp/a/6821
+tmp/a/6822
+tmp/a/6823
+tmp/a/6824
+tmp/a/6825
+tmp/a/6826
+tmp/a/6827
+tmp/a/6828
+tmp/a/6829
+tmp/a/6830
+tmp/a/6831
+tmp/a/6832
+tmp/a/6833
+tmp/a/6834
+tmp/a/6835
+tmp/a/6836
+tmp/a/6837
+tmp/a/6838
+tmp/a/6839
+tmp/a/6840
+tmp/a/6841
+tmp/a/6842
+tmp/a/6843
+tmp/a/6844
+tmp/a/6845
+tmp/a/6846
+tmp/a/6847
+tmp/a/6848
+tmp/a/6849
+tmp/a/6850
+tmp/a/6851
+tmp/a/6852
+tmp/a/6853
+tmp/a/6854
+tmp/a/6855
+tmp/a/6856
+tmp/a/6857
+tmp/a/6858
+tmp/a/6859
+tmp/a/6860
+tmp/a/6861
+tmp/a/6862
+tmp/a/6863
+tmp/a/6864
+tmp/a/6865
+tmp/a/6866
+tmp/a/6867
+tmp/a/6868
+tmp/a/6869
+tmp/a/6870
+tmp/a/6871
+tmp/a/6872
+tmp/a/6873
+tmp/a/6874
+tmp/a/6875
+tmp/a/6876
+tmp/a/6877
+tmp/a/6878
+tmp/a/6879
+tmp/a/6880
+tmp/a/6881
+tmp/a/6882
+tmp/a/6883
+tmp/a/6884
+tmp/a/6885
+tmp/a/6886
+tmp/a/6887
+tmp/a/6888
+tmp/a/6889
+tmp/a/6890
+tmp/a/6891
+tmp/a/6892
+tmp/a/6893
+tmp/a/6894
+tmp/a/6895
+tmp/a/6896
+tmp/a/6897
+tmp/a/6898
+tmp/a/6899
+tmp/a/6900
+tmp/a/6901
+tmp/a/6902
+tmp/a/6903
+tmp/a/6904
+tmp/a/6905
+tmp/a/6906
+tmp/a/6907
+tmp/a/6908
+tmp/a/6909
+tmp/a/6910
+tmp/a/6911
+tmp/a/6912
+tmp/a/6913
+tmp/a/6914
+tmp/a/6915
+tmp/a/6916
+tmp/a/6917
+tmp/a/6918
+tmp/a/6919
+tmp/a/6920
+tmp/a/6921
+tmp/a/6922
+tmp/a/6923
+tmp/a/6924
+tmp/a/6925
+tmp/a/6926
+tmp/a/6927
+tmp/a/6928
+tmp/a/6929
+tmp/a/6930
+tmp/a/6931
+tmp/a/6932
+tmp/a/6933
+tmp/a/6934
+tmp/a/6935
+tmp/a/6936
+tmp/a/6937
+tmp/a/6938
+tmp/a/6939
+tmp/a/6940
+tmp/a/6941
+tmp/a/6942
+tmp/a/6943
+tmp/a/6944
+tmp/a/6945
+tmp/a/6946
+tmp/a/6947
+tmp/a/6948
+tmp/a/6949
+tmp/a/6950
+tmp/a/6951
+tmp/a/6952
+tmp/a/6953
+tmp/a/6954
+tmp/a/6955
+tmp/a/6956
+tmp/a/6957
+tmp/a/6958
+tmp/a/6959
+tmp/a/6960
+tmp/a/6961
+tmp/a/6962
+tmp/a/6963
+tmp/a/6964
+tmp/a/6965
+tmp/a/6966
+tmp/a/6967
+tmp/a/6968
+tmp/a/6969
+tmp/a/6970
+tmp/a/6971
+tmp/a/6972
+tmp/a/6973
+tmp/a/6974
+tmp/a/6975
+tmp/a/6976
+tmp/a/6977
+tmp/a/6978
+tmp/a/6979
+tmp/a/6980
+tmp/a/6981
+tmp/a/6982
+tmp/a/6983
+tmp/a/6984
+tmp/a/6985
+tmp/a/6986
+tmp/a/6987
+tmp/a/6988
+tmp/a/6989
+tmp/a/6990
+tmp/a/6991
+tmp/a/6992
+tmp/a/6993
+tmp/a/6994
+tmp/a/6995
+tmp/a/6996
+tmp/a/6997
+tmp/a/6998
+tmp/a/6999
+tmp/a/7000
+tmp/a/7001
+tmp/a/7002
+tmp/a/7003
+tmp/a/7004
+tmp/a/7005
+tmp/a/7006
+tmp/a/7007
+tmp/a/7008
+tmp/a/7009
+tmp/a/7010
+tmp/a/7011
+tmp/a/7012
+tmp/a/7013
+tmp/a/7014
+tmp/a/7015
+tmp/a/7016
+tmp/a/7017
+tmp/a/7018
+tmp/a/7019
+tmp/a/7020
+tmp/a/7021
+tmp/a/7022
+tmp/a/7023
+tmp/a/7024
+tmp/a/7025
+tmp/a/7026
+tmp/a/7027
+tmp/a/7028
+tmp/a/7029
+tmp/a/7030
+tmp/a/7031
+tmp/a/7032
+tmp/a/7033
+tmp/a/7034
+tmp/a/7035
+tmp/a/7036
+tmp/a/7037
+tmp/a/7038
+tmp/a/7039
+tmp/a/7040
+tmp/a/7041
+tmp/a/7042
+tmp/a/7043
+tmp/a/7044
+tmp/a/7045
+tmp/a/7046
+tmp/a/7047
+tmp/a/7048
+tmp/a/7049
+tmp/a/7050
+tmp/a/7051
+tmp/a/7052
+tmp/a/7053
+tmp/a/7054
+tmp/a/7055
+tmp/a/7056
+tmp/a/7057
+tmp/a/7058
+tmp/a/7059
+tmp/a/7060
+tmp/a/7061
+tmp/a/7062
+tmp/a/7063
+tmp/a/7064
+tmp/a/7065
+tmp/a/7066
+tmp/a/7067
+tmp/a/7068
+tmp/a/7069
+tmp/a/7070
+tmp/a/7071
+tmp/a/7072
+tmp/a/7073
+tmp/a/7074
+tmp/a/7075
+tmp/a/7076
+tmp/a/7077
+tmp/a/7078
+tmp/a/7079
+tmp/a/7080
+tmp/a/7081
+tmp/a/7082
+tmp/a/7083
+tmp/a/7084
+tmp/a/7085
+tmp/a/7086
+tmp/a/7087
+tmp/a/7088
+tmp/a/7089
+tmp/a/7090
+tmp/a/7091
+tmp/a/7092
+tmp/a/7093
+tmp/a/7094
+tmp/a/7095
+tmp/a/7096
+tmp/a/7097
+tmp/a/7098
+tmp/a/7099
+tmp/a/7100
+tmp/a/7101
+tmp/a/7102
+tmp/a/7103
+tmp/a/7104
+tmp/a/7105
+tmp/a/7106
+tmp/a/7107
+tmp/a/7108
+tmp/a/7109
+tmp/a/7110
+tmp/a/7111
+tmp/a/7112
+tmp/a/7113
+tmp/a/7114
+tmp/a/7115
+tmp/a/7116
+tmp/a/7117
+tmp/a/7118
+tmp/a/7119
+tmp/a/7120
+tmp/a/7121
+tmp/a/7122
+tmp/a/7123
+tmp/a/7124
+tmp/a/7125
+tmp/a/7126
+tmp/a/7127
+tmp/a/7128
+tmp/a/7129
+tmp/a/7130
+tmp/a/7131
+tmp/a/7132
+tmp/a/7133
+tmp/a/7134
+tmp/a/7135
+tmp/a/7136
+tmp/a/7137
+tmp/a/7138
+tmp/a/7139
+tmp/a/7140
+tmp/a/7141
+tmp/a/7142
+tmp/a/7143
+tmp/a/7144
+tmp/a/7145
+tmp/a/7146
+tmp/a/7147
+tmp/a/7148
+tmp/a/7149
+tmp/a/7150
+tmp/a/7151
+tmp/a/7152
+tmp/a/7153
+tmp/a/7154
+tmp/a/7155
+tmp/a/7156
+tmp/a/7157
+tmp/a/7158
+tmp/a/7159
+tmp/a/7160
+tmp/a/7161
+tmp/a/7162
+tmp/a/7163
+tmp/a/7164
+tmp/a/7165
+tmp/a/7166
+tmp/a/7167
+tmp/a/7168
+tmp/a/7169
+tmp/a/7170
+tmp/a/7171
+tmp/a/7172
+tmp/a/7173
+tmp/a/7174
+tmp/a/7175
+tmp/a/7176
+tmp/a/7177
+tmp/a/7178
+tmp/a/7179
+tmp/a/7180
+tmp/a/7181
+tmp/a/7182
+tmp/a/7183
+tmp/a/7184
+tmp/a/7185
+tmp/a/7186
+tmp/a/7187
+tmp/a/7188
+tmp/a/7189
+tmp/a/7190
+tmp/a/7191
+tmp/a/7192
+tmp/a/7193
+tmp/a/7194
+tmp/a/7195
+tmp/a/7196
+tmp/a/7197
+tmp/a/7198
+tmp/a/7199
+tmp/a/7200
diff --git a/find/testsuite/find.posix/exec-one.exp b/find/testsuite/find.posix/exec-one.exp
new file mode 100644 (file)
index 0000000..a4a7ef6
--- /dev/null
@@ -0,0 +1,5 @@
+# tests for -name
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/jim
+find_start p {tmp -name fred -exec echo \{\} \; }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/exec-one.xo b/find/testsuite/find.posix/exec-one.xo
new file mode 100644 (file)
index 0000000..8cc8940
--- /dev/null
@@ -0,0 +1 @@
+tmp/fred
diff --git a/find/testsuite/find.posix/files-not-expressions1.exp b/find/testsuite/find.posix/files-not-expressions1.exp
new file mode 100644 (file)
index 0000000..b1de3ac
--- /dev/null
@@ -0,0 +1,8 @@
+set files "\(1 "
+
+foreach file $files { touch $file }
+
+# shoud not result in a fatal error.  
+find_start p { \(1 }
+
+foreach file $files { file delete -- $file }
diff --git a/find/testsuite/find.posix/files-not-expressions1.xo b/find/testsuite/find.posix/files-not-expressions1.xo
new file mode 100644 (file)
index 0000000..000b2a0
--- /dev/null
@@ -0,0 +1 @@
+(1
diff --git a/find/testsuite/find.posix/files-not-expressions2.exp b/find/testsuite/find.posix/files-not-expressions2.exp
new file mode 100644 (file)
index 0000000..e6dcef2
--- /dev/null
@@ -0,0 +1,8 @@
+set files "!2"
+
+foreach file $files { touch $file }
+
+# shoud not result in a fatal error.  
+find_start p { !2 }
+
+foreach file $files { file delete -- $file }
diff --git a/find/testsuite/find.posix/files-not-expressions2.xo b/find/testsuite/find.posix/files-not-expressions2.xo
new file mode 100644 (file)
index 0000000..a829de6
--- /dev/null
@@ -0,0 +1 @@
+!2
diff --git a/find/testsuite/find.posix/files-not-expressions3.exp b/find/testsuite/find.posix/files-not-expressions3.exp
new file mode 100644 (file)
index 0000000..4bd454b
--- /dev/null
@@ -0,0 +1,8 @@
+set files "\)"
+
+foreach file $files { touch $file }
+
+# shoud not result in a fatal error.  
+find_start p { \) }
+
+foreach file $files { file delete -- $file }
diff --git a/find/testsuite/find.posix/files-not-expressions3.xo b/find/testsuite/find.posix/files-not-expressions3.xo
new file mode 100644 (file)
index 0000000..bea8cd1
--- /dev/null
@@ -0,0 +1 @@
+)
diff --git a/find/testsuite/find.posix/group-empty.exp b/find/testsuite/find.posix/group-empty.exp
new file mode 100644 (file)
index 0000000..3e83190
--- /dev/null
@@ -0,0 +1,2 @@
+# test for diagnosis of the fact that the argument to -group is empty
+find_start f { . -group "" }
diff --git a/find/testsuite/find.posix/group-missing.exp b/find/testsuite/find.posix/group-missing.exp
new file mode 100644 (file)
index 0000000..c3e2735
--- /dev/null
@@ -0,0 +1,5 @@
+# test for diagnosis of the fact that the argument to -group is missing
+exec rm -rf tmp
+exec touch tmp
+find_start f { tmp -group }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/grouping.exp b/find/testsuite/find.posix/grouping.exp
new file mode 100644 (file)
index 0000000..c5ce2d7
--- /dev/null
@@ -0,0 +1,5 @@
+# tests for !
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/jim
+find_start p {tmp \! \( -name fred -o -name tmp \)  -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/grouping.xo b/find/testsuite/find.posix/grouping.xo
new file mode 100644 (file)
index 0000000..a7eac4c
--- /dev/null
@@ -0,0 +1 @@
+tmp/jim
\ No newline at end of file
diff --git a/find/testsuite/find.posix/links.exp b/find/testsuite/find.posix/links.exp
new file mode 100644 (file)
index 0000000..adb0fae
--- /dev/null
@@ -0,0 +1,25 @@
+# tests for -links
+exec rm -rf tmp
+exec mkdir tmp
+touch tmp/file1 tmp/file2 tmp/file3
+
+# four links including the original file
+exec ln tmp/file1 tmp/1a
+exec ln tmp/file1 tmp/1b
+exec ln tmp/file1 tmp/1c
+
+# five links including the original file
+exec ln tmp/file2 tmp/2a
+exec ln tmp/file2 tmp/2b
+exec ln tmp/file2 tmp/2c
+exec ln tmp/file2 tmp/2d
+
+# six links including the original file
+exec ln tmp/file3 tmp/3a
+exec ln tmp/file3 tmp/3b
+exec ln tmp/file3 tmp/3c
+exec ln tmp/file3 tmp/3d
+exec ln tmp/file3 tmp/3e
+
+find_start p { tmp/file1 tmp/file2 tmp/file3  -type f ( ( -links -5 -exec echo under5 \{\} \; ) -o ( -links 5 -exec echo exactly5 \{\} \; ) -o ( -links +5 -exec echo over5 \{\} \; ) ) }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/links.xo b/find/testsuite/find.posix/links.xo
new file mode 100644 (file)
index 0000000..311447f
--- /dev/null
@@ -0,0 +1,3 @@
+exactly5 tmp/file2
+over5 tmp/file3
+under5 tmp/file1
diff --git a/find/testsuite/find.posix/mtime0.exp b/find/testsuite/find.posix/mtime0.exp
new file mode 100644 (file)
index 0000000..23237a1
--- /dev/null
@@ -0,0 +1,10 @@
+## Test for find . -mtime 0
+## This detects Savannah bug #22056, -Xtime tests are off by one second
+
+exec rm -rf tmp
+exec mkdir tmp
+# Touch the file in the setup phase, to make sure its mtime is as
+# recent as possible.
+proc prep {} { exec touch tmp/x }
+find_start p { tmp -type f -mtime 0 } "" "" prep
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/mtime0.xo b/find/testsuite/find.posix/mtime0.xo
new file mode 100644 (file)
index 0000000..74c14ef
--- /dev/null
@@ -0,0 +1 @@
+tmp/x
diff --git a/find/testsuite/find.posix/name-missing.exp b/find/testsuite/find.posix/name-missing.exp
new file mode 100644 (file)
index 0000000..da8ae5a
--- /dev/null
@@ -0,0 +1,5 @@
+# test for diagnosis of the fact that the argument to -name is missing
+exec rm -rf tmp
+exec touch tmp
+find_start f { tmp -name }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/name.exp b/find/testsuite/find.posix/name.exp
new file mode 100644 (file)
index 0000000..65c6f5f
--- /dev/null
@@ -0,0 +1,5 @@
+# tests for -name
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/jim
+find_start p {tmp -name fred -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/name.xo b/find/testsuite/find.posix/name.xo
new file mode 100644 (file)
index 0000000..8cc8940
--- /dev/null
@@ -0,0 +1 @@
+tmp/fred
diff --git a/find/testsuite/find.posix/nameslash.exp b/find/testsuite/find.posix/nameslash.exp
new file mode 100644 (file)
index 0000000..1aaf220
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for -name and trailing slashes.
+# See http://www.opengroup.org/austin/interps/uploads/40/14959/AI-186.txt
+# This is a test for Savannah bug #20970. 
+exec rm -rf tmp
+exec mkdir tmp tmp/foo tmp/bar
+find_start p {tmp/foo/// tmp/bar/// -name foo -o -name 'bar?*'}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/nameslash.xo b/find/testsuite/find.posix/nameslash.xo
new file mode 100644 (file)
index 0000000..e94ef73
--- /dev/null
@@ -0,0 +1 @@
+tmp/foo///
diff --git a/find/testsuite/find.posix/parent.exp b/find/testsuite/find.posix/parent.exp
new file mode 100644 (file)
index 0000000..1cdca3b
--- /dev/null
@@ -0,0 +1,7 @@
+# test for handling of unreadable parent directory
+exec rm -rf tmp
+exec mkdir tmp tmp/dir
+exec chmod a-rw tmp
+find_start p {tmp/dir}
+exec chmod u+rw tmp
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/parent.xo b/find/testsuite/find.posix/parent.xo
new file mode 100644 (file)
index 0000000..2dc4706
--- /dev/null
@@ -0,0 +1 @@
+tmp/dir
diff --git a/find/testsuite/find.posix/perm-X.exp b/find/testsuite/find.posix/perm-X.exp
new file mode 100644 (file)
index 0000000..28e78ad
--- /dev/null
@@ -0,0 +1,12 @@
+# tests for -perm with X
+exec rm -rf tmp
+exec mkdir tmp
+exec chmod 755 tmp
+exec true > tmp/empty
+exec true > tmp/empty-xxx
+exec chmod 711 tmp/empty-xxx
+exec mkdir tmp/sub
+exec chmod 300 tmp/sub
+find_start p { tmp \( ! -name sub -o -prune \) -perm -u+w,a+X -print }
+exec chmod 700 tmp/sub
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/perm-X.xo b/find/testsuite/find.posix/perm-X.xo
new file mode 100644 (file)
index 0000000..2af57aa
--- /dev/null
@@ -0,0 +1,3 @@
+tmp
+tmp/empty
+tmp/empty-xxx
diff --git a/find/testsuite/find.posix/perm-vanilla.exp b/find/testsuite/find.posix/perm-vanilla.exp
new file mode 100644 (file)
index 0000000..c6b551f
--- /dev/null
@@ -0,0 +1,18 @@
+# tests for -perm
+exec rm -rf tmp 
+exec mkdir tmp 
+
+## set up a selection of test files
+foreach perm  { 400 555 700 } {
+    touch "tmp/$perm"
+    exec chmod $perm "tmp/$perm"
+}
+exec ls -l tmp
+
+# 
+# The -o operator normally has a short-circuit effect,
+# so we have to use "-exec false \;" to make sure that
+# all the parenthesised expression actually fail.
+# 
+find_start p {tmp/400 tmp/555 tmp/700 \( -perm 400 -exec echo p400 \{\} \; -exec false \; \) -o \( -perm -400 -exec echo p-400 \{\} \; -exec false \; \) }
+# exec rm -rf tmp tmp2
diff --git a/find/testsuite/find.posix/perm-vanilla.xo b/find/testsuite/find.posix/perm-vanilla.xo
new file mode 100644 (file)
index 0000000..6724004
--- /dev/null
@@ -0,0 +1,4 @@
+p400 tmp/400
+p-400 tmp/400
+p-400 tmp/555
+p-400 tmp/700
diff --git a/find/testsuite/find.posix/posixnot.exp b/find/testsuite/find.posix/posixnot.exp
new file mode 100644 (file)
index 0000000..859309d
--- /dev/null
@@ -0,0 +1,5 @@
+# tests for !
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/jim
+find_start p {tmp \! -name fred -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/posixnot.xo b/find/testsuite/find.posix/posixnot.xo
new file mode 100644 (file)
index 0000000..776fed4
--- /dev/null
@@ -0,0 +1,2 @@
+tmp
+tmp/jim
\ No newline at end of file
diff --git a/find/testsuite/find.posix/prune-result.exp b/find/testsuite/find.posix/prune-result.exp
new file mode 100644 (file)
index 0000000..f770bfe
--- /dev/null
@@ -0,0 +1,7 @@
+# test for return value of -prune.   It should always return true,
+# even if -depth is in effect
+exec rm -rf tmp
+exec mkdir tmp tmp/a
+touch tmp/a/f
+find_start p {tmp -depth -name a -prune -o -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/prune-result.xo b/find/testsuite/find.posix/prune-result.xo
new file mode 100644 (file)
index 0000000..11f0bbe
--- /dev/null
@@ -0,0 +1,2 @@
+tmp
+tmp/a/f
diff --git a/find/testsuite/find.posix/prune-stat.exp b/find/testsuite/find.posix/prune-stat.exp
new file mode 100644 (file)
index 0000000..b418d78
--- /dev/null
@@ -0,0 +1,7 @@
+# tests that -prune gets stat information
+exec rm -rf tmp
+exec mkdir tmp tmp/a
+exec touch tmp/b
+exec mkdir tmp/c
+find_start p {tmp -name b -prune -o -print }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/prune-stat.xo b/find/testsuite/find.posix/prune-stat.xo
new file mode 100644 (file)
index 0000000..471c9c4
--- /dev/null
@@ -0,0 +1,3 @@
+tmp
+tmp/a
+tmp/c
diff --git a/find/testsuite/find.posix/prune.exp b/find/testsuite/find.posix/prune.exp
new file mode 100644 (file)
index 0000000..10c1bb0
--- /dev/null
@@ -0,0 +1,5 @@
+# tests for -name
+exec rm -rf tmp
+exec mkdir tmp tmp/fred tmp/jim tmp/jim/1 tmp/shiela
+find_start p {tmp -name jim -prune -o -print }
+#exec rm -rf tmp
diff --git a/find/testsuite/find.posix/prune.xo b/find/testsuite/find.posix/prune.xo
new file mode 100644 (file)
index 0000000..afe68f8
--- /dev/null
@@ -0,0 +1,3 @@
+tmp
+tmp/fred
+tmp/shiela
diff --git a/find/testsuite/find.posix/size-invalid.exp b/find/testsuite/find.posix/size-invalid.exp
new file mode 100644 (file)
index 0000000..4989438
--- /dev/null
@@ -0,0 +1,7 @@
+# test for diagnosis of the fact that the argument to -size is invalid
+exec rm -rf tmp
+exec touch tmp
+foreach size { w b c k m G "" +-1 +-1G 1.2k } {
+    find_start f " tmp -size $size "
+}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/size-missing.exp b/find/testsuite/find.posix/size-missing.exp
new file mode 100644 (file)
index 0000000..74ad151
--- /dev/null
@@ -0,0 +1,5 @@
+# test for diagnosis of the fact that the argument to -size is missing
+exec rm -rf tmp
+exec touch tmp
+find_start f { tmp -size }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/sizes.exp b/find/testsuite/find.posix/sizes.exp
new file mode 100644 (file)
index 0000000..1fdea48
--- /dev/null
@@ -0,0 +1,15 @@
+# tests for -size
+exec rm -rf tmp
+exec mkdir tmp
+exec true > tmp/0-bytes
+exec dd if=/dev/zero bs=1 count=511  of=tmp/511-bytes  > /dev/null 2>/dev/null 
+exec dd if=/dev/zero bs=1 count=512  of=tmp/512-bytes  > /dev/null 2>/dev/null 
+exec dd if=/dev/zero bs=1 count=513  of=tmp/513-bytes  > /dev/null 2>/dev/null 
+exec dd if=/dev/zero bs=1 count=1024 of=tmp/1024-bytes > /dev/null 2>/dev/null 
+find_start p {tmp -mindepth 1 ( -size -1 -printf "A size -1: %s %p\n" ) , ( -size  1 -printf "B size  1: %s %p\n" ) , ( -size +1 -printf "C size +1: %s %p\n" ) , ( -size -2 -printf "G size -2: %s %p\n" ) , ( -size  2 -printf "H size  2: %s %p\n" ) , ( -size +2 -printf "I size +2: %s %p\n" ) }
+#     ( -size =1 -printf "E size =1: %s %p\n" ) 
+#     ( -size >1 -printf "F size >1: %s %p\n" ) ,
+#     ( -size <2 -printf "J size <2: %s %p\n" ) ,
+#     ( -size =2 -printf "K size =2: %s %p\n" ) ,
+#     ( -size >2 -printf "L size >2: %s %p\n" )   
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/sizes.xo b/find/testsuite/find.posix/sizes.xo
new file mode 100644 (file)
index 0000000..f89a10c
--- /dev/null
@@ -0,0 +1,10 @@
+A size -1: 0 tmp/0-bytes
+B size  1: 511 tmp/511-bytes
+B size  1: 512 tmp/512-bytes
+C size +1: 513 tmp/513-bytes
+C size +1: 1024 tmp/1024-bytes
+H size  2: 513 tmp/513-bytes
+H size  2: 1024 tmp/1024-bytes
+G size -2: 0 tmp/0-bytes
+G size -2: 511 tmp/511-bytes
+G size -2: 512 tmp/512-bytes
diff --git a/find/testsuite/find.posix/sizetype.exp b/find/testsuite/find.posix/sizetype.exp
new file mode 100644 (file)
index 0000000..b9dedf3
--- /dev/null
@@ -0,0 +1,6 @@
+# tests for -size -type
+exec rm -rf tmp
+exec mkdir tmp
+exec true > tmp/empty
+find_start p {tmp -size 0c -type f  }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/sizetype.xo b/find/testsuite/find.posix/sizetype.xo
new file mode 100644 (file)
index 0000000..445f1d4
--- /dev/null
@@ -0,0 +1 @@
+tmp/empty
diff --git a/find/testsuite/find.posix/sv-bug-11175.exp b/find/testsuite/find.posix/sv-bug-11175.exp
new file mode 100644 (file)
index 0000000..06dd160
--- /dev/null
@@ -0,0 +1,10 @@
+# tests for Savannah bug 11175 (should not check perms of pruned dir)
+exec rm -rf tmp
+exec mkdir tmp
+exec mkdir tmp/noxdir
+exec chmod 700 tmp
+exec chmod 600 tmp/noxdir
+#find_start p {tmp/noxdir -prune -type d -print}
+find_start p {tmp -name noxdir -prune -type d -print}
+exec chmod 700 tmp/noxdir
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/sv-bug-11175.xo b/find/testsuite/find.posix/sv-bug-11175.xo
new file mode 100644 (file)
index 0000000..cd9c95f
--- /dev/null
@@ -0,0 +1 @@
+tmp/noxdir
diff --git a/find/testsuite/find.posix/sv-bug-12181.exp b/find/testsuite/find.posix/sv-bug-12181.exp
new file mode 100644 (file)
index 0000000..8f1d339
--- /dev/null
@@ -0,0 +1,6 @@
+# tests for Savannah bug 12181 (find -H symlink should work)
+exec rm -rf tmp
+exec mkdir tmp
+exec ln -s tmp link
+find_start p { -H link}
+exec rm -rf tmp link
diff --git a/find/testsuite/find.posix/sv-bug-12181.xo b/find/testsuite/find.posix/sv-bug-12181.xo
new file mode 100644 (file)
index 0000000..2b2328d
--- /dev/null
@@ -0,0 +1 @@
+link
diff --git a/find/testsuite/find.posix/sv-bug-15235.exp b/find/testsuite/find.posix/sv-bug-15235.exp
new file mode 100644 (file)
index 0000000..9342e49
--- /dev/null
@@ -0,0 +1,6 @@
+# tests for directory parsing
+exec rm -rf \(1 \!2 \, \)
+exec mkdir \(1 \!2 \, \)
+touch \(1/a \!2/b \,/c \)/d
+find_start p {\(1 \!2 \, \)}
+exec rm -rf \(1 \!2 \, \)
diff --git a/find/testsuite/find.posix/sv-bug-15235.xo b/find/testsuite/find.posix/sv-bug-15235.xo
new file mode 100644 (file)
index 0000000..2852b81
--- /dev/null
@@ -0,0 +1,8 @@
+(1
+(1/a
+!2
+!2/b
+,
+,/c
+)
+)/d
diff --git a/find/testsuite/find.posix/sv-bug-19605.exp b/find/testsuite/find.posix/sv-bug-19605.exp
new file mode 100644 (file)
index 0000000..05b8841
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for Savannah bug 19605 (Inability of ftsfind to detect symlink loop)
+exec rm -rf  tmp
+exec mkdir tmp
+exec ln -s a tmp/b
+exec ln -s b tmp/a
+find_start f {-L tmp -false -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/sv-bug-19613.exp b/find/testsuite/find.posix/sv-bug-19613.exp
new file mode 100644 (file)
index 0000000..44423ef
--- /dev/null
@@ -0,0 +1,14 @@
+# tests for Savannah bug 19613 ("find -L -type f" fails on symlink loops)
+exec rm -rf tmp
+exec mkdir tmp tmp/subdir
+exec ln -s a tmp/subdir/b
+exec ln -s b tmp/subdir/a
+
+# We want to distinguish between the correct behaviour (error message
+# and return 1 because of the loop) and the failure case (assertion
+# failure in 4.3.3).  To do that we just check that the "tmp/vanilla"
+# file is also found.
+
+touch tmp/vanilla
+find_start f { -L tmp  -depth -type f}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/sv-bug-19613.xo b/find/testsuite/find.posix/sv-bug-19613.xo
new file mode 100644 (file)
index 0000000..5618aba
--- /dev/null
@@ -0,0 +1 @@
+tmp/vanilla
diff --git a/find/testsuite/find.posix/sv-bug-19617.exp b/find/testsuite/find.posix/sv-bug-19617.exp
new file mode 100644 (file)
index 0000000..fc4caca
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for Savannah bug 19617 (Inability of ftsfind to detect nonexistent command line args)
+exec rm -rf  tmp
+exec mkdir tmp
+find_start f {-P tmp/nosuchfile -print}
+find_start f {-H tmp/nosuchfile -print}
+find_start f {-L tmp/nosuchfile -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/sv-bug-25359.exp b/find/testsuite/find.posix/sv-bug-25359.exp
new file mode 100644 (file)
index 0000000..84231d0
--- /dev/null
@@ -0,0 +1,10 @@
+# Test for Savannah bug 25359
+# (ftsfind -H thinks that non-argument symlinks are files)
+# Affecting findutils
+# from acb82fe44369c108b43ec3e805aa94bf28352d0a 
+# to   0b1acd3358466b02f32baf9423665113dc933492
+exec rm -rf  tmp
+exec mkdir tmp
+exec ln -s / tmp/symlink
+find_start p {-H tmp -type l -print}
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/sv-bug-25359.xo b/find/testsuite/find.posix/sv-bug-25359.xo
new file mode 100644 (file)
index 0000000..8ec2030
--- /dev/null
@@ -0,0 +1 @@
+tmp/symlink
diff --git a/find/testsuite/find.posix/sv-bug-27563-exec.exp b/find/testsuite/find.posix/sv-bug-27563-exec.exp
new file mode 100644 (file)
index 0000000..d18b0c1
--- /dev/null
@@ -0,0 +1,6 @@
+# tests for Savannah bug 27563 (result of find -L -exec ls {} \;)
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/yyyy
+find_start p {-L tmp -name yyyy -exec ls \{\} \; }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/sv-bug-27563-exec.xo b/find/testsuite/find.posix/sv-bug-27563-exec.xo
new file mode 100644 (file)
index 0000000..cd491dd
--- /dev/null
@@ -0,0 +1 @@
+tmp/yyyy
diff --git a/find/testsuite/find.posix/sv-bug-30777.exp b/find/testsuite/find.posix/sv-bug-30777.exp
new file mode 100644 (file)
index 0000000..811f727
--- /dev/null
@@ -0,0 +1,6 @@
+# tests for Savannah bug 30777 (we accept find -exec ls BLAH{} \+ but the result lacks BLAH)
+# The correct behaviour is to reject this.
+exec rm -rf tmp
+exec mkdir tmp
+find_start f {tmp -exec ls FOO{} \+ }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/typearg.exp b/find/testsuite/find.posix/typearg.exp
new file mode 100644 (file)
index 0000000..ea6a933
--- /dev/null
@@ -0,0 +1,4 @@
+# tests for arguments to -type
+foreach type { Z ZZ } {
+    find_start f ". -type $type"
+}
diff --git a/find/testsuite/find.posix/typesize.exp b/find/testsuite/find.posix/typesize.exp
new file mode 100644 (file)
index 0000000..596b2da
--- /dev/null
@@ -0,0 +1,6 @@
+# tests for -type -size 
+exec rm -rf tmp
+exec mkdir tmp
+exec true > tmp/empty
+find_start p {tmp -type f -size 0c   }
+exec rm -rf tmp
diff --git a/find/testsuite/find.posix/typesize.xo b/find/testsuite/find.posix/typesize.xo
new file mode 100644 (file)
index 0000000..445f1d4
--- /dev/null
@@ -0,0 +1 @@
+tmp/empty
diff --git a/find/testsuite/find.posix/user-empty.exp b/find/testsuite/find.posix/user-empty.exp
new file mode 100644 (file)
index 0000000..95a6772
--- /dev/null
@@ -0,0 +1,2 @@
+# test for diagnosis of the fact that the argument to -user is empty
+find_start f { . -user "" }
diff --git a/find/testsuite/find.posix/user-missing.exp b/find/testsuite/find.posix/user-missing.exp
new file mode 100644 (file)
index 0000000..e1007fc
--- /dev/null
@@ -0,0 +1,2 @@
+# test for diagnosis of the fact that the argument to -user is missing
+find_start f { tmp -user }
diff --git a/find/tree.c b/find/tree.c
new file mode 100644 (file)
index 0000000..88b6be9
--- /dev/null
@@ -0,0 +1,1743 @@
+/* tree.c -- helper functions to build and evaluate the expression tree.
+   Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005,
+                 2006, 2007, 2010 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/>.
+*/
+
+#include <config.h>
+#include "defs.h"
+
+#include <assert.h>
+#include <stdlib.h>
+#include <fnmatch.h>
+
+#include "xalloc.h"
+#include "error.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
+
+
+
+/* All predicates for each path to process. */
+static struct predicate *predicates = NULL;
+
+/* The root of the evaluation tree. */
+static struct predicate *eval_tree  = NULL;
+
+/* The last predicate allocated. */
+static struct predicate *last_pred = NULL;
+
+/* The starting points. */
+static char **start_points;
+static size_t num_start_points = 0;
+
+
+
+static struct predicate *scan_rest (struct predicate **input,
+                                   struct predicate *head,
+                                   short int prev_prec);
+static void merge_pred (struct predicate *beg_list, struct predicate *end_list, struct predicate **last_p);
+static struct predicate *set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, struct predicate **prevp);
+static const char *cost_name (enum EvaluationCost cost);
+
+
+/* Return true if the indicated path name is a start
+   point or not.   If no start points were given on the
+   command line, we return true for ".".
+*/
+bool
+matches_start_point (const char *glob, bool foldcase)
+{
+  int fnmatch_flags = 0;
+  if (foldcase)
+    fnmatch_flags |= FNM_CASEFOLD;
+
+  if (num_start_points)
+    {
+      size_t i;
+      for (i=0; i<num_start_points; i++)
+       {
+         if (fnmatch (glob, start_points[i], fnmatch_flags) == 0)
+           return true;
+       }
+      return false;
+    }
+  else
+    {
+      return fnmatch (glob, ".", fnmatch_flags) == 0;
+    }
+}
+
+
+/* Return a pointer to a tree that represents the
+   expression prior to non-unary operator *INPUT.
+   Set *INPUT to point at the next input predicate node.
+
+   Only accepts the following:
+
+   <primary>
+   expression          [operators of higher precedence]
+   <uni_op><primary>
+   (arbitrary expression)
+   <uni_op>(arbitrary expression)
+
+   In other words, you cannot start out with a bi_op or close_paren.
+
+   If the following operator (if any) is of a higher precedence than
+   PREV_PREC, the expression just nabbed is part of a following
+   expression, which really is the expression that should be handed to
+   our caller, so get_expr recurses. */
+
+struct predicate *
+get_expr (struct predicate **input,
+         short int prev_prec,
+         const struct predicate* prev_pred)
+{
+  struct predicate *next = NULL;
+  struct predicate *this_pred = (*input);
+
+  if (*input == NULL)
+    error (EXIT_FAILURE, 0, _("invalid expression"));
+
+  switch ((*input)->p_type)
+    {
+    case NO_TYPE:
+      error (EXIT_FAILURE, 0, _("invalid expression"));
+      break;
+
+    case BI_OP:
+      /* e.g. "find . -a" */
+      error (EXIT_FAILURE, 0,
+            _("invalid expression; you have used a binary operator '%s' with nothing before it."),
+            this_pred->p_name);
+      break;
+
+    case CLOSE_PAREN:
+      if ((UNI_OP == prev_pred->p_type
+         || BI_OP == prev_pred->p_type)
+         && !this_pred->artificial)
+       {
+         /* e.g. "find \( -not \)" or "find \( -true -a \" */
+         error (EXIT_FAILURE, 0,
+                _("expected an expression between '%s' and ')'"),
+                prev_pred->p_name);
+       }
+      else if ( (*input)->artificial )
+       {
+         /* We have reached the end of the user-supplied predicates
+          * unexpectedly.
+          */
+         /* e.g. "find . -true -a" */
+         error (EXIT_FAILURE, 0,
+                _("expected an expression after '%s'"), prev_pred->p_name);
+       }
+      else
+       {
+         error (EXIT_FAILURE, 0,
+                _("invalid expression; you have too many ')'"));
+       }
+      break;
+
+    case PRIMARY_TYPE:
+      next = *input;
+      *input = (*input)->pred_next;
+      break;
+
+    case UNI_OP:
+      next = *input;
+      *input = (*input)->pred_next;
+      next->pred_right = get_expr (input, NEGATE_PREC, next);
+      break;
+
+    case OPEN_PAREN:
+      if ( (NULL == (*input)->pred_next) || (*input)->pred_next->artificial )
+       {
+         /* user typed something like "find . (", and so the ) we are
+          * looking at is from the artificial "( ) -print" that we
+          * add.
+          */
+         error (EXIT_FAILURE, 0,
+                _("invalid expression; expected to find a ')' but didn't see one.  Perhaps you need an extra predicate after '%s'"),
+                this_pred->p_name);
+       }
+      prev_pred = (*input);
+      *input = (*input)->pred_next;
+      if ( (*input)->p_type == CLOSE_PAREN )
+       {
+         error (EXIT_FAILURE, 0,
+                _("invalid expression; empty parentheses are not allowed."));
+       }
+      next = get_expr (input, NO_PREC, prev_pred);
+      if ((*input == NULL)
+         || ((*input)->p_type != CLOSE_PAREN))
+       error (EXIT_FAILURE, 0,
+              _("invalid expression; I was expecting to find a ')' somewhere but did not see one."));
+
+      *input = (*input)->pred_next;    /* move over close */
+      break;
+
+    default:
+      error (EXIT_FAILURE, 0, _("oops -- invalid expression type!"));
+      break;
+    }
+
+  /* We now have the first expression and are positioned to check
+     out the next operator.  If NULL, all done.  Otherwise, if
+     PREV_PREC < the current node precedence, we must continue;
+     the expression we just nabbed is more tightly bound to the
+     following expression than to the previous one. */
+  if (*input == NULL)
+    return (next);
+  if ((int) (*input)->p_prec > (int) prev_prec)
+    {
+      next = scan_rest (input, next, prev_prec);
+      if (next == NULL)
+       error (EXIT_FAILURE, 0, _("invalid expression"));
+    }
+  return (next);
+}
+
+/* Scan across the remainder of a predicate input list starting
+   at *INPUT, building the rest of the expression tree to return.
+   Stop at the first close parenthesis or the end of the input list.
+   Assumes that get_expr has been called to nab the first element
+   of the expression tree.
+
+   *INPUT points to the current input predicate list element.
+   It is updated as we move along the list to point to the
+   terminating input element.
+   HEAD points to the predicate element that was obtained
+   by the call to get_expr.
+   PREV_PREC is the precedence of the previous predicate element. */
+
+static struct predicate *
+scan_rest (struct predicate **input,
+          struct predicate *head,
+          short int prev_prec)
+{
+  struct predicate *tree;      /* The new tree we are building. */
+
+  if ((*input == NULL) || ((*input)->p_type == CLOSE_PAREN))
+    return (NULL);
+  tree = head;
+  while ((*input != NULL) && ((int) (*input)->p_prec > (int) prev_prec))
+    {
+      switch ((*input)->p_type)
+       {
+       case NO_TYPE:
+       case PRIMARY_TYPE:
+       case UNI_OP:
+       case OPEN_PAREN:
+         /* I'm not sure how we get here, so it is not obvious what
+          * sort of mistakes might give rise to this condition.
+          */
+         error (EXIT_FAILURE, 0, _("invalid expression"));
+         break;
+
+       case BI_OP:
+         {
+           struct predicate *prev = (*input);
+           (*input)->pred_left = tree;
+           tree = *input;
+           *input = (*input)->pred_next;
+           tree->pred_right = get_expr (input, tree->p_prec, prev);
+           break;
+         }
+
+       case CLOSE_PAREN:
+         return tree;
+
+       default:
+         error (EXIT_FAILURE, 0,
+                _("oops -- invalid expression type (%d)!"),
+                (int)(*input)->p_type);
+         break;
+       }
+    }
+  return tree;
+}
+
+/* Returns true if the specified predicate is reorderable. */
+static bool
+predicate_is_cost_free (const struct predicate *p)
+{
+  if (pred_is(p, pred_name) ||
+      pred_is(p, pred_path) ||
+      pred_is(p, pred_iname) ||
+      pred_is(p, pred_ipath))
+    {
+      /* Traditionally (at least 4.1.7 through 4.2.x) GNU find always
+       * optimised these cases.
+       */
+      return true;
+    }
+  else if (options.optimisation_level > 0)
+    {
+      if (pred_is(p, pred_and) ||
+         pred_is(p, pred_negate) ||
+         pred_is(p, pred_comma) ||
+         pred_is(p, pred_or))
+       return false;
+      else
+       return NeedsNothing == p->p_cost;
+    }
+  else
+    {
+      return false;
+    }
+}
+
+/* Prints a predicate */
+void print_predicate (FILE *fp, const struct predicate *p)
+{
+  if (p->arg_text)
+    {
+      fprintf (fp, "%s %s", p->p_name, p->arg_text);
+    }
+  else
+    {
+      fprintf (fp, "%s", p->p_name);
+    }
+}
+
+
+struct predlist
+{
+  struct predicate *head;
+  struct predicate *tail;
+};
+
+static void
+predlist_init (struct predlist *p)
+{
+  p->head = p->tail = NULL;
+}
+
+static void
+predlist_insert (struct predlist *list,
+                struct predicate *curr,
+                struct predicate **pprev)
+{
+  struct predicate **insertpos = &(list->head);
+
+  *pprev = curr->pred_left;
+  curr->pred_left = (*insertpos);
+  (*insertpos) = curr;
+  if (NULL == list->tail)
+    list->tail = list->head;
+}
+
+static int
+pred_cost_compare (const struct predicate *p1, const struct predicate *p2, bool wantfailure)
+{
+  if (p1->p_cost == p2->p_cost)
+    {
+      if (p1->est_success_rate == p2->est_success_rate)
+       return 0;
+      else if (wantfailure)
+       return p1->est_success_rate < p2->est_success_rate ? -1 :  1;
+      else
+       return p1->est_success_rate < p2->est_success_rate ?  1 : -1;
+    }
+  else
+    {
+      return p1->p_cost < p2->p_cost ? -1 : 1;
+    }
+}
+
+
+static void
+predlist_merge_sort (struct predlist *list,
+                    struct predicate **last)
+{
+  struct predlist new_list;
+  struct predicate *p, *q;
+
+  if (NULL == list->head)
+    return;                    /* nothing to do */
+
+  if (options.debug_options & DebugTreeOpt)
+    {
+      fprintf (stderr, "%s:\n", "predlist before merge sort");
+      print_tree (stderr, list->head, 2);
+    }
+
+  calculate_derived_rates (list->head);
+  predlist_init (&new_list);
+  while (list->head)
+    {
+      /* remove head of source list */
+      q = list->head;
+      list->head = list->head->pred_left;
+      q->pred_left = NULL;
+
+      /* insert it into the new list */
+      for (p=new_list.head; p; p=p->pred_left)
+       {
+         /* If these operations are OR operations, we want to get a
+          * successful test as soon as possible, to take advantage of
+          * the short-circuit evaluation.  If they're AND, we want to
+          * get an unsuccessful result early for the same reason.
+          * Therefore we invert the sense of the comparison for the
+          * OR case.  We only want to invert the sense of the success
+          * rate comparison, not the operation cost comparison.  Hence we
+          * pass a flag into pred_cost_compare().
+          */
+         const bool wantfailure = (OR_PREC != p->p_prec);
+         if (pred_cost_compare (p->pred_right, q->pred_right, wantfailure) >= 0)
+           break;
+       }
+      if (p)
+       {
+         /* insert into existing list */
+         q->pred_left = p->pred_left;
+         if (NULL == q->pred_left)
+           new_list.tail = q;
+         p->pred_left = q;
+       }
+      else
+       {
+         q->pred_left = new_list.head; /* prepend */
+         new_list.head = q;
+         if (NULL == new_list.tail)
+           new_list.tail = q; /* first item in new list */
+       }
+    }
+  if (options.debug_options & DebugTreeOpt)
+    {
+      fprintf (stderr, "%s:\n", "predlist after merge sort");
+      print_tree (stderr, new_list.head, 2);
+    }
+
+  calculate_derived_rates(new_list.head);
+  merge_pred (new_list.head, new_list.tail, last);
+  predlist_init (list);
+}
+
+static void
+merge_lists (struct predlist lists[], int nlists,
+            struct predlist *name_list,
+            struct predlist *regex_list,
+            struct predicate **last)
+{
+  int i;
+  static void (*mergefn)(struct predlist *, struct predicate**);
+
+  mergefn = predlist_merge_sort;
+
+  mergefn (name_list,   last);
+  mergefn (regex_list,  last);
+
+  for (i=0; i<nlists; i++)
+    mergefn (&lists[i], last);
+}
+
+
+
+static bool
+subtree_has_side_effects (const struct predicate *p)
+{
+  if (p)
+    {
+      return p->side_effects
+       || subtree_has_side_effects (p->pred_left)
+       || subtree_has_side_effects (p->pred_right);
+    }
+  else
+    {
+
+      return false;
+    }
+}
+
+static int
+worst_cost (const struct predicate *p)
+{
+  if (p)
+    {
+      unsigned int cost_r, cost_l, worst;
+      cost_l = worst_cost (p->pred_left);
+      cost_r = worst_cost (p->pred_right);
+      worst = (cost_l > cost_r) ? cost_l : cost_r;
+      if (worst < p->p_cost)
+       worst = p->p_cost;
+      return worst;
+    }
+  else
+    {
+      return 0;
+    }
+}
+
+
+
+static void
+perform_arm_swap (struct predicate *p)
+{
+  struct predicate *tmp = p->pred_left->pred_right;
+  p->pred_left->pred_right = p->pred_right;
+  p->pred_right = tmp;
+}
+
+/* Consider swapping p->pred_left->pred_right with p->pred_right,
+ * if that yields a faster evaluation.   Normally the left predicate is
+ * evaluated first.
+ *
+ * If the operation is an OR, we want the left predicate to be the one that
+ * succeeds most often.   If it is an AND, we want it to be the predicate that
+ * fails most often.
+ *
+ * We don't consider swapping arms of an operator where their cost is
+ * different or where they have side effects.
+ *
+ * A viable test case for this is
+ * ./find -D opt   -O3  .   \! -type f -o -type d
+ * Here, the ! -type f should be evaluated first,
+ * as we assume that 95% of inodes are vanilla files.
+ */
+static bool
+consider_arm_swap (struct predicate *p)
+{
+  int left_cost, right_cost;
+  const char *reason = NULL;
+  struct predicate **pl, **pr;
+
+  if (BI_OP != p->p_type)
+    reason = "Not a binary operation";
+
+  if (!reason)
+    {
+      if (NULL == p->pred_left || NULL == p->pred_right)
+       reason = "Doesn't have two arms";
+    }
+
+
+  if (!reason)
+    {
+      if (NULL == p->pred_left->pred_right)
+       reason = "Left arm has no child on RHS";
+    }
+  pr = &p->pred_right;
+  pl = &p->pred_left->pred_right;
+
+  if (!reason)
+    {
+      if (subtree_has_side_effects (*pl))
+       reason = "Left subtree has side-effects";
+    }
+  if (!reason)
+    {
+      if (subtree_has_side_effects (*pr))
+       reason = "Right subtree has side-effects";
+    }
+
+  if (!reason)
+    {
+      left_cost = worst_cost (*pl);
+      right_cost = worst_cost (*pr);
+
+      if (left_cost < right_cost)
+       {
+         reason = "efficient as-is";
+       }
+    }
+  if (!reason)
+    {
+      bool want_swap;
+
+      if (left_cost == right_cost)
+       {
+         /* it's a candidate */
+         float succ_rate_l = (*pl)->est_success_rate;
+         float succ_rate_r = (*pr)->est_success_rate;
+
+         if (options.debug_options & DebugTreeOpt)
+           {
+             fprintf (stderr, "Success rates: l=%f, r=%f\n", succ_rate_l, succ_rate_r);
+           }
+
+         if (pred_is (p, pred_or))
+           {
+             want_swap = succ_rate_r < succ_rate_l;
+             if (!want_swap)
+               reason = "Operation is OR and right success rate >= left";
+           }
+         else if (pred_is (p, pred_and))
+           {
+             want_swap = succ_rate_r > succ_rate_l;
+             if (!want_swap)
+               reason = "Operation is AND and right success rate <= left";
+           }
+         else
+           {
+             want_swap = false;
+             reason = "Not AND or OR";
+           }
+       }
+      else
+       {
+         want_swap = true;
+       }
+
+      if (want_swap)
+       {
+         if (options.debug_options & DebugTreeOpt)
+           {
+             fprintf (stderr, "Performing arm swap on:\n");
+             print_tree (stderr, p, 0);
+           }
+         perform_arm_swap (p);
+         return true;
+       }
+    }
+
+
+  if (options.debug_options & DebugTreeOpt)
+    {
+      fprintf (stderr, "Not an arm swap candidate (%s):\n", reason);
+      print_tree (stderr, p, 0);
+    }
+  return false;
+}
+
+static bool
+do_arm_swaps (struct predicate *p)
+{
+  if (p)
+    {
+      bool swapped;
+      do
+       {
+         swapped = false;
+         if (consider_arm_swap (p)
+             || do_arm_swaps (p->pred_left)
+             || do_arm_swaps (p->pred_right))
+           {
+             swapped = true;
+           }
+       } while (swapped);
+      return swapped;
+    }
+  else
+    {
+      return false;
+    }
+}
+
+
+
+/* Optimize the ordering of the predicates in the tree.  Rearrange
+   them to minimize work.  Strategies:
+   * Evaluate predicates that don't need inode information first;
+     the predicates are divided into 1 or more groups separated by
+     predicates (if any) which have "side effects", such as printing.
+     The grouping implements the partial ordering on predicates which
+     those with side effects impose.
+
+   * Place -name, -iname, -path, -ipath, -regex and -iregex at the front
+     of a group, with -name, -iname, -path and -ipath ahead of
+     -regex and -iregex.  Predicates which are moved to the front
+     of a group by definition do not have side effects.  Both
+     -regex and -iregex both use pred_regex.
+
+     If higher optimisation levels have been selected, reordering also
+     occurs according to the p_cost member of each predicate (which
+     reflects the performance cost of the test).  The ordering also
+     bears in mind whether these operations are more likely to succeed
+     or fail.  When evauating a chain of OR conditions, we prefer
+     tests likely to succeed at the front of the list.  For AND, we
+     prefer tests likely to fail at the front of the list.
+
+     This routine "normalizes" the predicate tree by ensuring that
+     all expression predicates have AND (or OR or COMMA) parent nodes
+     which are linked along the left edge of the expression tree.
+     This makes manipulation of subtrees easier.
+
+     EVAL_TREEP points to the root pointer of the predicate tree
+     to be rearranged.  opt_expr may return a new root pointer there.
+     Return true if the tree contains side effects, false if not. */
+
+static bool
+opt_expr (struct predicate **eval_treep)
+{
+  struct predlist regex_list={NULL,NULL}, name_list={NULL,NULL};
+  struct predlist cbo_list[NumEvaluationCosts];
+  int i;
+  struct predicate *curr;
+  struct predicate **prevp;    /* Address of `curr' node. */
+  struct predicate **last_sidep; /* Last predicate with side effects. */
+  PRED_FUNC pred_func;
+  enum predicate_type p_type;
+  bool has_side_effects = false; /* Return value. */
+  enum predicate_precedence prev_prec, /* precedence of last BI_OP in branch */
+                           biop_prec; /* topmost BI_OP precedence in branch */
+
+  if (eval_treep == NULL || *eval_treep == NULL)
+    return (false);
+
+  for (i=0; i<NumEvaluationCosts; i++)
+    predlist_init (&cbo_list[i]);
+
+  /* Set up to normalize tree as a left-linked list of ANDs or ORs.
+     Set `curr' to the leftmost node, `prevp' to its address, and
+     `pred_func' to the predicate type of its parent. */
+  prevp = eval_treep;
+  prev_prec = AND_PREC;
+  curr = *prevp;
+  while (curr->pred_left != NULL)
+    {
+      prevp = &curr->pred_left;
+      prev_prec = curr->p_prec;        /* must be a BI_OP */
+      curr = curr->pred_left;
+    }
+
+  /* Link in the appropriate BI_OP for the last expression, if needed. */
+  if (curr->p_type != BI_OP)
+    set_new_parent (curr, prev_prec, prevp);
+
+  if (options.debug_options & (DebugExpressionTree|DebugTreeOpt))
+    {
+      /* Normalized tree. */
+      fprintf (stderr, "Normalized Eval Tree:\n");
+      print_tree (stderr, *eval_treep, 0);
+    }
+
+  /* Rearrange the predicates. */
+  prevp = eval_treep;
+  biop_prec = NO_PREC; /* not COMMA_PREC */
+  if ((*prevp) && (*prevp)->p_type == BI_OP)
+    biop_prec = (*prevp)->p_prec;
+  while ((curr = *prevp) != NULL)
+    {
+      /* If there is a BI_OP of different precedence from the first
+        in the pred_left chain, create a new parent of the
+        original precedence, link the new parent to the left of the
+        previous and link CURR to the right of the new parent.
+        This preserves the precedence of expressions in the tree
+        in case we rearrange them. */
+      if (curr->p_type == BI_OP)
+       {
+          if (curr->p_prec != biop_prec)
+           curr = set_new_parent (curr, biop_prec, prevp);
+       }
+
+      /* See which predicate type we have. */
+      p_type = curr->pred_right->p_type;
+      pred_func = curr->pred_right->pred_func;
+
+
+      switch (p_type)
+       {
+       case NO_TYPE:
+       case PRIMARY_TYPE:
+         /* Don't rearrange the arguments of the comma operator, it is
+            not commutative.  */
+         if (biop_prec == COMMA_PREC)
+           break;
+
+         /* If this predicate has no side effects, consider reordering it. */
+         if (!curr->pred_right->side_effects)
+           {
+             bool reorder;
+
+             /* If it's one of our special primaries, move it to the
+                front of the list for that primary. */
+             if (predicate_is_cost_free (curr->pred_right))
+               {
+                 if (options.debug_options & DebugTreeOpt)
+                   {
+                     fprintf (stderr, "-O%d: promoting cheap predicate ",
+                              (int)options.optimisation_level);
+                     print_predicate (stderr, curr->pred_right);
+                     fprintf (stderr, " into name_list\n");
+                   }
+                 predlist_insert (&name_list, curr, prevp);
+                 continue;
+               }
+
+             if (pred_func == pred_regex)
+               {
+                 predlist_insert (&regex_list, curr, prevp);
+                 continue;
+               }
+
+             reorder = ((options.optimisation_level > 1)
+                        && (NeedsType == curr->pred_right->p_cost
+                            || NeedsInodeNumber == curr->pred_right->p_cost)
+                        && !curr->pred_right->need_stat) ||
+               (options.optimisation_level > 2);
+
+             if (reorder)
+               {
+                 if (options.debug_options & DebugTreeOpt)
+                   {
+                     fprintf (stderr, "-O%d: categorising predicate ",
+                              (int)options.optimisation_level);
+                     print_predicate (stderr, curr->pred_right);
+                     fprintf (stderr, " by cost (%s)\n",
+                              cost_name(curr->pred_right->p_cost));
+                   }
+                 predlist_insert (&cbo_list[curr->pred_right->p_cost], curr, prevp);
+                 continue;
+               }
+           }
+
+         break;
+
+       case UNI_OP:
+         /* For NOT, check the expression trees below the NOT. */
+         curr->pred_right->side_effects
+           = opt_expr (&curr->pred_right->pred_right);
+         break;
+
+       case BI_OP:
+         /* For nested AND or OR, recurse (AND/OR form layers on the left of
+            the tree), and continue scanning this level of AND or OR. */
+         curr->pred_right->side_effects = opt_expr (&curr->pred_right);
+         break;
+
+         /* At this point, get_expr and scan_rest have already removed
+            all of the user's parentheses. */
+
+       default:
+         error (EXIT_FAILURE, 0, _("oops -- invalid expression type!"));
+         break;
+       }
+
+      if (curr->pred_right->side_effects == true)
+       {
+         last_sidep = prevp;
+
+         /* Incorporate lists and reset list pointers for this group.  */
+         merge_lists (cbo_list, NumEvaluationCosts, &name_list, &regex_list, last_sidep);
+         has_side_effects = true;
+       }
+
+      prevp = &curr->pred_left;
+    }
+
+  /* Do final list merges. */
+  last_sidep = prevp;
+  merge_lists (cbo_list, NumEvaluationCosts, &name_list, &regex_list, last_sidep);
+  return has_side_effects;
+}
+
+static float
+constrain_rate (float rate)
+{
+  if (rate > 1.0f)
+    return 1.0;
+  else if (rate < 0.0)
+    return 0.0;
+  else
+    return rate;
+}
+
+/* Link in a new parent BI_OP node for CURR, at *PREVP, with precedence
+   HIGH_PREC. */
+
+static struct predicate *
+set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, struct predicate **prevp)
+{
+  struct predicate *new_parent;
+
+  new_parent = xmalloc (sizeof (struct predicate));
+  new_parent->p_type = BI_OP;
+  new_parent->p_prec = high_prec;
+  new_parent->need_stat = false;
+  new_parent->need_type = false;
+  new_parent->need_inum = false;
+  new_parent->p_cost = NeedsNothing;
+  new_parent->arg_text = NULL;
+
+  switch (high_prec)
+    {
+    case COMMA_PREC:
+      new_parent->pred_func = pred_comma;
+      new_parent->p_name = ",";
+      new_parent->est_success_rate = 1.0;
+      break;
+    case OR_PREC:
+      new_parent->pred_func = pred_or;
+      new_parent->p_name = "-o";
+      new_parent->est_success_rate = constrain_rate (curr->est_success_rate);
+      break;
+    case AND_PREC:
+      new_parent->pred_func = pred_and;
+      new_parent->p_name = "-a";
+      new_parent->est_success_rate = constrain_rate (curr->est_success_rate);
+      break;
+    default:
+      ;                                /* empty */
+    }
+
+  new_parent->side_effects = false;
+  new_parent->no_default_print = false;
+  new_parent->args.str = NULL;
+  new_parent->pred_next = NULL;
+
+  /* Link in new_parent.
+     Pushes rest of left branch down 1 level to new_parent->pred_right. */
+  new_parent->pred_left = NULL;
+  new_parent->pred_right = curr;
+  *prevp = new_parent;
+
+  return new_parent;
+}
+
+/* Merge the predicate list that starts at BEG_LIST and ends at END_LIST
+   into the tree at LAST_P. */
+
+static void
+merge_pred (struct predicate *beg_list, struct predicate *end_list, struct predicate **last_p)
+{
+  end_list->pred_left = *last_p;
+  *last_p = beg_list;
+}
+
+/* Find the first node in expression tree TREE that requires
+   a stat call and mark the operator above it as needing a stat
+   before calling the node.   Since the expression precedences
+   are represented in the tree, some preds that need stat may not
+   get executed (because the expression value is determined earlier.)
+   So every expression needing stat must be marked as such, not just
+   the earliest, to be sure to obtain the stat.  This still guarantees
+   that a stat is made as late as possible.  Return true if the top node
+   in TREE requires a stat, false if not. */
+
+
+struct pred_cost_lookup
+{
+  PRED_FUNC             fn;
+  enum EvaluationCost   cost;
+};
+static struct pred_cost_lookup costlookup[] =
+  {
+    { pred_amin      ,  NeedsStatInfo        },
+    { pred_and       ,  NeedsNothing,        },
+    { pred_anewer    ,  NeedsStatInfo,       },
+    { pred_atime     ,  NeedsStatInfo,       },
+    { pred_closeparen,  NeedsNothing         },
+    { pred_cmin      ,  NeedsStatInfo,       },
+    { pred_cnewer    ,  NeedsStatInfo,       },
+    { pred_comma     ,  NeedsNothing,        },
+    { pred_context   ,  NeedsAccessInfo      },
+    { pred_ctime     ,  NeedsStatInfo,       },
+    { pred_delete    ,  NeedsSyncDiskHit     },
+    { pred_empty     ,  NeedsStatInfo        },
+    { pred_exec      ,  NeedsEventualExec    },
+    { pred_execdir   ,  NeedsEventualExec    },
+    { pred_executable,  NeedsAccessInfo      },
+    { pred_false     ,  NeedsNothing         },
+    { pred_fprint    ,  NeedsNothing         },
+    { pred_fprint0   ,  NeedsNothing         },
+    { pred_fprintf   ,  NeedsNothing         },
+    { pred_fstype    ,  NeedsStatInfo        }, /* true for amortised cost */
+    { pred_gid       ,  NeedsStatInfo        },
+    { pred_group     ,  NeedsStatInfo        },
+    { pred_ilname    ,  NeedsLinkName        },
+    { pred_iname     ,  NeedsNothing         },
+    { pred_inum      ,  NeedsInodeNumber     },
+    { pred_ipath     ,  NeedsNothing         },
+    { pred_links     ,  NeedsStatInfo        },
+    { pred_lname     ,  NeedsLinkName        },
+    { pred_ls        ,  NeedsStatInfo        },
+    { pred_fls       ,  NeedsStatInfo        },
+    { pred_mmin             ,  NeedsStatInfo        },
+    { pred_mtime     ,  NeedsStatInfo        },
+    { pred_name             ,  NeedsNothing         },
+    { pred_negate    ,  NeedsNothing,        },
+    { pred_newer     ,  NeedsStatInfo,       },
+    { pred_newerXY   ,  NeedsStatInfo,       },
+    { pred_nogroup   ,  NeedsStatInfo        }, /* true for amortised cost if caching is on */
+    { pred_nouser    ,  NeedsStatInfo        }, /* true for amortised cost if caching is on */
+    { pred_ok        ,  NeedsUserInteraction },
+    { pred_okdir     ,  NeedsUserInteraction },
+    { pred_openparen ,  NeedsNothing         },
+    { pred_or        ,  NeedsNothing,        },
+    { pred_path             ,  NeedsNothing         },
+    { pred_perm             ,  NeedsStatInfo        },
+    { pred_print     ,  NeedsNothing         },
+    { pred_print0    ,  NeedsNothing         },
+    { pred_prune     ,  NeedsNothing         },
+    { pred_quit             ,  NeedsNothing         },
+    { pred_readable  ,  NeedsAccessInfo      },
+    { pred_regex     ,  NeedsNothing         },
+    { pred_samefile  ,  NeedsStatInfo        },
+    { pred_size      ,  NeedsStatInfo        },
+    { pred_true             ,  NeedsNothing         },
+    { pred_type      ,  NeedsType            },
+    { pred_uid       ,  NeedsStatInfo        },
+    { pred_used      ,  NeedsStatInfo        },
+    { pred_user      ,  NeedsStatInfo        },
+    { pred_writable  ,  NeedsAccessInfo      },
+    { pred_xtype     ,  NeedsType            } /* roughly correct unless most files are symlinks */
+  };
+static int pred_table_sorted = 0;
+
+static bool
+check_sorted (void *base, size_t members, size_t membersize,
+             int (*cmpfn)(const void*, const void*))
+{
+  const char *p = base;
+  size_t i;
+  for (i=1u; i<members; ++i)
+    {
+      int result = cmpfn (p+i*membersize, p+(i-1)*membersize);
+      if (result < 0)
+       return false;
+      result = cmpfn (p+(i-1)*membersize, p+i*membersize);
+      assert (result <= 0);
+    }
+  return true;
+}
+
+
+static int
+cost_table_comparison (const void *p1, const void *p2)
+{
+  /* We have to compare the function pointers with memcmp(),
+   * because ISO C does not allow magnitude comparison of
+   * function pointers (just equality testing).
+   */
+  const struct pred_cost_lookup *pc1 = p1;
+  const struct pred_cost_lookup *pc2 = p2;
+  union {
+    PRED_FUNC pfn;
+    char mem[sizeof (PRED_FUNC)];
+  } u1, u2;
+
+  u1.pfn = pc1->fn;
+  u2.pfn = pc2->fn;
+  return memcmp (u1.mem, u2.mem, sizeof(u1.pfn));
+}
+
+static enum EvaluationCost
+get_pred_cost (const struct predicate *p)
+{
+  enum EvaluationCost data_requirement_cost = NeedsNothing;
+  enum EvaluationCost inherent_cost = NeedsUnknown;
+
+  if (p->need_stat)
+    {
+      data_requirement_cost = NeedsStatInfo;
+    }
+  else if (p->need_inum)
+    {
+      data_requirement_cost = NeedsInodeNumber;
+    }
+  else if (p->need_type)
+    {
+      data_requirement_cost = NeedsType;
+    }
+  else
+    {
+      data_requirement_cost = NeedsNothing;
+    }
+
+  if (pred_is (p, pred_exec) || pred_is(p, pred_execdir))
+    {
+      if (p->args.exec_vec.multiple)
+       inherent_cost = NeedsEventualExec;
+      else
+       inherent_cost = NeedsImmediateExec;
+    }
+  else if (pred_is (p, pred_fprintf))
+    {
+      /* the parser calculated the cost for us. */
+      inherent_cost = p->p_cost;
+    }
+  else
+    {
+      struct pred_cost_lookup key;
+      void *entry;
+
+      if (!pred_table_sorted)
+       {
+         qsort (costlookup,
+                sizeof(costlookup)/sizeof(costlookup[0]),
+                sizeof(costlookup[0]),
+                cost_table_comparison);
+
+         if (!check_sorted (costlookup,
+                            sizeof(costlookup)/sizeof(costlookup[0]),
+                            sizeof(costlookup[0]),
+                            cost_table_comparison))
+           {
+             error (EXIT_FAILURE, 0,
+                    "failed to sort the costlookup array");
+           }
+         pred_table_sorted = 1;
+       }
+      key.fn = p->pred_func;
+      entry = bsearch (&key, costlookup,
+                      sizeof(costlookup)/sizeof(costlookup[0]),
+                      sizeof(costlookup[0]),
+                      cost_table_comparison);
+      if (entry)
+       {
+         inherent_cost = ((const struct pred_cost_lookup*)entry)->cost;
+       }
+      else
+       {
+         /* This message indicates a bug.  If we issue the message, we
+            actually have two bugs: if find emits a diagnostic, its result
+            should be nonzero.  However, not having an entry for a predicate
+            will not affect the output (just the performance) so I think it
+            would be confusing to exit with a nonzero status.
+         */
+         error (0, 0,
+                _("warning: there is no entry in the predicate evaluation "
+                  "cost table for predicate %s; please report this as a bug"),
+                p->p_name);
+         inherent_cost = NeedsUnknown;
+       }
+    }
+
+  if (inherent_cost > data_requirement_cost)
+    return inherent_cost;
+  else
+    return data_requirement_cost;
+}
+
+static void
+estimate_costs (struct predicate *tree)
+{
+  if (tree)
+    {
+      estimate_costs (tree->pred_right);
+      estimate_costs (tree->pred_left);
+
+      tree->p_cost = get_pred_cost(tree);
+    }
+}
+
+struct predicate*
+get_eval_tree (void)
+{
+  return eval_tree;
+}
+
+static float
+getrate (const struct predicate *p)
+{
+  if (p)
+    return p->est_success_rate;
+  else
+    return 1.0f;
+}
+
+
+float
+calculate_derived_rates (struct predicate *p)
+{
+  assert (NULL != p);
+
+  if (p->pred_right)
+    calculate_derived_rates (p->pred_right);
+  if (p->pred_left)
+    calculate_derived_rates (p->pred_left);
+
+  assert (p->p_type != CLOSE_PAREN);
+  assert (p->p_type != OPEN_PAREN);
+
+  switch (p->p_type)
+    {
+    case NO_TYPE:
+      assert (NULL == p->pred_right);
+      assert (NULL == p->pred_left);
+      return p->est_success_rate;
+
+    case PRIMARY_TYPE:
+      assert (NULL == p->pred_right);
+      assert (NULL == p->pred_left);
+      return p->est_success_rate;
+
+    case UNI_OP:
+      /* Unary operators must have exactly one operand */
+      assert (pred_is (p, pred_negate));
+      assert (NULL == p->pred_left);
+      p->est_success_rate = (1.0 - p->pred_right->est_success_rate);
+      return p->est_success_rate;
+
+    case BI_OP:
+      {
+       float rate;
+       /* Binary operators must have two operands */
+       if (pred_is (p, pred_and))
+         {
+           rate = getrate (p->pred_right) * getrate(p->pred_left);
+         }
+       else if (pred_is (p, pred_comma))
+         {
+           rate = 1.0f;
+         }
+       else if (pred_is (p, pred_or))
+         {
+           rate = getrate (p->pred_right) + getrate(p->pred_left);
+         }
+       else
+         {
+           /* only and, or and comma are BI_OP. */
+           assert (0);
+           abort ();
+         }
+       p->est_success_rate = constrain_rate (rate);
+      }
+      return p->est_success_rate;
+
+    case OPEN_PAREN:
+    case CLOSE_PAREN:
+      p->est_success_rate = 1.0;
+      return p->est_success_rate;
+    }
+  assert (0);
+  abort ();
+}
+
+/* opt_expr() rearranges predicates such that each left subtree is
+ * rooted at a logical predicate (e.g. and or or).  check_normalization()
+ * asserts that this property still holds.
+ *
+ */
+static void
+check_normalization (struct predicate *p, bool at_root)
+{
+  if (at_root)
+    {
+      assert (BI_OP == p->p_type);
+    }
+
+  if (p->pred_left)
+    {
+      assert (BI_OP == p->pred_left->p_type);
+      check_normalization(p->pred_left, false);
+    }
+  if (p->pred_right)
+    {
+      check_normalization (p->pred_right, false);
+    }
+}
+
+struct predicate*
+build_expression_tree (int argc, char *argv[], int end_of_leading_options)
+{
+  const struct parser_table *parse_entry; /* Pointer to the parsing table entry for this expression. */
+  char *predicate_name;                /* Name of predicate being parsed. */
+  struct predicate *cur_pred;
+  const struct parser_table *entry_close, *entry_print, *entry_open;
+  int i, oldi;
+
+  predicates = NULL;
+
+  /* Find where in ARGV the predicates begin by skipping the list of
+   * start points.  As a side effect, also figure out which is the
+   * first and last start point.
+   */
+  start_points = argv + end_of_leading_options;
+  for (i = end_of_leading_options; i < argc && !looks_like_expression(argv[i], true); i++)
+    {
+      ++num_start_points;
+    }
+
+  /* Enclose the expression in `( ... )' so a default -print will
+     apply to the whole expression. */
+  entry_open  = find_parser ("(");
+  entry_close = find_parser (")");
+  entry_print = find_parser ("print");
+  assert (entry_open  != NULL);
+  assert (entry_close != NULL);
+  assert (entry_print != NULL);
+
+  parse_openparen (entry_open, argv, &argc);
+  last_pred->p_name = "(";
+  predicates->artificial = true;
+  parse_begin_user_args (argv, argc, last_pred, predicates);
+  pred_sanity_check (last_pred);
+
+  /* Build the input order list. */
+  while (i < argc )
+    {
+      state.already_issued_stat_error_msg = false;
+      if (!looks_like_expression (argv[i], false))
+       {
+         error (0, 0, _("paths must precede expression: %s"), argv[i]);
+         usage (stderr, 1, NULL);
+       }
+
+      predicate_name = argv[i];
+      parse_entry = find_parser (predicate_name);
+      if (parse_entry == NULL)
+       {
+         /* Command line option not recognized */
+         error (EXIT_FAILURE, 0, _("unknown predicate `%s'"), predicate_name);
+       }
+
+      /* We have recognised a test of the form -foo.  Eat that,
+       * unless it is a predicate like -newerXY.
+       */
+      if (parse_entry->type != ARG_SPECIAL_PARSE)
+       {
+         i++;
+       }
+      oldi = i;
+      if (!(*(parse_entry->parser_func)) (parse_entry, argv, &i))
+       {
+         if (argv[i])
+           {
+             if ( (ARG_SPECIAL_PARSE == parse_entry->type) && (i == oldi) )
+               {
+                 /* The special parse function spat out the
+                  * predicate.  It must be invalid, or not tasty.
+                  */
+                 error (EXIT_FAILURE, 0, _("invalid predicate `%s'"),
+                        predicate_name);
+               }
+             else
+               {
+                 error (EXIT_FAILURE, 0, _("invalid argument `%s' to `%s'"),
+                        argv[i], predicate_name);
+               }
+           }
+         else
+           {
+             /* Command line option requires an argument */
+             error (EXIT_FAILURE, 0,
+                    _("missing argument to `%s'"), predicate_name);
+           }
+       }
+      else
+       {
+         last_pred->p_name = predicate_name;
+
+         /* If the parser consumed an argument, save it. */
+         if (i != oldi)
+           last_pred->arg_text = argv[oldi];
+         else
+           last_pred->arg_text = NULL;
+       }
+      pred_sanity_check(last_pred);
+      pred_sanity_check(predicates); /* XXX: expensive */
+    }
+  parse_end_user_args (argv, argc, last_pred, predicates);
+  if (predicates->pred_next == NULL)
+    {
+      /* No predicates that do something other than set a global variable
+        were given; remove the unneeded initial `(' and add `-print'. */
+      cur_pred = predicates;
+      predicates = last_pred = predicates->pred_next;
+      free (cur_pred);
+      parse_print (entry_print, argv, &argc);
+      last_pred->p_name = "-print";
+      pred_sanity_check(last_pred);
+      pred_sanity_check(predicates); /* XXX: expensive */
+    }
+  else if (!default_prints (predicates->pred_next))
+    {
+      /* One or more predicates that produce output were given;
+        remove the unneeded initial `('. */
+      cur_pred = predicates;
+      predicates = predicates->pred_next;
+      pred_sanity_check (predicates); /* XXX: expensive */
+      free (cur_pred);
+    }
+  else
+    {
+      /* `( user-supplied-expression ) -print'. */
+      parse_closeparen (entry_close, argv, &argc);
+      last_pred->p_name = ")";
+      last_pred->artificial = true;
+      pred_sanity_check (last_pred);
+      parse_print (entry_print, argv, &argc);
+      last_pred->p_name = "-print";
+      last_pred->artificial = true;
+      pred_sanity_check (last_pred);
+      pred_sanity_check (predicates); /* XXX: expensive */
+    }
+
+  if (options.debug_options & (DebugExpressionTree|DebugTreeOpt))
+    {
+      fprintf (stderr, "Predicate List:\n");
+      print_list (stderr, predicates);
+    }
+
+  /* do a sanity check */
+  check_option_combinations (predicates);
+  pred_sanity_check (predicates);
+
+  /* Done parsing the predicates.  Build the evaluation tree. */
+  cur_pred = predicates;
+  eval_tree = get_expr (&cur_pred, NO_PREC, NULL);
+  calculate_derived_rates (eval_tree);
+
+  /* Check if we have any left-over predicates (this fixes
+   * Debian bug #185202).
+   */
+  if (cur_pred != NULL)
+    {
+      /* cur_pred->p_name is often NULL here */
+      if (pred_is (cur_pred, pred_closeparen))
+       {
+         /* e.g. "find \( -true \) \)" */
+         error (EXIT_FAILURE, 0, _("you have too many ')'"));
+       }
+      else
+       {
+         if (cur_pred->p_name)
+           error (EXIT_FAILURE, 0,
+                  _("unexpected extra predicate '%s'"), cur_pred->p_name);
+         else
+           error (EXIT_FAILURE, 0, _("unexpected extra predicate"));
+       }
+    }
+
+  if (options.debug_options & (DebugExpressionTree|DebugTreeOpt))
+    {
+      fprintf (stderr, "Eval Tree:\n");
+      print_tree (stderr, eval_tree, 0);
+    }
+
+  estimate_costs (eval_tree);
+
+  /* Rearrange the eval tree in optimal-predicate order. */
+  opt_expr (&eval_tree);
+
+  /* Check that the tree is in normalised order (opt_expr does this) */
+  check_normalization (eval_tree, true);
+
+  do_arm_swaps (eval_tree);
+
+  /* Check that the tree is still in normalised order */
+  check_normalization (eval_tree, true);
+
+  if (options.debug_options & (DebugExpressionTree|DebugTreeOpt))
+    {
+      fprintf (stderr, "Optimized Eval Tree:\n");
+      print_tree (stderr, eval_tree, 0);
+      fprintf (stderr, "Optimized command line:\n");
+      print_optlist (stderr, eval_tree);
+      fprintf (stderr, "\n");
+    }
+
+  return eval_tree;
+}
+
+/* Initialise the performance data for a predicate.
+ */
+static void
+init_pred_perf (struct predicate *pred)
+{
+  struct predicate_performance_info *p = &pred->perf;
+  p->visits = p->successes = 0;
+}
+
+
+struct predicate *
+get_new_pred_noarg (const struct parser_table *entry)
+{
+  struct predicate *p = get_new_pred (entry);
+  if (p)
+    {
+      p->arg_text = NULL;
+    }
+  return p;
+}
+
+
+/* Return a pointer to a new predicate structure, which has been
+   linked in as the last one in the predicates list.
+
+   Set `predicates' to point to the start of the predicates list.
+   Set `last_pred' to point to the new last predicate in the list.
+
+   Set all cells in the new structure to the default values. */
+
+struct predicate *
+get_new_pred (const struct parser_table *entry)
+{
+  register struct predicate *new_pred;
+  (void) entry;
+
+  /* Options should not be turned into predicates. */
+  assert (entry->type != ARG_OPTION);
+  assert (entry->type != ARG_POSITIONAL_OPTION);
+
+  if (predicates == NULL)
+    {
+      predicates = (struct predicate *)
+       xmalloc (sizeof (struct predicate));
+      last_pred = predicates;
+    }
+  else
+    {
+      new_pred = xmalloc (sizeof (struct predicate));
+      last_pred->pred_next = new_pred;
+      last_pred = new_pred;
+    }
+  last_pred->parser_entry = entry;
+  last_pred->pred_func = NULL;
+  last_pred->p_name = NULL;
+  last_pred->p_type = NO_TYPE;
+  last_pred->p_prec = NO_PREC;
+  last_pred->side_effects = false;
+  last_pred->no_default_print = false;
+  last_pred->need_stat = true;
+  last_pred->need_type = true;
+  last_pred->need_inum = false;
+  last_pred->p_cost = NeedsUnknown;
+  last_pred->arg_text = "ThisShouldBeSetToSomethingElse";
+  last_pred->args.str = NULL;
+  last_pred->args.scontext = NULL;
+  last_pred->pred_next = NULL;
+  last_pred->pred_left = NULL;
+  last_pred->pred_right = NULL;
+  last_pred->literal_control_chars = options.literal_control_chars;
+  last_pred->artificial = false;
+  last_pred->est_success_rate = 1.0;
+  init_pred_perf (last_pred);
+  return last_pred;
+}
+
+/* Return a pointer to a new predicate, with operator check.
+   Like get_new_pred, but it checks to make sure that the previous
+   predicate is an operator.  If it isn't, the AND operator is inserted. */
+
+struct predicate *
+get_new_pred_chk_op (const struct parser_table *entry,
+                    const char *arg)
+{
+  struct predicate *new_pred;
+  static const struct parser_table *entry_and = NULL;
+
+  /* Locate the entry in the parser table for the "and" operator */
+  if (NULL == entry_and)
+    entry_and = find_parser ("and");
+
+  /* Check that it's actually there. If not, that is a bug.*/
+  assert (entry_and != NULL);
+
+  if (last_pred)
+    switch (last_pred->p_type)
+      {
+      case NO_TYPE:
+       error (EXIT_FAILURE, 0, _("oops -- invalid default insertion of and!"));
+       break;
+
+      case PRIMARY_TYPE:
+      case CLOSE_PAREN:
+       /* We need to interpose the and operator. */
+       new_pred = get_new_pred_noarg (entry_and);
+       new_pred->pred_func = pred_and;
+       new_pred->p_name = "-a";
+       new_pred->p_type = BI_OP;
+       new_pred->p_prec = AND_PREC;
+       new_pred->need_stat = false;
+       new_pred->need_type = false;
+       new_pred->need_inum = false;
+       new_pred->arg_text = NULL;
+       new_pred->args.str = NULL;
+       new_pred->side_effects = false;
+       new_pred->no_default_print = false;
+       break;
+
+      default:
+       break;
+      }
+
+  new_pred = get_new_pred (entry);
+  new_pred->arg_text = arg;
+  new_pred->parser_entry = entry;
+  return new_pred;
+}
+
+struct cost_assoc
+{
+  enum EvaluationCost cost;
+  char *name;
+};
+struct cost_assoc cost_table[] =
+  {
+    { NeedsNothing,         "Nothing" },
+    { NeedsInodeNumber,     "InodeNumber" },
+    { NeedsType,            "Type" },
+    { NeedsStatInfo,        "StatInfo" },
+    { NeedsLinkName,        "LinkName" },
+    { NeedsAccessInfo,      "AccessInfo" },
+    { NeedsSyncDiskHit,     "SyncDiskHit" },
+    { NeedsEventualExec,    "EventualExec" },
+    { NeedsImmediateExec,   "ImmediateExec" },
+    { NeedsUserInteraction, "UserInteraction" },
+    { NeedsUnknown,         "Unknown" }
+  };
+
+struct prec_assoc
+{
+  short prec;
+  char *prec_name;
+};
+
+static struct prec_assoc prec_table[] =
+{
+  {NO_PREC, "no"},
+  {COMMA_PREC, "comma"},
+  {OR_PREC, "or"},
+  {AND_PREC, "and"},
+  {NEGATE_PREC, "negate"},
+  {MAX_PREC, "max"},
+  {-1, "unknown "}
+};
+
+struct op_assoc
+{
+  short type;
+  char *type_name;
+};
+
+static struct op_assoc type_table[] =
+{
+  {NO_TYPE,      "no"},
+  {PRIMARY_TYPE, "primary"},
+  {UNI_OP,       "uni_op"},
+  {BI_OP,        "bi_op"},
+  {OPEN_PAREN,   "open_paren  "},
+  {CLOSE_PAREN,  "close_paren "},
+  {-1,           "unknown"}
+};
+
+static const char *
+cost_name (enum EvaluationCost cost)
+{
+  unsigned int i;
+  unsigned int n = sizeof (cost_table)/sizeof(cost_table[0]);
+
+  for (i = 0; i<n; ++i)
+    if (cost_table[i].cost == cost)
+      return cost_table[i].name;
+  return "unknown";
+}
+
+
+static char *
+type_name (type)
+     short type;
+{
+  int i;
+
+  for (i = 0; type_table[i].type != (short) -1; i++)
+    if (type_table[i].type == type)
+      break;
+  return (type_table[i].type_name);
+}
+
+static char *
+prec_name (prec)
+     short prec;
+{
+  int i;
+
+  for (i = 0; prec_table[i].prec != (short) -1; i++)
+    if (prec_table[i].prec == prec)
+      break;
+  return (prec_table[i].prec_name);
+}
+
+
+/* Walk the expression tree NODE to stdout.
+   INDENT is the number of levels to indent the left margin. */
+
+void
+print_tree (FILE *fp, struct predicate *node, int indent)
+{
+  int i;
+
+  if (node == NULL)
+    return;
+  for (i = 0; i < indent; i++)
+    fprintf (fp, "    ");
+  fprintf (fp, "pred=[");
+  print_predicate (fp, node);
+  fprintf (fp, "] type=%s prec=%s",
+         type_name (node->p_type), prec_name (node->p_prec));
+  fprintf (fp, " cost=%s rate=%#03.2g %sside effects ",
+          cost_name (node->p_cost),
+          node->est_success_rate,
+          (node->side_effects ? "" : "no "));
+
+  if (node->need_stat || node->need_type || node->need_inum)
+    {
+      int comma = 0;
+
+      fprintf (fp, "Needs ");
+      if (node->need_stat)
+       {
+         fprintf (fp, "stat");
+         comma = 1;
+       }
+      if (node->need_inum)
+       {
+         fprintf (fp, "%sinode", comma ? "," : "");
+         comma = 1;
+       }
+      if (node->need_type)
+       {
+         fprintf (fp, "%stype", comma ? "," : "");
+       }
+    }
+  fprintf (fp, "\n");
+
+
+  for (i = 0; i < indent; i++)
+    fprintf (fp, "    ");
+  if (NULL == node->pred_left && NULL == node->pred_right)
+    {
+      fprintf (fp, "no children.\n");
+    }
+  else
+    {
+      if (node->pred_left)
+       {
+         fprintf (fp, "left:\n");
+         print_tree (fp, node->pred_left, indent + 1);
+       }
+      else
+       {
+         fprintf (fp, "no left.\n");
+       }
+
+      for (i = 0; i < indent; i++)
+       fprintf (fp, "    ");
+      if (node->pred_right)
+       {
+         fprintf (fp, "right:\n");
+         print_tree (fp, node->pred_right, indent + 1);
+       }
+      else
+       {
+         fprintf (fp, "no right.\n");
+       }
+    }
+}
diff --git a/find/util.c b/find/util.c
new file mode 100644 (file)
index 0000000..8577396
--- /dev/null
@@ -0,0 +1,1162 @@
+/* util.c -- functions for initializing new tree elements, and other things.
+   Copyright (C) 1990, 91, 92, 93, 94, 2000, 2003, 2004, 2005,
+                 2008, 2009, 2010 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/>.
+*/
+
+#include <config.h>
+#include "defs.h"
+
+#include <fcntl.h>
+#ifdef HAVE_SYS_UTSNAME_H
+#include <sys/utsname.h>
+#endif
+#include <sys/time.h>
+#include <sys/stat.h> /* for fstatat() */
+#include <ctype.h>
+#include <string.h>
+#include <limits.h>
+#include <errno.h>
+#include <assert.h>
+
+#include "progname.h"
+#include "quotearg.h"
+#include "timespec.h"
+#include "error.h"
+#include "verify.h"
+#include "fdleak.h"
+#include "dircallback.h"
+#include "xalloc.h"
+#include "save-cwd.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 debug_option_assoc
+{
+  char *name;
+  int    val;
+  char *docstring;
+};
+static struct debug_option_assoc debugassoc[] =
+  {
+    { "help", DebugHelp, "Explain the various -D options" },
+    { "tree", DebugExpressionTree, "Display the expression tree" },
+    { "search",DebugSearch, "Navigate the directory tree verbosely" },
+    { "stat", DebugStat, "Trace calls to stat(2) and lstat(2)" },
+    { "rates", DebugSuccessRates, "Indicate how often each predicate succeeded" },
+    { "opt",  DebugExpressionTree|DebugTreeOpt, "Show diagnostic information relating to optimisation" },
+    { "exec", DebugExec,  "Show diagnostic information relating to -exec, -execdir, -ok and -okdir" }
+  };
+#define N_DEBUGASSOC (sizeof(debugassoc)/sizeof(debugassoc[0]))
+
+
+
+
+/* Add a primary of predicate type PRED_FUNC (described by ENTRY) to the predicate input list.
+
+   Return a pointer to the predicate node just inserted.
+
+   Fills in the following cells of the new predicate node:
+
+   pred_func       PRED_FUNC
+   args(.str)      NULL
+   p_type          PRIMARY_TYPE
+   p_prec          NO_PREC
+
+   Other cells that need to be filled in are defaulted by
+   get_new_pred_chk_op, which is used to insure that the prior node is
+   either not there at all (we are the very first node) or is an
+   operator. */
+
+struct predicate *
+insert_primary_withpred (const struct parser_table *entry,
+                        PRED_FUNC pred_func,
+                        const char *arg)
+{
+  struct predicate *new_pred;
+
+  new_pred = get_new_pred_chk_op (entry, arg);
+  new_pred->pred_func = pred_func;
+  new_pred->p_name = entry->parser_name;
+  new_pred->args.str = NULL;
+  new_pred->p_type = PRIMARY_TYPE;
+  new_pred->p_prec = NO_PREC;
+  return new_pred;
+}
+
+/* Add a primary described by ENTRY to the predicate input list.
+
+   Return a pointer to the predicate node just inserted.
+
+   Fills in the following cells of the new predicate node:
+
+   pred_func       PRED_FUNC
+   args(.str)      NULL
+   p_type          PRIMARY_TYPE
+   p_prec          NO_PREC
+
+   Other cells that need to be filled in are defaulted by
+   get_new_pred_chk_op, which is used to insure that the prior node is
+   either not there at all (we are the very first node) or is an
+   operator. */
+struct predicate *
+insert_primary (const struct parser_table *entry, const char *arg)
+{
+  assert (entry->pred_func != NULL);
+  return insert_primary_withpred (entry, entry->pred_func, arg);
+}
+
+struct predicate *
+insert_primary_noarg (const struct parser_table *entry)
+{
+  return insert_primary (entry, NULL);
+}
+
+
+
+static void
+show_valid_debug_options (FILE *fp, int full)
+{
+  int i;
+  if (full)
+    {
+      fprintf (fp, "Valid arguments for -D:\n");
+      for (i=0; i<N_DEBUGASSOC; ++i)
+       {
+         fprintf (fp, "%-10s %s\n",
+                  debugassoc[i].name,
+                  debugassoc[i].docstring);
+       }
+    }
+  else
+    {
+      for (i=0; i<N_DEBUGASSOC; ++i)
+       {
+         fprintf (fp, "%s%s", (i>0 ? "|" : ""), debugassoc[i].name);
+       }
+    }
+}
+
+void
+usage (FILE *fp, int status, char *msg)
+{
+  if (msg)
+    fprintf (fp, "%s: %s\n", program_name, msg);
+
+  fprintf (fp, _("Usage: %s [-H] [-L] [-P] [-Olevel] [-D "), program_name);
+  show_valid_debug_options (fp, 0);
+  fprintf (fp, _("] [path...] [expression]\n"));
+  if (0 != status)
+    exit (status);
+}
+
+void
+set_stat_placeholders (struct stat *p)
+{
+#if HAVE_STRUCT_STAT_ST_BIRTHTIME
+  p->st_birthtime = 0;
+#endif
+#if HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
+  p->st_birthtimensec = 0;
+#endif
+#if HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
+  p->st_birthtimespec.tv_nsec = -1;
+#endif
+#if HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_SEC
+  p->st_birthtimespec.tv_sec = 0;
+#endif
+}
+
+
+/* Get the stat information for a file, if it is
+ * not already known.  Returns 0 on success.
+ */
+int
+get_statinfo (const char *pathname, const char *name, struct stat *p)
+{
+  /* Set markers in fields so we have a good idea if the implementation
+   * didn't bother to set them (e.g., NetBSD st_birthtimespec for MS-DOS
+   * files)
+   */
+  if (!state.have_stat)
+    {
+      set_stat_placeholders (p);
+      if (0 == (*options.xstat) (name, p))
+       {
+         if (00000 == p->st_mode)
+           {
+             /* Savannah bug #16378. */
+             error (0, 0, _("WARNING: file %s appears to have mode 0000"),
+                    quotearg_n_style (0, options.err_quoting_style, name));
+             error_severity (1);
+           }
+       }
+      else
+       {
+         if (!options.ignore_readdir_race || (errno != ENOENT) )
+           {
+             nonfatal_target_file_error (errno, pathname);
+           }
+         return -1;
+       }
+    }
+  state.have_stat = true;
+  state.have_type = true;
+  state.type = p->st_mode;
+
+  return 0;
+}
+
+/* Get the stat/type/inode information for a file, if it is not
+ * already known.   Returns 0 on success (or if we did nothing).
+ */
+int
+get_info (const char *pathname,
+         struct stat *p,
+         struct predicate *pred_ptr)
+{
+  bool todo = false;
+
+  /* If we need the full stat info, or we need the type info but don't
+   * already have it, stat the file now.
+   */
+  if (pred_ptr->need_stat)
+    {
+      todo = true;             /* need full stat info */
+    }
+  else if (pred_ptr->need_type && !state.have_type)
+    {
+      todo = true;             /* need to stat to get the type */
+    }
+  else if (pred_ptr->need_inum)
+    {
+      if (!p->st_ino)
+       {
+         todo = true;          /* need to stat to get the inode number */
+       }
+      else if ((!state.have_type) || S_ISDIR(p->st_mode))
+       {
+         /* For now we decide not to trust struct dirent.d_ino for
+          * directory entries that are subdirectories, in case this
+          * subdirectory is a mount point.  We also need to call a
+          * stat function if we don't have st_ino (i.e. it is zero).
+          */
+         todo = true;
+       }
+    }
+  if (todo)
+    {
+      int result = get_statinfo (pathname, state.rel_pathname, p);
+      if (result != 0)
+       {
+         return -1;            /* failure. */
+       }
+      else
+       {
+         /* Verify some postconditions.  We can't check st_mode for
+            non-zero-ness because of Savannah bug #16378 (which is
+            that broken NFS servers can return st_mode==0). */
+         if (pred_ptr->need_type)
+           {
+             assert (state.have_type);
+           }
+         if (pred_ptr->need_inum)
+           {
+             assert (p->st_ino);
+           }
+         return 0;             /* success. */
+       }
+    }
+  else
+    {
+      return 0;                        /* success; nothing to do. */
+    }
+}
+
+/* Determine if we can use O_NOFOLLOW.
+ */
+#if defined O_NOFOLLOW
+bool
+check_nofollow (void)
+{
+  struct utsname uts;
+  float  release;
+
+  if (0 == O_NOFOLLOW)
+    {
+      return false;
+    }
+
+  if (0 == uname (&uts))
+    {
+      /* POSIX requires that atof ignores "unrecognised suffixes"; we specifically
+       * want that behaviour. */
+      double (*conversion)(const char*) = atof;  /* avoid sc_prohibit_atoi_atof check. */
+      release = conversion (uts.release);
+
+      if (0 == strcmp ("Linux", uts.sysname))
+       {
+         /* Linux kernels 2.1.126 and earlier ignore the O_NOFOLLOW flag. */
+         return release >= 2.2; /* close enough */
+       }
+      else if (0 == strcmp ("FreeBSD", uts.sysname))
+       {
+         /* FreeBSD 3.0-CURRENT and later support it */
+         return release >= 3.1;
+       }
+    }
+
+  /* Well, O_NOFOLLOW was defined, so we'll try to use it. */
+  return true;
+}
+#endif
+
+
+static int
+exec_cb (void *context)
+{
+  struct exec_val *execp = context;
+  bc_do_exec (&execp->ctl, &execp->state);
+  return 0;
+}
+
+static void
+do_exec (struct exec_val *execp)
+{
+  run_in_dir (execp->wd_for_exec, exec_cb, execp);
+  if (execp->wd_for_exec != initial_wd)
+    {
+      free_cwd (execp->wd_for_exec);
+      free (execp->wd_for_exec);
+      execp->wd_for_exec = NULL;
+    }
+}
+
+
+/* Examine the predicate list for instances of -execdir or -okdir
+ * which have been terminated with '+' (build argument list) rather
+ * than ';' (singles only).  If there are any, run them (this will
+ * have no effect if there are no arguments waiting).
+ */
+static void
+do_complete_pending_execdirs (struct predicate *p)
+{
+  if (NULL == p)
+    return;
+
+  assert (state.execdirs_outstanding);
+
+  do_complete_pending_execdirs (p->pred_left);
+
+  if (pred_is (p, pred_execdir) || pred_is(p, pred_okdir))
+    {
+      /* It's an exec-family predicate.  p->args.exec_val is valid. */
+      if (p->args.exec_vec.multiple)
+       {
+         struct exec_val *execp = &p->args.exec_vec;
+
+         /* This one was terminated by '+' and so might have some
+          * left... Run it if necessary.
+          */
+         if (execp->state.todo)
+           {
+             /* There are not-yet-executed arguments. */
+             do_exec (execp);
+           }
+       }
+    }
+
+  do_complete_pending_execdirs (p->pred_right);
+}
+
+void
+complete_pending_execdirs (void)
+{
+  if (state.execdirs_outstanding)
+    {
+      do_complete_pending_execdirs (get_eval_tree());
+      state.execdirs_outstanding = false;
+    }
+}
+
+
+
+/* Examine the predicate list for instances of -exec which have been
+ * terminated with '+' (build argument list) rather than ';' (singles
+ * only).  If there are any, run them (this will have no effect if
+ * there are no arguments waiting).
+ */
+void
+complete_pending_execs (struct predicate *p)
+{
+  if (NULL == p)
+    return;
+
+  complete_pending_execs (p->pred_left);
+
+  /* It's an exec-family predicate then p->args.exec_val is valid
+   * and we can check it.
+   */
+  /* XXX: what about pred_ok() ? */
+  if (pred_is (p, pred_exec) && p->args.exec_vec.multiple)
+    {
+      struct exec_val *execp = &p->args.exec_vec;
+
+      /* This one was terminated by '+' and so might have some
+       * left... Run it if necessary.  Set state.exit_status if
+       * there are any problems.
+       */
+      if (execp->state.todo)
+       {
+         /* There are not-yet-executed arguments. */
+         bc_do_exec (&execp->ctl, &execp->state);
+       }
+    }
+
+  complete_pending_execs (p->pred_right);
+}
+
+void
+record_initial_cwd (void)
+{
+  initial_wd = xmalloc (sizeof (*initial_wd));
+  if (0 != save_cwd (initial_wd))
+    {
+      error (EXIT_FAILURE, errno,
+            _("failed to save initial working directory"));
+    }
+}
+
+static void
+cleanup_initial_cwd (void)
+{
+  if (0 == restore_cwd (initial_wd))
+    {
+      free_cwd (initial_wd);
+      free (initial_wd);
+      initial_wd = NULL;
+    }
+  else
+    {
+      /* since we may already be in atexit, die with _exit(). */
+      error (0, errno,
+            _("failed to restore initial working directory"));
+      _exit (EXIT_FAILURE);
+    }
+}
+
+
+static void
+traverse_tree (struct predicate *tree,
+                         void (*callback)(struct predicate*))
+{
+  if (tree->pred_left)
+    traverse_tree (tree->pred_left, callback);
+
+  callback (tree);
+
+  if (tree->pred_right)
+    traverse_tree (tree->pred_right, callback);
+}
+
+/* After sharefile_destroy is called, our output file
+ * pointers will be dangling (fclose will already have
+ * been called on them).  NULL these out.
+ */
+static void
+undangle_file_pointers (struct predicate *p)
+{
+  if (pred_is (p, pred_fprint)
+      || pred_is (p, pred_fprintf)
+      || pred_is (p, pred_fls)
+      || pred_is (p, pred_fprint0))
+    {
+      /* The file was already fclose()d by sharefile_destroy. */
+      p->args.printf_vec.stream = NULL;
+    }
+}
+
+/* Return nonzero if file descriptor leak-checking is enabled.
+ */
+bool
+fd_leak_check_is_enabled (void)
+{
+  if (getenv ("GNU_FINDUTILS_FD_LEAK_CHECK"))
+    return true;
+  else
+    return false;
+
+}
+
+/* Complete any outstanding commands.
+ * Flush and close any open files.
+ */
+void
+cleanup (void)
+{
+  struct predicate *eval_tree = get_eval_tree ();
+  if (eval_tree)
+    {
+      traverse_tree (eval_tree, complete_pending_execs);
+      complete_pending_execdirs ();
+    }
+
+  /* Close ouptut files and NULL out references to them. */
+  sharefile_destroy (state.shared_files);
+  if (eval_tree)
+    traverse_tree (eval_tree, undangle_file_pointers);
+
+  cleanup_initial_cwd ();
+
+  if (fd_leak_check_is_enabled ())
+    {
+      complain_about_leaky_fds ();
+      forget_non_cloexec_fds ();
+    }
+
+  if (fflush (stdout) == EOF)
+    nonfatal_nontarget_file_error (errno, "standard output");
+}
+
+
+static int
+fallback_stat (const char *name, struct stat *p, int prev_rv)
+{
+  /* Our original stat() call failed.  Perhaps we can't follow a
+   * symbolic link.  If that might be the problem, lstat() the link.
+   * Otherwise, admit defeat.
+   */
+  switch (errno)
+    {
+    case ENOENT:
+    case ENOTDIR:
+      if (options.debug_options & DebugStat)
+       fprintf(stderr, "fallback_stat(): stat(%s) failed; falling back on lstat()\n", name);
+      return fstatat(state.cwd_dir_fd, name, p, AT_SYMLINK_NOFOLLOW);
+
+    case EACCES:
+    case EIO:
+    case ELOOP:
+    case ENAMETOOLONG:
+#ifdef EOVERFLOW
+    case EOVERFLOW:        /* EOVERFLOW is not #defined on UNICOS. */
+#endif
+    default:
+      return prev_rv;
+    }
+}
+
+
+/* optionh_stat() implements the stat operation when the -H option is
+ * in effect.
+ *
+ * If the item to be examined is a command-line argument, we follow
+ * symbolic links.  If the stat() call fails on the command-line item,
+ * we fall back on the properties of the symbolic link.
+ *
+ * If the item to be examined is not a command-line argument, we
+ * examine the link itself.
+ */
+int
+optionh_stat (const char *name, struct stat *p)
+{
+  if (AT_FDCWD != state.cwd_dir_fd)
+    assert (state.cwd_dir_fd >= 0);
+  set_stat_placeholders (p);
+  if (0 == state.curdepth)
+    {
+      /* This file is from the command line; deference the link (if it
+       * is a link).
+       */
+      int rv;
+      rv = fstatat (state.cwd_dir_fd, name, p, 0);
+      if (0 == rv)
+       return 0;               /* success */
+      else
+       return fallback_stat (name, p, rv);
+    }
+  else
+    {
+      /* Not a file on the command line; do not dereference the link.
+       */
+      return fstatat (state.cwd_dir_fd, name, p, AT_SYMLINK_NOFOLLOW);
+    }
+}
+
+/* optionl_stat() implements the stat operation when the -L option is
+ * in effect.  That option makes us examine the thing the symbolic
+ * link points to, not the symbolic link itself.
+ */
+int
+optionl_stat(const char *name, struct stat *p)
+{
+  int rv;
+  if (AT_FDCWD != state.cwd_dir_fd)
+    assert (state.cwd_dir_fd >= 0);
+
+  set_stat_placeholders (p);
+  rv = fstatat (state.cwd_dir_fd, name, p, 0);
+  if (0 == rv)
+    return 0;                  /* normal case. */
+  else
+    return fallback_stat (name, p, rv);
+}
+
+/* optionp_stat() implements the stat operation when the -P option is
+ * in effect (this is also the default).  That option makes us examine
+ * the symbolic link itself, not the thing it points to.
+ */
+int
+optionp_stat (const char *name, struct stat *p)
+{
+  assert ((state.cwd_dir_fd >= 0) || (state.cwd_dir_fd==AT_FDCWD));
+  set_stat_placeholders (p);
+  return fstatat (state.cwd_dir_fd, name, p, AT_SYMLINK_NOFOLLOW);
+}
+
+
+static uintmax_t stat_count = 0u;
+
+int
+debug_stat (const char *file, struct stat *bufp)
+{
+  ++stat_count;
+  fprintf (stderr, "debug_stat (%s)\n", file);
+
+  switch (options.symlink_handling)
+    {
+    case SYMLINK_ALWAYS_DEREF:
+      return optionl_stat (file, bufp);
+    case SYMLINK_DEREF_ARGSONLY:
+      return optionh_stat (file, bufp);
+    case SYMLINK_NEVER_DEREF:
+      return optionp_stat (file, bufp);
+    }
+  /*NOTREACHED*/
+  assert (0);
+  return -1;
+}
+
+
+bool
+following_links(void)
+{
+  switch (options.symlink_handling)
+    {
+    case SYMLINK_ALWAYS_DEREF:
+      return true;
+    case SYMLINK_DEREF_ARGSONLY:
+      return (state.curdepth == 0);
+    case SYMLINK_NEVER_DEREF:
+    default:
+      return false;
+    }
+}
+
+
+/* Take a "mode" indicator and fill in the files of 'state'.
+ */
+bool
+digest_mode (mode_t *mode,
+            const char *pathname,
+            const char *name,
+            struct stat *pstat,
+            bool leaf)
+{
+  /* If we know the type of the directory entry, and it is not a
+   * symbolic link, we may be able to avoid a stat() or lstat() call.
+   */
+  if (*mode)
+    {
+      if (S_ISLNK(*mode) && following_links())
+       {
+         /* mode is wrong because we should have followed the symlink. */
+         if (get_statinfo (pathname, name, pstat) != 0)
+           return false;
+         *mode = state.type = pstat->st_mode;
+         state.have_type = true;
+       }
+      else
+       {
+         state.have_type = true;
+         pstat->st_mode = state.type = *mode;
+       }
+    }
+  else
+    {
+      /* Mode is not yet known; may have to stat the file unless we
+       * can deduce that it is not a directory (which is all we need to
+       * know at this stage)
+       */
+      if (leaf)
+       {
+         state.have_stat = false;
+         state.have_type = false;;
+         state.type = 0;
+       }
+      else
+       {
+         if (get_statinfo (pathname, name, pstat) != 0)
+           return false;
+
+         /* If -L is in effect and we are dealing with a symlink,
+          * st_mode is the mode of the pointed-to file, while mode is
+          * the mode of the directory entry (S_IFLNK).  Hence now
+          * that we have the stat information, override "mode".
+          */
+         state.type = *mode = pstat->st_mode;
+         state.have_type = true;
+       }
+    }
+
+  /* success. */
+  return true;
+}
+
+
+/* Return true if there are no predicates with no_default_print in
+   predicate list PRED, false if there are any.
+   Returns true if default print should be performed */
+
+bool
+default_prints (struct predicate *pred)
+{
+  while (pred != NULL)
+    {
+      if (pred->no_default_print)
+       return (false);
+      pred = pred->pred_next;
+    }
+  return (true);
+}
+
+bool
+looks_like_expression (const char *arg, bool leading)
+{
+  switch (arg[0])
+    {
+    case '-':
+      if (arg[1])              /* "-foo" is an expression.  */
+       return true;
+      else
+       return false;           /* Just "-" is a filename. */
+      break;
+
+    case ')':
+    case ',':
+      if (arg[1])
+       return false;           /* )x and ,z are not expressions */
+      else
+       return !leading;        /* A leading ) or , is not either */
+
+      /* ( and ! are part of an expression, but (2 and !foo are
+       * filenames.
+       */
+    case '!':
+    case '(':
+      if (arg[1])
+       return false;
+      else
+       return true;
+
+    default:
+      return false;
+    }
+}
+
+static void
+process_debug_options (char *arg)
+{
+  const char *p;
+  char *token_context = NULL;
+  const char delimiters[] = ",";
+  bool empty = true;
+  size_t i;
+
+  p = strtok_r (arg, delimiters, &token_context);
+  while (p)
+    {
+      empty = false;
+
+      for (i=0; i<N_DEBUGASSOC; ++i)
+       {
+         if (0 == strcmp (debugassoc[i].name, p))
+           {
+             options.debug_options |= debugassoc[i].val;
+             break;
+           }
+       }
+      if (i >= N_DEBUGASSOC)
+       {
+         error (0, 0, _("Ignoring unrecognised debug flag %s"),
+                quotearg_n_style (0, options.err_quoting_style, arg));
+       }
+      p = strtok_r (NULL, delimiters, &token_context);
+    }
+  if (empty)
+    {
+      error(EXIT_FAILURE, 0, _("Empty argument to the -D option."));
+    }
+  else if (options.debug_options & DebugHelp)
+    {
+      show_valid_debug_options (stdout, 1);
+      exit (EXIT_SUCCESS);
+    }
+}
+
+
+static void
+process_optimisation_option (const char *arg)
+{
+  if (0 == arg[0])
+    {
+      error (EXIT_FAILURE, 0,
+            _("The -O option must be immediately followed by a decimal integer"));
+    }
+  else
+    {
+      unsigned long opt_level;
+      char *end;
+
+      if (!isdigit ( (unsigned char) arg[0] ))
+       {
+         error (EXIT_FAILURE, 0,
+                _("Please specify a decimal number immediately after -O"));
+       }
+      else
+       {
+         int prev_errno = errno;
+         errno  = 0;
+
+         opt_level = strtoul (arg, &end, 10);
+         if ( (0==opt_level) && (end==arg) )
+           {
+             error (EXIT_FAILURE, 0,
+                    _("Please specify a decimal number immediately after -O"));
+           }
+         else if (*end)
+           {
+             /* unwanted trailing characters. */
+             error (EXIT_FAILURE, 0, _("Invalid optimisation level %s"), arg);
+           }
+         else if ( (ULONG_MAX==opt_level) && errno)
+           {
+             error (EXIT_FAILURE, errno,
+                    _("Invalid optimisation level %s"), arg);
+           }
+         else if (opt_level > USHRT_MAX)
+           {
+             /* tricky to test, as on some platforms USHORT_MAX and ULONG_MAX
+              * can have the same value, though this is unusual.
+              */
+             error (EXIT_FAILURE, 0,
+                    _("Optimisation level %lu is too high.  "
+                      "If you want to find files very quickly, "
+                      "consider using GNU locate."),
+                    opt_level);
+           }
+         else
+           {
+             options.optimisation_level = opt_level;
+             errno = prev_errno;
+           }
+       }
+    }
+}
+
+int
+process_leading_options (int argc, char *argv[])
+{
+  int i, end_of_leading_options;
+
+  for (i=1; (end_of_leading_options = i) < argc; ++i)
+    {
+      if (0 == strcmp ("-H", argv[i]))
+       {
+         /* Meaning: dereference symbolic links on command line, but nowhere else. */
+         set_follow_state (SYMLINK_DEREF_ARGSONLY);
+       }
+      else if (0 == strcmp ("-L", argv[i]))
+       {
+         /* Meaning: dereference all symbolic links. */
+         set_follow_state (SYMLINK_ALWAYS_DEREF);
+       }
+      else if (0 == strcmp ("-P", argv[i]))
+       {
+         /* Meaning: never dereference symbolic links (default). */
+         set_follow_state (SYMLINK_NEVER_DEREF);
+       }
+      else if (0 == strcmp ("--", argv[i]))
+       {
+         /* -- signifies the end of options. */
+         end_of_leading_options = i+1; /* Next time start with the next option */
+         break;
+       }
+      else if (0 == strcmp ("-D", argv[i]))
+       {
+         process_debug_options (argv[i+1]);
+         ++i;                  /* skip the argument too. */
+       }
+      else if (0 == strncmp ("-O", argv[i], 2))
+       {
+         process_optimisation_option (argv[i]+2);
+       }
+      else
+       {
+         /* Hmm, must be one of
+          * (a) A path name
+          * (b) A predicate
+          */
+         end_of_leading_options = i; /* Next time start with this option */
+         break;
+       }
+    }
+  return end_of_leading_options;
+}
+
+static struct timespec
+now(void)
+{
+  struct timespec retval;
+  struct timeval tv;
+  time_t t;
+
+  if (0 == gettimeofday (&tv, NULL))
+    {
+      retval.tv_sec  = tv.tv_sec;
+      retval.tv_nsec = tv.tv_usec * 1000; /* convert unit from microseconds to nanoseconds */
+      return retval;
+    }
+  t = time (NULL);
+  assert (t != (time_t)-1);
+  retval.tv_sec = t;
+  retval.tv_nsec = 0;
+  return retval;
+}
+
+void
+set_option_defaults (struct options *p)
+{
+  if (getenv ("POSIXLY_CORRECT"))
+    p->posixly_correct = true;
+  else
+    p->posixly_correct = false;
+
+  /* We call check_nofollow() before setlocale() because the numbers
+   * for which we check (in the results of uname) definitiely have "."
+   * as the decimal point indicator even under locales for which that
+   * is not normally true.   Hence atof would do the wrong thing
+   * if we call it after setlocale().
+   */
+#ifdef O_NOFOLLOW
+  p->open_nofollow_available = check_nofollow ();
+#else
+  p->open_nofollow_available = false;
+#endif
+
+  p->regex_options = RE_SYNTAX_EMACS;
+
+  if (isatty (0))
+    {
+      p->warnings = true;
+      p->literal_control_chars = false;
+    }
+  else
+    {
+      p->warnings = false;
+      p->literal_control_chars = false; /* may change */
+    }
+  if (p->posixly_correct)
+    {
+      p->warnings = false;
+    }
+
+  p->do_dir_first = true;
+  p->explicit_depth = false;
+  p->maxdepth = p->mindepth = -1;
+
+  p->start_time = now ();
+  p->cur_day_start.tv_sec = p->start_time.tv_sec - DAYSECS;
+  p->cur_day_start.tv_nsec = p->start_time.tv_nsec;
+
+  p->full_days = false;
+  p->stay_on_filesystem = false;
+  p->ignore_readdir_race = false;
+
+  if (p->posixly_correct)
+    p->output_block_size = 512;
+  else
+    p->output_block_size = 1024;
+
+  p->debug_options = 0uL;
+  p->optimisation_level = 2;
+
+  if (getenv ("FIND_BLOCK_SIZE"))
+    {
+      error (EXIT_FAILURE, 0,
+            _("The environment variable FIND_BLOCK_SIZE is not supported, the only thing that affects the block size is the POSIXLY_CORRECT environment variable"));
+    }
+
+#if LEAF_OPTIMISATION
+  /* The leaf optimisation is enabled. */
+  p->no_leaf_check = false;
+#else
+  /* The leaf optimisation is disabled. */
+  p->no_leaf_check = true;
+#endif
+
+  set_follow_state (SYMLINK_NEVER_DEREF); /* The default is equivalent to -P. */
+
+  p->err_quoting_style = locale_quoting_style;
+}
+
+
+/* apply_predicate
+ *
+ */
+bool
+apply_predicate(const char *pathname, struct stat *stat_buf, struct predicate *p)
+{
+  ++p->perf.visits;
+
+  if (p->need_stat || p->need_type || p->need_inum)
+    {
+      /* We may need a stat here. */
+      if (get_info(pathname, stat_buf, p) != 0)
+           return false;
+    }
+  if ((p->pred_func)(pathname, stat_buf, p))
+    {
+      ++(p->perf.successes);
+      return true;
+    }
+  else
+    {
+      return false;
+    }
+}
+
+
+/* is_exec_in_local_dir
+ *
+ */
+bool
+is_exec_in_local_dir (const PRED_FUNC pred_func)
+{
+  return pred_execdir == pred_func || pred_okdir == pred_func;
+}
+
+/* safely_quote_err_filename
+ *
+ */
+const char *
+safely_quote_err_filename (int n, char const *arg)
+{
+  return quotearg_n_style (n, options.err_quoting_style, arg);
+}
+
+/* We have encountered an error which should affect the exit status.
+ * This is normally used to change the exit status from 0 to 1.
+ * However, if the exit status is already 2 for example, we don't want to
+ * reduce it to 1.
+ */
+void
+error_severity (int level)
+{
+  if (state.exit_status < level)
+    state.exit_status = level;
+}
+
+
+/* report_file_err
+ */
+static void
+report_file_err(int exitval, int errno_value,
+               bool is_target_file, const char *name)
+{
+  /* It is important that the errno value is passed in as a function
+   * argument before we call safely_quote_err_filename(), because otherwise
+   * we might find that safely_quote_err_filename() changes errno.
+   */
+  if (!is_target_file || !state.already_issued_stat_error_msg)
+    {
+      error (exitval, errno_value, "%s", safely_quote_err_filename (0, name));
+      error_severity (1);
+    }
+  if (is_target_file)
+    {
+      state.already_issued_stat_error_msg = true;
+    }
+}
+
+/* nonfatal_target_file_error
+ */
+void
+nonfatal_target_file_error (int errno_value, const char *name)
+{
+  report_file_err (0, errno_value, true, name);
+}
+
+/* fatal_target_file_error
+ *
+ * Report an error on a target file (i.e. a file we are searching).
+ * Such errors are only reported once per searched file.
+ *
+ */
+void
+fatal_target_file_error(int errno_value, const char *name)
+{
+  report_file_err (1, errno_value, true, name);
+  /*NOTREACHED*/
+  abort ();
+}
+
+/* nonfatal_nontarget_file_error
+ *
+ */
+void
+nonfatal_nontarget_file_error (int errno_value, const char *name)
+{
+  report_file_err (0, errno_value, false, name);
+}
+
+/* fatal_nontarget_file_error
+ *
+ */
+void
+fatal_nontarget_file_error(int errno_value, const char *name)
+{
+  /* We're going to exit fatally, so make sure we always isssue the error
+   * message, even if it will be duplicate.   Motivation: otherwise it may
+   * not be clear what went wrong.
+   */
+  state.already_issued_stat_error_msg = false;
+  report_file_err (1, errno_value, false, name);
+  /*NOTREACHED*/
+  abort ();
+}
diff --git a/gnulib/Makefile.am b/gnulib/Makefile.am
new file mode 100644 (file)
index 0000000..8212d9e
--- /dev/null
@@ -0,0 +1,12 @@
+# Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Automake, under
+# the same distribution terms as the rest of that program.
+#
+# This file was generated by import-gnulib.sh .
+#
+SUBDIRS = lib
+EXTRA_DIST = m4/gnulib-cache.m4
diff --git a/gnulib/Makefile.in b/gnulib/Makefile.in
new file mode 100644 (file)
index 0000000..4212c6a
--- /dev/null
@@ -0,0 +1,1551 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+subdir = gnulib
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = @INCLUDES@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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@
+
+# Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Automake, under
+# the same distribution terms as the rest of that program.
+#
+# This file was generated by import-gnulib.sh .
+#
+SUBDIRS = lib
+EXTRA_DIST = m4/gnulib-cache.m4
+all: all-recursive
+
+.SUFFIXES:
+$(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 gnulib/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits gnulib/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):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+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
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+       install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-generic ctags \
+       ctags-recursive distclean 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 \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+       tags-recursive uninstall uninstall-am
+
+
+# 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/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am
new file mode 100644 (file)
index 0000000..cbb54d6
--- /dev/null
@@ -0,0 +1,3038 @@
+## DO NOT EDIT! GENERATED AUTOMATICALLY!
+## Process this file with automake to produce Makefile.in.
+# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-libtool --macro-prefix=gl alloca areadlinkat argmatch assert c-strcasestr c-strstr canonicalize cloexec closein closeout ctype d-type dirent-safer dirname errno error faccessat fchdir fcntl fdl fdopendir fflush fileblocks filemode fnmatch-gnu fopen-safer fts getdelim getline getopt-gnu gettext gettimeofday gpl-3.0 hash human idcache inline inttypes isblank locale lstat maintainer-makefile malloc math mbrtowc mbscasestr mbsstr mktime modechange modf mountlist open parse-datetime pathmax perror progname quotearg readlink realloc regex rpmatch save-cwd savedir selinux-at snprintf stat stat-macros stat-time stdarg stdbool stddef stdint stdio stdlib stpcpy strcasestr strdup-posix strftime string strtol strtoul strtoull strtoumax sys_stat sys_time sys_wait timespec update-copyright verify version-etc version-etc-fsf warnings wchar wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno
+
+AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
+
+SUBDIRS =
+noinst_HEADERS =
+noinst_LIBRARIES =
+noinst_LTLIBRARIES =
+EXTRA_DIST =
+BUILT_SOURCES =
+SUFFIXES =
+MOSTLYCLEANFILES = core *.stackdump
+MOSTLYCLEANDIRS =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+AM_CPPFLAGS =
+AM_CFLAGS =
+
+noinst_LIBRARIES += libgnulib.a
+
+libgnulib_a_SOURCES =
+libgnulib_a_LIBADD = $(gl_LIBOBJS)
+libgnulib_a_DEPENDENCIES = $(gl_LIBOBJS)
+EXTRA_libgnulib_a_SOURCES =
+
+## begin gnulib module alloca
+
+
+EXTRA_DIST += alloca.c
+
+EXTRA_libgnulib_a_SOURCES += alloca.c
+
+libgnulib_a_LIBADD += @ALLOCA@
+libgnulib_a_DEPENDENCIES += @ALLOCA@
+## end   gnulib module alloca
+
+## begin gnulib module alloca-opt
+
+BUILT_SOURCES += $(ALLOCA_H)
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/alloca.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+MOSTLYCLEANFILES += alloca.h alloca.h-t
+
+EXTRA_DIST += alloca.in.h
+
+## end   gnulib module alloca-opt
+
+## begin gnulib module areadlink
+
+libgnulib_a_SOURCES += areadlink.c
+
+EXTRA_DIST += areadlink.h
+
+## end   gnulib module areadlink
+
+## begin gnulib module areadlink-with-size
+
+libgnulib_a_SOURCES += areadlink-with-size.c
+
+EXTRA_DIST += areadlink.h
+
+## end   gnulib module areadlink-with-size
+
+## begin gnulib module areadlinkat
+
+libgnulib_a_SOURCES += areadlinkat.c
+
+EXTRA_DIST += areadlink.h
+
+## end   gnulib module areadlinkat
+
+## begin gnulib module arg-nonnull
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += arg-nonnull.h
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/GL_ARG_NONNULL/,$$p' \
+         < $(top_srcdir)/build-aux/arg-nonnull.h \
+         > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+
+ARG_NONNULL_H=arg-nonnull.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
+
+## end   gnulib module arg-nonnull
+
+## begin gnulib module argmatch
+
+
+EXTRA_DIST += argmatch.c argmatch.h
+
+EXTRA_libgnulib_a_SOURCES += argmatch.c
+
+## end   gnulib module argmatch
+
+## begin gnulib module bitrotate
+
+libgnulib_a_SOURCES += bitrotate.h
+
+## end   gnulib module bitrotate
+
+## begin gnulib module btowc
+
+
+EXTRA_DIST += btowc.c
+
+EXTRA_libgnulib_a_SOURCES += btowc.c
+
+## end   gnulib module btowc
+
+## begin gnulib module c++defs
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += c++defs.h
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/c++defs.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/_GL_CXXDEFS/,$$p' \
+         < $(top_srcdir)/build-aux/c++defs.h \
+         > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += c++defs.h c++defs.h-t
+
+CXXDEFS_H=c++defs.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h
+
+## end   gnulib module c++defs
+
+## begin gnulib module c-ctype
+
+libgnulib_a_SOURCES += c-ctype.h c-ctype.c
+
+## end   gnulib module c-ctype
+
+## begin gnulib module c-strcase
+
+libgnulib_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c
+
+## end   gnulib module c-strcase
+
+## begin gnulib module c-strcasestr
+
+libgnulib_a_SOURCES += c-strcasestr.h c-strcasestr.c
+
+EXTRA_DIST += str-two-way.h
+
+## end   gnulib module c-strcasestr
+
+## begin gnulib module c-strstr
+
+libgnulib_a_SOURCES += c-strstr.h c-strstr.c
+
+## end   gnulib module c-strstr
+
+## begin gnulib module canonicalize
+
+
+EXTRA_DIST += canonicalize.c canonicalize.h
+
+EXTRA_libgnulib_a_SOURCES += canonicalize.c
+
+## end   gnulib module canonicalize
+
+## begin gnulib module chdir-long
+
+
+EXTRA_DIST += chdir-long.c chdir-long.h
+
+EXTRA_libgnulib_a_SOURCES += chdir-long.c
+
+## end   gnulib module chdir-long
+
+## begin gnulib module chown
+
+
+EXTRA_DIST += chown.c fchown-stub.c
+
+EXTRA_libgnulib_a_SOURCES += chown.c fchown-stub.c
+
+## end   gnulib module chown
+
+## begin gnulib module cloexec
+
+
+EXTRA_DIST += cloexec.c cloexec.h
+
+EXTRA_libgnulib_a_SOURCES += cloexec.c
+
+## end   gnulib module cloexec
+
+## begin gnulib module close
+
+
+EXTRA_DIST += close.c
+
+EXTRA_libgnulib_a_SOURCES += close.c
+
+## end   gnulib module close
+
+## begin gnulib module close-hook
+
+libgnulib_a_SOURCES += close-hook.c
+
+EXTRA_DIST += close-hook.h
+
+## end   gnulib module close-hook
+
+## begin gnulib module close-stream
+
+
+EXTRA_DIST += close-stream.c close-stream.h
+
+EXTRA_libgnulib_a_SOURCES += close-stream.c
+
+## end   gnulib module close-stream
+
+## begin gnulib module closein
+
+
+EXTRA_DIST += closein.c closein.h
+
+EXTRA_libgnulib_a_SOURCES += closein.c
+
+## end   gnulib module closein
+
+## begin gnulib module closeout
+
+
+EXTRA_DIST += closeout.c closeout.h
+
+EXTRA_libgnulib_a_SOURCES += closeout.c
+
+## end   gnulib module closeout
+
+## begin gnulib module configmake
+
+# Listed in the same order as the GNU makefile conventions, and
+# provided by autoconf 2.59c+.
+# The Automake-defined pkg* macros are appended, in the order
+# listed in the Automake 1.10a+ documentation.
+configmake.h: Makefile
+       $(AM_V_GEN)rm -f $@-t && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         echo '#define PREFIX "$(prefix)"'; \
+         echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
+         echo '#define BINDIR "$(bindir)"'; \
+         echo '#define SBINDIR "$(sbindir)"'; \
+         echo '#define LIBEXECDIR "$(libexecdir)"'; \
+         echo '#define DATAROOTDIR "$(datarootdir)"'; \
+         echo '#define DATADIR "$(datadir)"'; \
+         echo '#define SYSCONFDIR "$(sysconfdir)"'; \
+         echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
+         echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+         echo '#define INCLUDEDIR "$(includedir)"'; \
+         echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
+         echo '#define DOCDIR "$(docdir)"'; \
+         echo '#define INFODIR "$(infodir)"'; \
+         echo '#define HTMLDIR "$(htmldir)"'; \
+         echo '#define DVIDIR "$(dvidir)"'; \
+         echo '#define PDFDIR "$(pdfdir)"'; \
+         echo '#define PSDIR "$(psdir)"'; \
+         echo '#define LIBDIR "$(libdir)"'; \
+         echo '#define LISPDIR "$(lispdir)"'; \
+         echo '#define LOCALEDIR "$(localedir)"'; \
+         echo '#define MANDIR "$(mandir)"'; \
+         echo '#define MANEXT "$(manext)"'; \
+         echo '#define PKGDATADIR "$(pkgdatadir)"'; \
+         echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
+         echo '#define PKGLIBDIR "$(pkglibdir)"'; \
+         echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+       } | sed '/""/d' > $@-t && \
+       if test -f $@ && cmp $@-t $@ > /dev/null; then \
+         rm -f $@-t; \
+       else \
+         rm -f $@; mv $@-t $@; \
+       fi
+
+BUILT_SOURCES += configmake.h
+CLEANFILES += configmake.h configmake.h-t
+
+## end   gnulib module configmake
+
+## begin gnulib module ctype
+
+BUILT_SOURCES += ctype.h
+
+# We need the following in order to create <ctype.h> when the system
+# doesn't have one that works with the given compiler.
+ctype.h: ctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \
+             -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \
+             -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/ctype.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += ctype.h ctype.h-t
+
+EXTRA_DIST += ctype.in.h
+
+## end   gnulib module ctype
+
+## begin gnulib module cycle-check
+
+
+EXTRA_DIST += cycle-check.c cycle-check.h
+
+EXTRA_libgnulib_a_SOURCES += cycle-check.c
+
+## end   gnulib module cycle-check
+
+## begin gnulib module dev-ino
+
+
+EXTRA_DIST += dev-ino.h
+
+## end   gnulib module dev-ino
+
+## begin gnulib module dirent
+
+BUILT_SOURCES += dirent.h
+
+# We need the following in order to create <dirent.h> when the system
+# doesn't have one that works with the given compiler.
+dirent.h: dirent.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
+             -e 's|@''GNULIB_DIRFD''@|$(GNULIB_DIRFD)|g' \
+             -e 's|@''GNULIB_FDOPENDIR''@|$(GNULIB_FDOPENDIR)|g' \
+             -e 's|@''GNULIB_SCANDIR''@|$(GNULIB_SCANDIR)|g' \
+             -e 's|@''GNULIB_ALPHASORT''@|$(GNULIB_ALPHASORT)|g' \
+             -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
+             -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \
+             -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \
+             -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
+             -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
+             -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
+             -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
+             -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
+             -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/dirent.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += dirent.h dirent.h-t
+
+EXTRA_DIST += dirent.in.h
+
+## end   gnulib module dirent
+
+## begin gnulib module dirent-safer
+
+
+EXTRA_DIST += dirent--.h dirent-safer.h opendir-safer.c
+
+EXTRA_libgnulib_a_SOURCES += opendir-safer.c
+
+## end   gnulib module dirent-safer
+
+## begin gnulib module dirfd
+
+
+EXTRA_DIST += dirfd.c
+
+EXTRA_libgnulib_a_SOURCES += dirfd.c
+
+## end   gnulib module dirfd
+
+## begin gnulib module dirname
+
+
+EXTRA_DIST += basename.c dirname.c stripslash.c
+
+EXTRA_libgnulib_a_SOURCES += basename.c dirname.c stripslash.c
+
+## end   gnulib module dirname
+
+## begin gnulib module dirname-lgpl
+
+
+EXTRA_DIST += basename-lgpl.c dirname-lgpl.c dirname.h stripslash.c
+
+EXTRA_libgnulib_a_SOURCES += basename-lgpl.c dirname-lgpl.c stripslash.c
+
+## end   gnulib module dirname-lgpl
+
+## begin gnulib module dosname
+
+
+EXTRA_DIST += dosname.h
+
+## end   gnulib module dosname
+
+## begin gnulib module dup2
+
+
+EXTRA_DIST += dup2.c
+
+EXTRA_libgnulib_a_SOURCES += dup2.c
+
+## end   gnulib module dup2
+
+## begin gnulib module errno
+
+BUILT_SOURCES += $(ERRNO_H)
+
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+errno.h: errno.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+             -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+             -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+             -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+             -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+             -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+             -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+             < $(srcdir)/errno.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += errno.h errno.h-t
+
+EXTRA_DIST += errno.in.h
+
+## end   gnulib module errno
+
+## begin gnulib module error
+
+
+EXTRA_DIST += error.c error.h
+
+EXTRA_libgnulib_a_SOURCES += error.c
+
+## end   gnulib module error
+
+## begin gnulib module euidaccess
+
+
+EXTRA_DIST += euidaccess.c
+
+EXTRA_libgnulib_a_SOURCES += euidaccess.c
+
+## end   gnulib module euidaccess
+
+## begin gnulib module exitfail
+
+libgnulib_a_SOURCES += exitfail.c
+
+EXTRA_DIST += exitfail.h
+
+## end   gnulib module exitfail
+
+## begin gnulib module faccessat
+
+
+EXTRA_DIST += faccessat.c
+
+EXTRA_libgnulib_a_SOURCES += faccessat.c
+
+## end   gnulib module faccessat
+
+## begin gnulib module fchdir
+
+
+EXTRA_DIST += fchdir.c
+
+EXTRA_libgnulib_a_SOURCES += fchdir.c
+
+## end   gnulib module fchdir
+
+## begin gnulib module fclose
+
+
+EXTRA_DIST += fclose.c
+
+EXTRA_libgnulib_a_SOURCES += fclose.c
+
+## end   gnulib module fclose
+
+## begin gnulib module fcntl
+
+
+EXTRA_DIST += fcntl.c
+
+EXTRA_libgnulib_a_SOURCES += fcntl.c
+
+## end   gnulib module fcntl
+
+## begin gnulib module fcntl-h
+
+BUILT_SOURCES += fcntl.h
+
+# We need the following in order to create <fcntl.h> when the system
+# doesn't have one that works with the given compiler.
+fcntl.h: fcntl.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
+             -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
+             -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
+             -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
+             -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
+             -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
+             -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
+             -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
+             -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/fcntl.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += fcntl.h fcntl.h-t
+
+EXTRA_DIST += fcntl.in.h
+
+## end   gnulib module fcntl-h
+
+## begin gnulib module fcntl-safer
+
+
+EXTRA_DIST += creat-safer.c fcntl--.h fcntl-safer.h open-safer.c
+
+EXTRA_libgnulib_a_SOURCES += creat-safer.c open-safer.c
+
+## end   gnulib module fcntl-safer
+
+## begin gnulib module fdopendir
+
+
+EXTRA_DIST += fdopendir.c openat-priv.h openat-proc.c
+
+EXTRA_libgnulib_a_SOURCES += fdopendir.c openat-proc.c
+
+## end   gnulib module fdopendir
+
+## begin gnulib module fflush
+
+
+EXTRA_DIST += fflush.c stdio-impl.h
+
+EXTRA_libgnulib_a_SOURCES += fflush.c
+
+## end   gnulib module fflush
+
+## begin gnulib module file-set
+
+libgnulib_a_SOURCES += file-set.c
+
+EXTRA_DIST += file-set.h
+
+## end   gnulib module file-set
+
+## begin gnulib module fileblocks
+
+
+EXTRA_DIST += fileblocks.c
+
+EXTRA_libgnulib_a_SOURCES += fileblocks.c
+
+## end   gnulib module fileblocks
+
+## begin gnulib module filemode
+
+
+EXTRA_DIST += filemode.c filemode.h
+
+EXTRA_libgnulib_a_SOURCES += filemode.c
+
+## end   gnulib module filemode
+
+## begin gnulib module float
+
+BUILT_SOURCES += $(FLOAT_H)
+
+# We need the following in order to create <float.h> when the system
+# doesn't have one that works with the given compiler.
+float.h: float.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
+             < $(srcdir)/float.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += float.h float.h-t
+
+EXTRA_DIST += float.in.h
+
+## end   gnulib module float
+
+## begin gnulib module fnmatch
+
+BUILT_SOURCES += $(FNMATCH_H)
+
+# We need the following in order to create <fnmatch.h> when the system
+# doesn't have one that supports the required API.
+fnmatch.h: fnmatch.in.h $(ARG_NONNULL_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             < $(srcdir)/fnmatch.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
+
+EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c
+
+EXTRA_libgnulib_a_SOURCES += fnmatch.c fnmatch_loop.c
+
+## end   gnulib module fnmatch
+
+## begin gnulib module fopen
+
+
+EXTRA_DIST += fopen.c
+
+EXTRA_libgnulib_a_SOURCES += fopen.c
+
+## end   gnulib module fopen
+
+## begin gnulib module fopen-safer
+
+
+EXTRA_DIST += fopen-safer.c stdio--.h stdio-safer.h
+
+EXTRA_libgnulib_a_SOURCES += fopen-safer.c
+
+## end   gnulib module fopen-safer
+
+## begin gnulib module fpending
+
+
+EXTRA_DIST += fpending.c fpending.h
+
+EXTRA_libgnulib_a_SOURCES += fpending.c
+
+## end   gnulib module fpending
+
+## begin gnulib module fpurge
+
+
+EXTRA_DIST += fpurge.c stdio-impl.h
+
+EXTRA_libgnulib_a_SOURCES += fpurge.c
+
+## end   gnulib module fpurge
+
+## begin gnulib module freadahead
+
+libgnulib_a_SOURCES += freadahead.c
+
+EXTRA_DIST += freadahead.h stdio-impl.h
+
+## end   gnulib module freadahead
+
+## begin gnulib module freading
+
+libgnulib_a_SOURCES += freading.c
+
+EXTRA_DIST += freading.h stdio-impl.h
+
+## end   gnulib module freading
+
+## begin gnulib module fseeko
+
+
+EXTRA_DIST += fseeko.c stdio-impl.h
+
+EXTRA_libgnulib_a_SOURCES += fseeko.c
+
+## end   gnulib module fseeko
+
+## begin gnulib module ftello
+
+
+EXTRA_DIST += ftello.c stdio-impl.h
+
+EXTRA_libgnulib_a_SOURCES += ftello.c
+
+## end   gnulib module ftello
+
+## begin gnulib module fts
+
+
+EXTRA_DIST += fts-cycle.c fts.c fts_.h
+
+EXTRA_libgnulib_a_SOURCES += fts-cycle.c fts.c
+
+## end   gnulib module fts
+
+## begin gnulib module getcwd
+
+
+EXTRA_DIST += getcwd.c
+
+EXTRA_libgnulib_a_SOURCES += getcwd.c
+
+## end   gnulib module getcwd
+
+## begin gnulib module getdelim
+
+
+EXTRA_DIST += getdelim.c
+
+EXTRA_libgnulib_a_SOURCES += getdelim.c
+
+## end   gnulib module getdelim
+
+## begin gnulib module getdtablesize
+
+
+EXTRA_DIST += getdtablesize.c
+
+EXTRA_libgnulib_a_SOURCES += getdtablesize.c
+
+## end   gnulib module getdtablesize
+
+## begin gnulib module getgroups
+
+
+EXTRA_DIST += getgroups.c
+
+EXTRA_libgnulib_a_SOURCES += getgroups.c
+
+## end   gnulib module getgroups
+
+## begin gnulib module getline
+
+
+EXTRA_DIST += getline.c
+
+EXTRA_libgnulib_a_SOURCES += getline.c
+
+## end   gnulib module getline
+
+## begin gnulib module getopt-posix
+
+BUILT_SOURCES += $(GETOPT_H)
+
+# We need the following in order to create <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+getopt.h: getopt.in.h $(ARG_NONNULL_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             < $(srcdir)/getopt.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+MOSTLYCLEANFILES += getopt.h getopt.h-t
+
+EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h
+
+EXTRA_libgnulib_a_SOURCES += getopt.c getopt1.c
+
+## end   gnulib module getopt-posix
+
+## begin gnulib module gettext
+
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+AM_CPPFLAGS += -I$(top_builddir)/intl
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end   gnulib module gettext
+
+## begin gnulib module gettext-h
+
+libgnulib_a_SOURCES += gettext.h
+
+## end   gnulib module gettext-h
+
+## begin gnulib module gettime
+
+
+EXTRA_DIST += gettime.c
+
+EXTRA_libgnulib_a_SOURCES += gettime.c
+
+## end   gnulib module gettime
+
+## begin gnulib module gettimeofday
+
+
+EXTRA_DIST += gettimeofday.c
+
+EXTRA_libgnulib_a_SOURCES += gettimeofday.c
+
+## end   gnulib module gettimeofday
+
+## begin gnulib module gnumakefile
+
+distclean-local: clean-GNUmakefile
+clean-GNUmakefile:
+       test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || :
+
+EXTRA_DIST += $(top_srcdir)/GNUmakefile
+
+## end   gnulib module gnumakefile
+
+## begin gnulib module group-member
+
+
+EXTRA_DIST += group-member.c group-member.h
+
+EXTRA_libgnulib_a_SOURCES += group-member.c
+
+## end   gnulib module group-member
+
+## begin gnulib module hash
+
+
+EXTRA_DIST += hash.c hash.h
+
+EXTRA_libgnulib_a_SOURCES += hash.c
+
+## end   gnulib module hash
+
+## begin gnulib module hash-pjw
+
+libgnulib_a_SOURCES += hash-pjw.h hash-pjw.c
+
+## end   gnulib module hash-pjw
+
+## begin gnulib module hash-triple
+
+libgnulib_a_SOURCES += hash-triple.c
+
+EXTRA_DIST += hash-triple.h
+
+## end   gnulib module hash-triple
+
+## begin gnulib module havelib
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end   gnulib module havelib
+
+## begin gnulib module human
+
+
+EXTRA_DIST += human.c human.h
+
+EXTRA_libgnulib_a_SOURCES += human.c
+
+## end   gnulib module human
+
+## begin gnulib module i-ring
+
+
+EXTRA_DIST += i-ring.c i-ring.h
+
+EXTRA_libgnulib_a_SOURCES += i-ring.c
+
+## end   gnulib module i-ring
+
+## begin gnulib module idcache
+
+
+EXTRA_DIST += idcache.c idcache.h
+
+EXTRA_libgnulib_a_SOURCES += idcache.c
+
+## end   gnulib module idcache
+
+## begin gnulib module intprops
+
+
+EXTRA_DIST += intprops.h
+
+## end   gnulib module intprops
+
+## begin gnulib module inttypes
+
+BUILT_SOURCES += inttypes.h
+
+# We need the following in order to create <inttypes.h> when the system
+# doesn't have one that works with the given compiler.
+inttypes.h: inttypes.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
+             -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
+             -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+             -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+             -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+             -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
+             -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
+             -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
+             -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
+             -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
+             -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
+             -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
+             -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
+             -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+             -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
+             -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
+             -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
+             -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/inttypes.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += inttypes.h inttypes.h-t
+
+EXTRA_DIST += inttypes.in.h
+
+## end   gnulib module inttypes
+
+## begin gnulib module isblank
+
+
+EXTRA_DIST += isblank.c
+
+EXTRA_libgnulib_a_SOURCES += isblank.c
+
+## end   gnulib module isblank
+
+## begin gnulib module iswblank
+
+
+EXTRA_DIST += iswblank.c
+
+EXTRA_libgnulib_a_SOURCES += iswblank.c
+
+## end   gnulib module iswblank
+
+## begin gnulib module langinfo
+
+BUILT_SOURCES += langinfo.h
+
+# We need the following in order to create an empty placeholder for
+# <langinfo.h> when the system doesn't have one.
+langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
+             -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+             -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
+             -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
+             -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
+             -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \
+             -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
+             -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/langinfo.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += langinfo.h langinfo.h-t
+
+EXTRA_DIST += langinfo.in.h
+
+## end   gnulib module langinfo
+
+## begin gnulib module lchown
+
+
+EXTRA_DIST += lchown.c
+
+EXTRA_libgnulib_a_SOURCES += lchown.c
+
+## end   gnulib module lchown
+
+## begin gnulib module localcharset
+
+libgnulib_a_SOURCES += localcharset.h localcharset.c
+
+# We need the following in order to install a simple file in $(libdir)
+# which is shared with other installed packages. We use a list of referencing
+# packages so that "make uninstall" will remove the file if and only if it
+# is not used by another installed package.
+# On systems with glibc-2.1 or newer, the file is redundant, therefore we
+# avoid installing it.
+
+all-local: charset.alias ref-add.sed ref-del.sed
+
+charset_alias = $(DESTDIR)$(libdir)/charset.alias
+charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+install-exec-local: install-exec-localcharset
+install-exec-localcharset: all-local
+       if test $(GLIBC21) = no; then \
+         case '$(host_os)' in \
+           darwin[56]*) \
+             need_charset_alias=true ;; \
+           darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+             need_charset_alias=false ;; \
+           *) \
+             need_charset_alias=true ;; \
+         esac ; \
+       else \
+         need_charset_alias=false ; \
+       fi ; \
+       if $$need_charset_alias; then \
+         $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
+       fi ; \
+       if test -f $(charset_alias); then \
+         sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+         $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+         rm -f $(charset_tmp) ; \
+       else \
+         if $$need_charset_alias; then \
+           sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+           $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+           rm -f $(charset_tmp) ; \
+         fi ; \
+       fi
+
+uninstall-local: uninstall-localcharset
+uninstall-localcharset: all-local
+       if test -f $(charset_alias); then \
+         sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+         if grep '^# Packages using this file: $$' $(charset_tmp) \
+             > /dev/null; then \
+           rm -f $(charset_alias); \
+         else \
+           $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+         fi; \
+         rm -f $(charset_tmp); \
+       fi
+
+charset.alias: config.charset
+       $(AM_V_GEN)rm -f t-$@ $@ && \
+       $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \
+       mv t-$@ $@
+
+SUFFIXES += .sed .sin
+.sin.sed:
+       $(AM_V_GEN)rm -f t-$@ $@ && \
+       sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
+       mv t-$@ $@
+
+CLEANFILES += charset.alias ref-add.sed ref-del.sed
+
+EXTRA_DIST += config.charset ref-add.sin ref-del.sin
+
+## end   gnulib module localcharset
+
+## begin gnulib module locale
+
+BUILT_SOURCES += locale.h
+
+# We need the following in order to create <locale.h> when the system
+# doesn't have one that provides all definitions.
+locale.h: locale.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
+             -e 's|@''GNULIB_SETLOCALE''@|$(GNULIB_SETLOCALE)|g' \
+             -e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \
+             -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+             -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
+             -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
+             -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/locale.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += locale.h locale.h-t
+
+EXTRA_DIST += locale.in.h
+
+## end   gnulib module locale
+
+## begin gnulib module lseek
+
+
+EXTRA_DIST += lseek.c
+
+EXTRA_libgnulib_a_SOURCES += lseek.c
+
+## end   gnulib module lseek
+
+## begin gnulib module lstat
+
+
+EXTRA_DIST += lstat.c
+
+EXTRA_libgnulib_a_SOURCES += lstat.c
+
+## end   gnulib module lstat
+
+## begin gnulib module maintainer-makefile
+
+EXTRA_DIST += $(top_srcdir)/maint.mk
+
+## end   gnulib module maintainer-makefile
+
+## begin gnulib module malloc-gnu
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libgnulib_a_SOURCES += malloc.c
+
+## end   gnulib module malloc-gnu
+
+## begin gnulib module malloc-posix
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libgnulib_a_SOURCES += malloc.c
+
+## end   gnulib module malloc-posix
+
+## begin gnulib module malloca
+
+libgnulib_a_SOURCES += malloca.c
+
+EXTRA_DIST += malloca.h malloca.valgrind
+
+## end   gnulib module malloca
+
+## begin gnulib module math
+
+BUILT_SOURCES += math.h
+
+# We need the following in order to create <math.h> when the system
+# doesn't have one that works with the given compiler.
+math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \
+             -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \
+             -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \
+             -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \
+             -e 's|@''GNULIB_CEIL''@|$(GNULIB_CEIL)|g' \
+             -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \
+             -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
+             -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \
+             -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \
+             -e 's|@''GNULIB_FLOOR''@|$(GNULIB_FLOOR)|g' \
+             -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \
+             -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \
+             -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \
+             -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \
+             -e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \
+             -e 's|@''GNULIB_ISINF''@|$(GNULIB_ISINF)|g' \
+             -e 's|@''GNULIB_ISNAN''@|$(GNULIB_ISNAN)|g' \
+             -e 's|@''GNULIB_ISNANF''@|$(GNULIB_ISNANF)|g' \
+             -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \
+             -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \
+             -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \
+             -e 's|@''GNULIB_LOGB''@|$(GNULIB_LOGB)|g' \
+             -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \
+             -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \
+             -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \
+             -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \
+             -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \
+             -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \
+             -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \
+             -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \
+             -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \
+             -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \
+             -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \
+             < $(srcdir)/math.in.h | \
+         sed -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
+             -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \
+             -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \
+             -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
+             -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \
+             -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \
+             -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \
+             -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \
+             -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \
+             -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \
+             -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \
+             -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \
+             -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
+             -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
+             -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
+             -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \
+             -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \
+             -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
+             -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
+             -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \
+             -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \
+             -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
+             -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
+             -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
+             -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
+             -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \
+             -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \
+             -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \
+             -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \
+             -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \
+             -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \
+             -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \
+             -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
+             -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
+         | \
+         sed -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
+             -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
+             -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
+             -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \
+             -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \
+             -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \
+             -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \
+             -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \
+             -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \
+             -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \
+             -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \
+             -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \
+             -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \
+             -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \
+             -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \
+             -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
+             -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
+             -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
+             -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+             -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \
+             -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \
+             -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += math.h math.h-t
+
+EXTRA_DIST += math.in.h
+
+## end   gnulib module math
+
+## begin gnulib module mbchar
+
+libgnulib_a_SOURCES += mbchar.c
+
+EXTRA_DIST += mbchar.h
+
+## end   gnulib module mbchar
+
+## begin gnulib module mbrtowc
+
+
+EXTRA_DIST += mbrtowc.c
+
+EXTRA_libgnulib_a_SOURCES += mbrtowc.c
+
+## end   gnulib module mbrtowc
+
+## begin gnulib module mbscasestr
+
+libgnulib_a_SOURCES += mbscasestr.c
+
+EXTRA_DIST += str-kmp.h
+
+## end   gnulib module mbscasestr
+
+## begin gnulib module mbsinit
+
+
+EXTRA_DIST += mbsinit.c
+
+EXTRA_libgnulib_a_SOURCES += mbsinit.c
+
+## end   gnulib module mbsinit
+
+## begin gnulib module mbslen
+
+libgnulib_a_SOURCES += mbslen.c
+
+## end   gnulib module mbslen
+
+## begin gnulib module mbsrtowcs
+
+
+EXTRA_DIST += mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c
+
+EXTRA_libgnulib_a_SOURCES += mbsrtowcs-state.c mbsrtowcs.c
+
+## end   gnulib module mbsrtowcs
+
+## begin gnulib module mbsstr
+
+libgnulib_a_SOURCES += mbsstr.c
+
+EXTRA_DIST += str-kmp.h
+
+## end   gnulib module mbsstr
+
+## begin gnulib module mbtowc
+
+
+EXTRA_DIST += mbtowc-impl.h mbtowc.c
+
+EXTRA_libgnulib_a_SOURCES += mbtowc.c
+
+## end   gnulib module mbtowc
+
+## begin gnulib module mbuiter
+
+libgnulib_a_SOURCES += mbuiter.h
+
+## end   gnulib module mbuiter
+
+## begin gnulib module memchr
+
+
+EXTRA_DIST += memchr.c memchr.valgrind
+
+EXTRA_libgnulib_a_SOURCES += memchr.c
+
+## end   gnulib module memchr
+
+## begin gnulib module mempcpy
+
+
+EXTRA_DIST += mempcpy.c
+
+EXTRA_libgnulib_a_SOURCES += mempcpy.c
+
+## end   gnulib module mempcpy
+
+## begin gnulib module memrchr
+
+
+EXTRA_DIST += memrchr.c
+
+EXTRA_libgnulib_a_SOURCES += memrchr.c
+
+## end   gnulib module memrchr
+
+## begin gnulib module mkdir
+
+
+EXTRA_DIST += mkdir.c
+
+EXTRA_libgnulib_a_SOURCES += mkdir.c
+
+## end   gnulib module mkdir
+
+## begin gnulib module mktime
+
+
+EXTRA_DIST += mktime-internal.h mktime.c
+
+EXTRA_libgnulib_a_SOURCES += mktime.c
+
+## end   gnulib module mktime
+
+## begin gnulib module modechange
+
+
+EXTRA_DIST += modechange.c modechange.h
+
+EXTRA_libgnulib_a_SOURCES += modechange.c
+
+## end   gnulib module modechange
+
+## begin gnulib module mountlist
+
+
+EXTRA_DIST += mountlist.c mountlist.h
+
+EXTRA_libgnulib_a_SOURCES += mountlist.c
+
+## end   gnulib module mountlist
+
+## begin gnulib module nl_langinfo
+
+
+EXTRA_DIST += nl_langinfo.c
+
+EXTRA_libgnulib_a_SOURCES += nl_langinfo.c
+
+## end   gnulib module nl_langinfo
+
+## begin gnulib module open
+
+
+EXTRA_DIST += open.c
+
+EXTRA_libgnulib_a_SOURCES += open.c
+
+## end   gnulib module open
+
+## begin gnulib module openat
+
+
+EXTRA_DIST += at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c openat-priv.h openat-proc.c openat.c openat.h unlinkat.c
+
+EXTRA_libgnulib_a_SOURCES += at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c openat-proc.c openat.c unlinkat.c
+
+## end   gnulib module openat
+
+## begin gnulib module openat-die
+
+libgnulib_a_SOURCES += openat-die.c
+
+## end   gnulib module openat-die
+
+## begin gnulib module openat-safer
+
+
+EXTRA_DIST += fcntl--.h fcntl-safer.h openat-safer.c
+
+EXTRA_libgnulib_a_SOURCES += openat-safer.c
+
+## end   gnulib module openat-safer
+
+## begin gnulib module parse-datetime
+
+# This rule overrides the Automake generated .y.c rule, to ensure that the
+# parse-datetime.c file gets generated in the source directory, not in the
+# build directory.
+parse-datetime.c: parse-datetime.y
+       $(AM_V_GEN)$(SHELL) $(YLWRAP) $(srcdir)/parse-datetime.y \
+                                     y.tab.c parse-datetime.c \
+                                     y.tab.h parse-datetime.h \
+                                     y.output parse-datetime.output \
+                                     -- $(YACC) $(YFLAGS) $(AM_YFLAGS) && \
+       mv parse-datetime.c parse-datetime.c-t && \
+       mv parse-datetime.c-t $(srcdir)/parse-datetime.c
+libgnulib_a_SOURCES += parse-datetime.y
+BUILT_SOURCES += parse-datetime.c
+MOSTLYCLEANFILES += parse-datetime.c-t
+MAINTAINERCLEANFILES += parse-datetime.c
+EXTRA_DIST += parse-datetime.c
+
+EXTRA_DIST += parse-datetime.h
+
+## end   gnulib module parse-datetime
+
+## begin gnulib module pathmax
+
+
+EXTRA_DIST += pathmax.h
+
+## end   gnulib module pathmax
+
+## begin gnulib module perror
+
+
+EXTRA_DIST += perror.c
+
+EXTRA_libgnulib_a_SOURCES += perror.c
+
+## end   gnulib module perror
+
+## begin gnulib module progname
+
+libgnulib_a_SOURCES += progname.h progname.c
+
+## end   gnulib module progname
+
+## begin gnulib module quote
+
+
+EXTRA_DIST += quote.c quote.h
+
+EXTRA_libgnulib_a_SOURCES += quote.c
+
+## end   gnulib module quote
+
+## begin gnulib module quotearg
+
+
+EXTRA_DIST += quotearg.c quotearg.h
+
+EXTRA_libgnulib_a_SOURCES += quotearg.c
+
+## end   gnulib module quotearg
+
+## begin gnulib module readlink
+
+
+EXTRA_DIST += readlink.c
+
+EXTRA_libgnulib_a_SOURCES += readlink.c
+
+## end   gnulib module readlink
+
+## begin gnulib module readlinkat
+
+
+EXTRA_DIST += readlinkat.c
+
+EXTRA_libgnulib_a_SOURCES += readlinkat.c
+
+## end   gnulib module readlinkat
+
+## begin gnulib module realloc-gnu
+
+
+EXTRA_DIST += realloc.c
+
+EXTRA_libgnulib_a_SOURCES += realloc.c
+
+## end   gnulib module realloc-gnu
+
+## begin gnulib module realloc-posix
+
+
+EXTRA_DIST += realloc.c
+
+EXTRA_libgnulib_a_SOURCES += realloc.c
+
+## end   gnulib module realloc-posix
+
+## begin gnulib module regex
+
+
+EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c
+
+EXTRA_libgnulib_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c
+
+## end   gnulib module regex
+
+## begin gnulib module rmdir
+
+
+EXTRA_DIST += rmdir.c
+
+EXTRA_libgnulib_a_SOURCES += rmdir.c
+
+## end   gnulib module rmdir
+
+## begin gnulib module rpmatch
+
+
+EXTRA_DIST += rpmatch.c
+
+EXTRA_libgnulib_a_SOURCES += rpmatch.c
+
+## end   gnulib module rpmatch
+
+## begin gnulib module same
+
+
+EXTRA_DIST += same.c same.h
+
+EXTRA_libgnulib_a_SOURCES += same.c
+
+## end   gnulib module same
+
+## begin gnulib module same-inode
+
+
+EXTRA_DIST += same-inode.h
+
+## end   gnulib module same-inode
+
+## begin gnulib module save-cwd
+
+
+EXTRA_DIST += save-cwd.c save-cwd.h
+
+EXTRA_libgnulib_a_SOURCES += save-cwd.c
+
+## end   gnulib module save-cwd
+
+## begin gnulib module savedir
+
+
+EXTRA_DIST += savedir.c savedir.h
+
+EXTRA_libgnulib_a_SOURCES += savedir.c
+
+## end   gnulib module savedir
+
+## begin gnulib module selinux-at
+
+
+EXTRA_DIST += selinux-at.c selinux-at.h
+
+EXTRA_libgnulib_a_SOURCES += selinux-at.c
+
+## end   gnulib module selinux-at
+
+## begin gnulib module selinux-h
+
+libgnulib_a_SOURCES += se-context.in.h se-selinux.in.h
+
+BUILT_SOURCES += selinux/selinux.h
+selinux/selinux.h: se-selinux.in.h $(UNUSED_PARAMETER_H)
+       $(AM_V_at)$(MKDIR_P) selinux
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \
+             -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
+             < $(srcdir)/se-selinux.in.h; \
+       } > $@-t && \
+       chmod a-x $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t
+
+BUILT_SOURCES += $(SELINUX_CONTEXT_H)
+selinux/context.h: se-context.in.h $(UNUSED_PARAMETER_H)
+       $(AM_V_at)$(MKDIR_P) selinux
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
+             < $(srcdir)/se-context.in.h; \
+       } > $@-t && \
+       chmod a-x $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += selinux/context.h selinux/context.h-t
+MOSTLYCLEANDIRS += selinux
+
+EXTRA_DIST += getfilecon.c
+
+EXTRA_libgnulib_a_SOURCES += getfilecon.c
+
+## end   gnulib module selinux-h
+
+## begin gnulib module setenv
+
+
+EXTRA_DIST += setenv.c
+
+EXTRA_libgnulib_a_SOURCES += setenv.c
+
+## end   gnulib module setenv
+
+## begin gnulib module size_max
+
+libgnulib_a_SOURCES += size_max.h
+
+## end   gnulib module size_max
+
+## begin gnulib module snprintf
+
+
+EXTRA_DIST += snprintf.c
+
+EXTRA_libgnulib_a_SOURCES += snprintf.c
+
+## end   gnulib module snprintf
+
+## begin gnulib module stat
+
+
+EXTRA_DIST += stat.c
+
+EXTRA_libgnulib_a_SOURCES += stat.c
+
+## end   gnulib module stat
+
+## begin gnulib module stat-macros
+
+
+EXTRA_DIST += stat-macros.h
+
+## end   gnulib module stat-macros
+
+## begin gnulib module stat-time
+
+
+EXTRA_DIST += stat-time.h
+
+## end   gnulib module stat-time
+
+## begin gnulib module stdarg
+
+BUILT_SOURCES += $(STDARG_H)
+
+# We need the following in order to create <stdarg.h> when the system
+# doesn't have one that works with the given compiler.
+stdarg.h: stdarg.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
+             < $(srcdir)/stdarg.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += stdarg.h stdarg.h-t
+
+EXTRA_DIST += stdarg.in.h
+
+## end   gnulib module stdarg
+
+## begin gnulib module stdbool
+
+BUILT_SOURCES += $(STDBOOL_H)
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+
+EXTRA_DIST += stdbool.in.h
+
+## end   gnulib module stdbool
+
+## begin gnulib module stddef
+
+BUILT_SOURCES += $(STDDEF_H)
+
+# We need the following in order to create <stddef.h> when the system
+# doesn't have one that works with the given compiler.
+stddef.h: stddef.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+             -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
+             -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
+             < $(srcdir)/stddef.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += stddef.h stddef.h-t
+
+EXTRA_DIST += stddef.in.h
+
+## end   gnulib module stddef
+
+## begin gnulib module stdint
+
+BUILT_SOURCES += $(STDINT_H)
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+             -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
+             -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+             -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
+             -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+             -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
+             -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+             -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+             -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+             -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
+             -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
+             -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
+             -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
+             -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
+             -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
+             -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
+             -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
+             -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
+             -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
+             -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
+             -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
+             -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+             < $(srcdir)/stdint.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += stdint.h stdint.h-t
+
+EXTRA_DIST += stdint.in.h
+
+## end   gnulib module stdint
+
+## begin gnulib module stdio
+
+BUILT_SOURCES += stdio.h
+
+# We need the following in order to create <stdio.h> when the system
+# doesn't have one that works with the given compiler.
+stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+             -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+             -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
+             -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
+             -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
+             -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
+             -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
+             -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
+             -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
+             -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
+             -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
+             -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
+             -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
+             -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
+             -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
+             -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
+             -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
+             -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
+             -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
+             -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
+             -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
+             -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
+             -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
+             -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
+             -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
+             -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
+             -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
+             -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
+             -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
+             -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
+             -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
+             -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
+             -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
+             -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
+             -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
+             -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+             < $(srcdir)/stdio.in.h | \
+         sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+             -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
+             -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
+             -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+             -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+             -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+             -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
+             -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
+             -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+             -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \
+             -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \
+             -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
+             -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
+             -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+             -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+             -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+             -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
+             -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+             -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+             -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
+             -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
+             -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
+             -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
+             -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
+             -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+             -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \
+             -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+             -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+             -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+             -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
+             -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+             -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \
+             -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \
+             -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \
+             -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+             -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+             -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+             -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \
+             -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+             -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+             -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+             -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+             -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+             -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+             -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += stdio.h stdio.h-t
+
+EXTRA_DIST += stdio.in.h
+
+## end   gnulib module stdio
+
+## begin gnulib module stdlib
+
+BUILT_SOURCES += stdlib.h
+
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+             -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
+             -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
+             -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
+             -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
+             -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+             -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
+             -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
+             -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
+             -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
+             -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
+             -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
+             -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+             -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
+             -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
+             -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
+             -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
+             -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
+             -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
+             -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
+             -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
+             -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
+             -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
+             -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
+             -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
+             -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
+             -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
+             -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
+             < $(srcdir)/stdlib.in.h | \
+         sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+             -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
+             -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+             -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+             -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
+             -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+             -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
+             -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
+             -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
+             -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+             -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
+             -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
+             -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
+             -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
+             -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+             -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
+             -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+             -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+             -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
+             -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
+             -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+             -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
+             -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+             -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
+             -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
+             -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
+             -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+             -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+             -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
+             -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
+             -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
+             -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+             -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
+             -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += stdlib.h stdlib.h-t
+
+EXTRA_DIST += stdlib.in.h
+
+## end   gnulib module stdlib
+
+## begin gnulib module stpcpy
+
+
+EXTRA_DIST += stpcpy.c
+
+EXTRA_libgnulib_a_SOURCES += stpcpy.c
+
+## end   gnulib module stpcpy
+
+## begin gnulib module strcase
+
+
+EXTRA_DIST += strcasecmp.c strncasecmp.c
+
+EXTRA_libgnulib_a_SOURCES += strcasecmp.c strncasecmp.c
+
+## end   gnulib module strcase
+
+## begin gnulib module strcasestr-simple
+
+
+EXTRA_DIST += str-two-way.h strcasestr.c
+
+EXTRA_libgnulib_a_SOURCES += strcasestr.c
+
+## end   gnulib module strcasestr-simple
+
+## begin gnulib module strdup-posix
+
+
+EXTRA_DIST += strdup.c
+
+EXTRA_libgnulib_a_SOURCES += strdup.c
+
+## end   gnulib module strdup-posix
+
+## begin gnulib module streq
+
+
+EXTRA_DIST += streq.h
+
+## end   gnulib module streq
+
+## begin gnulib module strerror
+
+
+EXTRA_DIST += strerror.c
+
+EXTRA_libgnulib_a_SOURCES += strerror.c
+
+## end   gnulib module strerror
+
+## begin gnulib module strftime
+
+
+EXTRA_DIST += strftime.c strftime.h
+
+EXTRA_libgnulib_a_SOURCES += strftime.c
+
+## end   gnulib module strftime
+
+## begin gnulib module string
+
+BUILT_SOURCES += string.h
+
+# We need the following in order to create <string.h> when the system
+# doesn't have one that works with the given compiler.
+string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+             -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
+             -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
+             -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
+             -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
+             -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
+             -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
+             -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
+             -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
+             -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
+             -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
+             -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
+             -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
+             -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
+             -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
+             -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
+             -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
+             -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
+             -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
+             -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
+             -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
+             -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
+             -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
+             -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
+             -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
+             -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
+             -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
+             -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
+             -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
+             -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
+             -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
+             -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
+             -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+             -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \
+             -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
+             -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+             < $(srcdir)/string.in.h | \
+         sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+             -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
+             -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+             -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+             -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+             -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
+             -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
+             -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+             -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
+             -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+             -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
+             -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
+             -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
+             -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
+             -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
+             -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+             -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
+             -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
+             -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+             -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
+             -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
+             -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+             -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+             -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
+             -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+             -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+             -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
+             -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
+             -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
+             -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
+             -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+             -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+             -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+             < $(srcdir)/string.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += string.h string.h-t
+
+EXTRA_DIST += string.in.h
+
+## end   gnulib module string
+
+## begin gnulib module strings
+
+BUILT_SOURCES += strings.h
+
+# We need the following in order to create <strings.h> when the system
+# doesn't have one that works with the given compiler.
+strings.h: strings.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
+             -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
+             -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/strings.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += strings.h strings.h-t
+
+EXTRA_DIST += strings.in.h
+
+## end   gnulib module strings
+
+## begin gnulib module strndup
+
+
+EXTRA_DIST += strndup.c
+
+EXTRA_libgnulib_a_SOURCES += strndup.c
+
+## end   gnulib module strndup
+
+## begin gnulib module strnlen
+
+
+EXTRA_DIST += strnlen.c
+
+EXTRA_libgnulib_a_SOURCES += strnlen.c
+
+## end   gnulib module strnlen
+
+## begin gnulib module strnlen1
+
+libgnulib_a_SOURCES += strnlen1.h strnlen1.c
+
+## end   gnulib module strnlen1
+
+## begin gnulib module strstr-simple
+
+
+EXTRA_DIST += str-two-way.h strstr.c
+
+EXTRA_libgnulib_a_SOURCES += strstr.c
+
+## end   gnulib module strstr-simple
+
+## begin gnulib module strtoimax
+
+
+EXTRA_DIST += strtoimax.c
+
+EXTRA_libgnulib_a_SOURCES += strtoimax.c
+
+## end   gnulib module strtoimax
+
+## begin gnulib module strtol
+
+
+EXTRA_DIST += strtol.c
+
+EXTRA_libgnulib_a_SOURCES += strtol.c
+
+## end   gnulib module strtol
+
+## begin gnulib module strtoll
+
+
+EXTRA_DIST += strtoll.c
+
+EXTRA_libgnulib_a_SOURCES += strtoll.c
+
+## end   gnulib module strtoll
+
+## begin gnulib module strtoul
+
+
+EXTRA_DIST += strtoul.c
+
+EXTRA_libgnulib_a_SOURCES += strtoul.c
+
+## end   gnulib module strtoul
+
+## begin gnulib module strtoull
+
+
+EXTRA_DIST += strtoull.c
+
+EXTRA_libgnulib_a_SOURCES += strtoull.c
+
+## end   gnulib module strtoull
+
+## begin gnulib module strtoumax
+
+
+EXTRA_DIST += strtoumax.c
+
+EXTRA_libgnulib_a_SOURCES += strtoumax.c
+
+## end   gnulib module strtoumax
+
+## begin gnulib module sys_stat
+
+BUILT_SOURCES += sys/stat.h
+
+# We need the following in order to create <sys/stat.h> when the system
+# has one that is incomplete.
+sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) sys
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+             -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
+             -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
+             -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
+             -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
+             -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
+             -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
+             -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
+             -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
+             -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
+             -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
+             -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
+             -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
+             -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
+             -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
+             -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+             -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
+             -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
+             -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
+             -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
+             -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
+             -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
+             -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
+             -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+             -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
+             -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
+             -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
+             -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
+             -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+             -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+             -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+             -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
+             -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/sys_stat.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_stat.in.h
+
+## end   gnulib module sys_stat
+
+## begin gnulib module sys_time
+
+BUILT_SOURCES += sys/time.h
+
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+sys/time.h: sys_time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) sys
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
+             -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+             -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
+             -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+             -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/sys_time.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += sys/time.h sys/time.h-t
+
+EXTRA_DIST += sys_time.in.h
+
+## end   gnulib module sys_time
+
+## begin gnulib module sys_wait
+
+BUILT_SOURCES += sys/wait.h
+
+# We need the following in order to create <sys/wait.h> when the system
+# has one that is incomplete.
+sys/wait.h: sys_wait.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) sys
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
+             -e 's|@''GNULIB_WAITPID''@|$(GNULIB_WAITPID)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/sys_wait.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += sys/wait.h sys/wait.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_wait.in.h
+
+## end   gnulib module sys_wait
+
+## begin gnulib module time
+
+BUILT_SOURCES += time.h
+
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+             -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
+             -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
+             -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \
+             -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \
+             -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \
+             -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
+             -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
+             -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
+             -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+             -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
+             -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
+             -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+             -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+             -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/time.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += time.h time.h-t
+
+EXTRA_DIST += time.in.h
+
+## end   gnulib module time
+
+## begin gnulib module time_r
+
+
+EXTRA_DIST += time_r.c
+
+EXTRA_libgnulib_a_SOURCES += time_r.c
+
+## end   gnulib module time_r
+
+## begin gnulib module timespec
+
+
+EXTRA_DIST += timespec.h
+
+## end   gnulib module timespec
+
+## begin gnulib module unistd
+
+BUILT_SOURCES += unistd.h
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+             -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
+             -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
+             -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
+             -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
+             -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
+             -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
+             -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
+             -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
+             -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
+             -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
+             -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
+             -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
+             -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
+             -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
+             -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
+             -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
+             -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
+             -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
+             -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
+             -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
+             -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+             -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
+             -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
+             -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
+             -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
+             -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
+             -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
+             -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
+             -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+             -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
+             -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
+             -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
+             -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
+             -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
+             -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
+             -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
+             -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
+             -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
+             -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
+             -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
+             -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+             < $(srcdir)/unistd.in.h | \
+         sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+             -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+             -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
+             -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+             -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
+             -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
+             -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+             -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
+             -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+             -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+             -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
+             -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
+             -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
+             -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+             -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
+             -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
+             -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
+             -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
+             -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
+             -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
+             -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
+             -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+             -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+             -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+             -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
+             -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+             -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
+             -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
+             -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+             -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
+             -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
+             -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+             -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
+             -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
+             -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
+             -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
+             -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
+         | \
+         sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+             -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
+             -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
+             -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+             -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+             -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+             -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
+             -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
+             -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
+             -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+             -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
+             -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
+             -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
+             -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+             -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
+             -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
+             -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+             -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+             -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
+             -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+             -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
+             -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
+             -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
+             -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
+             -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+             -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
+             -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += unistd.h unistd.h-t
+
+EXTRA_DIST += unistd.in.h
+
+## end   gnulib module unistd
+
+## begin gnulib module unistd-safer
+
+
+EXTRA_DIST += dup-safer.c fd-safer.c pipe-safer.c unistd--.h unistd-safer.h
+
+EXTRA_libgnulib_a_SOURCES += dup-safer.c fd-safer.c pipe-safer.c
+
+## end   gnulib module unistd-safer
+
+## begin gnulib module unitypes
+
+BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H)
+
+unitypes.h: unitypes.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/unitypes.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+MOSTLYCLEANFILES += unitypes.h unitypes.h-t
+
+EXTRA_DIST += unitypes.in.h
+
+## end   gnulib module unitypes
+
+## begin gnulib module uniwidth/base
+
+BUILT_SOURCES += $(LIBUNISTRING_UNIWIDTH_H)
+
+uniwidth.h: uniwidth.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/uniwidth.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+MOSTLYCLEANFILES += uniwidth.h uniwidth.h-t
+
+EXTRA_DIST += localcharset.h uniwidth.in.h
+
+## end   gnulib module uniwidth/base
+
+## begin gnulib module uniwidth/width
+
+if LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH
+libgnulib_a_SOURCES += uniwidth/width.c
+endif
+
+EXTRA_DIST += uniwidth/cjk.h
+
+## end   gnulib module uniwidth/width
+
+## begin gnulib module unlink
+
+
+EXTRA_DIST += unlink.c
+
+EXTRA_libgnulib_a_SOURCES += unlink.c
+
+## end   gnulib module unlink
+
+## begin gnulib module unsetenv
+
+
+EXTRA_DIST += unsetenv.c
+
+EXTRA_libgnulib_a_SOURCES += unsetenv.c
+
+## end   gnulib module unsetenv
+
+## begin gnulib module unused-parameter
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += unused-parameter.h
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/unused-parameter.h, except that it has the copyright header cut
+# off.
+unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+         < $(top_srcdir)/build-aux/unused-parameter.h \
+         > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
+
+UNUSED_PARAMETER_H=unused-parameter.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/unused-parameter.h
+
+## end   gnulib module unused-parameter
+
+## begin gnulib module update-copyright
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright
+
+## end   gnulib module update-copyright
+
+## begin gnulib module useless-if-before-free
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/useless-if-before-free
+
+## end   gnulib module useless-if-before-free
+
+## begin gnulib module vasnprintf
+
+
+EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h
+
+EXTRA_libgnulib_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c
+
+## end   gnulib module vasnprintf
+
+## begin gnulib module vc-list-files
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files
+
+## end   gnulib module vc-list-files
+
+## begin gnulib module verify
+
+libgnulib_a_SOURCES += verify.h
+
+## end   gnulib module verify
+
+## begin gnulib module version-etc
+
+libgnulib_a_SOURCES += version-etc.h version-etc.c
+
+## end   gnulib module version-etc
+
+## begin gnulib module version-etc-fsf
+
+libgnulib_a_SOURCES += version-etc-fsf.c
+
+## end   gnulib module version-etc-fsf
+
+## begin gnulib module warn-on-use
+
+BUILT_SOURCES += warn-on-use.h
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/^.ifndef/,$$p' \
+         < $(top_srcdir)/build-aux/warn-on-use.h \
+         > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+
+WARN_ON_USE_H=warn-on-use.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
+
+## end   gnulib module warn-on-use
+
+## begin gnulib module wchar
+
+BUILT_SOURCES += wchar.h
+
+# We need the following in order to create <wchar.h> when the system
+# version does not work standalone.
+wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
+             -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
+             -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
+             -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
+             -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
+             -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
+             -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
+             -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
+             -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
+             -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
+             -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
+             -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
+             -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
+             -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+             -e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \
+             -e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \
+             -e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \
+             -e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \
+             -e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \
+             -e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \
+             -e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \
+             -e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \
+             -e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \
+             -e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \
+             -e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \
+             -e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \
+             -e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \
+             -e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \
+             -e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \
+             -e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \
+             -e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \
+             -e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \
+             -e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \
+             -e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \
+             -e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \
+             -e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \
+             -e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \
+             -e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \
+             -e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \
+             -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \
+             -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \
+             -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \
+             < $(srcdir)/wchar.in.h | \
+         sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+             -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
+             -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
+             -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
+             -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
+             -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
+             -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
+             -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
+             -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
+             -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+             -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \
+             -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \
+             -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \
+             -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \
+             -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \
+             -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \
+             -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \
+             -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \
+             -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \
+             -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \
+             -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \
+             -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \
+             -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \
+             -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \
+             -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \
+             -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \
+             -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \
+             -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \
+             -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \
+             -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \
+             -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \
+             -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \
+             -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \
+             -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \
+             -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \
+             -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \
+             -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
+             -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
+             -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+             -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+         | \
+         sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+             -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
+             -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
+             -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
+             -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
+             -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
+             -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
+             -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
+             -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
+             -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
+             -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
+             -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+             -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += wchar.h wchar.h-t
+
+EXTRA_DIST += wchar.in.h
+
+## end   gnulib module wchar
+
+## begin gnulib module wcrtomb
+
+
+EXTRA_DIST += wcrtomb.c
+
+EXTRA_libgnulib_a_SOURCES += wcrtomb.c
+
+## end   gnulib module wcrtomb
+
+## begin gnulib module wctype-h
+
+BUILT_SOURCES += wctype.h
+
+# We need the following in order to create <wctype.h> when the system
+# doesn't have one that works with the given compiler.
+wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+             -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
+             -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
+             -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
+             -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
+             -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \
+             -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
+             -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+             -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \
+             -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \
+             -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
+             -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
+             -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/wctype.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += wctype.h wctype.h-t
+
+EXTRA_DIST += wctype.in.h
+
+## end   gnulib module wctype-h
+
+## begin gnulib module wcwidth
+
+
+EXTRA_DIST += wcwidth.c
+
+EXTRA_libgnulib_a_SOURCES += wcwidth.c
+
+## end   gnulib module wcwidth
+
+## begin gnulib module xalloc
+
+
+EXTRA_DIST += xalloc.h xmalloc.c
+
+EXTRA_libgnulib_a_SOURCES += xmalloc.c
+
+## end   gnulib module xalloc
+
+## begin gnulib module xalloc-die
+
+libgnulib_a_SOURCES += xalloc-die.c
+
+## end   gnulib module xalloc-die
+
+## begin gnulib module xgetcwd
+
+
+EXTRA_DIST += xgetcwd.c xgetcwd.h
+
+EXTRA_libgnulib_a_SOURCES += xgetcwd.c
+
+## end   gnulib module xgetcwd
+
+## begin gnulib module xsize
+
+libgnulib_a_SOURCES += xsize.h
+
+## end   gnulib module xsize
+
+## begin gnulib module xstrndup
+
+libgnulib_a_SOURCES += xstrndup.h xstrndup.c
+
+## end   gnulib module xstrndup
+
+## begin gnulib module xstrtod
+
+
+EXTRA_DIST += xstrtod.c xstrtod.h
+
+EXTRA_libgnulib_a_SOURCES += xstrtod.c
+
+## end   gnulib module xstrtod
+
+## begin gnulib module xstrtol
+
+
+EXTRA_DIST += xstrtol-error.c xstrtol.c xstrtol.h xstrtoul.c
+
+EXTRA_libgnulib_a_SOURCES += xstrtol-error.c xstrtol.c xstrtoul.c
+
+## end   gnulib module xstrtol
+
+## begin gnulib module xstrtoumax
+
+libgnulib_a_SOURCES += xstrtoumax.c
+
+## end   gnulib module xstrtoumax
+
+## begin gnulib module yesno
+
+
+EXTRA_DIST += yesno.c yesno.h
+
+EXTRA_libgnulib_a_SOURCES += yesno.c
+
+## end   gnulib module yesno
+
+
+mostlyclean-local: mostlyclean-generic
+       @for dir in '' $(MOSTLYCLEANDIRS); do \
+         if test -n "$$dir" && test -d $$dir; then \
+           echo "rmdir $$dir"; rmdir $$dir; \
+         fi; \
+       done; \
+       :
diff --git a/gnulib/lib/Makefile.in b/gnulib/lib/Makefile.in
new file mode 100644 (file)
index 0000000..6ea995f
--- /dev/null
@@ -0,0 +1,3265 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+
+# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-libtool --macro-prefix=gl alloca areadlinkat argmatch assert c-strcasestr c-strstr canonicalize cloexec closein closeout ctype d-type dirent-safer dirname errno error faccessat fchdir fcntl fdl fdopendir fflush fileblocks filemode fnmatch-gnu fopen-safer fts getdelim getline getopt-gnu gettext gettimeofday gpl-3.0 hash human idcache inline inttypes isblank locale lstat maintainer-makefile malloc math mbrtowc mbscasestr mbsstr mktime modechange modf mountlist open parse-datetime pathmax perror progname quotearg readlink realloc regex rpmatch save-cwd savedir selinux-at snprintf stat stat-macros stat-time stdarg stdbool stddef stdint stdio stdlib stpcpy strcasestr strdup-posix strftime string strtol strtoul strtoull strtoumax sys_stat sys_time sys_wait timespec update-copyright verify version-etc version-etc-fsf warnings wchar wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno
+
+
+
+VPATH = @srcdir@
+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@
+@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_1 = uniwidth/width.c
+subdir = gnulib/lib
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in alloca.c parse-datetime.c
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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)
+AR = ar
+ARFLAGS = cru
+libgnulib_a_AR = $(AR) $(ARFLAGS)
+am__DEPENDENCIES_1 =
+am__libgnulib_a_SOURCES_DIST = areadlink.c areadlink-with-size.c \
+       areadlinkat.c bitrotate.h c-ctype.h c-ctype.c c-strcase.h \
+       c-strcasecmp.c c-strncasecmp.c c-strcasestr.h c-strcasestr.c \
+       c-strstr.h c-strstr.c close-hook.c exitfail.c file-set.c \
+       freadahead.c freading.c gettext.h hash-pjw.h hash-pjw.c \
+       hash-triple.c localcharset.h localcharset.c malloca.c mbchar.c \
+       mbscasestr.c mbslen.c mbsstr.c mbuiter.h openat-die.c \
+       parse-datetime.y progname.h progname.c se-context.in.h \
+       se-selinux.in.h size_max.h strnlen1.h strnlen1.c \
+       uniwidth/width.c verify.h version-etc.h version-etc.c \
+       version-etc-fsf.c xalloc-die.c xsize.h xstrndup.h xstrndup.c \
+       xstrtoumax.c
+am__dirstamp = $(am__leading_dot)dirstamp
+@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__objects_1 = uniwidth/width.$(OBJEXT)
+am_libgnulib_a_OBJECTS = areadlink.$(OBJEXT) \
+       areadlink-with-size.$(OBJEXT) areadlinkat.$(OBJEXT) \
+       c-ctype.$(OBJEXT) c-strcasecmp.$(OBJEXT) \
+       c-strncasecmp.$(OBJEXT) c-strcasestr.$(OBJEXT) \
+       c-strstr.$(OBJEXT) close-hook.$(OBJEXT) exitfail.$(OBJEXT) \
+       file-set.$(OBJEXT) freadahead.$(OBJEXT) freading.$(OBJEXT) \
+       hash-pjw.$(OBJEXT) hash-triple.$(OBJEXT) \
+       localcharset.$(OBJEXT) malloca.$(OBJEXT) mbchar.$(OBJEXT) \
+       mbscasestr.$(OBJEXT) mbslen.$(OBJEXT) mbsstr.$(OBJEXT) \
+       openat-die.$(OBJEXT) parse-datetime.$(OBJEXT) \
+       progname.$(OBJEXT) strnlen1.$(OBJEXT) $(am__objects_1) \
+       version-etc.$(OBJEXT) version-etc-fsf.$(OBJEXT) \
+       xalloc-die.$(OBJEXT) xstrndup.$(OBJEXT) xstrtoumax.$(OBJEXT)
+libgnulib_a_OBJECTS = $(am_libgnulib_a_OBJECTS)
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+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)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+YLWRAP = $(top_srcdir)/build-aux/ylwrap
+SOURCES = $(libgnulib_a_SOURCES) $(EXTRA_libgnulib_a_SOURCES)
+DIST_SOURCES = $(am__libgnulib_a_SOURCES_DIST) \
+       $(EXTRA_libgnulib_a_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+HEADERS = $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = @INCLUDES@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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 subdir-objects
+SUBDIRS = 
+noinst_HEADERS = 
+noinst_LIBRARIES = libgnulib.a
+noinst_LTLIBRARIES = 
+EXTRA_DIST = alloca.c alloca.in.h areadlink.h areadlink.h areadlink.h \
+       $(top_srcdir)/build-aux/arg-nonnull.h argmatch.c argmatch.h \
+       btowc.c $(top_srcdir)/build-aux/c++defs.h str-two-way.h \
+       canonicalize.c canonicalize.h chdir-long.c chdir-long.h \
+       chown.c fchown-stub.c cloexec.c cloexec.h close.c close-hook.h \
+       close-stream.c close-stream.h closein.c closein.h closeout.c \
+       closeout.h ctype.in.h cycle-check.c cycle-check.h dev-ino.h \
+       dirent.in.h dirent--.h dirent-safer.h opendir-safer.c dirfd.c \
+       basename.c dirname.c stripslash.c basename-lgpl.c \
+       dirname-lgpl.c dirname.h stripslash.c dosname.h dup2.c \
+       errno.in.h error.c error.h euidaccess.c exitfail.h faccessat.c \
+       fchdir.c fclose.c fcntl.c fcntl.in.h creat-safer.c fcntl--.h \
+       fcntl-safer.h open-safer.c fdopendir.c openat-priv.h \
+       openat-proc.c fflush.c stdio-impl.h file-set.h fileblocks.c \
+       filemode.c filemode.h float.in.h fnmatch.c fnmatch.in.h \
+       fnmatch_loop.c fopen.c fopen-safer.c stdio--.h stdio-safer.h \
+       fpending.c fpending.h fpurge.c stdio-impl.h freadahead.h \
+       stdio-impl.h freading.h stdio-impl.h fseeko.c stdio-impl.h \
+       ftello.c stdio-impl.h fts-cycle.c fts.c fts_.h getcwd.c \
+       getdelim.c getdtablesize.c getgroups.c getline.c getopt.c \
+       getopt.in.h getopt1.c getopt_int.h \
+       $(top_srcdir)/build-aux/config.rpath gettime.c gettimeofday.c \
+       $(top_srcdir)/GNUmakefile group-member.c group-member.h hash.c \
+       hash.h hash-triple.h $(top_srcdir)/build-aux/config.rpath \
+       human.c human.h i-ring.c i-ring.h idcache.c idcache.h \
+       intprops.h inttypes.in.h isblank.c iswblank.c langinfo.in.h \
+       lchown.c config.charset ref-add.sin ref-del.sin locale.in.h \
+       lseek.c lstat.c $(top_srcdir)/maint.mk malloc.c malloc.c \
+       malloca.h malloca.valgrind math.in.h mbchar.h mbrtowc.c \
+       str-kmp.h mbsinit.c mbsrtowcs-impl.h mbsrtowcs-state.c \
+       mbsrtowcs.c str-kmp.h mbtowc-impl.h mbtowc.c memchr.c \
+       memchr.valgrind mempcpy.c memrchr.c mkdir.c mktime-internal.h \
+       mktime.c modechange.c modechange.h mountlist.c mountlist.h \
+       nl_langinfo.c open.c at-func.c fchmodat.c fchownat.c fstatat.c \
+       mkdirat.c openat-priv.h openat-proc.c openat.c openat.h \
+       unlinkat.c fcntl--.h fcntl-safer.h openat-safer.c \
+       parse-datetime.c parse-datetime.h pathmax.h perror.c quote.c \
+       quote.h quotearg.c quotearg.h readlink.c readlinkat.c \
+       realloc.c realloc.c regcomp.c regex.c regex.h regex_internal.c \
+       regex_internal.h regexec.c rmdir.c rpmatch.c same.c same.h \
+       same-inode.h save-cwd.c save-cwd.h savedir.c savedir.h \
+       selinux-at.c selinux-at.h getfilecon.c setenv.c snprintf.c \
+       stat.c stat-macros.h stat-time.h stdarg.in.h stdbool.in.h \
+       stddef.in.h stdint.in.h stdio.in.h stdlib.in.h stpcpy.c \
+       strcasecmp.c strncasecmp.c str-two-way.h strcasestr.c strdup.c \
+       streq.h strerror.c strftime.c strftime.h string.in.h \
+       strings.in.h strndup.c strnlen.c str-two-way.h strstr.c \
+       strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \
+       strtoumax.c sys_stat.in.h sys_time.in.h sys_wait.in.h \
+       time.in.h time_r.c timespec.h unistd.in.h dup-safer.c \
+       fd-safer.c pipe-safer.c unistd--.h unistd-safer.h \
+       unitypes.in.h localcharset.h uniwidth.in.h uniwidth/cjk.h \
+       unlink.c unsetenv.c $(top_srcdir)/build-aux/unused-parameter.h \
+       $(top_srcdir)/build-aux/update-copyright \
+       $(top_srcdir)/build-aux/useless-if-before-free asnprintf.c \
+       float+.h printf-args.c printf-args.h printf-parse.c \
+       printf-parse.h vasnprintf.c vasnprintf.h \
+       $(top_srcdir)/build-aux/vc-list-files \
+       $(top_srcdir)/build-aux/warn-on-use.h wchar.in.h wcrtomb.c \
+       wctype.in.h wcwidth.c xalloc.h xmalloc.c xgetcwd.c xgetcwd.h \
+       xstrtod.c xstrtod.h xstrtol-error.c xstrtol.c xstrtol.h \
+       xstrtoul.c yesno.c yesno.h
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h configmake.h \
+       ctype.h dirent.h $(ERRNO_H) fcntl.h $(FLOAT_H) $(FNMATCH_H) \
+       $(GETOPT_H) inttypes.h langinfo.h locale.h math.h \
+       parse-datetime.c selinux/selinux.h $(SELINUX_CONTEXT_H) \
+       $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \
+       stdlib.h string.h strings.h sys/stat.h sys/time.h sys/wait.h \
+       time.h unistd.h $(LIBUNISTRING_UNITYPES_H) \
+       $(LIBUNISTRING_UNIWIDTH_H) unused-parameter.h warn-on-use.h \
+       wchar.h wctype.h
+SUFFIXES = .sed .sin
+MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \
+       arg-nonnull.h-t c++defs.h c++defs.h-t ctype.h ctype.h-t \
+       dirent.h dirent.h-t errno.h errno.h-t fcntl.h fcntl.h-t \
+       float.h float.h-t fnmatch.h fnmatch.h-t getopt.h getopt.h-t \
+       inttypes.h inttypes.h-t langinfo.h langinfo.h-t locale.h \
+       locale.h-t math.h math.h-t parse-datetime.c-t \
+       selinux/selinux.h selinux/selinux.h-t selinux/context.h \
+       selinux/context.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t \
+       stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \
+       stdlib.h stdlib.h-t string.h string.h-t strings.h strings.h-t \
+       sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t sys/wait.h \
+       sys/wait.h-t time.h time.h-t unistd.h unistd.h-t unitypes.h \
+       unitypes.h-t uniwidth.h uniwidth.h-t unused-parameter.h \
+       unused-parameter.h-t warn-on-use.h warn-on-use.h-t wchar.h \
+       wchar.h-t wctype.h wctype.h-t
+MOSTLYCLEANDIRS = selinux sys sys
+CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
+       ref-del.sed
+DISTCLEANFILES = 
+MAINTAINERCLEANFILES = parse-datetime.c
+
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+AM_CPPFLAGS = -I$(top_builddir)/intl
+AM_CFLAGS = 
+libgnulib_a_SOURCES = areadlink.c areadlink-with-size.c areadlinkat.c \
+       bitrotate.h c-ctype.h c-ctype.c c-strcase.h c-strcasecmp.c \
+       c-strncasecmp.c c-strcasestr.h c-strcasestr.c c-strstr.h \
+       c-strstr.c close-hook.c exitfail.c file-set.c freadahead.c \
+       freading.c gettext.h hash-pjw.h hash-pjw.c hash-triple.c \
+       localcharset.h localcharset.c malloca.c mbchar.c mbscasestr.c \
+       mbslen.c mbsstr.c mbuiter.h openat-die.c parse-datetime.y \
+       progname.h progname.c se-context.in.h se-selinux.in.h \
+       size_max.h strnlen1.h strnlen1.c $(am__append_1) verify.h \
+       version-etc.h version-etc.c version-etc-fsf.c xalloc-die.c \
+       xsize.h xstrndup.h xstrndup.c xstrtoumax.c
+libgnulib_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@
+libgnulib_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
+EXTRA_libgnulib_a_SOURCES = alloca.c argmatch.c btowc.c canonicalize.c \
+       chdir-long.c chown.c fchown-stub.c cloexec.c close.c \
+       close-stream.c closein.c closeout.c cycle-check.c \
+       opendir-safer.c dirfd.c basename.c dirname.c stripslash.c \
+       basename-lgpl.c dirname-lgpl.c stripslash.c dup2.c error.c \
+       euidaccess.c faccessat.c fchdir.c fclose.c fcntl.c \
+       creat-safer.c open-safer.c fdopendir.c openat-proc.c fflush.c \
+       fileblocks.c filemode.c fnmatch.c fnmatch_loop.c fopen.c \
+       fopen-safer.c fpending.c fpurge.c fseeko.c ftello.c \
+       fts-cycle.c fts.c getcwd.c getdelim.c getdtablesize.c \
+       getgroups.c getline.c getopt.c getopt1.c gettime.c \
+       gettimeofday.c group-member.c hash.c human.c i-ring.c \
+       idcache.c isblank.c iswblank.c lchown.c lseek.c lstat.c \
+       malloc.c malloc.c mbrtowc.c mbsinit.c mbsrtowcs-state.c \
+       mbsrtowcs.c mbtowc.c memchr.c mempcpy.c memrchr.c mkdir.c \
+       mktime.c modechange.c mountlist.c nl_langinfo.c open.c \
+       at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c \
+       openat-proc.c openat.c unlinkat.c openat-safer.c perror.c \
+       quote.c quotearg.c readlink.c readlinkat.c realloc.c realloc.c \
+       regcomp.c regex.c regex_internal.c regexec.c rmdir.c rpmatch.c \
+       same.c save-cwd.c savedir.c selinux-at.c getfilecon.c setenv.c \
+       snprintf.c stat.c stpcpy.c strcasecmp.c strncasecmp.c \
+       strcasestr.c strdup.c strerror.c strftime.c strndup.c \
+       strnlen.c strstr.c strtoimax.c strtol.c strtoll.c strtoul.c \
+       strtoull.c strtoumax.c time_r.c dup-safer.c fd-safer.c \
+       pipe-safer.c unlink.c unsetenv.c asnprintf.c printf-args.c \
+       printf-parse.c vasnprintf.c wcrtomb.c wcwidth.c xmalloc.c \
+       xgetcwd.c xstrtod.c xstrtol-error.c xstrtol.c xstrtoul.c \
+       yesno.c
+ARG_NONNULL_H = arg-nonnull.h
+CXXDEFS_H = c++defs.h
+charset_alias = $(DESTDIR)$(libdir)/charset.alias
+charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+UNUSED_PARAMETER_H = unused-parameter.h
+WARN_ON_USE_H = warn-on-use.h
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .sed .sin .c .o .obj .y
+$(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 gnulib/lib/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits gnulib/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)
+uniwidth/$(am__dirstamp):
+       @$(MKDIR_P) uniwidth
+       @: > uniwidth/$(am__dirstamp)
+uniwidth/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) uniwidth/$(DEPDIR)
+       @: > uniwidth/$(DEPDIR)/$(am__dirstamp)
+uniwidth/width.$(OBJEXT): uniwidth/$(am__dirstamp) \
+       uniwidth/$(DEPDIR)/$(am__dirstamp)
+libgnulib.a: $(libgnulib_a_OBJECTS) $(libgnulib_a_DEPENDENCIES) 
+       -rm -f libgnulib.a
+       $(libgnulib_a_AR) libgnulib.a $(libgnulib_a_OBJECTS) $(libgnulib_a_LIBADD)
+       $(RANLIB) libgnulib.a
+
+clean-noinstLTLIBRARIES:
+       -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+       @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+       -rm -f uniwidth/width.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlink-with-size.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlinkat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at-func.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasestr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strstr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chdir-long.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-hook.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-stream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closein.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closeout.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cycle-check.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/euidaccess.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmodat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown-stub.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchownat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fclose.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fflush.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-set.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileblocks.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpending.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpurge.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freadahead.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freading.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftello.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fts-cycle.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfilecon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/group-member.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-pjw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-triple.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/human.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i-ring.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idcache.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isblank.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iswblank.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbchar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbscasestr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbslen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsstr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdirat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modechange.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mountlist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-die.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse-datetime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perror.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpmatch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/same.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/savedir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selinux-at.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpcpy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoll.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoul.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoumax.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc-fsf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcwidth.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetcwd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtod.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol-error.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoul.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoumax.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yesno.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/width.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.y.c:
+       $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+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
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+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)
+       -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp)
+       -rm -f uniwidth/$(am__dirstamp)
+       -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."
+       -rm -f parse-datetime.c
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -rf $(DEPDIR) ./$(DEPDIR) uniwidth/$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-local distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-exec-local
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -rf $(DEPDIR) ./$(DEPDIR) uniwidth/$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-local
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+       ctags-recursive install install-am install-strip \
+       tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am all-local check check-am clean clean-generic \
+       clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \
+       ctags-recursive distclean distclean-compile distclean-generic \
+       distclean-local 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-exec-local 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 installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \
+       tags-recursive uninstall uninstall-am uninstall-local
+
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/alloca.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/GL_ARG_NONNULL/,$$p' \
+         < $(top_srcdir)/build-aux/arg-nonnull.h \
+         > $@-t && \
+       mv $@-t $@
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/c++defs.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/_GL_CXXDEFS/,$$p' \
+         < $(top_srcdir)/build-aux/c++defs.h \
+         > $@-t && \
+       mv $@-t $@
+
+# Listed in the same order as the GNU makefile conventions, and
+# provided by autoconf 2.59c+.
+# The Automake-defined pkg* macros are appended, in the order
+# listed in the Automake 1.10a+ documentation.
+configmake.h: Makefile
+       $(AM_V_GEN)rm -f $@-t && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         echo '#define PREFIX "$(prefix)"'; \
+         echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
+         echo '#define BINDIR "$(bindir)"'; \
+         echo '#define SBINDIR "$(sbindir)"'; \
+         echo '#define LIBEXECDIR "$(libexecdir)"'; \
+         echo '#define DATAROOTDIR "$(datarootdir)"'; \
+         echo '#define DATADIR "$(datadir)"'; \
+         echo '#define SYSCONFDIR "$(sysconfdir)"'; \
+         echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
+         echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+         echo '#define INCLUDEDIR "$(includedir)"'; \
+         echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
+         echo '#define DOCDIR "$(docdir)"'; \
+         echo '#define INFODIR "$(infodir)"'; \
+         echo '#define HTMLDIR "$(htmldir)"'; \
+         echo '#define DVIDIR "$(dvidir)"'; \
+         echo '#define PDFDIR "$(pdfdir)"'; \
+         echo '#define PSDIR "$(psdir)"'; \
+         echo '#define LIBDIR "$(libdir)"'; \
+         echo '#define LISPDIR "$(lispdir)"'; \
+         echo '#define LOCALEDIR "$(localedir)"'; \
+         echo '#define MANDIR "$(mandir)"'; \
+         echo '#define MANEXT "$(manext)"'; \
+         echo '#define PKGDATADIR "$(pkgdatadir)"'; \
+         echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
+         echo '#define PKGLIBDIR "$(pkglibdir)"'; \
+         echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+       } | sed '/""/d' > $@-t && \
+       if test -f $@ && cmp $@-t $@ > /dev/null; then \
+         rm -f $@-t; \
+       else \
+         rm -f $@; mv $@-t $@; \
+       fi
+
+# We need the following in order to create <ctype.h> when the system
+# doesn't have one that works with the given compiler.
+ctype.h: ctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \
+             -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \
+             -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/ctype.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <dirent.h> when the system
+# doesn't have one that works with the given compiler.
+dirent.h: dirent.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
+             -e 's|@''GNULIB_DIRFD''@|$(GNULIB_DIRFD)|g' \
+             -e 's|@''GNULIB_FDOPENDIR''@|$(GNULIB_FDOPENDIR)|g' \
+             -e 's|@''GNULIB_SCANDIR''@|$(GNULIB_SCANDIR)|g' \
+             -e 's|@''GNULIB_ALPHASORT''@|$(GNULIB_ALPHASORT)|g' \
+             -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
+             -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \
+             -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \
+             -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
+             -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
+             -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
+             -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
+             -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
+             -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/dirent.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+errno.h: errno.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+             -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+             -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+             -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+             -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+             -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+             -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+             < $(srcdir)/errno.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <fcntl.h> when the system
+# doesn't have one that works with the given compiler.
+fcntl.h: fcntl.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
+             -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
+             -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
+             -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
+             -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
+             -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
+             -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
+             -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
+             -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/fcntl.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <float.h> when the system
+# doesn't have one that works with the given compiler.
+float.h: float.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
+             < $(srcdir)/float.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <fnmatch.h> when the system
+# doesn't have one that supports the required API.
+fnmatch.h: fnmatch.in.h $(ARG_NONNULL_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             < $(srcdir)/fnmatch.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+
+# We need the following in order to create <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+getopt.h: getopt.in.h $(ARG_NONNULL_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             < $(srcdir)/getopt.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+
+distclean-local: clean-GNUmakefile
+clean-GNUmakefile:
+       test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || :
+
+# We need the following in order to create <inttypes.h> when the system
+# doesn't have one that works with the given compiler.
+inttypes.h: inttypes.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
+             -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
+             -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+             -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+             -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+             -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
+             -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
+             -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
+             -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
+             -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
+             -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
+             -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
+             -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
+             -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+             -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
+             -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
+             -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
+             -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/inttypes.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create an empty placeholder for
+# <langinfo.h> when the system doesn't have one.
+langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
+             -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+             -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
+             -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
+             -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
+             -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \
+             -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
+             -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/langinfo.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to install a simple file in $(libdir)
+# which is shared with other installed packages. We use a list of referencing
+# packages so that "make uninstall" will remove the file if and only if it
+# is not used by another installed package.
+# On systems with glibc-2.1 or newer, the file is redundant, therefore we
+# avoid installing it.
+
+all-local: charset.alias ref-add.sed ref-del.sed
+install-exec-local: install-exec-localcharset
+install-exec-localcharset: all-local
+       if test $(GLIBC21) = no; then \
+         case '$(host_os)' in \
+           darwin[56]*) \
+             need_charset_alias=true ;; \
+           darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+             need_charset_alias=false ;; \
+           *) \
+             need_charset_alias=true ;; \
+         esac ; \
+       else \
+         need_charset_alias=false ; \
+       fi ; \
+       if $$need_charset_alias; then \
+         $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
+       fi ; \
+       if test -f $(charset_alias); then \
+         sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+         $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+         rm -f $(charset_tmp) ; \
+       else \
+         if $$need_charset_alias; then \
+           sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+           $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+           rm -f $(charset_tmp) ; \
+         fi ; \
+       fi
+
+uninstall-local: uninstall-localcharset
+uninstall-localcharset: all-local
+       if test -f $(charset_alias); then \
+         sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+         if grep '^# Packages using this file: $$' $(charset_tmp) \
+             > /dev/null; then \
+           rm -f $(charset_alias); \
+         else \
+           $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+         fi; \
+         rm -f $(charset_tmp); \
+       fi
+
+charset.alias: config.charset
+       $(AM_V_GEN)rm -f t-$@ $@ && \
+       $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \
+       mv t-$@ $@
+.sin.sed:
+       $(AM_V_GEN)rm -f t-$@ $@ && \
+       sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
+       mv t-$@ $@
+
+# We need the following in order to create <locale.h> when the system
+# doesn't have one that provides all definitions.
+locale.h: locale.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
+             -e 's|@''GNULIB_SETLOCALE''@|$(GNULIB_SETLOCALE)|g' \
+             -e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \
+             -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+             -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
+             -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
+             -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/locale.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <math.h> when the system
+# doesn't have one that works with the given compiler.
+math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \
+             -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \
+             -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \
+             -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \
+             -e 's|@''GNULIB_CEIL''@|$(GNULIB_CEIL)|g' \
+             -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \
+             -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
+             -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \
+             -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \
+             -e 's|@''GNULIB_FLOOR''@|$(GNULIB_FLOOR)|g' \
+             -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \
+             -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \
+             -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \
+             -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \
+             -e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \
+             -e 's|@''GNULIB_ISINF''@|$(GNULIB_ISINF)|g' \
+             -e 's|@''GNULIB_ISNAN''@|$(GNULIB_ISNAN)|g' \
+             -e 's|@''GNULIB_ISNANF''@|$(GNULIB_ISNANF)|g' \
+             -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \
+             -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \
+             -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \
+             -e 's|@''GNULIB_LOGB''@|$(GNULIB_LOGB)|g' \
+             -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \
+             -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \
+             -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \
+             -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \
+             -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \
+             -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \
+             -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \
+             -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \
+             -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \
+             -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \
+             -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \
+             < $(srcdir)/math.in.h | \
+         sed -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
+             -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \
+             -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \
+             -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
+             -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \
+             -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \
+             -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \
+             -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \
+             -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \
+             -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \
+             -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \
+             -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \
+             -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
+             -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
+             -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
+             -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \
+             -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \
+             -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
+             -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
+             -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \
+             -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \
+             -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
+             -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
+             -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
+             -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
+             -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \
+             -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \
+             -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \
+             -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \
+             -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \
+             -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \
+             -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \
+             -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
+             -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
+         | \
+         sed -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
+             -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
+             -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
+             -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \
+             -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \
+             -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \
+             -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \
+             -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \
+             -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \
+             -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \
+             -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \
+             -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \
+             -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \
+             -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \
+             -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \
+             -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
+             -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
+             -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
+             -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+             -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \
+             -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \
+             -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+
+# This rule overrides the Automake generated .y.c rule, to ensure that the
+# parse-datetime.c file gets generated in the source directory, not in the
+# build directory.
+parse-datetime.c: parse-datetime.y
+       $(AM_V_GEN)$(SHELL) $(YLWRAP) $(srcdir)/parse-datetime.y \
+                                     y.tab.c parse-datetime.c \
+                                     y.tab.h parse-datetime.h \
+                                     y.output parse-datetime.output \
+                                     -- $(YACC) $(YFLAGS) $(AM_YFLAGS) && \
+       mv parse-datetime.c parse-datetime.c-t && \
+       mv parse-datetime.c-t $(srcdir)/parse-datetime.c
+selinux/selinux.h: se-selinux.in.h $(UNUSED_PARAMETER_H)
+       $(AM_V_at)$(MKDIR_P) selinux
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \
+             -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
+             < $(srcdir)/se-selinux.in.h; \
+       } > $@-t && \
+       chmod a-x $@-t && \
+       mv $@-t $@
+selinux/context.h: se-context.in.h $(UNUSED_PARAMETER_H)
+       $(AM_V_at)$(MKDIR_P) selinux
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
+             < $(srcdir)/se-context.in.h; \
+       } > $@-t && \
+       chmod a-x $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <stdarg.h> when the system
+# doesn't have one that works with the given compiler.
+stdarg.h: stdarg.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
+             < $(srcdir)/stdarg.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <stddef.h> when the system
+# doesn't have one that works with the given compiler.
+stddef.h: stddef.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+             -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
+             -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
+             < $(srcdir)/stddef.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+             -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
+             -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+             -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
+             -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+             -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
+             -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+             -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+             -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+             -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
+             -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
+             -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
+             -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
+             -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
+             -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
+             -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
+             -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
+             -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
+             -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
+             -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
+             -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
+             -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+             < $(srcdir)/stdint.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <stdio.h> when the system
+# doesn't have one that works with the given compiler.
+stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+             -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+             -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
+             -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
+             -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
+             -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
+             -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
+             -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
+             -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
+             -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
+             -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
+             -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
+             -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
+             -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
+             -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
+             -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
+             -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
+             -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
+             -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
+             -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
+             -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
+             -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
+             -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
+             -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
+             -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
+             -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
+             -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
+             -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
+             -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
+             -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
+             -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
+             -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
+             -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
+             -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
+             -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
+             -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+             < $(srcdir)/stdio.in.h | \
+         sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+             -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
+             -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
+             -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+             -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+             -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+             -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
+             -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
+             -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+             -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \
+             -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \
+             -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
+             -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
+             -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+             -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+             -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+             -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
+             -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+             -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+             -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
+             -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
+             -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
+             -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
+             -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
+             -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+             -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \
+             -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+             -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+             -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+             -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
+             -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+             -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \
+             -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \
+             -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \
+             -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+             -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+             -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+             -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \
+             -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+             -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+             -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+             -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+             -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+             -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+             -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+             -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
+             -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
+             -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
+             -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
+             -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+             -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
+             -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
+             -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
+             -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
+             -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
+             -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
+             -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+             -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
+             -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
+             -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
+             -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
+             -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
+             -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
+             -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
+             -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
+             -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
+             -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
+             -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
+             -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
+             -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
+             -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
+             -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
+             < $(srcdir)/stdlib.in.h | \
+         sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+             -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
+             -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+             -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+             -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
+             -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+             -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
+             -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
+             -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
+             -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+             -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
+             -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
+             -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
+             -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
+             -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+             -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
+             -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+             -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+             -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
+             -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
+             -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+             -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
+             -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+             -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
+             -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
+             -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
+             -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+             -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+             -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
+             -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
+             -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
+             -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+             -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
+             -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <string.h> when the system
+# doesn't have one that works with the given compiler.
+string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+             -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
+             -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
+             -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
+             -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
+             -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
+             -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
+             -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
+             -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
+             -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
+             -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
+             -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
+             -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
+             -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
+             -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
+             -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
+             -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
+             -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
+             -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
+             -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
+             -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
+             -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
+             -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
+             -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
+             -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
+             -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
+             -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
+             -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
+             -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
+             -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
+             -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
+             -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
+             -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+             -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \
+             -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
+             -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+             < $(srcdir)/string.in.h | \
+         sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+             -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
+             -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+             -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+             -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+             -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
+             -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
+             -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+             -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
+             -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+             -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
+             -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
+             -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
+             -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
+             -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
+             -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+             -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
+             -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
+             -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+             -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
+             -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
+             -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+             -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+             -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
+             -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+             -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+             -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
+             -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
+             -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
+             -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
+             -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+             -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+             -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+             < $(srcdir)/string.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <strings.h> when the system
+# doesn't have one that works with the given compiler.
+strings.h: strings.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
+             -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
+             -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/strings.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <sys/stat.h> when the system
+# has one that is incomplete.
+sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) sys
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+             -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
+             -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
+             -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
+             -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
+             -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
+             -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
+             -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
+             -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
+             -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
+             -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
+             -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
+             -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
+             -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
+             -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
+             -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+             -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
+             -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
+             -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
+             -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
+             -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
+             -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
+             -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
+             -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+             -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
+             -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
+             -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
+             -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
+             -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+             -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+             -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+             -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
+             -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/sys_stat.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+sys/time.h: sys_time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) sys
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
+             -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+             -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
+             -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+             -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/sys_time.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <sys/wait.h> when the system
+# has one that is incomplete.
+sys/wait.h: sys_wait.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) sys
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
+             -e 's|@''GNULIB_WAITPID''@|$(GNULIB_WAITPID)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/sys_wait.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+             -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
+             -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
+             -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \
+             -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \
+             -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \
+             -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
+             -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
+             -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
+             -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+             -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
+             -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
+             -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+             -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+             -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/time.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+             -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
+             -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
+             -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
+             -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
+             -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
+             -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
+             -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
+             -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
+             -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
+             -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
+             -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
+             -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
+             -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
+             -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
+             -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
+             -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
+             -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
+             -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
+             -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
+             -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
+             -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+             -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
+             -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
+             -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
+             -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
+             -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
+             -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
+             -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
+             -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+             -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
+             -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
+             -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
+             -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
+             -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
+             -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
+             -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
+             -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
+             -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
+             -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
+             -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
+             -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+             < $(srcdir)/unistd.in.h | \
+         sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+             -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+             -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
+             -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+             -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
+             -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
+             -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+             -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
+             -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+             -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+             -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
+             -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
+             -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
+             -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+             -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
+             -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
+             -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
+             -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
+             -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
+             -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
+             -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
+             -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+             -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+             -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+             -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
+             -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+             -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
+             -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
+             -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+             -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
+             -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
+             -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+             -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
+             -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
+             -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
+             -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
+             -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
+         | \
+         sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+             -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
+             -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
+             -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+             -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+             -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+             -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
+             -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
+             -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
+             -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+             -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
+             -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
+             -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
+             -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+             -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
+             -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
+             -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+             -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+             -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
+             -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+             -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
+             -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
+             -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
+             -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
+             -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+             -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
+             -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+
+unitypes.h: unitypes.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/unitypes.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+
+uniwidth.h: uniwidth.in.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/uniwidth.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/unused-parameter.h, except that it has the copyright header cut
+# off.
+unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+         < $(top_srcdir)/build-aux/unused-parameter.h \
+         > $@-t && \
+       mv $@-t $@
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/^.ifndef/,$$p' \
+         < $(top_srcdir)/build-aux/warn-on-use.h \
+         > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <wchar.h> when the system
+# version does not work standalone.
+wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
+             -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
+             -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
+             -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
+             -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
+             -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
+             -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
+             -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
+             -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
+             -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
+             -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
+             -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
+             -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
+             -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+             -e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \
+             -e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \
+             -e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \
+             -e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \
+             -e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \
+             -e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \
+             -e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \
+             -e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \
+             -e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \
+             -e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \
+             -e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \
+             -e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \
+             -e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \
+             -e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \
+             -e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \
+             -e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \
+             -e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \
+             -e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \
+             -e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \
+             -e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \
+             -e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \
+             -e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \
+             -e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \
+             -e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \
+             -e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \
+             -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \
+             -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \
+             -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \
+             < $(srcdir)/wchar.in.h | \
+         sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+             -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
+             -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
+             -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
+             -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
+             -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
+             -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
+             -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
+             -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
+             -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+             -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \
+             -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \
+             -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \
+             -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \
+             -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \
+             -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \
+             -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \
+             -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \
+             -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \
+             -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \
+             -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \
+             -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \
+             -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \
+             -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \
+             -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \
+             -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \
+             -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \
+             -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \
+             -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \
+             -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \
+             -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \
+             -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \
+             -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \
+             -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \
+             -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \
+             -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \
+             -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
+             -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
+             -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+             -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+         | \
+         sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+             -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
+             -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
+             -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
+             -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
+             -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
+             -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
+             -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
+             -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
+             -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
+             -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
+             -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+             -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create <wctype.h> when the system
+# doesn't have one that works with the given compiler.
+wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+             -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
+             -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
+             -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
+             -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
+             -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \
+             -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
+             -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+             -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \
+             -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \
+             -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
+             -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
+             -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/wctype.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+mostlyclean-local: mostlyclean-generic
+       @for dir in '' $(MOSTLYCLEANDIRS); do \
+         if test -n "$$dir" && test -d $$dir; then \
+           echo "rmdir $$dir"; rmdir $$dir; \
+         fi; \
+       done; \
+       :
+
+# 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/gnulib/lib/alloca.c b/gnulib/lib/alloca.c
new file mode 100644 (file)
index 0000000..771c2fa
--- /dev/null
@@ -0,0 +1,491 @@
+/* alloca.c -- allocate automatically reclaimed memory
+   (Mostly) portable public-domain implementation -- D A Gwyn
+
+   This implementation of the PWB library alloca function,
+   which is used to allocate space off the run-time stack so
+   that it is automatically reclaimed upon procedure exit,
+   was inspired by discussions with J. Q. Johnson of Cornell.
+   J.Otto Tennant <jot@cray.com> contributed the Cray support.
+
+   There are some preprocessor constants that can
+   be defined when compiling for your specific system, for
+   improved efficiency; however, the defaults should be okay.
+
+   The general concept of this implementation is to keep
+   track of all alloca-allocated blocks, and reclaim any
+   that are found to be deeper in the stack than the current
+   invocation.  This heuristic does not reclaim storage as
+   soon as it becomes invalid, but it will do so eventually.
+
+   As a special case, alloca(0) reclaims storage without
+   allocating any.  It is a good idea to use alloca(0) in
+   your main control loop, etc. to force garbage collection.  */
+
+#include <config.h>
+
+#include <alloca.h>
+
+#include <string.h>
+#include <stdlib.h>
+
+#ifdef emacs
+# include "lisp.h"
+# include "blockinput.h"
+# ifdef EMACS_FREE
+#  undef free
+#  define free EMACS_FREE
+# endif
+#else
+# define memory_full() abort ()
+#endif
+
+/* If compiling with GCC 2, this file's not needed.  */
+#if !defined (__GNUC__) || __GNUC__ < 2
+
+/* If someone has defined alloca as a macro,
+   there must be some other way alloca is supposed to work.  */
+# ifndef alloca
+
+#  ifdef emacs
+#   ifdef static
+/* actually, only want this if static is defined as ""
+   -- this is for usg, in which emacs must undefine static
+   in order to make unexec workable
+   */
+#    ifndef STACK_DIRECTION
+you
+lose
+-- must know STACK_DIRECTION at compile-time
+/* Using #error here is not wise since this file should work for
+   old and obscure compilers.  */
+#    endif /* STACK_DIRECTION undefined */
+#   endif /* static */
+#  endif /* emacs */
+
+/* If your stack is a linked list of frames, you have to
+   provide an "address metric" ADDRESS_FUNCTION macro.  */
+
+#  if defined (CRAY) && defined (CRAY_STACKSEG_END)
+long i00afunc ();
+#   define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
+#  else
+#   define ADDRESS_FUNCTION(arg) &(arg)
+#  endif
+
+/* Define STACK_DIRECTION if you know the direction of stack
+   growth for your system; otherwise it will be automatically
+   deduced at run-time.
+
+   STACK_DIRECTION > 0 => grows toward higher addresses
+   STACK_DIRECTION < 0 => grows toward lower addresses
+   STACK_DIRECTION = 0 => direction of growth unknown  */
+
+#  ifndef STACK_DIRECTION
+#   define STACK_DIRECTION      0       /* Direction unknown.  */
+#  endif
+
+#  if STACK_DIRECTION != 0
+
+#   define STACK_DIR    STACK_DIRECTION /* Known at compile-time.  */
+
+#  else /* STACK_DIRECTION == 0; need run-time code.  */
+
+static int stack_dir;           /* 1 or -1 once known.  */
+#   define STACK_DIR    stack_dir
+
+static void
+find_stack_direction (char **ptr)
+{
+  auto char dummy;              /* To get stack address.  */
+
+  if (*ptr == NULL)
+    {                           /* Initial entry.  */
+      *ptr = ADDRESS_FUNCTION (dummy);
+
+      find_stack_direction (ptr);  /* Recurse once.  */
+    }
+  else
+    {
+      /* Second entry.  */
+      if (ADDRESS_FUNCTION (dummy) > *ptr)
+        stack_dir = 1;          /* Stack grew upward.  */
+      else
+        stack_dir = -1;         /* Stack grew downward.  */
+    }
+}
+
+#  endif /* STACK_DIRECTION == 0 */
+
+/* An "alloca header" is used to:
+   (a) chain together all alloca'ed blocks;
+   (b) keep track of stack depth.
+
+   It is very important that sizeof(header) agree with malloc
+   alignment chunk size.  The following default should work okay.  */
+
+#  ifndef       ALIGN_SIZE
+#   define ALIGN_SIZE   sizeof(double)
+#  endif
+
+typedef union hdr
+{
+  char align[ALIGN_SIZE];       /* To force sizeof(header).  */
+  struct
+    {
+      union hdr *next;          /* For chaining headers.  */
+      char *deep;               /* For stack depth measure.  */
+    } h;
+} header;
+
+static header *last_alloca_header = NULL;       /* -> last alloca header.  */
+
+/* Return a pointer to at least SIZE bytes of storage,
+   which will be automatically reclaimed upon exit from
+   the procedure that called alloca.  Originally, this space
+   was supposed to be taken from the current stack frame of the
+   caller, but that method cannot be made to work for some
+   implementations of C, for example under Gould's UTX/32.  */
+
+void *
+alloca (size_t size)
+{
+  auto char probe;              /* Probes stack depth: */
+  register char *depth = ADDRESS_FUNCTION (probe);
+
+#  if STACK_DIRECTION == 0
+  if (STACK_DIR == 0)           /* Unknown growth direction.  */
+    {
+      char *addr = NULL;        /* Address of first `dummy', once known.  */
+      find_stack_direction (&addr);
+    }
+#  endif
+
+  /* Reclaim garbage, defined as all alloca'd storage that
+     was allocated from deeper in the stack than currently.  */
+
+  {
+    register header *hp;        /* Traverses linked list.  */
+
+#  ifdef emacs
+    BLOCK_INPUT;
+#  endif
+
+    for (hp = last_alloca_header; hp != NULL;)
+      if ((STACK_DIR > 0 && hp->h.deep > depth)
+          || (STACK_DIR < 0 && hp->h.deep < depth))
+        {
+          register header *np = hp->h.next;
+
+          free (hp);            /* Collect garbage.  */
+
+          hp = np;              /* -> next header.  */
+        }
+      else
+        break;                  /* Rest are not deeper.  */
+
+    last_alloca_header = hp;    /* -> last valid storage.  */
+
+#  ifdef emacs
+    UNBLOCK_INPUT;
+#  endif
+  }
+
+  if (size == 0)
+    return NULL;                /* No allocation required.  */
+
+  /* Allocate combined header + user data storage.  */
+
+  {
+    /* Address of header.  */
+    register header *new;
+
+    size_t combined_size = sizeof (header) + size;
+    if (combined_size < sizeof (header))
+      memory_full ();
+
+    new = malloc (combined_size);
+
+    if (! new)
+      memory_full ();
+
+    new->h.next = last_alloca_header;
+    new->h.deep = depth;
+
+    last_alloca_header = new;
+
+    /* User storage begins just after header.  */
+
+    return (void *) (new + 1);
+  }
+}
+
+#  if defined (CRAY) && defined (CRAY_STACKSEG_END)
+
+#   ifdef DEBUG_I00AFUNC
+#    include <stdio.h>
+#   endif
+
+#   ifndef CRAY_STACK
+#    define CRAY_STACK
+#    ifndef CRAY2
+/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
+struct stack_control_header
+  {
+    long shgrow:32;             /* Number of times stack has grown.  */
+    long shaseg:32;             /* Size of increments to stack.  */
+    long shhwm:32;              /* High water mark of stack.  */
+    long shsize:32;             /* Current size of stack (all segments).  */
+  };
+
+/* The stack segment linkage control information occurs at
+   the high-address end of a stack segment.  (The stack
+   grows from low addresses to high addresses.)  The initial
+   part of the stack segment linkage control information is
+   0200 (octal) words.  This provides for register storage
+   for the routine which overflows the stack.  */
+
+struct stack_segment_linkage
+  {
+    long ss[0200];              /* 0200 overflow words.  */
+    long sssize:32;             /* Number of words in this segment.  */
+    long ssbase:32;             /* Offset to stack base.  */
+    long:32;
+    long sspseg:32;             /* Offset to linkage control of previous
+                                   segment of stack.  */
+    long:32;
+    long sstcpt:32;             /* Pointer to task common address block.  */
+    long sscsnm;                /* Private control structure number for
+                                   microtasking.  */
+    long ssusr1;                /* Reserved for user.  */
+    long ssusr2;                /* Reserved for user.  */
+    long sstpid;                /* Process ID for pid based multi-tasking.  */
+    long ssgvup;                /* Pointer to multitasking thread giveup.  */
+    long sscray[7];             /* Reserved for Cray Research.  */
+    long ssa0;
+    long ssa1;
+    long ssa2;
+    long ssa3;
+    long ssa4;
+    long ssa5;
+    long ssa6;
+    long ssa7;
+    long sss0;
+    long sss1;
+    long sss2;
+    long sss3;
+    long sss4;
+    long sss5;
+    long sss6;
+    long sss7;
+  };
+
+#    else /* CRAY2 */
+/* The following structure defines the vector of words
+   returned by the STKSTAT library routine.  */
+struct stk_stat
+  {
+    long now;                   /* Current total stack size.  */
+    long maxc;                  /* Amount of contiguous space which would
+                                   be required to satisfy the maximum
+                                   stack demand to date.  */
+    long high_water;            /* Stack high-water mark.  */
+    long overflows;             /* Number of stack overflow ($STKOFEN) calls.  */
+    long hits;                  /* Number of internal buffer hits.  */
+    long extends;               /* Number of block extensions.  */
+    long stko_mallocs;          /* Block allocations by $STKOFEN.  */
+    long underflows;            /* Number of stack underflow calls ($STKRETN).  */
+    long stko_free;             /* Number of deallocations by $STKRETN.  */
+    long stkm_free;             /* Number of deallocations by $STKMRET.  */
+    long segments;              /* Current number of stack segments.  */
+    long maxs;                  /* Maximum number of stack segments so far.  */
+    long pad_size;              /* Stack pad size.  */
+    long current_address;       /* Current stack segment address.  */
+    long current_size;          /* Current stack segment size.  This
+                                   number is actually corrupted by STKSTAT to
+                                   include the fifteen word trailer area.  */
+    long initial_address;       /* Address of initial segment.  */
+    long initial_size;          /* Size of initial segment.  */
+  };
+
+/* The following structure describes the data structure which trails
+   any stack segment.  I think that the description in 'asdef' is
+   out of date.  I only describe the parts that I am sure about.  */
+
+struct stk_trailer
+  {
+    long this_address;          /* Address of this block.  */
+    long this_size;             /* Size of this block (does not include
+                                   this trailer).  */
+    long unknown2;
+    long unknown3;
+    long link;                  /* Address of trailer block of previous
+                                   segment.  */
+    long unknown5;
+    long unknown6;
+    long unknown7;
+    long unknown8;
+    long unknown9;
+    long unknown10;
+    long unknown11;
+    long unknown12;
+    long unknown13;
+    long unknown14;
+  };
+
+#    endif /* CRAY2 */
+#   endif /* not CRAY_STACK */
+
+#   ifdef CRAY2
+/* Determine a "stack measure" for an arbitrary ADDRESS.
+   I doubt that "lint" will like this much.  */
+
+static long
+i00afunc (long *address)
+{
+  struct stk_stat status;
+  struct stk_trailer *trailer;
+  long *block, size;
+  long result = 0;
+
+  /* We want to iterate through all of the segments.  The first
+     step is to get the stack status structure.  We could do this
+     more quickly and more directly, perhaps, by referencing the
+     $LM00 common block, but I know that this works.  */
+
+  STKSTAT (&status);
+
+  /* Set up the iteration.  */
+
+  trailer = (struct stk_trailer *) (status.current_address
+                                    + status.current_size
+                                    - 15);
+
+  /* There must be at least one stack segment.  Therefore it is
+     a fatal error if "trailer" is null.  */
+
+  if (trailer == 0)
+    abort ();
+
+  /* Discard segments that do not contain our argument address.  */
+
+  while (trailer != 0)
+    {
+      block = (long *) trailer->this_address;
+      size = trailer->this_size;
+      if (block == 0 || size == 0)
+        abort ();
+      trailer = (struct stk_trailer *) trailer->link;
+      if ((block <= address) && (address < (block + size)))
+        break;
+    }
+
+  /* Set the result to the offset in this segment and add the sizes
+     of all predecessor segments.  */
+
+  result = address - block;
+
+  if (trailer == 0)
+    {
+      return result;
+    }
+
+  do
+    {
+      if (trailer->this_size <= 0)
+        abort ();
+      result += trailer->this_size;
+      trailer = (struct stk_trailer *) trailer->link;
+    }
+  while (trailer != 0);
+
+  /* We are done.  Note that if you present a bogus address (one
+     not in any segment), you will get a different number back, formed
+     from subtracting the address of the first block.  This is probably
+     not what you want.  */
+
+  return (result);
+}
+
+#   else /* not CRAY2 */
+/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
+   Determine the number of the cell within the stack,
+   given the address of the cell.  The purpose of this
+   routine is to linearize, in some sense, stack addresses
+   for alloca.  */
+
+static long
+i00afunc (long address)
+{
+  long stkl = 0;
+
+  long size, pseg, this_segment, stack;
+  long result = 0;
+
+  struct stack_segment_linkage *ssptr;
+
+  /* Register B67 contains the address of the end of the
+     current stack segment.  If you (as a subprogram) store
+     your registers on the stack and find that you are past
+     the contents of B67, you have overflowed the segment.
+
+     B67 also points to the stack segment linkage control
+     area, which is what we are really interested in.  */
+
+  stkl = CRAY_STACKSEG_END ();
+  ssptr = (struct stack_segment_linkage *) stkl;
+
+  /* If one subtracts 'size' from the end of the segment,
+     one has the address of the first word of the segment.
+
+     If this is not the first segment, 'pseg' will be
+     nonzero.  */
+
+  pseg = ssptr->sspseg;
+  size = ssptr->sssize;
+
+  this_segment = stkl - size;
+
+  /* It is possible that calling this routine itself caused
+     a stack overflow.  Discard stack segments which do not
+     contain the target address.  */
+
+  while (!(this_segment <= address && address <= stkl))
+    {
+#    ifdef DEBUG_I00AFUNC
+      fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
+#    endif
+      if (pseg == 0)
+        break;
+      stkl = stkl - pseg;
+      ssptr = (struct stack_segment_linkage *) stkl;
+      size = ssptr->sssize;
+      pseg = ssptr->sspseg;
+      this_segment = stkl - size;
+    }
+
+  result = address - this_segment;
+
+  /* If you subtract pseg from the current end of the stack,
+     you get the address of the previous stack segment's end.
+     This seems a little convoluted to me, but I'll bet you save
+     a cycle somewhere.  */
+
+  while (pseg != 0)
+    {
+#    ifdef DEBUG_I00AFUNC
+      fprintf (stderr, "%011o %011o\n", pseg, size);
+#    endif
+      stkl = stkl - pseg;
+      ssptr = (struct stack_segment_linkage *) stkl;
+      size = ssptr->sssize;
+      pseg = ssptr->sspseg;
+      result += size;
+    }
+  return (result);
+}
+
+#   endif /* not CRAY2 */
+#  endif /* CRAY */
+
+# endif /* no alloca */
+#endif /* not GCC version 3 */
diff --git a/gnulib/lib/alloca.in.h b/gnulib/lib/alloca.in.h
new file mode 100644 (file)
index 0000000..5b69c6c
--- /dev/null
@@ -0,0 +1,56 @@
+/* Memory allocation on the stack.
+
+   Copyright (C) 1995, 1999, 2001-2004, 2006-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, 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, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+   USA.  */
+
+/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
+   means there is a real alloca function.  */
+#ifndef _GL_ALLOCA_H
+#define _GL_ALLOCA_H
+
+/* alloca (N) returns a pointer to N bytes of memory
+   allocated on the stack, which will last until the function returns.
+   Use of alloca should be avoided:
+     - inside arguments of function calls - undefined behaviour,
+     - in inline functions - the allocation may actually last until the
+       calling function returns,
+     - for huge N (say, N >= 65536) - you never know how large (or small)
+       the stack is, and when the stack cannot fulfill the memory allocation
+       request, the program just crashes.
+ */
+
+#ifndef alloca
+# ifdef __GNUC__
+#  define alloca __builtin_alloca
+# elif defined _AIX
+#  define alloca __alloca
+# elif defined _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# elif defined __DECC && defined __VMS
+#  define alloca __ALLOCA
+# else
+#  include <stddef.h>
+#  ifdef  __cplusplus
+extern "C"
+#  endif
+void *alloca (size_t);
+# endif
+#endif
+
+#endif /* _GL_ALLOCA_H */
diff --git a/gnulib/lib/areadlink-with-size.c b/gnulib/lib/areadlink-with-size.c
new file mode 100644 (file)
index 0000000..e7e21b7
--- /dev/null
@@ -0,0 +1,104 @@
+/* readlink wrapper to return the link name in malloc'd storage.
+   Unlike xreadlink and xreadlink_with_size, don't ever call exit.
+
+   Copyright (C) 2001, 2003-2007, 2009-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 Jim Meyering <jim@meyering.net>  */
+
+#include <config.h>
+
+#include "areadlink.h"
+
+#include <errno.h>
+#include <limits.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#ifndef SSIZE_MAX
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
+#endif
+
+/* SYMLINK_MAX is used only for an initial memory-allocation sanity
+   check, so it's OK to guess too small on hosts where there is no
+   arbitrary limit to symbolic link length.  */
+#ifndef SYMLINK_MAX
+# define SYMLINK_MAX 1024
+#endif
+
+#define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX)
+
+/* Call readlink to get the symbolic link value of FILE.
+   SIZE is a hint as to how long the link is expected to be;
+   typically it is taken from st_size.  It need not be correct.
+   Return a pointer to that NUL-terminated string in malloc'd storage.
+   If readlink fails, malloc fails, or if the link value is longer
+   than SSIZE_MAX, return NULL (caller may use errno to diagnose).  */
+
+char *
+areadlink_with_size (char const *file, size_t size)
+{
+  /* Some buggy file systems report garbage in st_size.  Defend
+     against them by ignoring outlandish st_size values in the initial
+     memory allocation.  */
+  size_t symlink_max = SYMLINK_MAX;
+  size_t INITIAL_LIMIT_BOUND = 8 * 1024;
+  size_t initial_limit = (symlink_max < INITIAL_LIMIT_BOUND
+                          ? symlink_max + 1
+                          : INITIAL_LIMIT_BOUND);
+
+  /* The initial buffer size for the link value.  */
+  size_t buf_size = size < initial_limit ? size + 1 : initial_limit;
+
+  while (1)
+    {
+      ssize_t r;
+      size_t link_length;
+      char *buffer = malloc (buf_size);
+
+      if (buffer == NULL)
+        return NULL;
+      r = readlink (file, buffer, buf_size);
+      link_length = r;
+
+      /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1
+         with errno == ERANGE if the buffer is too small.  */
+      if (r < 0 && errno != ERANGE)
+        {
+          int saved_errno = errno;
+          free (buffer);
+          errno = saved_errno;
+          return NULL;
+        }
+
+      if (link_length < buf_size)
+        {
+          buffer[link_length] = 0;
+          return buffer;
+        }
+
+      free (buffer);
+      if (buf_size <= MAXSIZE / 2)
+        buf_size *= 2;
+      else if (buf_size < MAXSIZE)
+        buf_size = MAXSIZE;
+      else
+        {
+          errno = ENOMEM;
+          return NULL;
+        }
+    }
+}
diff --git a/gnulib/lib/areadlink.c b/gnulib/lib/areadlink.c
new file mode 100644 (file)
index 0000000..bc6104f
--- /dev/null
@@ -0,0 +1,131 @@
+/* areadlink.c -- readlink wrapper to return the link name in malloc'd storage
+   Unlike xreadlink and xreadlink_with_size, don't ever call exit.
+
+   Copyright (C) 2001, 2003-2007, 2009-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 Jim Meyering <jim@meyering.net>
+   and Bruno Haible <bruno@clisp.org>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "areadlink.h"
+
+#include <errno.h>
+#include <limits.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifndef SSIZE_MAX
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
+#endif
+
+/* Use the system functions, not the gnulib overrides in this file.  */
+#undef malloc
+#undef realloc
+
+/* The initial buffer size for the link value.  A power of 2
+   detects arithmetic overflow earlier, but is not required.  */
+enum {
+  INITIAL_BUF_SIZE = 1024
+};
+
+/* Call readlink to get the symbolic link value of FILENAME.
+   Return a pointer to that NUL-terminated string in malloc'd storage.
+   If readlink fails, return NULL and set errno.
+   If realloc fails, or if the link value is longer than SIZE_MAX :-),
+   return NULL and set errno to ENOMEM.  */
+
+char *
+areadlink (char const *filename)
+{
+  /* Allocate the initial buffer on the stack.  This way, in the common
+     case of a symlink of small size, we get away with a single small malloc()
+     instead of a big malloc() followed by a shrinking realloc().  */
+  char initial_buf[INITIAL_BUF_SIZE];
+
+  char *buffer = initial_buf;
+  size_t buf_size = sizeof initial_buf;
+
+  while (1)
+    {
+      /* Attempt to read the link into the current buffer.  */
+      ssize_t link_length = readlink (filename, buffer, buf_size);
+
+      /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1
+         with errno == ERANGE if the buffer is too small.  */
+      if (link_length < 0 && errno != ERANGE)
+        {
+          if (buffer != initial_buf)
+            {
+              int saved_errno = errno;
+              free (buffer);
+              errno = saved_errno;
+            }
+          return NULL;
+        }
+
+      if ((size_t) link_length < buf_size)
+        {
+          buffer[link_length++] = '\0';
+
+          /* Return it in a chunk of memory as small as possible.  */
+          if (buffer == initial_buf)
+            {
+              buffer = (char *) malloc (link_length);
+              if (buffer == NULL)
+                {
+                  /* It's easier to set errno to ENOMEM than to rely on the
+                     'malloc-posix' gnulib module.  */
+                  errno = ENOMEM;
+                  return NULL;
+                }
+              memcpy (buffer, initial_buf, link_length);
+            }
+          else
+            {
+              /* Shrink buffer before returning it.  */
+              if ((size_t) link_length < buf_size)
+                {
+                  char *smaller_buffer = (char *) realloc (buffer, link_length);
+
+                  if (smaller_buffer != NULL)
+                    buffer = smaller_buffer;
+                }
+            }
+          return buffer;
+        }
+
+      if (buffer != initial_buf)
+        free (buffer);
+      buf_size *= 2;
+      if (SSIZE_MAX < buf_size || (SIZE_MAX / 2 < SSIZE_MAX && buf_size == 0))
+        {
+          errno = ENOMEM;
+          return NULL;
+        }
+      buffer = (char *) malloc (buf_size);
+      if (buffer == NULL)
+        {
+          /* It's easier to set errno to ENOMEM than to rely on the
+             'malloc-posix' gnulib module.  */
+          errno = ENOMEM;
+          return NULL;
+        }
+    }
+}
diff --git a/gnulib/lib/areadlink.h b/gnulib/lib/areadlink.h
new file mode 100644 (file)
index 0000000..30e3b69
--- /dev/null
@@ -0,0 +1,33 @@
+/* Read symbolic links without size limitation.
+
+   Copyright (C) 2001, 2003-2004, 2007, 2009-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 Jim Meyering <jim@meyering.net>  */
+
+#include <stddef.h>
+
+extern char *areadlink (char const *filename);
+extern char *areadlink_with_size (char const *filename, size_t size_hint);
+
+#if GNULIB_AREADLINKAT
+extern char *areadlinkat (int fd, char const *filename);
+#endif
+
+#if GNULIB_AREADLINKAT_WITH_SIZE
+extern char *areadlinkat_with_size (int fd, char const *filename,
+                                    size_t size_hint);
+#endif
diff --git a/gnulib/lib/areadlinkat.c b/gnulib/lib/areadlinkat.c
new file mode 100644 (file)
index 0000000..a13c0e5
--- /dev/null
@@ -0,0 +1,145 @@
+/* areadlinkat.c -- readlinkat wrapper to return malloc'd link name
+   Unlike xreadlinkat, only call exit on failure to change directory.
+
+   Copyright (C) 2001, 2003-2007, 2009-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 Jim Meyering <jim@meyering.net>,
+   and Bruno Haible <bruno@clisp.org>,
+   and Eric Blake <ebb9@byu.net>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "areadlink.h"
+
+#include <errno.h>
+#include <limits.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifndef SSIZE_MAX
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
+#endif
+
+#if HAVE_READLINKAT
+
+/* The initial buffer size for the link value.  A power of 2
+   detects arithmetic overflow earlier, but is not required.  */
+enum {
+  INITIAL_BUF_SIZE = 1024
+};
+
+/* Call readlinkat to get the symbolic link value of FILENAME relative to FD.
+   Return a pointer to that NUL-terminated string in malloc'd storage.
+   If readlinkat fails, return NULL and set errno (although failure to
+   change directory will issue a diagnostic and exit).
+   If realloc fails, or if the link value is longer than SIZE_MAX :-),
+   return NULL and set errno to ENOMEM.  */
+
+char *
+areadlinkat (int fd, char const *filename)
+{
+  /* Allocate the initial buffer on the stack.  This way, in the common
+     case of a symlink of small size, we get away with a single small malloc()
+     instead of a big malloc() followed by a shrinking realloc().  */
+  char initial_buf[INITIAL_BUF_SIZE];
+
+  char *buffer = initial_buf;
+  size_t buf_size = sizeof initial_buf;
+
+  while (1)
+    {
+      /* Attempt to read the link into the current buffer.  */
+       ssize_t link_length = readlinkat (fd, filename, buffer, buf_size);
+
+      /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1
+         with errno == ERANGE if the buffer is too small.  */
+      if (link_length < 0 && errno != ERANGE)
+        {
+          if (buffer != initial_buf)
+            {
+              int saved_errno = errno;
+              free (buffer);
+              errno = saved_errno;
+            }
+          return NULL;
+        }
+
+      if ((size_t) link_length < buf_size)
+        {
+          buffer[link_length++] = '\0';
+
+          /* Return it in a chunk of memory as small as possible.  */
+          if (buffer == initial_buf)
+            {
+              buffer = (char *) malloc (link_length);
+              if (buffer == NULL)
+                /* errno is ENOMEM.  */
+                return NULL;
+              memcpy (buffer, initial_buf, link_length);
+            }
+          else
+            {
+              /* Shrink buffer before returning it.  */
+              if ((size_t) link_length < buf_size)
+                {
+                  char *smaller_buffer = (char *) realloc (buffer, link_length);
+
+                  if (smaller_buffer != NULL)
+                    buffer = smaller_buffer;
+                }
+            }
+          return buffer;
+        }
+
+      if (buffer != initial_buf)
+        free (buffer);
+      buf_size *= 2;
+      if (SSIZE_MAX < buf_size || (SIZE_MAX / 2 < SSIZE_MAX && buf_size == 0))
+        {
+          errno = ENOMEM;
+          return NULL;
+        }
+      buffer = (char *) malloc (buf_size);
+      if (buffer == NULL)
+        /* errno is ENOMEM.  */
+        return NULL;
+    }
+}
+
+#else /* !HAVE_READLINKAT */
+
+/* It is more efficient to change directories only once and call
+   areadlink, rather than repeatedly call the replacement
+   readlinkat.  */
+
+# define AT_FUNC_NAME areadlinkat
+# define AT_FUNC_F1 areadlink
+# define AT_FUNC_POST_FILE_PARAM_DECLS /* empty */
+# define AT_FUNC_POST_FILE_ARGS        /* empty */
+# define AT_FUNC_RESULT char *
+# define AT_FUNC_FAIL NULL
+# include "at-func.c"
+# undef AT_FUNC_NAME
+# undef AT_FUNC_F1
+# undef AT_FUNC_POST_FILE_PARAM_DECLS
+# undef AT_FUNC_POST_FILE_ARGS
+# undef AT_FUNC_RESULT
+# undef AT_FUNC_FAIL
+
+#endif /* !HAVE_READLINKAT */
diff --git a/gnulib/lib/argmatch.c b/gnulib/lib/argmatch.c
new file mode 100644 (file)
index 0000000..9a3eca4
--- /dev/null
@@ -0,0 +1,277 @@
+/* argmatch.c -- find a match for a string in an array
+
+   Copyright (C) 1990, 1998-1999, 2001-2007, 2009-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 David MacKenzie <djm@ai.mit.edu>
+   Modified by Akim Demaille <demaille@inf.enst.fr> */
+
+#include <config.h>
+
+/* Specification.  */
+#include "argmatch.h"
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+#include "error.h"
+#include "quotearg.h"
+#include "quote.h"
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+/* When reporting an invalid argument, show nonprinting characters
+   by using the quoting style ARGMATCH_QUOTING_STYLE.  Do not use
+   literal_quoting_style.  */
+#ifndef ARGMATCH_QUOTING_STYLE
+# define ARGMATCH_QUOTING_STYLE locale_quoting_style
+#endif
+
+/* Non failing version of argmatch call this function after failing. */
+#ifndef ARGMATCH_DIE
+# include "exitfail.h"
+# define ARGMATCH_DIE exit (exit_failure)
+#endif
+
+#ifdef ARGMATCH_DIE_DECL
+ARGMATCH_DIE_DECL;
+#endif
+
+static void
+__argmatch_die (void)
+{
+  ARGMATCH_DIE;
+}
+
+/* Used by XARGMATCH and XARGCASEMATCH.  See description in argmatch.h.
+   Default to __argmatch_die, but allow caller to change this at run-time. */
+argmatch_exit_fn argmatch_die = __argmatch_die;
+
+\f
+/* If ARG is an unambiguous match for an element of the
+   NULL-terminated array ARGLIST, return the index in ARGLIST
+   of the matched element, else -1 if it does not match any element
+   or -2 if it is ambiguous (is a prefix of more than one element).
+
+   If VALLIST is none null, use it to resolve ambiguities limited to
+   synonyms, i.e., for
+     "yes", "yop" -> 0
+     "no", "nope" -> 1
+   "y" is a valid argument, for `0', and "n" for `1'.  */
+
+ptrdiff_t
+argmatch (const char *arg, const char *const *arglist,
+          const char *vallist, size_t valsize)
+{
+  size_t i;                     /* Temporary index in ARGLIST.  */
+  size_t arglen;                /* Length of ARG.  */
+  ptrdiff_t matchind = -1;      /* Index of first nonexact match.  */
+  bool ambiguous = false;       /* If true, multiple nonexact match(es).  */
+
+  arglen = strlen (arg);
+
+  /* Test all elements for either exact match or abbreviated matches.  */
+  for (i = 0; arglist[i]; i++)
+    {
+      if (!strncmp (arglist[i], arg, arglen))
+        {
+          if (strlen (arglist[i]) == arglen)
+            /* Exact match found.  */
+            return i;
+          else if (matchind == -1)
+            /* First nonexact match found.  */
+            matchind = i;
+          else
+            {
+              /* Second nonexact match found.  */
+              if (vallist == NULL
+                  || memcmp (vallist + valsize * matchind,
+                             vallist + valsize * i, valsize))
+                {
+                  /* There is a real ambiguity, or we could not
+                     disambiguate. */
+                  ambiguous = true;
+                }
+            }
+        }
+    }
+  if (ambiguous)
+    return -2;
+  else
+    return matchind;
+}
+
+/* Error reporting for argmatch.
+   CONTEXT is a description of the type of entity that was being matched.
+   VALUE is the invalid value that was given.
+   PROBLEM is the return value from argmatch.  */
+
+void
+argmatch_invalid (const char *context, const char *value, ptrdiff_t problem)
+{
+  char const *format = (problem == -1
+                        ? _("invalid argument %s for %s")
+                        : _("ambiguous argument %s for %s"));
+
+  error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value),
+         quote_n (1, context));
+}
+
+/* List the valid arguments for argmatch.
+   ARGLIST is the same as in argmatch.
+   VALLIST is a pointer to an array of values.
+   VALSIZE is the size of the elements of VALLIST */
+void
+argmatch_valid (const char *const *arglist,
+                const char *vallist, size_t valsize)
+{
+  size_t i;
+  const char *last_val = NULL;
+
+  /* We try to put synonyms on the same line.  The assumption is that
+     synonyms follow each other */
+  fprintf (stderr, _("Valid arguments are:"));
+  for (i = 0; arglist[i]; i++)
+    if ((i == 0)
+        || memcmp (last_val, vallist + valsize * i, valsize))
+      {
+        fprintf (stderr, "\n  - `%s'", arglist[i]);
+        last_val = vallist + valsize * i;
+      }
+    else
+      {
+        fprintf (stderr, ", `%s'", arglist[i]);
+      }
+  putc ('\n', stderr);
+}
+
+/* Never failing versions of the previous functions.
+
+   CONTEXT is the context for which argmatch is called (e.g.,
+   "--version-control", or "$VERSION_CONTROL" etc.).  Upon failure,
+   calls the (supposed never to return) function EXIT_FN. */
+
+ptrdiff_t
+__xargmatch_internal (const char *context,
+                      const char *arg, const char *const *arglist,
+                      const char *vallist, size_t valsize,
+                      argmatch_exit_fn exit_fn)
+{
+  ptrdiff_t res = argmatch (arg, arglist, vallist, valsize);
+  if (res >= 0)
+    /* Success. */
+    return res;
+
+  /* We failed.  Explain why. */
+  argmatch_invalid (context, arg, res);
+  argmatch_valid (arglist, vallist, valsize);
+  (*exit_fn) ();
+
+  return -1; /* To please the compilers. */
+}
+
+/* Look for VALUE in VALLIST, an array of objects of size VALSIZE and
+   return the first corresponding argument in ARGLIST */
+const char *
+argmatch_to_argument (const char *value,
+                      const char *const *arglist,
+                      const char *vallist, size_t valsize)
+{
+  size_t i;
+
+  for (i = 0; arglist[i]; i++)
+    if (!memcmp (value, vallist + valsize * i, valsize))
+      return arglist[i];
+  return NULL;
+}
+
+#ifdef TEST
+/*
+ * Based on "getversion.c" by David MacKenzie <djm@gnu.ai.mit.edu>
+ */
+char *program_name;
+
+/* When to make backup files.  */
+enum backup_type
+{
+  /* Never make backups.  */
+  no_backups,
+
+  /* Make simple backups of every file.  */
+  simple_backups,
+
+  /* Make numbered backups of files that already have numbered backups,
+     and simple backups of the others.  */
+  numbered_existing_backups,
+
+  /* Make numbered backups of every file.  */
+  numbered_backups
+};
+
+/* Two tables describing arguments (keys) and their corresponding
+   values */
+static const char *const backup_args[] =
+{
+  "no", "none", "off",
+  "simple", "never",
+  "existing", "nil",
+  "numbered", "t",
+  0
+};
+
+static const enum backup_type backup_vals[] =
+{
+  no_backups, no_backups, no_backups,
+  simple_backups, simple_backups,
+  numbered_existing_backups, numbered_existing_backups,
+  numbered_backups, numbered_backups
+};
+
+int
+main (int argc, const char *const *argv)
+{
+  const char *cp;
+  enum backup_type backup_type = no_backups;
+
+  program_name = (char *) argv[0];
+
+  if (argc > 2)
+    {
+      fprintf (stderr, "Usage: %s [VERSION_CONTROL]\n", program_name);
+      exit (1);
+    }
+
+  if ((cp = getenv ("VERSION_CONTROL")))
+    backup_type = XARGMATCH ("$VERSION_CONTROL", cp,
+                             backup_args, backup_vals);
+
+  if (argc == 2)
+    backup_type = XARGMATCH (program_name, argv[1],
+                             backup_args, backup_vals);
+
+  printf ("The version control is `%s'\n",
+          ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals));
+
+  return 0;
+}
+#endif
diff --git a/gnulib/lib/argmatch.h b/gnulib/lib/argmatch.h
new file mode 100644 (file)
index 0000000..9ebe2d1
--- /dev/null
@@ -0,0 +1,102 @@
+/* argmatch.h -- definitions and prototypes for argmatch.c
+
+   Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-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 David MacKenzie <djm@ai.mit.edu>
+   Modified by Akim Demaille <demaille@inf.enst.fr> */
+
+#ifndef ARGMATCH_H_
+# define ARGMATCH_H_ 1
+
+# include <stddef.h>
+
+# include "verify.h"
+
+# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
+
+/* Assert there are as many real arguments as there are values
+   (argument list ends with a NULL guard).  */
+
+# define ARGMATCH_VERIFY(Arglist, Vallist) \
+    verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
+
+/* Return the index of the element of ARGLIST (NULL terminated) that
+   matches with ARG.  If VALLIST is not NULL, then use it to resolve
+   false ambiguities (i.e., different matches of ARG but corresponding
+   to the same values in VALLIST).  */
+
+ptrdiff_t argmatch (char const *arg, char const *const *arglist,
+                    char const *vallist, size_t valsize);
+
+# define ARGMATCH(Arg, Arglist, Vallist) \
+  argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist))
+
+/* xargmatch calls this function when it fails.  This function should not
+   return.  By default, this is a function that calls ARGMATCH_DIE which
+   in turn defaults to `exit (exit_failure)'.  */
+typedef void (*argmatch_exit_fn) (void);
+extern argmatch_exit_fn argmatch_die;
+
+/* Report on stderr why argmatch failed.  Report correct values. */
+
+void argmatch_invalid (char const *context, char const *value,
+                       ptrdiff_t problem);
+
+/* Left for compatibility with the old name invalid_arg */
+
+# define invalid_arg(Context, Value, Problem) \
+  argmatch_invalid (Context, Value, Problem)
+
+
+
+/* Report on stderr the list of possible arguments.  */
+
+void argmatch_valid (char const *const *arglist,
+                     char const *vallist, size_t valsize);
+
+# define ARGMATCH_VALID(Arglist, Vallist) \
+  argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist))
+
+
+
+/* Same as argmatch, but upon failure, reports a explanation on the
+   failure, and exits using the function EXIT_FN. */
+
+ptrdiff_t __xargmatch_internal (char const *context,
+                                char const *arg, char const *const *arglist,
+                                char const *vallist, size_t valsize,
+                                argmatch_exit_fn exit_fn);
+
+/* Programmer friendly interface to __xargmatch_internal. */
+
+# define XARGMATCH(Context, Arg, Arglist, Vallist)              \
+  ((Vallist) [__xargmatch_internal (Context, Arg, Arglist,      \
+                                    (char const *) (Vallist),   \
+                                    sizeof *(Vallist),          \
+                                    argmatch_die)])
+
+/* Convert a value into a corresponding argument. */
+
+char const *argmatch_to_argument (char const *value,
+                                  char const *const *arglist,
+                                  char const *vallist, size_t valsize);
+
+# define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist)                  \
+  argmatch_to_argument (Value, Arglist,                                 \
+                        (char const *) (Vallist), sizeof *(Vallist))
+
+#endif /* ARGMATCH_H_ */
diff --git a/gnulib/lib/asnprintf.c b/gnulib/lib/asnprintf.c
new file mode 100644 (file)
index 0000000..e4fd95c
--- /dev/null
@@ -0,0 +1,35 @@
+/* Formatted output to strings.
+   Copyright (C) 1999, 2002, 2006, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "vasnprintf.h"
+
+#include <stdarg.h>
+
+char *
+asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+{
+  va_list args;
+  char *result;
+
+  va_start (args, format);
+  result = vasnprintf (resultbuf, lengthp, format, args);
+  va_end (args);
+  return result;
+}
diff --git a/gnulib/lib/at-func.c b/gnulib/lib/at-func.c
new file mode 100644 (file)
index 0000000..52868bc
--- /dev/null
@@ -0,0 +1,131 @@
+/* Define an at-style functions like fstatat, unlinkat, fchownat, etc.
+   Copyright (C) 2006, 2009-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 Jim Meyering */
+
+#include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
+#include "openat.h"
+#include "openat-priv.h"
+#include "save-cwd.h"
+
+#ifdef AT_FUNC_USE_F1_COND
+# define CALL_FUNC(F)                           \
+  (flag == AT_FUNC_USE_F1_COND                  \
+    ? AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS)     \
+    : AT_FUNC_F2 (F AT_FUNC_POST_FILE_ARGS))
+# define VALIDATE_FLAG(F)                       \
+  if (flag & ~AT_FUNC_USE_F1_COND)              \
+    {                                           \
+      errno = EINVAL;                           \
+      return FUNC_FAIL;                         \
+    }
+#else
+# define CALL_FUNC(F) (AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS))
+# define VALIDATE_FLAG(F) /* empty */
+#endif
+
+#ifdef AT_FUNC_RESULT
+# define FUNC_RESULT AT_FUNC_RESULT
+#else
+# define FUNC_RESULT int
+#endif
+
+#ifdef AT_FUNC_FAIL
+# define FUNC_FAIL AT_FUNC_FAIL
+#else
+# define FUNC_FAIL -1
+#endif
+
+/* Call AT_FUNC_F1 to operate on FILE, which is in the directory
+   open on descriptor FD.  If AT_FUNC_USE_F1_COND is defined to a value,
+   AT_FUNC_POST_FILE_PARAM_DECLS must inlude a parameter named flag;
+   call AT_FUNC_F2 if FLAG is 0 or fail if FLAG contains more bits than
+   AT_FUNC_USE_F1_COND.  Return int and fail with -1 unless AT_FUNC_RESULT
+   or AT_FUNC_FAIL are defined.  If possible, do it without changing the
+   working directory.  Otherwise, resort to using save_cwd/fchdir,
+   then AT_FUNC_F?/restore_cwd.  If either the save_cwd or the restore_cwd
+   fails, then give a diagnostic and exit nonzero.  */
+FUNC_RESULT
+AT_FUNC_NAME (int fd, char const *file AT_FUNC_POST_FILE_PARAM_DECLS)
+{
+  /* Be careful to choose names unlikely to conflict with
+     AT_FUNC_POST_FILE_PARAM_DECLS.  */
+  struct saved_cwd saved_cwd;
+  int saved_errno;
+  FUNC_RESULT err;
+
+  VALIDATE_FLAG (flag);
+
+  if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file))
+    return CALL_FUNC (file);
+
+  {
+    char proc_buf[OPENAT_BUFFER_SIZE];
+    char *proc_file = openat_proc_name (proc_buf, fd, file);
+    if (proc_file)
+      {
+        FUNC_RESULT proc_result = CALL_FUNC (proc_file);
+        int proc_errno = errno;
+        if (proc_file != proc_buf)
+          free (proc_file);
+        /* If the syscall succeeds, or if it fails with an unexpected
+           errno value, then return right away.  Otherwise, fall through
+           and resort to using save_cwd/restore_cwd.  */
+        if (FUNC_FAIL != proc_result)
+          return proc_result;
+        if (! EXPECTED_ERRNO (proc_errno))
+          {
+            errno = proc_errno;
+            return proc_result;
+          }
+      }
+  }
+
+  if (save_cwd (&saved_cwd) != 0)
+    openat_save_fail (errno);
+  if (0 <= fd && fd == saved_cwd.desc)
+    {
+      /* If saving the working directory collides with the user's
+         requested fd, then the user's fd must have been closed to
+         begin with.  */
+      free_cwd (&saved_cwd);
+      errno = EBADF;
+      return FUNC_FAIL;
+    }
+
+  if (fchdir (fd) != 0)
+    {
+      saved_errno = errno;
+      free_cwd (&saved_cwd);
+      errno = saved_errno;
+      return FUNC_FAIL;
+    }
+
+  err = CALL_FUNC (file);
+  saved_errno = (err == FUNC_FAIL ? errno : 0);
+
+  if (restore_cwd (&saved_cwd) != 0)
+    openat_restore_fail (errno);
+
+  free_cwd (&saved_cwd);
+
+  if (saved_errno)
+    errno = saved_errno;
+  return err;
+}
+#undef CALL_FUNC
+#undef FUNC_RESULT
+#undef FUNC_FAIL
diff --git a/gnulib/lib/basename-lgpl.c b/gnulib/lib/basename-lgpl.c
new file mode 100644 (file)
index 0000000..529bc35
--- /dev/null
@@ -0,0 +1,75 @@
+/* basename.c -- return the last element in a file name
+
+   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-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/>.  */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <string.h>
+
+/* Return the address of the last file name component of NAME.  If
+   NAME has no relative file name components because it is a file
+   system root, return the empty string.  */
+
+char *
+last_component (char const *name)
+{
+  char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
+  char const *p;
+  bool saw_slash = false;
+
+  while (ISSLASH (*base))
+    base++;
+
+  for (p = base; *p; p++)
+    {
+      if (ISSLASH (*p))
+        saw_slash = true;
+      else if (saw_slash)
+        {
+          base = p;
+          saw_slash = false;
+        }
+    }
+
+  return (char *) base;
+}
+
+/* Return the length of the basename NAME.  Typically NAME is the
+   value returned by base_name or last_component.  Act like strlen
+   (NAME), except omit all trailing slashes.  */
+
+size_t
+base_len (char const *name)
+{
+  size_t len;
+  size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
+
+  for (len = strlen (name);  1 < len && ISSLASH (name[len - 1]);  len--)
+    continue;
+
+  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1
+      && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2])
+    return 2;
+
+  if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len
+      && len == prefix_len && ISSLASH (name[prefix_len]))
+    return prefix_len + 1;
+
+  return len;
+}
diff --git a/gnulib/lib/basename.c b/gnulib/lib/basename.c
new file mode 100644 (file)
index 0000000..90ac501
--- /dev/null
@@ -0,0 +1,58 @@
+/* basename.c -- return the last element in a file name
+
+   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-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/>.  */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <string.h>
+#include "xalloc.h"
+#include "xstrndup.h"
+
+char *
+base_name (char const *name)
+{
+  char const *base = last_component (name);
+  size_t length;
+
+  /* If there is no last component, then name is a file system root or the
+     empty string.  */
+  if (! *base)
+    return xstrndup (name, base_len (name));
+
+  /* Collapse a sequence of trailing slashes into one.  */
+  length = base_len (base);
+  if (ISSLASH (base[length]))
+    length++;
+
+  /* On systems with drive letters, `a/b:c' must return `./b:c' rather
+     than `b:c' to avoid confusion with a drive letter.  On systems
+     with pure POSIX semantics, this is not an issue.  */
+  if (FILE_SYSTEM_PREFIX_LEN (base))
+    {
+      char *p = xmalloc (length + 3);
+      p[0] = '.';
+      p[1] = '/';
+      memcpy (p + 2, base, length);
+      p[length + 2] = '\0';
+      return p;
+    }
+
+  /* Finally, copy the basename.  */
+  return xstrndup (base, length);
+}
diff --git a/gnulib/lib/bitrotate.h b/gnulib/lib/bitrotate.h
new file mode 100644 (file)
index 0000000..c3a5e1a
--- /dev/null
@@ -0,0 +1,126 @@
+/* bitrotate.h - Rotate bits in integers
+   Copyright (C) 2008-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 Simon Josefsson <simon@josefsson.org>, 2008. */
+
+#ifndef _GL_BITROTATE_H
+#define _GL_BITROTATE_H
+
+#include <limits.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#ifdef UINT64_MAX
+/* Given an unsigned 64-bit argument X, return the value corresponding
+   to rotating the bits N steps to the left.  N must be between 1 and
+   63 inclusive. */
+static inline uint64_t
+rotl64 (uint64_t x, int n)
+{
+  return ((x << n) | (x >> (64 - n))) & UINT64_MAX;
+}
+
+/* Given an unsigned 64-bit argument X, return the value corresponding
+   to rotating the bits N steps to the right.  N must be between 1 to
+   63 inclusive.*/
+static inline uint64_t
+rotr64 (uint64_t x, int n)
+{
+  return ((x >> n) | (x << (64 - n))) & UINT64_MAX;
+}
+#endif
+
+/* Given an unsigned 32-bit argument X, return the value corresponding
+   to rotating the bits N steps to the left.  N must be between 1 and
+   31 inclusive. */
+static inline uint32_t
+rotl32 (uint32_t x, int n)
+{
+  return ((x << n) | (x >> (32 - n))) & UINT32_MAX;
+}
+
+/* Given an unsigned 32-bit argument X, return the value corresponding
+   to rotating the bits N steps to the right.  N must be between 1 to
+   31 inclusive.*/
+static inline uint32_t
+rotr32 (uint32_t x, int n)
+{
+  return ((x >> n) | (x << (32 - n))) & UINT32_MAX;
+}
+
+/* Given a size_t argument X, return the value corresponding
+   to rotating the bits N steps to the left.  N must be between 1 and
+   (CHAR_BIT * sizeof (size_t) - 1) inclusive.  */
+static inline size_t
+rotl_sz (size_t x, int n)
+{
+  return ((x << n) | (x >> ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX;
+}
+
+/* Given a size_t argument X, return the value corresponding
+   to rotating the bits N steps to the right.  N must be between 1 to
+   (CHAR_BIT * sizeof (size_t) - 1) inclusive.  */
+static inline size_t
+rotr_sz (size_t x, int n)
+{
+  return ((x >> n) | (x << ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX;
+}
+
+/* Given an unsigned 16-bit argument X, return the value corresponding
+   to rotating the bits N steps to the left.  N must be between 1 to
+   15 inclusive, but on most relevant targets N can also be 0 and 16
+   because 'int' is at least 32 bits and the arguments must widen
+   before shifting. */
+static inline uint16_t
+rotl16 (uint16_t x, int n)
+{
+  return ((x << n) | (x >> (16 - n))) & UINT16_MAX;
+}
+
+/* Given an unsigned 16-bit argument X, return the value corresponding
+   to rotating the bits N steps to the right.  N must be in 1 to 15
+   inclusive, but on most relevant targets N can also be 0 and 16
+   because 'int' is at least 32 bits and the arguments must widen
+   before shifting. */
+static inline uint16_t
+rotr16 (uint16_t x, int n)
+{
+  return ((x >> n) | (x << (16 - n))) & UINT16_MAX;
+}
+
+/* Given an unsigned 8-bit argument X, return the value corresponding
+   to rotating the bits N steps to the left.  N must be between 1 to 7
+   inclusive, but on most relevant targets N can also be 0 and 8
+   because 'int' is at least 32 bits and the arguments must widen
+   before shifting. */
+static inline uint8_t
+rotl8 (uint8_t x, int n)
+{
+  return ((x << n) | (x >> (8 - n))) & UINT8_MAX;
+}
+
+/* Given an unsigned 8-bit argument X, return the value corresponding
+   to rotating the bits N steps to the right.  N must be in 1 to 7
+   inclusive, but on most relevant targets N can also be 0 and 8
+   because 'int' is at least 32 bits and the arguments must widen
+   before shifting. */
+static inline uint8_t
+rotr8 (uint8_t x, int n)
+{
+  return ((x >> n) | (x << (8 - n))) & UINT8_MAX;
+}
+
+#endif /* _GL_BITROTATE_H */
diff --git a/gnulib/lib/btowc.c b/gnulib/lib/btowc.c
new file mode 100644 (file)
index 0000000..9b3908d
--- /dev/null
@@ -0,0 +1,39 @@
+/* Convert unibyte character to wide character.
+   Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wchar.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+wint_t
+btowc (int c)
+{
+  if (c != EOF)
+    {
+      char buf[1];
+      wchar_t wc;
+
+      buf[0] = c;
+      if (mbtowc (&wc, buf, 1) >= 0)
+        return wc;
+    }
+  return WEOF;
+}
diff --git a/gnulib/lib/c-ctype.c b/gnulib/lib/c-ctype.c
new file mode 100644 (file)
index 0000000..0fb4295
--- /dev/null
@@ -0,0 +1,396 @@
+/* Character handling in C locale.
+
+   Copyright 2000-2003, 2006, 2009-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, write to the Free Software Foundation,
+Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#define NO_C_CTYPE_MACROS
+#include "c-ctype.h"
+
+/* The function isascii is not locale dependent. Its use in EBCDIC is
+   questionable. */
+bool
+c_isascii (int c)
+{
+  return (c >= 0x00 && c <= 0x7f);
+}
+
+bool
+c_isalnum (int c)
+{
+#if C_CTYPE_CONSECUTIVE_DIGITS \
+    && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+  return ((c >= '0' && c <= '9')
+          || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'));
+#else
+  return ((c >= '0' && c <= '9')
+          || (c >= 'A' && c <= 'Z')
+          || (c >= 'a' && c <= 'z'));
+#endif
+#else
+  switch (c)
+    {
+    case '0': case '1': case '2': case '3': case '4': case '5':
+    case '6': case '7': case '8': case '9':
+    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 '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':
+      return 1;
+    default:
+      return 0;
+    }
+#endif
+}
+
+bool
+c_isalpha (int c)
+{
+#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+  return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z');
+#else
+  return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
+#endif
+#else
+  switch (c)
+    {
+    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 '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':
+      return 1;
+    default:
+      return 0;
+    }
+#endif
+}
+
+bool
+c_isblank (int c)
+{
+  return (c == ' ' || c == '\t');
+}
+
+bool
+c_iscntrl (int c)
+{
+#if C_CTYPE_ASCII
+  return ((c & ~0x1f) == 0 || c == 0x7f);
+#else
+  switch (c)
+    {
+    case ' ': 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 '@':
+    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 '`':
+    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 '~':
+      return 0;
+    default:
+      return 1;
+    }
+#endif
+}
+
+bool
+c_isdigit (int c)
+{
+#if C_CTYPE_CONSECUTIVE_DIGITS
+  return (c >= '0' && c <= '9');
+#else
+  switch (c)
+    {
+    case '0': case '1': case '2': case '3': case '4': case '5':
+    case '6': case '7': case '8': case '9':
+      return 1;
+    default:
+      return 0;
+    }
+#endif
+}
+
+bool
+c_islower (int c)
+{
+#if C_CTYPE_CONSECUTIVE_LOWERCASE
+  return (c >= 'a' && c <= 'z');
+#else
+  switch (c)
+    {
+    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':
+      return 1;
+    default:
+      return 0;
+    }
+#endif
+}
+
+bool
+c_isgraph (int c)
+{
+#if C_CTYPE_ASCII
+  return (c >= '!' && c <= '~');
+#else
+  switch (c)
+    {
+    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 '@':
+    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 '`':
+    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 '~':
+      return 1;
+    default:
+      return 0;
+    }
+#endif
+}
+
+bool
+c_isprint (int c)
+{
+#if C_CTYPE_ASCII
+  return (c >= ' ' && c <= '~');
+#else
+  switch (c)
+    {
+    case ' ': 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 '@':
+    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 '`':
+    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 '~':
+      return 1;
+    default:
+      return 0;
+    }
+#endif
+}
+
+bool
+c_ispunct (int c)
+{
+#if C_CTYPE_ASCII
+  return ((c >= '!' && c <= '~')
+          && !((c >= '0' && c <= '9')
+               || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')));
+#else
+  switch (c)
+    {
+    case '!': case '"': case '#': case '$': case '%': case '&':
+    case '\'': case '(': case ')': case '*': case '+': case ',':
+    case '-': case '.': case '/':
+    case ':': case ';': case '<': case '=': case '>': case '?':
+    case '@':
+    case '[': case '\\': case ']': case '^': case '_': case '`':
+    case '{': case '|': case '}': case '~':
+      return 1;
+    default:
+      return 0;
+    }
+#endif
+}
+
+bool
+c_isspace (int c)
+{
+  return (c == ' ' || c == '\t'
+          || c == '\n' || c == '\v' || c == '\f' || c == '\r');
+}
+
+bool
+c_isupper (int c)
+{
+#if C_CTYPE_CONSECUTIVE_UPPERCASE
+  return (c >= 'A' && c <= 'Z');
+#else
+  switch (c)
+    {
+    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':
+      return 1;
+    default:
+      return 0;
+    }
+#endif
+}
+
+bool
+c_isxdigit (int c)
+{
+#if C_CTYPE_CONSECUTIVE_DIGITS \
+    && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+  return ((c >= '0' && c <= '9')
+          || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F'));
+#else
+  return ((c >= '0' && c <= '9')
+          || (c >= 'A' && c <= 'F')
+          || (c >= 'a' && c <= 'f'));
+#endif
+#else
+  switch (c)
+    {
+    case '0': case '1': case '2': case '3': case '4': case '5':
+    case '6': case '7': case '8': case '9':
+    case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+    case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+      return 1;
+    default:
+      return 0;
+    }
+#endif
+}
+
+int
+c_tolower (int c)
+{
+#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+  return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c);
+#else
+  switch (c)
+    {
+    case 'A': return 'a';
+    case 'B': return 'b';
+    case 'C': return 'c';
+    case 'D': return 'd';
+    case 'E': return 'e';
+    case 'F': return 'f';
+    case 'G': return 'g';
+    case 'H': return 'h';
+    case 'I': return 'i';
+    case 'J': return 'j';
+    case 'K': return 'k';
+    case 'L': return 'l';
+    case 'M': return 'm';
+    case 'N': return 'n';
+    case 'O': return 'o';
+    case 'P': return 'p';
+    case 'Q': return 'q';
+    case 'R': return 'r';
+    case 'S': return 's';
+    case 'T': return 't';
+    case 'U': return 'u';
+    case 'V': return 'v';
+    case 'W': return 'w';
+    case 'X': return 'x';
+    case 'Y': return 'y';
+    case 'Z': return 'z';
+    default: return c;
+    }
+#endif
+}
+
+int
+c_toupper (int c)
+{
+#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+  return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c);
+#else
+  switch (c)
+    {
+    case 'a': return 'A';
+    case 'b': return 'B';
+    case 'c': return 'C';
+    case 'd': return 'D';
+    case 'e': return 'E';
+    case 'f': return 'F';
+    case 'g': return 'G';
+    case 'h': return 'H';
+    case 'i': return 'I';
+    case 'j': return 'J';
+    case 'k': return 'K';
+    case 'l': return 'L';
+    case 'm': return 'M';
+    case 'n': return 'N';
+    case 'o': return 'O';
+    case 'p': return 'P';
+    case 'q': return 'Q';
+    case 'r': return 'R';
+    case 's': return 'S';
+    case 't': return 'T';
+    case 'u': return 'U';
+    case 'v': return 'V';
+    case 'w': return 'W';
+    case 'x': return 'X';
+    case 'y': return 'Y';
+    case 'z': return 'Z';
+    default: return c;
+    }
+#endif
+}
diff --git a/gnulib/lib/c-ctype.h b/gnulib/lib/c-ctype.h
new file mode 100644 (file)
index 0000000..57e71ee
--- /dev/null
@@ -0,0 +1,295 @@
+/* Character handling in C locale.
+
+   These functions work like the corresponding functions in <ctype.h>,
+   except that they have the C (POSIX) locale hardwired, whereas the
+   <ctype.h> functions' behaviour depends on the current locale set via
+   setlocale.
+
+   Copyright (C) 2000-2003, 2006, 2008-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, write to the Free Software Foundation,
+Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef C_CTYPE_H
+#define C_CTYPE_H
+
+#include <stdbool.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* The functions defined in this file assume the "C" locale and a character
+   set without diacritics (ASCII-US or EBCDIC-US or something like that).
+   Even if the "C" locale on a particular system is an extension of the ASCII
+   character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it
+   is ISO-8859-1), the functions in this file recognize only the ASCII
+   characters.  */
+
+
+/* Check whether the ASCII optimizations apply. */
+
+/* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that
+   '0', '1', ..., '9' have consecutive integer values.  */
+#define C_CTYPE_CONSECUTIVE_DIGITS 1
+
+#if ('A' <= 'Z') \
+    && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \
+    && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \
+    && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \
+    && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \
+    && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \
+    && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \
+    && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \
+    && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \
+    && ('Y' + 1 == 'Z')
+#define C_CTYPE_CONSECUTIVE_UPPERCASE 1
+#endif
+
+#if ('a' <= 'z') \
+    && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \
+    && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \
+    && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \
+    && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \
+    && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \
+    && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \
+    && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \
+    && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \
+    && ('y' + 1 == 'z')
+#define C_CTYPE_CONSECUTIVE_LOWERCASE 1
+#endif
+
+#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+    && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+    && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+    && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+    && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+    && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+    && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+    && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+    && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+    && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+    && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+    && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+    && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+    && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+    && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+    && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+    && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+    && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+    && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+    && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+    && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+    && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+    && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)
+/* The character set is ASCII or one of its variants or extensions, not EBCDIC.
+   Testing the value of '\n' and '\r' is not relevant.  */
+#define C_CTYPE_ASCII 1
+#endif
+
+
+/* Function declarations. */
+
+/* Unlike the functions in <ctype.h>, which require an argument in the range
+   of the 'unsigned char' type, the functions here operate on values that are
+   in the 'unsigned char' range or in the 'char' range.  In other words,
+   when you have a 'char' value, you need to cast it before using it as
+   argument to a <ctype.h> function:
+
+         const char *s = ...;
+         if (isalpha ((unsigned char) *s)) ...
+
+   but you don't need to cast it for the functions defined in this file:
+
+         const char *s = ...;
+         if (c_isalpha (*s)) ...
+ */
+
+extern bool c_isascii (int c); /* not locale dependent */
+
+extern bool c_isalnum (int c);
+extern bool c_isalpha (int c);
+extern bool c_isblank (int c);
+extern bool c_iscntrl (int c);
+extern bool c_isdigit (int c);
+extern bool c_islower (int c);
+extern bool c_isgraph (int c);
+extern bool c_isprint (int c);
+extern bool c_ispunct (int c);
+extern bool c_isspace (int c);
+extern bool c_isupper (int c);
+extern bool c_isxdigit (int c);
+
+extern int c_tolower (int c);
+extern int c_toupper (int c);
+
+
+#if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS
+
+/* ASCII optimizations. */
+
+#undef c_isascii
+#define c_isascii(c) \
+  ({ int __c = (c); \
+     (__c >= 0x00 && __c <= 0x7f); \
+   })
+
+#if C_CTYPE_CONSECUTIVE_DIGITS \
+    && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+#undef c_isalnum
+#define c_isalnum(c) \
+  ({ int __c = (c); \
+     ((__c >= '0' && __c <= '9') \
+      || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \
+   })
+#else
+#undef c_isalnum
+#define c_isalnum(c) \
+  ({ int __c = (c); \
+     ((__c >= '0' && __c <= '9') \
+      || (__c >= 'A' && __c <= 'Z') \
+      || (__c >= 'a' && __c <= 'z')); \
+   })
+#endif
+#endif
+
+#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+#undef c_isalpha
+#define c_isalpha(c) \
+  ({ int __c = (c); \
+     ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \
+   })
+#else
+#undef c_isalpha
+#define c_isalpha(c) \
+  ({ int __c = (c); \
+     ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \
+   })
+#endif
+#endif
+
+#undef c_isblank
+#define c_isblank(c) \
+  ({ int __c = (c); \
+     (__c == ' ' || __c == '\t'); \
+   })
+
+#if C_CTYPE_ASCII
+#undef c_iscntrl
+#define c_iscntrl(c) \
+  ({ int __c = (c); \
+     ((__c & ~0x1f) == 0 || __c == 0x7f); \
+   })
+#endif
+
+#if C_CTYPE_CONSECUTIVE_DIGITS
+#undef c_isdigit
+#define c_isdigit(c) \
+  ({ int __c = (c); \
+     (__c >= '0' && __c <= '9'); \
+   })
+#endif
+
+#if C_CTYPE_CONSECUTIVE_LOWERCASE
+#undef c_islower
+#define c_islower(c) \
+  ({ int __c = (c); \
+     (__c >= 'a' && __c <= 'z'); \
+   })
+#endif
+
+#if C_CTYPE_ASCII
+#undef c_isgraph
+#define c_isgraph(c) \
+  ({ int __c = (c); \
+     (__c >= '!' && __c <= '~'); \
+   })
+#endif
+
+#if C_CTYPE_ASCII
+#undef c_isprint
+#define c_isprint(c) \
+  ({ int __c = (c); \
+     (__c >= ' ' && __c <= '~'); \
+   })
+#endif
+
+#if C_CTYPE_ASCII
+#undef c_ispunct
+#define c_ispunct(c) \
+  ({ int _c = (c); \
+     (c_isgraph (_c) && ! c_isalnum (_c)); \
+   })
+#endif
+
+#undef c_isspace
+#define c_isspace(c) \
+  ({ int __c = (c); \
+     (__c == ' ' || __c == '\t' \
+      || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \
+   })
+
+#if C_CTYPE_CONSECUTIVE_UPPERCASE
+#undef c_isupper
+#define c_isupper(c) \
+  ({ int __c = (c); \
+     (__c >= 'A' && __c <= 'Z'); \
+   })
+#endif
+
+#if C_CTYPE_CONSECUTIVE_DIGITS \
+    && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+#undef c_isxdigit
+#define c_isxdigit(c) \
+  ({ int __c = (c); \
+     ((__c >= '0' && __c <= '9') \
+      || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \
+   })
+#else
+#undef c_isxdigit
+#define c_isxdigit(c) \
+  ({ int __c = (c); \
+     ((__c >= '0' && __c <= '9') \
+      || (__c >= 'A' && __c <= 'F') \
+      || (__c >= 'a' && __c <= 'f')); \
+   })
+#endif
+#endif
+
+#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#undef c_tolower
+#define c_tolower(c) \
+  ({ int __c = (c); \
+     (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \
+   })
+#undef c_toupper
+#define c_toupper(c) \
+  ({ int __c = (c); \
+     (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \
+   })
+#endif
+
+#endif /* optimizing for speed */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* C_CTYPE_H */
diff --git a/gnulib/lib/c-strcase.h b/gnulib/lib/c-strcase.h
new file mode 100644 (file)
index 0000000..4148c34
--- /dev/null
@@ -0,0 +1,56 @@
+/* Case-insensitive string comparison functions in C locale.
+   Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef C_STRCASE_H
+#define C_STRCASE_H
+
+#include <stddef.h>
+
+
+/* The functions defined in this file assume the "C" locale and a character
+   set without diacritics (ASCII-US or EBCDIC-US or something like that).
+   Even if the "C" locale on a particular system is an extension of the ASCII
+   character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it
+   is ISO-8859-1), the functions in this file recognize only the ASCII
+   characters.  More precisely, one of the string arguments must be an ASCII
+   string; the other one can also contain non-ASCII characters (but then
+   the comparison result will be nonzero).  */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
+   greater than zero if S1 is lexicographically less than, equal to or greater
+   than S2.  */
+extern int c_strcasecmp (const char *s1, const char *s2);
+
+/* Compare no more than N characters of strings S1 and S2, ignoring case,
+   returning less than, equal to or greater than zero if S1 is
+   lexicographically less than, equal to or greater than S2.  */
+extern int c_strncasecmp (const char *s1, const char *s2, size_t n);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* C_STRCASE_H */
diff --git a/gnulib/lib/c-strcasecmp.c b/gnulib/lib/c-strcasecmp.c
new file mode 100644 (file)
index 0000000..4c4e106
--- /dev/null
@@ -0,0 +1,57 @@
+/* c-strcasecmp.c -- case insensitive string comparator in C locale
+   Copyright (C) 1998-1999, 2005-2006, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "c-strcase.h"
+
+#include <limits.h>
+
+#include "c-ctype.h"
+
+int
+c_strcasecmp (const char *s1, const char *s2)
+{
+  register const unsigned char *p1 = (const unsigned char *) s1;
+  register const unsigned char *p2 = (const unsigned char *) s2;
+  unsigned char c1, c2;
+
+  if (p1 == p2)
+    return 0;
+
+  do
+    {
+      c1 = c_tolower (*p1);
+      c2 = c_tolower (*p2);
+
+      if (c1 == '\0')
+        break;
+
+      ++p1;
+      ++p2;
+    }
+  while (c1 == c2);
+
+  if (UCHAR_MAX <= INT_MAX)
+    return c1 - c2;
+  else
+    /* On machines where 'char' and 'int' are types of the same size, the
+       difference of two 'unsigned char' values - including the sign bit -
+       doesn't fit in an 'int'.  */
+    return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+}
diff --git a/gnulib/lib/c-strcasestr.c b/gnulib/lib/c-strcasestr.c
new file mode 100644 (file)
index 0000000..45fccca
--- /dev/null
@@ -0,0 +1,77 @@
+/* c-strcasestr.c -- case insensitive substring search in C locale
+   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2005.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "c-strcasestr.h"
+
+#include <stdbool.h>
+#include <string.h>
+
+#include "c-ctype.h"
+#include "c-strcase.h"
+
+/* Two-Way algorithm.  */
+#define RETURN_TYPE char *
+#define AVAILABLE(h, h_l, j, n_l)                       \
+  (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l))     \
+   && ((h_l) = (j) + (n_l)))
+#define CANON_ELEMENT c_tolower
+#define CMP_FUNC(p1, p2, l)                             \
+  c_strncasecmp ((const char *) (p1), (const char *) (p2), l)
+#include "str-two-way.h"
+
+/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
+   comparison from the C locale, regardless of the current locale.  */
+char *
+c_strcasestr (const char *haystack_start, const char *needle_start)
+{
+  const char *haystack = haystack_start;
+  const char *needle = needle_start;
+  size_t needle_len; /* Length of NEEDLE.  */
+  size_t haystack_len; /* Known minimum length of HAYSTACK.  */
+  bool ok = true; /* True if NEEDLE is prefix of HAYSTACK.  */
+
+  /* Determine length of NEEDLE, and in the process, make sure
+     HAYSTACK is at least as long (no point processing all of a long
+     NEEDLE if HAYSTACK is too short).  */
+  while (*haystack && *needle)
+    ok &= (c_tolower ((unsigned char) *haystack++)
+           == c_tolower ((unsigned char) *needle++));
+  if (*needle)
+    return NULL;
+  if (ok)
+    return (char *) haystack_start;
+  needle_len = needle - needle_start;
+  haystack = haystack_start + 1;
+  haystack_len = needle_len - 1;
+
+  /* Perform the search.  Abstract memory is considered to be an array
+     of 'unsigned char' values, not an array of 'char' values.  See
+     ISO C 99 section 6.2.6.1.  */
+  if (needle_len < LONG_NEEDLE_THRESHOLD)
+    return two_way_short_needle ((const unsigned char *) haystack,
+                                 haystack_len,
+                                 (const unsigned char *) needle_start,
+                                 needle_len);
+  return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
+                              (const unsigned char *) needle_start,
+                              needle_len);
+}
+
+#undef LONG_NEEDLE_THRESHOLD
diff --git a/gnulib/lib/c-strcasestr.h b/gnulib/lib/c-strcasestr.h
new file mode 100644 (file)
index 0000000..396c0d4
--- /dev/null
@@ -0,0 +1,36 @@
+/* Case-insensitive searching in a string in C locale.
+   Copyright (C) 2005, 2009-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 C_STRCASESTR_H
+#define C_STRCASESTR_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
+   comparison.  */
+extern char *c_strcasestr (const char *haystack, const char *needle);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* C_STRCASESTR_H */
diff --git a/gnulib/lib/c-strncasecmp.c b/gnulib/lib/c-strncasecmp.c
new file mode 100644 (file)
index 0000000..0c433b9
--- /dev/null
@@ -0,0 +1,57 @@
+/* c-strncasecmp.c -- case insensitive string comparator in C locale
+   Copyright (C) 1998-1999, 2005-2006, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "c-strcase.h"
+
+#include <limits.h>
+
+#include "c-ctype.h"
+
+int
+c_strncasecmp (const char *s1, const char *s2, size_t n)
+{
+  register const unsigned char *p1 = (const unsigned char *) s1;
+  register const unsigned char *p2 = (const unsigned char *) s2;
+  unsigned char c1, c2;
+
+  if (p1 == p2 || n == 0)
+    return 0;
+
+  do
+    {
+      c1 = c_tolower (*p1);
+      c2 = c_tolower (*p2);
+
+      if (--n == 0 || c1 == '\0')
+        break;
+
+      ++p1;
+      ++p2;
+    }
+  while (c1 == c2);
+
+  if (UCHAR_MAX <= INT_MAX)
+    return c1 - c2;
+  else
+    /* On machines where 'char' and 'int' are types of the same size, the
+       difference of two 'unsigned char' values - including the sign bit -
+       doesn't fit in an 'int'.  */
+    return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+}
diff --git a/gnulib/lib/c-strstr.c b/gnulib/lib/c-strstr.c
new file mode 100644 (file)
index 0000000..307c1f9
--- /dev/null
@@ -0,0 +1,32 @@
+/* c-strstr.c -- substring search in C locale
+   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2005, 2007.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "c-strstr.h"
+
+#include <string.h>
+
+/* Find the first occurrence of NEEDLE in HAYSTACK.  */
+char *
+c_strstr (const char *haystack, const char *needle)
+{
+  /* POSIX says that strstr() interprets the strings as byte sequences, not
+     as character sequences in the current locale.  */
+  return strstr (haystack, needle);
+}
diff --git a/gnulib/lib/c-strstr.h b/gnulib/lib/c-strstr.h
new file mode 100644 (file)
index 0000000..b4206b9
--- /dev/null
@@ -0,0 +1,44 @@
+/* Searching in a string.
+   Copyright (C) 2001-2003, 2006, 2009-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/>.  */
+
+
+/* The functions defined in this file assume a nearly ASCII compatible
+   character set.  */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Find the first occurrence of NEEDLE in HAYSTACK.
+   This function is safe to be called, even in a multibyte locale, if NEEDLE
+     1. consists solely of printable ASCII characters excluding '\\' and '~'
+        [this restriction is needed because of Shift_JIS and JOHAB]
+        or of the control ASCII characters '\a' '\b' '\f' '\n' '\r' '\t' '\v'
+        [this restriction is needed because of VISCII], and
+     2. has at least length 2
+        [this restriction is needed because of BIG5, BIG5-HKSCS, GBK, GB18030,
+         Shift_JIS, JOHAB], and
+     3. does not consist entirely of decimal digits, or has at least length 4
+        [this restricion is needed because of GB18030].
+   This function is also safe to be called, even in a multibyte locale, if
+   HAYSTACK and NEEDLE are known to both consist solely of printable ASCII
+   characters excluding '\\' and '~'.  */
+extern char *c_strstr (const char *haystack, const char *needle);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gnulib/lib/canonicalize.c b/gnulib/lib/canonicalize.c
new file mode 100644 (file)
index 0000000..a329a33
--- /dev/null
@@ -0,0 +1,290 @@
+/* Return the canonical absolute name of a given file.
+   Copyright (C) 1996-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/>.  */
+
+#include <config.h>
+
+#include "canonicalize.h"
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "areadlink.h"
+#include "file-set.h"
+#include "hash-triple.h"
+#include "pathmax.h"
+#include "xalloc.h"
+#include "xgetcwd.h"
+
+#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
+# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
+#endif
+
+#if !((HAVE_CANONICALIZE_FILE_NAME && FUNC_REALPATH_WORKS)      \
+      || GNULIB_CANONICALIZE_LGPL)
+/* Return the canonical absolute name of file NAME.  A canonical name
+   does not contain any `.', `..' components nor any repeated file name
+   separators ('/') or symlinks.  All components must exist.
+   The result is malloc'd.  */
+
+char *
+canonicalize_file_name (const char *name)
+{
+  return canonicalize_filename_mode (name, CAN_EXISTING);
+}
+#endif /* !HAVE_CANONICALIZE_FILE_NAME */
+
+/* Return true if we've already seen the triple, <FILENAME, dev, ino>.
+   If *HT is not initialized, initialize it.  */
+static bool
+seen_triple (Hash_table **ht, char const *filename, struct stat const *st)
+{
+  if (*ht == NULL)
+    {
+      size_t initial_capacity = 7;
+      *ht = hash_initialize (initial_capacity,
+                            NULL,
+                            triple_hash,
+                            triple_compare_ino_str,
+                            triple_free);
+      if (*ht == NULL)
+        xalloc_die ();
+    }
+
+  if (seen_file (*ht, filename, st))
+    return true;
+
+  record_file (*ht, filename, st);
+  return false;
+}
+
+/* Return the canonical absolute name of file NAME, while treating
+   missing elements according to CAN_MODE.  A canonical name
+   does not contain any `.', `..' components nor any repeated file name
+   separators ('/') or symlinks.  Whether components must exist
+   or not depends on canonicalize mode.  The result is malloc'd.  */
+
+char *
+canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode)
+{
+  char *rname, *dest, *extra_buf = NULL;
+  char const *start;
+  char const *end;
+  char const *rname_limit;
+  size_t extra_len = 0;
+  Hash_table *ht = NULL;
+  int saved_errno;
+
+  if (name == NULL)
+    {
+      errno = EINVAL;
+      return NULL;
+    }
+
+  if (name[0] == '\0')
+    {
+      errno = ENOENT;
+      return NULL;
+    }
+
+  if (name[0] != '/')
+    {
+      rname = xgetcwd ();
+      if (!rname)
+        return NULL;
+      dest = strchr (rname, '\0');
+      if (dest - rname < PATH_MAX)
+        {
+          char *p = xrealloc (rname, PATH_MAX);
+          dest = p + (dest - rname);
+          rname = p;
+          rname_limit = rname + PATH_MAX;
+        }
+      else
+        {
+          rname_limit = dest;
+        }
+    }
+  else
+    {
+      rname = xmalloc (PATH_MAX);
+      rname_limit = rname + PATH_MAX;
+      rname[0] = '/';
+      dest = rname + 1;
+      if (DOUBLE_SLASH_IS_DISTINCT_ROOT && name[1] == '/')
+        *dest++ = '/';
+    }
+
+  for (start = name; *start; start = end)
+    {
+      /* Skip sequence of multiple file name separators.  */
+      while (*start == '/')
+        ++start;
+
+      /* Find end of component.  */
+      for (end = start; *end && *end != '/'; ++end)
+        /* Nothing.  */;
+
+      if (end - start == 0)
+        break;
+      else if (end - start == 1 && start[0] == '.')
+        /* nothing */;
+      else if (end - start == 2 && start[0] == '.' && start[1] == '.')
+        {
+          /* Back up to previous component, ignore if at root already.  */
+          if (dest > rname + 1)
+            while ((--dest)[-1] != '/');
+          if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1
+              && *dest == '/')
+            dest++;
+        }
+      else
+        {
+          struct stat st;
+
+          if (dest[-1] != '/')
+            *dest++ = '/';
+
+          if (dest + (end - start) >= rname_limit)
+            {
+              ptrdiff_t dest_offset = dest - rname;
+              size_t new_size = rname_limit - rname;
+
+              if (end - start + 1 > PATH_MAX)
+                new_size += end - start + 1;
+              else
+                new_size += PATH_MAX;
+              rname = xrealloc (rname, new_size);
+              rname_limit = rname + new_size;
+
+              dest = rname + dest_offset;
+            }
+
+          dest = memcpy (dest, start, end - start);
+          dest += end - start;
+          *dest = '\0';
+
+          if (lstat (rname, &st) != 0)
+            {
+              saved_errno = errno;
+              if (can_mode == CAN_EXISTING)
+                goto error;
+              if (can_mode == CAN_ALL_BUT_LAST)
+                {
+                  if (end[strspn (end, "/")] || saved_errno != ENOENT)
+                    goto error;
+                  continue;
+                }
+              st.st_mode = 0;
+            }
+
+          if (S_ISLNK (st.st_mode))
+            {
+              char *buf;
+              size_t n, len;
+
+              /* Detect loops.  We cannot use the cycle-check module here,
+                 since it's actually possible to encounter the same symlink
+                 more than once in a given traversal.  However, encountering
+                 the same symlink,NAME pair twice does indicate a loop.  */
+              if (seen_triple (&ht, name, &st))
+                {
+                  if (can_mode == CAN_MISSING)
+                    continue;
+                  saved_errno = ELOOP;
+                  goto error;
+                }
+
+              buf = areadlink_with_size (rname, st.st_size);
+              if (!buf)
+                {
+                  if (can_mode == CAN_MISSING && errno != ENOMEM)
+                    continue;
+                  saved_errno = errno;
+                  goto error;
+                }
+
+              n = strlen (buf);
+              len = strlen (end);
+
+              if (!extra_len)
+                {
+                  extra_len =
+                    ((n + len + 1) > PATH_MAX) ? (n + len + 1) : PATH_MAX;
+                  extra_buf = xmalloc (extra_len);
+                }
+              else if ((n + len + 1) > extra_len)
+                {
+                  extra_len = n + len + 1;
+                  extra_buf = xrealloc (extra_buf, extra_len);
+                }
+
+              /* Careful here, end may be a pointer into extra_buf... */
+              memmove (&extra_buf[n], end, len + 1);
+              name = end = memcpy (extra_buf, buf, n);
+
+              if (buf[0] == '/')
+                {
+                  dest = rname + 1;     /* It's an absolute symlink */
+                  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && buf[1] == '/')
+                    *dest++ = '/';
+                }
+              else
+                {
+                  /* Back up to previous component, ignore if at root
+                     already: */
+                  if (dest > rname + 1)
+                    while ((--dest)[-1] != '/');
+                  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1
+                      && *dest == '/')
+                    dest++;
+                }
+
+              free (buf);
+            }
+          else
+            {
+              if (!S_ISDIR (st.st_mode) && *end && (can_mode != CAN_MISSING))
+                {
+                  saved_errno = ENOTDIR;
+                  goto error;
+                }
+            }
+        }
+    }
+  if (dest > rname + 1 && dest[-1] == '/')
+    --dest;
+  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 && *dest == '/')
+    dest++;
+  *dest = '\0';
+  if (rname_limit != dest + 1)
+    rname = xrealloc (rname, dest - rname + 1);
+
+  free (extra_buf);
+  if (ht)
+    hash_free (ht);
+  return rname;
+
+error:
+  free (extra_buf);
+  free (rname);
+  if (ht)
+    hash_free (ht);
+  errno = saved_errno;
+  return NULL;
+}
diff --git a/gnulib/lib/canonicalize.h b/gnulib/lib/canonicalize.h
new file mode 100644 (file)
index 0000000..04ad79c
--- /dev/null
@@ -0,0 +1,41 @@
+/* Return the canonical absolute name of a given file.
+   Copyright (C) 1996-2007, 2009-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 CANONICALIZE_H_
+# define CANONICALIZE_H_
+
+#include <stdlib.h> /* for canonicalize_file_name */
+
+enum canonicalize_mode_t
+  {
+    /* All components must exist.  */
+    CAN_EXISTING = 0,
+
+    /* All components excluding last one must exist.  */
+    CAN_ALL_BUT_LAST = 1,
+
+    /* No requirements on components existence.  */
+    CAN_MISSING = 2
+  };
+typedef enum canonicalize_mode_t canonicalize_mode_t;
+
+/* Return a malloc'd string containing the canonical absolute name of
+   the named file.  This acts like canonicalize_file_name, except that
+   whether components must exist depends on the canonicalize_mode_t
+   argument.  */
+char *canonicalize_filename_mode (const char *, canonicalize_mode_t);
+
+#endif /* !CANONICALIZE_H_ */
diff --git a/gnulib/lib/chdir-long.c b/gnulib/lib/chdir-long.c
new file mode 100644 (file)
index 0000000..96b750c
--- /dev/null
@@ -0,0 +1,266 @@
+/* provide a chdir function that tries not to fail due to ENAMETOOLONG
+   Copyright (C) 2004-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 Jim Meyering */
+
+#include <config.h>
+
+#include "chdir-long.h"
+
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+#include <stdio.h>
+
+#ifndef PATH_MAX
+# error "compile this file only if your system defines PATH_MAX"
+#endif
+
+/* The results of openat() in this file are not leaked to any
+   single-threaded code that could use stdio.
+   FIXME - if the kernel ever adds support for multi-thread safety for
+   avoiding standard fds, then we should use openat_safer.  */
+
+struct cd_buf
+{
+  int fd;
+};
+
+static inline void
+cdb_init (struct cd_buf *cdb)
+{
+  cdb->fd = AT_FDCWD;
+}
+
+static inline int
+cdb_fchdir (struct cd_buf const *cdb)
+{
+  return fchdir (cdb->fd);
+}
+
+static inline void
+cdb_free (struct cd_buf const *cdb)
+{
+  if (0 <= cdb->fd)
+    {
+      bool close_fail = close (cdb->fd);
+      assert (! close_fail);
+    }
+}
+
+/* Given a file descriptor of an open directory (or AT_FDCWD), CDB->fd,
+   try to open the CDB->fd-relative directory, DIR.  If the open succeeds,
+   update CDB->fd with the resulting descriptor, close the incoming file
+   descriptor, and return zero.  Upon failure, return -1 and set errno.  */
+static int
+cdb_advance_fd (struct cd_buf *cdb, char const *dir)
+{
+  int new_fd = openat (cdb->fd, dir,
+                       O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
+  if (new_fd < 0)
+    return -1;
+
+  cdb_free (cdb);
+  cdb->fd = new_fd;
+
+  return 0;
+}
+
+/* Return a pointer to the first non-slash in S.  */
+static inline char *
+find_non_slash (char const *s)
+{
+  size_t n_slash = strspn (s, "/");
+  return (char *) s + n_slash;
+}
+
+/* This is a function much like chdir, but without the PATH_MAX limitation
+   on the length of the directory name.  A significant difference is that
+   it must be able to modify (albeit only temporarily) the directory
+   name.  It handles an arbitrarily long directory name by operating
+   on manageable portions of the name.  On systems without the openat
+   syscall, this means changing the working directory to more and more
+   `distant' points along the long directory name and then restoring
+   the working directory.  If any of those attempts to save or restore
+   the working directory fails, this function exits nonzero.
+
+   Note that this function may still fail with errno == ENAMETOOLONG, but
+   only if the specified directory name contains a component that is long
+   enough to provoke such a failure all by itself (e.g. if the component
+   has length PATH_MAX or greater on systems that define PATH_MAX).  */
+
+int
+chdir_long (char *dir)
+{
+  int e = chdir (dir);
+  if (e == 0 || errno != ENAMETOOLONG)
+    return e;
+
+  {
+    size_t len = strlen (dir);
+    char *dir_end = dir + len;
+    struct cd_buf cdb;
+    size_t n_leading_slash;
+
+    cdb_init (&cdb);
+
+    /* If DIR is the empty string, then the chdir above
+       must have failed and set errno to ENOENT.  */
+    assert (0 < len);
+    assert (PATH_MAX <= len);
+
+    /* Count leading slashes.  */
+    n_leading_slash = strspn (dir, "/");
+
+    /* Handle any leading slashes as well as any name that matches
+       the regular expression, m!^//hostname[/]*! .  Handling this
+       prefix separately usually results in a single additional
+       cdb_advance_fd call, but it's worthwhile, since it makes the
+       code in the following loop cleaner.  */
+    if (n_leading_slash == 2)
+      {
+        int err;
+        /* Find next slash.
+           We already know that dir[2] is neither a slash nor '\0'.  */
+        char *slash = memchr (dir + 3, '/', dir_end - (dir + 3));
+        if (slash == NULL)
+          {
+            errno = ENAMETOOLONG;
+            return -1;
+          }
+        *slash = '\0';
+        err = cdb_advance_fd (&cdb, dir);
+        *slash = '/';
+        if (err != 0)
+          goto Fail;
+        dir = find_non_slash (slash + 1);
+      }
+    else if (n_leading_slash)
+      {
+        if (cdb_advance_fd (&cdb, "/") != 0)
+          goto Fail;
+        dir += n_leading_slash;
+      }
+
+    assert (*dir != '/');
+    assert (dir <= dir_end);
+
+    while (PATH_MAX <= dir_end - dir)
+      {
+        int err;
+        /* Find a slash that is PATH_MAX or fewer bytes away from dir.
+           I.e. see if there is a slash that will give us a name of
+           length PATH_MAX-1 or less.  */
+        char *slash = memrchr (dir, '/', PATH_MAX);
+        if (slash == NULL)
+          {
+            errno = ENAMETOOLONG;
+            return -1;
+          }
+
+        *slash = '\0';
+        assert (slash - dir < PATH_MAX);
+        err = cdb_advance_fd (&cdb, dir);
+        *slash = '/';
+        if (err != 0)
+          goto Fail;
+
+        dir = find_non_slash (slash + 1);
+      }
+
+    if (dir < dir_end)
+      {
+        if (cdb_advance_fd (&cdb, dir) != 0)
+          goto Fail;
+      }
+
+    if (cdb_fchdir (&cdb) != 0)
+      goto Fail;
+
+    cdb_free (&cdb);
+    return 0;
+
+   Fail:
+    {
+      int saved_errno = errno;
+      cdb_free (&cdb);
+      errno = saved_errno;
+      return -1;
+    }
+  }
+}
+
+#if TEST_CHDIR
+
+# include "closeout.h"
+# include "error.h"
+
+char *program_name;
+
+int
+main (int argc, char *argv[])
+{
+  char *line = NULL;
+  size_t n = 0;
+  int len;
+
+  program_name = argv[0];
+  atexit (close_stdout);
+
+  len = getline (&line, &n, stdin);
+  if (len < 0)
+    {
+      int saved_errno = errno;
+      if (feof (stdin))
+        exit (0);
+
+      error (EXIT_FAILURE, saved_errno,
+             "reading standard input");
+    }
+  else if (len == 0)
+    exit (0);
+
+  if (line[len-1] == '\n')
+    line[len-1] = '\0';
+
+  if (chdir_long (line) != 0)
+    error (EXIT_FAILURE, errno,
+           "chdir_long failed: %s", line);
+
+  if (argc <= 1)
+    {
+      /* Using `pwd' here makes sense only if it is a robust implementation,
+         like the one in coreutils after the 2004-04-19 changes.  */
+      char const *cmd = "pwd";
+      execlp (cmd, (char *) NULL);
+      error (EXIT_FAILURE, errno, "%s", cmd);
+    }
+
+  fclose (stdin);
+  fclose (stderr);
+
+  exit (EXIT_SUCCESS);
+}
+#endif
+
+/*
+Local Variables:
+compile-command: "gcc -DTEST_CHDIR=1 -g -O -W -Wall chdir-long.c libcoreutils.a"
+End:
+*/
diff --git a/gnulib/lib/chdir-long.h b/gnulib/lib/chdir-long.h
new file mode 100644 (file)
index 0000000..1ad9dd8
--- /dev/null
@@ -0,0 +1,34 @@
+/* provide a chdir function that tries not to fail due to ENAMETOOLONG
+   Copyright (C) 2004-2005, 2009-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 Jim Meyering.  */
+
+#include <unistd.h>
+#include <limits.h>
+
+#ifndef PATH_MAX
+# ifdef MAXPATHLEN
+#  define PATH_MAX MAXPATHLEN
+# endif
+#endif
+
+/* On systems without PATH_MAX, presume that chdir accepts
+   arbitrarily long directory names.  */
+#ifndef PATH_MAX
+# define chdir_long(Dir) chdir (Dir)
+#else
+int chdir_long (char *dir);
+#endif
diff --git a/gnulib/lib/chown.c b/gnulib/lib/chown.c
new file mode 100644 (file)
index 0000000..9d97e73
--- /dev/null
@@ -0,0 +1,156 @@
+/* provide consistent interface to chown for systems that don't interpret
+   an ID of -1 as meaning `don't change the corresponding ID'.
+
+   Copyright (C) 1997, 2004-2007, 2009-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 Jim Meyering */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#if !HAVE_CHOWN
+
+/* Simple stub that always fails with ENOSYS, for mingw.  */
+int
+chown (const char *file _GL_UNUSED, uid_t uid _GL_UNUSED,
+       gid_t gid _GL_UNUSED)
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+#else /* HAVE_CHOWN */
+
+/* Below we refer to the system's chown().  */
+# undef chown
+
+/* The results of open() in this file are not used with fchdir,
+   therefore save some unnecessary work in fchdir.c.  */
+# undef open
+# undef close
+
+/* Provide a more-closely POSIX-conforming version of chown on
+   systems with one or both of the following problems:
+   - chown doesn't treat an ID of -1 as meaning
+   `don't change the corresponding ID'.
+   - chown doesn't dereference symlinks.  */
+
+int
+rpl_chown (const char *file, uid_t uid, gid_t gid)
+{
+  struct stat st;
+  bool stat_valid = false;
+  int result;
+
+# if CHOWN_CHANGE_TIME_BUG
+  if (gid != (gid_t) -1 || uid != (uid_t) -1)
+    {
+      if (stat (file, &st))
+        return -1;
+      stat_valid = true;
+    }
+# endif
+
+# if CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE
+  if (gid == (gid_t) -1 || uid == (uid_t) -1)
+    {
+      /* Stat file to get id(s) that should remain unchanged.  */
+      if (!stat_valid && stat (file, &st))
+        return -1;
+      if (gid == (gid_t) -1)
+        gid = st.st_gid;
+      if (uid == (uid_t) -1)
+        uid = st.st_uid;
+    }
+# endif
+
+# if CHOWN_MODIFIES_SYMLINK
+  {
+    /* Handle the case in which the system-supplied chown function
+       does *not* follow symlinks.  Instead, it changes permissions
+       on the symlink itself.  To work around that, we open the
+       file (but this can fail due to lack of read or write permission) and
+       use fchown on the resulting descriptor.  */
+    int open_flags = O_NONBLOCK | O_NOCTTY;
+    int fd = open (file, O_RDONLY | open_flags);
+    if (0 <= fd
+        || (errno == EACCES
+            && 0 <= (fd = open (file, O_WRONLY | open_flags))))
+      {
+        int saved_errno;
+        bool fchown_socket_failure;
+
+        result = fchown (fd, uid, gid);
+        saved_errno = errno;
+
+        /* POSIX says fchown can fail with errno == EINVAL on sockets
+           and pipes, so fall back on chown in that case.  */
+        fchown_socket_failure =
+          (result != 0 && saved_errno == EINVAL
+           && fstat (fd, &st) == 0
+           && (S_ISFIFO (st.st_mode) || S_ISSOCK (st.st_mode)));
+
+        close (fd);
+
+        if (! fchown_socket_failure)
+          {
+            errno = saved_errno;
+            return result;
+          }
+      }
+    else if (errno != EACCES)
+      return -1;
+  }
+# endif
+
+# if CHOWN_TRAILING_SLASH_BUG
+  if (!stat_valid)
+    {
+      size_t len = strlen (file);
+      if (len && file[len - 1] == '/' && stat (file, &st))
+        return -1;
+    }
+# endif
+
+  result = chown (file, uid, gid);
+
+# if CHOWN_CHANGE_TIME_BUG
+  if (result == 0 && stat_valid
+      && (uid == st.st_uid || uid == (uid_t) -1)
+      && (gid == st.st_gid || gid == (gid_t) -1))
+    {
+      /* No change in ownership, but at least one argument was not -1,
+         so we are required to update ctime.  Since chown succeeded,
+         we assume that chmod will do likewise.  Fortunately, on all
+         known systems where a 'no-op' chown skips the ctime update, a
+         'no-op' chmod still does the trick.  */
+      result = chmod (file, st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO
+                                          | S_ISUID | S_ISGID | S_ISVTX));
+    }
+# endif
+
+  return result;
+}
+
+#endif /* HAVE_CHOWN */
diff --git a/gnulib/lib/cloexec.c b/gnulib/lib/cloexec.c
new file mode 100644 (file)
index 0000000..d525202
--- /dev/null
@@ -0,0 +1,83 @@
+/* closexec.c - set or clear the close-on-exec descriptor flag
+
+   Copyright (C) 1991, 2004-2006, 2009-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/>.
+
+   The code is taken from glibc/manual/llio.texi  */
+
+#include <config.h>
+
+#include "cloexec.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true,
+   or clear the flag if VALUE is false.
+   Return 0 on success, or -1 on error with `errno' set.
+
+   Note that on MingW, this function does NOT protect DESC from being
+   inherited into spawned children.  Instead, either use dup_cloexec
+   followed by closing the original DESC, or use interfaces such as
+   open or pipe2 that accept flags like O_CLOEXEC to create DESC
+   non-inheritable in the first place.  */
+
+int
+set_cloexec_flag (int desc, bool value)
+{
+#ifdef F_SETFD
+
+  int flags = fcntl (desc, F_GETFD, 0);
+
+  if (0 <= flags)
+    {
+      int newflags = (value ? flags | FD_CLOEXEC : flags & ~FD_CLOEXEC);
+
+      if (flags == newflags
+          || fcntl (desc, F_SETFD, newflags) != -1)
+        return 0;
+    }
+
+  return -1;
+
+#else /* !F_SETFD */
+
+  /* Use dup2 to reject invalid file descriptors; the cloexec flag
+     will be unaffected.  */
+  if (desc < 0)
+    {
+      errno = EBADF;
+      return -1;
+    }
+  if (dup2 (desc, desc) < 0)
+    /* errno is EBADF here.  */
+    return -1;
+
+  /* There is nothing we can do on this kind of platform.  Punt.  */
+  return 0;
+#endif /* !F_SETFD */
+}
+
+
+/* Duplicates a file handle FD, while marking the copy to be closed
+   prior to exec or spawn.  Returns -1 and sets errno if FD could not
+   be duplicated.  */
+
+int
+dup_cloexec (int fd)
+{
+  return fcntl (fd, F_DUPFD_CLOEXEC, 0);
+}
diff --git a/gnulib/lib/cloexec.h b/gnulib/lib/cloexec.h
new file mode 100644 (file)
index 0000000..17c8ac0
--- /dev/null
@@ -0,0 +1,38 @@
+/* closexec.c - set or clear the close-on-exec descriptor flag
+
+   Copyright (C) 2004, 2009-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/>.
+
+*/
+
+#include <stdbool.h>
+
+/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true,
+   or clear the flag if VALUE is false.
+   Return 0 on success, or -1 on error with `errno' set.
+
+   Note that on MingW, this function does NOT protect DESC from being
+   inherited into spawned children.  Instead, either use dup_cloexec
+   followed by closing the original DESC, or use interfaces such as
+   open or pipe2 that accept flags like O_CLOEXEC to create DESC
+   non-inheritable in the first place.  */
+
+int set_cloexec_flag (int desc, bool value);
+
+/* Duplicates a file handle FD, while marking the copy to be closed
+   prior to exec or spawn.  Returns -1 and sets errno if FD could not
+   be duplicated.  */
+
+int dup_cloexec (int fd);
diff --git a/gnulib/lib/close-hook.c b/gnulib/lib/close-hook.c
new file mode 100644 (file)
index 0000000..ecc5f46
--- /dev/null
@@ -0,0 +1,91 @@
+/* Hook for making the close() function extensible.
+   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "close-hook.h"
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#undef close
+
+
+/* Currently, this entire code is only needed for the handling of sockets
+   on native Windows platforms.  */
+#if WINDOWS_SOCKETS
+
+/* The first and last link in the doubly linked list.
+   Initially the list is empty.  */
+static struct close_hook anchor = { &anchor, &anchor, NULL };
+
+int
+execute_close_hooks (int fd, const struct close_hook *remaining_list)
+{
+  if (remaining_list == &anchor)
+    /* End of list reached.  */
+    return close (fd);
+  else
+    return remaining_list->private_fn (fd, remaining_list->private_next);
+}
+
+int
+execute_all_close_hooks (int fd)
+{
+  return execute_close_hooks (fd, anchor.private_next);
+}
+
+void
+register_close_hook (close_hook_fn hook, struct close_hook *link)
+{
+  if (link->private_next == NULL && link->private_prev == NULL)
+    {
+      /* Add the link to the doubly linked list.  */
+      link->private_next = anchor.private_next;
+      link->private_prev = &anchor;
+      link->private_fn = hook;
+      anchor.private_next->private_prev = link;
+      anchor.private_next = link;
+    }
+  else
+    {
+      /* The link is already in use.  */
+      if (link->private_fn != hook)
+        abort ();
+    }
+}
+
+void
+unregister_close_hook (struct close_hook *link)
+{
+  struct close_hook *next = link->private_next;
+  struct close_hook *prev = link->private_prev;
+
+  if (next != NULL && prev != NULL)
+    {
+      /* The link is in use.  Remove it from the doubly linked list.  */
+      prev->private_next = next;
+      next->private_prev = prev;
+      /* Clear the link, to mark it unused.  */
+      link->private_next = NULL;
+      link->private_prev = NULL;
+      link->private_fn = NULL;
+    }
+}
+
+#endif
diff --git a/gnulib/lib/close-hook.h b/gnulib/lib/close-hook.h
new file mode 100644 (file)
index 0000000..283bebb
--- /dev/null
@@ -0,0 +1,72 @@
+/* Hook for making the close() function extensible.
+   Copyright (C) 2009-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 CLOSE_HOOK_H
+#define CLOSE_HOOK_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Currently, this entire code is only needed for the handling of sockets
+   on native Windows platforms.  */
+#if WINDOWS_SOCKETS
+
+
+/* An element of the list of close hooks.
+   The fields of this structure are considered private.  */
+struct close_hook
+{
+  /* Doubly linked list.  */
+  struct close_hook *private_next;
+  struct close_hook *private_prev;
+  /* Function that treats the types of FD that it knows about and calls
+     execute_close_hooks (FD, REMAINING_LIST) as a fallback.  */
+  int (*private_fn) (int fd, const struct close_hook *remaining_list);
+};
+
+/* This type of function closes FD, applying special knowledge for the FD
+   types it knows about, and calls execute_close_hooks (FD, REMAINING_LIST)
+   for the other FD types.  */
+typedef int (*close_hook_fn) (int fd, const struct close_hook *remaining_list);
+
+/* Execute the close hooks in REMAINING_LIST.
+   Return 0 or -1, like close() would do.  */
+extern int execute_close_hooks (int fd, const struct close_hook *remaining_list);
+
+/* Execute all close hooks.
+   Return 0 or -1, like close() would do.  */
+extern int execute_all_close_hooks (int fd);
+
+/* Add a function to the list of close hooks.
+   The LINK variable points to a piece of memory which is guaranteed to be
+   accessible until the corresponding call to unregister_close_hook.  */
+extern void register_close_hook (close_hook_fn hook, struct close_hook *link);
+
+/* Removes a function from the list of close hooks.  */
+extern void unregister_close_hook (struct close_hook *link);
+
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CLOSE_HOOK_H */
diff --git a/gnulib/lib/close-stream.c b/gnulib/lib/close-stream.c
new file mode 100644 (file)
index 0000000..8819b58
--- /dev/null
@@ -0,0 +1,78 @@
+/* Close a stream, with nicer error checking than fclose's.
+
+   Copyright (C) 1998-2002, 2004, 2006-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/>.  */
+
+#include <config.h>
+
+#include "close-stream.h"
+
+#include <errno.h>
+#include <stdbool.h>
+
+#include "fpending.h"
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+/* Close STREAM.  Return 0 if successful, EOF (setting errno)
+   otherwise.  A failure might set errno to 0 if the error number
+   cannot be determined.
+
+   A failure with errno set to EPIPE may or may not indicate an error
+   situation worth signaling to the user.  See the documentation of the
+   close_stdout_set_ignore_EPIPE function for details.
+
+   If a program writes *anything* to STREAM, that program should close
+   STREAM and make sure that it succeeds before exiting.  Otherwise,
+   suppose that you go to the extreme of checking the return status
+   of every function that does an explicit write to STREAM.  The last
+   printf can succeed in writing to the internal stream buffer, and yet
+   the fclose(STREAM) could still fail (due e.g., to a disk full error)
+   when it tries to write out that buffered data.  Thus, you would be
+   left with an incomplete output file and the offending program would
+   exit successfully.  Even calling fflush is not always sufficient,
+   since some file systems (NFS and CODA) buffer written/flushed data
+   until an actual close call.
+
+   Besides, it's wasteful to check the return value from every call
+   that writes to STREAM -- just let the internal stream state record
+   the failure.  That's what the ferror test is checking below.  */
+
+int
+close_stream (FILE *stream)
+{
+  const bool some_pending = (__fpending (stream) != 0);
+  const bool prev_fail = (ferror (stream) != 0);
+  const bool fclose_fail = (fclose (stream) != 0);
+
+  /* Return an error indication if there was a previous failure or if
+     fclose failed, with one exception: ignore an fclose failure if
+     there was no previous error, no data remains to be flushed, and
+     fclose failed with EBADF.  That can happen when a program like cp
+     is invoked like this `cp a b >&-' (i.e., with standard output
+     closed) and doesn't generate any output (hence no previous error
+     and nothing to be flushed).  */
+
+  if (prev_fail || (fclose_fail && (some_pending || errno != EBADF)))
+    {
+      if (! fclose_fail)
+        errno = 0;
+      return EOF;
+    }
+
+  return 0;
+}
diff --git a/gnulib/lib/close-stream.h b/gnulib/lib/close-stream.h
new file mode 100644 (file)
index 0000000..be3d419
--- /dev/null
@@ -0,0 +1,2 @@
+#include <stdio.h>
+int close_stream (FILE *stream);
diff --git a/gnulib/lib/close.c b/gnulib/lib/close.c
new file mode 100644 (file)
index 0000000..1c06c16
--- /dev/null
@@ -0,0 +1,42 @@
+/* close replacement.
+   Copyright (C) 2008-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#include "close-hook.h"
+
+/* Override close() to call into other gnulib modules.  */
+
+int
+rpl_close (int fd)
+#undef close
+{
+#if WINDOWS_SOCKETS
+  int retval = execute_all_close_hooks (fd);
+#else
+  int retval = close (fd);
+#endif
+
+#if REPLACE_FCHDIR
+  if (retval >= 0)
+    _gl_unregister_fd (fd);
+#endif
+
+  return retval;
+}
diff --git a/gnulib/lib/closein.c b/gnulib/lib/closein.c
new file mode 100644 (file)
index 0000000..beff8bb
--- /dev/null
@@ -0,0 +1,111 @@
+/* Close standard input, rewinding seekable stdin if necessary.
+
+   Copyright (C) 2007, 2009-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/>.  */
+
+#include <config.h>
+
+#include "closein.h"
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+#include "close-stream.h"
+#include "closeout.h"
+#include "error.h"
+#include "exitfail.h"
+#include "freadahead.h"
+#include "quotearg.h"
+
+static const char *file_name;
+
+/* Set the file name to be reported in the event an error is detected
+   on stdin by close_stdin.  See also close_stdout_set_file_name, if
+   an error is detected when closing stdout.  */
+void
+close_stdin_set_file_name (const char *file)
+{
+  file_name = file;
+}
+
+/* Close standard input, rewinding any unused input if stdin is
+   seekable.  On error, issue a diagnostic and _exit with status
+   'exit_failure'.  Then call close_stdout.
+
+   Most programs can get by with close_stdout.  close_stdin is only
+   needed when a program wants to guarantee that partially read input
+   from seekable stdin is not consumed, for any subsequent clients.
+   For example, POSIX requires that these two commands behave alike:
+
+     (sed -ne 1q; cat) < file
+     tail -n 1 file
+
+   Since close_stdin is commonly registered via 'atexit', POSIX
+   and the C standard both say that it should not call 'exit',
+   because the behavior is undefined if 'exit' is called more than
+   once.  So it calls '_exit' instead of 'exit'.  If close_stdin
+   is registered via atexit before other functions are registered,
+   the other functions can act before this _exit is invoked.
+
+   Applications that use close_stdout should flush any streams other
+   than stdin, stdout, and stderr before exiting, since the call to
+   _exit will bypass other buffer flushing.  Applications should be
+   flushing and closing other streams anyway, to check for I/O errors.
+   Also, applications should not use tmpfile, since _exit can bypass
+   the removal of these files.
+
+   It's important to detect such failures and exit nonzero because many
+   tools (most notably `make' and other build-management systems) depend
+   on being able to detect failure in other tools via their exit status.  */
+
+void
+close_stdin (void)
+{
+  bool fail = false;
+
+  /* There is no need to flush stdin if we can determine quickly that stdin's
+     input buffer is empty; in this case we know that if stdin is seekable,
+     fseeko (stdin, 0, SEEK_CUR) == lseek (0, 0, SEEK_CUR).  */
+  if (freadahead (stdin) > 0)
+    {
+      /* Only attempt flush if stdin is seekable, as fflush is entitled to
+         fail on non-seekable streams.  */
+      if (fseeko (stdin, 0, SEEK_CUR) == 0 && fflush (stdin) != 0)
+        fail = true;
+    }
+  if (close_stream (stdin) != 0)
+    fail = true;
+  if (fail)
+    {
+      /* Report failure, but defer exit until after closing stdout,
+         since the failure report should still be flushed.  */
+      char const *close_error = _("error closing file");
+      if (file_name)
+        error (0, errno, "%s: %s", quotearg_colon (file_name),
+               close_error);
+      else
+        error (0, errno, "%s", close_error);
+    }
+
+  close_stdout ();
+
+  if (fail)
+    _exit (exit_failure);
+}
diff --git a/gnulib/lib/closein.h b/gnulib/lib/closein.h
new file mode 100644 (file)
index 0000000..5e614d5
--- /dev/null
@@ -0,0 +1,32 @@
+/* Close standard input, rewinding seekable stdin if necessary.
+
+   Copyright (C) 2007, 2009-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 _GL_CLOSEIN_H
+# define _GL_CLOSEIN_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+void close_stdin_set_file_name (const char *file);
+void close_stdin (void);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/gnulib/lib/closeout.c b/gnulib/lib/closeout.c
new file mode 100644 (file)
index 0000000..f6cdd3f
--- /dev/null
@@ -0,0 +1,124 @@
+/* Close standard output and standard error, exiting with a diagnostic on error.
+
+   Copyright (C) 1998-2002, 2004, 2006, 2008-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/>.  */
+
+#include <config.h>
+
+#include "closeout.h"
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+#include "close-stream.h"
+#include "error.h"
+#include "exitfail.h"
+#include "quotearg.h"
+
+static const char *file_name;
+
+/* Set the file name to be reported in the event an error is detected
+   by close_stdout.  */
+void
+close_stdout_set_file_name (const char *file)
+{
+  file_name = file;
+}
+
+static bool ignore_EPIPE /* = false */;
+
+/* Specify the reaction to an EPIPE error during the closing of stdout:
+     - If ignore = true, it shall be ignored.
+     - If ignore = false, it shall evoke a diagnostic, along with a nonzero
+       exit status.
+   The default is ignore = false.
+
+   This setting matters only if the SIGPIPE signal is ignored (i.e. its
+   handler set to SIG_IGN) or blocked.  Only particular programs need to
+   temporarily ignore SIGPIPE.  If SIGPIPE is ignored or blocked because
+   it was ignored or blocked in the parent process when it created the
+   child process, it usually is a bug in the parent process: It is bad
+   practice to have SIGPIPE ignored or blocked while creating a child
+   process.
+
+   EPIPE occurs when writing to a pipe or socket that has no readers now,
+   when SIGPIPE is ignored or blocked.
+
+   The ignore = false setting is suitable for a scenario where it is normally
+   guaranteed that the pipe writer terminates before the pipe reader.  In
+   this case, an EPIPE is an indication of a premature termination of the
+   pipe reader and should lead to a diagnostic and a nonzero exit status.
+
+   The ignore = true setting is suitable for a scenario where you don't know
+   ahead of time whether the pipe writer or the pipe reader will terminate
+   first.  In this case, an EPIPE is an indication that the pipe writer can
+   stop doing useless write() calls; this is what close_stdout does anyway.
+   EPIPE is part of the normal pipe/socket shutdown protocol in this case,
+   and should not lead to a diagnostic message.  */
+
+void
+close_stdout_set_ignore_EPIPE (bool ignore)
+{
+  ignore_EPIPE = ignore;
+}
+
+/* Close standard output.  On error, issue a diagnostic and _exit
+   with status 'exit_failure'.
+
+   Also close standard error.  On error, _exit with status 'exit_failure'.
+
+   Since close_stdout is commonly registered via 'atexit', POSIX
+   and the C standard both say that it should not call 'exit',
+   because the behavior is undefined if 'exit' is called more than
+   once.  So it calls '_exit' instead of 'exit'.  If close_stdout
+   is registered via atexit before other functions are registered,
+   the other functions can act before this _exit is invoked.
+
+   Applications that use close_stdout should flush any streams
+   other than stdout and stderr before exiting, since the call to
+   _exit will bypass other buffer flushing.  Applications should
+   be flushing and closing other streams anyway, to check for I/O
+   errors.  Also, applications should not use tmpfile, since _exit
+   can bypass the removal of these files.
+
+   It's important to detect such failures and exit nonzero because many
+   tools (most notably `make' and other build-management systems) depend
+   on being able to detect failure in other tools via their exit status.  */
+
+void
+close_stdout (void)
+{
+  if (close_stream (stdout) != 0
+      && !(ignore_EPIPE && errno == EPIPE))
+    {
+      char const *write_error = _("write error");
+      if (file_name)
+        error (0, errno, "%s: %s", quotearg_colon (file_name),
+               write_error);
+      else
+        error (0, errno, "%s", write_error);
+
+      _exit (exit_failure);
+    }
+
+   if (close_stream (stderr) != 0)
+     _exit (exit_failure);
+}
diff --git a/gnulib/lib/closeout.h b/gnulib/lib/closeout.h
new file mode 100644 (file)
index 0000000..ec8d7a6
--- /dev/null
@@ -0,0 +1,36 @@
+/* Close standard output and standard error.
+
+   Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-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 CLOSEOUT_H
+# define CLOSEOUT_H 1
+
+# include <stdbool.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+void close_stdout_set_file_name (const char *file);
+void close_stdout_set_ignore_EPIPE (bool ignore);
+void close_stdout (void);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/gnulib/lib/config.charset b/gnulib/lib/config.charset
new file mode 100644 (file)
index 0000000..93b5a5d
--- /dev/null
@@ -0,0 +1,683 @@
+#! /bin/sh
+# Output a system dependent table of character encoding aliases.
+#
+#   Copyright (C) 2000-2004, 2006-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, 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, write to the Free Software Foundation,
+#   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The table consists of lines of the form
+#    ALIAS  CANONICAL
+#
+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
+# ALIAS is compared in a case sensitive way.
+#
+# CANONICAL is the GNU canonical name for this character encoding.
+# It must be an encoding supported by libiconv. Support by GNU libc is
+# also desirable. CANONICAL is case insensitive. Usually an upper case
+# MIME charset name is preferred.
+# The current list of GNU canonical charset names is as follows.
+#
+#       name              MIME?             used by which systems
+#   ASCII, ANSI_X3.4-1968       glibc solaris freebsd netbsd darwin cygwin
+#   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+#   ISO-8859-2              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+#   ISO-8859-3              Y   glibc solaris cygwin
+#   ISO-8859-4              Y   osf solaris freebsd netbsd openbsd darwin
+#   ISO-8859-5              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+#   ISO-8859-6              Y   glibc aix hpux solaris cygwin
+#   ISO-8859-7              Y   glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin
+#   ISO-8859-8              Y   glibc aix hpux osf solaris cygwin
+#   ISO-8859-9              Y   glibc aix hpux irix osf solaris darwin cygwin
+#   ISO-8859-13                 glibc netbsd openbsd darwin cygwin
+#   ISO-8859-14                 glibc cygwin
+#   ISO-8859-15                 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin
+#   KOI8-R                  Y   glibc solaris freebsd netbsd openbsd darwin
+#   KOI8-U                  Y   glibc freebsd netbsd openbsd darwin cygwin
+#   KOI8-T                      glibc
+#   CP437                       dos
+#   CP775                       dos
+#   CP850                       aix osf dos
+#   CP852                       dos
+#   CP855                       dos
+#   CP856                       aix
+#   CP857                       dos
+#   CP861                       dos
+#   CP862                       dos
+#   CP864                       dos
+#   CP865                       dos
+#   CP866                       freebsd netbsd openbsd darwin dos
+#   CP869                       dos
+#   CP874                       woe32 dos
+#   CP922                       aix
+#   CP932                       aix cygwin woe32 dos
+#   CP943                       aix
+#   CP949                       osf darwin woe32 dos
+#   CP950                       woe32 dos
+#   CP1046                      aix
+#   CP1124                      aix
+#   CP1125                      dos
+#   CP1129                      aix
+#   CP1131                      darwin
+#   CP1250                      woe32
+#   CP1251                      glibc solaris netbsd openbsd darwin cygwin woe32
+#   CP1252                      aix woe32
+#   CP1253                      woe32
+#   CP1254                      woe32
+#   CP1255                      glibc woe32
+#   CP1256                      woe32
+#   CP1257                      woe32
+#   GB2312                  Y   glibc aix hpux irix solaris freebsd netbsd darwin
+#   EUC-JP                  Y   glibc aix hpux irix osf solaris freebsd netbsd darwin
+#   EUC-KR                  Y   glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
+#   EUC-TW                      glibc aix hpux irix osf solaris netbsd
+#   BIG5                    Y   glibc aix hpux osf solaris freebsd netbsd darwin cygwin
+#   BIG5-HKSCS                  glibc solaris darwin
+#   GBK                         glibc aix osf solaris darwin cygwin woe32 dos
+#   GB18030                     glibc solaris netbsd darwin
+#   SHIFT_JIS               Y   hpux osf solaris freebsd netbsd darwin
+#   JOHAB                       glibc solaris woe32
+#   TIS-620                     glibc aix hpux osf solaris cygwin
+#   VISCII                  Y   glibc
+#   TCVN5712-1                  glibc
+#   ARMSCII-8                   glibc darwin
+#   GEORGIAN-PS                 glibc cygwin
+#   PT154                       glibc
+#   HP-ROMAN8                   hpux
+#   HP-ARABIC8                  hpux
+#   HP-GREEK8                   hpux
+#   HP-HEBREW8                  hpux
+#   HP-TURKISH8                 hpux
+#   HP-KANA8                    hpux
+#   DEC-KANJI                   osf
+#   DEC-HANYU                   osf
+#   UTF-8                   Y   glibc aix hpux osf solaris netbsd darwin cygwin
+#
+# Note: Names which are not marked as being a MIME name should not be used in
+# Internet protocols for information interchange (mail, news, etc.).
+#
+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
+# must understand both names and treat them as equivalent.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+
+host="$1"
+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
+echo "# This file contains a table of character encoding aliases,"
+echo "# suitable for operating system '${os}'."
+echo "# It was automatically generated from config.charset."
+# List of references, updated during installation:
+echo "# Packages using this file: "
+case "$os" in
+  linux-gnulibc1*)
+    # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
+    # localcharset.c falls back to using the full locale name
+    # from the environment variables.
+    echo "C ASCII"
+    echo "POSIX ASCII"
+    for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
+             en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
+             en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
+             es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
+             et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
+             fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
+             it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
+             sv_FI sv_SE; do
+      echo "$l ISO-8859-1"
+      echo "$l.iso-8859-1 ISO-8859-1"
+      echo "$l.iso-8859-15 ISO-8859-15"
+      echo "$l.iso-8859-15@euro ISO-8859-15"
+      echo "$l@euro ISO-8859-15"
+      echo "$l.cp-437 CP437"
+      echo "$l.cp-850 CP850"
+      echo "$l.cp-1252 CP1252"
+      echo "$l.cp-1252@euro CP1252"
+      #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
+      echo "$l.utf-8 UTF-8"
+      echo "$l.utf-8@euro UTF-8"
+    done
+    for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
+             sl_SI sr sr_CS sr_YU; do
+      echo "$l ISO-8859-2"
+      echo "$l.iso-8859-2 ISO-8859-2"
+      echo "$l.cp-852 CP852"
+      echo "$l.cp-1250 CP1250"
+      echo "$l.utf-8 UTF-8"
+    done
+    for l in mk mk_MK ru ru_RU; do
+      echo "$l ISO-8859-5"
+      echo "$l.iso-8859-5 ISO-8859-5"
+      echo "$l.koi8-r KOI8-R"
+      echo "$l.cp-866 CP866"
+      echo "$l.cp-1251 CP1251"
+      echo "$l.utf-8 UTF-8"
+    done
+    for l in ar ar_SA; do
+      echo "$l ISO-8859-6"
+      echo "$l.iso-8859-6 ISO-8859-6"
+      echo "$l.cp-864 CP864"
+      #echo "$l.cp-868 CP868" # not a commonly used encoding
+      echo "$l.cp-1256 CP1256"
+      echo "$l.utf-8 UTF-8"
+    done
+    for l in el el_GR gr gr_GR; do
+      echo "$l ISO-8859-7"
+      echo "$l.iso-8859-7 ISO-8859-7"
+      echo "$l.cp-869 CP869"
+      echo "$l.cp-1253 CP1253"
+      echo "$l.cp-1253@euro CP1253"
+      echo "$l.utf-8 UTF-8"
+      echo "$l.utf-8@euro UTF-8"
+    done
+    for l in he he_IL iw iw_IL; do
+      echo "$l ISO-8859-8"
+      echo "$l.iso-8859-8 ISO-8859-8"
+      echo "$l.cp-862 CP862"
+      echo "$l.cp-1255 CP1255"
+      echo "$l.utf-8 UTF-8"
+    done
+    for l in tr tr_TR; do
+      echo "$l ISO-8859-9"
+      echo "$l.iso-8859-9 ISO-8859-9"
+      echo "$l.cp-857 CP857"
+      echo "$l.cp-1254 CP1254"
+      echo "$l.utf-8 UTF-8"
+    done
+    for l in lt lt_LT lv lv_LV; do
+      #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
+      echo "$l ISO-8859-13"
+    done
+    for l in ru_UA uk uk_UA; do
+      echo "$l KOI8-U"
+    done
+    for l in zh zh_CN; do
+      #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
+      echo "$l GB2312"
+    done
+    for l in ja ja_JP ja_JP.EUC; do
+      echo "$l EUC-JP"
+    done
+    for l in ko ko_KR; do
+      echo "$l EUC-KR"
+    done
+    for l in th th_TH; do
+      echo "$l TIS-620"
+    done
+    for l in fa fa_IR; do
+      #echo "$l ISIRI-3342" # a broken encoding
+      echo "$l.utf-8 UTF-8"
+    done
+    ;;
+  linux* | *-gnu*)
+    # With glibc-2.1 or newer, we don't need any canonicalization,
+    # because glibc has iconv and both glibc and libiconv support all
+    # GNU canonical names directly. Therefore, the Makefile does not
+    # need to install the alias file at all.
+    # The following applies only to glibc-2.0.x and older libcs.
+    echo "ISO_646.IRV:1983 ASCII"
+    ;;
+  aix*)
+    echo "ISO8859-1 ISO-8859-1"
+    echo "ISO8859-2 ISO-8859-2"
+    echo "ISO8859-5 ISO-8859-5"
+    echo "ISO8859-6 ISO-8859-6"
+    echo "ISO8859-7 ISO-8859-7"
+    echo "ISO8859-8 ISO-8859-8"
+    echo "ISO8859-9 ISO-8859-9"
+    echo "ISO8859-15 ISO-8859-15"
+    echo "IBM-850 CP850"
+    echo "IBM-856 CP856"
+    echo "IBM-921 ISO-8859-13"
+    echo "IBM-922 CP922"
+    echo "IBM-932 CP932"
+    echo "IBM-943 CP943"
+    echo "IBM-1046 CP1046"
+    echo "IBM-1124 CP1124"
+    echo "IBM-1129 CP1129"
+    echo "IBM-1252 CP1252"
+    echo "IBM-eucCN GB2312"
+    echo "IBM-eucJP EUC-JP"
+    echo "IBM-eucKR EUC-KR"
+    echo "IBM-eucTW EUC-TW"
+    echo "big5 BIG5"
+    echo "GBK GBK"
+    echo "TIS-620 TIS-620"
+    echo "UTF-8 UTF-8"
+    ;;
+  hpux*)
+    echo "iso88591 ISO-8859-1"
+    echo "iso88592 ISO-8859-2"
+    echo "iso88595 ISO-8859-5"
+    echo "iso88596 ISO-8859-6"
+    echo "iso88597 ISO-8859-7"
+    echo "iso88598 ISO-8859-8"
+    echo "iso88599 ISO-8859-9"
+    echo "iso885915 ISO-8859-15"
+    echo "roman8 HP-ROMAN8"
+    echo "arabic8 HP-ARABIC8"
+    echo "greek8 HP-GREEK8"
+    echo "hebrew8 HP-HEBREW8"
+    echo "turkish8 HP-TURKISH8"
+    echo "kana8 HP-KANA8"
+    echo "tis620 TIS-620"
+    echo "big5 BIG5"
+    echo "eucJP EUC-JP"
+    echo "eucKR EUC-KR"
+    echo "eucTW EUC-TW"
+    echo "hp15CN GB2312"
+    #echo "ccdc ?" # what is this?
+    echo "SJIS SHIFT_JIS"
+    echo "utf8 UTF-8"
+    ;;
+  irix*)
+    echo "ISO8859-1 ISO-8859-1"
+    echo "ISO8859-2 ISO-8859-2"
+    echo "ISO8859-5 ISO-8859-5"
+    echo "ISO8859-7 ISO-8859-7"
+    echo "ISO8859-9 ISO-8859-9"
+    echo "eucCN GB2312"
+    echo "eucJP EUC-JP"
+    echo "eucKR EUC-KR"
+    echo "eucTW EUC-TW"
+    ;;
+  osf*)
+    echo "ISO8859-1 ISO-8859-1"
+    echo "ISO8859-2 ISO-8859-2"
+    echo "ISO8859-4 ISO-8859-4"
+    echo "ISO8859-5 ISO-8859-5"
+    echo "ISO8859-7 ISO-8859-7"
+    echo "ISO8859-8 ISO-8859-8"
+    echo "ISO8859-9 ISO-8859-9"
+    echo "ISO8859-15 ISO-8859-15"
+    echo "cp850 CP850"
+    echo "big5 BIG5"
+    echo "dechanyu DEC-HANYU"
+    echo "dechanzi GB2312"
+    echo "deckanji DEC-KANJI"
+    echo "deckorean EUC-KR"
+    echo "eucJP EUC-JP"
+    echo "eucKR EUC-KR"
+    echo "eucTW EUC-TW"
+    echo "GBK GBK"
+    echo "KSC5601 CP949"
+    echo "sdeckanji EUC-JP"
+    echo "SJIS SHIFT_JIS"
+    echo "TACTIS TIS-620"
+    echo "UTF-8 UTF-8"
+    ;;
+  solaris*)
+    echo "646 ASCII"
+    echo "ISO8859-1 ISO-8859-1"
+    echo "ISO8859-2 ISO-8859-2"
+    echo "ISO8859-3 ISO-8859-3"
+    echo "ISO8859-4 ISO-8859-4"
+    echo "ISO8859-5 ISO-8859-5"
+    echo "ISO8859-6 ISO-8859-6"
+    echo "ISO8859-7 ISO-8859-7"
+    echo "ISO8859-8 ISO-8859-8"
+    echo "ISO8859-9 ISO-8859-9"
+    echo "ISO8859-15 ISO-8859-15"
+    echo "koi8-r KOI8-R"
+    echo "ansi-1251 CP1251"
+    echo "BIG5 BIG5"
+    echo "Big5-HKSCS BIG5-HKSCS"
+    echo "gb2312 GB2312"
+    echo "GBK GBK"
+    echo "GB18030 GB18030"
+    echo "cns11643 EUC-TW"
+    echo "5601 EUC-KR"
+    echo "ko_KR.johap92 JOHAB"
+    echo "eucJP EUC-JP"
+    echo "PCK SHIFT_JIS"
+    echo "TIS620.2533 TIS-620"
+    #echo "sun_eu_greek ?" # what is this?
+    echo "UTF-8 UTF-8"
+    ;;
+  freebsd* | os2*)
+    # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
+    # localcharset.c falls back to using the full locale name
+    # from the environment variables.
+    # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
+    # reuse FreeBSD's locale data for OS/2.
+    echo "C ASCII"
+    echo "US-ASCII ASCII"
+    for l in la_LN lt_LN; do
+      echo "$l.ASCII ASCII"
+    done
+    for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+             fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
+             lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
+      echo "$l.ISO_8859-1 ISO-8859-1"
+      echo "$l.DIS_8859-15 ISO-8859-15"
+    done
+    for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
+      echo "$l.ISO_8859-2 ISO-8859-2"
+    done
+    for l in la_LN lt_LT; do
+      echo "$l.ISO_8859-4 ISO-8859-4"
+    done
+    for l in ru_RU ru_SU; do
+      echo "$l.KOI8-R KOI8-R"
+      echo "$l.ISO_8859-5 ISO-8859-5"
+      echo "$l.CP866 CP866"
+    done
+    echo "uk_UA.KOI8-U KOI8-U"
+    echo "zh_TW.BIG5 BIG5"
+    echo "zh_TW.Big5 BIG5"
+    echo "zh_CN.EUC GB2312"
+    echo "ja_JP.EUC EUC-JP"
+    echo "ja_JP.SJIS SHIFT_JIS"
+    echo "ja_JP.Shift_JIS SHIFT_JIS"
+    echo "ko_KR.EUC EUC-KR"
+    ;;
+  netbsd*)
+    echo "646 ASCII"
+    echo "ISO8859-1 ISO-8859-1"
+    echo "ISO8859-2 ISO-8859-2"
+    echo "ISO8859-4 ISO-8859-4"
+    echo "ISO8859-5 ISO-8859-5"
+    echo "ISO8859-7 ISO-8859-7"
+    echo "ISO8859-13 ISO-8859-13"
+    echo "ISO8859-15 ISO-8859-15"
+    echo "eucCN GB2312"
+    echo "eucJP EUC-JP"
+    echo "eucKR EUC-KR"
+    echo "eucTW EUC-TW"
+    echo "BIG5 BIG5"
+    echo "SJIS SHIFT_JIS"
+    ;;
+  openbsd*)
+    echo "646 ASCII"
+    echo "ISO8859-1 ISO-8859-1"
+    echo "ISO8859-2 ISO-8859-2"
+    echo "ISO8859-4 ISO-8859-4"
+    echo "ISO8859-5 ISO-8859-5"
+    echo "ISO8859-7 ISO-8859-7"
+    echo "ISO8859-13 ISO-8859-13"
+    echo "ISO8859-15 ISO-8859-15"
+    ;;
+  darwin[56]*)
+    # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
+    # localcharset.c falls back to using the full locale name
+    # from the environment variables.
+    echo "C ASCII"
+    for l in en_AU en_CA en_GB en_US la_LN; do
+      echo "$l.US-ASCII ASCII"
+    done
+    for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+             fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
+             nl_NL no_NO pt_PT sv_SE; do
+      echo "$l ISO-8859-1"
+      echo "$l.ISO8859-1 ISO-8859-1"
+      echo "$l.ISO8859-15 ISO-8859-15"
+    done
+    for l in la_LN; do
+      echo "$l.ISO8859-1 ISO-8859-1"
+      echo "$l.ISO8859-15 ISO-8859-15"
+    done
+    for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
+      echo "$l.ISO8859-2 ISO-8859-2"
+    done
+    for l in la_LN lt_LT; do
+      echo "$l.ISO8859-4 ISO-8859-4"
+    done
+    for l in ru_RU; do
+      echo "$l.KOI8-R KOI8-R"
+      echo "$l.ISO8859-5 ISO-8859-5"
+      echo "$l.CP866 CP866"
+    done
+    for l in bg_BG; do
+      echo "$l.CP1251 CP1251"
+    done
+    echo "uk_UA.KOI8-U KOI8-U"
+    echo "zh_TW.BIG5 BIG5"
+    echo "zh_TW.Big5 BIG5"
+    echo "zh_CN.EUC GB2312"
+    echo "ja_JP.EUC EUC-JP"
+    echo "ja_JP.SJIS SHIFT_JIS"
+    echo "ko_KR.EUC EUC-KR"
+    ;;
+  darwin*)
+    # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
+    # useless:
+    # - It returns the empty string when LANG is set to a locale of the
+    #   form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
+    #   LC_CTYPE file.
+    # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
+    #   the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
+    # - The documentation says:
+    #     "... all code that calls BSD system routines should ensure
+    #      that the const *char parameters of these routines are in UTF-8
+    #      encoding. All BSD system functions expect their string
+    #      parameters to be in UTF-8 encoding and nothing else."
+    #   It also says
+    #     "An additional caveat is that string parameters for files,
+    #      paths, and other file-system entities must be in canonical
+    #      UTF-8. In a canonical UTF-8 Unicode string, all decomposable
+    #      characters are decomposed ..."
+    #   but this is not true: You can pass non-decomposed UTF-8 strings
+    #   to file system functions, and it is the OS which will convert
+    #   them to decomposed UTF-8 before accessing the file system.
+    # - The Apple Terminal application displays UTF-8 by default.
+    # - However, other applications are free to use different encodings:
+    #   - xterm uses ISO-8859-1 by default.
+    #   - TextEdit uses MacRoman by default.
+    # We prefer UTF-8 over decomposed UTF-8-MAC because one should
+    # minimize the use of decomposed Unicode. Unfortunately, through the
+    # Darwin file system, decomposed UTF-8 strings are leaked into user
+    # space nevertheless.
+    # Then there are also the locales with encodings other than US-ASCII
+    # and UTF-8. These locales can be occasionally useful to users (e.g.
+    # when grepping through ISO-8859-1 encoded text files), when all their
+    # file names are in US-ASCII.
+    echo "ISO8859-1 ISO-8859-1"
+    echo "ISO8859-2 ISO-8859-2"
+    echo "ISO8859-4 ISO-8859-4"
+    echo "ISO8859-5 ISO-8859-5"
+    echo "ISO8859-7 ISO-8859-7"
+    echo "ISO8859-9 ISO-8859-9"
+    echo "ISO8859-13 ISO-8859-13"
+    echo "ISO8859-15 ISO-8859-15"
+    echo "KOI8-R KOI8-R"
+    echo "KOI8-U KOI8-U"
+    echo "CP866 CP866"
+    echo "CP949 CP949"
+    echo "CP1131 CP1131"
+    echo "CP1251 CP1251"
+    echo "eucCN GB2312"
+    echo "GB2312 GB2312"
+    echo "eucJP EUC-JP"
+    echo "eucKR EUC-KR"
+    echo "Big5 BIG5"
+    echo "Big5HKSCS BIG5-HKSCS"
+    echo "GBK GBK"
+    echo "GB18030 GB18030"
+    echo "SJIS SHIFT_JIS"
+    echo "ARMSCII-8 ARMSCII-8"
+    echo "PT154 PT154"
+    #echo "ISCII-DEV ?"
+    echo "* UTF-8"
+    ;;
+  beos* | haiku*)
+    # BeOS and Haiku have a single locale, and it has UTF-8 encoding.
+    echo "* UTF-8"
+    ;;
+  msdosdjgpp*)
+    # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
+    # localcharset.c falls back to using the full locale name
+    # from the environment variables.
+    echo "#"
+    echo "# The encodings given here may not all be correct."
+    echo "# If you find that the encoding given for your language and"
+    echo "# country is not the one your DOS machine actually uses, just"
+    echo "# correct it in this file, and send a mail to"
+    echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
+    echo "# and Bruno Haible <bruno@clisp.org>."
+    echo "#"
+    echo "C ASCII"
+    # ISO-8859-1 languages
+    echo "ca CP850"
+    echo "ca_ES CP850"
+    echo "da CP865"    # not CP850 ??
+    echo "da_DK CP865" # not CP850 ??
+    echo "de CP850"
+    echo "de_AT CP850"
+    echo "de_CH CP850"
+    echo "de_DE CP850"
+    echo "en CP850"
+    echo "en_AU CP850" # not CP437 ??
+    echo "en_CA CP850"
+    echo "en_GB CP850"
+    echo "en_NZ CP437"
+    echo "en_US CP437"
+    echo "en_ZA CP850" # not CP437 ??
+    echo "es CP850"
+    echo "es_AR CP850"
+    echo "es_BO CP850"
+    echo "es_CL CP850"
+    echo "es_CO CP850"
+    echo "es_CR CP850"
+    echo "es_CU CP850"
+    echo "es_DO CP850"
+    echo "es_EC CP850"
+    echo "es_ES CP850"
+    echo "es_GT CP850"
+    echo "es_HN CP850"
+    echo "es_MX CP850"
+    echo "es_NI CP850"
+    echo "es_PA CP850"
+    echo "es_PY CP850"
+    echo "es_PE CP850"
+    echo "es_SV CP850"
+    echo "es_UY CP850"
+    echo "es_VE CP850"
+    echo "et CP850"
+    echo "et_EE CP850"
+    echo "eu CP850"
+    echo "eu_ES CP850"
+    echo "fi CP850"
+    echo "fi_FI CP850"
+    echo "fr CP850"
+    echo "fr_BE CP850"
+    echo "fr_CA CP850"
+    echo "fr_CH CP850"
+    echo "fr_FR CP850"
+    echo "ga CP850"
+    echo "ga_IE CP850"
+    echo "gd CP850"
+    echo "gd_GB CP850"
+    echo "gl CP850"
+    echo "gl_ES CP850"
+    echo "id CP850"    # not CP437 ??
+    echo "id_ID CP850" # not CP437 ??
+    echo "is CP861"    # not CP850 ??
+    echo "is_IS CP861" # not CP850 ??
+    echo "it CP850"
+    echo "it_CH CP850"
+    echo "it_IT CP850"
+    echo "lt CP775"
+    echo "lt_LT CP775"
+    echo "lv CP775"
+    echo "lv_LV CP775"
+    echo "nb CP865"    # not CP850 ??
+    echo "nb_NO CP865" # not CP850 ??
+    echo "nl CP850"
+    echo "nl_BE CP850"
+    echo "nl_NL CP850"
+    echo "nn CP865"    # not CP850 ??
+    echo "nn_NO CP865" # not CP850 ??
+    echo "no CP865"    # not CP850 ??
+    echo "no_NO CP865" # not CP850 ??
+    echo "pt CP850"
+    echo "pt_BR CP850"
+    echo "pt_PT CP850"
+    echo "sv CP850"
+    echo "sv_SE CP850"
+    # ISO-8859-2 languages
+    echo "cs CP852"
+    echo "cs_CZ CP852"
+    echo "hr CP852"
+    echo "hr_HR CP852"
+    echo "hu CP852"
+    echo "hu_HU CP852"
+    echo "pl CP852"
+    echo "pl_PL CP852"
+    echo "ro CP852"
+    echo "ro_RO CP852"
+    echo "sk CP852"
+    echo "sk_SK CP852"
+    echo "sl CP852"
+    echo "sl_SI CP852"
+    echo "sq CP852"
+    echo "sq_AL CP852"
+    echo "sr CP852"    # CP852 or CP866 or CP855 ??
+    echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
+    echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
+    # ISO-8859-3 languages
+    echo "mt CP850"
+    echo "mt_MT CP850"
+    # ISO-8859-5 languages
+    echo "be CP866"
+    echo "be_BE CP866"
+    echo "bg CP866"    # not CP855 ??
+    echo "bg_BG CP866" # not CP855 ??
+    echo "mk CP866"    # not CP855 ??
+    echo "mk_MK CP866" # not CP855 ??
+    echo "ru CP866"
+    echo "ru_RU CP866"
+    echo "uk CP1125"
+    echo "uk_UA CP1125"
+    # ISO-8859-6 languages
+    echo "ar CP864"
+    echo "ar_AE CP864"
+    echo "ar_DZ CP864"
+    echo "ar_EG CP864"
+    echo "ar_IQ CP864"
+    echo "ar_IR CP864"
+    echo "ar_JO CP864"
+    echo "ar_KW CP864"
+    echo "ar_MA CP864"
+    echo "ar_OM CP864"
+    echo "ar_QA CP864"
+    echo "ar_SA CP864"
+    echo "ar_SY CP864"
+    # ISO-8859-7 languages
+    echo "el CP869"
+    echo "el_GR CP869"
+    # ISO-8859-8 languages
+    echo "he CP862"
+    echo "he_IL CP862"
+    # ISO-8859-9 languages
+    echo "tr CP857"
+    echo "tr_TR CP857"
+    # Japanese
+    echo "ja CP932"
+    echo "ja_JP CP932"
+    # Chinese
+    echo "zh_CN GBK"
+    echo "zh_TW CP950" # not CP938 ??
+    # Korean
+    echo "kr CP949"    # not CP934 ??
+    echo "kr_KR CP949" # not CP934 ??
+    # Thai
+    echo "th CP874"
+    echo "th_TH CP874"
+    # Other
+    echo "eo CP850"
+    echo "eo_EO CP850"
+    ;;
+esac
diff --git a/gnulib/lib/creat-safer.c b/gnulib/lib/creat-safer.c
new file mode 100644 (file)
index 0000000..2a6916d
--- /dev/null
@@ -0,0 +1,31 @@
+/* Invoke creat, but avoid some glitches.
+
+   Copyright (C) 2005-2006, 2009-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 Jim Meyering.  */
+
+#include <config.h>
+
+#include "fcntl-safer.h"
+
+#include <fcntl.h>
+#include "unistd-safer.h"
+
+int
+creat_safer (char const *file, mode_t mode)
+{
+  return fd_safer (creat (file, mode));
+}
diff --git a/gnulib/lib/ctype.in.h b/gnulib/lib/ctype.in.h
new file mode 100644 (file)
index 0000000..648c1f4
--- /dev/null
@@ -0,0 +1,58 @@
+/* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete.
+
+   Copyright (C) 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Bruno Haible.  */
+
+/*
+ * ISO C 99 <ctype.h> for platforms on which it is incomplete.
+ * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/ctype.h.html>
+ */
+
+#ifndef _GL_CTYPE_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* Include the original <ctype.h>.  */
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_CTYPE_H@
+
+#ifndef _GL_CTYPE_H
+#define _GL_CTYPE_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* Return non-zero if c is a blank, i.e. a space or tab character.  */
+#if @GNULIB_ISBLANK@
+# if !@HAVE_ISBLANK@
+_GL_EXTERN_C int isblank (int c);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef isblank
+# if HAVE_RAW_DECL_ISBLANK
+_GL_WARN_ON_USE (isblank, "isblank is unportable - "
+                 "use gnulib module isblank for portability");
+# endif
+#endif
+
+#endif /* _GL_CTYPE_H */
+#endif /* _GL_CTYPE_H */
diff --git a/gnulib/lib/cycle-check.c b/gnulib/lib/cycle-check.c
new file mode 100644 (file)
index 0000000..3b48a9d
--- /dev/null
@@ -0,0 +1,85 @@
+/* help detect directory cycles efficiently
+
+   Copyright (C) 2003-2006, 2009-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 Jim Meyering */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+
+#include <stdbool.h>
+
+#include "cycle-check.h"
+
+#define CC_MAGIC 9827862
+
+/* Return true if I is a power of 2, or is zero.  */
+
+static inline bool
+is_zero_or_power_of_two (uintmax_t i)
+{
+  return (i & (i - 1)) == 0;
+}
+
+void
+cycle_check_init (struct cycle_check_state *state)
+{
+  state->chdir_counter = 0;
+  state->magic = CC_MAGIC;
+}
+
+/* In traversing a directory hierarchy, call this function once for each
+   descending chdir call, with SB corresponding to the chdir operand.
+   If SB corresponds to a directory that has already been seen,
+   return true to indicate that there is a directory cycle.
+   Note that this is done `lazily', which means that some of
+   the directories in the cycle may be processed twice before
+   the cycle is detected.  */
+
+bool
+cycle_check (struct cycle_check_state *state, struct stat const *sb)
+{
+  assert (state->magic == CC_MAGIC);
+
+  /* If the current directory ever happens to be the same
+     as the one we last recorded for the cycle detection,
+     then it's obviously part of a cycle.  */
+  if (state->chdir_counter && SAME_INODE (*sb, state->dev_ino))
+    return true;
+
+  /* If the number of `descending' chdir calls is a power of two,
+     record the dev/ino of the current directory.  */
+  if (is_zero_or_power_of_two (++(state->chdir_counter)))
+    {
+      /* On all architectures that we know about, if the counter
+         overflows then there is a directory cycle here somewhere,
+         even if we haven't detected it yet.  Typically this happens
+         only after the counter is incremented 2**64 times, so it's a
+         fairly theoretical point.  */
+      if (state->chdir_counter == 0)
+        return true;
+
+      state->dev_ino.st_dev = sb->st_dev;
+      state->dev_ino.st_ino = sb->st_ino;
+    }
+
+  return false;
+}
diff --git a/gnulib/lib/cycle-check.h b/gnulib/lib/cycle-check.h
new file mode 100644 (file)
index 0000000..064710e
--- /dev/null
@@ -0,0 +1,52 @@
+/* help detect directory cycles efficiently
+
+   Copyright (C) 2003-2004, 2006, 2009-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 Jim Meyering */
+
+#ifndef CYCLE_CHECK_H
+# define CYCLE_CHECK_H 1
+
+# include <stdint.h>
+# include <stdbool.h>
+# include "dev-ino.h"
+# include "same-inode.h"
+
+struct cycle_check_state
+{
+  struct dev_ino dev_ino;
+  uintmax_t chdir_counter;
+  int magic;
+};
+
+void cycle_check_init (struct cycle_check_state *state);
+bool cycle_check (struct cycle_check_state *state, struct stat const *sb);
+
+# define CYCLE_CHECK_REFLECT_CHDIR_UP(State, SB_dir, SB_subdir) \
+  do                                                            \
+    {                                                           \
+      /* You must call cycle_check at least once before using this macro.  */ \
+      if ((State)->chdir_counter == 0)                          \
+        abort ();                                               \
+      if (SAME_INODE ((State)->dev_ino, SB_subdir))             \
+        {                                                       \
+          (State)->dev_ino.st_dev = (SB_dir).st_dev;            \
+          (State)->dev_ino.st_ino = (SB_dir).st_ino;            \
+        }                                                       \
+    }                                                           \
+  while (0)
+
+#endif
diff --git a/gnulib/lib/dev-ino.h b/gnulib/lib/dev-ino.h
new file mode 100644 (file)
index 0000000..695d38c
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef DEV_INO_H
+# define DEV_INO_H 1
+
+# include <sys/types.h>
+# include <sys/stat.h>
+
+struct dev_ino
+{
+  ino_t st_ino;
+  dev_t st_dev;
+};
+
+#endif
diff --git a/gnulib/lib/dirent--.h b/gnulib/lib/dirent--.h
new file mode 100644 (file)
index 0000000..bb20132
--- /dev/null
@@ -0,0 +1,23 @@
+/* Like dirent.h, but redefine some names to avoid glitches.
+
+   Copyright (C) 2009-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 Eric Blake.  */
+
+#include "dirent-safer.h"
+
+#undef opendir
+#define opendir opendir_safer
diff --git a/gnulib/lib/dirent-safer.h b/gnulib/lib/dirent-safer.h
new file mode 100644 (file)
index 0000000..1a0499e
--- /dev/null
@@ -0,0 +1,22 @@
+/* Invoke dirent-like functions, but avoid some glitches.
+
+   Copyright (C) 2009-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 Eric Blake.  */
+
+#include <dirent.h>
+
+DIR *opendir_safer (const char *name);
diff --git a/gnulib/lib/dirent.in.h b/gnulib/lib/dirent.in.h
new file mode 100644 (file)
index 0000000..e1e734f
--- /dev/null
@@ -0,0 +1,172 @@
+/* A GNU-like <dirent.h>.
+   Copyright (C) 2006-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 _GL_DIRENT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_DIRENT_H@
+
+#ifndef _GL_DIRENT_H
+#define _GL_DIRENT_H
+
+/* Get ino_t.  Needed on some systems, including glibc 2.8.  */
+#include <sys/types.h>
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
+/* Declare overridden functions.  */
+
+#if @REPLACE_CLOSEDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  define closedir rpl_closedir
+# endif
+_GL_FUNCDECL_RPL (closedir, int, (DIR *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (closedir, int, (DIR *));
+#else
+_GL_CXXALIAS_SYS (closedir, int, (DIR *));
+#endif
+_GL_CXXALIASWARN (closedir);
+
+#if @GNULIB_DIRFD@
+/* Return the file descriptor associated with the given directory stream,
+   or -1 if none exists.  */
+# if @REPLACE_DIRFD@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dirfd
+#   define dirfd rpl_dirfd
+#  endif
+_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (dirfd, int, (DIR *));
+# else
+#  if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd
+    /* dirfd is defined as a macro and not as a function.
+       Turn it into a function and get rid of the macro.  */
+static inline int (dirfd) (DIR *dp) { return dirfd (dp); }
+#   undef dirfd
+#  endif
+#  if !(@HAVE_DECL_DIRFD@ || defined dirfd)
+_GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (dirfd, int, (DIR *));
+# endif
+_GL_CXXALIASWARN (dirfd);
+#elif defined GNULIB_POSIXCHECK
+# undef dirfd
+# if HAVE_RAW_DECL_DIRFD
+_GL_WARN_ON_USE (dirfd, "dirfd is unportable - "
+                 "use gnulib module dirfd for portability");
+# endif
+#endif
+
+#if @GNULIB_FDOPENDIR@
+/* Open a directory stream visiting the given directory file
+   descriptor.  Return NULL and set errno if fd is not visiting a
+   directory.  On success, this function consumes fd (it will be
+   implicitly closed either by this function or by a subsequent
+   closedir).  */
+# if @REPLACE_FDOPENDIR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fdopendir
+#   define fdopendir rpl_fdopendir
+#  endif
+_GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd));
+_GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd));
+# else
+#  if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@
+_GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd));
+#  endif
+_GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd));
+# endif
+_GL_CXXALIASWARN (fdopendir);
+#elif defined GNULIB_POSIXCHECK
+# undef fdopendir
+# if HAVE_RAW_DECL_FDOPENDIR
+_GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - "
+                 "use gnulib module fdopendir for portability");
+# endif
+#endif
+
+#if @REPLACE_OPENDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  define opendir rpl_opendir
+# endif
+_GL_FUNCDECL_RPL (opendir, DIR *, (const char *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (opendir, DIR *, (const char *));
+#else
+_GL_CXXALIAS_SYS (opendir, DIR *, (const char *));
+#endif
+_GL_CXXALIASWARN (opendir);
+
+#if @GNULIB_SCANDIR@
+/* Scan the directory DIR, calling FILTER on each directory entry.
+   Entries for which FILTER returns nonzero are individually malloc'd,
+   sorted using qsort with CMP, and collected in a malloc'd array in
+   *NAMELIST.  Returns the number of entries selected, or -1 on error.  */
+# if !@HAVE_SCANDIR@
+_GL_FUNCDECL_SYS (scandir, int,
+                  (const char *dir, struct dirent ***namelist,
+                   int (*filter) (const struct dirent *),
+                   int (*cmp) (const struct dirent **, const struct dirent **))
+                  _GL_ARG_NONNULL ((1, 2, 4)));
+# endif
+/* Need to cast, because on glibc systems, the fourth parameter is
+                        int (*cmp) (const void *, const void *).  */
+_GL_CXXALIAS_SYS_CAST (scandir, int,
+                       (const char *dir, struct dirent ***namelist,
+                        int (*filter) (const struct dirent *),
+                        int (*cmp) (const struct dirent **, const struct dirent **)));
+_GL_CXXALIASWARN (scandir);
+#elif defined GNULIB_POSIXCHECK
+# undef scandir
+# if HAVE_RAW_DECL_SCANDIR
+_GL_WARN_ON_USE (scandir, "scandir is unportable - "
+                 "use gnulib module scandir for portability");
+# endif
+#endif
+
+#if @GNULIB_ALPHASORT@
+/* Compare two 'struct dirent' entries alphabetically.  */
+# if !@HAVE_ALPHASORT@
+_GL_FUNCDECL_SYS (alphasort, int,
+                  (const struct dirent **, const struct dirent **)
+                  _GL_ARG_NONNULL ((1, 2)));
+# endif
+/* Need to cast, because on glibc systems, the parameters are
+                       (const void *, const void *).  */
+_GL_CXXALIAS_SYS_CAST (alphasort, int,
+                       (const struct dirent **, const struct dirent **));
+_GL_CXXALIASWARN (alphasort);
+#elif defined GNULIB_POSIXCHECK
+# undef alphasort
+# if HAVE_RAW_DECL_ALPHASORT
+_GL_WARN_ON_USE (alphasort, "alphasort is unportable - "
+                 "use gnulib module alphasort for portability");
+# endif
+#endif
+
+
+#endif /* _GL_DIRENT_H */
+#endif /* _GL_DIRENT_H */
diff --git a/gnulib/lib/dirfd.c b/gnulib/lib/dirfd.c
new file mode 100644 (file)
index 0000000..5f1a70e
--- /dev/null
@@ -0,0 +1,32 @@
+/* dirfd.c -- return the file descriptor associated with an open DIR*
+
+   Copyright (C) 2001, 2006, 2008-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 Jim Meyering. */
+
+#include <config.h>
+
+#include <dirent.h>
+#include <errno.h>
+
+int
+dirfd (DIR *dir_p)
+{
+  int fd = DIR_TO_FD (dir_p);
+  if (fd == -1)
+    errno = ENOTSUP;
+  return fd;
+}
diff --git a/gnulib/lib/dirname-lgpl.c b/gnulib/lib/dirname-lgpl.c
new file mode 100644 (file)
index 0000000..f5b0c0f
--- /dev/null
@@ -0,0 +1,86 @@
+/* dirname.c -- return all but the last element in a file name
+
+   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-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/>.  */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+/* Return the length of the prefix of FILE that will be used by
+   dir_name.  If FILE is in the working directory, this returns zero
+   even though `dir_name (FILE)' will return ".".  Works properly even
+   if there are trailing slashes (by effectively ignoring them).  */
+
+size_t
+dir_len (char const *file)
+{
+  size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file);
+  size_t length;
+
+  /* Advance prefix_length beyond important leading slashes.  */
+  prefix_length += (prefix_length != 0
+                    ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+                       && ISSLASH (file[prefix_length]))
+                    : (ISSLASH (file[0])
+                       ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT
+                           && ISSLASH (file[1]) && ! ISSLASH (file[2])
+                           ? 2 : 1))
+                       : 0));
+
+  /* Strip the basename and any redundant slashes before it.  */
+  for (length = last_component (file) - file;
+       prefix_length < length; length--)
+    if (! ISSLASH (file[length - 1]))
+      break;
+  return length;
+}
+
+
+/* In general, we can't use the builtin `dirname' function if available,
+   since it has different meanings in different environments.
+   In some environments the builtin `dirname' modifies its argument.
+
+   Return the leading directories part of FILE, allocated with malloc.
+   Works properly even if there are trailing slashes (by effectively
+   ignoring them).  Return NULL on failure.
+
+   If lstat (FILE) would succeed, then { chdir (dir_name (FILE));
+   lstat (base_name (FILE)); } will access the same file.  Likewise,
+   if the sequence { chdir (dir_name (FILE));
+   rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE
+   to "foo" in the same directory FILE was in.  */
+
+char *
+mdir_name (char const *file)
+{
+  size_t length = dir_len (file);
+  bool append_dot = (length == 0
+                     || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+                         && length == FILE_SYSTEM_PREFIX_LEN (file)
+                         && file[2] != '\0' && ! ISSLASH (file[2])));
+  char *dir = malloc (length + append_dot + 1);
+  if (!dir)
+    return NULL;
+  memcpy (dir, file, length);
+  if (append_dot)
+    dir[length++] = '.';
+  dir[length] = '\0';
+  return dir;
+}
diff --git a/gnulib/lib/dirname.c b/gnulib/lib/dirname.c
new file mode 100644 (file)
index 0000000..411ded3
--- /dev/null
@@ -0,0 +1,38 @@
+/* dirname.c -- return all but the last element in a file name
+
+   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-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/>.  */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include "xalloc.h"
+
+/* Just like mdir_name (dirname-lgpl.c), except, rather than
+   returning NULL upon malloc failure, here, we report the
+   "memory exhausted" condition and exit.  */
+
+char *
+dir_name (char const *file)
+{
+  char *result = mdir_name (file);
+  if (!result)
+    xalloc_die ();
+  return result;
+}
diff --git a/gnulib/lib/dirname.h b/gnulib/lib/dirname.h
new file mode 100644 (file)
index 0000000..2ef9882
--- /dev/null
@@ -0,0 +1,46 @@
+/*  Take file names apart into directory and base names.
+
+    Copyright (C) 1998, 2001, 2003-2006, 2009-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 DIRNAME_H_
+# define DIRNAME_H_ 1
+
+# include <stdbool.h>
+# include <stddef.h>
+# include "dosname.h"
+
+# ifndef DIRECTORY_SEPARATOR
+#  define DIRECTORY_SEPARATOR '/'
+# endif
+
+# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
+#  define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
+# endif
+
+# if GNULIB_DIRNAME
+char *base_name (char const *file);
+char *dir_name (char const *file);
+# endif
+
+char *mdir_name (char const *file);
+size_t base_len (char const *file);
+size_t dir_len (char const *file);
+char *last_component (char const *file);
+
+bool strip_trailing_slashes (char *file);
+
+#endif /* not DIRNAME_H_ */
diff --git a/gnulib/lib/dosname.h b/gnulib/lib/dosname.h
new file mode 100644 (file)
index 0000000..acdd03b
--- /dev/null
@@ -0,0 +1,53 @@
+/* File names on MS-DOS/Windows systems.
+
+   Copyright (C) 2000-2001, 2004-2006, 2009-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/>.
+
+   From Paul Eggert and Jim Meyering.  */
+
+#ifndef _DOSNAME_H
+#define _DOSNAME_H
+
+#if (defined _WIN32 || defined __WIN32__ ||     \
+     defined __MSDOS__ || defined __CYGWIN__ || \
+     defined __EMX__ || defined __DJGPP__)
+   /* This internal macro assumes ASCII, but all hosts that support drive
+      letters use ASCII.  */
+# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a'  \
+                              <= 'z' - 'a')
+# define FILE_SYSTEM_PREFIX_LEN(Filename) \
+          (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
+# ifndef __CYGWIN__
+#  define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1
+# endif
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
+# define ISSLASH(C) ((C) == '/')
+#endif
+
+#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
+#endif
+
+#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+#  define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
+# else
+#  define IS_ABSOLUTE_FILE_NAME(F)                              \
+     (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0)
+#endif
+#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
+
+#endif /* DOSNAME_H_ */
diff --git a/gnulib/lib/dup-safer.c b/gnulib/lib/dup-safer.c
new file mode 100644 (file)
index 0000000..5441b96
--- /dev/null
@@ -0,0 +1,34 @@
+/* Invoke dup, but avoid some glitches.
+
+   Copyright (C) 2001, 2004-2006, 2009-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 Paul Eggert.  */
+
+#include <config.h>
+
+#include "unistd-safer.h"
+
+#include <fcntl.h>
+#include <unistd.h>
+
+/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
+   STDERR_FILENO.  */
+
+int
+dup_safer (int fd)
+{
+  return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
+}
diff --git a/gnulib/lib/dup2.c b/gnulib/lib/dup2.c
new file mode 100644 (file)
index 0000000..e00dc7b
--- /dev/null
@@ -0,0 +1,132 @@
+/* Duplicate an open file descriptor to a specified file descriptor.
+
+   Copyright (C) 1999, 2004-2007, 2009-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 Paul Eggert */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#include <errno.h>
+#include <fcntl.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions.  */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#if HAVE_DUP2
+
+# undef dup2
+
+int
+rpl_dup2 (int fd, int desired_fd)
+{
+  int result;
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* If fd is closed, mingw hangs on dup2 (fd, fd).  If fd is open,
+     dup2 (fd, fd) returns 0, but all further attempts to use fd in
+     future dup2 calls will hang.  */
+  if (fd == desired_fd)
+    {
+      if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE)
+        {
+          errno = EBADF;
+          return -1;
+        }
+      return fd;
+    }
+  /* Wine 1.0.1 return 0 when desired_fd is negative but not -1:
+     http://bugs.winehq.org/show_bug.cgi?id=21289 */
+  if (desired_fd < 0)
+    {
+      errno = EBADF;
+      return -1;
+    }
+# elif !defined __linux__
+  /* On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC.  */
+  if (fd == desired_fd)
+    return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
+# endif
+  result = dup2 (fd, desired_fd);
+# ifdef __linux__
+  /* Correct a Linux return value.
+     <http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.30.y.git;a=commitdiff;h=2b79bc4f7ebbd5af3c8b867968f9f15602d5f802>
+   */
+  if (fd == desired_fd && result == (unsigned int) -EBADF)
+    {
+      errno = EBADF;
+      result = -1;
+    }
+# endif
+  if (result == 0)
+    result = desired_fd;
+  /* Correct a cygwin 1.5.x errno value.  */
+  else if (result == -1 && errno == EMFILE)
+    errno = EBADF;
+# if REPLACE_FCHDIR
+  if (fd != desired_fd && result != -1)
+    result = _gl_register_dup (fd, result);
+# endif
+  return result;
+}
+
+#else /* !HAVE_DUP2 */
+
+/* On older platforms, dup2 did not exist.  */
+
+# ifndef F_DUPFD
+static int
+dupfd (int fd, int desired_fd)
+{
+  int duplicated_fd = dup (fd);
+  if (duplicated_fd < 0 || duplicated_fd == desired_fd)
+    return duplicated_fd;
+  else
+    {
+      int r = dupfd (fd, desired_fd);
+      int e = errno;
+      close (duplicated_fd);
+      errno = e;
+      return r;
+    }
+}
+# endif
+
+int
+dup2 (int fd, int desired_fd)
+{
+  int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd;
+  if (result == -1 || fd == desired_fd)
+    return result;
+  close (desired_fd);
+# ifdef F_DUPFD
+  result = fcntl (fd, F_DUPFD, desired_fd);
+#  if REPLACE_FCHDIR
+  if (0 <= result)
+    result = _gl_register_dup (fd, result);
+#  endif
+# else
+  result = dupfd (fd, desired_fd);
+# endif
+  if (result == -1 && (errno == EMFILE || errno == EINVAL))
+    errno = EBADF;
+  return result;
+}
+#endif /* !HAVE_DUP2 */
diff --git a/gnulib/lib/errno.in.h b/gnulib/lib/errno.in.h
new file mode 100644 (file)
index 0000000..a91f591
--- /dev/null
@@ -0,0 +1,167 @@
+/* A POSIX-like <errno.h>.
+
+   Copyright (C) 2008-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _GL_ERRNO_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
+
+#ifndef _GL_ERRNO_H
+#define _GL_ERRNO_H
+
+
+/* On native Windows platforms, many macros are not defined.  */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* POSIX says that EAGAIN and EWOULDBLOCK may have the same value.  */
+#  define EWOULDBLOCK     EAGAIN
+
+/* Values >= 100 seem safe to use.  */
+#  define ETXTBSY   100
+#  define GNULIB_defined_ETXTBSY 1
+
+/* These are intentionally the same values as the WSA* error numbers, defined
+   in <winsock2.h>.  */
+#  define EINPROGRESS     10036
+#  define EALREADY        10037
+#  define ENOTSOCK        10038
+#  define EDESTADDRREQ    10039
+#  define EMSGSIZE        10040
+#  define EPROTOTYPE      10041
+#  define ENOPROTOOPT     10042
+#  define EPROTONOSUPPORT 10043
+#  define ESOCKTNOSUPPORT 10044  /* not required by POSIX */
+#  define EOPNOTSUPP      10045
+#  define EPFNOSUPPORT    10046  /* not required by POSIX */
+#  define EAFNOSUPPORT    10047
+#  define EADDRINUSE      10048
+#  define EADDRNOTAVAIL   10049
+#  define ENETDOWN        10050
+#  define ENETUNREACH     10051
+#  define ENETRESET       10052
+#  define ECONNABORTED    10053
+#  define ECONNRESET      10054
+#  define ENOBUFS         10055
+#  define EISCONN         10056
+#  define ENOTCONN        10057
+#  define ESHUTDOWN       10058  /* not required by POSIX */
+#  define ETOOMANYREFS    10059  /* not required by POSIX */
+#  define ETIMEDOUT       10060
+#  define ECONNREFUSED    10061
+#  define ELOOP           10062
+#  define EHOSTDOWN       10064  /* not required by POSIX */
+#  define EHOSTUNREACH    10065
+#  define EPROCLIM        10067  /* not required by POSIX */
+#  define EUSERS          10068  /* not required by POSIX */
+#  define EDQUOT          10069
+#  define ESTALE          10070
+#  define EREMOTE         10071  /* not required by POSIX */
+#  define GNULIB_defined_ESOCK 1
+
+# endif
+
+
+/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
+   EMULTIHOP, ENOLINK, EOVERFLOW are not defined.  */
+# if @EMULTIHOP_HIDDEN@
+#  define EMULTIHOP @EMULTIHOP_VALUE@
+#  define GNULIB_defined_EMULTIHOP 1
+# endif
+# if @ENOLINK_HIDDEN@
+#  define ENOLINK   @ENOLINK_VALUE@
+#  define GNULIB_defined_ENOLINK 1
+# endif
+# if @EOVERFLOW_HIDDEN@
+#  define EOVERFLOW @EOVERFLOW_VALUE@
+#  define GNULIB_defined_EOVERFLOW 1
+# endif
+
+
+/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
+   EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
+   Likewise, on NonStop Kernel, EDQUOT is not defined.
+   Define them here.  Values >= 2000 seem safe to use: Solaris ESTALE = 151,
+   HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
+
+   Note: When one of these systems defines some of these macros some day,
+   binaries will have to be recompiled so that they recognizes the new
+   errno values from the system.  */
+
+# ifndef ENOMSG
+#  define ENOMSG    2000
+#  define GNULIB_defined_ENOMSG 1
+# endif
+
+# ifndef EIDRM
+#  define EIDRM     2001
+#  define GNULIB_defined_EIDRM 1
+# endif
+
+# ifndef ENOLINK
+#  define ENOLINK   2002
+#  define GNULIB_defined_ENOLINK 1
+# endif
+
+# ifndef EPROTO
+#  define EPROTO    2003
+#  define GNULIB_defined_EPROTO 1
+# endif
+
+# ifndef EMULTIHOP
+#  define EMULTIHOP 2004
+#  define GNULIB_defined_EMULTIHOP 1
+# endif
+
+# ifndef EBADMSG
+#  define EBADMSG   2005
+#  define GNULIB_defined_EBADMSG 1
+# endif
+
+# ifndef EOVERFLOW
+#  define EOVERFLOW 2006
+#  define GNULIB_defined_EOVERFLOW 1
+# endif
+
+# ifndef ENOTSUP
+#  define ENOTSUP   2007
+#  define GNULIB_defined_ENOTSUP 1
+# endif
+
+# ifndef ESTALE
+#  define ESTALE    2009
+#  define GNULIB_defined_ESTALE 1
+# endif
+
+# ifndef EDQUOT
+#  define EDQUOT 2010
+#  define GNULIB_defined_EDQUOT 1
+# endif
+
+# ifndef ECANCELED
+#  define ECANCELED 2008
+#  define GNULIB_defined_ECANCELED 1
+# endif
+
+
+#endif /* _GL_ERRNO_H */
+#endif /* _GL_ERRNO_H */
diff --git a/gnulib/lib/error.c b/gnulib/lib/error.c
new file mode 100644 (file)
index 0000000..a2d1c1b
--- /dev/null
@@ -0,0 +1,394 @@
+/* Error handler for noninteractive utilities
+   Copyright (C) 1990-1998, 2000-2007, 2009-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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 David MacKenzie <djm@gnu.ai.mit.edu>.  */
+
+#if !_LIBC
+# include <config.h>
+#endif
+
+#include "error.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !_LIBC && ENABLE_NLS
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+# include <stdbool.h>
+# include <stdint.h>
+# include <wchar.h>
+# define mbsrtowcs __mbsrtowcs
+#endif
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+#ifndef _
+# define _(String) String
+#endif
+
+/* If NULL, error will flush stdout, then print on stderr the program
+   name, a colon and a space.  Otherwise, error will call this
+   function without parameters instead.  */
+void (*error_print_progname) (void);
+
+/* This variable is incremented each time `error' is called.  */
+unsigned int error_message_count;
+
+#ifdef _LIBC
+/* In the GNU C library, there is a predefined variable for this.  */
+
+# define program_name program_invocation_name
+# include <errno.h>
+# include <limits.h>
+# include <libio/libioP.h>
+
+/* In GNU libc we want do not want to use the common name `error' directly.
+   Instead make it a weak alias.  */
+extern void __error (int status, int errnum, const char *message, ...)
+     __attribute__ ((__format__ (__printf__, 3, 4)));
+extern void __error_at_line (int status, int errnum, const char *file_name,
+                             unsigned int line_number, const char *message,
+                             ...)
+     __attribute__ ((__format__ (__printf__, 5, 6)));;
+# define error __error
+# define error_at_line __error_at_line
+
+# include <libio/iolibio.h>
+# define fflush(s) INTUSE(_IO_fflush) (s)
+# undef putc
+# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
+
+# include <bits/libc-lock.h>
+
+#else /* not _LIBC */
+
+# include <fcntl.h>
+# include <unistd.h>
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions.  */
+#  define WIN32_LEAN_AND_MEAN
+#  include <windows.h>
+# endif
+
+/* The gnulib override of fcntl is not needed in this file.  */
+# undef fcntl
+
+# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
+#  ifndef HAVE_DECL_STRERROR_R
+"this configure-time declaration test was not run"
+#  endif
+char *strerror_r ();
+# endif
+
+/* The calling program should define program_name and set it to the
+   name of the executing program.  */
+extern char *program_name;
+
+# if HAVE_STRERROR_R || defined strerror_r
+#  define __strerror_r strerror_r
+# endif /* HAVE_STRERROR_R || defined strerror_r */
+#endif  /* not _LIBC */
+
+#if !_LIBC
+/* Return non-zero if FD is open.  */
+static inline int
+is_open (int fd)
+{
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* On Win32: The initial state of unassigned standard file descriptors is
+     that they are open but point to an INVALID_HANDLE_VALUE.  There is no
+     fcntl, and the gnulib replacement fcntl does not support F_GETFL.  */
+  return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+# else
+#  ifndef F_GETFL
+#   error Please port fcntl to your platform
+#  endif
+  return 0 <= fcntl (fd, F_GETFL);
+# endif
+}
+#endif
+
+static inline void
+flush_stdout (void)
+{
+#if !_LIBC
+  int stdout_fd;
+
+# if GNULIB_FREOPEN_SAFER
+  /* Use of gnulib's freopen-safer module normally ensures that
+       fileno (stdout) == 1
+     whenever stdout is open.  */
+  stdout_fd = STDOUT_FILENO;
+# else
+  /* POSIX states that fileno (stdout) after fclose is unspecified.  But in
+     practice it is not a problem, because stdout is statically allocated and
+     the fd of a FILE stream is stored as a field in its allocated memory.  */
+  stdout_fd = fileno (stdout);
+# endif
+  /* POSIX states that fflush (stdout) after fclose is unspecified; it
+     is safe in glibc, but not on all other platforms.  fflush (NULL)
+     is always defined, but too draconian.  */
+  if (0 <= stdout_fd && is_open (stdout_fd))
+#endif
+    fflush (stdout);
+}
+
+static void
+print_errno_message (int errnum)
+{
+  char const *s;
+
+#if defined HAVE_STRERROR_R || _LIBC
+  char errbuf[1024];
+# if STRERROR_R_CHAR_P || _LIBC
+  s = __strerror_r (errnum, errbuf, sizeof errbuf);
+# else
+  if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
+    s = errbuf;
+  else
+    s = 0;
+# endif
+#else
+  s = strerror (errnum);
+#endif
+
+#if !_LIBC
+  if (! s)
+    s = _("Unknown system error");
+#endif
+
+#if _LIBC
+  __fxprintf (NULL, ": %s", s);
+#else
+  fprintf (stderr, ": %s", s);
+#endif
+}
+
+static void
+error_tail (int status, int errnum, const char *message, va_list args)
+{
+#if _LIBC
+  if (_IO_fwide (stderr, 0) > 0)
+    {
+# define ALLOCA_LIMIT 2000
+      size_t len = strlen (message) + 1;
+      wchar_t *wmessage = NULL;
+      mbstate_t st;
+      size_t res;
+      const char *tmp;
+      bool use_malloc = false;
+
+      while (1)
+        {
+          if (__libc_use_alloca (len * sizeof (wchar_t)))
+            wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
+          else
+            {
+              if (!use_malloc)
+                wmessage = NULL;
+
+              wchar_t *p = (wchar_t *) realloc (wmessage,
+                                                len * sizeof (wchar_t));
+              if (p == NULL)
+                {
+                  free (wmessage);
+                  fputws_unlocked (L"out of memory\n", stderr);
+                  return;
+                }
+              wmessage = p;
+              use_malloc = true;
+            }
+
+          memset (&st, '\0', sizeof (st));
+          tmp = message;
+
+          res = mbsrtowcs (wmessage, &tmp, len, &st);
+          if (res != len)
+            break;
+
+          if (__builtin_expect (len >= SIZE_MAX / 2, 0))
+            {
+              /* This really should not happen if everything is fine.  */
+              res = (size_t) -1;
+              break;
+            }
+
+          len *= 2;
+        }
+
+      if (res == (size_t) -1)
+        {
+          /* The string cannot be converted.  */
+          if (use_malloc)
+            {
+              free (wmessage);
+              use_malloc = false;
+            }
+          wmessage = (wchar_t *) L"???";
+        }
+
+      __vfwprintf (stderr, wmessage, args);
+
+      if (use_malloc)
+        free (wmessage);
+    }
+  else
+#endif
+    vfprintf (stderr, message, args);
+  va_end (args);
+
+  ++error_message_count;
+  if (errnum)
+    print_errno_message (errnum);
+#if _LIBC
+  __fxprintf (NULL, "\n");
+#else
+  putc ('\n', stderr);
+#endif
+  fflush (stderr);
+  if (status)
+    exit (status);
+}
+
+
+/* Print the program name and error message MESSAGE, which is a printf-style
+   format string with optional args.
+   If ERRNUM is nonzero, print its corresponding system error message.
+   Exit with status STATUS if it is nonzero.  */
+void
+error (int status, int errnum, const char *message, ...)
+{
+  va_list args;
+
+#if defined _LIBC && defined __libc_ptf_call
+  /* We do not want this call to be cut short by a thread
+     cancellation.  Therefore disable cancellation for now.  */
+  int state = PTHREAD_CANCEL_ENABLE;
+  __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+                   0);
+#endif
+
+  flush_stdout ();
+#ifdef _LIBC
+  _IO_flockfile (stderr);
+#endif
+  if (error_print_progname)
+    (*error_print_progname) ();
+  else
+    {
+#if _LIBC
+      __fxprintf (NULL, "%s: ", program_name);
+#else
+      fprintf (stderr, "%s: ", program_name);
+#endif
+    }
+
+  va_start (args, message);
+  error_tail (status, errnum, message, args);
+
+#ifdef _LIBC
+  _IO_funlockfile (stderr);
+# ifdef __libc_ptf_call
+  __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+# endif
+#endif
+}
+\f
+/* Sometimes we want to have at most one error per line.  This
+   variable controls whether this mode is selected or not.  */
+int error_one_per_line;
+
+void
+error_at_line (int status, int errnum, const char *file_name,
+               unsigned int line_number, const char *message, ...)
+{
+  va_list args;
+
+  if (error_one_per_line)
+    {
+      static const char *old_file_name;
+      static unsigned int old_line_number;
+
+      if (old_line_number == line_number
+          && (file_name == old_file_name
+              || strcmp (old_file_name, file_name) == 0))
+        /* Simply return and print nothing.  */
+        return;
+
+      old_file_name = file_name;
+      old_line_number = line_number;
+    }
+
+#if defined _LIBC && defined __libc_ptf_call
+  /* We do not want this call to be cut short by a thread
+     cancellation.  Therefore disable cancellation for now.  */
+  int state = PTHREAD_CANCEL_ENABLE;
+  __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+                   0);
+#endif
+
+  flush_stdout ();
+#ifdef _LIBC
+  _IO_flockfile (stderr);
+#endif
+  if (error_print_progname)
+    (*error_print_progname) ();
+  else
+    {
+#if _LIBC
+      __fxprintf (NULL, "%s:", program_name);
+#else
+      fprintf (stderr, "%s:", program_name);
+#endif
+    }
+
+#if _LIBC
+  __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
+              file_name, line_number);
+#else
+  fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
+           file_name, line_number);
+#endif
+
+  va_start (args, message);
+  error_tail (status, errnum, message, args);
+
+#ifdef _LIBC
+  _IO_funlockfile (stderr);
+# ifdef __libc_ptf_call
+  __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+# endif
+#endif
+}
+
+#ifdef _LIBC
+/* Make the weak alias.  */
+# undef error
+# undef error_at_line
+weak_alias (__error, error)
+weak_alias (__error_at_line, error_at_line)
+#endif
diff --git a/gnulib/lib/error.h b/gnulib/lib/error.h
new file mode 100644 (file)
index 0000000..80f81bc
--- /dev/null
@@ -0,0 +1,65 @@
+/* Declaration for error-reporting function
+   Copyright (C) 1995-1997, 2003, 2006, 2008-2011 Free Software Foundation,
+   Inc.
+   This file is part of the GNU C Library.
+
+   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 _ERROR_H
+#define _ERROR_H 1
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The __-protected variants of the attributes 'format' and 'printf' are
+   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
+   gnulib and libintl do '#define printf __printf__' when they override
+   the 'printf' function.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#else
+# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Print a message with `fprintf (stderr, FORMAT, ...)';
+   if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+   If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
+
+extern void error (int __status, int __errnum, const char *__format, ...)
+     _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4));
+
+extern void error_at_line (int __status, int __errnum, const char *__fname,
+                           unsigned int __lineno, const char *__format, ...)
+     _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6));
+
+/* If NULL, error will flush stdout, then print on stderr the program
+   name, a colon and a space.  Otherwise, error will call this
+   function without parameters instead.  */
+extern void (*error_print_progname) (void);
+
+/* This variable is incremented each time `error' is called.  */
+extern unsigned int error_message_count;
+
+/* Sometimes we want to have at most one error per line.  This
+   variable controls whether this mode is selected or not.  */
+extern int error_one_per_line;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* error.h */
diff --git a/gnulib/lib/euidaccess.c b/gnulib/lib/euidaccess.c
new file mode 100644 (file)
index 0000000..101f975
--- /dev/null
@@ -0,0 +1,222 @@
+/* euidaccess -- check if effective user id can access file
+
+   Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2011 Free
+   Software Foundation, Inc.
+
+   This file is part of the GNU C Library.
+
+   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 David MacKenzie and Torbjorn Granlund.
+   Adapted for GNU C library by Roland McGrath.  */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#if HAVE_LIBGEN_H
+# include <libgen.h>
+#endif
+
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(val) errno = (val)
+#endif
+
+#if defined EACCES && !defined EACCESS
+# define EACCESS EACCES
+#endif
+
+#ifndef F_OK
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+#endif
+
+
+#ifdef _LIBC
+
+# define access __access
+# define getuid __getuid
+# define getgid __getgid
+# define geteuid __geteuid
+# define getegid __getegid
+# define group_member __group_member
+# define euidaccess __euidaccess
+# undef stat
+# define stat stat64
+
+#else
+
+# include "group-member.h"
+
+#endif
+
+/* Return 0 if the user has permission of type MODE on FILE;
+   otherwise, return -1 and set `errno'.
+   Like access, except that it uses the effective user and group
+   id's instead of the real ones, and it does not always check for read-only
+   file system, text busy, etc.  */
+
+int
+euidaccess (const char *file, int mode)
+{
+#if HAVE_FACCESSAT                      /* glibc */
+  return faccessat (AT_FDCWD, file, mode, AT_EACCESS);
+#elif defined EFF_ONLY_OK               /* IRIX, OSF/1, Interix */
+  return access (file, mode | EFF_ONLY_OK);
+#elif defined ACC_SELF                  /* AIX */
+  return accessx (file, mode, ACC_SELF);
+#elif HAVE_EACCESS                      /* FreeBSD */
+  return eaccess (file, mode);
+#else       /* MacOS X, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, mingw, BeOS */
+
+  uid_t uid = getuid ();
+  gid_t gid = getgid ();
+  uid_t euid = geteuid ();
+  gid_t egid = getegid ();
+  struct stat stats;
+
+# if HAVE_DECL_SETREGID && PREFER_NONREENTRANT_EUIDACCESS
+
+  /* Define PREFER_NONREENTRANT_EUIDACCESS if you prefer euidaccess to
+     return the correct result even if this would make it
+     nonreentrant.  Define this only if your entire application is
+     safe even if the uid or gid might temporarily change.  If your
+     application uses signal handlers or threads it is probably not
+     safe.  */
+
+  if (mode == F_OK)
+    return stat (file, &stats);
+  else
+    {
+      int result;
+      int saved_errno;
+
+      if (uid != euid)
+        setreuid (euid, uid);
+      if (gid != egid)
+        setregid (egid, gid);
+
+      result = access (file, mode);
+      saved_errno = errno;
+
+      /* Restore them.  */
+      if (uid != euid)
+        setreuid (uid, euid);
+      if (gid != egid)
+        setregid (gid, egid);
+
+      errno = saved_errno;
+      return result;
+    }
+
+# else
+
+  /* The following code assumes the traditional Unix model, and is not
+     correct on systems that have ACLs or the like.  However, it's
+     better than nothing, and it is reentrant.  */
+
+  unsigned int granted;
+  if (uid == euid && gid == egid)
+    /* If we are not set-uid or set-gid, access does the same.  */
+    return access (file, mode);
+
+  if (stat (file, &stats) != 0)
+    return -1;
+
+  /* The super-user can read and write any file, and execute any file
+     that anyone can execute.  */
+  if (euid == 0 && ((mode & X_OK) == 0
+                    || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))))
+    return 0;
+
+  /* Convert the mode to traditional form, clearing any bogus bits.  */
+  if (R_OK == 4 && W_OK == 2 && X_OK == 1 && F_OK == 0)
+    mode &= 7;
+  else
+    mode = ((mode & R_OK ? 4 : 0)
+            + (mode & W_OK ? 2 : 0)
+            + (mode & X_OK ? 1 : 0));
+
+  if (mode == 0)
+    return 0;                   /* The file exists.  */
+
+  /* Convert the file's permission bits to traditional form.  */
+  if (S_IRUSR == (4 << 6) && S_IWUSR == (2 << 6) && S_IXUSR == (1 << 6)
+      && S_IRGRP == (4 << 3) && S_IWGRP == (2 << 3) && S_IXGRP == (1 << 3)
+      && S_IROTH == (4 << 0) && S_IWOTH == (2 << 0) && S_IXOTH == (1 << 0))
+    granted = stats.st_mode;
+  else
+    granted = ((stats.st_mode & S_IRUSR ? 4 << 6 : 0)
+               + (stats.st_mode & S_IWUSR ? 2 << 6 : 0)
+               + (stats.st_mode & S_IXUSR ? 1 << 6 : 0)
+               + (stats.st_mode & S_IRGRP ? 4 << 3 : 0)
+               + (stats.st_mode & S_IWGRP ? 2 << 3 : 0)
+               + (stats.st_mode & S_IXGRP ? 1 << 3 : 0)
+               + (stats.st_mode & S_IROTH ? 4 << 0 : 0)
+               + (stats.st_mode & S_IWOTH ? 2 << 0 : 0)
+               + (stats.st_mode & S_IXOTH ? 1 << 0 : 0));
+
+  if (euid == stats.st_uid)
+    granted >>= 6;
+  else if (egid == stats.st_gid || group_member (stats.st_gid))
+    granted >>= 3;
+
+  if ((mode & ~granted) == 0)
+    return 0;
+  __set_errno (EACCESS);
+  return -1;
+
+# endif
+#endif
+}
+#undef euidaccess
+#ifdef weak_alias
+weak_alias (__euidaccess, euidaccess)
+#endif
+\f
+#ifdef TEST
+# include <error.h>
+# include <stdio.h>
+# include <stdlib.h>
+
+char *program_name;
+
+int
+main (int argc, char **argv)
+{
+  char *file;
+  int mode;
+  int err;
+
+  program_name = argv[0];
+  if (argc < 3)
+    abort ();
+  file = argv[1];
+  mode = atoi (argv[2]);
+
+  err = euidaccess (file, mode);
+  printf ("%d\n", err);
+  if (err != 0)
+    error (0, errno, "%s", file);
+  exit (0);
+}
+#endif
diff --git a/gnulib/lib/exitfail.c b/gnulib/lib/exitfail.c
new file mode 100644 (file)
index 0000000..953aa02
--- /dev/null
@@ -0,0 +1,24 @@
+/* Failure exit status
+
+   Copyright (C) 2002-2003, 2005-2007, 2009-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/>.  */
+
+#include <config.h>
+
+#include "exitfail.h"
+
+#include <stdlib.h>
+
+int volatile exit_failure = EXIT_FAILURE;
diff --git a/gnulib/lib/exitfail.h b/gnulib/lib/exitfail.h
new file mode 100644 (file)
index 0000000..6d01d4f
--- /dev/null
@@ -0,0 +1,18 @@
+/* Failure exit status
+
+   Copyright (C) 2002, 2009-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/>.  */
+
+extern int volatile exit_failure;
diff --git a/gnulib/lib/faccessat.c b/gnulib/lib/faccessat.c
new file mode 100644 (file)
index 0000000..3ba9fee
--- /dev/null
@@ -0,0 +1,44 @@
+/* Check the access rights of a file relative to an open directory.
+   Copyright (C) 2009-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 Eric Blake */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#ifndef HAVE_ACCESS
+/* Mingw lacks access, but it also lacks real vs. effective ids, so
+   the gnulib euidaccess module is good enough.  */
+# undef access
+# define access euidaccess
+#endif
+
+/* Invoke access or euidaccess on file, FILE, using mode MODE, in the directory
+   open on descriptor FD.  If possible, do it without changing the
+   working directory.  Otherwise, resort to using save_cwd/fchdir, then
+   (access|euidaccess)/restore_cwd.  If either the save_cwd or the
+   restore_cwd fails, then give a diagnostic and exit nonzero.
+   Note that this implementation only supports AT_EACCESS, although some
+   native versions also support AT_SYMLINK_NOFOLLOW.  */
+
+#define AT_FUNC_NAME faccessat
+#define AT_FUNC_F1 euidaccess
+#define AT_FUNC_F2 access
+#define AT_FUNC_USE_F1_COND AT_EACCESS
+#define AT_FUNC_POST_FILE_PARAM_DECLS , int mode, int flag
+#define AT_FUNC_POST_FILE_ARGS        , mode
+#include "at-func.c"
diff --git a/gnulib/lib/fchdir.c b/gnulib/lib/fchdir.c
new file mode 100644 (file)
index 0000000..94c4e71
--- /dev/null
@@ -0,0 +1,287 @@
+/* fchdir replacement.
+   Copyright (C) 2006-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#include <assert.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifndef REPLACE_OPEN_DIRECTORY
+# define REPLACE_OPEN_DIRECTORY 0
+#endif
+
+#ifndef HAVE_CANONICALIZE_FILE_NAME
+# if GNULIB_CANONICALIZE || GNULIB_CANONICALIZE_LGPL
+#  define HAVE_CANONICALIZE_FILE_NAME 1
+# else
+#  define HAVE_CANONICALIZE_FILE_NAME 0
+#  define canonicalize_file_name(name) NULL
+# endif
+#endif
+
+/* This replacement assumes that a directory is not renamed while opened
+   through a file descriptor.
+
+   FIXME: On mingw, this would be possible to enforce if we were to
+   also open a HANDLE to each directory currently visited by a file
+   descriptor, since mingw refuses to rename any in-use file system
+   object.  */
+
+/* Array of file descriptors opened.  If REPLACE_OPEN_DIRECTORY or if it points
+   to a directory, it stores info about this directory.  */
+typedef struct
+{
+  char *name;       /* Absolute name of the directory, or NULL.  */
+  /* FIXME - add a DIR* member to make dirfd possible on mingw?  */
+} dir_info_t;
+static dir_info_t *dirs;
+static size_t dirs_allocated;
+
+/* Try to ensure dirs has enough room for a slot at index fd; free any
+   contents already in that slot.  Return false and set errno to
+   ENOMEM on allocation failure.  */
+static bool
+ensure_dirs_slot (size_t fd)
+{
+  if (fd < dirs_allocated)
+    free (dirs[fd].name);
+  else
+    {
+      size_t new_allocated;
+      dir_info_t *new_dirs;
+
+      new_allocated = 2 * dirs_allocated + 1;
+      if (new_allocated <= fd)
+        new_allocated = fd + 1;
+      new_dirs =
+        (dirs != NULL
+         ? (dir_info_t *) realloc (dirs, new_allocated * sizeof *dirs)
+         : (dir_info_t *) malloc (new_allocated * sizeof *dirs));
+      if (new_dirs == NULL)
+        return false;
+      memset (new_dirs + dirs_allocated, 0,
+              (new_allocated - dirs_allocated) * sizeof *dirs);
+      dirs = new_dirs;
+      dirs_allocated = new_allocated;
+    }
+  return true;
+}
+
+/* Return the canonical name of DIR in malloc'd storage.  */
+static char *
+get_name (char const *dir)
+{
+  char *result;
+  if (REPLACE_OPEN_DIRECTORY || !HAVE_CANONICALIZE_FILE_NAME)
+    {
+      /* The function canonicalize_file_name has not yet been ported
+         to mingw, with all its drive letter and backslash quirks.
+         Fortunately, getcwd is reliable in this case, but we ensure
+         we can get back to where we started before using it.  Treat
+         "." as a special case, as it is frequently encountered.  */
+      char *cwd = getcwd (NULL, 0);
+      int saved_errno;
+      if (dir[0] == '.' && dir[1] == '\0')
+        return cwd;
+      if (chdir (cwd))
+        return NULL;
+      result = chdir (dir) ? NULL : getcwd (NULL, 0);
+      saved_errno = errno;
+      if (chdir (cwd))
+        abort ();
+      free (cwd);
+      errno = saved_errno;
+    }
+  else
+    {
+      /* Avoid changing the directory.  */
+      result = canonicalize_file_name (dir);
+    }
+  return result;
+}
+
+/* Hook into the gnulib replacements for open() and close() to keep track
+   of the open file descriptors.  */
+
+/* Close FD, cleaning up any fd to name mapping if fd was visiting a
+   directory.  */
+void
+_gl_unregister_fd (int fd)
+{
+  if (fd >= 0 && fd < dirs_allocated)
+    {
+      free (dirs[fd].name);
+      dirs[fd].name = NULL;
+    }
+}
+
+/* Mark FD as visiting FILENAME.  FD must be non-negative, and refer
+   to an open file descriptor.  If REPLACE_OPEN_DIRECTORY is non-zero,
+   this should only be called if FD is visiting a directory.  Close FD
+   and return -1 if there is insufficient memory to track the
+   directory name; otherwise return FD.  */
+int
+_gl_register_fd (int fd, const char *filename)
+{
+  struct stat statbuf;
+
+  assert (0 <= fd);
+  if (REPLACE_OPEN_DIRECTORY
+      || (fstat (fd, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)))
+    {
+      if (!ensure_dirs_slot (fd)
+          || (dirs[fd].name = get_name (filename)) == NULL)
+        {
+          int saved_errno = errno;
+          close (fd);
+          errno = saved_errno;
+          return -1;
+        }
+    }
+  return fd;
+}
+
+/* Mark NEWFD as a duplicate of OLDFD; useful from dup, dup2, dup3,
+   and fcntl.  Both arguments must be valid and distinct file
+   descriptors.  Close NEWFD and return -1 if OLDFD is tracking a
+   directory, but there is insufficient memory to track the same
+   directory in NEWFD; otherwise return NEWFD.  */
+int
+_gl_register_dup (int oldfd, int newfd)
+{
+  assert (0 <= oldfd && 0 <= newfd && oldfd != newfd);
+  if (oldfd < dirs_allocated && dirs[oldfd].name)
+    {
+      /* Duplicated a directory; must ensure newfd is allocated.  */
+      if (!ensure_dirs_slot (newfd)
+          || (dirs[newfd].name = strdup (dirs[oldfd].name)) == NULL)
+        {
+          int saved_errno = errno;
+          close (newfd);
+          errno = saved_errno;
+          newfd = -1;
+        }
+    }
+  else if (newfd < dirs_allocated)
+    {
+      /* Duplicated a non-directory; ensure newfd is cleared.  */
+      free (dirs[newfd].name);
+      dirs[newfd].name = NULL;
+    }
+  return newfd;
+}
+
+/* If FD is currently visiting a directory, then return the name of
+   that directory.  Otherwise, return NULL and set errno.  */
+const char *
+_gl_directory_name (int fd)
+{
+  if (0 <= fd && fd < dirs_allocated && dirs[fd].name != NULL)
+    return dirs[fd].name;
+  /* At this point, fd is either invalid, or open but not a directory.
+     If dup2 fails, errno is correctly EBADF.  */
+  if (0 <= fd)
+    {
+      if (dup2 (fd, fd) == fd)
+        errno = ENOTDIR;
+    }
+  else
+    errno = EBADF;
+  return NULL;
+}
+
+#if REPLACE_OPEN_DIRECTORY
+/* Return stat information about FD in STATBUF.  Needed when
+   rpl_open() used a dummy file to work around an open() that can't
+   normally visit directories.  */
+# undef fstat
+int
+rpl_fstat (int fd, struct stat *statbuf)
+{
+  if (0 <= fd && fd < dirs_allocated && dirs[fd].name != NULL)
+    return stat (dirs[fd].name, statbuf);
+  return fstat (fd, statbuf);
+}
+#endif
+
+/* Override opendir() and closedir(), to keep track of the open file
+   descriptors.  Needed because there is a function dirfd().  */
+
+int
+rpl_closedir (DIR *dp)
+#undef closedir
+{
+  int fd = dirfd (dp);
+  int retval = closedir (dp);
+
+  if (retval >= 0)
+    _gl_unregister_fd (fd);
+  return retval;
+}
+
+DIR *
+rpl_opendir (const char *filename)
+#undef opendir
+{
+  DIR *dp;
+
+  dp = opendir (filename);
+  if (dp != NULL)
+    {
+      int fd = dirfd (dp);
+      if (0 <= fd && _gl_register_fd (fd, filename) != fd)
+        {
+          int saved_errno = errno;
+          closedir (dp);
+          errno = saved_errno;
+          return NULL;
+        }
+    }
+  return dp;
+}
+
+/* Override dup(), to keep track of open file descriptors.  */
+
+int
+rpl_dup (int oldfd)
+#undef dup
+{
+  int newfd = dup (oldfd);
+
+  if (0 <= newfd)
+    newfd = _gl_register_dup (oldfd, newfd);
+  return newfd;
+}
+
+
+/* Implement fchdir() in terms of chdir().  */
+
+int
+fchdir (int fd)
+{
+  const char *name = _gl_directory_name (fd);
+  return name ? chdir (name) : -1;
+}
diff --git a/gnulib/lib/fchmodat.c b/gnulib/lib/fchmodat.c
new file mode 100644 (file)
index 0000000..18fc4df
--- /dev/null
@@ -0,0 +1,53 @@
+/* Change the protections of file relative to an open directory.
+   Copyright (C) 2006, 2009-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 Jim Meyering */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include <errno.h>
+
+#ifndef HAVE_LCHMOD
+/* Use a different name, to avoid conflicting with any
+   system-supplied declaration.  */
+# undef lchmod
+# define lchmod lchmod_rpl
+static int
+lchmod (char const *f _GL_UNUSED, mode_t m _GL_UNUSED)
+{
+  errno = ENOSYS;
+  return -1;
+}
+#endif
+
+/* Solaris 10 has no function like this.
+   Invoke chmod or lchmod on file, FILE, using mode MODE, in the directory
+   open on descriptor FD.  If possible, do it without changing the
+   working directory.  Otherwise, resort to using save_cwd/fchdir,
+   then (chmod|lchmod)/restore_cwd.  If either the save_cwd or the
+   restore_cwd fails, then give a diagnostic and exit nonzero.
+   Note that an attempt to use a FLAG value of AT_SYMLINK_NOFOLLOW
+   on a system without lchmod support causes this function to fail.  */
+
+#define AT_FUNC_NAME fchmodat
+#define AT_FUNC_F1 lchmod
+#define AT_FUNC_F2 chmod
+#define AT_FUNC_USE_F1_COND AT_SYMLINK_NOFOLLOW
+#define AT_FUNC_POST_FILE_PARAM_DECLS , mode_t mode, int flag
+#define AT_FUNC_POST_FILE_ARGS        , mode
+#include "at-func.c"
diff --git a/gnulib/lib/fchown-stub.c b/gnulib/lib/fchown-stub.c
new file mode 100644 (file)
index 0000000..6be750b
--- /dev/null
@@ -0,0 +1,16 @@
+#include <config.h>
+
+#include <sys/types.h>
+#include <errno.h>
+
+/* A trivial substitute for `fchown'.
+
+   DJGPP 2.03 and earlier (and perhaps later) don't have `fchown',
+   so we pretend no-one has permission for this operation. */
+
+int
+fchown (int fd, uid_t uid, gid_t gid)
+{
+  errno = EPERM;
+  return -1;
+}
diff --git a/gnulib/lib/fchownat.c b/gnulib/lib/fchownat.c
new file mode 100644 (file)
index 0000000..303d0fd
--- /dev/null
@@ -0,0 +1,114 @@
+/* This function serves as replacement for a missing fchownat function,
+   as well as a work around for the fchownat bug in glibc-2.4:
+    <http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html>
+   when the buggy fchownat-with-AT_SYMLINK_NOFOLLOW operates on a symlink, it
+   mistakenly affects the symlink referent, rather than the symlink itself.
+
+   Copyright (C) 2006-2007, 2009-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 Jim Meyering */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <errno.h>
+#include <string.h>
+
+#include "openat.h"
+
+#if !HAVE_FCHOWNAT
+
+/* Replacement for Solaris' function by the same name.
+   Invoke chown or lchown on file, FILE, using OWNER and GROUP, in the
+   directory open on descriptor FD.  If FLAG is AT_SYMLINK_NOFOLLOW, then
+   use lchown, otherwise, use chown.  If possible, do it without changing
+   the working directory.  Otherwise, resort to using save_cwd/fchdir,
+   then (chown|lchown)/restore_cwd.  If either the save_cwd or the
+   restore_cwd fails, then give a diagnostic and exit nonzero.  */
+
+# define AT_FUNC_NAME fchownat
+# define AT_FUNC_F1 lchown
+# define AT_FUNC_F2 chown
+# define AT_FUNC_USE_F1_COND AT_SYMLINK_NOFOLLOW
+# define AT_FUNC_POST_FILE_PARAM_DECLS , uid_t owner, gid_t group, int flag
+# define AT_FUNC_POST_FILE_ARGS        , owner, group
+# include "at-func.c"
+# undef AT_FUNC_NAME
+# undef AT_FUNC_F1
+# undef AT_FUNC_F2
+# undef AT_FUNC_USE_F1_COND
+# undef AT_FUNC_POST_FILE_PARAM_DECLS
+# undef AT_FUNC_POST_FILE_ARGS
+
+#else /* HAVE_FCHOWNAT */
+
+# undef fchownat
+
+# if FCHOWNAT_NOFOLLOW_BUG
+
+/* Failure to handle AT_SYMLINK_NOFOLLOW requires the /proc/self/fd or
+   fchdir workaround to call lchown for lchownat, but there is no need
+   to penalize chownat.  */
+static int
+local_lchownat (int fd, char const *file, uid_t owner, gid_t group);
+
+#  define AT_FUNC_NAME local_lchownat
+#  define AT_FUNC_F1 lchown
+#  define AT_FUNC_POST_FILE_PARAM_DECLS , uid_t owner, gid_t group
+#  define AT_FUNC_POST_FILE_ARGS        , owner, group
+#  include "at-func.c"
+#  undef AT_FUNC_NAME
+#  undef AT_FUNC_F1
+#  undef AT_FUNC_POST_FILE_PARAM_DECLS
+#  undef AT_FUNC_POST_FILE_ARGS
+
+# endif
+
+/* Work around bugs with trailing slash, using the same workarounds as
+   chown and lchown.  */
+
+int
+rpl_fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag)
+{
+# if FCHOWNAT_NOFOLLOW_BUG
+  if (flag == AT_SYMLINK_NOFOLLOW)
+    return local_lchownat (fd, file, owner, group);
+# endif
+# if FCHOWNAT_EMPTY_FILENAME_BUG
+  if (file[0] == '\0')
+    {
+      errno = ENOENT;
+      return -1;
+    }
+# endif
+# if CHOWN_TRAILING_SLASH_BUG
+  {
+    size_t len = strlen (file);
+    struct stat st;
+    if (len && file[len - 1] == '/')
+      {
+        if (statat (fd, file, &st))
+          return -1;
+        if (flag == AT_SYMLINK_NOFOLLOW)
+          return fchownat (fd, file, owner, group, 0);
+      }
+  }
+# endif
+  return fchownat (fd, file, owner, group, flag);
+}
+
+#endif /* HAVE_FCHOWNAT */
diff --git a/gnulib/lib/fclose.c b/gnulib/lib/fclose.c
new file mode 100644 (file)
index 0000000..1d7e85b
--- /dev/null
@@ -0,0 +1,47 @@
+/* fclose replacement.
+   Copyright (C) 2008-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdio.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+/* Override fclose() to call the overridden close().  */
+
+int
+rpl_fclose (FILE *fp)
+#undef fclose
+{
+  int saved_errno = 0;
+
+  if (fflush (fp))
+    saved_errno = errno;
+
+  if (close (fileno (fp)) < 0 && saved_errno == 0)
+    saved_errno = errno;
+
+  fclose (fp); /* will fail with errno = EBADF */
+
+  if (saved_errno != 0)
+    {
+      errno = saved_errno;
+      return EOF;
+    }
+  return 0;
+}
diff --git a/gnulib/lib/fcntl--.h b/gnulib/lib/fcntl--.h
new file mode 100644 (file)
index 0000000..ad696c9
--- /dev/null
@@ -0,0 +1,32 @@
+/* Like fcntl.h, but redefine some names to avoid glitches.
+
+   Copyright (C) 2005, 2009-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 Paul Eggert.  */
+
+#include <fcntl.h>
+#include "fcntl-safer.h"
+
+#undef open
+#define open open_safer
+
+#undef creat
+#define creat creat_safer
+
+#if GNULIB_OPENAT_SAFER
+# undef openat
+# define openat openat_safer
+#endif
diff --git a/gnulib/lib/fcntl-safer.h b/gnulib/lib/fcntl-safer.h
new file mode 100644 (file)
index 0000000..2aaf17e
--- /dev/null
@@ -0,0 +1,27 @@
+/* Invoke fcntl-like functions, but avoid some glitches.
+
+   Copyright (C) 2005, 2009-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 Paul Eggert.  */
+
+#include <sys/types.h>
+
+int open_safer (char const *, int, ...);
+int creat_safer (char const *, mode_t);
+
+#if GNULIB_OPENAT_SAFER
+int openat_safer (int, char const *, int, ...);
+#endif
diff --git a/gnulib/lib/fcntl.c b/gnulib/lib/fcntl.c
new file mode 100644 (file)
index 0000000..d6a328c
--- /dev/null
@@ -0,0 +1,308 @@
+/* Provide file descriptor control.
+
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <fcntl.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <unistd.h>
+
+#if !HAVE_FCNTL
+# define rpl_fcntl fcntl
+#endif
+#undef fcntl
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions.  */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+/* Upper bound on getdtablesize().  See lib/getdtablesize.c.  */
+# define OPEN_MAX_MAX 0x10000
+
+/* Duplicate OLDFD into the first available slot of at least NEWFD,
+   which must be positive, with FLAGS determining whether the duplicate
+   will be inheritable.  */
+static int
+dupfd (int oldfd, int newfd, int flags)
+{
+  /* Mingw has no way to create an arbitrary fd.  Iterate until all
+     file descriptors less than newfd are filled up.  */
+  HANDLE curr_process = GetCurrentProcess ();
+  HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd);
+  unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT];
+  unsigned int fds_to_close_bound = 0;
+  int result;
+  BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE;
+  int mode;
+
+  if (newfd < 0 || getdtablesize () <= newfd)
+    {
+      errno = EINVAL;
+      return -1;
+    }
+  if (old_handle == INVALID_HANDLE_VALUE
+      || (mode = setmode (oldfd, O_BINARY)) == -1)
+    {
+      /* oldfd is not open, or is an unassigned standard file
+         descriptor.  */
+      errno = EBADF;
+      return -1;
+    }
+  setmode (oldfd, mode);
+  flags |= mode;
+
+  for (;;)
+    {
+      HANDLE new_handle;
+      int duplicated_fd;
+      unsigned int index;
+
+      if (!DuplicateHandle (curr_process,           /* SourceProcessHandle */
+                            old_handle,             /* SourceHandle */
+                            curr_process,           /* TargetProcessHandle */
+                            (PHANDLE) &new_handle,  /* TargetHandle */
+                            (DWORD) 0,              /* DesiredAccess */
+                            inherit,                /* InheritHandle */
+                            DUPLICATE_SAME_ACCESS)) /* Options */
+        {
+          /* TODO: Translate GetLastError () into errno.  */
+          errno = EMFILE;
+          result = -1;
+          break;
+        }
+      duplicated_fd = _open_osfhandle ((long) new_handle, flags);
+      if (duplicated_fd < 0)
+        {
+          CloseHandle (new_handle);
+          errno = EMFILE;
+          result = -1;
+          break;
+        }
+      if (newfd <= duplicated_fd)
+        {
+          result = duplicated_fd;
+          break;
+        }
+
+      /* Set the bit duplicated_fd in fds_to_close[].  */
+      index = (unsigned int) duplicated_fd / CHAR_BIT;
+      if (fds_to_close_bound <= index)
+        {
+          if (sizeof fds_to_close <= index)
+            /* Need to increase OPEN_MAX_MAX.  */
+            abort ();
+          memset (fds_to_close + fds_to_close_bound, '\0',
+                  index + 1 - fds_to_close_bound);
+          fds_to_close_bound = index + 1;
+        }
+      fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT);
+    }
+
+  /* Close the previous fds that turned out to be too small.  */
+  {
+    int saved_errno = errno;
+    unsigned int duplicated_fd;
+
+    for (duplicated_fd = 0;
+         duplicated_fd < fds_to_close_bound * CHAR_BIT;
+         duplicated_fd++)
+      if ((fds_to_close[duplicated_fd / CHAR_BIT]
+           >> (duplicated_fd % CHAR_BIT))
+          & 1)
+        close (duplicated_fd);
+
+    errno = saved_errno;
+  }
+
+# if REPLACE_FCHDIR
+  if (0 <= result)
+    result = _gl_register_dup (oldfd, result);
+# endif
+  return result;
+}
+#endif /* W32 */
+
+/* Perform the specified ACTION on the file descriptor FD, possibly
+   using the argument ARG further described below.  This replacement
+   handles the following actions, and forwards all others on to the
+   native fcntl.  An unrecognized ACTION returns -1 with errno set to
+   EINVAL.
+
+   F_DUPFD - duplicate FD, with int ARG being the minimum target fd.
+   If successful, return the duplicate, which will be inheritable;
+   otherwise return -1 and set errno.
+
+   F_DUPFD_CLOEXEC - duplicate FD, with int ARG being the minimum
+   target fd.  If successful, return the duplicate, which will not be
+   inheritable; otherwise return -1 and set errno.
+
+   F_GETFD - ARG need not be present.  If successful, return a
+   non-negative value containing the descriptor flags of FD (only
+   FD_CLOEXEC is portable, but other flags may be present); otherwise
+   return -1 and set errno.  */
+
+int
+rpl_fcntl (int fd, int action, /* arg */...)
+{
+  va_list arg;
+  int result = -1;
+  va_start (arg, action);
+  switch (action)
+    {
+
+#if !HAVE_FCNTL
+    case F_DUPFD:
+      {
+        int target = va_arg (arg, int);
+        result = dupfd (fd, target, 0);
+        break;
+      }
+#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
+    case F_DUPFD:
+      {
+        int target = va_arg (arg, int);
+        /* Detect invalid target; needed for cygwin 1.5.x.  */
+        if (target < 0 || getdtablesize () <= target)
+          errno = EINVAL;
+        else
+          {
+            /* Haiku alpha 2 loses fd flags on original.  */
+            int flags = fcntl (fd, F_GETFD);
+            if (flags < 0)
+              {
+                result = -1;
+                break;
+              }
+            result = fcntl (fd, action, target);
+            if (0 <= result && fcntl (fd, F_SETFD, flags) == -1)
+              {
+                int saved_errno = errno;
+                close (result);
+                result = -1;
+                errno = saved_errno;
+              }
+# if REPLACE_FCHDIR
+            if (0 <= result)
+              result = _gl_register_dup (fd, result);
+# endif
+          }
+        break;
+      } /* F_DUPFD */
+#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */
+
+    case F_DUPFD_CLOEXEC:
+      {
+        int target = va_arg (arg, int);
+
+#if !HAVE_FCNTL
+        result = dupfd (fd, target, O_CLOEXEC);
+        break;
+#else /* HAVE_FCNTL */
+        /* Try the system call first, if the headers claim it exists
+           (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we
+           may be running with a glibc that has the macro but with an
+           older kernel that does not support it.  Cache the
+           information on whether the system call really works, but
+           avoid caching failure if the corresponding F_DUPFD fails
+           for any reason.  0 = unknown, 1 = yes, -1 = no.  */
+        static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0;
+        if (0 <= have_dupfd_cloexec)
+          {
+            result = fcntl (fd, action, target);
+            if (0 <= result || errno != EINVAL)
+              {
+                have_dupfd_cloexec = 1;
+# if REPLACE_FCHDIR
+                if (0 <= result)
+                  result = _gl_register_dup (fd, result);
+# endif
+              }
+            else
+              {
+                result = rpl_fcntl (fd, F_DUPFD, target);
+                if (result < 0)
+                  break;
+                have_dupfd_cloexec = -1;
+              }
+          }
+        else
+          result = rpl_fcntl (fd, F_DUPFD, target);
+        if (0 <= result && have_dupfd_cloexec == -1)
+          {
+            int flags = fcntl (result, F_GETFD);
+            if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
+              {
+                int saved_errno = errno;
+                close (result);
+                errno = saved_errno;
+                result = -1;
+              }
+          }
+        break;
+#endif /* HAVE_FCNTL */
+      } /* F_DUPFD_CLOEXEC */
+
+#if !HAVE_FCNTL
+    case F_GETFD:
+      {
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+        HANDLE handle = (HANDLE) _get_osfhandle (fd);
+        DWORD flags;
+        if (handle == INVALID_HANDLE_VALUE
+            || GetHandleInformation (handle, &flags) == 0)
+          errno = EBADF;
+        else
+          result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC;
+# else /* !W32 */
+        /* Use dup2 to reject invalid file descriptors.  No way to
+           access this information, so punt.  */
+        if (0 <= dup2 (fd, fd))
+          result = 0;
+# endif /* !W32 */
+        break;
+      } /* F_GETFD */
+#endif /* !HAVE_FCNTL */
+
+      /* Implementing F_SETFD on mingw is not trivial - there is no
+         API for changing the O_NOINHERIT bit on an fd, and merely
+         changing the HANDLE_FLAG_INHERIT bit on the underlying handle
+         can lead to odd state.  It may be possible by duplicating the
+         handle, using _open_osfhandle with the right flags, then
+         using dup2 to move the duplicate onto the original, but that
+         is not supported for now.  */
+
+    default:
+      {
+#if HAVE_FCNTL
+        void *p = va_arg (arg, void *);
+        result = fcntl (fd, action, p);
+#else
+        errno = EINVAL;
+#endif
+        break;
+      }
+    }
+  va_end (arg);
+  return result;
+}
diff --git a/gnulib/lib/fcntl.in.h b/gnulib/lib/fcntl.in.h
new file mode 100644 (file)
index 0000000..18cac45
--- /dev/null
@@ -0,0 +1,308 @@
+/* Like <fcntl.h>, but with non-working flags defined to 0.
+
+   Copyright (C) 2006-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 Paul Eggert */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined __need_system_fcntl_h
+/* Special invocation convention.  */
+
+#include <sys/types.h>
+/* On some systems other than glibc, <sys/stat.h> is a prerequisite of
+   <fcntl.h>.  On glibc systems, we would like to avoid namespace pollution.
+   But on glibc systems, <fcntl.h> includes <sys/stat.h> inside an
+   extern "C" { ... } block, which leads to errors in C++ mode with the
+   overridden <sys/stat.h> from gnulib.  These errors are known to be gone
+   with g++ version >= 4.3.  */
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+# include <sys/stat.h>
+#endif
+#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _GL_FCNTL_H
+
+#include <sys/types.h>
+/* On some systems other than glibc, <sys/stat.h> is a prerequisite of
+   <fcntl.h>.  On glibc systems, we would like to avoid namespace pollution.
+   But on glibc systems, <fcntl.h> includes <sys/stat.h> inside an
+   extern "C" { ... } block, which leads to errors in C++ mode with the
+   overridden <sys/stat.h> from gnulib.  These errors are known to be gone
+   with g++ version >= 4.3.  */
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+# include <sys/stat.h>
+#endif
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
+
+#ifndef _GL_FCNTL_H
+#define _GL_FCNTL_H
+
+#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems.  */
+# include <unistd.h>
+#endif
+
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
+/* Declare overridden functions.  */
+
+#if @GNULIB_FCNTL@
+# if @REPLACE_FCNTL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fcntl
+#   define fcntl rpl_fcntl
+#  endif
+_GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
+_GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
+# else
+#  if !@HAVE_FCNTL@
+_GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
+#  endif
+_GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
+# endif
+_GL_CXXALIASWARN (fcntl);
+#elif defined GNULIB_POSIXCHECK
+# undef fcntl
+# if HAVE_RAW_DECL_FCNTL
+_GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
+                 "use gnulib module fcntl for portability");
+# endif
+#endif
+
+#if @GNULIB_OPEN@
+# if @REPLACE_OPEN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef open
+#   define open rpl_open
+#  endif
+_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
+                             _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
+# else
+_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
+# endif
+/* On HP-UX 11, in C++ mode, open() is defined as an inline function with a
+   default argument.  _GL_CXXALIASWARN does not work in this case.  */
+# if !defined __hpux
+_GL_CXXALIASWARN (open);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef open
+/* Assume open is always declared.  */
+_GL_WARN_ON_USE (open, "open is not always POSIX compliant - "
+                 "use gnulib module open for portability");
+#endif
+
+#if @GNULIB_OPENAT@
+# if @REPLACE_OPENAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef openat
+#   define openat rpl_openat
+#  endif
+_GL_FUNCDECL_RPL (openat, int,
+                  (int fd, char const *file, int flags, /* mode_t mode */ ...)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (openat, int,
+                  (int fd, char const *file, int flags, /* mode_t mode */ ...));
+# else
+#  if !@HAVE_OPENAT@
+_GL_FUNCDECL_SYS (openat, int,
+                  (int fd, char const *file, int flags, /* mode_t mode */ ...)
+                  _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (openat, int,
+                  (int fd, char const *file, int flags, /* mode_t mode */ ...));
+# endif
+_GL_CXXALIASWARN (openat);
+#elif defined GNULIB_POSIXCHECK
+# undef openat
+# if HAVE_RAW_DECL_OPENAT
+_GL_WARN_ON_USE (openat, "openat is not portable - "
+                 "use gnulib module openat for portability");
+# endif
+#endif
+
+
+/* Fix up the FD_* macros, only known to be missing on mingw.  */
+
+#ifndef FD_CLOEXEC
+# define FD_CLOEXEC 1
+#endif
+
+/* Fix up the supported F_* macros.  Intentionally leave other F_*
+   macros undefined.  Only known to be missing on mingw.  */
+
+#ifndef F_DUPFD_CLOEXEC
+# define F_DUPFD_CLOEXEC 0x40000000
+/* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise.  */
+# define GNULIB_defined_F_DUPFD_CLOEXEC 1
+#else
+# define GNULIB_defined_F_DUPFD_CLOEXEC 0
+#endif
+
+#ifndef F_DUPFD
+# define F_DUPFD 1
+#endif
+
+#ifndef F_GETFD
+# define F_GETFD 2
+#endif
+
+/* Fix up the O_* macros.  */
+
+#if !defined O_DIRECT && defined O_DIRECTIO
+/* Tru64 spells it `O_DIRECTIO'.  */
+# define O_DIRECT O_DIRECTIO
+#endif
+
+#if !defined O_CLOEXEC && defined O_NOINHERIT
+/* Mingw spells it `O_NOINHERIT'.  Intentionally leave it
+   undefined if not available.  */
+# define O_CLOEXEC O_NOINHERIT
+#endif
+
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+
+#ifndef O_DIRECT
+# define O_DIRECT 0
+#endif
+
+#ifndef O_DIRECTORY
+# define O_DIRECTORY 0
+#endif
+
+#ifndef O_DSYNC
+# define O_DSYNC 0
+#endif
+
+#ifndef O_EXEC
+# define O_EXEC O_RDONLY /* This is often close enough in older systems.  */
+#endif
+
+#ifndef O_NDELAY
+# define O_NDELAY 0
+#endif
+
+#ifndef O_NOATIME
+# define O_NOATIME 0
+#endif
+
+#ifndef O_NONBLOCK
+# define O_NONBLOCK O_NDELAY
+#endif
+
+#ifndef O_NOCTTY
+# define O_NOCTTY 0
+#endif
+
+#ifndef O_NOFOLLOW
+# define O_NOFOLLOW 0
+#endif
+
+#ifndef O_NOLINKS
+# define O_NOLINKS 0
+#endif
+
+#ifndef O_RSYNC
+# define O_RSYNC 0
+#endif
+
+#ifndef O_SEARCH
+# define O_SEARCH O_RDONLY /* This is often close enough in older systems.  */
+#endif
+
+#ifndef O_SYNC
+# define O_SYNC 0
+#endif
+
+#ifndef O_TTY_INIT
+# define O_TTY_INIT 0
+#endif
+
+/* For systems that distinguish between text and binary I/O.
+   O_BINARY is usually declared in fcntl.h  */
+#if !defined O_BINARY && defined _O_BINARY
+  /* For MSC-compatible compilers.  */
+# define O_BINARY _O_BINARY
+# define O_TEXT _O_TEXT
+#endif
+
+#if defined __BEOS__ || defined __HAIKU__
+  /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect.  */
+# undef O_BINARY
+# undef O_TEXT
+#endif
+
+#ifndef O_BINARY
+# define O_BINARY 0
+# define O_TEXT 0
+#endif
+
+/* Fix up the AT_* macros.  */
+
+/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive.  Its
+   value exceeds INT_MAX, so its use as an int doesn't conform to the
+   C standard, and GCC and Sun C complain in some cases.  If the bug
+   is present, undef AT_FDCWD here, so it can be redefined below.  */
+#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553
+# undef AT_FDCWD
+#endif
+
+/* Use the same bit pattern as Solaris 9, but with the proper
+   signedness.  The bit pattern is important, in case this actually is
+   Solaris with the above workaround.  */
+#ifndef AT_FDCWD
+# define AT_FDCWD (-3041965)
+#endif
+
+/* Use the same values as Solaris 9.  This shouldn't matter, but
+   there's no real reason to differ.  */
+#ifndef AT_SYMLINK_NOFOLLOW
+# define AT_SYMLINK_NOFOLLOW 4096
+#endif
+
+#ifndef AT_REMOVEDIR
+# define AT_REMOVEDIR 1
+#endif
+
+/* Solaris 9 lacks these two, so just pick unique values.  */
+#ifndef AT_SYMLINK_FOLLOW
+# define AT_SYMLINK_FOLLOW 2
+#endif
+
+#ifndef AT_EACCESS
+# define AT_EACCESS 4
+#endif
+
+
+#endif /* _GL_FCNTL_H */
+#endif /* _GL_FCNTL_H */
+#endif
diff --git a/gnulib/lib/fd-safer.c b/gnulib/lib/fd-safer.c
new file mode 100644 (file)
index 0000000..910fa4c
--- /dev/null
@@ -0,0 +1,49 @@
+/* Return a safer copy of a file descriptor.
+
+   Copyright (C) 2005-2006, 2009-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 Paul Eggert.  */
+
+#include <config.h>
+
+#include "unistd-safer.h"
+
+#include <errno.h>
+#include <unistd.h>
+
+/* Return FD, unless FD would be a copy of standard input, output, or
+   error; in that case, return a duplicate of FD, closing FD.  On
+   failure to duplicate, close FD, set errno, and return -1.  Preserve
+   errno if FD is negative, so that the caller can always inspect
+   errno when the returned value is negative.
+
+   This function is usefully wrapped around functions that return file
+   descriptors, e.g., fd_safer (open ("file", O_RDONLY)).  */
+
+int
+fd_safer (int fd)
+{
+  if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
+    {
+      int f = dup_safer (fd);
+      int e = errno;
+      close (fd);
+      errno = e;
+      fd = f;
+    }
+
+  return fd;
+}
diff --git a/gnulib/lib/fdopendir.c b/gnulib/lib/fdopendir.c
new file mode 100644 (file)
index 0000000..0853e59
--- /dev/null
@@ -0,0 +1,204 @@
+/* provide a replacement fdopendir function
+   Copyright (C) 2004-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 Jim Meyering */
+
+#include <config.h>
+
+#include <dirent.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#if !HAVE_FDOPENDIR
+
+# include "openat.h"
+# include "openat-priv.h"
+# include "save-cwd.h"
+
+# if GNULIB_DIRENT_SAFER
+#  include "dirent--.h"
+# endif
+
+# ifndef REPLACE_FCHDIR
+#  define REPLACE_FCHDIR 0
+# endif
+
+static DIR *fdopendir_with_dup (int, int, struct saved_cwd const *);
+static DIR *fd_clone_opendir (int, struct saved_cwd const *);
+
+/* Replacement for POSIX fdopendir.
+
+   First, try to simulate it via opendir ("/proc/self/fd/...").  Failing
+   that, simulate it by using fchdir metadata, or by doing
+   save_cwd/fchdir/opendir(".")/restore_cwd.
+   If either the save_cwd or the restore_cwd fails (relatively unlikely),
+   then give a diagnostic and exit nonzero.
+
+   If successful, the resulting stream is based on FD in
+   implementations where streams are based on file descriptors and in
+   applications where no other thread or signal handler allocates or
+   frees file descriptors.  In other cases, consult dirfd on the result
+   to find out whether FD is still being used.
+
+   Otherwise, this function works just like POSIX fdopendir.
+
+   W A R N I N G:
+
+   Unlike other fd-related functions, this one places constraints on FD.
+   If this function returns successfully, FD is under control of the
+   dirent.h system, and the caller should not close or modify the state of
+   FD other than by the dirent.h functions.  */
+DIR *
+fdopendir (int fd)
+{
+  DIR *dir = fdopendir_with_dup (fd, -1, NULL);
+
+  if (! REPLACE_FCHDIR && ! dir)
+    {
+      int saved_errno = errno;
+      if (EXPECTED_ERRNO (saved_errno))
+        {
+          struct saved_cwd cwd;
+          if (save_cwd (&cwd) != 0)
+            openat_save_fail (errno);
+          dir = fdopendir_with_dup (fd, -1, &cwd);
+          saved_errno = errno;
+          free_cwd (&cwd);
+          errno = saved_errno;
+        }
+    }
+
+  return dir;
+}
+
+/* Like fdopendir, except that if OLDER_DUPFD is not -1, it is known
+   to be a dup of FD which is less than FD - 1 and which will be
+   closed by the caller and not otherwise used by the caller.  This
+   function makes sure that FD is closed and all file descriptors less
+   than FD are open, and then calls fd_clone_opendir on a dup of FD.
+   That way, barring race conditions, fd_clone_opendir returns a
+   stream whose file descriptor is FD.
+
+   If REPLACE_CHDIR or CWD is null, use opendir ("/proc/self/fd/...",
+   falling back on fchdir metadata.  Otherwise, CWD is a saved version
+   of the working directory; use fchdir/opendir(".")/restore_cwd(CWD).  */
+static DIR *
+fdopendir_with_dup (int fd, int older_dupfd, struct saved_cwd const *cwd)
+{
+  int dupfd = dup (fd);
+  if (dupfd < 0 && errno == EMFILE)
+    dupfd = older_dupfd;
+  if (dupfd < 0)
+    return NULL;
+  else
+    {
+      DIR *dir;
+      int saved_errno;
+      if (dupfd < fd - 1 && dupfd != older_dupfd)
+        {
+          dir = fdopendir_with_dup (fd, dupfd, cwd);
+          saved_errno = errno;
+        }
+      else
+        {
+          close (fd);
+          dir = fd_clone_opendir (dupfd, cwd);
+          saved_errno = errno;
+          if (! dir)
+            {
+              int fd1 = dup (dupfd);
+              if (fd1 != fd)
+                openat_save_fail (fd1 < 0 ? errno : EBADF);
+            }
+        }
+
+      if (dupfd != older_dupfd)
+        close (dupfd);
+      errno = saved_errno;
+      return dir;
+    }
+}
+
+/* Like fdopendir, except the result controls a clone of FD.  It is
+   the caller's responsibility both to close FD and (if the result is
+   not null) to closedir the result.  */
+static DIR *
+fd_clone_opendir (int fd, struct saved_cwd const *cwd)
+{
+  if (REPLACE_FCHDIR || ! cwd)
+    {
+      DIR *dir = NULL;
+      int saved_errno = EOPNOTSUPP;
+      char buf[OPENAT_BUFFER_SIZE];
+      char *proc_file = openat_proc_name (buf, fd, ".");
+      if (proc_file)
+        {
+          dir = opendir (proc_file);
+          saved_errno = errno;
+          if (proc_file != buf)
+            free (proc_file);
+        }
+# if REPLACE_FCHDIR
+      if (! dir && EXPECTED_ERRNO (saved_errno))
+        {
+          char const *name = _gl_directory_name (fd);
+          return (name ? opendir (name) : NULL);
+        }
+# endif
+      errno = saved_errno;
+      return dir;
+    }
+  else
+    {
+      if (fchdir (fd) != 0)
+        return NULL;
+      else
+        {
+          DIR *dir = opendir (".");
+          int saved_errno = errno;
+          if (restore_cwd (cwd) != 0)
+            openat_restore_fail (errno);
+          errno = saved_errno;
+          return dir;
+        }
+    }
+}
+
+#else /* HAVE_FDOPENDIR */
+
+# include <errno.h>
+# include <sys/stat.h>
+
+# undef fdopendir
+
+/* Like fdopendir, but work around GNU/Hurd bug by validating FD.  */
+
+DIR *
+rpl_fdopendir (int fd)
+{
+  struct stat st;
+  if (fstat (fd, &st))
+    return NULL;
+  if (!S_ISDIR (st.st_mode))
+    {
+      errno = ENOTDIR;
+      return NULL;
+    }
+  return fdopendir (fd);
+}
+
+#endif /* HAVE_FDOPENDIR */
diff --git a/gnulib/lib/fflush.c b/gnulib/lib/fflush.c
new file mode 100644 (file)
index 0000000..437e310
--- /dev/null
@@ -0,0 +1,218 @@
+/* fflush.c -- allow flushing input streams
+   Copyright (C) 2007-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 Eric Blake. */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdio.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "freading.h"
+
+#include "stdio-impl.h"
+
+#undef fflush
+
+
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+
+/* Clear the stream's ungetc buffer, preserving the value of ftello (fp).  */
+static inline void
+clear_ungetc_buffer_preserving_position (FILE *fp)
+{
+  if (fp->_flags & _IO_IN_BACKUP)
+    /* _IO_free_backup_area is a bit complicated.  Simply call fseek.  */
+    fseeko (fp, 0, SEEK_CUR);
+}
+
+#else
+
+/* Clear the stream's ungetc buffer.  May modify the value of ftello (fp).  */
+static inline void
+clear_ungetc_buffer (FILE *fp)
+{
+# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+  if (HASUB (fp))
+    {
+      fp_->_p += fp_->_r;
+      fp_->_r = 0;
+    }
+# elif defined __EMX__              /* emx+gcc */
+  if (fp->_ungetc_count > 0)
+    {
+      fp->_ungetc_count = 0;
+      fp->_rcount = - fp->_rcount;
+    }
+# elif defined _IOERR               /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+  /* Nothing to do.  */
+# else                              /* other implementations */
+  fseeko (fp, 0, SEEK_CUR);
+# endif
+}
+
+#endif
+
+#if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+
+static inline int
+disable_seek_optimization (FILE *fp)
+{
+  int saved_flags = fp_->_flags & (__SOPT | __SNPT);
+  fp_->_flags = (fp_->_flags & ~__SOPT) | __SNPT;
+  return saved_flags;
+}
+
+static inline void
+restore_seek_optimization (FILE *fp, int saved_flags)
+{
+  fp_->_flags = (fp_->_flags & ~(__SOPT | __SNPT)) | saved_flags;
+}
+
+#endif
+
+static inline void
+update_fpos_cache (FILE *fp, off_t pos)
+{
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __CYGWIN__
+  /* fp_->_offset is typed as an integer.  */
+  fp_->_offset = pos;
+# else
+  /* fp_->_offset is an fpos_t.  */
+  /* Use a union, since on NetBSD, the compilation flags determine
+     whether fpos_t is typedef'd to off_t or a struct containing a
+     single off_t member.  */
+  union
+    {
+      fpos_t f;
+      off_t o;
+    } u;
+  u.o = pos;
+  fp_->_offset = u.f;
+# endif
+  fp_->_flags |= __SOFF;
+#endif
+}
+
+/* Flush all pending data on STREAM according to POSIX rules.  Both
+   output and seekable input streams are supported.  */
+int
+rpl_fflush (FILE *stream)
+{
+  /* When stream is NULL, POSIX and C99 only require flushing of "output
+     streams and update streams in which the most recent operation was not
+     input", and all implementations do this.
+
+     When stream is "an output stream or an update stream in which the most
+     recent operation was not input", POSIX and C99 requires that fflush
+     writes out any buffered data, and all implementations do this.
+
+     When stream is, however, an input stream or an update stream in
+     which the most recent operation was input, C99 specifies nothing,
+     and POSIX only specifies behavior if the stream is seekable.
+     mingw, in particular, drops the input buffer, leaving the file
+     descriptor positioned at the end of the input buffer. I.e. ftell
+     (stream) is lost.  We don't want to call the implementation's
+     fflush in this case.
+
+     We test ! freading (stream) here, rather than fwriting (stream), because
+     what we need to know is whether the stream holds a "read buffer", and on
+     mingw this is indicated by _IOREAD, regardless of _IOWRT.  */
+  if (stream == NULL || ! freading (stream))
+    return fflush (stream);
+
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+
+  clear_ungetc_buffer_preserving_position (stream);
+
+  return fflush (stream);
+
+#else
+  {
+    /* Notes about the file-position indicator:
+       1) The file position indicator is incremented by fgetc() and decremented
+          by ungetc():
+          <http://www.opengroup.org/susv3/functions/fgetc.html>
+            "... the fgetc() function shall ... advance the associated file
+             position indicator for the stream ..."
+          <http://www.opengroup.org/susv3/functions/ungetc.html>
+            "The file-position indicator is decremented by each successful
+             call to ungetc()..."
+       2) <http://www.opengroup.org/susv3/functions/ungetc.html> says:
+            "The value of the file-position indicator for the stream after
+             reading or discarding all pushed-back bytes shall be the same
+             as it was before the bytes were pushed back."
+          Here we are discarding all pushed-back bytes.  But more specifically,
+       3) <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> says:
+            "[After fflush(),] the file offset of the underlying open file
+             description shall be set to the file position of the stream, and
+             any characters pushed back onto the stream by ungetc() ... shall
+             be discarded."  */
+
+    /* POSIX does not specify fflush behavior for non-seekable input
+       streams.  Some implementations purge unread data, some return
+       EBADF, some do nothing.  */
+    off_t pos = ftello (stream);
+    if (pos == -1)
+      {
+        errno = EBADF;
+        return EOF;
+      }
+
+    /* Clear the ungetc buffer.  */
+    clear_ungetc_buffer (stream);
+
+    /* To get here, we must be flushing a seekable input stream, so the
+       semantics of fpurge are now appropriate to clear the buffer.  To
+       avoid losing data, the lseek is also necessary.  */
+    {
+      int result = fpurge (stream);
+      if (result != 0)
+        return result;
+    }
+
+# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+
+    {
+      /* Disable seek optimization for the next fseeko call.  This tells the
+         following fseeko call to seek to the desired position directly, rather
+         than to seek to a block-aligned boundary.  */
+      int saved_flags = disable_seek_optimization (stream);
+      int result = fseeko (stream, pos, SEEK_SET);
+
+      restore_seek_optimization (stream, saved_flags);
+      return result;
+    }
+
+# else
+
+    pos = lseek (fileno (stream), pos, SEEK_SET);
+    if (pos == -1)
+      return EOF;
+    /* After a successful lseek, update the file descriptor's position cache
+       in the stream.  */
+    update_fpos_cache (stream, pos);
+
+    return 0;
+
+# endif
+  }
+#endif
+}
diff --git a/gnulib/lib/file-set.c b/gnulib/lib/file-set.c
new file mode 100644 (file)
index 0000000..0126556
--- /dev/null
@@ -0,0 +1,74 @@
+/* Specialized functions to manipulate a set of files.
+   Copyright (C) 2007, 2009-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 Jim Meyering */
+
+#include <config.h>
+#include "file-set.h"
+
+#include "hash-triple.h"
+#include "xalloc.h"
+
+/* Record file, FILE, and dev/ino from *STATS, in the hash table, HT.
+   If HT is NULL, return immediately.
+   If memory allocation fails, exit immediately.  */
+void
+record_file (Hash_table *ht, char const *file, struct stat const *stats)
+{
+  struct F_triple *ent;
+
+  if (ht == NULL)
+    return;
+
+  ent = xmalloc (sizeof *ent);
+  ent->name = xstrdup (file);
+  ent->st_ino = stats->st_ino;
+  ent->st_dev = stats->st_dev;
+
+  {
+    struct F_triple *ent_from_table = hash_insert (ht, ent);
+    if (ent_from_table == NULL)
+      {
+        /* Insertion failed due to lack of memory.  */
+        xalloc_die ();
+      }
+
+    if (ent_from_table != ent)
+      {
+        /* There was alread a matching entry in the table, so ENT was
+           not inserted.  Free it.  */
+        triple_free (ent);
+      }
+  }
+}
+
+/* Return true if there is an entry in hash table, HT,
+   for the file described by FILE and STATS.  */
+bool
+seen_file (Hash_table const *ht, char const *file,
+           struct stat const *stats)
+{
+  struct F_triple new_ent;
+
+  if (ht == NULL)
+    return false;
+
+  new_ent.name = (char *) file;
+  new_ent.st_ino = stats->st_ino;
+  new_ent.st_dev = stats->st_dev;
+
+  return !!hash_lookup (ht, &new_ent);
+}
diff --git a/gnulib/lib/file-set.h b/gnulib/lib/file-set.h
new file mode 100644 (file)
index 0000000..28d42fe
--- /dev/null
@@ -0,0 +1,12 @@
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdbool.h>
+
+#include "hash.h"
+
+extern void record_file (Hash_table *ht, char const *file,
+                         struct stat const *stats)
+  __attribute__ ((nonnull (2, 3)));
+
+extern bool seen_file (Hash_table const *ht, char const *file,
+                       struct stat const *stats);
diff --git a/gnulib/lib/fileblocks.c b/gnulib/lib/fileblocks.c
new file mode 100644 (file)
index 0000000..993ec97
--- /dev/null
@@ -0,0 +1,74 @@
+/* Convert file size to number of blocks on System V-like machines.
+
+   Copyright (C) 1990, 1997-1999, 2004-2006, 2009-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 Brian L. Matthews, blm@6sceng.UUCP. */
+
+#include <config.h>
+
+#include <sys/types.h>
+
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
+
+# include <unistd.h>
+
+# ifndef NINDIR
+
+#  if defined __DJGPP__
+typedef long daddr_t; /* for disk address */
+#  endif
+
+/* Some SysV's, like Irix, seem to lack this.  Hope it's correct. */
+/* Number of inode pointers per indirect block. */
+#  define NINDIR (BSIZE / sizeof (daddr_t))
+# endif /* !NINDIR */
+
+/* Number of direct block addresses in an inode. */
+# define NDIR   10
+
+/* Return the number of 512-byte blocks in a file of SIZE bytes. */
+
+off_t
+st_blocks (off_t size)
+{
+  off_t datablks = size / 512 + (size % 512 != 0);
+  off_t indrblks = 0;
+
+  if (datablks > NDIR)
+    {
+      indrblks = (datablks - NDIR - 1) / NINDIR + 1;
+
+      if (datablks > NDIR + NINDIR)
+        {
+          indrblks += (datablks - NDIR - NINDIR - 1) / (NINDIR * NINDIR) + 1;
+
+          if (datablks > NDIR + NINDIR + NINDIR * NINDIR)
+            indrblks++;
+        }
+    }
+
+  return datablks + indrblks;
+}
+#else
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int textutils_fileblocks_unused;
+#endif
diff --git a/gnulib/lib/filemode.c b/gnulib/lib/filemode.c
new file mode 100644 (file)
index 0000000..0f6641a
--- /dev/null
@@ -0,0 +1,180 @@
+/* filemode.c -- make a string describing file modes
+
+   Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-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/>.  */
+
+#include <config.h>
+
+#include "filemode.h"
+
+/* The following is for Cray DMF (Data Migration Facility), which is a
+   HSM file system.  A migrated file has a `st_dm_mode' that is
+   different from the normal `st_mode', so any tests for migrated
+   files should use the former.  */
+#if HAVE_ST_DM_MODE
+# define IS_MIGRATED_FILE(statp) \
+    (S_ISOFD (statp->st_dm_mode) || S_ISOFL (statp->st_dm_mode))
+#else
+# define IS_MIGRATED_FILE(statp) 0
+#endif
+
+#if ! HAVE_DECL_STRMODE
+
+/* Return a character indicating the type of file described by
+   file mode BITS:
+   '-' regular file
+   'b' block special file
+   'c' character special file
+   'C' high performance ("contiguous data") file
+   'd' directory
+   'D' door
+   'l' symbolic link
+   'm' multiplexed file (7th edition Unix; obsolete)
+   'n' network special file (HP-UX)
+   'p' fifo (named pipe)
+   'P' port
+   's' socket
+   'w' whiteout (4.4BSD)
+   '?' some other file type  */
+
+static char
+ftypelet (mode_t bits)
+{
+  /* These are the most common, so test for them first.  */
+  if (S_ISREG (bits))
+    return '-';
+  if (S_ISDIR (bits))
+    return 'd';
+
+  /* Other letters standardized by POSIX 1003.1-2004.  */
+  if (S_ISBLK (bits))
+    return 'b';
+  if (S_ISCHR (bits))
+    return 'c';
+  if (S_ISLNK (bits))
+    return 'l';
+  if (S_ISFIFO (bits))
+    return 'p';
+
+  /* Other file types (though not letters) standardized by POSIX.  */
+  if (S_ISSOCK (bits))
+    return 's';
+
+  /* Nonstandard file types.  */
+  if (S_ISCTG (bits))
+    return 'C';
+  if (S_ISDOOR (bits))
+    return 'D';
+  if (S_ISMPB (bits) || S_ISMPC (bits))
+    return 'm';
+  if (S_ISNWK (bits))
+    return 'n';
+  if (S_ISPORT (bits))
+    return 'P';
+  if (S_ISWHT (bits))
+    return 'w';
+
+  return '?';
+}
+
+/* Like filemodestring, but rely only on MODE.  */
+
+void
+strmode (mode_t mode, char *str)
+{
+  str[0] = ftypelet (mode);
+  str[1] = mode & S_IRUSR ? 'r' : '-';
+  str[2] = mode & S_IWUSR ? 'w' : '-';
+  str[3] = (mode & S_ISUID
+            ? (mode & S_IXUSR ? 's' : 'S')
+            : (mode & S_IXUSR ? 'x' : '-'));
+  str[4] = mode & S_IRGRP ? 'r' : '-';
+  str[5] = mode & S_IWGRP ? 'w' : '-';
+  str[6] = (mode & S_ISGID
+            ? (mode & S_IXGRP ? 's' : 'S')
+            : (mode & S_IXGRP ? 'x' : '-'));
+  str[7] = mode & S_IROTH ? 'r' : '-';
+  str[8] = mode & S_IWOTH ? 'w' : '-';
+  str[9] = (mode & S_ISVTX
+            ? (mode & S_IXOTH ? 't' : 'T')
+            : (mode & S_IXOTH ? 'x' : '-'));
+  str[10] = ' ';
+  str[11] = '\0';
+}
+
+#endif /* ! HAVE_DECL_STRMODE */
+
+/* filemodestring - fill in string STR with an ls-style ASCII
+   representation of the st_mode field of file stats block STATP.
+   12 characters are stored in STR.
+   The characters stored in STR are:
+
+   0    File type, as in ftypelet above, except that other letters are used
+        for files whose type cannot be determined solely from st_mode:
+
+            'F' semaphore
+            'M' migrated file (Cray DMF)
+            'Q' message queue
+            'S' shared memory object
+            'T' typed memory object
+
+   1    'r' if the owner may read, '-' otherwise.
+
+   2    'w' if the owner may write, '-' otherwise.
+
+   3    'x' if the owner may execute, 's' if the file is
+        set-user-id, '-' otherwise.
+        'S' if the file is set-user-id, but the execute
+        bit isn't set.
+
+   4    'r' if group members may read, '-' otherwise.
+
+   5    'w' if group members may write, '-' otherwise.
+
+   6    'x' if group members may execute, 's' if the file is
+        set-group-id, '-' otherwise.
+        'S' if it is set-group-id but not executable.
+
+   7    'r' if any user may read, '-' otherwise.
+
+   8    'w' if any user may write, '-' otherwise.
+
+   9    'x' if any user may execute, 't' if the file is "sticky"
+        (will be retained in swap space after execution), '-'
+        otherwise.
+        'T' if the file is sticky but not executable.
+
+   10   ' ' for compatibility with 4.4BSD strmode,
+        since this interface does not support ACLs.
+
+   11   '\0'.  */
+
+void
+filemodestring (struct stat const *statp, char *str)
+{
+  strmode (statp->st_mode, str);
+
+  if (S_TYPEISSEM (statp))
+    str[0] = 'F';
+  else if (IS_MIGRATED_FILE (statp))
+    str[0] = 'M';
+  else if (S_TYPEISMQ (statp))
+    str[0] = 'Q';
+  else if (S_TYPEISSHM (statp))
+    str[0] = 'S';
+  else if (S_TYPEISTMO (statp))
+    str[0] = 'T';
+}
diff --git a/gnulib/lib/filemode.h b/gnulib/lib/filemode.h
new file mode 100644 (file)
index 0000000..1a50302
--- /dev/null
@@ -0,0 +1,44 @@
+/* Make a string describing file modes.
+
+   Copyright (C) 1998-1999, 2003, 2006, 2009-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 FILEMODE_H_
+
+# include <sys/types.h>
+# include <sys/stat.h>
+
+/* Get the declaration of strmode.  */
+# if HAVE_DECL_STRMODE
+#  include <string.h> /* MacOS X, FreeBSD, OpenBSD */
+#  include <unistd.h> /* NetBSD */
+# endif
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if !HAVE_DECL_STRMODE
+extern void strmode (mode_t mode, char *str);
+# endif
+
+extern void filemodestring (struct stat const *statp, char *str);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/gnulib/lib/float+.h b/gnulib/lib/float+.h
new file mode 100644 (file)
index 0000000..2e84489
--- /dev/null
@@ -0,0 +1,148 @@
+/* Supplemental information about the floating-point formats.
+   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _FLOATPLUS_H
+#define _FLOATPLUS_H
+
+#include <float.h>
+#include <limits.h>
+
+/* Number of bits in the mantissa of a floating-point number, including the
+   "hidden bit".  */
+#if FLT_RADIX == 2
+# define FLT_MANT_BIT FLT_MANT_DIG
+# define DBL_MANT_BIT DBL_MANT_DIG
+# define LDBL_MANT_BIT LDBL_MANT_DIG
+#elif FLT_RADIX == 4
+# define FLT_MANT_BIT (FLT_MANT_DIG * 2)
+# define DBL_MANT_BIT (DBL_MANT_DIG * 2)
+# define LDBL_MANT_BIT (LDBL_MANT_DIG * 2)
+#elif FLT_RADIX == 16
+# define FLT_MANT_BIT (FLT_MANT_DIG * 4)
+# define DBL_MANT_BIT (DBL_MANT_DIG * 4)
+# define LDBL_MANT_BIT (LDBL_MANT_DIG * 4)
+#endif
+
+/* Bit mask that can be used to mask the exponent, as an unsigned number.  */
+#define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7)
+#define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7)
+#define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7)
+
+/* Number of bits used for the exponent of a floating-point number, including
+   the exponent's sign.  */
+#define FLT_EXP_BIT \
+  (FLT_EXP_MASK < 0x100 ? 8 : \
+   FLT_EXP_MASK < 0x200 ? 9 : \
+   FLT_EXP_MASK < 0x400 ? 10 : \
+   FLT_EXP_MASK < 0x800 ? 11 : \
+   FLT_EXP_MASK < 0x1000 ? 12 : \
+   FLT_EXP_MASK < 0x2000 ? 13 : \
+   FLT_EXP_MASK < 0x4000 ? 14 : \
+   FLT_EXP_MASK < 0x8000 ? 15 : \
+   FLT_EXP_MASK < 0x10000 ? 16 : \
+   FLT_EXP_MASK < 0x20000 ? 17 : \
+   FLT_EXP_MASK < 0x40000 ? 18 : \
+   FLT_EXP_MASK < 0x80000 ? 19 : \
+   FLT_EXP_MASK < 0x100000 ? 20 : \
+   FLT_EXP_MASK < 0x200000 ? 21 : \
+   FLT_EXP_MASK < 0x400000 ? 22 : \
+   FLT_EXP_MASK < 0x800000 ? 23 : \
+   FLT_EXP_MASK < 0x1000000 ? 24 : \
+   FLT_EXP_MASK < 0x2000000 ? 25 : \
+   FLT_EXP_MASK < 0x4000000 ? 26 : \
+   FLT_EXP_MASK < 0x8000000 ? 27 : \
+   FLT_EXP_MASK < 0x10000000 ? 28 : \
+   FLT_EXP_MASK < 0x20000000 ? 29 : \
+   FLT_EXP_MASK < 0x40000000 ? 30 : \
+   FLT_EXP_MASK <= 0x7fffffff ? 31 : \
+   32)
+#define DBL_EXP_BIT \
+  (DBL_EXP_MASK < 0x100 ? 8 : \
+   DBL_EXP_MASK < 0x200 ? 9 : \
+   DBL_EXP_MASK < 0x400 ? 10 : \
+   DBL_EXP_MASK < 0x800 ? 11 : \
+   DBL_EXP_MASK < 0x1000 ? 12 : \
+   DBL_EXP_MASK < 0x2000 ? 13 : \
+   DBL_EXP_MASK < 0x4000 ? 14 : \
+   DBL_EXP_MASK < 0x8000 ? 15 : \
+   DBL_EXP_MASK < 0x10000 ? 16 : \
+   DBL_EXP_MASK < 0x20000 ? 17 : \
+   DBL_EXP_MASK < 0x40000 ? 18 : \
+   DBL_EXP_MASK < 0x80000 ? 19 : \
+   DBL_EXP_MASK < 0x100000 ? 20 : \
+   DBL_EXP_MASK < 0x200000 ? 21 : \
+   DBL_EXP_MASK < 0x400000 ? 22 : \
+   DBL_EXP_MASK < 0x800000 ? 23 : \
+   DBL_EXP_MASK < 0x1000000 ? 24 : \
+   DBL_EXP_MASK < 0x2000000 ? 25 : \
+   DBL_EXP_MASK < 0x4000000 ? 26 : \
+   DBL_EXP_MASK < 0x8000000 ? 27 : \
+   DBL_EXP_MASK < 0x10000000 ? 28 : \
+   DBL_EXP_MASK < 0x20000000 ? 29 : \
+   DBL_EXP_MASK < 0x40000000 ? 30 : \
+   DBL_EXP_MASK <= 0x7fffffff ? 31 : \
+   32)
+#define LDBL_EXP_BIT \
+  (LDBL_EXP_MASK < 0x100 ? 8 : \
+   LDBL_EXP_MASK < 0x200 ? 9 : \
+   LDBL_EXP_MASK < 0x400 ? 10 : \
+   LDBL_EXP_MASK < 0x800 ? 11 : \
+   LDBL_EXP_MASK < 0x1000 ? 12 : \
+   LDBL_EXP_MASK < 0x2000 ? 13 : \
+   LDBL_EXP_MASK < 0x4000 ? 14 : \
+   LDBL_EXP_MASK < 0x8000 ? 15 : \
+   LDBL_EXP_MASK < 0x10000 ? 16 : \
+   LDBL_EXP_MASK < 0x20000 ? 17 : \
+   LDBL_EXP_MASK < 0x40000 ? 18 : \
+   LDBL_EXP_MASK < 0x80000 ? 19 : \
+   LDBL_EXP_MASK < 0x100000 ? 20 : \
+   LDBL_EXP_MASK < 0x200000 ? 21 : \
+   LDBL_EXP_MASK < 0x400000 ? 22 : \
+   LDBL_EXP_MASK < 0x800000 ? 23 : \
+   LDBL_EXP_MASK < 0x1000000 ? 24 : \
+   LDBL_EXP_MASK < 0x2000000 ? 25 : \
+   LDBL_EXP_MASK < 0x4000000 ? 26 : \
+   LDBL_EXP_MASK < 0x8000000 ? 27 : \
+   LDBL_EXP_MASK < 0x10000000 ? 28 : \
+   LDBL_EXP_MASK < 0x20000000 ? 29 : \
+   LDBL_EXP_MASK < 0x40000000 ? 30 : \
+   LDBL_EXP_MASK <= 0x7fffffff ? 31 : \
+   32)
+
+/* Number of bits used for a floating-point number: the mantissa (not
+   counting the "hidden bit", since it may or may not be explicit), the
+   exponent, and the sign.  */
+#define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1)
+#define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1)
+#define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1)
+
+/* Number of bytes used for a floating-point number.
+   This can be smaller than the 'sizeof'.  For example, on i386 systems,
+   'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence
+   LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but
+   sizeof (long double) = 12 or = 16.  */
+#define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+#define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+#define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+
+/* Verify that SIZEOF_FLT <= sizeof (float) etc.  */
+typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1];
+typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1];
+typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1];
+
+#endif /* _FLOATPLUS_H */
diff --git a/gnulib/lib/float.in.h b/gnulib/lib/float.in.h
new file mode 100644 (file)
index 0000000..d32f20e
--- /dev/null
@@ -0,0 +1,63 @@
+/* A correct <float.h>.
+
+   Copyright (C) 2007-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 _GL_FLOAT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_FLOAT_H@
+
+#ifndef _GL_FLOAT_H
+#define _GL_FLOAT_H
+
+/* 'long double' properties.  */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+/* Number of mantissa units, in base FLT_RADIX.  */
+# undef LDBL_MANT_DIG
+# define LDBL_MANT_DIG   64
+/* Number of decimal digits that is sufficient for representing a number.  */
+# undef LDBL_DIG
+# define LDBL_DIG        18
+/* x-1 where x is the smallest representable number > 1.  */
+# undef LDBL_EPSILON
+# define LDBL_EPSILON    1.0842021724855044340E-19L
+/* Minimum e such that FLT_RADIX^(e-1) is a normalized number.  */
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP    (-16381)
+/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number.  */
+# undef LDBL_MAX_EXP
+# define LDBL_MAX_EXP    16384
+/* Minimum positive normalized number.  */
+# undef LDBL_MIN
+# define LDBL_MIN        3.3621031431120935063E-4932L
+/* Maximum representable finite number.  */
+# undef LDBL_MAX
+# define LDBL_MAX        1.1897314953572317650E+4932L
+/* Minimum e such that 10^e is in the range of normalized numbers.  */
+# undef LDBL_MIN_10_EXP
+# define LDBL_MIN_10_EXP (-4931)
+/* Maximum e such that 10^e is in the range of representable finite numbers.  */
+# undef LDBL_MAX_10_EXP
+# define LDBL_MAX_10_EXP 4932
+#endif
+
+#endif /* _GL_FLOAT_H */
+#endif /* _GL_FLOAT_H */
diff --git a/gnulib/lib/fnmatch.c b/gnulib/lib/fnmatch.c
new file mode 100644 (file)
index 0000000..7b57c2e
--- /dev/null
@@ -0,0 +1,353 @@
+/* Copyright (C) 1991-1993, 1996-2007, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+/* Enable GNU extensions in fnmatch.h.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE    1
+#endif
+
+#if ! defined __builtin_expect && __GNUC__ < 3
+# define __builtin_expect(expr, expected) (expr)
+#endif
+
+#include <fnmatch.h>
+
+#include <alloca.h>
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define WIDE_CHAR_SUPPORT \
+  (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \
+   && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY))
+
+/* For platform which support the ISO C amendement 1 functionality we
+   support user defined character classes.  */
+#if defined _LIBC || WIDE_CHAR_SUPPORT
+# include <wctype.h>
+# include <wchar.h>
+#endif
+
+/* We need some of the locale data (the collation sequence information)
+   but there is no interface to get this information in general.  Therefore
+   we support a correct implementation only in glibc.  */
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+# include "../locale/elem-hash.h"
+# include "../locale/coll-lookup.h"
+# include <shlib-compat.h>
+
+# define CONCAT(a,b) __CONCAT(a,b)
+# define mbsrtowcs __mbsrtowcs
+# define fnmatch __fnmatch
+extern int fnmatch (const char *pattern, const char *string, int flags);
+#endif
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+/* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set.  */
+#define NO_LEADING_PERIOD(flags) \
+  ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+   actually compiling the library itself, and have not detected a bug
+   in the library.  This code is part of the GNU C
+   Library, but also included in many other GNU distributions.  Compiling
+   and linking in this code is a waste when using the GNU C library
+   (especially if it is a shared library).  Rather than having every GNU
+   program understand `configure --with-gnu-libc' and omit the object files,
+   it is simpler to just do this in the source for each such file.  */
+
+#if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU
+
+
+# if ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
+#  define isblank(c) ((c) == ' ' || (c) == '\t')
+# endif
+
+# define STREQ(s1, s2) (strcmp (s1, s2) == 0)
+
+# if defined _LIBC || WIDE_CHAR_SUPPORT
+/* The GNU C library provides support for user-defined character classes
+   and the functions from ISO C amendement 1.  */
+#  ifdef CHARCLASS_NAME_MAX
+#   define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
+#  else
+/* This shouldn't happen but some implementation might still have this
+   problem.  Use a reasonable default value.  */
+#   define CHAR_CLASS_MAX_LENGTH 256
+#  endif
+
+#  ifdef _LIBC
+#   define IS_CHAR_CLASS(string) __wctype (string)
+#  else
+#   define IS_CHAR_CLASS(string) wctype (string)
+#  endif
+
+#  ifdef _LIBC
+#   define ISWCTYPE(WC, WT)     __iswctype (WC, WT)
+#  else
+#   define ISWCTYPE(WC, WT)     iswctype (WC, WT)
+#  endif
+
+#  if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC
+/* In this case we are implementing the multibyte character handling.  */
+#   define HANDLE_MULTIBYTE     1
+#  endif
+
+# else
+#  define CHAR_CLASS_MAX_LENGTH  6 /* Namely, `xdigit'.  */
+
+#  define IS_CHAR_CLASS(string)                                               \
+   (STREQ (string, "alpha") || STREQ (string, "upper")                        \
+    || STREQ (string, "lower") || STREQ (string, "digit")                     \
+    || STREQ (string, "alnum") || STREQ (string, "xdigit")                    \
+    || STREQ (string, "space") || STREQ (string, "print")                     \
+    || STREQ (string, "punct") || STREQ (string, "graph")                     \
+    || STREQ (string, "cntrl") || STREQ (string, "blank"))
+# endif
+
+/* Avoid depending on library functions or files
+   whose names are inconsistent.  */
+
+/* Global variable.  */
+static int posixly_correct;
+
+# ifndef internal_function
+/* Inside GNU libc we mark some function in a special way.  In other
+   environments simply ignore the marking.  */
+#  define internal_function
+# endif
+
+/* Note that this evaluates C many times.  */
+# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
+# define CHAR   char
+# define UCHAR  unsigned char
+# define INT    int
+# define FCT    internal_fnmatch
+# define EXT    ext_match
+# define END    end_pattern
+# define L_(CS) CS
+# ifdef _LIBC
+#  define BTOWC(C)      __btowc (C)
+# else
+#  define BTOWC(C)      btowc (C)
+# endif
+# define STRLEN(S) strlen (S)
+# define STRCAT(D, S) strcat (D, S)
+# ifdef _LIBC
+#  define MEMPCPY(D, S, N) __mempcpy (D, S, N)
+# else
+#  if HAVE_MEMPCPY
+#   define MEMPCPY(D, S, N) mempcpy (D, S, N)
+#  else
+#   define MEMPCPY(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
+#  endif
+# endif
+# define MEMCHR(S, C, N) memchr (S, C, N)
+# define STRCOLL(S1, S2) strcoll (S1, S2)
+# include "fnmatch_loop.c"
+
+
+# if HANDLE_MULTIBYTE
+#  define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c))
+#  define CHAR  wchar_t
+#  define UCHAR wint_t
+#  define INT   wint_t
+#  define FCT   internal_fnwmatch
+#  define EXT   ext_wmatch
+#  define END   end_wpattern
+#  define L_(CS)        L##CS
+#  define BTOWC(C)      (C)
+#  ifdef _LIBC
+#   define STRLEN(S) __wcslen (S)
+#   define STRCAT(D, S) __wcscat (D, S)
+#   define MEMPCPY(D, S, N) __wmempcpy (D, S, N)
+#  else
+#   define STRLEN(S) wcslen (S)
+#   define STRCAT(D, S) wcscat (D, S)
+#   if HAVE_WMEMPCPY
+#    define MEMPCPY(D, S, N) wmempcpy (D, S, N)
+#   else
+#    define MEMPCPY(D, S, N) (wmemcpy (D, S, N) + (N))
+#   endif
+#  endif
+#  define MEMCHR(S, C, N) wmemchr (S, C, N)
+#  define STRCOLL(S1, S2) wcscoll (S1, S2)
+#  define WIDE_CHAR_VERSION 1
+
+#  undef IS_CHAR_CLASS
+/* We have to convert the wide character string in a multibyte string.  But
+   we know that the character class names consist of alphanumeric characters
+   from the portable character set, and since the wide character encoding
+   for a member of the portable character set is the same code point as
+   its single-byte encoding, we can use a simplified method to convert the
+   string to a multibyte character string.  */
+static wctype_t
+is_char_class (const wchar_t *wcs)
+{
+  char s[CHAR_CLASS_MAX_LENGTH + 1];
+  char *cp = s;
+
+  do
+    {
+      /* Test for a printable character from the portable character set.  */
+#  ifdef _LIBC
+      if (*wcs < 0x20 || *wcs > 0x7e
+          || *wcs == 0x24 || *wcs == 0x40 || *wcs == 0x60)
+        return (wctype_t) 0;
+#  else
+      switch (*wcs)
+        {
+        case L' ': case L'!': case L'"': case L'#': case L'%':
+        case L'&': case L'\'': case L'(': case L')': case L'*':
+        case L'+': case L',': case L'-': case L'.': case L'/':
+        case L'0': case L'1': case L'2': case L'3': case L'4':
+        case L'5': case L'6': case L'7': case L'8': case L'9':
+        case L':': case L';': case L'<': case L'=': case L'>':
+        case L'?':
+        case L'A': case L'B': case L'C': case L'D': case L'E':
+        case L'F': case L'G': case L'H': case L'I': case L'J':
+        case L'K': case L'L': case L'M': case L'N': case L'O':
+        case L'P': case L'Q': case L'R': case L'S': case L'T':
+        case L'U': case L'V': case L'W': case L'X': case L'Y':
+        case L'Z':
+        case L'[': case L'\\': case L']': case L'^': case L'_':
+        case L'a': case L'b': case L'c': case L'd': case L'e':
+        case L'f': case L'g': case L'h': case L'i': case L'j':
+        case L'k': case L'l': case L'm': case L'n': case L'o':
+        case L'p': case L'q': case L'r': case L's': case L't':
+        case L'u': case L'v': case L'w': case L'x': case L'y':
+        case L'z': case L'{': case L'|': case L'}': case L'~':
+          break;
+        default:
+          return (wctype_t) 0;
+        }
+#  endif
+
+      /* Avoid overrunning the buffer.  */
+      if (cp == s + CHAR_CLASS_MAX_LENGTH)
+        return (wctype_t) 0;
+
+      *cp++ = (char) *wcs++;
+    }
+  while (*wcs != L'\0');
+
+  *cp = '\0';
+
+#  ifdef _LIBC
+  return __wctype (s);
+#  else
+  return wctype (s);
+#  endif
+}
+#  define IS_CHAR_CLASS(string) is_char_class (string)
+
+#  include "fnmatch_loop.c"
+# endif
+
+
+int
+fnmatch (const char *pattern, const char *string, int flags)
+{
+# if HANDLE_MULTIBYTE
+#  define ALLOCA_LIMIT 2000
+  if (__builtin_expect (MB_CUR_MAX, 1) != 1)
+    {
+      mbstate_t ps;
+      size_t patsize;
+      size_t strsize;
+      size_t totsize;
+      wchar_t *wpattern;
+      wchar_t *wstring;
+      int res;
+
+      /* Calculate the size needed to convert the strings to
+         wide characters.  */
+      memset (&ps, '\0', sizeof (ps));
+      patsize = mbsrtowcs (NULL, &pattern, 0, &ps) + 1;
+      if (__builtin_expect (patsize != 0, 1))
+        {
+          assert (mbsinit (&ps));
+          strsize = mbsrtowcs (NULL, &string, 0, &ps) + 1;
+          if (__builtin_expect (strsize != 0, 1))
+            {
+              assert (mbsinit (&ps));
+              totsize = patsize + strsize;
+              if (__builtin_expect (! (patsize <= totsize
+                                       && totsize <= SIZE_MAX / sizeof (wchar_t)),
+                                    0))
+                {
+                  errno = ENOMEM;
+                  return -1;
+                }
+
+              /* Allocate room for the wide characters.  */
+              if (__builtin_expect (totsize < ALLOCA_LIMIT, 1))
+                wpattern = (wchar_t *) alloca (totsize * sizeof (wchar_t));
+              else
+                {
+                  wpattern = malloc (totsize * sizeof (wchar_t));
+                  if (__builtin_expect (! wpattern, 0))
+                    {
+                      errno = ENOMEM;
+                      return -1;
+                    }
+                }
+              wstring = wpattern + patsize;
+
+              /* Convert the strings into wide characters.  */
+              mbsrtowcs (wpattern, &pattern, patsize, &ps);
+              assert (mbsinit (&ps));
+              mbsrtowcs (wstring, &string, strsize, &ps);
+
+              res = internal_fnwmatch (wpattern, wstring, wstring + strsize - 1,
+                                       flags & FNM_PERIOD, flags);
+
+              if (__builtin_expect (! (totsize < ALLOCA_LIMIT), 0))
+                free (wpattern);
+              return res;
+            }
+        }
+    }
+
+# endif /* HANDLE_MULTIBYTE */
+
+  return internal_fnmatch (pattern, string, string + strlen (string),
+                           flags & FNM_PERIOD, flags);
+}
+
+# ifdef _LIBC
+#  undef fnmatch
+versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3);
+#  if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3)
+strong_alias (__fnmatch, __fnmatch_old)
+compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0);
+#  endif
+libc_hidden_ver (__fnmatch, fnmatch)
+# endif
+
+#endif  /* _LIBC or not __GNU_LIBRARY__.  */
diff --git a/gnulib/lib/fnmatch.in.h b/gnulib/lib/fnmatch.in.h
new file mode 100644 (file)
index 0000000..5e0fdd4
--- /dev/null
@@ -0,0 +1,68 @@
+/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2011 Free
+   Software Foundation, Inc.
+
+   This file is part of the GNU C Library.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _FNMATCH_H
+#define _FNMATCH_H      1
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* We #undef these before defining them because some losing systems
+   (HP-UX A.08.07 for example) define these in <unistd.h>.  */
+#undef  FNM_PATHNAME
+#undef  FNM_NOESCAPE
+#undef  FNM_PERIOD
+
+/* Bits set in the FLAGS argument to `fnmatch'.  */
+#define FNM_PATHNAME    (1 << 0) /* No wildcard can ever match `/'.  */
+#define FNM_NOESCAPE    (1 << 1) /* Backslashes don't quote special chars.  */
+#define FNM_PERIOD      (1 << 2) /* Leading `.' is matched only explicitly.  */
+
+#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
+# define FNM_FILE_NAME   FNM_PATHNAME   /* Preferred GNU name.  */
+# define FNM_LEADING_DIR (1 << 3)       /* Ignore `/...' after a match.  */
+# define FNM_CASEFOLD    (1 << 4)       /* Compare without regard to case.  */
+# define FNM_EXTMATCH    (1 << 5)       /* Use ksh-like extended matching. */
+#endif
+
+/* Value returned by `fnmatch' if STRING does not match PATTERN.  */
+#define FNM_NOMATCH     1
+
+/* This value is returned if the implementation does not support
+   `fnmatch'.  Since this is not the case here it will never be
+   returned but the conformance test suites still require the symbol
+   to be defined.  */
+#ifdef _XOPEN_SOURCE
+# define FNM_NOSYS      (-1)
+#endif
+
+/* Match NAME against the file name pattern PATTERN,
+   returning zero if it matches, FNM_NOMATCH if not.  */
+extern int fnmatch (const char *__pattern, const char *__name,
+                    int __flags)
+     _GL_ARG_NONNULL ((1, 2));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* fnmatch.h */
diff --git a/gnulib/lib/fnmatch_loop.c b/gnulib/lib/fnmatch_loop.c
new file mode 100644 (file)
index 0000000..2235838
--- /dev/null
@@ -0,0 +1,1214 @@
+/* Copyright (C) 1991-1993, 1996-2006, 2009-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Match STRING against the file name pattern PATTERN, returning zero if
+   it matches, nonzero if not.  */
+static int EXT (INT opt, const CHAR *pattern, const CHAR *string,
+                const CHAR *string_end, bool no_leading_period, int flags)
+     internal_function;
+static const CHAR *END (const CHAR *patternp) internal_function;
+
+static int
+internal_function
+FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
+     bool no_leading_period, int flags)
+{
+  register const CHAR *p = pattern, *n = string;
+  register UCHAR c;
+#ifdef _LIBC
+# if WIDE_CHAR_VERSION
+  const char *collseq = (const char *)
+    _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+# else
+  const UCHAR *collseq = (const UCHAR *)
+    _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+# endif
+#endif
+
+  while ((c = *p++) != L_('\0'))
+    {
+      bool new_no_leading_period = false;
+      c = FOLD (c);
+
+      switch (c)
+        {
+        case L_('?'):
+          if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
+            {
+              int res;
+
+              res = EXT (c, p, n, string_end, no_leading_period,
+                         flags);
+              if (res != -1)
+                return res;
+            }
+
+          if (n == string_end)
+            return FNM_NOMATCH;
+          else if (*n == L_('/') && (flags & FNM_FILE_NAME))
+            return FNM_NOMATCH;
+          else if (*n == L_('.') && no_leading_period)
+            return FNM_NOMATCH;
+          break;
+
+        case L_('\\'):
+          if (!(flags & FNM_NOESCAPE))
+            {
+              c = *p++;
+              if (c == L_('\0'))
+                /* Trailing \ loses.  */
+                return FNM_NOMATCH;
+              c = FOLD (c);
+            }
+          if (n == string_end || FOLD ((UCHAR) *n) != c)
+            return FNM_NOMATCH;
+          break;
+
+        case L_('*'):
+          if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
+            {
+              int res;
+
+              res = EXT (c, p, n, string_end, no_leading_period,
+                         flags);
+              if (res != -1)
+                return res;
+            }
+
+          if (n != string_end && *n == L_('.') && no_leading_period)
+            return FNM_NOMATCH;
+
+          for (c = *p++; c == L_('?') || c == L_('*'); c = *p++)
+            {
+              if (*p == L_('(') && (flags & FNM_EXTMATCH) != 0)
+                {
+                  const CHAR *endp = END (p);
+                  if (endp != p)
+                    {
+                      /* This is a pattern.  Skip over it.  */
+                      p = endp;
+                      continue;
+                    }
+                }
+
+              if (c == L_('?'))
+                {
+                  /* A ? needs to match one character.  */
+                  if (n == string_end)
+                    /* There isn't another character; no match.  */
+                    return FNM_NOMATCH;
+                  else if (*n == L_('/')
+                           && __builtin_expect (flags & FNM_FILE_NAME, 0))
+                    /* A slash does not match a wildcard under
+                       FNM_FILE_NAME.  */
+                    return FNM_NOMATCH;
+                  else
+                    /* One character of the string is consumed in matching
+                       this ? wildcard, so *??? won't match if there are
+                       less than three characters.  */
+                    ++n;
+                }
+            }
+
+          if (c == L_('\0'))
+            /* The wildcard(s) is/are the last element of the pattern.
+               If the name is a file name and contains another slash
+               this means it cannot match, unless the FNM_LEADING_DIR
+               flag is set.  */
+            {
+              int result = (flags & FNM_FILE_NAME) == 0 ? 0 : FNM_NOMATCH;
+
+              if (flags & FNM_FILE_NAME)
+                {
+                  if (flags & FNM_LEADING_DIR)
+                    result = 0;
+                  else
+                    {
+                      if (MEMCHR (n, L_('/'), string_end - n) == NULL)
+                        result = 0;
+                    }
+                }
+
+              return result;
+            }
+          else
+            {
+              const CHAR *endp;
+
+              endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L_('/') : L_('\0'),
+                             string_end - n);
+              if (endp == NULL)
+                endp = string_end;
+
+              if (c == L_('[')
+                  || (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0
+                      && (c == L_('@') || c == L_('+') || c == L_('!'))
+                      && *p == L_('(')))
+                {
+                  int flags2 = ((flags & FNM_FILE_NAME)
+                                ? flags : (flags & ~FNM_PERIOD));
+                  bool no_leading_period2 = no_leading_period;
+
+                  for (--p; n < endp; ++n, no_leading_period2 = false)
+                    if (FCT (p, n, string_end, no_leading_period2, flags2)
+                        == 0)
+                      return 0;
+                }
+              else if (c == L_('/') && (flags & FNM_FILE_NAME))
+                {
+                  while (n < string_end && *n != L_('/'))
+                    ++n;
+                  if (n < string_end && *n == L_('/')
+                      && (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags)
+                          == 0))
+                    return 0;
+                }
+              else
+                {
+                  int flags2 = ((flags & FNM_FILE_NAME)
+                                ? flags : (flags & ~FNM_PERIOD));
+                  int no_leading_period2 = no_leading_period;
+
+                  if (c == L_('\\') && !(flags & FNM_NOESCAPE))
+                    c = *p;
+                  c = FOLD (c);
+                  for (--p; n < endp; ++n, no_leading_period2 = false)
+                    if (FOLD ((UCHAR) *n) == c
+                        && (FCT (p, n, string_end, no_leading_period2, flags2)
+                            == 0))
+                      return 0;
+                }
+            }
+
+          /* If we come here no match is possible with the wildcard.  */
+          return FNM_NOMATCH;
+
+        case L_('['):
+          {
+            /* Nonzero if the sense of the character class is inverted.  */
+            register bool not;
+            CHAR cold;
+            UCHAR fn;
+
+            if (posixly_correct == 0)
+              posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1;
+
+            if (n == string_end)
+              return FNM_NOMATCH;
+
+            if (*n == L_('.') && no_leading_period)
+              return FNM_NOMATCH;
+
+            if (*n == L_('/') && (flags & FNM_FILE_NAME))
+              /* `/' cannot be matched.  */
+              return FNM_NOMATCH;
+
+            not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^')));
+            if (not)
+              ++p;
+
+            fn = FOLD ((UCHAR) *n);
+
+            c = *p++;
+            for (;;)
+              {
+                if (!(flags & FNM_NOESCAPE) && c == L_('\\'))
+                  {
+                    if (*p == L_('\0'))
+                      return FNM_NOMATCH;
+                    c = FOLD ((UCHAR) *p);
+                    ++p;
+
+                    goto normal_bracket;
+                  }
+                else if (c == L_('[') && *p == L_(':'))
+                  {
+                    /* Leave room for the null.  */
+                    CHAR str[CHAR_CLASS_MAX_LENGTH + 1];
+                    size_t c1 = 0;
+#if defined _LIBC || WIDE_CHAR_SUPPORT
+                    wctype_t wt;
+#endif
+                    const CHAR *startp = p;
+
+                    for (;;)
+                      {
+                        if (c1 == CHAR_CLASS_MAX_LENGTH)
+                          /* The name is too long and therefore the pattern
+                             is ill-formed.  */
+                          return FNM_NOMATCH;
+
+                        c = *++p;
+                        if (c == L_(':') && p[1] == L_(']'))
+                          {
+                            p += 2;
+                            break;
+                          }
+                        if (c < L_('a') || c >= L_('z'))
+                          {
+                            /* This cannot possibly be a character class name.
+                               Match it as a normal range.  */
+                            p = startp;
+                            c = L_('[');
+                            goto normal_bracket;
+                          }
+                        str[c1++] = c;
+                      }
+                    str[c1] = L_('\0');
+
+#if defined _LIBC || WIDE_CHAR_SUPPORT
+                    wt = IS_CHAR_CLASS (str);
+                    if (wt == 0)
+                      /* Invalid character class name.  */
+                      return FNM_NOMATCH;
+
+# if defined _LIBC && ! WIDE_CHAR_VERSION
+                    /* The following code is glibc specific but does
+                       there a good job in speeding up the code since
+                       we can avoid the btowc() call.  */
+                    if (_ISCTYPE ((UCHAR) *n, wt))
+                      goto matched;
+# else
+                    if (ISWCTYPE (BTOWC ((UCHAR) *n), wt))
+                      goto matched;
+# endif
+#else
+                    if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n))
+                        || (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n))
+                        || (STREQ (str, L_("blank")) && isblank ((UCHAR) *n))
+                        || (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n))
+                        || (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n))
+                        || (STREQ (str, L_("graph")) && isgraph ((UCHAR) *n))
+                        || (STREQ (str, L_("lower")) && islower ((UCHAR) *n))
+                        || (STREQ (str, L_("print")) && isprint ((UCHAR) *n))
+                        || (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n))
+                        || (STREQ (str, L_("space")) && isspace ((UCHAR) *n))
+                        || (STREQ (str, L_("upper")) && isupper ((UCHAR) *n))
+                        || (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n)))
+                      goto matched;
+#endif
+                    c = *p++;
+                  }
+#ifdef _LIBC
+                else if (c == L_('[') && *p == L_('='))
+                  {
+                    UCHAR str[1];
+                    uint32_t nrules =
+                      _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+                    const CHAR *startp = p;
+
+                    c = *++p;
+                    if (c == L_('\0'))
+                      {
+                        p = startp;
+                        c = L_('[');
+                        goto normal_bracket;
+                      }
+                    str[0] = c;
+
+                    c = *++p;
+                    if (c != L_('=') || p[1] != L_(']'))
+                      {
+                        p = startp;
+                        c = L_('[');
+                        goto normal_bracket;
+                      }
+                    p += 2;
+
+                    if (nrules == 0)
+                      {
+                        if ((UCHAR) *n == str[0])
+                          goto matched;
+                      }
+                    else
+                      {
+                        const int32_t *table;
+# if WIDE_CHAR_VERSION
+                        const int32_t *weights;
+                        const int32_t *extra;
+# else
+                        const unsigned char *weights;
+                        const unsigned char *extra;
+# endif
+                        const int32_t *indirect;
+                        int32_t idx;
+                        const UCHAR *cp = (const UCHAR *) str;
+
+                        /* This #include defines a local function!  */
+# if WIDE_CHAR_VERSION
+#  include <locale/weightwc.h>
+# else
+#  include <locale/weight.h>
+# endif
+
+# if WIDE_CHAR_VERSION
+                        table = (const int32_t *)
+                          _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC);
+                        weights = (const int32_t *)
+                          _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC);
+                        extra = (const int32_t *)
+                          _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC);
+                        indirect = (const int32_t *)
+                          _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC);
+# else
+                        table = (const int32_t *)
+                          _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+                        weights = (const unsigned char *)
+                          _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB);
+                        extra = (const unsigned char *)
+                          _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+                        indirect = (const int32_t *)
+                          _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
+# endif
+
+                        idx = findidx (&cp);
+                        if (idx != 0)
+                          {
+                            /* We found a table entry.  Now see whether the
+                               character we are currently at has the same
+                               equivalance class value.  */
+                            int len = weights[idx & 0xffffff];
+                            int32_t idx2;
+                            const UCHAR *np = (const UCHAR *) n;
+
+                            idx2 = findidx (&np);
+                            if (idx2 != 0
+                                && (idx >> 24) == (idx2 >> 24)
+                                && len == weights[idx2 & 0xffffff])
+                              {
+                                int cnt = 0;
+
+                                idx &= 0xffffff;
+                                idx2 &= 0xffffff;
+
+                                while (cnt < len
+                                       && (weights[idx + 1 + cnt]
+                                           == weights[idx2 + 1 + cnt]))
+                                  ++cnt;
+
+                                if (cnt == len)
+                                  goto matched;
+                              }
+                          }
+                      }
+
+                    c = *p++;
+                  }
+#endif
+                else if (c == L_('\0'))
+                  /* [ (unterminated) loses.  */
+                  return FNM_NOMATCH;
+                else
+                  {
+                    bool is_range = false;
+
+#ifdef _LIBC
+                    bool is_seqval = false;
+
+                    if (c == L_('[') && *p == L_('.'))
+                      {
+                        uint32_t nrules =
+                          _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+                        const CHAR *startp = p;
+                        size_t c1 = 0;
+
+                        while (1)
+                          {
+                            c = *++p;
+                            if (c == L_('.') && p[1] == L_(']'))
+                              {
+                                p += 2;
+                                break;
+                              }
+                            if (c == '\0')
+                              return FNM_NOMATCH;
+                            ++c1;
+                          }
+
+                        /* We have to handling the symbols differently in
+                           ranges since then the collation sequence is
+                           important.  */
+                        is_range = *p == L_('-') && p[1] != L_('\0');
+
+                        if (nrules == 0)
+                          {
+                            /* There are no names defined in the collation
+                               data.  Therefore we only accept the trivial
+                               names consisting of the character itself.  */
+                            if (c1 != 1)
+                              return FNM_NOMATCH;
+
+                            if (!is_range && *n == startp[1])
+                              goto matched;
+
+                            cold = startp[1];
+                            c = *p++;
+                          }
+                        else
+                          {
+                            int32_t table_size;
+                            const int32_t *symb_table;
+# ifdef WIDE_CHAR_VERSION
+                            char str[c1];
+                            size_t strcnt;
+# else
+#  define str (startp + 1)
+# endif
+                            const unsigned char *extra;
+                            int32_t idx;
+                            int32_t elem;
+                            int32_t second;
+                            int32_t hash;
+
+# ifdef WIDE_CHAR_VERSION
+                            /* We have to convert the name to a single-byte
+                               string.  This is possible since the names
+                               consist of ASCII characters and the internal
+                               representation is UCS4.  */
+                            for (strcnt = 0; strcnt < c1; ++strcnt)
+                              str[strcnt] = startp[1 + strcnt];
+# endif
+
+                            table_size =
+                              _NL_CURRENT_WORD (LC_COLLATE,
+                                                _NL_COLLATE_SYMB_HASH_SIZEMB);
+                            symb_table = (const int32_t *)
+                              _NL_CURRENT (LC_COLLATE,
+                                           _NL_COLLATE_SYMB_TABLEMB);
+                            extra = (const unsigned char *)
+                              _NL_CURRENT (LC_COLLATE,
+                                           _NL_COLLATE_SYMB_EXTRAMB);
+
+                            /* Locate the character in the hashing table.  */
+                            hash = elem_hash (str, c1);
+
+                            idx = 0;
+                            elem = hash % table_size;
+                            if (symb_table[2 * elem] != 0)
+                              {
+                                second = hash % (table_size - 2) + 1;
+
+                                do
+                                  {
+                                    /* First compare the hashing value.  */
+                                    if (symb_table[2 * elem] == hash
+                                        && (c1
+                                            == extra[symb_table[2 * elem + 1]])
+                                        && memcmp (str,
+                                                   &extra[symb_table[2 * elem
+                                                                     + 1]
+                                                          + 1], c1) == 0)
+                                      {
+                                        /* Yep, this is the entry.  */
+                                        idx = symb_table[2 * elem + 1];
+                                        idx += 1 + extra[idx];
+                                        break;
+                                      }
+
+                                    /* Next entry.  */
+                                    elem += second;
+                                  }
+                                while (symb_table[2 * elem] != 0);
+                              }
+
+                            if (symb_table[2 * elem] != 0)
+                              {
+                                /* Compare the byte sequence but only if
+                                   this is not part of a range.  */
+# ifdef WIDE_CHAR_VERSION
+                                int32_t *wextra;
+
+                                idx += 1 + extra[idx];
+                                /* Adjust for the alignment.  */
+                                idx = (idx + 3) & ~3;
+
+                                wextra = (int32_t *) &extra[idx + 4];
+# endif
+
+                                if (! is_range)
+                                  {
+# ifdef WIDE_CHAR_VERSION
+                                    for (c1 = 0;
+                                         (int32_t) c1 < wextra[idx];
+                                         ++c1)
+                                      if (n[c1] != wextra[1 + c1])
+                                        break;
+
+                                    if ((int32_t) c1 == wextra[idx])
+                                      goto matched;
+# else
+                                    for (c1 = 0; c1 < extra[idx]; ++c1)
+                                      if (n[c1] != extra[1 + c1])
+                                        break;
+
+                                    if (c1 == extra[idx])
+                                      goto matched;
+# endif
+                                  }
+
+                                /* Get the collation sequence value.  */
+                                is_seqval = true;
+# ifdef WIDE_CHAR_VERSION
+                                cold = wextra[1 + wextra[idx]];
+# else
+                                /* Adjust for the alignment.  */
+                                idx += 1 + extra[idx];
+                                idx = (idx + 3) & ~4;
+                                cold = *((int32_t *) &extra[idx]);
+# endif
+
+                                c = *p++;
+                              }
+                            else if (c1 == 1)
+                              {
+                                /* No valid character.  Match it as a
+                                   single byte.  */
+                                if (!is_range && *n == str[0])
+                                  goto matched;
+
+                                cold = str[0];
+                                c = *p++;
+                              }
+                            else
+                              return FNM_NOMATCH;
+                          }
+                      }
+                    else
+# undef str
+#endif
+                      {
+                        c = FOLD (c);
+                      normal_bracket:
+
+                        /* We have to handling the symbols differently in
+                           ranges since then the collation sequence is
+                           important.  */
+                        is_range = (*p == L_('-') && p[1] != L_('\0')
+                                    && p[1] != L_(']'));
+
+                        if (!is_range && c == fn)
+                          goto matched;
+
+#if _LIBC
+                        /* This is needed if we goto normal_bracket; from
+                           outside of is_seqval's scope.  */
+                        is_seqval = false;
+#endif
+
+                        cold = c;
+                        c = *p++;
+                      }
+
+                    if (c == L_('-') && *p != L_(']'))
+                      {
+#if _LIBC
+                        /* We have to find the collation sequence
+                           value for C.  Collation sequence is nothing
+                           we can regularly access.  The sequence
+                           value is defined by the order in which the
+                           definitions of the collation values for the
+                           various characters appear in the source
+                           file.  A strange concept, nowhere
+                           documented.  */
+                        uint32_t fcollseq;
+                        uint32_t lcollseq;
+                        UCHAR cend = *p++;
+
+# ifdef WIDE_CHAR_VERSION
+                        /* Search in the `names' array for the characters.  */
+                        fcollseq = __collseq_table_lookup (collseq, fn);
+                        if (fcollseq == ~((uint32_t) 0))
+                          /* XXX We don't know anything about the character
+                             we are supposed to match.  This means we are
+                             failing.  */
+                          goto range_not_matched;
+
+                        if (is_seqval)
+                          lcollseq = cold;
+                        else
+                          lcollseq = __collseq_table_lookup (collseq, cold);
+# else
+                        fcollseq = collseq[fn];
+                        lcollseq = is_seqval ? cold : collseq[(UCHAR) cold];
+# endif
+
+                        is_seqval = false;
+                        if (cend == L_('[') && *p == L_('.'))
+                          {
+                            uint32_t nrules =
+                              _NL_CURRENT_WORD (LC_COLLATE,
+                                                _NL_COLLATE_NRULES);
+                            const CHAR *startp = p;
+                            size_t c1 = 0;
+
+                            while (1)
+                              {
+                                c = *++p;
+                                if (c == L_('.') && p[1] == L_(']'))
+                                  {
+                                    p += 2;
+                                    break;
+                                  }
+                                if (c == '\0')
+                                  return FNM_NOMATCH;
+                                ++c1;
+                              }
+
+                            if (nrules == 0)
+                              {
+                                /* There are no names defined in the
+                                   collation data.  Therefore we only
+                                   accept the trivial names consisting
+                                   of the character itself.  */
+                                if (c1 != 1)
+                                  return FNM_NOMATCH;
+
+                                cend = startp[1];
+                              }
+                            else
+                              {
+                                int32_t table_size;
+                                const int32_t *symb_table;
+# ifdef WIDE_CHAR_VERSION
+                                char str[c1];
+                                size_t strcnt;
+# else
+#  define str (startp + 1)
+# endif
+                                const unsigned char *extra;
+                                int32_t idx;
+                                int32_t elem;
+                                int32_t second;
+                                int32_t hash;
+
+# ifdef WIDE_CHAR_VERSION
+                                /* We have to convert the name to a single-byte
+                                   string.  This is possible since the names
+                                   consist of ASCII characters and the internal
+                                   representation is UCS4.  */
+                                for (strcnt = 0; strcnt < c1; ++strcnt)
+                                  str[strcnt] = startp[1 + strcnt];
+# endif
+
+                                table_size =
+                                  _NL_CURRENT_WORD (LC_COLLATE,
+                                                    _NL_COLLATE_SYMB_HASH_SIZEMB);
+                                symb_table = (const int32_t *)
+                                  _NL_CURRENT (LC_COLLATE,
+                                               _NL_COLLATE_SYMB_TABLEMB);
+                                extra = (const unsigned char *)
+                                  _NL_CURRENT (LC_COLLATE,
+                                               _NL_COLLATE_SYMB_EXTRAMB);
+
+                                /* Locate the character in the hashing
+                                   table.  */
+                                hash = elem_hash (str, c1);
+
+                                idx = 0;
+                                elem = hash % table_size;
+                                if (symb_table[2 * elem] != 0)
+                                  {
+                                    second = hash % (table_size - 2) + 1;
+
+                                    do
+                                      {
+                                        /* First compare the hashing value.  */
+                                        if (symb_table[2 * elem] == hash
+                                            && (c1
+                                                == extra[symb_table[2 * elem + 1]])
+                                            && memcmp (str,
+                                                       &extra[symb_table[2 * elem + 1]
+                                                              + 1], c1) == 0)
+                                          {
+                                            /* Yep, this is the entry.  */
+                                            idx = symb_table[2 * elem + 1];
+                                            idx += 1 + extra[idx];
+                                            break;
+                                          }
+
+                                        /* Next entry.  */
+                                        elem += second;
+                                      }
+                                    while (symb_table[2 * elem] != 0);
+                                  }
+
+                                if (symb_table[2 * elem] != 0)
+                                  {
+                                    /* Compare the byte sequence but only if
+                                       this is not part of a range.  */
+# ifdef WIDE_CHAR_VERSION
+                                    int32_t *wextra;
+
+                                    idx += 1 + extra[idx];
+                                    /* Adjust for the alignment.  */
+                                    idx = (idx + 3) & ~4;
+
+                                    wextra = (int32_t *) &extra[idx + 4];
+# endif
+                                    /* Get the collation sequence value.  */
+                                    is_seqval = true;
+# ifdef WIDE_CHAR_VERSION
+                                    cend = wextra[1 + wextra[idx]];
+# else
+                                    /* Adjust for the alignment.  */
+                                    idx += 1 + extra[idx];
+                                    idx = (idx + 3) & ~4;
+                                    cend = *((int32_t *) &extra[idx]);
+# endif
+                                  }
+                                else if (symb_table[2 * elem] != 0 && c1 == 1)
+                                  {
+                                    cend = str[0];
+                                    c = *p++;
+                                  }
+                                else
+                                  return FNM_NOMATCH;
+                              }
+# undef str
+                          }
+                        else
+                          {
+                            if (!(flags & FNM_NOESCAPE) && cend == L_('\\'))
+                              cend = *p++;
+                            if (cend == L_('\0'))
+                              return FNM_NOMATCH;
+                            cend = FOLD (cend);
+                          }
+
+                        /* XXX It is not entirely clear to me how to handle
+                           characters which are not mentioned in the
+                           collation specification.  */
+                        if (
+# ifdef WIDE_CHAR_VERSION
+                            lcollseq == 0xffffffff ||
+# endif
+                            lcollseq <= fcollseq)
+                          {
+                            /* We have to look at the upper bound.  */
+                            uint32_t hcollseq;
+
+                            if (is_seqval)
+                              hcollseq = cend;
+                            else
+                              {
+# ifdef WIDE_CHAR_VERSION
+                                hcollseq =
+                                  __collseq_table_lookup (collseq, cend);
+                                if (hcollseq == ~((uint32_t) 0))
+                                  {
+                                    /* Hum, no information about the upper
+                                       bound.  The matching succeeds if the
+                                       lower bound is matched exactly.  */
+                                    if (lcollseq != fcollseq)
+                                      goto range_not_matched;
+
+                                    goto matched;
+                                  }
+# else
+                                hcollseq = collseq[cend];
+# endif
+                              }
+
+                            if (lcollseq <= hcollseq && fcollseq <= hcollseq)
+                              goto matched;
+                          }
+# ifdef WIDE_CHAR_VERSION
+                      range_not_matched:
+# endif
+#else
+                        /* We use a boring value comparison of the character
+                           values.  This is better than comparing using
+                           `strcoll' since the latter would have surprising
+                           and sometimes fatal consequences.  */
+                        UCHAR cend = *p++;
+
+                        if (!(flags & FNM_NOESCAPE) && cend == L_('\\'))
+                          cend = *p++;
+                        if (cend == L_('\0'))
+                          return FNM_NOMATCH;
+
+                        /* It is a range.  */
+                        if (cold <= fn && fn <= cend)
+                          goto matched;
+#endif
+
+                        c = *p++;
+                      }
+                  }
+
+                if (c == L_(']'))
+                  break;
+              }
+
+            if (!not)
+              return FNM_NOMATCH;
+            break;
+
+          matched:
+            /* Skip the rest of the [...] that already matched.  */
+            do
+              {
+              ignore_next:
+                c = *p++;
+
+                if (c == L_('\0'))
+                  /* [... (unterminated) loses.  */
+                  return FNM_NOMATCH;
+
+                if (!(flags & FNM_NOESCAPE) && c == L_('\\'))
+                  {
+                    if (*p == L_('\0'))
+                      return FNM_NOMATCH;
+                    /* XXX 1003.2d11 is unclear if this is right.  */
+                    ++p;
+                  }
+                else if (c == L_('[') && *p == L_(':'))
+                  {
+                    int c1 = 0;
+                    const CHAR *startp = p;
+
+                    while (1)
+                      {
+                        c = *++p;
+                        if (++c1 == CHAR_CLASS_MAX_LENGTH)
+                          return FNM_NOMATCH;
+
+                        if (*p == L_(':') && p[1] == L_(']'))
+                          break;
+
+                        if (c < L_('a') || c >= L_('z'))
+                          {
+                            p = startp;
+                            goto ignore_next;
+                          }
+                      }
+                    p += 2;
+                    c = *p++;
+                  }
+                else if (c == L_('[') && *p == L_('='))
+                  {
+                    c = *++p;
+                    if (c == L_('\0'))
+                      return FNM_NOMATCH;
+                    c = *++p;
+                    if (c != L_('=') || p[1] != L_(']'))
+                      return FNM_NOMATCH;
+                    p += 2;
+                    c = *p++;
+                  }
+                else if (c == L_('[') && *p == L_('.'))
+                  {
+                    ++p;
+                    while (1)
+                      {
+                        c = *++p;
+                        if (c == '\0')
+                          return FNM_NOMATCH;
+
+                        if (*p == L_('.') && p[1] == L_(']'))
+                          break;
+                      }
+                    p += 2;
+                    c = *p++;
+                  }
+              }
+            while (c != L_(']'));
+            if (not)
+              return FNM_NOMATCH;
+          }
+          break;
+
+        case L_('+'):
+        case L_('@'):
+        case L_('!'):
+          if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
+            {
+              int res;
+
+              res = EXT (c, p, n, string_end, no_leading_period, flags);
+              if (res != -1)
+                return res;
+            }
+          goto normal_match;
+
+        case L_('/'):
+          if (NO_LEADING_PERIOD (flags))
+            {
+              if (n == string_end || c != (UCHAR) *n)
+                return FNM_NOMATCH;
+
+              new_no_leading_period = true;
+              break;
+            }
+          /* FALLTHROUGH */
+        default:
+        normal_match:
+          if (n == string_end || c != FOLD ((UCHAR) *n))
+            return FNM_NOMATCH;
+        }
+
+      no_leading_period = new_no_leading_period;
+      ++n;
+    }
+
+  if (n == string_end)
+    return 0;
+
+  if ((flags & FNM_LEADING_DIR) && n != string_end && *n == L_('/'))
+    /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz".  */
+    return 0;
+
+  return FNM_NOMATCH;
+}
+
+
+static const CHAR *
+internal_function
+END (const CHAR *pattern)
+{
+  const CHAR *p = pattern;
+
+  while (1)
+    if (*++p == L_('\0'))
+      /* This is an invalid pattern.  */
+      return pattern;
+    else if (*p == L_('['))
+      {
+        /* Handle brackets special.  */
+        if (posixly_correct == 0)
+          posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1;
+
+        /* Skip the not sign.  We have to recognize it because of a possibly
+           following ']'.  */
+        if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^')))
+          ++p;
+        /* A leading ']' is recognized as such.  */
+        if (*p == L_(']'))
+          ++p;
+        /* Skip over all characters of the list.  */
+        while (*p != L_(']'))
+          if (*p++ == L_('\0'))
+            /* This is no valid pattern.  */
+            return pattern;
+      }
+    else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@')
+              || *p == L_('!')) && p[1] == L_('('))
+      p = END (p + 1);
+    else if (*p == L_(')'))
+      break;
+
+  return p + 1;
+}
+
+
+static int
+internal_function
+EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
+     bool no_leading_period, int flags)
+{
+  const CHAR *startp;
+  size_t level;
+  struct patternlist
+  {
+    struct patternlist *next;
+    CHAR str[1];
+  } *list = NULL;
+  struct patternlist **lastp = &list;
+  size_t pattern_len = STRLEN (pattern);
+  const CHAR *p;
+  const CHAR *rs;
+  enum { ALLOCA_LIMIT = 8000 };
+
+  /* Parse the pattern.  Store the individual parts in the list.  */
+  level = 0;
+  for (startp = p = pattern + 1; ; ++p)
+    if (*p == L_('\0'))
+      /* This is an invalid pattern.  */
+      return -1;
+    else if (*p == L_('['))
+      {
+        /* Handle brackets special.  */
+        if (posixly_correct == 0)
+          posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1;
+
+        /* Skip the not sign.  We have to recognize it because of a possibly
+           following ']'.  */
+        if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^')))
+          ++p;
+        /* A leading ']' is recognized as such.  */
+        if (*p == L_(']'))
+          ++p;
+        /* Skip over all characters of the list.  */
+        while (*p != L_(']'))
+          if (*p++ == L_('\0'))
+            /* This is no valid pattern.  */
+            return -1;
+      }
+    else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@')
+              || *p == L_('!')) && p[1] == L_('('))
+      /* Remember the nesting level.  */
+      ++level;
+    else if (*p == L_(')'))
+      {
+        if (level-- == 0)
+          {
+            /* This means we found the end of the pattern.  */
+#define NEW_PATTERN \
+            struct patternlist *newp;                                         \
+            size_t plen;                                                      \
+            size_t plensize;                                                  \
+            size_t newpsize;                                                  \
+                                                                              \
+            plen = (opt == L_('?') || opt == L_('@')                          \
+                    ? pattern_len                                             \
+                    : p - startp + 1UL);                                      \
+            plensize = plen * sizeof (CHAR);                                  \
+            newpsize = offsetof (struct patternlist, str) + plensize;         \
+            if ((size_t) -1 / sizeof (CHAR) < plen                            \
+                || newpsize < offsetof (struct patternlist, str)              \
+                || ALLOCA_LIMIT <= newpsize)                                  \
+              return -1;                                                      \
+            newp = (struct patternlist *) alloca (newpsize);                  \
+            *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0');    \
+            newp->next = NULL;                                                \
+            *lastp = newp;                                                    \
+            lastp = &newp->next
+            NEW_PATTERN;
+            break;
+          }
+      }
+    else if (*p == L_('|'))
+      {
+        if (level == 0)
+          {
+            NEW_PATTERN;
+            startp = p + 1;
+          }
+      }
+  assert (list != NULL);
+  assert (p[-1] == L_(')'));
+#undef NEW_PATTERN
+
+  switch (opt)
+    {
+    case L_('*'):
+      if (FCT (p, string, string_end, no_leading_period, flags) == 0)
+        return 0;
+      /* FALLTHROUGH */
+
+    case L_('+'):
+      do
+        {
+          for (rs = string; rs <= string_end; ++rs)
+            /* First match the prefix with the current pattern with the
+               current pattern.  */
+            if (FCT (list->str, string, rs, no_leading_period,
+                     flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0
+                /* This was successful.  Now match the rest with the rest
+                   of the pattern.  */
+                && (FCT (p, rs, string_end,
+                         rs == string
+                         ? no_leading_period
+                         : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
+                         flags & FNM_FILE_NAME
+                         ? flags : flags & ~FNM_PERIOD) == 0
+                    /* This didn't work.  Try the whole pattern.  */
+                    || (rs != string
+                        && FCT (pattern - 1, rs, string_end,
+                                rs == string
+                                ? no_leading_period
+                                : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
+                                flags & FNM_FILE_NAME
+                                ? flags : flags & ~FNM_PERIOD) == 0)))
+              /* It worked.  Signal success.  */
+              return 0;
+        }
+      while ((list = list->next) != NULL);
+
+      /* None of the patterns lead to a match.  */
+      return FNM_NOMATCH;
+
+    case L_('?'):
+      if (FCT (p, string, string_end, no_leading_period, flags) == 0)
+        return 0;
+      /* FALLTHROUGH */
+
+    case L_('@'):
+      do
+        /* I cannot believe it but `strcat' is actually acceptable
+           here.  Match the entire string with the prefix from the
+           pattern list and the rest of the pattern following the
+           pattern list.  */
+        if (FCT (STRCAT (list->str, p), string, string_end,
+                 no_leading_period,
+                 flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0)
+          /* It worked.  Signal success.  */
+          return 0;
+      while ((list = list->next) != NULL);
+
+      /* None of the patterns lead to a match.  */
+      return FNM_NOMATCH;
+
+    case L_('!'):
+      for (rs = string; rs <= string_end; ++rs)
+        {
+          struct patternlist *runp;
+
+          for (runp = list; runp != NULL; runp = runp->next)
+            if (FCT (runp->str, string, rs,  no_leading_period,
+                     flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0)
+              break;
+
+          /* If none of the patterns matched see whether the rest does.  */
+          if (runp == NULL
+              && (FCT (p, rs, string_end,
+                       rs == string
+                       ? no_leading_period
+                       : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
+                       flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD)
+                  == 0))
+            /* This is successful.  */
+            return 0;
+        }
+
+      /* None of the patterns together with the rest of the pattern
+         lead to a match.  */
+      return FNM_NOMATCH;
+
+    default:
+      assert (! "Invalid extended matching operator");
+      break;
+    }
+
+  return -1;
+}
+
+
+#undef FOLD
+#undef CHAR
+#undef UCHAR
+#undef INT
+#undef FCT
+#undef EXT
+#undef END
+#undef MEMPCPY
+#undef MEMCHR
+#undef STRCOLL
+#undef STRLEN
+#undef STRCAT
+#undef L_
+#undef BTOWC
diff --git a/gnulib/lib/fopen-safer.c b/gnulib/lib/fopen-safer.c
new file mode 100644 (file)
index 0000000..c0a1f16
--- /dev/null
@@ -0,0 +1,63 @@
+/* Invoke fopen, but avoid some glitches.
+
+   Copyright (C) 2001, 2004-2006, 2009-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 Paul Eggert.  */
+
+#include <config.h>
+
+#include "stdio-safer.h"
+
+#include <errno.h>
+#include <unistd.h>
+#include "unistd-safer.h"
+
+/* Like fopen, but do not return stdin, stdout, or stderr.  */
+
+FILE *
+fopen_safer (char const *file, char const *mode)
+{
+  FILE *fp = fopen (file, mode);
+
+  if (fp)
+    {
+      int fd = fileno (fp);
+
+      if (0 <= fd && fd <= STDERR_FILENO)
+        {
+          int f = dup_safer (fd);
+
+          if (f < 0)
+            {
+              int e = errno;
+              fclose (fp);
+              errno = e;
+              return NULL;
+            }
+
+          if (fclose (fp) != 0
+              || ! (fp = fdopen (f, mode)))
+            {
+              int e = errno;
+              close (f);
+              errno = e;
+              return NULL;
+            }
+        }
+    }
+
+  return fp;
+}
diff --git a/gnulib/lib/fopen.c b/gnulib/lib/fopen.c
new file mode 100644 (file)
index 0000000..81c8617
--- /dev/null
@@ -0,0 +1,105 @@
+/* Open a stream to a file.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+/* Get the original definition of fopen.  It might be defined as a macro.  */
+#define __need_FILE
+#include <stdio.h>
+#undef __need_FILE
+
+static inline FILE *
+orig_fopen (const char *filename, const char *mode)
+{
+  return fopen (filename, mode);
+}
+
+/* Specification.  */
+#include <stdio.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+FILE *
+rpl_fopen (const char *filename, const char *mode)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  if (strcmp (filename, "/dev/null") == 0)
+    filename = "NUL";
+#endif
+
+#if FOPEN_TRAILING_SLASH_BUG
+  /* If the filename ends in a slash and a mode that requires write access is
+     specified, then fail.
+     Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
+     says that
+       "A pathname that contains at least one non-slash character and that
+        ends with one or more trailing slashes shall be resolved as if a
+        single dot character ( '.' ) were appended to the pathname."
+     and
+       "The special filename dot shall refer to the directory specified by
+        its predecessor."
+     If the named file already exists as a directory, then if a mode that
+     requires write access is specified, fopen() must fail because POSIX
+     <http://www.opengroup.org/susv3/functions/fopen.html> says that it
+     fails with errno = EISDIR in this case.
+     If the named file does not exist or does not name a directory, then
+     fopen() must fail since the file does not contain a '.' directory.  */
+  {
+    size_t len = strlen (filename);
+    if (len > 0 && filename[len - 1] == '/')
+      {
+        int fd;
+        struct stat statbuf;
+        FILE *fp;
+
+        if (mode[0] == 'w' || mode[0] == 'a')
+          {
+            errno = EISDIR;
+            return NULL;
+          }
+
+        fd = open (filename, O_RDONLY);
+        if (fd < 0)
+          return NULL;
+
+        if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
+          {
+            close (fd);
+            errno = ENOTDIR;
+            return NULL;
+          }
+
+        fp = fdopen (fd, mode);
+        if (fp == NULL)
+          {
+            int saved_errno = errno;
+            close (fd);
+            errno = saved_errno;
+          }
+        return fp;
+      }
+  }
+# endif
+
+  return orig_fopen (filename, mode);
+}
diff --git a/gnulib/lib/fpending.c b/gnulib/lib/fpending.c
new file mode 100644 (file)
index 0000000..5ec38cb
--- /dev/null
@@ -0,0 +1,30 @@
+/* fpending.c -- return the number of pending output bytes on a stream
+   Copyright (C) 2000, 2004, 2006-2007, 2009-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 Jim Meyering. */
+
+#include <config.h>
+
+#include "fpending.h"
+
+/* Return the number of pending (aka buffered, unflushed)
+   bytes on the stream, FP, that is open for writing.  */
+size_t
+__fpending (FILE *fp)
+{
+  return PENDING_OUTPUT_N_BYTES;
+}
diff --git a/gnulib/lib/fpending.h b/gnulib/lib/fpending.h
new file mode 100644 (file)
index 0000000..d7994f7
--- /dev/null
@@ -0,0 +1,34 @@
+/* Declare __fpending.
+
+   Copyright (C) 2000, 2003, 2005-2006, 2009-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 Jim Meyering.  */
+
+#include <stddef.h>
+#include <stdio.h>
+
+#ifndef HAVE_DECL___FPENDING
+"this configure-time declaration test was not run"
+#endif
+
+#if HAVE_DECL___FPENDING
+# if HAVE_STDIO_EXT_H
+#  include <stdio_ext.h>
+# endif
+#else
+size_t __fpending (FILE *);
+#endif
diff --git a/gnulib/lib/fpurge.c b/gnulib/lib/fpurge.c
new file mode 100644 (file)
index 0000000..7e69fb4
--- /dev/null
@@ -0,0 +1,137 @@
+/* Flushing buffers of a FILE stream.
+   Copyright (C) 2007-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdio.h>
+
+#if HAVE___FPURGE                   /* glibc >= 2.2, Haiku, Solaris >= 7 */
+# include <stdio_ext.h>
+#endif
+#include <stdlib.h>
+
+#include "stdio-impl.h"
+
+int
+fpurge (FILE *fp)
+{
+#if HAVE___FPURGE                   /* glibc >= 2.2, Haiku, Solaris >= 7 */
+
+  __fpurge (fp);
+  /* The __fpurge function does not have a return value.  */
+  return 0;
+
+#elif HAVE_FPURGE                   /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin 1.7 */
+
+  /* Call the system's fpurge function.  */
+# undef fpurge
+# if !HAVE_DECL_FPURGE
+  extern int fpurge (FILE *);
+# endif
+  int result = fpurge (fp);
+# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+  if (result == 0)
+    /* Correct the invariants that fpurge broke.
+       <stdio.h> on BSD systems says:
+         "The following always hold: if _flags & __SRD, _w is 0."
+       If this invariant is not fulfilled and the stream is read-write but
+       currently reading, subsequent putc or fputc calls will write directly
+       into the buffer, although they shouldn't be allowed to.  */
+    if ((fp_->_flags & __SRD) != 0)
+      fp_->_w = 0;
+# endif
+  return result;
+
+#else
+
+  /* Most systems provide FILE as a struct and the necessary bitmask in
+     <stdio.h>, because they need it for implementing getc() and putc() as
+     fast macros.  */
+# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+  fp->_IO_read_end = fp->_IO_read_ptr;
+  fp->_IO_write_ptr = fp->_IO_write_base;
+  /* Avoid memory leak when there is an active ungetc buffer.  */
+  if (fp->_IO_save_base != NULL)
+    {
+      free (fp->_IO_save_base);
+      fp->_IO_save_base = NULL;
+    }
+  return 0;
+# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+  fp_->_p = fp_->_bf._base;
+  fp_->_r = 0;
+  fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */
+             ? fp_->_bf._size
+             : 0);
+  /* Avoid memory leak when there is an active ungetc buffer.  */
+  if (fp_ub._base != NULL)
+    {
+      if (fp_ub._base != fp_->_ubuf)
+        free (fp_ub._base);
+      fp_ub._base = NULL;
+    }
+  return 0;
+# elif defined __EMX__              /* emx+gcc */
+  fp->_ptr = fp->_buffer;
+  fp->_rcount = 0;
+  fp->_wcount = 0;
+  fp->_ungetc_count = 0;
+  return 0;
+# elif defined _IOERR               /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+  fp->_ptr = fp->_base;
+  if (fp->_ptr != NULL)
+    fp->_cnt = 0;
+  return 0;
+# elif defined __UCLIBC__           /* uClibc */
+#  ifdef __STDIO_BUFFERS
+  if (fp->__modeflags & __FLAG_WRITING)
+    fp->__bufpos = fp->__bufstart;
+  else if (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING))
+    fp->__bufpos = fp->__bufread;
+#  endif
+  return 0;
+# elif defined __QNX__              /* QNX */
+  fp->_Rback = fp->_Back + sizeof (fp->_Back);
+  fp->_Rsave = NULL;
+  if (fp->_Mode & 0x2000 /* _MWRITE */)
+    /* fp->_Buf <= fp->_Next <= fp->_Wend */
+    fp->_Next = fp->_Buf;
+  else
+    /* fp->_Buf <= fp->_Next <= fp->_Rend */
+    fp->_Rend = fp->_Next;
+  return 0;
+# elif defined __MINT__             /* Atari FreeMiNT */
+  if (fp->__pushed_back)
+    {
+      fp->__bufp = fp->__pushback_bufp;
+      fp->__pushed_back = 0;
+    }
+  /* Preserve the current file position.  */
+  if (fp->__target != -1)
+    fp->__target += fp->__bufp - fp->__buffer;
+  fp->__bufp = fp->__buffer;
+  /* Nothing in the buffer, next getc is nontrivial.  */
+  fp->__get_limit = fp->__bufp;
+  /* Nothing in the buffer, next putc is nontrivial.  */
+  fp->__put_limit = fp->__buffer;
+  return 0;
+# else
+#  error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."
+# endif
+
+#endif
+}
diff --git a/gnulib/lib/freadahead.c b/gnulib/lib/freadahead.c
new file mode 100644 (file)
index 0000000..27f5c95
--- /dev/null
@@ -0,0 +1,85 @@
+/* Retrieve information about a FILE stream.
+   Copyright (C) 2007-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "freadahead.h"
+
+#include <stdlib.h>
+#include "stdio-impl.h"
+
+size_t
+freadahead (FILE *fp)
+{
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+  if (fp->_IO_write_ptr > fp->_IO_write_base)
+    return 0;
+  return (fp->_IO_read_end - fp->_IO_read_ptr)
+         + (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base :
+            0);
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+  if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
+    return 0;
+# if defined __DragonFly__
+  return __sreadahead (fp);
+# else
+  return fp_->_r
+         + (HASUB (fp) ? fp_->_ur : 0);
+# endif
+#elif defined __EMX__               /* emx+gcc */
+  if ((fp->_flags & _IOWRT) != 0)
+    return 0;
+  /* Note: fp->_ungetc_count > 0 implies fp->_rcount <= 0,
+           fp->_ungetc_count = 0 implies fp->_rcount >= 0.  */
+  /* equivalent to
+     (fp->_ungetc_count == 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount) */
+  return (fp->_rcount > 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount);
+#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+  if ((fp_->_flag & _IOWRT) != 0)
+    return 0;
+  return fp_->_cnt;
+#elif defined __UCLIBC__            /* uClibc */
+# ifdef __STDIO_BUFFERS
+  if (fp->__modeflags & __FLAG_WRITING)
+    return 0;
+  return (fp->__bufread - fp->__bufpos)
+         + (fp->__modeflags & __FLAG_UNGOT ? 1 : 0);
+# else
+  return 0;
+# endif
+#elif defined __QNX__               /* QNX */
+  if ((fp->_Mode & 0x2000 /* _MWRITE */) != 0)
+    return 0;
+  /* fp->_Buf <= fp->_Next <= fp->_Rend,
+     and fp->_Rend may be overridden by fp->_Rsave. */
+  return ((fp->_Rsave ? fp->_Rsave : fp->_Rend) - fp->_Next)
+         + (fp->_Mode & 0x4000 /* _MBYTE */
+            ? (fp->_Back + sizeof (fp->_Back)) - fp->_Rback
+            : 0);
+#elif defined __MINT__              /* Atari FreeMiNT */
+  if (!fp->__mode.__read)
+    return 0;
+  return (fp->__pushed_back
+          ? fp->__get_limit - fp->__pushback_bufp + 1
+          : fp->__get_limit - fp->__bufp);
+#elif defined SLOW_BUT_NO_HACKS     /* users can define this */
+  abort ();
+  return 0;
+#else
+ #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
+#endif
+}
diff --git a/gnulib/lib/freadahead.h b/gnulib/lib/freadahead.h
new file mode 100644 (file)
index 0000000..af03b89
--- /dev/null
@@ -0,0 +1,38 @@
+/* Retrieve information about a FILE stream.
+   Copyright (C) 2007-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/>.  */
+
+#include <stddef.h>
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Assuming the stream STREAM is open for reading:
+   Return the number of bytes waiting in the input buffer of STREAM.
+   This includes both the bytes that have been read from the underlying input
+   source and the bytes that have been pushed back through 'ungetc'.
+
+   If this number is 0 and the stream is not currently writing,
+   fflush (STREAM) is known to be a no-op.
+
+   STREAM must not be wide-character oriented.  */
+
+extern size_t freadahead (FILE *stream);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gnulib/lib/freading.c b/gnulib/lib/freading.c
new file mode 100644 (file)
index 0000000..51aed0e
--- /dev/null
@@ -0,0 +1,68 @@
+/* Retrieve information about a FILE stream.
+   Copyright (C) 2007-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "freading.h"
+
+#include "stdio-impl.h"
+
+/* Don't use glibc's __freading function in glibc < 2.7, see
+   <http://sourceware.org/bugzilla/show_bug.cgi?id=4359>  */
+#if !(HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)))
+
+bool
+freading (FILE *fp)
+{
+  /* Most systems provide FILE as a struct and the necessary bitmask in
+     <stdio.h>, because they need it for implementing getc() and putc() as
+     fast macros.  */
+# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+  return ((fp->_flags & _IO_NO_WRITES) != 0
+          || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
+              && fp->_IO_read_base != NULL));
+# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+  return (fp_->_flags & __SRD) != 0;
+# elif defined __EMX__               /* emx+gcc */
+  return (fp->_flags & _IOREAD) != 0;
+# elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+#  if defined __sun                  /* Solaris */
+  return (fp->_flag & _IOREAD) != 0 && (fp->_flag & _IOWRT) == 0;
+#  else
+  return (fp->_flag & _IOREAD) != 0;
+#  endif
+# elif defined __UCLIBC__            /* uClibc */
+  return (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) != 0;
+# elif defined __QNX__               /* QNX */
+  return ((fp->_Mode & 0x2 /* _MOPENW */) == 0
+          || (fp->_Mode & 0x1000 /* _MREAD */) != 0);
+# elif defined __MINT__              /* Atari FreeMiNT */
+  if (!fp->__mode.__write)
+    return 1;
+  if (!fp->__mode.__read)
+    return 0;
+#  ifdef _IO_CURRENTLY_GETTING /* Flag added on 2009-02-28 */
+  return (fp->__flags & _IO_CURRENTLY_GETTING) != 0;
+#  else
+  return (fp->__buffer < fp->__get_limit /*|| fp->__bufp == fp->__put_limit ??*/);
+#  endif
+# else
+#  error "Please port gnulib freading.c to your platform!"
+# endif
+}
+
+#endif
diff --git a/gnulib/lib/freading.h b/gnulib/lib/freading.h
new file mode 100644 (file)
index 0000000..a19aea6
--- /dev/null
@@ -0,0 +1,53 @@
+/* Retrieve information about a FILE stream.
+   Copyright (C) 2007-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/>.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+
+/* Return true if the stream STREAM is opened read-only, or if the
+   last operation on the stream was a read operation.  Return false if
+   the stream is opened write-only or append-only, or if it supports
+   writing and there is no current read operation (such as fgetc).
+
+   freading and fwriting will never both be true.  If STREAM supports
+   both reads and writes, then:
+     - both freading and fwriting might be false when the stream is first
+       opened, after read encounters EOF, or after fflush,
+     - freading might be false or true and fwriting might be false
+       after repositioning (such as fseek, fsetpos, or rewind),
+   depending on the underlying implementation.
+
+   STREAM must not be wide-character oriented.  */
+
+#if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
+/* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7  */
+
+# include <stdio_ext.h>
+# define freading(stream) (__freading (stream) != 0)
+
+#else
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+extern bool freading (FILE *stream);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/gnulib/lib/fseeko.c b/gnulib/lib/fseeko.c
new file mode 100644 (file)
index 0000000..2dd4cdc
--- /dev/null
@@ -0,0 +1,146 @@
+/* An fseeko() function that, together with fflush(), is POSIX compliant.
+   Copyright (C) 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdio.h>
+
+/* Get off_t and lseek.  */
+#include <unistd.h>
+
+#include "stdio-impl.h"
+
+int
+fseeko (FILE *fp, off_t offset, int whence)
+#undef fseeko
+#if !HAVE_FSEEKO
+# undef fseek
+# define fseeko fseek
+#endif
+{
+#if LSEEK_PIPE_BROKEN
+  /* mingw gives bogus answers rather than failure on non-seekable files.  */
+  if (lseek (fileno (fp), 0, SEEK_CUR) == -1)
+    return EOF;
+#endif
+
+  /* These tests are based on fpurge.c.  */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+  if (fp->_IO_read_end == fp->_IO_read_ptr
+      && fp->_IO_write_ptr == fp->_IO_write_base
+      && fp->_IO_save_base == NULL)
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __SL64 && defined __SCLE /* Cygwin */
+  if ((fp->_flags & __SL64) == 0)
+    {
+      /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit
+         mode; but has an fseeko that requires 64-bit mode.  */
+      FILE *tmp = fopen ("/dev/null", "r");
+      if (!tmp)
+        return -1;
+      fp->_flags |= __SL64;
+      fp->_seek64 = tmp->_seek64;
+      fclose (tmp);
+    }
+# endif
+  if (fp_->_p == fp_->_bf._base
+      && fp_->_r == 0
+      && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */
+                     ? fp_->_bf._size
+                     : 0)
+      && fp_ub._base == NULL)
+#elif defined __EMX__               /* emx+gcc */
+  if (fp->_ptr == fp->_buffer
+      && fp->_rcount == 0
+      && fp->_wcount == 0
+      && fp->_ungetc_count == 0)
+#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+  if (fp_->_ptr == fp_->_base
+      && (fp_->_ptr == NULL || fp_->_cnt == 0))
+#elif defined __UCLIBC__            /* uClibc */
+  if (((fp->__modeflags & __FLAG_WRITING) == 0
+       || fp->__bufpos == fp->__bufstart)
+      && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0
+          || fp->__bufpos == fp->__bufread))
+#elif defined __QNX__               /* QNX */
+  if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend)
+      && fp->_Rback == fp->_Back + sizeof (fp->_Back)
+      && fp->_Rsave == NULL)
+#elif defined __MINT__              /* Atari FreeMiNT */
+  if (fp->__bufp == fp->__buffer
+      && fp->__get_limit == fp->__bufp
+      && fp->__put_limit == fp->__bufp
+      && !fp->__pushed_back)
+#else
+  #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib."
+#endif
+    {
+      /* We get here when an fflush() call immediately preceded this one.  We
+         know there are no buffers.
+         POSIX requires us to modify the file descriptor's position.
+         But we cannot position beyond end of file here.  */
+      off_t pos =
+        lseek (fileno (fp),
+               whence == SEEK_END && offset > 0 ? 0 : offset,
+               whence);
+      if (pos == -1)
+        {
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+          fp_->_flags &= ~__SOFF;
+#endif
+          return -1;
+        }
+
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+      fp->_flags &= ~_IO_EOF_SEEN;
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __CYGWIN__
+      /* fp_->_offset is typed as an integer.  */
+      fp_->_offset = pos;
+# else
+      /* fp_->_offset is an fpos_t.  */
+      {
+        /* Use a union, since on NetBSD, the compilation flags
+           determine whether fpos_t is typedef'd to off_t or a struct
+           containing a single off_t member.  */
+        union
+          {
+            fpos_t f;
+            off_t o;
+          } u;
+        u.o = pos;
+        fp_->_offset = u.f;
+      }
+# endif
+      fp_->_flags |= __SOFF;
+      fp_->_flags &= ~__SEOF;
+#elif defined __EMX__               /* emx+gcc */
+      fp->_flags &= ~_IOEOF;
+#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+      fp->_flag &= ~_IOEOF;
+#elif defined __MINT__              /* Atari FreeMiNT */
+      fp->__offset = pos;
+      fp->__eof = 0;
+#endif
+      /* If we were not requested to position beyond end of file, we're
+         done.  */
+      if (!(whence == SEEK_END && offset > 0))
+        return 0;
+    }
+  return fseeko (fp, offset, whence);
+}
diff --git a/gnulib/lib/fstatat.c b/gnulib/lib/fstatat.c
new file mode 100644 (file)
index 0000000..16d60f6
--- /dev/null
@@ -0,0 +1,110 @@
+/* Work around an fstatat bug on Solaris 9.
+
+   Copyright (C) 2006, 2009-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 Paul Eggert and Jim Meyering.  */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+
+#if HAVE_FSTATAT
+
+# undef fstatat
+
+/* fstatat should always follow symbolic links that end in /, but on
+   Solaris 9 it doesn't if AT_SYMLINK_NOFOLLOW is specified.
+   Likewise, trailing slash on a non-directory should be an error.
+   These are the same problems that lstat.c and stat.c address, so
+   solve it in a similar way.  */
+
+int
+rpl_fstatat (int fd, char const *file, struct stat *st, int flag)
+{
+  int result = fstatat (fd, file, st, flag);
+  size_t len;
+
+  if (result != 0)
+    return result;
+  len = strlen (file);
+  if (flag & AT_SYMLINK_NOFOLLOW)
+    {
+      /* Fix lstat behavior.  */
+      if (file[len - 1] != '/' || S_ISDIR (st->st_mode))
+        return 0;
+      if (!S_ISLNK (st->st_mode))
+        {
+          errno = ENOTDIR;
+          return -1;
+        }
+      result = fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW);
+    }
+  /* Fix stat behavior.  */
+  if (result == 0 && !S_ISDIR (st->st_mode) && file[len - 1] == '/')
+    {
+      errno = ENOTDIR;
+      return -1;
+    }
+  return result;
+}
+
+#else /* !HAVE_FSTATAT */
+
+/* On mingw, the gnulib <sys/stat.h> defines `stat' as a function-like
+   macro; but using it in AT_FUNC_F2 causes compilation failure
+   because the preprocessor sees a use of a macro that requires two
+   arguments but is only given one.  Hence, we need an inline
+   forwarder to get past the preprocessor.  */
+static inline int
+stat_func (char const *name, struct stat *st)
+{
+  return stat (name, st);
+}
+
+/* Likewise, if there is no native `lstat', then the gnulib
+   <sys/stat.h> defined it as stat, which also needs adjustment.  */
+# if !HAVE_LSTAT
+#  undef lstat
+#  define lstat stat_func
+# endif
+
+/* Replacement for Solaris' function by the same name.
+   <http://www.google.com/search?q=fstatat+site:docs.sun.com>
+   First, try to simulate it via l?stat ("/proc/self/fd/FD/FILE").
+   Failing that, simulate it via save_cwd/fchdir/(stat|lstat)/restore_cwd.
+   If either the save_cwd or the restore_cwd fails (relatively unlikely),
+   then give a diagnostic and exit nonzero.
+   Otherwise, this function works just like Solaris' fstatat.  */
+
+# define AT_FUNC_NAME fstatat
+# define AT_FUNC_F1 lstat
+# define AT_FUNC_F2 stat_func
+# define AT_FUNC_USE_F1_COND AT_SYMLINK_NOFOLLOW
+# define AT_FUNC_POST_FILE_PARAM_DECLS , struct stat *st, int flag
+# define AT_FUNC_POST_FILE_ARGS        , st
+# include "at-func.c"
+# undef AT_FUNC_NAME
+# undef AT_FUNC_F1
+# undef AT_FUNC_F2
+# undef AT_FUNC_USE_F1_COND
+# undef AT_FUNC_POST_FILE_PARAM_DECLS
+# undef AT_FUNC_POST_FILE_ARGS
+
+#endif /* !HAVE_FSTATAT */
diff --git a/gnulib/lib/ftello.c b/gnulib/lib/ftello.c
new file mode 100644 (file)
index 0000000..fbdc44f
--- /dev/null
@@ -0,0 +1,77 @@
+/* An ftello() function that works around platform bugs.
+   Copyright (C) 2007, 2009-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdio.h>
+
+/* Get lseek.  */
+#include <unistd.h>
+
+#include "stdio-impl.h"
+
+off_t
+ftello (FILE *fp)
+#undef ftello
+#if !HAVE_FTELLO
+# undef ftell
+# define ftello ftell
+#endif
+{
+#if LSEEK_PIPE_BROKEN
+  /* mingw gives bogus answers rather than failure on non-seekable files.  */
+  if (lseek (fileno (fp), 0, SEEK_CUR) == -1)
+    return -1;
+#endif
+
+#if FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE /* Solaris */
+  /* The Solaris stdio leaves the _IOREAD flag set after reading from a file
+     reaches EOF and the program then starts writing to the file.  ftello
+     gets confused by this.  */
+  if (fp_->_flag & _IOWRT)
+    {
+      off_t pos;
+
+      /* Call ftello nevertheless, for the side effects that it does on fp.  */
+      ftello (fp);
+
+      /* Compute the file position ourselves.  */
+      pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR);
+      if (pos >= 0)
+        {
+          if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL)
+            pos += fp_->_ptr - fp_->_base;
+        }
+      return pos;
+    }
+#endif
+
+#if defined __SL64 && defined __SCLE /* Cygwin */
+  if ((fp->_flags & __SL64) == 0)
+    {
+      /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit
+         mode; but has an ftello that requires 64-bit mode.  */
+      FILE *tmp = fopen ("/dev/null", "r");
+      if (!tmp)
+        return -1;
+      fp->_flags |= __SL64;
+      fp->_seek64 = tmp->_seek64;
+      fclose (tmp);
+    }
+#endif
+  return ftello (fp);
+}
diff --git a/gnulib/lib/fts-cycle.c b/gnulib/lib/fts-cycle.c
new file mode 100644 (file)
index 0000000..6dc60f0
--- /dev/null
@@ -0,0 +1,160 @@
+/* Detect cycles in file tree walks.
+
+   Copyright (C) 2003-2006, 2009-2011 Free Software Foundation, Inc.
+
+   Written by Jim Meyering.
+
+   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/>.  */
+
+#include "cycle-check.h"
+#include "hash.h"
+
+/* Use each of these to map a device/inode pair to an FTSENT.  */
+struct Active_dir
+{
+  dev_t dev;
+  ino_t ino;
+  FTSENT *fts_ent;
+};
+
+static bool
+AD_compare (void const *x, void const *y)
+{
+  struct Active_dir const *ax = x;
+  struct Active_dir const *ay = y;
+  return ax->ino == ay->ino
+      && ax->dev == ay->dev;
+}
+
+static size_t
+AD_hash (void const *x, size_t table_size)
+{
+  struct Active_dir const *ax = x;
+  return (uintmax_t) ax->ino % table_size;
+}
+
+/* Set up the cycle-detection machinery.  */
+
+static bool
+setup_dir (FTS *fts)
+{
+  if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL))
+    {
+      enum { HT_INITIAL_SIZE = 31 };
+      fts->fts_cycle.ht = hash_initialize (HT_INITIAL_SIZE, NULL, AD_hash,
+                                           AD_compare, free);
+      if (! fts->fts_cycle.ht)
+        return false;
+    }
+  else
+    {
+      fts->fts_cycle.state = malloc (sizeof *fts->fts_cycle.state);
+      if (! fts->fts_cycle.state)
+        return false;
+      cycle_check_init (fts->fts_cycle.state);
+    }
+
+  return true;
+}
+
+/* Enter a directory during a file tree walk.  */
+
+static bool
+enter_dir (FTS *fts, FTSENT *ent)
+{
+  if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL))
+    {
+      struct stat const *st = ent->fts_statp;
+      struct Active_dir *ad = malloc (sizeof *ad);
+      struct Active_dir *ad_from_table;
+
+      if (!ad)
+        return false;
+
+      ad->dev = st->st_dev;
+      ad->ino = st->st_ino;
+      ad->fts_ent = ent;
+
+      /* See if we've already encountered this directory.
+         This can happen when following symlinks as well as
+         with a corrupted directory hierarchy. */
+      ad_from_table = hash_insert (fts->fts_cycle.ht, ad);
+
+      if (ad_from_table != ad)
+        {
+          free (ad);
+          if (!ad_from_table)
+            return false;
+
+          /* There was an entry with matching dev/inode already in the table.
+             Record the fact that we've found a cycle.  */
+          ent->fts_cycle = ad_from_table->fts_ent;
+          ent->fts_info = FTS_DC;
+        }
+    }
+  else
+    {
+      if (cycle_check (fts->fts_cycle.state, ent->fts_statp))
+        {
+          /* FIXME: setting fts_cycle like this isn't proper.
+             To do what the documentation requires, we'd have to
+             go around the cycle again and find the right entry.
+             But no callers in coreutils use the fts_cycle member. */
+          ent->fts_cycle = ent;
+          ent->fts_info = FTS_DC;
+        }
+    }
+
+  return true;
+}
+
+/* Leave a directory during a file tree walk.  */
+
+static void
+leave_dir (FTS *fts, FTSENT *ent)
+{
+  struct stat const *st = ent->fts_statp;
+  if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL))
+    {
+      struct Active_dir obj;
+      void *found;
+      obj.dev = st->st_dev;
+      obj.ino = st->st_ino;
+      found = hash_delete (fts->fts_cycle.ht, &obj);
+      if (!found)
+        abort ();
+      free (found);
+    }
+  else
+    {
+      FTSENT *parent = ent->fts_parent;
+      if (parent != NULL && 0 <= parent->fts_level)
+        CYCLE_CHECK_REFLECT_CHDIR_UP (fts->fts_cycle.state,
+                                      *(parent->fts_statp), *st);
+    }
+}
+
+/* Free any memory used for cycle detection.  */
+
+static void
+free_dir (FTS *sp)
+{
+  if (sp->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL))
+    {
+      if (sp->fts_cycle.ht)
+        hash_free (sp->fts_cycle.ht);
+    }
+  else
+    free (sp->fts_cycle.state);
+}
diff --git a/gnulib/lib/fts.c b/gnulib/lib/fts.c
new file mode 100644 (file)
index 0000000..ad762dd
--- /dev/null
@@ -0,0 +1,2013 @@
+/* Traverse a file hierarchy.
+
+   Copyright (C) 2004-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/>.  */
+
+/*-
+ * Copyright (c) 1990, 1993, 1994
+ *      The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <config.h>
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)fts.c       8.6 (Berkeley) 8/14/94";
+#endif /* LIBC_SCCS and not lint */
+
+#include "fts_.h"
+
+#if HAVE_SYS_PARAM_H || defined _LIBC
+# include <sys/param.h>
+#endif
+#ifdef _LIBC
+# include <include/sys/stat.h>
+#else
+# include <sys/stat.h>
+#endif
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#if ! _LIBC
+# include "fcntl--.h"
+# include "dirent--.h"
+# include "unistd--.h"
+/* FIXME - use fcntl(F_DUPFD_CLOEXEC)/openat(O_CLOEXEC) once they are
+   supported.  */
+# include "cloexec.h"
+# include "openat.h"
+# include "same-inode.h"
+#endif
+
+#include <dirent.h>
+#ifndef _D_EXACT_NAMLEN
+# define _D_EXACT_NAMLEN(dirent) strlen ((dirent)->d_name)
+#endif
+
+#if HAVE_STRUCT_DIRENT_D_TYPE
+/* True if the type of the directory entry D is known.  */
+# define DT_IS_KNOWN(d) ((d)->d_type != DT_UNKNOWN)
+/* True if the type of the directory entry D must be T.  */
+# define DT_MUST_BE(d, t) ((d)->d_type == (t))
+# define D_TYPE(d) ((d)->d_type)
+#else
+# define DT_IS_KNOWN(d) false
+# define DT_MUST_BE(d, t) false
+# define D_TYPE(d) DT_UNKNOWN
+
+# undef DT_UNKNOWN
+# define DT_UNKNOWN 0
+
+/* Any nonzero values will do here, so long as they're distinct.
+   Undef any existing macros out of the way.  */
+# undef DT_BLK
+# undef DT_CHR
+# undef DT_DIR
+# undef DT_FIFO
+# undef DT_LNK
+# undef DT_REG
+# undef DT_SOCK
+# define DT_BLK 1
+# define DT_CHR 2
+# define DT_DIR 3
+# define DT_FIFO 4
+# define DT_LNK 5
+# define DT_REG 6
+# define DT_SOCK 7
+#endif
+
+#ifndef S_IFLNK
+# define S_IFLNK 0
+#endif
+#ifndef S_IFSOCK
+# define S_IFSOCK 0
+#endif
+
+enum
+{
+  NOT_AN_INODE_NUMBER = 0
+};
+
+#ifdef D_INO_IN_DIRENT
+# define D_INO(dp) (dp)->d_ino
+#else
+/* Some systems don't have inodes, so fake them to avoid lots of ifdefs.  */
+# define D_INO(dp) NOT_AN_INODE_NUMBER
+#endif
+
+/* If there are more than this many entries in a directory,
+   and the conditions mentioned below are satisfied, then sort
+   the entries on inode number before any further processing.  */
+#ifndef FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD
+# define FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD 10000
+#endif
+enum
+{
+  _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD = FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD
+};
+
+enum Fts_stat
+{
+  FTS_NO_STAT_REQUIRED = 1,
+  FTS_STAT_REQUIRED = 2
+};
+
+#ifdef _LIBC
+# undef close
+# define close __close
+# undef closedir
+# define closedir __closedir
+# undef fchdir
+# define fchdir __fchdir
+# undef open
+# define open __open
+# undef readdir
+# define readdir __readdir
+#else
+# undef internal_function
+# define internal_function /* empty */
+#endif
+
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
+
+/* If this host provides the openat function, then we can avoid
+   attempting to open "." in some initialization code below.  */
+#ifdef HAVE_OPENAT
+# define HAVE_OPENAT_SUPPORT 1
+#else
+# define HAVE_OPENAT_SUPPORT 0
+#endif
+
+#ifdef NDEBUG
+# define fts_assert(expr) ((void) 0)
+#else
+# define fts_assert(expr)       \
+    do                          \
+      {                         \
+        if (!(expr))            \
+          abort ();             \
+      }                         \
+    while (false)
+#endif
+
+static FTSENT   *fts_alloc (FTS *, const char *, size_t) internal_function;
+static FTSENT   *fts_build (FTS *, int) internal_function;
+static void      fts_lfree (FTSENT *) internal_function;
+static void      fts_load (FTS *, FTSENT *) internal_function;
+static size_t    fts_maxarglen (char * const *) internal_function;
+static void      fts_padjust (FTS *, FTSENT *) internal_function;
+static bool      fts_palloc (FTS *, size_t) internal_function;
+static FTSENT   *fts_sort (FTS *, FTSENT *, size_t) internal_function;
+static unsigned short int fts_stat (FTS *, FTSENT *, bool) internal_function;
+static int      fts_safe_changedir (FTS *, FTSENT *, int, const char *)
+     internal_function;
+
+#include "fts-cycle.c"
+
+#ifndef MAX
+# define MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+#define ISDOT(a)        (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
+#define STREQ(a, b)     (strcmp (a, b) == 0)
+
+#define CLR(opt)        (sp->fts_options &= ~(opt))
+#define ISSET(opt)      (sp->fts_options & (opt))
+#define SET(opt)        (sp->fts_options |= (opt))
+
+/* FIXME: make this a function */
+#define RESTORE_INITIAL_CWD(sp)                 \
+  (fd_ring_clear (&((sp)->fts_fd_ring)),        \
+   FCHDIR ((sp), (ISSET (FTS_CWDFD) ? AT_FDCWD : (sp)->fts_rfd)))
+
+/* FIXME: FTS_NOCHDIR is now misnamed.
+   Call it FTS_USE_FULL_RELATIVE_FILE_NAMES instead. */
+#define FCHDIR(sp, fd)                                  \
+  (!ISSET(FTS_NOCHDIR) && (ISSET(FTS_CWDFD)             \
+                           ? (cwd_advance_fd ((sp), (fd), true), 0) \
+                           : fchdir (fd)))
+
+
+/* fts_build flags */
+/* FIXME: make this an enum */
+#define BCHILD          1               /* fts_children */
+#define BNAMES          2               /* fts_children, names only */
+#define BREAD           3               /* fts_read */
+
+#if FTS_DEBUG
+# include <inttypes.h>
+# include <stdint.h>
+# include <stdio.h>
+# include "getcwdat.h"
+bool fts_debug = false;
+# define Dprintf(x) do { if (fts_debug) printf x; } while (false)
+#else
+# define Dprintf(x)
+# define fd_ring_check(x)
+# define fd_ring_print(a, b, c)
+#endif
+
+#define LEAVE_DIR(Fts, Ent, Tag)                                \
+  do                                                            \
+    {                                                           \
+      Dprintf (("  %s-leaving: %s\n", Tag, (Ent)->fts_path));   \
+      leave_dir (Fts, Ent);                                     \
+      fd_ring_check (Fts);                                      \
+    }                                                           \
+  while (false)
+
+static void
+fd_ring_clear (I_ring *fd_ring)
+{
+  while ( ! i_ring_empty (fd_ring))
+    {
+      int fd = i_ring_pop (fd_ring);
+      if (0 <= fd)
+        close (fd);
+    }
+}
+
+/* Overload the fts_statp->st_size member (otherwise unused, when
+   fts_info is FTS_NSOK) to indicate whether fts_read should stat
+   this entry or not.  */
+static void
+fts_set_stat_required (FTSENT *p, bool required)
+{
+  fts_assert (p->fts_info == FTS_NSOK);
+  p->fts_statp->st_size = (required
+                           ? FTS_STAT_REQUIRED
+                           : FTS_NO_STAT_REQUIRED);
+}
+
+/* file-descriptor-relative opendir.  */
+/* FIXME: if others need this function, move it into lib/openat.c */
+static inline DIR *
+internal_function
+opendirat (int fd, char const *dir, int extra_flags, int *pdir_fd)
+{
+  int new_fd = openat (fd, dir,
+                       (O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK
+                        | extra_flags));
+  DIR *dirp;
+
+  if (new_fd < 0)
+    return NULL;
+  set_cloexec_flag (new_fd, true);
+  dirp = fdopendir (new_fd);
+  if (dirp)
+    *pdir_fd = new_fd;
+  else
+    {
+      int saved_errno = errno;
+      close (new_fd);
+      errno = saved_errno;
+    }
+  return dirp;
+}
+
+/* Virtual fchdir.  Advance SP's working directory file descriptor,
+   SP->fts_cwd_fd, to FD, and push the previous value onto the fd_ring.
+   CHDIR_DOWN_ONE is true if FD corresponds to an entry in the directory
+   open on sp->fts_cwd_fd; i.e., to move the working directory one level
+   down.  */
+static void
+internal_function
+cwd_advance_fd (FTS *sp, int fd, bool chdir_down_one)
+{
+  int old = sp->fts_cwd_fd;
+  fts_assert (old != fd || old == AT_FDCWD);
+
+  if (chdir_down_one)
+    {
+      /* Push "old" onto the ring.
+         If the displaced file descriptor is non-negative, close it.  */
+      int prev_fd_in_slot = i_ring_push (&sp->fts_fd_ring, old);
+      fd_ring_print (sp, stderr, "post-push");
+      if (0 <= prev_fd_in_slot)
+        close (prev_fd_in_slot); /* ignore any close failure */
+    }
+  else if ( ! ISSET (FTS_NOCHDIR))
+    {
+      if (0 <= old)
+        close (old); /* ignore any close failure */
+    }
+
+  sp->fts_cwd_fd = fd;
+}
+
+/* Open the directory DIR if possible, and return a file
+   descriptor.  Return -1 and set errno on failure.  It doesn't matter
+   whether the file descriptor has read or write access.  */
+
+static inline int
+internal_function
+diropen (FTS const *sp, char const *dir)
+{
+  int open_flags = (O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK
+                    | (ISSET (FTS_PHYSICAL) ? O_NOFOLLOW : 0));
+
+  int fd = (ISSET (FTS_CWDFD)
+            ? openat (sp->fts_cwd_fd, dir, open_flags)
+            : open (dir, open_flags));
+  if (0 <= fd)
+    set_cloexec_flag (fd, true);
+  return fd;
+}
+
+FTS *
+fts_open (char * const *argv,
+          register int options,
+          int (*compar) (FTSENT const **, FTSENT const **))
+{
+        register FTS *sp;
+        register FTSENT *p, *root;
+        register size_t nitems;
+        FTSENT *parent = NULL;
+        FTSENT *tmp = NULL;     /* pacify gcc */
+        bool defer_stat;
+
+        /* Options check. */
+        if (options & ~FTS_OPTIONMASK) {
+                __set_errno (EINVAL);
+                return (NULL);
+        }
+        if ((options & FTS_NOCHDIR) && (options & FTS_CWDFD)) {
+                __set_errno (EINVAL);
+                return (NULL);
+        }
+        if ( ! (options & (FTS_LOGICAL | FTS_PHYSICAL))) {
+                __set_errno (EINVAL);
+                return (NULL);
+        }
+
+        /* Allocate/initialize the stream */
+        if ((sp = malloc(sizeof(FTS))) == NULL)
+                return (NULL);
+        memset(sp, 0, sizeof(FTS));
+        sp->fts_compar = compar;
+        sp->fts_options = options;
+
+        /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
+        if (ISSET(FTS_LOGICAL)) {
+                SET(FTS_NOCHDIR);
+                CLR(FTS_CWDFD);
+        }
+
+        /* Initialize fts_cwd_fd.  */
+        sp->fts_cwd_fd = AT_FDCWD;
+        if ( ISSET(FTS_CWDFD) && ! HAVE_OPENAT_SUPPORT)
+          {
+            /* While it isn't technically necessary to open "." this
+               early, doing it here saves us the trouble of ensuring
+               later (where it'd be messier) that "." can in fact
+               be opened.  If not, revert to FTS_NOCHDIR mode.  */
+            int fd = open (".", O_SEARCH);
+            if (fd < 0)
+              {
+                /* Even if `.' is unreadable, don't revert to FTS_NOCHDIR mode
+                   on systems like Linux+PROC_FS, where our openat emulation
+                   is good enough.  Note: on a system that emulates
+                   openat via /proc, this technique can still fail, but
+                   only in extreme conditions, e.g., when the working
+                   directory cannot be saved (i.e. save_cwd fails) --
+                   and that happens on Linux only when "." is unreadable
+                   and the CWD would be longer than PATH_MAX.
+                   FIXME: once Linux kernel openat support is well established,
+                   replace the above open call and this entire if/else block
+                   with the body of the if-block below.  */
+                if ( openat_needs_fchdir ())
+                  {
+                    SET(FTS_NOCHDIR);
+                    CLR(FTS_CWDFD);
+                  }
+              }
+            else
+              {
+                close (fd);
+              }
+          }
+
+        /*
+         * Start out with 1K of file name space, and enough, in any case,
+         * to hold the user's file names.
+         */
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 1024
+#endif
+        {
+          size_t maxarglen = fts_maxarglen(argv);
+          if (! fts_palloc(sp, MAX(maxarglen, MAXPATHLEN)))
+                  goto mem1;
+        }
+
+        /* Allocate/initialize root's parent. */
+        if (*argv != NULL) {
+                if ((parent = fts_alloc(sp, "", 0)) == NULL)
+                        goto mem2;
+                parent->fts_level = FTS_ROOTPARENTLEVEL;
+          }
+
+        /* The classic fts implementation would call fts_stat with
+           a new entry for each iteration of the loop below.
+           If the comparison function is not specified or if the
+           FTS_DEFER_STAT option is in effect, don't stat any entry
+           in this loop.  This is an attempt to minimize the interval
+           between the initial stat/lstat/fstatat and the point at which
+           a directory argument is first opened.  This matters for any
+           directory command line argument that resides on a file system
+           without genuine i-nodes.  If you specify FTS_DEFER_STAT along
+           with a comparison function, that function must not access any
+           data via the fts_statp pointer.  */
+        defer_stat = (compar == NULL || ISSET(FTS_DEFER_STAT));
+
+        /* Allocate/initialize root(s). */
+        for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
+                /* *Do* allow zero-length file names. */
+                size_t len = strlen(*argv);
+                if ((p = fts_alloc(sp, *argv, len)) == NULL)
+                        goto mem3;
+                p->fts_level = FTS_ROOTLEVEL;
+                p->fts_parent = parent;
+                p->fts_accpath = p->fts_name;
+                /* Even when defer_stat is true, be sure to stat the first
+                   command line argument, since fts_read (at least with
+                   FTS_XDEV) requires that.  */
+                if (defer_stat && root != NULL) {
+                        p->fts_info = FTS_NSOK;
+                        fts_set_stat_required(p, true);
+                } else {
+                        p->fts_info = fts_stat(sp, p, false);
+                }
+
+                /*
+                 * If comparison routine supplied, traverse in sorted
+                 * order; otherwise traverse in the order specified.
+                 */
+                if (compar) {
+                        p->fts_link = root;
+                        root = p;
+                } else {
+                        p->fts_link = NULL;
+                        if (root == NULL)
+                                tmp = root = p;
+                        else {
+                                tmp->fts_link = p;
+                                tmp = p;
+                        }
+                }
+        }
+        if (compar && nitems > 1)
+                root = fts_sort(sp, root, nitems);
+
+        /*
+         * Allocate a dummy pointer and make fts_read think that we've just
+         * finished the node before the root(s); set p->fts_info to FTS_INIT
+         * so that everything about the "current" node is ignored.
+         */
+        if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
+                goto mem3;
+        sp->fts_cur->fts_link = root;
+        sp->fts_cur->fts_info = FTS_INIT;
+        if (! setup_dir (sp))
+                goto mem3;
+
+        /*
+         * If using chdir(2), grab a file descriptor pointing to dot to ensure
+         * that we can get back here; this could be avoided for some file names,
+         * but almost certainly not worth the effort.  Slashes, symbolic links,
+         * and ".." are all fairly nasty problems.  Note, if we can't get the
+         * descriptor we run anyway, just more slowly.
+         */
+        if (!ISSET(FTS_NOCHDIR) && !ISSET(FTS_CWDFD)
+            && (sp->fts_rfd = diropen (sp, ".")) < 0)
+                SET(FTS_NOCHDIR);
+
+        i_ring_init (&sp->fts_fd_ring, -1);
+        return (sp);
+
+mem3:   fts_lfree(root);
+        free(parent);
+mem2:   free(sp->fts_path);
+mem1:   free(sp);
+        return (NULL);
+}
+
+static void
+internal_function
+fts_load (FTS *sp, register FTSENT *p)
+{
+        register size_t len;
+        register char *cp;
+
+        /*
+         * Load the stream structure for the next traversal.  Since we don't
+         * actually enter the directory until after the preorder visit, set
+         * the fts_accpath field specially so the chdir gets done to the right
+         * place and the user can access the first node.  From fts_open it's
+         * known that the file name will fit.
+         */
+        len = p->fts_pathlen = p->fts_namelen;
+        memmove(sp->fts_path, p->fts_name, len + 1);
+        if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
+                len = strlen(++cp);
+                memmove(p->fts_name, cp, len + 1);
+                p->fts_namelen = len;
+        }
+        p->fts_accpath = p->fts_path = sp->fts_path;
+}
+
+int
+fts_close (FTS *sp)
+{
+        register FTSENT *freep, *p;
+        int saved_errno = 0;
+
+        /*
+         * This still works if we haven't read anything -- the dummy structure
+         * points to the root list, so we step through to the end of the root
+         * list which has a valid parent pointer.
+         */
+        if (sp->fts_cur) {
+                for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
+                        freep = p;
+                        p = p->fts_link != NULL ? p->fts_link : p->fts_parent;
+                        free(freep);
+                }
+                free(p);
+        }
+
+        /* Free up child linked list, sort array, file name buffer. */
+        if (sp->fts_child)
+                fts_lfree(sp->fts_child);
+        free(sp->fts_array);
+        free(sp->fts_path);
+
+        if (ISSET(FTS_CWDFD))
+          {
+            if (0 <= sp->fts_cwd_fd)
+              if (close (sp->fts_cwd_fd))
+                saved_errno = errno;
+          }
+        else if (!ISSET(FTS_NOCHDIR))
+          {
+            /* Return to original directory, save errno if necessary. */
+            if (fchdir(sp->fts_rfd))
+              saved_errno = errno;
+
+            /* If close fails, record errno only if saved_errno is zero,
+               so that we report the probably-more-meaningful fchdir errno.  */
+            if (close (sp->fts_rfd))
+              if (saved_errno == 0)
+                saved_errno = errno;
+          }
+
+        fd_ring_clear (&sp->fts_fd_ring);
+
+        if (sp->fts_leaf_optimization_works_ht)
+          hash_free (sp->fts_leaf_optimization_works_ht);
+
+        free_dir (sp);
+
+        /* Free up the stream pointer. */
+        free(sp);
+
+        /* Set errno and return. */
+        if (saved_errno) {
+                __set_errno (saved_errno);
+                return (-1);
+        }
+
+        return (0);
+}
+
+#if defined __linux__ \
+  && HAVE_SYS_VFS_H && HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE
+
+# include <sys/vfs.h>
+
+/* Linux-specific constants from coreutils' src/fs.h */
+# define S_MAGIC_TMPFS 0x1021994
+# define S_MAGIC_NFS 0x6969
+# define S_MAGIC_REISERFS 0x52654973
+# define S_MAGIC_PROC 0x9FA0
+
+/* Return false if it is easy to determine the file system type of
+   the directory on which DIR_FD is open, and sorting dirents on
+   inode numbers is known not to improve traversal performance with
+   that type of file system.  Otherwise, return true.  */
+static bool
+dirent_inode_sort_may_be_useful (int dir_fd)
+{
+  /* Skip the sort only if we can determine efficiently
+     that skipping it is the right thing to do.
+     The cost of performing an unnecessary sort is negligible,
+     while the cost of *not* performing it can be O(N^2) with
+     a very large constant.  */
+  struct statfs fs_buf;
+
+  /* If fstatfs fails, assume sorting would be useful.  */
+  if (fstatfs (dir_fd, &fs_buf) != 0)
+    return true;
+
+  /* FIXME: what about when f_type is not an integral type?
+     deal with that if/when it's encountered.  */
+  switch (fs_buf.f_type)
+    {
+    case S_MAGIC_TMPFS:
+    case S_MAGIC_NFS:
+      /* On a file system of any of these types, sorting
+         is unnecessary, and hence wasteful.  */
+      return false;
+
+    default:
+      return true;
+    }
+}
+
+/* Given a file descriptor DIR_FD open on a directory D,
+   return true if it is valid to apply the leaf-optimization
+   technique of counting directories in D via stat.st_nlink.  */
+static bool
+leaf_optimization_applies (int dir_fd)
+{
+  struct statfs fs_buf;
+
+  /* If fstatfs fails, assume we can't use the optimization.  */
+  if (fstatfs (dir_fd, &fs_buf) != 0)
+    return false;
+
+  /* FIXME: do we need to detect AFS mount points?  I doubt it,
+     unless fstatfs can report S_MAGIC_REISERFS for such a directory.  */
+
+  switch (fs_buf.f_type)
+    {
+      /* List here the file system types that lack useable dirent.d_type
+         info, yet for which the optimization does apply.  */
+    case S_MAGIC_REISERFS:
+      return true;
+
+    case S_MAGIC_PROC:
+      /* Explicitly listing this or any other file system type for which
+         the optimization is not applicable is not necessary, but we leave
+         it here to document the risk.  Per http://bugs.debian.org/143111,
+         /proc may have bogus stat.st_nlink values.  */
+      /* fall through */
+    default:
+      return false;
+    }
+}
+
+#else
+static bool
+dirent_inode_sort_may_be_useful (int dir_fd _GL_UNUSED) { return true; }
+static bool
+leaf_optimization_applies (int dir_fd _GL_UNUSED) { return false; }
+#endif
+
+/* link-count-optimization entry:
+   map an stat.st_dev number to a boolean: leaf_optimization_works */
+struct LCO_ent
+{
+  dev_t st_dev;
+  bool opt_ok;
+};
+
+/* Use a tiny initial size.  If a traversal encounters more than
+   a few devices, the cost of growing/rehashing this table will be
+   rendered negligible by the number of inodes processed.  */
+enum { LCO_HT_INITIAL_SIZE = 13 };
+
+static size_t
+LCO_hash (void const *x, size_t table_size)
+{
+  struct LCO_ent const *ax = x;
+  return (uintmax_t) ax->st_dev % table_size;
+}
+
+static bool
+LCO_compare (void const *x, void const *y)
+{
+  struct LCO_ent const *ax = x;
+  struct LCO_ent const *ay = y;
+  return ax->st_dev == ay->st_dev;
+}
+
+/* Ask the same question as leaf_optimization_applies, but query
+   the cache first (FTS.fts_leaf_optimization_works_ht), and if necessary,
+   update that cache.  */
+static bool
+link_count_optimize_ok (FTSENT const *p)
+{
+  FTS *sp = p->fts_fts;
+  Hash_table *h = sp->fts_leaf_optimization_works_ht;
+  struct LCO_ent tmp;
+  struct LCO_ent *ent;
+  bool opt_ok;
+  struct LCO_ent *t2;
+
+  /* If we're not in CWDFD mode, don't bother with this optimization,
+     since the caller is not serious about performance. */
+  if (!ISSET(FTS_CWDFD))
+    return false;
+
+  /* map st_dev to the boolean, leaf_optimization_works */
+  if (h == NULL)
+    {
+      h = sp->fts_leaf_optimization_works_ht
+        = hash_initialize (LCO_HT_INITIAL_SIZE, NULL, LCO_hash,
+                           LCO_compare, free);
+      if (h == NULL)
+        return false;
+    }
+  tmp.st_dev = p->fts_statp->st_dev;
+  ent = hash_lookup (h, &tmp);
+  if (ent)
+    return ent->opt_ok;
+
+  /* Look-up failed.  Query directly and cache the result.  */
+  t2 = malloc (sizeof *t2);
+  if (t2 == NULL)
+    return false;
+
+  /* Is it ok to perform the optimization in the dir, FTS_CWD_FD?  */
+  opt_ok = leaf_optimization_applies (sp->fts_cwd_fd);
+  t2->opt_ok = opt_ok;
+  t2->st_dev = p->fts_statp->st_dev;
+
+  ent = hash_insert (h, t2);
+  if (ent == NULL)
+    {
+      /* insertion failed */
+      free (t2);
+      return false;
+    }
+  fts_assert (ent == t2);
+
+  return opt_ok;
+}
+
+/*
+ * Special case of "/" at the end of the file name so that slashes aren't
+ * appended which would cause file names to be written as "....//foo".
+ */
+#define NAPPEND(p)                                                      \
+        (p->fts_path[p->fts_pathlen - 1] == '/'                         \
+            ? p->fts_pathlen - 1 : p->fts_pathlen)
+
+FTSENT *
+fts_read (register FTS *sp)
+{
+        register FTSENT *p, *tmp;
+        register unsigned short int instr;
+        register char *t;
+
+        /* If finished or unrecoverable error, return NULL. */
+        if (sp->fts_cur == NULL || ISSET(FTS_STOP))
+                return (NULL);
+
+        /* Set current node pointer. */
+        p = sp->fts_cur;
+
+        /* Save and zero out user instructions. */
+        instr = p->fts_instr;
+        p->fts_instr = FTS_NOINSTR;
+
+        /* Any type of file may be re-visited; re-stat and re-turn. */
+        if (instr == FTS_AGAIN) {
+                p->fts_info = fts_stat(sp, p, false);
+                return (p);
+        }
+        Dprintf (("fts_read: p=%s\n",
+                  p->fts_info == FTS_INIT ? "" : p->fts_path));
+
+        /*
+         * Following a symlink -- SLNONE test allows application to see
+         * SLNONE and recover.  If indirecting through a symlink, have
+         * keep a pointer to current location.  If unable to get that
+         * pointer, follow fails.
+         */
+        if (instr == FTS_FOLLOW &&
+            (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
+                p->fts_info = fts_stat(sp, p, true);
+                if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
+                        if ((p->fts_symfd = diropen (sp, ".")) < 0) {
+                                p->fts_errno = errno;
+                                p->fts_info = FTS_ERR;
+                        } else
+                                p->fts_flags |= FTS_SYMFOLLOW;
+                }
+                goto check_for_dir;
+        }
+
+        /* Directory in pre-order. */
+        if (p->fts_info == FTS_D) {
+                /* If skipped or crossed mount point, do post-order visit. */
+                if (instr == FTS_SKIP ||
+                    (ISSET(FTS_XDEV) && p->fts_statp->st_dev != sp->fts_dev)) {
+                        if (p->fts_flags & FTS_SYMFOLLOW)
+                                (void)close(p->fts_symfd);
+                        if (sp->fts_child) {
+                                fts_lfree(sp->fts_child);
+                                sp->fts_child = NULL;
+                        }
+                        p->fts_info = FTS_DP;
+                        LEAVE_DIR (sp, p, "1");
+                        return (p);
+                }
+
+                /* Rebuild if only read the names and now traversing. */
+                if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) {
+                        CLR(FTS_NAMEONLY);
+                        fts_lfree(sp->fts_child);
+                        sp->fts_child = NULL;
+                }
+
+                /*
+                 * Cd to the subdirectory.
+                 *
+                 * If have already read and now fail to chdir, whack the list
+                 * to make the names come out right, and set the parent errno
+                 * so the application will eventually get an error condition.
+                 * Set the FTS_DONTCHDIR flag so that when we logically change
+                 * directories back to the parent we don't do a chdir.
+                 *
+                 * If haven't read do so.  If the read fails, fts_build sets
+                 * FTS_STOP or the fts_info field of the node.
+                 */
+                if (sp->fts_child != NULL) {
+                        if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
+                                p->fts_errno = errno;
+                                p->fts_flags |= FTS_DONTCHDIR;
+                                for (p = sp->fts_child; p != NULL;
+                                     p = p->fts_link)
+                                        p->fts_accpath =
+                                            p->fts_parent->fts_accpath;
+                        }
+                } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
+                        if (ISSET(FTS_STOP))
+                                return (NULL);
+                        /* If fts_build's call to fts_safe_changedir failed
+                           because it was not able to fchdir into a
+                           subdirectory, tell the caller.  */
+                        if (p->fts_errno && p->fts_info != FTS_DNR)
+                                p->fts_info = FTS_ERR;
+                        LEAVE_DIR (sp, p, "2");
+                        return (p);
+                }
+                p = sp->fts_child;
+                sp->fts_child = NULL;
+                goto name;
+        }
+
+        /* Move to the next node on this level. */
+next:   tmp = p;
+        if ((p = p->fts_link) != NULL) {
+                sp->fts_cur = p;
+                free(tmp);
+
+                /*
+                 * If reached the top, return to the original directory (or
+                 * the root of the tree), and load the file names for the next
+                 * root.
+                 */
+                if (p->fts_level == FTS_ROOTLEVEL) {
+                        if (RESTORE_INITIAL_CWD(sp)) {
+                                SET(FTS_STOP);
+                                return (NULL);
+                        }
+                        free_dir(sp);
+                        fts_load(sp, p);
+                        setup_dir(sp);
+                        goto check_for_dir;
+                }
+
+                /*
+                 * User may have called fts_set on the node.  If skipped,
+                 * ignore.  If followed, get a file descriptor so we can
+                 * get back if necessary.
+                 */
+                if (p->fts_instr == FTS_SKIP)
+                        goto next;
+                if (p->fts_instr == FTS_FOLLOW) {
+                        p->fts_info = fts_stat(sp, p, true);
+                        if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
+                                if ((p->fts_symfd = diropen (sp, ".")) < 0) {
+                                        p->fts_errno = errno;
+                                        p->fts_info = FTS_ERR;
+                                } else
+                                        p->fts_flags |= FTS_SYMFOLLOW;
+                        }
+                        p->fts_instr = FTS_NOINSTR;
+                }
+
+name:           t = sp->fts_path + NAPPEND(p->fts_parent);
+                *t++ = '/';
+                memmove(t, p->fts_name, p->fts_namelen + 1);
+check_for_dir:
+                sp->fts_cur = p;
+                if (p->fts_info == FTS_NSOK)
+                  {
+                    if (p->fts_statp->st_size == FTS_STAT_REQUIRED)
+                      {
+                        FTSENT *parent = p->fts_parent;
+                        if (FTS_ROOTLEVEL < p->fts_level
+                            /* ->fts_n_dirs_remaining is not valid
+                               for command-line-specified names.  */
+                            && parent->fts_n_dirs_remaining == 0
+                            && ISSET(FTS_NOSTAT)
+                            && ISSET(FTS_PHYSICAL)
+                            && link_count_optimize_ok (parent))
+                          {
+                            /* nothing more needed */
+                          }
+                        else
+                          {
+                            p->fts_info = fts_stat(sp, p, false);
+                            if (S_ISDIR(p->fts_statp->st_mode)
+                                && p->fts_level != FTS_ROOTLEVEL
+                                && parent->fts_n_dirs_remaining)
+                                  parent->fts_n_dirs_remaining--;
+                          }
+                      }
+                    else
+                      fts_assert (p->fts_statp->st_size == FTS_NO_STAT_REQUIRED);
+                  }
+
+                if (p->fts_info == FTS_D)
+                  {
+                    /* Now that P->fts_statp is guaranteed to be valid,
+                       if this is a command-line directory, record its
+                       device number, to be used for FTS_XDEV.  */
+                    if (p->fts_level == FTS_ROOTLEVEL)
+                      sp->fts_dev = p->fts_statp->st_dev;
+                    Dprintf (("  entering: %s\n", p->fts_path));
+                    if (! enter_dir (sp, p))
+                      {
+                        __set_errno (ENOMEM);
+                        return NULL;
+                      }
+                  }
+                return p;
+        }
+
+        /* Move up to the parent node. */
+        p = tmp->fts_parent;
+        sp->fts_cur = p;
+        free(tmp);
+
+        if (p->fts_level == FTS_ROOTPARENTLEVEL) {
+                /*
+                 * Done; free everything up and set errno to 0 so the user
+                 * can distinguish between error and EOF.
+                 */
+                free(p);
+                __set_errno (0);
+                return (sp->fts_cur = NULL);
+        }
+
+        fts_assert (p->fts_info != FTS_NSOK);
+
+        /* NUL terminate the file name.  */
+        sp->fts_path[p->fts_pathlen] = '\0';
+
+        /*
+         * Return to the parent directory.  If at a root node, restore
+         * the initial working directory.  If we came through a symlink,
+         * go back through the file descriptor.  Otherwise, move up
+         * one level, via "..".
+         */
+        if (p->fts_level == FTS_ROOTLEVEL) {
+                if (RESTORE_INITIAL_CWD(sp)) {
+                        p->fts_errno = errno;
+                        SET(FTS_STOP);
+                }
+        } else if (p->fts_flags & FTS_SYMFOLLOW) {
+                if (FCHDIR(sp, p->fts_symfd)) {
+                        int saved_errno = errno;
+                        (void)close(p->fts_symfd);
+                        __set_errno (saved_errno);
+                        p->fts_errno = errno;
+                        SET(FTS_STOP);
+                }
+                (void)close(p->fts_symfd);
+        } else if (!(p->fts_flags & FTS_DONTCHDIR) &&
+                   fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
+                p->fts_errno = errno;
+                SET(FTS_STOP);
+        }
+        p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
+        if (p->fts_errno == 0)
+                LEAVE_DIR (sp, p, "3");
+        return ISSET(FTS_STOP) ? NULL : p;
+}
+
+/*
+ * Fts_set takes the stream as an argument although it's not used in this
+ * implementation; it would be necessary if anyone wanted to add global
+ * semantics to fts using fts_set.  An error return is allowed for similar
+ * reasons.
+ */
+/* ARGSUSED */
+int
+fts_set(FTS *sp _GL_UNUSED, FTSENT *p, int instr)
+{
+        if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
+            instr != FTS_NOINSTR && instr != FTS_SKIP) {
+                __set_errno (EINVAL);
+                return (1);
+        }
+        p->fts_instr = instr;
+        return (0);
+}
+
+FTSENT *
+fts_children (register FTS *sp, int instr)
+{
+        register FTSENT *p;
+        int fd;
+
+        if (instr != 0 && instr != FTS_NAMEONLY) {
+                __set_errno (EINVAL);
+                return (NULL);
+        }
+
+        /* Set current node pointer. */
+        p = sp->fts_cur;
+
+        /*
+         * Errno set to 0 so user can distinguish empty directory from
+         * an error.
+         */
+        __set_errno (0);
+
+        /* Fatal errors stop here. */
+        if (ISSET(FTS_STOP))
+                return (NULL);
+
+        /* Return logical hierarchy of user's arguments. */
+        if (p->fts_info == FTS_INIT)
+                return (p->fts_link);
+
+        /*
+         * If not a directory being visited in pre-order, stop here.  Could
+         * allow FTS_DNR, assuming the user has fixed the problem, but the
+         * same effect is available with FTS_AGAIN.
+         */
+        if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
+                return (NULL);
+
+        /* Free up any previous child list. */
+        if (sp->fts_child != NULL)
+                fts_lfree(sp->fts_child);
+
+        if (instr == FTS_NAMEONLY) {
+                SET(FTS_NAMEONLY);
+                instr = BNAMES;
+        } else
+                instr = BCHILD;
+
+        /*
+         * If using chdir on a relative file name and called BEFORE fts_read
+         * does its chdir to the root of a traversal, we can lose -- we need to
+         * chdir into the subdirectory, and we don't know where the current
+         * directory is, so we can't get back so that the upcoming chdir by
+         * fts_read will work.
+         */
+        if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
+            ISSET(FTS_NOCHDIR))
+                return (sp->fts_child = fts_build(sp, instr));
+
+        if ((fd = diropen (sp, ".")) < 0)
+                return (sp->fts_child = NULL);
+        sp->fts_child = fts_build(sp, instr);
+        if (ISSET(FTS_CWDFD))
+          {
+            cwd_advance_fd (sp, fd, true);
+          }
+        else
+          {
+            if (fchdir(fd))
+              {
+                int saved_errno = errno;
+                close (fd);
+                __set_errno (saved_errno);
+                return NULL;
+              }
+            close (fd);
+          }
+        return (sp->fts_child);
+}
+
+/* A comparison function to sort on increasing inode number.
+   For some file system types, sorting either way makes a huge
+   performance difference for a directory with very many entries,
+   but sorting on increasing values is slightly better than sorting
+   on decreasing values.  The difference is in the 5% range.  */
+static int
+fts_compare_ino (struct _ftsent const **a, struct _ftsent const **b)
+{
+  return (a[0]->fts_statp->st_ino < b[0]->fts_statp->st_ino ? -1
+          : b[0]->fts_statp->st_ino < a[0]->fts_statp->st_ino ? 1 : 0);
+}
+
+/* Map the dirent.d_type value, DTYPE, to the corresponding stat.st_mode
+   S_IF* bit and set ST.st_mode, thus clearing all other bits in that field.  */
+static void
+set_stat_type (struct stat *st, unsigned int dtype)
+{
+  mode_t type;
+  switch (dtype)
+    {
+    case DT_BLK:
+      type = S_IFBLK;
+      break;
+    case DT_CHR:
+      type = S_IFCHR;
+      break;
+    case DT_DIR:
+      type = S_IFDIR;
+      break;
+    case DT_FIFO:
+      type = S_IFIFO;
+      break;
+    case DT_LNK:
+      type = S_IFLNK;
+      break;
+    case DT_REG:
+      type = S_IFREG;
+      break;
+    case DT_SOCK:
+      type = S_IFSOCK;
+      break;
+    default:
+      type = 0;
+    }
+  st->st_mode = type;
+}
+
+/*
+ * This is the tricky part -- do not casually change *anything* in here.  The
+ * idea is to build the linked list of entries that are used by fts_children
+ * and fts_read.  There are lots of special cases.
+ *
+ * The real slowdown in walking the tree is the stat calls.  If FTS_NOSTAT is
+ * set and it's a physical walk (so that symbolic links can't be directories),
+ * we can do things quickly.  First, if it's a 4.4BSD file system, the type
+ * of the file is in the directory entry.  Otherwise, we assume that the number
+ * of subdirectories in a node is equal to the number of links to the parent.
+ * The former skips all stat calls.  The latter skips stat calls in any leaf
+ * directories and for any files after the subdirectories in the directory have
+ * been found, cutting the stat calls by about 2/3.
+ */
+static FTSENT *
+internal_function
+fts_build (register FTS *sp, int type)
+{
+        register struct dirent *dp;
+        register FTSENT *p, *head;
+        register size_t nitems;
+        FTSENT *cur, *tail;
+        DIR *dirp;
+        void *oldaddr;
+        int saved_errno;
+        bool descend;
+        bool doadjust;
+        ptrdiff_t level;
+        nlink_t nlinks;
+        bool nostat;
+        size_t len, maxlen, new_len;
+        char *cp;
+        int dir_fd;
+
+        /* Set current node pointer. */
+        cur = sp->fts_cur;
+
+        /*
+         * Open the directory for reading.  If this fails, we're done.
+         * If being called from fts_read, set the fts_info field.
+         */
+#if defined FTS_WHITEOUT && 0
+        if (ISSET(FTS_WHITEOUT))
+                oflag = DTF_NODUP|DTF_REWIND;
+        else
+                oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND;
+#else
+# define __opendir2(file, flag) \
+        opendirat((! ISSET(FTS_NOCHDIR) && ISSET(FTS_CWDFD)     \
+                   ? sp->fts_cwd_fd : AT_FDCWD),                \
+                  file,                                         \
+                  ((ISSET(FTS_PHYSICAL)                         \
+                    && ! (ISSET(FTS_COMFOLLOW)                  \
+                          && cur->fts_level == FTS_ROOTLEVEL))  \
+                   ? O_NOFOLLOW : 0),                           \
+                  &dir_fd)
+#endif
+       if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) {
+                if (type == BREAD) {
+                        cur->fts_info = FTS_DNR;
+                        cur->fts_errno = errno;
+                }
+                return (NULL);
+        }
+       /* Rather than calling fts_stat for each and every entry encountered
+          in the readdir loop (below), stat each directory only right after
+          opening it.  */
+       if (cur->fts_info == FTS_NSOK)
+         cur->fts_info = fts_stat(sp, cur, false);
+       else if (sp->fts_options & FTS_TIGHT_CYCLE_CHECK) {
+                /* Now read the stat info again after opening a directory to
+                 * reveal eventual changes caused by a submount triggered by
+                 * the traversal.  But do it only for utilities which use
+                 * FTS_TIGHT_CYCLE_CHECK.  Therefore, only find and du
+                 * benefit/suffer from this feature for now.
+                 */
+                LEAVE_DIR (sp, cur, "4");
+                fts_stat (sp, cur, false);
+                if (! enter_dir (sp, cur)) {
+                         __set_errno (ENOMEM);
+                         return NULL;
+                }
+        }
+
+        /*
+         * Nlinks is the number of possible entries of type directory in the
+         * directory if we're cheating on stat calls, 0 if we're not doing
+         * any stat calls at all, (nlink_t) -1 if we're statting everything.
+         */
+        if (type == BNAMES) {
+                nlinks = 0;
+                /* Be quiet about nostat, GCC. */
+                nostat = false;
+        } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) {
+                nlinks = (cur->fts_statp->st_nlink
+                          - (ISSET(FTS_SEEDOT) ? 0 : 2));
+                nostat = true;
+        } else {
+                nlinks = -1;
+                nostat = false;
+        }
+
+        /*
+         * If we're going to need to stat anything or we want to descend
+         * and stay in the directory, chdir.  If this fails we keep going,
+         * but set a flag so we don't chdir after the post-order visit.
+         * We won't be able to stat anything, but we can still return the
+         * names themselves.  Note, that since fts_read won't be able to
+         * chdir into the directory, it will have to return different file
+         * names than before, i.e. "a/b" instead of "b".  Since the node
+         * has already been visited in pre-order, have to wait until the
+         * post-order visit to return the error.  There is a special case
+         * here, if there was nothing to stat then it's not an error to
+         * not be able to stat.  This is all fairly nasty.  If a program
+         * needed sorted entries or stat information, they had better be
+         * checking FTS_NS on the returned nodes.
+         */
+        if (nlinks || type == BREAD) {
+                if (ISSET(FTS_CWDFD))
+                  {
+                    dir_fd = dup (dir_fd);
+                    if (0 <= dir_fd)
+                      set_cloexec_flag (dir_fd, true);
+                  }
+                if (dir_fd < 0 || fts_safe_changedir(sp, cur, dir_fd, NULL)) {
+                        if (nlinks && type == BREAD)
+                                cur->fts_errno = errno;
+                        cur->fts_flags |= FTS_DONTCHDIR;
+                        descend = false;
+                        closedir(dirp);
+                        if (ISSET(FTS_CWDFD) && 0 <= dir_fd)
+                                close (dir_fd);
+                        dirp = NULL;
+                } else
+                        descend = true;
+        } else
+                descend = false;
+
+        /*
+         * Figure out the max file name length that can be stored in the
+         * current buffer -- the inner loop allocates more space as necessary.
+         * We really wouldn't have to do the maxlen calculations here, we
+         * could do them in fts_read before returning the name, but it's a
+         * lot easier here since the length is part of the dirent structure.
+         *
+         * If not changing directories set a pointer so that can just append
+         * each new component into the file name.
+         */
+        len = NAPPEND(cur);
+        if (ISSET(FTS_NOCHDIR)) {
+                cp = sp->fts_path + len;
+                *cp++ = '/';
+        } else {
+                /* GCC, you're too verbose. */
+                cp = NULL;
+        }
+        len++;
+        maxlen = sp->fts_pathlen - len;
+
+        level = cur->fts_level + 1;
+
+        /* Read the directory, attaching each entry to the `link' pointer. */
+        doadjust = false;
+        for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
+                bool is_dir;
+
+                if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
+                        continue;
+
+                if ((p = fts_alloc (sp, dp->d_name,
+                                    _D_EXACT_NAMLEN (dp))) == NULL)
+                        goto mem1;
+                if (_D_EXACT_NAMLEN (dp) >= maxlen) {
+                        /* include space for NUL */
+                        oldaddr = sp->fts_path;
+                        if (! fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) {
+                                /*
+                                 * No more memory.  Save
+                                 * errno, free up the current structure and the
+                                 * structures already allocated.
+                                 */
+mem1:                           saved_errno = errno;
+                                free(p);
+                                fts_lfree(head);
+                                closedir(dirp);
+                                cur->fts_info = FTS_ERR;
+                                SET(FTS_STOP);
+                                __set_errno (saved_errno);
+                                return (NULL);
+                        }
+                        /* Did realloc() change the pointer? */
+                        if (oldaddr != sp->fts_path) {
+                                doadjust = true;
+                                if (ISSET(FTS_NOCHDIR))
+                                        cp = sp->fts_path + len;
+                        }
+                        maxlen = sp->fts_pathlen - len;
+                }
+
+                new_len = len + _D_EXACT_NAMLEN (dp);
+                if (new_len < len) {
+                        /*
+                         * In the unlikely event that we would end up
+                         * with a file name longer than SIZE_MAX, free up
+                         * the current structure and the structures already
+                         * allocated, then error out with ENAMETOOLONG.
+                         */
+                        free(p);
+                        fts_lfree(head);
+                        closedir(dirp);
+                        cur->fts_info = FTS_ERR;
+                        SET(FTS_STOP);
+                        __set_errno (ENAMETOOLONG);
+                        return (NULL);
+                }
+                p->fts_level = level;
+                p->fts_parent = sp->fts_cur;
+                p->fts_pathlen = new_len;
+
+#if defined FTS_WHITEOUT && 0
+                if (dp->d_type == DT_WHT)
+                        p->fts_flags |= FTS_ISW;
+#endif
+                /* Store dirent.d_ino, in case we need to sort
+                   entries before processing them.  */
+                p->fts_statp->st_ino = D_INO (dp);
+
+                /* Build a file name for fts_stat to stat. */
+                if (ISSET(FTS_NOCHDIR)) {
+                        p->fts_accpath = p->fts_path;
+                        memmove(cp, p->fts_name, p->fts_namelen + 1);
+                } else
+                        p->fts_accpath = p->fts_name;
+
+                if (sp->fts_compar == NULL || ISSET(FTS_DEFER_STAT)) {
+                        /* Record what fts_read will have to do with this
+                           entry. In many cases, it will simply fts_stat it,
+                           but we can take advantage of any d_type information
+                           to optimize away the unnecessary stat calls.  I.e.,
+                           if FTS_NOSTAT is in effect and we're not following
+                           symlinks (FTS_PHYSICAL) and d_type indicates this
+                           is *not* a directory, then we won't have to stat it
+                           at all.  If it *is* a directory, then (currently)
+                           we stat it regardless, in order to get device and
+                           inode numbers.  Some day we might optimize that
+                           away, too, for directories where d_ino is known to
+                           be valid.  */
+                        bool skip_stat = (ISSET(FTS_PHYSICAL)
+                                          && ISSET(FTS_NOSTAT)
+                                          && DT_IS_KNOWN(dp)
+                                          && ! DT_MUST_BE(dp, DT_DIR));
+                        p->fts_info = FTS_NSOK;
+                        /* Propagate dirent.d_type information back
+                           to caller, when possible.  */
+                        set_stat_type (p->fts_statp, D_TYPE (dp));
+                        fts_set_stat_required(p, !skip_stat);
+                        is_dir = (ISSET(FTS_PHYSICAL)
+                                  && DT_MUST_BE(dp, DT_DIR));
+                } else {
+                        p->fts_info = fts_stat(sp, p, false);
+                        is_dir = (p->fts_info == FTS_D
+                                  || p->fts_info == FTS_DC
+                                  || p->fts_info == FTS_DOT);
+                }
+
+                /* Decrement link count if applicable. */
+                if (nlinks > 0 && is_dir)
+                        nlinks -= nostat;
+
+                /* We walk in directory order so "ls -f" doesn't get upset. */
+                p->fts_link = NULL;
+                if (head == NULL)
+                        head = tail = p;
+                else {
+                        tail->fts_link = p;
+                        tail = p;
+                }
+                ++nitems;
+        }
+        if (dirp)
+                closedir(dirp);
+
+        /*
+         * If realloc() changed the address of the file name, adjust the
+         * addresses for the rest of the tree and the dir list.
+         */
+        if (doadjust)
+                fts_padjust(sp, head);
+
+        /*
+         * If not changing directories, reset the file name back to original
+         * state.
+         */
+        if (ISSET(FTS_NOCHDIR)) {
+                if (len == sp->fts_pathlen || nitems == 0)
+                        --cp;
+                *cp = '\0';
+        }
+
+        /*
+         * If descended after called from fts_children or after called from
+         * fts_read and nothing found, get back.  At the root level we use
+         * the saved fd; if one of fts_open()'s arguments is a relative name
+         * to an empty directory, we wind up here with no other way back.  If
+         * can't get back, we're done.
+         */
+        if (descend && (type == BCHILD || !nitems) &&
+            (cur->fts_level == FTS_ROOTLEVEL
+             ? RESTORE_INITIAL_CWD(sp)
+             : fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
+                cur->fts_info = FTS_ERR;
+                SET(FTS_STOP);
+                fts_lfree(head);
+                return (NULL);
+        }
+
+        /* If didn't find anything, return NULL. */
+        if (!nitems) {
+                if (type == BREAD)
+                        cur->fts_info = FTS_DP;
+                fts_lfree(head);
+                return (NULL);
+        }
+
+        /* If there are many entries, no sorting function has been specified,
+           and this file system is of a type that may be slow with a large
+           number of entries, then sort the directory entries on increasing
+           inode numbers.  */
+        if (nitems > _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD
+            && !sp->fts_compar
+            && ISSET (FTS_CWDFD)
+            && dirent_inode_sort_may_be_useful (sp->fts_cwd_fd)) {
+                sp->fts_compar = fts_compare_ino;
+                head = fts_sort (sp, head, nitems);
+                sp->fts_compar = NULL;
+        }
+
+        /* Sort the entries. */
+        if (sp->fts_compar && nitems > 1)
+                head = fts_sort(sp, head, nitems);
+        return (head);
+}
+
+#if FTS_DEBUG
+
+/* Walk ->fts_parent links starting at E_CURR, until the root of the
+   current hierarchy.  There should be a directory with dev/inode
+   matching those of AD.  If not, print a lot of diagnostics.  */
+static void
+find_matching_ancestor (FTSENT const *e_curr, struct Active_dir const *ad)
+{
+  FTSENT const *ent;
+  for (ent = e_curr; ent->fts_level >= FTS_ROOTLEVEL; ent = ent->fts_parent)
+    {
+      if (ad->ino == ent->fts_statp->st_ino
+          && ad->dev == ent->fts_statp->st_dev)
+        return;
+    }
+  printf ("ERROR: tree dir, %s, not active\n", ad->fts_ent->fts_accpath);
+  printf ("active dirs:\n");
+  for (ent = e_curr;
+       ent->fts_level >= FTS_ROOTLEVEL; ent = ent->fts_parent)
+    printf ("  %s(%"PRIuMAX"/%"PRIuMAX") to %s(%"PRIuMAX"/%"PRIuMAX")...\n",
+            ad->fts_ent->fts_accpath,
+            (uintmax_t) ad->dev,
+            (uintmax_t) ad->ino,
+            ent->fts_accpath,
+            (uintmax_t) ent->fts_statp->st_dev,
+            (uintmax_t) ent->fts_statp->st_ino);
+}
+
+void
+fts_cross_check (FTS const *sp)
+{
+  FTSENT const *ent = sp->fts_cur;
+  FTSENT const *t;
+  if ( ! ISSET (FTS_TIGHT_CYCLE_CHECK))
+    return;
+
+  Dprintf (("fts-cross-check cur=%s\n", ent->fts_path));
+  /* Make sure every parent dir is in the tree.  */
+  for (t = ent->fts_parent; t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
+    {
+      struct Active_dir ad;
+      ad.ino = t->fts_statp->st_ino;
+      ad.dev = t->fts_statp->st_dev;
+      if ( ! hash_lookup (sp->fts_cycle.ht, &ad))
+        printf ("ERROR: active dir, %s, not in tree\n", t->fts_path);
+    }
+
+  /* Make sure every dir in the tree is an active dir.
+     But ENT is not necessarily a directory.  If so, just skip this part. */
+  if (ent->fts_parent->fts_level >= FTS_ROOTLEVEL
+      && (ent->fts_info == FTS_DP
+          || ent->fts_info == FTS_D))
+    {
+      struct Active_dir *ad;
+      for (ad = hash_get_first (sp->fts_cycle.ht); ad != NULL;
+           ad = hash_get_next (sp->fts_cycle.ht, ad))
+        {
+          find_matching_ancestor (ent, ad);
+        }
+    }
+}
+
+static bool
+same_fd (int fd1, int fd2)
+{
+  struct stat sb1, sb2;
+  return (fstat (fd1, &sb1) == 0
+          && fstat (fd2, &sb2) == 0
+          && SAME_INODE (sb1, sb2));
+}
+
+static void
+fd_ring_print (FTS const *sp, FILE *stream, char const *msg)
+{
+  I_ring const *fd_ring = &sp->fts_fd_ring;
+  unsigned int i = fd_ring->fts_front;
+  char *cwd = getcwdat (sp->fts_cwd_fd, NULL, 0);
+  fprintf (stream, "=== %s ========== %s\n", msg, cwd);
+  free (cwd);
+  if (i_ring_empty (fd_ring))
+    return;
+
+  while (true)
+    {
+      int fd = fd_ring->fts_fd_ring[i];
+      if (fd < 0)
+        fprintf (stream, "%d: %d:\n", i, fd);
+      else
+        {
+          char *wd = getcwdat (fd, NULL, 0);
+          fprintf (stream, "%d: %d: %s\n", i, fd, wd);
+          free (wd);
+        }
+      if (i == fd_ring->fts_back)
+        break;
+      i = (i + I_RING_SIZE - 1) % I_RING_SIZE;
+    }
+}
+
+/* Ensure that each file descriptor on the fd_ring matches a
+   parent, grandparent, etc. of the current working directory.  */
+static void
+fd_ring_check (FTS const *sp)
+{
+  if (!fts_debug)
+    return;
+
+  /* Make a writable copy.  */
+  I_ring fd_w = sp->fts_fd_ring;
+
+  int cwd_fd = sp->fts_cwd_fd;
+  cwd_fd = dup (cwd_fd);
+  char *dot = getcwdat (cwd_fd, NULL, 0);
+  error (0, 0, "===== check ===== cwd: %s", dot);
+  free (dot);
+  while ( ! i_ring_empty (&fd_w))
+    {
+      int fd = i_ring_pop (&fd_w);
+      if (0 <= fd)
+        {
+          int parent_fd = openat (cwd_fd, "..", O_SEARCH);
+          if (parent_fd < 0)
+            {
+              // Warn?
+              break;
+            }
+          if (!same_fd (fd, parent_fd))
+            {
+              char *cwd = getcwdat (fd, NULL, 0);
+              error (0, errno, "ring  : %s", cwd);
+              char *c2 = getcwdat (parent_fd, NULL, 0);
+              error (0, errno, "parent: %s", c2);
+              free (cwd);
+              free (c2);
+              fts_assert (0);
+            }
+          close (cwd_fd);
+          cwd_fd = parent_fd;
+        }
+    }
+  close (cwd_fd);
+}
+#endif
+
+static unsigned short int
+internal_function
+fts_stat(FTS *sp, register FTSENT *p, bool follow)
+{
+        struct stat *sbp = p->fts_statp;
+        int saved_errno;
+
+        if (p->fts_level == FTS_ROOTLEVEL && ISSET(FTS_COMFOLLOW))
+                follow = true;
+
+#if defined FTS_WHITEOUT && 0
+        /* check for whiteout */
+        if (p->fts_flags & FTS_ISW) {
+                memset(sbp, '\0', sizeof (*sbp));
+                sbp->st_mode = S_IFWHT;
+                return (FTS_W);
+       }
+#endif
+
+        /*
+         * If doing a logical walk, or application requested FTS_FOLLOW, do
+         * a stat(2).  If that fails, check for a non-existent symlink.  If
+         * fail, set the errno from the stat call.
+         */
+        if (ISSET(FTS_LOGICAL) || follow) {
+                if (stat(p->fts_accpath, sbp)) {
+                        saved_errno = errno;
+                        if (errno == ENOENT
+                            && lstat(p->fts_accpath, sbp) == 0) {
+                                __set_errno (0);
+                                return (FTS_SLNONE);
+                        }
+                        p->fts_errno = saved_errno;
+                        goto err;
+                }
+        } else if (fstatat(sp->fts_cwd_fd, p->fts_accpath, sbp,
+                           AT_SYMLINK_NOFOLLOW)) {
+                p->fts_errno = errno;
+err:            memset(sbp, 0, sizeof(struct stat));
+                return (FTS_NS);
+        }
+
+        if (S_ISDIR(sbp->st_mode)) {
+                p->fts_n_dirs_remaining = (sbp->st_nlink
+                                           - (ISSET(FTS_SEEDOT) ? 0 : 2));
+                if (ISDOT(p->fts_name)) {
+                        /* Command-line "." and ".." are real directories. */
+                        return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT);
+                }
+
+                return (FTS_D);
+        }
+        if (S_ISLNK(sbp->st_mode))
+                return (FTS_SL);
+        if (S_ISREG(sbp->st_mode))
+                return (FTS_F);
+        return (FTS_DEFAULT);
+}
+
+static int
+fts_compar (void const *a, void const *b)
+{
+  /* Convert A and B to the correct types, to pacify the compiler, and
+     for portability to bizarre hosts where "void const *" and "FTSENT
+     const **" differ in runtime representation.  The comparison
+     function cannot modify *a and *b, but there is no compile-time
+     check for this.  */
+  FTSENT const **pa = (FTSENT const **) a;
+  FTSENT const **pb = (FTSENT const **) b;
+  return pa[0]->fts_fts->fts_compar (pa, pb);
+}
+
+static FTSENT *
+internal_function
+fts_sort (FTS *sp, FTSENT *head, register size_t nitems)
+{
+        register FTSENT **ap, *p;
+
+        /* On most modern hosts, void * and FTSENT ** have the same
+           run-time representation, and one can convert sp->fts_compar to
+           the type qsort expects without problem.  Use the heuristic that
+           this is OK if the two pointer types are the same size, and if
+           converting FTSENT ** to long int is the same as converting
+           FTSENT ** to void * and then to long int.  This heuristic isn't
+           valid in general but we don't know of any counterexamples.  */
+        FTSENT *dummy;
+        int (*compare) (void const *, void const *) =
+          ((sizeof &dummy == sizeof (void *)
+            && (long int) &dummy == (long int) (void *) &dummy)
+           ? (int (*) (void const *, void const *)) sp->fts_compar
+           : fts_compar);
+
+        /*
+         * Construct an array of pointers to the structures and call qsort(3).
+         * Reassemble the array in the order returned by qsort.  If unable to
+         * sort for memory reasons, return the directory entries in their
+         * current order.  Allocate enough space for the current needs plus
+         * 40 so don't realloc one entry at a time.
+         */
+        if (nitems > sp->fts_nitems) {
+                FTSENT **a;
+
+                sp->fts_nitems = nitems + 40;
+                if (SIZE_MAX / sizeof *a < sp->fts_nitems
+                    || ! (a = realloc (sp->fts_array,
+                                       sp->fts_nitems * sizeof *a))) {
+                        free(sp->fts_array);
+                        sp->fts_array = NULL;
+                        sp->fts_nitems = 0;
+                        return (head);
+                }
+                sp->fts_array = a;
+        }
+        for (ap = sp->fts_array, p = head; p; p = p->fts_link)
+                *ap++ = p;
+        qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), compare);
+        for (head = *(ap = sp->fts_array); --nitems; ++ap)
+                ap[0]->fts_link = ap[1];
+        ap[0]->fts_link = NULL;
+        return (head);
+}
+
+static FTSENT *
+internal_function
+fts_alloc (FTS *sp, const char *name, register size_t namelen)
+{
+        register FTSENT *p;
+        size_t len;
+
+        /*
+         * The file name is a variable length array.  Allocate the FTSENT
+         * structure and the file name in one chunk.
+         */
+        len = sizeof(FTSENT) + namelen;
+        if ((p = malloc(len)) == NULL)
+                return (NULL);
+
+        /* Copy the name and guarantee NUL termination. */
+        memmove(p->fts_name, name, namelen);
+        p->fts_name[namelen] = '\0';
+
+        p->fts_namelen = namelen;
+        p->fts_fts = sp;
+        p->fts_path = sp->fts_path;
+        p->fts_errno = 0;
+        p->fts_flags = 0;
+        p->fts_instr = FTS_NOINSTR;
+        p->fts_number = 0;
+        p->fts_pointer = NULL;
+        return (p);
+}
+
+static void
+internal_function
+fts_lfree (register FTSENT *head)
+{
+        register FTSENT *p;
+
+        /* Free a linked list of structures. */
+        while ((p = head)) {
+                head = head->fts_link;
+                free(p);
+        }
+}
+
+/*
+ * Allow essentially unlimited file name lengths; find, rm, ls should
+ * all work on any tree.  Most systems will allow creation of file
+ * names much longer than MAXPATHLEN, even though the kernel won't
+ * resolve them.  Add the size (not just what's needed) plus 256 bytes
+ * so don't realloc the file name 2 bytes at a time.
+ */
+static bool
+internal_function
+fts_palloc (FTS *sp, size_t more)
+{
+        char *p;
+        size_t new_len = sp->fts_pathlen + more + 256;
+
+        /*
+         * See if fts_pathlen would overflow.
+         */
+        if (new_len < sp->fts_pathlen) {
+                free(sp->fts_path);
+                sp->fts_path = NULL;
+                __set_errno (ENAMETOOLONG);
+                return false;
+        }
+        sp->fts_pathlen = new_len;
+        p = realloc(sp->fts_path, sp->fts_pathlen);
+        if (p == NULL) {
+                free(sp->fts_path);
+                sp->fts_path = NULL;
+                return false;
+        }
+        sp->fts_path = p;
+        return true;
+}
+
+/*
+ * When the file name is realloc'd, have to fix all of the pointers in
+ *  structures already returned.
+ */
+static void
+internal_function
+fts_padjust (FTS *sp, FTSENT *head)
+{
+        FTSENT *p;
+        char *addr = sp->fts_path;
+
+#define ADJUST(p) do {                                                  \
+        if ((p)->fts_accpath != (p)->fts_name) {                        \
+                (p)->fts_accpath =                                      \
+                    (char *)addr + ((p)->fts_accpath - (p)->fts_path);  \
+        }                                                               \
+        (p)->fts_path = addr;                                           \
+} while (0)
+        /* Adjust the current set of children. */
+        for (p = sp->fts_child; p; p = p->fts_link)
+                ADJUST(p);
+
+        /* Adjust the rest of the tree, including the current level. */
+        for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
+                ADJUST(p);
+                p = p->fts_link ? p->fts_link : p->fts_parent;
+        }
+}
+
+static size_t
+internal_function
+fts_maxarglen (char * const *argv)
+{
+        size_t len, max;
+
+        for (max = 0; *argv; ++argv)
+                if ((len = strlen(*argv)) > max)
+                        max = len;
+        return (max + 1);
+}
+
+/*
+ * Change to dir specified by fd or file name without getting
+ * tricked by someone changing the world out from underneath us.
+ * Assumes p->fts_statp->st_dev and p->fts_statp->st_ino are filled in.
+ * If FD is non-negative, expect it to be used after this function returns,
+ * and to be closed eventually.  So don't pass e.g., `dirfd(dirp)' and then
+ * do closedir(dirp), because that would invalidate the saved FD.
+ * Upon failure, close FD immediately and return nonzero.
+ */
+static int
+internal_function
+fts_safe_changedir (FTS *sp, FTSENT *p, int fd, char const *dir)
+{
+        int ret;
+        bool is_dotdot = dir && STREQ (dir, "..");
+        int newfd;
+
+        /* This clause handles the unusual case in which FTS_NOCHDIR
+           is specified, along with FTS_CWDFD.  In that case, there is
+           no need to change even the virtual cwd file descriptor.
+           However, if FD is non-negative, we do close it here.  */
+        if (ISSET (FTS_NOCHDIR))
+          {
+            if (ISSET (FTS_CWDFD) && 0 <= fd)
+              close (fd);
+            return 0;
+          }
+
+        if (fd < 0 && is_dotdot && ISSET (FTS_CWDFD))
+          {
+            /* When possible, skip the diropen and subsequent fstat+dev/ino
+               comparison.  I.e., when changing to parent directory
+               (chdir ("..")), use a file descriptor from the ring and
+               save the overhead of diropen+fstat, as well as avoiding
+               failure when we lack "x" access to the virtual cwd.  */
+            if ( ! i_ring_empty (&sp->fts_fd_ring))
+              {
+                int parent_fd;
+                fd_ring_print (sp, stderr, "pre-pop");
+                parent_fd = i_ring_pop (&sp->fts_fd_ring);
+                is_dotdot = true;
+                if (0 <= parent_fd)
+                  {
+                    fd = parent_fd;
+                    dir = NULL;
+                  }
+              }
+          }
+
+        newfd = fd;
+        if (fd < 0 && (newfd = diropen (sp, dir)) < 0)
+          return -1;
+
+        /* The following dev/inode check is necessary if we're doing a
+           `logical' traversal (through symlinks, a la chown -L), if the
+           system lacks O_NOFOLLOW support, or if we're changing to ".."
+           (but not via a popped file descriptor).  When changing to the
+           name "..", O_NOFOLLOW can't help.  In general, when the target is
+           not "..", diropen's use of O_NOFOLLOW ensures we don't mistakenly
+           follow a symlink, so we can avoid the expense of this fstat.  */
+        if (ISSET(FTS_LOGICAL) || ! HAVE_WORKING_O_NOFOLLOW
+            || (dir && STREQ (dir, "..")))
+          {
+            struct stat sb;
+            if (fstat(newfd, &sb))
+              {
+                ret = -1;
+                goto bail;
+              }
+            if (p->fts_statp->st_dev != sb.st_dev
+                || p->fts_statp->st_ino != sb.st_ino)
+              {
+                __set_errno (ENOENT);           /* disinformation */
+                ret = -1;
+                goto bail;
+              }
+          }
+
+        if (ISSET(FTS_CWDFD))
+          {
+            cwd_advance_fd (sp, newfd, ! is_dotdot);
+            return 0;
+          }
+
+        ret = fchdir(newfd);
+bail:
+        if (fd < 0)
+          {
+            int oerrno = errno;
+            (void)close(newfd);
+            __set_errno (oerrno);
+          }
+        return ret;
+}
diff --git a/gnulib/lib/fts_.h b/gnulib/lib/fts_.h
new file mode 100644 (file)
index 0000000..6a22bec
--- /dev/null
@@ -0,0 +1,266 @@
+/* Traverse a file hierarchy.
+
+   Copyright (C) 2004-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/>.  */
+
+/*
+ * Copyright (c) 1989, 1993
+ *      The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *      @(#)fts.h       8.3 (Berkeley) 8/14/94
+ */
+
+#ifndef _FTS_H
+# define _FTS_H 1
+
+# ifdef _LIBC
+#  include <features.h>
+# else
+#  undef __THROW
+#  define __THROW
+#  undef __BEGIN_DECLS
+#  undef __END_DECLS
+#  ifdef __cplusplus
+#   define __BEGIN_DECLS extern "C" {
+#   define __END_DECLS }
+#  else
+#   define __BEGIN_DECLS
+#   define __END_DECLS
+#  endif
+# endif
+
+# include <stddef.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include "i-ring.h"
+
+typedef struct {
+        struct _ftsent *fts_cur;        /* current node */
+        struct _ftsent *fts_child;      /* linked list of children */
+        struct _ftsent **fts_array;     /* sort array */
+        dev_t fts_dev;                  /* starting device # */
+        char *fts_path;                 /* file name for this descent */
+        int fts_rfd;                    /* fd for root */
+        int fts_cwd_fd;                 /* the file descriptor on which the
+                                           virtual cwd is open, or AT_FDCWD */
+        size_t fts_pathlen;             /* sizeof(path) */
+        size_t fts_nitems;              /* elements in the sort array */
+        int (*fts_compar) (struct _ftsent const **, struct _ftsent const **);
+                                        /* compare fn */
+
+# define FTS_COMFOLLOW  0x0001          /* follow command line symlinks */
+# define FTS_LOGICAL    0x0002          /* logical walk */
+# define FTS_NOCHDIR    0x0004          /* don't change directories */
+# define FTS_NOSTAT     0x0008          /* don't get stat info */
+# define FTS_PHYSICAL   0x0010          /* physical walk */
+# define FTS_SEEDOT     0x0020          /* return dot and dot-dot */
+# define FTS_XDEV       0x0040          /* don't cross devices */
+# define FTS_WHITEOUT   0x0080          /* return whiteout information */
+
+  /* There are two ways to detect cycles.
+     The lazy way (which works only with FTS_PHYSICAL),
+     with which one may process a directory that is a
+     part of the cycle several times before detecting the cycle.
+     The `tight' way, whereby fts uses more memory (proportional
+     to number of `active' directories, aka distance from root
+     of current tree to current directory -- see active_dir_ht)
+     to detect any cycle right away.  For example, du must use
+     this option to avoid counting disk space in a cycle multiple
+     times, but chown -R need not.
+     The default is to use the constant-memory lazy way, when possible
+     (see below).
+
+     However, with FTS_LOGICAL (when following symlinks, e.g., chown -L)
+     using lazy cycle detection is inadequate.  For example, traversing
+     a directory containing a symbolic link to a peer directory, it is
+     possible to encounter the same directory twice even though there
+     is no cycle:
+     dir
+     ...
+     slink -> dir
+     So, when FTS_LOGICAL is selected, we have to use a different
+     mode of cycle detection: FTS_TIGHT_CYCLE_CHECK.  */
+# define FTS_TIGHT_CYCLE_CHECK  0x0100
+
+  /* Use this flag to enable semantics with which the parent
+     application may be made both more efficient and more robust.
+     Whereas the default is to visit each directory in a recursive
+     traversal (via chdir), using this flag makes it so the initial
+     working directory is never changed.  Instead, these functions
+     perform the traversal via a virtual working directory, maintained
+     through the file descriptor member, fts_cwd_fd.  */
+# define FTS_CWDFD              0x0200
+
+  /* Historically, for each directory that fts initially encounters, it would
+     open it, read all entries, and stat each entry, storing the results, and
+     then it would process the first entry.  But that behavior is bad for
+     locality of reference, and also causes trouble with inode-simulating
+     file systems like FAT, CIFS, FUSE-based ones, etc., when entries from
+     their name/inode cache are flushed too early.
+     Use this flag to make fts_open and fts_read defer the stat/lstat/fststat
+     of each entry until it is actually processed.  However, note that if you
+     use this option and also specify a comparison function, that function may
+     not examine any data via fts_statp.  However, when fts_statp->st_mode is
+     nonzero, the S_IFMT type bits are valid, with mapped dirent.d_type data.
+     Of course, that happens only on file systems that provide useful
+     dirent.d_type data.  */
+# define FTS_DEFER_STAT         0x0400
+
+# define FTS_OPTIONMASK 0x07ff          /* valid user option mask */
+
+# define FTS_NAMEONLY   0x1000          /* (private) child names only */
+# define FTS_STOP       0x2000          /* (private) unrecoverable error */
+        int fts_options;                /* fts_open options, global flags */
+
+        /* Map a directory's device number to a boolean.  The boolean is
+           true if for that file system (type determined by a single fstatfs
+           call per FS) st_nlink can be used to calculate the number of
+           sub-directory entries in a directory.
+           Using this table is an optimization that permits us to look up
+           file system type on a per-inode basis at the minimal cost of
+           calling fstatfs only once per traversed device.  */
+        struct hash_table *fts_leaf_optimization_works_ht;
+
+        union {
+                /* This data structure is used if FTS_TIGHT_CYCLE_CHECK is
+                   specified.  It records the directories between a starting
+                   point and the current directory.  I.e., a directory is
+                   recorded here IFF we have visited it once, but we have not
+                   yet completed processing of all its entries.  Every time we
+                   visit a new directory, we add that directory to this set.
+                   When we finish with a directory (usually by visiting it a
+                   second time), we remove it from this set.  Each entry in
+                   this data structure is a device/inode pair.  This data
+                   structure is used to detect directory cycles efficiently and
+                   promptly even when the depth of a hierarchy is in the tens
+                   of thousands.  */
+                struct hash_table *ht;
+
+                /* FIXME: rename these two members to have the fts_ prefix */
+                /* This data structure uses a lazy cycle-detection algorithm,
+                   as done by rm via cycle-check.c.  It's the default,
+                   but it's not appropriate for programs like du.  */
+                struct cycle_check_state *state;
+        } fts_cycle;
+
+        /* A stack of the file descriptors corresponding to the
+           most-recently traversed parent directories.
+           Currently used only in FTS_CWDFD mode.  */
+        I_ring fts_fd_ring;
+} FTS;
+
+typedef struct _ftsent {
+        struct _ftsent *fts_cycle;      /* cycle node */
+        struct _ftsent *fts_parent;     /* parent directory */
+        struct _ftsent *fts_link;       /* next file in directory */
+        long fts_number;                /* local numeric value */
+        void *fts_pointer;              /* local address value */
+        char *fts_accpath;              /* access file name */
+        char *fts_path;                 /* root name; == fts_fts->fts_path */
+        int fts_errno;                  /* errno for this node */
+        int fts_symfd;                  /* fd for symlink */
+        size_t fts_pathlen;             /* strlen(fts_path) */
+
+        FTS *fts_fts;                   /* the file hierarchy itself */
+
+# define FTS_ROOTPARENTLEVEL    (-1)
+# define FTS_ROOTLEVEL           0
+        ptrdiff_t fts_level;            /* depth (-1 to N) */
+
+        size_t fts_namelen;             /* strlen(fts_name) */
+        nlink_t fts_n_dirs_remaining;   /* count down from st_nlink */
+
+# define FTS_D           1              /* preorder directory */
+# define FTS_DC          2              /* directory that causes cycles */
+# define FTS_DEFAULT     3              /* none of the above */
+# define FTS_DNR         4              /* unreadable directory */
+# define FTS_DOT         5              /* dot or dot-dot */
+# define FTS_DP          6              /* postorder directory */
+# define FTS_ERR         7              /* error; errno is set */
+# define FTS_F           8              /* regular file */
+# define FTS_INIT        9              /* initialized only */
+# define FTS_NS         10              /* stat(2) failed */
+# define FTS_NSOK       11              /* no stat(2) requested */
+# define FTS_SL         12              /* symbolic link */
+# define FTS_SLNONE     13              /* symbolic link without target */
+# define FTS_W          14              /* whiteout object */
+        unsigned short int fts_info;    /* user flags for FTSENT structure */
+
+# define FTS_DONTCHDIR   0x01           /* don't chdir .. to the parent */
+# define FTS_SYMFOLLOW   0x02           /* followed a symlink to get here */
+        unsigned short int fts_flags;   /* private flags for FTSENT structure */
+
+# define FTS_AGAIN       1              /* read node again */
+# define FTS_FOLLOW      2              /* follow symbolic link */
+# define FTS_NOINSTR     3              /* no instructions */
+# define FTS_SKIP        4              /* discard node */
+        unsigned short int fts_instr;   /* fts_set() instructions */
+
+        struct stat fts_statp[1];       /* stat(2) information */
+        char fts_name[1];               /* file name */
+} FTSENT;
+
+#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
+
+__BEGIN_DECLS
+FTSENT  *fts_children (FTS *, int) __THROW __attribute_warn_unused_result__;
+int      fts_close (FTS *) __THROW __attribute_warn_unused_result__;
+FTS     *fts_open (char * const *, int,
+                   int (*)(const FTSENT **, const FTSENT **))
+  __THROW __attribute_warn_unused_result__;
+FTSENT  *fts_read (FTS *) __THROW __attribute_warn_unused_result__;
+int      fts_set (FTS *, FTSENT *, int) __THROW;
+__END_DECLS
+
+#endif /* fts.h */
diff --git a/gnulib/lib/getcwd.c b/gnulib/lib/getcwd.c
new file mode 100644 (file)
index 0000000..e52af18
--- /dev/null
@@ -0,0 +1,438 @@
+/* Copyright (C) 1991-1999, 2004-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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 !_LIBC
+# include <config.h>
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdbool.h>
+#include <stddef.h>
+
+#include <fcntl.h> /* For AT_FDCWD on Solaris 9.  */
+
+/* If this host provides the openat function, then enable
+   code below to make getcwd more efficient and robust.  */
+#ifdef HAVE_OPENAT
+# define HAVE_OPENAT_SUPPORT 1
+#else
+# define HAVE_OPENAT_SUPPORT 0
+#endif
+
+#ifndef __set_errno
+# define __set_errno(val) (errno = (val))
+#endif
+
+#include <dirent.h>
+#ifndef _D_EXACT_NAMLEN
+# define _D_EXACT_NAMLEN(d) strlen ((d)->d_name)
+#endif
+#ifndef _D_ALLOC_NAMLEN
+# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
+#endif
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if _LIBC
+# ifndef mempcpy
+#  define mempcpy __mempcpy
+# endif
+#endif
+
+#include <limits.h>
+
+#ifndef MAX
+# define MAX(a, b) ((a) < (b) ? (b) : (a))
+#endif
+#ifndef MIN
+# define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+#ifndef PATH_MAX
+# ifdef MAXPATHLEN
+#  define PATH_MAX MAXPATHLEN
+# else
+#  define PATH_MAX 1024
+# endif
+#endif
+
+#if D_INO_IN_DIRENT
+# define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino))
+#else
+# define MATCHING_INO(dp, ino) true
+#endif
+
+#if !_LIBC
+# define __getcwd rpl_getcwd
+# define __lstat lstat
+# define __closedir closedir
+# define __opendir opendir
+# define __readdir readdir
+#endif
+
+/* The results of opendir() in this file are not used with dirfd and fchdir,
+   and we do not leak fds to any single-threaded code that could use stdio,
+   therefore save some unnecessary recursion in fchdir.c.
+   FIXME - if the kernel ever adds support for multi-thread safety for
+   avoiding standard fds, then we should use opendir_safer and
+   openat_safer.  */
+#undef opendir
+#undef closedir
+\f
+/* Get the name of the current working directory, and put it in SIZE
+   bytes of BUF.  Returns NULL if the directory couldn't be determined or
+   SIZE was too small.  If successful, returns BUF.  In GNU, if BUF is
+   NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
+   unless SIZE == 0, in which case it is as big as necessary.  */
+
+char *
+__getcwd (char *buf, size_t size)
+{
+  /* Lengths of big file name components and entire file names, and a
+     deep level of file name nesting.  These numbers are not upper
+     bounds; they are merely large values suitable for initial
+     allocations, designed to be large enough for most real-world
+     uses.  */
+  enum
+    {
+      BIG_FILE_NAME_COMPONENT_LENGTH = 255,
+      BIG_FILE_NAME_LENGTH = MIN (4095, PATH_MAX - 1),
+      DEEP_NESTING = 100
+    };
+
+#if HAVE_OPENAT_SUPPORT
+  int fd = AT_FDCWD;
+  bool fd_needs_closing = false;
+#else
+  char dots[DEEP_NESTING * sizeof ".." + BIG_FILE_NAME_COMPONENT_LENGTH + 1];
+  char *dotlist = dots;
+  size_t dotsize = sizeof dots;
+  size_t dotlen = 0;
+#endif
+  DIR *dirstream = NULL;
+  dev_t rootdev, thisdev;
+  ino_t rootino, thisino;
+  char *dir;
+  register char *dirp;
+  struct stat st;
+  size_t allocated = size;
+  size_t used;
+
+#if HAVE_RAW_DECL_GETCWD
+  /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and
+     this is much slower than the system getcwd (at least on
+     GNU/Linux).  So trust the system getcwd's results unless they
+     look suspicious.
+
+     Use the system getcwd even if we have openat support, since the
+     system getcwd works even when a parent is unreadable, while the
+     openat-based approach does not.  */
+
+# undef getcwd
+  dir = getcwd (buf, size);
+  if (dir)
+    return dir;
+
+  /* Solaris getcwd (NULL, 0) fails with errno == EINVAL, but it has
+     internal magic that lets it work even if an ancestor directory is
+     inaccessible, which is better in many cases.  So in this case try
+     again with a buffer that's almost always big enough.  */
+  if (errno == EINVAL && buf == NULL && size == 0)
+    {
+      char big_buffer[BIG_FILE_NAME_LENGTH + 1];
+      dir = getcwd (big_buffer, sizeof big_buffer);
+      if (dir)
+        return strdup (dir);
+    }
+
+# if HAVE_PARTLY_WORKING_GETCWD
+  /* The system getcwd works, except it sometimes fails when it
+     shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT.    */
+  if (errno != ERANGE && errno != ENAMETOOLONG && errno != ENOENT)
+    return NULL;
+# endif
+#endif
+
+  if (size == 0)
+    {
+      if (buf != NULL)
+        {
+          __set_errno (EINVAL);
+          return NULL;
+        }
+
+      allocated = BIG_FILE_NAME_LENGTH + 1;
+    }
+
+  if (buf == NULL)
+    {
+      dir = malloc (allocated);
+      if (dir == NULL)
+        return NULL;
+    }
+  else
+    dir = buf;
+
+  dirp = dir + allocated;
+  *--dirp = '\0';
+
+  if (__lstat (".", &st) < 0)
+    goto lose;
+  thisdev = st.st_dev;
+  thisino = st.st_ino;
+
+  if (__lstat ("/", &st) < 0)
+    goto lose;
+  rootdev = st.st_dev;
+  rootino = st.st_ino;
+
+  while (!(thisdev == rootdev && thisino == rootino))
+    {
+      struct dirent *d;
+      dev_t dotdev;
+      ino_t dotino;
+      bool mount_point;
+      int parent_status;
+      size_t dirroom;
+      size_t namlen;
+      bool use_d_ino = true;
+
+      /* Look at the parent directory.  */
+#if HAVE_OPENAT_SUPPORT
+      fd = openat (fd, "..", O_RDONLY);
+      if (fd < 0)
+        goto lose;
+      fd_needs_closing = true;
+      parent_status = fstat (fd, &st);
+#else
+      dotlist[dotlen++] = '.';
+      dotlist[dotlen++] = '.';
+      dotlist[dotlen] = '\0';
+      parent_status = __lstat (dotlist, &st);
+#endif
+      if (parent_status != 0)
+        goto lose;
+
+      if (dirstream && __closedir (dirstream) != 0)
+        {
+          dirstream = NULL;
+          goto lose;
+        }
+
+      /* Figure out if this directory is a mount point.  */
+      dotdev = st.st_dev;
+      dotino = st.st_ino;
+      mount_point = dotdev != thisdev;
+
+      /* Search for the last directory.  */
+#if HAVE_OPENAT_SUPPORT
+      dirstream = fdopendir (fd);
+      if (dirstream == NULL)
+        goto lose;
+      fd_needs_closing = false;
+#else
+      dirstream = __opendir (dotlist);
+      if (dirstream == NULL)
+        goto lose;
+      dotlist[dotlen++] = '/';
+#endif
+      for (;;)
+        {
+          /* Clear errno to distinguish EOF from error if readdir returns
+             NULL.  */
+          __set_errno (0);
+          d = __readdir (dirstream);
+
+          /* When we've iterated through all directory entries without finding
+             one with a matching d_ino, rewind the stream and consider each
+             name again, but this time, using lstat.  This is necessary in a
+             chroot on at least one system (glibc-2.3.6 + linux 2.6.12), where
+             .., ../.., ../../.., etc. all had the same device number, yet the
+             d_ino values for entries in / did not match those obtained
+             via lstat.  */
+          if (d == NULL && errno == 0 && use_d_ino)
+            {
+              use_d_ino = false;
+              rewinddir (dirstream);
+              d = __readdir (dirstream);
+            }
+
+          if (d == NULL)
+            {
+              if (errno == 0)
+                /* EOF on dirstream, which can mean e.g., that the current
+                   directory has been removed.  */
+                __set_errno (ENOENT);
+              goto lose;
+            }
+          if (d->d_name[0] == '.' &&
+              (d->d_name[1] == '\0' ||
+               (d->d_name[1] == '.' && d->d_name[2] == '\0')))
+            continue;
+
+          if (use_d_ino)
+            {
+              bool match = (MATCHING_INO (d, thisino) || mount_point);
+              if (! match)
+                continue;
+            }
+
+          {
+            int entry_status;
+#if HAVE_OPENAT_SUPPORT
+            entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW);
+#else
+            /* Compute size needed for this file name, or for the file
+               name ".." in the same directory, whichever is larger.
+               Room for ".." might be needed the next time through
+               the outer loop.  */
+            size_t name_alloc = _D_ALLOC_NAMLEN (d);
+            size_t filesize = dotlen + MAX (sizeof "..", name_alloc);
+
+            if (filesize < dotlen)
+              goto memory_exhausted;
+
+            if (dotsize < filesize)
+              {
+                /* My, what a deep directory tree you have, Grandma.  */
+                size_t newsize = MAX (filesize, dotsize * 2);
+                size_t i;
+                if (newsize < dotsize)
+                  goto memory_exhausted;
+                if (dotlist != dots)
+                  free (dotlist);
+                dotlist = malloc (newsize);
+                if (dotlist == NULL)
+                  goto lose;
+                dotsize = newsize;
+
+                i = 0;
+                do
+                  {
+                    dotlist[i++] = '.';
+                    dotlist[i++] = '.';
+                    dotlist[i++] = '/';
+                  }
+                while (i < dotlen);
+              }
+
+            memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d));
+            entry_status = __lstat (dotlist, &st);
+#endif
+            /* We don't fail here if we cannot stat() a directory entry.
+               This can happen when (network) file systems fail.  If this
+               entry is in fact the one we are looking for we will find
+               out soon as we reach the end of the directory without
+               having found anything.  */
+            if (entry_status == 0 && S_ISDIR (st.st_mode)
+                && st.st_dev == thisdev && st.st_ino == thisino)
+              break;
+          }
+        }
+
+      dirroom = dirp - dir;
+      namlen = _D_EXACT_NAMLEN (d);
+
+      if (dirroom <= namlen)
+        {
+          if (size != 0)
+            {
+              __set_errno (ERANGE);
+              goto lose;
+            }
+          else
+            {
+              char *tmp;
+              size_t oldsize = allocated;
+
+              allocated += MAX (allocated, namlen);
+              if (allocated < oldsize
+                  || ! (tmp = realloc (dir, allocated)))
+                goto memory_exhausted;
+
+              /* Move current contents up to the end of the buffer.
+                 This is guaranteed to be non-overlapping.  */
+              dirp = memcpy (tmp + allocated - (oldsize - dirroom),
+                             tmp + dirroom,
+                             oldsize - dirroom);
+              dir = tmp;
+            }
+        }
+      dirp -= namlen;
+      memcpy (dirp, d->d_name, namlen);
+      *--dirp = '/';
+
+      thisdev = dotdev;
+      thisino = dotino;
+    }
+
+  if (dirstream && __closedir (dirstream) != 0)
+    {
+      dirstream = NULL;
+      goto lose;
+    }
+
+  if (dirp == &dir[allocated - 1])
+    *--dirp = '/';
+
+#if ! HAVE_OPENAT_SUPPORT
+  if (dotlist != dots)
+    free (dotlist);
+#endif
+
+  used = dir + allocated - dirp;
+  memmove (dir, dirp, used);
+
+  if (size == 0)
+    /* Ensure that the buffer is only as large as necessary.  */
+    buf = realloc (dir, used);
+
+  if (buf == NULL)
+    /* Either buf was NULL all along, or `realloc' failed but
+       we still have the original string.  */
+    buf = dir;
+
+  return buf;
+
+ memory_exhausted:
+  __set_errno (ENOMEM);
+ lose:
+  {
+    int save = errno;
+    if (dirstream)
+      __closedir (dirstream);
+#if HAVE_OPENAT_SUPPORT
+    if (fd_needs_closing)
+      close (fd);
+#else
+    if (dotlist != dots)
+      free (dotlist);
+#endif
+    if (buf == NULL)
+      free (dir);
+    __set_errno (save);
+  }
+  return NULL;
+}
+
+#ifdef weak_alias
+weak_alias (__getcwd, getcwd)
+#endif
diff --git a/gnulib/lib/getdelim.c b/gnulib/lib/getdelim.c
new file mode 100644 (file)
index 0000000..14a8bce
--- /dev/null
@@ -0,0 +1,137 @@
+/* getdelim.c --- Implementation of replacement getdelim function.
+   Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-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, 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, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+/* Ported from glibc by Simon Josefsson. */
+
+#include <config.h>
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit.  Otherwise gcc
+   optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below.  */
+#define _GL_ARG_NONNULL(params)
+
+#include <stdio.h>
+
+#include <limits.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifndef SSIZE_MAX
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
+#endif
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+# define getc_maybe_unlocked(fp)        getc(fp)
+#elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED
+# undef flockfile
+# undef funlockfile
+# define flockfile(x) ((void) 0)
+# define funlockfile(x) ((void) 0)
+# define getc_maybe_unlocked(fp)        getc(fp)
+#else
+# define getc_maybe_unlocked(fp)        getc_unlocked(fp)
+#endif
+
+/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and
+   NUL-terminate it).  *LINEPTR is a pointer returned from malloc (or
+   NULL), pointing to *N characters of space.  It is realloc'ed as
+   necessary.  Returns the number of characters read (not including
+   the null terminator), or -1 on error or EOF.  */
+
+ssize_t
+getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
+{
+  ssize_t result;
+  size_t cur_len = 0;
+
+  if (lineptr == NULL || n == NULL || fp == NULL)
+    {
+      errno = EINVAL;
+      return -1;
+    }
+
+  flockfile (fp);
+
+  if (*lineptr == NULL || *n == 0)
+    {
+      char *new_lineptr;
+      *n = 120;
+      new_lineptr = (char *) realloc (*lineptr, *n);
+      if (new_lineptr == NULL)
+        {
+          result = -1;
+          goto unlock_return;
+        }
+      *lineptr = new_lineptr;
+    }
+
+  for (;;)
+    {
+      int i;
+
+      i = getc_maybe_unlocked (fp);
+      if (i == EOF)
+        {
+          result = -1;
+          break;
+        }
+
+      /* Make enough space for len+1 (for final NUL) bytes.  */
+      if (cur_len + 1 >= *n)
+        {
+          size_t needed_max =
+            SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX;
+          size_t needed = 2 * *n + 1;   /* Be generous. */
+          char *new_lineptr;
+
+          if (needed_max < needed)
+            needed = needed_max;
+          if (cur_len + 1 >= needed)
+            {
+              result = -1;
+              errno = EOVERFLOW;
+              goto unlock_return;
+            }
+
+          new_lineptr = (char *) realloc (*lineptr, needed);
+          if (new_lineptr == NULL)
+            {
+              result = -1;
+              goto unlock_return;
+            }
+
+          *lineptr = new_lineptr;
+          *n = needed;
+        }
+
+      (*lineptr)[cur_len] = i;
+      cur_len++;
+
+      if (i == delimiter)
+        break;
+    }
+  (*lineptr)[cur_len] = '\0';
+  result = cur_len ? cur_len : result;
+
+ unlock_return:
+  funlockfile (fp); /* doesn't set errno */
+
+  return result;
+}
diff --git a/gnulib/lib/getdtablesize.c b/gnulib/lib/getdtablesize.c
new file mode 100644 (file)
index 0000000..60e7f5a
--- /dev/null
@@ -0,0 +1,63 @@
+/* getdtablesize() function for platforms that don't have it.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+#include <stdio.h>
+
+/* Cache for the previous getdtablesize () result.  */
+static int dtablesize;
+
+int
+getdtablesize (void)
+{
+  if (dtablesize == 0)
+    {
+      /* We are looking for the number N such that the valid file descriptors
+         are 0..N-1.  It can be obtained through a loop as follows:
+           {
+             int fd;
+             for (fd = 3; fd < 65536; fd++)
+               if (dup2 (0, fd) == -1)
+                 break;
+             return fd;
+           }
+         On Windows XP, the result is 2048.
+         The drawback of this loop is that it allocates memory for a libc
+         internal array that is never freed.
+
+         The number N can also be obtained as the upper bound for
+         _getmaxstdio ().  _getmaxstdio () returns the maximum number of open
+         FILE objects.  The sanity check in _setmaxstdio reveals the maximum
+         number of file descriptors.  This too allocates memory, but it is
+         freed when we call _setmaxstdio with the original value.  */
+      int orig_max_stdio = _getmaxstdio ();
+      unsigned int bound;
+      for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2)
+        ;
+      _setmaxstdio (orig_max_stdio);
+      dtablesize = bound;
+    }
+  return dtablesize;
+}
+
+#endif
diff --git a/gnulib/lib/getfilecon.c b/gnulib/lib/getfilecon.c
new file mode 100644 (file)
index 0000000..ccd9fa5
--- /dev/null
@@ -0,0 +1,87 @@
+/* wrap getfilecon, lgetfilecon, and fgetfilecon
+   Copyright (C) 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+#include <selinux/selinux.h>
+
+#include <sys/types.h>
+#include <errno.h>
+#include <string.h>
+
+/* FIXME: remove this once there is an errno-gnu module
+   that guarantees the definition of ENODATA.  */
+#ifndef ENODATA
+# define ENODATA ENOTSUP
+#endif
+
+#undef getfilecon
+#undef lgetfilecon
+#undef fgetfilecon
+int getfilecon (char const *file, security_context_t *con);
+int lgetfilecon (char const *file, security_context_t *con);
+int fgetfilecon (int fd, security_context_t *con);
+
+/* getfilecon, lgetfilecon, and fgetfilecon can all misbehave, be it
+   via an old version of libselinux where these would return 0 and set the
+   result context to NULL, or via a modern kernel+lib operating on a file
+   from a disk whose attributes were set by a kernel from around 2006.
+   In that latter case, the functions return a length of 10 for the
+   "unlabeled" context.  Map both failures to a return value of -1, and
+   set errno to ENOTSUP in the first case, and ENODATA in the latter.  */
+
+static inline int
+map_to_failure (int ret, security_context_t *con)
+{
+  if (ret == 0)
+    {
+      errno = ENOTSUP;
+      return -1;
+    }
+
+  if (ret == 10 && strcmp (*con, "unlabeled") == 0)
+    {
+      freecon (*con);
+      errno = ENODATA;
+      return -1;
+    }
+
+  return ret;
+}
+
+int
+rpl_getfilecon (char const *file, security_context_t *con)
+{
+  int ret = getfilecon (file, con);
+  return map_to_failure (ret, con);
+}
+
+int
+rpl_lgetfilecon (char const *file, security_context_t *con)
+{
+  int ret = lgetfilecon (file, con);
+  return map_to_failure (ret, con);
+}
+
+int
+rpl_fgetfilecon (int fd, security_context_t *con)
+{
+  int ret = fgetfilecon (fd, con);
+  return map_to_failure (ret, con);
+}
diff --git a/gnulib/lib/getgroups.c b/gnulib/lib/getgroups.c
new file mode 100644 (file)
index 0000000..87e1679
--- /dev/null
@@ -0,0 +1,116 @@
+/* provide consistent interface to getgroups for systems that don't allow N==0
+
+   Copyright (C) 1996, 1999, 2003, 2006-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 Jim Meyering */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <errno.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+#if !HAVE_GETGROUPS
+
+/* Provide a stub that fails with ENOSYS, since there is no group
+   information available on mingw.  */
+int
+getgroups (int n _GL_UNUSED, GETGROUPS_T *groups _GL_UNUSED)
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+#else /* HAVE_GETGROUPS */
+
+# undef getgroups
+# ifndef GETGROUPS_ZERO_BUG
+#  define GETGROUPS_ZERO_BUG 0
+# endif
+
+/* On at least Ultrix 4.3 and NextStep 3.2, getgroups (0, NULL) always
+   fails.  On other systems, it returns the number of supplemental
+   groups for the process.  This function handles that special case
+   and lets the system-provided function handle all others.  However,
+   it can fail with ENOMEM if memory is tight.  It is unspecified
+   whether the effective group id is included in the list.  */
+
+int
+rpl_getgroups (int n, gid_t *group)
+{
+  int n_groups;
+  GETGROUPS_T *gbuf;
+  int saved_errno;
+
+  if (n < 0)
+    {
+      errno = EINVAL;
+      return -1;
+    }
+
+  if (n != 0 || !GETGROUPS_ZERO_BUG)
+    {
+      int result;
+      if (sizeof *group == sizeof *gbuf)
+        return getgroups (n, (GETGROUPS_T *) group);
+
+      if (SIZE_MAX / sizeof *gbuf <= n)
+        {
+          errno = ENOMEM;
+          return -1;
+        }
+      gbuf = malloc (n * sizeof *gbuf);
+      if (!gbuf)
+        return -1;
+      result = getgroups (n, gbuf);
+      if (0 <= result)
+        {
+          n = result;
+          while (n--)
+            group[n] = gbuf[n];
+        }
+      saved_errno = errno;
+      free (gbuf);
+      errno == saved_errno;
+      return result;
+    }
+
+  n = 20;
+  while (1)
+    {
+      /* No need to worry about address arithmetic overflow here,
+         since the ancient systems that we're running on have low
+         limits on the number of secondary groups.  */
+      gbuf = malloc (n * sizeof *gbuf);
+      if (!gbuf)
+        return -1;
+      n_groups = getgroups (n, gbuf);
+      if (n_groups == -1 ? errno != EINVAL : n_groups < n)
+        break;
+      free (gbuf);
+      n *= 2;
+    }
+
+  saved_errno = errno;
+  free (gbuf);
+  errno = saved_errno;
+
+  return n_groups;
+}
+
+#endif /* HAVE_GETGROUPS */
diff --git a/gnulib/lib/getline.c b/gnulib/lib/getline.c
new file mode 100644 (file)
index 0000000..e6e9187
--- /dev/null
@@ -0,0 +1,29 @@
+/* getline.c --- Implementation of replacement getline function.
+   Copyright (C) 2005-2007, 2009-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, 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, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+/* Written by Simon Josefsson. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+ssize_t
+getline (char **lineptr, size_t *n, FILE *stream)
+{
+  return getdelim (lineptr, n, '\n', stream);
+}
diff --git a/gnulib/lib/getopt.c b/gnulib/lib/getopt.c
new file mode 100644 (file)
index 0000000..c8b3013
--- /dev/null
@@ -0,0 +1,1192 @@
+/* Getopt for GNU.
+   NOTE: getopt is part of the C library, so if you don't know what
+   "Keep this file name-space clean" means, talk to drepper@gnu.org
+   before changing it!
+   Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software
+   Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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/>.  */
+\f
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include "getopt.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+# include <wchar.h>
+#endif
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+   but it behaves differently for the user, since it allows the user
+   to intersperse the options with the other arguments.
+
+   As `getopt_long' works, it permutes the elements of ARGV so that,
+   when it is done, all the options precede everything else.  Thus
+   all application programs are extended to handle flexible argument order.
+
+   Using `getopt' or setting the environment variable POSIXLY_CORRECT
+   disables permutation.
+   Then the behavior is completely standard.
+
+   GNU application programs can use a third alternative mode in which
+   they can distinguish the relative order of options and other arguments.  */
+
+#include "getopt_int.h"
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns -1, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+/* 1003.2 says this must be 1 before any call.  */
+int optind = 1;
+
+/* Callers store zero here to inhibit the error message
+   for unrecognized options.  */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+   This must be initialized on some systems to avoid linking in the
+   system's own getopt implementation.  */
+
+int optopt = '?';
+
+/* Keep a global copy of all internal members of getopt_data.  */
+
+static struct _getopt_data getopt_data;
+
+\f
+#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV
+extern char *getenv ();
+#endif
+\f
+#ifdef _LIBC
+/* Stored original parameters.
+   XXX This is no good solution.  We should rather copy the args so
+   that we can compare them later.  But we must not use malloc(3).  */
+extern int __libc_argc;
+extern char **__libc_argv;
+
+/* Bash 2.0 gives us an environment variable containing flags
+   indicating ARGV elements that should not be considered arguments.  */
+
+# ifdef USE_NONOPTION_FLAGS
+/* Defined in getopt_init.c  */
+extern char *__getopt_nonoption_flags;
+# endif
+
+# ifdef USE_NONOPTION_FLAGS
+#  define SWAP_FLAGS(ch1, ch2) \
+  if (d->__nonoption_flags_len > 0)                                           \
+    {                                                                         \
+      char __tmp = __getopt_nonoption_flags[ch1];                             \
+      __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2];          \
+      __getopt_nonoption_flags[ch2] = __tmp;                                  \
+    }
+# else
+#  define SWAP_FLAGS(ch1, ch2)
+# endif
+#else   /* !_LIBC */
+# define SWAP_FLAGS(ch1, ch2)
+#endif  /* _LIBC */
+
+/* Exchange two adjacent subsequences of ARGV.
+   One subsequence is elements [first_nonopt,last_nonopt)
+   which contains all the non-options that have been skipped so far.
+   The other is elements [last_nonopt,optind), which contains all
+   the options processed since those non-options were skipped.
+
+   `first_nonopt' and `last_nonopt' are relocated so that they describe
+   the new indices of the non-options in ARGV after they are moved.  */
+
+static void
+exchange (char **argv, struct _getopt_data *d)
+{
+  int bottom = d->__first_nonopt;
+  int middle = d->__last_nonopt;
+  int top = d->optind;
+  char *tem;
+
+  /* Exchange the shorter segment with the far end of the longer segment.
+     That puts the shorter segment into the right place.
+     It leaves the longer segment in the right place overall,
+     but it consists of two parts that need to be swapped next.  */
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+  /* First make sure the handling of the `__getopt_nonoption_flags'
+     string can work normally.  Our top argument must be in the range
+     of the string.  */
+  if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
+    {
+      /* We must extend the array.  The user plays games with us and
+         presents new arguments.  */
+      char *new_str = malloc (top + 1);
+      if (new_str == NULL)
+        d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
+      else
+        {
+          memset (__mempcpy (new_str, __getopt_nonoption_flags,
+                             d->__nonoption_flags_max_len),
+                  '\0', top + 1 - d->__nonoption_flags_max_len);
+          d->__nonoption_flags_max_len = top + 1;
+          __getopt_nonoption_flags = new_str;
+        }
+    }
+#endif
+
+  while (top > middle && middle > bottom)
+    {
+      if (top - middle > middle - bottom)
+        {
+          /* Bottom segment is the short one.  */
+          int len = middle - bottom;
+          register int i;
+
+          /* Swap it with the top part of the top segment.  */
+          for (i = 0; i < len; i++)
+            {
+              tem = argv[bottom + i];
+              argv[bottom + i] = argv[top - (middle - bottom) + i];
+              argv[top - (middle - bottom) + i] = tem;
+              SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
+            }
+          /* Exclude the moved bottom segment from further swapping.  */
+          top -= len;
+        }
+      else
+        {
+          /* Top segment is the short one.  */
+          int len = top - middle;
+          register int i;
+
+          /* Swap it with the bottom part of the bottom segment.  */
+          for (i = 0; i < len; i++)
+            {
+              tem = argv[bottom + i];
+              argv[bottom + i] = argv[middle + i];
+              argv[middle + i] = tem;
+              SWAP_FLAGS (bottom + i, middle + i);
+            }
+          /* Exclude the moved top segment from further swapping.  */
+          bottom += len;
+        }
+    }
+
+  /* Update records for the slots the non-options now occupy.  */
+
+  d->__first_nonopt += (d->optind - d->__last_nonopt);
+  d->__last_nonopt = d->optind;
+}
+
+/* Initialize the internal data when the first call is made.  */
+
+static const char *
+_getopt_initialize (int argc _GL_UNUSED,
+                    char **argv _GL_UNUSED, const char *optstring,
+                    struct _getopt_data *d, int posixly_correct)
+{
+  /* Start processing options with ARGV-element 1 (since ARGV-element 0
+     is the program name); the sequence of previously skipped
+     non-option ARGV-elements is empty.  */
+
+  d->__first_nonopt = d->__last_nonopt = d->optind;
+
+  d->__nextchar = NULL;
+
+  d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT");
+
+  /* Determine how to handle the ordering of options and nonoptions.  */
+
+  if (optstring[0] == '-')
+    {
+      d->__ordering = RETURN_IN_ORDER;
+      ++optstring;
+    }
+  else if (optstring[0] == '+')
+    {
+      d->__ordering = REQUIRE_ORDER;
+      ++optstring;
+    }
+  else if (d->__posixly_correct)
+    d->__ordering = REQUIRE_ORDER;
+  else
+    d->__ordering = PERMUTE;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+  if (!d->__posixly_correct
+      && argc == __libc_argc && argv == __libc_argv)
+    {
+      if (d->__nonoption_flags_max_len == 0)
+        {
+          if (__getopt_nonoption_flags == NULL
+              || __getopt_nonoption_flags[0] == '\0')
+            d->__nonoption_flags_max_len = -1;
+          else
+            {
+              const char *orig_str = __getopt_nonoption_flags;
+              int len = d->__nonoption_flags_max_len = strlen (orig_str);
+              if (d->__nonoption_flags_max_len < argc)
+                d->__nonoption_flags_max_len = argc;
+              __getopt_nonoption_flags =
+                (char *) malloc (d->__nonoption_flags_max_len);
+              if (__getopt_nonoption_flags == NULL)
+                d->__nonoption_flags_max_len = -1;
+              else
+                memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+                        '\0', d->__nonoption_flags_max_len - len);
+            }
+        }
+      d->__nonoption_flags_len = d->__nonoption_flags_max_len;
+    }
+  else
+    d->__nonoption_flags_len = 0;
+#endif
+
+  return optstring;
+}
+\f
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+   given in OPTSTRING.
+
+   If an element of ARGV starts with '-', and is not exactly "-" or "--",
+   then it is an option element.  The characters of this element
+   (aside from the initial '-') are option characters.  If `getopt'
+   is called repeatedly, it returns successively each of the option characters
+   from each of the option elements.
+
+   If `getopt' finds another option character, it returns that character,
+   updating `optind' and `nextchar' so that the next call to `getopt' can
+   resume the scan with the following option character or ARGV-element.
+
+   If there are no more option characters, `getopt' returns -1.
+   Then `optind' is the index in ARGV of the first ARGV-element
+   that is not an option.  (The ARGV-elements have been permuted
+   so that those that are not options now come last.)
+
+   OPTSTRING is a string containing the legitimate option characters.
+   If an option character is seen that is not listed in OPTSTRING,
+   return '?' after printing an error message.  If you set `opterr' to
+   zero, the error message is suppressed but we still return '?'.
+
+   If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+   so the following text in the same ARGV-element, or the text of the following
+   ARGV-element, is returned in `optarg'.  Two colons mean an option that
+   wants an optional arg; if there is text in the current ARGV-element,
+   it is returned in `optarg', otherwise `optarg' is set to zero.
+
+   If OPTSTRING starts with `-' or `+', it requests different methods of
+   handling the non-option ARGV-elements.
+   See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+   Long-named options begin with `--' instead of `-'.
+   Their names may be abbreviated as long as the abbreviation is unique
+   or is an exact match for some defined option.  If they have an
+   argument, it follows the option name in the same ARGV-element, separated
+   from the option name by a `=', or else the in next ARGV-element.
+   When `getopt' finds a long-named option, it returns 0 if that option's
+   `flag' field is nonzero, the value of the option's `val' field
+   if the `flag' field is zero.
+
+   The elements of ARGV aren't really const, because we permute them.
+   But we pretend they're const in the prototype to be compatible
+   with other systems.
+
+   LONGOPTS is a vector of `struct option' terminated by an
+   element containing a name which is zero.
+
+   LONGIND returns the index in LONGOPT of the long-named option found.
+   It is only valid when a long-named option has been found by the most
+   recent call.
+
+   If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+   long-named options.  */
+
+int
+_getopt_internal_r (int argc, char **argv, const char *optstring,
+                    const struct option *longopts, int *longind,
+                    int long_only, struct _getopt_data *d, int posixly_correct)
+{
+  int print_errors = d->opterr;
+
+  if (argc < 1)
+    return -1;
+
+  d->optarg = NULL;
+
+  if (d->optind == 0 || !d->__initialized)
+    {
+      if (d->optind == 0)
+        d->optind = 1;  /* Don't scan ARGV[0], the program name.  */
+      optstring = _getopt_initialize (argc, argv, optstring, d,
+                                      posixly_correct);
+      d->__initialized = 1;
+    }
+  else if (optstring[0] == '-' || optstring[0] == '+')
+    optstring++;
+  if (optstring[0] == ':')
+    print_errors = 0;
+
+  /* Test whether ARGV[optind] points to a non-option argument.
+     Either it does not have option syntax, or there is an environment flag
+     from the shell indicating it is not an option.  The later information
+     is only used when the used in the GNU libc.  */
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
+                      || (d->optind < d->__nonoption_flags_len                \
+                          && __getopt_nonoption_flags[d->optind] == '1'))
+#else
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
+#endif
+
+  if (d->__nextchar == NULL || *d->__nextchar == '\0')
+    {
+      /* Advance to the next ARGV-element.  */
+
+      /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
+         moved back by the user (who may also have changed the arguments).  */
+      if (d->__last_nonopt > d->optind)
+        d->__last_nonopt = d->optind;
+      if (d->__first_nonopt > d->optind)
+        d->__first_nonopt = d->optind;
+
+      if (d->__ordering == PERMUTE)
+        {
+          /* If we have just processed some options following some non-options,
+             exchange them so that the options come first.  */
+
+          if (d->__first_nonopt != d->__last_nonopt
+              && d->__last_nonopt != d->optind)
+            exchange ((char **) argv, d);
+          else if (d->__last_nonopt != d->optind)
+            d->__first_nonopt = d->optind;
+
+          /* Skip any additional non-options
+             and extend the range of non-options previously skipped.  */
+
+          while (d->optind < argc && NONOPTION_P)
+            d->optind++;
+          d->__last_nonopt = d->optind;
+        }
+
+      /* The special ARGV-element `--' means premature end of options.
+         Skip it like a null option,
+         then exchange with previous non-options as if it were an option,
+         then skip everything else like a non-option.  */
+
+      if (d->optind != argc && !strcmp (argv[d->optind], "--"))
+        {
+          d->optind++;
+
+          if (d->__first_nonopt != d->__last_nonopt
+              && d->__last_nonopt != d->optind)
+            exchange ((char **) argv, d);
+          else if (d->__first_nonopt == d->__last_nonopt)
+            d->__first_nonopt = d->optind;
+          d->__last_nonopt = argc;
+
+          d->optind = argc;
+        }
+
+      /* If we have done all the ARGV-elements, stop the scan
+         and back over any non-options that we skipped and permuted.  */
+
+      if (d->optind == argc)
+        {
+          /* Set the next-arg-index to point at the non-options
+             that we previously skipped, so the caller will digest them.  */
+          if (d->__first_nonopt != d->__last_nonopt)
+            d->optind = d->__first_nonopt;
+          return -1;
+        }
+
+      /* If we have come to a non-option and did not permute it,
+         either stop the scan or describe it to the caller and pass it by.  */
+
+      if (NONOPTION_P)
+        {
+          if (d->__ordering == REQUIRE_ORDER)
+            return -1;
+          d->optarg = argv[d->optind++];
+          return 1;
+        }
+
+      /* We have found another option-ARGV-element.
+         Skip the initial punctuation.  */
+
+      d->__nextchar = (argv[d->optind] + 1
+                  + (longopts != NULL && argv[d->optind][1] == '-'));
+    }
+
+  /* Decode the current option-ARGV-element.  */
+
+  /* Check whether the ARGV-element is a long option.
+
+     If long_only and the ARGV-element has the form "-f", where f is
+     a valid short option, don't consider it an abbreviated form of
+     a long option that starts with f.  Otherwise there would be no
+     way to give the -f short option.
+
+     On the other hand, if there's a long option "fubar" and
+     the ARGV-element is "-fu", do consider that an abbreviation of
+     the long option, just like "--fu", and not "-f" with arg "u".
+
+     This distinction seems to be the most useful approach.  */
+
+  if (longopts != NULL
+      && (argv[d->optind][1] == '-'
+          || (long_only && (argv[d->optind][2]
+                            || !strchr (optstring, argv[d->optind][1])))))
+    {
+      char *nameend;
+      const struct option *p;
+      const struct option *pfound = NULL;
+      int exact = 0;
+      int ambig = 0;
+      int indfound = -1;
+      int option_index;
+
+      for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
+        /* Do nothing.  */ ;
+
+      /* Test all long options for either exact match
+         or abbreviated matches.  */
+      for (p = longopts, option_index = 0; p->name; p++, option_index++)
+        if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
+          {
+            if ((unsigned int) (nameend - d->__nextchar)
+                == (unsigned int) strlen (p->name))
+              {
+                /* Exact match found.  */
+                pfound = p;
+                indfound = option_index;
+                exact = 1;
+                break;
+              }
+            else if (pfound == NULL)
+              {
+                /* First nonexact match found.  */
+                pfound = p;
+                indfound = option_index;
+              }
+            else if (long_only
+                     || pfound->has_arg != p->has_arg
+                     || pfound->flag != p->flag
+                     || pfound->val != p->val)
+              /* Second or later nonexact match found.  */
+              ambig = 1;
+          }
+
+      if (ambig && !exact)
+        {
+          if (print_errors)
+            {
+#if defined _LIBC && defined USE_IN_LIBIO
+              char *buf;
+
+              if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"),
+                              argv[0], argv[d->optind]) >= 0)
+                {
+                  _IO_flockfile (stderr);
+
+                  int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                  ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+                  __fxprintf (NULL, "%s", buf);
+
+                  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                  _IO_funlockfile (stderr);
+
+                  free (buf);
+                }
+#else
+              fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
+                       argv[0], argv[d->optind]);
+#endif
+            }
+          d->__nextchar += strlen (d->__nextchar);
+          d->optind++;
+          d->optopt = 0;
+          return '?';
+        }
+
+      if (pfound != NULL)
+        {
+          option_index = indfound;
+          d->optind++;
+          if (*nameend)
+            {
+              /* Don't test has_arg with >, because some C compilers don't
+                 allow it to be used on enums.  */
+              if (pfound->has_arg)
+                d->optarg = nameend + 1;
+              else
+                {
+                  if (print_errors)
+                    {
+#if defined _LIBC && defined USE_IN_LIBIO
+                      char *buf;
+                      int n;
+#endif
+
+                      if (argv[d->optind - 1][1] == '-')
+                        {
+                          /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+                          n = __asprintf (&buf, _("\
+%s: option '--%s' doesn't allow an argument\n"),
+                                          argv[0], pfound->name);
+#else
+                          fprintf (stderr, _("\
+%s: option '--%s' doesn't allow an argument\n"),
+                                   argv[0], pfound->name);
+#endif
+                        }
+                      else
+                        {
+                          /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+                          n = __asprintf (&buf, _("\
+%s: option '%c%s' doesn't allow an argument\n"),
+                                          argv[0], argv[d->optind - 1][0],
+                                          pfound->name);
+#else
+                          fprintf (stderr, _("\
+%s: option '%c%s' doesn't allow an argument\n"),
+                                   argv[0], argv[d->optind - 1][0],
+                                   pfound->name);
+#endif
+                        }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+                      if (n >= 0)
+                        {
+                          _IO_flockfile (stderr);
+
+                          int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                          ((_IO_FILE *) stderr)->_flags2
+                            |= _IO_FLAGS2_NOTCANCEL;
+
+                          __fxprintf (NULL, "%s", buf);
+
+                          ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                          _IO_funlockfile (stderr);
+
+                          free (buf);
+                        }
+#endif
+                    }
+
+                  d->__nextchar += strlen (d->__nextchar);
+
+                  d->optopt = pfound->val;
+                  return '?';
+                }
+            }
+          else if (pfound->has_arg == 1)
+            {
+              if (d->optind < argc)
+                d->optarg = argv[d->optind++];
+              else
+                {
+                  if (print_errors)
+                    {
+#if defined _LIBC && defined USE_IN_LIBIO
+                      char *buf;
+
+                      if (__asprintf (&buf, _("\
+%s: option '--%s' requires an argument\n"),
+                                      argv[0], pfound->name) >= 0)
+                        {
+                          _IO_flockfile (stderr);
+
+                          int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                          ((_IO_FILE *) stderr)->_flags2
+                            |= _IO_FLAGS2_NOTCANCEL;
+
+                          __fxprintf (NULL, "%s", buf);
+
+                          ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                          _IO_funlockfile (stderr);
+
+                          free (buf);
+                        }
+#else
+                      fprintf (stderr,
+                               _("%s: option '--%s' requires an argument\n"),
+                               argv[0], pfound->name);
+#endif
+                    }
+                  d->__nextchar += strlen (d->__nextchar);
+                  d->optopt = pfound->val;
+                  return optstring[0] == ':' ? ':' : '?';
+                }
+            }
+          d->__nextchar += strlen (d->__nextchar);
+          if (longind != NULL)
+            *longind = option_index;
+          if (pfound->flag)
+            {
+              *(pfound->flag) = pfound->val;
+              return 0;
+            }
+          return pfound->val;
+        }
+
+      /* Can't find it as a long option.  If this is not getopt_long_only,
+         or the option starts with '--' or is not a valid short
+         option, then it's an error.
+         Otherwise interpret it as a short option.  */
+      if (!long_only || argv[d->optind][1] == '-'
+          || strchr (optstring, *d->__nextchar) == NULL)
+        {
+          if (print_errors)
+            {
+#if defined _LIBC && defined USE_IN_LIBIO
+              char *buf;
+              int n;
+#endif
+
+              if (argv[d->optind][1] == '-')
+                {
+                  /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+                  n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"),
+                                  argv[0], d->__nextchar);
+#else
+                  fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
+                           argv[0], d->__nextchar);
+#endif
+                }
+              else
+                {
+                  /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+                  n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"),
+                                  argv[0], argv[d->optind][0], d->__nextchar);
+#else
+                  fprintf (stderr, _("%s: unrecognized option '%c%s'\n"),
+                           argv[0], argv[d->optind][0], d->__nextchar);
+#endif
+                }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+              if (n >= 0)
+                {
+                  _IO_flockfile (stderr);
+
+                  int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                  ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+                  __fxprintf (NULL, "%s", buf);
+
+                  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                  _IO_funlockfile (stderr);
+
+                  free (buf);
+                }
+#endif
+            }
+          d->__nextchar = (char *) "";
+          d->optind++;
+          d->optopt = 0;
+          return '?';
+        }
+    }
+
+  /* Look at and handle the next short option-character.  */
+
+  {
+    char c = *d->__nextchar++;
+    const char *temp = strchr (optstring, c);
+
+    /* Increment `optind' when we start to process its last character.  */
+    if (*d->__nextchar == '\0')
+      ++d->optind;
+
+    if (temp == NULL || c == ':' || c == ';')
+      {
+        if (print_errors)
+          {
+#if defined _LIBC && defined USE_IN_LIBIO
+              char *buf;
+              int n;
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+              n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
+                              argv[0], c);
+#else
+              fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+            if (n >= 0)
+              {
+                _IO_flockfile (stderr);
+
+                int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+                __fxprintf (NULL, "%s", buf);
+
+                ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                _IO_funlockfile (stderr);
+
+                free (buf);
+              }
+#endif
+          }
+        d->optopt = c;
+        return '?';
+      }
+    /* Convenience. Treat POSIX -W foo same as long option --foo */
+    if (temp[0] == 'W' && temp[1] == ';')
+      {
+        char *nameend;
+        const struct option *p;
+        const struct option *pfound = NULL;
+        int exact = 0;
+        int ambig = 0;
+        int indfound = 0;
+        int option_index;
+
+        /* This is an option that requires an argument.  */
+        if (*d->__nextchar != '\0')
+          {
+            d->optarg = d->__nextchar;
+            /* If we end this ARGV-element by taking the rest as an arg,
+               we must advance to the next element now.  */
+            d->optind++;
+          }
+        else if (d->optind == argc)
+          {
+            if (print_errors)
+              {
+#if defined _LIBC && defined USE_IN_LIBIO
+                char *buf;
+
+                if (__asprintf (&buf,
+                                _("%s: option requires an argument -- '%c'\n"),
+                                argv[0], c) >= 0)
+                  {
+                    _IO_flockfile (stderr);
+
+                    int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                    ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+                    __fxprintf (NULL, "%s", buf);
+
+                    ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                    _IO_funlockfile (stderr);
+
+                    free (buf);
+                  }
+#else
+                fprintf (stderr,
+                         _("%s: option requires an argument -- '%c'\n"),
+                         argv[0], c);
+#endif
+              }
+            d->optopt = c;
+            if (optstring[0] == ':')
+              c = ':';
+            else
+              c = '?';
+            return c;
+          }
+        else
+          /* We already incremented `d->optind' once;
+             increment it again when taking next ARGV-elt as argument.  */
+          d->optarg = argv[d->optind++];
+
+        /* optarg is now the argument, see if it's in the
+           table of longopts.  */
+
+        for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
+             nameend++)
+          /* Do nothing.  */ ;
+
+        /* Test all long options for either exact match
+           or abbreviated matches.  */
+        for (p = longopts, option_index = 0; p->name; p++, option_index++)
+          if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
+            {
+              if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
+                {
+                  /* Exact match found.  */
+                  pfound = p;
+                  indfound = option_index;
+                  exact = 1;
+                  break;
+                }
+              else if (pfound == NULL)
+                {
+                  /* First nonexact match found.  */
+                  pfound = p;
+                  indfound = option_index;
+                }
+              else if (long_only
+                       || pfound->has_arg != p->has_arg
+                       || pfound->flag != p->flag
+                       || pfound->val != p->val)
+                /* Second or later nonexact match found.  */
+                ambig = 1;
+            }
+        if (ambig && !exact)
+          {
+            if (print_errors)
+              {
+#if defined _LIBC && defined USE_IN_LIBIO
+                char *buf;
+
+                if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
+                                argv[0], d->optarg) >= 0)
+                  {
+                    _IO_flockfile (stderr);
+
+                    int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                    ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+                    __fxprintf (NULL, "%s", buf);
+
+                    ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                    _IO_funlockfile (stderr);
+
+                    free (buf);
+                  }
+#else
+                fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
+                         argv[0], d->optarg);
+#endif
+              }
+            d->__nextchar += strlen (d->__nextchar);
+            d->optind++;
+            return '?';
+          }
+        if (pfound != NULL)
+          {
+            option_index = indfound;
+            if (*nameend)
+              {
+                /* Don't test has_arg with >, because some C compilers don't
+                   allow it to be used on enums.  */
+                if (pfound->has_arg)
+                  d->optarg = nameend + 1;
+                else
+                  {
+                    if (print_errors)
+                      {
+#if defined _LIBC && defined USE_IN_LIBIO
+                        char *buf;
+
+                        if (__asprintf (&buf, _("\
+%s: option '-W %s' doesn't allow an argument\n"),
+                                        argv[0], pfound->name) >= 0)
+                          {
+                            _IO_flockfile (stderr);
+
+                            int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                            ((_IO_FILE *) stderr)->_flags2
+                              |= _IO_FLAGS2_NOTCANCEL;
+
+                            __fxprintf (NULL, "%s", buf);
+
+                            ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                            _IO_funlockfile (stderr);
+
+                            free (buf);
+                          }
+#else
+                        fprintf (stderr, _("\
+%s: option '-W %s' doesn't allow an argument\n"),
+                                 argv[0], pfound->name);
+#endif
+                      }
+
+                    d->__nextchar += strlen (d->__nextchar);
+                    return '?';
+                  }
+              }
+            else if (pfound->has_arg == 1)
+              {
+                if (d->optind < argc)
+                  d->optarg = argv[d->optind++];
+                else
+                  {
+                    if (print_errors)
+                      {
+#if defined _LIBC && defined USE_IN_LIBIO
+                        char *buf;
+
+                        if (__asprintf (&buf, _("\
+%s: option '-W %s' requires an argument\n"),
+                                        argv[0], pfound->name) >= 0)
+                          {
+                            _IO_flockfile (stderr);
+
+                            int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                            ((_IO_FILE *) stderr)->_flags2
+                              |= _IO_FLAGS2_NOTCANCEL;
+
+                            __fxprintf (NULL, "%s", buf);
+
+                            ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                            _IO_funlockfile (stderr);
+
+                            free (buf);
+                          }
+#else
+                        fprintf (stderr, _("\
+%s: option '-W %s' requires an argument\n"),
+                                 argv[0], pfound->name);
+#endif
+                      }
+                    d->__nextchar += strlen (d->__nextchar);
+                    return optstring[0] == ':' ? ':' : '?';
+                  }
+              }
+            else
+              d->optarg = NULL;
+            d->__nextchar += strlen (d->__nextchar);
+            if (longind != NULL)
+              *longind = option_index;
+            if (pfound->flag)
+              {
+                *(pfound->flag) = pfound->val;
+                return 0;
+              }
+            return pfound->val;
+          }
+          d->__nextchar = NULL;
+          return 'W';   /* Let the application handle it.   */
+      }
+    if (temp[1] == ':')
+      {
+        if (temp[2] == ':')
+          {
+            /* This is an option that accepts an argument optionally.  */
+            if (*d->__nextchar != '\0')
+              {
+                d->optarg = d->__nextchar;
+                d->optind++;
+              }
+            else
+              d->optarg = NULL;
+            d->__nextchar = NULL;
+          }
+        else
+          {
+            /* This is an option that requires an argument.  */
+            if (*d->__nextchar != '\0')
+              {
+                d->optarg = d->__nextchar;
+                /* If we end this ARGV-element by taking the rest as an arg,
+                   we must advance to the next element now.  */
+                d->optind++;
+              }
+            else if (d->optind == argc)
+              {
+                if (print_errors)
+                  {
+#if defined _LIBC && defined USE_IN_LIBIO
+                    char *buf;
+
+                    if (__asprintf (&buf, _("\
+%s: option requires an argument -- '%c'\n"),
+                                    argv[0], c) >= 0)
+                      {
+                        _IO_flockfile (stderr);
+
+                        int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                        ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+                        __fxprintf (NULL, "%s", buf);
+
+                        ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                        _IO_funlockfile (stderr);
+
+                        free (buf);
+                      }
+#else
+                    fprintf (stderr,
+                             _("%s: option requires an argument -- '%c'\n"),
+                             argv[0], c);
+#endif
+                  }
+                d->optopt = c;
+                if (optstring[0] == ':')
+                  c = ':';
+                else
+                  c = '?';
+              }
+            else
+              /* We already incremented `optind' once;
+                 increment it again when taking next ARGV-elt as argument.  */
+              d->optarg = argv[d->optind++];
+            d->__nextchar = NULL;
+          }
+      }
+    return c;
+  }
+}
+
+int
+_getopt_internal (int argc, char **argv, const char *optstring,
+                  const struct option *longopts, int *longind, int long_only,
+                  int posixly_correct)
+{
+  int result;
+
+  getopt_data.optind = optind;
+  getopt_data.opterr = opterr;
+
+  result = _getopt_internal_r (argc, argv, optstring, longopts,
+                               longind, long_only, &getopt_data,
+                               posixly_correct);
+
+  optind = getopt_data.optind;
+  optarg = getopt_data.optarg;
+  optopt = getopt_data.optopt;
+
+  return result;
+}
+
+/* glibc gets a LSB-compliant getopt.
+   Standalone applications get a POSIX-compliant getopt.  */
+#if _LIBC
+enum { POSIXLY_CORRECT = 0 };
+#else
+enum { POSIXLY_CORRECT = 1 };
+#endif
+
+int
+getopt (int argc, char *const *argv, const char *optstring)
+{
+  return _getopt_internal (argc, (char **) argv, optstring,
+                           (const struct option *) 0,
+                           (int *) 0,
+                           0, POSIXLY_CORRECT);
+}
+
+#ifdef _LIBC
+int
+__posix_getopt (int argc, char *const *argv, const char *optstring)
+{
+  return _getopt_internal (argc, argv, optstring,
+                           (const struct option *) 0,
+                           (int *) 0,
+                           0, 1);
+}
+#endif
+
+\f
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+   the above definition of `getopt'.  */
+
+int
+main (int argc, char **argv)
+{
+  int c;
+  int digit_optind = 0;
+
+  while (1)
+    {
+      int this_option_optind = optind ? optind : 1;
+
+      c = getopt (argc, argv, "abc:d:0123456789");
+      if (c == -1)
+        break;
+
+      switch (c)
+        {
+        case '0':
+        case '1':
+        case '2':
+        case '3':
+        case '4':
+        case '5':
+        case '6':
+        case '7':
+        case '8':
+        case '9':
+          if (digit_optind != 0 && digit_optind != this_option_optind)
+            printf ("digits occur in two different argv-elements.\n");
+          digit_optind = this_option_optind;
+          printf ("option %c\n", c);
+          break;
+
+        case 'a':
+          printf ("option a\n");
+          break;
+
+        case 'b':
+          printf ("option b\n");
+          break;
+
+        case 'c':
+          printf ("option c with value '%s'\n", optarg);
+          break;
+
+        case '?':
+          break;
+
+        default:
+          printf ("?? getopt returned character code 0%o ??\n", c);
+        }
+    }
+
+  if (optind < argc)
+    {
+      printf ("non-option ARGV-elements: ");
+      while (optind < argc)
+        printf ("%s ", argv[optind++]);
+      printf ("\n");
+    }
+
+  exit (0);
+}
+
+#endif /* TEST */
diff --git a/gnulib/lib/getopt.in.h b/gnulib/lib/getopt.in.h
new file mode 100644 (file)
index 0000000..82e2937
--- /dev/null
@@ -0,0 +1,253 @@
+/* Declarations for getopt.
+   Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software
+   Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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 _GL_GETOPT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  We must
+   also inform the replacement unistd.h to not recursively use
+   <getopt.h>; our definitions will be present soon enough.  */
+#if @HAVE_GETOPT_H@
+# define _GL_SYSTEM_GETOPT
+# @INCLUDE_NEXT@ @NEXT_GETOPT_H@
+# undef _GL_SYSTEM_GETOPT
+#endif
+
+#ifndef _GL_GETOPT_H
+
+#ifndef __need_getopt
+# define _GL_GETOPT_H 1
+#endif
+
+/* Standalone applications should #define __GETOPT_PREFIX to an
+   identifier that prefixes the external functions and variables
+   defined in this header.  When this happens, include the
+   headers that might declare getopt so that they will not cause
+   confusion if included after this file (if the system had <getopt.h>,
+   we have already included it).  Then systematically rename
+   identifiers so that they do not collide with the system functions
+   and variables.  Renaming avoids problems with some compilers and
+   linkers.  */
+#if defined __GETOPT_PREFIX && !defined __need_getopt
+# if !@HAVE_GETOPT_H@
+#  include <stdlib.h>
+#  include <stdio.h>
+#  include <unistd.h>
+# endif
+# undef __need_getopt
+# undef getopt
+# undef getopt_long
+# undef getopt_long_only
+# undef optarg
+# undef opterr
+# undef optind
+# undef optopt
+# undef option
+# define __GETOPT_CONCAT(x, y) x ## y
+# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
+# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
+# define getopt __GETOPT_ID (getopt)
+# define getopt_long __GETOPT_ID (getopt_long)
+# define getopt_long_only __GETOPT_ID (getopt_long_only)
+# define optarg __GETOPT_ID (optarg)
+# define opterr __GETOPT_ID (opterr)
+# define optind __GETOPT_ID (optind)
+# define optopt __GETOPT_ID (optopt)
+# define option __GETOPT_ID (option)
+# define _getopt_internal __GETOPT_ID (getopt_internal)
+#endif
+
+/* Standalone applications get correct prototypes for getopt_long and
+   getopt_long_only; they declare "char **argv".  libc uses prototypes
+   with "char *const *argv" that are incorrect because getopt_long and
+   getopt_long_only can permute argv; this is required for backward
+   compatibility (e.g., for LSB 2.0.1).
+
+   This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
+   but it caused redefinition warnings if both unistd.h and getopt.h were
+   included, since unistd.h includes getopt.h having previously defined
+   __need_getopt.
+
+   The only place where __getopt_argv_const is used is in definitions
+   of getopt_long and getopt_long_only below, but these are visible
+   only if __need_getopt is not defined, so it is quite safe to rewrite
+   the conditional as follows:
+*/
+#if !defined __need_getopt
+# if defined __GETOPT_PREFIX
+#  define __getopt_argv_const /* empty */
+# else
+#  define __getopt_argv_const const
+# endif
+#endif
+
+/* If __GNU_LIBRARY__ is not already defined, either we are being used
+   standalone, or this is the first header included in the source file.
+   If we are being used with glibc, we need to include <features.h>, but
+   that does not exist if we are standalone.  So: if __GNU_LIBRARY__ is
+   not defined, include <ctype.h>, which will pull in <features.h> for us
+   if it's from glibc.  (Why ctype.h?  It's guaranteed to exist and it
+   doesn't flood the namespace with stuff the way some other headers do.)  */
+#if !defined __GNU_LIBRARY__
+# include <ctype.h>
+#endif
+
+#ifndef __THROW
+# ifndef __GNUC_PREREQ
+#  define __GNUC_PREREQ(maj, min) (0)
+# endif
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
+#  define __THROW       throw ()
+# else
+#  define __THROW
+# endif
+#endif
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns -1, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+   for unrecognized options.  */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized.  */
+
+extern int optopt;
+
+#ifndef __need_getopt
+/* Describe the long-named options requested by the application.
+   The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+   of `struct option' terminated by an element containing a name which is
+   zero.
+
+   The field `has_arg' is:
+   no_argument          (or 0) if the option does not take an argument,
+   required_argument    (or 1) if the option requires an argument,
+   optional_argument    (or 2) if the option takes an optional argument.
+
+   If the field `flag' is not NULL, it points to a variable that is set
+   to the value given in the field `val' when the option is found, but
+   left unchanged if the option is not found.
+
+   To have a long-named option do something other than set an `int' to
+   a compiled-in constant, such as set a value from `optarg', set the
+   option's `flag' field to zero and its `val' field to a nonzero
+   value (the equivalent single-letter option character, if there is
+   one).  For long options that have a zero `flag' field, `getopt'
+   returns the contents of the `val' field.  */
+
+# if !GNULIB_defined_struct_option
+struct option
+{
+  const char *name;
+  /* has_arg can't be an enum because some compilers complain about
+     type mismatches in all the code that assumes it is an int.  */
+  int has_arg;
+  int *flag;
+  int val;
+};
+#  define GNULIB_defined_struct_option 1
+# endif
+
+/* Names for the values of the `has_arg' field of `struct option'.  */
+
+# define no_argument            0
+# define required_argument      1
+# define optional_argument      2
+#endif  /* need getopt */
+
+
+/* Get definitions and prototypes for functions to process the
+   arguments in ARGV (ARGC of them, minus the program name) for
+   options given in OPTS.
+
+   Return the option character from OPTS just read.  Return -1 when
+   there are no more options.  For unrecognized options, or options
+   missing arguments, `optopt' is set to the option letter, and '?' is
+   returned.
+
+   The OPTS string is a list of characters which are recognized option
+   letters, optionally followed by colons, specifying that that letter
+   takes an argument, to be placed in `optarg'.
+
+   If a letter in OPTS is followed by two colons, its argument is
+   optional.  This behavior is specific to the GNU `getopt'.
+
+   The argument `--' causes premature termination of argument
+   scanning, explicitly telling `getopt' that there are no more
+   options.
+
+   If OPTS begins with `-', then non-option arguments are treated as
+   arguments to the option '\1'.  This behavior is specific to the GNU
+   `getopt'.  If OPTS begins with `+', or POSIXLY_CORRECT is set in
+   the environment, then do not permute arguments.  */
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+       __THROW _GL_ARG_NONNULL ((2, 3));
+
+#ifndef __need_getopt
+extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
+                        const char *__shortopts,
+                        const struct option *__longopts, int *__longind)
+       __THROW _GL_ARG_NONNULL ((2, 3));
+extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
+                             const char *__shortopts,
+                             const struct option *__longopts, int *__longind)
+       __THROW _GL_ARG_NONNULL ((2, 3));
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Make sure we later can get all the definitions and declarations.  */
+#undef __need_getopt
+
+#endif /* getopt.h */
+#endif /* getopt.h */
diff --git a/gnulib/lib/getopt1.c b/gnulib/lib/getopt1.c
new file mode 100644 (file)
index 0000000..3656802
--- /dev/null
@@ -0,0 +1,170 @@
+/* getopt_long and getopt_long_only entry points for GNU getopt.
+   Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software
+   Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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/>.  */
+\f
+#ifdef _LIBC
+# include <getopt.h>
+#else
+# include <config.h>
+# include "getopt.h"
+#endif
+#include "getopt_int.h"
+
+#include <stdio.h>
+
+/* This needs to come after some library #include
+   to get __GNU_LIBRARY__ defined.  */
+#ifdef __GNU_LIBRARY__
+#include <stdlib.h>
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+int
+getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
+             const struct option *long_options, int *opt_index)
+{
+  return _getopt_internal (argc, (char **) argv, options, long_options,
+                           opt_index, 0, 0);
+}
+
+int
+_getopt_long_r (int argc, char **argv, const char *options,
+                const struct option *long_options, int *opt_index,
+                struct _getopt_data *d)
+{
+  return _getopt_internal_r (argc, argv, options, long_options, opt_index,
+                             0, d, 0);
+}
+
+/* Like getopt_long, but '-' as well as '--' can indicate a long option.
+   If an option that starts with '-' (not '--') doesn't match a long option,
+   but does match a short option, it is parsed as a short option
+   instead.  */
+
+int
+getopt_long_only (int argc, char *__getopt_argv_const *argv,
+                  const char *options,
+                  const struct option *long_options, int *opt_index)
+{
+  return _getopt_internal (argc, (char **) argv, options, long_options,
+                           opt_index, 1, 0);
+}
+
+int
+_getopt_long_only_r (int argc, char **argv, const char *options,
+                     const struct option *long_options, int *opt_index,
+                     struct _getopt_data *d)
+{
+  return _getopt_internal_r (argc, argv, options, long_options, opt_index,
+                             1, d, 0);
+}
+
+\f
+#ifdef TEST
+
+#include <stdio.h>
+
+int
+main (int argc, char **argv)
+{
+  int c;
+  int digit_optind = 0;
+
+  while (1)
+    {
+      int this_option_optind = optind ? optind : 1;
+      int option_index = 0;
+      static const struct option long_options[] =
+      {
+        {"add", 1, 0, 0},
+        {"append", 0, 0, 0},
+        {"delete", 1, 0, 0},
+        {"verbose", 0, 0, 0},
+        {"create", 0, 0, 0},
+        {"file", 1, 0, 0},
+        {0, 0, 0, 0}
+      };
+
+      c = getopt_long (argc, argv, "abc:d:0123456789",
+                       long_options, &option_index);
+      if (c == -1)
+        break;
+
+      switch (c)
+        {
+        case 0:
+          printf ("option %s", long_options[option_index].name);
+          if (optarg)
+            printf (" with arg %s", optarg);
+          printf ("\n");
+          break;
+
+        case '0':
+        case '1':
+        case '2':
+        case '3':
+        case '4':
+        case '5':
+        case '6':
+        case '7':
+        case '8':
+        case '9':
+          if (digit_optind != 0 && digit_optind != this_option_optind)
+            printf ("digits occur in two different argv-elements.\n");
+          digit_optind = this_option_optind;
+          printf ("option %c\n", c);
+          break;
+
+        case 'a':
+          printf ("option a\n");
+          break;
+
+        case 'b':
+          printf ("option b\n");
+          break;
+
+        case 'c':
+          printf ("option c with value `%s'\n", optarg);
+          break;
+
+        case 'd':
+          printf ("option d with value `%s'\n", optarg);
+          break;
+
+        case '?':
+          break;
+
+        default:
+          printf ("?? getopt returned character code 0%o ??\n", c);
+        }
+    }
+
+  if (optind < argc)
+    {
+      printf ("non-option ARGV-elements: ");
+      while (optind < argc)
+        printf ("%s ", argv[optind++]);
+      printf ("\n");
+    }
+
+  exit (0);
+}
+
+#endif /* TEST */
diff --git a/gnulib/lib/getopt_int.h b/gnulib/lib/getopt_int.h
new file mode 100644 (file)
index 0000000..9f0c713
--- /dev/null
@@ -0,0 +1,135 @@
+/* Internal declarations for getopt.
+   Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software
+   Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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 _GETOPT_INT_H
+#define _GETOPT_INT_H   1
+
+#include <getopt.h>
+
+extern int _getopt_internal (int ___argc, char **___argv,
+                             const char *__shortopts,
+                             const struct option *__longopts, int *__longind,
+                             int __long_only, int __posixly_correct);
+
+\f
+/* Reentrant versions which can handle parsing multiple argument
+   vectors at the same time.  */
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+   If the caller did not specify anything,
+   the default is REQUIRE_ORDER if the environment variable
+   POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+   REQUIRE_ORDER means don't recognize them as options;
+   stop option processing when the first non-option is seen.
+   This is what Unix does.
+   This mode of operation is selected by either setting the environment
+   variable POSIXLY_CORRECT, or using `+' as the first character
+   of the list of option characters, or by calling getopt.
+
+   PERMUTE is the default.  We permute the contents of ARGV as we
+   scan, so that eventually all the non-options are at the end.
+   This allows options to be given in any order, even with programs
+   that were not written to expect this.
+
+   RETURN_IN_ORDER is an option available to programs that were
+   written to expect options and other ARGV-elements in any order
+   and that care about the ordering of the two.  We describe each
+   non-option ARGV-element as if it were the argument of an option
+   with character code 1.  Using `-' as the first character of the
+   list of option characters selects this mode of operation.
+
+   The special argument `--' forces an end of option-scanning regardless
+   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
+   `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
+
+enum __ord
+  {
+    REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+  };
+
+/* Data type for reentrant functions.  */
+struct _getopt_data
+{
+  /* These have exactly the same meaning as the corresponding global
+     variables, except that they are used for the reentrant
+     versions of getopt.  */
+  int optind;
+  int opterr;
+  int optopt;
+  char *optarg;
+
+  /* Internal members.  */
+
+  /* True if the internal members have been initialized.  */
+  int __initialized;
+
+  /* The next char to be scanned in the option-element
+     in which the last option character we returned was found.
+     This allows us to pick up the scan where we left off.
+
+     If this is zero, or a null string, it means resume the scan
+     by advancing to the next ARGV-element.  */
+  char *__nextchar;
+
+  /* See __ord above.  */
+  enum __ord __ordering;
+
+  /* If the POSIXLY_CORRECT environment variable is set
+     or getopt was called.  */
+  int __posixly_correct;
+
+
+  /* Handle permutation of arguments.  */
+
+  /* Describe the part of ARGV that contains non-options that have
+     been skipped.  `first_nonopt' is the index in ARGV of the first
+     of them; `last_nonopt' is the index after the last of them.  */
+
+  int __first_nonopt;
+  int __last_nonopt;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+  int __nonoption_flags_max_len;
+  int __nonoption_flags_len;
+#endif
+};
+
+/* The initializer is necessary to set OPTIND and OPTERR to their
+   default values and to clear the initialization flag.  */
+#define _GETOPT_DATA_INITIALIZER        { 1, 1 }
+
+extern int _getopt_internal_r (int ___argc, char **___argv,
+                               const char *__shortopts,
+                               const struct option *__longopts, int *__longind,
+                               int __long_only, struct _getopt_data *__data,
+                               int __posixly_correct);
+
+extern int _getopt_long_r (int ___argc, char **___argv,
+                           const char *__shortopts,
+                           const struct option *__longopts, int *__longind,
+                           struct _getopt_data *__data);
+
+extern int _getopt_long_only_r (int ___argc, char **___argv,
+                                const char *__shortopts,
+                                const struct option *__longopts,
+                                int *__longind,
+                                struct _getopt_data *__data);
+
+#endif /* getopt_int.h */
diff --git a/gnulib/lib/gettext.h b/gnulib/lib/gettext.h
new file mode 100644 (file)
index 0000000..458e332
--- /dev/null
@@ -0,0 +1,286 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option.  */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions.  */
+# include <libintl.h>
+
+/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
+   the gettext() and ngettext() macros.  This is an alternative to calling
+   textdomain(), and is useful for libraries.  */
+# ifdef DEFAULT_TEXT_DOMAIN
+#  undef gettext
+#  define gettext(Msgid) \
+     dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
+#  undef ngettext
+#  define ngettext(Msgid1, Msgid2, N) \
+     dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
+# endif
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+   chokes if dcgettext is defined as a macro.  So include it now, to make
+   later inclusions of <locale.h> a NOP.  We don't include <libintl.h>
+   as well because people using "gettext.h" will not include <libintl.h>,
+   and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+   is OK.  */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
+   <libintl.h>, which chokes if dcgettext is defined as a macro.  So include
+   it now, to make later inclusions of <libintl.h> a NOP.  */
+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
+#  include <libintl.h>
+# endif
+#endif
+
+/* Disabled NLS.
+   The casts to 'const char *' serve the purpose of producing warnings
+   for invalid uses of the value returned from these functions.
+   On pre-ANSI systems without 'const', the config.h file is supposed to
+   contain "#define const".  */
+# undef gettext
+# define gettext(Msgid) ((const char *) (Msgid))
+# undef dgettext
+# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# undef dcgettext
+# define dcgettext(Domainname, Msgid, Category) \
+    ((void) (Category), dgettext (Domainname, Msgid))
+# undef ngettext
+# define ngettext(Msgid1, Msgid2, N) \
+    ((N) == 1 \
+     ? ((void) (Msgid2), (const char *) (Msgid1)) \
+     : ((void) (Msgid1), (const char *) (Msgid2)))
+# undef dngettext
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+    ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
+# undef dcngettext
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+    ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
+# undef textdomain
+# define textdomain(Domainname) ((const char *) (Domainname))
+# undef bindtextdomain
+# define bindtextdomain(Domainname, Dirname) \
+    ((void) (Domainname), (const char *) (Dirname))
+# undef bind_textdomain_codeset
+# define bind_textdomain_codeset(Domainname, Codeset) \
+    ((void) (Domainname), (const char *) (Codeset))
+
+#endif
+
+/* Prefer gnulib's setlocale override over libintl's setlocale override.  */
+#ifdef GNULIB_defined_setlocale
+# undef setlocale
+# define setlocale rpl_setlocale
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+   extraction of messages, but does not call gettext().  The run-time
+   translation is done at a different place in the code.
+   The argument, String, should be a literal string.  Concatenated strings
+   and other string expressions won't work.
+   The macro's expansion is not parenthesized, so that it is suitable as
+   initializer for static 'char[]' or 'const char[]' variables.  */
+#define gettext_noop(String) String
+
+/* The separator between msgctxt and msgid in a .mo file.  */
+#define GETTEXT_CONTEXT_GLUE "\004"
+
+/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
+   MSGID.  MSGCTXT and MSGID must be string literals.  MSGCTXT should be
+   short and rarely need to change.
+   The letter 'p' stands for 'particular' or 'special'.  */
+#ifdef DEFAULT_TEXT_DOMAIN
+# define pgettext(Msgctxt, Msgid) \
+   pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#else
+# define pgettext(Msgctxt, Msgid) \
+   pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#endif
+#define dpgettext(Domainname, Msgctxt, Msgid) \
+  pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
+  pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
+#ifdef DEFAULT_TEXT_DOMAIN
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+   npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#else
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+   npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#endif
+#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
+  npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+pgettext_aux (const char *domain,
+              const char *msg_ctxt_id, const char *msgid,
+              int category)
+{
+  const char *translation = dcgettext (domain, msg_ctxt_id, category);
+  if (translation == msg_ctxt_id)
+    return msgid;
+  else
+    return translation;
+}
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+npgettext_aux (const char *domain,
+               const char *msg_ctxt_id, const char *msgid,
+               const char *msgid_plural, unsigned long int n,
+               int category)
+{
+  const char *translation =
+    dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+  if (translation == msg_ctxt_id || translation == msgid_plural)
+    return (n == 1 ? msgid : msgid_plural);
+  else
+    return translation;
+}
+
+/* The same thing extended for non-constant arguments.  Here MSGCTXT and MSGID
+   can be arbitrary expressions.  But for string literals these macros are
+   less efficient than those above.  */
+
+#include <string.h>
+
+#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
+  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
+   /* || __STDC_VERSION__ >= 199901L */ )
+
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+#include <stdlib.h>
+#endif
+
+#define pgettext_expr(Msgctxt, Msgid) \
+  dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
+#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
+  dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcpgettext_expr (const char *domain,
+                 const char *msgctxt, const char *msgid,
+                 int category)
+{
+  size_t msgctxt_len = strlen (msgctxt) + 1;
+  size_t msgid_len = strlen (msgid) + 1;
+  const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+  char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+  char buf[1024];
+  char *msg_ctxt_id =
+    (msgctxt_len + msgid_len <= sizeof (buf)
+     ? buf
+     : (char *) malloc (msgctxt_len + msgid_len));
+  if (msg_ctxt_id != NULL)
+#endif
+    {
+      memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+      msg_ctxt_id[msgctxt_len - 1] = '\004';
+      memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+      translation = dcgettext (domain, msg_ctxt_id, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+      if (msg_ctxt_id != buf)
+        free (msg_ctxt_id);
+#endif
+      if (translation != msg_ctxt_id)
+        return translation;
+    }
+  return msgid;
+}
+
+#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
+  dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcnpgettext_expr (const char *domain,
+                  const char *msgctxt, const char *msgid,
+                  const char *msgid_plural, unsigned long int n,
+                  int category)
+{
+  size_t msgctxt_len = strlen (msgctxt) + 1;
+  size_t msgid_len = strlen (msgid) + 1;
+  const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+  char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+  char buf[1024];
+  char *msg_ctxt_id =
+    (msgctxt_len + msgid_len <= sizeof (buf)
+     ? buf
+     : (char *) malloc (msgctxt_len + msgid_len));
+  if (msg_ctxt_id != NULL)
+#endif
+    {
+      memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+      msg_ctxt_id[msgctxt_len - 1] = '\004';
+      memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+      translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+      if (msg_ctxt_id != buf)
+        free (msg_ctxt_id);
+#endif
+      if (!(translation == msg_ctxt_id || translation == msgid_plural))
+        return translation;
+    }
+  return (n == 1 ? msgid : msgid_plural);
+}
+
+#endif /* _LIBGETTEXT_H */
diff --git a/gnulib/lib/gettime.c b/gnulib/lib/gettime.c
new file mode 100644 (file)
index 0000000..6dbb457
--- /dev/null
@@ -0,0 +1,48 @@
+/* gettime -- get the system clock
+
+   Copyright (C) 2002, 2004-2007, 2009-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 Paul Eggert.  */
+
+#include <config.h>
+
+#include "timespec.h"
+
+#include <sys/time.h>
+
+/* Get the system time into *TS.  */
+
+void
+gettime (struct timespec *ts)
+{
+#if HAVE_NANOTIME
+  nanotime (ts);
+#else
+
+# if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME
+  if (clock_gettime (CLOCK_REALTIME, ts) == 0)
+    return;
+# endif
+
+  {
+    struct timeval tv;
+    gettimeofday (&tv, NULL);
+    ts->tv_sec = tv.tv_sec;
+    ts->tv_nsec = tv.tv_usec * 1000;
+  }
+
+#endif
+}
diff --git a/gnulib/lib/gettimeofday.c b/gnulib/lib/gettimeofday.c
new file mode 100644 (file)
index 0000000..adfb51f
--- /dev/null
@@ -0,0 +1,144 @@
+/* Provide gettimeofday for systems that don't have it or for which it's broken.
+
+   Copyright (C) 2001-2003, 2005-2007, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+/* Specification.  */
+#include <sys/time.h>
+
+#include <time.h>
+
+#if HAVE_SYS_TIMEB_H
+# include <sys/timeb.h>
+#endif
+
+#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
+
+/* Work around the bug in some systems whereby gettimeofday clobbers
+   the static buffer that localtime uses for its return value.  The
+   gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
+   this problem.  The tzset replacement is necessary for at least
+   Solaris 2.5, 2.5.1, and 2.6.  */
+
+static struct tm tm_zero_buffer;
+static struct tm *localtime_buffer_addr = &tm_zero_buffer;
+
+# undef localtime
+extern struct tm *localtime (time_t const *);
+
+# undef gmtime
+extern struct tm *gmtime (time_t const *);
+
+/* This is a wrapper for localtime.  It is used only on systems for which
+   gettimeofday clobbers the static buffer used for localtime's result.
+
+   On the first call, record the address of the static buffer that
+   localtime uses for its result.  */
+
+struct tm *
+rpl_localtime (time_t const *timep)
+{
+  struct tm *tm = localtime (timep);
+
+  if (localtime_buffer_addr == &tm_zero_buffer)
+    localtime_buffer_addr = tm;
+
+  return tm;
+}
+
+/* Same as above, since gmtime and localtime use the same buffer.  */
+struct tm *
+rpl_gmtime (time_t const *timep)
+{
+  struct tm *tm = gmtime (timep);
+
+  if (localtime_buffer_addr == &tm_zero_buffer)
+    localtime_buffer_addr = tm;
+
+  return tm;
+}
+
+#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */
+
+#if TZSET_CLOBBERS_LOCALTIME
+
+# undef tzset
+extern void tzset (void);
+
+/* This is a wrapper for tzset, for systems on which tzset may clobber
+   the static buffer used for localtime's result.  */
+void
+rpl_tzset (void)
+{
+  /* Save and restore the contents of the buffer used for localtime's
+     result around the call to tzset.  */
+  struct tm save = *localtime_buffer_addr;
+  tzset ();
+  *localtime_buffer_addr = save;
+}
+#endif
+
+/* This is a wrapper for gettimeofday.  It is used only on systems
+   that lack this function, or whose implementation of this function
+   causes problems.  */
+
+int
+gettimeofday (struct timeval *restrict tv, void *restrict tz)
+{
+#undef gettimeofday
+#if HAVE_GETTIMEOFDAY
+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
+  /* Save and restore the contents of the buffer used for localtime's
+     result around the call to gettimeofday.  */
+  struct tm save = *localtime_buffer_addr;
+# endif
+
+  int result = gettimeofday (tv, (struct timezone *) tz);
+
+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
+  *localtime_buffer_addr = save;
+# endif
+
+  return result;
+
+#else
+
+# if HAVE__FTIME
+
+  struct _timeb timebuf;
+  _ftime (&timebuf);
+  tv->tv_sec = timebuf.time;
+  tv->tv_usec = timebuf.millitm * 1000;
+
+# else
+
+#  if !defined OK_TO_USE_1S_CLOCK
+#   error "Only 1-second nominal clock resolution found.  Is that intended?" \
+          "If so, compile with the -DOK_TO_USE_1S_CLOCK option."
+#  endif
+  tv->tv_sec = time (NULL);
+  tv->tv_usec = 0;
+
+# endif
+
+  return 0;
+
+#endif
+}
diff --git a/gnulib/lib/group-member.c b/gnulib/lib/group-member.c
new file mode 100644 (file)
index 0000000..6d1cd66
--- /dev/null
@@ -0,0 +1,125 @@
+/* group-member.c -- determine whether group id is in calling user's group list
+
+   Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-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/>.  */
+
+#include <config.h>
+
+#include "group-member.h"
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <stdlib.h>
+
+#include <unistd.h>
+
+#include "xalloc.h"
+
+struct group_info
+  {
+    int n_groups;
+    gid_t *group;
+  };
+
+static void
+free_group_info (struct group_info const *g)
+{
+  free (g->group);
+}
+
+static bool
+get_group_info (struct group_info *gi)
+{
+  int n_groups;
+  int n_group_slots = getgroups (0, NULL);
+  gid_t *group;
+
+  if (n_group_slots < 0)
+    return false;
+
+  /* Avoid xnmalloc, as it goes awry when SIZE_MAX < n_group_slots.  */
+  if (xalloc_oversized (n_group_slots, sizeof *group))
+    xalloc_die ();
+  group = xmalloc (n_group_slots * sizeof *group);
+  n_groups = getgroups (n_group_slots, group);
+
+  /* In case of error, the user loses. */
+  if (n_groups < 0)
+    {
+      free (group);
+      return false;
+    }
+
+  gi->n_groups = n_groups;
+  gi->group = group;
+
+  return true;
+}
+
+/* Return non-zero if GID is one that we have in our groups list.
+   Note that the groups list is not guaranteed to contain the current
+   or effective group ID, so they should generally be checked
+   separately.  */
+
+int
+group_member (gid_t gid)
+{
+  int i;
+  int found;
+  struct group_info gi;
+
+  if (! get_group_info (&gi))
+    return 0;
+
+  /* Search through the list looking for GID. */
+  found = 0;
+  for (i = 0; i < gi.n_groups; i++)
+    {
+      if (gid == gi.group[i])
+        {
+          found = 1;
+          break;
+        }
+    }
+
+  free_group_info (&gi);
+
+  return found;
+}
+
+#ifdef TEST
+
+char *program_name;
+
+int
+main (int argc, char **argv)
+{
+  int i;
+
+  program_name = argv[0];
+
+  for (i = 1; i < argc; i++)
+    {
+      gid_t gid;
+
+      gid = atoi (argv[i]);
+      printf ("%d: %s\n", gid, group_member (gid) ? "yes" : "no");
+    }
+  exit (0);
+}
+
+#endif /* TEST */
diff --git a/gnulib/lib/group-member.h b/gnulib/lib/group-member.h
new file mode 100644 (file)
index 0000000..cb89ee3
--- /dev/null
@@ -0,0 +1,25 @@
+/* Determine whether group id is in calling user's group list.
+
+   Copyright (C) 1994, 1997, 2003, 2009-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 GROUP_MEMBER_H_
+# define GROUP_MEMBER_H_ 1
+
+# include <sys/types.h>
+
+int group_member (gid_t);
+
+#endif /* GROUP_MEMBER_H_ */
diff --git a/gnulib/lib/hash-pjw.c b/gnulib/lib/hash-pjw.c
new file mode 100644 (file)
index 0000000..743bb57
--- /dev/null
@@ -0,0 +1,40 @@
+/* hash-pjw.c -- compute a hash value from a NUL-terminated string.
+
+   Copyright (C) 2001, 2003, 2006, 2009-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/>.  */
+
+#include <config.h>
+
+#include "hash-pjw.h"
+
+#include <limits.h>
+
+#define SIZE_BITS (sizeof (size_t) * CHAR_BIT)
+
+/* A hash function for NUL-terminated char* strings using
+   the method described by Bruno Haible.
+   See http://www.haible.de/bruno/hashfunc.html.  */
+
+size_t
+hash_pjw (const void *x, size_t tablesize)
+{
+  const char *s;
+  size_t h = 0;
+
+  for (s = x; *s; s++)
+    h = *s + ((h << 9) | (h >> (SIZE_BITS - 9)));
+
+  return h % tablesize;
+}
diff --git a/gnulib/lib/hash-pjw.h b/gnulib/lib/hash-pjw.h
new file mode 100644 (file)
index 0000000..80c1838
--- /dev/null
@@ -0,0 +1,23 @@
+/* hash-pjw.h -- declaration for a simple hash function
+   Copyright (C) 2001, 2003, 2009-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/>.  */
+
+#include <stddef.h>
+
+/* Compute a hash code for a NUL-terminated string starting at X,
+   and return the hash code modulo TABLESIZE.
+   The result is platform dependent: it depends on the size of the 'size_t'
+   type and on the signedness of the 'char' type.  */
+extern size_t hash_pjw (void const *x, size_t tablesize);
diff --git a/gnulib/lib/hash-triple.c b/gnulib/lib/hash-triple.c
new file mode 100644 (file)
index 0000000..1649377
--- /dev/null
@@ -0,0 +1,77 @@
+/* Hash functions for file-related triples: name, device, inode.
+   Copyright (C) 2007, 2009-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 Jim Meyering */
+
+#include <config.h>
+
+#include "hash-triple.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "hash-pjw.h"
+#include "same.h"
+#include "same-inode.h"
+
+#define STREQ(a, b) (strcmp (a, b) == 0)
+
+/* Hash an F_triple, and *do* consider the file name.  */
+size_t
+triple_hash (void const *x, size_t table_size)
+{
+  struct F_triple const *p = x;
+  size_t tmp = hash_pjw (p->name, table_size);
+
+  /* Ignoring the device number here should be fine.  */
+  return (tmp ^ p->st_ino) % table_size;
+}
+
+/* Hash an F_triple, without considering the file name.  */
+size_t
+triple_hash_no_name (void const *x, size_t table_size)
+{
+  struct F_triple const *p = x;
+
+  /* Ignoring the device number here should be fine.  */
+  return p->st_ino % table_size;
+}
+
+/* Compare two F_triple structs.  */
+bool
+triple_compare (void const *x, void const *y)
+{
+  struct F_triple const *a = x;
+  struct F_triple const *b = y;
+  return (SAME_INODE (*a, *b) && same_name (a->name, b->name)) ? true : false;
+}
+
+bool
+triple_compare_ino_str (void const *x, void const *y)
+{
+  struct F_triple const *a = x;
+  struct F_triple const *b = y;
+  return (SAME_INODE (*a, *b) && STREQ (a->name, b->name)) ? true : false;
+}
+
+/* Free an F_triple.  */
+void
+triple_free (void *x)
+{
+  struct F_triple *a = x;
+  free (a->name);
+  free (a);
+}
diff --git a/gnulib/lib/hash-triple.h b/gnulib/lib/hash-triple.h
new file mode 100644 (file)
index 0000000..51863c9
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef HASH_TRIPLE_H
+#define HASH_TRIPLE_H
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdbool.h>
+
+/* Describe a just-created or just-renamed destination file.  */
+struct F_triple
+{
+  char *name;
+  ino_t st_ino;
+  dev_t st_dev;
+};
+
+extern size_t triple_hash (void const *x, size_t table_size);
+extern size_t triple_hash_no_name (void const *x, size_t table_size);
+extern bool triple_compare (void const *x, void const *y);
+extern bool triple_compare_ino_str (void const *x, void const *y);
+extern void triple_free (void *x);
+
+#endif
diff --git a/gnulib/lib/hash.c b/gnulib/lib/hash.c
new file mode 100644 (file)
index 0000000..f3de2aa
--- /dev/null
@@ -0,0 +1,1222 @@
+/* hash - hashing table processing.
+
+   Copyright (C) 1998-2004, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+
+   Written by Jim Meyering, 1992.
+
+   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/>.  */
+
+/* A generic hash table package.  */
+
+/* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead
+   of malloc.  If you change USE_OBSTACK, you have to recompile!  */
+
+#include <config.h>
+
+#include "hash.h"
+
+#include "bitrotate.h"
+#include "xalloc.h"
+
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#if USE_OBSTACK
+# include "obstack.h"
+# ifndef obstack_chunk_alloc
+#  define obstack_chunk_alloc malloc
+# endif
+# ifndef obstack_chunk_free
+#  define obstack_chunk_free free
+# endif
+#endif
+
+struct hash_entry
+  {
+    void *data;
+    struct hash_entry *next;
+  };
+
+struct hash_table
+  {
+    /* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1,
+       for a possibility of N_BUCKETS.  Among those, N_BUCKETS_USED buckets
+       are not empty, there are N_ENTRIES active entries in the table.  */
+    struct hash_entry *bucket;
+    struct hash_entry const *bucket_limit;
+    size_t n_buckets;
+    size_t n_buckets_used;
+    size_t n_entries;
+
+    /* Tuning arguments, kept in a physically separate structure.  */
+    const Hash_tuning *tuning;
+
+    /* Three functions are given to `hash_initialize', see the documentation
+       block for this function.  In a word, HASHER randomizes a user entry
+       into a number up from 0 up to some maximum minus 1; COMPARATOR returns
+       true if two user entries compare equally; and DATA_FREER is the cleanup
+       function for a user entry.  */
+    Hash_hasher hasher;
+    Hash_comparator comparator;
+    Hash_data_freer data_freer;
+
+    /* A linked list of freed struct hash_entry structs.  */
+    struct hash_entry *free_entry_list;
+
+#if USE_OBSTACK
+    /* Whenever obstacks are used, it is possible to allocate all overflowed
+       entries into a single stack, so they all can be freed in a single
+       operation.  It is not clear if the speedup is worth the trouble.  */
+    struct obstack entry_stack;
+#endif
+  };
+
+/* A hash table contains many internal entries, each holding a pointer to
+   some user-provided data (also called a user entry).  An entry indistinctly
+   refers to both the internal entry and its associated user entry.  A user
+   entry contents may be hashed by a randomization function (the hashing
+   function, or just `hasher' for short) into a number (or `slot') between 0
+   and the current table size.  At each slot position in the hash table,
+   starts a linked chain of entries for which the user data all hash to this
+   slot.  A bucket is the collection of all entries hashing to the same slot.
+
+   A good `hasher' function will distribute entries rather evenly in buckets.
+   In the ideal case, the length of each bucket is roughly the number of
+   entries divided by the table size.  Finding the slot for a data is usually
+   done in constant time by the `hasher', and the later finding of a precise
+   entry is linear in time with the size of the bucket.  Consequently, a
+   larger hash table size (that is, a larger number of buckets) is prone to
+   yielding shorter chains, *given* the `hasher' function behaves properly.
+
+   Long buckets slow down the lookup algorithm.  One might use big hash table
+   sizes in hope to reduce the average length of buckets, but this might
+   become inordinate, as unused slots in the hash table take some space.  The
+   best bet is to make sure you are using a good `hasher' function (beware
+   that those are not that easy to write! :-), and to use a table size
+   larger than the actual number of entries.  */
+
+/* If an insertion makes the ratio of nonempty buckets to table size larger
+   than the growth threshold (a number between 0.0 and 1.0), then increase
+   the table size by multiplying by the growth factor (a number greater than
+   1.0).  The growth threshold defaults to 0.8, and the growth factor
+   defaults to 1.414, meaning that the table will have doubled its size
+   every second time 80% of the buckets get used.  */
+#define DEFAULT_GROWTH_THRESHOLD 0.8
+#define DEFAULT_GROWTH_FACTOR 1.414
+
+/* If a deletion empties a bucket and causes the ratio of used buckets to
+   table size to become smaller than the shrink threshold (a number between
+   0.0 and 1.0), then shrink the table by multiplying by the shrink factor (a
+   number greater than the shrink threshold but smaller than 1.0).  The shrink
+   threshold and factor default to 0.0 and 1.0, meaning that the table never
+   shrinks.  */
+#define DEFAULT_SHRINK_THRESHOLD 0.0
+#define DEFAULT_SHRINK_FACTOR 1.0
+
+/* Use this to initialize or reset a TUNING structure to
+   some sensible values. */
+static const Hash_tuning default_tuning =
+  {
+    DEFAULT_SHRINK_THRESHOLD,
+    DEFAULT_SHRINK_FACTOR,
+    DEFAULT_GROWTH_THRESHOLD,
+    DEFAULT_GROWTH_FACTOR,
+    false
+  };
+
+/* Information and lookup.  */
+
+/* The following few functions provide information about the overall hash
+   table organization: the number of entries, number of buckets and maximum
+   length of buckets.  */
+
+/* Return the number of buckets in the hash table.  The table size, the total
+   number of buckets (used plus unused), or the maximum number of slots, are
+   the same quantity.  */
+
+size_t
+hash_get_n_buckets (const Hash_table *table)
+{
+  return table->n_buckets;
+}
+
+/* Return the number of slots in use (non-empty buckets).  */
+
+size_t
+hash_get_n_buckets_used (const Hash_table *table)
+{
+  return table->n_buckets_used;
+}
+
+/* Return the number of active entries.  */
+
+size_t
+hash_get_n_entries (const Hash_table *table)
+{
+  return table->n_entries;
+}
+
+/* Return the length of the longest chain (bucket).  */
+
+size_t
+hash_get_max_bucket_length (const Hash_table *table)
+{
+  struct hash_entry const *bucket;
+  size_t max_bucket_length = 0;
+
+  for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
+    {
+      if (bucket->data)
+        {
+          struct hash_entry const *cursor = bucket;
+          size_t bucket_length = 1;
+
+          while (cursor = cursor->next, cursor)
+            bucket_length++;
+
+          if (bucket_length > max_bucket_length)
+            max_bucket_length = bucket_length;
+        }
+    }
+
+  return max_bucket_length;
+}
+
+/* Do a mild validation of a hash table, by traversing it and checking two
+   statistics.  */
+
+bool
+hash_table_ok (const Hash_table *table)
+{
+  struct hash_entry const *bucket;
+  size_t n_buckets_used = 0;
+  size_t n_entries = 0;
+
+  for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
+    {
+      if (bucket->data)
+        {
+          struct hash_entry const *cursor = bucket;
+
+          /* Count bucket head.  */
+          n_buckets_used++;
+          n_entries++;
+
+          /* Count bucket overflow.  */
+          while (cursor = cursor->next, cursor)
+            n_entries++;
+        }
+    }
+
+  if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries)
+    return true;
+
+  return false;
+}
+
+void
+hash_print_statistics (const Hash_table *table, FILE *stream)
+{
+  size_t n_entries = hash_get_n_entries (table);
+  size_t n_buckets = hash_get_n_buckets (table);
+  size_t n_buckets_used = hash_get_n_buckets_used (table);
+  size_t max_bucket_length = hash_get_max_bucket_length (table);
+
+  fprintf (stream, "# entries:         %lu\n", (unsigned long int) n_entries);
+  fprintf (stream, "# buckets:         %lu\n", (unsigned long int) n_buckets);
+  fprintf (stream, "# buckets used:    %lu (%.2f%%)\n",
+           (unsigned long int) n_buckets_used,
+           (100.0 * n_buckets_used) / n_buckets);
+  fprintf (stream, "max bucket length: %lu\n",
+           (unsigned long int) max_bucket_length);
+}
+
+/* Hash KEY and return a pointer to the selected bucket.
+   If TABLE->hasher misbehaves, abort.  */
+static struct hash_entry *
+safe_hasher (const Hash_table *table, const void *key)
+{
+  size_t n = table->hasher (key, table->n_buckets);
+  if (! (n < table->n_buckets))
+    abort ();
+  return table->bucket + n;
+}
+
+/* If ENTRY matches an entry already in the hash table, return the
+   entry from the table.  Otherwise, return NULL.  */
+
+void *
+hash_lookup (const Hash_table *table, const void *entry)
+{
+  struct hash_entry const *bucket = safe_hasher (table, entry);
+  struct hash_entry const *cursor;
+
+  if (bucket->data == NULL)
+    return NULL;
+
+  for (cursor = bucket; cursor; cursor = cursor->next)
+    if (entry == cursor->data || table->comparator (entry, cursor->data))
+      return cursor->data;
+
+  return NULL;
+}
+
+/* Walking.  */
+
+/* The functions in this page traverse the hash table and process the
+   contained entries.  For the traversal to work properly, the hash table
+   should not be resized nor modified while any particular entry is being
+   processed.  In particular, entries should not be added, and an entry
+   may be removed only if there is no shrink threshold and the entry being
+   removed has already been passed to hash_get_next.  */
+
+/* Return the first data in the table, or NULL if the table is empty.  */
+
+void *
+hash_get_first (const Hash_table *table)
+{
+  struct hash_entry const *bucket;
+
+  if (table->n_entries == 0)
+    return NULL;
+
+  for (bucket = table->bucket; ; bucket++)
+    if (! (bucket < table->bucket_limit))
+      abort ();
+    else if (bucket->data)
+      return bucket->data;
+}
+
+/* Return the user data for the entry following ENTRY, where ENTRY has been
+   returned by a previous call to either `hash_get_first' or `hash_get_next'.
+   Return NULL if there are no more entries.  */
+
+void *
+hash_get_next (const Hash_table *table, const void *entry)
+{
+  struct hash_entry const *bucket = safe_hasher (table, entry);
+  struct hash_entry const *cursor;
+
+  /* Find next entry in the same bucket.  */
+  cursor = bucket;
+  do
+    {
+      if (cursor->data == entry && cursor->next)
+        return cursor->next->data;
+      cursor = cursor->next;
+    }
+  while (cursor != NULL);
+
+  /* Find first entry in any subsequent bucket.  */
+  while (++bucket < table->bucket_limit)
+    if (bucket->data)
+      return bucket->data;
+
+  /* None found.  */
+  return NULL;
+}
+
+/* Fill BUFFER with pointers to active user entries in the hash table, then
+   return the number of pointers copied.  Do not copy more than BUFFER_SIZE
+   pointers.  */
+
+size_t
+hash_get_entries (const Hash_table *table, void **buffer,
+                  size_t buffer_size)
+{
+  size_t counter = 0;
+  struct hash_entry const *bucket;
+  struct hash_entry const *cursor;
+
+  for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
+    {
+      if (bucket->data)
+        {
+          for (cursor = bucket; cursor; cursor = cursor->next)
+            {
+              if (counter >= buffer_size)
+                return counter;
+              buffer[counter++] = cursor->data;
+            }
+        }
+    }
+
+  return counter;
+}
+
+/* Call a PROCESSOR function for each entry of a hash table, and return the
+   number of entries for which the processor function returned success.  A
+   pointer to some PROCESSOR_DATA which will be made available to each call to
+   the processor function.  The PROCESSOR accepts two arguments: the first is
+   the user entry being walked into, the second is the value of PROCESSOR_DATA
+   as received.  The walking continue for as long as the PROCESSOR function
+   returns nonzero.  When it returns zero, the walking is interrupted.  */
+
+size_t
+hash_do_for_each (const Hash_table *table, Hash_processor processor,
+                  void *processor_data)
+{
+  size_t counter = 0;
+  struct hash_entry const *bucket;
+  struct hash_entry const *cursor;
+
+  for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
+    {
+      if (bucket->data)
+        {
+          for (cursor = bucket; cursor; cursor = cursor->next)
+            {
+              if (! processor (cursor->data, processor_data))
+                return counter;
+              counter++;
+            }
+        }
+    }
+
+  return counter;
+}
+
+/* Allocation and clean-up.  */
+
+/* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1.
+   This is a convenience routine for constructing other hashing functions.  */
+
+#if USE_DIFF_HASH
+
+/* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see
+   B. J. McKenzie, R. Harries & T. Bell, Selecting a hashing algorithm,
+   Software--practice & experience 20, 2 (Feb 1990), 209-224.  Good hash
+   algorithms tend to be domain-specific, so what's good for [diffutils'] io.c
+   may not be good for your application."  */
+
+size_t
+hash_string (const char *string, size_t n_buckets)
+{
+# define HASH_ONE_CHAR(Value, Byte) \
+  ((Byte) + rotl_sz (Value, 7))
+
+  size_t value = 0;
+  unsigned char ch;
+
+  for (; (ch = *string); string++)
+    value = HASH_ONE_CHAR (value, ch);
+  return value % n_buckets;
+
+# undef HASH_ONE_CHAR
+}
+
+#else /* not USE_DIFF_HASH */
+
+/* This one comes from `recode', and performs a bit better than the above as
+   per a few experiments.  It is inspired from a hashing routine found in the
+   very old Cyber `snoop', itself written in typical Greg Mansfield style.
+   (By the way, what happened to this excellent man?  Is he still alive?)  */
+
+size_t
+hash_string (const char *string, size_t n_buckets)
+{
+  size_t value = 0;
+  unsigned char ch;
+
+  for (; (ch = *string); string++)
+    value = (value * 31 + ch) % n_buckets;
+  return value;
+}
+
+#endif /* not USE_DIFF_HASH */
+
+/* Return true if CANDIDATE is a prime number.  CANDIDATE should be an odd
+   number at least equal to 11.  */
+
+static bool
+is_prime (size_t candidate)
+{
+  size_t divisor = 3;
+  size_t square = divisor * divisor;
+
+  while (square < candidate && (candidate % divisor))
+    {
+      divisor++;
+      square += 4 * divisor;
+      divisor++;
+    }
+
+  return (candidate % divisor ? true : false);
+}
+
+/* Round a given CANDIDATE number up to the nearest prime, and return that
+   prime.  Primes lower than 10 are merely skipped.  */
+
+static size_t
+next_prime (size_t candidate)
+{
+  /* Skip small primes.  */
+  if (candidate < 10)
+    candidate = 10;
+
+  /* Make it definitely odd.  */
+  candidate |= 1;
+
+  while (SIZE_MAX != candidate && !is_prime (candidate))
+    candidate += 2;
+
+  return candidate;
+}
+
+void
+hash_reset_tuning (Hash_tuning *tuning)
+{
+  *tuning = default_tuning;
+}
+
+/* If the user passes a NULL hasher, we hash the raw pointer.  */
+static size_t
+raw_hasher (const void *data, size_t n)
+{
+  /* When hashing unique pointers, it is often the case that they were
+     generated by malloc and thus have the property that the low-order
+     bits are 0.  As this tends to give poorer performance with small
+     tables, we rotate the pointer value before performing division,
+     in an attempt to improve hash quality.  */
+  size_t val = rotr_sz ((size_t) data, 3);
+  return val % n;
+}
+
+/* If the user passes a NULL comparator, we use pointer comparison.  */
+static bool
+raw_comparator (const void *a, const void *b)
+{
+  return a == b;
+}
+
+
+/* For the given hash TABLE, check the user supplied tuning structure for
+   reasonable values, and return true if there is no gross error with it.
+   Otherwise, definitively reset the TUNING field to some acceptable default
+   in the hash table (that is, the user loses the right of further modifying
+   tuning arguments), and return false.  */
+
+static bool
+check_tuning (Hash_table *table)
+{
+  const Hash_tuning *tuning = table->tuning;
+  float epsilon;
+  if (tuning == &default_tuning)
+    return true;
+
+  /* Be a bit stricter than mathematics would require, so that
+     rounding errors in size calculations do not cause allocations to
+     fail to grow or shrink as they should.  The smallest allocation
+     is 11 (due to next_prime's algorithm), so an epsilon of 0.1
+     should be good enough.  */
+  epsilon = 0.1f;
+
+  if (epsilon < tuning->growth_threshold
+      && tuning->growth_threshold < 1 - epsilon
+      && 1 + epsilon < tuning->growth_factor
+      && 0 <= tuning->shrink_threshold
+      && tuning->shrink_threshold + epsilon < tuning->shrink_factor
+      && tuning->shrink_factor <= 1
+      && tuning->shrink_threshold + epsilon < tuning->growth_threshold)
+    return true;
+
+  table->tuning = &default_tuning;
+  return false;
+}
+
+/* Compute the size of the bucket array for the given CANDIDATE and
+   TUNING, or return 0 if there is no possible way to allocate that
+   many entries.  */
+
+static size_t
+compute_bucket_size (size_t candidate, const Hash_tuning *tuning)
+{
+  if (!tuning->is_n_buckets)
+    {
+      float new_candidate = candidate / tuning->growth_threshold;
+      if (SIZE_MAX <= new_candidate)
+        return 0;
+      candidate = new_candidate;
+    }
+  candidate = next_prime (candidate);
+  if (xalloc_oversized (candidate, sizeof (struct hash_entry *)))
+    return 0;
+  return candidate;
+}
+
+/* Allocate and return a new hash table, or NULL upon failure.  The initial
+   number of buckets is automatically selected so as to _guarantee_ that you
+   may insert at least CANDIDATE different user entries before any growth of
+   the hash table size occurs.  So, if have a reasonably tight a-priori upper
+   bound on the number of entries you intend to insert in the hash table, you
+   may save some table memory and insertion time, by specifying it here.  If
+   the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
+   argument has its meaning changed to the wanted number of buckets.
+
+   TUNING points to a structure of user-supplied values, in case some fine
+   tuning is wanted over the default behavior of the hasher.  If TUNING is
+   NULL, the default tuning parameters are used instead.  If TUNING is
+   provided but the values requested are out of bounds or might cause
+   rounding errors, return NULL.
+
+   The user-supplied HASHER function, when not NULL, accepts two
+   arguments ENTRY and TABLE_SIZE.  It computes, by hashing ENTRY contents, a
+   slot number for that entry which should be in the range 0..TABLE_SIZE-1.
+   This slot number is then returned.
+
+   The user-supplied COMPARATOR function, when not NULL, accepts two
+   arguments pointing to user data, it then returns true for a pair of entries
+   that compare equal, or false otherwise.  This function is internally called
+   on entries which are already known to hash to the same bucket index,
+   but which are distinct pointers.
+
+   The user-supplied DATA_FREER function, when not NULL, may be later called
+   with the user data as an argument, just before the entry containing the
+   data gets freed.  This happens from within `hash_free' or `hash_clear'.
+   You should specify this function only if you want these functions to free
+   all of your `data' data.  This is typically the case when your data is
+   simply an auxiliary struct that you have malloc'd to aggregate several
+   values.  */
+
+Hash_table *
+hash_initialize (size_t candidate, const Hash_tuning *tuning,
+                 Hash_hasher hasher, Hash_comparator comparator,
+                 Hash_data_freer data_freer)
+{
+  Hash_table *table;
+
+  if (hasher == NULL)
+    hasher = raw_hasher;
+  if (comparator == NULL)
+    comparator = raw_comparator;
+
+  table = malloc (sizeof *table);
+  if (table == NULL)
+    return NULL;
+
+  if (!tuning)
+    tuning = &default_tuning;
+  table->tuning = tuning;
+  if (!check_tuning (table))
+    {
+      /* Fail if the tuning options are invalid.  This is the only occasion
+         when the user gets some feedback about it.  Once the table is created,
+         if the user provides invalid tuning options, we silently revert to
+         using the defaults, and ignore further request to change the tuning
+         options.  */
+      goto fail;
+    }
+
+  table->n_buckets = compute_bucket_size (candidate, tuning);
+  if (!table->n_buckets)
+    goto fail;
+
+  table->bucket = calloc (table->n_buckets, sizeof *table->bucket);
+  if (table->bucket == NULL)
+    goto fail;
+  table->bucket_limit = table->bucket + table->n_buckets;
+  table->n_buckets_used = 0;
+  table->n_entries = 0;
+
+  table->hasher = hasher;
+  table->comparator = comparator;
+  table->data_freer = data_freer;
+
+  table->free_entry_list = NULL;
+#if USE_OBSTACK
+  obstack_init (&table->entry_stack);
+#endif
+  return table;
+
+ fail:
+  free (table);
+  return NULL;
+}
+
+/* Make all buckets empty, placing any chained entries on the free list.
+   Apply the user-specified function data_freer (if any) to the datas of any
+   affected entries.  */
+
+void
+hash_clear (Hash_table *table)
+{
+  struct hash_entry *bucket;
+
+  for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
+    {
+      if (bucket->data)
+        {
+          struct hash_entry *cursor;
+          struct hash_entry *next;
+
+          /* Free the bucket overflow.  */
+          for (cursor = bucket->next; cursor; cursor = next)
+            {
+              if (table->data_freer)
+                table->data_freer (cursor->data);
+              cursor->data = NULL;
+
+              next = cursor->next;
+              /* Relinking is done one entry at a time, as it is to be expected
+                 that overflows are either rare or short.  */
+              cursor->next = table->free_entry_list;
+              table->free_entry_list = cursor;
+            }
+
+          /* Free the bucket head.  */
+          if (table->data_freer)
+            table->data_freer (bucket->data);
+          bucket->data = NULL;
+          bucket->next = NULL;
+        }
+    }
+
+  table->n_buckets_used = 0;
+  table->n_entries = 0;
+}
+
+/* Reclaim all storage associated with a hash table.  If a data_freer
+   function has been supplied by the user when the hash table was created,
+   this function applies it to the data of each entry before freeing that
+   entry.  */
+
+void
+hash_free (Hash_table *table)
+{
+  struct hash_entry *bucket;
+  struct hash_entry *cursor;
+  struct hash_entry *next;
+
+  /* Call the user data_freer function.  */
+  if (table->data_freer && table->n_entries)
+    {
+      for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
+        {
+          if (bucket->data)
+            {
+              for (cursor = bucket; cursor; cursor = cursor->next)
+                table->data_freer (cursor->data);
+            }
+        }
+    }
+
+#if USE_OBSTACK
+
+  obstack_free (&table->entry_stack, NULL);
+
+#else
+
+  /* Free all bucket overflowed entries.  */
+  for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
+    {
+      for (cursor = bucket->next; cursor; cursor = next)
+        {
+          next = cursor->next;
+          free (cursor);
+        }
+    }
+
+  /* Also reclaim the internal list of previously freed entries.  */
+  for (cursor = table->free_entry_list; cursor; cursor = next)
+    {
+      next = cursor->next;
+      free (cursor);
+    }
+
+#endif
+
+  /* Free the remainder of the hash table structure.  */
+  free (table->bucket);
+  free (table);
+}
+
+/* Insertion and deletion.  */
+
+/* Get a new hash entry for a bucket overflow, possibly by recycling a
+   previously freed one.  If this is not possible, allocate a new one.  */
+
+static struct hash_entry *
+allocate_entry (Hash_table *table)
+{
+  struct hash_entry *new;
+
+  if (table->free_entry_list)
+    {
+      new = table->free_entry_list;
+      table->free_entry_list = new->next;
+    }
+  else
+    {
+#if USE_OBSTACK
+      new = obstack_alloc (&table->entry_stack, sizeof *new);
+#else
+      new = malloc (sizeof *new);
+#endif
+    }
+
+  return new;
+}
+
+/* Free a hash entry which was part of some bucket overflow,
+   saving it for later recycling.  */
+
+static void
+free_entry (Hash_table *table, struct hash_entry *entry)
+{
+  entry->data = NULL;
+  entry->next = table->free_entry_list;
+  table->free_entry_list = entry;
+}
+
+/* This private function is used to help with insertion and deletion.  When
+   ENTRY matches an entry in the table, return a pointer to the corresponding
+   user data and set *BUCKET_HEAD to the head of the selected bucket.
+   Otherwise, return NULL.  When DELETE is true and ENTRY matches an entry in
+   the table, unlink the matching entry.  */
+
+static void *
+hash_find_entry (Hash_table *table, const void *entry,
+                 struct hash_entry **bucket_head, bool delete)
+{
+  struct hash_entry *bucket = safe_hasher (table, entry);
+  struct hash_entry *cursor;
+
+  *bucket_head = bucket;
+
+  /* Test for empty bucket.  */
+  if (bucket->data == NULL)
+    return NULL;
+
+  /* See if the entry is the first in the bucket.  */
+  if (entry == bucket->data || table->comparator (entry, bucket->data))
+    {
+      void *data = bucket->data;
+
+      if (delete)
+        {
+          if (bucket->next)
+            {
+              struct hash_entry *next = bucket->next;
+
+              /* Bump the first overflow entry into the bucket head, then save
+                 the previous first overflow entry for later recycling.  */
+              *bucket = *next;
+              free_entry (table, next);
+            }
+          else
+            {
+              bucket->data = NULL;
+            }
+        }
+
+      return data;
+    }
+
+  /* Scan the bucket overflow.  */
+  for (cursor = bucket; cursor->next; cursor = cursor->next)
+    {
+      if (entry == cursor->next->data
+          || table->comparator (entry, cursor->next->data))
+        {
+          void *data = cursor->next->data;
+
+          if (delete)
+            {
+              struct hash_entry *next = cursor->next;
+
+              /* Unlink the entry to delete, then save the freed entry for later
+                 recycling.  */
+              cursor->next = next->next;
+              free_entry (table, next);
+            }
+
+          return data;
+        }
+    }
+
+  /* No entry found.  */
+  return NULL;
+}
+
+/* Internal helper, to move entries from SRC to DST.  Both tables must
+   share the same free entry list.  If SAFE, only move overflow
+   entries, saving bucket heads for later, so that no allocations will
+   occur.  Return false if the free entry list is exhausted and an
+   allocation fails.  */
+
+static bool
+transfer_entries (Hash_table *dst, Hash_table *src, bool safe)
+{
+  struct hash_entry *bucket;
+  struct hash_entry *cursor;
+  struct hash_entry *next;
+  for (bucket = src->bucket; bucket < src->bucket_limit; bucket++)
+    if (bucket->data)
+      {
+        void *data;
+        struct hash_entry *new_bucket;
+
+        /* Within each bucket, transfer overflow entries first and
+           then the bucket head, to minimize memory pressure.  After
+           all, the only time we might allocate is when moving the
+           bucket head, but moving overflow entries first may create
+           free entries that can be recycled by the time we finally
+           get to the bucket head.  */
+        for (cursor = bucket->next; cursor; cursor = next)
+          {
+            data = cursor->data;
+            new_bucket = safe_hasher (dst, data);
+
+            next = cursor->next;
+
+            if (new_bucket->data)
+              {
+                /* Merely relink an existing entry, when moving from a
+                   bucket overflow into a bucket overflow.  */
+                cursor->next = new_bucket->next;
+                new_bucket->next = cursor;
+              }
+            else
+              {
+                /* Free an existing entry, when moving from a bucket
+                   overflow into a bucket header.  */
+                new_bucket->data = data;
+                dst->n_buckets_used++;
+                free_entry (dst, cursor);
+              }
+          }
+        /* Now move the bucket head.  Be sure that if we fail due to
+           allocation failure that the src table is in a consistent
+           state.  */
+        data = bucket->data;
+        bucket->next = NULL;
+        if (safe)
+          continue;
+        new_bucket = safe_hasher (dst, data);
+
+        if (new_bucket->data)
+          {
+            /* Allocate or recycle an entry, when moving from a bucket
+               header into a bucket overflow.  */
+            struct hash_entry *new_entry = allocate_entry (dst);
+
+            if (new_entry == NULL)
+              return false;
+
+            new_entry->data = data;
+            new_entry->next = new_bucket->next;
+            new_bucket->next = new_entry;
+          }
+        else
+          {
+            /* Move from one bucket header to another.  */
+            new_bucket->data = data;
+            dst->n_buckets_used++;
+          }
+        bucket->data = NULL;
+        src->n_buckets_used--;
+      }
+  return true;
+}
+
+/* For an already existing hash table, change the number of buckets through
+   specifying CANDIDATE.  The contents of the hash table are preserved.  The
+   new number of buckets is automatically selected so as to _guarantee_ that
+   the table may receive at least CANDIDATE different user entries, including
+   those already in the table, before any other growth of the hash table size
+   occurs.  If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
+   exact number of buckets desired.  Return true iff the rehash succeeded.  */
+
+bool
+hash_rehash (Hash_table *table, size_t candidate)
+{
+  Hash_table storage;
+  Hash_table *new_table;
+  size_t new_size = compute_bucket_size (candidate, table->tuning);
+
+  if (!new_size)
+    return false;
+  if (new_size == table->n_buckets)
+    return true;
+  new_table = &storage;
+  new_table->bucket = calloc (new_size, sizeof *new_table->bucket);
+  if (new_table->bucket == NULL)
+    return false;
+  new_table->n_buckets = new_size;
+  new_table->bucket_limit = new_table->bucket + new_size;
+  new_table->n_buckets_used = 0;
+  new_table->n_entries = 0;
+  new_table->tuning = table->tuning;
+  new_table->hasher = table->hasher;
+  new_table->comparator = table->comparator;
+  new_table->data_freer = table->data_freer;
+
+  /* In order for the transfer to successfully complete, we need
+     additional overflow entries when distinct buckets in the old
+     table collide into a common bucket in the new table.  The worst
+     case possible is a hasher that gives a good spread with the old
+     size, but returns a constant with the new size; if we were to
+     guarantee table->n_buckets_used-1 free entries in advance, then
+     the transfer would be guaranteed to not allocate memory.
+     However, for large tables, a guarantee of no further allocation
+     introduces a lot of extra memory pressure, all for an unlikely
+     corner case (most rehashes reduce, rather than increase, the
+     number of overflow entries needed).  So, we instead ensure that
+     the transfer process can be reversed if we hit a memory
+     allocation failure mid-transfer.  */
+
+  /* Merely reuse the extra old space into the new table.  */
+#if USE_OBSTACK
+  new_table->entry_stack = table->entry_stack;
+#endif
+  new_table->free_entry_list = table->free_entry_list;
+
+  if (transfer_entries (new_table, table, false))
+    {
+      /* Entries transferred successfully; tie up the loose ends.  */
+      free (table->bucket);
+      table->bucket = new_table->bucket;
+      table->bucket_limit = new_table->bucket_limit;
+      table->n_buckets = new_table->n_buckets;
+      table->n_buckets_used = new_table->n_buckets_used;
+      table->free_entry_list = new_table->free_entry_list;
+      /* table->n_entries and table->entry_stack already hold their value.  */
+      return true;
+    }
+
+  /* We've allocated new_table->bucket (and possibly some entries),
+     exhausted the free list, and moved some but not all entries into
+     new_table.  We must undo the partial move before returning
+     failure.  The only way to get into this situation is if new_table
+     uses fewer buckets than the old table, so we will reclaim some
+     free entries as overflows in the new table are put back into
+     distinct buckets in the old table.
+
+     There are some pathological cases where a single pass through the
+     table requires more intermediate overflow entries than using two
+     passes.  Two passes give worse cache performance and takes
+     longer, but at this point, we're already out of memory, so slow
+     and safe is better than failure.  */
+  table->free_entry_list = new_table->free_entry_list;
+  if (! (transfer_entries (table, new_table, true)
+         && transfer_entries (table, new_table, false)))
+    abort ();
+  /* table->n_entries already holds its value.  */
+  free (new_table->bucket);
+  return false;
+}
+
+/* Return -1 upon memory allocation failure.
+   Return 1 if insertion succeeded.
+   Return 0 if there is already a matching entry in the table,
+   and in that case, if MATCHED_ENT is non-NULL, set *MATCHED_ENT
+   to that entry.
+
+   This interface is easier to use than hash_insert when you must
+   distinguish between the latter two cases.  More importantly,
+   hash_insert is unusable for some types of ENTRY values.  When using
+   hash_insert, the only way to distinguish those cases is to compare
+   the return value and ENTRY.  That works only when you can have two
+   different ENTRY values that point to data that compares "equal".  Thus,
+   when the ENTRY value is a simple scalar, you must use hash_insert0.
+   ENTRY must not be NULL.  */
+int
+hash_insert0 (Hash_table *table, void const *entry, void const **matched_ent)
+{
+  void *data;
+  struct hash_entry *bucket;
+
+  /* The caller cannot insert a NULL entry, since hash_lookup returns NULL
+     to indicate "not found", and hash_find_entry uses "bucket->data == NULL"
+     to indicate an empty bucket.  */
+  if (! entry)
+    abort ();
+
+  /* If there's a matching entry already in the table, return that.  */
+  if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL)
+    {
+      if (matched_ent)
+        *matched_ent = data;
+      return 0;
+    }
+
+  /* If the growth threshold of the buckets in use has been reached, increase
+     the table size and rehash.  There's no point in checking the number of
+     entries:  if the hashing function is ill-conditioned, rehashing is not
+     likely to improve it.  */
+
+  if (table->n_buckets_used
+      > table->tuning->growth_threshold * table->n_buckets)
+    {
+      /* Check more fully, before starting real work.  If tuning arguments
+         became invalid, the second check will rely on proper defaults.  */
+      check_tuning (table);
+      if (table->n_buckets_used
+          > table->tuning->growth_threshold * table->n_buckets)
+        {
+          const Hash_tuning *tuning = table->tuning;
+          float candidate =
+            (tuning->is_n_buckets
+             ? (table->n_buckets * tuning->growth_factor)
+             : (table->n_buckets * tuning->growth_factor
+                * tuning->growth_threshold));
+
+          if (SIZE_MAX <= candidate)
+            return -1;
+
+          /* If the rehash fails, arrange to return NULL.  */
+          if (!hash_rehash (table, candidate))
+            return -1;
+
+          /* Update the bucket we are interested in.  */
+          if (hash_find_entry (table, entry, &bucket, false) != NULL)
+            abort ();
+        }
+    }
+
+  /* ENTRY is not matched, it should be inserted.  */
+
+  if (bucket->data)
+    {
+      struct hash_entry *new_entry = allocate_entry (table);
+
+      if (new_entry == NULL)
+        return -1;
+
+      /* Add ENTRY in the overflow of the bucket.  */
+
+      new_entry->data = (void *) entry;
+      new_entry->next = bucket->next;
+      bucket->next = new_entry;
+      table->n_entries++;
+      return 1;
+    }
+
+  /* Add ENTRY right in the bucket head.  */
+
+  bucket->data = (void *) entry;
+  table->n_entries++;
+  table->n_buckets_used++;
+
+  return 1;
+}
+
+/* If ENTRY matches an entry already in the hash table, return the pointer
+   to the entry from the table.  Otherwise, insert ENTRY and return ENTRY.
+   Return NULL if the storage required for insertion cannot be allocated.
+   This implementation does not support duplicate entries or insertion of
+   NULL.  */
+
+void *
+hash_insert (Hash_table *table, void const *entry)
+{
+  void const *matched_ent;
+  int err = hash_insert0 (table, entry, &matched_ent);
+  return (err == -1
+          ? NULL
+          : (void *) (err == 0 ? matched_ent : entry));
+}
+
+/* If ENTRY is already in the table, remove it and return the just-deleted
+   data (the user may want to deallocate its storage).  If ENTRY is not in the
+   table, don't modify the table and return NULL.  */
+
+void *
+hash_delete (Hash_table *table, const void *entry)
+{
+  void *data;
+  struct hash_entry *bucket;
+
+  data = hash_find_entry (table, entry, &bucket, true);
+  if (!data)
+    return NULL;
+
+  table->n_entries--;
+  if (!bucket->data)
+    {
+      table->n_buckets_used--;
+
+      /* If the shrink threshold of the buckets in use has been reached,
+         rehash into a smaller table.  */
+
+      if (table->n_buckets_used
+          < table->tuning->shrink_threshold * table->n_buckets)
+        {
+          /* Check more fully, before starting real work.  If tuning arguments
+             became invalid, the second check will rely on proper defaults.  */
+          check_tuning (table);
+          if (table->n_buckets_used
+              < table->tuning->shrink_threshold * table->n_buckets)
+            {
+              const Hash_tuning *tuning = table->tuning;
+              size_t candidate =
+                (tuning->is_n_buckets
+                 ? table->n_buckets * tuning->shrink_factor
+                 : (table->n_buckets * tuning->shrink_factor
+                    * tuning->growth_threshold));
+
+              if (!hash_rehash (table, candidate))
+                {
+                  /* Failure to allocate memory in an attempt to
+                     shrink the table is not fatal.  But since memory
+                     is low, we can at least be kind and free any
+                     spare entries, rather than keeping them tied up
+                     in the free entry list.  */
+#if ! USE_OBSTACK
+                  struct hash_entry *cursor = table->free_entry_list;
+                  struct hash_entry *next;
+                  while (cursor)
+                    {
+                      next = cursor->next;
+                      free (cursor);
+                      cursor = next;
+                    }
+                  table->free_entry_list = NULL;
+#endif
+                }
+            }
+        }
+    }
+
+  return data;
+}
+
+/* Testing.  */
+
+#if TESTING
+
+void
+hash_print (const Hash_table *table)
+{
+  struct hash_entry *bucket = (struct hash_entry *) table->bucket;
+
+  for ( ; bucket < table->bucket_limit; bucket++)
+    {
+      struct hash_entry *cursor;
+
+      if (bucket)
+        printf ("%lu:\n", (unsigned long int) (bucket - table->bucket));
+
+      for (cursor = bucket; cursor; cursor = cursor->next)
+        {
+          char const *s = cursor->data;
+          /* FIXME */
+          if (s)
+            printf ("  %s\n", s);
+        }
+    }
+}
+
+#endif /* TESTING */
diff --git a/gnulib/lib/hash.h b/gnulib/lib/hash.h
new file mode 100644 (file)
index 0000000..9f694be
--- /dev/null
@@ -0,0 +1,92 @@
+/* hash - hashing table processing.
+   Copyright (C) 1998-1999, 2001, 2003, 2009-2011 Free Software Foundation,
+   Inc.
+   Written by Jim Meyering <meyering@ascend.com>, 1998.
+
+   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/>.  */
+
+/* A generic hash table package.  */
+
+/* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use
+   obstacks instead of malloc, and recompile `hash.c' with same setting.  */
+
+#ifndef HASH_H_
+# define HASH_H_
+
+# include <stdio.h>
+# include <stdbool.h>
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The warn_unused_result attribute appeared first in gcc-3.4.0.  */
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#  define _GL_ATTRIBUTE_WUR __attribute__ ((__warn_unused_result__))
+# else
+#  define _GL_ATTRIBUTE_WUR /* empty */
+# endif
+
+typedef size_t (*Hash_hasher) (const void *, size_t);
+typedef bool (*Hash_comparator) (const void *, const void *);
+typedef void (*Hash_data_freer) (void *);
+typedef bool (*Hash_processor) (void *, void *);
+
+struct hash_tuning
+  {
+    /* This structure is mainly used for `hash_initialize', see the block
+       documentation of `hash_reset_tuning' for more complete comments.  */
+
+    float shrink_threshold;     /* ratio of used buckets to trigger a shrink */
+    float shrink_factor;        /* ratio of new smaller size to original size */
+    float growth_threshold;     /* ratio of used buckets to trigger a growth */
+    float growth_factor;        /* ratio of new bigger size to original size */
+    bool is_n_buckets;          /* if CANDIDATE really means table size */
+  };
+
+typedef struct hash_tuning Hash_tuning;
+
+struct hash_table;
+
+typedef struct hash_table Hash_table;
+
+/* Information and lookup.  */
+size_t hash_get_n_buckets (const Hash_table *);
+size_t hash_get_n_buckets_used (const Hash_table *);
+size_t hash_get_n_entries (const Hash_table *);
+size_t hash_get_max_bucket_length (const Hash_table *);
+bool hash_table_ok (const Hash_table *);
+void hash_print_statistics (const Hash_table *, FILE *);
+void *hash_lookup (const Hash_table *, const void *);
+
+/* Walking.  */
+void *hash_get_first (const Hash_table *);
+void *hash_get_next (const Hash_table *, const void *);
+size_t hash_get_entries (const Hash_table *, void **, size_t);
+size_t hash_do_for_each (const Hash_table *, Hash_processor, void *);
+
+/* Allocation and clean-up.  */
+size_t hash_string (const char *, size_t);
+void hash_reset_tuning (Hash_tuning *);
+Hash_table *hash_initialize (size_t, const Hash_tuning *,
+                             Hash_hasher, Hash_comparator,
+                             Hash_data_freer) _GL_ATTRIBUTE_WUR;
+void hash_clear (Hash_table *);
+void hash_free (Hash_table *);
+
+/* Insertion and deletion.  */
+bool hash_rehash (Hash_table *, size_t) _GL_ATTRIBUTE_WUR;
+void *hash_insert (Hash_table *, const void *) _GL_ATTRIBUTE_WUR;
+int hash_insert0 (Hash_table *table, const void *entry,
+                  const void **matched_ent);
+void *hash_delete (Hash_table *, const void *);
+
+#endif
diff --git a/gnulib/lib/human.c b/gnulib/lib/human.c
new file mode 100644 (file)
index 0000000..4c261da
--- /dev/null
@@ -0,0 +1,470 @@
+/* human.c -- print human readable file size
+
+   Copyright (C) 1996-2007, 2009-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 Paul Eggert and Larry McVoy.  */
+
+#include <config.h>
+
+#include "human.h"
+
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <argmatch.h>
+#include <error.h>
+#include <intprops.h>
+
+/* The maximum length of a suffix like "KiB".  */
+#define HUMAN_READABLE_SUFFIX_LENGTH_MAX 3
+
+static const char power_letter[] =
+{
+  0,    /* not used */
+  'K',  /* kibi ('k' for kilo is a special case) */
+  'M',  /* mega or mebi */
+  'G',  /* giga or gibi */
+  'T',  /* tera or tebi */
+  'P',  /* peta or pebi */
+  'E',  /* exa or exbi */
+  'Z',  /* zetta or 2**70 */
+  'Y'   /* yotta or 2**80 */
+};
+
+
+/* If INEXACT_STYLE is not human_round_to_nearest, and if easily
+   possible, adjust VALUE according to the style.  */
+
+static long double
+adjust_value (int inexact_style, long double value)
+{
+  /* Do not use the floorl or ceill functions, as that would mean
+     checking for their presence and possibly linking with the
+     standard math library, which is a porting pain.  So leave the
+     value alone if it is too large to easily round.  */
+  if (inexact_style != human_round_to_nearest && value < UINTMAX_MAX)
+    {
+      uintmax_t u = value;
+      value = u + (inexact_style == human_ceiling && u != value);
+    }
+
+  return value;
+}
+
+/* Group the digits of NUMBER according to the grouping rules of the
+   current locale.  NUMBER contains NUMBERLEN digits.  Modify the
+   bytes pointed to by NUMBER in place, subtracting 1 from NUMBER for
+   each byte inserted.  Return the starting address of the modified
+   number.
+
+   To group the digits, use GROUPING and THOUSANDS_SEP as in `struct
+   lconv' from <locale.h>.  */
+
+static char *
+group_number (char *number, size_t numberlen,
+              char const *grouping, char const *thousands_sep)
+{
+  register char *d;
+  size_t grouplen = SIZE_MAX;
+  size_t thousands_seplen = strlen (thousands_sep);
+  size_t i = numberlen;
+
+  /* The maximum possible value for NUMBERLEN is the number of digits
+     in the square of the largest uintmax_t, so double the size needed.  */
+  char buf[2 * INT_STRLEN_BOUND (uintmax_t) + 1];
+
+  memcpy (buf, number, numberlen);
+  d = number + numberlen;
+
+  for (;;)
+    {
+      unsigned char g = *grouping;
+
+      if (g)
+        {
+          grouplen = g < CHAR_MAX ? g : i;
+          grouping++;
+        }
+
+      if (i < grouplen)
+        grouplen = i;
+
+      d -= grouplen;
+      i -= grouplen;
+      memcpy (d, buf + i, grouplen);
+      if (i == 0)
+        return d;
+
+      d -= thousands_seplen;
+      memcpy (d, thousands_sep, thousands_seplen);
+    }
+}
+
+/* Convert N to a human readable format in BUF, using the options OPTS.
+
+   N is expressed in units of FROM_BLOCK_SIZE.  FROM_BLOCK_SIZE must
+   be nonnegative.
+
+   Use units of TO_BLOCK_SIZE in the output number.  TO_BLOCK_SIZE
+   must be positive.
+
+   Use (OPTS & (human_round_to_nearest | human_floor | human_ceiling))
+   to determine whether to take the ceiling or floor of any result
+   that cannot be expressed exactly.
+
+   If (OPTS & human_group_digits), group the thousands digits
+   according to the locale, e.g., `1,000,000' in an American English
+   locale.
+
+   If (OPTS & human_autoscale), deduce the output block size
+   automatically; TO_BLOCK_SIZE must be 1 but it has no effect on the
+   output.  Use powers of 1024 if (OPTS & human_base_1024), and powers
+   of 1000 otherwise.  For example, assuming powers of 1024, 8500
+   would be converted to 8.3, 133456345 to 127, 56990456345 to 53, and
+   so on.  Numbers smaller than the power aren't modified.
+   human_autoscale is normally used together with human_SI.
+
+   If (OPTS & human_space_before_unit), use a space to separate the
+   number from any suffix that is appended as described below.
+
+   If (OPTS & human_SI), append an SI prefix indicating which power is
+   being used.  If in addition (OPTS & human_B), append "B" (if base
+   1000) or "iB" (if base 1024) to the SI prefix.  When ((OPTS &
+   human_SI) && ! (OPTS & human_autoscale)), TO_BLOCK_SIZE must be a
+   power of 1024 or of 1000, depending on (OPTS &
+   human_base_1024).  */
+
+char *
+human_readable (uintmax_t n, char *buf, int opts,
+                uintmax_t from_block_size, uintmax_t to_block_size)
+{
+  int inexact_style =
+    opts & (human_round_to_nearest | human_floor | human_ceiling);
+  unsigned int base = opts & human_base_1024 ? 1024 : 1000;
+  uintmax_t amt;
+  int tenths;
+  int exponent = -1;
+  int exponent_max = sizeof power_letter - 1;
+  char *p;
+  char *psuffix;
+  char const *integerlim;
+
+  /* 0 means adjusted N == AMT.TENTHS;
+     1 means AMT.TENTHS < adjusted N < AMT.TENTHS + 0.05;
+     2 means adjusted N == AMT.TENTHS + 0.05;
+     3 means AMT.TENTHS + 0.05 < adjusted N < AMT.TENTHS + 0.1.  */
+  int rounding;
+
+  char const *decimal_point = ".";
+  size_t decimal_pointlen = 1;
+  char const *grouping = "";
+  char const *thousands_sep = "";
+  struct lconv const *l = localeconv ();
+  size_t pointlen = strlen (l->decimal_point);
+  if (0 < pointlen && pointlen <= MB_LEN_MAX)
+    {
+      decimal_point = l->decimal_point;
+      decimal_pointlen = pointlen;
+    }
+  grouping = l->grouping;
+  if (strlen (l->thousands_sep) <= MB_LEN_MAX)
+    thousands_sep = l->thousands_sep;
+
+  psuffix = buf + LONGEST_HUMAN_READABLE - HUMAN_READABLE_SUFFIX_LENGTH_MAX;
+  p = psuffix;
+
+  /* Adjust AMT out of FROM_BLOCK_SIZE units and into TO_BLOCK_SIZE
+     units.  If this can be done exactly with integer arithmetic, do
+     not use floating point operations.  */
+  if (to_block_size <= from_block_size)
+    {
+      if (from_block_size % to_block_size == 0)
+        {
+          uintmax_t multiplier = from_block_size / to_block_size;
+          amt = n * multiplier;
+          if (amt / multiplier == n)
+            {
+              tenths = 0;
+              rounding = 0;
+              goto use_integer_arithmetic;
+            }
+        }
+    }
+  else if (from_block_size != 0 && to_block_size % from_block_size == 0)
+    {
+      uintmax_t divisor = to_block_size / from_block_size;
+      uintmax_t r10 = (n % divisor) * 10;
+      uintmax_t r2 = (r10 % divisor) * 2;
+      amt = n / divisor;
+      tenths = r10 / divisor;
+      rounding = r2 < divisor ? 0 < r2 : 2 + (divisor < r2);
+      goto use_integer_arithmetic;
+    }
+
+  {
+    /* Either the result cannot be computed easily using uintmax_t,
+       or from_block_size is zero.  Fall back on floating point.
+       FIXME: This can yield answers that are slightly off.  */
+
+    long double dto_block_size = to_block_size;
+    long double damt = n * (from_block_size / dto_block_size);
+    size_t buflen;
+    size_t nonintegerlen;
+
+    if (! (opts & human_autoscale))
+      {
+        sprintf (buf, "%.0Lf", adjust_value (inexact_style, damt));
+        buflen = strlen (buf);
+        nonintegerlen = 0;
+      }
+    else
+      {
+        long double e = 1;
+        exponent = 0;
+
+        do
+          {
+            e *= base;
+            exponent++;
+          }
+        while (e * base <= damt && exponent < exponent_max);
+
+        damt /= e;
+
+        sprintf (buf, "%.1Lf", adjust_value (inexact_style, damt));
+        buflen = strlen (buf);
+        nonintegerlen = decimal_pointlen + 1;
+
+        if (1 + nonintegerlen + ! (opts & human_base_1024) < buflen
+            || ((opts & human_suppress_point_zero)
+                && buf[buflen - 1] == '0'))
+          {
+            sprintf (buf, "%.0Lf",
+                     adjust_value (inexact_style, damt * 10) / 10);
+            buflen = strlen (buf);
+            nonintegerlen = 0;
+          }
+      }
+
+    p = psuffix - buflen;
+    memmove (p, buf, buflen);
+    integerlim = p + buflen - nonintegerlen;
+  }
+  goto do_grouping;
+
+ use_integer_arithmetic:
+  {
+    /* The computation can be done exactly, with integer arithmetic.
+
+       Use power of BASE notation if requested and if adjusted AMT is
+       large enough.  */
+
+    if (opts & human_autoscale)
+      {
+        exponent = 0;
+
+        if (base <= amt)
+          {
+            do
+              {
+                unsigned int r10 = (amt % base) * 10 + tenths;
+                unsigned int r2 = (r10 % base) * 2 + (rounding >> 1);
+                amt /= base;
+                tenths = r10 / base;
+                rounding = (r2 < base
+                            ? (r2 + rounding) != 0
+                            : 2 + (base < r2 + rounding));
+                exponent++;
+              }
+            while (base <= amt && exponent < exponent_max);
+
+            if (amt < 10)
+              {
+                if (inexact_style == human_round_to_nearest
+                    ? 2 < rounding + (tenths & 1)
+                    : inexact_style == human_ceiling && 0 < rounding)
+                  {
+                    tenths++;
+                    rounding = 0;
+
+                    if (tenths == 10)
+                      {
+                        amt++;
+                        tenths = 0;
+                      }
+                  }
+
+                if (amt < 10
+                    && (tenths || ! (opts & human_suppress_point_zero)))
+                  {
+                    *--p = '0' + tenths;
+                    p -= decimal_pointlen;
+                    memcpy (p, decimal_point, decimal_pointlen);
+                    tenths = rounding = 0;
+                  }
+              }
+          }
+      }
+
+    if (inexact_style == human_round_to_nearest
+        ? 5 < tenths + (0 < rounding + (amt & 1))
+        : inexact_style == human_ceiling && 0 < tenths + rounding)
+      {
+        amt++;
+
+        if ((opts & human_autoscale)
+            && amt == base && exponent < exponent_max)
+          {
+            exponent++;
+            if (! (opts & human_suppress_point_zero))
+              {
+                *--p = '0';
+                p -= decimal_pointlen;
+                memcpy (p, decimal_point, decimal_pointlen);
+              }
+            amt = 1;
+          }
+      }
+
+    integerlim = p;
+
+    do
+      {
+        int digit = amt % 10;
+        *--p = digit + '0';
+      }
+    while ((amt /= 10) != 0);
+  }
+
+ do_grouping:
+  if (opts & human_group_digits)
+    p = group_number (p, integerlim - p, grouping, thousands_sep);
+
+  if (opts & human_SI)
+    {
+      if (exponent < 0)
+        {
+          uintmax_t power;
+          exponent = 0;
+          for (power = 1; power < to_block_size; power *= base)
+            if (++exponent == exponent_max)
+              break;
+        }
+
+      if ((exponent | (opts & human_B)) && (opts & human_space_before_unit))
+        *psuffix++ = ' ';
+
+      if (exponent)
+        *psuffix++ = (! (opts & human_base_1024) && exponent == 1
+                      ? 'k'
+                      : power_letter[exponent]);
+
+      if (opts & human_B)
+        {
+          if ((opts & human_base_1024) && exponent)
+            *psuffix++ = 'i';
+          *psuffix++ = 'B';
+        }
+    }
+
+  *psuffix = '\0';
+
+  return p;
+}
+
+
+/* The default block size used for output.  This number may change in
+   the future as disks get larger.  */
+#ifndef DEFAULT_BLOCK_SIZE
+# define DEFAULT_BLOCK_SIZE 1024
+#endif
+
+static char const *const block_size_args[] = { "human-readable", "si", 0 };
+static int const block_size_opts[] =
+  {
+    human_autoscale + human_SI + human_base_1024,
+    human_autoscale + human_SI
+  };
+
+static uintmax_t
+default_block_size (void)
+{
+  return getenv ("POSIXLY_CORRECT") ? 512 : DEFAULT_BLOCK_SIZE;
+}
+
+static strtol_error
+humblock (char const *spec, uintmax_t *block_size, int *options)
+{
+  int i;
+  int opts = 0;
+
+  if (! spec
+      && ! (spec = getenv ("BLOCK_SIZE"))
+      && ! (spec = getenv ("BLOCKSIZE")))
+    *block_size = default_block_size ();
+  else
+    {
+      if (*spec == '\'')
+        {
+          opts |= human_group_digits;
+          spec++;
+        }
+
+      if (0 <= (i = ARGMATCH (spec, block_size_args, block_size_opts)))
+        {
+          opts |= block_size_opts[i];
+          *block_size = 1;
+        }
+      else
+        {
+          char *ptr;
+          strtol_error e = xstrtoumax (spec, &ptr, 0, block_size,
+                                       "eEgGkKmMpPtTyYzZ0");
+          if (e != LONGINT_OK)
+            {
+              *options = 0;
+              return e;
+            }
+          for (; ! ('0' <= *spec && *spec <= '9'); spec++)
+            if (spec == ptr)
+              {
+                opts |= human_SI;
+                if (ptr[-1] == 'B')
+                  opts |= human_B;
+                if (ptr[-1] != 'B' || ptr[-2] == 'i')
+                  opts |= human_base_1024;
+                break;
+              }
+        }
+    }
+
+  *options = opts;
+  return LONGINT_OK;
+}
+
+enum strtol_error
+human_options (char const *spec, int *opts, uintmax_t *block_size)
+{
+  strtol_error e = humblock (spec, block_size, opts);
+  if (*block_size == 0)
+    {
+      *block_size = default_block_size ();
+      e = LONGINT_INVALID;
+    }
+  return e;
+}
diff --git a/gnulib/lib/human.h b/gnulib/lib/human.h
new file mode 100644 (file)
index 0000000..fb8a089
--- /dev/null
@@ -0,0 +1,83 @@
+/* human.h -- print human readable file size
+
+   Copyright (C) 1996-2007, 2009-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 Paul Eggert and Larry McVoy.  */
+
+#ifndef HUMAN_H_
+# define HUMAN_H_ 1
+
+# include <limits.h>
+# include <stdbool.h>
+# include <stdint.h>
+# include <unistd.h>
+
+# include <xstrtol.h>
+
+/* A conservative bound on the maximum length of a human-readable string.
+   The output can be the square of the largest uintmax_t, so double
+   its size before converting to a bound.
+   log10 (2.0) < 146/485.  Add 1 for integer division truncation.
+   Also, the output can have a thousands separator between every digit,
+   so multiply by MB_LEN_MAX + 1 and then subtract MB_LEN_MAX.
+   Append 1 for a space before the suffix.
+   Finally, append 3, the maximum length of a suffix.  */
+# define LONGEST_HUMAN_READABLE \
+  ((2 * sizeof (uintmax_t) * CHAR_BIT * 146 / 485 + 1) * (MB_LEN_MAX + 1) \
+   - MB_LEN_MAX + 1 + 3)
+
+/* Options for human_readable.  */
+enum
+{
+  /* Unless otherwise specified these options may be ORed together.  */
+
+  /* The following three options are mutually exclusive.  */
+  /* Round to plus infinity (default).  */
+  human_ceiling = 0,
+  /* Round to nearest, ties to even.  */
+  human_round_to_nearest = 1,
+  /* Round to minus infinity.  */
+  human_floor = 2,
+
+  /* Group digits together, e.g. `1,000,000'.  This uses the
+     locale-defined grouping; the traditional C locale does not group,
+     so this has effect only if some other locale is in use.  */
+  human_group_digits = 4,
+
+  /* When autoscaling, suppress ".0" at end.  */
+  human_suppress_point_zero = 8,
+
+  /* Scale output and use SI-style units, ignoring the output block size.  */
+  human_autoscale = 16,
+
+  /* Prefer base 1024 to base 1000.  */
+  human_base_1024 = 32,
+
+  /* Prepend " " before unit symbol.  */
+  human_space_before_unit = 64,
+
+  /* Append SI prefix, e.g. "k" or "M".  */
+  human_SI = 128,
+
+  /* Append "B" (if base 1000) or "iB" (if base 1024) to SI prefix.  */
+  human_B = 256
+};
+
+char *human_readable (uintmax_t, char *, int, uintmax_t, uintmax_t);
+
+enum strtol_error human_options (char const *, int *, uintmax_t *);
+
+#endif /* HUMAN_H_ */
diff --git a/gnulib/lib/i-ring.c b/gnulib/lib/i-ring.c
new file mode 100644 (file)
index 0000000..b603b0b
--- /dev/null
@@ -0,0 +1,68 @@
+/* a simple ring buffer
+   Copyright (C) 2006, 2009-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 Jim Meyering */
+
+#include <config.h>
+#include "i-ring.h"
+
+#include <stdlib.h>
+
+void
+i_ring_init (I_ring *ir, int default_val)
+{
+  int i;
+  ir->ir_empty = true;
+  ir->ir_front = 0;
+  ir->ir_back = 0;
+  for (i = 0; i < I_RING_SIZE; i++)
+    ir->ir_data[i] = default_val;
+  ir->ir_default_val = default_val;
+}
+
+bool
+i_ring_empty (I_ring const *ir)
+{
+  return ir->ir_empty;
+}
+
+int
+i_ring_push (I_ring *ir, int val)
+{
+  unsigned int dest_idx = (ir->ir_front + !ir->ir_empty) % I_RING_SIZE;
+  int old_val = ir->ir_data[dest_idx];
+  ir->ir_data[dest_idx] = val;
+  ir->ir_front = dest_idx;
+  if (dest_idx == ir->ir_back)
+    ir->ir_back = (ir->ir_back + !ir->ir_empty) % I_RING_SIZE;
+  ir->ir_empty = false;
+  return old_val;
+}
+
+int
+i_ring_pop (I_ring *ir)
+{
+  int top_val;
+  if (i_ring_empty (ir))
+    abort ();
+  top_val = ir->ir_data[ir->ir_front];
+  ir->ir_data[ir->ir_front] = ir->ir_default_val;
+  if (ir->ir_front == ir->ir_back)
+    ir->ir_empty = true;
+  else
+    ir->ir_front = ((ir->ir_front + I_RING_SIZE - 1) % I_RING_SIZE);
+  return top_val;
+}
diff --git a/gnulib/lib/i-ring.h b/gnulib/lib/i-ring.h
new file mode 100644 (file)
index 0000000..f0700b6
--- /dev/null
@@ -0,0 +1,44 @@
+/* definitions for a simple ring buffer
+   Copyright (C) 2006, 2009-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/>.  */
+
+#include <stdbool.h>
+#include "verify.h"
+
+enum { I_RING_SIZE = 4 };
+verify (1 <= I_RING_SIZE);
+
+/* When ir_empty is true, the ring is empty.
+   Otherwise, ir_data[B..F] are defined, where B..F is the contiguous
+   range of indices, modulo I_RING_SIZE, from back to front, inclusive.
+   Undefined elements of ir_data are always set to ir_default_val.
+   Popping from an empty ring aborts.
+   Pushing onto a full ring returns the displaced value.
+   An empty ring has F==B and ir_empty == true.
+   A ring with one entry still has F==B, but now ir_empty == false.  */
+struct I_ring
+{
+  int ir_data[I_RING_SIZE];
+  int ir_default_val;
+  unsigned int ir_front;
+  unsigned int ir_back;
+  bool ir_empty;
+};
+typedef struct I_ring I_ring;
+
+void i_ring_init (I_ring *ir, int ir_default_val);
+int i_ring_push (I_ring *ir, int val);
+int i_ring_pop (I_ring *ir);
+bool i_ring_empty (I_ring const *ir);
diff --git a/gnulib/lib/idcache.c b/gnulib/lib/idcache.c
new file mode 100644 (file)
index 0000000..9065cc8
--- /dev/null
@@ -0,0 +1,227 @@
+/* idcache.c -- map user and group IDs, cached for speed
+
+   Copyright (C) 1985, 1988-1990, 1997-1998, 2003, 2005-2007, 2009-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/>.  */
+
+#include <config.h>
+
+#include "idcache.h"
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <pwd.h>
+#include <grp.h>
+
+#include <unistd.h>
+
+#include "xalloc.h"
+
+#ifdef __DJGPP__
+static char digits[] = "0123456789";
+#endif
+
+struct userid
+{
+  union
+    {
+      uid_t u;
+      gid_t g;
+    } id;
+  struct userid *next;
+  char name[FLEXIBLE_ARRAY_MEMBER];
+};
+
+/* FIXME: provide a function to free any malloc'd storage and reset lists,
+   so that an application can use code like this just before exiting:
+   #ifdef lint
+     idcache_clear ();
+   #endif
+*/
+
+static struct userid *user_alist;
+
+/* Each entry on list is a user name for which the first lookup failed.  */
+static struct userid *nouser_alist;
+
+/* Use the same struct as for userids.  */
+static struct userid *group_alist;
+
+/* Each entry on list is a group name for which the first lookup failed.  */
+static struct userid *nogroup_alist;
+
+/* Translate UID to a login name, with cache, or NULL if unresolved.  */
+
+char *
+getuser (uid_t uid)
+{
+  struct userid *tail;
+  struct userid *match = NULL;
+
+  for (tail = user_alist; tail; tail = tail->next)
+    {
+      if (tail->id.u == uid)
+        {
+          match = tail;
+          break;
+        }
+    }
+
+  if (match == NULL)
+    {
+      struct passwd *pwent = getpwuid (uid);
+      char const *name = pwent ? pwent->pw_name : "";
+      match = xmalloc (offsetof (struct userid, name) + strlen (name) + 1);
+      match->id.u = uid;
+      strcpy (match->name, name);
+
+      /* Add to the head of the list, so most recently used is first.  */
+      match->next = user_alist;
+      user_alist = match;
+    }
+
+  return match->name[0] ? match->name : NULL;
+}
+
+/* Translate USER to a UID, with cache.
+   Return NULL if there is no such user.
+   (We also cache which user names have no passwd entry,
+   so we don't keep looking them up.)  */
+
+uid_t *
+getuidbyname (const char *user)
+{
+  struct userid *tail;
+  struct passwd *pwent;
+
+  for (tail = user_alist; tail; tail = tail->next)
+    /* Avoid a function call for the most common case.  */
+    if (*tail->name == *user && !strcmp (tail->name, user))
+      return &tail->id.u;
+
+  for (tail = nouser_alist; tail; tail = tail->next)
+    /* Avoid a function call for the most common case.  */
+    if (*tail->name == *user && !strcmp (tail->name, user))
+      return NULL;
+
+  pwent = getpwnam (user);
+#ifdef __DJGPP__
+  /* We need to pretend to be the user USER, to make
+     pwd functions know about an arbitrary user name.  */
+  if (!pwent && strspn (user, digits) < strlen (user))
+    {
+      setenv ("USER", user, 1);
+      pwent = getpwnam (user);  /* now it will succeed */
+    }
+#endif
+
+  tail = xmalloc (offsetof (struct userid, name) + strlen (user) + 1);
+  strcpy (tail->name, user);
+
+  /* Add to the head of the list, so most recently used is first.  */
+  if (pwent)
+    {
+      tail->id.u = pwent->pw_uid;
+      tail->next = user_alist;
+      user_alist = tail;
+      return &tail->id.u;
+    }
+
+  tail->next = nouser_alist;
+  nouser_alist = tail;
+  return NULL;
+}
+
+/* Translate GID to a group name, with cache, or NULL if unresolved.  */
+
+char *
+getgroup (gid_t gid)
+{
+  struct userid *tail;
+  struct userid *match = NULL;
+
+  for (tail = group_alist; tail; tail = tail->next)
+    {
+      if (tail->id.g == gid)
+        {
+          match = tail;
+          break;
+        }
+    }
+
+  if (match == NULL)
+    {
+      struct group *grent = getgrgid (gid);
+      char const *name = grent ? grent->gr_name : "";
+      match = xmalloc (offsetof (struct userid, name) + strlen (name) + 1);
+      match->id.g = gid;
+      strcpy (match->name, name);
+
+      /* Add to the head of the list, so most recently used is first.  */
+      match->next = group_alist;
+      group_alist = match;
+    }
+
+  return match->name[0] ? match->name : NULL;
+}
+
+/* Translate GROUP to a GID, with cache.
+   Return NULL if there is no such group.
+   (We also cache which group names have no group entry,
+   so we don't keep looking them up.)  */
+
+gid_t *
+getgidbyname (const char *group)
+{
+  struct userid *tail;
+  struct group *grent;
+
+  for (tail = group_alist; tail; tail = tail->next)
+    /* Avoid a function call for the most common case.  */
+    if (*tail->name == *group && !strcmp (tail->name, group))
+      return &tail->id.g;
+
+  for (tail = nogroup_alist; tail; tail = tail->next)
+    /* Avoid a function call for the most common case.  */
+    if (*tail->name == *group && !strcmp (tail->name, group))
+      return NULL;
+
+  grent = getgrnam (group);
+#ifdef __DJGPP__
+  /* We need to pretend to belong to group GROUP, to make
+     grp functions know about an arbitrary group name.  */
+  if (!grent && strspn (group, digits) < strlen (group))
+    {
+      setenv ("GROUP", group, 1);
+      grent = getgrnam (group); /* now it will succeed */
+    }
+#endif
+
+  tail = xmalloc (offsetof (struct userid, name) + strlen (group) + 1);
+  strcpy (tail->name, group);
+
+  /* Add to the head of the list, so most recently used is first.  */
+  if (grent)
+    {
+      tail->id.g = grent->gr_gid;
+      tail->next = group_alist;
+      group_alist = tail;
+      return &tail->id.g;
+    }
+
+  tail->next = nogroup_alist;
+  nogroup_alist = tail;
+  return NULL;
+}
diff --git a/gnulib/lib/idcache.h b/gnulib/lib/idcache.h
new file mode 100644 (file)
index 0000000..e7573b8
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef IDCACHE_H
+# define IDCACHE_H 1
+
+# include <sys/types.h>
+
+extern char *getuser (uid_t uid);
+extern char *getgroup (gid_t gid);
+extern uid_t *getuidbyname (const char *user);
+extern gid_t *getgidbyname (const char *group);
+
+#endif
diff --git a/gnulib/lib/intprops.h b/gnulib/lib/intprops.h
new file mode 100644 (file)
index 0000000..58b1b3f
--- /dev/null
@@ -0,0 +1,86 @@
+/* intprops.h -- properties of integer types
+
+   Copyright (C) 2001-2005, 2009-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 Paul Eggert.  */
+
+#ifndef GL_INTPROPS_H
+# define GL_INTPROPS_H
+
+# include <limits.h>
+
+/* The extra casts in the following macros work around compiler bugs,
+   e.g., in Cray C 5.0.3.0.  */
+
+/* True if the arithmetic type T is an integer type.  bool counts as
+   an integer.  */
+# define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+
+/* True if negative values of the signed integer type T use two's
+   complement, ones' complement, or signed magnitude representation,
+   respectively.  Much GNU code assumes two's complement, but some
+   people like to be portable to all possible C hosts.  */
+# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the arithmetic type T is signed.  */
+# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* The maximum and minimum values for the integer type T.  These
+   macros have undefined behavior if T is signed and has padding bits.
+   If this is a problem for you, please let us know how to fix it for
+   your host.  */
+# define TYPE_MINIMUM(t) \
+  ((t) (! TYPE_SIGNED (t) \
+        ? (t) 0 \
+        : TYPE_SIGNED_MAGNITUDE (t) \
+        ? ~ (t) 0 \
+        : ~ TYPE_MAXIMUM (t)))
+# define TYPE_MAXIMUM(t) \
+  ((t) (! TYPE_SIGNED (t) \
+        ? (t) -1 \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+
+/* Return zero if T can be determined to be an unsigned type.
+   Otherwise, return 1.
+   When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a
+   tighter bound.  Otherwise, it overestimates the true bound by one byte
+   when applied to unsigned types of size 2, 4, 16, ... bytes.
+   The symbol signed_type_or_expr__ is private to this header file.  */
+# if __GNUC__ >= 2
+#  define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t))
+# else
+#  define signed_type_or_expr__(t) 1
+# endif
+
+/* Bound on length of the string representing an unsigned integer
+   value representable in B bits.  log10 (2.0) < 146/485.  The
+   smallest value of B where this bound is not tight is 2621.  */
+# define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
+
+/* Bound on length of the string representing an integer type or expression T.
+   Subtract 1 for the sign bit if T is signed, and then add 1 more for
+   a minus sign if needed.  */
+# define INT_STRLEN_BOUND(t) \
+  (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \
+   + signed_type_or_expr__ (t))
+
+/* Bound on buffer size needed to represent an integer type or expression T,
+   including the terminating null.  */
+# define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+
+#endif /* GL_INTPROPS_H */
diff --git a/gnulib/lib/inttypes.in.h b/gnulib/lib/inttypes.in.h
new file mode 100644 (file)
index 0000000..6a8f46d
--- /dev/null
@@ -0,0 +1,1108 @@
+/* Copyright (C) 2006-2011 Free Software Foundation, Inc.
+   Written by Paul Eggert, Bruno Haible, Derek Price.
+   This file is part of gnulib.
+
+   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/>.  */
+
+/*
+ * ISO C 99 <inttypes.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
+ */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* Include the original <inttypes.h> if it exists, and if this file
+   has not been included yet or if this file includes gnulib stdint.h
+   which in turn includes this file.
+   The include_next requires a split double-inclusion guard.  */
+#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+# if @HAVE_INTTYPES_H@
+#  @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
+# endif
+#endif
+
+#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+#define INTTYPES_H
+
+/* Include <stdint.h> or the gnulib replacement.
+   But avoid namespace pollution on glibc systems.  */
+#ifndef __GLIBC__
+# include <stdint.h>
+#endif
+/* Get CHAR_BIT.  */
+#include <limits.h>
+
+#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
+# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
+#endif
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* 7.8.1 Macros for format specifiers */
+
+#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
+
+# if defined _TNS_R_TARGET
+   /* Tandem NonStop R series and compatible platforms released before
+      July 2005 support %Ld but not %lld.  */
+#  define _LONG_LONG_FORMAT_PREFIX "L"
+# else
+#  define _LONG_LONG_FORMAT_PREFIX "ll"
+# endif
+
+# if !defined PRId8 || @PRI_MACROS_BROKEN@
+#  undef PRId8
+#  ifdef INT8_MAX
+#   define PRId8 "d"
+#  endif
+# endif
+# if !defined PRIi8 || @PRI_MACROS_BROKEN@
+#  undef PRIi8
+#  ifdef INT8_MAX
+#   define PRIi8 "i"
+#  endif
+# endif
+# if !defined PRIo8 || @PRI_MACROS_BROKEN@
+#  undef PRIo8
+#  ifdef UINT8_MAX
+#   define PRIo8 "o"
+#  endif
+# endif
+# if !defined PRIu8 || @PRI_MACROS_BROKEN@
+#  undef PRIu8
+#  ifdef UINT8_MAX
+#   define PRIu8 "u"
+#  endif
+# endif
+# if !defined PRIx8 || @PRI_MACROS_BROKEN@
+#  undef PRIx8
+#  ifdef UINT8_MAX
+#   define PRIx8 "x"
+#  endif
+# endif
+# if !defined PRIX8 || @PRI_MACROS_BROKEN@
+#  undef PRIX8
+#  ifdef UINT8_MAX
+#   define PRIX8 "X"
+#  endif
+# endif
+# if !defined PRId16 || @PRI_MACROS_BROKEN@
+#  undef PRId16
+#  ifdef INT16_MAX
+#   define PRId16 "d"
+#  endif
+# endif
+# if !defined PRIi16 || @PRI_MACROS_BROKEN@
+#  undef PRIi16
+#  ifdef INT16_MAX
+#   define PRIi16 "i"
+#  endif
+# endif
+# if !defined PRIo16 || @PRI_MACROS_BROKEN@
+#  undef PRIo16
+#  ifdef UINT16_MAX
+#   define PRIo16 "o"
+#  endif
+# endif
+# if !defined PRIu16 || @PRI_MACROS_BROKEN@
+#  undef PRIu16
+#  ifdef UINT16_MAX
+#   define PRIu16 "u"
+#  endif
+# endif
+# if !defined PRIx16 || @PRI_MACROS_BROKEN@
+#  undef PRIx16
+#  ifdef UINT16_MAX
+#   define PRIx16 "x"
+#  endif
+# endif
+# if !defined PRIX16 || @PRI_MACROS_BROKEN@
+#  undef PRIX16
+#  ifdef UINT16_MAX
+#   define PRIX16 "X"
+#  endif
+# endif
+# if !defined PRId32 || @PRI_MACROS_BROKEN@
+#  undef PRId32
+#  ifdef INT32_MAX
+#   define PRId32 "d"
+#  endif
+# endif
+# if !defined PRIi32 || @PRI_MACROS_BROKEN@
+#  undef PRIi32
+#  ifdef INT32_MAX
+#   define PRIi32 "i"
+#  endif
+# endif
+# if !defined PRIo32 || @PRI_MACROS_BROKEN@
+#  undef PRIo32
+#  ifdef UINT32_MAX
+#   define PRIo32 "o"
+#  endif
+# endif
+# if !defined PRIu32 || @PRI_MACROS_BROKEN@
+#  undef PRIu32
+#  ifdef UINT32_MAX
+#   define PRIu32 "u"
+#  endif
+# endif
+# if !defined PRIx32 || @PRI_MACROS_BROKEN@
+#  undef PRIx32
+#  ifdef UINT32_MAX
+#   define PRIx32 "x"
+#  endif
+# endif
+# if !defined PRIX32 || @PRI_MACROS_BROKEN@
+#  undef PRIX32
+#  ifdef UINT32_MAX
+#   define PRIX32 "X"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+#   define _PRI64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _PRI64_PREFIX "I64"
+#  elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#   define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined PRId64 || @PRI_MACROS_BROKEN@
+#   undef PRId64
+#   define PRId64 _PRI64_PREFIX "d"
+#  endif
+#  if !defined PRIi64 || @PRI_MACROS_BROKEN@
+#   undef PRIi64
+#   define PRIi64 _PRI64_PREFIX "i"
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+#   define _PRIu64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _PRIu64_PREFIX "I64"
+#  elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#   define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined PRIo64 || @PRI_MACROS_BROKEN@
+#   undef PRIo64
+#   define PRIo64 _PRIu64_PREFIX "o"
+#  endif
+#  if !defined PRIu64 || @PRI_MACROS_BROKEN@
+#   undef PRIu64
+#   define PRIu64 _PRIu64_PREFIX "u"
+#  endif
+#  if !defined PRIx64 || @PRI_MACROS_BROKEN@
+#   undef PRIx64
+#   define PRIx64 _PRIu64_PREFIX "x"
+#  endif
+#  if !defined PRIX64 || @PRI_MACROS_BROKEN@
+#   undef PRIX64
+#   define PRIX64 _PRIu64_PREFIX "X"
+#  endif
+# endif
+
+# if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIdLEAST8
+#  define PRIdLEAST8 "d"
+# endif
+# if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIiLEAST8
+#  define PRIiLEAST8 "i"
+# endif
+# if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIoLEAST8
+#  define PRIoLEAST8 "o"
+# endif
+# if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIuLEAST8
+#  define PRIuLEAST8 "u"
+# endif
+# if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIxLEAST8
+#  define PRIxLEAST8 "x"
+# endif
+# if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIXLEAST8
+#  define PRIXLEAST8 "X"
+# endif
+# if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIdLEAST16
+#  define PRIdLEAST16 "d"
+# endif
+# if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIiLEAST16
+#  define PRIiLEAST16 "i"
+# endif
+# if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIoLEAST16
+#  define PRIoLEAST16 "o"
+# endif
+# if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIuLEAST16
+#  define PRIuLEAST16 "u"
+# endif
+# if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIxLEAST16
+#  define PRIxLEAST16 "x"
+# endif
+# if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIXLEAST16
+#  define PRIXLEAST16 "X"
+# endif
+# if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIdLEAST32
+#  define PRIdLEAST32 "d"
+# endif
+# if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIiLEAST32
+#  define PRIiLEAST32 "i"
+# endif
+# if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIoLEAST32
+#  define PRIoLEAST32 "o"
+# endif
+# if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIuLEAST32
+#  define PRIuLEAST32 "u"
+# endif
+# if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIxLEAST32
+#  define PRIxLEAST32 "x"
+# endif
+# if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIXLEAST32
+#  define PRIXLEAST32 "X"
+# endif
+# ifdef INT64_MAX
+#  if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIdLEAST64
+#   define PRIdLEAST64 PRId64
+#  endif
+#  if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIiLEAST64
+#   define PRIiLEAST64 PRIi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIoLEAST64
+#   define PRIoLEAST64 PRIo64
+#  endif
+#  if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIuLEAST64
+#   define PRIuLEAST64 PRIu64
+#  endif
+#  if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIxLEAST64
+#   define PRIxLEAST64 PRIx64
+#  endif
+#  if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIXLEAST64
+#   define PRIXLEAST64 PRIX64
+#  endif
+# endif
+
+# if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIdFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define PRIdFAST8 PRId64
+#  else
+#   define PRIdFAST8 "d"
+#  endif
+# endif
+# if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIiFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define PRIiFAST8 PRIi64
+#  else
+#   define PRIiFAST8 "i"
+#  endif
+# endif
+# if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIoFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIoFAST8 PRIo64
+#  else
+#   define PRIoFAST8 "o"
+#  endif
+# endif
+# if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIuFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIuFAST8 PRIu64
+#  else
+#   define PRIuFAST8 "u"
+#  endif
+# endif
+# if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIxFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIxFAST8 PRIx64
+#  else
+#   define PRIxFAST8 "x"
+#  endif
+# endif
+# if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIXFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIXFAST8 PRIX64
+#  else
+#   define PRIXFAST8 "X"
+#  endif
+# endif
+# if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIdFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define PRIdFAST16 PRId64
+#  else
+#   define PRIdFAST16 "d"
+#  endif
+# endif
+# if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIiFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define PRIiFAST16 PRIi64
+#  else
+#   define PRIiFAST16 "i"
+#  endif
+# endif
+# if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIoFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIoFAST16 PRIo64
+#  else
+#   define PRIoFAST16 "o"
+#  endif
+# endif
+# if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIuFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIuFAST16 PRIu64
+#  else
+#   define PRIuFAST16 "u"
+#  endif
+# endif
+# if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIxFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIxFAST16 PRIx64
+#  else
+#   define PRIxFAST16 "x"
+#  endif
+# endif
+# if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIXFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIXFAST16 PRIX64
+#  else
+#   define PRIXFAST16 "X"
+#  endif
+# endif
+# if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIdFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define PRIdFAST32 PRId64
+#  else
+#   define PRIdFAST32 "d"
+#  endif
+# endif
+# if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIiFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define PRIiFAST32 PRIi64
+#  else
+#   define PRIiFAST32 "i"
+#  endif
+# endif
+# if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIoFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIoFAST32 PRIo64
+#  else
+#   define PRIoFAST32 "o"
+#  endif
+# endif
+# if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIuFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIuFAST32 PRIu64
+#  else
+#   define PRIuFAST32 "u"
+#  endif
+# endif
+# if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIxFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIxFAST32 PRIx64
+#  else
+#   define PRIxFAST32 "x"
+#  endif
+# endif
+# if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIXFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIXFAST32 PRIX64
+#  else
+#   define PRIXFAST32 "X"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIdFAST64
+#   define PRIdFAST64 PRId64
+#  endif
+#  if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIiFAST64
+#   define PRIiFAST64 PRIi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIoFAST64
+#   define PRIoFAST64 PRIo64
+#  endif
+#  if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIuFAST64
+#   define PRIuFAST64 PRIu64
+#  endif
+#  if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIxFAST64
+#   define PRIxFAST64 PRIx64
+#  endif
+#  if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIXFAST64
+#   define PRIXFAST64 PRIX64
+#  endif
+# endif
+
+# if !defined PRIdMAX || @PRI_MACROS_BROKEN@
+#  undef PRIdMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define PRIdMAX PRId64
+#  else
+#   define PRIdMAX "ld"
+#  endif
+# endif
+# if !defined PRIiMAX || @PRI_MACROS_BROKEN@
+#  undef PRIiMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define PRIiMAX PRIi64
+#  else
+#   define PRIiMAX "li"
+#  endif
+# endif
+# if !defined PRIoMAX || @PRI_MACROS_BROKEN@
+#  undef PRIoMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIoMAX PRIo64
+#  else
+#   define PRIoMAX "lo"
+#  endif
+# endif
+# if !defined PRIuMAX || @PRI_MACROS_BROKEN@
+#  undef PRIuMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIuMAX PRIu64
+#  else
+#   define PRIuMAX "lu"
+#  endif
+# endif
+# if !defined PRIxMAX || @PRI_MACROS_BROKEN@
+#  undef PRIxMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIxMAX PRIx64
+#  else
+#   define PRIxMAX "lx"
+#  endif
+# endif
+# if !defined PRIXMAX || @PRI_MACROS_BROKEN@
+#  undef PRIXMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIXMAX PRIX64
+#  else
+#   define PRIXMAX "lX"
+#  endif
+# endif
+
+# if !defined PRIdPTR || @PRI_MACROS_BROKEN@
+#  undef PRIdPTR
+#  ifdef INTPTR_MAX
+#   define PRIdPTR @PRIPTR_PREFIX@ "d"
+#  endif
+# endif
+# if !defined PRIiPTR || @PRI_MACROS_BROKEN@
+#  undef PRIiPTR
+#  ifdef INTPTR_MAX
+#   define PRIiPTR @PRIPTR_PREFIX@ "i"
+#  endif
+# endif
+# if !defined PRIoPTR || @PRI_MACROS_BROKEN@
+#  undef PRIoPTR
+#  ifdef UINTPTR_MAX
+#   define PRIoPTR @PRIPTR_PREFIX@ "o"
+#  endif
+# endif
+# if !defined PRIuPTR || @PRI_MACROS_BROKEN@
+#  undef PRIuPTR
+#  ifdef UINTPTR_MAX
+#   define PRIuPTR @PRIPTR_PREFIX@ "u"
+#  endif
+# endif
+# if !defined PRIxPTR || @PRI_MACROS_BROKEN@
+#  undef PRIxPTR
+#  ifdef UINTPTR_MAX
+#   define PRIxPTR @PRIPTR_PREFIX@ "x"
+#  endif
+# endif
+# if !defined PRIXPTR || @PRI_MACROS_BROKEN@
+#  undef PRIXPTR
+#  ifdef UINTPTR_MAX
+#   define PRIXPTR @PRIPTR_PREFIX@ "X"
+#  endif
+# endif
+
+# if !defined SCNd8 || @PRI_MACROS_BROKEN@
+#  undef SCNd8
+#  ifdef INT8_MAX
+#   define SCNd8 "hhd"
+#  endif
+# endif
+# if !defined SCNi8 || @PRI_MACROS_BROKEN@
+#  undef SCNi8
+#  ifdef INT8_MAX
+#   define SCNi8 "hhi"
+#  endif
+# endif
+# if !defined SCNo8 || @PRI_MACROS_BROKEN@
+#  undef SCNo8
+#  ifdef UINT8_MAX
+#   define SCNo8 "hho"
+#  endif
+# endif
+# if !defined SCNu8 || @PRI_MACROS_BROKEN@
+#  undef SCNu8
+#  ifdef UINT8_MAX
+#   define SCNu8 "hhu"
+#  endif
+# endif
+# if !defined SCNx8 || @PRI_MACROS_BROKEN@
+#  undef SCNx8
+#  ifdef UINT8_MAX
+#   define SCNx8 "hhx"
+#  endif
+# endif
+# if !defined SCNd16 || @PRI_MACROS_BROKEN@
+#  undef SCNd16
+#  ifdef INT16_MAX
+#   define SCNd16 "hd"
+#  endif
+# endif
+# if !defined SCNi16 || @PRI_MACROS_BROKEN@
+#  undef SCNi16
+#  ifdef INT16_MAX
+#   define SCNi16 "hi"
+#  endif
+# endif
+# if !defined SCNo16 || @PRI_MACROS_BROKEN@
+#  undef SCNo16
+#  ifdef UINT16_MAX
+#   define SCNo16 "ho"
+#  endif
+# endif
+# if !defined SCNu16 || @PRI_MACROS_BROKEN@
+#  undef SCNu16
+#  ifdef UINT16_MAX
+#   define SCNu16 "hu"
+#  endif
+# endif
+# if !defined SCNx16 || @PRI_MACROS_BROKEN@
+#  undef SCNx16
+#  ifdef UINT16_MAX
+#   define SCNx16 "hx"
+#  endif
+# endif
+# if !defined SCNd32 || @PRI_MACROS_BROKEN@
+#  undef SCNd32
+#  ifdef INT32_MAX
+#   define SCNd32 "d"
+#  endif
+# endif
+# if !defined SCNi32 || @PRI_MACROS_BROKEN@
+#  undef SCNi32
+#  ifdef INT32_MAX
+#   define SCNi32 "i"
+#  endif
+# endif
+# if !defined SCNo32 || @PRI_MACROS_BROKEN@
+#  undef SCNo32
+#  ifdef UINT32_MAX
+#   define SCNo32 "o"
+#  endif
+# endif
+# if !defined SCNu32 || @PRI_MACROS_BROKEN@
+#  undef SCNu32
+#  ifdef UINT32_MAX
+#   define SCNu32 "u"
+#  endif
+# endif
+# if !defined SCNx32 || @PRI_MACROS_BROKEN@
+#  undef SCNx32
+#  ifdef UINT32_MAX
+#   define SCNx32 "x"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+#   define _SCN64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _SCN64_PREFIX "I64"
+#  elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#   define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined SCNd64 || @PRI_MACROS_BROKEN@
+#   undef SCNd64
+#   define SCNd64 _SCN64_PREFIX "d"
+#  endif
+#  if !defined SCNi64 || @PRI_MACROS_BROKEN@
+#   undef SCNi64
+#   define SCNi64 _SCN64_PREFIX "i"
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+#   define _SCNu64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _SCNu64_PREFIX "I64"
+#  elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#   define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined SCNo64 || @PRI_MACROS_BROKEN@
+#   undef SCNo64
+#   define SCNo64 _SCNu64_PREFIX "o"
+#  endif
+#  if !defined SCNu64 || @PRI_MACROS_BROKEN@
+#   undef SCNu64
+#   define SCNu64 _SCNu64_PREFIX "u"
+#  endif
+#  if !defined SCNx64 || @PRI_MACROS_BROKEN@
+#   undef SCNx64
+#   define SCNx64 _SCNu64_PREFIX "x"
+#  endif
+# endif
+
+# if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNdLEAST8
+#  define SCNdLEAST8 "hhd"
+# endif
+# if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNiLEAST8
+#  define SCNiLEAST8 "hhi"
+# endif
+# if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNoLEAST8
+#  define SCNoLEAST8 "hho"
+# endif
+# if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNuLEAST8
+#  define SCNuLEAST8 "hhu"
+# endif
+# if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNxLEAST8
+#  define SCNxLEAST8 "hhx"
+# endif
+# if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNdLEAST16
+#  define SCNdLEAST16 "hd"
+# endif
+# if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNiLEAST16
+#  define SCNiLEAST16 "hi"
+# endif
+# if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNoLEAST16
+#  define SCNoLEAST16 "ho"
+# endif
+# if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNuLEAST16
+#  define SCNuLEAST16 "hu"
+# endif
+# if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNxLEAST16
+#  define SCNxLEAST16 "hx"
+# endif
+# if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNdLEAST32
+#  define SCNdLEAST32 "d"
+# endif
+# if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNiLEAST32
+#  define SCNiLEAST32 "i"
+# endif
+# if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNoLEAST32
+#  define SCNoLEAST32 "o"
+# endif
+# if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNuLEAST32
+#  define SCNuLEAST32 "u"
+# endif
+# if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNxLEAST32
+#  define SCNxLEAST32 "x"
+# endif
+# ifdef INT64_MAX
+#  if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNdLEAST64
+#   define SCNdLEAST64 SCNd64
+#  endif
+#  if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNiLEAST64
+#   define SCNiLEAST64 SCNi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNoLEAST64
+#   define SCNoLEAST64 SCNo64
+#  endif
+#  if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNuLEAST64
+#   define SCNuLEAST64 SCNu64
+#  endif
+#  if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNxLEAST64
+#   define SCNxLEAST64 SCNx64
+#  endif
+# endif
+
+# if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNdFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define SCNdFAST8 SCNd64
+#  elif INT_FAST8_MAX == 0x7fff
+#   define SCNdFAST8 "hd"
+#  elif INT_FAST8_MAX == 0x7f
+#   define SCNdFAST8 "hhd"
+#  else
+#   define SCNdFAST8 "d"
+#  endif
+# endif
+# if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNiFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define SCNiFAST8 SCNi64
+#  elif INT_FAST8_MAX == 0x7fff
+#   define SCNiFAST8 "hi"
+#  elif INT_FAST8_MAX == 0x7f
+#   define SCNiFAST8 "hhi"
+#  else
+#   define SCNiFAST8 "i"
+#  endif
+# endif
+# if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNoFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define SCNoFAST8 SCNo64
+#  elif UINT_FAST8_MAX == 0xffff
+#   define SCNoFAST8 "ho"
+#  elif UINT_FAST8_MAX == 0xff
+#   define SCNoFAST8 "hho"
+#  else
+#   define SCNoFAST8 "o"
+#  endif
+# endif
+# if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNuFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define SCNuFAST8 SCNu64
+#  elif UINT_FAST8_MAX == 0xffff
+#   define SCNuFAST8 "hu"
+#  elif UINT_FAST8_MAX == 0xff
+#   define SCNuFAST8 "hhu"
+#  else
+#   define SCNuFAST8 "u"
+#  endif
+# endif
+# if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNxFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define SCNxFAST8 SCNx64
+#  elif UINT_FAST8_MAX == 0xffff
+#   define SCNxFAST8 "hx"
+#  elif UINT_FAST8_MAX == 0xff
+#   define SCNxFAST8 "hhx"
+#  else
+#   define SCNxFAST8 "x"
+#  endif
+# endif
+# if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNdFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define SCNdFAST16 SCNd64
+#  elif INT_FAST16_MAX == 0x7fff
+#   define SCNdFAST16 "hd"
+#  else
+#   define SCNdFAST16 "d"
+#  endif
+# endif
+# if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNiFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define SCNiFAST16 SCNi64
+#  elif INT_FAST16_MAX == 0x7fff
+#   define SCNiFAST16 "hi"
+#  else
+#   define SCNiFAST16 "i"
+#  endif
+# endif
+# if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNoFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define SCNoFAST16 SCNo64
+#  elif UINT_FAST16_MAX == 0xffff
+#   define SCNoFAST16 "ho"
+#  else
+#   define SCNoFAST16 "o"
+#  endif
+# endif
+# if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNuFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define SCNuFAST16 SCNu64
+#  elif UINT_FAST16_MAX == 0xffff
+#   define SCNuFAST16 "hu"
+#  else
+#   define SCNuFAST16 "u"
+#  endif
+# endif
+# if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNxFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define SCNxFAST16 SCNx64
+#  elif UINT_FAST16_MAX == 0xffff
+#   define SCNxFAST16 "hx"
+#  else
+#   define SCNxFAST16 "x"
+#  endif
+# endif
+# if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNdFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define SCNdFAST32 SCNd64
+#  else
+#   define SCNdFAST32 "d"
+#  endif
+# endif
+# if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNiFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define SCNiFAST32 SCNi64
+#  else
+#   define SCNiFAST32 "i"
+#  endif
+# endif
+# if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNoFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define SCNoFAST32 SCNo64
+#  else
+#   define SCNoFAST32 "o"
+#  endif
+# endif
+# if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNuFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define SCNuFAST32 SCNu64
+#  else
+#   define SCNuFAST32 "u"
+#  endif
+# endif
+# if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNxFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define SCNxFAST32 SCNx64
+#  else
+#   define SCNxFAST32 "x"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNdFAST64
+#   define SCNdFAST64 SCNd64
+#  endif
+#  if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNiFAST64
+#   define SCNiFAST64 SCNi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNoFAST64
+#   define SCNoFAST64 SCNo64
+#  endif
+#  if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNuFAST64
+#   define SCNuFAST64 SCNu64
+#  endif
+#  if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNxFAST64
+#   define SCNxFAST64 SCNx64
+#  endif
+# endif
+
+# if !defined SCNdMAX || @PRI_MACROS_BROKEN@
+#  undef SCNdMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define SCNdMAX SCNd64
+#  else
+#   define SCNdMAX "ld"
+#  endif
+# endif
+# if !defined SCNiMAX || @PRI_MACROS_BROKEN@
+#  undef SCNiMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define SCNiMAX SCNi64
+#  else
+#   define SCNiMAX "li"
+#  endif
+# endif
+# if !defined SCNoMAX || @PRI_MACROS_BROKEN@
+#  undef SCNoMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define SCNoMAX SCNo64
+#  else
+#   define SCNoMAX "lo"
+#  endif
+# endif
+# if !defined SCNuMAX || @PRI_MACROS_BROKEN@
+#  undef SCNuMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define SCNuMAX SCNu64
+#  else
+#   define SCNuMAX "lu"
+#  endif
+# endif
+# if !defined SCNxMAX || @PRI_MACROS_BROKEN@
+#  undef SCNxMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define SCNxMAX SCNx64
+#  else
+#   define SCNxMAX "lx"
+#  endif
+# endif
+
+# if !defined SCNdPTR || @PRI_MACROS_BROKEN@
+#  undef SCNdPTR
+#  ifdef INTPTR_MAX
+#   define SCNdPTR @PRIPTR_PREFIX@ "d"
+#  endif
+# endif
+# if !defined SCNiPTR || @PRI_MACROS_BROKEN@
+#  undef SCNiPTR
+#  ifdef INTPTR_MAX
+#   define SCNiPTR @PRIPTR_PREFIX@ "i"
+#  endif
+# endif
+# if !defined SCNoPTR || @PRI_MACROS_BROKEN@
+#  undef SCNoPTR
+#  ifdef UINTPTR_MAX
+#   define SCNoPTR @PRIPTR_PREFIX@ "o"
+#  endif
+# endif
+# if !defined SCNuPTR || @PRI_MACROS_BROKEN@
+#  undef SCNuPTR
+#  ifdef UINTPTR_MAX
+#   define SCNuPTR @PRIPTR_PREFIX@ "u"
+#  endif
+# endif
+# if !defined SCNxPTR || @PRI_MACROS_BROKEN@
+#  undef SCNxPTR
+#  ifdef UINTPTR_MAX
+#   define SCNxPTR @PRIPTR_PREFIX@ "x"
+#  endif
+# endif
+
+#endif
+
+/* 7.8.2 Functions for greatest-width integer types */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if @GNULIB_IMAXABS@
+# if !@HAVE_DECL_IMAXABS@
+extern intmax_t imaxabs (intmax_t);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef imaxabs
+# if HAVE_RAW_DECL_IMAXABS
+_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
+                 "use gnulib module imaxabs for portability");
+# endif
+#endif
+
+#if @GNULIB_IMAXDIV@
+# if !@HAVE_DECL_IMAXDIV@
+#  if !GNULIB_defined_imaxdiv_t
+typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
+#   define GNULIB_defined_imaxdiv_t 1
+#  endif
+extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef imaxdiv
+# if HAVE_RAW_DECL_IMAXDIV
+_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
+                 "use gnulib module imaxdiv for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOIMAX@
+# if !@HAVE_DECL_STRTOIMAX@
+extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoimax
+# if HAVE_RAW_DECL_STRTOIMAX
+_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
+                 "use gnulib module strtoimax for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOUMAX@
+# if !@HAVE_DECL_STRTOUMAX@
+extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoumax
+# if HAVE_RAW_DECL_STRTOUMAX
+_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
+                 "use gnulib module strtoumax for portability");
+# endif
+#endif
+
+/* Don't bother defining or declaring wcstoimax and wcstoumax, since
+   wide-character functions like this are hardly ever useful.  */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */
diff --git a/gnulib/lib/isblank.c b/gnulib/lib/isblank.c
new file mode 100644 (file)
index 0000000..65cc54f
--- /dev/null
@@ -0,0 +1,33 @@
+/* Test whether a character is a blank.
+
+   Copyright (C) 2009-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <ctype.h>
+
+int
+isblank (int c)
+{
+  /* On all known platforms, in all predefined locales, isblank(c) is likely
+     equivalent with  (c == ' ' || c == '\t').  Look at the glibc definition
+     (in glibc/localedata/locales/i18n): The "blank" characters are '\t', ' ',
+     U+1680, U+180E, U+2000..U+2006, U+2008..U+200A, U+205F, U+3000, and none
+     except the first two is present in a common 8-bit encoding.  Therefore
+     the substitute for other platforms is not more complicated than this.  */
+  return (c == ' ' || c == '\t');
+}
diff --git a/gnulib/lib/iswblank.c b/gnulib/lib/iswblank.c
new file mode 100644 (file)
index 0000000..a476377
--- /dev/null
@@ -0,0 +1,27 @@
+/* Test wide character for being blank.
+   Copyright (C) 2008-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wctype.h>
+
+int
+iswblank (wint_t wc)
+{
+  return wc == ' ' || wc == '\t';
+}
diff --git a/gnulib/lib/langinfo.in.h b/gnulib/lib/langinfo.in.h
new file mode 100644 (file)
index 0000000..02e1f26
--- /dev/null
@@ -0,0 +1,177 @@
+/* Substitute for and wrapper around <langinfo.h>.
+   Copyright (C) 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/*
+ * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
+ * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
+ */
+
+#ifndef _GL_LANGINFO_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_LANGINFO_H@
+# @INCLUDE_NEXT@ @NEXT_LANGINFO_H@
+#endif
+
+#ifndef _GL_LANGINFO_H
+#define _GL_LANGINFO_H
+
+
+#if !@HAVE_LANGINFO_H@
+
+/* A platform that lacks <langinfo.h>.  */
+
+/* Assume that it also lacks <nl_types.h> and the nl_item type.  */
+# if !GNULIB_defined_nl_item
+typedef int nl_item;
+#  define GNULIB_defined_nl_item 1
+# endif
+
+/* nl_langinfo items of the LC_CTYPE category */
+# define CODESET     10000
+/* nl_langinfo items of the LC_NUMERIC category */
+# define RADIXCHAR   10001
+# define THOUSEP     10002
+/* nl_langinfo items of the LC_TIME category */
+# define D_T_FMT     10003
+# define D_FMT       10004
+# define T_FMT       10005
+# define T_FMT_AMPM  10006
+# define AM_STR      10007
+# define PM_STR      10008
+# define DAY_1       10009
+# define DAY_2       (DAY_1 + 1)
+# define DAY_3       (DAY_1 + 2)
+# define DAY_4       (DAY_1 + 3)
+# define DAY_5       (DAY_1 + 4)
+# define DAY_6       (DAY_1 + 5)
+# define DAY_7       (DAY_1 + 6)
+# define ABDAY_1     10016
+# define ABDAY_2     (ABDAY_1 + 1)
+# define ABDAY_3     (ABDAY_1 + 2)
+# define ABDAY_4     (ABDAY_1 + 3)
+# define ABDAY_5     (ABDAY_1 + 4)
+# define ABDAY_6     (ABDAY_1 + 5)
+# define ABDAY_7     (ABDAY_1 + 6)
+# define MON_1       10023
+# define MON_2       (MON_1 + 1)
+# define MON_3       (MON_1 + 2)
+# define MON_4       (MON_1 + 3)
+# define MON_5       (MON_1 + 4)
+# define MON_6       (MON_1 + 5)
+# define MON_7       (MON_1 + 6)
+# define MON_8       (MON_1 + 7)
+# define MON_9       (MON_1 + 8)
+# define MON_10      (MON_1 + 9)
+# define MON_11      (MON_1 + 10)
+# define MON_12      (MON_1 + 11)
+# define ABMON_1     10035
+# define ABMON_2     (ABMON_1 + 1)
+# define ABMON_3     (ABMON_1 + 2)
+# define ABMON_4     (ABMON_1 + 3)
+# define ABMON_5     (ABMON_1 + 4)
+# define ABMON_6     (ABMON_1 + 5)
+# define ABMON_7     (ABMON_1 + 6)
+# define ABMON_8     (ABMON_1 + 7)
+# define ABMON_9     (ABMON_1 + 8)
+# define ABMON_10    (ABMON_1 + 9)
+# define ABMON_11    (ABMON_1 + 10)
+# define ABMON_12    (ABMON_1 + 11)
+# define ERA         10047
+# define ERA_D_FMT   10048
+# define ERA_D_T_FMT 10049
+# define ERA_T_FMT   10050
+# define ALT_DIGITS  10051
+/* nl_langinfo items of the LC_MONETARY category */
+# define CRNCYSTR    10052
+/* nl_langinfo items of the LC_MESSAGES category */
+# define YESEXPR     10053
+# define NOEXPR      10054
+
+#else
+
+/* A platform that has <langinfo.h>.  */
+
+# if !@HAVE_LANGINFO_CODESET@
+#  define CODESET     10000
+#  define GNULIB_defined_CODESET 1
+# endif
+
+# if !@HAVE_LANGINFO_T_FMT_AMPM@
+#  define T_FMT_AMPM  10006
+#  define GNULIB_defined_T_FMT_AMPM 1
+# endif
+
+# if !@HAVE_LANGINFO_ERA@
+#  define ERA         10047
+#  define ERA_D_FMT   10048
+#  define ERA_D_T_FMT 10049
+#  define ERA_T_FMT   10050
+#  define ALT_DIGITS  10051
+#  define GNULIB_defined_ERA 1
+# endif
+
+# if !@HAVE_LANGINFO_YESEXPR@
+#  define YESEXPR     10053
+#  define NOEXPR      10054
+#  define GNULIB_defined_YESEXPR 1
+# endif
+
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* Declare overridden functions.  */
+
+
+/* Return a piece of locale dependent information.
+   Note: The difference between nl_langinfo (CODESET) and locale_charset ()
+   is that the latter normalizes the encoding names to GNU conventions.  */
+
+#if @GNULIB_NL_LANGINFO@
+# if @REPLACE_NL_LANGINFO@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef nl_langinfo
+#   define nl_langinfo rpl_nl_langinfo
+#  endif
+_GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item));
+_GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item));
+# else
+#  if !@HAVE_NL_LANGINFO@
+_GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item));
+#  endif
+_GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item));
+# endif
+_GL_CXXALIASWARN (nl_langinfo);
+#elif defined GNULIB_POSIXCHECK
+# undef nl_langinfo
+# if HAVE_RAW_DECL_NL_LANGINFO
+_GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
+                 "use gnulib module nl_langinfo for portability");
+# endif
+#endif
+
+
+#endif /* _GL_LANGINFO_H */
+#endif /* _GL_LANGINFO_H */
diff --git a/gnulib/lib/lchown.c b/gnulib/lib/lchown.c
new file mode 100644 (file)
index 0000000..406b9c1
--- /dev/null
@@ -0,0 +1,117 @@
+/* Provide a stub lchown function for systems that lack it.
+
+   Copyright (C) 1998-1999, 2002, 2004, 2006-2007, 2009-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 Jim Meyering */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <errno.h>
+#include <stdbool.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#if !HAVE_LCHOWN
+
+/* If the system chown does not follow symlinks, we don't want it
+   replaced by gnulib's chown, which does follow symlinks.  */
+# if CHOWN_MODIFIES_SYMLINK
+#  undef chown
+# endif
+
+/* Work just like chown, except when FILE is a symbolic link.
+   In that case, set errno to EOPNOTSUPP and return -1.
+   But if autoconf tests determined that chown modifies
+   symlinks, then just call chown.  */
+
+int
+lchown (const char *file, uid_t uid, gid_t gid)
+{
+# if HAVE_CHOWN
+#  if ! CHOWN_MODIFIES_SYMLINK
+  struct stat stats;
+
+  if (lstat (file, &stats) == 0 && S_ISLNK (stats.st_mode))
+    {
+      errno = EOPNOTSUPP;
+      return -1;
+    }
+#  endif
+
+  return chown (file, uid, gid);
+
+# else /* !HAVE_CHOWN */
+  errno = ENOSYS;
+  return -1;
+# endif
+}
+
+#else /* HAVE_LCHOWN */
+
+# undef lchown
+
+/* Work around trailing slash bugs in lchown.  */
+int
+rpl_lchown (const char *file, uid_t uid, gid_t gid)
+{
+  bool stat_valid = false;
+  int result;
+
+# if CHOWN_CHANGE_TIME_BUG
+  struct stat st;
+
+  if (gid != (gid_t) -1 || uid != (uid_t) -1)
+    {
+      if (lstat (file, &st))
+        return -1;
+      stat_valid = true;
+      if (!S_ISLNK (st.st_mode))
+        return chown (file, uid, gid);
+    }
+# endif
+
+# if CHOWN_TRAILING_SLASH_BUG
+  if (!stat_valid)
+    {
+      size_t len = strlen (file);
+      if (len && file[len - 1] == '/')
+        return chown (file, uid, gid);
+    }
+# endif
+
+  result = lchown (file, uid, gid);
+
+# if CHOWN_CHANGE_TIME_BUG && HAVE_LCHMOD
+  if (result == 0 && stat_valid
+      && (uid == st.st_uid || uid == (uid_t) -1)
+      && (gid == st.st_gid || gid == (gid_t) -1))
+    {
+      /* No change in ownership, but at least one argument was not -1,
+         so we are required to update ctime.  Since lchown succeeded,
+         we assume that lchmod will do likewise.  But if the system
+         lacks lchmod and lutimes, we are out of luck.  Oh well.  */
+      result = lchmod (file, st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO
+                                           | S_ISUID | S_ISGID | S_ISVTX));
+    }
+# endif
+
+  return result;
+}
+
+#endif /* HAVE_LCHOWN */
diff --git a/gnulib/lib/localcharset.c b/gnulib/lib/localcharset.c
new file mode 100644 (file)
index 0000000..96739c7
--- /dev/null
@@ -0,0 +1,547 @@
+/* Determine a canonical name for the current locale's character encoding.
+
+   Copyright (C) 2000-2006, 2008-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "localcharset.h"
+
+#include <fcntl.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET
+# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# define WIN32_NATIVE
+#endif
+
+#if defined __EMX__
+/* Assume EMX program runs on OS/2, even if compiled under DOS.  */
+# ifndef OS2
+#  define OS2
+# endif
+#endif
+
+#if !defined WIN32_NATIVE
+# include <unistd.h>
+# if HAVE_LANGINFO_CODESET
+#  include <langinfo.h>
+# else
+#  if 0 /* see comment below */
+#   include <locale.h>
+#  endif
+# endif
+# ifdef __CYGWIN__
+#  define WIN32_LEAN_AND_MEAN
+#  include <windows.h>
+# endif
+#elif defined WIN32_NATIVE
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+#if defined OS2
+# define INCL_DOS
+# include <os2.h>
+#endif
+
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
+/* Get LIBDIR.  */
+#ifndef LIBDIR
+# include "configmake.h"
+#endif
+
+/* Define O_NOFOLLOW to 0 on platforms where it does not exist.  */
+#ifndef O_NOFOLLOW
+# define O_NOFOLLOW 0
+#endif
+
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, Cygwin, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#endif
+
+#ifndef DIRECTORY_SEPARATOR
+# define DIRECTORY_SEPARATOR '/'
+#endif
+
+#ifndef ISSLASH
+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
+#endif
+
+#if HAVE_DECL_GETC_UNLOCKED
+# undef getc
+# define getc getc_unlocked
+#endif
+
+/* The following static variable is declared 'volatile' to avoid a
+   possible multithread problem in the function get_charset_aliases. If we
+   are running in a threaded environment, and if two threads initialize
+   'charset_aliases' simultaneously, both will produce the same value,
+   and everything will be ok if the two assignments to 'charset_aliases'
+   are atomic. But I don't know what will happen if the two assignments mix.  */
+#if __STDC__ != 1
+# define volatile /* empty */
+#endif
+/* Pointer to the contents of the charset.alias file, if it has already been
+   read, else NULL.  Its format is:
+   ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0'  */
+static const char * volatile charset_aliases;
+
+/* Return a pointer to the contents of the charset.alias file.  */
+static const char *
+get_charset_aliases (void)
+{
+  const char *cp;
+
+  cp = charset_aliases;
+  if (cp == NULL)
+    {
+#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
+      const char *dir;
+      const char *base = "charset.alias";
+      char *file_name;
+
+      /* Make it possible to override the charset.alias location.  This is
+         necessary for running the testsuite before "make install".  */
+      dir = getenv ("CHARSETALIASDIR");
+      if (dir == NULL || dir[0] == '\0')
+        dir = relocate (LIBDIR);
+
+      /* Concatenate dir and base into freshly allocated file_name.  */
+      {
+        size_t dir_len = strlen (dir);
+        size_t base_len = strlen (base);
+        int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
+        file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
+        if (file_name != NULL)
+          {
+            memcpy (file_name, dir, dir_len);
+            if (add_slash)
+              file_name[dir_len] = DIRECTORY_SEPARATOR;
+            memcpy (file_name + dir_len + add_slash, base, base_len + 1);
+          }
+      }
+
+      if (file_name == NULL)
+        /* Out of memory.  Treat the file as empty.  */
+        cp = "";
+      else
+        {
+          int fd;
+
+          /* Open the file.  Reject symbolic links on platforms that support
+             O_NOFOLLOW.  This is a security feature.  Without it, an attacker
+             could retrieve parts of the contents (namely, the tail of the
+             first line that starts with "* ") of an arbitrary file by placing
+             a symbolic link to that file under the name "charset.alias" in
+             some writable directory and defining the environment variable
+             CHARSETALIASDIR to point to that directory.  */
+          fd = open (file_name,
+                     O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0));
+          if (fd < 0)
+            /* File not found.  Treat it as empty.  */
+            cp = "";
+          else
+            {
+              FILE *fp;
+
+              fp = fdopen (fd, "r");
+              if (fp == NULL)
+                {
+                  /* Out of memory.  Treat the file as empty.  */
+                  close (fd);
+                  cp = "";
+                }
+              else
+                {
+                  /* Parse the file's contents.  */
+                  char *res_ptr = NULL;
+                  size_t res_size = 0;
+
+                  for (;;)
+                    {
+                      int c;
+                      char buf1[50+1];
+                      char buf2[50+1];
+                      size_t l1, l2;
+                      char *old_res_ptr;
+
+                      c = getc (fp);
+                      if (c == EOF)
+                        break;
+                      if (c == '\n' || c == ' ' || c == '\t')
+                        continue;
+                      if (c == '#')
+                        {
+                          /* Skip comment, to end of line.  */
+                          do
+                            c = getc (fp);
+                          while (!(c == EOF || c == '\n'));
+                          if (c == EOF)
+                            break;
+                          continue;
+                        }
+                      ungetc (c, fp);
+                      if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
+                        break;
+                      l1 = strlen (buf1);
+                      l2 = strlen (buf2);
+                      old_res_ptr = res_ptr;
+                      if (res_size == 0)
+                        {
+                          res_size = l1 + 1 + l2 + 1;
+                          res_ptr = (char *) malloc (res_size + 1);
+                        }
+                      else
+                        {
+                          res_size += l1 + 1 + l2 + 1;
+                          res_ptr = (char *) realloc (res_ptr, res_size + 1);
+                        }
+                      if (res_ptr == NULL)
+                        {
+                          /* Out of memory. */
+                          res_size = 0;
+                          free (old_res_ptr);
+                          break;
+                        }
+                      strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
+                      strcpy (res_ptr + res_size - (l2 + 1), buf2);
+                    }
+                  fclose (fp);
+                  if (res_size == 0)
+                    cp = "";
+                  else
+                    {
+                      *(res_ptr + res_size) = '\0';
+                      cp = res_ptr;
+                    }
+                }
+            }
+
+          free (file_name);
+        }
+
+#else
+
+# if defined DARWIN7
+      /* To avoid the trouble of installing a file that is shared by many
+         GNU packages -- many packaging systems have problems with this --,
+         simply inline the aliases here.  */
+      cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+           "ISO8859-2" "\0" "ISO-8859-2" "\0"
+           "ISO8859-4" "\0" "ISO-8859-4" "\0"
+           "ISO8859-5" "\0" "ISO-8859-5" "\0"
+           "ISO8859-7" "\0" "ISO-8859-7" "\0"
+           "ISO8859-9" "\0" "ISO-8859-9" "\0"
+           "ISO8859-13" "\0" "ISO-8859-13" "\0"
+           "ISO8859-15" "\0" "ISO-8859-15" "\0"
+           "KOI8-R" "\0" "KOI8-R" "\0"
+           "KOI8-U" "\0" "KOI8-U" "\0"
+           "CP866" "\0" "CP866" "\0"
+           "CP949" "\0" "CP949" "\0"
+           "CP1131" "\0" "CP1131" "\0"
+           "CP1251" "\0" "CP1251" "\0"
+           "eucCN" "\0" "GB2312" "\0"
+           "GB2312" "\0" "GB2312" "\0"
+           "eucJP" "\0" "EUC-JP" "\0"
+           "eucKR" "\0" "EUC-KR" "\0"
+           "Big5" "\0" "BIG5" "\0"
+           "Big5HKSCS" "\0" "BIG5-HKSCS" "\0"
+           "GBK" "\0" "GBK" "\0"
+           "GB18030" "\0" "GB18030" "\0"
+           "SJIS" "\0" "SHIFT_JIS" "\0"
+           "ARMSCII-8" "\0" "ARMSCII-8" "\0"
+           "PT154" "\0" "PT154" "\0"
+         /*"ISCII-DEV" "\0" "?" "\0"*/
+           "*" "\0" "UTF-8" "\0";
+# endif
+
+# if defined VMS
+      /* To avoid the troubles of an extra file charset.alias_vms in the
+         sources of many GNU packages, simply inline the aliases here.  */
+      /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
+         "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
+         section 10.7 "Handling Different Character Sets".  */
+      cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+           "ISO8859-2" "\0" "ISO-8859-2" "\0"
+           "ISO8859-5" "\0" "ISO-8859-5" "\0"
+           "ISO8859-7" "\0" "ISO-8859-7" "\0"
+           "ISO8859-8" "\0" "ISO-8859-8" "\0"
+           "ISO8859-9" "\0" "ISO-8859-9" "\0"
+           /* Japanese */
+           "eucJP" "\0" "EUC-JP" "\0"
+           "SJIS" "\0" "SHIFT_JIS" "\0"
+           "DECKANJI" "\0" "DEC-KANJI" "\0"
+           "SDECKANJI" "\0" "EUC-JP" "\0"
+           /* Chinese */
+           "eucTW" "\0" "EUC-TW" "\0"
+           "DECHANYU" "\0" "DEC-HANYU" "\0"
+           "DECHANZI" "\0" "GB2312" "\0"
+           /* Korean */
+           "DECKOREAN" "\0" "EUC-KR" "\0";
+# endif
+
+# if defined WIN32_NATIVE || defined __CYGWIN__
+      /* To avoid the troubles of installing a separate file in the same
+         directory as the DLL and of retrieving the DLL's directory at
+         runtime, simply inline the aliases here.  */
+
+      cp = "CP936" "\0" "GBK" "\0"
+           "CP1361" "\0" "JOHAB" "\0"
+           "CP20127" "\0" "ASCII" "\0"
+           "CP20866" "\0" "KOI8-R" "\0"
+           "CP20936" "\0" "GB2312" "\0"
+           "CP21866" "\0" "KOI8-RU" "\0"
+           "CP28591" "\0" "ISO-8859-1" "\0"
+           "CP28592" "\0" "ISO-8859-2" "\0"
+           "CP28593" "\0" "ISO-8859-3" "\0"
+           "CP28594" "\0" "ISO-8859-4" "\0"
+           "CP28595" "\0" "ISO-8859-5" "\0"
+           "CP28596" "\0" "ISO-8859-6" "\0"
+           "CP28597" "\0" "ISO-8859-7" "\0"
+           "CP28598" "\0" "ISO-8859-8" "\0"
+           "CP28599" "\0" "ISO-8859-9" "\0"
+           "CP28605" "\0" "ISO-8859-15" "\0"
+           "CP38598" "\0" "ISO-8859-8" "\0"
+           "CP51932" "\0" "EUC-JP" "\0"
+           "CP51936" "\0" "GB2312" "\0"
+           "CP51949" "\0" "EUC-KR" "\0"
+           "CP51950" "\0" "EUC-TW" "\0"
+           "CP54936" "\0" "GB18030" "\0"
+           "CP65001" "\0" "UTF-8" "\0";
+# endif
+#endif
+
+      charset_aliases = cp;
+    }
+
+  return cp;
+}
+
+/* Determine the current locale's character encoding, and canonicalize it
+   into one of the canonical names listed in config.charset.
+   The result must not be freed; it is statically allocated.
+   If the canonical name cannot be determined, the result is a non-canonical
+   name.  */
+
+#ifdef STATIC
+STATIC
+#endif
+const char *
+locale_charset (void)
+{
+  const char *codeset;
+  const char *aliases;
+
+#if !(defined WIN32_NATIVE || defined OS2)
+
+# if HAVE_LANGINFO_CODESET
+
+  /* Most systems support nl_langinfo (CODESET) nowadays.  */
+  codeset = nl_langinfo (CODESET);
+
+#  ifdef __CYGWIN__
+  /* Cygwin < 1.7 does not have locales.  nl_langinfo (CODESET) always
+     returns "US-ASCII".  Return the suffix of the locale name from the
+     environment variables (if present) or the codepage as a number.  */
+  if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
+    {
+      const char *locale;
+      static char buf[2 + 10 + 1];
+
+      locale = getenv ("LC_ALL");
+      if (locale == NULL || locale[0] == '\0')
+        {
+          locale = getenv ("LC_CTYPE");
+          if (locale == NULL || locale[0] == '\0')
+            locale = getenv ("LANG");
+        }
+      if (locale != NULL && locale[0] != '\0')
+        {
+          /* If the locale name contains an encoding after the dot, return
+             it.  */
+          const char *dot = strchr (locale, '.');
+
+          if (dot != NULL)
+            {
+              const char *modifier;
+
+              dot++;
+              /* Look for the possible @... trailer and remove it, if any.  */
+              modifier = strchr (dot, '@');
+              if (modifier == NULL)
+                return dot;
+              if (modifier - dot < sizeof (buf))
+                {
+                  memcpy (buf, dot, modifier - dot);
+                  buf [modifier - dot] = '\0';
+                  return buf;
+                }
+            }
+        }
+
+      /* Woe32 has a function returning the locale's codepage as a number:
+         GetACP().  This encoding is used by Cygwin, unless the user has set
+         the environment variable CYGWIN=codepage:oem (which very few people
+         do).
+         Output directed to console windows needs to be converted (to
+         GetOEMCP() if the console is using a raster font, or to
+         GetConsoleOutputCP() if it is using a TrueType font).  Cygwin does
+         this conversion transparently (see winsup/cygwin/fhandler_console.cc),
+         converting to GetConsoleOutputCP().  This leads to correct results,
+         except when SetConsoleOutputCP has been called and a raster font is
+         in use.  */
+      sprintf (buf, "CP%u", GetACP ());
+      codeset = buf;
+    }
+#  endif
+
+# else
+
+  /* On old systems which lack it, use setlocale or getenv.  */
+  const char *locale = NULL;
+
+  /* But most old systems don't have a complete set of locales.  Some
+     (like SunOS 4 or DJGPP) have only the C locale.  Therefore we don't
+     use setlocale here; it would return "C" when it doesn't support the
+     locale name the user has set.  */
+#  if 0
+  locale = setlocale (LC_CTYPE, NULL);
+#  endif
+  if (locale == NULL || locale[0] == '\0')
+    {
+      locale = getenv ("LC_ALL");
+      if (locale == NULL || locale[0] == '\0')
+        {
+          locale = getenv ("LC_CTYPE");
+          if (locale == NULL || locale[0] == '\0')
+            locale = getenv ("LANG");
+        }
+    }
+
+  /* On some old systems, one used to set locale = "iso8859_1". On others,
+     you set it to "language_COUNTRY.charset". In any case, we resolve it
+     through the charset.alias file.  */
+  codeset = locale;
+
+# endif
+
+#elif defined WIN32_NATIVE
+
+  static char buf[2 + 10 + 1];
+
+  /* Woe32 has a function returning the locale's codepage as a number:
+     GetACP().
+     When the output goes to a console window, it needs to be provided in
+     GetOEMCP() encoding if the console is using a raster font, or in
+     GetConsoleOutputCP() encoding if it is using a TrueType font.
+     But in GUI programs and for output sent to files and pipes, GetACP()
+     encoding is the best bet.  */
+  sprintf (buf, "CP%u", GetACP ());
+  codeset = buf;
+
+#elif defined OS2
+
+  const char *locale;
+  static char buf[2 + 10 + 1];
+  ULONG cp[3];
+  ULONG cplen;
+
+  /* Allow user to override the codeset, as set in the operating system,
+     with standard language environment variables.  */
+  locale = getenv ("LC_ALL");
+  if (locale == NULL || locale[0] == '\0')
+    {
+      locale = getenv ("LC_CTYPE");
+      if (locale == NULL || locale[0] == '\0')
+        locale = getenv ("LANG");
+    }
+  if (locale != NULL && locale[0] != '\0')
+    {
+      /* If the locale name contains an encoding after the dot, return it.  */
+      const char *dot = strchr (locale, '.');
+
+      if (dot != NULL)
+        {
+          const char *modifier;
+
+          dot++;
+          /* Look for the possible @... trailer and remove it, if any.  */
+          modifier = strchr (dot, '@');
+          if (modifier == NULL)
+            return dot;
+          if (modifier - dot < sizeof (buf))
+            {
+              memcpy (buf, dot, modifier - dot);
+              buf [modifier - dot] = '\0';
+              return buf;
+            }
+        }
+
+      /* Resolve through the charset.alias file.  */
+      codeset = locale;
+    }
+  else
+    {
+      /* OS/2 has a function returning the locale's codepage as a number.  */
+      if (DosQueryCp (sizeof (cp), cp, &cplen))
+        codeset = "";
+      else
+        {
+          sprintf (buf, "CP%u", cp[0]);
+          codeset = buf;
+        }
+    }
+
+#endif
+
+  if (codeset == NULL)
+    /* The canonical name cannot be determined.  */
+    codeset = "";
+
+  /* Resolve alias. */
+  for (aliases = get_charset_aliases ();
+       *aliases != '\0';
+       aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
+    if (strcmp (codeset, aliases) == 0
+        || (aliases[0] == '*' && aliases[1] == '\0'))
+      {
+        codeset = aliases + strlen (aliases) + 1;
+        break;
+      }
+
+  /* Don't return an empty string.  GNU libc and GNU libiconv interpret
+     the empty string as denoting "the locale's character encoding",
+     thus GNU libiconv would call this function a second time.  */
+  if (codeset[0] == '\0')
+    codeset = "ASCII";
+
+  return codeset;
+}
diff --git a/gnulib/lib/localcharset.h b/gnulib/lib/localcharset.h
new file mode 100644 (file)
index 0000000..edbb13b
--- /dev/null
@@ -0,0 +1,41 @@
+/* Determine a canonical name for the current locale's character encoding.
+   Copyright (C) 2000-2003, 2009-2011 Free Software Foundation, Inc.
+   This file is part of the GNU CHARSET Library.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _LOCALCHARSET_H
+#define _LOCALCHARSET_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Determine the current locale's character encoding, and canonicalize it
+   into one of the canonical names listed in config.charset.
+   The result must not be freed; it is statically allocated.
+   If the canonical name cannot be determined, the result is a non-canonical
+   name.  */
+extern const char * locale_charset (void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _LOCALCHARSET_H */
diff --git a/gnulib/lib/locale.in.h b/gnulib/lib/locale.in.h
new file mode 100644 (file)
index 0000000..1f9bafd
--- /dev/null
@@ -0,0 +1,96 @@
+/* A POSIX <locale.h>.
+   Copyright (C) 2007-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 _GL_LOCALE_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
+
+#ifndef _GL_LOCALE_H
+#define _GL_LOCALE_H
+
+/* NetBSD 5.0 mis-defines NULL.  */
+#include <stddef.h>
+
+/* MacOS X 10.5 defines the locale_t type in <xlocale.h>.  */
+#if @HAVE_XLOCALE_H@
+# include <xlocale.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
+   On systems that don't define it, use the same value as GNU libintl.  */
+#if !defined LC_MESSAGES
+# define LC_MESSAGES 1729
+#endif
+
+#if @GNULIB_SETLOCALE@
+# if @REPLACE_SETLOCALE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef setlocale
+#   define setlocale rpl_setlocale
+#   define GNULIB_defined_setlocale 1
+#  endif
+_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale));
+_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));
+# else
+_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
+# endif
+_GL_CXXALIASWARN (setlocale);
+#elif defined GNULIB_POSIXCHECK
+# undef setlocale
+# if HAVE_RAW_DECL_SETLOCALE
+_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
+                 "use gnulib module setlocale for portability");
+# endif
+#endif
+
+#if @GNULIB_DUPLOCALE@
+# if @REPLACE_DUPLOCALE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef duplocale
+#   define duplocale rpl_duplocale
+#  endif
+_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
+# else
+#  if @HAVE_DUPLOCALE@
+_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
+#  endif
+# endif
+# if @HAVE_DUPLOCALE@
+_GL_CXXALIASWARN (duplocale);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef duplocale
+# if HAVE_RAW_DECL_DUPLOCALE
+_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
+                 "use gnulib module duplocale for portability");
+# endif
+#endif
+
+#endif /* _GL_LOCALE_H */
+#endif /* _GL_LOCALE_H */
diff --git a/gnulib/lib/lseek.c b/gnulib/lib/lseek.c
new file mode 100644 (file)
index 0000000..8339044
--- /dev/null
@@ -0,0 +1,62 @@
+/* An lseek() function that detects pipes.
+   Copyright (C) 2007, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Windows platforms.  */
+/* Get GetFileType.  */
+# include <windows.h>
+#else
+# include <sys/stat.h>
+#endif
+#include <errno.h>
+
+#undef lseek
+
+off_t
+rpl_lseek (int fd, off_t offset, int whence)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals.  */
+  HANDLE h = (HANDLE) _get_osfhandle (fd);
+  if (h == INVALID_HANDLE_VALUE)
+    {
+      errno = EBADF;
+      return -1;
+    }
+  if (GetFileType (h) != FILE_TYPE_DISK)
+    {
+      errno = ESPIPE;
+      return -1;
+    }
+#else
+  /* BeOS lseek mistakenly succeeds on pipes...  */
+  struct stat statbuf;
+  if (fstat (fd, &statbuf) < 0)
+    return -1;
+  if (!S_ISREG (statbuf.st_mode))
+    {
+      errno = ESPIPE;
+      return -1;
+    }
+#endif
+  return lseek (fd, offset, whence);
+}
diff --git a/gnulib/lib/lstat.c b/gnulib/lib/lstat.c
new file mode 100644 (file)
index 0000000..b26065e
--- /dev/null
@@ -0,0 +1,91 @@
+/* Work around a bug of lstat on some systems
+
+   Copyright (C) 1997-2006, 2008-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 Jim Meyering */
+
+#include <config.h>
+
+#if !HAVE_LSTAT
+/* On systems that lack symlinks, our replacement <sys/stat.h> already
+   defined lstat as stat, so there is nothing further to do other than
+   avoid an empty file.  */
+typedef int dummy;
+#else /* HAVE_LSTAT */
+
+/* Get the original definition of lstat.  It might be defined as a macro.  */
+# define __need_system_sys_stat_h
+# include <sys/types.h>
+# include <sys/stat.h>
+# undef __need_system_sys_stat_h
+
+static inline int
+orig_lstat (const char *filename, struct stat *buf)
+{
+  return lstat (filename, buf);
+}
+
+/* Specification.  */
+# include <sys/stat.h>
+
+# include <string.h>
+# include <errno.h>
+
+/* lstat works differently on Linux and Solaris systems.  POSIX (see
+   `pathname resolution' in the glossary) requires that programs like
+   `ls' take into consideration the fact that FILE has a trailing slash
+   when FILE is a symbolic link.  On Linux and Solaris 10 systems, the
+   lstat function already has the desired semantics (in treating
+   `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)',
+   but on Solaris 9 and earlier it does not.
+
+   If FILE has a trailing slash and specifies a symbolic link,
+   then use stat() to get more info on the referent of FILE.
+   If the referent is a non-directory, then set errno to ENOTDIR
+   and return -1.  Otherwise, return stat's result.  */
+
+int
+rpl_lstat (const char *file, struct stat *sbuf)
+{
+  size_t len;
+  int lstat_result = orig_lstat (file, sbuf);
+
+  if (lstat_result != 0)
+    return lstat_result;
+
+  /* This replacement file can blindly check against '/' rather than
+     using the ISSLASH macro, because all platforms with '\\' either
+     lack symlinks (mingw) or have working lstat (cygwin) and thus do
+     not compile this file.  0 len should have already been filtered
+     out above, with a failure return of ENOENT.  */
+  len = strlen (file);
+  if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode))
+    return 0;
+
+  /* At this point, a trailing slash is only permitted on
+     symlink-to-dir; but it should have found information on the
+     directory, not the symlink.  Call stat() to get info about the
+     link's referent.  Our replacement stat guarantees valid results,
+     even if the symlink is not pointing to a directory.  */
+  if (!S_ISLNK (sbuf->st_mode))
+    {
+      errno = ENOTDIR;
+      return -1;
+    }
+  return stat (file, sbuf);
+}
+
+#endif /* HAVE_LSTAT */
diff --git a/gnulib/lib/malloc.c b/gnulib/lib/malloc.c
new file mode 100644 (file)
index 0000000..a325d61
--- /dev/null
@@ -0,0 +1,60 @@
+/* malloc() function that is glibc compatible.
+
+   Copyright (C) 1997-1998, 2006-2007, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* written by Jim Meyering and Bruno Haible */
+
+#include <config.h>
+/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h.  */
+#ifdef malloc
+# define NEED_MALLOC_GNU 1
+# undef malloc
+/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU.  */
+#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU
+# define NEED_MALLOC_GNU 1
+#endif
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <errno.h>
+
+/* Call the system's malloc below.  */
+#undef malloc
+
+/* Allocate an N-byte block of memory from the heap.
+   If N is zero, allocate a 1-byte block.  */
+
+void *
+rpl_malloc (size_t n)
+{
+  void *result;
+
+#if NEED_MALLOC_GNU
+  if (n == 0)
+    n = 1;
+#endif
+
+  result = malloc (n);
+
+#if !HAVE_MALLOC_POSIX
+  if (result == NULL)
+    errno = ENOMEM;
+#endif
+
+  return result;
+}
diff --git a/gnulib/lib/malloca.c b/gnulib/lib/malloca.c
new file mode 100644 (file)
index 0000000..47a8d7a
--- /dev/null
@@ -0,0 +1,141 @@
+/* Safe automatic memory allocation.
+   Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "malloca.h"
+
+#include "verify.h"
+
+/* Use the system functions, not the gnulib overrides in this file.  */
+#undef malloc
+
+/* The speed critical point in this file is freea() applied to an alloca()
+   result: it must be fast, to match the speed of alloca().  The speed of
+   mmalloca() and freea() in the other case are not critical, because they
+   are only invoked for big memory sizes.  */
+
+#if HAVE_ALLOCA
+
+/* Store the mmalloca() results in a hash table.  This is needed to reliably
+   distinguish a mmalloca() result and an alloca() result.
+
+   Although it is possible that the same pointer is returned by alloca() and
+   by mmalloca() at different times in the same application, it does not lead
+   to a bug in freea(), because:
+     - Before a pointer returned by alloca() can point into malloc()ed memory,
+       the function must return, and once this has happened the programmer must
+       not call freea() on it anyway.
+     - Before a pointer returned by mmalloca() can point into the stack, it
+       must be freed.  The only function that can free it is freea(), and
+       when freea() frees it, it also removes it from the hash table.  */
+
+#define MAGIC_NUMBER 0x1415fb4a
+#define MAGIC_SIZE sizeof (int)
+/* This is how the header info would look like without any alignment
+   considerations.  */
+struct preliminary_header { void *next; char room[MAGIC_SIZE]; };
+/* But the header's size must be a multiple of sa_alignment_max.  */
+#define HEADER_SIZE \
+  (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max)
+struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; };
+verify (HEADER_SIZE == sizeof (struct header));
+/* We make the hash table quite big, so that during lookups the probability
+   of empty hash buckets is quite high.  There is no need to make the hash
+   table resizable, because when the hash table gets filled so much that the
+   lookup becomes slow, it means that the application has memory leaks.  */
+#define HASH_TABLE_SIZE 257
+static void * mmalloca_results[HASH_TABLE_SIZE];
+
+#endif
+
+void *
+mmalloca (size_t n)
+{
+#if HAVE_ALLOCA
+  /* Allocate one more word, that serves as an indicator for malloc()ed
+     memory, so that freea() of an alloca() result is fast.  */
+  size_t nplus = n + HEADER_SIZE;
+
+  if (nplus >= n)
+    {
+      char *p = (char *) malloc (nplus);
+
+      if (p != NULL)
+        {
+          size_t slot;
+
+          p += HEADER_SIZE;
+
+          /* Put a magic number into the indicator word.  */
+          ((int *) p)[-1] = MAGIC_NUMBER;
+
+          /* Enter p into the hash table.  */
+          slot = (unsigned long) p % HASH_TABLE_SIZE;
+          ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot];
+          mmalloca_results[slot] = p;
+
+          return p;
+        }
+    }
+  /* Out of memory.  */
+  return NULL;
+#else
+# if !MALLOC_0_IS_NONNULL
+  if (n == 0)
+    n = 1;
+# endif
+  return malloc (n);
+#endif
+}
+
+#if HAVE_ALLOCA
+void
+freea (void *p)
+{
+  /* mmalloca() may have returned NULL.  */
+  if (p != NULL)
+    {
+      /* Attempt to quickly distinguish the mmalloca() result - which has
+         a magic indicator word - and the alloca() result - which has an
+         uninitialized indicator word.  It is for this test that sa_increment
+         additional bytes are allocated in the alloca() case.  */
+      if (((int *) p)[-1] == MAGIC_NUMBER)
+        {
+          /* Looks like a mmalloca() result.  To see whether it really is one,
+             perform a lookup in the hash table.  */
+          size_t slot = (unsigned long) p % HASH_TABLE_SIZE;
+          void **chain = &mmalloca_results[slot];
+          for (; *chain != NULL;)
+            {
+              if (*chain == p)
+                {
+                  /* Found it.  Remove it from the hash table and free it.  */
+                  char *p_begin = (char *) p - HEADER_SIZE;
+                  *chain = ((struct header *) p_begin)->next;
+                  free (p_begin);
+                  return;
+                }
+              chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next;
+            }
+        }
+      /* At this point, we know it was not a mmalloca() result.  */
+    }
+}
+#endif
diff --git a/gnulib/lib/malloca.h b/gnulib/lib/malloca.h
new file mode 100644 (file)
index 0000000..7083a58
--- /dev/null
@@ -0,0 +1,134 @@
+/* Safe automatic memory allocation.
+   Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _MALLOCA_H
+#define _MALLOCA_H
+
+#include <alloca.h>
+#include <stddef.h>
+#include <stdlib.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call
+   alloca(N); otherwise it returns NULL.  It either returns N bytes of
+   memory allocated on the stack, that lasts until the function returns,
+   or NULL.
+   Use of safe_alloca should be avoided:
+     - inside arguments of function calls - undefined behaviour,
+     - in inline functions - the allocation may actually last until the
+       calling function returns.
+*/
+#if HAVE_ALLOCA
+/* The OS usually guarantees only one guard page at the bottom of the stack,
+   and a page size can be as small as 4096 bytes.  So we cannot safely
+   allocate anything larger than 4096 bytes.  Also care for the possibility
+   of a few compiler-allocated temporary stack slots.
+   This must be a macro, not an inline function.  */
+# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
+#else
+# define safe_alloca(N) ((void) (N), NULL)
+#endif
+
+/* malloca(N) is a safe variant of alloca(N).  It allocates N bytes of
+   memory allocated on the stack, that must be freed using freea() before
+   the function returns.  Upon failure, it returns NULL.  */
+#if HAVE_ALLOCA
+# define malloca(N) \
+  ((N) < 4032 - sa_increment                                        \
+   ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \
+   : mmalloca (N))
+#else
+# define malloca(N) \
+  mmalloca (N)
+#endif
+extern void * mmalloca (size_t n);
+
+/* Free a block of memory allocated through malloca().  */
+#if HAVE_ALLOCA
+extern void freea (void *p);
+#else
+# define freea free
+#endif
+
+/* nmalloca(N,S) is an overflow-safe variant of malloca (N * S).
+   It allocates an array of N objects, each with S bytes of memory,
+   on the stack.  S must be positive and N must be nonnegative.
+   The array must be freed using freea() before the function returns.  */
+#if 1
+/* Cf. the definition of xalloc_oversized.  */
+# define nmalloca(n, s) \
+    ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \
+     ? NULL \
+     : malloca ((n) * (s)))
+#else
+extern void * nmalloca (size_t n, size_t s);
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* ------------------- Auxiliary, non-public definitions ------------------- */
+
+/* Determine the alignment of a type at compile time.  */
+#if defined __GNUC__
+# define sa_alignof __alignof__
+#elif defined __cplusplus
+  template <class type> struct sa_alignof_helper { char __slot1; type __slot2; };
+# define sa_alignof(type) offsetof (sa_alignof_helper<type>, __slot2)
+#elif defined __hpux
+  /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof
+     values.  */
+# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
+#elif defined _AIX
+  /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof
+     values.  */
+# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
+#else
+# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
+#endif
+
+enum
+{
+/* The desired alignment of memory allocations is the maximum alignment
+   among all elementary types.  */
+  sa_alignment_long = sa_alignof (long),
+  sa_alignment_double = sa_alignof (double),
+#if HAVE_LONG_LONG_INT
+  sa_alignment_longlong = sa_alignof (long long),
+#endif
+  sa_alignment_longdouble = sa_alignof (long double),
+  sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1)
+#if HAVE_LONG_LONG_INT
+                      | (sa_alignment_longlong - 1)
+#endif
+                      | (sa_alignment_longdouble - 1)
+                     ) + 1,
+/* The increment that guarantees room for a magic word must be >= sizeof (int)
+   and a multiple of sa_alignment_max.  */
+  sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max
+};
+
+#endif /* _MALLOCA_H */
diff --git a/gnulib/lib/malloca.valgrind b/gnulib/lib/malloca.valgrind
new file mode 100644 (file)
index 0000000..52f0a50
--- /dev/null
@@ -0,0 +1,7 @@
+# Suppress a valgrind message about use of uninitialized memory in freea().
+# This use is OK because it provides only a speedup.
+{
+    freea
+    Memcheck:Cond
+    fun:freea
+}
diff --git a/gnulib/lib/math.in.h b/gnulib/lib/math.in.h
new file mode 100644 (file)
index 0000000..9ac38ba
--- /dev/null
@@ -0,0 +1,810 @@
+/* A GNU-like <math.h>.
+
+   Copyright (C) 2002-2003, 2007-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 _GL_MATH_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+
+#ifndef _GL_MATH_H
+#define _GL_MATH_H
+
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* Helper macros to define a portability warning for the
+   classification macro FUNC called with VALUE.  POSIX declares the
+   classification macros with an argument of real-floating (that is,
+   one of float, double, or long double).  */
+#define _GL_WARN_REAL_FLOATING_DECL(func) \
+static inline int                                                   \
+rpl_ ## func ## f (float f)                                         \
+{                                                                   \
+  return func (f);                                                  \
+}                                                                   \
+static inline int                                                   \
+rpl_ ## func ## d (double d)                                        \
+{                                                                   \
+  return func (d);                                                  \
+}                                                                   \
+static inline int                                                   \
+rpl_ ## func ## l (long double l)                                   \
+{                                                                   \
+  return func (l);                                                  \
+}                                                                   \
+_GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - "       \
+                 "use gnulib module " #func " for portability");    \
+_GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - "       \
+                 "use gnulib module " #func " for portability");    \
+_GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - "       \
+                 "use gnulib module " #func " for portability")
+#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
+  (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value)     \
+   : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value)  \
+   : rpl_ ## func ## l (value))
+
+
+/* POSIX allows platforms that don't support NAN.  But all major
+   machines in the past 15 years have supported something close to
+   IEEE NaN, so we define this unconditionally.  We also must define
+   it on platforms like Solaris 10, where NAN is present but defined
+   as a function pointer rather than a floating point constant.  */
+#if !defined NAN || @REPLACE_NAN@
+# if !GNULIB_defined_NAN
+#  undef NAN
+  /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
+#  ifdef __DECC
+static float
+_NaN ()
+{
+  static float zero = 0.0f;
+  return zero / zero;
+}
+#   define NAN (_NaN())
+#  else
+#   define NAN (0.0f / 0.0f)
+#  endif
+#  define GNULIB_defined_NAN 1
+# endif
+#endif
+
+/* Solaris 10 defines HUGE_VAL, but as a function pointer rather
+   than a floating point constant.  */
+#if @REPLACE_HUGE_VAL@
+# undef HUGE_VAL
+# define HUGE_VAL (1.0 / 0.0)
+#endif
+
+
+/* Write x as
+     x = mantissa * 2^exp
+   where
+     If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
+     If x is zero: mantissa = x, exp = 0.
+     If x is infinite or NaN: mantissa = x, exp unspecified.
+   Store exp in *EXPPTR and return mantissa.  */
+#if @GNULIB_FREXP@
+# if @REPLACE_FREXP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define frexp rpl_frexp
+#  endif
+_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr));
+# else
+_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
+# endif
+_GL_CXXALIASWARN (frexp);
+#elif defined GNULIB_POSIXCHECK
+# undef frexp
+/* Assume frexp is always declared.  */
+_GL_WARN_ON_USE (frexp, "frexp is unportable - "
+                 "use gnulib module frexp for portability");
+#endif
+
+
+#if @GNULIB_LOGB@
+# if !@HAVE_DECL_LOGB@
+_GL_EXTERN_C double logb (double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef logb
+# if HAVE_RAW_DECL_LOGB
+_GL_WARN_ON_USE (logb, "logb is unportable - "
+                 "use gnulib module logb for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ACOSL@
+# if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
+_GL_FUNCDECL_SYS (acosl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (acosl, long double, (long double x));
+_GL_CXXALIASWARN (acosl);
+#elif defined GNULIB_POSIXCHECK
+# undef acosl
+# if HAVE_RAW_DECL_ACOSL
+_GL_WARN_ON_USE (acosl, "acosl is unportable - "
+                 "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ASINL@
+# if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
+_GL_FUNCDECL_SYS (asinl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (asinl, long double, (long double x));
+_GL_CXXALIASWARN (asinl);
+#elif defined GNULIB_POSIXCHECK
+# undef asinl
+# if HAVE_RAW_DECL_ASINL
+_GL_WARN_ON_USE (asinl, "asinl is unportable - "
+                 "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ATANL@
+# if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
+_GL_FUNCDECL_SYS (atanl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (atanl, long double, (long double x));
+_GL_CXXALIASWARN (atanl);
+#elif defined GNULIB_POSIXCHECK
+# undef atanl
+# if HAVE_RAW_DECL_ATANL
+_GL_WARN_ON_USE (atanl, "atanl is unportable - "
+                 "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_CEILF@
+# if @REPLACE_CEILF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define ceilf rpl_ceilf
+#  endif
+_GL_FUNCDECL_RPL (ceilf, float, (float x));
+_GL_CXXALIAS_RPL (ceilf, float, (float x));
+# else
+#  if !@HAVE_DECL_CEILF@
+_GL_FUNCDECL_SYS (ceilf, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (ceilf, float, (float x));
+# endif
+_GL_CXXALIASWARN (ceilf);
+#elif defined GNULIB_POSIXCHECK
+# undef ceilf
+# if HAVE_RAW_DECL_CEILF
+_GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
+                 "use gnulib module ceilf for portability");
+# endif
+#endif
+
+#if @GNULIB_CEIL@
+# if @REPLACE_CEIL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define ceil rpl_ceil
+#  endif
+_GL_FUNCDECL_RPL (ceil, double, (double x));
+_GL_CXXALIAS_RPL (ceil, double, (double x));
+# else
+_GL_CXXALIAS_SYS (ceil, double, (double x));
+# endif
+_GL_CXXALIASWARN (ceil);
+#endif
+
+#if @GNULIB_CEILL@
+# if @REPLACE_CEILL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define ceill rpl_ceill
+#  endif
+_GL_FUNCDECL_RPL (ceill, long double, (long double x));
+_GL_CXXALIAS_RPL (ceill, long double, (long double x));
+# else
+#  if !@HAVE_DECL_CEILL@
+_GL_FUNCDECL_SYS (ceill, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (ceill, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (ceill);
+#elif defined GNULIB_POSIXCHECK
+# undef ceill
+# if HAVE_RAW_DECL_CEILL
+_GL_WARN_ON_USE (ceill, "ceill is unportable - "
+                 "use gnulib module ceill for portability");
+# endif
+#endif
+
+
+#if @GNULIB_COSL@
+# if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
+_GL_FUNCDECL_SYS (cosl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (cosl, long double, (long double x));
+_GL_CXXALIASWARN (cosl);
+#elif defined GNULIB_POSIXCHECK
+# undef cosl
+# if HAVE_RAW_DECL_COSL
+_GL_WARN_ON_USE (cosl, "cosl is unportable - "
+                 "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXPL@
+# if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
+_GL_FUNCDECL_SYS (expl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (expl, long double, (long double x));
+_GL_CXXALIASWARN (expl);
+#elif defined GNULIB_POSIXCHECK
+# undef expl
+# if HAVE_RAW_DECL_EXPL
+_GL_WARN_ON_USE (expl, "expl is unportable - "
+                 "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FLOORF@
+# if @REPLACE_FLOORF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define floorf rpl_floorf
+#  endif
+_GL_FUNCDECL_RPL (floorf, float, (float x));
+_GL_CXXALIAS_RPL (floorf, float, (float x));
+# else
+#  if !@HAVE_DECL_FLOORF@
+_GL_FUNCDECL_SYS (floorf, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (floorf, float, (float x));
+# endif
+_GL_CXXALIASWARN (floorf);
+#elif defined GNULIB_POSIXCHECK
+# undef floorf
+# if HAVE_RAW_DECL_FLOORF
+_GL_WARN_ON_USE (floorf, "floorf is unportable - "
+                 "use gnulib module floorf for portability");
+# endif
+#endif
+
+#if @GNULIB_FLOOR@
+# if @REPLACE_FLOOR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define floor rpl_floor
+#  endif
+_GL_FUNCDECL_RPL (floor, double, (double x));
+_GL_CXXALIAS_RPL (floor, double, (double x));
+# else
+_GL_CXXALIAS_SYS (floor, double, (double x));
+# endif
+_GL_CXXALIASWARN (floor);
+#endif
+
+#if @GNULIB_FLOORL@
+# if @REPLACE_FLOORL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define floorl rpl_floorl
+#  endif
+_GL_FUNCDECL_RPL (floorl, long double, (long double x));
+_GL_CXXALIAS_RPL (floorl, long double, (long double x));
+# else
+#  if !@HAVE_DECL_FLOORL@
+_GL_FUNCDECL_SYS (floorl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (floorl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (floorl);
+#elif defined GNULIB_POSIXCHECK
+# undef floorl
+# if HAVE_RAW_DECL_FLOORL
+_GL_WARN_ON_USE (floorl, "floorl is unportable - "
+                 "use gnulib module floorl for portability");
+# endif
+#endif
+
+
+/* Write x as
+     x = mantissa * 2^exp
+   where
+     If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
+     If x is zero: mantissa = x, exp = 0.
+     If x is infinite or NaN: mantissa = x, exp unspecified.
+   Store exp in *EXPPTR and return mantissa.  */
+#if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  define frexpl rpl_frexpl
+# endif
+_GL_FUNCDECL_RPL (frexpl, long double,
+                  (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr));
+#else
+# if !@HAVE_DECL_FREXPL@
+_GL_FUNCDECL_SYS (frexpl, long double,
+                  (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
+# endif
+# if @GNULIB_FREXPL@
+_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr));
+# endif
+#endif
+#if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
+_GL_CXXALIASWARN (frexpl);
+#endif
+#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
+# undef frexpl
+# if HAVE_RAW_DECL_FREXPL
+_GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
+                 "use gnulib module frexpl for portability");
+# endif
+#endif
+
+
+/* Return x * 2^exp.  */
+#if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  define ldexpl rpl_ldexpl
+# endif
+_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp));
+_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp));
+#else
+# if !@HAVE_DECL_LDEXPL@
+_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp));
+# endif
+# if @GNULIB_LDEXPL@
+_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp));
+# endif
+#endif
+#if @GNULIB_LDEXPL@
+_GL_CXXALIASWARN (ldexpl);
+#endif
+#if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
+# undef ldexpl
+# if HAVE_RAW_DECL_LDEXPL
+_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - "
+                 "use gnulib module ldexpl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOGL@
+# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
+_GL_FUNCDECL_SYS (logl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (logl, long double, (long double x));
+_GL_CXXALIASWARN (logl);
+#elif defined GNULIB_POSIXCHECK
+# undef logl
+# if HAVE_RAW_DECL_LOGL
+_GL_WARN_ON_USE (logl, "logl is unportable - "
+                 "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ROUNDF@
+# if @REPLACE_ROUNDF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef roundf
+#   define roundf rpl_roundf
+#  endif
+_GL_FUNCDECL_RPL (roundf, float, (float x));
+_GL_CXXALIAS_RPL (roundf, float, (float x));
+# else
+#  if !@HAVE_DECL_ROUNDF@
+_GL_FUNCDECL_SYS (roundf, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (roundf, float, (float x));
+# endif
+_GL_CXXALIASWARN (roundf);
+#elif defined GNULIB_POSIXCHECK
+# undef roundf
+# if HAVE_RAW_DECL_ROUNDF
+_GL_WARN_ON_USE (roundf, "roundf is unportable - "
+                 "use gnulib module roundf for portability");
+# endif
+#endif
+
+#if @GNULIB_ROUND@
+# if @REPLACE_ROUND@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef round
+#   define round rpl_round
+#  endif
+_GL_FUNCDECL_RPL (round, double, (double x));
+_GL_CXXALIAS_RPL (round, double, (double x));
+# else
+#  if !@HAVE_DECL_ROUND@
+_GL_FUNCDECL_SYS (round, double, (double x));
+#  endif
+_GL_CXXALIAS_SYS (round, double, (double x));
+# endif
+_GL_CXXALIASWARN (round);
+#elif defined GNULIB_POSIXCHECK
+# undef round
+# if HAVE_RAW_DECL_ROUND
+_GL_WARN_ON_USE (round, "round is unportable - "
+                 "use gnulib module round for portability");
+# endif
+#endif
+
+#if @GNULIB_ROUNDL@
+# if @REPLACE_ROUNDL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef roundl
+#   define roundl rpl_roundl
+#  endif
+_GL_FUNCDECL_RPL (roundl, long double, (long double x));
+_GL_CXXALIAS_RPL (roundl, long double, (long double x));
+# else
+#  if !@HAVE_DECL_ROUNDL@
+_GL_FUNCDECL_SYS (roundl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (roundl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (roundl);
+#elif defined GNULIB_POSIXCHECK
+# undef roundl
+# if HAVE_RAW_DECL_ROUNDL
+_GL_WARN_ON_USE (roundl, "roundl is unportable - "
+                 "use gnulib module roundl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SINL@
+# if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
+_GL_FUNCDECL_SYS (sinl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (sinl, long double, (long double x));
+_GL_CXXALIASWARN (sinl);
+#elif defined GNULIB_POSIXCHECK
+# undef sinl
+# if HAVE_RAW_DECL_SINL
+_GL_WARN_ON_USE (sinl, "sinl is unportable - "
+                 "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SQRTL@
+# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
+_GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
+_GL_CXXALIASWARN (sqrtl);
+#elif defined GNULIB_POSIXCHECK
+# undef sqrtl
+# if HAVE_RAW_DECL_SQRTL
+_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
+                 "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_TANL@
+# if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
+_GL_FUNCDECL_SYS (tanl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (tanl, long double, (long double x));
+_GL_CXXALIASWARN (tanl);
+#elif defined GNULIB_POSIXCHECK
+# undef tanl
+# if HAVE_RAW_DECL_TANL
+_GL_WARN_ON_USE (tanl, "tanl is unportable - "
+                 "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_TRUNCF@
+# if @REPLACE_TRUNCF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define truncf rpl_truncf
+#  endif
+_GL_FUNCDECL_RPL (truncf, float, (float x));
+_GL_CXXALIAS_RPL (truncf, float, (float x));
+# else
+#  if !@HAVE_DECL_TRUNCF@
+_GL_FUNCDECL_SYS (truncf, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (truncf, float, (float x));
+# endif
+_GL_CXXALIASWARN (truncf);
+#elif defined GNULIB_POSIXCHECK
+# undef truncf
+# if HAVE_RAW_DECL_TRUNCF
+_GL_WARN_ON_USE (truncf, "truncf is unportable - "
+                 "use gnulib module truncf for portability");
+# endif
+#endif
+
+#if @GNULIB_TRUNC@
+# if @REPLACE_TRUNC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define trunc rpl_trunc
+#  endif
+_GL_FUNCDECL_RPL (trunc, double, (double x));
+_GL_CXXALIAS_RPL (trunc, double, (double x));
+# else
+#  if !@HAVE_DECL_TRUNC@
+_GL_FUNCDECL_SYS (trunc, double, (double x));
+#  endif
+_GL_CXXALIAS_SYS (trunc, double, (double x));
+# endif
+_GL_CXXALIASWARN (trunc);
+#elif defined GNULIB_POSIXCHECK
+# undef trunc
+# if HAVE_RAW_DECL_TRUNC
+_GL_WARN_ON_USE (trunc, "trunc is unportable - "
+                 "use gnulib module trunc for portability");
+# endif
+#endif
+
+#if @GNULIB_TRUNCL@
+# if @REPLACE_TRUNCL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef truncl
+#   define truncl rpl_truncl
+#  endif
+_GL_FUNCDECL_RPL (truncl, long double, (long double x));
+_GL_CXXALIAS_RPL (truncl, long double, (long double x));
+# else
+#  if !@HAVE_DECL_TRUNCL@
+_GL_FUNCDECL_SYS (truncl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (truncl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (truncl);
+#elif defined GNULIB_POSIXCHECK
+# undef truncl
+# if HAVE_RAW_DECL_TRUNCL
+_GL_WARN_ON_USE (truncl, "truncl is unportable - "
+                 "use gnulib module truncl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ISFINITE@
+# if @REPLACE_ISFINITE@
+_GL_EXTERN_C int gl_isfinitef (float x);
+_GL_EXTERN_C int gl_isfinited (double x);
+_GL_EXTERN_C int gl_isfinitel (long double x);
+#  undef isfinite
+#  define isfinite(x) \
+   (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
+    sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
+    gl_isfinitef (x))
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined isfinite
+_GL_WARN_REAL_FLOATING_DECL (isfinite);
+#  undef isfinite
+#  define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
+# endif
+#endif
+
+
+#if @GNULIB_ISINF@
+# if @REPLACE_ISINF@
+_GL_EXTERN_C int gl_isinff (float x);
+_GL_EXTERN_C int gl_isinfd (double x);
+_GL_EXTERN_C int gl_isinfl (long double x);
+#  undef isinf
+#  define isinf(x) \
+   (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
+    sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
+    gl_isinff (x))
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined isinf
+_GL_WARN_REAL_FLOATING_DECL (isinf);
+#  undef isinf
+#  define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
+# endif
+#endif
+
+
+#if @GNULIB_ISNANF@
+/* Test for NaN for 'float' numbers.  */
+# if @HAVE_ISNANF@
+/* The original <math.h> included above provides a declaration of isnan macro
+   or (older) isnanf function.  */
+#  if __GNUC__ >= 4
+    /* GCC 4.0 and newer provides three built-ins for isnan.  */
+#   undef isnanf
+#   define isnanf(x) __builtin_isnanf ((float)(x))
+#  elif defined isnan
+#   undef isnanf
+#   define isnanf(x) isnan ((float)(x))
+#  endif
+# else
+/* Test whether X is a NaN.  */
+#  undef isnanf
+#  define isnanf rpl_isnanf
+_GL_EXTERN_C int isnanf (float x);
+# endif
+#endif
+
+#if @GNULIB_ISNAND@
+/* Test for NaN for 'double' numbers.
+   This function is a gnulib extension, unlike isnan() which applied only
+   to 'double' numbers earlier but now is a type-generic macro.  */
+# if @HAVE_ISNAND@
+/* The original <math.h> included above provides a declaration of isnan
+   macro.  */
+#  if __GNUC__ >= 4
+    /* GCC 4.0 and newer provides three built-ins for isnan.  */
+#   undef isnand
+#   define isnand(x) __builtin_isnan ((double)(x))
+#  else
+#   undef isnand
+#   define isnand(x) isnan ((double)(x))
+#  endif
+# else
+/* Test whether X is a NaN.  */
+#  undef isnand
+#  define isnand rpl_isnand
+_GL_EXTERN_C int isnand (double x);
+# endif
+#endif
+
+#if @GNULIB_ISNANL@
+/* Test for NaN for 'long double' numbers.  */
+# if @HAVE_ISNANL@
+/* The original <math.h> included above provides a declaration of isnan
+   macro or (older) isnanl function.  */
+#  if __GNUC__ >= 4
+    /* GCC 4.0 and newer provides three built-ins for isnan.  */
+#   undef isnanl
+#   define isnanl(x) __builtin_isnanl ((long double)(x))
+#  elif defined isnan
+#   undef isnanl
+#   define isnanl(x) isnan ((long double)(x))
+#  endif
+# else
+/* Test whether X is a NaN.  */
+#  undef isnanl
+#  define isnanl rpl_isnanl
+_GL_EXTERN_C int isnanl (long double x);
+# endif
+#endif
+
+/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL!  */
+#if @GNULIB_ISNAN@
+# if @REPLACE_ISNAN@
+/* We can't just use the isnanf macro (e.g.) as exposed by
+   isnanf.h (e.g.) here, because those may end up being macros
+   that recursively expand back to isnan.  So use the gnulib
+   replacements for them directly. */
+#  if @HAVE_ISNANF@ && __GNUC__ >= 4
+#   define gl_isnan_f(x) __builtin_isnanf ((float)(x))
+#  else
+_GL_EXTERN_C int rpl_isnanf (float x);
+#   define gl_isnan_f(x) rpl_isnanf (x)
+#  endif
+#  if @HAVE_ISNAND@ && __GNUC__ >= 4
+#   define gl_isnan_d(x) __builtin_isnan ((double)(x))
+#  else
+_GL_EXTERN_C int rpl_isnand (double x);
+#   define gl_isnan_d(x) rpl_isnand (x)
+#  endif
+#  if @HAVE_ISNANL@ && __GNUC__ >= 4
+#   define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
+#  else
+_GL_EXTERN_C int rpl_isnanl (long double x);
+#   define gl_isnan_l(x) rpl_isnanl (x)
+#  endif
+#  undef isnan
+#  define isnan(x) \
+   (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
+    sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
+    gl_isnan_f (x))
+# elif __GNUC__ >= 4
+#  undef isnan
+#  define isnan(x) \
+   (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
+    sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
+    __builtin_isnanf ((float)(x)))
+# endif
+/* Ensure isnan is a macro.  */
+# ifndef isnan
+#  define isnan isnan
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined isnan
+_GL_WARN_REAL_FLOATING_DECL (isnan);
+#  undef isnan
+#  define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
+# endif
+#endif
+
+
+#if @GNULIB_SIGNBIT@
+# if @REPLACE_SIGNBIT_USING_GCC@
+#  undef signbit
+   /* GCC 4.0 and newer provides three built-ins for signbit.  */
+#  define signbit(x) \
+   (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
+    sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
+    __builtin_signbitf (x))
+# endif
+# if @REPLACE_SIGNBIT@
+#  undef signbit
+_GL_EXTERN_C int gl_signbitf (float arg);
+_GL_EXTERN_C int gl_signbitd (double arg);
+_GL_EXTERN_C int gl_signbitl (long double arg);
+#  if __GNUC__ >= 2 && !__STRICT_ANSI__
+#   define _GL_NUM_UINT_WORDS(type) \
+      ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+#   if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
+#    define gl_signbitf_OPTIMIZED_MACRO
+#    define gl_signbitf(arg) \
+       ({ union { float _value;                                         \
+                  unsigned int _word[_GL_NUM_UINT_WORDS (float)];       \
+                } _m;                                                   \
+          _m._value = (arg);                                            \
+          (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1;          \
+        })
+#   endif
+#   if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
+#    define gl_signbitd_OPTIMIZED_MACRO
+#    define gl_signbitd(arg) \
+       ({ union { double _value;                                        \
+                  unsigned int _word[_GL_NUM_UINT_WORDS (double)];      \
+                } _m;                                                   \
+          _m._value = (arg);                                            \
+          (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1;          \
+        })
+#   endif
+#   if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
+#    define gl_signbitl_OPTIMIZED_MACRO
+#    define gl_signbitl(arg) \
+       ({ union { long double _value;                                   \
+                  unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
+                } _m;                                                   \
+          _m._value = (arg);                                            \
+          (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1;        \
+        })
+#   endif
+#  endif
+#  define signbit(x) \
+   (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
+    sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
+    gl_signbitf (x))
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined signbit
+_GL_WARN_REAL_FLOATING_DECL (signbit);
+#  undef signbit
+#  define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
+# endif
+#endif
+
+
+#endif /* _GL_MATH_H */
+#endif /* _GL_MATH_H */
diff --git a/gnulib/lib/mbchar.c b/gnulib/lib/mbchar.c
new file mode 100644 (file)
index 0000000..c9b0dcd
--- /dev/null
@@ -0,0 +1,35 @@
+/* Copyright (C) 2001, 2006, 2009-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/>.  */
+
+
+#include <config.h>
+
+#include <limits.h>
+
+#include "mbchar.h"
+
+#if IS_BASIC_ASCII
+
+/* Bit table of characters in the ISO C "basic character set".  */
+const unsigned int is_basic_table [UCHAR_MAX / 32 + 1] =
+{
+  0x00001a00,           /* '\t' '\v' '\f' */
+  0xffffffef,           /* ' '...'#' '%'...'?' */
+  0xfffffffe,           /* 'A'...'Z' '[' '\\' ']' '^' '_' */
+  0x7ffffffe            /* 'a'...'z' '{' '|' '}' '~' */
+  /* The remaining bits are 0.  */
+};
+
+#endif /* IS_BASIC_ASCII */
diff --git a/gnulib/lib/mbchar.h b/gnulib/lib/mbchar.h
new file mode 100644 (file)
index 0000000..6dcb6cf
--- /dev/null
@@ -0,0 +1,350 @@
+/* Multibyte character data type.
+   Copyright (C) 2001, 2005-2007, 2009-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 Bruno Haible <bruno@clisp.org>.  */
+
+/* A multibyte character is a short subsequence of a char* string,
+   representing a single wide character.
+
+   We use multibyte characters instead of wide characters because of
+   the following goals:
+   1) correct multibyte handling, i.e. operate according to the LC_CTYPE
+      locale,
+   2) ease of maintenance, i.e. the maintainer needs not know all details
+      of the ISO C 99 standard,
+   3) don't fail grossly if the input is not in the encoding set by the
+      locale, because often different encodings are in use in the same
+      countries (ISO-8859-1/UTF-8, EUC-JP/Shift_JIS, ...),
+   4) fast in the case of ASCII characters,
+   5) portability, i.e. don't make unportable assumptions about wchar_t.
+
+   Multibyte characters are only accessed through the mb* macros.
+
+   mb_ptr (mbc)
+     return a pointer to the beginning of the multibyte sequence.
+
+   mb_len (mbc)
+     returns the number of bytes occupied by the multibyte sequence.
+     Always > 0.
+
+   mb_iseq (mbc, sc)
+     returns true if mbc is the standard ASCII character sc.
+
+   mb_isnul (mbc)
+     returns true if mbc is the nul character.
+
+   mb_cmp (mbc1, mbc2)
+     returns a positive, zero, or negative value depending on whether mbc1
+     sorts after, same or before mbc2.
+
+   mb_casecmp (mbc1, mbc2)
+     returns a positive, zero, or negative value depending on whether mbc1
+     sorts after, same or before mbc2, modulo upper/lowercase conversion.
+
+   mb_equal (mbc1, mbc2)
+     returns true if mbc1 and mbc2 are equal.
+
+   mb_caseequal (mbc1, mbc2)
+     returns true if mbc1 and mbc2 are equal modulo upper/lowercase conversion.
+
+   mb_isalnum (mbc)
+     returns true if mbc is alphanumeric.
+
+   mb_isalpha (mbc)
+     returns true if mbc is alphabetic.
+
+   mb_isascii(mbc)
+     returns true if mbc is plain ASCII.
+
+   mb_isblank (mbc)
+     returns true if mbc is a blank.
+
+   mb_iscntrl (mbc)
+     returns true if mbc is a control character.
+
+   mb_isdigit (mbc)
+     returns true if mbc is a decimal digit.
+
+   mb_isgraph (mbc)
+     returns true if mbc is a graphic character.
+
+   mb_islower (mbc)
+     returns true if mbc is lowercase.
+
+   mb_isprint (mbc)
+     returns true if mbc is a printable character.
+
+   mb_ispunct (mbc)
+     returns true if mbc is a punctuation character.
+
+   mb_isspace (mbc)
+     returns true if mbc is a space character.
+
+   mb_isupper (mbc)
+     returns true if mbc is uppercase.
+
+   mb_isxdigit (mbc)
+     returns true if mbc is a hexadecimal digit.
+
+   mb_width (mbc)
+     returns the number of columns on the output device occupied by mbc.
+     Always >= 0.
+
+   mb_putc (mbc, stream)
+     outputs mbc on stream, a byte oriented FILE stream opened for output.
+
+   mb_setascii (&mbc, sc)
+     assigns the standard ASCII character sc to mbc.
+
+   mb_copy (&destmbc, &srcmbc)
+     copies srcmbc to destmbc.
+
+   Here are the function prototypes of the macros.
+
+   extern const char *  mb_ptr (const mbchar_t mbc);
+   extern size_t        mb_len (const mbchar_t mbc);
+   extern bool          mb_iseq (const mbchar_t mbc, char sc);
+   extern bool          mb_isnul (const mbchar_t mbc);
+   extern int           mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2);
+   extern int           mb_casecmp (const mbchar_t mbc1, const mbchar_t mbc2);
+   extern bool          mb_equal (const mbchar_t mbc1, const mbchar_t mbc2);
+   extern bool          mb_caseequal (const mbchar_t mbc1, const mbchar_t mbc2);
+   extern bool          mb_isalnum (const mbchar_t mbc);
+   extern bool          mb_isalpha (const mbchar_t mbc);
+   extern bool          mb_isascii (const mbchar_t mbc);
+   extern bool          mb_isblank (const mbchar_t mbc);
+   extern bool          mb_iscntrl (const mbchar_t mbc);
+   extern bool          mb_isdigit (const mbchar_t mbc);
+   extern bool          mb_isgraph (const mbchar_t mbc);
+   extern bool          mb_islower (const mbchar_t mbc);
+   extern bool          mb_isprint (const mbchar_t mbc);
+   extern bool          mb_ispunct (const mbchar_t mbc);
+   extern bool          mb_isspace (const mbchar_t mbc);
+   extern bool          mb_isupper (const mbchar_t mbc);
+   extern bool          mb_isxdigit (const mbchar_t mbc);
+   extern int           mb_width (const mbchar_t mbc);
+   extern void          mb_putc (const mbchar_t mbc, FILE *stream);
+   extern void          mb_setascii (mbchar_t *new, char sc);
+   extern void          mb_copy (mbchar_t *new, const mbchar_t *old);
+ */
+
+#ifndef _MBCHAR_H
+#define _MBCHAR_H 1
+
+#include <stdbool.h>
+#include <string.h>
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
+   <wchar.h>.  */
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#define MBCHAR_BUF_SIZE 24
+
+struct mbchar
+{
+  const char *ptr;      /* pointer to current character */
+  size_t bytes;         /* number of bytes of current character, > 0 */
+  bool wc_valid;        /* true if wc is a valid wide character */
+  wchar_t wc;           /* if wc_valid: the current character */
+  char buf[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */
+};
+
+/* EOF (not a real character) is represented with bytes = 0 and
+   wc_valid = false.  */
+
+typedef struct mbchar mbchar_t;
+
+/* Access the current character.  */
+#define mb_ptr(mbc) ((mbc).ptr)
+#define mb_len(mbc) ((mbc).bytes)
+
+/* Comparison of characters.  */
+#define mb_iseq(mbc, sc) ((mbc).wc_valid && (mbc).wc == (sc))
+#define mb_isnul(mbc) ((mbc).wc_valid && (mbc).wc == 0)
+#define mb_cmp(mbc1, mbc2) \
+  ((mbc1).wc_valid                                                      \
+   ? ((mbc2).wc_valid                                                   \
+      ? (int) (mbc1).wc - (int) (mbc2).wc                               \
+      : -1)                                                             \
+   : ((mbc2).wc_valid                                                   \
+      ? 1                                                               \
+      : (mbc1).bytes == (mbc2).bytes                                    \
+        ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes)                 \
+        : (mbc1).bytes < (mbc2).bytes                                   \
+          ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \
+          : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1)))
+#define mb_casecmp(mbc1, mbc2) \
+  ((mbc1).wc_valid                                                      \
+   ? ((mbc2).wc_valid                                                   \
+      ? (int) towlower ((mbc1).wc) - (int) towlower ((mbc2).wc)         \
+      : -1)                                                             \
+   : ((mbc2).wc_valid                                                   \
+      ? 1                                                               \
+      : (mbc1).bytes == (mbc2).bytes                                    \
+        ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes)                 \
+        : (mbc1).bytes < (mbc2).bytes                                   \
+          ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \
+          : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1)))
+#define mb_equal(mbc1, mbc2) \
+  ((mbc1).wc_valid && (mbc2).wc_valid                                   \
+   ? (mbc1).wc == (mbc2).wc                                             \
+   : (mbc1).bytes == (mbc2).bytes                                       \
+     && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0)
+#define mb_caseequal(mbc1, mbc2) \
+  ((mbc1).wc_valid && (mbc2).wc_valid                                   \
+   ? towlower ((mbc1).wc) == towlower ((mbc2).wc)                       \
+   : (mbc1).bytes == (mbc2).bytes                                       \
+     && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0)
+
+/* <ctype.h>, <wctype.h> classification.  */
+#define mb_isascii(mbc) \
+  ((mbc).wc_valid && (mbc).wc >= 0 && (mbc).wc <= 127)
+#define mb_isalnum(mbc) ((mbc).wc_valid && iswalnum ((mbc).wc))
+#define mb_isalpha(mbc) ((mbc).wc_valid && iswalpha ((mbc).wc))
+#define mb_isblank(mbc) ((mbc).wc_valid && iswblank ((mbc).wc))
+#define mb_iscntrl(mbc) ((mbc).wc_valid && iswcntrl ((mbc).wc))
+#define mb_isdigit(mbc) ((mbc).wc_valid && iswdigit ((mbc).wc))
+#define mb_isgraph(mbc) ((mbc).wc_valid && iswgraph ((mbc).wc))
+#define mb_islower(mbc) ((mbc).wc_valid && iswlower ((mbc).wc))
+#define mb_isprint(mbc) ((mbc).wc_valid && iswprint ((mbc).wc))
+#define mb_ispunct(mbc) ((mbc).wc_valid && iswpunct ((mbc).wc))
+#define mb_isspace(mbc) ((mbc).wc_valid && iswspace ((mbc).wc))
+#define mb_isupper(mbc) ((mbc).wc_valid && iswupper ((mbc).wc))
+#define mb_isxdigit(mbc) ((mbc).wc_valid && iswxdigit ((mbc).wc))
+
+/* Extra <wchar.h> function.  */
+
+/* Unprintable characters appear as a small box of width 1.  */
+#define MB_UNPRINTABLE_WIDTH 1
+
+static inline int
+mb_width_aux (wint_t wc)
+{
+  int w = wcwidth (wc);
+  /* For unprintable characters, arbitrarily return 0 for control characters
+     and MB_UNPRINTABLE_WIDTH otherwise.  */
+  return (w >= 0 ? w : iswcntrl (wc) ? 0 : MB_UNPRINTABLE_WIDTH);
+}
+
+#define mb_width(mbc) \
+  ((mbc).wc_valid ? mb_width_aux ((mbc).wc) : MB_UNPRINTABLE_WIDTH)
+
+/* Output.  */
+#define mb_putc(mbc, stream)  fwrite ((mbc).ptr, 1, (mbc).bytes, (stream))
+
+/* Assignment.  */
+#define mb_setascii(mbc, sc) \
+  ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \
+   (mbc)->wc = (mbc)->buf[0] = (sc))
+
+/* Copying a character.  */
+static inline void
+mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc)
+{
+  if (old_mbc->ptr == &old_mbc->buf[0])
+    {
+      memcpy (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes);
+      new_mbc->ptr = &new_mbc->buf[0];
+    }
+  else
+    new_mbc->ptr = old_mbc->ptr;
+  new_mbc->bytes = old_mbc->bytes;
+  if ((new_mbc->wc_valid = old_mbc->wc_valid))
+    new_mbc->wc = old_mbc->wc;
+}
+
+
+/* is_basic(c) tests whether the single-byte character c is in the
+   ISO C "basic character set".
+   This is a convenience function, and is in this file only to share code
+   between mbiter_multi.h and mbfile_multi.h.  */
+#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+    && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+    && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+    && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+    && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+    && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+    && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+    && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+    && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+    && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+    && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+    && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+    && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+    && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+    && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+    && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+    && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+    && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+    && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+    && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+    && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+    && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+    && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)
+/* The character set is ISO-646, not EBCDIC. */
+# define IS_BASIC_ASCII 1
+
+extern const unsigned int is_basic_table[];
+
+static inline bool
+is_basic (char c)
+{
+  return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31))
+         & 1;
+}
+
+#else
+
+static inline bool
+is_basic (char c)
+{
+  switch (c)
+    {
+    case '\t': case '\v': case '\f':
+    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 '~':
+      return 1;
+    default:
+      return 0;
+    }
+}
+
+#endif
+
+#endif /* _MBCHAR_H */
diff --git a/gnulib/lib/mbrtowc.c b/gnulib/lib/mbrtowc.c
new file mode 100644 (file)
index 0000000..d9c25cc
--- /dev/null
@@ -0,0 +1,396 @@
+/* Convert multibyte character to wide character.
+   Copyright (C) 1999-2002, 2005-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wchar.h>
+
+#if GNULIB_defined_mbstate_t
+/* Implement mbrtowc() on top of mbtowc().  */
+
+# include <errno.h>
+# include <stdlib.h>
+
+# include "localcharset.h"
+# include "streq.h"
+# include "verify.h"
+
+
+verify (sizeof (mbstate_t) >= 4);
+
+static char internal_state[4];
+
+size_t
+mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
+{
+  char *pstate = (char *)ps;
+
+  if (s == NULL)
+    {
+      pwc = NULL;
+      s = "";
+      n = 1;
+    }
+
+  if (n == 0)
+    return (size_t)(-2);
+
+  /* Here n > 0.  */
+
+  if (pstate == NULL)
+    pstate = internal_state;
+
+  {
+    size_t nstate = pstate[0];
+    char buf[4];
+    const char *p;
+    size_t m;
+
+    switch (nstate)
+      {
+      case 0:
+        p = s;
+        m = n;
+        break;
+      case 3:
+        buf[2] = pstate[3];
+        /*FALLTHROUGH*/
+      case 2:
+        buf[1] = pstate[2];
+        /*FALLTHROUGH*/
+      case 1:
+        buf[0] = pstate[1];
+        p = buf;
+        m = nstate;
+        buf[m++] = s[0];
+        if (n >= 2 && m < 4)
+          {
+            buf[m++] = s[1];
+            if (n >= 3 && m < 4)
+              buf[m++] = s[2];
+          }
+        break;
+      default:
+        errno = EINVAL;
+        return (size_t)(-1);
+      }
+
+    /* Here m > 0.  */
+
+# if __GLIBC__ || defined __UCLIBC__
+    /* Work around bug <http://sourceware.org/bugzilla/show_bug.cgi?id=9674> */
+    mbtowc (NULL, NULL, 0);
+# endif
+    {
+      int res = mbtowc (pwc, p, m);
+
+      if (res >= 0)
+        {
+          if (pwc != NULL && ((*pwc == 0) != (res == 0)))
+            abort ();
+          if (nstate >= (res > 0 ? res : 1))
+            abort ();
+          res -= nstate;
+          pstate[0] = 0;
+          return res;
+        }
+
+      /* mbtowc does not distinguish between invalid and incomplete multibyte
+         sequences.  But mbrtowc needs to make this distinction.
+         There are two possible approaches:
+           - Use iconv() and its return value.
+           - Use built-in knowledge about the possible encodings.
+         Given the low quality of implementation of iconv() on the systems that
+         lack mbrtowc(), we use the second approach.
+         The possible encodings are:
+           - 8-bit encodings,
+           - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS,
+           - UTF-8.
+         Use specialized code for each.  */
+      if (m >= 4 || m >= MB_CUR_MAX)
+        goto invalid;
+      /* Here MB_CUR_MAX > 1 and 0 < m < 4.  */
+      {
+        const char *encoding = locale_charset ();
+
+        if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+          {
+            /* Cf. unistr/u8-mblen.c.  */
+            unsigned char c = (unsigned char) p[0];
+
+            if (c >= 0xc2)
+              {
+                if (c < 0xe0)
+                  {
+                    if (m == 1)
+                      goto incomplete;
+                  }
+                else if (c < 0xf0)
+                  {
+                    if (m == 1)
+                      goto incomplete;
+                    if (m == 2)
+                      {
+                        unsigned char c2 = (unsigned char) p[1];
+
+                        if ((c2 ^ 0x80) < 0x40
+                            && (c >= 0xe1 || c2 >= 0xa0)
+                            && (c != 0xed || c2 < 0xa0))
+                          goto incomplete;
+                      }
+                  }
+                else if (c <= 0xf4)
+                  {
+                    if (m == 1)
+                      goto incomplete;
+                    else /* m == 2 || m == 3 */
+                      {
+                        unsigned char c2 = (unsigned char) p[1];
+
+                        if ((c2 ^ 0x80) < 0x40
+                            && (c >= 0xf1 || c2 >= 0x90)
+                            && (c < 0xf4 || (c == 0xf4 && c2 < 0x90)))
+                          {
+                            if (m == 2)
+                              goto incomplete;
+                            else /* m == 3 */
+                              {
+                                unsigned char c3 = (unsigned char) p[2];
+
+                                if ((c3 ^ 0x80) < 0x40)
+                                  goto incomplete;
+                              }
+                          }
+                      }
+                  }
+              }
+            goto invalid;
+          }
+
+        /* As a reference for this code, you can use the GNU libiconv
+           implementation.  Look for uses of the RET_TOOFEW macro.  */
+
+        if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+          {
+            if (m == 1)
+              {
+                unsigned char c = (unsigned char) p[0];
+
+                if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f)
+                  goto incomplete;
+              }
+            if (m == 2)
+              {
+                unsigned char c = (unsigned char) p[0];
+
+                if (c == 0x8f)
+                  {
+                    unsigned char c2 = (unsigned char) p[1];
+
+                    if (c2 >= 0xa1 && c2 < 0xff)
+                      goto incomplete;
+                  }
+              }
+            goto invalid;
+          }
+        if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+            || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+            || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+          {
+            if (m == 1)
+              {
+                unsigned char c = (unsigned char) p[0];
+
+                if (c >= 0xa1 && c < 0xff)
+                  goto incomplete;
+              }
+            goto invalid;
+          }
+        if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+          {
+            if (m == 1)
+              {
+                unsigned char c = (unsigned char) p[0];
+
+                if ((c >= 0xa1 && c < 0xff) || c == 0x8e)
+                  goto incomplete;
+              }
+            else /* m == 2 || m == 3 */
+              {
+                unsigned char c = (unsigned char) p[0];
+
+                if (c == 0x8e)
+                  goto incomplete;
+              }
+            goto invalid;
+          }
+        if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+          {
+            if (m == 1)
+              {
+                unsigned char c = (unsigned char) p[0];
+
+                if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe))
+                  goto incomplete;
+              }
+            else /* m == 2 || m == 3 */
+              {
+                unsigned char c = (unsigned char) p[0];
+
+                if (c >= 0x90 && c <= 0xe3)
+                  {
+                    unsigned char c2 = (unsigned char) p[1];
+
+                    if (c2 >= 0x30 && c2 <= 0x39)
+                      {
+                        if (m == 2)
+                          goto incomplete;
+                        else /* m == 3 */
+                          {
+                            unsigned char c3 = (unsigned char) p[2];
+
+                            if (c3 >= 0x81 && c3 <= 0xfe)
+                              goto incomplete;
+                          }
+                      }
+                  }
+              }
+            goto invalid;
+          }
+        if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+          {
+            if (m == 1)
+              {
+                unsigned char c = (unsigned char) p[0];
+
+                if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea)
+                    || (c >= 0xf0 && c <= 0xf9))
+                  goto incomplete;
+              }
+            goto invalid;
+          }
+
+        /* An unknown multibyte encoding.  */
+        goto incomplete;
+      }
+
+     incomplete:
+      {
+        size_t k = nstate;
+        /* Here 0 <= k < m < 4.  */
+        pstate[++k] = s[0];
+        if (k < m)
+          {
+            pstate[++k] = s[1];
+            if (k < m)
+              pstate[++k] = s[2];
+          }
+        if (k != m)
+          abort ();
+      }
+      pstate[0] = m;
+      return (size_t)(-2);
+
+     invalid:
+      errno = EILSEQ;
+      /* The conversion state is undefined, says POSIX.  */
+      return (size_t)(-1);
+    }
+  }
+}
+
+#else
+/* Override the system's mbrtowc() function.  */
+
+# undef mbrtowc
+
+size_t
+rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
+{
+# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG
+  if (s == NULL)
+    {
+      pwc = NULL;
+      s = "";
+      n = 1;
+    }
+# endif
+
+# if MBRTOWC_RETVAL_BUG
+  {
+    static mbstate_t internal_state;
+
+    /* Override mbrtowc's internal state.  We can not call mbsinit() on the
+       hidden internal state, but we can call it on our variable.  */
+    if (ps == NULL)
+      ps = &internal_state;
+
+    if (!mbsinit (ps))
+      {
+        /* Parse the rest of the multibyte character byte for byte.  */
+        size_t count = 0;
+        for (; n > 0; s++, n--)
+          {
+            wchar_t wc;
+            size_t ret = mbrtowc (&wc, s, 1, ps);
+
+            if (ret == (size_t)(-1))
+              return (size_t)(-1);
+            count++;
+            if (ret != (size_t)(-2))
+              {
+                /* The multibyte character has been completed.  */
+                if (pwc != NULL)
+                  *pwc = wc;
+                return (wc == 0 ? 0 : count);
+              }
+          }
+        return (size_t)(-2);
+      }
+  }
+# endif
+
+# if MBRTOWC_NUL_RETVAL_BUG
+  {
+    wchar_t wc;
+    size_t ret = mbrtowc (&wc, s, n, ps);
+
+    if (ret != (size_t)(-1) && ret != (size_t)(-2))
+      {
+        if (pwc != NULL)
+          *pwc = wc;
+        if (wc == 0)
+          ret = 0;
+      }
+    return ret;
+  }
+# else
+  {
+#   if MBRTOWC_NULL_ARG1_BUG
+    wchar_t dummy;
+
+    if (pwc == NULL)
+      pwc = &dummy;
+#   endif
+
+    return mbrtowc (pwc, s, n, ps);
+  }
+# endif
+}
+
+#endif
diff --git a/gnulib/lib/mbscasestr.c b/gnulib/lib/mbscasestr.c
new file mode 100644 (file)
index 0000000..f013808
--- /dev/null
@@ -0,0 +1,412 @@
+/* Case-insensitive searching in a string.
+   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2005.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+#include <ctype.h>
+#include <stdbool.h>
+#include <stddef.h>  /* for NULL, in case a nonstandard string.h lacks it */
+
+#include "malloca.h"
+#include "mbuiter.h"
+
+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
+
+/* Knuth-Morris-Pratt algorithm.  */
+#define UNIT unsigned char
+#define CANON_ELEMENT(c) TOLOWER (c)
+#include "str-kmp.h"
+
+/* Knuth-Morris-Pratt algorithm.
+   See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm
+   Return a boolean indicating success:
+   Return true and set *RESULTP if the search was completed.
+   Return false if it was aborted because not enough memory was available.  */
+static bool
+knuth_morris_pratt_multibyte (const char *haystack, const char *needle,
+                              const char **resultp)
+{
+  size_t m = mbslen (needle);
+  mbchar_t *needle_mbchars;
+  size_t *table;
+
+  /* Allocate room for needle_mbchars and the table.  */
+  char *memory = (char *) nmalloca (m, sizeof (mbchar_t) + sizeof (size_t));
+  if (memory == NULL)
+    return false;
+  needle_mbchars = (mbchar_t *) memory;
+  table = (size_t *) (memory + m * sizeof (mbchar_t));
+
+  /* Fill needle_mbchars.  */
+  {
+    mbui_iterator_t iter;
+    size_t j;
+
+    j = 0;
+    for (mbui_init (iter, needle); mbui_avail (iter); mbui_advance (iter), j++)
+      {
+        mb_copy (&needle_mbchars[j], &mbui_cur (iter));
+        if (needle_mbchars[j].wc_valid)
+          needle_mbchars[j].wc = towlower (needle_mbchars[j].wc);
+      }
+  }
+
+  /* Fill the table.
+     For 0 < i < m:
+       0 < table[i] <= i is defined such that
+       forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x],
+       and table[i] is as large as possible with this property.
+     This implies:
+     1) For 0 < i < m:
+          If table[i] < i,
+          needle[table[i]..i-1] = needle[0..i-1-table[i]].
+     2) For 0 < i < m:
+          rhaystack[0..i-1] == needle[0..i-1]
+          and exists h, i <= h < m: rhaystack[h] != needle[h]
+          implies
+          forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1].
+     table[0] remains uninitialized.  */
+  {
+    size_t i, j;
+
+    /* i = 1: Nothing to verify for x = 0.  */
+    table[1] = 1;
+    j = 0;
+
+    for (i = 2; i < m; i++)
+      {
+        /* Here: j = i-1 - table[i-1].
+           The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold
+           for x < table[i-1], by induction.
+           Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1].  */
+        mbchar_t *b = &needle_mbchars[i - 1];
+
+        for (;;)
+          {
+            /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x]
+               is known to hold for x < i-1-j.
+               Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1].  */
+            if (mb_equal (*b, needle_mbchars[j]))
+              {
+                /* Set table[i] := i-1-j.  */
+                table[i] = i - ++j;
+                break;
+              }
+            /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds
+               for x = i-1-j, because
+                 needle[i-1] != needle[j] = needle[i-1-x].  */
+            if (j == 0)
+              {
+                /* The inequality holds for all possible x.  */
+                table[i] = i;
+                break;
+              }
+            /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds
+               for i-1-j < x < i-1-j+table[j], because for these x:
+                 needle[x..i-2]
+                 = needle[x-(i-1-j)..j-1]
+                 != needle[0..j-1-(x-(i-1-j))]  (by definition of table[j])
+                    = needle[0..i-2-x],
+               hence needle[x..i-1] != needle[0..i-1-x].
+               Furthermore
+                 needle[i-1-j+table[j]..i-2]
+                 = needle[table[j]..j-1]
+                 = needle[0..j-1-table[j]]  (by definition of table[j]).  */
+            j = j - table[j];
+          }
+        /* Here: j = i - table[i].  */
+      }
+  }
+
+  /* Search, using the table to accelerate the processing.  */
+  {
+    size_t j;
+    mbui_iterator_t rhaystack;
+    mbui_iterator_t phaystack;
+
+    *resultp = NULL;
+    j = 0;
+    mbui_init (rhaystack, haystack);
+    mbui_init (phaystack, haystack);
+    /* Invariant: phaystack = rhaystack + j.  */
+    while (mbui_avail (phaystack))
+      {
+        mbchar_t c;
+
+        mb_copy (&c, &mbui_cur (phaystack));
+        if (c.wc_valid)
+          c.wc = towlower (c.wc);
+        if (mb_equal (needle_mbchars[j], c))
+          {
+            j++;
+            mbui_advance (phaystack);
+            if (j == m)
+              {
+                /* The entire needle has been found.  */
+                *resultp = mbui_cur_ptr (rhaystack);
+                break;
+              }
+          }
+        else if (j > 0)
+          {
+            /* Found a match of needle[0..j-1], mismatch at needle[j].  */
+            size_t count = table[j];
+            j -= count;
+            for (; count > 0; count--)
+              {
+                if (!mbui_avail (rhaystack))
+                  abort ();
+                mbui_advance (rhaystack);
+              }
+          }
+        else
+          {
+            /* Found a mismatch at needle[0] already.  */
+            if (!mbui_avail (rhaystack))
+              abort ();
+            mbui_advance (rhaystack);
+            mbui_advance (phaystack);
+          }
+      }
+  }
+
+  freea (memory);
+  return true;
+}
+
+/* Find the first occurrence of the character string NEEDLE in the character
+   string HAYSTACK, using case-insensitive comparison.
+   Note: This function may, in multibyte locales, return success even if
+   strlen (haystack) < strlen (needle) !  */
+char *
+mbscasestr (const char *haystack, const char *needle)
+{
+  /* Be careful not to look at the entire extent of haystack or needle
+     until needed.  This is useful because of these two cases:
+       - haystack may be very long, and a match of needle found early,
+       - needle may be very long, and not even a short initial segment of
+         needle may be found in haystack.  */
+  if (MB_CUR_MAX > 1)
+    {
+      mbui_iterator_t iter_needle;
+
+      mbui_init (iter_needle, needle);
+      if (mbui_avail (iter_needle))
+        {
+          /* Minimizing the worst-case complexity:
+             Let n = mbslen(haystack), m = mbslen(needle).
+             The naïve algorithm is O(n*m) worst-case.
+             The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a
+             memory allocation.
+             To achieve linear complexity and yet amortize the cost of the
+             memory allocation, we activate the Knuth-Morris-Pratt algorithm
+             only once the naïve algorithm has already run for some time; more
+             precisely, when
+               - the outer loop count is >= 10,
+               - the average number of comparisons per outer loop is >= 5,
+               - the total number of comparisons is >= m.
+             But we try it only once.  If the memory allocation attempt failed,
+             we don't retry it.  */
+          bool try_kmp = true;
+          size_t outer_loop_count = 0;
+          size_t comparison_count = 0;
+          size_t last_ccount = 0;                  /* last comparison count */
+          mbui_iterator_t iter_needle_last_ccount; /* = needle + last_ccount */
+
+          mbchar_t b;
+          mbui_iterator_t iter_haystack;
+
+          mbui_init (iter_needle_last_ccount, needle);
+
+          mb_copy (&b, &mbui_cur (iter_needle));
+          if (b.wc_valid)
+            b.wc = towlower (b.wc);
+
+          mbui_init (iter_haystack, haystack);
+          for (;; mbui_advance (iter_haystack))
+            {
+              mbchar_t c;
+
+              if (!mbui_avail (iter_haystack))
+                /* No match.  */
+                return NULL;
+
+              /* See whether it's advisable to use an asymptotically faster
+                 algorithm.  */
+              if (try_kmp
+                  && outer_loop_count >= 10
+                  && comparison_count >= 5 * outer_loop_count)
+                {
+                  /* See if needle + comparison_count now reaches the end of
+                     needle.  */
+                  size_t count = comparison_count - last_ccount;
+                  for (;
+                       count > 0 && mbui_avail (iter_needle_last_ccount);
+                       count--)
+                    mbui_advance (iter_needle_last_ccount);
+                  last_ccount = comparison_count;
+                  if (!mbui_avail (iter_needle_last_ccount))
+                    {
+                      /* Try the Knuth-Morris-Pratt algorithm.  */
+                      const char *result;
+                      bool success =
+                        knuth_morris_pratt_multibyte (haystack, needle,
+                                                      &result);
+                      if (success)
+                        return (char *) result;
+                      try_kmp = false;
+                    }
+                }
+
+              outer_loop_count++;
+              comparison_count++;
+              mb_copy (&c, &mbui_cur (iter_haystack));
+              if (c.wc_valid)
+                c.wc = towlower (c.wc);
+              if (mb_equal (c, b))
+                /* The first character matches.  */
+                {
+                  mbui_iterator_t rhaystack;
+                  mbui_iterator_t rneedle;
+
+                  memcpy (&rhaystack, &iter_haystack, sizeof (mbui_iterator_t));
+                  mbui_advance (rhaystack);
+
+                  mbui_init (rneedle, needle);
+                  if (!mbui_avail (rneedle))
+                    abort ();
+                  mbui_advance (rneedle);
+
+                  for (;; mbui_advance (rhaystack), mbui_advance (rneedle))
+                    {
+                      if (!mbui_avail (rneedle))
+                        /* Found a match.  */
+                        return (char *) mbui_cur_ptr (iter_haystack);
+                      if (!mbui_avail (rhaystack))
+                        /* No match.  */
+                        return NULL;
+                      comparison_count++;
+                      if (!mb_caseequal (mbui_cur (rhaystack),
+                                         mbui_cur (rneedle)))
+                        /* Nothing in this round.  */
+                        break;
+                    }
+                }
+            }
+        }
+      else
+        return (char *) haystack;
+    }
+  else
+    {
+      if (*needle != '\0')
+        {
+          /* Minimizing the worst-case complexity:
+             Let n = strlen(haystack), m = strlen(needle).
+             The naïve algorithm is O(n*m) worst-case.
+             The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a
+             memory allocation.
+             To achieve linear complexity and yet amortize the cost of the
+             memory allocation, we activate the Knuth-Morris-Pratt algorithm
+             only once the naïve algorithm has already run for some time; more
+             precisely, when
+               - the outer loop count is >= 10,
+               - the average number of comparisons per outer loop is >= 5,
+               - the total number of comparisons is >= m.
+             But we try it only once.  If the memory allocation attempt failed,
+             we don't retry it.  */
+          bool try_kmp = true;
+          size_t outer_loop_count = 0;
+          size_t comparison_count = 0;
+          size_t last_ccount = 0;                  /* last comparison count */
+          const char *needle_last_ccount = needle; /* = needle + last_ccount */
+
+          /* Speed up the following searches of needle by caching its first
+             character.  */
+          unsigned char b = TOLOWER ((unsigned char) *needle);
+
+          needle++;
+          for (;; haystack++)
+            {
+              if (*haystack == '\0')
+                /* No match.  */
+                return NULL;
+
+              /* See whether it's advisable to use an asymptotically faster
+                 algorithm.  */
+              if (try_kmp
+                  && outer_loop_count >= 10
+                  && comparison_count >= 5 * outer_loop_count)
+                {
+                  /* See if needle + comparison_count now reaches the end of
+                     needle.  */
+                  if (needle_last_ccount != NULL)
+                    {
+                      needle_last_ccount +=
+                        strnlen (needle_last_ccount,
+                                 comparison_count - last_ccount);
+                      if (*needle_last_ccount == '\0')
+                        needle_last_ccount = NULL;
+                      last_ccount = comparison_count;
+                    }
+                  if (needle_last_ccount == NULL)
+                    {
+                      /* Try the Knuth-Morris-Pratt algorithm.  */
+                      const unsigned char *result;
+                      bool success =
+                        knuth_morris_pratt ((const unsigned char *) haystack,
+                                            (const unsigned char *) (needle - 1),
+                                            strlen (needle - 1),
+                                            &result);
+                      if (success)
+                        return (char *) result;
+                      try_kmp = false;
+                    }
+                }
+
+              outer_loop_count++;
+              comparison_count++;
+              if (TOLOWER ((unsigned char) *haystack) == b)
+                /* The first character matches.  */
+                {
+                  const char *rhaystack = haystack + 1;
+                  const char *rneedle = needle;
+
+                  for (;; rhaystack++, rneedle++)
+                    {
+                      if (*rneedle == '\0')
+                        /* Found a match.  */
+                        return (char *) haystack;
+                      if (*rhaystack == '\0')
+                        /* No match.  */
+                        return NULL;
+                      comparison_count++;
+                      if (TOLOWER ((unsigned char) *rhaystack)
+                          != TOLOWER ((unsigned char) *rneedle))
+                        /* Nothing in this round.  */
+                        break;
+                    }
+                }
+            }
+        }
+      else
+        return (char *) haystack;
+    }
+}
diff --git a/gnulib/lib/mbsinit.c b/gnulib/lib/mbsinit.c
new file mode 100644 (file)
index 0000000..8ac2137
--- /dev/null
@@ -0,0 +1,61 @@
+/* Test for initial conversion state.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wchar.h>
+
+#include "verify.h"
+
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+
+/* On native Windows, 'mbstate_t' is defined as 'int'.  */
+
+int
+mbsinit (const mbstate_t *ps)
+{
+  return ps == NULL || *ps == 0;
+}
+
+#else
+
+/* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs()
+   and wcrtomb(), wcsrtombs().
+   We assume that
+     - sizeof (mbstate_t) >= 4,
+     - only stateless encodings are supported (such as UTF-8 and EUC-JP, but
+       not ISO-2022 variants),
+     - for each encoding, the number of bytes for a wide character is <= 4.
+       (This maximum is attained for UTF-8, GB18030, EUC-TW.)
+   We define the meaning of mbstate_t as follows:
+     - In mb -> wc direction, mbstate_t's first byte contains the number of
+       buffered bytes (in the range 0..3), followed by up to 3 buffered bytes.
+     - In wc -> mb direction, mbstate_t contains no information. In other
+       words, it is always in the initial state.  */
+
+verify (sizeof (mbstate_t) >= 4);
+
+int
+mbsinit (const mbstate_t *ps)
+{
+  const char *pstate = (const char *)ps;
+
+  return pstate == NULL || pstate[0] == 0;
+}
+
+#endif
diff --git a/gnulib/lib/mbslen.c b/gnulib/lib/mbslen.c
new file mode 100644 (file)
index 0000000..efddd52
--- /dev/null
@@ -0,0 +1,44 @@
+/* Counting the multibyte characters in a string.
+   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+#include <stdlib.h>
+
+#include "mbuiter.h"
+
+/* Return the number of multibyte characters in the character string STRING.  */
+size_t
+mbslen (const char *string)
+{
+  if (MB_CUR_MAX > 1)
+    {
+      size_t count;
+      mbui_iterator_t iter;
+
+      count = 0;
+      for (mbui_init (iter, string); mbui_avail (iter); mbui_advance (iter))
+        count++;
+
+      return count;
+    }
+  else
+    return strlen (string);
+}
diff --git a/gnulib/lib/mbsrtowcs-impl.h b/gnulib/lib/mbsrtowcs-impl.h
new file mode 100644 (file)
index 0000000..e78bbfb
--- /dev/null
@@ -0,0 +1,122 @@
+/* Convert string to wide string.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+   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/>.  */
+
+size_t
+mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+{
+  if (ps == NULL)
+    ps = &_gl_mbsrtowcs_state;
+  {
+    const char *src = *srcp;
+
+    if (dest != NULL)
+      {
+        wchar_t *destptr = dest;
+
+        for (; len > 0; destptr++, len--)
+          {
+            size_t src_avail;
+            size_t ret;
+
+            /* An optimized variant of
+               src_avail = strnlen1 (src, MB_LEN_MAX);  */
+            if (src[0] == '\0')
+              src_avail = 1;
+            else if (src[1] == '\0')
+              src_avail = 2;
+            else if (src[2] == '\0')
+              src_avail = 3;
+            else if (MB_LEN_MAX <= 4 || src[3] == '\0')
+              src_avail = 4;
+            else
+              src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4);
+
+            /* Parse the next multibyte character.  */
+            ret = mbrtowc (destptr, src, src_avail, ps);
+
+            if (ret == (size_t)(-2))
+              /* Encountered a multibyte character that extends past a '\0' byte
+                 or that is longer than MB_LEN_MAX bytes.  Cannot happen.  */
+              abort ();
+
+            if (ret == (size_t)(-1))
+              goto bad_input;
+            if (ret == 0)
+              {
+                src = NULL;
+                /* Here mbsinit (ps).  */
+                break;
+              }
+            src += ret;
+          }
+
+        *srcp = src;
+        return destptr - dest;
+      }
+    else
+      {
+        /* Ignore dest and len, don't store *srcp at the end, and
+           don't clobber *ps.  */
+        mbstate_t state = *ps;
+        size_t totalcount = 0;
+
+        for (;; totalcount++)
+          {
+            size_t src_avail;
+            size_t ret;
+
+            /* An optimized variant of
+               src_avail = strnlen1 (src, MB_LEN_MAX);  */
+            if (src[0] == '\0')
+              src_avail = 1;
+            else if (src[1] == '\0')
+              src_avail = 2;
+            else if (src[2] == '\0')
+              src_avail = 3;
+            else if (MB_LEN_MAX <= 4 || src[3] == '\0')
+              src_avail = 4;
+            else
+              src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4);
+
+            /* Parse the next multibyte character.  */
+            ret = mbrtowc (NULL, src, src_avail, &state);
+
+            if (ret == (size_t)(-2))
+              /* Encountered a multibyte character that extends past a '\0' byte
+                 or that is longer than MB_LEN_MAX bytes.  Cannot happen.  */
+              abort ();
+
+            if (ret == (size_t)(-1))
+              goto bad_input2;
+            if (ret == 0)
+              {
+                /* Here mbsinit (&state).  */
+                break;
+              }
+            src += ret;
+          }
+
+        return totalcount;
+      }
+
+   bad_input:
+    *srcp = src;
+   bad_input2:
+    errno = EILSEQ;
+    return (size_t)(-1);
+  }
+}
diff --git a/gnulib/lib/mbsrtowcs-state.c b/gnulib/lib/mbsrtowcs-state.c
new file mode 100644 (file)
index 0000000..91073b5
--- /dev/null
@@ -0,0 +1,37 @@
+/* Convert string to wide string.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+   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/>.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+/* Internal state used by the functions mbsrtowcs() and mbsnrtowcs().  */
+mbstate_t _gl_mbsrtowcs_state
+/* The state must initially be in the "initial state"; so, zero-initialize it.
+   On most systems, putting it into BSS is sufficient.  Not so on MacOS X 10.3,
+   see <http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>.
+   When it needs an initializer, use 0 or {0} as initializer? 0 only works
+   when mbstate_t is a scalar type (such as when gnulib defines it, or on
+   AIX, IRIX, mingw). {0} works as an initializer in all cases: for a struct
+   or union type, but also for a scalar type (ISO C 99, 6.7.8.(11)).  */
+#if defined __ELF__
+  /* On ELF systems, variables in BSS behave well.  */
+#else
+  /* Use braces, to be on the safe side.  */
+  = { 0 }
+#endif
+  ;
diff --git a/gnulib/lib/mbsrtowcs.c b/gnulib/lib/mbsrtowcs.c
new file mode 100644 (file)
index 0000000..69e6dff
--- /dev/null
@@ -0,0 +1,32 @@
+/* Convert string to wide string.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wchar.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+
+#include "strnlen1.h"
+
+
+extern mbstate_t _gl_mbsrtowcs_state;
+
+#include "mbsrtowcs-impl.h"
diff --git a/gnulib/lib/mbsstr.c b/gnulib/lib/mbsstr.c
new file mode 100644 (file)
index 0000000..611000e
--- /dev/null
@@ -0,0 +1,382 @@
+/* Searching in a string.
+   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2005.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+#include <stdbool.h>
+#include <stddef.h>  /* for NULL, in case a nonstandard string.h lacks it */
+
+#include "malloca.h"
+#include "mbuiter.h"
+
+/* Knuth-Morris-Pratt algorithm.  */
+#define UNIT unsigned char
+#define CANON_ELEMENT(c) c
+#include "str-kmp.h"
+
+/* Knuth-Morris-Pratt algorithm.
+   See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm
+   Return a boolean indicating success:
+   Return true and set *RESULTP if the search was completed.
+   Return false if it was aborted because not enough memory was available.  */
+static bool
+knuth_morris_pratt_multibyte (const char *haystack, const char *needle,
+                              const char **resultp)
+{
+  size_t m = mbslen (needle);
+  mbchar_t *needle_mbchars;
+  size_t *table;
+
+  /* Allocate room for needle_mbchars and the table.  */
+  char *memory = (char *) nmalloca (m, sizeof (mbchar_t) + sizeof (size_t));
+  if (memory == NULL)
+    return false;
+  needle_mbchars = (mbchar_t *) memory;
+  table = (size_t *) (memory + m * sizeof (mbchar_t));
+
+  /* Fill needle_mbchars.  */
+  {
+    mbui_iterator_t iter;
+    size_t j;
+
+    j = 0;
+    for (mbui_init (iter, needle); mbui_avail (iter); mbui_advance (iter), j++)
+      mb_copy (&needle_mbchars[j], &mbui_cur (iter));
+  }
+
+  /* Fill the table.
+     For 0 < i < m:
+       0 < table[i] <= i is defined such that
+       forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x],
+       and table[i] is as large as possible with this property.
+     This implies:
+     1) For 0 < i < m:
+          If table[i] < i,
+          needle[table[i]..i-1] = needle[0..i-1-table[i]].
+     2) For 0 < i < m:
+          rhaystack[0..i-1] == needle[0..i-1]
+          and exists h, i <= h < m: rhaystack[h] != needle[h]
+          implies
+          forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1].
+     table[0] remains uninitialized.  */
+  {
+    size_t i, j;
+
+    /* i = 1: Nothing to verify for x = 0.  */
+    table[1] = 1;
+    j = 0;
+
+    for (i = 2; i < m; i++)
+      {
+        /* Here: j = i-1 - table[i-1].
+           The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold
+           for x < table[i-1], by induction.
+           Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1].  */
+        mbchar_t *b = &needle_mbchars[i - 1];
+
+        for (;;)
+          {
+            /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x]
+               is known to hold for x < i-1-j.
+               Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1].  */
+            if (mb_equal (*b, needle_mbchars[j]))
+              {
+                /* Set table[i] := i-1-j.  */
+                table[i] = i - ++j;
+                break;
+              }
+            /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds
+               for x = i-1-j, because
+                 needle[i-1] != needle[j] = needle[i-1-x].  */
+            if (j == 0)
+              {
+                /* The inequality holds for all possible x.  */
+                table[i] = i;
+                break;
+              }
+            /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds
+               for i-1-j < x < i-1-j+table[j], because for these x:
+                 needle[x..i-2]
+                 = needle[x-(i-1-j)..j-1]
+                 != needle[0..j-1-(x-(i-1-j))]  (by definition of table[j])
+                    = needle[0..i-2-x],
+               hence needle[x..i-1] != needle[0..i-1-x].
+               Furthermore
+                 needle[i-1-j+table[j]..i-2]
+                 = needle[table[j]..j-1]
+                 = needle[0..j-1-table[j]]  (by definition of table[j]).  */
+            j = j - table[j];
+          }
+        /* Here: j = i - table[i].  */
+      }
+  }
+
+  /* Search, using the table to accelerate the processing.  */
+  {
+    size_t j;
+    mbui_iterator_t rhaystack;
+    mbui_iterator_t phaystack;
+
+    *resultp = NULL;
+    j = 0;
+    mbui_init (rhaystack, haystack);
+    mbui_init (phaystack, haystack);
+    /* Invariant: phaystack = rhaystack + j.  */
+    while (mbui_avail (phaystack))
+      if (mb_equal (needle_mbchars[j], mbui_cur (phaystack)))
+        {
+          j++;
+          mbui_advance (phaystack);
+          if (j == m)
+            {
+              /* The entire needle has been found.  */
+              *resultp = mbui_cur_ptr (rhaystack);
+              break;
+            }
+        }
+      else if (j > 0)
+        {
+          /* Found a match of needle[0..j-1], mismatch at needle[j].  */
+          size_t count = table[j];
+          j -= count;
+          for (; count > 0; count--)
+            {
+              if (!mbui_avail (rhaystack))
+                abort ();
+              mbui_advance (rhaystack);
+            }
+        }
+      else
+        {
+          /* Found a mismatch at needle[0] already.  */
+          if (!mbui_avail (rhaystack))
+            abort ();
+          mbui_advance (rhaystack);
+          mbui_advance (phaystack);
+        }
+  }
+
+  freea (memory);
+  return true;
+}
+
+/* Find the first occurrence of the character string NEEDLE in the character
+   string HAYSTACK.  Return NULL if NEEDLE is not found in HAYSTACK.  */
+char *
+mbsstr (const char *haystack, const char *needle)
+{
+  /* Be careful not to look at the entire extent of haystack or needle
+     until needed.  This is useful because of these two cases:
+       - haystack may be very long, and a match of needle found early,
+       - needle may be very long, and not even a short initial segment of
+         needle may be found in haystack.  */
+  if (MB_CUR_MAX > 1)
+    {
+      mbui_iterator_t iter_needle;
+
+      mbui_init (iter_needle, needle);
+      if (mbui_avail (iter_needle))
+        {
+          /* Minimizing the worst-case complexity:
+             Let n = mbslen(haystack), m = mbslen(needle).
+             The naïve algorithm is O(n*m) worst-case.
+             The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a
+             memory allocation.
+             To achieve linear complexity and yet amortize the cost of the
+             memory allocation, we activate the Knuth-Morris-Pratt algorithm
+             only once the naïve algorithm has already run for some time; more
+             precisely, when
+               - the outer loop count is >= 10,
+               - the average number of comparisons per outer loop is >= 5,
+               - the total number of comparisons is >= m.
+             But we try it only once.  If the memory allocation attempt failed,
+             we don't retry it.  */
+          bool try_kmp = true;
+          size_t outer_loop_count = 0;
+          size_t comparison_count = 0;
+          size_t last_ccount = 0;                  /* last comparison count */
+          mbui_iterator_t iter_needle_last_ccount; /* = needle + last_ccount */
+
+          mbui_iterator_t iter_haystack;
+
+          mbui_init (iter_needle_last_ccount, needle);
+          mbui_init (iter_haystack, haystack);
+          for (;; mbui_advance (iter_haystack))
+            {
+              if (!mbui_avail (iter_haystack))
+                /* No match.  */
+                return NULL;
+
+              /* See whether it's advisable to use an asymptotically faster
+                 algorithm.  */
+              if (try_kmp
+                  && outer_loop_count >= 10
+                  && comparison_count >= 5 * outer_loop_count)
+                {
+                  /* See if needle + comparison_count now reaches the end of
+                     needle.  */
+                  size_t count = comparison_count - last_ccount;
+                  for (;
+                       count > 0 && mbui_avail (iter_needle_last_ccount);
+                       count--)
+                    mbui_advance (iter_needle_last_ccount);
+                  last_ccount = comparison_count;
+                  if (!mbui_avail (iter_needle_last_ccount))
+                    {
+                      /* Try the Knuth-Morris-Pratt algorithm.  */
+                      const char *result;
+                      bool success =
+                        knuth_morris_pratt_multibyte (haystack, needle,
+                                                      &result);
+                      if (success)
+                        return (char *) result;
+                      try_kmp = false;
+                    }
+                }
+
+              outer_loop_count++;
+              comparison_count++;
+              if (mb_equal (mbui_cur (iter_haystack), mbui_cur (iter_needle)))
+                /* The first character matches.  */
+                {
+                  mbui_iterator_t rhaystack;
+                  mbui_iterator_t rneedle;
+
+                  memcpy (&rhaystack, &iter_haystack, sizeof (mbui_iterator_t));
+                  mbui_advance (rhaystack);
+
+                  mbui_init (rneedle, needle);
+                  if (!mbui_avail (rneedle))
+                    abort ();
+                  mbui_advance (rneedle);
+
+                  for (;; mbui_advance (rhaystack), mbui_advance (rneedle))
+                    {
+                      if (!mbui_avail (rneedle))
+                        /* Found a match.  */
+                        return (char *) mbui_cur_ptr (iter_haystack);
+                      if (!mbui_avail (rhaystack))
+                        /* No match.  */
+                        return NULL;
+                      comparison_count++;
+                      if (!mb_equal (mbui_cur (rhaystack), mbui_cur (rneedle)))
+                        /* Nothing in this round.  */
+                        break;
+                    }
+                }
+            }
+        }
+      else
+        return (char *) haystack;
+    }
+  else
+    {
+      if (*needle != '\0')
+        {
+          /* Minimizing the worst-case complexity:
+             Let n = strlen(haystack), m = strlen(needle).
+             The naïve algorithm is O(n*m) worst-case.
+             The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a
+             memory allocation.
+             To achieve linear complexity and yet amortize the cost of the
+             memory allocation, we activate the Knuth-Morris-Pratt algorithm
+             only once the naïve algorithm has already run for some time; more
+             precisely, when
+               - the outer loop count is >= 10,
+               - the average number of comparisons per outer loop is >= 5,
+               - the total number of comparisons is >= m.
+             But we try it only once.  If the memory allocation attempt failed,
+             we don't retry it.  */
+          bool try_kmp = true;
+          size_t outer_loop_count = 0;
+          size_t comparison_count = 0;
+          size_t last_ccount = 0;                  /* last comparison count */
+          const char *needle_last_ccount = needle; /* = needle + last_ccount */
+
+          /* Speed up the following searches of needle by caching its first
+             character.  */
+          char b = *needle++;
+
+          for (;; haystack++)
+            {
+              if (*haystack == '\0')
+                /* No match.  */
+                return NULL;
+
+              /* See whether it's advisable to use an asymptotically faster
+                 algorithm.  */
+              if (try_kmp
+                  && outer_loop_count >= 10
+                  && comparison_count >= 5 * outer_loop_count)
+                {
+                  /* See if needle + comparison_count now reaches the end of
+                     needle.  */
+                  if (needle_last_ccount != NULL)
+                    {
+                      needle_last_ccount +=
+                        strnlen (needle_last_ccount,
+                                 comparison_count - last_ccount);
+                      if (*needle_last_ccount == '\0')
+                        needle_last_ccount = NULL;
+                      last_ccount = comparison_count;
+                    }
+                  if (needle_last_ccount == NULL)
+                    {
+                      /* Try the Knuth-Morris-Pratt algorithm.  */
+                      const unsigned char *result;
+                      bool success =
+                        knuth_morris_pratt ((const unsigned char *) haystack,
+                                            (const unsigned char *) (needle - 1),
+                                            strlen (needle - 1),
+                                            &result);
+                      if (success)
+                        return (char *) result;
+                      try_kmp = false;
+                    }
+                }
+
+              outer_loop_count++;
+              comparison_count++;
+              if (*haystack == b)
+                /* The first character matches.  */
+                {
+                  const char *rhaystack = haystack + 1;
+                  const char *rneedle = needle;
+
+                  for (;; rhaystack++, rneedle++)
+                    {
+                      if (*rneedle == '\0')
+                        /* Found a match.  */
+                        return (char *) haystack;
+                      if (*rhaystack == '\0')
+                        /* No match.  */
+                        return NULL;
+                      comparison_count++;
+                      if (*rhaystack != *rneedle)
+                        /* Nothing in this round.  */
+                        break;
+                    }
+                }
+            }
+        }
+      else
+        return (char *) haystack;
+    }
+}
diff --git a/gnulib/lib/mbtowc-impl.h b/gnulib/lib/mbtowc-impl.h
new file mode 100644 (file)
index 0000000..1645eb5
--- /dev/null
@@ -0,0 +1,44 @@
+/* Convert multibyte character to wide character.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2011.
+
+   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/>.  */
+
+/* We don't need a static internal state, because the encoding is not state
+   dependent, and when mbrtowc returns (size_t)(-2). we throw the result
+   away. */
+
+int
+mbtowc (wchar_t *pwc, const char *s, size_t n)
+{
+  if (s == NULL)
+    return 0;
+  else
+    {
+      mbstate_t state;
+      wchar_t wc;
+      size_t result;
+
+      memset (&state, 0, sizeof (mbstate_t));
+      result = mbrtowc (&wc, s, n, &state);
+      if (result == (size_t)-1 || result == (size_t)-2)
+        {
+          errno = EILSEQ;
+          return -1;
+        }
+      if (pwc != NULL)
+        *pwc = wc;
+      return (wc == 0 ? 0 : result);
+    }
+}
diff --git a/gnulib/lib/mbtowc.c b/gnulib/lib/mbtowc.c
new file mode 100644 (file)
index 0000000..b3848a1
--- /dev/null
@@ -0,0 +1,26 @@
+/* Convert multibyte character to wide character.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2011.
+
+   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/>.  */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include <errno.h>
+#include <string.h>
+#include <wchar.h>
+
+#include "mbtowc-impl.h"
diff --git a/gnulib/lib/mbuiter.h b/gnulib/lib/mbuiter.h
new file mode 100644 (file)
index 0000000..178f36e
--- /dev/null
@@ -0,0 +1,222 @@
+/* Iterating through multibyte strings: macros for multi-byte encodings.
+   Copyright (C) 2001, 2005, 2007, 2009-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 Bruno Haible <bruno@clisp.org>.  */
+
+/* The macros in this file implement forward iteration through a
+   multi-byte string, without knowing its length a-priori.
+
+   With these macros, an iteration loop that looks like
+
+      char *iter;
+      for (iter = buf; *iter != '\0'; iter++)
+        {
+          do_something (*iter);
+        }
+
+   becomes
+
+      mbui_iterator_t iter;
+      for (mbui_init (iter, buf); mbui_avail (iter); mbui_advance (iter))
+        {
+          do_something (mbui_cur_ptr (iter), mb_len (mbui_cur (iter)));
+        }
+
+   The benefit of these macros over plain use of mbrtowc is:
+   - Handling of invalid multibyte sequences is possible without
+     making the code more complicated, while still preserving the
+     invalid multibyte sequences.
+
+   Compared to mbiter.h, the macros here don't need to know the string's
+   length a-priori.  The downside is that at each step, the look-ahead
+   that guards against overrunning the terminating '\0' is more expensive.
+   The mbui_* macros are therefore suitable when there is a high probability
+   that only the first few multibyte characters need to be inspected.
+   Whereas the mbi_* macros are better if usually the iteration runs
+   through the entire string.
+
+   mbui_iterator_t
+     is a type usable for variable declarations.
+
+   mbui_init (iter, startptr)
+     initializes the iterator, starting at startptr.
+
+   mbui_avail (iter)
+     returns true if there are more multibyte chracters available before
+     the end of string is reached. In this case, mbui_cur (iter) is
+     initialized to the next multibyte chracter.
+
+   mbui_advance (iter)
+     advances the iterator by one multibyte character.
+
+   mbui_cur (iter)
+     returns the current multibyte character, of type mbchar_t.  All the
+     macros defined in mbchar.h can be used on it.
+
+   mbui_cur_ptr (iter)
+     return a pointer to the beginning of the current multibyte character.
+
+   mbui_reloc (iter, ptrdiff)
+     relocates iterator when the string is moved by ptrdiff bytes.
+
+   mbui_copy (&destiter, &srciter)
+     copies srciter to destiter.
+
+   Here are the function prototypes of the macros.
+
+   extern void          mbui_init (mbui_iterator_t iter, const char *startptr);
+   extern bool          mbui_avail (mbui_iterator_t iter);
+   extern void          mbui_advance (mbui_iterator_t iter);
+   extern mbchar_t      mbui_cur (mbui_iterator_t iter);
+   extern const char *  mbui_cur_ptr (mbui_iterator_t iter);
+   extern void          mbui_reloc (mbui_iterator_t iter, ptrdiff_t ptrdiff);
+   extern void          mbui_copy (mbui_iterator_t *new, const mbui_iterator_t *old);
+ */
+
+#ifndef _MBUITER_H
+#define _MBUITER_H 1
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
+   <wchar.h>.  */
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+#include "mbchar.h"
+#include "strnlen1.h"
+
+struct mbuiter_multi
+{
+  bool in_shift;        /* true if next byte may not be interpreted as ASCII */
+  mbstate_t state;      /* if in_shift: current shift state */
+  bool next_done;       /* true if mbui_avail has already filled the following */
+  struct mbchar cur;    /* the current character:
+        const char *cur.ptr             pointer to current character
+        The following are only valid after mbui_avail.
+        size_t cur.bytes                number of bytes of current character
+        bool cur.wc_valid               true if wc is a valid wide character
+        wchar_t cur.wc                  if wc_valid: the current character
+        */
+};
+
+static inline void
+mbuiter_multi_next (struct mbuiter_multi *iter)
+{
+  if (iter->next_done)
+    return;
+  if (iter->in_shift)
+    goto with_shift;
+  /* Handle most ASCII characters quickly, without calling mbrtowc().  */
+  if (is_basic (*iter->cur.ptr))
+    {
+      /* These characters are part of the basic character set.  ISO C 99
+         guarantees that their wide character code is identical to their
+         char code.  */
+      iter->cur.bytes = 1;
+      iter->cur.wc = *iter->cur.ptr;
+      iter->cur.wc_valid = true;
+    }
+  else
+    {
+      assert (mbsinit (&iter->state));
+      iter->in_shift = true;
+    with_shift:
+      iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr,
+                                 strnlen1 (iter->cur.ptr, MB_CUR_MAX),
+                                 &iter->state);
+      if (iter->cur.bytes == (size_t) -1)
+        {
+          /* An invalid multibyte sequence was encountered.  */
+          iter->cur.bytes = 1;
+          iter->cur.wc_valid = false;
+          /* Whether to set iter->in_shift = false and reset iter->state
+             or not is not very important; the string is bogus anyway.  */
+        }
+      else if (iter->cur.bytes == (size_t) -2)
+        {
+          /* An incomplete multibyte character at the end.  */
+          iter->cur.bytes = strlen (iter->cur.ptr);
+          iter->cur.wc_valid = false;
+          /* Whether to set iter->in_shift = false and reset iter->state
+             or not is not important; the string end is reached anyway.  */
+        }
+      else
+        {
+          if (iter->cur.bytes == 0)
+            {
+              /* A null wide character was encountered.  */
+              iter->cur.bytes = 1;
+              assert (*iter->cur.ptr == '\0');
+              assert (iter->cur.wc == 0);
+            }
+          iter->cur.wc_valid = true;
+
+          /* When in the initial state, we can go back treating ASCII
+             characters more quickly.  */
+          if (mbsinit (&iter->state))
+            iter->in_shift = false;
+        }
+    }
+  iter->next_done = true;
+}
+
+static inline void
+mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff)
+{
+  iter->cur.ptr += ptrdiff;
+}
+
+static inline void
+mbuiter_multi_copy (struct mbuiter_multi *new_iter, const struct mbuiter_multi *old_iter)
+{
+  if ((new_iter->in_shift = old_iter->in_shift))
+    memcpy (&new_iter->state, &old_iter->state, sizeof (mbstate_t));
+  else
+    memset (&new_iter->state, 0, sizeof (mbstate_t));
+  new_iter->next_done = old_iter->next_done;
+  mb_copy (&new_iter->cur, &old_iter->cur);
+}
+
+/* Iteration macros.  */
+typedef struct mbuiter_multi mbui_iterator_t;
+#define mbui_init(iter, startptr) \
+  ((iter).cur.ptr = (startptr), \
+   (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \
+   (iter).next_done = false)
+#define mbui_avail(iter) \
+  (mbuiter_multi_next (&(iter)), !mb_isnul ((iter).cur))
+#define mbui_advance(iter) \
+  ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false)
+
+/* Access to the current character.  */
+#define mbui_cur(iter) (iter).cur
+#define mbui_cur_ptr(iter) (iter).cur.ptr
+
+/* Relocation.  */
+#define mbui_reloc(iter, ptrdiff) mbuiter_multi_reloc (&iter, ptrdiff)
+
+/* Copying an iterator.  */
+#define mbui_copy mbuiter_multi_copy
+
+#endif /* _MBUITER_H */
diff --git a/gnulib/lib/memchr.c b/gnulib/lib/memchr.c
new file mode 100644 (file)
index 0000000..6d903b1
--- /dev/null
@@ -0,0 +1,172 @@
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2011
+   Free Software Foundation, Inc.
+
+   Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
+   with help from Dan Sahlin (dan@sics.se) and
+   commentary by Jim Blandy (jimb@ai.mit.edu);
+   adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
+   and implemented by Roland McGrath (roland@ai.mit.edu).
+
+NOTE: The canonical source of this file is maintained with the GNU C Library.
+Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+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 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 _LIBC
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#include <stddef.h>
+
+#if defined _LIBC
+# include <memcopy.h>
+#else
+# define reg_char char
+#endif
+
+#include <limits.h>
+
+#if HAVE_BP_SYM_H || defined _LIBC
+# include <bp-sym.h>
+#else
+# define BP_SYM(sym) sym
+#endif
+
+#undef __memchr
+#ifdef _LIBC
+# undef memchr
+#endif
+
+#ifndef weak_alias
+# define __memchr memchr
+#endif
+
+/* Search no more than N bytes of S for C.  */
+void *
+__memchr (void const *s, int c_in, size_t n)
+{
+  /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+     long instead of a 64-bit uintmax_t tends to give better
+     performance.  On 64-bit hardware, unsigned long is generally 64
+     bits already.  Change this typedef to experiment with
+     performance.  */
+  typedef unsigned long int longword;
+
+  const unsigned char *char_ptr;
+  const longword *longword_ptr;
+  longword repeated_one;
+  longword repeated_c;
+  unsigned reg_char c;
+
+  c = (unsigned char) c_in;
+
+  /* Handle the first few bytes by reading one byte at a time.
+     Do this until CHAR_PTR is aligned on a longword boundary.  */
+  for (char_ptr = (const unsigned char *) s;
+       n > 0 && (size_t) char_ptr % sizeof (longword) != 0;
+       --n, ++char_ptr)
+    if (*char_ptr == c)
+      return (void *) char_ptr;
+
+  longword_ptr = (const longword *) char_ptr;
+
+  /* All these elucidatory comments refer to 4-byte longwords,
+     but the theory applies equally well to any size longwords.  */
+
+  /* Compute auxiliary longword values:
+     repeated_one is a value which has a 1 in every byte.
+     repeated_c has c in every byte.  */
+  repeated_one = 0x01010101;
+  repeated_c = c | (c << 8);
+  repeated_c |= repeated_c << 16;
+  if (0xffffffffU < (longword) -1)
+    {
+      repeated_one |= repeated_one << 31 << 1;
+      repeated_c |= repeated_c << 31 << 1;
+      if (8 < sizeof (longword))
+        {
+          size_t i;
+
+          for (i = 64; i < sizeof (longword) * 8; i *= 2)
+            {
+              repeated_one |= repeated_one << i;
+              repeated_c |= repeated_c << i;
+            }
+        }
+    }
+
+  /* Instead of the traditional loop which tests each byte, we will test a
+     longword at a time.  The tricky part is testing if *any of the four*
+     bytes in the longword in question are equal to c.  We first use an xor
+     with repeated_c.  This reduces the task to testing whether *any of the
+     four* bytes in longword1 is zero.
+
+     We compute tmp =
+       ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+     That is, we perform the following operations:
+       1. Subtract repeated_one.
+       2. & ~longword1.
+       3. & a mask consisting of 0x80 in every byte.
+     Consider what happens in each byte:
+       - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+         and step 3 transforms it into 0x80.  A carry can also be propagated
+         to more significant bytes.
+       - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+         position k (0 <= k <= 7); so the lowest k bits are 0.  After step 1,
+         the byte ends in a single bit of value 0 and k bits of value 1.
+         After step 2, the result is just k bits of value 1: 2^k - 1.  After
+         step 3, the result is 0.  And no carry is produced.
+     So, if longword1 has only non-zero bytes, tmp is zero.
+     Whereas if longword1 has a zero byte, call j the position of the least
+     significant zero byte.  Then the result has a zero at positions 0, ...,
+     j-1 and a 0x80 at position j.  We cannot predict the result at the more
+     significant bytes (positions j+1..3), but it does not matter since we
+     already have a non-zero bit at position 8*j+7.
+
+     So, the test whether any byte in longword1 is zero is equivalent to
+     testing whether tmp is nonzero.  */
+
+  while (n >= sizeof (longword))
+    {
+      longword longword1 = *longword_ptr ^ repeated_c;
+
+      if ((((longword1 - repeated_one) & ~longword1)
+           & (repeated_one << 7)) != 0)
+        break;
+      longword_ptr++;
+      n -= sizeof (longword);
+    }
+
+  char_ptr = (const unsigned char *) longword_ptr;
+
+  /* At this point, we know that either n < sizeof (longword), or one of the
+     sizeof (longword) bytes starting at char_ptr is == c.  On little-endian
+     machines, we could determine the first such byte without any further
+     memory accesses, just by looking at the tmp result from the last loop
+     iteration.  But this does not work on big-endian machines.  Choose code
+     that works in both cases.  */
+
+  for (; n > 0; --n, ++char_ptr)
+    {
+      if (*char_ptr == c)
+        return (void *) char_ptr;
+    }
+
+  return NULL;
+}
+#ifdef weak_alias
+weak_alias (__memchr, BP_SYM (memchr))
+#endif
diff --git a/gnulib/lib/memchr.valgrind b/gnulib/lib/memchr.valgrind
new file mode 100644 (file)
index 0000000..60f247e
--- /dev/null
@@ -0,0 +1,14 @@
+# Suppress a valgrind message about use of uninitialized memory in memchr().
+# POSIX states that when the character is found, memchr must not read extra
+# bytes in an overestimated length (for example, where memchr is used to
+# implement strnlen).  However, we use a safe word read to provide a speedup.
+{
+    memchr-value4
+    Memcheck:Value4
+    fun:rpl_memchr
+}
+{
+    memchr-value8
+    Memcheck:Value8
+    fun:rpl_memchr
+}
diff --git a/gnulib/lib/mempcpy.c b/gnulib/lib/mempcpy.c
new file mode 100644 (file)
index 0000000..6a148a9
--- /dev/null
@@ -0,0 +1,29 @@
+/* Copy memory area and return pointer after last written byte.
+   Copyright (C) 2003, 2007, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+/* Copy N bytes of SRC to DEST, return pointer to bytes after the
+   last written byte.  */
+void *
+mempcpy (void *dest, const void *src, size_t n)
+{
+  return (char *) memcpy (dest, src, n) + n;
+}
diff --git a/gnulib/lib/memrchr.c b/gnulib/lib/memrchr.c
new file mode 100644 (file)
index 0000000..d7144d0
--- /dev/null
@@ -0,0 +1,161 @@
+/* memrchr -- find the last occurrence of a byte in a memory block
+
+   Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2011 Free Software
+   Foundation, Inc.
+
+   Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
+   with help from Dan Sahlin (dan@sics.se) and
+   commentary by Jim Blandy (jimb@ai.mit.edu);
+   adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
+   and implemented by Roland McGrath (roland@ai.mit.edu).
+
+   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 _LIBC
+# include <memcopy.h>
+#else
+# include <config.h>
+# define reg_char char
+#endif
+
+#include <string.h>
+#include <limits.h>
+
+#undef __memrchr
+#ifdef _LIBC
+# undef memrchr
+#endif
+
+#ifndef weak_alias
+# define __memrchr memrchr
+#endif
+
+/* Search no more than N bytes of S for C.  */
+void *
+__memrchr (void const *s, int c_in, size_t n)
+{
+  /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+     long instead of a 64-bit uintmax_t tends to give better
+     performance.  On 64-bit hardware, unsigned long is generally 64
+     bits already.  Change this typedef to experiment with
+     performance.  */
+  typedef unsigned long int longword;
+
+  const unsigned char *char_ptr;
+  const longword *longword_ptr;
+  longword repeated_one;
+  longword repeated_c;
+  unsigned reg_char c;
+
+  c = (unsigned char) c_in;
+
+  /* Handle the last few bytes by reading one byte at a time.
+     Do this until CHAR_PTR is aligned on a longword boundary.  */
+  for (char_ptr = (const unsigned char *) s + n;
+       n > 0 && (size_t) char_ptr % sizeof (longword) != 0;
+       --n)
+    if (*--char_ptr == c)
+      return (void *) char_ptr;
+
+  longword_ptr = (const longword *) char_ptr;
+
+  /* All these elucidatory comments refer to 4-byte longwords,
+     but the theory applies equally well to any size longwords.  */
+
+  /* Compute auxiliary longword values:
+     repeated_one is a value which has a 1 in every byte.
+     repeated_c has c in every byte.  */
+  repeated_one = 0x01010101;
+  repeated_c = c | (c << 8);
+  repeated_c |= repeated_c << 16;
+  if (0xffffffffU < (longword) -1)
+    {
+      repeated_one |= repeated_one << 31 << 1;
+      repeated_c |= repeated_c << 31 << 1;
+      if (8 < sizeof (longword))
+        {
+          size_t i;
+
+          for (i = 64; i < sizeof (longword) * 8; i *= 2)
+            {
+              repeated_one |= repeated_one << i;
+              repeated_c |= repeated_c << i;
+            }
+        }
+    }
+
+  /* Instead of the traditional loop which tests each byte, we will test a
+     longword at a time.  The tricky part is testing if *any of the four*
+     bytes in the longword in question are equal to c.  We first use an xor
+     with repeated_c.  This reduces the task to testing whether *any of the
+     four* bytes in longword1 is zero.
+
+     We compute tmp =
+       ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+     That is, we perform the following operations:
+       1. Subtract repeated_one.
+       2. & ~longword1.
+       3. & a mask consisting of 0x80 in every byte.
+     Consider what happens in each byte:
+       - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+         and step 3 transforms it into 0x80.  A carry can also be propagated
+         to more significant bytes.
+       - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+         position k (0 <= k <= 7); so the lowest k bits are 0.  After step 1,
+         the byte ends in a single bit of value 0 and k bits of value 1.
+         After step 2, the result is just k bits of value 1: 2^k - 1.  After
+         step 3, the result is 0.  And no carry is produced.
+     So, if longword1 has only non-zero bytes, tmp is zero.
+     Whereas if longword1 has a zero byte, call j the position of the least
+     significant zero byte.  Then the result has a zero at positions 0, ...,
+     j-1 and a 0x80 at position j.  We cannot predict the result at the more
+     significant bytes (positions j+1..3), but it does not matter since we
+     already have a non-zero bit at position 8*j+7.
+
+     So, the test whether any byte in longword1 is zero is equivalent to
+     testing whether tmp is nonzero.  */
+
+  while (n >= sizeof (longword))
+    {
+      longword longword1 = *--longword_ptr ^ repeated_c;
+
+      if ((((longword1 - repeated_one) & ~longword1)
+           & (repeated_one << 7)) != 0)
+        {
+          longword_ptr++;
+          break;
+        }
+      n -= sizeof (longword);
+    }
+
+  char_ptr = (const unsigned char *) longword_ptr;
+
+  /* At this point, we know that either n < sizeof (longword), or one of the
+     sizeof (longword) bytes starting at char_ptr is == c.  On little-endian
+     machines, we could determine the first such byte without any further
+     memory accesses, just by looking at the tmp result from the last loop
+     iteration.  But this does not work on big-endian machines.  Choose code
+     that works in both cases.  */
+
+  while (n-- > 0)
+    {
+      if (*--char_ptr == c)
+        return (void *) char_ptr;
+    }
+
+  return NULL;
+}
+#ifdef weak_alias
+weak_alias (__memrchr, memrchr)
+#endif
diff --git a/gnulib/lib/mkdir.c b/gnulib/lib/mkdir.c
new file mode 100644 (file)
index 0000000..07f97b9
--- /dev/null
@@ -0,0 +1,93 @@
+/* On some systems, mkdir ("foo/", 0700) fails because of the trailing
+   slash.  On those systems, this wrapper removes the trailing slash.
+
+   Copyright (C) 2001, 2003, 2006, 2008-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 Jim Meyering */
+
+#include <config.h>
+
+/* Specification.  */
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "dirname.h"
+
+/* Disable the definition of mkdir to rpl_mkdir (from the <sys/stat.h>
+   substitute) in this file.  Otherwise, we'd get an endless recursion.  */
+#undef mkdir
+
+/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
+   Additionally, it declares _mkdir (and depending on compile flags, an
+   alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
+   which are included in the <sys/stat.h> override.  */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define mkdir(name,mode) _mkdir (name)
+# define maybe_unused _GL_UNUSED
+#else
+# define maybe_unused /* empty */
+#endif
+
+/* This function is required at least for NetBSD 1.5.2.  */
+
+int
+rpl_mkdir (char const *dir, mode_t mode maybe_unused)
+{
+  int ret_val;
+  char *tmp_dir;
+  size_t len = strlen (dir);
+
+  if (len && dir[len - 1] == '/')
+    {
+      tmp_dir = strdup (dir);
+      if (!tmp_dir)
+        {
+          /* Rather than rely on strdup-posix, we set errno ourselves.  */
+          errno = ENOMEM;
+          return -1;
+        }
+      strip_trailing_slashes (tmp_dir);
+    }
+  else
+    {
+      tmp_dir = (char *) dir;
+    }
+#if FUNC_MKDIR_DOT_BUG
+  /* Additionally, cygwin 1.5 mistakenly creates a directory "d/./".  */
+  {
+    char *last = last_component (tmp_dir);
+    if (*last == '.' && (last[1] == '\0'
+                         || (last[1] == '.' && last[2] == '\0')))
+      {
+        struct stat st;
+        if (stat (tmp_dir, &st) == 0)
+          errno = EEXIST;
+        return -1;
+      }
+  }
+#endif /* FUNC_MKDIR_DOT_BUG */
+
+  ret_val = mkdir (tmp_dir, mode);
+
+  if (tmp_dir != dir)
+    free (tmp_dir);
+
+  return ret_val;
+}
diff --git a/gnulib/lib/mkdirat.c b/gnulib/lib/mkdirat.c
new file mode 100644 (file)
index 0000000..ed7998d
--- /dev/null
@@ -0,0 +1,34 @@
+/* fd-relative mkdir
+   Copyright (C) 2005-2006, 2009-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 Jim Meyering */
+
+#include <config.h>
+
+#include <unistd.h>
+
+/* Solaris 10 has no function like this.
+   Create a subdirectory, FILE, with mode MODE, in the directory
+   open on descriptor FD.  If possible, do it without changing the
+   working directory.  Otherwise, resort to using save_cwd/fchdir,
+   then mkdir/restore_cwd.  If either the save_cwd or the restore_cwd
+   fails, then give a diagnostic and exit nonzero.  */
+
+#define AT_FUNC_NAME mkdirat
+#define AT_FUNC_F1 mkdir
+#define AT_FUNC_POST_FILE_PARAM_DECLS , mode_t mode
+#define AT_FUNC_POST_FILE_ARGS        , mode
+#include "at-func.c"
diff --git a/gnulib/lib/mktime-internal.h b/gnulib/lib/mktime-internal.h
new file mode 100644 (file)
index 0000000..4287acf
--- /dev/null
@@ -0,0 +1,4 @@
+#include <time.h>
+time_t mktime_internal (struct tm *,
+                        struct tm * (*) (time_t const *, struct tm *),
+                        time_t *);
diff --git a/gnulib/lib/mktime.c b/gnulib/lib/mktime.c
new file mode 100644 (file)
index 0000000..c68ad9b
--- /dev/null
@@ -0,0 +1,737 @@
+/* Convert a `struct tm' to a time_t value.
+   Copyright (C) 1993-1999, 2002-2007, 2009-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Paul Eggert <eggert@twinsun.com>.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Define this to have a standalone program to test this implementation of
+   mktime.  */
+/* #define DEBUG 1 */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+/* Some of the code in this file assumes that signed integer overflow
+   silently wraps around.  This assumption can't easily be programmed
+   around, nor can it be checked for portably at compile-time or
+   easily eliminated at run-time.
+
+   Define WRAPV to 1 if the assumption is valid.  Otherwise, define it
+   to 0; this forces the use of slower code that, while not guaranteed
+   by the C Standard, works on all production platforms that we know
+   about.  */
+#ifndef WRAPV
+# if (__GNUC__ == 4 && 4 <= __GNUC_MINOR__) || 4 < __GNUC__
+#  pragma GCC optimize ("wrapv")
+#  define WRAPV 1
+# else
+#  define WRAPV 0
+# endif
+#endif
+
+/* Assume that leap seconds are possible, unless told otherwise.
+   If the host has a `zic' command with a `-L leapsecondfilename' option,
+   then it supports leap seconds; otherwise it probably doesn't.  */
+#ifndef LEAP_SECONDS_POSSIBLE
+# define LEAP_SECONDS_POSSIBLE 1
+#endif
+
+#include <time.h>
+
+#include <limits.h>
+
+#include <string.h>             /* For the real memcpy prototype.  */
+
+#if DEBUG
+# include <stdio.h>
+# include <stdlib.h>
+/* Make it work even if the system's libc has its own mktime routine.  */
+# undef mktime
+# define mktime my_mktime
+#endif /* DEBUG */
+
+/* Verify a requirement at compile-time (unlike assert, which is runtime).  */
+#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
+
+/* A signed type that is at least one bit wider than int.  */
+#if INT_MAX <= LONG_MAX / 2
+typedef long int long_int;
+#else
+typedef long long int long_int;
+#endif
+verify (long_int_is_wide_enough, INT_MAX == INT_MAX * (long_int) 2 / 2);
+
+/* Shift A right by B bits portably, by dividing A by 2**B and
+   truncating towards minus infinity.  A and B should be free of side
+   effects, and B should be in the range 0 <= B <= INT_BITS - 2, where
+   INT_BITS is the number of useful bits in an int.  GNU code can
+   assume that INT_BITS is at least 32.
+
+   ISO C99 says that A >> B is implementation-defined if A < 0.  Some
+   implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift
+   right in the usual way when A < 0, so SHR falls back on division if
+   ordinary A >> B doesn't seem to be the usual signed shift.  */
+#define SHR(a, b)                                               \
+  ((-1 >> 1 == -1                                               \
+    && (long_int) -1 >> 1 == -1                                 \
+    && ((time_t) -1 >> 1 == -1 || ! TYPE_SIGNED (time_t)))      \
+   ? (a) >> (b)                                                 \
+   : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
+
+/* The extra casts in the following macros work around compiler bugs,
+   e.g., in Cray C 5.0.3.0.  */
+
+/* True if the arithmetic type T is an integer type.  bool counts as
+   an integer.  */
+#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+
+/* True if negative values of the signed integer type T use two's
+   complement, or if T is an unsigned integer type.  */
+#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+
+/* True if the arithmetic type T is signed.  */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* The maximum and minimum values for the integer type T.  These
+   macros have undefined behavior if T is signed and has padding bits.
+   If this is a problem for you, please let us know how to fix it for
+   your host.  */
+#define TYPE_MINIMUM(t) \
+  ((t) (! TYPE_SIGNED (t) \
+        ? (t) 0 \
+        : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t) \
+  ((t) (! TYPE_SIGNED (t) \
+        ? (t) -1 \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+
+#ifndef TIME_T_MIN
+# define TIME_T_MIN TYPE_MINIMUM (time_t)
+#endif
+#ifndef TIME_T_MAX
+# define TIME_T_MAX TYPE_MAXIMUM (time_t)
+#endif
+#define TIME_T_MIDPOINT (SHR (TIME_T_MIN + TIME_T_MAX, 1) + 1)
+
+verify (time_t_is_integer, TYPE_IS_INTEGER (time_t));
+verify (twos_complement_arithmetic,
+        (TYPE_TWOS_COMPLEMENT (int)
+         && TYPE_TWOS_COMPLEMENT (long_int)
+         && TYPE_TWOS_COMPLEMENT (time_t)));
+
+#define EPOCH_YEAR 1970
+#define TM_YEAR_BASE 1900
+verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0);
+
+/* Return 1 if YEAR + TM_YEAR_BASE is a leap year.  */
+static inline int
+leapyear (long_int year)
+{
+  /* Don't add YEAR to TM_YEAR_BASE, as that might overflow.
+     Also, work even if YEAR is negative.  */
+  return
+    ((year & 3) == 0
+     && (year % 100 != 0
+         || ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3)));
+}
+
+/* How many days come before each month (0-12).  */
+#ifndef _LIBC
+static
+#endif
+const unsigned short int __mon_yday[2][13] =
+  {
+    /* Normal years.  */
+    { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
+    /* Leap years.  */
+    { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
+  };
+
+
+#ifndef _LIBC
+/* Portable standalone applications should supply a <time.h> that
+   declares a POSIX-compliant localtime_r, for the benefit of older
+   implementations that lack localtime_r or have a nonstandard one.
+   See the gnulib time_r module for one way to implement this.  */
+# undef __localtime_r
+# define __localtime_r localtime_r
+# define __mktime_internal mktime_internal
+# include "mktime-internal.h"
+#endif
+
+/* Return 1 if the values A and B differ according to the rules for
+   tm_isdst: A and B differ if one is zero and the other positive.  */
+static int
+isdst_differ (int a, int b)
+{
+  return (!a != !b) & (0 <= a) & (0 <= b);
+}
+
+/* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) -
+   (YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks
+   were not adjusted between the time stamps.
+
+   The YEAR values uses the same numbering as TP->tm_year.  Values
+   need not be in the usual range.  However, YEAR1 must not be less
+   than 2 * INT_MIN or greater than 2 * INT_MAX.
+
+   The result may overflow.  It is the caller's responsibility to
+   detect overflow.  */
+
+static inline time_t
+ydhms_diff (long_int year1, long_int yday1, int hour1, int min1, int sec1,
+            int year0, int yday0, int hour0, int min0, int sec0)
+{
+  verify (C99_integer_division, -1 / 2 == 0);
+
+  /* Compute intervening leap days correctly even if year is negative.
+     Take care to avoid integer overflow here.  */
+  int a4 = SHR (year1, 2) + SHR (TM_YEAR_BASE, 2) - ! (year1 & 3);
+  int b4 = SHR (year0, 2) + SHR (TM_YEAR_BASE, 2) - ! (year0 & 3);
+  int a100 = a4 / 25 - (a4 % 25 < 0);
+  int b100 = b4 / 25 - (b4 % 25 < 0);
+  int a400 = SHR (a100, 2);
+  int b400 = SHR (b100, 2);
+  int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
+
+  /* Compute the desired time in time_t precision.  Overflow might
+     occur here.  */
+  time_t tyear1 = year1;
+  time_t years = tyear1 - year0;
+  time_t days = 365 * years + yday1 - yday0 + intervening_leap_days;
+  time_t hours = 24 * days + hour1 - hour0;
+  time_t minutes = 60 * hours + min1 - min0;
+  time_t seconds = 60 * minutes + sec1 - sec0;
+  return seconds;
+}
+
+/* Return the average of A and B, even if A + B would overflow.  */
+static time_t
+time_t_avg (time_t a, time_t b)
+{
+  return SHR (a, 1) + SHR (b, 1) + (a & b & 1);
+}
+
+/* Return 1 if A + B does not overflow.  If time_t is unsigned and if
+   B's top bit is set, assume that the sum represents A - -B, and
+   return 1 if the subtraction does not wrap around.  */
+static int
+time_t_add_ok (time_t a, time_t b)
+{
+  if (! TYPE_SIGNED (time_t))
+    {
+      time_t sum = a + b;
+      return (sum < a) == (TIME_T_MIDPOINT <= b);
+    }
+  else if (WRAPV)
+    {
+      time_t sum = a + b;
+      return (sum < a) == (b < 0);
+    }
+  else
+    {
+      time_t avg = time_t_avg (a, b);
+      return TIME_T_MIN / 2 <= avg && avg <= TIME_T_MAX / 2;
+    }
+}
+
+/* Return 1 if A + B does not overflow.  */
+static int
+time_t_int_add_ok (time_t a, int b)
+{
+  verify (int_no_wider_than_time_t, INT_MAX <= TIME_T_MAX);
+  if (WRAPV)
+    {
+      time_t sum = a + b;
+      return (sum < a) == (b < 0);
+    }
+  else
+    {
+      int a_odd = a & 1;
+      time_t avg = SHR (a, 1) + (SHR (b, 1) + (a_odd & b));
+      return TIME_T_MIN / 2 <= avg && avg <= TIME_T_MAX / 2;
+    }
+}
+
+/* Return a time_t value corresponding to (YEAR-YDAY HOUR:MIN:SEC),
+   assuming that *T corresponds to *TP and that no clock adjustments
+   occurred between *TP and the desired time.
+   If TP is null, return a value not equal to *T; this avoids false matches.
+   If overflow occurs, yield the minimal or maximal value, except do not
+   yield a value equal to *T.  */
+static time_t
+guess_time_tm (long_int year, long_int yday, int hour, int min, int sec,
+               const time_t *t, const struct tm *tp)
+{
+  if (tp)
+    {
+      time_t d = ydhms_diff (year, yday, hour, min, sec,
+                             tp->tm_year, tp->tm_yday,
+                             tp->tm_hour, tp->tm_min, tp->tm_sec);
+      if (time_t_add_ok (*t, d))
+        return *t + d;
+    }
+
+  /* Overflow occurred one way or another.  Return the nearest result
+     that is actually in range, except don't report a zero difference
+     if the actual difference is nonzero, as that would cause a false
+     match; and don't oscillate between two values, as that would
+     confuse the spring-forward gap detector.  */
+  return (*t < TIME_T_MIDPOINT
+          ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN)
+          : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX));
+}
+
+/* Use CONVERT to convert *T to a broken down time in *TP.
+   If *T is out of range for conversion, adjust it so that
+   it is the nearest in-range value and then convert that.  */
+static struct tm *
+ranged_convert (struct tm *(*convert) (const time_t *, struct tm *),
+                time_t *t, struct tm *tp)
+{
+  struct tm *r = convert (t, tp);
+
+  if (!r && *t)
+    {
+      time_t bad = *t;
+      time_t ok = 0;
+
+      /* BAD is a known unconvertible time_t, and OK is a known good one.
+         Use binary search to narrow the range between BAD and OK until
+         they differ by 1.  */
+      while (bad != ok + (bad < 0 ? -1 : 1))
+        {
+          time_t mid = *t = time_t_avg (ok, bad);
+          r = convert (t, tp);
+          if (r)
+            ok = mid;
+          else
+            bad = mid;
+        }
+
+      if (!r && ok)
+        {
+          /* The last conversion attempt failed;
+             revert to the most recent successful attempt.  */
+          *t = ok;
+          r = convert (t, tp);
+        }
+    }
+
+  return r;
+}
+
+
+/* Convert *TP to a time_t value, inverting
+   the monotonic and mostly-unit-linear conversion function CONVERT.
+   Use *OFFSET to keep track of a guess at the offset of the result,
+   compared to what the result would be for UTC without leap seconds.
+   If *OFFSET's guess is correct, only one CONVERT call is needed.
+   This function is external because it is used also by timegm.c.  */
+time_t
+__mktime_internal (struct tm *tp,
+                   struct tm *(*convert) (const time_t *, struct tm *),
+                   time_t *offset)
+{
+  time_t t, gt, t0, t1, t2;
+  struct tm tm;
+
+  /* The maximum number of probes (calls to CONVERT) should be enough
+     to handle any combinations of time zone rule changes, solar time,
+     leap seconds, and oscillations around a spring-forward gap.
+     POSIX.1 prohibits leap seconds, but some hosts have them anyway.  */
+  int remaining_probes = 6;
+
+  /* Time requested.  Copy it in case CONVERT modifies *TP; this can
+     occur if TP is localtime's returned value and CONVERT is localtime.  */
+  int sec = tp->tm_sec;
+  int min = tp->tm_min;
+  int hour = tp->tm_hour;
+  int mday = tp->tm_mday;
+  int mon = tp->tm_mon;
+  int year_requested = tp->tm_year;
+  int isdst = tp->tm_isdst;
+
+  /* 1 if the previous probe was DST.  */
+  int dst2;
+
+  /* Ensure that mon is in range, and set year accordingly.  */
+  int mon_remainder = mon % 12;
+  int negative_mon_remainder = mon_remainder < 0;
+  int mon_years = mon / 12 - negative_mon_remainder;
+  long_int lyear_requested = year_requested;
+  long_int year = lyear_requested + mon_years;
+
+  /* The other values need not be in range:
+     the remaining code handles minor overflows correctly,
+     assuming int and time_t arithmetic wraps around.
+     Major overflows are caught at the end.  */
+
+  /* Calculate day of year from year, month, and day of month.
+     The result need not be in range.  */
+  int mon_yday = ((__mon_yday[leapyear (year)]
+                   [mon_remainder + 12 * negative_mon_remainder])
+                  - 1);
+  long_int lmday = mday;
+  long_int yday = mon_yday + lmday;
+
+  time_t guessed_offset = *offset;
+
+  int sec_requested = sec;
+
+  if (LEAP_SECONDS_POSSIBLE)
+    {
+      /* Handle out-of-range seconds specially,
+         since ydhms_tm_diff assumes every minute has 60 seconds.  */
+      if (sec < 0)
+        sec = 0;
+      if (59 < sec)
+        sec = 59;
+    }
+
+  /* Invert CONVERT by probing.  First assume the same offset as last
+     time.  */
+
+  t0 = ydhms_diff (year, yday, hour, min, sec,
+                   EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset);
+
+  if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3)
+    {
+      /* time_t isn't large enough to rule out overflows, so check
+         for major overflows.  A gross check suffices, since if t0
+         has overflowed, it is off by a multiple of TIME_T_MAX -
+         TIME_T_MIN + 1.  So ignore any component of the difference
+         that is bounded by a small value.  */
+
+      /* Approximate log base 2 of the number of time units per
+         biennium.  A biennium is 2 years; use this unit instead of
+         years to avoid integer overflow.  For example, 2 average
+         Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds,
+         which is 63113904 seconds, and rint (log2 (63113904)) is
+         26.  */
+      int ALOG2_SECONDS_PER_BIENNIUM = 26;
+      int ALOG2_MINUTES_PER_BIENNIUM = 20;
+      int ALOG2_HOURS_PER_BIENNIUM = 14;
+      int ALOG2_DAYS_PER_BIENNIUM = 10;
+      int LOG2_YEARS_PER_BIENNIUM = 1;
+
+      int approx_requested_biennia =
+        (SHR (year_requested, LOG2_YEARS_PER_BIENNIUM)
+         - SHR (EPOCH_YEAR - TM_YEAR_BASE, LOG2_YEARS_PER_BIENNIUM)
+         + SHR (mday, ALOG2_DAYS_PER_BIENNIUM)
+         + SHR (hour, ALOG2_HOURS_PER_BIENNIUM)
+         + SHR (min, ALOG2_MINUTES_PER_BIENNIUM)
+         + (LEAP_SECONDS_POSSIBLE
+            ? 0
+            : SHR (sec, ALOG2_SECONDS_PER_BIENNIUM)));
+
+      int approx_biennia = SHR (t0, ALOG2_SECONDS_PER_BIENNIUM);
+      int diff = approx_biennia - approx_requested_biennia;
+      int abs_diff = diff < 0 ? -1 - diff : diff;
+
+      /* IRIX 4.0.5 cc miscalculates TIME_T_MIN / 3: it erroneously
+         gives a positive value of 715827882.  Setting a variable
+         first then doing math on it seems to work.
+         (ghazi@caip.rutgers.edu) */
+      time_t time_t_max = TIME_T_MAX;
+      time_t time_t_min = TIME_T_MIN;
+      time_t overflow_threshold =
+        (time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM;
+
+      if (overflow_threshold < abs_diff)
+        {
+          /* Overflow occurred.  Try repairing it; this might work if
+             the time zone offset is enough to undo the overflow.  */
+          time_t repaired_t0 = -1 - t0;
+          approx_biennia = SHR (repaired_t0, ALOG2_SECONDS_PER_BIENNIUM);
+          diff = approx_biennia - approx_requested_biennia;
+          abs_diff = diff < 0 ? -1 - diff : diff;
+          if (overflow_threshold < abs_diff)
+            return -1;
+          guessed_offset += repaired_t0 - t0;
+          t0 = repaired_t0;
+        }
+    }
+
+  /* Repeatedly use the error to improve the guess.  */
+
+  for (t = t1 = t2 = t0, dst2 = 0;
+       (gt = guess_time_tm (year, yday, hour, min, sec, &t,
+                            ranged_convert (convert, &t, &tm)),
+        t != gt);
+       t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0)
+    if (t == t1 && t != t2
+        && (tm.tm_isdst < 0
+            || (isdst < 0
+                ? dst2 <= (tm.tm_isdst != 0)
+                : (isdst != 0) != (tm.tm_isdst != 0))))
+      /* We can't possibly find a match, as we are oscillating
+         between two values.  The requested time probably falls
+         within a spring-forward gap of size GT - T.  Follow the common
+         practice in this case, which is to return a time that is GT - T
+         away from the requested time, preferring a time whose
+         tm_isdst differs from the requested value.  (If no tm_isdst
+         was requested and only one of the two values has a nonzero
+         tm_isdst, prefer that value.)  In practice, this is more
+         useful than returning -1.  */
+      goto offset_found;
+    else if (--remaining_probes == 0)
+      return -1;
+
+  /* We have a match.  Check whether tm.tm_isdst has the requested
+     value, if any.  */
+  if (isdst_differ (isdst, tm.tm_isdst))
+    {
+      /* tm.tm_isdst has the wrong value.  Look for a neighboring
+         time with the right value, and use its UTC offset.
+
+         Heuristic: probe the adjacent timestamps in both directions,
+         looking for the desired isdst.  This should work for all real
+         time zone histories in the tz database.  */
+
+      /* Distance between probes when looking for a DST boundary.  In
+         tzdata2003a, the shortest period of DST is 601200 seconds
+         (e.g., America/Recife starting 2000-10-08 01:00), and the
+         shortest period of non-DST surrounded by DST is 694800
+         seconds (Africa/Tunis starting 1943-04-17 01:00).  Use the
+         minimum of these two values, so we don't miss these short
+         periods when probing.  */
+      int stride = 601200;
+
+      /* The longest period of DST in tzdata2003a is 536454000 seconds
+         (e.g., America/Jujuy starting 1946-10-01 01:00).  The longest
+         period of non-DST is much longer, but it makes no real sense
+         to search for more than a year of non-DST, so use the DST
+         max.  */
+      int duration_max = 536454000;
+
+      /* Search in both directions, so the maximum distance is half
+         the duration; add the stride to avoid off-by-1 problems.  */
+      int delta_bound = duration_max / 2 + stride;
+
+      int delta, direction;
+
+      for (delta = stride; delta < delta_bound; delta += stride)
+        for (direction = -1; direction <= 1; direction += 2)
+          if (time_t_int_add_ok (t, delta * direction))
+            {
+              time_t ot = t + delta * direction;
+              struct tm otm;
+              ranged_convert (convert, &ot, &otm);
+              if (! isdst_differ (isdst, otm.tm_isdst))
+                {
+                  /* We found the desired tm_isdst.
+                     Extrapolate back to the desired time.  */
+                  t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm);
+                  ranged_convert (convert, &t, &tm);
+                  goto offset_found;
+                }
+            }
+    }
+
+ offset_found:
+  *offset = guessed_offset + t - t0;
+
+  if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec)
+    {
+      /* Adjust time to reflect the tm_sec requested, not the normalized value.
+         Also, repair any damage from a false match due to a leap second.  */
+      int sec_adjustment = (sec == 0 && tm.tm_sec == 60) - sec;
+      if (! time_t_int_add_ok (t, sec_requested))
+        return -1;
+      t1 = t + sec_requested;
+      if (! time_t_int_add_ok (t1, sec_adjustment))
+        return -1;
+      t2 = t1 + sec_adjustment;
+      if (! convert (&t2, &tm))
+        return -1;
+      t = t2;
+    }
+
+  *tp = tm;
+  return t;
+}
+
+
+/* FIXME: This should use a signed type wide enough to hold any UTC
+   offset in seconds.  'int' should be good enough for GNU code.  We
+   can't fix this unilaterally though, as other modules invoke
+   __mktime_internal.  */
+static time_t localtime_offset;
+
+/* Convert *TP to a time_t value.  */
+time_t
+mktime (struct tm *tp)
+{
+#ifdef _LIBC
+  /* POSIX.1 8.1.1 requires that whenever mktime() is called, the
+     time zone names contained in the external variable `tzname' shall
+     be set as if the tzset() function had been called.  */
+  __tzset ();
+#endif
+
+  return __mktime_internal (tp, __localtime_r, &localtime_offset);
+}
+
+#ifdef weak_alias
+weak_alias (mktime, timelocal)
+#endif
+
+#ifdef _LIBC
+libc_hidden_def (mktime)
+libc_hidden_weak (timelocal)
+#endif
+\f
+#if DEBUG
+
+static int
+not_equal_tm (const struct tm *a, const struct tm *b)
+{
+  return ((a->tm_sec ^ b->tm_sec)
+          | (a->tm_min ^ b->tm_min)
+          | (a->tm_hour ^ b->tm_hour)
+          | (a->tm_mday ^ b->tm_mday)
+          | (a->tm_mon ^ b->tm_mon)
+          | (a->tm_year ^ b->tm_year)
+          | (a->tm_yday ^ b->tm_yday)
+          | isdst_differ (a->tm_isdst, b->tm_isdst));
+}
+
+static void
+print_tm (const struct tm *tp)
+{
+  if (tp)
+    printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d",
+            tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday,
+            tp->tm_hour, tp->tm_min, tp->tm_sec,
+            tp->tm_yday, tp->tm_wday, tp->tm_isdst);
+  else
+    printf ("0");
+}
+
+static int
+check_result (time_t tk, struct tm tmk, time_t tl, const struct tm *lt)
+{
+  if (tk != tl || !lt || not_equal_tm (&tmk, lt))
+    {
+      printf ("mktime (");
+      print_tm (lt);
+      printf (")\nyields (");
+      print_tm (&tmk);
+      printf (") == %ld, should be %ld\n", (long int) tk, (long int) tl);
+      return 1;
+    }
+
+  return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+  int status = 0;
+  struct tm tm, tmk, tml;
+  struct tm *lt;
+  time_t tk, tl, tl1;
+  char trailer;
+
+  if ((argc == 3 || argc == 4)
+      && (sscanf (argv[1], "%d-%d-%d%c",
+                  &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer)
+          == 3)
+      && (sscanf (argv[2], "%d:%d:%d%c",
+                  &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer)
+          == 3))
+    {
+      tm.tm_year -= TM_YEAR_BASE;
+      tm.tm_mon--;
+      tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]);
+      tmk = tm;
+      tl = mktime (&tmk);
+      lt = localtime (&tl);
+      if (lt)
+        {
+          tml = *lt;
+          lt = &tml;
+        }
+      printf ("mktime returns %ld == ", (long int) tl);
+      print_tm (&tmk);
+      printf ("\n");
+      status = check_result (tl, tmk, tl, lt);
+    }
+  else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0))
+    {
+      time_t from = atol (argv[1]);
+      time_t by = atol (argv[2]);
+      time_t to = atol (argv[3]);
+
+      if (argc == 4)
+        for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
+          {
+            lt = localtime (&tl);
+            if (lt)
+              {
+                tmk = tml = *lt;
+                tk = mktime (&tmk);
+                status |= check_result (tk, tmk, tl, &tml);
+              }
+            else
+              {
+                printf ("localtime (%ld) yields 0\n", (long int) tl);
+                status = 1;
+              }
+            tl1 = tl + by;
+            if ((tl1 < tl) != (by < 0))
+              break;
+          }
+      else
+        for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
+          {
+            /* Null benchmark.  */
+            lt = localtime (&tl);
+            if (lt)
+              {
+                tmk = tml = *lt;
+                tk = tl;
+                status |= check_result (tk, tmk, tl, &tml);
+              }
+            else
+              {
+                printf ("localtime (%ld) yields 0\n", (long int) tl);
+                status = 1;
+              }
+            tl1 = tl + by;
+            if ((tl1 < tl) != (by < 0))
+              break;
+          }
+    }
+  else
+    printf ("Usage:\
+\t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\
+\t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\
+\t%s FROM BY TO - # Do not test those values (for benchmark).\n",
+            argv[0], argv[0], argv[0]);
+
+  return status;
+}
+
+#endif /* DEBUG */
+\f
+/*
+Local Variables:
+compile-command: "gcc -DDEBUG -I. -Wall -W -O2 -g mktime.c -o mktime"
+End:
+*/
diff --git a/gnulib/lib/modechange.c b/gnulib/lib/modechange.c
new file mode 100644 (file)
index 0000000..580a460
--- /dev/null
@@ -0,0 +1,385 @@
+/* modechange.c -- file mode manipulation
+
+   Copyright (C) 1989-1990, 1997-1999, 2001, 2003-2006, 2009-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 David MacKenzie <djm@ai.mit.edu> */
+
+/* The ASCII mode string is compiled into an array of `struct
+   modechange', which can then be applied to each file to be changed.
+   We do this instead of re-parsing the ASCII string for each file
+   because the compiled form requires less computation to use; when
+   changing the mode of many files, this probably results in a
+   performance gain.  */
+
+#include <config.h>
+
+#include "modechange.h"
+#include <sys/stat.h>
+#include "stat-macros.h"
+#include "xalloc.h"
+#include <stdlib.h>
+
+/* The traditional octal values corresponding to each mode bit.  */
+#define SUID 04000
+#define SGID 02000
+#define SVTX 01000
+#define RUSR 00400
+#define WUSR 00200
+#define XUSR 00100
+#define RGRP 00040
+#define WGRP 00020
+#define XGRP 00010
+#define ROTH 00004
+#define WOTH 00002
+#define XOTH 00001
+#define ALLM 07777 /* all octal mode bits */
+
+/* Convert OCTAL, which uses one of the traditional octal values, to
+   an internal mode_t value.  */
+static mode_t
+octal_to_mode (unsigned int octal)
+{
+  /* Help the compiler optimize the usual case where mode_t uses
+     the traditional octal representation.  */
+  return ((S_ISUID == SUID && S_ISGID == SGID && S_ISVTX == SVTX
+           && S_IRUSR == RUSR && S_IWUSR == WUSR && S_IXUSR == XUSR
+           && S_IRGRP == RGRP && S_IWGRP == WGRP && S_IXGRP == XGRP
+           && S_IROTH == ROTH && S_IWOTH == WOTH && S_IXOTH == XOTH)
+          ? octal
+          : (mode_t) ((octal & SUID ? S_ISUID : 0)
+                      | (octal & SGID ? S_ISGID : 0)
+                      | (octal & SVTX ? S_ISVTX : 0)
+                      | (octal & RUSR ? S_IRUSR : 0)
+                      | (octal & WUSR ? S_IWUSR : 0)
+                      | (octal & XUSR ? S_IXUSR : 0)
+                      | (octal & RGRP ? S_IRGRP : 0)
+                      | (octal & WGRP ? S_IWGRP : 0)
+                      | (octal & XGRP ? S_IXGRP : 0)
+                      | (octal & ROTH ? S_IROTH : 0)
+                      | (octal & WOTH ? S_IWOTH : 0)
+                      | (octal & XOTH ? S_IXOTH : 0)));
+}
+
+/* Special operations flags.  */
+enum
+  {
+    /* For the sentinel at the end of the mode changes array.  */
+    MODE_DONE,
+
+    /* The typical case.  */
+    MODE_ORDINARY_CHANGE,
+
+    /* In addition to the typical case, affect the execute bits if at
+       least one execute bit is set already, or if the file is a
+       directory.  */
+    MODE_X_IF_ANY_X,
+
+    /* Instead of the typical case, copy some existing permissions for
+       u, g, or o onto the other two.  Which of u, g, or o is copied
+       is determined by which bits are set in the `value' field.  */
+    MODE_COPY_EXISTING
+  };
+
+/* Description of a mode change.  */
+struct mode_change
+{
+  char op;                      /* One of "=+-".  */
+  char flag;                    /* Special operations flag.  */
+  mode_t affected;              /* Set for u, g, o, or a.  */
+  mode_t value;                 /* Bits to add/remove.  */
+  mode_t mentioned;             /* Bits explicitly mentioned.  */
+};
+
+/* Return a mode_change array with the specified `=ddd'-style
+   mode change operation, where NEW_MODE is `ddd' and MENTIONED
+   contains the bits explicitly mentioned in the mode are MENTIONED.  */
+
+static struct mode_change *
+make_node_op_equals (mode_t new_mode, mode_t mentioned)
+{
+  struct mode_change *p = xmalloc (2 * sizeof *p);
+  p->op = '=';
+  p->flag = MODE_ORDINARY_CHANGE;
+  p->affected = CHMOD_MODE_BITS;
+  p->value = new_mode;
+  p->mentioned = mentioned;
+  p[1].flag = MODE_DONE;
+  return p;
+}
+
+/* Return a pointer to an array of file mode change operations created from
+   MODE_STRING, an ASCII string that contains either an octal number
+   specifying an absolute mode, or symbolic mode change operations with
+   the form:
+   [ugoa...][[+-=][rwxXstugo...]...][,...]
+
+   Return NULL if `mode_string' does not contain a valid
+   representation of file mode change operations.  */
+
+struct mode_change *
+mode_compile (char const *mode_string)
+{
+  /* The array of mode-change directives to be returned.  */
+  struct mode_change *mc;
+  size_t used = 0;
+
+  if ('0' <= *mode_string && *mode_string < '8')
+    {
+      unsigned int octal_mode = 0;
+      mode_t mode;
+      mode_t mentioned;
+
+      do
+        {
+          octal_mode = 8 * octal_mode + *mode_string++ - '0';
+          if (ALLM < octal_mode)
+            return NULL;
+        }
+      while ('0' <= *mode_string && *mode_string < '8');
+
+      if (*mode_string)
+        return NULL;
+
+      mode = octal_to_mode (octal_mode);
+      mentioned = (mode & (S_ISUID | S_ISGID)) | S_ISVTX | S_IRWXUGO;
+      return make_node_op_equals (mode, mentioned);
+    }
+
+  /* Allocate enough space to hold the result.  */
+  {
+    size_t needed = 1;
+    char const *p;
+    for (p = mode_string; *p; p++)
+      needed += (*p == '=' || *p == '+' || *p == '-');
+    mc = xnmalloc (needed, sizeof *mc);
+  }
+
+  /* One loop iteration for each `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'.  */
+  for (;; mode_string++)
+    {
+      /* Which bits in the mode are operated on.  */
+      mode_t affected = 0;
+
+      /* Turn on all the bits in `affected' for each group given.  */
+      for (;; mode_string++)
+        switch (*mode_string)
+          {
+          default:
+            goto invalid;
+          case 'u':
+            affected |= S_ISUID | S_IRWXU;
+            break;
+          case 'g':
+            affected |= S_ISGID | S_IRWXG;
+            break;
+          case 'o':
+            affected |= S_ISVTX | S_IRWXO;
+            break;
+          case 'a':
+            affected |= CHMOD_MODE_BITS;
+            break;
+          case '=': case '+': case '-':
+            goto no_more_affected;
+          }
+    no_more_affected:;
+
+      do
+        {
+          char op = *mode_string++;
+          mode_t value;
+          char flag = MODE_COPY_EXISTING;
+          struct mode_change *change;
+
+          switch (*mode_string++)
+            {
+            case 'u':
+              /* Set the affected bits to the value of the `u' bits
+                 on the same file.  */
+              value = S_IRWXU;
+              break;
+            case 'g':
+              /* Set the affected bits to the value of the `g' bits
+                 on the same file.  */
+              value = S_IRWXG;
+              break;
+            case 'o':
+              /* Set the affected bits to the value of the `o' bits
+                 on the same file.  */
+              value = S_IRWXO;
+              break;
+
+            default:
+              value = 0;
+              flag = MODE_ORDINARY_CHANGE;
+
+              for (mode_string--;; mode_string++)
+                switch (*mode_string)
+                  {
+                  case 'r':
+                    value |= S_IRUSR | S_IRGRP | S_IROTH;
+                    break;
+                  case 'w':
+                    value |= S_IWUSR | S_IWGRP | S_IWOTH;
+                    break;
+                  case 'x':
+                    value |= S_IXUSR | S_IXGRP | S_IXOTH;
+                    break;
+                  case 'X':
+                    flag = MODE_X_IF_ANY_X;
+                    break;
+                  case 's':
+                    /* Set the setuid/gid bits if `u' or `g' is selected.  */
+                    value |= S_ISUID | S_ISGID;
+                    break;
+                  case 't':
+                    /* Set the "save text image" bit if `o' is selected.  */
+                    value |= S_ISVTX;
+                    break;
+                  default:
+                    goto no_more_values;
+                  }
+            no_more_values:;
+            }
+
+          change = &mc[used++];
+          change->op = op;
+          change->flag = flag;
+          change->affected = affected;
+          change->value = value;
+          change->mentioned = (affected ? affected & value : value);
+        }
+      while (*mode_string == '=' || *mode_string == '+'
+             || *mode_string == '-');
+
+      if (*mode_string != ',')
+        break;
+    }
+
+  if (*mode_string == 0)
+    {
+      mc[used].flag = MODE_DONE;
+      return mc;
+    }
+
+invalid:
+  free (mc);
+  return NULL;
+}
+
+/* Return a file mode change operation that sets permissions to match those
+   of REF_FILE.  Return NULL (setting errno) if REF_FILE can't be accessed.  */
+
+struct mode_change *
+mode_create_from_ref (const char *ref_file)
+{
+  struct stat ref_stats;
+
+  if (stat (ref_file, &ref_stats) != 0)
+    return NULL;
+  return make_node_op_equals (ref_stats.st_mode, CHMOD_MODE_BITS);
+}
+
+/* Return the file mode bits of OLDMODE (which is the mode of a
+   directory if DIR), assuming the umask is UMASK_VALUE, adjusted as
+   indicated by the list of change operations CHANGES.  If DIR, the
+   type 'X' change affects the returned value even if no execute bits
+   were set in OLDMODE, and set user and group ID bits are preserved
+   unless CHANGES mentioned them.  If PMODE_BITS is not null, store into
+   *PMODE_BITS a mask denoting file mode bits that are affected by
+   CHANGES.
+
+   The returned value and *PMODE_BITS contain only file mode bits.
+   For example, they have the S_IFMT bits cleared on a standard
+   Unix-like host.  */
+
+mode_t
+mode_adjust (mode_t oldmode, bool dir, mode_t umask_value,
+             struct mode_change const *changes, mode_t *pmode_bits)
+{
+  /* The adjusted mode.  */
+  mode_t newmode = oldmode & CHMOD_MODE_BITS;
+
+  /* File mode bits that CHANGES cares about.  */
+  mode_t mode_bits = 0;
+
+  for (; changes->flag != MODE_DONE; changes++)
+    {
+      mode_t affected = changes->affected;
+      mode_t omit_change =
+        (dir ? S_ISUID | S_ISGID : 0) & ~ changes->mentioned;
+      mode_t value = changes->value;
+
+      switch (changes->flag)
+        {
+        case MODE_ORDINARY_CHANGE:
+          break;
+
+        case MODE_COPY_EXISTING:
+          /* Isolate in `value' the bits in `newmode' to copy.  */
+          value &= newmode;
+
+          /* Copy the isolated bits to the other two parts.  */
+          value |= ((value & (S_IRUSR | S_IRGRP | S_IROTH)
+                     ? S_IRUSR | S_IRGRP | S_IROTH : 0)
+                    | (value & (S_IWUSR | S_IWGRP | S_IWOTH)
+                       ? S_IWUSR | S_IWGRP | S_IWOTH : 0)
+                    | (value & (S_IXUSR | S_IXGRP | S_IXOTH)
+                       ? S_IXUSR | S_IXGRP | S_IXOTH : 0));
+          break;
+
+        case MODE_X_IF_ANY_X:
+          /* Affect the execute bits if execute bits are already set
+             or if the file is a directory.  */
+          if ((newmode & (S_IXUSR | S_IXGRP | S_IXOTH)) | dir)
+            value |= S_IXUSR | S_IXGRP | S_IXOTH;
+          break;
+        }
+
+      /* If WHO was specified, limit the change to the affected bits.
+         Otherwise, apply the umask.  Either way, omit changes as
+         requested.  */
+      value &= (affected ? affected : ~umask_value) & ~ omit_change;
+
+      switch (changes->op)
+        {
+        case '=':
+          /* If WHO was specified, preserve the previous values of
+             bits that are not affected by this change operation.
+             Otherwise, clear all the bits.  */
+          {
+            mode_t preserved = (affected ? ~affected : 0) | omit_change;
+            mode_bits |= CHMOD_MODE_BITS & ~preserved;
+            newmode = (newmode & preserved) | value;
+            break;
+          }
+
+        case '+':
+          mode_bits |= value;
+          newmode |= value;
+          break;
+
+        case '-':
+          mode_bits |= value;
+          newmode &= ~value;
+          break;
+        }
+    }
+
+  if (pmode_bits)
+    *pmode_bits = mode_bits;
+  return newmode;
+}
diff --git a/gnulib/lib/modechange.h b/gnulib/lib/modechange.h
new file mode 100644 (file)
index 0000000..a15aeca
--- /dev/null
@@ -0,0 +1,30 @@
+/* modechange.h -- definitions for file mode manipulation
+
+   Copyright (C) 1989-1990, 1997, 2003-2006, 2009-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 MODECHANGE_H_
+# define MODECHANGE_H_
+
+# include <stdbool.h>
+# include <sys/types.h>
+
+struct mode_change *mode_compile (const char *);
+struct mode_change *mode_create_from_ref (const char *);
+mode_t mode_adjust (mode_t, bool, mode_t, struct mode_change const *,
+                    mode_t *);
+
+#endif
diff --git a/gnulib/lib/mountlist.c b/gnulib/lib/mountlist.c
new file mode 100644 (file)
index 0000000..23437bc
--- /dev/null
@@ -0,0 +1,951 @@
+/* mountlist.c -- return a list of mounted file systems
+
+   Copyright (C) 1991-1992, 1997-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/>.  */
+
+#include <config.h>
+
+#include "mountlist.h"
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+
+#include "xalloc.h"
+
+#include <errno.h>
+
+#include <fcntl.h>
+
+#include <unistd.h>
+
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#if defined MOUNTED_GETFSSTAT   /* OSF_1 and Darwin1.3.x */
+# if HAVE_SYS_UCRED_H
+#  include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS,
+                      NGROUPS is used as an array dimension in ucred.h */
+#  include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
+# endif
+# if HAVE_SYS_MOUNT_H
+#  include <sys/mount.h>
+# endif
+# if HAVE_SYS_FS_TYPES_H
+#  include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */
+# endif
+# if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
+#  define FS_TYPE(Ent) ((Ent).f_fstypename)
+# else
+#  define FS_TYPE(Ent) mnt_names[(Ent).f_type]
+# endif
+#endif /* MOUNTED_GETFSSTAT */
+
+#ifdef MOUNTED_GETMNTENT1       /* 4.3BSD, SunOS, HP-UX, Dynix, Irix.  */
+# include <mntent.h>
+# if !defined MOUNTED
+#  if defined _PATH_MOUNTED     /* GNU libc  */
+#   define MOUNTED _PATH_MOUNTED
+#  endif
+#  if defined MNT_MNTTAB        /* HP-UX.  */
+#   define MOUNTED MNT_MNTTAB
+#  endif
+#  if defined MNTTABNAME        /* Dynix.  */
+#   define MOUNTED MNTTABNAME
+#  endif
+# endif
+#endif
+
+#ifdef MOUNTED_GETMNTINFO       /* 4.4BSD.  */
+# include <sys/mount.h>
+#endif
+
+#ifdef MOUNTED_GETMNTINFO2      /* NetBSD 3.0.  */
+# include <sys/statvfs.h>
+#endif
+
+#ifdef MOUNTED_GETMNT           /* Ultrix.  */
+# include <sys/mount.h>
+# include <sys/fs_types.h>
+#endif
+
+#ifdef MOUNTED_FS_STAT_DEV      /* BeOS.  */
+# include <fs_info.h>
+# include <dirent.h>
+#endif
+
+#ifdef MOUNTED_FREAD            /* SVR2.  */
+# include <mnttab.h>
+#endif
+
+#ifdef MOUNTED_FREAD_FSTYP      /* SVR3.  */
+# include <mnttab.h>
+# include <sys/fstyp.h>
+# include <sys/statfs.h>
+#endif
+
+#ifdef MOUNTED_LISTMNTENT
+# include <mntent.h>
+#endif
+
+#ifdef MOUNTED_GETMNTENT2       /* SVR4.  */
+# include <sys/mnttab.h>
+#endif
+
+#ifdef MOUNTED_VMOUNT           /* AIX.  */
+# include <fshelp.h>
+# include <sys/vfs.h>
+#endif
+
+#ifdef MOUNTED_INTERIX_STATVFS  /* Interix. */
+# include <sys/statvfs.h>
+# include <dirent.h>
+#endif
+
+#ifdef DOLPHIN
+/* So special that it's not worth putting this in autoconf.  */
+# undef MOUNTED_FREAD_FSTYP
+# define MOUNTED_GETMNTTBL
+#endif
+
+#if HAVE_SYS_MNTENT_H
+/* This is to get MNTOPT_IGNORE on e.g. SVR4.  */
+# include <sys/mntent.h>
+#endif
+
+#undef MNT_IGNORE
+#if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT
+# define MNT_IGNORE(M) hasmntopt (M, MNTOPT_IGNORE)
+#else
+# define MNT_IGNORE(M) 0
+#endif
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+/* The results of open() in this file are not used with fchdir,
+   therefore save some unnecessary work in fchdir.c.  */
+#undef open
+#undef close
+
+/* The results of opendir() in this file are not used with dirfd and fchdir,
+   therefore save some unnecessary work in fchdir.c.  */
+#undef opendir
+#undef closedir
+
+#ifndef ME_DUMMY
+# define ME_DUMMY(Fs_name, Fs_type)             \
+    (strcmp (Fs_type, "autofs") == 0            \
+     || strcmp (Fs_type, "none") == 0           \
+     || strcmp (Fs_type, "proc") == 0           \
+     || strcmp (Fs_type, "subfs") == 0          \
+     /* for NetBSD 3.0 */                       \
+     || strcmp (Fs_type, "kernfs") == 0         \
+     /* for Irix 6.5 */                         \
+     || strcmp (Fs_type, "ignore") == 0)
+#endif
+
+#ifdef __CYGWIN__
+# include <windows.h>
+# define ME_REMOTE me_remote
+/* All cygwin mount points include `:' or start with `//'; so it
+   requires a native Windows call to determine remote disks.  */
+static bool
+me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
+{
+  if (fs_name[0] && fs_name[1] == ':')
+    {
+      char drive[4];
+      sprintf (drive, "%c:\\", fs_name[0]);
+      switch (GetDriveType (drive))
+        {
+        case DRIVE_REMOVABLE:
+        case DRIVE_FIXED:
+        case DRIVE_CDROM:
+        case DRIVE_RAMDISK:
+          return false;
+        }
+    }
+  return true;
+}
+#endif
+
+#ifndef ME_REMOTE
+/* A file system is `remote' if its Fs_name contains a `:'
+   or if (it is of type (smbfs or cifs) and its Fs_name starts with `//').  */
+# define ME_REMOTE(Fs_name, Fs_type)            \
+    (strchr (Fs_name, ':') != NULL              \
+     || ((Fs_name)[0] == '/'                    \
+         && (Fs_name)[1] == '/'                 \
+         && (strcmp (Fs_type, "smbfs") == 0     \
+             || strcmp (Fs_type, "cifs") == 0)))
+#endif
+
+#if MOUNTED_GETMNTINFO
+
+# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME
+static char *
+fstype_to_string (short int t)
+{
+  switch (t)
+    {
+#  ifdef MOUNT_PC
+    case MOUNT_PC:
+      return "pc";
+#  endif
+#  ifdef MOUNT_MFS
+    case MOUNT_MFS:
+      return "mfs";
+#  endif
+#  ifdef MOUNT_LO
+    case MOUNT_LO:
+      return "lo";
+#  endif
+#  ifdef MOUNT_TFS
+    case MOUNT_TFS:
+      return "tfs";
+#  endif
+#  ifdef MOUNT_TMP
+    case MOUNT_TMP:
+      return "tmp";
+#  endif
+#  ifdef MOUNT_UFS
+   case MOUNT_UFS:
+     return "ufs" ;
+#  endif
+#  ifdef MOUNT_NFS
+   case MOUNT_NFS:
+     return "nfs" ;
+#  endif
+#  ifdef MOUNT_MSDOS
+   case MOUNT_MSDOS:
+     return "msdos" ;
+#  endif
+#  ifdef MOUNT_LFS
+   case MOUNT_LFS:
+     return "lfs" ;
+#  endif
+#  ifdef MOUNT_LOFS
+   case MOUNT_LOFS:
+     return "lofs" ;
+#  endif
+#  ifdef MOUNT_FDESC
+   case MOUNT_FDESC:
+     return "fdesc" ;
+#  endif
+#  ifdef MOUNT_PORTAL
+   case MOUNT_PORTAL:
+     return "portal" ;
+#  endif
+#  ifdef MOUNT_NULL
+   case MOUNT_NULL:
+     return "null" ;
+#  endif
+#  ifdef MOUNT_UMAP
+   case MOUNT_UMAP:
+     return "umap" ;
+#  endif
+#  ifdef MOUNT_KERNFS
+   case MOUNT_KERNFS:
+     return "kernfs" ;
+#  endif
+#  ifdef MOUNT_PROCFS
+   case MOUNT_PROCFS:
+     return "procfs" ;
+#  endif
+#  ifdef MOUNT_AFS
+   case MOUNT_AFS:
+     return "afs" ;
+#  endif
+#  ifdef MOUNT_CD9660
+   case MOUNT_CD9660:
+     return "cd9660" ;
+#  endif
+#  ifdef MOUNT_UNION
+   case MOUNT_UNION:
+     return "union" ;
+#  endif
+#  ifdef MOUNT_DEVFS
+   case MOUNT_DEVFS:
+     return "devfs" ;
+#  endif
+#  ifdef MOUNT_EXT2FS
+   case MOUNT_EXT2FS:
+     return "ext2fs" ;
+#  endif
+    default:
+      return "?";
+    }
+}
+# endif
+
+static char *
+fsp_to_string (const struct statfs *fsp)
+{
+# if HAVE_STRUCT_STATFS_F_FSTYPENAME
+  return (char *) (fsp->f_fstypename);
+# else
+  return fstype_to_string (fsp->f_type);
+# endif
+}
+
+#endif /* MOUNTED_GETMNTINFO */
+
+#ifdef MOUNTED_VMOUNT           /* AIX.  */
+static char *
+fstype_to_string (int t)
+{
+  struct vfs_ent *e;
+
+  e = getvfsbytype (t);
+  if (!e || !e->vfsent_name)
+    return "none";
+  else
+    return e->vfsent_name;
+}
+#endif /* MOUNTED_VMOUNT */
+
+
+#if defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2
+
+/* Return the device number from MOUNT_OPTIONS, if possible.
+   Otherwise return (dev_t) -1.  */
+static dev_t
+dev_from_mount_options (char const *mount_options)
+{
+  /* GNU/Linux allows file system implementations to define their own
+     meaning for "dev=" mount options, so don't trust the meaning
+     here.  */
+# ifndef __linux__
+
+  static char const dev_pattern[] = ",dev=";
+  char const *devopt = strstr (mount_options, dev_pattern);
+
+  if (devopt)
+    {
+      char const *optval = devopt + sizeof dev_pattern - 1;
+      char *optvalend;
+      unsigned long int dev;
+      errno = 0;
+      dev = strtoul (optval, &optvalend, 16);
+      if (optval != optvalend
+          && (*optvalend == '\0' || *optvalend == ',')
+          && ! (dev == ULONG_MAX && errno == ERANGE)
+          && dev == (dev_t) dev)
+        return dev;
+    }
+
+# endif
+  (void) mount_options;
+  return -1;
+}
+
+#endif
+
+/* Return a list of the currently mounted file systems, or NULL on error.
+   Add each entry to the tail of the list so that they stay in order.
+   If NEED_FS_TYPE is true, ensure that the file system type fields in
+   the returned list are valid.  Otherwise, they might not be.  */
+
+struct mount_entry *
+read_file_system_list (bool need_fs_type)
+{
+  struct mount_entry *mount_list;
+  struct mount_entry *me;
+  struct mount_entry **mtail = &mount_list;
+  (void) need_fs_type;
+
+#ifdef MOUNTED_LISTMNTENT
+  {
+    struct tabmntent *mntlist, *p;
+    struct mntent *mnt;
+    struct mount_entry *me;
+
+    /* the third and fourth arguments could be used to filter mounts,
+       but Crays doesn't seem to have any mounts that we want to
+       remove. Specifically, automount create normal NFS mounts.
+       */
+
+    if (listmntent (&mntlist, KMTAB, NULL, NULL) < 0)
+      return NULL;
+    for (p = mntlist; p; p = p->next)
+      {
+        mnt = p->ment;
+        me = xmalloc (sizeof *me);
+        me->me_devname = xstrdup (mnt->mnt_fsname);
+        me->me_mountdir = xstrdup (mnt->mnt_dir);
+        me->me_type = xstrdup (mnt->mnt_type);
+        me->me_type_malloced = 1;
+        me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+        me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+        me->me_dev = -1;
+        *mtail = me;
+        mtail = &me->me_next;
+      }
+    freemntlist (mntlist);
+  }
+#endif
+
+#ifdef MOUNTED_GETMNTENT1 /* GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix.  */
+  {
+    struct mntent *mnt;
+    char const *table = MOUNTED;
+    FILE *fp;
+
+    fp = setmntent (table, "r");
+    if (fp == NULL)
+      return NULL;
+
+    while ((mnt = getmntent (fp)))
+      {
+        me = xmalloc (sizeof *me);
+        me->me_devname = xstrdup (mnt->mnt_fsname);
+        me->me_mountdir = xstrdup (mnt->mnt_dir);
+        me->me_type = xstrdup (mnt->mnt_type);
+        me->me_type_malloced = 1;
+        me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+        me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+        me->me_dev = dev_from_mount_options (mnt->mnt_opts);
+
+        /* Add to the linked list. */
+        *mtail = me;
+        mtail = &me->me_next;
+      }
+
+    if (endmntent (fp) == 0)
+      goto free_then_fail;
+  }
+#endif /* MOUNTED_GETMNTENT1. */
+
+#ifdef MOUNTED_GETMNTINFO       /* 4.4BSD.  */
+  {
+    struct statfs *fsp;
+    int entries;
+
+    entries = getmntinfo (&fsp, MNT_NOWAIT);
+    if (entries < 0)
+      return NULL;
+    for (; entries-- > 0; fsp++)
+      {
+        char *fs_type = fsp_to_string (fsp);
+
+        me = xmalloc (sizeof *me);
+        me->me_devname = xstrdup (fsp->f_mntfromname);
+        me->me_mountdir = xstrdup (fsp->f_mntonname);
+        me->me_type = fs_type;
+        me->me_type_malloced = 0;
+        me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+        me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+        me->me_dev = (dev_t) -1;        /* Magic; means not known yet. */
+
+        /* Add to the linked list. */
+        *mtail = me;
+        mtail = &me->me_next;
+      }
+  }
+#endif /* MOUNTED_GETMNTINFO */
+
+#ifdef MOUNTED_GETMNTINFO2      /* NetBSD 3.0.  */
+  {
+    struct statvfs *fsp;
+    int entries;
+
+    entries = getmntinfo (&fsp, MNT_NOWAIT);
+    if (entries < 0)
+      return NULL;
+    for (; entries-- > 0; fsp++)
+      {
+        me = xmalloc (sizeof *me);
+        me->me_devname = xstrdup (fsp->f_mntfromname);
+        me->me_mountdir = xstrdup (fsp->f_mntonname);
+        me->me_type = xstrdup (fsp->f_fstypename);
+        me->me_type_malloced = 1;
+        me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+        me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+        me->me_dev = (dev_t) -1;        /* Magic; means not known yet. */
+
+        /* Add to the linked list. */
+        *mtail = me;
+        mtail = &me->me_next;
+      }
+  }
+#endif /* MOUNTED_GETMNTINFO2 */
+
+#ifdef MOUNTED_GETMNT           /* Ultrix.  */
+  {
+    int offset = 0;
+    int val;
+    struct fs_data fsd;
+
+    while (errno = 0,
+           0 < (val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY,
+                              (char *) 0)))
+      {
+        me = xmalloc (sizeof *me);
+        me->me_devname = xstrdup (fsd.fd_req.devname);
+        me->me_mountdir = xstrdup (fsd.fd_req.path);
+        me->me_type = gt_names[fsd.fd_req.fstype];
+        me->me_type_malloced = 0;
+        me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+        me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+        me->me_dev = fsd.fd_req.dev;
+
+        /* Add to the linked list. */
+        *mtail = me;
+        mtail = &me->me_next;
+      }
+    if (val < 0)
+      goto free_then_fail;
+  }
+#endif /* MOUNTED_GETMNT. */
+
+#if defined MOUNTED_FS_STAT_DEV /* BeOS */
+  {
+    /* The next_dev() and fs_stat_dev() system calls give the list of
+       all file systems, including the information returned by statvfs()
+       (fs type, total blocks, free blocks etc.), but without the mount
+       point. But on BeOS all file systems except / are mounted in the
+       rootfs, directly under /.
+       The directory name of the mount point is often, but not always,
+       identical to the volume name of the device.
+       We therefore get the list of subdirectories of /, and the list
+       of all file systems, and match the two lists.  */
+
+    DIR *dirp;
+    struct rootdir_entry
+      {
+        char *name;
+        dev_t dev;
+        ino_t ino;
+        struct rootdir_entry *next;
+      };
+    struct rootdir_entry *rootdir_list;
+    struct rootdir_entry **rootdir_tail;
+    int32 pos;
+    dev_t dev;
+    fs_info fi;
+
+    /* All volumes are mounted in the rootfs, directly under /. */
+    rootdir_list = NULL;
+    rootdir_tail = &rootdir_list;
+    dirp = opendir ("/");
+    if (dirp)
+      {
+        struct dirent *d;
+
+        while ((d = readdir (dirp)) != NULL)
+          {
+            char *name;
+            struct stat statbuf;
+
+            if (strcmp (d->d_name, "..") == 0)
+              continue;
+
+            if (strcmp (d->d_name, ".") == 0)
+              name = xstrdup ("/");
+            else
+              {
+                name = xmalloc (1 + strlen (d->d_name) + 1);
+                name[0] = '/';
+                strcpy (name + 1, d->d_name);
+              }
+
+            if (lstat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode))
+              {
+                struct rootdir_entry *re = xmalloc (sizeof *re);
+                re->name = name;
+                re->dev = statbuf.st_dev;
+                re->ino = statbuf.st_ino;
+
+                /* Add to the linked list.  */
+                *rootdir_tail = re;
+                rootdir_tail = &re->next;
+              }
+            else
+              free (name);
+          }
+        closedir (dirp);
+      }
+    *rootdir_tail = NULL;
+
+    for (pos = 0; (dev = next_dev (&pos)) >= 0; )
+      if (fs_stat_dev (dev, &fi) >= 0)
+        {
+          /* Note: fi.dev == dev. */
+          struct rootdir_entry *re;
+
+          for (re = rootdir_list; re; re = re->next)
+            if (re->dev == fi.dev && re->ino == fi.root)
+              break;
+
+          me = xmalloc (sizeof *me);
+          me->me_devname = xstrdup (fi.device_name[0] != '\0'
+                                    ? fi.device_name : fi.fsh_name);
+          me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name);
+          me->me_type = xstrdup (fi.fsh_name);
+          me->me_type_malloced = 1;
+          me->me_dev = fi.dev;
+          me->me_dummy = 0;
+          me->me_remote = (fi.flags & B_FS_IS_SHARED) != 0;
+
+          /* Add to the linked list. */
+          *mtail = me;
+          mtail = &me->me_next;
+        }
+    *mtail = NULL;
+
+    while (rootdir_list != NULL)
+      {
+        struct rootdir_entry *re = rootdir_list;
+        rootdir_list = re->next;
+        free (re->name);
+        free (re);
+      }
+  }
+#endif /* MOUNTED_FS_STAT_DEV */
+
+#if defined MOUNTED_GETFSSTAT   /* __alpha running OSF_1 */
+  {
+    int numsys, counter;
+    size_t bufsize;
+    struct statfs *stats;
+
+    numsys = getfsstat (NULL, 0L, MNT_NOWAIT);
+    if (numsys < 0)
+      return NULL;
+    if (SIZE_MAX / sizeof *stats <= numsys)
+      xalloc_die ();
+
+    bufsize = (1 + numsys) * sizeof *stats;
+    stats = xmalloc (bufsize);
+    numsys = getfsstat (stats, bufsize, MNT_NOWAIT);
+
+    if (numsys < 0)
+      {
+        free (stats);
+        return NULL;
+      }
+
+    for (counter = 0; counter < numsys; counter++)
+      {
+        me = xmalloc (sizeof *me);
+        me->me_devname = xstrdup (stats[counter].f_mntfromname);
+        me->me_mountdir = xstrdup (stats[counter].f_mntonname);
+        me->me_type = xstrdup (FS_TYPE (stats[counter]));
+        me->me_type_malloced = 1;
+        me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+        me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+        me->me_dev = (dev_t) -1;        /* Magic; means not known yet. */
+
+        /* Add to the linked list. */
+        *mtail = me;
+        mtail = &me->me_next;
+      }
+
+    free (stats);
+  }
+#endif /* MOUNTED_GETFSSTAT */
+
+#if defined MOUNTED_FREAD || defined MOUNTED_FREAD_FSTYP /* SVR[23].  */
+  {
+    struct mnttab mnt;
+    char *table = "/etc/mnttab";
+    FILE *fp;
+
+    fp = fopen (table, "r");
+    if (fp == NULL)
+      return NULL;
+
+    while (fread (&mnt, sizeof mnt, 1, fp) > 0)
+      {
+        me = xmalloc (sizeof *me);
+# ifdef GETFSTYP                        /* SVR3.  */
+        me->me_devname = xstrdup (mnt.mt_dev);
+# else
+        me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6);
+        strcpy (me->me_devname, "/dev/");
+        strcpy (me->me_devname + 5, mnt.mt_dev);
+# endif
+        me->me_mountdir = xstrdup (mnt.mt_filsys);
+        me->me_dev = (dev_t) -1;        /* Magic; means not known yet. */
+        me->me_type = "";
+        me->me_type_malloced = 0;
+# ifdef GETFSTYP                        /* SVR3.  */
+        if (need_fs_type)
+          {
+            struct statfs fsd;
+            char typebuf[FSTYPSZ];
+
+            if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1
+                && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1)
+              {
+                me->me_type = xstrdup (typebuf);
+                me->me_type_malloced = 1;
+              }
+          }
+# endif
+        me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+        me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+
+        /* Add to the linked list. */
+        *mtail = me;
+        mtail = &me->me_next;
+      }
+
+    if (ferror (fp))
+      {
+        /* The last fread() call must have failed.  */
+        int saved_errno = errno;
+        fclose (fp);
+        errno = saved_errno;
+        goto free_then_fail;
+      }
+
+    if (fclose (fp) == EOF)
+      goto free_then_fail;
+  }
+#endif /* MOUNTED_FREAD || MOUNTED_FREAD_FSTYP.  */
+
+#ifdef MOUNTED_GETMNTTBL        /* DolphinOS goes its own way.  */
+  {
+    struct mntent **mnttbl = getmnttbl (), **ent;
+    for (ent = mnttbl; *ent; ent++)
+      {
+        me = xmalloc (sizeof *me);
+        me->me_devname = xstrdup ((*ent)->mt_resource);
+        me->me_mountdir = xstrdup ((*ent)->mt_directory);
+        me->me_type = xstrdup ((*ent)->mt_fstype);
+        me->me_type_malloced = 1;
+        me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+        me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+        me->me_dev = (dev_t) -1;        /* Magic; means not known yet. */
+
+        /* Add to the linked list. */
+        *mtail = me;
+        mtail = &me->me_next;
+      }
+    endmnttbl ();
+  }
+#endif
+
+#ifdef MOUNTED_GETMNTENT2       /* SVR4.  */
+  {
+    struct mnttab mnt;
+    char *table = MNTTAB;
+    FILE *fp;
+    int ret;
+    int lockfd = -1;
+
+# if defined F_RDLCK && defined F_SETLKW
+    /* MNTTAB_LOCK is a macro name of our own invention; it's not present in
+       e.g. Solaris 2.6.  If the SVR4 folks ever define a macro
+       for this file name, we should use their macro name instead.
+       (Why not just lock MNTTAB directly?  We don't know.)  */
+#  ifndef MNTTAB_LOCK
+#   define MNTTAB_LOCK "/etc/.mnttab.lock"
+#  endif
+    lockfd = open (MNTTAB_LOCK, O_RDONLY);
+    if (0 <= lockfd)
+      {
+        struct flock flock;
+        flock.l_type = F_RDLCK;
+        flock.l_whence = SEEK_SET;
+        flock.l_start = 0;
+        flock.l_len = 0;
+        while (fcntl (lockfd, F_SETLKW, &flock) == -1)
+          if (errno != EINTR)
+            {
+              int saved_errno = errno;
+              close (lockfd);
+              errno = saved_errno;
+              return NULL;
+            }
+      }
+    else if (errno != ENOENT)
+      return NULL;
+# endif
+
+    errno = 0;
+    fp = fopen (table, "r");
+    if (fp == NULL)
+      ret = errno;
+    else
+      {
+        while ((ret = getmntent (fp, &mnt)) == 0)
+          {
+            me = xmalloc (sizeof *me);
+            me->me_devname = xstrdup (mnt.mnt_special);
+            me->me_mountdir = xstrdup (mnt.mnt_mountp);
+            me->me_type = xstrdup (mnt.mnt_fstype);
+            me->me_type_malloced = 1;
+            me->me_dummy = MNT_IGNORE (&mnt) != 0;
+            me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+            me->me_dev = dev_from_mount_options (mnt.mnt_mntopts);
+
+            /* Add to the linked list. */
+            *mtail = me;
+            mtail = &me->me_next;
+          }
+
+        ret = fclose (fp) == EOF ? errno : 0 < ret ? 0 : -1;
+      }
+
+    if (0 <= lockfd && close (lockfd) != 0)
+      ret = errno;
+
+    if (0 <= ret)
+      {
+        errno = ret;
+        goto free_then_fail;
+      }
+  }
+#endif /* MOUNTED_GETMNTENT2.  */
+
+#ifdef MOUNTED_VMOUNT           /* AIX.  */
+  {
+    int bufsize;
+    char *entries, *thisent;
+    struct vmount *vmp;
+    int n_entries;
+    int i;
+
+    /* Ask how many bytes to allocate for the mounted file system info.  */
+    if (mntctl (MCTL_QUERY, sizeof bufsize, (struct vmount *) &bufsize) != 0)
+      return NULL;
+    entries = xmalloc (bufsize);
+
+    /* Get the list of mounted file systems.  */
+    n_entries = mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries);
+    if (n_entries < 0)
+      {
+        int saved_errno = errno;
+        free (entries);
+        errno = saved_errno;
+        return NULL;
+      }
+
+    for (i = 0, thisent = entries;
+         i < n_entries;
+         i++, thisent += vmp->vmt_length)
+      {
+        char *options, *ignore;
+
+        vmp = (struct vmount *) thisent;
+        me = xmalloc (sizeof *me);
+        if (vmp->vmt_flags & MNT_REMOTE)
+          {
+            char *host, *dir;
+
+            me->me_remote = 1;
+            /* Prepend the remote dirname.  */
+            host = thisent + vmp->vmt_data[VMT_HOSTNAME].vmt_off;
+            dir = thisent + vmp->vmt_data[VMT_OBJECT].vmt_off;
+            me->me_devname = xmalloc (strlen (host) + strlen (dir) + 2);
+            strcpy (me->me_devname, host);
+            strcat (me->me_devname, ":");
+            strcat (me->me_devname, dir);
+          }
+        else
+          {
+            me->me_remote = 0;
+            me->me_devname = xstrdup (thisent +
+                                      vmp->vmt_data[VMT_OBJECT].vmt_off);
+          }
+        me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off);
+        me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype));
+        me->me_type_malloced = 1;
+        options = thisent + vmp->vmt_data[VMT_ARGS].vmt_off;
+        ignore = strstr (options, "ignore");
+        me->me_dummy = (ignore
+                        && (ignore == options || ignore[-1] == ',')
+                        && (ignore[sizeof "ignore" - 1] == ','
+                            || ignore[sizeof "ignore" - 1] == '\0'));
+        me->me_dev = (dev_t) -1; /* vmt_fsid might be the info we want.  */
+
+        /* Add to the linked list. */
+        *mtail = me;
+        mtail = &me->me_next;
+      }
+    free (entries);
+  }
+#endif /* MOUNTED_VMOUNT. */
+
+#ifdef MOUNTED_INTERIX_STATVFS
+  {
+    DIR *dirp = opendir ("/dev/fs");
+    char node[9 + NAME_MAX];
+
+    if (!dirp)
+      goto free_then_fail;
+
+    while (1)
+      {
+        struct statvfs dev;
+        struct dirent entry;
+        struct dirent *result;
+
+        if (readdir_r (dirp, &entry, &result) || result == NULL)
+          break;
+
+        strcpy (node, "/dev/fs/");
+        strcat (node, entry.d_name);
+
+        if (statvfs (node, &dev) == 0)
+          {
+            me = xmalloc (sizeof *me);
+            me->me_devname = xstrdup (dev.f_mntfromname);
+            me->me_mountdir = xstrdup (dev.f_mntonname);
+            me->me_type = xstrdup (dev.f_fstypename);
+            me->me_type_malloced = 1;
+            me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+            me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+            me->me_dev = (dev_t) -1;        /* Magic; means not known yet. */
+
+            /* Add to the linked list. */
+            *mtail = me;
+            mtail = &me->me_next;
+          }
+      }
+  }
+#endif /* MOUNTED_INTERIX_STATVFS */
+
+  *mtail = NULL;
+  return mount_list;
+
+
+ free_then_fail:
+  {
+    int saved_errno = errno;
+    *mtail = NULL;
+
+    while (mount_list)
+      {
+        me = mount_list->me_next;
+        free (mount_list->me_devname);
+        free (mount_list->me_mountdir);
+        if (mount_list->me_type_malloced)
+          free (mount_list->me_type);
+        free (mount_list);
+        mount_list = me;
+      }
+
+    errno = saved_errno;
+    return NULL;
+  }
+}
diff --git a/gnulib/lib/mountlist.h b/gnulib/lib/mountlist.h
new file mode 100644 (file)
index 0000000..926bfdf
--- /dev/null
@@ -0,0 +1,40 @@
+/* mountlist.h -- declarations for list of mounted file systems
+
+   Copyright (C) 1991-1992, 1998, 2000-2005, 2009-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 MOUNTLIST_H_
+# define MOUNTLIST_H_
+
+# include <stdbool.h>
+# include <sys/types.h>
+
+/* A mount table entry. */
+struct mount_entry
+{
+  char *me_devname;             /* Device node name, including "/dev/". */
+  char *me_mountdir;            /* Mount point directory name. */
+  char *me_type;                /* "nfs", "4.2", etc. */
+  dev_t me_dev;                 /* Device number of me_mountdir. */
+  unsigned int me_dummy : 1;    /* Nonzero for dummy file systems. */
+  unsigned int me_remote : 1;   /* Nonzero for remote fileystems. */
+  unsigned int me_type_malloced : 1; /* Nonzero if me_type was malloced. */
+  struct mount_entry *me_next;
+};
+
+struct mount_entry *read_file_system_list (bool need_fs_type);
+
+#endif
diff --git a/gnulib/lib/nl_langinfo.c b/gnulib/lib/nl_langinfo.c
new file mode 100644 (file)
index 0000000..8406ff1
--- /dev/null
@@ -0,0 +1,270 @@
+/* nl_langinfo() replacement: query locale dependent information.
+
+   Copyright (C) 2007-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <langinfo.h>
+
+#if REPLACE_NL_LANGINFO
+
+/* Override nl_langinfo with support for added nl_item values.  */
+
+# include <locale.h>
+# include <string.h>
+
+# undef nl_langinfo
+
+char *
+rpl_nl_langinfo (nl_item item)
+{
+  switch (item)
+    {
+# if GNULIB_defined_CODESET
+    case CODESET:
+      {
+        const char *locale;
+        static char buf[2 + 10 + 1];
+
+        locale = setlocale (LC_CTYPE, NULL);
+        if (locale != NULL && locale[0] != '\0')
+          {
+            /* If the locale name contains an encoding after the dot, return
+               it.  */
+            const char *dot = strchr (locale, '.');
+
+            if (dot != NULL)
+              {
+                const char *modifier;
+
+                dot++;
+                /* Look for the possible @... trailer and remove it, if any.  */
+                modifier = strchr (dot, '@');
+                if (modifier == NULL)
+                  return dot;
+                if (modifier - dot < sizeof (buf))
+                  {
+                    memcpy (buf, dot, modifier - dot);
+                    buf [modifier - dot] = '\0';
+                    return buf;
+                  }
+              }
+          }
+        return "";
+      }
+# endif
+# if GNULIB_defined_T_FMT_AMPM
+    case T_FMT_AMPM:
+      return "%I:%M:%S %p";
+# endif
+# if GNULIB_defined_ERA
+    case ERA:
+      /* The format is not standardized.  In glibc it is a sequence of strings
+         of the form "direction:offset:start_date:end_date:era_name:era_format"
+         with an empty string at the end.  */
+      return "";
+    case ERA_D_FMT:
+      /* The %Ex conversion in strftime behaves like %x if the locale does not
+         have an alternative time format.  */
+      item = D_FMT;
+      break;
+    case ERA_D_T_FMT:
+      /* The %Ec conversion in strftime behaves like %c if the locale does not
+         have an alternative time format.  */
+      item = D_T_FMT;
+      break;
+    case ERA_T_FMT:
+      /* The %EX conversion in strftime behaves like %X if the locale does not
+         have an alternative time format.  */
+      item = T_FMT;
+      break;
+    case ALT_DIGITS:
+      /* The format is not standardized.  In glibc it is a sequence of 10
+         strings, appended in memory.  */
+      return "\0\0\0\0\0\0\0\0\0\0";
+# endif
+# if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS
+    case YESEXPR:
+      return "^[yY]";
+    case NOEXPR:
+      return "^[nN]";
+# endif
+    default:
+      break;
+    }
+  return nl_langinfo (item);
+}
+
+#else
+
+/* Provide nl_langinfo from scratch.  */
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* Native Windows platforms.  */
+
+#  define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#  include <windows.h>
+
+#  include <stdio.h>
+
+# else
+
+/* An old Unix platform without locales, such as Linux libc5 or BeOS.  */
+
+# endif
+
+# include <locale.h>
+
+char *
+nl_langinfo (nl_item item)
+{
+  switch (item)
+    {
+    /* nl_langinfo items of the LC_CTYPE category */
+    case CODESET:
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+      {
+        static char buf[2 + 10 + 1];
+
+        /* Woe32 has a function returning the locale's codepage as a number.  */
+        sprintf (buf, "CP%u", GetACP ());
+        return buf;
+      }
+# elif defined __BEOS__
+      return "UTF-8";
+# else
+      return "ISO-8859-1";
+# endif
+    /* nl_langinfo items of the LC_NUMERIC category */
+    case RADIXCHAR:
+      return localeconv () ->decimal_point;
+    case THOUSEP:
+      return localeconv () ->thousands_sep;
+    /* nl_langinfo items of the LC_TIME category.
+       TODO: Really use the locale.  */
+    case D_T_FMT:
+    case ERA_D_T_FMT:
+      return "%a %b %e %H:%M:%S %Y";
+    case D_FMT:
+    case ERA_D_FMT:
+      return "%m/%d/%y";
+    case T_FMT:
+    case ERA_T_FMT:
+      return "%H:%M:%S";
+    case T_FMT_AMPM:
+      return "%I:%M:%S %p";
+    case AM_STR:
+      return "AM";
+    case PM_STR:
+      return "PM";
+    case DAY_1:
+      return "Sunday";
+    case DAY_2:
+      return "Monday";
+    case DAY_3:
+      return "Tuesday";
+    case DAY_4:
+      return "Wednesday";
+    case DAY_5:
+      return "Thursday";
+    case DAY_6:
+      return "Friday";
+    case DAY_7:
+      return "Saturday";
+    case ABDAY_1:
+      return "Sun";
+    case ABDAY_2:
+      return "Mon";
+    case ABDAY_3:
+      return "Tue";
+    case ABDAY_4:
+      return "Wed";
+    case ABDAY_5:
+      return "Thu";
+    case ABDAY_6:
+      return "Fri";
+    case ABDAY_7:
+      return "Sat";
+    case MON_1:
+      return "January";
+    case MON_2:
+      return "February";
+    case MON_3:
+      return "March";
+    case MON_4:
+      return "April";
+    case MON_5:
+      return "May";
+    case MON_6:
+      return "June";
+    case MON_7:
+      return "July";
+    case MON_8:
+      return "August";
+    case MON_9:
+      return "September";
+    case MON_10:
+      return "October";
+    case MON_11:
+      return "November";
+    case MON_12:
+      return "December";
+    case ABMON_1:
+      return "Jan";
+    case ABMON_2:
+      return "Feb";
+    case ABMON_3:
+      return "Mar";
+    case ABMON_4:
+      return "Apr";
+    case ABMON_5:
+      return "May";
+    case ABMON_6:
+      return "Jun";
+    case ABMON_7:
+      return "Jul";
+    case ABMON_8:
+      return "Aug";
+    case ABMON_9:
+      return "Sep";
+    case ABMON_10:
+      return "Oct";
+    case ABMON_11:
+      return "Nov";
+    case ABMON_12:
+      return "Dec";
+    case ERA:
+      return "";
+    case ALT_DIGITS:
+      return "\0\0\0\0\0\0\0\0\0\0";
+    /* nl_langinfo items of the LC_MONETARY category
+       TODO: Really use the locale. */
+    case CRNCYSTR:
+      return "-";
+    /* nl_langinfo items of the LC_MESSAGES category
+       TODO: Really use the locale. */
+    case YESEXPR:
+      return "^[yY]";
+    case NOEXPR:
+      return "^[nN]";
+    default:
+      return "";
+    }
+}
+
+#endif
diff --git a/gnulib/lib/open-safer.c b/gnulib/lib/open-safer.c
new file mode 100644 (file)
index 0000000..e8c6a1f
--- /dev/null
@@ -0,0 +1,46 @@
+/* Invoke open, but avoid some glitches.
+
+   Copyright (C) 2005-2006, 2008-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 Paul Eggert.  */
+
+#include <config.h>
+
+#include "fcntl-safer.h"
+
+#include <fcntl.h>
+#include <stdarg.h>
+#include "unistd-safer.h"
+
+int
+open_safer (char const *file, int flags, ...)
+{
+  mode_t mode = 0;
+
+  if (flags & O_CREAT)
+    {
+      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);
+    }
+
+  return fd_safer (open (file, flags, mode));
+}
diff --git a/gnulib/lib/open.c b/gnulib/lib/open.c
new file mode 100644 (file)
index 0000000..2e2cc74
--- /dev/null
@@ -0,0 +1,167 @@
+/* Open a descriptor to a file.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+/* Get the original definition of open.  It might be defined as a macro.  */
+#define __need_system_fcntl_h
+#include <fcntl.h>
+#undef __need_system_fcntl_h
+#include <sys/types.h>
+
+static inline int
+orig_open (const char *filename, int flags, mode_t mode)
+{
+  return open (filename, flags, mode);
+}
+
+/* Specification.  */
+#include <fcntl.h>
+
+#include <errno.h>
+#include <stdarg.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#ifndef REPLACE_OPEN_DIRECTORY
+# define REPLACE_OPEN_DIRECTORY 0
+#endif
+
+int
+open (const char *filename, int flags, ...)
+{
+  mode_t mode;
+  int fd;
+
+  mode = 0;
+  if (flags & O_CREAT)
+    {
+      va_list arg;
+      va_start (arg, 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 (arg, PROMOTED_MODE_T);
+
+      va_end (arg);
+    }
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  if (strcmp (filename, "/dev/null") == 0)
+    filename = "NUL";
+#endif
+
+#if OPEN_TRAILING_SLASH_BUG
+  /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR
+     is specified, then fail.
+     Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
+     says that
+       "A pathname that contains at least one non-slash character and that
+        ends with one or more trailing slashes shall be resolved as if a
+        single dot character ( '.' ) were appended to the pathname."
+     and
+       "The special filename dot shall refer to the directory specified by
+        its predecessor."
+     If the named file already exists as a directory, then
+       - if O_CREAT is specified, open() must fail because of the semantics
+         of O_CREAT,
+       - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX
+         <http://www.opengroup.org/susv3/functions/open.html> says that it
+         fails with errno = EISDIR in this case.
+     If the named file does not exist or does not name a directory, then
+       - if O_CREAT is specified, open() must fail since open() cannot create
+         directories,
+       - if O_WRONLY or O_RDWR is specified, open() must fail because the
+         file does not contain a '.' directory.  */
+  if (flags & (O_CREAT | O_WRONLY | O_RDWR))
+    {
+      size_t len = strlen (filename);
+      if (len > 0 && filename[len - 1] == '/')
+        {
+          errno = EISDIR;
+          return -1;
+        }
+    }
+#endif
+
+  fd = orig_open (filename, flags, mode);
+
+#if REPLACE_FCHDIR
+  /* Implementing fchdir and fdopendir requires the ability to open a
+     directory file descriptor.  If open doesn't support that (as on
+     mingw), we use a dummy file that behaves the same as directories
+     on Linux (ie. always reports EOF on attempts to read()), and
+     override fstat() in fchdir.c to hide the fact that we have a
+     dummy.  */
+  if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES
+      && ((flags & O_ACCMODE) == O_RDONLY
+          || (O_SEARCH != O_RDONLY && (flags & O_ACCMODE) == O_SEARCH)))
+    {
+      struct stat statbuf;
+      if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode))
+        {
+          /* Maximum recursion depth of 1.  */
+          fd = open ("/dev/null", flags, mode);
+          if (0 <= fd)
+            fd = _gl_register_fd (fd, filename);
+        }
+      else
+        errno = EACCES;
+    }
+#endif
+
+#if OPEN_TRAILING_SLASH_BUG
+  /* If the filename ends in a slash and fd does not refer to a directory,
+     then fail.
+     Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
+     says that
+       "A pathname that contains at least one non-slash character and that
+        ends with one or more trailing slashes shall be resolved as if a
+        single dot character ( '.' ) were appended to the pathname."
+     and
+       "The special filename dot shall refer to the directory specified by
+        its predecessor."
+     If the named file without the slash is not a directory, open() must fail
+     with ENOTDIR.  */
+  if (fd >= 0)
+    {
+      /* We know len is positive, since open did not fail with ENOENT.  */
+      size_t len = strlen (filename);
+      if (filename[len - 1] == '/')
+        {
+          struct stat statbuf;
+
+          if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
+            {
+              close (fd);
+              errno = ENOTDIR;
+              return -1;
+            }
+        }
+    }
+#endif
+
+#if REPLACE_FCHDIR
+  if (!REPLACE_OPEN_DIRECTORY && 0 <= fd)
+    fd = _gl_register_fd (fd, filename);
+#endif
+
+  return fd;
+}
diff --git a/gnulib/lib/openat-die.c b/gnulib/lib/openat-die.c
new file mode 100644 (file)
index 0000000..ea36dda
--- /dev/null
@@ -0,0 +1,62 @@
+/* Report a save- or restore-cwd failure in our openat replacement and then exit.
+
+   Copyright (C) 2005-2006, 2008-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/>.  */
+
+#include <config.h>
+
+#include "openat.h"
+
+#include <stdlib.h>
+
+#ifndef GNULIB_LIBPOSIX
+# include "error.h"
+#endif
+
+#include "exitfail.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+void
+openat_save_fail (int errnum)
+{
+#ifndef GNULIB_LIBPOSIX
+  error (exit_failure, errnum,
+         _("unable to record current working directory"));
+#endif
+  /* The `noreturn' attribute cannot be applied to error, since it returns
+     when its first argument is 0.  To help compilers understand that this
+     function does not return, call abort.  Also, the abort is a
+     safety feature if exit_failure is 0 (which shouldn't happen).  */
+  abort ();
+}
+
+
+/* Exit with an error about failure to restore the working directory
+   during an openat emulation.  The caller must ensure that fd 2 is
+   not a just-opened fd, even when openat_safer is not in use.  */
+
+void
+openat_restore_fail (int errnum)
+{
+#ifndef GNULIB_LIBPOSIX
+  error (exit_failure, errnum,
+         _("failed to return to initial working directory"));
+#endif
+
+  /* As above.  */
+  abort ();
+}
diff --git a/gnulib/lib/openat-priv.h b/gnulib/lib/openat-priv.h
new file mode 100644 (file)
index 0000000..948b220
--- /dev/null
@@ -0,0 +1,64 @@
+/* Internals for openat-like functions.
+
+   Copyright (C) 2005-2006, 2009-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 Jim Meyering */
+
+#ifndef _GL_HEADER_OPENAT_PRIV
+#define _GL_HEADER_OPENAT_PRIV
+
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+
+/* Maximum number of bytes that it is safe to allocate as a single
+   array on the stack, and that is known as a compile-time constant.
+   The assumption is that we'll touch the array very quickly, or a
+   temporary very near the array, provoking an out-of-memory trap.  On
+   some operating systems, there is only one guard page for the stack,
+   and a page size can be as small as 4096 bytes.  Subtract 64 in the
+   hope that this will let the compiler touch a nearby temporary and
+   provoke a trap.  */
+#define SAFER_ALLOCA_MAX (4096 - 64)
+
+#define SAFER_ALLOCA(m) ((m) < SAFER_ALLOCA_MAX ? (m) : SAFER_ALLOCA_MAX)
+
+#if defined PATH_MAX
+# define OPENAT_BUFFER_SIZE SAFER_ALLOCA (PATH_MAX)
+#elif defined _XOPEN_PATH_MAX
+# define OPENAT_BUFFER_SIZE SAFER_ALLOCA (_XOPEN_PATH_MAX)
+#else
+# define OPENAT_BUFFER_SIZE SAFER_ALLOCA (1024)
+#endif
+
+char *openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file);
+
+/* Trying to access a BUILD_PROC_NAME file will fail on systems without
+   /proc support, and even on systems *with* ProcFS support.  Return
+   nonzero if the failure may be legitimate, e.g., because /proc is not
+   readable, or the particular .../fd/N directory is not present.  */
+#define EXPECTED_ERRNO(Errno)                   \
+  ((Errno) == ENOTDIR || (Errno) == ENOENT      \
+   || (Errno) == EPERM || (Errno) == EACCES     \
+   || (Errno) == ENOSYS /* Solaris 8 */         \
+   || (Errno) == EOPNOTSUPP /* FreeBSD */)
+
+/* Wrapper function shared among linkat and renameat.  */
+int at_func2 (int fd1, char const *file1,
+              int fd2, char const *file2,
+              int (*func) (char const *file1, char const *file2));
+
+#endif /* _GL_HEADER_OPENAT_PRIV */
diff --git a/gnulib/lib/openat-proc.c b/gnulib/lib/openat-proc.c
new file mode 100644 (file)
index 0000000..4a470c5
--- /dev/null
@@ -0,0 +1,111 @@
+/* Create /proc/self/fd-related names for subfiles of open directories.
+
+   Copyright (C) 2006, 2009-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 Paul Eggert.  */
+
+#include <config.h>
+
+#include "openat-priv.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "intprops.h"
+#include "same-inode.h"
+
+/* The results of open() in this file are not used with fchdir,
+   and we do not leak fds to any single-threaded code that could use stdio,
+   therefore save some unnecessary work in fchdir.c.
+   FIXME - if the kernel ever adds support for multi-thread safety for
+   avoiding standard fds, then we should use open_safer.  */
+#undef open
+#undef close
+
+#define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/%s"
+
+#define PROC_SELF_FD_NAME_SIZE_BOUND(len) \
+  (sizeof PROC_SELF_FD_FORMAT - sizeof "%d%s" \
+   + INT_STRLEN_BOUND (int) + (len) + 1)
+
+
+/* Set BUF to the expansion of PROC_SELF_FD_FORMAT, using FD and FILE
+   respectively for %d and %s.  If successful, return BUF if the
+   result fits in BUF, dynamically allocated memory otherwise.  But
+   return NULL if /proc is not reliable, either because the operating
+   system support is lacking or because memory is low.  */
+char *
+openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file)
+{
+  static int proc_status = 0;
+
+  /* Make sure the caller gets ENOENT when appropriate.  */
+  if (!*file)
+    {
+      buf[0] = '\0';
+      return buf;
+    }
+
+  if (! proc_status)
+    {
+      /* Set PROC_STATUS to a positive value if /proc/self/fd is
+         reliable, and a negative value otherwise.  Solaris 10
+         /proc/self/fd mishandles "..", and any file name might expand
+         to ".." after symbolic link expansion, so avoid /proc/self/fd
+         if it mishandles "..".  Solaris 10 has openat, but this
+         problem is exhibited on code that built on Solaris 8 and
+         running on Solaris 10.  */
+
+      int proc_self_fd = open ("/proc/self/fd", O_SEARCH);
+      if (proc_self_fd < 0)
+        proc_status = -1;
+      else
+        {
+          struct stat proc_self_fd_dotdot_st;
+          struct stat proc_self_st;
+          char dotdot_buf[PROC_SELF_FD_NAME_SIZE_BOUND (sizeof ".." - 1)];
+          sprintf (dotdot_buf, PROC_SELF_FD_FORMAT, proc_self_fd, "..");
+          proc_status =
+            ((stat (dotdot_buf, &proc_self_fd_dotdot_st) == 0
+              && stat ("/proc/self", &proc_self_st) == 0
+              && SAME_INODE (proc_self_fd_dotdot_st, proc_self_st))
+             ? 1 : -1);
+          close (proc_self_fd);
+        }
+    }
+
+  if (proc_status < 0)
+    return NULL;
+  else
+    {
+      size_t bufsize = PROC_SELF_FD_NAME_SIZE_BOUND (strlen (file));
+      char *result = buf;
+      if (OPENAT_BUFFER_SIZE < bufsize)
+        {
+          result = malloc (bufsize);
+          if (! result)
+            return NULL;
+        }
+      sprintf (result, PROC_SELF_FD_FORMAT, fd, file);
+      return result;
+    }
+}
diff --git a/gnulib/lib/openat-safer.c b/gnulib/lib/openat-safer.c
new file mode 100644 (file)
index 0000000..66f327b
--- /dev/null
@@ -0,0 +1,46 @@
+/* Invoke openat, but avoid some glitches.
+
+   Copyright (C) 2005-2006, 2008-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 Paul Eggert for open, ported by Eric Blake for openat.  */
+
+#include <config.h>
+
+#include "fcntl-safer.h"
+
+#include <fcntl.h>
+#include <stdarg.h>
+#include "unistd-safer.h"
+
+int
+openat_safer (int fd, char const *file, int flags, ...)
+{
+  mode_t mode = 0;
+
+  if (flags & O_CREAT)
+    {
+      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);
+    }
+
+  return fd_safer (openat (fd, file, flags, mode));
+}
diff --git a/gnulib/lib/openat.c b/gnulib/lib/openat.c
new file mode 100644 (file)
index 0000000..18491a6
--- /dev/null
@@ -0,0 +1,265 @@
+/* provide a replacement openat function
+   Copyright (C) 2004-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 Jim Meyering */
+
+#include <config.h>
+
+#include "openat.h"
+
+#include <stdarg.h>
+#include <stddef.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
+#include "openat-priv.h"
+#include "save-cwd.h"
+
+#if HAVE_OPENAT
+
+# undef openat
+
+/* Like openat, but work around Solaris 9 bugs with trailing slash.  */
+int
+rpl_openat (int dfd, char const *filename, int flags, ...)
+{
+  mode_t mode;
+  int fd;
+
+  mode = 0;
+  if (flags & O_CREAT)
+    {
+      va_list arg;
+      va_start (arg, 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 (arg, PROMOTED_MODE_T);
+
+      va_end (arg);
+    }
+
+# if OPEN_TRAILING_SLASH_BUG
+  /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR
+     is specified, then fail.
+     Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
+     says that
+       "A pathname that contains at least one non-slash character and that
+        ends with one or more trailing slashes shall be resolved as if a
+        single dot character ( '.' ) were appended to the pathname."
+     and
+       "The special filename dot shall refer to the directory specified by
+        its predecessor."
+     If the named file already exists as a directory, then
+       - if O_CREAT is specified, open() must fail because of the semantics
+         of O_CREAT,
+       - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX
+         <http://www.opengroup.org/susv3/functions/open.html> says that it
+         fails with errno = EISDIR in this case.
+     If the named file does not exist or does not name a directory, then
+       - if O_CREAT is specified, open() must fail since open() cannot create
+         directories,
+       - if O_WRONLY or O_RDWR is specified, open() must fail because the
+         file does not contain a '.' directory.  */
+  if (flags & (O_CREAT | O_WRONLY | O_RDWR))
+    {
+      size_t len = strlen (filename);
+      if (len > 0 && filename[len - 1] == '/')
+        {
+          errno = EISDIR;
+          return -1;
+        }
+    }
+# endif
+
+  fd = openat (dfd, filename, flags, mode);
+
+# if OPEN_TRAILING_SLASH_BUG
+  /* If the filename ends in a slash and fd does not refer to a directory,
+     then fail.
+     Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
+     says that
+       "A pathname that contains at least one non-slash character and that
+        ends with one or more trailing slashes shall be resolved as if a
+        single dot character ( '.' ) were appended to the pathname."
+     and
+       "The special filename dot shall refer to the directory specified by
+        its predecessor."
+     If the named file without the slash is not a directory, open() must fail
+     with ENOTDIR.  */
+  if (fd >= 0)
+    {
+      /* We know len is positive, since open did not fail with ENOENT.  */
+      size_t len = strlen (filename);
+      if (filename[len - 1] == '/')
+        {
+          struct stat statbuf;
+
+          if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
+            {
+              close (fd);
+              errno = ENOTDIR;
+              return -1;
+            }
+        }
+    }
+# endif
+
+  return fd;
+}
+
+#else /* !HAVE_OPENAT */
+
+/* Replacement for Solaris' openat function.
+   <http://www.google.com/search?q=openat+site:docs.sun.com>
+   First, try to simulate it via open ("/proc/self/fd/FD/FILE").
+   Failing that, simulate it by doing save_cwd/fchdir/open/restore_cwd.
+   If either the save_cwd or the restore_cwd fails (relatively unlikely),
+   then give a diagnostic and exit nonzero.
+   Otherwise, upon failure, set errno and return -1, as openat does.
+   Upon successful completion, return a file descriptor.  */
+int
+openat (int fd, char const *file, int flags, ...)
+{
+  mode_t mode = 0;
+
+  if (flags & O_CREAT)
+    {
+      va_list arg;
+      va_start (arg, 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 (arg, PROMOTED_MODE_T);
+
+      va_end (arg);
+    }
+
+  return openat_permissive (fd, file, flags, mode, NULL);
+}
+
+/* Like openat (FD, FILE, FLAGS, MODE), but if CWD_ERRNO is
+   nonnull, set *CWD_ERRNO to an errno value if unable to save
+   or restore the initial working directory.  This is needed only
+   the first time remove.c's remove_dir opens a command-line
+   directory argument.
+
+   If a previous attempt to restore the current working directory
+   failed, then we must not even try to access a `.'-relative name.
+   It is the caller's responsibility not to call this function
+   in that case.  */
+
+int
+openat_permissive (int fd, char const *file, int flags, mode_t mode,
+                   int *cwd_errno)
+{
+  struct saved_cwd saved_cwd;
+  int saved_errno;
+  int err;
+  bool save_ok;
+
+  if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file))
+    return open (file, flags, mode);
+
+  {
+    char buf[OPENAT_BUFFER_SIZE];
+    char *proc_file = openat_proc_name (buf, fd, file);
+    if (proc_file)
+      {
+        int open_result = open (proc_file, flags, mode);
+        int open_errno = errno;
+        if (proc_file != buf)
+          free (proc_file);
+        /* If the syscall succeeds, or if it fails with an unexpected
+           errno value, then return right away.  Otherwise, fall through
+           and resort to using save_cwd/restore_cwd.  */
+        if (0 <= open_result || ! EXPECTED_ERRNO (open_errno))
+          {
+            errno = open_errno;
+            return open_result;
+          }
+      }
+  }
+
+  save_ok = (save_cwd (&saved_cwd) == 0);
+  if (! save_ok)
+    {
+      if (! cwd_errno)
+        openat_save_fail (errno);
+      *cwd_errno = errno;
+    }
+  if (0 <= fd && fd == saved_cwd.desc)
+    {
+      /* If saving the working directory collides with the user's
+         requested fd, then the user's fd must have been closed to
+         begin with.  */
+      free_cwd (&saved_cwd);
+      errno = EBADF;
+      return -1;
+    }
+
+  err = fchdir (fd);
+  saved_errno = errno;
+
+  if (! err)
+    {
+      err = open (file, flags, mode);
+      saved_errno = errno;
+      if (save_ok && restore_cwd (&saved_cwd) != 0)
+        {
+          if (! cwd_errno)
+            {
+              /* Don't write a message to just-created fd 2.  */
+              saved_errno = errno;
+              if (err == STDERR_FILENO)
+                close (err);
+              openat_restore_fail (saved_errno);
+            }
+          *cwd_errno = errno;
+        }
+    }
+
+  free_cwd (&saved_cwd);
+  errno = saved_errno;
+  return err;
+}
+
+/* Return true if our openat implementation must resort to
+   using save_cwd and restore_cwd.  */
+bool
+openat_needs_fchdir (void)
+{
+  bool needs_fchdir = true;
+  int fd = open ("/", O_SEARCH);
+
+  if (0 <= fd)
+    {
+      char buf[OPENAT_BUFFER_SIZE];
+      char *proc_file = openat_proc_name (buf, fd, ".");
+      if (proc_file)
+        {
+          needs_fchdir = false;
+          if (proc_file != buf)
+            free (proc_file);
+        }
+      close (fd);
+    }
+
+  return needs_fchdir;
+}
+
+#endif /* !HAVE_OPENAT */
diff --git a/gnulib/lib/openat.h b/gnulib/lib/openat.h
new file mode 100644 (file)
index 0000000..5cb1866
--- /dev/null
@@ -0,0 +1,98 @@
+/* provide a replacement openat function
+   Copyright (C) 2004-2006, 2008-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 Jim Meyering */
+
+#ifndef _GL_HEADER_OPENAT
+#define _GL_HEADER_OPENAT
+
+#include <fcntl.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <unistd.h>
+#include <stdbool.h>
+
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#else
+# define _GL_ATTRIBUTE_NORETURN /* empty */
+#endif
+
+#if !HAVE_OPENAT
+
+int openat_permissive (int fd, char const *file, int flags, mode_t mode,
+                       int *cwd_errno);
+bool openat_needs_fchdir (void);
+
+#else
+
+# define openat_permissive(Fd, File, Flags, Mode, Cwd_errno) \
+    openat (Fd, File, Flags, Mode)
+# define openat_needs_fchdir() false
+
+#endif
+
+void openat_restore_fail (int) _GL_ATTRIBUTE_NORETURN;
+void openat_save_fail (int) _GL_ATTRIBUTE_NORETURN;
+
+/* Using these function names makes application code
+   slightly more readable than it would be with
+   fchownat (..., 0) or fchownat (..., AT_SYMLINK_NOFOLLOW).  */
+static inline int
+chownat (int fd, char const *file, uid_t owner, gid_t group)
+{
+  return fchownat (fd, file, owner, group, 0);
+}
+
+static inline int
+lchownat (int fd, char const *file, uid_t owner, gid_t group)
+{
+  return fchownat (fd, file, owner, group, AT_SYMLINK_NOFOLLOW);
+}
+
+static inline int
+chmodat (int fd, char const *file, mode_t mode)
+{
+  return fchmodat (fd, file, mode, 0);
+}
+
+static inline int
+lchmodat (int fd, char const *file, mode_t mode)
+{
+  return fchmodat (fd, file, mode, AT_SYMLINK_NOFOLLOW);
+}
+
+static inline int
+statat (int fd, char const *name, struct stat *st)
+{
+  return fstatat (fd, name, st, 0);
+}
+
+static inline int
+lstatat (int fd, char const *name, struct stat *st)
+{
+  return fstatat (fd, name, st, AT_SYMLINK_NOFOLLOW);
+}
+
+/* For now, there are no wrappers named laccessat or leuidaccessat,
+   since gnulib doesn't support faccessat(,AT_SYMLINK_NOFOLLOW) and
+   since access rights on symlinks are of limited utility.  Likewise,
+   wrappers are not provided for accessat or euidaccessat, so as to
+   avoid dragging in -lgen on some platforms.  */
+
+#endif /* _GL_HEADER_OPENAT */
diff --git a/gnulib/lib/opendir-safer.c b/gnulib/lib/opendir-safer.c
new file mode 100644 (file)
index 0000000..f1e5fb7
--- /dev/null
@@ -0,0 +1,68 @@
+/* Invoke opendir, but avoid some glitches.
+
+   Copyright (C) 2009-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 Eric Blake.  */
+
+#include <config.h>
+
+#include "dirent-safer.h"
+
+#include <errno.h>
+#include <unistd.h>
+#include "unistd-safer.h"
+
+/* Like opendir, but do not clobber stdin, stdout, or stderr.  */
+
+DIR *
+opendir_safer (char const *name)
+{
+  DIR *dp = opendir (name);
+
+  if (dp)
+    {
+      int fd = dirfd (dp);
+
+      if (0 <= fd && fd <= STDERR_FILENO)
+        {
+          /* If fdopendir is native (as on Linux), then it is safe to
+             assume dirfd(fdopendir(n))==n.  If we are using the
+             gnulib module fdopendir, then this guarantee is not met,
+             but fdopendir recursively calls opendir_safer up to 3
+             times to at least get a safe fd.  If fdopendir is not
+             present but dirfd is accurate (as on cygwin 1.5.x), then
+             we recurse up to 3 times ourselves.  Finally, if dirfd
+             always fails (as on mingw), then we are already safe.  */
+          DIR *newdp;
+          int e;
+#if HAVE_FDOPENDIR || GNULIB_FDOPENDIR
+          int f = dup_safer (fd);
+          newdp = fdopendir (f);
+          e = errno;
+          if (! newdp)
+            close (f);
+#else /* !FDOPENDIR */
+          newdp = opendir_safer (name);
+          e = errno;
+#endif
+          closedir (dp);
+          errno = e;
+          dp = newdp;
+        }
+    }
+
+  return dp;
+}
diff --git a/gnulib/lib/parse-datetime.c b/gnulib/lib/parse-datetime.c
new file mode 100644 (file)
index 0000000..94d6573
--- /dev/null
@@ -0,0 +1,3505 @@
+
+/* A Bison parser, made by GNU Bison 2.4.1.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   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/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.4.1"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 1
+
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+
+
+/* Copy the first part of user declarations.  */
+
+/* Line 189 of yacc.c  */
+#line 1 "parse-datetime.y"
+
+/* Parse a string into an internal time stamp.
+
+   Copyright (C) 1999-2000, 2002-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/>.  */
+
+/* Originally written by Steven M. Bellovin <smb@research.att.com> while
+   at the University of North Carolina at Chapel Hill.  Later tweaked by
+   a couple of people on Usenet.  Completely overhauled by Rich $alz
+   <rsalz@bbn.com> and Jim Berets <jberets@bbn.com> in August, 1990.
+
+   Modified by Paul Eggert <eggert@twinsun.com> in August 1999 to do
+   the right thing about local DST.  Also modified by Paul Eggert
+   <eggert@cs.ucla.edu> in February 2004 to support
+   nanosecond-resolution time stamps, and in October 2004 to support
+   TZ strings in dates.  */
+
+/* FIXME: Check for arithmetic overflow in all cases, not just
+   some of them.  */
+
+#include <config.h>
+
+#include "parse-datetime.h"
+
+#include "intprops.h"
+#include "timespec.h"
+#include "verify.h"
+
+/* There's no need to extend the stack, so there's no need to involve
+   alloca.  */
+#define YYSTACK_USE_ALLOCA 0
+
+/* Tell Bison how much stack space is needed.  20 should be plenty for
+   this grammar, which is not right recursive.  Beware setting it too
+   high, since that might cause problems on machines whose
+   implementations have lame stack-overflow checking.  */
+#define YYMAXDEPTH 20
+#define YYINITDEPTH YYMAXDEPTH
+
+/* Since the code of parse-datetime.y is not included in the Emacs executable
+   itself, there is no need to #define static in this file.  Even if
+   the code were included in the Emacs executable, it probably
+   wouldn't do any harm to #undef it here; this will only cause
+   problems if we try to write to a static variable, which I don't
+   think this code needs to do.  */
+#ifdef emacs
+# undef static
+#endif
+
+#include <c-ctype.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "xalloc.h"
+
+/* Bison's skeleton tests _STDLIB_H, while some stdlib.h headers
+   use _STDLIB_H_ as witness.  Map the latter to the one bison uses.  */
+/* FIXME: this is temporary.  Remove when we have a mechanism to ensure
+   that the version we're using is fixed, too.  */
+#ifdef _STDLIB_H_
+# undef _STDLIB_H
+# define _STDLIB_H 1
+#endif
+
+/* ISDIGIT differs from isdigit, as follows:
+   - Its arg may be any int or unsigned int; it need not be an unsigned char
+     or EOF.
+   - It's typically faster.
+   POSIX says that only '0' through '9' are digits.  Prefer ISDIGIT to
+   isdigit unless it's important to use the locale's definition
+   of `digit' even when the host does not conform to POSIX.  */
+#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
+
+/* Shift A right by B bits portably, by dividing A by 2**B and
+   truncating towards minus infinity.  A and B should be free of side
+   effects, and B should be in the range 0 <= B <= INT_BITS - 2, where
+   INT_BITS is the number of useful bits in an int.  GNU code can
+   assume that INT_BITS is at least 32.
+
+   ISO C99 says that A >> B is implementation-defined if A < 0.  Some
+   implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift
+   right in the usual way when A < 0, so SHR falls back on division if
+   ordinary A >> B doesn't seem to be the usual signed shift.  */
+#define SHR(a, b)       \
+  (-1 >> 1 == -1        \
+   ? (a) >> (b)         \
+   : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
+
+#define EPOCH_YEAR 1970
+#define TM_YEAR_BASE 1900
+
+#define HOUR(x) ((x) * 60)
+
+/* long_time_t is a signed integer type that contains all time_t values.  */
+verify (TYPE_IS_INTEGER (time_t));
+#if TIME_T_FITS_IN_LONG_INT
+typedef long int long_time_t;
+#else
+typedef time_t long_time_t;
+#endif
+
+/* Lots of this code assumes time_t and time_t-like values fit into
+   long_time_t.  */
+verify (TYPE_MINIMUM (long_time_t) <= TYPE_MINIMUM (time_t)
+        && TYPE_MAXIMUM (time_t) <= TYPE_MAXIMUM (long_time_t));
+
+/* FIXME: It also assumes that signed integer overflow silently wraps around,
+   but this is not true any more with recent versions of GCC 4.  */
+
+/* An integer value, and the number of digits in its textual
+   representation.  */
+typedef struct
+{
+  bool negative;
+  long int value;
+  size_t digits;
+} textint;
+
+/* An entry in the lexical lookup table.  */
+typedef struct
+{
+  char const *name;
+  int type;
+  int value;
+} table;
+
+/* Meridian: am, pm, or 24-hour style.  */
+enum { MERam, MERpm, MER24 };
+
+enum { BILLION = 1000000000, LOG10_BILLION = 9 };
+
+/* Relative times.  */
+typedef struct
+{
+  /* Relative year, month, day, hour, minutes, seconds, and nanoseconds.  */
+  long int year;
+  long int month;
+  long int day;
+  long int hour;
+  long int minutes;
+  long_time_t seconds;
+  long int ns;
+} relative_time;
+
+#if HAVE_COMPOUND_LITERALS
+# define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 })
+#else
+static relative_time const RELATIVE_TIME_0;
+#endif
+
+/* Information passed to and from the parser.  */
+typedef struct
+{
+  /* The input string remaining to be parsed. */
+  const char *input;
+
+  /* N, if this is the Nth Tuesday.  */
+  long int day_ordinal;
+
+  /* Day of week; Sunday is 0.  */
+  int day_number;
+
+  /* tm_isdst flag for the local zone.  */
+  int local_isdst;
+
+  /* Time zone, in minutes east of UTC.  */
+  long int time_zone;
+
+  /* Style used for time.  */
+  int meridian;
+
+  /* Gregorian year, month, day, hour, minutes, seconds, and nanoseconds.  */
+  textint year;
+  long int month;
+  long int day;
+  long int hour;
+  long int minutes;
+  struct timespec seconds; /* includes nanoseconds */
+
+  /* Relative year, month, day, hour, minutes, seconds, and nanoseconds.  */
+  relative_time rel;
+
+  /* Presence or counts of nonterminals of various flavors parsed so far.  */
+  bool timespec_seen;
+  bool rels_seen;
+  size_t dates_seen;
+  size_t days_seen;
+  size_t local_zones_seen;
+  size_t dsts_seen;
+  size_t times_seen;
+  size_t zones_seen;
+
+  /* Table of local time zone abbrevations, terminated by a null entry.  */
+  table local_time_zone_table[3];
+} parser_control;
+
+union YYSTYPE;
+static int yylex (union YYSTYPE *, parser_control *);
+static int yyerror (parser_control const *, char const *);
+static long int time_zone_hhmm (parser_control *, textint, long int);
+
+/* Extract into *PC any date and time info from a string of digits
+   of the form e.g., YYYYMMDD, YYMMDD, HHMM, HH (and sometimes YYY,
+   YYYY, ...).  */
+static void
+digits_to_date_time (parser_control *pc, textint text_int)
+{
+  if (pc->dates_seen && ! pc->year.digits
+      && ! pc->rels_seen && (pc->times_seen || 2 < text_int.digits))
+    pc->year = text_int;
+  else
+    {
+      if (4 < text_int.digits)
+        {
+          pc->dates_seen++;
+          pc->day = text_int.value % 100;
+          pc->month = (text_int.value / 100) % 100;
+          pc->year.value = text_int.value / 10000;
+          pc->year.digits = text_int.digits - 4;
+        }
+      else
+        {
+          pc->times_seen++;
+          if (text_int.digits <= 2)
+            {
+              pc->hour = text_int.value;
+              pc->minutes = 0;
+            }
+          else
+            {
+              pc->hour = text_int.value / 100;
+              pc->minutes = text_int.value % 100;
+            }
+          pc->seconds.tv_sec = 0;
+          pc->seconds.tv_nsec = 0;
+          pc->meridian = MER24;
+        }
+    }
+}
+
+/* Increment PC->rel by FACTOR * REL (FACTOR is 1 or -1).  */
+static void
+apply_relative_time (parser_control *pc, relative_time rel, int factor)
+{
+  pc->rel.ns += factor * rel.ns;
+  pc->rel.seconds += factor * rel.seconds;
+  pc->rel.minutes += factor * rel.minutes;
+  pc->rel.hour += factor * rel.hour;
+  pc->rel.day += factor * rel.day;
+  pc->rel.month += factor * rel.month;
+  pc->rel.year += factor * rel.year;
+  pc->rels_seen = true;
+}
+
+/* Set PC-> hour, minutes, seconds and nanoseconds members from arguments.  */
+static void
+set_hhmmss (parser_control *pc, long int hour, long int minutes,
+            time_t sec, long int nsec)
+{
+  pc->hour = hour;
+  pc->minutes = minutes;
+  pc->seconds.tv_sec = sec;
+  pc->seconds.tv_nsec = nsec;
+}
+
+
+
+/* Line 189 of yacc.c  */
+#line 355 "parse-datetime.c"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     tAGO = 258,
+     tDST = 259,
+     tYEAR_UNIT = 260,
+     tMONTH_UNIT = 261,
+     tHOUR_UNIT = 262,
+     tMINUTE_UNIT = 263,
+     tSEC_UNIT = 264,
+     tDAY_UNIT = 265,
+     tDAY_SHIFT = 266,
+     tDAY = 267,
+     tDAYZONE = 268,
+     tLOCAL_ZONE = 269,
+     tMERIDIAN = 270,
+     tMONTH = 271,
+     tORDINAL = 272,
+     tZONE = 273,
+     tSNUMBER = 274,
+     tUNUMBER = 275,
+     tSDECIMAL_NUMBER = 276,
+     tUDECIMAL_NUMBER = 277
+   };
+#endif
+/* Tokens.  */
+#define tAGO 258
+#define tDST 259
+#define tYEAR_UNIT 260
+#define tMONTH_UNIT 261
+#define tHOUR_UNIT 262
+#define tMINUTE_UNIT 263
+#define tSEC_UNIT 264
+#define tDAY_UNIT 265
+#define tDAY_SHIFT 266
+#define tDAY 267
+#define tDAYZONE 268
+#define tLOCAL_ZONE 269
+#define tMERIDIAN 270
+#define tMONTH 271
+#define tORDINAL 272
+#define tZONE 273
+#define tSNUMBER 274
+#define tUNUMBER 275
+#define tSDECIMAL_NUMBER 276
+#define tUDECIMAL_NUMBER 277
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 214 of yacc.c  */
+#line 292 "parse-datetime.y"
+
+  long int intval;
+  textint textintval;
+  struct timespec timespec;
+  relative_time rel;
+
+
+
+/* Line 214 of yacc.c  */
+#line 444 "parse-datetime.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 264 of yacc.c  */
+#line 456 "parse-datetime.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+    int yyi;
+#endif
+{
+  return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+            && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+        || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)             \
+      do                                       \
+       {                                       \
+         YYSIZE_T yyi;                         \
+         for (yyi = 0; yyi < (Count); yyi++)   \
+           (To)[yyi] = (From)[yyi];            \
+       }                                       \
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)                          \
+    do                                                                 \
+      {                                                                        \
+       YYSIZE_T yynewbytes;                                            \
+       YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
+       Stack = &yyptr->Stack_alloc;                                    \
+       yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+       yyptr += yynewbytes / sizeof (*yyptr);                          \
+      }                                                                        \
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  12
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   98
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  27
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  21
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  82
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  100
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   277
+
+#define YYTRANSLATE(YYX)                                               \
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,    25,     2,     2,    26,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    24,     2,
+       2,     2,     2,     2,    23,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint8 yyprhs[] =
+{
+       0,     0,     3,     5,     7,    10,    11,    14,    16,    18,
+      20,    22,    24,    26,    28,    30,    33,    38,    44,    51,
+      59,    61,    64,    66,    69,    73,    75,    78,    80,    83,
+      86,    89,    93,    99,   103,   107,   111,   114,   119,   122,
+     126,   129,   131,   133,   136,   139,   141,   144,   147,   149,
+     152,   155,   157,   160,   163,   165,   168,   171,   173,   176,
+     179,   182,   185,   187,   189,   192,   195,   198,   201,   204,
+     207,   209,   211,   213,   215,   217,   219,   221,   223,   226,
+     227,   230,   231
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int8 yyrhs[] =
+{
+      28,     0,    -1,    29,    -1,    30,    -1,    23,    41,    -1,
+      -1,    30,    31,    -1,    32,    -1,    33,    -1,    34,    -1,
+      36,    -1,    35,    -1,    37,    -1,    44,    -1,    45,    -1,
+      20,    15,    -1,    20,    24,    20,    47,    -1,    20,    24,
+      20,    19,    46,    -1,    20,    24,    20,    24,    43,    47,
+      -1,    20,    24,    20,    24,    43,    19,    46,    -1,    14,
+      -1,    14,     4,    -1,    18,    -1,    18,    39,    -1,    18,
+      19,    46,    -1,    13,    -1,    18,     4,    -1,    12,    -1,
+      12,    25,    -1,    17,    12,    -1,    20,    12,    -1,    20,
+      26,    20,    -1,    20,    26,    20,    26,    20,    -1,    20,
+      19,    19,    -1,    20,    16,    19,    -1,    16,    19,    19,
+      -1,    16,    20,    -1,    16,    20,    25,    20,    -1,    20,
+      16,    -1,    20,    16,    20,    -1,    38,     3,    -1,    38,
+      -1,    40,    -1,    17,     5,    -1,    20,     5,    -1,     5,
+      -1,    17,     6,    -1,    20,     6,    -1,     6,    -1,    17,
+      10,    -1,    20,    10,    -1,    10,    -1,    17,     7,    -1,
+      20,     7,    -1,     7,    -1,    17,     8,    -1,    20,     8,
+      -1,     8,    -1,    17,     9,    -1,    20,     9,    -1,    21,
+       9,    -1,    22,     9,    -1,     9,    -1,    39,    -1,    19,
+       5,    -1,    19,     6,    -1,    19,    10,    -1,    19,     7,
+      -1,    19,     8,    -1,    19,     9,    -1,    11,    -1,    42,
+      -1,    43,    -1,    21,    -1,    19,    -1,    22,    -1,    20,
+      -1,    20,    -1,    20,    39,    -1,    -1,    24,    20,    -1,
+      -1,    15,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint16 yyrline[] =
+{
+       0,   318,   318,   319,   323,   330,   332,   336,   338,   340,
+     342,   344,   346,   347,   348,   352,   357,   362,   369,   374,
+     384,   389,   397,   399,   402,   404,   406,   411,   416,   421,
+     426,   434,   439,   459,   466,   474,   482,   487,   493,   498,
+     507,   509,   511,   516,   518,   520,   522,   524,   526,   528,
+     530,   532,   534,   536,   538,   540,   542,   544,   546,   548,
+     550,   552,   554,   556,   560,   562,   564,   566,   568,   570,
+     575,   579,   579,   582,   583,   588,   589,   594,   599,   610,
+     611,   617,   618
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "tAGO", "tDST", "tYEAR_UNIT",
+  "tMONTH_UNIT", "tHOUR_UNIT", "tMINUTE_UNIT", "tSEC_UNIT", "tDAY_UNIT",
+  "tDAY_SHIFT", "tDAY", "tDAYZONE", "tLOCAL_ZONE", "tMERIDIAN", "tMONTH",
+  "tORDINAL", "tZONE", "tSNUMBER", "tUNUMBER", "tSDECIMAL_NUMBER",
+  "tUDECIMAL_NUMBER", "'@'", "':'", "','", "'/'", "$accept", "spec",
+  "timespec", "items", "item", "time", "local_zone", "zone", "day", "date",
+  "rel", "relunit", "relunit_snumber", "dayshift", "seconds",
+  "signed_seconds", "unsigned_seconds", "number", "hybrid",
+  "o_colon_minutes", "o_merid", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,    64,    58,    44,    47
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    27,    28,    28,    29,    30,    30,    31,    31,    31,
+      31,    31,    31,    31,    31,    32,    32,    32,    32,    32,
+      33,    33,    34,    34,    34,    34,    34,    35,    35,    35,
+      35,    36,    36,    36,    36,    36,    36,    36,    36,    36,
+      37,    37,    37,    38,    38,    38,    38,    38,    38,    38,
+      38,    38,    38,    38,    38,    38,    38,    38,    38,    38,
+      38,    38,    38,    38,    39,    39,    39,    39,    39,    39,
+      40,    41,    41,    42,    42,    43,    43,    44,    45,    46,
+      46,    47,    47
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     1,     1,     2,     0,     2,     1,     1,     1,
+       1,     1,     1,     1,     1,     2,     4,     5,     6,     7,
+       1,     2,     1,     2,     3,     1,     2,     1,     2,     2,
+       2,     3,     5,     3,     3,     3,     2,     4,     2,     3,
+       2,     1,     1,     2,     2,     1,     2,     2,     1,     2,
+       2,     1,     2,     2,     1,     2,     2,     1,     2,     2,
+       2,     2,     1,     1,     2,     2,     2,     2,     2,     2,
+       1,     1,     1,     1,     1,     1,     1,     1,     2,     0,
+       2,     0,     1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+       5,     0,     0,     2,     3,    74,    76,    73,    75,     4,
+      71,    72,     1,    45,    48,    54,    57,    62,    51,    70,
+      27,    25,    20,     0,     0,    22,     0,    77,     0,     0,
+       6,     7,     8,     9,    11,    10,    12,    41,    63,    42,
+      13,    14,    28,    21,     0,    36,    43,    46,    52,    55,
+      58,    49,    29,    26,    79,    23,    64,    65,    67,    68,
+      69,    66,    44,    47,    53,    56,    59,    50,    30,    15,
+      38,     0,     0,     0,    78,    60,    61,    40,    35,     0,
+       0,    24,    34,    39,    33,    81,    31,    37,    80,    82,
+      79,     0,    16,     0,    17,    81,    32,    79,    18,    19
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int8 yydefgoto[] =
+{
+      -1,     2,     3,     4,    30,    31,    32,    33,    34,    35,
+      36,    37,    38,    39,     9,    10,    11,    40,    41,    81,
+      92
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -82
+static const yytype_int8 yypact[] =
+{
+     -17,    56,    15,   -82,    26,   -82,   -82,   -82,   -82,   -82,
+     -82,   -82,   -82,   -82,   -82,   -82,   -82,   -82,   -82,   -82,
+      36,   -82,    68,    10,    50,     9,    59,    -5,    72,    73,
+     -82,   -82,   -82,   -82,   -82,   -82,   -82,    80,   -82,   -82,
+     -82,   -82,   -82,   -82,    65,    61,   -82,   -82,   -82,   -82,
+     -82,   -82,   -82,   -82,    17,   -82,   -82,   -82,   -82,   -82,
+     -82,   -82,   -82,   -82,   -82,   -82,   -82,   -82,   -82,   -82,
+      60,    44,    67,    69,   -82,   -82,   -82,   -82,   -82,    70,
+      71,   -82,   -82,   -82,   -82,    -7,    62,   -82,   -82,   -82,
+      74,    -2,   -82,    75,   -82,    55,   -82,    74,   -82,   -82
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int8 yypgoto[] =
+{
+     -82,   -82,   -82,   -82,   -82,   -82,   -82,   -82,   -82,   -82,
+     -82,   -82,    46,   -82,   -82,   -82,    -6,   -82,   -82,   -81,
+      -3
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -1
+static const yytype_uint8 yytable[] =
+{
+      62,    63,    64,    65,    66,    67,     1,    68,    89,    94,
+      69,    70,    90,    53,    71,    12,    99,    91,     6,    72,
+       8,    73,    56,    57,    58,    59,    60,    61,    54,    44,
+      45,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    80,    23,    24,    25,    26,    27,    28,    29,    56,
+      57,    58,    59,    60,    61,    46,    47,    48,    49,    50,
+      51,    42,    52,    84,    56,    57,    58,    59,    60,    61,
+      89,    55,    43,    74,    97,     5,     6,     7,     8,    82,
+      83,    75,    76,    77,    78,    95,    79,    85,    93,    86,
+      87,    88,    98,     0,     0,    96,     0,     0,    80
+};
+
+static const yytype_int8 yycheck[] =
+{
+       5,     6,     7,     8,     9,    10,    23,    12,    15,    90,
+      15,    16,    19,     4,    19,     0,    97,    24,    20,    24,
+      22,    26,     5,     6,     7,     8,     9,    10,    19,    19,
+      20,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    24,    16,    17,    18,    19,    20,    21,    22,     5,
+       6,     7,     8,     9,    10,     5,     6,     7,     8,     9,
+      10,    25,    12,    19,     5,     6,     7,     8,     9,    10,
+      15,    25,     4,    27,    19,    19,    20,    21,    22,    19,
+      20,     9,     9,     3,    19,    91,    25,    20,    26,    20,
+      20,    20,    95,    -1,    -1,    20,    -1,    -1,    24
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,    23,    28,    29,    30,    19,    20,    21,    22,    41,
+      42,    43,     0,     5,     6,     7,     8,     9,    10,    11,
+      12,    13,    14,    16,    17,    18,    19,    20,    21,    22,
+      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+      44,    45,    25,     4,    19,    20,     5,     6,     7,     8,
+       9,    10,    12,     4,    19,    39,     5,     6,     7,     8,
+       9,    10,     5,     6,     7,     8,     9,    10,    12,    15,
+      16,    19,    24,    26,    39,     9,     9,     3,    19,    25,
+      24,    46,    19,    20,    19,    20,    20,    20,    20,    15,
+      19,    24,    47,    26,    46,    43,    20,    19,    47,    46
+};
+
+#define yyerrok                (yyerrstatus = 0)
+#define yyclearin      (yychar = YYEMPTY)
+#define YYEMPTY                (-2)
+#define YYEOF          0
+
+#define YYACCEPT       goto yyacceptlab
+#define YYABORT                goto yyabortlab
+#define YYERROR                goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL         goto yyerrlab
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)                                 \
+do                                                             \
+  if (yychar == YYEMPTY && yylen == 1)                         \
+    {                                                          \
+      yychar = (Token);                                                \
+      yylval = (Value);                                                \
+      yytoken = YYTRANSLATE (yychar);                          \
+      YYPOPSTACK (1);                                          \
+      goto yybackup;                                           \
+    }                                                          \
+  else                                                         \
+    {                                                          \
+      yyerror (pc, YY_("syntax error: cannot back up")); \
+      YYERROR;                                                 \
+    }                                                          \
+while (YYID (0))
+
+
+#define YYTERROR       1
+#define YYERRCODE      256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)                               \
+    do                                                                 \
+      if (YYID (N))                                                    \
+       {                                                               \
+         (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
+         (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
+         (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
+         (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
+       }                                                               \
+      else                                                             \
+       {                                                               \
+         (Current).first_line   = (Current).last_line   =              \
+           YYRHSLOC (Rhs, 0).last_line;                                \
+         (Current).first_column = (Current).last_column =              \
+           YYRHSLOC (Rhs, 0).last_column;                              \
+       }                                                               \
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)                 \
+     fprintf (File, "%d.%d-%d.%d",                     \
+             (Loc).first_line, (Loc).first_column,     \
+             (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval, pc)
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)                       \
+do {                                           \
+  if (yydebug)                                 \
+    YYFPRINTF Args;                            \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                   \
+do {                                                                     \
+  if (yydebug)                                                           \
+    {                                                                    \
+      YYFPRINTF (stderr, "%s ", Title);                                          \
+      yy_symbol_print (stderr,                                           \
+                 Type, Value, pc); \
+      YYFPRINTF (stderr, "\n");                                                  \
+    }                                                                    \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    parser_control *pc;
+#endif
+{
+  if (!yyvaluep)
+    return;
+  YYUSE (pc);
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+       break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep, pc)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    parser_control *pc;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)                           \
+do {                                                           \
+  if (yydebug)                                                 \
+    yy_stack_print ((Bottom), (Top));                          \
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_control *pc)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule, pc)
+    YYSTYPE *yyvsp;
+    int yyrule;
+    parser_control *pc;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+            yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+                      &(yyvsp[(yyi + 1) - (yynrhs)])
+                                      , pc);
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)         \
+do {                                   \
+  if (yydebug)                         \
+    yy_reduce_print (yyvsp, Rule, pc); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef        YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+\f
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+       switch (*++yyp)
+         {
+         case '\'':
+         case ',':
+           goto do_not_strip_quotes;
+
+         case '\\':
+           if (*++yyp != '\\')
+             goto do_not_strip_quotes;
+           /* Fall through.  */
+         default:
+           if (yyres)
+             yyres[yyn] = *yyp;
+           yyn++;
+           break;
+
+         case '"':
+           if (yyres)
+             yyres[yyn] = '\0';
+           return yyn;
+         }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+  int yyn = yypact[yystate];
+
+  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+    return 0;
+  else
+    {
+      int yytype = YYTRANSLATE (yychar);
+      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+      YYSIZE_T yysize = yysize0;
+      YYSIZE_T yysize1;
+      int yysize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yyx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+        constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yyfmt;
+      char const *yyf;
+      static char const yyunexpected[] = "syntax error, unexpected %s";
+      static char const yyexpecting[] = ", expecting %s";
+      static char const yyor[] = " or %s";
+      char yyformat[sizeof yyunexpected
+                   + sizeof yyexpecting - 1
+                   + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+                      * (sizeof yyor - 1))];
+      char const *yyprefix = yyexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+        YYCHECK.  */
+      int yyxbegin = yyn < 0 ? -yyn : 0;
+
+      /* Stay within bounds of both yycheck and yytname.  */
+      int yychecklim = YYLAST - yyn + 1;
+      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+      int yycount = 1;
+
+      yyarg[0] = yytname[yytype];
+      yyfmt = yystpcpy (yyformat, yyunexpected);
+
+      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+       if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+         {
+           if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+             {
+               yycount = 1;
+               yysize = yysize0;
+               yyformat[sizeof yyunexpected - 1] = '\0';
+               break;
+             }
+           yyarg[yycount++] = yytname[yyx];
+           yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+           yysize_overflow |= (yysize1 < yysize);
+           yysize = yysize1;
+           yyfmt = yystpcpy (yyfmt, yyprefix);
+           yyprefix = yyor;
+         }
+
+      yyf = YY_(yyformat);
+      yysize1 = yysize + yystrlen (yyf);
+      yysize_overflow |= (yysize1 < yysize);
+      yysize = yysize1;
+
+      if (yysize_overflow)
+       return YYSIZE_MAXIMUM;
+
+      if (yyresult)
+       {
+         /* Avoid sprintf, as that infringes on the user's name space.
+            Don't have undefined behavior even if the translation
+            produced a string with the wrong number of "%s"s.  */
+         char *yyp = yyresult;
+         int yyi = 0;
+         while ((*yyp = *yyf) != '\0')
+           {
+             if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+               {
+                 yyp += yytnamerr (yyp, yyarg[yyi++]);
+                 yyf += 2;
+               }
+             else
+               {
+                 yyp++;
+                 yyf++;
+               }
+           }
+       }
+      return yysize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+\f
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_control *pc)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep, pc)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+    parser_control *pc;
+#endif
+{
+  YYUSE (yyvaluep);
+  YYUSE (pc);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+       break;
+    }
+}
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (parser_control *pc);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+
+
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (parser_control *pc)
+#else
+int
+yyparse (pc)
+    parser_control *pc;
+#endif
+#endif
+{
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+
+    /* Number of syntax errors so far.  */
+    int yynerrs;
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY; /* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+       /* Give user a chance to reallocate the stack.  Use copies of
+          these so that the &'s don't force the real ones into
+          memory.  */
+       YYSTYPE *yyvs1 = yyvs;
+       yytype_int16 *yyss1 = yyss;
+
+       /* Each stack pointer address is followed by the size of the
+          data in use in that stack, in bytes.  This used to be a
+          conditional around just the two extra args, but that might
+          be undefined if yyoverflow is a macro.  */
+       yyoverflow (YY_("memory exhausted"),
+                   &yyss1, yysize * sizeof (*yyssp),
+                   &yyvs1, yysize * sizeof (*yyvsp),
+                   &yystacksize);
+
+       yyss = yyss1;
+       yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+       goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+       yystacksize = YYMAXDEPTH;
+
+      {
+       yytype_int16 *yyss1 = yyss;
+       union yyalloc *yyptr =
+         (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+       if (! yyptr)
+         goto yyexhaustedlab;
+       YYSTACK_RELOCATE (yyss_alloc, yyss);
+       YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+#  undef YYSTACK_RELOCATE
+       if (yyss1 != yyssa)
+         YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+                 (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+       YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+  yyn = yypact[yystate];
+  if (yyn == YYPACT_NINF)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+       goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 4:
+
+/* Line 1455 of yacc.c  */
+#line 324 "parse-datetime.y"
+    {
+        pc->seconds = (yyvsp[(2) - (2)].timespec);
+        pc->timespec_seen = true;
+      }
+    break;
+
+  case 7:
+
+/* Line 1455 of yacc.c  */
+#line 337 "parse-datetime.y"
+    { pc->times_seen++; }
+    break;
+
+  case 8:
+
+/* Line 1455 of yacc.c  */
+#line 339 "parse-datetime.y"
+    { pc->local_zones_seen++; }
+    break;
+
+  case 9:
+
+/* Line 1455 of yacc.c  */
+#line 341 "parse-datetime.y"
+    { pc->zones_seen++; }
+    break;
+
+  case 10:
+
+/* Line 1455 of yacc.c  */
+#line 343 "parse-datetime.y"
+    { pc->dates_seen++; }
+    break;
+
+  case 11:
+
+/* Line 1455 of yacc.c  */
+#line 345 "parse-datetime.y"
+    { pc->days_seen++; }
+    break;
+
+  case 15:
+
+/* Line 1455 of yacc.c  */
+#line 353 "parse-datetime.y"
+    {
+        set_hhmmss (pc, (yyvsp[(1) - (2)].textintval).value, 0, 0, 0);
+        pc->meridian = (yyvsp[(2) - (2)].intval);
+      }
+    break;
+
+  case 16:
+
+/* Line 1455 of yacc.c  */
+#line 358 "parse-datetime.y"
+    {
+        set_hhmmss (pc, (yyvsp[(1) - (4)].textintval).value, (yyvsp[(3) - (4)].textintval).value, 0, 0);
+        pc->meridian = (yyvsp[(4) - (4)].intval);
+      }
+    break;
+
+  case 17:
+
+/* Line 1455 of yacc.c  */
+#line 363 "parse-datetime.y"
+    {
+        set_hhmmss (pc, (yyvsp[(1) - (5)].textintval).value, (yyvsp[(3) - (5)].textintval).value, 0, 0);
+        pc->meridian = MER24;
+        pc->zones_seen++;
+        pc->time_zone = time_zone_hhmm (pc, (yyvsp[(4) - (5)].textintval), (yyvsp[(5) - (5)].intval));
+      }
+    break;
+
+  case 18:
+
+/* Line 1455 of yacc.c  */
+#line 370 "parse-datetime.y"
+    {
+        set_hhmmss (pc, (yyvsp[(1) - (6)].textintval).value, (yyvsp[(3) - (6)].textintval).value, (yyvsp[(5) - (6)].timespec).tv_sec, (yyvsp[(5) - (6)].timespec).tv_nsec);
+        pc->meridian = (yyvsp[(6) - (6)].intval);
+      }
+    break;
+
+  case 19:
+
+/* Line 1455 of yacc.c  */
+#line 375 "parse-datetime.y"
+    {
+        set_hhmmss (pc, (yyvsp[(1) - (7)].textintval).value, (yyvsp[(3) - (7)].textintval).value, (yyvsp[(5) - (7)].timespec).tv_sec, (yyvsp[(5) - (7)].timespec).tv_nsec);
+        pc->meridian = MER24;
+        pc->zones_seen++;
+        pc->time_zone = time_zone_hhmm (pc, (yyvsp[(6) - (7)].textintval), (yyvsp[(7) - (7)].intval));
+      }
+    break;
+
+  case 20:
+
+/* Line 1455 of yacc.c  */
+#line 385 "parse-datetime.y"
+    {
+        pc->local_isdst = (yyvsp[(1) - (1)].intval);
+        pc->dsts_seen += (0 < (yyvsp[(1) - (1)].intval));
+      }
+    break;
+
+  case 21:
+
+/* Line 1455 of yacc.c  */
+#line 390 "parse-datetime.y"
+    {
+        pc->local_isdst = 1;
+        pc->dsts_seen += (0 < (yyvsp[(1) - (2)].intval)) + 1;
+      }
+    break;
+
+  case 22:
+
+/* Line 1455 of yacc.c  */
+#line 398 "parse-datetime.y"
+    { pc->time_zone = (yyvsp[(1) - (1)].intval); }
+    break;
+
+  case 23:
+
+/* Line 1455 of yacc.c  */
+#line 400 "parse-datetime.y"
+    { pc->time_zone = (yyvsp[(1) - (2)].intval);
+        apply_relative_time (pc, (yyvsp[(2) - (2)].rel), 1); }
+    break;
+
+  case 24:
+
+/* Line 1455 of yacc.c  */
+#line 403 "parse-datetime.y"
+    { pc->time_zone = (yyvsp[(1) - (3)].intval) + time_zone_hhmm (pc, (yyvsp[(2) - (3)].textintval), (yyvsp[(3) - (3)].intval)); }
+    break;
+
+  case 25:
+
+/* Line 1455 of yacc.c  */
+#line 405 "parse-datetime.y"
+    { pc->time_zone = (yyvsp[(1) - (1)].intval) + 60; }
+    break;
+
+  case 26:
+
+/* Line 1455 of yacc.c  */
+#line 407 "parse-datetime.y"
+    { pc->time_zone = (yyvsp[(1) - (2)].intval) + 60; }
+    break;
+
+  case 27:
+
+/* Line 1455 of yacc.c  */
+#line 412 "parse-datetime.y"
+    {
+        pc->day_ordinal = 0;
+        pc->day_number = (yyvsp[(1) - (1)].intval);
+      }
+    break;
+
+  case 28:
+
+/* Line 1455 of yacc.c  */
+#line 417 "parse-datetime.y"
+    {
+        pc->day_ordinal = 0;
+        pc->day_number = (yyvsp[(1) - (2)].intval);
+      }
+    break;
+
+  case 29:
+
+/* Line 1455 of yacc.c  */
+#line 422 "parse-datetime.y"
+    {
+        pc->day_ordinal = (yyvsp[(1) - (2)].intval);
+        pc->day_number = (yyvsp[(2) - (2)].intval);
+      }
+    break;
+
+  case 30:
+
+/* Line 1455 of yacc.c  */
+#line 427 "parse-datetime.y"
+    {
+        pc->day_ordinal = (yyvsp[(1) - (2)].textintval).value;
+        pc->day_number = (yyvsp[(2) - (2)].intval);
+      }
+    break;
+
+  case 31:
+
+/* Line 1455 of yacc.c  */
+#line 435 "parse-datetime.y"
+    {
+        pc->month = (yyvsp[(1) - (3)].textintval).value;
+        pc->day = (yyvsp[(3) - (3)].textintval).value;
+      }
+    break;
+
+  case 32:
+
+/* Line 1455 of yacc.c  */
+#line 440 "parse-datetime.y"
+    {
+        /* Interpret as YYYY/MM/DD if the first value has 4 or more digits,
+           otherwise as MM/DD/YY.
+           The goal in recognizing YYYY/MM/DD is solely to support legacy
+           machine-generated dates like those in an RCS log listing.  If
+           you want portability, use the ISO 8601 format.  */
+        if (4 <= (yyvsp[(1) - (5)].textintval).digits)
+          {
+            pc->year = (yyvsp[(1) - (5)].textintval);
+            pc->month = (yyvsp[(3) - (5)].textintval).value;
+            pc->day = (yyvsp[(5) - (5)].textintval).value;
+          }
+        else
+          {
+            pc->month = (yyvsp[(1) - (5)].textintval).value;
+            pc->day = (yyvsp[(3) - (5)].textintval).value;
+            pc->year = (yyvsp[(5) - (5)].textintval);
+          }
+      }
+    break;
+
+  case 33:
+
+/* Line 1455 of yacc.c  */
+#line 460 "parse-datetime.y"
+    {
+        /* ISO 8601 format.  YYYY-MM-DD.  */
+        pc->year = (yyvsp[(1) - (3)].textintval);
+        pc->month = -(yyvsp[(2) - (3)].textintval).value;
+        pc->day = -(yyvsp[(3) - (3)].textintval).value;
+      }
+    break;
+
+  case 34:
+
+/* Line 1455 of yacc.c  */
+#line 467 "parse-datetime.y"
+    {
+        /* e.g. 17-JUN-1992.  */
+        pc->day = (yyvsp[(1) - (3)].textintval).value;
+        pc->month = (yyvsp[(2) - (3)].intval);
+        pc->year.value = -(yyvsp[(3) - (3)].textintval).value;
+        pc->year.digits = (yyvsp[(3) - (3)].textintval).digits;
+      }
+    break;
+
+  case 35:
+
+/* Line 1455 of yacc.c  */
+#line 475 "parse-datetime.y"
+    {
+        /* e.g. JUN-17-1992.  */
+        pc->month = (yyvsp[(1) - (3)].intval);
+        pc->day = -(yyvsp[(2) - (3)].textintval).value;
+        pc->year.value = -(yyvsp[(3) - (3)].textintval).value;
+        pc->year.digits = (yyvsp[(3) - (3)].textintval).digits;
+      }
+    break;
+
+  case 36:
+
+/* Line 1455 of yacc.c  */
+#line 483 "parse-datetime.y"
+    {
+        pc->month = (yyvsp[(1) - (2)].intval);
+        pc->day = (yyvsp[(2) - (2)].textintval).value;
+      }
+    break;
+
+  case 37:
+
+/* Line 1455 of yacc.c  */
+#line 488 "parse-datetime.y"
+    {
+        pc->month = (yyvsp[(1) - (4)].intval);
+        pc->day = (yyvsp[(2) - (4)].textintval).value;
+        pc->year = (yyvsp[(4) - (4)].textintval);
+      }
+    break;
+
+  case 38:
+
+/* Line 1455 of yacc.c  */
+#line 494 "parse-datetime.y"
+    {
+        pc->day = (yyvsp[(1) - (2)].textintval).value;
+        pc->month = (yyvsp[(2) - (2)].intval);
+      }
+    break;
+
+  case 39:
+
+/* Line 1455 of yacc.c  */
+#line 499 "parse-datetime.y"
+    {
+        pc->day = (yyvsp[(1) - (3)].textintval).value;
+        pc->month = (yyvsp[(2) - (3)].intval);
+        pc->year = (yyvsp[(3) - (3)].textintval);
+      }
+    break;
+
+  case 40:
+
+/* Line 1455 of yacc.c  */
+#line 508 "parse-datetime.y"
+    { apply_relative_time (pc, (yyvsp[(1) - (2)].rel), -1); }
+    break;
+
+  case 41:
+
+/* Line 1455 of yacc.c  */
+#line 510 "parse-datetime.y"
+    { apply_relative_time (pc, (yyvsp[(1) - (1)].rel), 1); }
+    break;
+
+  case 42:
+
+/* Line 1455 of yacc.c  */
+#line 512 "parse-datetime.y"
+    { apply_relative_time (pc, (yyvsp[(1) - (1)].rel), 1); }
+    break;
+
+  case 43:
+
+/* Line 1455 of yacc.c  */
+#line 517 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].intval); }
+    break;
+
+  case 44:
+
+/* Line 1455 of yacc.c  */
+#line 519 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; }
+    break;
+
+  case 45:
+
+/* Line 1455 of yacc.c  */
+#line 521 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = 1; }
+    break;
+
+  case 46:
+
+/* Line 1455 of yacc.c  */
+#line 523 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].intval); }
+    break;
+
+  case 47:
+
+/* Line 1455 of yacc.c  */
+#line 525 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; }
+    break;
+
+  case 48:
+
+/* Line 1455 of yacc.c  */
+#line 527 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = 1; }
+    break;
+
+  case 49:
+
+/* Line 1455 of yacc.c  */
+#line 529 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); }
+    break;
+
+  case 50:
+
+/* Line 1455 of yacc.c  */
+#line 531 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); }
+    break;
+
+  case 51:
+
+/* Line 1455 of yacc.c  */
+#line 533 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (1)].intval); }
+    break;
+
+  case 52:
+
+/* Line 1455 of yacc.c  */
+#line 535 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].intval); }
+    break;
+
+  case 53:
+
+/* Line 1455 of yacc.c  */
+#line 537 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; }
+    break;
+
+  case 54:
+
+/* Line 1455 of yacc.c  */
+#line 539 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = 1; }
+    break;
+
+  case 55:
+
+/* Line 1455 of yacc.c  */
+#line 541 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].intval); }
+    break;
+
+  case 56:
+
+/* Line 1455 of yacc.c  */
+#line 543 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; }
+    break;
+
+  case 57:
+
+/* Line 1455 of yacc.c  */
+#line 545 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = 1; }
+    break;
+
+  case 58:
+
+/* Line 1455 of yacc.c  */
+#line 547 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].intval); }
+    break;
+
+  case 59:
+
+/* Line 1455 of yacc.c  */
+#line 549 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; }
+    break;
+
+  case 60:
+
+/* Line 1455 of yacc.c  */
+#line 551 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; }
+    break;
+
+  case 61:
+
+/* Line 1455 of yacc.c  */
+#line 553 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; }
+    break;
+
+  case 62:
+
+/* Line 1455 of yacc.c  */
+#line 555 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = 1; }
+    break;
+
+  case 64:
+
+/* Line 1455 of yacc.c  */
+#line 561 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; }
+    break;
+
+  case 65:
+
+/* Line 1455 of yacc.c  */
+#line 563 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; }
+    break;
+
+  case 66:
+
+/* Line 1455 of yacc.c  */
+#line 565 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); }
+    break;
+
+  case 67:
+
+/* Line 1455 of yacc.c  */
+#line 567 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; }
+    break;
+
+  case 68:
+
+/* Line 1455 of yacc.c  */
+#line 569 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; }
+    break;
+
+  case 69:
+
+/* Line 1455 of yacc.c  */
+#line 571 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; }
+    break;
+
+  case 70:
+
+/* Line 1455 of yacc.c  */
+#line 576 "parse-datetime.y"
+    { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (1)].intval); }
+    break;
+
+  case 74:
+
+/* Line 1455 of yacc.c  */
+#line 584 "parse-datetime.y"
+    { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; }
+    break;
+
+  case 76:
+
+/* Line 1455 of yacc.c  */
+#line 590 "parse-datetime.y"
+    { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; }
+    break;
+
+  case 77:
+
+/* Line 1455 of yacc.c  */
+#line 595 "parse-datetime.y"
+    { digits_to_date_time (pc, (yyvsp[(1) - (1)].textintval)); }
+    break;
+
+  case 78:
+
+/* Line 1455 of yacc.c  */
+#line 600 "parse-datetime.y"
+    {
+        /* Hybrid all-digit and relative offset, so that we accept e.g.,
+           "YYYYMMDD +N days" as well as "YYYYMMDD N days".  */
+        digits_to_date_time (pc, (yyvsp[(1) - (2)].textintval));
+        apply_relative_time (pc, (yyvsp[(2) - (2)].rel), 1);
+      }
+    break;
+
+  case 79:
+
+/* Line 1455 of yacc.c  */
+#line 610 "parse-datetime.y"
+    { (yyval.intval) = -1; }
+    break;
+
+  case 80:
+
+/* Line 1455 of yacc.c  */
+#line 612 "parse-datetime.y"
+    { (yyval.intval) = (yyvsp[(2) - (2)].textintval).value; }
+    break;
+
+  case 81:
+
+/* Line 1455 of yacc.c  */
+#line 617 "parse-datetime.y"
+    { (yyval.intval) = MER24; }
+    break;
+
+  case 82:
+
+/* Line 1455 of yacc.c  */
+#line 619 "parse-datetime.y"
+    { (yyval.intval) = (yyvsp[(1) - (1)].intval); }
+    break;
+
+
+
+/* Line 1455 of yacc.c  */
+#line 2334 "parse-datetime.c"
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (pc, YY_("syntax error"));
+#else
+      {
+       YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+       if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+         {
+           YYSIZE_T yyalloc = 2 * yysize;
+           if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+             yyalloc = YYSTACK_ALLOC_MAXIMUM;
+           if (yymsg != yymsgbuf)
+             YYSTACK_FREE (yymsg);
+           yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+           if (yymsg)
+             yymsg_alloc = yyalloc;
+           else
+             {
+               yymsg = yymsgbuf;
+               yymsg_alloc = sizeof yymsgbuf;
+             }
+         }
+
+       if (0 < yysize && yysize <= yymsg_alloc)
+         {
+           (void) yysyntax_error (yymsg, yystate, yychar);
+           yyerror (pc, yymsg);
+         }
+       else
+         {
+           yyerror (pc, YY_("syntax error"));
+           if (yysize != 0)
+             goto yyexhaustedlab;
+         }
+      }
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+        error, discard it.  */
+
+      if (yychar <= YYEOF)
+       {
+         /* Return failure if at end of input.  */
+         if (yychar == YYEOF)
+           YYABORT;
+       }
+      else
+       {
+         yydestruct ("Error: discarding",
+                     yytoken, &yylval, pc);
+         yychar = YYEMPTY;
+       }
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;     /* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+       {
+         yyn += YYTERROR;
+         if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+           {
+             yyn = yytable[yyn];
+             if (0 < yyn)
+               break;
+           }
+       }
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+       YYABORT;
+
+
+      yydestruct ("Error: popping",
+                 yystos[yystate], yyvsp, pc);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  *++yyvsp = yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (pc, YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEMPTY)
+     yydestruct ("Cleanup: discarding lookahead",
+                yytoken, &yylval, pc);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+                 yystos[*yyssp], yyvsp, pc);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+
+/* Line 1675 of yacc.c  */
+#line 622 "parse-datetime.y"
+
+
+static table const meridian_table[] =
+{
+  { "AM",   tMERIDIAN, MERam },
+  { "A.M.", tMERIDIAN, MERam },
+  { "PM",   tMERIDIAN, MERpm },
+  { "P.M.", tMERIDIAN, MERpm },
+  { NULL, 0, 0 }
+};
+
+static table const dst_table[] =
+{
+  { "DST", tDST, 0 }
+};
+
+static table const month_and_day_table[] =
+{
+  { "JANUARY",  tMONTH,  1 },
+  { "FEBRUARY", tMONTH,  2 },
+  { "MARCH",    tMONTH,  3 },
+  { "APRIL",    tMONTH,  4 },
+  { "MAY",      tMONTH,  5 },
+  { "JUNE",     tMONTH,  6 },
+  { "JULY",     tMONTH,  7 },
+  { "AUGUST",   tMONTH,  8 },
+  { "SEPTEMBER",tMONTH,  9 },
+  { "SEPT",     tMONTH,  9 },
+  { "OCTOBER",  tMONTH, 10 },
+  { "NOVEMBER", tMONTH, 11 },
+  { "DECEMBER", tMONTH, 12 },
+  { "SUNDAY",   tDAY,    0 },
+  { "MONDAY",   tDAY,    1 },
+  { "TUESDAY",  tDAY,    2 },
+  { "TUES",     tDAY,    2 },
+  { "WEDNESDAY",tDAY,    3 },
+  { "WEDNES",   tDAY,    3 },
+  { "THURSDAY", tDAY,    4 },
+  { "THUR",     tDAY,    4 },
+  { "THURS",    tDAY,    4 },
+  { "FRIDAY",   tDAY,    5 },
+  { "SATURDAY", tDAY,    6 },
+  { NULL, 0, 0 }
+};
+
+static table const time_units_table[] =
+{
+  { "YEAR",     tYEAR_UNIT,      1 },
+  { "MONTH",    tMONTH_UNIT,     1 },
+  { "FORTNIGHT",tDAY_UNIT,      14 },
+  { "WEEK",     tDAY_UNIT,       7 },
+  { "DAY",      tDAY_UNIT,       1 },
+  { "HOUR",     tHOUR_UNIT,      1 },
+  { "MINUTE",   tMINUTE_UNIT,    1 },
+  { "MIN",      tMINUTE_UNIT,    1 },
+  { "SECOND",   tSEC_UNIT,       1 },
+  { "SEC",      tSEC_UNIT,       1 },
+  { NULL, 0, 0 }
+};
+
+/* Assorted relative-time words. */
+static table const relative_time_table[] =
+{
+  { "TOMORROW", tDAY_SHIFT,      1 },
+  { "YESTERDAY",tDAY_SHIFT,     -1 },
+  { "TODAY",    tDAY_SHIFT,      0 },
+  { "NOW",      tDAY_SHIFT,      0 },
+  { "LAST",     tORDINAL,       -1 },
+  { "THIS",     tORDINAL,        0 },
+  { "NEXT",     tORDINAL,        1 },
+  { "FIRST",    tORDINAL,        1 },
+/*{ "SECOND",   tORDINAL,        2 }, */
+  { "THIRD",    tORDINAL,        3 },
+  { "FOURTH",   tORDINAL,        4 },
+  { "FIFTH",    tORDINAL,        5 },
+  { "SIXTH",    tORDINAL,        6 },
+  { "SEVENTH",  tORDINAL,        7 },
+  { "EIGHTH",   tORDINAL,        8 },
+  { "NINTH",    tORDINAL,        9 },
+  { "TENTH",    tORDINAL,       10 },
+  { "ELEVENTH", tORDINAL,       11 },
+  { "TWELFTH",  tORDINAL,       12 },
+  { "AGO",      tAGO,            1 },
+  { NULL, 0, 0 }
+};
+
+/* The universal time zone table.  These labels can be used even for
+   time stamps that would not otherwise be valid, e.g., GMT time
+   stamps in London during summer.  */
+static table const universal_time_zone_table[] =
+{
+  { "GMT",      tZONE,     HOUR ( 0) }, /* Greenwich Mean */
+  { "UT",       tZONE,     HOUR ( 0) }, /* Universal (Coordinated) */
+  { "UTC",      tZONE,     HOUR ( 0) },
+  { NULL, 0, 0 }
+};
+
+/* The time zone table.  This table is necessarily incomplete, as time
+   zone abbreviations are ambiguous; e.g. Australians interpret "EST"
+   as Eastern time in Australia, not as US Eastern Standard Time.
+   You cannot rely on parse_datetime to handle arbitrary time zone
+   abbreviations; use numeric abbreviations like `-0500' instead.  */
+static table const time_zone_table[] =
+{
+  { "WET",      tZONE,     HOUR ( 0) }, /* Western European */
+  { "WEST",     tDAYZONE,  HOUR ( 0) }, /* Western European Summer */
+  { "BST",      tDAYZONE,  HOUR ( 0) }, /* British Summer */
+  { "ART",      tZONE,    -HOUR ( 3) }, /* Argentina */
+  { "BRT",      tZONE,    -HOUR ( 3) }, /* Brazil */
+  { "BRST",     tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */
+  { "NST",      tZONE,   -(HOUR ( 3) + 30) },   /* Newfoundland Standard */
+  { "NDT",      tDAYZONE,-(HOUR ( 3) + 30) },   /* Newfoundland Daylight */
+  { "AST",      tZONE,    -HOUR ( 4) }, /* Atlantic Standard */
+  { "ADT",      tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */
+  { "CLT",      tZONE,    -HOUR ( 4) }, /* Chile */
+  { "CLST",     tDAYZONE, -HOUR ( 4) }, /* Chile Summer */
+  { "EST",      tZONE,    -HOUR ( 5) }, /* Eastern Standard */
+  { "EDT",      tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */
+  { "CST",      tZONE,    -HOUR ( 6) }, /* Central Standard */
+  { "CDT",      tDAYZONE, -HOUR ( 6) }, /* Central Daylight */
+  { "MST",      tZONE,    -HOUR ( 7) }, /* Mountain Standard */
+  { "MDT",      tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */
+  { "PST",      tZONE,    -HOUR ( 8) }, /* Pacific Standard */
+  { "PDT",      tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */
+  { "AKST",     tZONE,    -HOUR ( 9) }, /* Alaska Standard */
+  { "AKDT",     tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */
+  { "HST",      tZONE,    -HOUR (10) }, /* Hawaii Standard */
+  { "HAST",     tZONE,    -HOUR (10) }, /* Hawaii-Aleutian Standard */
+  { "HADT",     tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */
+  { "SST",      tZONE,    -HOUR (12) }, /* Samoa Standard */
+  { "WAT",      tZONE,     HOUR ( 1) }, /* West Africa */
+  { "CET",      tZONE,     HOUR ( 1) }, /* Central European */
+  { "CEST",     tDAYZONE,  HOUR ( 1) }, /* Central European Summer */
+  { "MET",      tZONE,     HOUR ( 1) }, /* Middle European */
+  { "MEZ",      tZONE,     HOUR ( 1) }, /* Middle European */
+  { "MEST",     tDAYZONE,  HOUR ( 1) }, /* Middle European Summer */
+  { "MESZ",     tDAYZONE,  HOUR ( 1) }, /* Middle European Summer */
+  { "EET",      tZONE,     HOUR ( 2) }, /* Eastern European */
+  { "EEST",     tDAYZONE,  HOUR ( 2) }, /* Eastern European Summer */
+  { "CAT",      tZONE,     HOUR ( 2) }, /* Central Africa */
+  { "SAST",     tZONE,     HOUR ( 2) }, /* South Africa Standard */
+  { "EAT",      tZONE,     HOUR ( 3) }, /* East Africa */
+  { "MSK",      tZONE,     HOUR ( 3) }, /* Moscow */
+  { "MSD",      tDAYZONE,  HOUR ( 3) }, /* Moscow Daylight */
+  { "IST",      tZONE,    (HOUR ( 5) + 30) },   /* India Standard */
+  { "SGT",      tZONE,     HOUR ( 8) }, /* Singapore */
+  { "KST",      tZONE,     HOUR ( 9) }, /* Korea Standard */
+  { "JST",      tZONE,     HOUR ( 9) }, /* Japan Standard */
+  { "GST",      tZONE,     HOUR (10) }, /* Guam Standard */
+  { "NZST",     tZONE,     HOUR (12) }, /* New Zealand Standard */
+  { "NZDT",     tDAYZONE,  HOUR (12) }, /* New Zealand Daylight */
+  { NULL, 0, 0 }
+};
+
+/* Military time zone table. */
+static table const military_table[] =
+{
+  { "A", tZONE, -HOUR ( 1) },
+  { "B", tZONE, -HOUR ( 2) },
+  { "C", tZONE, -HOUR ( 3) },
+  { "D", tZONE, -HOUR ( 4) },
+  { "E", tZONE, -HOUR ( 5) },
+  { "F", tZONE, -HOUR ( 6) },
+  { "G", tZONE, -HOUR ( 7) },
+  { "H", tZONE, -HOUR ( 8) },
+  { "I", tZONE, -HOUR ( 9) },
+  { "K", tZONE, -HOUR (10) },
+  { "L", tZONE, -HOUR (11) },
+  { "M", tZONE, -HOUR (12) },
+  { "N", tZONE,  HOUR ( 1) },
+  { "O", tZONE,  HOUR ( 2) },
+  { "P", tZONE,  HOUR ( 3) },
+  { "Q", tZONE,  HOUR ( 4) },
+  { "R", tZONE,  HOUR ( 5) },
+  { "S", tZONE,  HOUR ( 6) },
+  { "T", tZONE,  HOUR ( 7) },
+  { "U", tZONE,  HOUR ( 8) },
+  { "V", tZONE,  HOUR ( 9) },
+  { "W", tZONE,  HOUR (10) },
+  { "X", tZONE,  HOUR (11) },
+  { "Y", tZONE,  HOUR (12) },
+  { "Z", tZONE,  HOUR ( 0) },
+  { NULL, 0, 0 }
+};
+
+\f
+
+/* Convert a time zone expressed as HH:MM into an integer count of
+   minutes.  If MM is negative, then S is of the form HHMM and needs
+   to be picked apart; otherwise, S is of the form HH.  As specified in
+   http://www.opengroup.org/susv3xbd/xbd_chap08.html#tag_08_03, allow
+   only valid TZ range, and consider first two digits as hours, if no
+   minutes specified.  */
+
+static long int
+time_zone_hhmm (parser_control *pc, textint s, long int mm)
+{
+  long int n_minutes;
+
+  /* If the length of S is 1 or 2 and no minutes are specified,
+     interpret it as a number of hours.  */
+  if (s.digits <= 2 && mm < 0)
+    s.value *= 100;
+
+  if (mm < 0)
+    n_minutes = (s.value / 100) * 60 + s.value % 100;
+  else
+    n_minutes = s.value * 60 + (s.negative ? -mm : mm);
+
+  /* If the absolute number of minutes is larger than 24 hours,
+     arrange to reject it by incrementing pc->zones_seen.  Thus,
+     we allow only values in the range UTC-24:00 to UTC+24:00.  */
+  if (24 * 60 < abs (n_minutes))
+    pc->zones_seen++;
+
+  return n_minutes;
+}
+
+static int
+to_hour (long int hours, int meridian)
+{
+  switch (meridian)
+    {
+    default: /* Pacify GCC.  */
+    case MER24:
+      return 0 <= hours && hours < 24 ? hours : -1;
+    case MERam:
+      return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1;
+    case MERpm:
+      return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1;
+    }
+}
+
+static long int
+to_year (textint textyear)
+{
+  long int year = textyear.value;
+
+  if (year < 0)
+    year = -year;
+
+  /* XPG4 suggests that years 00-68 map to 2000-2068, and
+     years 69-99 map to 1969-1999.  */
+  else if (textyear.digits == 2)
+    year += year < 69 ? 2000 : 1900;
+
+  return year;
+}
+
+static table const *
+lookup_zone (parser_control const *pc, char const *name)
+{
+  table const *tp;
+
+  for (tp = universal_time_zone_table; tp->name; tp++)
+    if (strcmp (name, tp->name) == 0)
+      return tp;
+
+  /* Try local zone abbreviations before those in time_zone_table, as
+     the local ones are more likely to be right.  */
+  for (tp = pc->local_time_zone_table; tp->name; tp++)
+    if (strcmp (name, tp->name) == 0)
+      return tp;
+
+  for (tp = time_zone_table; tp->name; tp++)
+    if (strcmp (name, tp->name) == 0)
+      return tp;
+
+  return NULL;
+}
+
+#if ! HAVE_TM_GMTOFF
+/* Yield the difference between *A and *B,
+   measured in seconds, ignoring leap seconds.
+   The body of this function is taken directly from the GNU C Library;
+   see src/strftime.c.  */
+static long int
+tm_diff (struct tm const *a, struct tm const *b)
+{
+  /* Compute intervening leap days correctly even if year is negative.
+     Take care to avoid int overflow in leap day calculations.  */
+  int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3);
+  int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3);
+  int a100 = a4 / 25 - (a4 % 25 < 0);
+  int b100 = b4 / 25 - (b4 % 25 < 0);
+  int a400 = SHR (a100, 2);
+  int b400 = SHR (b100, 2);
+  int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
+  long int ayear = a->tm_year;
+  long int years = ayear - b->tm_year;
+  long int days = (365 * years + intervening_leap_days
+                   + (a->tm_yday - b->tm_yday));
+  return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour))
+                + (a->tm_min - b->tm_min))
+          + (a->tm_sec - b->tm_sec));
+}
+#endif /* ! HAVE_TM_GMTOFF */
+
+static table const *
+lookup_word (parser_control const *pc, char *word)
+{
+  char *p;
+  char *q;
+  size_t wordlen;
+  table const *tp;
+  bool period_found;
+  bool abbrev;
+
+  /* Make it uppercase.  */
+  for (p = word; *p; p++)
+    {
+      unsigned char ch = *p;
+      *p = c_toupper (ch);
+    }
+
+  for (tp = meridian_table; tp->name; tp++)
+    if (strcmp (word, tp->name) == 0)
+      return tp;
+
+  /* See if we have an abbreviation for a month. */
+  wordlen = strlen (word);
+  abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.');
+
+  for (tp = month_and_day_table; tp->name; tp++)
+    if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0)
+      return tp;
+
+  if ((tp = lookup_zone (pc, word)))
+    return tp;
+
+  if (strcmp (word, dst_table[0].name) == 0)
+    return dst_table;
+
+  for (tp = time_units_table; tp->name; tp++)
+    if (strcmp (word, tp->name) == 0)
+      return tp;
+
+  /* Strip off any plural and try the units table again. */
+  if (word[wordlen - 1] == 'S')
+    {
+      word[wordlen - 1] = '\0';
+      for (tp = time_units_table; tp->name; tp++)
+        if (strcmp (word, tp->name) == 0)
+          return tp;
+      word[wordlen - 1] = 'S';  /* For "this" in relative_time_table.  */
+    }
+
+  for (tp = relative_time_table; tp->name; tp++)
+    if (strcmp (word, tp->name) == 0)
+      return tp;
+
+  /* Military time zones. */
+  if (wordlen == 1)
+    for (tp = military_table; tp->name; tp++)
+      if (word[0] == tp->name[0])
+        return tp;
+
+  /* Drop out any periods and try the time zone table again. */
+  for (period_found = false, p = q = word; (*p = *q); q++)
+    if (*q == '.')
+      period_found = true;
+    else
+      p++;
+  if (period_found && (tp = lookup_zone (pc, word)))
+    return tp;
+
+  return NULL;
+}
+
+static int
+yylex (YYSTYPE *lvalp, parser_control *pc)
+{
+  unsigned char c;
+  size_t count;
+
+  for (;;)
+    {
+      while (c = *pc->input, c_isspace (c))
+        pc->input++;
+
+      if (ISDIGIT (c) || c == '-' || c == '+')
+        {
+          char const *p;
+          int sign;
+          unsigned long int value;
+          if (c == '-' || c == '+')
+            {
+              sign = c == '-' ? -1 : 1;
+              while (c = *++pc->input, c_isspace (c))
+                continue;
+              if (! ISDIGIT (c))
+                /* skip the '-' sign */
+                continue;
+            }
+          else
+            sign = 0;
+          p = pc->input;
+          for (value = 0; ; value *= 10)
+            {
+              unsigned long int value1 = value + (c - '0');
+              if (value1 < value)
+                return '?';
+              value = value1;
+              c = *++p;
+              if (! ISDIGIT (c))
+                break;
+              if (ULONG_MAX / 10 < value)
+                return '?';
+            }
+          if ((c == '.' || c == ',') && ISDIGIT (p[1]))
+            {
+              time_t s;
+              int ns;
+              int digits;
+              unsigned long int value1;
+
+              /* Check for overflow when converting value to time_t.  */
+              if (sign < 0)
+                {
+                  s = - value;
+                  if (0 < s)
+                    return '?';
+                  value1 = -s;
+                }
+              else
+                {
+                  s = value;
+                  if (s < 0)
+                    return '?';
+                  value1 = s;
+                }
+              if (value != value1)
+                return '?';
+
+              /* Accumulate fraction, to ns precision.  */
+              p++;
+              ns = *p++ - '0';
+              for (digits = 2; digits <= LOG10_BILLION; digits++)
+                {
+                  ns *= 10;
+                  if (ISDIGIT (*p))
+                    ns += *p++ - '0';
+                }
+
+              /* Skip excess digits, truncating toward -Infinity.  */
+              if (sign < 0)
+                for (; ISDIGIT (*p); p++)
+                  if (*p != '0')
+                    {
+                      ns++;
+                      break;
+                    }
+              while (ISDIGIT (*p))
+                p++;
+
+              /* Adjust to the timespec convention, which is that
+                 tv_nsec is always a positive offset even if tv_sec is
+                 negative.  */
+              if (sign < 0 && ns)
+                {
+                  s--;
+                  if (! (s < 0))
+                    return '?';
+                  ns = BILLION - ns;
+                }
+
+              lvalp->timespec.tv_sec = s;
+              lvalp->timespec.tv_nsec = ns;
+              pc->input = p;
+              return sign ? tSDECIMAL_NUMBER : tUDECIMAL_NUMBER;
+            }
+          else
+            {
+              lvalp->textintval.negative = sign < 0;
+              if (sign < 0)
+                {
+                  lvalp->textintval.value = - value;
+                  if (0 < lvalp->textintval.value)
+                    return '?';
+                }
+              else
+                {
+                  lvalp->textintval.value = value;
+                  if (lvalp->textintval.value < 0)
+                    return '?';
+                }
+              lvalp->textintval.digits = p - pc->input;
+              pc->input = p;
+              return sign ? tSNUMBER : tUNUMBER;
+            }
+        }
+
+      if (c_isalpha (c))
+        {
+          char buff[20];
+          char *p = buff;
+          table const *tp;
+
+          do
+            {
+              if (p < buff + sizeof buff - 1)
+                *p++ = c;
+              c = *++pc->input;
+            }
+          while (c_isalpha (c) || c == '.');
+
+          *p = '\0';
+          tp = lookup_word (pc, buff);
+          if (! tp)
+            return '?';
+          lvalp->intval = tp->value;
+          return tp->type;
+        }
+
+      if (c != '(')
+        return *pc->input++;
+      count = 0;
+      do
+        {
+          c = *pc->input++;
+          if (c == '\0')
+            return c;
+          if (c == '(')
+            count++;
+          else if (c == ')')
+            count--;
+        }
+      while (count != 0);
+    }
+}
+
+/* Do nothing if the parser reports an error.  */
+static int
+yyerror (parser_control const *pc _GL_UNUSED,
+         char const *s _GL_UNUSED)
+{
+  return 0;
+}
+
+/* If *TM0 is the old and *TM1 is the new value of a struct tm after
+   passing it to mktime, return true if it's OK that mktime returned T.
+   It's not OK if *TM0 has out-of-range members.  */
+
+static bool
+mktime_ok (struct tm const *tm0, struct tm const *tm1, time_t t)
+{
+  if (t == (time_t) -1)
+    {
+      /* Guard against falsely reporting an error when parsing a time
+         stamp that happens to equal (time_t) -1, on a host that
+         supports such a time stamp.  */
+      tm1 = localtime (&t);
+      if (!tm1)
+        return false;
+    }
+
+  return ! ((tm0->tm_sec ^ tm1->tm_sec)
+            | (tm0->tm_min ^ tm1->tm_min)
+            | (tm0->tm_hour ^ tm1->tm_hour)
+            | (tm0->tm_mday ^ tm1->tm_mday)
+            | (tm0->tm_mon ^ tm1->tm_mon)
+            | (tm0->tm_year ^ tm1->tm_year));
+}
+
+/* A reasonable upper bound for the size of ordinary TZ strings.
+   Use heap allocation if TZ's length exceeds this.  */
+enum { TZBUFSIZE = 100 };
+
+/* Return a copy of TZ, stored in TZBUF if it fits, and heap-allocated
+   otherwise.  */
+static char *
+get_tz (char tzbuf[TZBUFSIZE])
+{
+  char *tz = getenv ("TZ");
+  if (tz)
+    {
+      size_t tzsize = strlen (tz) + 1;
+      tz = (tzsize <= TZBUFSIZE
+            ? memcpy (tzbuf, tz, tzsize)
+            : xmemdup (tz, tzsize));
+    }
+  return tz;
+}
+
+/* Parse a date/time string, storing the resulting time value into *RESULT.
+   The string itself is pointed to by P.  Return true if successful.
+   P can be an incomplete or relative time specification; if so, use
+   *NOW as the basis for the returned time.  */
+bool
+parse_datetime (struct timespec *result, char const *p,
+                struct timespec const *now)
+{
+  time_t Start;
+  long int Start_ns;
+  struct tm const *tmp;
+  struct tm tm;
+  struct tm tm0;
+  parser_control pc;
+  struct timespec gettime_buffer;
+  unsigned char c;
+  bool tz_was_altered = false;
+  char *tz0 = NULL;
+  char tz0buf[TZBUFSIZE];
+  bool ok = true;
+
+  if (! now)
+    {
+      gettime (&gettime_buffer);
+      now = &gettime_buffer;
+    }
+
+  Start = now->tv_sec;
+  Start_ns = now->tv_nsec;
+
+  tmp = localtime (&now->tv_sec);
+  if (! tmp)
+    return false;
+
+  while (c = *p, c_isspace (c))
+    p++;
+
+  if (strncmp (p, "TZ=\"", 4) == 0)
+    {
+      char const *tzbase = p + 4;
+      size_t tzsize = 1;
+      char const *s;
+
+      for (s = tzbase; *s; s++, tzsize++)
+        if (*s == '\\')
+          {
+            s++;
+            if (! (*s == '\\' || *s == '"'))
+              break;
+          }
+        else if (*s == '"')
+          {
+            char *z;
+            char *tz1;
+            char tz1buf[TZBUFSIZE];
+            bool large_tz = TZBUFSIZE < tzsize;
+            bool setenv_ok;
+            /* Free tz0, in case this is the 2nd or subsequent time through. */
+            free (tz0);
+            tz0 = get_tz (tz0buf);
+            z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf;
+            for (s = tzbase; *s != '"'; s++)
+              *z++ = *(s += *s == '\\');
+            *z = '\0';
+            setenv_ok = setenv ("TZ", tz1, 1) == 0;
+            if (large_tz)
+              free (tz1);
+            if (!setenv_ok)
+              goto fail;
+            tz_was_altered = true;
+            p = s + 1;
+          }
+    }
+
+  /* As documented, be careful to treat the empty string just like
+     a date string of "0".  Without this, an empty string would be
+     declared invalid when parsed during a DST transition.  */
+  if (*p == '\0')
+    p = "0";
+
+  pc.input = p;
+  pc.year.value = tmp->tm_year;
+  pc.year.value += TM_YEAR_BASE;
+  pc.year.digits = 0;
+  pc.month = tmp->tm_mon + 1;
+  pc.day = tmp->tm_mday;
+  pc.hour = tmp->tm_hour;
+  pc.minutes = tmp->tm_min;
+  pc.seconds.tv_sec = tmp->tm_sec;
+  pc.seconds.tv_nsec = Start_ns;
+  tm.tm_isdst = tmp->tm_isdst;
+
+  pc.meridian = MER24;
+  pc.rel = RELATIVE_TIME_0;
+  pc.timespec_seen = false;
+  pc.rels_seen = false;
+  pc.dates_seen = 0;
+  pc.days_seen = 0;
+  pc.times_seen = 0;
+  pc.local_zones_seen = 0;
+  pc.dsts_seen = 0;
+  pc.zones_seen = 0;
+
+#if HAVE_STRUCT_TM_TM_ZONE
+  pc.local_time_zone_table[0].name = tmp->tm_zone;
+  pc.local_time_zone_table[0].type = tLOCAL_ZONE;
+  pc.local_time_zone_table[0].value = tmp->tm_isdst;
+  pc.local_time_zone_table[1].name = NULL;
+
+  /* Probe the names used in the next three calendar quarters, looking
+     for a tm_isdst different from the one we already have.  */
+  {
+    int quarter;
+    for (quarter = 1; quarter <= 3; quarter++)
+      {
+        time_t probe = Start + quarter * (90 * 24 * 60 * 60);
+        struct tm const *probe_tm = localtime (&probe);
+        if (probe_tm && probe_tm->tm_zone
+            && probe_tm->tm_isdst != pc.local_time_zone_table[0].value)
+          {
+              {
+                pc.local_time_zone_table[1].name = probe_tm->tm_zone;
+                pc.local_time_zone_table[1].type = tLOCAL_ZONE;
+                pc.local_time_zone_table[1].value = probe_tm->tm_isdst;
+                pc.local_time_zone_table[2].name = NULL;
+              }
+            break;
+          }
+      }
+  }
+#else
+#if HAVE_TZNAME
+  {
+# if !HAVE_DECL_TZNAME
+    extern char *tzname[];
+# endif
+    int i;
+    for (i = 0; i < 2; i++)
+      {
+        pc.local_time_zone_table[i].name = tzname[i];
+        pc.local_time_zone_table[i].type = tLOCAL_ZONE;
+        pc.local_time_zone_table[i].value = i;
+      }
+    pc.local_time_zone_table[i].name = NULL;
+  }
+#else
+  pc.local_time_zone_table[0].name = NULL;
+#endif
+#endif
+
+  if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name
+      && ! strcmp (pc.local_time_zone_table[0].name,
+                   pc.local_time_zone_table[1].name))
+    {
+      /* This locale uses the same abbrevation for standard and
+         daylight times.  So if we see that abbreviation, we don't
+         know whether it's daylight time.  */
+      pc.local_time_zone_table[0].value = -1;
+      pc.local_time_zone_table[1].name = NULL;
+    }
+
+  if (yyparse (&pc) != 0)
+    goto fail;
+
+  if (pc.timespec_seen)
+    *result = pc.seconds;
+  else
+    {
+      if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen
+               | (pc.local_zones_seen + pc.zones_seen)))
+        goto fail;
+
+      tm.tm_year = to_year (pc.year) - TM_YEAR_BASE;
+      tm.tm_mon = pc.month - 1;
+      tm.tm_mday = pc.day;
+      if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen))
+        {
+          tm.tm_hour = to_hour (pc.hour, pc.meridian);
+          if (tm.tm_hour < 0)
+            goto fail;
+          tm.tm_min = pc.minutes;
+          tm.tm_sec = pc.seconds.tv_sec;
+        }
+      else
+        {
+          tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+          pc.seconds.tv_nsec = 0;
+        }
+
+      /* Let mktime deduce tm_isdst if we have an absolute time stamp.  */
+      if (pc.dates_seen | pc.days_seen | pc.times_seen)
+        tm.tm_isdst = -1;
+
+      /* But if the input explicitly specifies local time with or without
+         DST, give mktime that information.  */
+      if (pc.local_zones_seen)
+        tm.tm_isdst = pc.local_isdst;
+
+      tm0 = tm;
+
+      Start = mktime (&tm);
+
+      if (! mktime_ok (&tm0, &tm, Start))
+        {
+          if (! pc.zones_seen)
+            goto fail;
+          else
+            {
+              /* Guard against falsely reporting errors near the time_t
+                 boundaries when parsing times in other time zones.  For
+                 example, suppose the input string "1969-12-31 23:00:00 -0100",
+                 the current time zone is 8 hours ahead of UTC, and the min
+                 time_t value is 1970-01-01 00:00:00 UTC.  Then the min
+                 localtime value is 1970-01-01 08:00:00, and mktime will
+                 therefore fail on 1969-12-31 23:00:00.  To work around the
+                 problem, set the time zone to 1 hour behind UTC temporarily
+                 by setting TZ="XXX1:00" and try mktime again.  */
+
+              long int time_zone = pc.time_zone;
+              long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone;
+              long int abs_time_zone_hour = abs_time_zone / 60;
+              int abs_time_zone_min = abs_time_zone % 60;
+              char tz1buf[sizeof "XXX+0:00"
+                          + sizeof pc.time_zone * CHAR_BIT / 3];
+              if (!tz_was_altered)
+                tz0 = get_tz (tz0buf);
+              sprintf (tz1buf, "XXX%s%ld:%02d", "-" + (time_zone < 0),
+                       abs_time_zone_hour, abs_time_zone_min);
+              if (setenv ("TZ", tz1buf, 1) != 0)
+                goto fail;
+              tz_was_altered = true;
+              tm = tm0;
+              Start = mktime (&tm);
+              if (! mktime_ok (&tm0, &tm, Start))
+                goto fail;
+            }
+        }
+
+      if (pc.days_seen && ! pc.dates_seen)
+        {
+          tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7
+                         + 7 * (pc.day_ordinal
+                                - (0 < pc.day_ordinal
+                                   && tm.tm_wday != pc.day_number)));
+          tm.tm_isdst = -1;
+          Start = mktime (&tm);
+          if (Start == (time_t) -1)
+            goto fail;
+        }
+
+      /* Add relative date.  */
+      if (pc.rel.year | pc.rel.month | pc.rel.day)
+        {
+          int year = tm.tm_year + pc.rel.year;
+          int month = tm.tm_mon + pc.rel.month;
+          int day = tm.tm_mday + pc.rel.day;
+          if (((year < tm.tm_year) ^ (pc.rel.year < 0))
+              | ((month < tm.tm_mon) ^ (pc.rel.month < 0))
+              | ((day < tm.tm_mday) ^ (pc.rel.day < 0)))
+            goto fail;
+          tm.tm_year = year;
+          tm.tm_mon = month;
+          tm.tm_mday = day;
+          tm.tm_hour = tm0.tm_hour;
+          tm.tm_min = tm0.tm_min;
+          tm.tm_sec = tm0.tm_sec;
+          tm.tm_isdst = tm0.tm_isdst;
+          Start = mktime (&tm);
+          if (Start == (time_t) -1)
+            goto fail;
+        }
+
+      /* The only "output" of this if-block is an updated Start value,
+         so this block must follow others that clobber Start.  */
+      if (pc.zones_seen)
+        {
+          long int delta = pc.time_zone * 60;
+          time_t t1;
+#ifdef HAVE_TM_GMTOFF
+          delta -= tm.tm_gmtoff;
+#else
+          time_t t = Start;
+          struct tm const *gmt = gmtime (&t);
+          if (! gmt)
+            goto fail;
+          delta -= tm_diff (&tm, gmt);
+#endif
+          t1 = Start - delta;
+          if ((Start < t1) != (delta < 0))
+            goto fail;  /* time_t overflow */
+          Start = t1;
+        }
+
+      /* Add relative hours, minutes, and seconds.  On hosts that support
+         leap seconds, ignore the possibility of leap seconds; e.g.,
+         "+ 10 minutes" adds 600 seconds, even if one of them is a
+         leap second.  Typically this is not what the user wants, but it's
+         too hard to do it the other way, because the time zone indicator
+         must be applied before relative times, and if mktime is applied
+         again the time zone will be lost.  */
+      {
+        long int sum_ns = pc.seconds.tv_nsec + pc.rel.ns;
+        long int normalized_ns = (sum_ns % BILLION + BILLION) % BILLION;
+        time_t t0 = Start;
+        long int d1 = 60 * 60 * pc.rel.hour;
+        time_t t1 = t0 + d1;
+        long int d2 = 60 * pc.rel.minutes;
+        time_t t2 = t1 + d2;
+        long_time_t d3 = pc.rel.seconds;
+        long_time_t t3 = t2 + d3;
+        long int d4 = (sum_ns - normalized_ns) / BILLION;
+        long_time_t t4 = t3 + d4;
+        time_t t5 = t4;
+
+        if ((d1 / (60 * 60) ^ pc.rel.hour)
+            | (d2 / 60 ^ pc.rel.minutes)
+            | ((t1 < t0) ^ (d1 < 0))
+            | ((t2 < t1) ^ (d2 < 0))
+            | ((t3 < t2) ^ (d3 < 0))
+            | ((t4 < t3) ^ (d4 < 0))
+            | (t5 != t4))
+          goto fail;
+
+        result->tv_sec = t5;
+        result->tv_nsec = normalized_ns;
+      }
+    }
+
+  goto done;
+
+ fail:
+  ok = false;
+ done:
+  if (tz_was_altered)
+    ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0;
+  if (tz0 != tz0buf)
+    free (tz0);
+  return ok;
+}
+
+#if TEST
+
+int
+main (int ac, char **av)
+{
+  char buff[BUFSIZ];
+
+  printf ("Enter date, or blank line to exit.\n\t> ");
+  fflush (stdout);
+
+  buff[BUFSIZ - 1] = '\0';
+  while (fgets (buff, BUFSIZ - 1, stdin) && buff[0])
+    {
+      struct timespec d;
+      struct tm const *tm;
+      if (! parse_datetime (&d, buff, NULL))
+        printf ("Bad format - couldn't convert.\n");
+      else if (! (tm = localtime (&d.tv_sec)))
+        {
+          long int sec = d.tv_sec;
+          printf ("localtime (%ld) failed\n", sec);
+        }
+      else
+        {
+          int ns = d.tv_nsec;
+          printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n",
+                  tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday,
+                  tm->tm_hour, tm->tm_min, tm->tm_sec, ns);
+        }
+      printf ("\t> ");
+      fflush (stdout);
+    }
+  return 0;
+}
+#endif /* TEST */
+
diff --git a/gnulib/lib/parse-datetime.h b/gnulib/lib/parse-datetime.h
new file mode 100644 (file)
index 0000000..e1df247
--- /dev/null
@@ -0,0 +1,22 @@
+/* Parse a string into an internal time stamp.
+
+   Copyright (C) 1995, 1997-1998, 2003-2004, 2007, 2009-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/>.  */
+
+#include <stdbool.h>
+#include <time.h>
+
+bool parse_datetime (struct timespec *, char const *, struct timespec const *);
diff --git a/gnulib/lib/parse-datetime.y b/gnulib/lib/parse-datetime.y
new file mode 100644 (file)
index 0000000..d77955f
--- /dev/null
@@ -0,0 +1,1580 @@
+%{
+/* Parse a string into an internal time stamp.
+
+   Copyright (C) 1999-2000, 2002-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/>.  */
+
+/* Originally written by Steven M. Bellovin <smb@research.att.com> while
+   at the University of North Carolina at Chapel Hill.  Later tweaked by
+   a couple of people on Usenet.  Completely overhauled by Rich $alz
+   <rsalz@bbn.com> and Jim Berets <jberets@bbn.com> in August, 1990.
+
+   Modified by Paul Eggert <eggert@twinsun.com> in August 1999 to do
+   the right thing about local DST.  Also modified by Paul Eggert
+   <eggert@cs.ucla.edu> in February 2004 to support
+   nanosecond-resolution time stamps, and in October 2004 to support
+   TZ strings in dates.  */
+
+/* FIXME: Check for arithmetic overflow in all cases, not just
+   some of them.  */
+
+#include <config.h>
+
+#include "parse-datetime.h"
+
+#include "intprops.h"
+#include "timespec.h"
+#include "verify.h"
+
+/* There's no need to extend the stack, so there's no need to involve
+   alloca.  */
+#define YYSTACK_USE_ALLOCA 0
+
+/* Tell Bison how much stack space is needed.  20 should be plenty for
+   this grammar, which is not right recursive.  Beware setting it too
+   high, since that might cause problems on machines whose
+   implementations have lame stack-overflow checking.  */
+#define YYMAXDEPTH 20
+#define YYINITDEPTH YYMAXDEPTH
+
+/* Since the code of parse-datetime.y is not included in the Emacs executable
+   itself, there is no need to #define static in this file.  Even if
+   the code were included in the Emacs executable, it probably
+   wouldn't do any harm to #undef it here; this will only cause
+   problems if we try to write to a static variable, which I don't
+   think this code needs to do.  */
+#ifdef emacs
+# undef static
+#endif
+
+#include <c-ctype.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "xalloc.h"
+
+/* Bison's skeleton tests _STDLIB_H, while some stdlib.h headers
+   use _STDLIB_H_ as witness.  Map the latter to the one bison uses.  */
+/* FIXME: this is temporary.  Remove when we have a mechanism to ensure
+   that the version we're using is fixed, too.  */
+#ifdef _STDLIB_H_
+# undef _STDLIB_H
+# define _STDLIB_H 1
+#endif
+
+/* ISDIGIT differs from isdigit, as follows:
+   - Its arg may be any int or unsigned int; it need not be an unsigned char
+     or EOF.
+   - It's typically faster.
+   POSIX says that only '0' through '9' are digits.  Prefer ISDIGIT to
+   isdigit unless it's important to use the locale's definition
+   of `digit' even when the host does not conform to POSIX.  */
+#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
+
+/* Shift A right by B bits portably, by dividing A by 2**B and
+   truncating towards minus infinity.  A and B should be free of side
+   effects, and B should be in the range 0 <= B <= INT_BITS - 2, where
+   INT_BITS is the number of useful bits in an int.  GNU code can
+   assume that INT_BITS is at least 32.
+
+   ISO C99 says that A >> B is implementation-defined if A < 0.  Some
+   implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift
+   right in the usual way when A < 0, so SHR falls back on division if
+   ordinary A >> B doesn't seem to be the usual signed shift.  */
+#define SHR(a, b)       \
+  (-1 >> 1 == -1        \
+   ? (a) >> (b)         \
+   : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
+
+#define EPOCH_YEAR 1970
+#define TM_YEAR_BASE 1900
+
+#define HOUR(x) ((x) * 60)
+
+/* long_time_t is a signed integer type that contains all time_t values.  */
+verify (TYPE_IS_INTEGER (time_t));
+#if TIME_T_FITS_IN_LONG_INT
+typedef long int long_time_t;
+#else
+typedef time_t long_time_t;
+#endif
+
+/* Lots of this code assumes time_t and time_t-like values fit into
+   long_time_t.  */
+verify (TYPE_MINIMUM (long_time_t) <= TYPE_MINIMUM (time_t)
+        && TYPE_MAXIMUM (time_t) <= TYPE_MAXIMUM (long_time_t));
+
+/* FIXME: It also assumes that signed integer overflow silently wraps around,
+   but this is not true any more with recent versions of GCC 4.  */
+
+/* An integer value, and the number of digits in its textual
+   representation.  */
+typedef struct
+{
+  bool negative;
+  long int value;
+  size_t digits;
+} textint;
+
+/* An entry in the lexical lookup table.  */
+typedef struct
+{
+  char const *name;
+  int type;
+  int value;
+} table;
+
+/* Meridian: am, pm, or 24-hour style.  */
+enum { MERam, MERpm, MER24 };
+
+enum { BILLION = 1000000000, LOG10_BILLION = 9 };
+
+/* Relative times.  */
+typedef struct
+{
+  /* Relative year, month, day, hour, minutes, seconds, and nanoseconds.  */
+  long int year;
+  long int month;
+  long int day;
+  long int hour;
+  long int minutes;
+  long_time_t seconds;
+  long int ns;
+} relative_time;
+
+#if HAVE_COMPOUND_LITERALS
+# define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 })
+#else
+static relative_time const RELATIVE_TIME_0;
+#endif
+
+/* Information passed to and from the parser.  */
+typedef struct
+{
+  /* The input string remaining to be parsed. */
+  const char *input;
+
+  /* N, if this is the Nth Tuesday.  */
+  long int day_ordinal;
+
+  /* Day of week; Sunday is 0.  */
+  int day_number;
+
+  /* tm_isdst flag for the local zone.  */
+  int local_isdst;
+
+  /* Time zone, in minutes east of UTC.  */
+  long int time_zone;
+
+  /* Style used for time.  */
+  int meridian;
+
+  /* Gregorian year, month, day, hour, minutes, seconds, and nanoseconds.  */
+  textint year;
+  long int month;
+  long int day;
+  long int hour;
+  long int minutes;
+  struct timespec seconds; /* includes nanoseconds */
+
+  /* Relative year, month, day, hour, minutes, seconds, and nanoseconds.  */
+  relative_time rel;
+
+  /* Presence or counts of nonterminals of various flavors parsed so far.  */
+  bool timespec_seen;
+  bool rels_seen;
+  size_t dates_seen;
+  size_t days_seen;
+  size_t local_zones_seen;
+  size_t dsts_seen;
+  size_t times_seen;
+  size_t zones_seen;
+
+  /* Table of local time zone abbrevations, terminated by a null entry.  */
+  table local_time_zone_table[3];
+} parser_control;
+
+union YYSTYPE;
+static int yylex (union YYSTYPE *, parser_control *);
+static int yyerror (parser_control const *, char const *);
+static long int time_zone_hhmm (parser_control *, textint, long int);
+
+/* Extract into *PC any date and time info from a string of digits
+   of the form e.g., YYYYMMDD, YYMMDD, HHMM, HH (and sometimes YYY,
+   YYYY, ...).  */
+static void
+digits_to_date_time (parser_control *pc, textint text_int)
+{
+  if (pc->dates_seen && ! pc->year.digits
+      && ! pc->rels_seen && (pc->times_seen || 2 < text_int.digits))
+    pc->year = text_int;
+  else
+    {
+      if (4 < text_int.digits)
+        {
+          pc->dates_seen++;
+          pc->day = text_int.value % 100;
+          pc->month = (text_int.value / 100) % 100;
+          pc->year.value = text_int.value / 10000;
+          pc->year.digits = text_int.digits - 4;
+        }
+      else
+        {
+          pc->times_seen++;
+          if (text_int.digits <= 2)
+            {
+              pc->hour = text_int.value;
+              pc->minutes = 0;
+            }
+          else
+            {
+              pc->hour = text_int.value / 100;
+              pc->minutes = text_int.value % 100;
+            }
+          pc->seconds.tv_sec = 0;
+          pc->seconds.tv_nsec = 0;
+          pc->meridian = MER24;
+        }
+    }
+}
+
+/* Increment PC->rel by FACTOR * REL (FACTOR is 1 or -1).  */
+static void
+apply_relative_time (parser_control *pc, relative_time rel, int factor)
+{
+  pc->rel.ns += factor * rel.ns;
+  pc->rel.seconds += factor * rel.seconds;
+  pc->rel.minutes += factor * rel.minutes;
+  pc->rel.hour += factor * rel.hour;
+  pc->rel.day += factor * rel.day;
+  pc->rel.month += factor * rel.month;
+  pc->rel.year += factor * rel.year;
+  pc->rels_seen = true;
+}
+
+/* Set PC-> hour, minutes, seconds and nanoseconds members from arguments.  */
+static void
+set_hhmmss (parser_control *pc, long int hour, long int minutes,
+            time_t sec, long int nsec)
+{
+  pc->hour = hour;
+  pc->minutes = minutes;
+  pc->seconds.tv_sec = sec;
+  pc->seconds.tv_nsec = nsec;
+}
+
+%}
+
+/* We want a reentrant parser, even if the TZ manipulation and the calls to
+   localtime and gmtime are not reentrant.  */
+%pure-parser
+%parse-param { parser_control *pc }
+%lex-param { parser_control *pc }
+
+/* This grammar has 20 shift/reduce conflicts. */
+%expect 20
+
+%union
+{
+  long int intval;
+  textint textintval;
+  struct timespec timespec;
+  relative_time rel;
+}
+
+%token tAGO tDST
+
+%token tYEAR_UNIT tMONTH_UNIT tHOUR_UNIT tMINUTE_UNIT tSEC_UNIT
+%token <intval> tDAY_UNIT tDAY_SHIFT
+
+%token <intval> tDAY tDAYZONE tLOCAL_ZONE tMERIDIAN
+%token <intval> tMONTH tORDINAL tZONE
+
+%token <textintval> tSNUMBER tUNUMBER
+%token <timespec> tSDECIMAL_NUMBER tUDECIMAL_NUMBER
+
+%type <intval> o_colon_minutes o_merid
+%type <timespec> seconds signed_seconds unsigned_seconds
+
+%type <rel> relunit relunit_snumber dayshift
+
+%%
+
+spec:
+    timespec
+  | items
+  ;
+
+timespec:
+    '@' seconds
+      {
+        pc->seconds = $2;
+        pc->timespec_seen = true;
+      }
+  ;
+
+items:
+    /* empty */
+  | items item
+  ;
+
+item:
+    time
+      { pc->times_seen++; }
+  | local_zone
+      { pc->local_zones_seen++; }
+  | zone
+      { pc->zones_seen++; }
+  | date
+      { pc->dates_seen++; }
+  | day
+      { pc->days_seen++; }
+  | rel
+  | number
+  | hybrid
+  ;
+
+time:
+    tUNUMBER tMERIDIAN
+      {
+        set_hhmmss (pc, $1.value, 0, 0, 0);
+        pc->meridian = $2;
+      }
+  | tUNUMBER ':' tUNUMBER o_merid
+      {
+        set_hhmmss (pc, $1.value, $3.value, 0, 0);
+        pc->meridian = $4;
+      }
+  | tUNUMBER ':' tUNUMBER tSNUMBER o_colon_minutes
+      {
+        set_hhmmss (pc, $1.value, $3.value, 0, 0);
+        pc->meridian = MER24;
+        pc->zones_seen++;
+        pc->time_zone = time_zone_hhmm (pc, $4, $5);
+      }
+  | tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_merid
+      {
+        set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec);
+        pc->meridian = $6;
+      }
+  | tUNUMBER ':' tUNUMBER ':' unsigned_seconds tSNUMBER o_colon_minutes
+      {
+        set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec);
+        pc->meridian = MER24;
+        pc->zones_seen++;
+        pc->time_zone = time_zone_hhmm (pc, $6, $7);
+      }
+  ;
+
+local_zone:
+    tLOCAL_ZONE
+      {
+        pc->local_isdst = $1;
+        pc->dsts_seen += (0 < $1);
+      }
+  | tLOCAL_ZONE tDST
+      {
+        pc->local_isdst = 1;
+        pc->dsts_seen += (0 < $1) + 1;
+      }
+  ;
+
+zone:
+    tZONE
+      { pc->time_zone = $1; }
+  | tZONE relunit_snumber
+      { pc->time_zone = $1;
+        apply_relative_time (pc, $2, 1); }
+  | tZONE tSNUMBER o_colon_minutes
+      { pc->time_zone = $1 + time_zone_hhmm (pc, $2, $3); }
+  | tDAYZONE
+      { pc->time_zone = $1 + 60; }
+  | tZONE tDST
+      { pc->time_zone = $1 + 60; }
+  ;
+
+day:
+    tDAY
+      {
+        pc->day_ordinal = 0;
+        pc->day_number = $1;
+      }
+  | tDAY ','
+      {
+        pc->day_ordinal = 0;
+        pc->day_number = $1;
+      }
+  | tORDINAL tDAY
+      {
+        pc->day_ordinal = $1;
+        pc->day_number = $2;
+      }
+  | tUNUMBER tDAY
+      {
+        pc->day_ordinal = $1.value;
+        pc->day_number = $2;
+      }
+  ;
+
+date:
+    tUNUMBER '/' tUNUMBER
+      {
+        pc->month = $1.value;
+        pc->day = $3.value;
+      }
+  | tUNUMBER '/' tUNUMBER '/' tUNUMBER
+      {
+        /* Interpret as YYYY/MM/DD if the first value has 4 or more digits,
+           otherwise as MM/DD/YY.
+           The goal in recognizing YYYY/MM/DD is solely to support legacy
+           machine-generated dates like those in an RCS log listing.  If
+           you want portability, use the ISO 8601 format.  */
+        if (4 <= $1.digits)
+          {
+            pc->year = $1;
+            pc->month = $3.value;
+            pc->day = $5.value;
+          }
+        else
+          {
+            pc->month = $1.value;
+            pc->day = $3.value;
+            pc->year = $5;
+          }
+      }
+  | tUNUMBER tSNUMBER tSNUMBER
+      {
+        /* ISO 8601 format.  YYYY-MM-DD.  */
+        pc->year = $1;
+        pc->month = -$2.value;
+        pc->day = -$3.value;
+      }
+  | tUNUMBER tMONTH tSNUMBER
+      {
+        /* e.g. 17-JUN-1992.  */
+        pc->day = $1.value;
+        pc->month = $2;
+        pc->year.value = -$3.value;
+        pc->year.digits = $3.digits;
+      }
+  | tMONTH tSNUMBER tSNUMBER
+      {
+        /* e.g. JUN-17-1992.  */
+        pc->month = $1;
+        pc->day = -$2.value;
+        pc->year.value = -$3.value;
+        pc->year.digits = $3.digits;
+      }
+  | tMONTH tUNUMBER
+      {
+        pc->month = $1;
+        pc->day = $2.value;
+      }
+  | tMONTH tUNUMBER ',' tUNUMBER
+      {
+        pc->month = $1;
+        pc->day = $2.value;
+        pc->year = $4;
+      }
+  | tUNUMBER tMONTH
+      {
+        pc->day = $1.value;
+        pc->month = $2;
+      }
+  | tUNUMBER tMONTH tUNUMBER
+      {
+        pc->day = $1.value;
+        pc->month = $2;
+        pc->year = $3;
+      }
+  ;
+
+rel:
+    relunit tAGO
+      { apply_relative_time (pc, $1, -1); }
+  | relunit
+      { apply_relative_time (pc, $1, 1); }
+  | dayshift
+      { apply_relative_time (pc, $1, 1); }
+  ;
+
+relunit:
+    tORDINAL tYEAR_UNIT
+      { $$ = RELATIVE_TIME_0; $$.year = $1; }
+  | tUNUMBER tYEAR_UNIT
+      { $$ = RELATIVE_TIME_0; $$.year = $1.value; }
+  | tYEAR_UNIT
+      { $$ = RELATIVE_TIME_0; $$.year = 1; }
+  | tORDINAL tMONTH_UNIT
+      { $$ = RELATIVE_TIME_0; $$.month = $1; }
+  | tUNUMBER tMONTH_UNIT
+      { $$ = RELATIVE_TIME_0; $$.month = $1.value; }
+  | tMONTH_UNIT
+      { $$ = RELATIVE_TIME_0; $$.month = 1; }
+  | tORDINAL tDAY_UNIT
+      { $$ = RELATIVE_TIME_0; $$.day = $1 * $2; }
+  | tUNUMBER tDAY_UNIT
+      { $$ = RELATIVE_TIME_0; $$.day = $1.value * $2; }
+  | tDAY_UNIT
+      { $$ = RELATIVE_TIME_0; $$.day = $1; }
+  | tORDINAL tHOUR_UNIT
+      { $$ = RELATIVE_TIME_0; $$.hour = $1; }
+  | tUNUMBER tHOUR_UNIT
+      { $$ = RELATIVE_TIME_0; $$.hour = $1.value; }
+  | tHOUR_UNIT
+      { $$ = RELATIVE_TIME_0; $$.hour = 1; }
+  | tORDINAL tMINUTE_UNIT
+      { $$ = RELATIVE_TIME_0; $$.minutes = $1; }
+  | tUNUMBER tMINUTE_UNIT
+      { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; }
+  | tMINUTE_UNIT
+      { $$ = RELATIVE_TIME_0; $$.minutes = 1; }
+  | tORDINAL tSEC_UNIT
+      { $$ = RELATIVE_TIME_0; $$.seconds = $1; }
+  | tUNUMBER tSEC_UNIT
+      { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; }
+  | tSDECIMAL_NUMBER tSEC_UNIT
+      { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; }
+  | tUDECIMAL_NUMBER tSEC_UNIT
+      { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; }
+  | tSEC_UNIT
+      { $$ = RELATIVE_TIME_0; $$.seconds = 1; }
+  | relunit_snumber
+  ;
+
+relunit_snumber:
+    tSNUMBER tYEAR_UNIT
+      { $$ = RELATIVE_TIME_0; $$.year = $1.value; }
+  | tSNUMBER tMONTH_UNIT
+      { $$ = RELATIVE_TIME_0; $$.month = $1.value; }
+  | tSNUMBER tDAY_UNIT
+      { $$ = RELATIVE_TIME_0; $$.day = $1.value * $2; }
+  | tSNUMBER tHOUR_UNIT
+      { $$ = RELATIVE_TIME_0; $$.hour = $1.value; }
+  | tSNUMBER tMINUTE_UNIT
+      { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; }
+  | tSNUMBER tSEC_UNIT
+      { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; }
+  ;
+
+dayshift:
+    tDAY_SHIFT
+      { $$ = RELATIVE_TIME_0; $$.day = $1; }
+  ;
+
+seconds: signed_seconds | unsigned_seconds;
+
+signed_seconds:
+    tSDECIMAL_NUMBER
+  | tSNUMBER
+      { $$.tv_sec = $1.value; $$.tv_nsec = 0; }
+  ;
+
+unsigned_seconds:
+    tUDECIMAL_NUMBER
+  | tUNUMBER
+      { $$.tv_sec = $1.value; $$.tv_nsec = 0; }
+  ;
+
+number:
+    tUNUMBER
+      { digits_to_date_time (pc, $1); }
+  ;
+
+hybrid:
+    tUNUMBER relunit_snumber
+      {
+        /* Hybrid all-digit and relative offset, so that we accept e.g.,
+           "YYYYMMDD +N days" as well as "YYYYMMDD N days".  */
+        digits_to_date_time (pc, $1);
+        apply_relative_time (pc, $2, 1);
+      }
+  ;
+
+o_colon_minutes:
+    /* empty */
+      { $$ = -1; }
+  | ':' tUNUMBER
+      { $$ = $2.value; }
+  ;
+
+o_merid:
+    /* empty */
+      { $$ = MER24; }
+  | tMERIDIAN
+      { $$ = $1; }
+  ;
+
+%%
+
+static table const meridian_table[] =
+{
+  { "AM",   tMERIDIAN, MERam },
+  { "A.M.", tMERIDIAN, MERam },
+  { "PM",   tMERIDIAN, MERpm },
+  { "P.M.", tMERIDIAN, MERpm },
+  { NULL, 0, 0 }
+};
+
+static table const dst_table[] =
+{
+  { "DST", tDST, 0 }
+};
+
+static table const month_and_day_table[] =
+{
+  { "JANUARY",  tMONTH,  1 },
+  { "FEBRUARY", tMONTH,  2 },
+  { "MARCH",    tMONTH,  3 },
+  { "APRIL",    tMONTH,  4 },
+  { "MAY",      tMONTH,  5 },
+  { "JUNE",     tMONTH,  6 },
+  { "JULY",     tMONTH,  7 },
+  { "AUGUST",   tMONTH,  8 },
+  { "SEPTEMBER",tMONTH,  9 },
+  { "SEPT",     tMONTH,  9 },
+  { "OCTOBER",  tMONTH, 10 },
+  { "NOVEMBER", tMONTH, 11 },
+  { "DECEMBER", tMONTH, 12 },
+  { "SUNDAY",   tDAY,    0 },
+  { "MONDAY",   tDAY,    1 },
+  { "TUESDAY",  tDAY,    2 },
+  { "TUES",     tDAY,    2 },
+  { "WEDNESDAY",tDAY,    3 },
+  { "WEDNES",   tDAY,    3 },
+  { "THURSDAY", tDAY,    4 },
+  { "THUR",     tDAY,    4 },
+  { "THURS",    tDAY,    4 },
+  { "FRIDAY",   tDAY,    5 },
+  { "SATURDAY", tDAY,    6 },
+  { NULL, 0, 0 }
+};
+
+static table const time_units_table[] =
+{
+  { "YEAR",     tYEAR_UNIT,      1 },
+  { "MONTH",    tMONTH_UNIT,     1 },
+  { "FORTNIGHT",tDAY_UNIT,      14 },
+  { "WEEK",     tDAY_UNIT,       7 },
+  { "DAY",      tDAY_UNIT,       1 },
+  { "HOUR",     tHOUR_UNIT,      1 },
+  { "MINUTE",   tMINUTE_UNIT,    1 },
+  { "MIN",      tMINUTE_UNIT,    1 },
+  { "SECOND",   tSEC_UNIT,       1 },
+  { "SEC",      tSEC_UNIT,       1 },
+  { NULL, 0, 0 }
+};
+
+/* Assorted relative-time words. */
+static table const relative_time_table[] =
+{
+  { "TOMORROW", tDAY_SHIFT,      1 },
+  { "YESTERDAY",tDAY_SHIFT,     -1 },
+  { "TODAY",    tDAY_SHIFT,      0 },
+  { "NOW",      tDAY_SHIFT,      0 },
+  { "LAST",     tORDINAL,       -1 },
+  { "THIS",     tORDINAL,        0 },
+  { "NEXT",     tORDINAL,        1 },
+  { "FIRST",    tORDINAL,        1 },
+/*{ "SECOND",   tORDINAL,        2 }, */
+  { "THIRD",    tORDINAL,        3 },
+  { "FOURTH",   tORDINAL,        4 },
+  { "FIFTH",    tORDINAL,        5 },
+  { "SIXTH",    tORDINAL,        6 },
+  { "SEVENTH",  tORDINAL,        7 },
+  { "EIGHTH",   tORDINAL,        8 },
+  { "NINTH",    tORDINAL,        9 },
+  { "TENTH",    tORDINAL,       10 },
+  { "ELEVENTH", tORDINAL,       11 },
+  { "TWELFTH",  tORDINAL,       12 },
+  { "AGO",      tAGO,            1 },
+  { NULL, 0, 0 }
+};
+
+/* The universal time zone table.  These labels can be used even for
+   time stamps that would not otherwise be valid, e.g., GMT time
+   stamps in London during summer.  */
+static table const universal_time_zone_table[] =
+{
+  { "GMT",      tZONE,     HOUR ( 0) }, /* Greenwich Mean */
+  { "UT",       tZONE,     HOUR ( 0) }, /* Universal (Coordinated) */
+  { "UTC",      tZONE,     HOUR ( 0) },
+  { NULL, 0, 0 }
+};
+
+/* The time zone table.  This table is necessarily incomplete, as time
+   zone abbreviations are ambiguous; e.g. Australians interpret "EST"
+   as Eastern time in Australia, not as US Eastern Standard Time.
+   You cannot rely on parse_datetime to handle arbitrary time zone
+   abbreviations; use numeric abbreviations like `-0500' instead.  */
+static table const time_zone_table[] =
+{
+  { "WET",      tZONE,     HOUR ( 0) }, /* Western European */
+  { "WEST",     tDAYZONE,  HOUR ( 0) }, /* Western European Summer */
+  { "BST",      tDAYZONE,  HOUR ( 0) }, /* British Summer */
+  { "ART",      tZONE,    -HOUR ( 3) }, /* Argentina */
+  { "BRT",      tZONE,    -HOUR ( 3) }, /* Brazil */
+  { "BRST",     tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */
+  { "NST",      tZONE,   -(HOUR ( 3) + 30) },   /* Newfoundland Standard */
+  { "NDT",      tDAYZONE,-(HOUR ( 3) + 30) },   /* Newfoundland Daylight */
+  { "AST",      tZONE,    -HOUR ( 4) }, /* Atlantic Standard */
+  { "ADT",      tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */
+  { "CLT",      tZONE,    -HOUR ( 4) }, /* Chile */
+  { "CLST",     tDAYZONE, -HOUR ( 4) }, /* Chile Summer */
+  { "EST",      tZONE,    -HOUR ( 5) }, /* Eastern Standard */
+  { "EDT",      tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */
+  { "CST",      tZONE,    -HOUR ( 6) }, /* Central Standard */
+  { "CDT",      tDAYZONE, -HOUR ( 6) }, /* Central Daylight */
+  { "MST",      tZONE,    -HOUR ( 7) }, /* Mountain Standard */
+  { "MDT",      tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */
+  { "PST",      tZONE,    -HOUR ( 8) }, /* Pacific Standard */
+  { "PDT",      tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */
+  { "AKST",     tZONE,    -HOUR ( 9) }, /* Alaska Standard */
+  { "AKDT",     tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */
+  { "HST",      tZONE,    -HOUR (10) }, /* Hawaii Standard */
+  { "HAST",     tZONE,    -HOUR (10) }, /* Hawaii-Aleutian Standard */
+  { "HADT",     tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */
+  { "SST",      tZONE,    -HOUR (12) }, /* Samoa Standard */
+  { "WAT",      tZONE,     HOUR ( 1) }, /* West Africa */
+  { "CET",      tZONE,     HOUR ( 1) }, /* Central European */
+  { "CEST",     tDAYZONE,  HOUR ( 1) }, /* Central European Summer */
+  { "MET",      tZONE,     HOUR ( 1) }, /* Middle European */
+  { "MEZ",      tZONE,     HOUR ( 1) }, /* Middle European */
+  { "MEST",     tDAYZONE,  HOUR ( 1) }, /* Middle European Summer */
+  { "MESZ",     tDAYZONE,  HOUR ( 1) }, /* Middle European Summer */
+  { "EET",      tZONE,     HOUR ( 2) }, /* Eastern European */
+  { "EEST",     tDAYZONE,  HOUR ( 2) }, /* Eastern European Summer */
+  { "CAT",      tZONE,     HOUR ( 2) }, /* Central Africa */
+  { "SAST",     tZONE,     HOUR ( 2) }, /* South Africa Standard */
+  { "EAT",      tZONE,     HOUR ( 3) }, /* East Africa */
+  { "MSK",      tZONE,     HOUR ( 3) }, /* Moscow */
+  { "MSD",      tDAYZONE,  HOUR ( 3) }, /* Moscow Daylight */
+  { "IST",      tZONE,    (HOUR ( 5) + 30) },   /* India Standard */
+  { "SGT",      tZONE,     HOUR ( 8) }, /* Singapore */
+  { "KST",      tZONE,     HOUR ( 9) }, /* Korea Standard */
+  { "JST",      tZONE,     HOUR ( 9) }, /* Japan Standard */
+  { "GST",      tZONE,     HOUR (10) }, /* Guam Standard */
+  { "NZST",     tZONE,     HOUR (12) }, /* New Zealand Standard */
+  { "NZDT",     tDAYZONE,  HOUR (12) }, /* New Zealand Daylight */
+  { NULL, 0, 0 }
+};
+
+/* Military time zone table. */
+static table const military_table[] =
+{
+  { "A", tZONE, -HOUR ( 1) },
+  { "B", tZONE, -HOUR ( 2) },
+  { "C", tZONE, -HOUR ( 3) },
+  { "D", tZONE, -HOUR ( 4) },
+  { "E", tZONE, -HOUR ( 5) },
+  { "F", tZONE, -HOUR ( 6) },
+  { "G", tZONE, -HOUR ( 7) },
+  { "H", tZONE, -HOUR ( 8) },
+  { "I", tZONE, -HOUR ( 9) },
+  { "K", tZONE, -HOUR (10) },
+  { "L", tZONE, -HOUR (11) },
+  { "M", tZONE, -HOUR (12) },
+  { "N", tZONE,  HOUR ( 1) },
+  { "O", tZONE,  HOUR ( 2) },
+  { "P", tZONE,  HOUR ( 3) },
+  { "Q", tZONE,  HOUR ( 4) },
+  { "R", tZONE,  HOUR ( 5) },
+  { "S", tZONE,  HOUR ( 6) },
+  { "T", tZONE,  HOUR ( 7) },
+  { "U", tZONE,  HOUR ( 8) },
+  { "V", tZONE,  HOUR ( 9) },
+  { "W", tZONE,  HOUR (10) },
+  { "X", tZONE,  HOUR (11) },
+  { "Y", tZONE,  HOUR (12) },
+  { "Z", tZONE,  HOUR ( 0) },
+  { NULL, 0, 0 }
+};
+
+\f
+
+/* Convert a time zone expressed as HH:MM into an integer count of
+   minutes.  If MM is negative, then S is of the form HHMM and needs
+   to be picked apart; otherwise, S is of the form HH.  As specified in
+   http://www.opengroup.org/susv3xbd/xbd_chap08.html#tag_08_03, allow
+   only valid TZ range, and consider first two digits as hours, if no
+   minutes specified.  */
+
+static long int
+time_zone_hhmm (parser_control *pc, textint s, long int mm)
+{
+  long int n_minutes;
+
+  /* If the length of S is 1 or 2 and no minutes are specified,
+     interpret it as a number of hours.  */
+  if (s.digits <= 2 && mm < 0)
+    s.value *= 100;
+
+  if (mm < 0)
+    n_minutes = (s.value / 100) * 60 + s.value % 100;
+  else
+    n_minutes = s.value * 60 + (s.negative ? -mm : mm);
+
+  /* If the absolute number of minutes is larger than 24 hours,
+     arrange to reject it by incrementing pc->zones_seen.  Thus,
+     we allow only values in the range UTC-24:00 to UTC+24:00.  */
+  if (24 * 60 < abs (n_minutes))
+    pc->zones_seen++;
+
+  return n_minutes;
+}
+
+static int
+to_hour (long int hours, int meridian)
+{
+  switch (meridian)
+    {
+    default: /* Pacify GCC.  */
+    case MER24:
+      return 0 <= hours && hours < 24 ? hours : -1;
+    case MERam:
+      return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1;
+    case MERpm:
+      return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1;
+    }
+}
+
+static long int
+to_year (textint textyear)
+{
+  long int year = textyear.value;
+
+  if (year < 0)
+    year = -year;
+
+  /* XPG4 suggests that years 00-68 map to 2000-2068, and
+     years 69-99 map to 1969-1999.  */
+  else if (textyear.digits == 2)
+    year += year < 69 ? 2000 : 1900;
+
+  return year;
+}
+
+static table const *
+lookup_zone (parser_control const *pc, char const *name)
+{
+  table const *tp;
+
+  for (tp = universal_time_zone_table; tp->name; tp++)
+    if (strcmp (name, tp->name) == 0)
+      return tp;
+
+  /* Try local zone abbreviations before those in time_zone_table, as
+     the local ones are more likely to be right.  */
+  for (tp = pc->local_time_zone_table; tp->name; tp++)
+    if (strcmp (name, tp->name) == 0)
+      return tp;
+
+  for (tp = time_zone_table; tp->name; tp++)
+    if (strcmp (name, tp->name) == 0)
+      return tp;
+
+  return NULL;
+}
+
+#if ! HAVE_TM_GMTOFF
+/* Yield the difference between *A and *B,
+   measured in seconds, ignoring leap seconds.
+   The body of this function is taken directly from the GNU C Library;
+   see src/strftime.c.  */
+static long int
+tm_diff (struct tm const *a, struct tm const *b)
+{
+  /* Compute intervening leap days correctly even if year is negative.
+     Take care to avoid int overflow in leap day calculations.  */
+  int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3);
+  int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3);
+  int a100 = a4 / 25 - (a4 % 25 < 0);
+  int b100 = b4 / 25 - (b4 % 25 < 0);
+  int a400 = SHR (a100, 2);
+  int b400 = SHR (b100, 2);
+  int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
+  long int ayear = a->tm_year;
+  long int years = ayear - b->tm_year;
+  long int days = (365 * years + intervening_leap_days
+                   + (a->tm_yday - b->tm_yday));
+  return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour))
+                + (a->tm_min - b->tm_min))
+          + (a->tm_sec - b->tm_sec));
+}
+#endif /* ! HAVE_TM_GMTOFF */
+
+static table const *
+lookup_word (parser_control const *pc, char *word)
+{
+  char *p;
+  char *q;
+  size_t wordlen;
+  table const *tp;
+  bool period_found;
+  bool abbrev;
+
+  /* Make it uppercase.  */
+  for (p = word; *p; p++)
+    {
+      unsigned char ch = *p;
+      *p = c_toupper (ch);
+    }
+
+  for (tp = meridian_table; tp->name; tp++)
+    if (strcmp (word, tp->name) == 0)
+      return tp;
+
+  /* See if we have an abbreviation for a month. */
+  wordlen = strlen (word);
+  abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.');
+
+  for (tp = month_and_day_table; tp->name; tp++)
+    if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0)
+      return tp;
+
+  if ((tp = lookup_zone (pc, word)))
+    return tp;
+
+  if (strcmp (word, dst_table[0].name) == 0)
+    return dst_table;
+
+  for (tp = time_units_table; tp->name; tp++)
+    if (strcmp (word, tp->name) == 0)
+      return tp;
+
+  /* Strip off any plural and try the units table again. */
+  if (word[wordlen - 1] == 'S')
+    {
+      word[wordlen - 1] = '\0';
+      for (tp = time_units_table; tp->name; tp++)
+        if (strcmp (word, tp->name) == 0)
+          return tp;
+      word[wordlen - 1] = 'S';  /* For "this" in relative_time_table.  */
+    }
+
+  for (tp = relative_time_table; tp->name; tp++)
+    if (strcmp (word, tp->name) == 0)
+      return tp;
+
+  /* Military time zones. */
+  if (wordlen == 1)
+    for (tp = military_table; tp->name; tp++)
+      if (word[0] == tp->name[0])
+        return tp;
+
+  /* Drop out any periods and try the time zone table again. */
+  for (period_found = false, p = q = word; (*p = *q); q++)
+    if (*q == '.')
+      period_found = true;
+    else
+      p++;
+  if (period_found && (tp = lookup_zone (pc, word)))
+    return tp;
+
+  return NULL;
+}
+
+static int
+yylex (YYSTYPE *lvalp, parser_control *pc)
+{
+  unsigned char c;
+  size_t count;
+
+  for (;;)
+    {
+      while (c = *pc->input, c_isspace (c))
+        pc->input++;
+
+      if (ISDIGIT (c) || c == '-' || c == '+')
+        {
+          char const *p;
+          int sign;
+          unsigned long int value;
+          if (c == '-' || c == '+')
+            {
+              sign = c == '-' ? -1 : 1;
+              while (c = *++pc->input, c_isspace (c))
+                continue;
+              if (! ISDIGIT (c))
+                /* skip the '-' sign */
+                continue;
+            }
+          else
+            sign = 0;
+          p = pc->input;
+          for (value = 0; ; value *= 10)
+            {
+              unsigned long int value1 = value + (c - '0');
+              if (value1 < value)
+                return '?';
+              value = value1;
+              c = *++p;
+              if (! ISDIGIT (c))
+                break;
+              if (ULONG_MAX / 10 < value)
+                return '?';
+            }
+          if ((c == '.' || c == ',') && ISDIGIT (p[1]))
+            {
+              time_t s;
+              int ns;
+              int digits;
+              unsigned long int value1;
+
+              /* Check for overflow when converting value to time_t.  */
+              if (sign < 0)
+                {
+                  s = - value;
+                  if (0 < s)
+                    return '?';
+                  value1 = -s;
+                }
+              else
+                {
+                  s = value;
+                  if (s < 0)
+                    return '?';
+                  value1 = s;
+                }
+              if (value != value1)
+                return '?';
+
+              /* Accumulate fraction, to ns precision.  */
+              p++;
+              ns = *p++ - '0';
+              for (digits = 2; digits <= LOG10_BILLION; digits++)
+                {
+                  ns *= 10;
+                  if (ISDIGIT (*p))
+                    ns += *p++ - '0';
+                }
+
+              /* Skip excess digits, truncating toward -Infinity.  */
+              if (sign < 0)
+                for (; ISDIGIT (*p); p++)
+                  if (*p != '0')
+                    {
+                      ns++;
+                      break;
+                    }
+              while (ISDIGIT (*p))
+                p++;
+
+              /* Adjust to the timespec convention, which is that
+                 tv_nsec is always a positive offset even if tv_sec is
+                 negative.  */
+              if (sign < 0 && ns)
+                {
+                  s--;
+                  if (! (s < 0))
+                    return '?';
+                  ns = BILLION - ns;
+                }
+
+              lvalp->timespec.tv_sec = s;
+              lvalp->timespec.tv_nsec = ns;
+              pc->input = p;
+              return sign ? tSDECIMAL_NUMBER : tUDECIMAL_NUMBER;
+            }
+          else
+            {
+              lvalp->textintval.negative = sign < 0;
+              if (sign < 0)
+                {
+                  lvalp->textintval.value = - value;
+                  if (0 < lvalp->textintval.value)
+                    return '?';
+                }
+              else
+                {
+                  lvalp->textintval.value = value;
+                  if (lvalp->textintval.value < 0)
+                    return '?';
+                }
+              lvalp->textintval.digits = p - pc->input;
+              pc->input = p;
+              return sign ? tSNUMBER : tUNUMBER;
+            }
+        }
+
+      if (c_isalpha (c))
+        {
+          char buff[20];
+          char *p = buff;
+          table const *tp;
+
+          do
+            {
+              if (p < buff + sizeof buff - 1)
+                *p++ = c;
+              c = *++pc->input;
+            }
+          while (c_isalpha (c) || c == '.');
+
+          *p = '\0';
+          tp = lookup_word (pc, buff);
+          if (! tp)
+            return '?';
+          lvalp->intval = tp->value;
+          return tp->type;
+        }
+
+      if (c != '(')
+        return *pc->input++;
+      count = 0;
+      do
+        {
+          c = *pc->input++;
+          if (c == '\0')
+            return c;
+          if (c == '(')
+            count++;
+          else if (c == ')')
+            count--;
+        }
+      while (count != 0);
+    }
+}
+
+/* Do nothing if the parser reports an error.  */
+static int
+yyerror (parser_control const *pc _GL_UNUSED,
+         char const *s _GL_UNUSED)
+{
+  return 0;
+}
+
+/* If *TM0 is the old and *TM1 is the new value of a struct tm after
+   passing it to mktime, return true if it's OK that mktime returned T.
+   It's not OK if *TM0 has out-of-range members.  */
+
+static bool
+mktime_ok (struct tm const *tm0, struct tm const *tm1, time_t t)
+{
+  if (t == (time_t) -1)
+    {
+      /* Guard against falsely reporting an error when parsing a time
+         stamp that happens to equal (time_t) -1, on a host that
+         supports such a time stamp.  */
+      tm1 = localtime (&t);
+      if (!tm1)
+        return false;
+    }
+
+  return ! ((tm0->tm_sec ^ tm1->tm_sec)
+            | (tm0->tm_min ^ tm1->tm_min)
+            | (tm0->tm_hour ^ tm1->tm_hour)
+            | (tm0->tm_mday ^ tm1->tm_mday)
+            | (tm0->tm_mon ^ tm1->tm_mon)
+            | (tm0->tm_year ^ tm1->tm_year));
+}
+
+/* A reasonable upper bound for the size of ordinary TZ strings.
+   Use heap allocation if TZ's length exceeds this.  */
+enum { TZBUFSIZE = 100 };
+
+/* Return a copy of TZ, stored in TZBUF if it fits, and heap-allocated
+   otherwise.  */
+static char *
+get_tz (char tzbuf[TZBUFSIZE])
+{
+  char *tz = getenv ("TZ");
+  if (tz)
+    {
+      size_t tzsize = strlen (tz) + 1;
+      tz = (tzsize <= TZBUFSIZE
+            ? memcpy (tzbuf, tz, tzsize)
+            : xmemdup (tz, tzsize));
+    }
+  return tz;
+}
+
+/* Parse a date/time string, storing the resulting time value into *RESULT.
+   The string itself is pointed to by P.  Return true if successful.
+   P can be an incomplete or relative time specification; if so, use
+   *NOW as the basis for the returned time.  */
+bool
+parse_datetime (struct timespec *result, char const *p,
+                struct timespec const *now)
+{
+  time_t Start;
+  long int Start_ns;
+  struct tm const *tmp;
+  struct tm tm;
+  struct tm tm0;
+  parser_control pc;
+  struct timespec gettime_buffer;
+  unsigned char c;
+  bool tz_was_altered = false;
+  char *tz0 = NULL;
+  char tz0buf[TZBUFSIZE];
+  bool ok = true;
+
+  if (! now)
+    {
+      gettime (&gettime_buffer);
+      now = &gettime_buffer;
+    }
+
+  Start = now->tv_sec;
+  Start_ns = now->tv_nsec;
+
+  tmp = localtime (&now->tv_sec);
+  if (! tmp)
+    return false;
+
+  while (c = *p, c_isspace (c))
+    p++;
+
+  if (strncmp (p, "TZ=\"", 4) == 0)
+    {
+      char const *tzbase = p + 4;
+      size_t tzsize = 1;
+      char const *s;
+
+      for (s = tzbase; *s; s++, tzsize++)
+        if (*s == '\\')
+          {
+            s++;
+            if (! (*s == '\\' || *s == '"'))
+              break;
+          }
+        else if (*s == '"')
+          {
+            char *z;
+            char *tz1;
+            char tz1buf[TZBUFSIZE];
+            bool large_tz = TZBUFSIZE < tzsize;
+            bool setenv_ok;
+            /* Free tz0, in case this is the 2nd or subsequent time through. */
+            free (tz0);
+            tz0 = get_tz (tz0buf);
+            z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf;
+            for (s = tzbase; *s != '"'; s++)
+              *z++ = *(s += *s == '\\');
+            *z = '\0';
+            setenv_ok = setenv ("TZ", tz1, 1) == 0;
+            if (large_tz)
+              free (tz1);
+            if (!setenv_ok)
+              goto fail;
+            tz_was_altered = true;
+            p = s + 1;
+          }
+    }
+
+  /* As documented, be careful to treat the empty string just like
+     a date string of "0".  Without this, an empty string would be
+     declared invalid when parsed during a DST transition.  */
+  if (*p == '\0')
+    p = "0";
+
+  pc.input = p;
+  pc.year.value = tmp->tm_year;
+  pc.year.value += TM_YEAR_BASE;
+  pc.year.digits = 0;
+  pc.month = tmp->tm_mon + 1;
+  pc.day = tmp->tm_mday;
+  pc.hour = tmp->tm_hour;
+  pc.minutes = tmp->tm_min;
+  pc.seconds.tv_sec = tmp->tm_sec;
+  pc.seconds.tv_nsec = Start_ns;
+  tm.tm_isdst = tmp->tm_isdst;
+
+  pc.meridian = MER24;
+  pc.rel = RELATIVE_TIME_0;
+  pc.timespec_seen = false;
+  pc.rels_seen = false;
+  pc.dates_seen = 0;
+  pc.days_seen = 0;
+  pc.times_seen = 0;
+  pc.local_zones_seen = 0;
+  pc.dsts_seen = 0;
+  pc.zones_seen = 0;
+
+#if HAVE_STRUCT_TM_TM_ZONE
+  pc.local_time_zone_table[0].name = tmp->tm_zone;
+  pc.local_time_zone_table[0].type = tLOCAL_ZONE;
+  pc.local_time_zone_table[0].value = tmp->tm_isdst;
+  pc.local_time_zone_table[1].name = NULL;
+
+  /* Probe the names used in the next three calendar quarters, looking
+     for a tm_isdst different from the one we already have.  */
+  {
+    int quarter;
+    for (quarter = 1; quarter <= 3; quarter++)
+      {
+        time_t probe = Start + quarter * (90 * 24 * 60 * 60);
+        struct tm const *probe_tm = localtime (&probe);
+        if (probe_tm && probe_tm->tm_zone
+            && probe_tm->tm_isdst != pc.local_time_zone_table[0].value)
+          {
+              {
+                pc.local_time_zone_table[1].name = probe_tm->tm_zone;
+                pc.local_time_zone_table[1].type = tLOCAL_ZONE;
+                pc.local_time_zone_table[1].value = probe_tm->tm_isdst;
+                pc.local_time_zone_table[2].name = NULL;
+              }
+            break;
+          }
+      }
+  }
+#else
+#if HAVE_TZNAME
+  {
+# if !HAVE_DECL_TZNAME
+    extern char *tzname[];
+# endif
+    int i;
+    for (i = 0; i < 2; i++)
+      {
+        pc.local_time_zone_table[i].name = tzname[i];
+        pc.local_time_zone_table[i].type = tLOCAL_ZONE;
+        pc.local_time_zone_table[i].value = i;
+      }
+    pc.local_time_zone_table[i].name = NULL;
+  }
+#else
+  pc.local_time_zone_table[0].name = NULL;
+#endif
+#endif
+
+  if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name
+      && ! strcmp (pc.local_time_zone_table[0].name,
+                   pc.local_time_zone_table[1].name))
+    {
+      /* This locale uses the same abbrevation for standard and
+         daylight times.  So if we see that abbreviation, we don't
+         know whether it's daylight time.  */
+      pc.local_time_zone_table[0].value = -1;
+      pc.local_time_zone_table[1].name = NULL;
+    }
+
+  if (yyparse (&pc) != 0)
+    goto fail;
+
+  if (pc.timespec_seen)
+    *result = pc.seconds;
+  else
+    {
+      if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen
+               | (pc.local_zones_seen + pc.zones_seen)))
+        goto fail;
+
+      tm.tm_year = to_year (pc.year) - TM_YEAR_BASE;
+      tm.tm_mon = pc.month - 1;
+      tm.tm_mday = pc.day;
+      if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen))
+        {
+          tm.tm_hour = to_hour (pc.hour, pc.meridian);
+          if (tm.tm_hour < 0)
+            goto fail;
+          tm.tm_min = pc.minutes;
+          tm.tm_sec = pc.seconds.tv_sec;
+        }
+      else
+        {
+          tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+          pc.seconds.tv_nsec = 0;
+        }
+
+      /* Let mktime deduce tm_isdst if we have an absolute time stamp.  */
+      if (pc.dates_seen | pc.days_seen | pc.times_seen)
+        tm.tm_isdst = -1;
+
+      /* But if the input explicitly specifies local time with or without
+         DST, give mktime that information.  */
+      if (pc.local_zones_seen)
+        tm.tm_isdst = pc.local_isdst;
+
+      tm0 = tm;
+
+      Start = mktime (&tm);
+
+      if (! mktime_ok (&tm0, &tm, Start))
+        {
+          if (! pc.zones_seen)
+            goto fail;
+          else
+            {
+              /* Guard against falsely reporting errors near the time_t
+                 boundaries when parsing times in other time zones.  For
+                 example, suppose the input string "1969-12-31 23:00:00 -0100",
+                 the current time zone is 8 hours ahead of UTC, and the min
+                 time_t value is 1970-01-01 00:00:00 UTC.  Then the min
+                 localtime value is 1970-01-01 08:00:00, and mktime will
+                 therefore fail on 1969-12-31 23:00:00.  To work around the
+                 problem, set the time zone to 1 hour behind UTC temporarily
+                 by setting TZ="XXX1:00" and try mktime again.  */
+
+              long int time_zone = pc.time_zone;
+              long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone;
+              long int abs_time_zone_hour = abs_time_zone / 60;
+              int abs_time_zone_min = abs_time_zone % 60;
+              char tz1buf[sizeof "XXX+0:00"
+                          + sizeof pc.time_zone * CHAR_BIT / 3];
+              if (!tz_was_altered)
+                tz0 = get_tz (tz0buf);
+              sprintf (tz1buf, "XXX%s%ld:%02d", "-" + (time_zone < 0),
+                       abs_time_zone_hour, abs_time_zone_min);
+              if (setenv ("TZ", tz1buf, 1) != 0)
+                goto fail;
+              tz_was_altered = true;
+              tm = tm0;
+              Start = mktime (&tm);
+              if (! mktime_ok (&tm0, &tm, Start))
+                goto fail;
+            }
+        }
+
+      if (pc.days_seen && ! pc.dates_seen)
+        {
+          tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7
+                         + 7 * (pc.day_ordinal
+                                - (0 < pc.day_ordinal
+                                   && tm.tm_wday != pc.day_number)));
+          tm.tm_isdst = -1;
+          Start = mktime (&tm);
+          if (Start == (time_t) -1)
+            goto fail;
+        }
+
+      /* Add relative date.  */
+      if (pc.rel.year | pc.rel.month | pc.rel.day)
+        {
+          int year = tm.tm_year + pc.rel.year;
+          int month = tm.tm_mon + pc.rel.month;
+          int day = tm.tm_mday + pc.rel.day;
+          if (((year < tm.tm_year) ^ (pc.rel.year < 0))
+              | ((month < tm.tm_mon) ^ (pc.rel.month < 0))
+              | ((day < tm.tm_mday) ^ (pc.rel.day < 0)))
+            goto fail;
+          tm.tm_year = year;
+          tm.tm_mon = month;
+          tm.tm_mday = day;
+          tm.tm_hour = tm0.tm_hour;
+          tm.tm_min = tm0.tm_min;
+          tm.tm_sec = tm0.tm_sec;
+          tm.tm_isdst = tm0.tm_isdst;
+          Start = mktime (&tm);
+          if (Start == (time_t) -1)
+            goto fail;
+        }
+
+      /* The only "output" of this if-block is an updated Start value,
+         so this block must follow others that clobber Start.  */
+      if (pc.zones_seen)
+        {
+          long int delta = pc.time_zone * 60;
+          time_t t1;
+#ifdef HAVE_TM_GMTOFF
+          delta -= tm.tm_gmtoff;
+#else
+          time_t t = Start;
+          struct tm const *gmt = gmtime (&t);
+          if (! gmt)
+            goto fail;
+          delta -= tm_diff (&tm, gmt);
+#endif
+          t1 = Start - delta;
+          if ((Start < t1) != (delta < 0))
+            goto fail;  /* time_t overflow */
+          Start = t1;
+        }
+
+      /* Add relative hours, minutes, and seconds.  On hosts that support
+         leap seconds, ignore the possibility of leap seconds; e.g.,
+         "+ 10 minutes" adds 600 seconds, even if one of them is a
+         leap second.  Typically this is not what the user wants, but it's
+         too hard to do it the other way, because the time zone indicator
+         must be applied before relative times, and if mktime is applied
+         again the time zone will be lost.  */
+      {
+        long int sum_ns = pc.seconds.tv_nsec + pc.rel.ns;
+        long int normalized_ns = (sum_ns % BILLION + BILLION) % BILLION;
+        time_t t0 = Start;
+        long int d1 = 60 * 60 * pc.rel.hour;
+        time_t t1 = t0 + d1;
+        long int d2 = 60 * pc.rel.minutes;
+        time_t t2 = t1 + d2;
+        long_time_t d3 = pc.rel.seconds;
+        long_time_t t3 = t2 + d3;
+        long int d4 = (sum_ns - normalized_ns) / BILLION;
+        long_time_t t4 = t3 + d4;
+        time_t t5 = t4;
+
+        if ((d1 / (60 * 60) ^ pc.rel.hour)
+            | (d2 / 60 ^ pc.rel.minutes)
+            | ((t1 < t0) ^ (d1 < 0))
+            | ((t2 < t1) ^ (d2 < 0))
+            | ((t3 < t2) ^ (d3 < 0))
+            | ((t4 < t3) ^ (d4 < 0))
+            | (t5 != t4))
+          goto fail;
+
+        result->tv_sec = t5;
+        result->tv_nsec = normalized_ns;
+      }
+    }
+
+  goto done;
+
+ fail:
+  ok = false;
+ done:
+  if (tz_was_altered)
+    ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0;
+  if (tz0 != tz0buf)
+    free (tz0);
+  return ok;
+}
+
+#if TEST
+
+int
+main (int ac, char **av)
+{
+  char buff[BUFSIZ];
+
+  printf ("Enter date, or blank line to exit.\n\t> ");
+  fflush (stdout);
+
+  buff[BUFSIZ - 1] = '\0';
+  while (fgets (buff, BUFSIZ - 1, stdin) && buff[0])
+    {
+      struct timespec d;
+      struct tm const *tm;
+      if (! parse_datetime (&d, buff, NULL))
+        printf ("Bad format - couldn't convert.\n");
+      else if (! (tm = localtime (&d.tv_sec)))
+        {
+          long int sec = d.tv_sec;
+          printf ("localtime (%ld) failed\n", sec);
+        }
+      else
+        {
+          int ns = d.tv_nsec;
+          printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n",
+                  tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday,
+                  tm->tm_hour, tm->tm_min, tm->tm_sec, ns);
+        }
+      printf ("\t> ");
+      fflush (stdout);
+    }
+  return 0;
+}
+#endif /* TEST */
diff --git a/gnulib/lib/pathmax.h b/gnulib/lib/pathmax.h
new file mode 100644 (file)
index 0000000..d471240
--- /dev/null
@@ -0,0 +1,48 @@
+/* Define PATH_MAX somehow.  Requires sys/types.h.
+   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _PATHMAX_H
+# define _PATHMAX_H
+
+# include <unistd.h>
+
+# include <limits.h>
+
+# ifndef _POSIX_PATH_MAX
+#  define _POSIX_PATH_MAX 256
+# endif
+
+# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF
+#  define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
+                    : pathconf ("/", _PC_PATH_MAX))
+# endif
+
+/* Don't include sys/param.h if it already has been.  */
+# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+#  include <sys/param.h>
+# endif
+
+# if !defined PATH_MAX && defined MAXPATHLEN
+#  define PATH_MAX MAXPATHLEN
+# endif
+
+# ifndef PATH_MAX
+#  define PATH_MAX _POSIX_PATH_MAX
+# endif
+
+#endif /* _PATHMAX_H */
diff --git a/gnulib/lib/perror.c b/gnulib/lib/perror.c
new file mode 100644 (file)
index 0000000..2c13a89
--- /dev/null
@@ -0,0 +1,35 @@
+/* Print a message describing error code.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible and Simon Josefsson.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdio.h>
+
+#include <errno.h>
+#include <string.h>
+
+void
+perror (const char *string)
+{
+  const char *errno_description = strerror (errno);
+
+  if (string != NULL && *string != '\0')
+    fprintf (stderr, "%s: %s\n", string, errno_description);
+  else
+    fprintf (stderr, "%s\n", errno_description);
+}
diff --git a/gnulib/lib/pipe-safer.c b/gnulib/lib/pipe-safer.c
new file mode 100644 (file)
index 0000000..928312b
--- /dev/null
@@ -0,0 +1,56 @@
+/* Invoke pipe, but avoid some glitches.
+   Copyright (C) 2005-2006, 2009-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 Jim Meyering.  */
+
+#include <config.h>
+
+#include "unistd-safer.h"
+
+#include <unistd.h>
+#include <errno.h>
+
+/* Like pipe, but ensure that neither of the file descriptors is
+   STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO.  Fail with ENOSYS on
+   platforms that lack pipe.  */
+
+int
+pipe_safer (int fd[2])
+{
+#if HAVE_PIPE
+  if (pipe (fd) == 0)
+    {
+      int i;
+      for (i = 0; i < 2; i++)
+        {
+          fd[i] = fd_safer (fd[i]);
+          if (fd[i] < 0)
+            {
+              int e = errno;
+              close (fd[1 - i]);
+              errno = e;
+              return -1;
+            }
+        }
+
+      return 0;
+    }
+#else
+  errno = ENOSYS;
+#endif
+
+  return -1;
+}
diff --git a/gnulib/lib/printf-args.c b/gnulib/lib/printf-args.c
new file mode 100644 (file)
index 0000000..8f3727b
--- /dev/null
@@ -0,0 +1,188 @@
+/* Decomposed printf argument list.
+   Copyright (C) 1999, 2002-2003, 2005-2007, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* This file can be parametrized with the following macros:
+     ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.
+     PRINTF_FETCHARGS   Name of the function to be defined.
+     STATIC             Set to 'static' to declare the function static.  */
+
+#ifndef PRINTF_FETCHARGS
+# include <config.h>
+#endif
+
+/* Specification.  */
+#ifndef PRINTF_FETCHARGS
+# include "printf-args.h"
+#endif
+
+#ifdef STATIC
+STATIC
+#endif
+int
+PRINTF_FETCHARGS (va_list args, arguments *a)
+{
+  size_t i;
+  argument *ap;
+
+  for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
+    switch (ap->type)
+      {
+      case TYPE_SCHAR:
+        ap->a.a_schar = va_arg (args, /*signed char*/ int);
+        break;
+      case TYPE_UCHAR:
+        ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
+        break;
+      case TYPE_SHORT:
+        ap->a.a_short = va_arg (args, /*short*/ int);
+        break;
+      case TYPE_USHORT:
+        ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
+        break;
+      case TYPE_INT:
+        ap->a.a_int = va_arg (args, int);
+        break;
+      case TYPE_UINT:
+        ap->a.a_uint = va_arg (args, unsigned int);
+        break;
+      case TYPE_LONGINT:
+        ap->a.a_longint = va_arg (args, long int);
+        break;
+      case TYPE_ULONGINT:
+        ap->a.a_ulongint = va_arg (args, unsigned long int);
+        break;
+#if HAVE_LONG_LONG_INT
+      case TYPE_LONGLONGINT:
+        ap->a.a_longlongint = va_arg (args, long long int);
+        break;
+      case TYPE_ULONGLONGINT:
+        ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
+        break;
+#endif
+      case TYPE_DOUBLE:
+        ap->a.a_double = va_arg (args, double);
+        break;
+      case TYPE_LONGDOUBLE:
+        ap->a.a_longdouble = va_arg (args, long double);
+        break;
+      case TYPE_CHAR:
+        ap->a.a_char = va_arg (args, int);
+        break;
+#if HAVE_WINT_T
+      case TYPE_WIDE_CHAR:
+        /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by
+           default argument promotions", this is not the case in mingw32,
+           where wint_t is 'unsigned short'.  */
+        ap->a.a_wide_char =
+          (sizeof (wint_t) < sizeof (int)
+           ? (wint_t) va_arg (args, int)
+           : va_arg (args, wint_t));
+        break;
+#endif
+      case TYPE_STRING:
+        ap->a.a_string = va_arg (args, const char *);
+        /* A null pointer is an invalid argument for "%s", but in practice
+           it occurs quite frequently in printf statements that produce
+           debug output.  Use a fallback in this case.  */
+        if (ap->a.a_string == NULL)
+          ap->a.a_string = "(NULL)";
+        break;
+#if HAVE_WCHAR_T
+      case TYPE_WIDE_STRING:
+        ap->a.a_wide_string = va_arg (args, const wchar_t *);
+        /* A null pointer is an invalid argument for "%ls", but in practice
+           it occurs quite frequently in printf statements that produce
+           debug output.  Use a fallback in this case.  */
+        if (ap->a.a_wide_string == NULL)
+          {
+            static const wchar_t wide_null_string[] =
+              {
+                (wchar_t)'(',
+                (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L',
+                (wchar_t)')',
+                (wchar_t)0
+              };
+            ap->a.a_wide_string = wide_null_string;
+          }
+        break;
+#endif
+      case TYPE_POINTER:
+        ap->a.a_pointer = va_arg (args, void *);
+        break;
+      case TYPE_COUNT_SCHAR_POINTER:
+        ap->a.a_count_schar_pointer = va_arg (args, signed char *);
+        break;
+      case TYPE_COUNT_SHORT_POINTER:
+        ap->a.a_count_short_pointer = va_arg (args, short *);
+        break;
+      case TYPE_COUNT_INT_POINTER:
+        ap->a.a_count_int_pointer = va_arg (args, int *);
+        break;
+      case TYPE_COUNT_LONGINT_POINTER:
+        ap->a.a_count_longint_pointer = va_arg (args, long int *);
+        break;
+#if HAVE_LONG_LONG_INT
+      case TYPE_COUNT_LONGLONGINT_POINTER:
+        ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
+        break;
+#endif
+#if ENABLE_UNISTDIO
+      /* The unistdio extensions.  */
+      case TYPE_U8_STRING:
+        ap->a.a_u8_string = va_arg (args, const uint8_t *);
+        /* A null pointer is an invalid argument for "%U", but in practice
+           it occurs quite frequently in printf statements that produce
+           debug output.  Use a fallback in this case.  */
+        if (ap->a.a_u8_string == NULL)
+          {
+            static const uint8_t u8_null_string[] =
+              { '(', 'N', 'U', 'L', 'L', ')', 0 };
+            ap->a.a_u8_string = u8_null_string;
+          }
+        break;
+      case TYPE_U16_STRING:
+        ap->a.a_u16_string = va_arg (args, const uint16_t *);
+        /* A null pointer is an invalid argument for "%lU", but in practice
+           it occurs quite frequently in printf statements that produce
+           debug output.  Use a fallback in this case.  */
+        if (ap->a.a_u16_string == NULL)
+          {
+            static const uint16_t u16_null_string[] =
+              { '(', 'N', 'U', 'L', 'L', ')', 0 };
+            ap->a.a_u16_string = u16_null_string;
+          }
+        break;
+      case TYPE_U32_STRING:
+        ap->a.a_u32_string = va_arg (args, const uint32_t *);
+        /* A null pointer is an invalid argument for "%llU", but in practice
+           it occurs quite frequently in printf statements that produce
+           debug output.  Use a fallback in this case.  */
+        if (ap->a.a_u32_string == NULL)
+          {
+            static const uint32_t u32_null_string[] =
+              { '(', 'N', 'U', 'L', 'L', ')', 0 };
+            ap->a.a_u32_string = u32_null_string;
+          }
+        break;
+#endif
+      default:
+        /* Unknown type.  */
+        return -1;
+      }
+  return 0;
+}
diff --git a/gnulib/lib/printf-args.h b/gnulib/lib/printf-args.h
new file mode 100644 (file)
index 0000000..70cca4f
--- /dev/null
@@ -0,0 +1,159 @@
+/* Decomposed printf argument list.
+   Copyright (C) 1999, 2002-2003, 2006-2007, 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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _PRINTF_ARGS_H
+#define _PRINTF_ARGS_H
+
+/* This file can be parametrized with the following macros:
+     ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.
+     PRINTF_FETCHARGS   Name of the function to be declared.
+     STATIC             Set to 'static' to declare the function static.  */
+
+/* Default parameters.  */
+#ifndef PRINTF_FETCHARGS
+# define PRINTF_FETCHARGS printf_fetchargs
+#endif
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Get wchar_t.  */
+#if HAVE_WCHAR_T
+# include <stddef.h>
+#endif
+
+/* Get wint_t.  */
+#if HAVE_WINT_T
+# include <wchar.h>
+#endif
+
+/* Get va_list.  */
+#include <stdarg.h>
+
+
+/* Argument types */
+typedef enum
+{
+  TYPE_NONE,
+  TYPE_SCHAR,
+  TYPE_UCHAR,
+  TYPE_SHORT,
+  TYPE_USHORT,
+  TYPE_INT,
+  TYPE_UINT,
+  TYPE_LONGINT,
+  TYPE_ULONGINT,
+#if HAVE_LONG_LONG_INT
+  TYPE_LONGLONGINT,
+  TYPE_ULONGLONGINT,
+#endif
+  TYPE_DOUBLE,
+  TYPE_LONGDOUBLE,
+  TYPE_CHAR,
+#if HAVE_WINT_T
+  TYPE_WIDE_CHAR,
+#endif
+  TYPE_STRING,
+#if HAVE_WCHAR_T
+  TYPE_WIDE_STRING,
+#endif
+  TYPE_POINTER,
+  TYPE_COUNT_SCHAR_POINTER,
+  TYPE_COUNT_SHORT_POINTER,
+  TYPE_COUNT_INT_POINTER,
+  TYPE_COUNT_LONGINT_POINTER
+#if HAVE_LONG_LONG_INT
+, TYPE_COUNT_LONGLONGINT_POINTER
+#endif
+#if ENABLE_UNISTDIO
+  /* The unistdio extensions.  */
+, TYPE_U8_STRING
+, TYPE_U16_STRING
+, TYPE_U32_STRING
+#endif
+} arg_type;
+
+/* Polymorphic argument */
+typedef struct
+{
+  arg_type type;
+  union
+  {
+    signed char                 a_schar;
+    unsigned char               a_uchar;
+    short                       a_short;
+    unsigned short              a_ushort;
+    int                         a_int;
+    unsigned int                a_uint;
+    long int                    a_longint;
+    unsigned long int           a_ulongint;
+#if HAVE_LONG_LONG_INT
+    long long int               a_longlongint;
+    unsigned long long int      a_ulonglongint;
+#endif
+    float                       a_float;
+    double                      a_double;
+    long double                 a_longdouble;
+    int                         a_char;
+#if HAVE_WINT_T
+    wint_t                      a_wide_char;
+#endif
+    const char*                 a_string;
+#if HAVE_WCHAR_T
+    const wchar_t*              a_wide_string;
+#endif
+    void*                       a_pointer;
+    signed char *               a_count_schar_pointer;
+    short *                     a_count_short_pointer;
+    int *                       a_count_int_pointer;
+    long int *                  a_count_longint_pointer;
+#if HAVE_LONG_LONG_INT
+    long long int *             a_count_longlongint_pointer;
+#endif
+#if ENABLE_UNISTDIO
+    /* The unistdio extensions.  */
+    const uint8_t *             a_u8_string;
+    const uint16_t *            a_u16_string;
+    const uint32_t *            a_u32_string;
+#endif
+  }
+  a;
+}
+argument;
+
+/* Number of directly allocated arguments (no malloc() needed).  */
+#define N_DIRECT_ALLOC_ARGUMENTS 7
+
+typedef struct
+{
+  size_t count;
+  argument *arg;
+  argument direct_alloc_arg[N_DIRECT_ALLOC_ARGUMENTS];
+}
+arguments;
+
+
+/* Fetch the arguments, putting them into a. */
+#ifdef STATIC
+STATIC
+#else
+extern
+#endif
+int PRINTF_FETCHARGS (va_list args, arguments *a);
+
+#endif /* _PRINTF_ARGS_H */
diff --git a/gnulib/lib/printf-parse.c b/gnulib/lib/printf-parse.c
new file mode 100644 (file)
index 0000000..ff24ba4
--- /dev/null
@@ -0,0 +1,639 @@
+/* Formatted output to strings.
+   Copyright (C) 1999-2000, 2002-2003, 2006-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* This file can be parametrized with the following macros:
+     CHAR_T             The element type of the format string.
+     CHAR_T_ONLY_ASCII  Set to 1 to enable verification that all characters
+                        in the format string are ASCII.
+     DIRECTIVE          Structure denoting a format directive.
+                        Depends on CHAR_T.
+     DIRECTIVES         Structure denoting the set of format directives of a
+                        format string.  Depends on CHAR_T.
+     PRINTF_PARSE       Function that parses a format string.
+                        Depends on CHAR_T.
+     STATIC             Set to 'static' to declare the function static.
+     ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.  */
+
+#ifndef PRINTF_PARSE
+# include <config.h>
+#endif
+
+/* Specification.  */
+#ifndef PRINTF_PARSE
+# include "printf-parse.h"
+#endif
+
+/* Default parameters.  */
+#ifndef PRINTF_PARSE
+# define PRINTF_PARSE printf_parse
+# define CHAR_T char
+# define DIRECTIVE char_directive
+# define DIRECTIVES char_directives
+#endif
+
+/* Get size_t, NULL.  */
+#include <stddef.h>
+
+/* Get intmax_t.  */
+#if defined IN_LIBINTL || defined IN_LIBASPRINTF
+# if HAVE_STDINT_H_WITH_UINTMAX
+#  include <stdint.h>
+# endif
+# if HAVE_INTTYPES_H_WITH_UINTMAX
+#  include <inttypes.h>
+# endif
+#else
+# include <stdint.h>
+#endif
+
+/* malloc(), realloc(), free().  */
+#include <stdlib.h>
+
+/* memcpy().  */
+#include <string.h>
+
+/* errno.  */
+#include <errno.h>
+
+/* Checked size_t computations.  */
+#include "xsize.h"
+
+#if CHAR_T_ONLY_ASCII
+/* c_isascii().  */
+# include "c-ctype.h"
+#endif
+
+#ifdef STATIC
+STATIC
+#endif
+int
+PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
+{
+  const CHAR_T *cp = format;    /* pointer into format */
+  size_t arg_posn = 0;          /* number of regular arguments consumed */
+  size_t d_allocated;           /* allocated elements of d->dir */
+  size_t a_allocated;           /* allocated elements of a->arg */
+  size_t max_width_length = 0;
+  size_t max_precision_length = 0;
+
+  d->count = 0;
+  d_allocated = N_DIRECT_ALLOC_DIRECTIVES;
+  d->dir = d->direct_alloc_dir;
+
+  a->count = 0;
+  a_allocated = N_DIRECT_ALLOC_ARGUMENTS;
+  a->arg = a->direct_alloc_arg;
+
+#define REGISTER_ARG(_index_,_type_) \
+  {                                                                     \
+    size_t n = (_index_);                                               \
+    if (n >= a_allocated)                                               \
+      {                                                                 \
+        size_t memory_size;                                             \
+        argument *memory;                                               \
+                                                                        \
+        a_allocated = xtimes (a_allocated, 2);                          \
+        if (a_allocated <= n)                                           \
+          a_allocated = xsum (n, 1);                                    \
+        memory_size = xtimes (a_allocated, sizeof (argument));          \
+        if (size_overflow_p (memory_size))                              \
+          /* Overflow, would lead to out of memory.  */                 \
+          goto out_of_memory;                                           \
+        memory = (argument *) (a->arg != a->direct_alloc_arg            \
+                               ? realloc (a->arg, memory_size)          \
+                               : malloc (memory_size));                 \
+        if (memory == NULL)                                             \
+          /* Out of memory.  */                                         \
+          goto out_of_memory;                                           \
+        if (a->arg == a->direct_alloc_arg)                              \
+          memcpy (memory, a->arg, a->count * sizeof (argument));        \
+        a->arg = memory;                                                \
+      }                                                                 \
+    while (a->count <= n)                                               \
+      a->arg[a->count++].type = TYPE_NONE;                              \
+    if (a->arg[n].type == TYPE_NONE)                                    \
+      a->arg[n].type = (_type_);                                        \
+    else if (a->arg[n].type != (_type_))                                \
+      /* Ambiguous type for positional argument.  */                    \
+      goto error;                                                       \
+  }
+
+  while (*cp != '\0')
+    {
+      CHAR_T c = *cp++;
+      if (c == '%')
+        {
+          size_t arg_index = ARG_NONE;
+          DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */
+
+          /* Initialize the next directive.  */
+          dp->dir_start = cp - 1;
+          dp->flags = 0;
+          dp->width_start = NULL;
+          dp->width_end = NULL;
+          dp->width_arg_index = ARG_NONE;
+          dp->precision_start = NULL;
+          dp->precision_end = NULL;
+          dp->precision_arg_index = ARG_NONE;
+          dp->arg_index = ARG_NONE;
+
+          /* Test for positional argument.  */
+          if (*cp >= '0' && *cp <= '9')
+            {
+              const CHAR_T *np;
+
+              for (np = cp; *np >= '0' && *np <= '9'; np++)
+                ;
+              if (*np == '$')
+                {
+                  size_t n = 0;
+
+                  for (np = cp; *np >= '0' && *np <= '9'; np++)
+                    n = xsum (xtimes (n, 10), *np - '0');
+                  if (n == 0)
+                    /* Positional argument 0.  */
+                    goto error;
+                  if (size_overflow_p (n))
+                    /* n too large, would lead to out of memory later.  */
+                    goto error;
+                  arg_index = n - 1;
+                  cp = np + 1;
+                }
+            }
+
+          /* Read the flags.  */
+          for (;;)
+            {
+              if (*cp == '\'')
+                {
+                  dp->flags |= FLAG_GROUP;
+                  cp++;
+                }
+              else if (*cp == '-')
+                {
+                  dp->flags |= FLAG_LEFT;
+                  cp++;
+                }
+              else if (*cp == '+')
+                {
+                  dp->flags |= FLAG_SHOWSIGN;
+                  cp++;
+                }
+              else if (*cp == ' ')
+                {
+                  dp->flags |= FLAG_SPACE;
+                  cp++;
+                }
+              else if (*cp == '#')
+                {
+                  dp->flags |= FLAG_ALT;
+                  cp++;
+                }
+              else if (*cp == '0')
+                {
+                  dp->flags |= FLAG_ZERO;
+                  cp++;
+                }
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
+              else if (*cp == 'I')
+                {
+                  dp->flags |= FLAG_LOCALIZED;
+                  cp++;
+                }
+#endif
+              else
+                break;
+            }
+
+          /* Parse the field width.  */
+          if (*cp == '*')
+            {
+              dp->width_start = cp;
+              cp++;
+              dp->width_end = cp;
+              if (max_width_length < 1)
+                max_width_length = 1;
+
+              /* Test for positional argument.  */
+              if (*cp >= '0' && *cp <= '9')
+                {
+                  const CHAR_T *np;
+
+                  for (np = cp; *np >= '0' && *np <= '9'; np++)
+                    ;
+                  if (*np == '$')
+                    {
+                      size_t n = 0;
+
+                      for (np = cp; *np >= '0' && *np <= '9'; np++)
+                        n = xsum (xtimes (n, 10), *np - '0');
+                      if (n == 0)
+                        /* Positional argument 0.  */
+                        goto error;
+                      if (size_overflow_p (n))
+                        /* n too large, would lead to out of memory later.  */
+                        goto error;
+                      dp->width_arg_index = n - 1;
+                      cp = np + 1;
+                    }
+                }
+              if (dp->width_arg_index == ARG_NONE)
+                {
+                  dp->width_arg_index = arg_posn++;
+                  if (dp->width_arg_index == ARG_NONE)
+                    /* arg_posn wrapped around.  */
+                    goto error;
+                }
+              REGISTER_ARG (dp->width_arg_index, TYPE_INT);
+            }
+          else if (*cp >= '0' && *cp <= '9')
+            {
+              size_t width_length;
+
+              dp->width_start = cp;
+              for (; *cp >= '0' && *cp <= '9'; cp++)
+                ;
+              dp->width_end = cp;
+              width_length = dp->width_end - dp->width_start;
+              if (max_width_length < width_length)
+                max_width_length = width_length;
+            }
+
+          /* Parse the precision.  */
+          if (*cp == '.')
+            {
+              cp++;
+              if (*cp == '*')
+                {
+                  dp->precision_start = cp - 1;
+                  cp++;
+                  dp->precision_end = cp;
+                  if (max_precision_length < 2)
+                    max_precision_length = 2;
+
+                  /* Test for positional argument.  */
+                  if (*cp >= '0' && *cp <= '9')
+                    {
+                      const CHAR_T *np;
+
+                      for (np = cp; *np >= '0' && *np <= '9'; np++)
+                        ;
+                      if (*np == '$')
+                        {
+                          size_t n = 0;
+
+                          for (np = cp; *np >= '0' && *np <= '9'; np++)
+                            n = xsum (xtimes (n, 10), *np - '0');
+                          if (n == 0)
+                            /* Positional argument 0.  */
+                            goto error;
+                          if (size_overflow_p (n))
+                            /* n too large, would lead to out of memory
+                               later.  */
+                            goto error;
+                          dp->precision_arg_index = n - 1;
+                          cp = np + 1;
+                        }
+                    }
+                  if (dp->precision_arg_index == ARG_NONE)
+                    {
+                      dp->precision_arg_index = arg_posn++;
+                      if (dp->precision_arg_index == ARG_NONE)
+                        /* arg_posn wrapped around.  */
+                        goto error;
+                    }
+                  REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
+                }
+              else
+                {
+                  size_t precision_length;
+
+                  dp->precision_start = cp - 1;
+                  for (; *cp >= '0' && *cp <= '9'; cp++)
+                    ;
+                  dp->precision_end = cp;
+                  precision_length = dp->precision_end - dp->precision_start;
+                  if (max_precision_length < precision_length)
+                    max_precision_length = precision_length;
+                }
+            }
+
+          {
+            arg_type type;
+
+            /* Parse argument type/size specifiers.  */
+            {
+              int flags = 0;
+
+              for (;;)
+                {
+                  if (*cp == 'h')
+                    {
+                      flags |= (1 << (flags & 1));
+                      cp++;
+                    }
+                  else if (*cp == 'L')
+                    {
+                      flags |= 4;
+                      cp++;
+                    }
+                  else if (*cp == 'l')
+                    {
+                      flags += 8;
+                      cp++;
+                    }
+                  else if (*cp == 'j')
+                    {
+                      if (sizeof (intmax_t) > sizeof (long))
+                        {
+                          /* intmax_t = long long */
+                          flags += 16;
+                        }
+                      else if (sizeof (intmax_t) > sizeof (int))
+                        {
+                          /* intmax_t = long */
+                          flags += 8;
+                        }
+                      cp++;
+                    }
+                  else if (*cp == 'z' || *cp == 'Z')
+                    {
+                      /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
+                         because the warning facility in gcc-2.95.2 understands
+                         only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784).  */
+                      if (sizeof (size_t) > sizeof (long))
+                        {
+                          /* size_t = long long */
+                          flags += 16;
+                        }
+                      else if (sizeof (size_t) > sizeof (int))
+                        {
+                          /* size_t = long */
+                          flags += 8;
+                        }
+                      cp++;
+                    }
+                  else if (*cp == 't')
+                    {
+                      if (sizeof (ptrdiff_t) > sizeof (long))
+                        {
+                          /* ptrdiff_t = long long */
+                          flags += 16;
+                        }
+                      else if (sizeof (ptrdiff_t) > sizeof (int))
+                        {
+                          /* ptrdiff_t = long */
+                          flags += 8;
+                        }
+                      cp++;
+                    }
+#if defined __APPLE__ && defined __MACH__
+                  /* On MacOS X 10.3, PRIdMAX is defined as "qd".
+                     We cannot change it to "lld" because PRIdMAX must also
+                     be understood by the system's printf routines.  */
+                  else if (*cp == 'q')
+                    {
+                      if (64 / 8 > sizeof (long))
+                        {
+                          /* int64_t = long long */
+                          flags += 16;
+                        }
+                      else
+                        {
+                          /* int64_t = long */
+                          flags += 8;
+                        }
+                      cp++;
+                    }
+#endif
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+                  /* On native Win32, PRIdMAX is defined as "I64d".
+                     We cannot change it to "lld" because PRIdMAX must also
+                     be understood by the system's printf routines.  */
+                  else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4')
+                    {
+                      if (64 / 8 > sizeof (long))
+                        {
+                          /* __int64 = long long */
+                          flags += 16;
+                        }
+                      else
+                        {
+                          /* __int64 = long */
+                          flags += 8;
+                        }
+                      cp += 3;
+                    }
+#endif
+                  else
+                    break;
+                }
+
+              /* Read the conversion character.  */
+              c = *cp++;
+              switch (c)
+                {
+                case 'd': case 'i':
+#if HAVE_LONG_LONG_INT
+                  /* If 'long long' exists and is larger than 'long':  */
+                  if (flags >= 16 || (flags & 4))
+                    type = TYPE_LONGLONGINT;
+                  else
+#endif
+                  /* If 'long long' exists and is the same as 'long', we parse
+                     "lld" into TYPE_LONGINT.  */
+                  if (flags >= 8)
+                    type = TYPE_LONGINT;
+                  else if (flags & 2)
+                    type = TYPE_SCHAR;
+                  else if (flags & 1)
+                    type = TYPE_SHORT;
+                  else
+                    type = TYPE_INT;
+                  break;
+                case 'o': case 'u': case 'x': case 'X':
+#if HAVE_LONG_LONG_INT
+                  /* If 'long long' exists and is larger than 'long':  */
+                  if (flags >= 16 || (flags & 4))
+                    type = TYPE_ULONGLONGINT;
+                  else
+#endif
+                  /* If 'unsigned long long' exists and is the same as
+                     'unsigned long', we parse "llu" into TYPE_ULONGINT.  */
+                  if (flags >= 8)
+                    type = TYPE_ULONGINT;
+                  else if (flags & 2)
+                    type = TYPE_UCHAR;
+                  else if (flags & 1)
+                    type = TYPE_USHORT;
+                  else
+                    type = TYPE_UINT;
+                  break;
+                case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+                case 'a': case 'A':
+                  if (flags >= 16 || (flags & 4))
+                    type = TYPE_LONGDOUBLE;
+                  else
+                    type = TYPE_DOUBLE;
+                  break;
+                case 'c':
+                  if (flags >= 8)
+#if HAVE_WINT_T
+                    type = TYPE_WIDE_CHAR;
+#else
+                    goto error;
+#endif
+                  else
+                    type = TYPE_CHAR;
+                  break;
+#if HAVE_WINT_T
+                case 'C':
+                  type = TYPE_WIDE_CHAR;
+                  c = 'c';
+                  break;
+#endif
+                case 's':
+                  if (flags >= 8)
+#if HAVE_WCHAR_T
+                    type = TYPE_WIDE_STRING;
+#else
+                    goto error;
+#endif
+                  else
+                    type = TYPE_STRING;
+                  break;
+#if HAVE_WCHAR_T
+                case 'S':
+                  type = TYPE_WIDE_STRING;
+                  c = 's';
+                  break;
+#endif
+                case 'p':
+                  type = TYPE_POINTER;
+                  break;
+                case 'n':
+#if HAVE_LONG_LONG_INT
+                  /* If 'long long' exists and is larger than 'long':  */
+                  if (flags >= 16 || (flags & 4))
+                    type = TYPE_COUNT_LONGLONGINT_POINTER;
+                  else
+#endif
+                  /* If 'long long' exists and is the same as 'long', we parse
+                     "lln" into TYPE_COUNT_LONGINT_POINTER.  */
+                  if (flags >= 8)
+                    type = TYPE_COUNT_LONGINT_POINTER;
+                  else if (flags & 2)
+                    type = TYPE_COUNT_SCHAR_POINTER;
+                  else if (flags & 1)
+                    type = TYPE_COUNT_SHORT_POINTER;
+                  else
+                    type = TYPE_COUNT_INT_POINTER;
+                  break;
+#if ENABLE_UNISTDIO
+                /* The unistdio extensions.  */
+                case 'U':
+                  if (flags >= 16)
+                    type = TYPE_U32_STRING;
+                  else if (flags >= 8)
+                    type = TYPE_U16_STRING;
+                  else
+                    type = TYPE_U8_STRING;
+                  break;
+#endif
+                case '%':
+                  type = TYPE_NONE;
+                  break;
+                default:
+                  /* Unknown conversion character.  */
+                  goto error;
+                }
+            }
+
+            if (type != TYPE_NONE)
+              {
+                dp->arg_index = arg_index;
+                if (dp->arg_index == ARG_NONE)
+                  {
+                    dp->arg_index = arg_posn++;
+                    if (dp->arg_index == ARG_NONE)
+                      /* arg_posn wrapped around.  */
+                      goto error;
+                  }
+                REGISTER_ARG (dp->arg_index, type);
+              }
+            dp->conversion = c;
+            dp->dir_end = cp;
+          }
+
+          d->count++;
+          if (d->count >= d_allocated)
+            {
+              size_t memory_size;
+              DIRECTIVE *memory;
+
+              d_allocated = xtimes (d_allocated, 2);
+              memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
+              if (size_overflow_p (memory_size))
+                /* Overflow, would lead to out of memory.  */
+                goto out_of_memory;
+              memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir
+                                      ? realloc (d->dir, memory_size)
+                                      : malloc (memory_size));
+              if (memory == NULL)
+                /* Out of memory.  */
+                goto out_of_memory;
+              if (d->dir == d->direct_alloc_dir)
+                memcpy (memory, d->dir, d->count * sizeof (DIRECTIVE));
+              d->dir = memory;
+            }
+        }
+#if CHAR_T_ONLY_ASCII
+      else if (!c_isascii (c))
+        {
+          /* Non-ASCII character.  Not supported.  */
+          goto error;
+        }
+#endif
+    }
+  d->dir[d->count].dir_start = cp;
+
+  d->max_width_length = max_width_length;
+  d->max_precision_length = max_precision_length;
+  return 0;
+
+error:
+  if (a->arg != a->direct_alloc_arg)
+    free (a->arg);
+  if (d->dir != d->direct_alloc_dir)
+    free (d->dir);
+  errno = EINVAL;
+  return -1;
+
+out_of_memory:
+  if (a->arg != a->direct_alloc_arg)
+    free (a->arg);
+  if (d->dir != d->direct_alloc_dir)
+    free (d->dir);
+  errno = ENOMEM;
+  return -1;
+}
+
+#undef PRINTF_PARSE
+#undef DIRECTIVES
+#undef DIRECTIVE
+#undef CHAR_T_ONLY_ASCII
+#undef CHAR_T
diff --git a/gnulib/lib/printf-parse.h b/gnulib/lib/printf-parse.h
new file mode 100644 (file)
index 0000000..76e5ba3
--- /dev/null
@@ -0,0 +1,194 @@
+/* Parse printf format string.
+   Copyright (C) 1999, 2002-2003, 2005, 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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _PRINTF_PARSE_H
+#define _PRINTF_PARSE_H
+
+/* This file can be parametrized with the following macros:
+     ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.
+     STATIC             Set to 'static' to declare the function static.  */
+
+#if HAVE_FEATURES_H
+# include <features.h> /* for __GLIBC__, __UCLIBC__ */
+#endif
+
+#include "printf-args.h"
+
+
+/* Flags */
+#define FLAG_GROUP       1      /* ' flag */
+#define FLAG_LEFT        2      /* - flag */
+#define FLAG_SHOWSIGN    4      /* + flag */
+#define FLAG_SPACE       8      /* space flag */
+#define FLAG_ALT        16      /* # flag */
+#define FLAG_ZERO       32
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
+# define FLAG_LOCALIZED 64      /* I flag, uses localized digits */
+#endif
+
+/* arg_index value indicating that no argument is consumed.  */
+#define ARG_NONE        (~(size_t)0)
+
+/* xxx_directive: A parsed directive.
+   xxx_directives: A parsed format string.  */
+
+/* Number of directly allocated directives (no malloc() needed).  */
+#define N_DIRECT_ALLOC_DIRECTIVES 7
+
+/* A parsed directive.  */
+typedef struct
+{
+  const char* dir_start;
+  const char* dir_end;
+  int flags;
+  const char* width_start;
+  const char* width_end;
+  size_t width_arg_index;
+  const char* precision_start;
+  const char* precision_end;
+  size_t precision_arg_index;
+  char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+  size_t arg_index;
+}
+char_directive;
+
+/* A parsed format string.  */
+typedef struct
+{
+  size_t count;
+  char_directive *dir;
+  size_t max_width_length;
+  size_t max_precision_length;
+  char_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES];
+}
+char_directives;
+
+#if ENABLE_UNISTDIO
+
+/* A parsed directive.  */
+typedef struct
+{
+  const uint8_t* dir_start;
+  const uint8_t* dir_end;
+  int flags;
+  const uint8_t* width_start;
+  const uint8_t* width_end;
+  size_t width_arg_index;
+  const uint8_t* precision_start;
+  const uint8_t* precision_end;
+  size_t precision_arg_index;
+  uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+  size_t arg_index;
+}
+u8_directive;
+
+/* A parsed format string.  */
+typedef struct
+{
+  size_t count;
+  u8_directive *dir;
+  size_t max_width_length;
+  size_t max_precision_length;
+  u8_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES];
+}
+u8_directives;
+
+/* A parsed directive.  */
+typedef struct
+{
+  const uint16_t* dir_start;
+  const uint16_t* dir_end;
+  int flags;
+  const uint16_t* width_start;
+  const uint16_t* width_end;
+  size_t width_arg_index;
+  const uint16_t* precision_start;
+  const uint16_t* precision_end;
+  size_t precision_arg_index;
+  uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+  size_t arg_index;
+}
+u16_directive;
+
+/* A parsed format string.  */
+typedef struct
+{
+  size_t count;
+  u16_directive *dir;
+  size_t max_width_length;
+  size_t max_precision_length;
+  u16_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES];
+}
+u16_directives;
+
+/* A parsed directive.  */
+typedef struct
+{
+  const uint32_t* dir_start;
+  const uint32_t* dir_end;
+  int flags;
+  const uint32_t* width_start;
+  const uint32_t* width_end;
+  size_t width_arg_index;
+  const uint32_t* precision_start;
+  const uint32_t* precision_end;
+  size_t precision_arg_index;
+  uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+  size_t arg_index;
+}
+u32_directive;
+
+/* A parsed format string.  */
+typedef struct
+{
+  size_t count;
+  u32_directive *dir;
+  size_t max_width_length;
+  size_t max_precision_length;
+  u32_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES];
+}
+u32_directives;
+
+#endif
+
+
+/* Parses the format string.  Fills in the number N of directives, and fills
+   in directives[0], ..., directives[N-1], and sets directives[N].dir_start
+   to the end of the format string.  Also fills in the arg_type fields of the
+   arguments and the needed count of arguments.  */
+#if ENABLE_UNISTDIO
+extern int
+       ulc_printf_parse (const char *format, char_directives *d, arguments *a);
+extern int
+       u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a);
+extern int
+       u16_printf_parse (const uint16_t *format, u16_directives *d,
+                         arguments *a);
+extern int
+       u32_printf_parse (const uint32_t *format, u32_directives *d,
+                         arguments *a);
+#else
+# ifdef STATIC
+STATIC
+# else
+extern
+# endif
+int printf_parse (const char *format, char_directives *d, arguments *a);
+#endif
+
+#endif /* _PRINTF_PARSE_H */
diff --git a/gnulib/lib/progname.c b/gnulib/lib/progname.c
new file mode 100644 (file)
index 0000000..2465748
--- /dev/null
@@ -0,0 +1,92 @@
+/* Program name management.
+   Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2001.
+
+   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/>.  */
+
+
+#include <config.h>
+
+/* Specification.  */
+#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */
+#include "progname.h"
+
+#include <errno.h> /* get program_invocation_name declaration */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+/* String containing name the program is called with.
+   To be initialized by main().  */
+const char *program_name = NULL;
+
+/* Set program_name, based on argv[0].
+   argv0 must be a string allocated with indefinite extent, and must not be
+   modified after this call.  */
+void
+set_program_name (const char *argv0)
+{
+  /* libtool creates a temporary executable whose name is sometimes prefixed
+     with "lt-" (depends on the platform).  It also makes argv[0] absolute.
+     But the name of the temporary executable is a detail that should not be
+     visible to the end user and to the test suite.
+     Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here.  */
+  const char *slash;
+  const char *base;
+
+  /* Sanity check.  POSIX requires the invoking process to pass a non-NULL
+     argv[0].  */
+  if (argv0 == NULL)
+    {
+      /* It's a bug in the invoking program.  Help diagnosing it.  */
+      fputs ("A NULL argv[0] was passed through an exec system call.\n",
+             stderr);
+      abort ();
+    }
+
+  slash = strrchr (argv0, '/');
+  base = (slash != NULL ? slash + 1 : argv0);
+  if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0)
+    {
+      argv0 = base;
+      if (strncmp (base, "lt-", 3) == 0)
+        {
+          argv0 = base + 3;
+          /* On glibc systems, remove the "lt-" prefix from the variable
+             program_invocation_short_name.  */
+#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+          program_invocation_short_name = (char *) argv0;
+#endif
+        }
+    }
+
+  /* But don't strip off a leading <dirname>/ in general, because when the user
+     runs
+         /some/hidden/place/bin/cp foo foo
+     he should get the error message
+         /some/hidden/place/bin/cp: `foo' and `foo' are the same file
+     not
+         cp: `foo' and `foo' are the same file
+   */
+
+  program_name = argv0;
+
+  /* On glibc systems, the error() function comes from libc and uses the
+     variable program_invocation_name, not program_name.  So set this variable
+     as well.  */
+#if HAVE_DECL_PROGRAM_INVOCATION_NAME
+  program_invocation_name = (char *) argv0;
+#endif
+}
diff --git a/gnulib/lib/progname.h b/gnulib/lib/progname.h
new file mode 100644 (file)
index 0000000..0844066
--- /dev/null
@@ -0,0 +1,62 @@
+/* Program name management.
+   Copyright (C) 2001-2004, 2006, 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2001.
+
+   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 _PROGNAME_H
+#define _PROGNAME_H
+
+/* Programs using this file should do the following in main():
+     set_program_name (argv[0]);
+ */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* String containing name the program is called with.  */
+extern const char *program_name;
+
+/* Set program_name, based on argv[0].
+   argv0 must be a string allocated with indefinite extent, and must not be
+   modified after this call.  */
+extern void set_program_name (const char *argv0);
+
+#if ENABLE_RELOCATABLE
+
+/* Set program_name, based on argv[0], and original installation prefix and
+   directory, for relocatability.  */
+extern void set_program_name_and_installdir (const char *argv0,
+                                             const char *orig_installprefix,
+                                             const char *orig_installdir);
+#undef set_program_name
+#define set_program_name(ARG0) \
+  set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR)
+
+/* Return the full pathname of the current executable, based on the earlier
+   call to set_program_name_and_installdir.  Return NULL if unknown.  */
+extern char *get_full_program_name (void);
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _PROGNAME_H */
diff --git a/gnulib/lib/quote.c b/gnulib/lib/quote.c
new file mode 100644 (file)
index 0000000..1989c8c
--- /dev/null
@@ -0,0 +1,40 @@
+/* quote.c - quote arguments for output
+
+   Copyright (C) 1998-2001, 2003, 2005-2006, 2009-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 Paul Eggert <eggert@twinsun.com> */
+
+#include <config.h>
+
+#include "quotearg.h"
+#include "quote.h"
+
+/* Return an unambiguous printable representation of NAME,
+   allocated in slot N, suitable for diagnostics.  */
+char const *
+quote_n (int n, char const *name)
+{
+  return quotearg_n_style (n, locale_quoting_style, name);
+}
+
+/* Return an unambiguous printable representation of NAME,
+   suitable for diagnostics.  */
+char const *
+quote (char const *name)
+{
+  return quote_n (0, name);
+}
diff --git a/gnulib/lib/quote.h b/gnulib/lib/quote.h
new file mode 100644 (file)
index 0000000..d0acb51
--- /dev/null
@@ -0,0 +1,20 @@
+/* quote.h - prototypes for quote.c
+
+   Copyright (C) 1998-2001, 2003, 2009-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/>.  */
+
+
+char const *quote_n (int n, char const *name);
+char const *quote (char const *name);
diff --git a/gnulib/lib/quotearg.c b/gnulib/lib/quotearg.c
new file mode 100644 (file)
index 0000000..fb49559
--- /dev/null
@@ -0,0 +1,888 @@
+/* quotearg.c - quote arguments for output
+
+   Copyright (C) 1998-2002, 2004-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 Paul Eggert <eggert@twinsun.com> */
+
+#include <config.h>
+
+#include "quotearg.h"
+
+#include "xalloc.h"
+
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+#define INT_BITS (sizeof (int) * CHAR_BIT)
+
+struct quoting_options
+{
+  /* Basic quoting style.  */
+  enum quoting_style style;
+
+  /* Additional flags.  Bitwise combination of enum quoting_flags.  */
+  int flags;
+
+  /* Quote the characters indicated by this bit vector even if the
+     quoting style would not normally require them to be quoted.  */
+  unsigned int quote_these_too[(UCHAR_MAX / INT_BITS) + 1];
+
+  /* The left quote for custom_quoting_style.  */
+  char const *left_quote;
+
+  /* The right quote for custom_quoting_style.  */
+  char const *right_quote;
+};
+
+/* Names of quoting styles.  */
+char const *const quoting_style_args[] =
+{
+  "literal",
+  "shell",
+  "shell-always",
+  "c",
+  "c-maybe",
+  "escape",
+  "locale",
+  "clocale",
+  0
+};
+
+/* Correspondences to quoting style names.  */
+enum quoting_style const quoting_style_vals[] =
+{
+  literal_quoting_style,
+  shell_quoting_style,
+  shell_always_quoting_style,
+  c_quoting_style,
+  c_maybe_quoting_style,
+  escape_quoting_style,
+  locale_quoting_style,
+  clocale_quoting_style
+};
+
+/* The default quoting options.  */
+static struct quoting_options default_quoting_options;
+
+/* Allocate a new set of quoting options, with contents initially identical
+   to O if O is not null, or to the default if O is null.
+   It is the caller's responsibility to free the result.  */
+struct quoting_options *
+clone_quoting_options (struct quoting_options *o)
+{
+  int e = errno;
+  struct quoting_options *p = xmemdup (o ? o : &default_quoting_options,
+                                       sizeof *o);
+  errno = e;
+  return p;
+}
+
+/* Get the value of O's quoting style.  If O is null, use the default.  */
+enum quoting_style
+get_quoting_style (struct quoting_options *o)
+{
+  return (o ? o : &default_quoting_options)->style;
+}
+
+/* In O (or in the default if O is null),
+   set the value of the quoting style to S.  */
+void
+set_quoting_style (struct quoting_options *o, enum quoting_style s)
+{
+  (o ? o : &default_quoting_options)->style = s;
+}
+
+/* In O (or in the default if O is null),
+   set the value of the quoting options for character C to I.
+   Return the old value.  Currently, the only values defined for I are
+   0 (the default) and 1 (which means to quote the character even if
+   it would not otherwise be quoted).  */
+int
+set_char_quoting (struct quoting_options *o, char c, int i)
+{
+  unsigned char uc = c;
+  unsigned int *p =
+    (o ? o : &default_quoting_options)->quote_these_too + uc / INT_BITS;
+  int shift = uc % INT_BITS;
+  int r = (*p >> shift) & 1;
+  *p ^= ((i & 1) ^ r) << shift;
+  return r;
+}
+
+/* In O (or in the default if O is null),
+   set the value of the quoting options flag to I, which can be a
+   bitwise combination of enum quoting_flags, or 0 for default
+   behavior.  Return the old value.  */
+int
+set_quoting_flags (struct quoting_options *o, int i)
+{
+  int r;
+  if (!o)
+    o = &default_quoting_options;
+  r = o->flags;
+  o->flags = i;
+  return r;
+}
+
+void
+set_custom_quoting (struct quoting_options *o,
+                    char const *left_quote, char const *right_quote)
+{
+  if (!o)
+    o = &default_quoting_options;
+  o->style = custom_quoting_style;
+  if (!left_quote || !right_quote)
+    abort ();
+  o->left_quote = left_quote;
+  o->right_quote = right_quote;
+}
+
+/* Return quoting options for STYLE, with no extra quoting.  */
+static struct quoting_options
+quoting_options_from_style (enum quoting_style style)
+{
+  struct quoting_options o;
+  o.style = style;
+  o.flags = 0;
+  memset (o.quote_these_too, 0, sizeof o.quote_these_too);
+  return o;
+}
+
+/* MSGID approximates a quotation mark.  Return its translation if it
+   has one; otherwise, return either it or "\"", depending on S.  */
+static char const *
+gettext_quote (char const *msgid, enum quoting_style s)
+{
+  char const *translation = _(msgid);
+  if (translation == msgid && s == clocale_quoting_style)
+    translation = "\"";
+  return translation;
+}
+
+/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+   argument ARG (of size ARGSIZE), using QUOTING_STYLE, FLAGS, and
+   QUOTE_THESE_TOO to control quoting.
+   Terminate the output with a null character, and return the written
+   size of the output, not counting the terminating null.
+   If BUFFERSIZE is too small to store the output string, return the
+   value that would have been returned had BUFFERSIZE been large enough.
+   If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE.
+
+   This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG,
+   ARGSIZE, O), except it breaks O into its component pieces and is
+   not careful about errno.  */
+
+static size_t
+quotearg_buffer_restyled (char *buffer, size_t buffersize,
+                          char const *arg, size_t argsize,
+                          enum quoting_style quoting_style, int flags,
+                          unsigned int const *quote_these_too,
+                          char const *left_quote,
+                          char const *right_quote)
+{
+  size_t i;
+  size_t len = 0;
+  char const *quote_string = 0;
+  size_t quote_string_len = 0;
+  bool backslash_escapes = false;
+  bool unibyte_locale = MB_CUR_MAX == 1;
+  bool elide_outer_quotes = (flags & QA_ELIDE_OUTER_QUOTES) != 0;
+
+#define STORE(c) \
+    do \
+      { \
+        if (len < buffersize) \
+          buffer[len] = (c); \
+        len++; \
+      } \
+    while (0)
+
+  switch (quoting_style)
+    {
+    case c_maybe_quoting_style:
+      quoting_style = c_quoting_style;
+      elide_outer_quotes = true;
+      /* Fall through.  */
+    case c_quoting_style:
+      if (!elide_outer_quotes)
+        STORE ('"');
+      backslash_escapes = true;
+      quote_string = "\"";
+      quote_string_len = 1;
+      break;
+
+    case escape_quoting_style:
+      backslash_escapes = true;
+      elide_outer_quotes = false;
+      break;
+
+    case locale_quoting_style:
+    case clocale_quoting_style:
+    case custom_quoting_style:
+      {
+        if (quoting_style != custom_quoting_style)
+          {
+            /* TRANSLATORS:
+               Get translations for open and closing quotation marks.
+
+               The message catalog should translate "`" to a left
+               quotation mark suitable for the locale, and similarly for
+               "'".  If the catalog has no translation,
+               locale_quoting_style quotes `like this', and
+               clocale_quoting_style quotes "like this".
+
+               For example, an American English Unicode locale should
+               translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
+               should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
+               MARK).  A British English Unicode locale should instead
+               translate these to U+2018 (LEFT SINGLE QUOTATION MARK)
+               and U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
+
+               If you don't know what to put here, please see
+               <http://en.wikipedia.org/wiki/Quotation_mark#Glyphs>
+               and use glyphs suitable for your language.  */
+            left_quote = gettext_quote (N_("`"), quoting_style);
+            right_quote = gettext_quote (N_("'"), quoting_style);
+          }
+        if (!elide_outer_quotes)
+          for (quote_string = left_quote; *quote_string; quote_string++)
+            STORE (*quote_string);
+        backslash_escapes = true;
+        quote_string = right_quote;
+        quote_string_len = strlen (quote_string);
+      }
+      break;
+
+    case shell_quoting_style:
+      quoting_style = shell_always_quoting_style;
+      elide_outer_quotes = true;
+      /* Fall through.  */
+    case shell_always_quoting_style:
+      if (!elide_outer_quotes)
+        STORE ('\'');
+      quote_string = "'";
+      quote_string_len = 1;
+      break;
+
+    case literal_quoting_style:
+      elide_outer_quotes = false;
+      break;
+
+    default:
+      abort ();
+    }
+
+  for (i = 0;  ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize);  i++)
+    {
+      unsigned char c;
+      unsigned char esc;
+      bool is_right_quote = false;
+
+      if (backslash_escapes
+          && quote_string_len
+          && i + quote_string_len <= argsize
+          && memcmp (arg + i, quote_string, quote_string_len) == 0)
+        {
+          if (elide_outer_quotes)
+            goto force_outer_quoting_style;
+          is_right_quote = true;
+        }
+
+      c = arg[i];
+      switch (c)
+        {
+        case '\0':
+          if (backslash_escapes)
+            {
+              if (elide_outer_quotes)
+                goto force_outer_quoting_style;
+              STORE ('\\');
+              /* If quote_string were to begin with digits, we'd need to
+                 test for the end of the arg as well.  However, it's
+                 hard to imagine any locale that would use digits in
+                 quotes, and set_custom_quoting is documented not to
+                 accept them.  */
+              if (i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9')
+                {
+                  STORE ('0');
+                  STORE ('0');
+                }
+              c = '0';
+              /* We don't have to worry that this last '0' will be
+                 backslash-escaped because, again, quote_string should
+                 not start with it and because quote_these_too is
+                 documented as not accepting it.  */
+            }
+          else if (flags & QA_ELIDE_NULL_BYTES)
+            continue;
+          break;
+
+        case '?':
+          switch (quoting_style)
+            {
+            case shell_always_quoting_style:
+              if (elide_outer_quotes)
+                goto force_outer_quoting_style;
+              break;
+
+            case c_quoting_style:
+              if ((flags & QA_SPLIT_TRIGRAPHS)
+                  && i + 2 < argsize && arg[i + 1] == '?')
+                switch (arg[i + 2])
+                  {
+                  case '!': case '\'':
+                  case '(': case ')': case '-': case '/':
+                  case '<': case '=': case '>':
+                    /* Escape the second '?' in what would otherwise be
+                       a trigraph.  */
+                    if (elide_outer_quotes)
+                      goto force_outer_quoting_style;
+                    c = arg[i + 2];
+                    i += 2;
+                    STORE ('?');
+                    STORE ('"');
+                    STORE ('"');
+                    STORE ('?');
+                    break;
+
+                  default:
+                    break;
+                  }
+              break;
+
+            default:
+              break;
+            }
+          break;
+
+        case '\a': esc = 'a'; goto c_escape;
+        case '\b': esc = 'b'; goto c_escape;
+        case '\f': esc = 'f'; goto c_escape;
+        case '\n': esc = 'n'; goto c_and_shell_escape;
+        case '\r': esc = 'r'; goto c_and_shell_escape;
+        case '\t': esc = 't'; goto c_and_shell_escape;
+        case '\v': esc = 'v'; goto c_escape;
+        case '\\': esc = c;
+          /* No need to escape the escape if we are trying to elide
+             outer quotes and nothing else is problematic.  */
+          if (backslash_escapes && elide_outer_quotes && quote_string_len)
+            goto store_c;
+
+        c_and_shell_escape:
+          if (quoting_style == shell_always_quoting_style
+              && elide_outer_quotes)
+            goto force_outer_quoting_style;
+          /* Fall through.  */
+        c_escape:
+          if (backslash_escapes)
+            {
+              c = esc;
+              goto store_escape;
+            }
+          break;
+
+        case '{': case '}': /* sometimes special if isolated */
+          if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1))
+            break;
+          /* Fall through.  */
+        case '#': case '~':
+          if (i != 0)
+            break;
+          /* Fall through.  */
+        case ' ':
+        case '!': /* special in bash */
+        case '"': case '$': case '&':
+        case '(': case ')': case '*': case ';':
+        case '<':
+        case '=': /* sometimes special in 0th or (with "set -k") later args */
+        case '>': case '[':
+        case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
+        case '`': case '|':
+          /* A shell special character.  In theory, '$' and '`' could
+             be the first bytes of multibyte characters, which means
+             we should check them with mbrtowc, but in practice this
+             doesn't happen so it's not worth worrying about.  */
+          if (quoting_style == shell_always_quoting_style
+              && elide_outer_quotes)
+            goto force_outer_quoting_style;
+          break;
+
+        case '\'':
+          if (quoting_style == shell_always_quoting_style)
+            {
+              if (elide_outer_quotes)
+                goto force_outer_quoting_style;
+              STORE ('\'');
+              STORE ('\\');
+              STORE ('\'');
+            }
+          break;
+
+        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 '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 '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':
+          /* These characters don't cause problems, no matter what the
+             quoting style is.  They cannot start multibyte sequences.
+             A digit or a special letter would cause trouble if it
+             appeared at the beginning of quote_string because we'd then
+             escape by prepending a backslash.  However, it's hard to
+             imagine any locale that would use digits or letters as
+             quotes, and set_custom_quoting is documented not to accept
+             them.  Also, a digit or a special letter would cause
+             trouble if it appeared in quote_these_too, but that's also
+             documented as not accepting them.  */
+          break;
+
+        default:
+          /* If we have a multibyte sequence, copy it until we reach
+             its end, find an error, or come back to the initial shift
+             state.  For C-like styles, if the sequence has
+             unprintable characters, escape the whole sequence, since
+             we can't easily escape single characters within it.  */
+          {
+            /* Length of multibyte sequence found so far.  */
+            size_t m;
+
+            bool printable;
+
+            if (unibyte_locale)
+              {
+                m = 1;
+                printable = isprint (c) != 0;
+              }
+            else
+              {
+                mbstate_t mbstate;
+                memset (&mbstate, 0, sizeof mbstate);
+
+                m = 0;
+                printable = true;
+                if (argsize == SIZE_MAX)
+                  argsize = strlen (arg);
+
+                do
+                  {
+                    wchar_t w;
+                    size_t bytes = mbrtowc (&w, &arg[i + m],
+                                            argsize - (i + m), &mbstate);
+                    if (bytes == 0)
+                      break;
+                    else if (bytes == (size_t) -1)
+                      {
+                        printable = false;
+                        break;
+                      }
+                    else if (bytes == (size_t) -2)
+                      {
+                        printable = false;
+                        while (i + m < argsize && arg[i + m])
+                          m++;
+                        break;
+                      }
+                    else
+                      {
+                        /* Work around a bug with older shells that "see" a '\'
+                           that is really the 2nd byte of a multibyte character.
+                           In practice the problem is limited to ASCII
+                           chars >= '@' that are shell special chars.  */
+                        if ('[' == 0x5b && elide_outer_quotes
+                            && quoting_style == shell_always_quoting_style)
+                          {
+                            size_t j;
+                            for (j = 1; j < bytes; j++)
+                              switch (arg[i + m + j])
+                                {
+                                case '[': case '\\': case '^':
+                                case '`': case '|':
+                                  goto force_outer_quoting_style;
+
+                                default:
+                                  break;
+                                }
+                          }
+
+                        if (! iswprint (w))
+                          printable = false;
+                        m += bytes;
+                      }
+                  }
+                while (! mbsinit (&mbstate));
+              }
+
+            if (1 < m || (backslash_escapes && ! printable))
+              {
+                /* Output a multibyte sequence, or an escaped
+                   unprintable unibyte character.  */
+                size_t ilim = i + m;
+
+                for (;;)
+                  {
+                    if (backslash_escapes && ! printable)
+                      {
+                        if (elide_outer_quotes)
+                          goto force_outer_quoting_style;
+                        STORE ('\\');
+                        STORE ('0' + (c >> 6));
+                        STORE ('0' + ((c >> 3) & 7));
+                        c = '0' + (c & 7);
+                      }
+                    else if (is_right_quote)
+                      {
+                        STORE ('\\');
+                        is_right_quote = false;
+                      }
+                    if (ilim <= i + 1)
+                      break;
+                    STORE (c);
+                    c = arg[++i];
+                  }
+
+                goto store_c;
+              }
+          }
+        }
+
+      if (! ((backslash_escapes || elide_outer_quotes)
+             && quote_these_too
+             && quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))
+          && !is_right_quote)
+        goto store_c;
+
+    store_escape:
+      if (elide_outer_quotes)
+        goto force_outer_quoting_style;
+      STORE ('\\');
+
+    store_c:
+      STORE (c);
+    }
+
+  if (len == 0 && quoting_style == shell_always_quoting_style
+      && elide_outer_quotes)
+    goto force_outer_quoting_style;
+
+  if (quote_string && !elide_outer_quotes)
+    for (; *quote_string; quote_string++)
+      STORE (*quote_string);
+
+  if (len < buffersize)
+    buffer[len] = '\0';
+  return len;
+
+ force_outer_quoting_style:
+  /* Don't reuse quote_these_too, since the addition of outer quotes
+     sufficiently quotes the specified characters.  */
+  return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
+                                   quoting_style,
+                                   flags & ~QA_ELIDE_OUTER_QUOTES, NULL,
+                                   left_quote, right_quote);
+}
+
+/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+   argument ARG (of size ARGSIZE), using O to control quoting.
+   If O is null, use the default.
+   Terminate the output with a null character, and return the written
+   size of the output, not counting the terminating null.
+   If BUFFERSIZE is too small to store the output string, return the
+   value that would have been returned had BUFFERSIZE been large enough.
+   If ARGSIZE is SIZE_MAX, use the string length of the argument for
+   ARGSIZE.  */
+size_t
+quotearg_buffer (char *buffer, size_t buffersize,
+                 char const *arg, size_t argsize,
+                 struct quoting_options const *o)
+{
+  struct quoting_options const *p = o ? o : &default_quoting_options;
+  int e = errno;
+  size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
+                                       p->style, p->flags, p->quote_these_too,
+                                       p->left_quote, p->right_quote);
+  errno = e;
+  return r;
+}
+
+/* Equivalent to quotearg_alloc (ARG, ARGSIZE, NULL, O).  */
+char *
+quotearg_alloc (char const *arg, size_t argsize,
+                struct quoting_options const *o)
+{
+  return quotearg_alloc_mem (arg, argsize, NULL, o);
+}
+
+/* Like quotearg_buffer (..., ARG, ARGSIZE, O), except return newly
+   allocated storage containing the quoted string, and store the
+   resulting size into *SIZE, if non-NULL.  The result can contain
+   embedded null bytes only if ARGSIZE is not SIZE_MAX, SIZE is not
+   NULL, and set_quoting_flags has not set the null byte elision
+   flag.  */
+char *
+quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size,
+                    struct quoting_options const *o)
+{
+  struct quoting_options const *p = o ? o : &default_quoting_options;
+  int e = errno;
+  /* Elide embedded null bytes if we can't return a size.  */
+  int flags = p->flags | (size ? 0 : QA_ELIDE_NULL_BYTES);
+  size_t bufsize = quotearg_buffer_restyled (0, 0, arg, argsize, p->style,
+                                             flags, p->quote_these_too,
+                                             p->left_quote,
+                                             p->right_quote) + 1;
+  char *buf = xcharalloc (bufsize);
+  quotearg_buffer_restyled (buf, bufsize, arg, argsize, p->style, flags,
+                            p->quote_these_too,
+                            p->left_quote, p->right_quote);
+  errno = e;
+  if (size)
+    *size = bufsize - 1;
+  return buf;
+}
+
+/* A storage slot with size and pointer to a value.  */
+struct slotvec
+{
+  size_t size;
+  char *val;
+};
+
+/* Preallocate a slot 0 buffer, so that the caller can always quote
+   one small component of a "memory exhausted" message in slot 0.  */
+static char slot0[256];
+static unsigned int nslots = 1;
+static struct slotvec slotvec0 = {sizeof slot0, slot0};
+static struct slotvec *slotvec = &slotvec0;
+
+void
+quotearg_free (void)
+{
+  struct slotvec *sv = slotvec;
+  unsigned int i;
+  for (i = 1; i < nslots; i++)
+    free (sv[i].val);
+  if (sv[0].val != slot0)
+    {
+      free (sv[0].val);
+      slotvec0.size = sizeof slot0;
+      slotvec0.val = slot0;
+    }
+  if (sv != &slotvec0)
+    {
+      free (sv);
+      slotvec = &slotvec0;
+    }
+  nslots = 1;
+}
+
+/* Use storage slot N to return a quoted version of argument ARG.
+   ARG is of size ARGSIZE, but if that is SIZE_MAX, ARG is a
+   null-terminated string.
+   OPTIONS specifies the quoting options.
+   The returned value points to static storage that can be
+   reused by the next call to this function with the same value of N.
+   N must be nonnegative.  N is deliberately declared with type "int"
+   to allow for future extensions (using negative values).  */
+static char *
+quotearg_n_options (int n, char const *arg, size_t argsize,
+                    struct quoting_options const *options)
+{
+  int e = errno;
+
+  unsigned int n0 = n;
+  struct slotvec *sv = slotvec;
+
+  if (n < 0)
+    abort ();
+
+  if (nslots <= n0)
+    {
+      /* FIXME: technically, the type of n1 should be `unsigned int',
+         but that evokes an unsuppressible warning from gcc-4.0.1 and
+         older.  If gcc ever provides an option to suppress that warning,
+         revert to the original type, so that the test in xalloc_oversized
+         is once again performed only at compile time.  */
+      size_t n1 = n0 + 1;
+      bool preallocated = (sv == &slotvec0);
+
+      if (xalloc_oversized (n1, sizeof *sv))
+        xalloc_die ();
+
+      slotvec = sv = xrealloc (preallocated ? NULL : sv, n1 * sizeof *sv);
+      if (preallocated)
+        *sv = slotvec0;
+      memset (sv + nslots, 0, (n1 - nslots) * sizeof *sv);
+      nslots = n1;
+    }
+
+  {
+    size_t size = sv[n].size;
+    char *val = sv[n].val;
+    /* Elide embedded null bytes since we don't return a size.  */
+    int flags = options->flags | QA_ELIDE_NULL_BYTES;
+    size_t qsize = quotearg_buffer_restyled (val, size, arg, argsize,
+                                             options->style, flags,
+                                             options->quote_these_too,
+                                             options->left_quote,
+                                             options->right_quote);
+
+    if (size <= qsize)
+      {
+        sv[n].size = size = qsize + 1;
+        if (val != slot0)
+          free (val);
+        sv[n].val = val = xcharalloc (size);
+        quotearg_buffer_restyled (val, size, arg, argsize, options->style,
+                                  flags, options->quote_these_too,
+                                  options->left_quote,
+                                  options->right_quote);
+      }
+
+    errno = e;
+    return val;
+  }
+}
+
+char *
+quotearg_n (int n, char const *arg)
+{
+  return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options);
+}
+
+char *
+quotearg_n_mem (int n, char const *arg, size_t argsize)
+{
+  return quotearg_n_options (n, arg, argsize, &default_quoting_options);
+}
+
+char *
+quotearg (char const *arg)
+{
+  return quotearg_n (0, arg);
+}
+
+char *
+quotearg_mem (char const *arg, size_t argsize)
+{
+  return quotearg_n_mem (0, arg, argsize);
+}
+
+char *
+quotearg_n_style (int n, enum quoting_style s, char const *arg)
+{
+  struct quoting_options const o = quoting_options_from_style (s);
+  return quotearg_n_options (n, arg, SIZE_MAX, &o);
+}
+
+char *
+quotearg_n_style_mem (int n, enum quoting_style s,
+                      char const *arg, size_t argsize)
+{
+  struct quoting_options const o = quoting_options_from_style (s);
+  return quotearg_n_options (n, arg, argsize, &o);
+}
+
+char *
+quotearg_style (enum quoting_style s, char const *arg)
+{
+  return quotearg_n_style (0, s, arg);
+}
+
+char *
+quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize)
+{
+  return quotearg_n_style_mem (0, s, arg, argsize);
+}
+
+char *
+quotearg_char_mem (char const *arg, size_t argsize, char ch)
+{
+  struct quoting_options options;
+  options = default_quoting_options;
+  set_char_quoting (&options, ch, 1);
+  return quotearg_n_options (0, arg, argsize, &options);
+}
+
+char *
+quotearg_char (char const *arg, char ch)
+{
+  return quotearg_char_mem (arg, SIZE_MAX, ch);
+}
+
+char *
+quotearg_colon (char const *arg)
+{
+  return quotearg_char (arg, ':');
+}
+
+char *
+quotearg_colon_mem (char const *arg, size_t argsize)
+{
+  return quotearg_char_mem (arg, argsize, ':');
+}
+
+char *
+quotearg_n_custom (int n, char const *left_quote,
+                   char const *right_quote, char const *arg)
+{
+  return quotearg_n_custom_mem (n, left_quote, right_quote, arg,
+                                SIZE_MAX);
+}
+
+char *
+quotearg_n_custom_mem (int n, char const *left_quote,
+                       char const *right_quote,
+                       char const *arg, size_t argsize)
+{
+  struct quoting_options o = default_quoting_options;
+  set_custom_quoting (&o, left_quote, right_quote);
+  return quotearg_n_options (n, arg, argsize, &o);
+}
+
+char *
+quotearg_custom (char const *left_quote, char const *right_quote,
+                 char const *arg)
+{
+  return quotearg_n_custom (0, left_quote, right_quote, arg);
+}
+
+char *
+quotearg_custom_mem (char const *left_quote, char const *right_quote,
+                     char const *arg, size_t argsize)
+{
+  return quotearg_n_custom_mem (0, left_quote, right_quote, arg,
+                                argsize);
+}
diff --git a/gnulib/lib/quotearg.h b/gnulib/lib/quotearg.h
new file mode 100644 (file)
index 0000000..2756d76
--- /dev/null
@@ -0,0 +1,389 @@
+/* quotearg.h - quote arguments for output
+
+   Copyright (C) 1998-2002, 2004, 2006, 2008-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 Paul Eggert <eggert@twinsun.com> */
+
+#ifndef QUOTEARG_H_
+# define QUOTEARG_H_ 1
+
+# include <stddef.h>
+
+/* Basic quoting styles.  For each style, an example is given on the
+   input strings "simple", "\0 \t\n'\"\033?""?/\\", and "a:b", using
+   quotearg_buffer, quotearg_mem, and quotearg_colon_mem with that
+   style and the default flags and quoted characters.  Note that the
+   examples are shown here as valid C strings rather than what
+   displays on a terminal (with "??/" as a trigraph for "\\").  */
+enum quoting_style
+  {
+    /* Output names as-is (ls --quoting-style=literal).  Can result in
+       embedded null bytes if QA_ELIDE_NULL_BYTES is not in
+       effect.
+
+       quotearg_buffer:
+       "simple", "\0 \t\n'\"\033??/\\", "a:b"
+       quotearg:
+       "simple", " \t\n'\"\033??/\\", "a:b"
+       quotearg_colon:
+       "simple", " \t\n'\"\033??/\\", "a:b"
+    */
+    literal_quoting_style,
+
+    /* Quote names for the shell if they contain shell metacharacters
+       or would cause ambiguous output (ls --quoting-style=shell).
+       Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not
+       in effect.
+
+       quotearg_buffer:
+       "simple", "'\0 \t\n'\\''\"\033??/\\'", "a:b"
+       quotearg:
+       "simple", "' \t\n'\\''\"\033??/\\'", "a:b"
+       quotearg_colon:
+       "simple", "' \t\n'\\''\"\033??/\\'", "'a:b'"
+    */
+    shell_quoting_style,
+
+    /* Quote names for the shell, even if they would normally not
+       require quoting (ls --quoting-style=shell-always).  Can result
+       in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect.
+       Behaves like shell_quoting_style if QA_ELIDE_OUTER_QUOTES is in
+       effect.
+
+       quotearg_buffer:
+       "'simple'", "'\0 \t\n'\\''\"\033??/\\'", "'a:b'"
+       quotearg:
+       "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'"
+       quotearg_colon:
+       "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'"
+    */
+    shell_always_quoting_style,
+
+    /* Quote names as for a C language string (ls --quoting-style=c).
+       Behaves like c_maybe_quoting_style if QA_ELIDE_OUTER_QUOTES is
+       in effect.  Split into consecutive strings if
+       QA_SPLIT_TRIGRAPHS.
+
+       quotearg_buffer:
+       "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+       quotearg:
+       "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+       quotearg_colon:
+       "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\""
+    */
+    c_quoting_style,
+
+    /* Like c_quoting_style except omit the surrounding double-quote
+       characters if no quoted characters are encountered.
+
+       quotearg_buffer:
+       "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b"
+       quotearg:
+       "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b"
+       quotearg_colon:
+       "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+    */
+    c_maybe_quoting_style,
+
+    /* Like c_quoting_style except always omit the surrounding
+       double-quote characters and ignore QA_SPLIT_TRIGRAPHS
+       (ls --quoting-style=escape).
+
+       quotearg_buffer:
+       "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b"
+       quotearg:
+       "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b"
+       quotearg_colon:
+       "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a\\:b"
+    */
+    escape_quoting_style,
+
+    /* Like clocale_quoting_style, but quote `like this' instead of
+       "like this" in the default C locale (ls --quoting-style=locale).
+
+       LC_MESSAGES=C
+       quotearg_buffer:
+       "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'"
+       quotearg:
+       "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'"
+       quotearg_colon:
+       "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a\\:b'"
+
+       LC_MESSAGES=pt_PT.utf8
+       quotearg_buffer:
+       "\302\253simple\302\273",
+       "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+       quotearg:
+       "\302\253simple\302\273",
+       "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+       quotearg_colon:
+       "\302\253simple\302\273",
+       "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273"
+    */
+    locale_quoting_style,
+
+    /* Like c_quoting_style except use quotation marks appropriate for
+       the locale and ignore QA_SPLIT_TRIGRAPHS
+       (ls --quoting-style=clocale).
+
+       LC_MESSAGES=C
+       quotearg_buffer:
+       "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+       quotearg:
+       "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+       quotearg_colon:
+       "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\""
+
+       LC_MESSAGES=pt_PT.utf8
+       quotearg_buffer:
+       "\302\253simple\302\273",
+       "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+       quotearg:
+       "\302\253simple\302\273",
+       "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+       quotearg_colon:
+       "\302\253simple\302\273",
+       "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273"
+    */
+    clocale_quoting_style,
+
+    /* Like clocale_quoting_style except use the custom quotation marks
+       set by set_custom_quoting.  If custom quotation marks are not
+       set, the behavior is undefined.
+
+       left_quote = right_quote = "'"
+       quotearg_buffer:
+       "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'"
+       quotearg:
+       "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'"
+       quotearg_colon:
+       "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a\\:b'"
+
+       left_quote = "(" and right_quote = ")"
+       quotearg_buffer:
+       "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)"
+       quotearg:
+       "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)"
+       quotearg_colon:
+       "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a\\:b)"
+
+       left_quote = ":" and right_quote = " "
+       quotearg_buffer:
+       ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b "
+       quotearg:
+       ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b "
+       quotearg_colon:
+       ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a\\:b "
+
+       left_quote = "\"'" and right_quote = "'\""
+       Notice that this is treated as a single level of quotes or two
+       levels where the outer quote need not be escaped within the inner
+       quotes.  For two levels where the outer quote must be escaped
+       within the inner quotes, you must use separate quotearg
+       invocations.
+       quotearg_buffer:
+       "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\""
+       quotearg:
+       "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\""
+       quotearg_colon:
+       "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a\\:b'\""
+    */
+    custom_quoting_style
+  };
+
+/* Flags for use in set_quoting_flags.  */
+enum quoting_flags
+  {
+    /* Always elide null bytes from styles that do not quote them,
+       even when the length of the result is available to the
+       caller.  */
+    QA_ELIDE_NULL_BYTES = 0x01,
+
+    /* Omit the surrounding quote characters if no escaped characters
+       are encountered.  Note that if no other character needs
+       escaping, then neither does the escape character.  */
+    QA_ELIDE_OUTER_QUOTES = 0x02,
+
+    /* In the c_quoting_style and c_maybe_quoting_style, split ANSI
+       trigraph sequences into concatenated strings (for example,
+       "?""?/" rather than "??/", which could be confused with
+       "\\").  */
+    QA_SPLIT_TRIGRAPHS = 0x04
+  };
+
+/* For now, --quoting-style=literal is the default, but this may change.  */
+# ifndef DEFAULT_QUOTING_STYLE
+#  define DEFAULT_QUOTING_STYLE literal_quoting_style
+# endif
+
+/* Names of quoting styles and their corresponding values.  */
+extern char const *const quoting_style_args[];
+extern enum quoting_style const quoting_style_vals[];
+
+struct quoting_options;
+
+/* The functions listed below set and use a hidden variable
+   that contains the default quoting style options.  */
+
+/* Allocate a new set of quoting options, with contents initially identical
+   to O if O is not null, or to the default if O is null.
+   It is the caller's responsibility to free the result.  */
+struct quoting_options *clone_quoting_options (struct quoting_options *o);
+
+/* Get the value of O's quoting style.  If O is null, use the default.  */
+enum quoting_style get_quoting_style (struct quoting_options *o);
+
+/* In O (or in the default if O is null),
+   set the value of the quoting style to S.  */
+void set_quoting_style (struct quoting_options *o, enum quoting_style s);
+
+/* In O (or in the default if O is null),
+   set the value of the quoting options for character C to I.
+   Return the old value.  Currently, the only values defined for I are
+   0 (the default) and 1 (which means to quote the character even if
+   it would not otherwise be quoted).  C must never be a digit or a
+   letter that has special meaning after a backslash (for example, "\t"
+   for tab).  */
+int set_char_quoting (struct quoting_options *o, char c, int i);
+
+/* In O (or in the default if O is null),
+   set the value of the quoting options flag to I, which can be a
+   bitwise combination of enum quoting_flags, or 0 for default
+   behavior.  Return the old value.  */
+int set_quoting_flags (struct quoting_options *o, int i);
+
+/* In O (or in the default if O is null),
+   set the value of the quoting style to custom_quoting_style,
+   set the left quote to LEFT_QUOTE, and set the right quote to
+   RIGHT_QUOTE.  Each of LEFT_QUOTE and RIGHT_QUOTE must be
+   null-terminated and can be the empty string.  Because backslashes are
+   used for escaping, it does not make sense for RIGHT_QUOTE to contain
+   a backslash.  RIGHT_QUOTE must not begin with a digit or a letter
+   that has special meaning after a backslash (for example, "\t" for
+   tab).  */
+void set_custom_quoting (struct quoting_options *o,
+                         char const *left_quote,
+                         char const *right_quote);
+
+/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+   argument ARG (of size ARGSIZE), using O to control quoting.
+   If O is null, use the default.
+   Terminate the output with a null character, and return the written
+   size of the output, not counting the terminating null.
+   If BUFFERSIZE is too small to store the output string, return the
+   value that would have been returned had BUFFERSIZE been large enough.
+   If ARGSIZE is -1, use the string length of the argument for ARGSIZE.
+   On output, BUFFER might contain embedded null bytes if ARGSIZE was
+   not -1, the style of O does not use backslash escapes, and the
+   flags of O do not request elision of null bytes.*/
+size_t quotearg_buffer (char *buffer, size_t buffersize,
+                        char const *arg, size_t argsize,
+                        struct quoting_options const *o);
+
+/* Like quotearg_buffer, except return the result in a newly allocated
+   buffer.  It is the caller's responsibility to free the result.  The
+   result will not contain embedded null bytes.  */
+char *quotearg_alloc (char const *arg, size_t argsize,
+                      struct quoting_options const *o);
+
+/* Like quotearg_alloc, except that the length of the result,
+   excluding the terminating null byte, is stored into SIZE if it is
+   non-NULL.  The result might contain embedded null bytes if ARGSIZE
+   was not -1, SIZE was not NULL, the style of O does not use
+   backslash escapes, and the flags of O do not request elision of
+   null bytes.*/
+char *quotearg_alloc_mem (char const *arg, size_t argsize,
+                          size_t *size, struct quoting_options const *o);
+
+/* Use storage slot N to return a quoted version of the string ARG.
+   Use the default quoting options.
+   The returned value points to static storage that can be
+   reused by the next call to this function with the same value of N.
+   N must be nonnegative.  The output of all functions in the
+   quotearg_n family are guaranteed to not contain embedded null
+   bytes.*/
+char *quotearg_n (int n, char const *arg);
+
+/* Equivalent to quotearg_n (0, ARG).  */
+char *quotearg (char const *arg);
+
+/* Use storage slot N to return a quoted version of the argument ARG
+   of size ARGSIZE.  This is like quotearg_n (N, ARG), except it can
+   quote null bytes.  */
+char *quotearg_n_mem (int n, char const *arg, size_t argsize);
+
+/* Equivalent to quotearg_n_mem (0, ARG, ARGSIZE).  */
+char *quotearg_mem (char const *arg, size_t argsize);
+
+/* Use style S and storage slot N to return a quoted version of the string ARG.
+   This is like quotearg_n (N, ARG), except that it uses S with no other
+   options to specify the quoting method.  */
+char *quotearg_n_style (int n, enum quoting_style s, char const *arg);
+
+/* Use style S and storage slot N to return a quoted version of the
+   argument ARG of size ARGSIZE.  This is like quotearg_n_style
+   (N, S, ARG), except it can quote null bytes.  */
+char *quotearg_n_style_mem (int n, enum quoting_style s,
+                            char const *arg, size_t argsize);
+
+/* Equivalent to quotearg_n_style (0, S, ARG).  */
+char *quotearg_style (enum quoting_style s, char const *arg);
+
+/* Equivalent to quotearg_n_style_mem (0, S, ARG, ARGSIZE).  */
+char *quotearg_style_mem (enum quoting_style s,
+                          char const *arg, size_t argsize);
+
+/* Like quotearg (ARG), except also quote any instances of CH.
+   See set_char_quoting for a description of acceptable CH values.  */
+char *quotearg_char (char const *arg, char ch);
+
+/* Like quotearg_char (ARG, CH), except it can quote null bytes.  */
+char *quotearg_char_mem (char const *arg, size_t argsize, char ch);
+
+/* Equivalent to quotearg_char (ARG, ':').  */
+char *quotearg_colon (char const *arg);
+
+/* Like quotearg_colon (ARG), except it can quote null bytes.  */
+char *quotearg_colon_mem (char const *arg, size_t argsize);
+
+/* Like quotearg_n_style (N, S, ARG) but with S as custom_quoting_style
+   with left quote as LEFT_QUOTE and right quote as RIGHT_QUOTE.  See
+   set_custom_quoting for a description of acceptable LEFT_QUOTE and
+   RIGHT_QUOTE values.  */
+char *quotearg_n_custom (int n, char const *left_quote,
+                         char const *right_quote, char const *arg);
+
+/* Like quotearg_n_custom (N, LEFT_QUOTE, RIGHT_QUOTE, ARG) except it
+   can quote null bytes.  */
+char *quotearg_n_custom_mem (int n, char const *left_quote,
+                             char const *right_quote,
+                             char const *arg, size_t argsize);
+
+/* Equivalent to quotearg_n_custom (0, LEFT_QUOTE, RIGHT_QUOTE, ARG).  */
+char *quotearg_custom (char const *left_quote, char const *right_quote,
+                       char const *arg);
+
+/* Equivalent to quotearg_n_custom_mem (0, LEFT_QUOTE, RIGHT_QUOTE, ARG,
+                                        ARGSIZE).  */
+char *quotearg_custom_mem (char const *left_quote,
+                           char const *right_quote,
+                           char const *arg, size_t argsize);
+
+/* Free any dynamically allocated memory.  */
+void quotearg_free (void);
+
+#endif /* !QUOTEARG_H_ */
diff --git a/gnulib/lib/readlink.c b/gnulib/lib/readlink.c
new file mode 100644 (file)
index 0000000..35d045b
--- /dev/null
@@ -0,0 +1,74 @@
+/* Stub for readlink().
+   Copyright (C) 2003-2007, 2009-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#if !HAVE_READLINK
+
+/* readlink() substitute for systems that don't have a readlink() function,
+   such as DJGPP 2.03 and mingw32.  */
+
+ssize_t
+readlink (const char *name, char *buf _GL_UNUSED,
+          size_t bufsize _GL_UNUSED)
+{
+  struct stat statbuf;
+
+  /* In general we should use lstat() here, not stat().  But on platforms
+     without symbolic links, lstat() - if it exists - would be equivalent to
+     stat(), therefore we can use stat().  This saves us a configure check.  */
+  if (stat (name, &statbuf) >= 0)
+    errno = EINVAL;
+  return -1;
+}
+
+#else /* HAVE_READLINK */
+
+# undef readlink
+
+/* readlink() wrapper that uses correct types, for systems like cygwin
+   1.5.x where readlink returns int, and which rejects trailing slash,
+   for Solaris 9.  */
+
+ssize_t
+rpl_readlink (const char *name, char *buf, size_t bufsize)
+{
+# if READLINK_TRAILING_SLASH_BUG
+  size_t len = strlen (name);
+  if (len && name[len - 1] == '/')
+    {
+      /* Even if name without the slash is a symlink to a directory,
+         both lstat() and stat() must resolve the trailing slash to
+         the directory rather than the symlink.  We can therefore
+         safely use stat() to distinguish between EINVAL and
+         ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat().  */
+      struct stat st;
+      if (stat (name, &st) == 0)
+        errno = EINVAL;
+      return -1;
+    }
+# endif /* READLINK_TRAILING_SLASH_BUG */
+  return readlink (name, buf, bufsize);
+}
+
+#endif /* HAVE_READLINK */
diff --git a/gnulib/lib/readlinkat.c b/gnulib/lib/readlinkat.c
new file mode 100644 (file)
index 0000000..63d0378
--- /dev/null
@@ -0,0 +1,47 @@
+/* Read a symlink relative to an open directory.
+   Copyright (C) 2009-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 Eric Blake */
+
+#include <config.h>
+
+#include <unistd.h>
+
+/* Gnulib provides a readlink stub for mingw; use it for distinction
+   between EINVAL and ENOENT, rather than always failing with ENOSYS.  */
+
+/* POSIX 2008 says that unlike readlink, readlinkat returns 0 for
+   success instead of the buffer length.  But this would render
+   readlinkat worthless since readlink does not guarantee a
+   NUL-terminated buffer.  Assume this was a bug in POSIX.  */
+
+/* Read the contents of symlink FILE into buffer BUF of size LEN, in the
+   directory open on descriptor FD.  If possible, do it without changing
+   the working directory.  Otherwise, resort to using save_cwd/fchdir,
+   then readlink/restore_cwd.  If either the save_cwd or the restore_cwd
+   fails, then give a diagnostic and exit nonzero.  */
+
+#define AT_FUNC_NAME readlinkat
+#define AT_FUNC_F1 readlink
+#define AT_FUNC_POST_FILE_PARAM_DECLS , char *buf, size_t len
+#define AT_FUNC_POST_FILE_ARGS        , buf, len
+#define AT_FUNC_RESULT ssize_t
+#include "at-func.c"
+#undef AT_FUNC_NAME
+#undef AT_FUNC_F1
+#undef AT_FUNC_POST_FILE_PARAM_DECLS
+#undef AT_FUNC_POST_FILE_ARGS
+#undef AT_FUNC_RESULT
diff --git a/gnulib/lib/realloc.c b/gnulib/lib/realloc.c
new file mode 100644 (file)
index 0000000..6ef37e7
--- /dev/null
@@ -0,0 +1,91 @@
+/* realloc() function that is glibc compatible.
+
+   Copyright (C) 1997, 2003-2004, 2006-2007, 2009-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 Jim Meyering and Bruno Haible */
+
+#include <config.h>
+
+/* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h.  */
+#ifdef realloc
+# define NEED_REALLOC_GNU 1
+/* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU.  */
+#elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU
+# define NEED_REALLOC_GNU 1
+#endif
+
+/* Infer the properties of the system's malloc function.
+   The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU.  */
+#if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU
+# define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1
+#endif
+
+/* Below we want to call the system's malloc and realloc.
+   Undefine the symbols here so that including <stdlib.h> provides a
+   declaration of malloc(), not of rpl_malloc(), and likewise for realloc.  */
+#undef malloc
+#undef realloc
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <errno.h>
+
+/* Below we want to call the system's malloc and realloc.
+   Undefine the symbols, if they were defined by gnulib's <stdlib.h>
+   replacement.  */
+#undef malloc
+#undef realloc
+
+/* Change the size of an allocated block of memory P to N bytes,
+   with error checking.  If N is zero, change it to 1.  If P is NULL,
+   use malloc.  */
+
+void *
+rpl_realloc (void *p, size_t n)
+{
+  void *result;
+
+#if NEED_REALLOC_GNU
+  if (n == 0)
+    {
+      n = 1;
+
+      /* In theory realloc might fail, so don't rely on it to free.  */
+      free (p);
+      p = NULL;
+    }
+#endif
+
+  if (p == NULL)
+    {
+#if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE
+      if (n == 0)
+        n = 1;
+#endif
+      result = malloc (n);
+    }
+  else
+    result = realloc (p, n);
+
+#if !HAVE_REALLOC_POSIX
+  if (result == NULL)
+    errno = ENOMEM;
+#endif
+
+  return result;
+}
diff --git a/gnulib/lib/ref-add.sin b/gnulib/lib/ref-add.sin
new file mode 100644 (file)
index 0000000..a57eaef
--- /dev/null
@@ -0,0 +1,30 @@
+# Add this package to a list of references stored in a text file.
+#
+#   Copyright (C) 2000, 2009-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, 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, write to the Free Software Foundation,
+#   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+  s/# Packages using this file://
+  ta
+  :a
+  s/ @PACKAGE@ / @PACKAGE@ /
+  tb
+  s/ $/ @PACKAGE@ /
+  :b
+  s/^/# Packages using this file:/
+}
diff --git a/gnulib/lib/ref-del.sin b/gnulib/lib/ref-del.sin
new file mode 100644 (file)
index 0000000..e23097d
--- /dev/null
@@ -0,0 +1,25 @@
+# Remove this package from a list of references stored in a text file.
+#
+#   Copyright (C) 2000, 2009-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, 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, write to the Free Software Foundation,
+#   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+  s/# Packages using this file://
+  s/ @PACKAGE@ / /
+  s/^/# Packages using this file:/
+}
diff --git a/gnulib/lib/regcomp.c b/gnulib/lib/regcomp.c
new file mode 100644 (file)
index 0000000..747fa40
--- /dev/null
@@ -0,0 +1,3876 @@
+/* Extended regular expression matching and search library.
+   Copyright (C) 2002-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
+                                         size_t length, reg_syntax_t syntax);
+static void re_compile_fastmap_iter (regex_t *bufp,
+                                    const re_dfastate_t *init_state,
+                                    char *fastmap);
+static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len);
+#ifdef RE_ENABLE_I18N
+static void free_charset (re_charset_t *cset);
+#endif /* RE_ENABLE_I18N */
+static void free_workarea_compile (regex_t *preg);
+static reg_errcode_t create_initial_state (re_dfa_t *dfa);
+#ifdef RE_ENABLE_I18N
+static void optimize_utf8 (re_dfa_t *dfa);
+#endif
+static reg_errcode_t analyze (regex_t *preg);
+static reg_errcode_t preorder (bin_tree_t *root,
+                              reg_errcode_t (fn (void *, bin_tree_t *)),
+                              void *extra);
+static reg_errcode_t postorder (bin_tree_t *root,
+                               reg_errcode_t (fn (void *, bin_tree_t *)),
+                               void *extra);
+static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node);
+static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node);
+static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg,
+                                bin_tree_t *node);
+static reg_errcode_t calc_first (void *extra, bin_tree_t *node);
+static reg_errcode_t calc_next (void *extra, bin_tree_t *node);
+static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node);
+static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint);
+static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node,
+                                  unsigned int constraint);
+static reg_errcode_t calc_eclosure (re_dfa_t *dfa);
+static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa,
+                                        Idx node, bool root);
+static reg_errcode_t calc_inveclosure (re_dfa_t *dfa);
+static Idx fetch_number (re_string_t *input, re_token_t *token,
+                        reg_syntax_t syntax);
+static int peek_token (re_token_t *token, re_string_t *input,
+                       reg_syntax_t syntax) internal_function;
+static bin_tree_t *parse (re_string_t *regexp, regex_t *preg,
+                         reg_syntax_t syntax, reg_errcode_t *err);
+static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg,
+                                 re_token_t *token, reg_syntax_t syntax,
+                                 Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg,
+                                re_token_t *token, reg_syntax_t syntax,
+                                Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg,
+                                    re_token_t *token, reg_syntax_t syntax,
+                                    Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg,
+                                 re_token_t *token, reg_syntax_t syntax,
+                                 Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp,
+                                re_dfa_t *dfa, re_token_t *token,
+                                reg_syntax_t syntax, reg_errcode_t *err);
+static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa,
+                                     re_token_t *token, reg_syntax_t syntax,
+                                     reg_errcode_t *err);
+static reg_errcode_t parse_bracket_element (bracket_elem_t *elem,
+                                           re_string_t *regexp,
+                                           re_token_t *token, int token_len,
+                                           re_dfa_t *dfa,
+                                           reg_syntax_t syntax,
+                                           bool accept_hyphen);
+static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem,
+                                         re_string_t *regexp,
+                                         re_token_t *token);
+#ifdef RE_ENABLE_I18N
+static reg_errcode_t build_equiv_class (bitset_t sbcset,
+                                       re_charset_t *mbcset,
+                                       Idx *equiv_class_alloc,
+                                       const unsigned char *name);
+static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
+                                     bitset_t sbcset,
+                                     re_charset_t *mbcset,
+                                     Idx *char_class_alloc,
+                                     const unsigned char *class_name,
+                                     reg_syntax_t syntax);
+#else  /* not RE_ENABLE_I18N */
+static reg_errcode_t build_equiv_class (bitset_t sbcset,
+                                       const unsigned char *name);
+static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
+                                     bitset_t sbcset,
+                                     const unsigned char *class_name,
+                                     reg_syntax_t syntax);
+#endif /* not RE_ENABLE_I18N */
+static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
+                                      RE_TRANSLATE_TYPE trans,
+                                      const unsigned char *class_name,
+                                      const unsigned char *extra,
+                                      bool non_match, reg_errcode_t *err);
+static bin_tree_t *create_tree (re_dfa_t *dfa,
+                               bin_tree_t *left, bin_tree_t *right,
+                               re_token_type_t type);
+static bin_tree_t *create_token_tree (re_dfa_t *dfa,
+                                     bin_tree_t *left, bin_tree_t *right,
+                                     const re_token_t *token);
+static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa);
+static void free_token (re_token_t *node);
+static reg_errcode_t free_tree (void *extra, bin_tree_t *node);
+static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node);
+\f
+/* This table gives an error message for each of the error codes listed
+   in regex.h.  Obviously the order here has to be same as there.
+   POSIX doesn't require that we do anything for REG_NOERROR,
+   but why not be nice?  */
+
+static const char __re_error_msgid[] =
+  {
+#define REG_NOERROR_IDX        0
+    gettext_noop ("Success")   /* REG_NOERROR */
+    "\0"
+#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success")
+    gettext_noop ("No match")  /* REG_NOMATCH */
+    "\0"
+#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match")
+    gettext_noop ("Invalid regular expression") /* REG_BADPAT */
+    "\0"
+#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression")
+    gettext_noop ("Invalid collation character") /* REG_ECOLLATE */
+    "\0"
+#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character")
+    gettext_noop ("Invalid character class name") /* REG_ECTYPE */
+    "\0"
+#define REG_EESCAPE_IDX        (REG_ECTYPE_IDX + sizeof "Invalid character class name")
+    gettext_noop ("Trailing backslash") /* REG_EESCAPE */
+    "\0"
+#define REG_ESUBREG_IDX        (REG_EESCAPE_IDX + sizeof "Trailing backslash")
+    gettext_noop ("Invalid back reference") /* REG_ESUBREG */
+    "\0"
+#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
+    gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
+    "\0"
+#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
+    gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
+    "\0"
+#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
+    gettext_noop ("Unmatched \\{") /* REG_EBRACE */
+    "\0"
+#define REG_BADBR_IDX  (REG_EBRACE_IDX + sizeof "Unmatched \\{")
+    gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */
+    "\0"
+#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}")
+    gettext_noop ("Invalid range end") /* REG_ERANGE */
+    "\0"
+#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end")
+    gettext_noop ("Memory exhausted") /* REG_ESPACE */
+    "\0"
+#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted")
+    gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */
+    "\0"
+#define REG_EEND_IDX   (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression")
+    gettext_noop ("Premature end of regular expression") /* REG_EEND */
+    "\0"
+#define REG_ESIZE_IDX  (REG_EEND_IDX + sizeof "Premature end of regular expression")
+    gettext_noop ("Regular expression too big") /* REG_ESIZE */
+    "\0"
+#define REG_ERPAREN_IDX        (REG_ESIZE_IDX + sizeof "Regular expression too big")
+    gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
+  };
+
+static const size_t __re_error_msgid_idx[] =
+  {
+    REG_NOERROR_IDX,
+    REG_NOMATCH_IDX,
+    REG_BADPAT_IDX,
+    REG_ECOLLATE_IDX,
+    REG_ECTYPE_IDX,
+    REG_EESCAPE_IDX,
+    REG_ESUBREG_IDX,
+    REG_EBRACK_IDX,
+    REG_EPAREN_IDX,
+    REG_EBRACE_IDX,
+    REG_BADBR_IDX,
+    REG_ERANGE_IDX,
+    REG_ESPACE_IDX,
+    REG_BADRPT_IDX,
+    REG_EEND_IDX,
+    REG_ESIZE_IDX,
+    REG_ERPAREN_IDX
+  };
+\f
+/* Entry points for GNU code.  */
+
+/* re_compile_pattern is the GNU regular expression compiler: it
+   compiles PATTERN (of length LENGTH) and puts the result in BUFP.
+   Returns 0 if the pattern was valid, otherwise an error string.
+
+   Assumes the `allocated' (and perhaps `buffer') and `translate' fields
+   are set in BUFP on entry.  */
+
+#ifdef _LIBC
+const char *
+re_compile_pattern (pattern, length, bufp)
+    const char *pattern;
+    size_t length;
+    struct re_pattern_buffer *bufp;
+#else /* size_t might promote */
+const char *
+re_compile_pattern (const char *pattern, size_t length,
+                   struct re_pattern_buffer *bufp)
+#endif
+{
+  reg_errcode_t ret;
+
+  /* And GNU code determines whether or not to get register information
+     by passing null for the REGS argument to re_match, etc., not by
+     setting no_sub, unless RE_NO_SUB is set.  */
+  bufp->no_sub = !!(re_syntax_options & RE_NO_SUB);
+
+  /* Match anchors at newline.  */
+  bufp->newline_anchor = 1;
+
+  ret = re_compile_internal (bufp, pattern, length, re_syntax_options);
+
+  if (!ret)
+    return NULL;
+  return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
+}
+#ifdef _LIBC
+weak_alias (__re_compile_pattern, re_compile_pattern)
+#endif
+
+/* Set by `re_set_syntax' to the current regexp syntax to recognize.  Can
+   also be assigned to arbitrarily: each pattern buffer stores its own
+   syntax, so it can be changed between regex compilations.  */
+/* This has no initializer because initialized variables in Emacs
+   become read-only after dumping.  */
+reg_syntax_t re_syntax_options;
+
+
+/* Specify the precise syntax of regexps for compilation.  This provides
+   for compatibility for various utilities which historically have
+   different, incompatible syntaxes.
+
+   The argument SYNTAX is a bit mask comprised of the various bits
+   defined in regex.h.  We return the old syntax.  */
+
+reg_syntax_t
+re_set_syntax (syntax)
+    reg_syntax_t syntax;
+{
+  reg_syntax_t ret = re_syntax_options;
+
+  re_syntax_options = syntax;
+  return ret;
+}
+#ifdef _LIBC
+weak_alias (__re_set_syntax, re_set_syntax)
+#endif
+
+int
+re_compile_fastmap (bufp)
+    struct re_pattern_buffer *bufp;
+{
+  re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+  char *fastmap = bufp->fastmap;
+
+  memset (fastmap, '\0', sizeof (char) * SBC_MAX);
+  re_compile_fastmap_iter (bufp, dfa->init_state, fastmap);
+  if (dfa->init_state != dfa->init_state_word)
+    re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap);
+  if (dfa->init_state != dfa->init_state_nl)
+    re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap);
+  if (dfa->init_state != dfa->init_state_begbuf)
+    re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap);
+  bufp->fastmap_accurate = 1;
+  return 0;
+}
+#ifdef _LIBC
+weak_alias (__re_compile_fastmap, re_compile_fastmap)
+#endif
+
+static inline void
+__attribute ((always_inline))
+re_set_fastmap (char *fastmap, bool icase, int ch)
+{
+  fastmap[ch] = 1;
+  if (icase)
+    fastmap[tolower (ch)] = 1;
+}
+
+/* Helper function for re_compile_fastmap.
+   Compile fastmap for the initial_state INIT_STATE.  */
+
+static void
+re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
+                        char *fastmap)
+{
+  re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+  Idx node_cnt;
+  bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
+  for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
+    {
+      Idx node = init_state->nodes.elems[node_cnt];
+      re_token_type_t type = dfa->nodes[node].type;
+
+      if (type == CHARACTER)
+       {
+         re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c);
+#ifdef RE_ENABLE_I18N
+         if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
+           {
+             unsigned char buf[MB_LEN_MAX];
+             unsigned char *p;
+             wchar_t wc;
+             mbstate_t state;
+
+             p = buf;
+             *p++ = dfa->nodes[node].opr.c;
+             while (++node < dfa->nodes_len
+                    && dfa->nodes[node].type == CHARACTER
+                    && dfa->nodes[node].mb_partial)
+               *p++ = dfa->nodes[node].opr.c;
+             memset (&state, '\0', sizeof (state));
+             if (__mbrtowc (&wc, (const char *) buf, p - buf,
+                            &state) == p - buf
+                 && (__wcrtomb ((char *) buf, towlower (wc), &state)
+                     != (size_t) -1))
+               re_set_fastmap (fastmap, false, buf[0]);
+           }
+#endif
+       }
+      else if (type == SIMPLE_BRACKET)
+       {
+         int i, ch;
+         for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+           {
+             int j;
+             bitset_word_t w = dfa->nodes[node].opr.sbcset[i];
+             for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+               if (w & ((bitset_word_t) 1 << j))
+                 re_set_fastmap (fastmap, icase, ch);
+           }
+       }
+#ifdef RE_ENABLE_I18N
+      else if (type == COMPLEX_BRACKET)
+       {
+         re_charset_t *cset = dfa->nodes[node].opr.mbcset;
+         Idx i;
+
+# ifdef _LIBC
+         /* See if we have to try all bytes which start multiple collation
+            elements.
+            e.g. In da_DK, we want to catch 'a' since "aa" is a valid
+                 collation element, and don't catch 'b' since 'b' is
+                 the only collation element which starts from 'b' (and
+                 it is caught by SIMPLE_BRACKET).  */
+             if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0
+                 && (cset->ncoll_syms || cset->nranges))
+               {
+                 const int32_t *table = (const int32_t *)
+                   _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+                 for (i = 0; i < SBC_MAX; ++i)
+                   if (table[i] < 0)
+                     re_set_fastmap (fastmap, icase, i);
+               }
+# endif /* _LIBC */
+
+         /* See if we have to start the match at all multibyte characters,
+            i.e. where we would not find an invalid sequence.  This only
+            applies to multibyte character sets; for single byte character
+            sets, the SIMPLE_BRACKET again suffices.  */
+         if (dfa->mb_cur_max > 1
+             && (cset->nchar_classes || cset->non_match || cset->nranges
+# ifdef _LIBC
+                 || cset->nequiv_classes
+# endif /* _LIBC */
+                ))
+           {
+             unsigned char c = 0;
+             do
+               {
+                 mbstate_t mbs;
+                 memset (&mbs, 0, sizeof (mbs));
+                 if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2)
+                   re_set_fastmap (fastmap, false, (int) c);
+               }
+             while (++c != 0);
+           }
+
+         else
+           {
+             /* ... Else catch all bytes which can start the mbchars.  */
+             for (i = 0; i < cset->nmbchars; ++i)
+               {
+                 char buf[256];
+                 mbstate_t state;
+                 memset (&state, '\0', sizeof (state));
+                 if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
+                   re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
+                 if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
+                   {
+                     if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
+                         != (size_t) -1)
+                       re_set_fastmap (fastmap, false, *(unsigned char *) buf);
+                   }
+               }
+           }
+       }
+#endif /* RE_ENABLE_I18N */
+      else if (type == OP_PERIOD
+#ifdef RE_ENABLE_I18N
+              || type == OP_UTF8_PERIOD
+#endif /* RE_ENABLE_I18N */
+              || type == END_OF_RE)
+       {
+         memset (fastmap, '\1', sizeof (char) * SBC_MAX);
+         if (type == END_OF_RE)
+           bufp->can_be_null = 1;
+         return;
+       }
+    }
+}
+\f
+/* Entry point for POSIX code.  */
+/* regcomp takes a regular expression as a string and compiles it.
+
+   PREG is a regex_t *.  We do not expect any fields to be initialized,
+   since POSIX says we shouldn't.  Thus, we set
+
+     `buffer' to the compiled pattern;
+     `used' to the length of the compiled pattern;
+     `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
+       REG_EXTENDED bit in CFLAGS is set; otherwise, to
+       RE_SYNTAX_POSIX_BASIC;
+     `newline_anchor' to REG_NEWLINE being set in CFLAGS;
+     `fastmap' to an allocated space for the fastmap;
+     `fastmap_accurate' to zero;
+     `re_nsub' to the number of subexpressions in PATTERN.
+
+   PATTERN is the address of the pattern string.
+
+   CFLAGS is a series of bits which affect compilation.
+
+     If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
+     use POSIX basic syntax.
+
+     If REG_NEWLINE is set, then . and [^...] don't match newline.
+     Also, regexec will try a match beginning after every newline.
+
+     If REG_ICASE is set, then we considers upper- and lowercase
+     versions of letters to be equivalent when matching.
+
+     If REG_NOSUB is set, then when PREG is passed to regexec, that
+     routine will report only success or failure, and nothing about the
+     registers.
+
+   It returns 0 if it succeeds, nonzero if it doesn't.  (See regex.h for
+   the return codes and their meanings.)  */
+
+int
+regcomp (preg, pattern, cflags)
+    regex_t *_Restrict_ preg;
+    const char *_Restrict_ pattern;
+    int cflags;
+{
+  reg_errcode_t ret;
+  reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
+                        : RE_SYNTAX_POSIX_BASIC);
+
+  preg->buffer = NULL;
+  preg->allocated = 0;
+  preg->used = 0;
+
+  /* Try to allocate space for the fastmap.  */
+  preg->fastmap = re_malloc (char, SBC_MAX);
+  if (BE (preg->fastmap == NULL, 0))
+    return REG_ESPACE;
+
+  syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0;
+
+  /* If REG_NEWLINE is set, newlines are treated differently.  */
+  if (cflags & REG_NEWLINE)
+    { /* REG_NEWLINE implies neither . nor [^...] match newline.  */
+      syntax &= ~RE_DOT_NEWLINE;
+      syntax |= RE_HAT_LISTS_NOT_NEWLINE;
+      /* It also changes the matching behavior.  */
+      preg->newline_anchor = 1;
+    }
+  else
+    preg->newline_anchor = 0;
+  preg->no_sub = !!(cflags & REG_NOSUB);
+  preg->translate = NULL;
+
+  ret = re_compile_internal (preg, pattern, strlen (pattern), syntax);
+
+  /* POSIX doesn't distinguish between an unmatched open-group and an
+     unmatched close-group: both are REG_EPAREN.  */
+  if (ret == REG_ERPAREN)
+    ret = REG_EPAREN;
+
+  /* We have already checked preg->fastmap != NULL.  */
+  if (BE (ret == REG_NOERROR, 1))
+    /* Compute the fastmap now, since regexec cannot modify the pattern
+       buffer.  This function never fails in this implementation.  */
+    (void) re_compile_fastmap (preg);
+  else
+    {
+      /* Some error occurred while compiling the expression.  */
+      re_free (preg->fastmap);
+      preg->fastmap = NULL;
+    }
+
+  return (int) ret;
+}
+#ifdef _LIBC
+weak_alias (__regcomp, regcomp)
+#endif
+
+/* Returns a message corresponding to an error code, ERRCODE, returned
+   from either regcomp or regexec.   We don't use PREG here.  */
+
+#ifdef _LIBC
+size_t
+regerror (errcode, preg, errbuf, errbuf_size)
+    int errcode;
+    const regex_t *_Restrict_ preg;
+    char *_Restrict_ errbuf;
+    size_t errbuf_size;
+#else /* size_t might promote */
+size_t
+regerror (int errcode, const regex_t *_Restrict_ preg,
+         char *_Restrict_ errbuf, size_t errbuf_size)
+#endif
+{
+  const char *msg;
+  size_t msg_size;
+
+  if (BE (errcode < 0
+         || errcode >= (int) (sizeof (__re_error_msgid_idx)
+                              / sizeof (__re_error_msgid_idx[0])), 0))
+    /* Only error codes returned by the rest of the code should be passed
+       to this routine.  If we are given anything else, or if other regex
+       code generates an invalid error code, then the program has a bug.
+       Dump core so we can fix it.  */
+    abort ();
+
+  msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
+
+  msg_size = strlen (msg) + 1; /* Includes the null.  */
+
+  if (BE (errbuf_size != 0, 1))
+    {
+      size_t cpy_size = msg_size;
+      if (BE (msg_size > errbuf_size, 0))
+       {
+         cpy_size = errbuf_size - 1;
+         errbuf[cpy_size] = '\0';
+       }
+      memcpy (errbuf, msg, cpy_size);
+    }
+
+  return msg_size;
+}
+#ifdef _LIBC
+weak_alias (__regerror, regerror)
+#endif
+
+
+#ifdef RE_ENABLE_I18N
+/* This static array is used for the map to single-byte characters when
+   UTF-8 is used.  Otherwise we would allocate memory just to initialize
+   it the same all the time.  UTF-8 is the preferred encoding so this is
+   a worthwhile optimization.  */
+static const bitset_t utf8_sb_map =
+{
+  /* Set the first 128 bits.  */
+# if 4 * BITSET_WORD_BITS < ASCII_CHARS
+#  error "bitset_word_t is narrower than 32 bits"
+# elif 3 * BITSET_WORD_BITS < ASCII_CHARS
+  BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX,
+# elif 2 * BITSET_WORD_BITS < ASCII_CHARS
+  BITSET_WORD_MAX, BITSET_WORD_MAX,
+# elif 1 * BITSET_WORD_BITS < ASCII_CHARS
+  BITSET_WORD_MAX,
+# endif
+  (BITSET_WORD_MAX
+   >> (SBC_MAX % BITSET_WORD_BITS == 0
+       ? 0
+       : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS))
+};
+#endif
+
+
+static void
+free_dfa_content (re_dfa_t *dfa)
+{
+  Idx i, j;
+
+  if (dfa->nodes)
+    for (i = 0; i < dfa->nodes_len; ++i)
+      free_token (dfa->nodes + i);
+  re_free (dfa->nexts);
+  for (i = 0; i < dfa->nodes_len; ++i)
+    {
+      if (dfa->eclosures != NULL)
+       re_node_set_free (dfa->eclosures + i);
+      if (dfa->inveclosures != NULL)
+       re_node_set_free (dfa->inveclosures + i);
+      if (dfa->edests != NULL)
+       re_node_set_free (dfa->edests + i);
+    }
+  re_free (dfa->edests);
+  re_free (dfa->eclosures);
+  re_free (dfa->inveclosures);
+  re_free (dfa->nodes);
+
+  if (dfa->state_table)
+    for (i = 0; i <= dfa->state_hash_mask; ++i)
+      {
+       struct re_state_table_entry *entry = dfa->state_table + i;
+       for (j = 0; j < entry->num; ++j)
+         {
+           re_dfastate_t *state = entry->array[j];
+           free_state (state);
+         }
+       re_free (entry->array);
+      }
+  re_free (dfa->state_table);
+#ifdef RE_ENABLE_I18N
+  if (dfa->sb_char != utf8_sb_map)
+    re_free (dfa->sb_char);
+#endif
+  re_free (dfa->subexp_map);
+#ifdef DEBUG
+  re_free (dfa->re_str);
+#endif
+
+  re_free (dfa);
+}
+
+
+/* Free dynamically allocated space used by PREG.  */
+
+void
+regfree (preg)
+    regex_t *preg;
+{
+  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  if (BE (dfa != NULL, 1))
+    free_dfa_content (dfa);
+  preg->buffer = NULL;
+  preg->allocated = 0;
+
+  re_free (preg->fastmap);
+  preg->fastmap = NULL;
+
+  re_free (preg->translate);
+  preg->translate = NULL;
+}
+#ifdef _LIBC
+weak_alias (__regfree, regfree)
+#endif
+\f
+/* Entry points compatible with 4.2 BSD regex library.  We don't define
+   them unless specifically requested.  */
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+
+/* BSD has one and only one pattern buffer.  */
+static struct re_pattern_buffer re_comp_buf;
+
+char *
+# ifdef _LIBC
+/* Make these definitions weak in libc, so POSIX programs can redefine
+   these names if they don't use our functions, and still use
+   regcomp/regexec above without link errors.  */
+weak_function
+# endif
+re_comp (s)
+     const char *s;
+{
+  reg_errcode_t ret;
+  char *fastmap;
+
+  if (!s)
+    {
+      if (!re_comp_buf.buffer)
+       return gettext ("No previous regular expression");
+      return 0;
+    }
+
+  if (re_comp_buf.buffer)
+    {
+      fastmap = re_comp_buf.fastmap;
+      re_comp_buf.fastmap = NULL;
+      __regfree (&re_comp_buf);
+      memset (&re_comp_buf, '\0', sizeof (re_comp_buf));
+      re_comp_buf.fastmap = fastmap;
+    }
+
+  if (re_comp_buf.fastmap == NULL)
+    {
+      re_comp_buf.fastmap = (char *) malloc (SBC_MAX);
+      if (re_comp_buf.fastmap == NULL)
+       return (char *) gettext (__re_error_msgid
+                                + __re_error_msgid_idx[(int) REG_ESPACE]);
+    }
+
+  /* Since `re_exec' always passes NULL for the `regs' argument, we
+     don't need to initialize the pattern buffer fields which affect it.  */
+
+  /* Match anchors at newlines.  */
+  re_comp_buf.newline_anchor = 1;
+
+  ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options);
+
+  if (!ret)
+    return NULL;
+
+  /* Yes, we're discarding `const' here if !HAVE_LIBINTL.  */
+  return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
+}
+
+#ifdef _LIBC
+libc_freeres_fn (free_mem)
+{
+  __regfree (&re_comp_buf);
+}
+#endif
+
+#endif /* _REGEX_RE_COMP */
+\f
+/* Internal entry point.
+   Compile the regular expression PATTERN, whose length is LENGTH.
+   SYNTAX indicate regular expression's syntax.  */
+
+static reg_errcode_t
+re_compile_internal (regex_t *preg, const char * pattern, size_t length,
+                    reg_syntax_t syntax)
+{
+  reg_errcode_t err = REG_NOERROR;
+  re_dfa_t *dfa;
+  re_string_t regexp;
+
+  /* Initialize the pattern buffer.  */
+  preg->fastmap_accurate = 0;
+  preg->syntax = syntax;
+  preg->not_bol = preg->not_eol = 0;
+  preg->used = 0;
+  preg->re_nsub = 0;
+  preg->can_be_null = 0;
+  preg->regs_allocated = REGS_UNALLOCATED;
+
+  /* Initialize the dfa.  */
+  dfa = (re_dfa_t *) preg->buffer;
+  if (BE (preg->allocated < sizeof (re_dfa_t), 0))
+    {
+      /* If zero allocated, but buffer is non-null, try to realloc
+        enough space.  This loses if buffer's address is bogus, but
+        that is the user's responsibility.  If ->buffer is NULL this
+        is a simple allocation.  */
+      dfa = re_realloc (preg->buffer, re_dfa_t, 1);
+      if (dfa == NULL)
+       return REG_ESPACE;
+      preg->allocated = sizeof (re_dfa_t);
+      preg->buffer = (unsigned char *) dfa;
+    }
+  preg->used = sizeof (re_dfa_t);
+
+  err = init_dfa (dfa, length);
+  if (BE (err != REG_NOERROR, 0))
+    {
+      free_dfa_content (dfa);
+      preg->buffer = NULL;
+      preg->allocated = 0;
+      return err;
+    }
+#ifdef DEBUG
+  /* Note: length+1 will not overflow since it is checked in init_dfa.  */
+  dfa->re_str = re_malloc (char, length + 1);
+  strncpy (dfa->re_str, pattern, length + 1);
+#endif
+
+  __libc_lock_init (dfa->lock);
+
+  err = re_string_construct (&regexp, pattern, length, preg->translate,
+                            (syntax & RE_ICASE) != 0, dfa);
+  if (BE (err != REG_NOERROR, 0))
+    {
+    re_compile_internal_free_return:
+      free_workarea_compile (preg);
+      re_string_destruct (&regexp);
+      free_dfa_content (dfa);
+      preg->buffer = NULL;
+      preg->allocated = 0;
+      return err;
+    }
+
+  /* Parse the regular expression, and build a structure tree.  */
+  preg->re_nsub = 0;
+  dfa->str_tree = parse (&regexp, preg, syntax, &err);
+  if (BE (dfa->str_tree == NULL, 0))
+    goto re_compile_internal_free_return;
+
+  /* Analyze the tree and create the nfa.  */
+  err = analyze (preg);
+  if (BE (err != REG_NOERROR, 0))
+    goto re_compile_internal_free_return;
+
+#ifdef RE_ENABLE_I18N
+  /* If possible, do searching in single byte encoding to speed things up.  */
+  if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL)
+    optimize_utf8 (dfa);
+#endif
+
+  /* Then create the initial state of the dfa.  */
+  err = create_initial_state (dfa);
+
+  /* Release work areas.  */
+  free_workarea_compile (preg);
+  re_string_destruct (&regexp);
+
+  if (BE (err != REG_NOERROR, 0))
+    {
+      free_dfa_content (dfa);
+      preg->buffer = NULL;
+      preg->allocated = 0;
+    }
+
+  return err;
+}
+
+/* Initialize DFA.  We use the length of the regular expression PAT_LEN
+   as the initial length of some arrays.  */
+
+static reg_errcode_t
+init_dfa (re_dfa_t *dfa, size_t pat_len)
+{
+  __re_size_t table_size;
+#ifndef _LIBC
+  char *codeset_name;
+#endif
+#ifdef RE_ENABLE_I18N
+  size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t));
+#else
+  size_t max_i18n_object_size = 0;
+#endif
+  size_t max_object_size =
+    MAX (sizeof (struct re_state_table_entry),
+        MAX (sizeof (re_token_t),
+             MAX (sizeof (re_node_set),
+                  MAX (sizeof (regmatch_t),
+                       max_i18n_object_size))));
+
+  memset (dfa, '\0', sizeof (re_dfa_t));
+
+  /* Force allocation of str_tree_storage the first time.  */
+  dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE;
+
+  /* Avoid overflows.  The extra "/ 2" is for the table_size doubling
+     calculation below, and for similar doubling calculations
+     elsewhere.  And it's <= rather than <, because some of the
+     doubling calculations add 1 afterwards.  */
+  if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0))
+    return REG_ESPACE;
+
+  dfa->nodes_alloc = pat_len + 1;
+  dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc);
+
+  /*  table_size = 2 ^ ceil(log pat_len) */
+  for (table_size = 1; ; table_size <<= 1)
+    if (table_size > pat_len)
+      break;
+
+  dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size);
+  dfa->state_hash_mask = table_size - 1;
+
+  dfa->mb_cur_max = MB_CUR_MAX;
+#ifdef _LIBC
+  if (dfa->mb_cur_max == 6
+      && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0)
+    dfa->is_utf8 = 1;
+  dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII)
+                      != 0);
+#else
+  codeset_name = nl_langinfo (CODESET);
+  if (strcasecmp (codeset_name, "UTF-8") == 0
+      || strcasecmp (codeset_name, "UTF8") == 0)
+    dfa->is_utf8 = 1;
+
+  /* We check exhaustively in the loop below if this charset is a
+     superset of ASCII.  */
+  dfa->map_notascii = 0;
+#endif
+
+#ifdef RE_ENABLE_I18N
+  if (dfa->mb_cur_max > 1)
+    {
+      if (dfa->is_utf8)
+       dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map;
+      else
+       {
+         int i, j, ch;
+
+         dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
+         if (BE (dfa->sb_char == NULL, 0))
+           return REG_ESPACE;
+
+         /* Set the bits corresponding to single byte chars.  */
+         for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+           for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+             {
+               wint_t wch = __btowc (ch);
+               if (wch != WEOF)
+                 dfa->sb_char[i] |= (bitset_word_t) 1 << j;
+# ifndef _LIBC
+               if (isascii (ch) && wch != ch)
+                 dfa->map_notascii = 1;
+# endif
+             }
+       }
+    }
+#endif
+
+  if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0))
+    return REG_ESPACE;
+  return REG_NOERROR;
+}
+
+/* Initialize WORD_CHAR table, which indicate which character is
+   "word".  In this case "word" means that it is the word construction
+   character used by some operators like "\<", "\>", etc.  */
+
+static void
+internal_function
+init_word_char (re_dfa_t *dfa)
+{
+  int i, j, ch;
+  dfa->word_ops_used = 1;
+  for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+    for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+      if (isalnum (ch) || ch == '_')
+       dfa->word_char[i] |= (bitset_word_t) 1 << j;
+}
+
+/* Free the work area which are only used while compiling.  */
+
+static void
+free_workarea_compile (regex_t *preg)
+{
+  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  bin_tree_storage_t *storage, *next;
+  for (storage = dfa->str_tree_storage; storage; storage = next)
+    {
+      next = storage->next;
+      re_free (storage);
+    }
+  dfa->str_tree_storage = NULL;
+  dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE;
+  dfa->str_tree = NULL;
+  re_free (dfa->org_indices);
+  dfa->org_indices = NULL;
+}
+
+/* Create initial states for all contexts.  */
+
+static reg_errcode_t
+create_initial_state (re_dfa_t *dfa)
+{
+  Idx first, i;
+  reg_errcode_t err;
+  re_node_set init_nodes;
+
+  /* Initial states have the epsilon closure of the node which is
+     the first node of the regular expression.  */
+  first = dfa->str_tree->first->node_idx;
+  dfa->init_node = first;
+  err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first);
+  if (BE (err != REG_NOERROR, 0))
+    return err;
+
+  /* The back-references which are in initial states can epsilon transit,
+     since in this case all of the subexpressions can be null.
+     Then we add epsilon closures of the nodes which are the next nodes of
+     the back-references.  */
+  if (dfa->nbackref > 0)
+    for (i = 0; i < init_nodes.nelem; ++i)
+      {
+       Idx node_idx = init_nodes.elems[i];
+       re_token_type_t type = dfa->nodes[node_idx].type;
+
+       Idx clexp_idx;
+       if (type != OP_BACK_REF)
+         continue;
+       for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx)
+         {
+           re_token_t *clexp_node;
+           clexp_node = dfa->nodes + init_nodes.elems[clexp_idx];
+           if (clexp_node->type == OP_CLOSE_SUBEXP
+               && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx)
+             break;
+         }
+       if (clexp_idx == init_nodes.nelem)
+         continue;
+
+       if (type == OP_BACK_REF)
+         {
+           Idx dest_idx = dfa->edests[node_idx].elems[0];
+           if (!re_node_set_contains (&init_nodes, dest_idx))
+             {
+               reg_errcode_t merge_err
+                  = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx);
+               if (merge_err != REG_NOERROR)
+                 return merge_err;
+               i = 0;
+             }
+         }
+      }
+
+  /* It must be the first time to invoke acquire_state.  */
+  dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0);
+  /* We don't check ERR here, since the initial state must not be NULL.  */
+  if (BE (dfa->init_state == NULL, 0))
+    return err;
+  if (dfa->init_state->has_constraint)
+    {
+      dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes,
+                                                      CONTEXT_WORD);
+      dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes,
+                                                    CONTEXT_NEWLINE);
+      dfa->init_state_begbuf = re_acquire_state_context (&err, dfa,
+                                                        &init_nodes,
+                                                        CONTEXT_NEWLINE
+                                                        | CONTEXT_BEGBUF);
+      if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL
+             || dfa->init_state_begbuf == NULL, 0))
+       return err;
+    }
+  else
+    dfa->init_state_word = dfa->init_state_nl
+      = dfa->init_state_begbuf = dfa->init_state;
+
+  re_node_set_free (&init_nodes);
+  return REG_NOERROR;
+}
+\f
+#ifdef RE_ENABLE_I18N
+/* If it is possible to do searching in single byte encoding instead of UTF-8
+   to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change
+   DFA nodes where needed.  */
+
+static void
+optimize_utf8 (re_dfa_t *dfa)
+{
+  Idx node;
+  int i;
+  bool mb_chars = false;
+  bool has_period = false;
+
+  for (node = 0; node < dfa->nodes_len; ++node)
+    switch (dfa->nodes[node].type)
+      {
+      case CHARACTER:
+       if (dfa->nodes[node].opr.c >= ASCII_CHARS)
+         mb_chars = true;
+       break;
+      case ANCHOR:
+       switch (dfa->nodes[node].opr.ctx_type)
+         {
+         case LINE_FIRST:
+         case LINE_LAST:
+         case BUF_FIRST:
+         case BUF_LAST:
+           break;
+         default:
+           /* Word anchors etc. cannot be handled.  It's okay to test
+              opr.ctx_type since constraints (for all DFA nodes) are
+              created by ORing one or more opr.ctx_type values.  */
+           return;
+         }
+       break;
+      case OP_PERIOD:
+       has_period = true;
+       break;
+      case OP_BACK_REF:
+      case OP_ALT:
+      case END_OF_RE:
+      case OP_DUP_ASTERISK:
+      case OP_OPEN_SUBEXP:
+      case OP_CLOSE_SUBEXP:
+       break;
+      case COMPLEX_BRACKET:
+       return;
+      case SIMPLE_BRACKET:
+       /* Just double check.  */
+       {
+         int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0
+                       ? 0
+                       : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS);
+         for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i)
+           {
+             if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0)
+               return;
+             rshift = 0;
+           }
+       }
+       break;
+      default:
+       abort ();
+      }
+
+  if (mb_chars || has_period)
+    for (node = 0; node < dfa->nodes_len; ++node)
+      {
+       if (dfa->nodes[node].type == CHARACTER
+           && dfa->nodes[node].opr.c >= ASCII_CHARS)
+         dfa->nodes[node].mb_partial = 0;
+       else if (dfa->nodes[node].type == OP_PERIOD)
+         dfa->nodes[node].type = OP_UTF8_PERIOD;
+      }
+
+  /* The search can be in single byte locale.  */
+  dfa->mb_cur_max = 1;
+  dfa->is_utf8 = 0;
+  dfa->has_mb_node = dfa->nbackref > 0 || has_period;
+}
+#endif
+\f
+/* Analyze the structure tree, and calculate "first", "next", "edest",
+   "eclosure", and "inveclosure".  */
+
+static reg_errcode_t
+analyze (regex_t *preg)
+{
+  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  reg_errcode_t ret;
+
+  /* Allocate arrays.  */
+  dfa->nexts = re_malloc (Idx, dfa->nodes_alloc);
+  dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc);
+  dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc);
+  dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc);
+  if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL
+         || dfa->eclosures == NULL, 0))
+    return REG_ESPACE;
+
+  dfa->subexp_map = re_malloc (Idx, preg->re_nsub);
+  if (dfa->subexp_map != NULL)
+    {
+      Idx i;
+      for (i = 0; i < preg->re_nsub; i++)
+       dfa->subexp_map[i] = i;
+      preorder (dfa->str_tree, optimize_subexps, dfa);
+      for (i = 0; i < preg->re_nsub; i++)
+       if (dfa->subexp_map[i] != i)
+         break;
+      if (i == preg->re_nsub)
+       {
+         free (dfa->subexp_map);
+         dfa->subexp_map = NULL;
+       }
+    }
+
+  ret = postorder (dfa->str_tree, lower_subexps, preg);
+  if (BE (ret != REG_NOERROR, 0))
+    return ret;
+  ret = postorder (dfa->str_tree, calc_first, dfa);
+  if (BE (ret != REG_NOERROR, 0))
+    return ret;
+  preorder (dfa->str_tree, calc_next, dfa);
+  ret = preorder (dfa->str_tree, link_nfa_nodes, dfa);
+  if (BE (ret != REG_NOERROR, 0))
+    return ret;
+  ret = calc_eclosure (dfa);
+  if (BE (ret != REG_NOERROR, 0))
+    return ret;
+
+  /* We only need this during the prune_impossible_nodes pass in regexec.c;
+     skip it if p_i_n will not run, as calc_inveclosure can be quadratic.  */
+  if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match)
+      || dfa->nbackref)
+    {
+      dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len);
+      if (BE (dfa->inveclosures == NULL, 0))
+       return REG_ESPACE;
+      ret = calc_inveclosure (dfa);
+    }
+
+  return ret;
+}
+
+/* Our parse trees are very unbalanced, so we cannot use a stack to
+   implement parse tree visits.  Instead, we use parent pointers and
+   some hairy code in these two functions.  */
+static reg_errcode_t
+postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
+          void *extra)
+{
+  bin_tree_t *node, *prev;
+
+  for (node = root; ; )
+    {
+      /* Descend down the tree, preferably to the left (or to the right
+        if that's the only child).  */
+      while (node->left || node->right)
+       if (node->left)
+         node = node->left;
+       else
+         node = node->right;
+
+      do
+       {
+         reg_errcode_t err = fn (extra, node);
+         if (BE (err != REG_NOERROR, 0))
+           return err;
+         if (node->parent == NULL)
+           return REG_NOERROR;
+         prev = node;
+         node = node->parent;
+       }
+      /* Go up while we have a node that is reached from the right.  */
+      while (node->right == prev || node->right == NULL);
+      node = node->right;
+    }
+}
+
+static reg_errcode_t
+preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
+         void *extra)
+{
+  bin_tree_t *node;
+
+  for (node = root; ; )
+    {
+      reg_errcode_t err = fn (extra, node);
+      if (BE (err != REG_NOERROR, 0))
+       return err;
+
+      /* Go to the left node, or up and to the right.  */
+      if (node->left)
+       node = node->left;
+      else
+       {
+         bin_tree_t *prev = NULL;
+         while (node->right == prev || node->right == NULL)
+           {
+             prev = node;
+             node = node->parent;
+             if (!node)
+               return REG_NOERROR;
+           }
+         node = node->right;
+       }
+    }
+}
+
+/* Optimization pass: if a SUBEXP is entirely contained, strip it and tell
+   re_search_internal to map the inner one's opr.idx to this one's.  Adjust
+   backreferences as well.  Requires a preorder visit.  */
+static reg_errcode_t
+optimize_subexps (void *extra, bin_tree_t *node)
+{
+  re_dfa_t *dfa = (re_dfa_t *) extra;
+
+  if (node->token.type == OP_BACK_REF && dfa->subexp_map)
+    {
+      int idx = node->token.opr.idx;
+      node->token.opr.idx = dfa->subexp_map[idx];
+      dfa->used_bkref_map |= 1 << node->token.opr.idx;
+    }
+
+  else if (node->token.type == SUBEXP
+          && node->left && node->left->token.type == SUBEXP)
+    {
+      Idx other_idx = node->left->token.opr.idx;
+
+      node->left = node->left->left;
+      if (node->left)
+       node->left->parent = node;
+
+      dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx];
+      if (other_idx < BITSET_WORD_BITS)
+       dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx);
+    }
+
+  return REG_NOERROR;
+}
+
+/* Lowering pass: Turn each SUBEXP node into the appropriate concatenation
+   of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP.  */
+static reg_errcode_t
+lower_subexps (void *extra, bin_tree_t *node)
+{
+  regex_t *preg = (regex_t *) extra;
+  reg_errcode_t err = REG_NOERROR;
+
+  if (node->left && node->left->token.type == SUBEXP)
+    {
+      node->left = lower_subexp (&err, preg, node->left);
+      if (node->left)
+       node->left->parent = node;
+    }
+  if (node->right && node->right->token.type == SUBEXP)
+    {
+      node->right = lower_subexp (&err, preg, node->right);
+      if (node->right)
+       node->right->parent = node;
+    }
+
+  return err;
+}
+
+static bin_tree_t *
+lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node)
+{
+  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  bin_tree_t *body = node->left;
+  bin_tree_t *op, *cls, *tree1, *tree;
+
+  if (preg->no_sub
+      /* We do not optimize empty subexpressions, because otherwise we may
+        have bad CONCAT nodes with NULL children.  This is obviously not
+        very common, so we do not lose much.  An example that triggers
+        this case is the sed "script" /\(\)/x.  */
+      && node->left != NULL
+      && (node->token.opr.idx >= BITSET_WORD_BITS
+         || !(dfa->used_bkref_map
+              & ((bitset_word_t) 1 << node->token.opr.idx))))
+    return node->left;
+
+  /* Convert the SUBEXP node to the concatenation of an
+     OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP.  */
+  op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP);
+  cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP);
+  tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls;
+  tree = create_tree (dfa, op, tree1, CONCAT);
+  if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0))
+    {
+      *err = REG_ESPACE;
+      return NULL;
+    }
+
+  op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx;
+  op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp;
+  return tree;
+}
+
+/* Pass 1 in building the NFA: compute FIRST and create unlinked automaton
+   nodes.  Requires a postorder visit.  */
+static reg_errcode_t
+calc_first (void *extra, bin_tree_t *node)
+{
+  re_dfa_t *dfa = (re_dfa_t *) extra;
+  if (node->token.type == CONCAT)
+    {
+      node->first = node->left->first;
+      node->node_idx = node->left->node_idx;
+    }
+  else
+    {
+      node->first = node;
+      node->node_idx = re_dfa_add_node (dfa, node->token);
+      if (BE (node->node_idx == REG_MISSING, 0))
+       return REG_ESPACE;
+      if (node->token.type == ANCHOR)
+       dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
+    }
+  return REG_NOERROR;
+}
+
+/* Pass 2: compute NEXT on the tree.  Preorder visit.  */
+static reg_errcode_t
+calc_next (void *extra, bin_tree_t *node)
+{
+  switch (node->token.type)
+    {
+    case OP_DUP_ASTERISK:
+      node->left->next = node;
+      break;
+    case CONCAT:
+      node->left->next = node->right->first;
+      node->right->next = node->next;
+      break;
+    default:
+      if (node->left)
+       node->left->next = node->next;
+      if (node->right)
+       node->right->next = node->next;
+      break;
+    }
+  return REG_NOERROR;
+}
+
+/* Pass 3: link all DFA nodes to their NEXT node (any order will do).  */
+static reg_errcode_t
+link_nfa_nodes (void *extra, bin_tree_t *node)
+{
+  re_dfa_t *dfa = (re_dfa_t *) extra;
+  Idx idx = node->node_idx;
+  reg_errcode_t err = REG_NOERROR;
+
+  switch (node->token.type)
+    {
+    case CONCAT:
+      break;
+
+    case END_OF_RE:
+      assert (node->next == NULL);
+      break;
+
+    case OP_DUP_ASTERISK:
+    case OP_ALT:
+      {
+       Idx left, right;
+       dfa->has_plural_match = 1;
+       if (node->left != NULL)
+         left = node->left->first->node_idx;
+       else
+         left = node->next->node_idx;
+       if (node->right != NULL)
+         right = node->right->first->node_idx;
+       else
+         right = node->next->node_idx;
+       assert (REG_VALID_INDEX (left));
+       assert (REG_VALID_INDEX (right));
+       err = re_node_set_init_2 (dfa->edests + idx, left, right);
+      }
+      break;
+
+    case ANCHOR:
+    case OP_OPEN_SUBEXP:
+    case OP_CLOSE_SUBEXP:
+      err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx);
+      break;
+
+    case OP_BACK_REF:
+      dfa->nexts[idx] = node->next->node_idx;
+      if (node->token.type == OP_BACK_REF)
+       err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]);
+      break;
+
+    default:
+      assert (!IS_EPSILON_NODE (node->token.type));
+      dfa->nexts[idx] = node->next->node_idx;
+      break;
+    }
+
+  return err;
+}
+
+/* Duplicate the epsilon closure of the node ROOT_NODE.
+   Note that duplicated nodes have constraint INIT_CONSTRAINT in addition
+   to their own constraint.  */
+
+static reg_errcode_t
+internal_function
+duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
+                       Idx root_node, unsigned int init_constraint)
+{
+  Idx org_node, clone_node;
+  bool ok;
+  unsigned int constraint = init_constraint;
+  for (org_node = top_org_node, clone_node = top_clone_node;;)
+    {
+      Idx org_dest, clone_dest;
+      if (dfa->nodes[org_node].type == OP_BACK_REF)
+       {
+         /* If the back reference epsilon-transit, its destination must
+            also have the constraint.  Then duplicate the epsilon closure
+            of the destination of the back reference, and store it in
+            edests of the back reference.  */
+         org_dest = dfa->nexts[org_node];
+         re_node_set_empty (dfa->edests + clone_node);
+         clone_dest = duplicate_node (dfa, org_dest, constraint);
+         if (BE (clone_dest == REG_MISSING, 0))
+           return REG_ESPACE;
+         dfa->nexts[clone_node] = dfa->nexts[org_node];
+         ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+         if (BE (! ok, 0))
+           return REG_ESPACE;
+       }
+      else if (dfa->edests[org_node].nelem == 0)
+       {
+         /* In case of the node can't epsilon-transit, don't duplicate the
+            destination and store the original destination as the
+            destination of the node.  */
+         dfa->nexts[clone_node] = dfa->nexts[org_node];
+         break;
+       }
+      else if (dfa->edests[org_node].nelem == 1)
+       {
+         /* In case of the node can epsilon-transit, and it has only one
+            destination.  */
+         org_dest = dfa->edests[org_node].elems[0];
+         re_node_set_empty (dfa->edests + clone_node);
+         /* If the node is root_node itself, it means the epsilon closure
+            has a loop.  Then tie it to the destination of the root_node.  */
+         if (org_node == root_node && clone_node != org_node)
+           {
+             ok = re_node_set_insert (dfa->edests + clone_node, org_dest);
+             if (BE (! ok, 0))
+               return REG_ESPACE;
+             break;
+           }
+         /* In case the node has another constraint, append it.  */
+         constraint |= dfa->nodes[org_node].constraint;
+         clone_dest = duplicate_node (dfa, org_dest, constraint);
+         if (BE (clone_dest == REG_MISSING, 0))
+           return REG_ESPACE;
+         ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+         if (BE (! ok, 0))
+           return REG_ESPACE;
+       }
+      else /* dfa->edests[org_node].nelem == 2 */
+       {
+         /* In case of the node can epsilon-transit, and it has two
+            destinations. In the bin_tree_t and DFA, that's '|' and '*'.   */
+         org_dest = dfa->edests[org_node].elems[0];
+         re_node_set_empty (dfa->edests + clone_node);
+         /* Search for a duplicated node which satisfies the constraint.  */
+         clone_dest = search_duplicated_node (dfa, org_dest, constraint);
+         if (clone_dest == REG_MISSING)
+           {
+             /* There is no such duplicated node, create a new one.  */
+             reg_errcode_t err;
+             clone_dest = duplicate_node (dfa, org_dest, constraint);
+             if (BE (clone_dest == REG_MISSING, 0))
+               return REG_ESPACE;
+             ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+             if (BE (! ok, 0))
+               return REG_ESPACE;
+             err = duplicate_node_closure (dfa, org_dest, clone_dest,
+                                           root_node, constraint);
+             if (BE (err != REG_NOERROR, 0))
+               return err;
+           }
+         else
+           {
+             /* There is a duplicated node which satisfies the constraint,
+                use it to avoid infinite loop.  */
+             ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+             if (BE (! ok, 0))
+               return REG_ESPACE;
+           }
+
+         org_dest = dfa->edests[org_node].elems[1];
+         clone_dest = duplicate_node (dfa, org_dest, constraint);
+         if (BE (clone_dest == REG_MISSING, 0))
+           return REG_ESPACE;
+         ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+         if (BE (! ok, 0))
+           return REG_ESPACE;
+       }
+      org_node = org_dest;
+      clone_node = clone_dest;
+    }
+  return REG_NOERROR;
+}
+
+/* Search for a node which is duplicated from the node ORG_NODE, and
+   satisfies the constraint CONSTRAINT.  */
+
+static Idx
+search_duplicated_node (const re_dfa_t *dfa, Idx org_node,
+                       unsigned int constraint)
+{
+  Idx idx;
+  for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx)
+    {
+      if (org_node == dfa->org_indices[idx]
+         && constraint == dfa->nodes[idx].constraint)
+       return idx; /* Found.  */
+    }
+  return REG_MISSING; /* Not found.  */
+}
+
+/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT.
+   Return the index of the new node, or REG_MISSING if insufficient storage is
+   available.  */
+
+static Idx
+duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint)
+{
+  Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
+  if (BE (dup_idx != REG_MISSING, 1))
+    {
+      dfa->nodes[dup_idx].constraint = constraint;
+      dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
+      dfa->nodes[dup_idx].duplicated = 1;
+
+      /* Store the index of the original node.  */
+      dfa->org_indices[dup_idx] = org_idx;
+    }
+  return dup_idx;
+}
+
+static reg_errcode_t
+calc_inveclosure (re_dfa_t *dfa)
+{
+  Idx src, idx;
+  bool ok;
+  for (idx = 0; idx < dfa->nodes_len; ++idx)
+    re_node_set_init_empty (dfa->inveclosures + idx);
+
+  for (src = 0; src < dfa->nodes_len; ++src)
+    {
+      Idx *elems = dfa->eclosures[src].elems;
+      for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx)
+       {
+         ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src);
+         if (BE (! ok, 0))
+           return REG_ESPACE;
+       }
+    }
+
+  return REG_NOERROR;
+}
+
+/* Calculate "eclosure" for all the node in DFA.  */
+
+static reg_errcode_t
+calc_eclosure (re_dfa_t *dfa)
+{
+  Idx node_idx;
+  bool incomplete;
+#ifdef DEBUG
+  assert (dfa->nodes_len > 0);
+#endif
+  incomplete = false;
+  /* For each nodes, calculate epsilon closure.  */
+  for (node_idx = 0; ; ++node_idx)
+    {
+      reg_errcode_t err;
+      re_node_set eclosure_elem;
+      if (node_idx == dfa->nodes_len)
+       {
+         if (!incomplete)
+           break;
+         incomplete = false;
+         node_idx = 0;
+       }
+
+#ifdef DEBUG
+      assert (dfa->eclosures[node_idx].nelem != REG_MISSING);
+#endif
+
+      /* If we have already calculated, skip it.  */
+      if (dfa->eclosures[node_idx].nelem != 0)
+       continue;
+      /* Calculate epsilon closure of `node_idx'.  */
+      err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true);
+      if (BE (err != REG_NOERROR, 0))
+       return err;
+
+      if (dfa->eclosures[node_idx].nelem == 0)
+       {
+         incomplete = true;
+         re_node_set_free (&eclosure_elem);
+       }
+    }
+  return REG_NOERROR;
+}
+
+/* Calculate epsilon closure of NODE.  */
+
+static reg_errcode_t
+calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
+{
+  reg_errcode_t err;
+  Idx i;
+  re_node_set eclosure;
+  bool ok;
+  bool incomplete = false;
+  err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1);
+  if (BE (err != REG_NOERROR, 0))
+    return err;
+
+  /* This indicates that we are calculating this node now.
+     We reference this value to avoid infinite loop.  */
+  dfa->eclosures[node].nelem = REG_MISSING;
+
+  /* If the current node has constraints, duplicate all nodes
+     since they must inherit the constraints.  */
+  if (dfa->nodes[node].constraint
+      && dfa->edests[node].nelem
+      && !dfa->nodes[dfa->edests[node].elems[0]].duplicated)
+    {
+      err = duplicate_node_closure (dfa, node, node, node,
+                                   dfa->nodes[node].constraint);
+      if (BE (err != REG_NOERROR, 0))
+       return err;
+    }
+
+  /* Expand each epsilon destination nodes.  */
+  if (IS_EPSILON_NODE(dfa->nodes[node].type))
+    for (i = 0; i < dfa->edests[node].nelem; ++i)
+      {
+       re_node_set eclosure_elem;
+       Idx edest = dfa->edests[node].elems[i];
+       /* If calculating the epsilon closure of `edest' is in progress,
+          return intermediate result.  */
+       if (dfa->eclosures[edest].nelem == REG_MISSING)
+         {
+           incomplete = true;
+           continue;
+         }
+       /* If we haven't calculated the epsilon closure of `edest' yet,
+          calculate now. Otherwise use calculated epsilon closure.  */
+       if (dfa->eclosures[edest].nelem == 0)
+         {
+           err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false);
+           if (BE (err != REG_NOERROR, 0))
+             return err;
+         }
+       else
+         eclosure_elem = dfa->eclosures[edest];
+       /* Merge the epsilon closure of `edest'.  */
+       err = re_node_set_merge (&eclosure, &eclosure_elem);
+       if (BE (err != REG_NOERROR, 0))
+         return err;
+       /* If the epsilon closure of `edest' is incomplete,
+          the epsilon closure of this node is also incomplete.  */
+       if (dfa->eclosures[edest].nelem == 0)
+         {
+           incomplete = true;
+           re_node_set_free (&eclosure_elem);
+         }
+      }
+
+  /* An epsilon closure includes itself.  */
+  ok = re_node_set_insert (&eclosure, node);
+  if (BE (! ok, 0))
+    return REG_ESPACE;
+  if (incomplete && !root)
+    dfa->eclosures[node].nelem = 0;
+  else
+    dfa->eclosures[node] = eclosure;
+  *new_set = eclosure;
+  return REG_NOERROR;
+}
+\f
+/* Functions for token which are used in the parser.  */
+
+/* Fetch a token from INPUT.
+   We must not use this function inside bracket expressions.  */
+
+static void
+internal_function
+fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax)
+{
+  re_string_skip_bytes (input, peek_token (result, input, syntax));
+}
+
+/* Peek a token from INPUT, and return the length of the token.
+   We must not use this function inside bracket expressions.  */
+
+static int
+internal_function
+peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
+{
+  unsigned char c;
+
+  if (re_string_eoi (input))
+    {
+      token->type = END_OF_RE;
+      return 0;
+    }
+
+  c = re_string_peek_byte (input, 0);
+  token->opr.c = c;
+
+  token->word_char = 0;
+#ifdef RE_ENABLE_I18N
+  token->mb_partial = 0;
+  if (input->mb_cur_max > 1 &&
+      !re_string_first_byte (input, re_string_cur_idx (input)))
+    {
+      token->type = CHARACTER;
+      token->mb_partial = 1;
+      return 1;
+    }
+#endif
+  if (c == '\\')
+    {
+      unsigned char c2;
+      if (re_string_cur_idx (input) + 1 >= re_string_length (input))
+       {
+         token->type = BACK_SLASH;
+         return 1;
+       }
+
+      c2 = re_string_peek_byte_case (input, 1);
+      token->opr.c = c2;
+      token->type = CHARACTER;
+#ifdef RE_ENABLE_I18N
+      if (input->mb_cur_max > 1)
+       {
+         wint_t wc = re_string_wchar_at (input,
+                                         re_string_cur_idx (input) + 1);
+         token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
+       }
+      else
+#endif
+       token->word_char = IS_WORD_CHAR (c2) != 0;
+
+      switch (c2)
+       {
+       case '|':
+         if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR))
+           token->type = OP_ALT;
+         break;
+       case '1': case '2': case '3': case '4': case '5':
+       case '6': case '7': case '8': case '9':
+         if (!(syntax & RE_NO_BK_REFS))
+           {
+             token->type = OP_BACK_REF;
+             token->opr.idx = c2 - '1';
+           }
+         break;
+       case '<':
+         if (!(syntax & RE_NO_GNU_OPS))
+           {
+             token->type = ANCHOR;
+             token->opr.ctx_type = WORD_FIRST;
+           }
+         break;
+       case '>':
+         if (!(syntax & RE_NO_GNU_OPS))
+           {
+             token->type = ANCHOR;
+             token->opr.ctx_type = WORD_LAST;
+           }
+         break;
+       case 'b':
+         if (!(syntax & RE_NO_GNU_OPS))
+           {
+             token->type = ANCHOR;
+             token->opr.ctx_type = WORD_DELIM;
+           }
+         break;
+       case 'B':
+         if (!(syntax & RE_NO_GNU_OPS))
+           {
+             token->type = ANCHOR;
+             token->opr.ctx_type = NOT_WORD_DELIM;
+           }
+         break;
+       case 'w':
+         if (!(syntax & RE_NO_GNU_OPS))
+           token->type = OP_WORD;
+         break;
+       case 'W':
+         if (!(syntax & RE_NO_GNU_OPS))
+           token->type = OP_NOTWORD;
+         break;
+       case 's':
+         if (!(syntax & RE_NO_GNU_OPS))
+           token->type = OP_SPACE;
+         break;
+       case 'S':
+         if (!(syntax & RE_NO_GNU_OPS))
+           token->type = OP_NOTSPACE;
+         break;
+       case '`':
+         if (!(syntax & RE_NO_GNU_OPS))
+           {
+             token->type = ANCHOR;
+             token->opr.ctx_type = BUF_FIRST;
+           }
+         break;
+       case '\'':
+         if (!(syntax & RE_NO_GNU_OPS))
+           {
+             token->type = ANCHOR;
+             token->opr.ctx_type = BUF_LAST;
+           }
+         break;
+       case '(':
+         if (!(syntax & RE_NO_BK_PARENS))
+           token->type = OP_OPEN_SUBEXP;
+         break;
+       case ')':
+         if (!(syntax & RE_NO_BK_PARENS))
+           token->type = OP_CLOSE_SUBEXP;
+         break;
+       case '+':
+         if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM))
+           token->type = OP_DUP_PLUS;
+         break;
+       case '?':
+         if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM))
+           token->type = OP_DUP_QUESTION;
+         break;
+       case '{':
+         if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES)))
+           token->type = OP_OPEN_DUP_NUM;
+         break;
+       case '}':
+         if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES)))
+           token->type = OP_CLOSE_DUP_NUM;
+         break;
+       default:
+         break;
+       }
+      return 2;
+    }
+
+  token->type = CHARACTER;
+#ifdef RE_ENABLE_I18N
+  if (input->mb_cur_max > 1)
+    {
+      wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input));
+      token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
+    }
+  else
+#endif
+    token->word_char = IS_WORD_CHAR (token->opr.c);
+
+  switch (c)
+    {
+    case '\n':
+      if (syntax & RE_NEWLINE_ALT)
+       token->type = OP_ALT;
+      break;
+    case '|':
+      if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR))
+       token->type = OP_ALT;
+      break;
+    case '*':
+      token->type = OP_DUP_ASTERISK;
+      break;
+    case '+':
+      if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM))
+       token->type = OP_DUP_PLUS;
+      break;
+    case '?':
+      if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM))
+       token->type = OP_DUP_QUESTION;
+      break;
+    case '{':
+      if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
+       token->type = OP_OPEN_DUP_NUM;
+      break;
+    case '}':
+      if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
+       token->type = OP_CLOSE_DUP_NUM;
+      break;
+    case '(':
+      if (syntax & RE_NO_BK_PARENS)
+       token->type = OP_OPEN_SUBEXP;
+      break;
+    case ')':
+      if (syntax & RE_NO_BK_PARENS)
+       token->type = OP_CLOSE_SUBEXP;
+      break;
+    case '[':
+      token->type = OP_OPEN_BRACKET;
+      break;
+    case '.':
+      token->type = OP_PERIOD;
+      break;
+    case '^':
+      if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) &&
+         re_string_cur_idx (input) != 0)
+       {
+         char prev = re_string_peek_byte (input, -1);
+         if (!(syntax & RE_NEWLINE_ALT) || prev != '\n')
+           break;
+       }
+      token->type = ANCHOR;
+      token->opr.ctx_type = LINE_FIRST;
+      break;
+    case '$':
+      if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) &&
+         re_string_cur_idx (input) + 1 != re_string_length (input))
+       {
+         re_token_t next;
+         re_string_skip_bytes (input, 1);
+         peek_token (&next, input, syntax);
+         re_string_skip_bytes (input, -1);
+         if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP)
+           break;
+       }
+      token->type = ANCHOR;
+      token->opr.ctx_type = LINE_LAST;
+      break;
+    default:
+      break;
+    }
+  return 1;
+}
+
+/* Peek a token from INPUT, and return the length of the token.
+   We must not use this function out of bracket expressions.  */
+
+static int
+internal_function
+peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
+{
+  unsigned char c;
+  if (re_string_eoi (input))
+    {
+      token->type = END_OF_RE;
+      return 0;
+    }
+  c = re_string_peek_byte (input, 0);
+  token->opr.c = c;
+
+#ifdef RE_ENABLE_I18N
+  if (input->mb_cur_max > 1 &&
+      !re_string_first_byte (input, re_string_cur_idx (input)))
+    {
+      token->type = CHARACTER;
+      return 1;
+    }
+#endif /* RE_ENABLE_I18N */
+
+  if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS)
+      && re_string_cur_idx (input) + 1 < re_string_length (input))
+    {
+      /* In this case, '\' escape a character.  */
+      unsigned char c2;
+      re_string_skip_bytes (input, 1);
+      c2 = re_string_peek_byte (input, 0);
+      token->opr.c = c2;
+      token->type = CHARACTER;
+      return 1;
+    }
+  if (c == '[') /* '[' is a special char in a bracket exps.  */
+    {
+      unsigned char c2;
+      int token_len;
+      if (re_string_cur_idx (input) + 1 < re_string_length (input))
+       c2 = re_string_peek_byte (input, 1);
+      else
+       c2 = 0;
+      token->opr.c = c2;
+      token_len = 2;
+      switch (c2)
+       {
+       case '.':
+         token->type = OP_OPEN_COLL_ELEM;
+         break;
+       case '=':
+         token->type = OP_OPEN_EQUIV_CLASS;
+         break;
+       case ':':
+         if (syntax & RE_CHAR_CLASSES)
+           {
+             token->type = OP_OPEN_CHAR_CLASS;
+             break;
+           }
+         /* else fall through.  */
+       default:
+         token->type = CHARACTER;
+         token->opr.c = c;
+         token_len = 1;
+         break;
+       }
+      return token_len;
+    }
+  switch (c)
+    {
+    case '-':
+      token->type = OP_CHARSET_RANGE;
+      break;
+    case ']':
+      token->type = OP_CLOSE_BRACKET;
+      break;
+    case '^':
+      token->type = OP_NON_MATCH_LIST;
+      break;
+    default:
+      token->type = CHARACTER;
+    }
+  return 1;
+}
+\f
+/* Functions for parser.  */
+
+/* Entry point of the parser.
+   Parse the regular expression REGEXP and return the structure tree.
+   If an error is occured, ERR is set by error code, and return NULL.
+   This function build the following tree, from regular expression <reg_exp>:
+          CAT
+          / \
+         /   \
+   <reg_exp>  EOR
+
+   CAT means concatenation.
+   EOR means end of regular expression.  */
+
+static bin_tree_t *
+parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
+       reg_errcode_t *err)
+{
+  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  bin_tree_t *tree, *eor, *root;
+  re_token_t current_token;
+  dfa->syntax = syntax;
+  fetch_token (&current_token, regexp, syntax | RE_CARET_ANCHORS_HERE);
+  tree = parse_reg_exp (regexp, preg, &current_token, syntax, 0, err);
+  if (BE (*err != REG_NOERROR && tree == NULL, 0))
+    return NULL;
+  eor = create_tree (dfa, NULL, NULL, END_OF_RE);
+  if (tree != NULL)
+    root = create_tree (dfa, tree, eor, CONCAT);
+  else
+    root = eor;
+  if (BE (eor == NULL || root == NULL, 0))
+    {
+      *err = REG_ESPACE;
+      return NULL;
+    }
+  return root;
+}
+
+/* This function build the following tree, from regular expression
+   <branch1>|<branch2>:
+          ALT
+          / \
+         /   \
+   <branch1> <branch2>
+
+   ALT means alternative, which represents the operator `|'.  */
+
+static bin_tree_t *
+parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
+              reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  bin_tree_t *tree, *branch = NULL;
+  tree = parse_branch (regexp, preg, token, syntax, nest, err);
+  if (BE (*err != REG_NOERROR && tree == NULL, 0))
+    return NULL;
+
+  while (token->type == OP_ALT)
+    {
+      fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE);
+      if (token->type != OP_ALT && token->type != END_OF_RE
+         && (nest == 0 || token->type != OP_CLOSE_SUBEXP))
+       {
+         branch = parse_branch (regexp, preg, token, syntax, nest, err);
+         if (BE (*err != REG_NOERROR && branch == NULL, 0))
+           return NULL;
+       }
+      else
+       branch = NULL;
+      tree = create_tree (dfa, tree, branch, OP_ALT);
+      if (BE (tree == NULL, 0))
+       {
+         *err = REG_ESPACE;
+         return NULL;
+       }
+    }
+  return tree;
+}
+
+/* This function build the following tree, from regular expression
+   <exp1><exp2>:
+       CAT
+       / \
+       /   \
+   <exp1> <exp2>
+
+   CAT means concatenation.  */
+
+static bin_tree_t *
+parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
+             reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+  bin_tree_t *tree, *expr;
+  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  tree = parse_expression (regexp, preg, token, syntax, nest, err);
+  if (BE (*err != REG_NOERROR && tree == NULL, 0))
+    return NULL;
+
+  while (token->type != OP_ALT && token->type != END_OF_RE
+        && (nest == 0 || token->type != OP_CLOSE_SUBEXP))
+    {
+      expr = parse_expression (regexp, preg, token, syntax, nest, err);
+      if (BE (*err != REG_NOERROR && expr == NULL, 0))
+       {
+         return NULL;
+       }
+      if (tree != NULL && expr != NULL)
+       {
+         tree = create_tree (dfa, tree, expr, CONCAT);
+         if (tree == NULL)
+           {
+             *err = REG_ESPACE;
+             return NULL;
+           }
+       }
+      else if (tree == NULL)
+       tree = expr;
+      /* Otherwise expr == NULL, we don't need to create new tree.  */
+    }
+  return tree;
+}
+
+/* This function build the following tree, from regular expression a*:
+        *
+        |
+        a
+*/
+
+static bin_tree_t *
+parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
+                 reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  bin_tree_t *tree;
+  switch (token->type)
+    {
+    case CHARACTER:
+      tree = create_token_tree (dfa, NULL, NULL, token);
+      if (BE (tree == NULL, 0))
+       {
+         *err = REG_ESPACE;
+         return NULL;
+       }
+#ifdef RE_ENABLE_I18N
+      if (dfa->mb_cur_max > 1)
+       {
+         while (!re_string_eoi (regexp)
+                && !re_string_first_byte (regexp, re_string_cur_idx (regexp)))
+           {
+             bin_tree_t *mbc_remain;
+             fetch_token (token, regexp, syntax);
+             mbc_remain = create_token_tree (dfa, NULL, NULL, token);
+             tree = create_tree (dfa, tree, mbc_remain, CONCAT);
+             if (BE (mbc_remain == NULL || tree == NULL, 0))
+               {
+                 *err = REG_ESPACE;
+                 return NULL;
+               }
+           }
+       }
+#endif
+      break;
+    case OP_OPEN_SUBEXP:
+      tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err);
+      if (BE (*err != REG_NOERROR && tree == NULL, 0))
+       return NULL;
+      break;
+    case OP_OPEN_BRACKET:
+      tree = parse_bracket_exp (regexp, dfa, token, syntax, err);
+      if (BE (*err != REG_NOERROR && tree == NULL, 0))
+       return NULL;
+      break;
+    case OP_BACK_REF:
+      if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1))
+       {
+         *err = REG_ESUBREG;
+         return NULL;
+       }
+      dfa->used_bkref_map |= 1 << token->opr.idx;
+      tree = create_token_tree (dfa, NULL, NULL, token);
+      if (BE (tree == NULL, 0))
+       {
+         *err = REG_ESPACE;
+         return NULL;
+       }
+      ++dfa->nbackref;
+      dfa->has_mb_node = 1;
+      break;
+    case OP_OPEN_DUP_NUM:
+      if (syntax & RE_CONTEXT_INVALID_DUP)
+       {
+         *err = REG_BADRPT;
+         return NULL;
+       }
+      /* FALLTHROUGH */
+    case OP_DUP_ASTERISK:
+    case OP_DUP_PLUS:
+    case OP_DUP_QUESTION:
+      if (syntax & RE_CONTEXT_INVALID_OPS)
+       {
+         *err = REG_BADRPT;
+         return NULL;
+       }
+      else if (syntax & RE_CONTEXT_INDEP_OPS)
+       {
+         fetch_token (token, regexp, syntax);
+         return parse_expression (regexp, preg, token, syntax, nest, err);
+       }
+      /* else fall through  */
+    case OP_CLOSE_SUBEXP:
+      if ((token->type == OP_CLOSE_SUBEXP) &&
+         !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
+       {
+         *err = REG_ERPAREN;
+         return NULL;
+       }
+      /* else fall through  */
+    case OP_CLOSE_DUP_NUM:
+      /* We treat it as a normal character.  */
+
+      /* Then we can these characters as normal characters.  */
+      token->type = CHARACTER;
+      /* mb_partial and word_char bits should be initialized already
+        by peek_token.  */
+      tree = create_token_tree (dfa, NULL, NULL, token);
+      if (BE (tree == NULL, 0))
+       {
+         *err = REG_ESPACE;
+         return NULL;
+       }
+      break;
+    case ANCHOR:
+      if ((token->opr.ctx_type
+          & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST))
+         && dfa->word_ops_used == 0)
+       init_word_char (dfa);
+      if (token->opr.ctx_type == WORD_DELIM
+         || token->opr.ctx_type == NOT_WORD_DELIM)
+       {
+         bin_tree_t *tree_first, *tree_last;
+         if (token->opr.ctx_type == WORD_DELIM)
+           {
+             token->opr.ctx_type = WORD_FIRST;
+             tree_first = create_token_tree (dfa, NULL, NULL, token);
+             token->opr.ctx_type = WORD_LAST;
+           }
+         else
+           {
+             token->opr.ctx_type = INSIDE_WORD;
+             tree_first = create_token_tree (dfa, NULL, NULL, token);
+             token->opr.ctx_type = INSIDE_NOTWORD;
+           }
+         tree_last = create_token_tree (dfa, NULL, NULL, token);
+         tree = create_tree (dfa, tree_first, tree_last, OP_ALT);
+         if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0))
+           {
+             *err = REG_ESPACE;
+             return NULL;
+           }
+       }
+      else
+       {
+         tree = create_token_tree (dfa, NULL, NULL, token);
+         if (BE (tree == NULL, 0))
+           {
+             *err = REG_ESPACE;
+             return NULL;
+           }
+       }
+      /* We must return here, since ANCHORs can't be followed
+        by repetition operators.
+        eg. RE"^*" is invalid or "<ANCHOR(^)><CHAR(*)>",
+            it must not be "<ANCHOR(^)><REPEAT(*)>".  */
+      fetch_token (token, regexp, syntax);
+      return tree;
+    case OP_PERIOD:
+      tree = create_token_tree (dfa, NULL, NULL, token);
+      if (BE (tree == NULL, 0))
+       {
+         *err = REG_ESPACE;
+         return NULL;
+       }
+      if (dfa->mb_cur_max > 1)
+       dfa->has_mb_node = 1;
+      break;
+    case OP_WORD:
+    case OP_NOTWORD:
+      tree = build_charclass_op (dfa, regexp->trans,
+                                (const unsigned char *) "alnum",
+                                (const unsigned char *) "_",
+                                token->type == OP_NOTWORD, err);
+      if (BE (*err != REG_NOERROR && tree == NULL, 0))
+       return NULL;
+      break;
+    case OP_SPACE:
+    case OP_NOTSPACE:
+      tree = build_charclass_op (dfa, regexp->trans,
+                                (const unsigned char *) "space",
+                                (const unsigned char *) "",
+                                token->type == OP_NOTSPACE, err);
+      if (BE (*err != REG_NOERROR && tree == NULL, 0))
+       return NULL;
+      break;
+    case OP_ALT:
+    case END_OF_RE:
+      return NULL;
+    case BACK_SLASH:
+      *err = REG_EESCAPE;
+      return NULL;
+    default:
+      /* Must not happen?  */
+#ifdef DEBUG
+      assert (0);
+#endif
+      return NULL;
+    }
+  fetch_token (token, regexp, syntax);
+
+  while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS
+        || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM)
+    {
+      tree = parse_dup_op (tree, regexp, dfa, token, syntax, err);
+      if (BE (*err != REG_NOERROR && tree == NULL, 0))
+       return NULL;
+      /* In BRE consecutive duplications are not allowed.  */
+      if ((syntax & RE_CONTEXT_INVALID_DUP)
+         && (token->type == OP_DUP_ASTERISK
+             || token->type == OP_OPEN_DUP_NUM))
+       {
+         *err = REG_BADRPT;
+         return NULL;
+       }
+    }
+
+  return tree;
+}
+
+/* This function build the following tree, from regular expression
+   (<reg_exp>):
+        SUBEXP
+           |
+       <reg_exp>
+*/
+
+static bin_tree_t *
+parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
+              reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  bin_tree_t *tree;
+  size_t cur_nsub;
+  cur_nsub = preg->re_nsub++;
+
+  fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE);
+
+  /* The subexpression may be a null string.  */
+  if (token->type == OP_CLOSE_SUBEXP)
+    tree = NULL;
+  else
+    {
+      tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
+      if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
+       *err = REG_EPAREN;
+      if (BE (*err != REG_NOERROR, 0))
+       return NULL;
+    }
+
+  if (cur_nsub <= '9' - '1')
+    dfa->completed_bkref_map |= 1 << cur_nsub;
+
+  tree = create_tree (dfa, tree, NULL, SUBEXP);
+  if (BE (tree == NULL, 0))
+    {
+      *err = REG_ESPACE;
+      return NULL;
+    }
+  tree->token.opr.idx = cur_nsub;
+  return tree;
+}
+
+/* This function parse repetition operators like "*", "+", "{1,3}" etc.  */
+
+static bin_tree_t *
+parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
+             re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err)
+{
+  bin_tree_t *tree = NULL, *old_tree = NULL;
+  Idx i, start, end, start_idx = re_string_cur_idx (regexp);
+  re_token_t start_token = *token;
+
+  if (token->type == OP_OPEN_DUP_NUM)
+    {
+      end = 0;
+      start = fetch_number (regexp, token, syntax);
+      if (start == REG_MISSING)
+       {
+         if (token->type == CHARACTER && token->opr.c == ',')
+           start = 0; /* We treat "{,m}" as "{0,m}".  */
+         else
+           {
+             *err = REG_BADBR; /* <re>{} is invalid.  */
+             return NULL;
+           }
+       }
+      if (BE (start != REG_ERROR, 1))
+       {
+         /* We treat "{n}" as "{n,n}".  */
+         end = ((token->type == OP_CLOSE_DUP_NUM) ? start
+                : ((token->type == CHARACTER && token->opr.c == ',')
+                   ? fetch_number (regexp, token, syntax) : REG_ERROR));
+       }
+      if (BE (start == REG_ERROR || end == REG_ERROR, 0))
+       {
+         /* Invalid sequence.  */
+         if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0))
+           {
+             if (token->type == END_OF_RE)
+               *err = REG_EBRACE;
+             else
+               *err = REG_BADBR;
+
+             return NULL;
+           }
+
+         /* If the syntax bit is set, rollback.  */
+         re_string_set_index (regexp, start_idx);
+         *token = start_token;
+         token->type = CHARACTER;
+         /* mb_partial and word_char bits should be already initialized by
+            peek_token.  */
+         return elem;
+       }
+
+      if (BE ((end != REG_MISSING && start > end)
+             || token->type != OP_CLOSE_DUP_NUM, 0))
+       {
+         /* First number greater than second.  */
+         *err = REG_BADBR;
+         return NULL;
+       }
+    }
+  else
+    {
+      start = (token->type == OP_DUP_PLUS) ? 1 : 0;
+      end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING;
+    }
+
+  fetch_token (token, regexp, syntax);
+
+  if (BE (elem == NULL, 0))
+    return NULL;
+  if (BE (start == 0 && end == 0, 0))
+    {
+      postorder (elem, free_tree, NULL);
+      return NULL;
+    }
+
+  /* Extract "<re>{n,m}" to "<re><re>...<re><re>{0,<m-n>}".  */
+  if (BE (start > 0, 0))
+    {
+      tree = elem;
+      for (i = 2; i <= start; ++i)
+       {
+         elem = duplicate_tree (elem, dfa);
+         tree = create_tree (dfa, tree, elem, CONCAT);
+         if (BE (elem == NULL || tree == NULL, 0))
+           goto parse_dup_op_espace;
+       }
+
+      if (start == end)
+       return tree;
+
+      /* Duplicate ELEM before it is marked optional.  */
+      elem = duplicate_tree (elem, dfa);
+      old_tree = tree;
+    }
+  else
+    old_tree = NULL;
+
+  if (elem->token.type == SUBEXP)
+    postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
+
+  tree = create_tree (dfa, elem, NULL,
+                     (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT));
+  if (BE (tree == NULL, 0))
+    goto parse_dup_op_espace;
+
+/* From gnulib's "intprops.h":
+   True if the arithmetic type T is signed.  */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+  /* This loop is actually executed only when end != REG_MISSING,
+     to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?...  We have
+     already created the start+1-th copy.  */
+  if (TYPE_SIGNED (Idx) || end != REG_MISSING)
+    for (i = start + 2; i <= end; ++i)
+      {
+       elem = duplicate_tree (elem, dfa);
+       tree = create_tree (dfa, tree, elem, CONCAT);
+       if (BE (elem == NULL || tree == NULL, 0))
+         goto parse_dup_op_espace;
+
+       tree = create_tree (dfa, tree, NULL, OP_ALT);
+       if (BE (tree == NULL, 0))
+         goto parse_dup_op_espace;
+      }
+
+  if (old_tree)
+    tree = create_tree (dfa, old_tree, tree, CONCAT);
+
+  return tree;
+
+ parse_dup_op_espace:
+  *err = REG_ESPACE;
+  return NULL;
+}
+
+/* Size of the names for collating symbol/equivalence_class/character_class.
+   I'm not sure, but maybe enough.  */
+#define BRACKET_NAME_BUF_SIZE 32
+
+#ifndef _LIBC
+  /* Local function for parse_bracket_exp only used in case of NOT _LIBC.
+     Build the range expression which starts from START_ELEM, and ends
+     at END_ELEM.  The result are written to MBCSET and SBCSET.
+     RANGE_ALLOC is the allocated size of mbcset->range_starts, and
+     mbcset->range_ends, is a pointer argument sinse we may
+     update it.  */
+
+static reg_errcode_t
+internal_function
+# ifdef RE_ENABLE_I18N
+build_range_exp (const reg_syntax_t syntax,
+                 bitset_t sbcset,
+                 re_charset_t *mbcset,
+                 Idx *range_alloc,
+                 const bracket_elem_t *start_elem,
+                 const bracket_elem_t *end_elem)
+# else /* not RE_ENABLE_I18N */
+build_range_exp (const reg_syntax_t syntax,
+                 bitset_t sbcset,
+                 const bracket_elem_t *start_elem,
+                 const bracket_elem_t *end_elem)
+# endif /* not RE_ENABLE_I18N */
+{
+  unsigned int start_ch, end_ch;
+  /* Equivalence Classes and Character Classes can't be a range start/end.  */
+  if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
+         || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
+         0))
+    return REG_ERANGE;
+
+  /* We can handle no multi character collating elements without libc
+     support.  */
+  if (BE ((start_elem->type == COLL_SYM
+          && strlen ((char *) start_elem->opr.name) > 1)
+         || (end_elem->type == COLL_SYM
+             && strlen ((char *) end_elem->opr.name) > 1), 0))
+    return REG_ECOLLATE;
+
+# ifdef RE_ENABLE_I18N
+  {
+    wchar_t wc;
+    wint_t start_wc;
+    wint_t end_wc;
+    wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'};
+
+    start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch
+               : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0]
+                  : 0));
+    end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch
+             : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
+                : 0));
+    start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM)
+               ? __btowc (start_ch) : start_elem->opr.wch);
+    end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM)
+             ? __btowc (end_ch) : end_elem->opr.wch);
+    if (start_wc == WEOF || end_wc == WEOF)
+      return REG_ECOLLATE;
+    cmp_buf[0] = start_wc;
+    cmp_buf[4] = end_wc;
+
+    if (BE ((syntax & RE_NO_EMPTY_RANGES)
+            && wcscoll (cmp_buf, cmp_buf + 4) > 0, 0))
+      return REG_ERANGE;
+
+    /* Got valid collation sequence values, add them as a new entry.
+       However, for !_LIBC we have no collation elements: if the
+       character set is single byte, the single byte character set
+       that we build below suffices.  parse_bracket_exp passes
+       no MBCSET if dfa->mb_cur_max == 1.  */
+    if (mbcset)
+      {
+       /* Check the space of the arrays.  */
+       if (BE (*range_alloc == mbcset->nranges, 0))
+         {
+           /* There is not enough space, need realloc.  */
+           wchar_t *new_array_start, *new_array_end;
+           Idx new_nranges;
+
+           /* +1 in case of mbcset->nranges is 0.  */
+           new_nranges = 2 * mbcset->nranges + 1;
+           /* Use realloc since mbcset->range_starts and mbcset->range_ends
+              are NULL if *range_alloc == 0.  */
+           new_array_start = re_realloc (mbcset->range_starts, wchar_t,
+                                         new_nranges);
+           new_array_end = re_realloc (mbcset->range_ends, wchar_t,
+                                       new_nranges);
+
+           if (BE (new_array_start == NULL || new_array_end == NULL, 0))
+             return REG_ESPACE;
+
+           mbcset->range_starts = new_array_start;
+           mbcset->range_ends = new_array_end;
+           *range_alloc = new_nranges;
+         }
+
+       mbcset->range_starts[mbcset->nranges] = start_wc;
+       mbcset->range_ends[mbcset->nranges++] = end_wc;
+      }
+
+    /* Build the table for single byte characters.  */
+    for (wc = 0; wc < SBC_MAX; ++wc)
+      {
+       cmp_buf[2] = wc;
+       if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
+           && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
+         bitset_set (sbcset, wc);
+      }
+  }
+# else /* not RE_ENABLE_I18N */
+  {
+    unsigned int ch;
+    start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch
+               : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0]
+                  : 0));
+    end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch
+             : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
+                : 0));
+    if (start_ch > end_ch)
+      return REG_ERANGE;
+    /* Build the table for single byte characters.  */
+    for (ch = 0; ch < SBC_MAX; ++ch)
+      if (start_ch <= ch  && ch <= end_ch)
+       bitset_set (sbcset, ch);
+  }
+# endif /* not RE_ENABLE_I18N */
+  return REG_NOERROR;
+}
+#endif /* not _LIBC */
+
+#ifndef _LIBC
+/* Helper function for parse_bracket_exp only used in case of NOT _LIBC..
+   Build the collating element which is represented by NAME.
+   The result are written to MBCSET and SBCSET.
+   COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
+   pointer argument since we may update it.  */
+
+static reg_errcode_t
+internal_function
+build_collating_symbol (bitset_t sbcset,
+# ifdef RE_ENABLE_I18N
+                       re_charset_t *mbcset, Idx *coll_sym_alloc,
+# endif
+                       const unsigned char *name)
+{
+  size_t name_len = strlen ((const char *) name);
+  if (BE (name_len != 1, 0))
+    return REG_ECOLLATE;
+  else
+    {
+      bitset_set (sbcset, name[0]);
+      return REG_NOERROR;
+    }
+}
+#endif /* not _LIBC */
+
+/* This function parse bracket expression like "[abc]", "[a-c]",
+   "[[.a-a.]]" etc.  */
+
+static bin_tree_t *
+parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
+                  reg_syntax_t syntax, reg_errcode_t *err)
+{
+#ifdef _LIBC
+  const unsigned char *collseqmb;
+  const char *collseqwc;
+  uint32_t nrules;
+  int32_t table_size;
+  const int32_t *symb_table;
+  const unsigned char *extra;
+
+  /* Local function for parse_bracket_exp used in _LIBC environement.
+     Seek the collating symbol entry correspondings to NAME.
+     Return the index of the symbol in the SYMB_TABLE.  */
+
+  auto inline int32_t
+  __attribute ((always_inline))
+  seek_collating_symbol_entry (name, name_len)
+        const unsigned char *name;
+        size_t name_len;
+    {
+      int32_t hash = elem_hash ((const char *) name, name_len);
+      int32_t elem = hash % table_size;
+      if (symb_table[2 * elem] != 0)
+       {
+         int32_t second = hash % (table_size - 2) + 1;
+
+         do
+           {
+             /* First compare the hashing value.  */
+             if (symb_table[2 * elem] == hash
+                 /* Compare the length of the name.  */
+                 && name_len == extra[symb_table[2 * elem + 1]]
+                 /* Compare the name.  */
+                 && memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
+                            name_len) == 0)
+               {
+                 /* Yep, this is the entry.  */
+                 break;
+               }
+
+             /* Next entry.  */
+             elem += second;
+           }
+         while (symb_table[2 * elem] != 0);
+       }
+      return elem;
+    }
+
+  /* Local function for parse_bracket_exp used in _LIBC environment.
+     Look up the collation sequence value of BR_ELEM.
+     Return the value if succeeded, UINT_MAX otherwise.  */
+
+  auto inline unsigned int
+  __attribute ((always_inline))
+  lookup_collation_sequence_value (br_elem)
+        bracket_elem_t *br_elem;
+    {
+      if (br_elem->type == SB_CHAR)
+       {
+         /*
+         if (MB_CUR_MAX == 1)
+         */
+         if (nrules == 0)
+           return collseqmb[br_elem->opr.ch];
+         else
+           {
+             wint_t wc = __btowc (br_elem->opr.ch);
+             return __collseq_table_lookup (collseqwc, wc);
+           }
+       }
+      else if (br_elem->type == MB_CHAR)
+       {
+         if (nrules != 0)
+           return __collseq_table_lookup (collseqwc, br_elem->opr.wch);
+       }
+      else if (br_elem->type == COLL_SYM)
+       {
+         size_t sym_name_len = strlen ((char *) br_elem->opr.name);
+         if (nrules != 0)
+           {
+             int32_t elem, idx;
+             elem = seek_collating_symbol_entry (br_elem->opr.name,
+                                                 sym_name_len);
+             if (symb_table[2 * elem] != 0)
+               {
+                 /* We found the entry.  */
+                 idx = symb_table[2 * elem + 1];
+                 /* Skip the name of collating element name.  */
+                 idx += 1 + extra[idx];
+                 /* Skip the byte sequence of the collating element.  */
+                 idx += 1 + extra[idx];
+                 /* Adjust for the alignment.  */
+                 idx = (idx + 3) & ~3;
+                 /* Skip the multibyte collation sequence value.  */
+                 idx += sizeof (unsigned int);
+                 /* Skip the wide char sequence of the collating element.  */
+                 idx += sizeof (unsigned int) *
+                   (1 + *(unsigned int *) (extra + idx));
+                 /* Return the collation sequence value.  */
+                 return *(unsigned int *) (extra + idx);
+               }
+             else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
+               {
+                 /* No valid character.  Match it as a single byte
+                    character.  */
+                 return collseqmb[br_elem->opr.name[0]];
+               }
+           }
+         else if (sym_name_len == 1)
+           return collseqmb[br_elem->opr.name[0]];
+       }
+      return UINT_MAX;
+    }
+
+  /* Local function for parse_bracket_exp used in _LIBC environement.
+     Build the range expression which starts from START_ELEM, and ends
+     at END_ELEM.  The result are written to MBCSET and SBCSET.
+     RANGE_ALLOC is the allocated size of mbcset->range_starts, and
+     mbcset->range_ends, is a pointer argument sinse we may
+     update it.  */
+
+  auto inline reg_errcode_t
+  __attribute ((always_inline))
+  build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
+        re_charset_t *mbcset;
+        Idx *range_alloc;
+        bitset_t sbcset;
+        bracket_elem_t *start_elem, *end_elem;
+    {
+      unsigned int ch;
+      uint32_t start_collseq;
+      uint32_t end_collseq;
+
+      /* Equivalence Classes and Character Classes can't be a range
+        start/end.  */
+      if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
+             || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
+             0))
+       return REG_ERANGE;
+
+      start_collseq = lookup_collation_sequence_value (start_elem);
+      end_collseq = lookup_collation_sequence_value (end_elem);
+      /* Check start/end collation sequence values.  */
+      if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0))
+       return REG_ECOLLATE;
+      if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0))
+       return REG_ERANGE;
+
+      /* Got valid collation sequence values, add them as a new entry.
+        However, if we have no collation elements, and the character set
+        is single byte, the single byte character set that we
+        build below suffices. */
+      if (nrules > 0 || dfa->mb_cur_max > 1)
+       {
+         /* Check the space of the arrays.  */
+         if (BE (*range_alloc == mbcset->nranges, 0))
+           {
+             /* There is not enough space, need realloc.  */
+             uint32_t *new_array_start;
+             uint32_t *new_array_end;
+             Idx new_nranges;
+
+             /* +1 in case of mbcset->nranges is 0.  */
+             new_nranges = 2 * mbcset->nranges + 1;
+             new_array_start = re_realloc (mbcset->range_starts, uint32_t,
+                                           new_nranges);
+             new_array_end = re_realloc (mbcset->range_ends, uint32_t,
+                                         new_nranges);
+
+             if (BE (new_array_start == NULL || new_array_end == NULL, 0))
+               return REG_ESPACE;
+
+             mbcset->range_starts = new_array_start;
+             mbcset->range_ends = new_array_end;
+             *range_alloc = new_nranges;
+           }
+
+         mbcset->range_starts[mbcset->nranges] = start_collseq;
+         mbcset->range_ends[mbcset->nranges++] = end_collseq;
+       }
+
+      /* Build the table for single byte characters.  */
+      for (ch = 0; ch < SBC_MAX; ch++)
+       {
+         uint32_t ch_collseq;
+         /*
+         if (MB_CUR_MAX == 1)
+         */
+         if (nrules == 0)
+           ch_collseq = collseqmb[ch];
+         else
+           ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
+         if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
+           bitset_set (sbcset, ch);
+       }
+      return REG_NOERROR;
+    }
+
+  /* Local function for parse_bracket_exp used in _LIBC environement.
+     Build the collating element which is represented by NAME.
+     The result are written to MBCSET and SBCSET.
+     COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
+     pointer argument sinse we may update it.  */
+
+  auto inline reg_errcode_t
+  __attribute ((always_inline))
+  build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
+        re_charset_t *mbcset;
+        Idx *coll_sym_alloc;
+        bitset_t sbcset;
+        const unsigned char *name;
+    {
+      int32_t elem, idx;
+      size_t name_len = strlen ((const char *) name);
+      if (nrules != 0)
+       {
+         elem = seek_collating_symbol_entry (name, name_len);
+         if (symb_table[2 * elem] != 0)
+           {
+             /* We found the entry.  */
+             idx = symb_table[2 * elem + 1];
+             /* Skip the name of collating element name.  */
+             idx += 1 + extra[idx];
+           }
+         else if (symb_table[2 * elem] == 0 && name_len == 1)
+           {
+             /* No valid character, treat it as a normal
+                character.  */
+             bitset_set (sbcset, name[0]);
+             return REG_NOERROR;
+           }
+         else
+           return REG_ECOLLATE;
+
+         /* Got valid collation sequence, add it as a new entry.  */
+         /* Check the space of the arrays.  */
+         if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0))
+           {
+             /* Not enough, realloc it.  */
+             /* +1 in case of mbcset->ncoll_syms is 0.  */
+             Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
+             /* Use realloc since mbcset->coll_syms is NULL
+                if *alloc == 0.  */
+             int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t,
+                                                  new_coll_sym_alloc);
+             if (BE (new_coll_syms == NULL, 0))
+               return REG_ESPACE;
+             mbcset->coll_syms = new_coll_syms;
+             *coll_sym_alloc = new_coll_sym_alloc;
+           }
+         mbcset->coll_syms[mbcset->ncoll_syms++] = idx;
+         return REG_NOERROR;
+       }
+      else
+       {
+         if (BE (name_len != 1, 0))
+           return REG_ECOLLATE;
+         else
+           {
+             bitset_set (sbcset, name[0]);
+             return REG_NOERROR;
+           }
+       }
+    }
+#endif
+
+  re_token_t br_token;
+  re_bitset_ptr_t sbcset;
+#ifdef RE_ENABLE_I18N
+  re_charset_t *mbcset;
+  Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0;
+  Idx equiv_class_alloc = 0, char_class_alloc = 0;
+#endif /* not RE_ENABLE_I18N */
+  bool non_match = false;
+  bin_tree_t *work_tree;
+  int token_len;
+  bool first_round = true;
+#ifdef _LIBC
+  collseqmb = (const unsigned char *)
+    _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+  nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+  if (nrules)
+    {
+      /*
+      if (MB_CUR_MAX > 1)
+      */
+      collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+      table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB);
+      symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+                                                 _NL_COLLATE_SYMB_TABLEMB);
+      extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
+                                                  _NL_COLLATE_SYMB_EXTRAMB);
+    }
+#endif
+  sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
+#ifdef RE_ENABLE_I18N
+  mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
+#endif /* RE_ENABLE_I18N */
+#ifdef RE_ENABLE_I18N
+  if (BE (sbcset == NULL || mbcset == NULL, 0))
+#else
+  if (BE (sbcset == NULL, 0))
+#endif /* RE_ENABLE_I18N */
+    {
+      *err = REG_ESPACE;
+      return NULL;
+    }
+
+  token_len = peek_token_bracket (token, regexp, syntax);
+  if (BE (token->type == END_OF_RE, 0))
+    {
+      *err = REG_BADPAT;
+      goto parse_bracket_exp_free_return;
+    }
+  if (token->type == OP_NON_MATCH_LIST)
+    {
+#ifdef RE_ENABLE_I18N
+      mbcset->non_match = 1;
+#endif /* not RE_ENABLE_I18N */
+      non_match = true;
+      if (syntax & RE_HAT_LISTS_NOT_NEWLINE)
+       bitset_set (sbcset, '\n');
+      re_string_skip_bytes (regexp, token_len); /* Skip a token.  */
+      token_len = peek_token_bracket (token, regexp, syntax);
+      if (BE (token->type == END_OF_RE, 0))
+       {
+         *err = REG_BADPAT;
+         goto parse_bracket_exp_free_return;
+       }
+    }
+
+  /* We treat the first ']' as a normal character.  */
+  if (token->type == OP_CLOSE_BRACKET)
+    token->type = CHARACTER;
+
+  while (1)
+    {
+      bracket_elem_t start_elem, end_elem;
+      unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE];
+      unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE];
+      reg_errcode_t ret;
+      int token_len2 = 0;
+      bool is_range_exp = false;
+      re_token_t token2;
+
+      start_elem.opr.name = start_name_buf;
+      ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa,
+                                  syntax, first_round);
+      if (BE (ret != REG_NOERROR, 0))
+       {
+         *err = ret;
+         goto parse_bracket_exp_free_return;
+       }
+      first_round = false;
+
+      /* Get information about the next token.  We need it in any case.  */
+      token_len = peek_token_bracket (token, regexp, syntax);
+
+      /* Do not check for ranges if we know they are not allowed.  */
+      if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS)
+       {
+         if (BE (token->type == END_OF_RE, 0))
+           {
+             *err = REG_EBRACK;
+             goto parse_bracket_exp_free_return;
+           }
+         if (token->type == OP_CHARSET_RANGE)
+           {
+             re_string_skip_bytes (regexp, token_len); /* Skip '-'.  */
+             token_len2 = peek_token_bracket (&token2, regexp, syntax);
+             if (BE (token2.type == END_OF_RE, 0))
+               {
+                 *err = REG_EBRACK;
+                 goto parse_bracket_exp_free_return;
+               }
+             if (token2.type == OP_CLOSE_BRACKET)
+               {
+                 /* We treat the last '-' as a normal character.  */
+                 re_string_skip_bytes (regexp, -token_len);
+                 token->type = CHARACTER;
+               }
+             else
+               is_range_exp = true;
+           }
+       }
+
+      if (is_range_exp == true)
+       {
+         end_elem.opr.name = end_name_buf;
+         ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2,
+                                      dfa, syntax, true);
+         if (BE (ret != REG_NOERROR, 0))
+           {
+             *err = ret;
+             goto parse_bracket_exp_free_return;
+           }
+
+         token_len = peek_token_bracket (token, regexp, syntax);
+
+#ifdef _LIBC
+         *err = build_range_exp (sbcset, mbcset, &range_alloc,
+                                 &start_elem, &end_elem);
+#else
+# ifdef RE_ENABLE_I18N
+         *err = build_range_exp (syntax, sbcset,
+                                 dfa->mb_cur_max > 1 ? mbcset : NULL,
+                                 &range_alloc, &start_elem, &end_elem);
+# else
+         *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem);
+# endif
+#endif /* RE_ENABLE_I18N */
+         if (BE (*err != REG_NOERROR, 0))
+           goto parse_bracket_exp_free_return;
+       }
+      else
+       {
+         switch (start_elem.type)
+           {
+           case SB_CHAR:
+             bitset_set (sbcset, start_elem.opr.ch);
+             break;
+#ifdef RE_ENABLE_I18N
+           case MB_CHAR:
+             /* Check whether the array has enough space.  */
+             if (BE (mbchar_alloc == mbcset->nmbchars, 0))
+               {
+                 wchar_t *new_mbchars;
+                 /* Not enough, realloc it.  */
+                 /* +1 in case of mbcset->nmbchars is 0.  */
+                 mbchar_alloc = 2 * mbcset->nmbchars + 1;
+                 /* Use realloc since array is NULL if *alloc == 0.  */
+                 new_mbchars = re_realloc (mbcset->mbchars, wchar_t,
+                                           mbchar_alloc);
+                 if (BE (new_mbchars == NULL, 0))
+                   goto parse_bracket_exp_espace;
+                 mbcset->mbchars = new_mbchars;
+               }
+             mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch;
+             break;
+#endif /* RE_ENABLE_I18N */
+           case EQUIV_CLASS:
+             *err = build_equiv_class (sbcset,
+#ifdef RE_ENABLE_I18N
+                                       mbcset, &equiv_class_alloc,
+#endif /* RE_ENABLE_I18N */
+                                       start_elem.opr.name);
+             if (BE (*err != REG_NOERROR, 0))
+               goto parse_bracket_exp_free_return;
+             break;
+           case COLL_SYM:
+             *err = build_collating_symbol (sbcset,
+#ifdef RE_ENABLE_I18N
+                                            mbcset, &coll_sym_alloc,
+#endif /* RE_ENABLE_I18N */
+                                            start_elem.opr.name);
+             if (BE (*err != REG_NOERROR, 0))
+               goto parse_bracket_exp_free_return;
+             break;
+           case CHAR_CLASS:
+             *err = build_charclass (regexp->trans, sbcset,
+#ifdef RE_ENABLE_I18N
+                                     mbcset, &char_class_alloc,
+#endif /* RE_ENABLE_I18N */
+                                     start_elem.opr.name, syntax);
+             if (BE (*err != REG_NOERROR, 0))
+              goto parse_bracket_exp_free_return;
+             break;
+           default:
+             assert (0);
+             break;
+           }
+       }
+      if (BE (token->type == END_OF_RE, 0))
+       {
+         *err = REG_EBRACK;
+         goto parse_bracket_exp_free_return;
+       }
+      if (token->type == OP_CLOSE_BRACKET)
+       break;
+    }
+
+  re_string_skip_bytes (regexp, token_len); /* Skip a token.  */
+
+  /* If it is non-matching list.  */
+  if (non_match)
+    bitset_not (sbcset);
+
+#ifdef RE_ENABLE_I18N
+  /* Ensure only single byte characters are set.  */
+  if (dfa->mb_cur_max > 1)
+    bitset_mask (sbcset, dfa->sb_char);
+
+  if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes
+      || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes
+                                                    || mbcset->non_match)))
+    {
+      bin_tree_t *mbc_tree;
+      int sbc_idx;
+      /* Build a tree for complex bracket.  */
+      dfa->has_mb_node = 1;
+      br_token.type = COMPLEX_BRACKET;
+      br_token.opr.mbcset = mbcset;
+      mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+      if (BE (mbc_tree == NULL, 0))
+       goto parse_bracket_exp_espace;
+      for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx)
+       if (sbcset[sbc_idx])
+         break;
+      /* If there are no bits set in sbcset, there is no point
+        of having both SIMPLE_BRACKET and COMPLEX_BRACKET.  */
+      if (sbc_idx < BITSET_WORDS)
+       {
+         /* Build a tree for simple bracket.  */
+         br_token.type = SIMPLE_BRACKET;
+         br_token.opr.sbcset = sbcset;
+         work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+         if (BE (work_tree == NULL, 0))
+           goto parse_bracket_exp_espace;
+
+         /* Then join them by ALT node.  */
+         work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT);
+         if (BE (work_tree == NULL, 0))
+           goto parse_bracket_exp_espace;
+       }
+      else
+       {
+         re_free (sbcset);
+         work_tree = mbc_tree;
+       }
+    }
+  else
+#endif /* not RE_ENABLE_I18N */
+    {
+#ifdef RE_ENABLE_I18N
+      free_charset (mbcset);
+#endif
+      /* Build a tree for simple bracket.  */
+      br_token.type = SIMPLE_BRACKET;
+      br_token.opr.sbcset = sbcset;
+      work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+      if (BE (work_tree == NULL, 0))
+       goto parse_bracket_exp_espace;
+    }
+  return work_tree;
+
+ parse_bracket_exp_espace:
+  *err = REG_ESPACE;
+ parse_bracket_exp_free_return:
+  re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+  free_charset (mbcset);
+#endif /* RE_ENABLE_I18N */
+  return NULL;
+}
+
+/* Parse an element in the bracket expression.  */
+
+static reg_errcode_t
+parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
+                      re_token_t *token, int token_len, re_dfa_t *dfa,
+                      reg_syntax_t syntax, bool accept_hyphen)
+{
+#ifdef RE_ENABLE_I18N
+  int cur_char_size;
+  cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp));
+  if (cur_char_size > 1)
+    {
+      elem->type = MB_CHAR;
+      elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp));
+      re_string_skip_bytes (regexp, cur_char_size);
+      return REG_NOERROR;
+    }
+#endif /* RE_ENABLE_I18N */
+  re_string_skip_bytes (regexp, token_len); /* Skip a token.  */
+  if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS
+      || token->type == OP_OPEN_EQUIV_CLASS)
+    return parse_bracket_symbol (elem, regexp, token);
+  if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen)
+    {
+      /* A '-' must only appear as anything but a range indicator before
+        the closing bracket.  Everything else is an error.  */
+      re_token_t token2;
+      (void) peek_token_bracket (&token2, regexp, syntax);
+      if (token2.type != OP_CLOSE_BRACKET)
+       /* The actual error value is not standardized since this whole
+          case is undefined.  But ERANGE makes good sense.  */
+       return REG_ERANGE;
+    }
+  elem->type = SB_CHAR;
+  elem->opr.ch = token->opr.c;
+  return REG_NOERROR;
+}
+
+/* Parse a bracket symbol in the bracket expression.  Bracket symbols are
+   such as [:<character_class>:], [.<collating_element>.], and
+   [=<equivalent_class>=].  */
+
+static reg_errcode_t
+parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
+                     re_token_t *token)
+{
+  unsigned char ch, delim = token->opr.c;
+  int i = 0;
+  if (re_string_eoi(regexp))
+    return REG_EBRACK;
+  for (;; ++i)
+    {
+      if (i >= BRACKET_NAME_BUF_SIZE)
+       return REG_EBRACK;
+      if (token->type == OP_OPEN_CHAR_CLASS)
+       ch = re_string_fetch_byte_case (regexp);
+      else
+       ch = re_string_fetch_byte (regexp);
+      if (re_string_eoi(regexp))
+       return REG_EBRACK;
+      if (ch == delim && re_string_peek_byte (regexp, 0) == ']')
+       break;
+      elem->opr.name[i] = ch;
+    }
+  re_string_skip_bytes (regexp, 1);
+  elem->opr.name[i] = '\0';
+  switch (token->type)
+    {
+    case OP_OPEN_COLL_ELEM:
+      elem->type = COLL_SYM;
+      break;
+    case OP_OPEN_EQUIV_CLASS:
+      elem->type = EQUIV_CLASS;
+      break;
+    case OP_OPEN_CHAR_CLASS:
+      elem->type = CHAR_CLASS;
+      break;
+    default:
+      break;
+    }
+  return REG_NOERROR;
+}
+
+  /* Helper function for parse_bracket_exp.
+     Build the equivalence class which is represented by NAME.
+     The result are written to MBCSET and SBCSET.
+     EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes,
+     is a pointer argument sinse we may update it.  */
+
+static reg_errcode_t
+#ifdef RE_ENABLE_I18N
+build_equiv_class (bitset_t sbcset, re_charset_t *mbcset,
+                  Idx *equiv_class_alloc, const unsigned char *name)
+#else /* not RE_ENABLE_I18N */
+build_equiv_class (bitset_t sbcset, const unsigned char *name)
+#endif /* not RE_ENABLE_I18N */
+{
+#ifdef _LIBC
+  uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+  if (nrules != 0)
+    {
+      const int32_t *table, *indirect;
+      const unsigned char *weights, *extra, *cp;
+      unsigned char char_buf[2];
+      int32_t idx1, idx2;
+      unsigned int ch;
+      size_t len;
+      /* This #include defines a local function!  */
+# include <locale/weight.h>
+      /* Calculate the index for equivalence class.  */
+      cp = name;
+      table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+      weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
+                                              _NL_COLLATE_WEIGHTMB);
+      extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
+                                                  _NL_COLLATE_EXTRAMB);
+      indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+                                               _NL_COLLATE_INDIRECTMB);
+      idx1 = findidx (&cp);
+      if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
+       /* This isn't a valid character.  */
+       return REG_ECOLLATE;
+
+      /* Build single byte matcing table for this equivalence class.  */
+      char_buf[1] = (unsigned char) '\0';
+      len = weights[idx1 & 0xffffff];
+      for (ch = 0; ch < SBC_MAX; ++ch)
+       {
+         char_buf[0] = ch;
+         cp = char_buf;
+         idx2 = findidx (&cp);
+/*
+         idx2 = table[ch];
+*/
+         if (idx2 == 0)
+           /* This isn't a valid character.  */
+           continue;
+         /* Compare only if the length matches and the collation rule
+            index is the same.  */
+         if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24))
+           {
+             int cnt = 0;
+
+             while (cnt <= len &&
+                    weights[(idx1 & 0xffffff) + 1 + cnt]
+                    == weights[(idx2 & 0xffffff) + 1 + cnt])
+               ++cnt;
+
+             if (cnt > len)
+               bitset_set (sbcset, ch);
+           }
+       }
+      /* Check whether the array has enough space.  */
+      if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0))
+       {
+         /* Not enough, realloc it.  */
+         /* +1 in case of mbcset->nequiv_classes is 0.  */
+         Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1;
+         /* Use realloc since the array is NULL if *alloc == 0.  */
+         int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes,
+                                                  int32_t,
+                                                  new_equiv_class_alloc);
+         if (BE (new_equiv_classes == NULL, 0))
+           return REG_ESPACE;
+         mbcset->equiv_classes = new_equiv_classes;
+         *equiv_class_alloc = new_equiv_class_alloc;
+       }
+      mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1;
+    }
+  else
+#endif /* _LIBC */
+    {
+      if (BE (strlen ((const char *) name) != 1, 0))
+       return REG_ECOLLATE;
+      bitset_set (sbcset, *name);
+    }
+  return REG_NOERROR;
+}
+
+  /* Helper function for parse_bracket_exp.
+     Build the character class which is represented by NAME.
+     The result are written to MBCSET and SBCSET.
+     CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes,
+     is a pointer argument sinse we may update it.  */
+
+static reg_errcode_t
+#ifdef RE_ENABLE_I18N
+build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
+                re_charset_t *mbcset, Idx *char_class_alloc,
+                const unsigned char *class_name, reg_syntax_t syntax)
+#else /* not RE_ENABLE_I18N */
+build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
+                const unsigned char *class_name, reg_syntax_t syntax)
+#endif /* not RE_ENABLE_I18N */
+{
+  int i;
+  const char *name = (const char *) class_name;
+
+  /* In case of REG_ICASE "upper" and "lower" match the both of
+     upper and lower cases.  */
+  if ((syntax & RE_ICASE)
+      && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0))
+    name = "alpha";
+
+#ifdef RE_ENABLE_I18N
+  /* Check the space of the arrays.  */
+  if (BE (*char_class_alloc == mbcset->nchar_classes, 0))
+    {
+      /* Not enough, realloc it.  */
+      /* +1 in case of mbcset->nchar_classes is 0.  */
+      Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1;
+      /* Use realloc since array is NULL if *alloc == 0.  */
+      wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t,
+                                              new_char_class_alloc);
+      if (BE (new_char_classes == NULL, 0))
+       return REG_ESPACE;
+      mbcset->char_classes = new_char_classes;
+      *char_class_alloc = new_char_class_alloc;
+    }
+  mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name);
+#endif /* RE_ENABLE_I18N */
+
+#define BUILD_CHARCLASS_LOOP(ctype_func)       \
+  do {                                         \
+    if (BE (trans != NULL, 0))                 \
+      {                                                \
+       for (i = 0; i < SBC_MAX; ++i)           \
+         if (ctype_func (i))                   \
+           bitset_set (sbcset, trans[i]);      \
+      }                                                \
+    else                                       \
+      {                                                \
+       for (i = 0; i < SBC_MAX; ++i)           \
+         if (ctype_func (i))                   \
+           bitset_set (sbcset, i);             \
+      }                                                \
+  } while (0)
+
+  if (strcmp (name, "alnum") == 0)
+    BUILD_CHARCLASS_LOOP (isalnum);
+  else if (strcmp (name, "cntrl") == 0)
+    BUILD_CHARCLASS_LOOP (iscntrl);
+  else if (strcmp (name, "lower") == 0)
+    BUILD_CHARCLASS_LOOP (islower);
+  else if (strcmp (name, "space") == 0)
+    BUILD_CHARCLASS_LOOP (isspace);
+  else if (strcmp (name, "alpha") == 0)
+    BUILD_CHARCLASS_LOOP (isalpha);
+  else if (strcmp (name, "digit") == 0)
+    BUILD_CHARCLASS_LOOP (isdigit);
+  else if (strcmp (name, "print") == 0)
+    BUILD_CHARCLASS_LOOP (isprint);
+  else if (strcmp (name, "upper") == 0)
+    BUILD_CHARCLASS_LOOP (isupper);
+  else if (strcmp (name, "blank") == 0)
+    BUILD_CHARCLASS_LOOP (isblank);
+  else if (strcmp (name, "graph") == 0)
+    BUILD_CHARCLASS_LOOP (isgraph);
+  else if (strcmp (name, "punct") == 0)
+    BUILD_CHARCLASS_LOOP (ispunct);
+  else if (strcmp (name, "xdigit") == 0)
+    BUILD_CHARCLASS_LOOP (isxdigit);
+  else
+    return REG_ECTYPE;
+
+  return REG_NOERROR;
+}
+
+static bin_tree_t *
+build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
+                   const unsigned char *class_name,
+                   const unsigned char *extra, bool non_match,
+                   reg_errcode_t *err)
+{
+  re_bitset_ptr_t sbcset;
+#ifdef RE_ENABLE_I18N
+  re_charset_t *mbcset;
+  Idx alloc = 0;
+#endif /* not RE_ENABLE_I18N */
+  reg_errcode_t ret;
+  re_token_t br_token;
+  bin_tree_t *tree;
+
+  sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
+#ifdef RE_ENABLE_I18N
+  mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
+#endif /* RE_ENABLE_I18N */
+
+#ifdef RE_ENABLE_I18N
+  if (BE (sbcset == NULL || mbcset == NULL, 0))
+#else /* not RE_ENABLE_I18N */
+  if (BE (sbcset == NULL, 0))
+#endif /* not RE_ENABLE_I18N */
+    {
+      *err = REG_ESPACE;
+      return NULL;
+    }
+
+  if (non_match)
+    {
+#ifdef RE_ENABLE_I18N
+      mbcset->non_match = 1;
+#endif /* not RE_ENABLE_I18N */
+    }
+
+  /* We don't care the syntax in this case.  */
+  ret = build_charclass (trans, sbcset,
+#ifdef RE_ENABLE_I18N
+                        mbcset, &alloc,
+#endif /* RE_ENABLE_I18N */
+                        class_name, 0);
+
+  if (BE (ret != REG_NOERROR, 0))
+    {
+      re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+      free_charset (mbcset);
+#endif /* RE_ENABLE_I18N */
+      *err = ret;
+      return NULL;
+    }
+  /* \w match '_' also.  */
+  for (; *extra; extra++)
+    bitset_set (sbcset, *extra);
+
+  /* If it is non-matching list.  */
+  if (non_match)
+    bitset_not (sbcset);
+
+#ifdef RE_ENABLE_I18N
+  /* Ensure only single byte characters are set.  */
+  if (dfa->mb_cur_max > 1)
+    bitset_mask (sbcset, dfa->sb_char);
+#endif
+
+  /* Build a tree for simple bracket.  */
+  br_token.type = SIMPLE_BRACKET;
+  br_token.opr.sbcset = sbcset;
+  tree = create_token_tree (dfa, NULL, NULL, &br_token);
+  if (BE (tree == NULL, 0))
+    goto build_word_op_espace;
+
+#ifdef RE_ENABLE_I18N
+  if (dfa->mb_cur_max > 1)
+    {
+      bin_tree_t *mbc_tree;
+      /* Build a tree for complex bracket.  */
+      br_token.type = COMPLEX_BRACKET;
+      br_token.opr.mbcset = mbcset;
+      dfa->has_mb_node = 1;
+      mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+      if (BE (mbc_tree == NULL, 0))
+       goto build_word_op_espace;
+      /* Then join them by ALT node.  */
+      tree = create_tree (dfa, tree, mbc_tree, OP_ALT);
+      if (BE (mbc_tree != NULL, 1))
+       return tree;
+    }
+  else
+    {
+      free_charset (mbcset);
+      return tree;
+    }
+#else /* not RE_ENABLE_I18N */
+  return tree;
+#endif /* not RE_ENABLE_I18N */
+
+ build_word_op_espace:
+  re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+  free_charset (mbcset);
+#endif /* RE_ENABLE_I18N */
+  *err = REG_ESPACE;
+  return NULL;
+}
+
+/* This is intended for the expressions like "a{1,3}".
+   Fetch a number from `input', and return the number.
+   Return REG_MISSING if the number field is empty like "{,1}".
+   Return REG_ERROR if an error occurred.  */
+
+static Idx
+fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
+{
+  Idx num = REG_MISSING;
+  unsigned char c;
+  while (1)
+    {
+      fetch_token (token, input, syntax);
+      c = token->opr.c;
+      if (BE (token->type == END_OF_RE, 0))
+       return REG_ERROR;
+      if (token->type == OP_CLOSE_DUP_NUM || c == ',')
+       break;
+      num = ((token->type != CHARACTER || c < '0' || '9' < c
+             || num == REG_ERROR)
+            ? REG_ERROR
+            : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0'));
+      num = (num > RE_DUP_MAX) ? REG_ERROR : num;
+    }
+  return num;
+}
+\f
+#ifdef RE_ENABLE_I18N
+static void
+free_charset (re_charset_t *cset)
+{
+  re_free (cset->mbchars);
+# ifdef _LIBC
+  re_free (cset->coll_syms);
+  re_free (cset->equiv_classes);
+  re_free (cset->range_starts);
+  re_free (cset->range_ends);
+# endif
+  re_free (cset->char_classes);
+  re_free (cset);
+}
+#endif /* RE_ENABLE_I18N */
+\f
+/* Functions for binary tree operation.  */
+
+/* Create a tree node.  */
+
+static bin_tree_t *
+create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
+            re_token_type_t type)
+{
+  re_token_t t;
+  t.type = type;
+  return create_token_tree (dfa, left, right, &t);
+}
+
+static bin_tree_t *
+create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
+                  const re_token_t *token)
+{
+  bin_tree_t *tree;
+  if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0))
+    {
+      bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1);
+
+      if (storage == NULL)
+       return NULL;
+      storage->next = dfa->str_tree_storage;
+      dfa->str_tree_storage = storage;
+      dfa->str_tree_storage_idx = 0;
+    }
+  tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++];
+
+  tree->parent = NULL;
+  tree->left = left;
+  tree->right = right;
+  tree->token = *token;
+  tree->token.duplicated = 0;
+  tree->token.opt_subexp = 0;
+  tree->first = NULL;
+  tree->next = NULL;
+  tree->node_idx = REG_MISSING;
+
+  if (left != NULL)
+    left->parent = tree;
+  if (right != NULL)
+    right->parent = tree;
+  return tree;
+}
+
+/* Mark the tree SRC as an optional subexpression.
+   To be called from preorder or postorder.  */
+
+static reg_errcode_t
+mark_opt_subexp (void *extra, bin_tree_t *node)
+{
+  Idx idx = (Idx) (long) extra;
+  if (node->token.type == SUBEXP && node->token.opr.idx == idx)
+    node->token.opt_subexp = 1;
+
+  return REG_NOERROR;
+}
+
+/* Free the allocated memory inside NODE. */
+
+static void
+free_token (re_token_t *node)
+{
+#ifdef RE_ENABLE_I18N
+  if (node->type == COMPLEX_BRACKET && node->duplicated == 0)
+    free_charset (node->opr.mbcset);
+  else
+#endif /* RE_ENABLE_I18N */
+    if (node->type == SIMPLE_BRACKET && node->duplicated == 0)
+      re_free (node->opr.sbcset);
+}
+
+/* Worker function for tree walking.  Free the allocated memory inside NODE
+   and its children. */
+
+static reg_errcode_t
+free_tree (void *extra, bin_tree_t *node)
+{
+  free_token (&node->token);
+  return REG_NOERROR;
+}
+
+
+/* Duplicate the node SRC, and return new node.  This is a preorder
+   visit similar to the one implemented by the generic visitor, but
+   we need more infrastructure to maintain two parallel trees --- so,
+   it's easier to duplicate.  */
+
+static bin_tree_t *
+duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa)
+{
+  const bin_tree_t *node;
+  bin_tree_t *dup_root;
+  bin_tree_t **p_new = &dup_root, *dup_node = root->parent;
+
+  for (node = root; ; )
+    {
+      /* Create a new tree and link it back to the current parent.  */
+      *p_new = create_token_tree (dfa, NULL, NULL, &node->token);
+      if (*p_new == NULL)
+       return NULL;
+      (*p_new)->parent = dup_node;
+      (*p_new)->token.duplicated = 1;
+      dup_node = *p_new;
+
+      /* Go to the left node, or up and to the right.  */
+      if (node->left)
+       {
+         node = node->left;
+         p_new = &dup_node->left;
+       }
+      else
+       {
+         const bin_tree_t *prev = NULL;
+         while (node->right == prev || node->right == NULL)
+           {
+             prev = node;
+             node = node->parent;
+             dup_node = dup_node->parent;
+             if (!node)
+               return dup_root;
+           }
+         node = node->right;
+         p_new = &dup_node->right;
+       }
+    }
+}
diff --git a/gnulib/lib/regex.c b/gnulib/lib/regex.c
new file mode 100644 (file)
index 0000000..b0aab90
--- /dev/null
@@ -0,0 +1,71 @@
+/* Extended regular expression matching and search library.
+   Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Make sure noone compiles this code with a C++ compiler.  */
+#if defined __cplusplus && defined _LIBC
+# error "This is C code, use a C compiler"
+#endif
+
+#ifdef _LIBC
+/* We have to keep the namespace clean.  */
+# define regfree(preg) __regfree (preg)
+# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
+# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
+# define regerror(errcode, preg, errbuf, errbuf_size) \
+       __regerror(errcode, preg, errbuf, errbuf_size)
+# define re_set_registers(bu, re, nu, st, en) \
+       __re_set_registers (bu, re, nu, st, en)
+# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
+       __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
+# define re_match(bufp, string, size, pos, regs) \
+       __re_match (bufp, string, size, pos, regs)
+# define re_search(bufp, string, size, startpos, range, regs) \
+       __re_search (bufp, string, size, startpos, range, regs)
+# define re_compile_pattern(pattern, length, bufp) \
+       __re_compile_pattern (pattern, length, bufp)
+# define re_set_syntax(syntax) __re_set_syntax (syntax)
+# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
+       __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
+# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
+
+# include "../locale/localeinfo.h"
+#endif
+
+/* On some systems, limits.h sets RE_DUP_MAX to a lower value than
+   GNU regex allows.  Include it before <regex.h>, which correctly
+   #undefs RE_DUP_MAX and sets it to the right value.  */
+#include <limits.h>
+
+#include <regex.h>
+#include "regex_internal.h"
+
+#include "regex_internal.c"
+#include "regcomp.c"
+#include "regexec.c"
+
+/* Binary backward compatibility.  */
+#if _LIBC
+# include <shlib-compat.h>
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
+link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
+int re_max_failures = 2000;
+# endif
+#endif
diff --git a/gnulib/lib/regex.h b/gnulib/lib/regex.h
new file mode 100644 (file)
index 0000000..e99c8b8
--- /dev/null
@@ -0,0 +1,675 @@
+/* Definitions for data structures and routines for the regular
+   expression library.
+   Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2006, 2009-2011
+   Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _REGEX_H
+#define _REGEX_H 1
+
+#include <sys/types.h>
+
+/* Allow the use in C++ code.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Define __USE_GNU_REGEX to declare GNU extensions that violate the
+   POSIX name space rules.  */
+#undef __USE_GNU_REGEX
+#if (defined _GNU_SOURCE                                       \
+     || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE    \
+        && !defined _XOPEN_SOURCE))
+# define __USE_GNU_REGEX 1
+#endif
+
+#ifdef _REGEX_LARGE_OFFSETS
+
+/* Use types and values that are wide enough to represent signed and
+   unsigned byte offsets in memory.  This currently works only when
+   the regex code is used outside of the GNU C library; it is not yet
+   supported within glibc itself, and glibc users should not define
+   _REGEX_LARGE_OFFSETS.  */
+
+/* The type of the offset of a byte within a string.
+   For historical reasons POSIX 1003.1-2004 requires that regoff_t be
+   at least as wide as off_t.  However, many common POSIX platforms set
+   regoff_t to the more-sensible ssize_t and the Open Group has
+   signalled its intention to change the requirement to be that
+   regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN
+   60 (2005-08-25).  We don't know of any hosts where ssize_t or
+   ptrdiff_t is wider than ssize_t, so ssize_t is safe.  */
+typedef ssize_t regoff_t;
+
+/* The type of nonnegative object indexes.  Traditionally, GNU regex
+   uses 'int' for these.  Code that uses __re_idx_t should work
+   regardless of whether the type is signed.  */
+typedef size_t __re_idx_t;
+
+/* The type of object sizes.  */
+typedef size_t __re_size_t;
+
+/* The type of object sizes, in places where the traditional code
+   uses unsigned long int.  */
+typedef size_t __re_long_size_t;
+
+#else
+
+/* Use types that are binary-compatible with the traditional GNU regex
+   implementation, which mishandles strings longer than INT_MAX.  */
+
+typedef int regoff_t;
+typedef int __re_idx_t;
+typedef unsigned int __re_size_t;
+typedef unsigned long int __re_long_size_t;
+
+#endif
+
+/* The following two types have to be signed and unsigned integer type
+   wide enough to hold a value of a pointer.  For most ANSI compilers
+   ptrdiff_t and size_t should be likely OK.  Still size of these two
+   types is 2 for Microsoft C.  Ugh... */
+typedef long int s_reg_t;
+typedef unsigned long int active_reg_t;
+
+/* The following bits are used to determine the regexp syntax we
+   recognize.  The set/not-set meanings are chosen so that Emacs syntax
+   remains the value 0.  The bits are given in alphabetical order, and
+   the definitions shifted by one from the previous bit; thus, when we
+   add or remove a bit, only one other definition need change.  */
+typedef unsigned long int reg_syntax_t;
+
+#ifdef __USE_GNU_REGEX
+
+/* If this bit is not set, then \ inside a bracket expression is literal.
+   If set, then such a \ quotes the following character.  */
+# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
+
+/* If this bit is not set, then + and ? are operators, and \+ and \? are
+     literals.
+   If set, then \+ and \? are operators and + and ? are literals.  */
+# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
+
+/* If this bit is set, then character classes are supported.  They are:
+     [:alpha:], [:upper:], [:lower:],  [:digit:], [:alnum:], [:xdigit:],
+     [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
+   If not set, then character classes are not supported.  */
+# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
+
+/* If this bit is set, then ^ and $ are always anchors (outside bracket
+     expressions, of course).
+   If this bit is not set, then it depends:
+       ^  is an anchor if it is at the beginning of a regular
+          expression or after an open-group or an alternation operator;
+       $  is an anchor if it is at the end of a regular expression, or
+          before a close-group or an alternation operator.
+
+   This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
+   POSIX draft 11.2 says that * etc. in leading positions is undefined.
+   We already implemented a previous draft which made those constructs
+   invalid, though, so we haven't changed the code back.  */
+# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
+
+/* If this bit is set, then special characters are always special
+     regardless of where they are in the pattern.
+   If this bit is not set, then special characters are special only in
+     some contexts; otherwise they are ordinary.  Specifically,
+     * + ? and intervals are only special when not after the beginning,
+     open-group, or alternation operator.  */
+# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
+
+/* If this bit is set, then *, +, ?, and { cannot be first in an re or
+     immediately after an alternation or begin-group operator.  */
+# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
+
+/* If this bit is set, then . matches newline.
+   If not set, then it doesn't.  */
+# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
+
+/* If this bit is set, then . doesn't match NUL.
+   If not set, then it does.  */
+# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
+
+/* If this bit is set, nonmatching lists [^...] do not match newline.
+   If not set, they do.  */
+# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
+
+/* If this bit is set, either \{...\} or {...} defines an
+     interval, depending on RE_NO_BK_BRACES.
+   If not set, \{, \}, {, and } are literals.  */
+# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
+
+/* If this bit is set, +, ? and | aren't recognized as operators.
+   If not set, they are.  */
+# define RE_LIMITED_OPS (RE_INTERVALS << 1)
+
+/* If this bit is set, newline is an alternation operator.
+   If not set, newline is literal.  */
+# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
+
+/* If this bit is set, then `{...}' defines an interval, and \{ and \}
+     are literals.
+  If not set, then `\{...\}' defines an interval.  */
+# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
+
+/* If this bit is set, (...) defines a group, and \( and \) are literals.
+   If not set, \(...\) defines a group, and ( and ) are literals.  */
+# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
+
+/* If this bit is set, then \<digit> matches <digit>.
+   If not set, then \<digit> is a back-reference.  */
+# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
+
+/* If this bit is set, then | is an alternation operator, and \| is literal.
+   If not set, then \| is an alternation operator, and | is literal.  */
+# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
+
+/* If this bit is set, then an ending range point collating higher
+     than the starting range point, as in [z-a], is invalid.
+   If not set, then when ending range point collates higher than the
+     starting range point, the range is ignored.  */
+# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
+
+/* If this bit is set, then an unmatched ) is ordinary.
+   If not set, then an unmatched ) is invalid.  */
+# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+
+/* If this bit is set, succeed as soon as we match the whole pattern,
+   without further backtracking.  */
+# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
+
+/* If this bit is set, do not process the GNU regex operators.
+   If not set, then the GNU regex operators are recognized. */
+# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+
+/* If this bit is set, turn on internal regex debugging.
+   If not set, and debugging was on, turn it off.
+   This only works if regex.c is compiled -DDEBUG.
+   We define this bit always, so that all that's needed to turn on
+   debugging is to recompile regex.c; the calling code can always have
+   this bit set, and it won't affect anything in the normal case. */
+# define RE_DEBUG (RE_NO_GNU_OPS << 1)
+
+/* If this bit is set, a syntactically invalid interval is treated as
+   a string of ordinary characters.  For example, the ERE 'a{1' is
+   treated as 'a\{1'.  */
+# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
+
+/* If this bit is set, then ignore case when matching.
+   If not set, then case is significant.  */
+# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
+
+/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only
+   for ^, because it is difficult to scan the regex backwards to find
+   whether ^ should be special.  */
+# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
+
+/* If this bit is set, then \{ cannot be first in a regex or
+   immediately after an alternation, open-group or \} operator.  */
+# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
+
+/* If this bit is set, then no_sub will be set to 1 during
+   re_compile_pattern.  */
+# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
+
+#endif /* defined __USE_GNU_REGEX */
+
+/* This global variable defines the particular regexp syntax to use (for
+   some interfaces).  When a regexp is compiled, the syntax used is
+   stored in the pattern buffer, so changing this does not affect
+   already-compiled regexps.  */
+extern reg_syntax_t re_syntax_options;
+\f
+#ifdef __USE_GNU_REGEX
+/* Define combinations of the above bits for the standard possibilities.
+   (The [[[ comments delimit what gets put into the Texinfo file, so
+   don't delete them!)  */
+/* [[[begin syntaxes]]] */
+# define RE_SYNTAX_EMACS 0
+
+# define RE_SYNTAX_AWK                                                 \
+  (RE_BACKSLASH_ESCAPE_IN_LISTS   | RE_DOT_NOT_NULL                    \
+   | RE_NO_BK_PARENS              | RE_NO_BK_REFS                      \
+   | RE_NO_BK_VBAR                | RE_NO_EMPTY_RANGES                 \
+   | RE_DOT_NEWLINE              | RE_CONTEXT_INDEP_ANCHORS            \
+   | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
+
+# define RE_SYNTAX_GNU_AWK                                             \
+  ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG)        \
+   & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS           \
+       | RE_CONTEXT_INVALID_OPS ))
+
+# define RE_SYNTAX_POSIX_AWK                                           \
+  (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS             \
+   | RE_INTERVALS          | RE_NO_GNU_OPS)
+
+# define RE_SYNTAX_GREP                                                        \
+  (RE_BK_PLUS_QM              | RE_CHAR_CLASSES                                \
+   | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS                           \
+   | RE_NEWLINE_ALT)
+
+# define RE_SYNTAX_EGREP                                               \
+  (RE_CHAR_CLASSES        | RE_CONTEXT_INDEP_ANCHORS                   \
+   | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE                   \
+   | RE_NEWLINE_ALT       | RE_NO_BK_PARENS                            \
+   | RE_NO_BK_VBAR)
+
+# define RE_SYNTAX_POSIX_EGREP                                         \
+  (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES                    \
+   | RE_INVALID_INTERVAL_ORD)
+
+/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff.  */
+# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
+
+# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
+
+/* Syntax bits common to both basic and extended POSIX regex syntax.  */
+# define _RE_SYNTAX_POSIX_COMMON                                       \
+  (RE_CHAR_CLASSES | RE_DOT_NEWLINE      | RE_DOT_NOT_NULL             \
+   | RE_INTERVALS  | RE_NO_EMPTY_RANGES)
+
+# define RE_SYNTAX_POSIX_BASIC                                         \
+  (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
+
+/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
+   RE_LIMITED_OPS, i.e., \? \+ \| are not recognized.  Actually, this
+   isn't minimal, since other operators, such as \`, aren't disabled.  */
+# define RE_SYNTAX_POSIX_MINIMAL_BASIC                                 \
+  (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
+
+# define RE_SYNTAX_POSIX_EXTENDED                                      \
+  (_RE_SYNTAX_POSIX_COMMON  | RE_CONTEXT_INDEP_ANCHORS                 \
+   | RE_CONTEXT_INDEP_OPS   | RE_NO_BK_BRACES                          \
+   | RE_NO_BK_PARENS        | RE_NO_BK_VBAR                            \
+   | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
+
+/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is
+   removed and RE_NO_BK_REFS is added.  */
+# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED                              \
+  (_RE_SYNTAX_POSIX_COMMON  | RE_CONTEXT_INDEP_ANCHORS                 \
+   | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES                          \
+   | RE_NO_BK_PARENS        | RE_NO_BK_REFS                            \
+   | RE_NO_BK_VBAR         | RE_UNMATCHED_RIGHT_PAREN_ORD)
+/* [[[end syntaxes]]] */
+
+#endif /* defined __USE_GNU_REGEX */
+\f
+#ifdef __USE_GNU_REGEX
+
+/* Maximum number of duplicates an interval can allow.  POSIX-conforming
+   systems might define this in <limits.h>, but we want our
+   value, so remove any previous define.  */
+# ifdef RE_DUP_MAX
+#  undef RE_DUP_MAX
+# endif
+
+/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored
+   the counter as a 2-byte signed integer.  This is no longer true, so
+   RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to
+   ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined.
+   However, there would be a huge performance problem if someone
+   actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains
+   its historical value.  */
+# define RE_DUP_MAX (0x7fff)
+
+#endif /* defined __USE_GNU_REGEX */
+
+
+/* POSIX `cflags' bits (i.e., information for `regcomp').  */
+
+/* If this bit is set, then use extended regular expression syntax.
+   If not set, then use basic regular expression syntax.  */
+#define REG_EXTENDED 1
+
+/* If this bit is set, then ignore case when matching.
+   If not set, then case is significant.  */
+#define REG_ICASE (1 << 1)
+
+/* If this bit is set, then anchors do not match at newline
+     characters in the string.
+   If not set, then anchors do match at newlines.  */
+#define REG_NEWLINE (1 << 2)
+
+/* If this bit is set, then report only success or fail in regexec.
+   If not set, then returns differ between not matching and errors.  */
+#define REG_NOSUB (1 << 3)
+
+
+/* POSIX `eflags' bits (i.e., information for regexec).  */
+
+/* If this bit is set, then the beginning-of-line operator doesn't match
+     the beginning of the string (presumably because it's not the
+     beginning of a line).
+   If not set, then the beginning-of-line operator does match the
+     beginning of the string.  */
+#define REG_NOTBOL 1
+
+/* Like REG_NOTBOL, except for the end-of-line.  */
+#define REG_NOTEOL (1 << 1)
+
+/* Use PMATCH[0] to delimit the start and end of the search in the
+   buffer.  */
+#define REG_STARTEND (1 << 2)
+
+
+/* If any error codes are removed, changed, or added, update the
+   `__re_error_msgid' table in regcomp.c.  */
+
+typedef enum
+{
+  _REG_ENOSYS = -1,    /* This will never happen for this implementation.  */
+  _REG_NOERROR = 0,    /* Success.  */
+  _REG_NOMATCH,                /* Didn't find a match (for regexec).  */
+
+  /* POSIX regcomp return error codes.  (In the order listed in the
+     standard.)  */
+  _REG_BADPAT,         /* Invalid pattern.  */
+  _REG_ECOLLATE,       /* Invalid collating element.  */
+  _REG_ECTYPE,         /* Invalid character class name.  */
+  _REG_EESCAPE,                /* Trailing backslash.  */
+  _REG_ESUBREG,                /* Invalid back reference.  */
+  _REG_EBRACK,         /* Unmatched left bracket.  */
+  _REG_EPAREN,         /* Parenthesis imbalance.  */
+  _REG_EBRACE,         /* Unmatched \{.  */
+  _REG_BADBR,          /* Invalid contents of \{\}.  */
+  _REG_ERANGE,         /* Invalid range end.  */
+  _REG_ESPACE,         /* Ran out of memory.  */
+  _REG_BADRPT,         /* No preceding re for repetition op.  */
+
+  /* Error codes we've added.  */
+  _REG_EEND,           /* Premature end.  */
+  _REG_ESIZE,          /* Compiled pattern bigger than 2^16 bytes.  */
+  _REG_ERPAREN         /* Unmatched ) or \); not returned from regcomp.  */
+} reg_errcode_t;
+
+#ifdef _XOPEN_SOURCE
+# define REG_ENOSYS    _REG_ENOSYS
+#endif
+#define REG_NOERROR    _REG_NOERROR
+#define REG_NOMATCH    _REG_NOMATCH
+#define REG_BADPAT     _REG_BADPAT
+#define REG_ECOLLATE   _REG_ECOLLATE
+#define REG_ECTYPE     _REG_ECTYPE
+#define REG_EESCAPE    _REG_EESCAPE
+#define REG_ESUBREG    _REG_ESUBREG
+#define REG_EBRACK     _REG_EBRACK
+#define REG_EPAREN     _REG_EPAREN
+#define REG_EBRACE     _REG_EBRACE
+#define REG_BADBR      _REG_BADBR
+#define REG_ERANGE     _REG_ERANGE
+#define REG_ESPACE     _REG_ESPACE
+#define REG_BADRPT     _REG_BADRPT
+#define REG_EEND       _REG_EEND
+#define REG_ESIZE      _REG_ESIZE
+#define REG_ERPAREN    _REG_ERPAREN
+\f
+/* struct re_pattern_buffer normally uses member names like `buffer'
+   that POSIX does not allow.  In POSIX mode these members have names
+   with leading `re_' (e.g., `re_buffer').  */
+#ifdef __USE_GNU_REGEX
+# define _REG_RE_NAME(id) id
+# define _REG_RM_NAME(id) id
+#else
+# define _REG_RE_NAME(id) re_##id
+# define _REG_RM_NAME(id) rm_##id
+#endif
+
+/* The user can specify the type of the re_translate member by
+   defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned
+   char *.  This pollutes the POSIX name space, so in POSIX mode just
+   use unsigned char *.  */
+#ifdef __USE_GNU_REGEX
+# ifndef RE_TRANSLATE_TYPE
+#  define RE_TRANSLATE_TYPE unsigned char *
+# endif
+# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE
+#else
+# define REG_TRANSLATE_TYPE unsigned char *
+#endif
+
+/* This data structure represents a compiled pattern.  Before calling
+   the pattern compiler, the fields `buffer', `allocated', `fastmap',
+   `translate', and `no_sub' can be set.  After the pattern has been
+   compiled, the `re_nsub' field is available.  All other fields are
+   private to the regex routines.  */
+
+struct re_pattern_buffer
+{
+  /* Space that holds the compiled pattern.  It is declared as
+     `unsigned char *' because its elements are sometimes used as
+     array indexes.  */
+  unsigned char *_REG_RE_NAME (buffer);
+
+  /* Number of bytes to which `buffer' points.  */
+  __re_long_size_t _REG_RE_NAME (allocated);
+
+  /* Number of bytes actually used in `buffer'.  */
+  __re_long_size_t _REG_RE_NAME (used);
+
+  /* Syntax setting with which the pattern was compiled.  */
+  reg_syntax_t _REG_RE_NAME (syntax);
+
+  /* Pointer to a fastmap, if any, otherwise zero.  re_search uses the
+     fastmap, if there is one, to skip over impossible starting points
+     for matches.  */
+  char *_REG_RE_NAME (fastmap);
+
+  /* Either a translate table to apply to all characters before
+     comparing them, or zero for no translation.  The translation is
+     applied to a pattern when it is compiled and to a string when it
+     is matched.  */
+  REG_TRANSLATE_TYPE _REG_RE_NAME (translate);
+
+  /* Number of subexpressions found by the compiler.  */
+  size_t re_nsub;
+
+  /* Zero if this pattern cannot match the empty string, one else.
+     Well, in truth it's used only in `re_search_2', to see whether or
+     not we should use the fastmap, so we don't set this absolutely
+     perfectly; see `re_compile_fastmap' (the `duplicate' case).  */
+  unsigned int _REG_RE_NAME (can_be_null) : 1;
+
+  /* If REGS_UNALLOCATED, allocate space in the `regs' structure
+     for `max (RE_NREGS, re_nsub + 1)' groups.
+     If REGS_REALLOCATE, reallocate space if necessary.
+     If REGS_FIXED, use what's there.  */
+#ifdef __USE_GNU_REGEX
+# define REGS_UNALLOCATED 0
+# define REGS_REALLOCATE 1
+# define REGS_FIXED 2
+#endif
+  unsigned int _REG_RE_NAME (regs_allocated) : 2;
+
+  /* Set to zero when `re_compile_pattern' compiles a pattern; set to
+     one by `re_compile_fastmap' if it updates the fastmap.  */
+  unsigned int _REG_RE_NAME (fastmap_accurate) : 1;
+
+  /* If set, `re_match_2' does not return information about
+     subexpressions.  */
+  unsigned int _REG_RE_NAME (no_sub) : 1;
+
+  /* If set, a beginning-of-line anchor doesn't match at the beginning
+     of the string.  */
+  unsigned int _REG_RE_NAME (not_bol) : 1;
+
+  /* Similarly for an end-of-line anchor.  */
+  unsigned int _REG_RE_NAME (not_eol) : 1;
+
+  /* If true, an anchor at a newline matches.  */
+  unsigned int _REG_RE_NAME (newline_anchor) : 1;
+
+/* [[[end pattern_buffer]]] */
+};
+
+typedef struct re_pattern_buffer regex_t;
+\f
+/* This is the structure we store register match data in.  See
+   regex.texinfo for a full description of what registers match.  */
+struct re_registers
+{
+  __re_size_t _REG_RM_NAME (num_regs);
+  regoff_t *_REG_RM_NAME (start);
+  regoff_t *_REG_RM_NAME (end);
+};
+
+
+/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
+   `re_match_2' returns information about at least this many registers
+   the first time a `regs' structure is passed.  */
+#if !defined RE_NREGS && defined __USE_GNU_REGEX
+# define RE_NREGS 30
+#endif
+
+
+/* POSIX specification for registers.  Aside from the different names than
+   `re_registers', POSIX uses an array of structures, instead of a
+   structure of arrays.  */
+typedef struct
+{
+  regoff_t rm_so;  /* Byte offset from string's start to substring's start.  */
+  regoff_t rm_eo;  /* Byte offset from string's start to substring's end.  */
+} regmatch_t;
+\f
+/* Declarations for routines.  */
+
+/* Sets the current default syntax to SYNTAX, and return the old syntax.
+   You can also simply assign to the `re_syntax_options' variable.  */
+extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
+
+/* Compile the regular expression PATTERN, with length LENGTH
+   and syntax given by the global `re_syntax_options', into the buffer
+   BUFFER.  Return NULL if successful, and an error string if not.  */
+extern const char *re_compile_pattern (const char *__pattern, size_t __length,
+                                      struct re_pattern_buffer *__buffer);
+
+
+/* Compile a fastmap for the compiled pattern in BUFFER; used to
+   accelerate searches.  Return 0 if successful and -2 if was an
+   internal error.  */
+extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);
+
+
+/* Search in the string STRING (with length LENGTH) for the pattern
+   compiled into BUFFER.  Start searching at position START, for RANGE
+   characters.  Return the starting position of the match, -1 for no
+   match, or -2 for an internal error.  Also return register
+   information in REGS (if REGS and BUFFER->no_sub are nonzero).  */
+extern regoff_t re_search (struct re_pattern_buffer *__buffer,
+                          const char *__string, __re_idx_t __length,
+                          __re_idx_t __start, regoff_t __range,
+                          struct re_registers *__regs);
+
+
+/* Like `re_search', but search in the concatenation of STRING1 and
+   STRING2.  Also, stop searching at index START + STOP.  */
+extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
+                            const char *__string1, __re_idx_t __length1,
+                            const char *__string2, __re_idx_t __length2,
+                            __re_idx_t __start, regoff_t __range,
+                            struct re_registers *__regs,
+                            __re_idx_t __stop);
+
+
+/* Like `re_search', but return how many characters in STRING the regexp
+   in BUFFER matched, starting at position START.  */
+extern regoff_t re_match (struct re_pattern_buffer *__buffer,
+                         const char *__string, __re_idx_t __length,
+                         __re_idx_t __start, struct re_registers *__regs);
+
+
+/* Relates to `re_match' as `re_search_2' relates to `re_search'.  */
+extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
+                           const char *__string1, __re_idx_t __length1,
+                           const char *__string2, __re_idx_t __length2,
+                           __re_idx_t __start, struct re_registers *__regs,
+                           __re_idx_t __stop);
+
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+   ENDS.  Subsequent matches using BUFFER and REGS will use this memory
+   for recording register information.  STARTS and ENDS must be
+   allocated with malloc, and must each be at least `NUM_REGS * sizeof
+   (regoff_t)' bytes long.
+
+   If NUM_REGS == 0, then subsequent matches should allocate their own
+   register data.
+
+   Unless this function is called, the first search or match using
+   BUFFER will allocate its own register data, without freeing the old
+   data.  */
+extern void re_set_registers (struct re_pattern_buffer *__buffer,
+                             struct re_registers *__regs,
+                             __re_size_t __num_regs,
+                             regoff_t *__starts, regoff_t *__ends);
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+# ifndef _CRAY
+/* 4.2 bsd compatibility.  */
+extern char *re_comp (const char *);
+extern int re_exec (const char *);
+# endif
+#endif
+
+/* GCC 2.95 and later have "__restrict"; C99 compilers have
+   "restrict", and "configure" may have defined "restrict".
+   Other compilers use __restrict, __restrict__, and _Restrict, and
+   'configure' might #define 'restrict' to those words, so pick a
+   different name.  */
+#ifndef _Restrict_
+# if 199901L <= __STDC_VERSION__
+#  define _Restrict_ restrict
+# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)
+#  define _Restrict_ __restrict
+# else
+#  define _Restrict_
+# endif
+#endif
+/* gcc 3.1 and up support the [restrict] syntax.  Don't trust
+   sys/cdefs.h's definition of __restrict_arr, though, as it
+   mishandles gcc -ansi -pedantic.  */
+#ifndef _Restrict_arr_
+# if ((199901L <= __STDC_VERSION__                                     \
+       || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__))    \
+          && !__STRICT_ANSI__))                                        \
+      && !defined __GNUG__)
+#  define _Restrict_arr_ _Restrict_
+# else
+#  define _Restrict_arr_
+# endif
+#endif
+
+/* POSIX compatibility.  */
+extern int regcomp (regex_t *_Restrict_ __preg,
+                   const char *_Restrict_ __pattern,
+                   int __cflags);
+
+extern int regexec (const regex_t *_Restrict_ __preg,
+                   const char *_Restrict_ __string, size_t __nmatch,
+                   regmatch_t __pmatch[_Restrict_arr_],
+                   int __eflags);
+
+extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg,
+                       char *_Restrict_ __errbuf, size_t __errbuf_size);
+
+extern void regfree (regex_t *__preg);
+
+
+#ifdef __cplusplus
+}
+#endif /* C++ */
+
+#endif /* regex.h */
diff --git a/gnulib/lib/regex_internal.c b/gnulib/lib/regex_internal.c
new file mode 100644 (file)
index 0000000..c6b3bf2
--- /dev/null
@@ -0,0 +1,1741 @@
+/* Extended regular expression matching and search library.
+   Copyright (C) 2002-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+static void re_string_construct_common (const char *str, Idx len,
+                                       re_string_t *pstr,
+                                       RE_TRANSLATE_TYPE trans, bool icase,
+                                       const re_dfa_t *dfa) internal_function;
+static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
+                                         const re_node_set *nodes,
+                                         re_hashval_t hash) internal_function;
+static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
+                                         const re_node_set *nodes,
+                                         unsigned int context,
+                                         re_hashval_t hash) internal_function;
+\f
+/* Functions for string operation.  */
+
+/* This function allocate the buffers.  It is necessary to call
+   re_string_reconstruct before using the object.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len,
+                   RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
+{
+  reg_errcode_t ret;
+  Idx init_buf_len;
+
+  /* Ensure at least one character fits into the buffers.  */
+  if (init_len < dfa->mb_cur_max)
+    init_len = dfa->mb_cur_max;
+  init_buf_len = (len + 1 < init_len) ? len + 1: init_len;
+  re_string_construct_common (str, len, pstr, trans, icase, dfa);
+
+  ret = re_string_realloc_buffers (pstr, init_buf_len);
+  if (BE (ret != REG_NOERROR, 0))
+    return ret;
+
+  pstr->word_char = dfa->word_char;
+  pstr->word_ops_used = dfa->word_ops_used;
+  pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
+  pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len;
+  pstr->valid_raw_len = pstr->valid_len;
+  return REG_NOERROR;
+}
+
+/* This function allocate the buffers, and initialize them.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_construct (re_string_t *pstr, const char *str, Idx len,
+                    RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
+{
+  reg_errcode_t ret;
+  memset (pstr, '\0', sizeof (re_string_t));
+  re_string_construct_common (str, len, pstr, trans, icase, dfa);
+
+  if (len > 0)
+    {
+      ret = re_string_realloc_buffers (pstr, len + 1);
+      if (BE (ret != REG_NOERROR, 0))
+       return ret;
+    }
+  pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
+
+  if (icase)
+    {
+#ifdef RE_ENABLE_I18N
+      if (dfa->mb_cur_max > 1)
+       {
+         while (1)
+           {
+             ret = build_wcs_upper_buffer (pstr);
+             if (BE (ret != REG_NOERROR, 0))
+               return ret;
+             if (pstr->valid_raw_len >= len)
+               break;
+             if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
+               break;
+             ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+             if (BE (ret != REG_NOERROR, 0))
+               return ret;
+           }
+       }
+      else
+#endif /* RE_ENABLE_I18N  */
+       build_upper_buffer (pstr);
+    }
+  else
+    {
+#ifdef RE_ENABLE_I18N
+      if (dfa->mb_cur_max > 1)
+       build_wcs_buffer (pstr);
+      else
+#endif /* RE_ENABLE_I18N  */
+       {
+         if (trans != NULL)
+           re_string_translate_buffer (pstr);
+         else
+           {
+             pstr->valid_len = pstr->bufs_len;
+             pstr->valid_raw_len = pstr->bufs_len;
+           }
+       }
+    }
+
+  return REG_NOERROR;
+}
+
+/* Helper functions for re_string_allocate, and re_string_construct.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
+{
+#ifdef RE_ENABLE_I18N
+  if (pstr->mb_cur_max > 1)
+    {
+      wint_t *new_wcs;
+
+      /* Avoid overflow.  */
+      size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
+      if (BE (SIZE_MAX / max_object_size < new_buf_len, 0))
+       return REG_ESPACE;
+
+      new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
+      if (BE (new_wcs == NULL, 0))
+       return REG_ESPACE;
+      pstr->wcs = new_wcs;
+      if (pstr->offsets != NULL)
+       {
+         Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len);
+         if (BE (new_offsets == NULL, 0))
+           return REG_ESPACE;
+         pstr->offsets = new_offsets;
+       }
+    }
+#endif /* RE_ENABLE_I18N  */
+  if (pstr->mbs_allocated)
+    {
+      unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char,
+                                          new_buf_len);
+      if (BE (new_mbs == NULL, 0))
+       return REG_ESPACE;
+      pstr->mbs = new_mbs;
+    }
+  pstr->bufs_len = new_buf_len;
+  return REG_NOERROR;
+}
+
+
+static void
+internal_function
+re_string_construct_common (const char *str, Idx len, re_string_t *pstr,
+                           RE_TRANSLATE_TYPE trans, bool icase,
+                           const re_dfa_t *dfa)
+{
+  pstr->raw_mbs = (const unsigned char *) str;
+  pstr->len = len;
+  pstr->raw_len = len;
+  pstr->trans = trans;
+  pstr->icase = icase;
+  pstr->mbs_allocated = (trans != NULL || icase);
+  pstr->mb_cur_max = dfa->mb_cur_max;
+  pstr->is_utf8 = dfa->is_utf8;
+  pstr->map_notascii = dfa->map_notascii;
+  pstr->stop = pstr->len;
+  pstr->raw_stop = pstr->stop;
+}
+
+#ifdef RE_ENABLE_I18N
+
+/* Build wide character buffer PSTR->WCS.
+   If the byte sequence of the string are:
+     <mb1>(0), <mb1>(1), <mb2>(0), <mb2>(1), <sb3>
+   Then wide character buffer will be:
+     <wc1>   , WEOF    , <wc2>   , WEOF    , <wc3>
+   We use WEOF for padding, they indicate that the position isn't
+   a first byte of a multibyte character.
+
+   Note that this function assumes PSTR->VALID_LEN elements are already
+   built and starts from PSTR->VALID_LEN.  */
+
+static void
+internal_function
+build_wcs_buffer (re_string_t *pstr)
+{
+#ifdef _LIBC
+  unsigned char buf[MB_LEN_MAX];
+  assert (MB_LEN_MAX >= pstr->mb_cur_max);
+#else
+  unsigned char buf[64];
+#endif
+  mbstate_t prev_st;
+  Idx byte_idx, end_idx, remain_len;
+  size_t mbclen;
+
+  /* Build the buffers from pstr->valid_len to either pstr->len or
+     pstr->bufs_len.  */
+  end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+  for (byte_idx = pstr->valid_len; byte_idx < end_idx;)
+    {
+      wchar_t wc;
+      const char *p;
+
+      remain_len = end_idx - byte_idx;
+      prev_st = pstr->cur_state;
+      /* Apply the translation if we need.  */
+      if (BE (pstr->trans != NULL, 0))
+       {
+         int i, ch;
+
+         for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
+           {
+             ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i];
+             buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch];
+           }
+         p = (const char *) buf;
+       }
+      else
+       p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
+      mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+      if (BE (mbclen == (size_t) -2, 0))
+       {
+         /* The buffer doesn't have enough space, finish to build.  */
+         pstr->cur_state = prev_st;
+         break;
+       }
+      else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0))
+       {
+         /* We treat these cases as a singlebyte character.  */
+         mbclen = 1;
+         wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
+         if (BE (pstr->trans != NULL, 0))
+           wc = pstr->trans[wc];
+         pstr->cur_state = prev_st;
+       }
+
+      /* Write wide character and padding.  */
+      pstr->wcs[byte_idx++] = wc;
+      /* Write paddings.  */
+      for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+       pstr->wcs[byte_idx++] = WEOF;
+    }
+  pstr->valid_len = byte_idx;
+  pstr->valid_raw_len = byte_idx;
+}
+
+/* Build wide character buffer PSTR->WCS like build_wcs_buffer,
+   but for REG_ICASE.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+build_wcs_upper_buffer (re_string_t *pstr)
+{
+  mbstate_t prev_st;
+  Idx src_idx, byte_idx, end_idx, remain_len;
+  size_t mbclen;
+#ifdef _LIBC
+  char buf[MB_LEN_MAX];
+  assert (MB_LEN_MAX >= pstr->mb_cur_max);
+#else
+  char buf[64];
+#endif
+
+  byte_idx = pstr->valid_len;
+  end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+
+  /* The following optimization assumes that ASCII characters can be
+     mapped to wide characters with a simple cast.  */
+  if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed)
+    {
+      while (byte_idx < end_idx)
+       {
+         wchar_t wc;
+
+         if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx])
+             && mbsinit (&pstr->cur_state))
+           {
+             /* In case of a singlebyte character.  */
+             pstr->mbs[byte_idx]
+               = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]);
+             /* The next step uses the assumption that wchar_t is encoded
+                ASCII-safe: all ASCII values can be converted like this.  */
+             pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx];
+             ++byte_idx;
+             continue;
+           }
+
+         remain_len = end_idx - byte_idx;
+         prev_st = pstr->cur_state;
+         mbclen = __mbrtowc (&wc,
+                             ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
+                              + byte_idx), remain_len, &pstr->cur_state);
+         if (BE (mbclen < (size_t) -2, 1))
+           {
+             wchar_t wcu = wc;
+             if (iswlower (wc))
+               {
+                 size_t mbcdlen;
+
+                 wcu = towupper (wc);
+                 mbcdlen = wcrtomb (buf, wcu, &prev_st);
+                 if (BE (mbclen == mbcdlen, 1))
+                   memcpy (pstr->mbs + byte_idx, buf, mbclen);
+                 else
+                   {
+                     src_idx = byte_idx;
+                     goto offsets_needed;
+                   }
+               }
+             else
+               memcpy (pstr->mbs + byte_idx,
+                       pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen);
+             pstr->wcs[byte_idx++] = wcu;
+             /* Write paddings.  */
+             for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+               pstr->wcs[byte_idx++] = WEOF;
+           }
+         else if (mbclen == (size_t) -1 || mbclen == 0)
+           {
+             /* It is an invalid character or '\0'.  Just use the byte.  */
+             int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
+             pstr->mbs[byte_idx] = ch;
+             /* And also cast it to wide char.  */
+             pstr->wcs[byte_idx++] = (wchar_t) ch;
+             if (BE (mbclen == (size_t) -1, 0))
+               pstr->cur_state = prev_st;
+           }
+         else
+           {
+             /* The buffer doesn't have enough space, finish to build.  */
+             pstr->cur_state = prev_st;
+             break;
+           }
+       }
+      pstr->valid_len = byte_idx;
+      pstr->valid_raw_len = byte_idx;
+      return REG_NOERROR;
+    }
+  else
+    for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;)
+      {
+       wchar_t wc;
+       const char *p;
+      offsets_needed:
+       remain_len = end_idx - byte_idx;
+       prev_st = pstr->cur_state;
+       if (BE (pstr->trans != NULL, 0))
+         {
+           int i, ch;
+
+           for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
+             {
+               ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i];
+               buf[i] = pstr->trans[ch];
+             }
+           p = (const char *) buf;
+         }
+       else
+         p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx;
+       mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+       if (BE (mbclen < (size_t) -2, 1))
+         {
+           wchar_t wcu = wc;
+           if (iswlower (wc))
+             {
+               size_t mbcdlen;
+
+               wcu = towupper (wc);
+               mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st);
+               if (BE (mbclen == mbcdlen, 1))
+                 memcpy (pstr->mbs + byte_idx, buf, mbclen);
+               else if (mbcdlen != (size_t) -1)
+                 {
+                   size_t i;
+
+                   if (byte_idx + mbcdlen > pstr->bufs_len)
+                     {
+                       pstr->cur_state = prev_st;
+                       break;
+                     }
+
+                   if (pstr->offsets == NULL)
+                     {
+                       pstr->offsets = re_malloc (Idx, pstr->bufs_len);
+
+                       if (pstr->offsets == NULL)
+                         return REG_ESPACE;
+                     }
+                   if (!pstr->offsets_needed)
+                     {
+                       for (i = 0; i < (size_t) byte_idx; ++i)
+                         pstr->offsets[i] = i;
+                       pstr->offsets_needed = 1;
+                     }
+
+                   memcpy (pstr->mbs + byte_idx, buf, mbcdlen);
+                   pstr->wcs[byte_idx] = wcu;
+                   pstr->offsets[byte_idx] = src_idx;
+                   for (i = 1; i < mbcdlen; ++i)
+                     {
+                       pstr->offsets[byte_idx + i]
+                         = src_idx + (i < mbclen ? i : mbclen - 1);
+                       pstr->wcs[byte_idx + i] = WEOF;
+                     }
+                   pstr->len += mbcdlen - mbclen;
+                   if (pstr->raw_stop > src_idx)
+                     pstr->stop += mbcdlen - mbclen;
+                   end_idx = (pstr->bufs_len > pstr->len)
+                             ? pstr->len : pstr->bufs_len;
+                   byte_idx += mbcdlen;
+                   src_idx += mbclen;
+                   continue;
+                 }
+               else
+                 memcpy (pstr->mbs + byte_idx, p, mbclen);
+             }
+           else
+             memcpy (pstr->mbs + byte_idx, p, mbclen);
+
+           if (BE (pstr->offsets_needed != 0, 0))
+             {
+               size_t i;
+               for (i = 0; i < mbclen; ++i)
+                 pstr->offsets[byte_idx + i] = src_idx + i;
+             }
+           src_idx += mbclen;
+
+           pstr->wcs[byte_idx++] = wcu;
+           /* Write paddings.  */
+           for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+             pstr->wcs[byte_idx++] = WEOF;
+         }
+       else if (mbclen == (size_t) -1 || mbclen == 0)
+         {
+           /* It is an invalid character or '\0'.  Just use the byte.  */
+           int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
+
+           if (BE (pstr->trans != NULL, 0))
+             ch = pstr->trans [ch];
+           pstr->mbs[byte_idx] = ch;
+
+           if (BE (pstr->offsets_needed != 0, 0))
+             pstr->offsets[byte_idx] = src_idx;
+           ++src_idx;
+
+           /* And also cast it to wide char.  */
+           pstr->wcs[byte_idx++] = (wchar_t) ch;
+           if (BE (mbclen == (size_t) -1, 0))
+             pstr->cur_state = prev_st;
+         }
+       else
+         {
+           /* The buffer doesn't have enough space, finish to build.  */
+           pstr->cur_state = prev_st;
+           break;
+         }
+      }
+  pstr->valid_len = byte_idx;
+  pstr->valid_raw_len = src_idx;
+  return REG_NOERROR;
+}
+
+/* Skip characters until the index becomes greater than NEW_RAW_IDX.
+   Return the index.  */
+
+static Idx
+internal_function
+re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
+{
+  mbstate_t prev_st;
+  Idx rawbuf_idx;
+  size_t mbclen;
+  wint_t wc = WEOF;
+
+  /* Skip the characters which are not necessary to check.  */
+  for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len;
+       rawbuf_idx < new_raw_idx;)
+    {
+      wchar_t wc2;
+      Idx remain_len;
+      remain_len = pstr->len - rawbuf_idx;
+      prev_st = pstr->cur_state;
+      mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
+                         remain_len, &pstr->cur_state);
+      if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0))
+       {
+         /* We treat these cases as a single byte character.  */
+         if (mbclen == 0 || remain_len == 0)
+           wc = L'\0';
+         else
+           wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx);
+         mbclen = 1;
+         pstr->cur_state = prev_st;
+       }
+      else
+       wc = wc2;
+      /* Then proceed the next character.  */
+      rawbuf_idx += mbclen;
+    }
+  *last_wc = wc;
+  return rawbuf_idx;
+}
+#endif /* RE_ENABLE_I18N  */
+
+/* Build the buffer PSTR->MBS, and apply the translation if we need.
+   This function is used in case of REG_ICASE.  */
+
+static void
+internal_function
+build_upper_buffer (re_string_t *pstr)
+{
+  Idx char_idx, end_idx;
+  end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+
+  for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx)
+    {
+      int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx];
+      if (BE (pstr->trans != NULL, 0))
+       ch = pstr->trans[ch];
+      if (islower (ch))
+       pstr->mbs[char_idx] = toupper (ch);
+      else
+       pstr->mbs[char_idx] = ch;
+    }
+  pstr->valid_len = char_idx;
+  pstr->valid_raw_len = char_idx;
+}
+
+/* Apply TRANS to the buffer in PSTR.  */
+
+static void
+internal_function
+re_string_translate_buffer (re_string_t *pstr)
+{
+  Idx buf_idx, end_idx;
+  end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+
+  for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx)
+    {
+      int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx];
+      pstr->mbs[buf_idx] = pstr->trans[ch];
+    }
+
+  pstr->valid_len = buf_idx;
+  pstr->valid_raw_len = buf_idx;
+}
+
+/* This function re-construct the buffers.
+   Concretely, convert to wide character in case of pstr->mb_cur_max > 1,
+   convert to upper case in case of REG_ICASE, apply translation.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
+{
+  Idx offset;
+
+  if (BE (pstr->raw_mbs_idx <= idx, 0))
+    offset = idx - pstr->raw_mbs_idx;
+  else
+    {
+      /* Reset buffer.  */
+#ifdef RE_ENABLE_I18N
+      if (pstr->mb_cur_max > 1)
+       memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
+#endif /* RE_ENABLE_I18N */
+      pstr->len = pstr->raw_len;
+      pstr->stop = pstr->raw_stop;
+      pstr->valid_len = 0;
+      pstr->raw_mbs_idx = 0;
+      pstr->valid_raw_len = 0;
+      pstr->offsets_needed = 0;
+      pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF
+                          : CONTEXT_NEWLINE | CONTEXT_BEGBUF);
+      if (!pstr->mbs_allocated)
+       pstr->mbs = (unsigned char *) pstr->raw_mbs;
+      offset = idx;
+    }
+
+  if (BE (offset != 0, 1))
+    {
+      /* Should the already checked characters be kept?  */
+      if (BE (offset < pstr->valid_raw_len, 1))
+       {
+         /* Yes, move them to the front of the buffer.  */
+#ifdef RE_ENABLE_I18N
+         if (BE (pstr->offsets_needed, 0))
+           {
+             Idx low = 0, high = pstr->valid_len, mid;
+             do
+               {
+                 mid = (high + low) / 2;
+                 if (pstr->offsets[mid] > offset)
+                   high = mid;
+                 else if (pstr->offsets[mid] < offset)
+                   low = mid + 1;
+                 else
+                   break;
+               }
+             while (low < high);
+             if (pstr->offsets[mid] < offset)
+               ++mid;
+             pstr->tip_context = re_string_context_at (pstr, mid - 1,
+                                                       eflags);
+             /* This can be quite complicated, so handle specially
+                only the common and easy case where the character with
+                different length representation of lower and upper
+                case is present at or after offset.  */
+             if (pstr->valid_len > offset
+                 && mid == offset && pstr->offsets[mid] == offset)
+               {
+                 memmove (pstr->wcs, pstr->wcs + offset,
+                          (pstr->valid_len - offset) * sizeof (wint_t));
+                 memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset);
+                 pstr->valid_len -= offset;
+                 pstr->valid_raw_len -= offset;
+                 for (low = 0; low < pstr->valid_len; low++)
+                   pstr->offsets[low] = pstr->offsets[low + offset] - offset;
+               }
+             else
+               {
+                 /* Otherwise, just find out how long the partial multibyte
+                    character at offset is and fill it with WEOF/255.  */
+                 pstr->len = pstr->raw_len - idx + offset;
+                 pstr->stop = pstr->raw_stop - idx + offset;
+                 pstr->offsets_needed = 0;
+                 while (mid > 0 && pstr->offsets[mid - 1] == offset)
+                   --mid;
+                 while (mid < pstr->valid_len)
+                   if (pstr->wcs[mid] != WEOF)
+                     break;
+                   else
+                     ++mid;
+                 if (mid == pstr->valid_len)
+                   pstr->valid_len = 0;
+                 else
+                   {
+                     pstr->valid_len = pstr->offsets[mid] - offset;
+                     if (pstr->valid_len)
+                       {
+                         for (low = 0; low < pstr->valid_len; ++low)
+                           pstr->wcs[low] = WEOF;
+                         memset (pstr->mbs, 255, pstr->valid_len);
+                       }
+                   }
+                 pstr->valid_raw_len = pstr->valid_len;
+               }
+           }
+         else
+#endif
+           {
+             pstr->tip_context = re_string_context_at (pstr, offset - 1,
+                                                       eflags);
+#ifdef RE_ENABLE_I18N
+             if (pstr->mb_cur_max > 1)
+               memmove (pstr->wcs, pstr->wcs + offset,
+                        (pstr->valid_len - offset) * sizeof (wint_t));
+#endif /* RE_ENABLE_I18N */
+             if (BE (pstr->mbs_allocated, 0))
+               memmove (pstr->mbs, pstr->mbs + offset,
+                        pstr->valid_len - offset);
+             pstr->valid_len -= offset;
+             pstr->valid_raw_len -= offset;
+#if DEBUG
+             assert (pstr->valid_len > 0);
+#endif
+           }
+       }
+      else
+       {
+#ifdef RE_ENABLE_I18N
+         /* No, skip all characters until IDX.  */
+         Idx prev_valid_len = pstr->valid_len;
+
+         if (BE (pstr->offsets_needed, 0))
+           {
+             pstr->len = pstr->raw_len - idx + offset;
+             pstr->stop = pstr->raw_stop - idx + offset;
+             pstr->offsets_needed = 0;
+           }
+#endif
+         pstr->valid_len = 0;
+#ifdef RE_ENABLE_I18N
+         if (pstr->mb_cur_max > 1)
+           {
+             Idx wcs_idx;
+             wint_t wc = WEOF;
+
+             if (pstr->is_utf8)
+               {
+                 const unsigned char *raw, *p, *end;
+
+                 /* Special case UTF-8.  Multi-byte chars start with any
+                    byte other than 0x80 - 0xbf.  */
+                 raw = pstr->raw_mbs + pstr->raw_mbs_idx;
+                 end = raw + (offset - pstr->mb_cur_max);
+                 if (end < pstr->raw_mbs)
+                   end = pstr->raw_mbs;
+                 p = raw + offset - 1;
+#ifdef _LIBC
+                 /* We know the wchar_t encoding is UCS4, so for the simple
+                    case, ASCII characters, skip the conversion step.  */
+                 if (isascii (*p) && BE (pstr->trans == NULL, 1))
+                   {
+                     memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
+                     /* pstr->valid_len = 0; */
+                     wc = (wchar_t) *p;
+                   }
+                 else
+#endif
+                   for (; p >= end; --p)
+                     if ((*p & 0xc0) != 0x80)
+                       {
+                         mbstate_t cur_state;
+                         wchar_t wc2;
+                         Idx mlen = raw + pstr->len - p;
+                         size_t mbclen;
+
+#if 0 /* dead code: buf is set but never used */
+                         unsigned char buf[6];
+                         if (BE (pstr->trans != NULL, 0))
+                           {
+                             int i = mlen < 6 ? mlen : 6;
+                             while (--i >= 0)
+                               buf[i] = pstr->trans[p[i]];
+                           }
+#endif
+                         /* XXX Don't use mbrtowc, we know which conversion
+                            to use (UTF-8 -> UCS4).  */
+                         memset (&cur_state, 0, sizeof (cur_state));
+                         mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
+                                             &cur_state);
+                         if (raw + offset - p <= mbclen
+                             && mbclen < (size_t) -2)
+                           {
+                             memset (&pstr->cur_state, '\0',
+                                     sizeof (mbstate_t));
+                             pstr->valid_len = mbclen - (raw + offset - p);
+                             wc = wc2;
+                           }
+                         break;
+                       }
+               }
+
+             if (wc == WEOF)
+               pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx;
+             if (wc == WEOF)
+               pstr->tip_context
+                 = re_string_context_at (pstr, prev_valid_len - 1, eflags);
+             else
+               pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0)
+                                     && IS_WIDE_WORD_CHAR (wc))
+                                    ? CONTEXT_WORD
+                                    : ((IS_WIDE_NEWLINE (wc)
+                                        && pstr->newline_anchor)
+                                       ? CONTEXT_NEWLINE : 0));
+             if (BE (pstr->valid_len, 0))
+               {
+                 for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx)
+                   pstr->wcs[wcs_idx] = WEOF;
+                 if (pstr->mbs_allocated)
+                   memset (pstr->mbs, 255, pstr->valid_len);
+               }
+             pstr->valid_raw_len = pstr->valid_len;
+           }
+         else
+#endif /* RE_ENABLE_I18N */
+           {
+             int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1];
+             pstr->valid_raw_len = 0;
+             if (pstr->trans)
+               c = pstr->trans[c];
+             pstr->tip_context = (bitset_contain (pstr->word_char, c)
+                                  ? CONTEXT_WORD
+                                  : ((IS_NEWLINE (c) && pstr->newline_anchor)
+                                     ? CONTEXT_NEWLINE : 0));
+           }
+       }
+      if (!BE (pstr->mbs_allocated, 0))
+       pstr->mbs += offset;
+    }
+  pstr->raw_mbs_idx = idx;
+  pstr->len -= offset;
+  pstr->stop -= offset;
+
+  /* Then build the buffers.  */
+#ifdef RE_ENABLE_I18N
+  if (pstr->mb_cur_max > 1)
+    {
+      if (pstr->icase)
+       {
+         reg_errcode_t ret = build_wcs_upper_buffer (pstr);
+         if (BE (ret != REG_NOERROR, 0))
+           return ret;
+       }
+      else
+       build_wcs_buffer (pstr);
+    }
+  else
+#endif /* RE_ENABLE_I18N */
+    if (BE (pstr->mbs_allocated, 0))
+      {
+       if (pstr->icase)
+         build_upper_buffer (pstr);
+       else if (pstr->trans != NULL)
+         re_string_translate_buffer (pstr);
+      }
+    else
+      pstr->valid_len = pstr->len;
+
+  pstr->cur_idx = 0;
+  return REG_NOERROR;
+}
+
+static unsigned char
+internal_function __attribute ((pure))
+re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
+{
+  int ch;
+  Idx off;
+
+  /* Handle the common (easiest) cases first.  */
+  if (BE (!pstr->mbs_allocated, 1))
+    return re_string_peek_byte (pstr, idx);
+
+#ifdef RE_ENABLE_I18N
+  if (pstr->mb_cur_max > 1
+      && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx))
+    return re_string_peek_byte (pstr, idx);
+#endif
+
+  off = pstr->cur_idx + idx;
+#ifdef RE_ENABLE_I18N
+  if (pstr->offsets_needed)
+    off = pstr->offsets[off];
+#endif
+
+  ch = pstr->raw_mbs[pstr->raw_mbs_idx + off];
+
+#ifdef RE_ENABLE_I18N
+  /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I
+     this function returns CAPITAL LETTER I instead of first byte of
+     DOTLESS SMALL LETTER I.  The latter would confuse the parser,
+     since peek_byte_case doesn't advance cur_idx in any way.  */
+  if (pstr->offsets_needed && !isascii (ch))
+    return re_string_peek_byte (pstr, idx);
+#endif
+
+  return ch;
+}
+
+static unsigned char
+internal_function __attribute ((pure))
+re_string_fetch_byte_case (re_string_t *pstr)
+{
+  if (BE (!pstr->mbs_allocated, 1))
+    return re_string_fetch_byte (pstr);
+
+#ifdef RE_ENABLE_I18N
+  if (pstr->offsets_needed)
+    {
+      Idx off;
+      int ch;
+
+      /* For tr_TR.UTF-8 [[:islower:]] there is
+        [[: CAPITAL LETTER I WITH DOT lower:]] in mbs.  Skip
+        in that case the whole multi-byte character and return
+        the original letter.  On the other side, with
+        [[: DOTLESS SMALL LETTER I return [[:I, as doing
+        anything else would complicate things too much.  */
+
+      if (!re_string_first_byte (pstr, pstr->cur_idx))
+       return re_string_fetch_byte (pstr);
+
+      off = pstr->offsets[pstr->cur_idx];
+      ch = pstr->raw_mbs[pstr->raw_mbs_idx + off];
+
+      if (! isascii (ch))
+       return re_string_fetch_byte (pstr);
+
+      re_string_skip_bytes (pstr,
+                           re_string_char_size_at (pstr, pstr->cur_idx));
+      return ch;
+    }
+#endif
+
+  return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++];
+}
+
+static void
+internal_function
+re_string_destruct (re_string_t *pstr)
+{
+#ifdef RE_ENABLE_I18N
+  re_free (pstr->wcs);
+  re_free (pstr->offsets);
+#endif /* RE_ENABLE_I18N  */
+  if (pstr->mbs_allocated)
+    re_free (pstr->mbs);
+}
+
+/* Return the context at IDX in INPUT.  */
+
+static unsigned int
+internal_function
+re_string_context_at (const re_string_t *input, Idx idx, int eflags)
+{
+  int c;
+  if (BE (! REG_VALID_INDEX (idx), 0))
+    /* In this case, we use the value stored in input->tip_context,
+       since we can't know the character in input->mbs[-1] here.  */
+    return input->tip_context;
+  if (BE (idx == input->len, 0))
+    return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF
+           : CONTEXT_NEWLINE | CONTEXT_ENDBUF);
+#ifdef RE_ENABLE_I18N
+  if (input->mb_cur_max > 1)
+    {
+      wint_t wc;
+      Idx wc_idx = idx;
+      while(input->wcs[wc_idx] == WEOF)
+       {
+#ifdef DEBUG
+         /* It must not happen.  */
+         assert (REG_VALID_INDEX (wc_idx));
+#endif
+         --wc_idx;
+         if (! REG_VALID_INDEX (wc_idx))
+           return input->tip_context;
+       }
+      wc = input->wcs[wc_idx];
+      if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc))
+       return CONTEXT_WORD;
+      return (IS_WIDE_NEWLINE (wc) && input->newline_anchor
+             ? CONTEXT_NEWLINE : 0);
+    }
+  else
+#endif
+    {
+      c = re_string_byte_at (input, idx);
+      if (bitset_contain (input->word_char, c))
+       return CONTEXT_WORD;
+      return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0;
+    }
+}
+\f
+/* Functions for set operation.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_alloc (re_node_set *set, Idx size)
+{
+  set->alloc = size;
+  set->nelem = 0;
+  set->elems = re_malloc (Idx, size);
+  if (BE (set->elems == NULL, 0))
+    return REG_ESPACE;
+  return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_1 (re_node_set *set, Idx elem)
+{
+  set->alloc = 1;
+  set->nelem = 1;
+  set->elems = re_malloc (Idx, 1);
+  if (BE (set->elems == NULL, 0))
+    {
+      set->alloc = set->nelem = 0;
+      return REG_ESPACE;
+    }
+  set->elems[0] = elem;
+  return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2)
+{
+  set->alloc = 2;
+  set->elems = re_malloc (Idx, 2);
+  if (BE (set->elems == NULL, 0))
+    return REG_ESPACE;
+  if (elem1 == elem2)
+    {
+      set->nelem = 1;
+      set->elems[0] = elem1;
+    }
+  else
+    {
+      set->nelem = 2;
+      if (elem1 < elem2)
+       {
+         set->elems[0] = elem1;
+         set->elems[1] = elem2;
+       }
+      else
+       {
+         set->elems[0] = elem2;
+         set->elems[1] = elem1;
+       }
+    }
+  return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_copy (re_node_set *dest, const re_node_set *src)
+{
+  dest->nelem = src->nelem;
+  if (src->nelem > 0)
+    {
+      dest->alloc = dest->nelem;
+      dest->elems = re_malloc (Idx, dest->alloc);
+      if (BE (dest->elems == NULL, 0))
+       {
+         dest->alloc = dest->nelem = 0;
+         return REG_ESPACE;
+       }
+      memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
+    }
+  else
+    re_node_set_init_empty (dest);
+  return REG_NOERROR;
+}
+
+/* Calculate the intersection of the sets SRC1 and SRC2. And merge it to
+   DEST. Return value indicate the error code or REG_NOERROR if succeeded.
+   Note: We assume dest->elems is NULL, when dest->alloc is 0.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
+                          const re_node_set *src2)
+{
+  Idx i1, i2, is, id, delta, sbase;
+  if (src1->nelem == 0 || src2->nelem == 0)
+    return REG_NOERROR;
+
+  /* We need dest->nelem + 2 * elems_in_intersection; this is a
+     conservative estimate.  */
+  if (src1->nelem + src2->nelem + dest->nelem > dest->alloc)
+    {
+      Idx new_alloc = src1->nelem + src2->nelem + dest->alloc;
+      Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc);
+      if (BE (new_elems == NULL, 0))
+       return REG_ESPACE;
+      dest->elems = new_elems;
+      dest->alloc = new_alloc;
+    }
+
+  /* Find the items in the intersection of SRC1 and SRC2, and copy
+     into the top of DEST those that are not already in DEST itself.  */
+  sbase = dest->nelem + src1->nelem + src2->nelem;
+  i1 = src1->nelem - 1;
+  i2 = src2->nelem - 1;
+  id = dest->nelem - 1;
+  for (;;)
+    {
+      if (src1->elems[i1] == src2->elems[i2])
+       {
+         /* Try to find the item in DEST.  Maybe we could binary search?  */
+         while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1])
+           --id;
+
+          if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1])
+            dest->elems[--sbase] = src1->elems[i1];
+
+         if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2))
+           break;
+       }
+
+      /* Lower the highest of the two items.  */
+      else if (src1->elems[i1] < src2->elems[i2])
+       {
+         if (! REG_VALID_INDEX (--i2))
+           break;
+       }
+      else
+       {
+         if (! REG_VALID_INDEX (--i1))
+           break;
+       }
+    }
+
+  id = dest->nelem - 1;
+  is = dest->nelem + src1->nelem + src2->nelem - 1;
+  delta = is - sbase + 1;
+
+  /* Now copy.  When DELTA becomes zero, the remaining
+     DEST elements are already in place; this is more or
+     less the same loop that is in re_node_set_merge.  */
+  dest->nelem += delta;
+  if (delta > 0 && REG_VALID_INDEX (id))
+    for (;;)
+      {
+       if (dest->elems[is] > dest->elems[id])
+         {
+           /* Copy from the top.  */
+           dest->elems[id + delta--] = dest->elems[is--];
+           if (delta == 0)
+             break;
+         }
+       else
+         {
+           /* Slide from the bottom.  */
+           dest->elems[id + delta] = dest->elems[id];
+           if (! REG_VALID_INDEX (--id))
+             break;
+         }
+      }
+
+  /* Copy remaining SRC elements.  */
+  memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx));
+
+  return REG_NOERROR;
+}
+
+/* Calculate the union set of the sets SRC1 and SRC2. And store it to
+   DEST. Return value indicate the error code or REG_NOERROR if succeeded.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_union (re_node_set *dest, const re_node_set *src1,
+                       const re_node_set *src2)
+{
+  Idx i1, i2, id;
+  if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0)
+    {
+      dest->alloc = src1->nelem + src2->nelem;
+      dest->elems = re_malloc (Idx, dest->alloc);
+      if (BE (dest->elems == NULL, 0))
+       return REG_ESPACE;
+    }
+  else
+    {
+      if (src1 != NULL && src1->nelem > 0)
+       return re_node_set_init_copy (dest, src1);
+      else if (src2 != NULL && src2->nelem > 0)
+       return re_node_set_init_copy (dest, src2);
+      else
+       re_node_set_init_empty (dest);
+      return REG_NOERROR;
+    }
+  for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;)
+    {
+      if (src1->elems[i1] > src2->elems[i2])
+       {
+         dest->elems[id++] = src2->elems[i2++];
+         continue;
+       }
+      if (src1->elems[i1] == src2->elems[i2])
+       ++i2;
+      dest->elems[id++] = src1->elems[i1++];
+    }
+  if (i1 < src1->nelem)
+    {
+      memcpy (dest->elems + id, src1->elems + i1,
+            (src1->nelem - i1) * sizeof (Idx));
+      id += src1->nelem - i1;
+    }
+  else if (i2 < src2->nelem)
+    {
+      memcpy (dest->elems + id, src2->elems + i2,
+            (src2->nelem - i2) * sizeof (Idx));
+      id += src2->nelem - i2;
+    }
+  dest->nelem = id;
+  return REG_NOERROR;
+}
+
+/* Calculate the union set of the sets DEST and SRC. And store it to
+   DEST. Return value indicate the error code or REG_NOERROR if succeeded.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_merge (re_node_set *dest, const re_node_set *src)
+{
+  Idx is, id, sbase, delta;
+  if (src == NULL || src->nelem == 0)
+    return REG_NOERROR;
+  if (dest->alloc < 2 * src->nelem + dest->nelem)
+    {
+      Idx new_alloc = 2 * (src->nelem + dest->alloc);
+      Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc);
+      if (BE (new_buffer == NULL, 0))
+       return REG_ESPACE;
+      dest->elems = new_buffer;
+      dest->alloc = new_alloc;
+    }
+
+  if (BE (dest->nelem == 0, 0))
+    {
+      dest->nelem = src->nelem;
+      memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
+      return REG_NOERROR;
+    }
+
+  /* Copy into the top of DEST the items of SRC that are not
+     found in DEST.  Maybe we could binary search in DEST?  */
+  for (sbase = dest->nelem + 2 * src->nelem,
+       is = src->nelem - 1, id = dest->nelem - 1;
+       REG_VALID_INDEX (is) && REG_VALID_INDEX (id); )
+    {
+      if (dest->elems[id] == src->elems[is])
+       is--, id--;
+      else if (dest->elems[id] < src->elems[is])
+       dest->elems[--sbase] = src->elems[is--];
+      else /* if (dest->elems[id] > src->elems[is]) */
+       --id;
+    }
+
+  if (REG_VALID_INDEX (is))
+    {
+      /* If DEST is exhausted, the remaining items of SRC must be unique.  */
+      sbase -= is + 1;
+      memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx));
+    }
+
+  id = dest->nelem - 1;
+  is = dest->nelem + 2 * src->nelem - 1;
+  delta = is - sbase + 1;
+  if (delta == 0)
+    return REG_NOERROR;
+
+  /* Now copy.  When DELTA becomes zero, the remaining
+     DEST elements are already in place.  */
+  dest->nelem += delta;
+  for (;;)
+    {
+      if (dest->elems[is] > dest->elems[id])
+       {
+         /* Copy from the top.  */
+         dest->elems[id + delta--] = dest->elems[is--];
+         if (delta == 0)
+           break;
+       }
+      else
+       {
+         /* Slide from the bottom.  */
+         dest->elems[id + delta] = dest->elems[id];
+         if (! REG_VALID_INDEX (--id))
+           {
+             /* Copy remaining SRC elements.  */
+             memcpy (dest->elems, dest->elems + sbase,
+                     delta * sizeof (Idx));
+             break;
+           }
+       }
+    }
+
+  return REG_NOERROR;
+}
+
+/* Insert the new element ELEM to the re_node_set* SET.
+   SET should not already have ELEM.
+   Return true if successful.  */
+
+static bool
+internal_function __attribute_warn_unused_result__
+re_node_set_insert (re_node_set *set, Idx elem)
+{
+  Idx idx;
+  /* In case the set is empty.  */
+  if (set->alloc == 0)
+    return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1);
+
+  if (BE (set->nelem, 0) == 0)
+    {
+      /* We already guaranteed above that set->alloc != 0.  */
+      set->elems[0] = elem;
+      ++set->nelem;
+      return true;
+    }
+
+  /* Realloc if we need.  */
+  if (set->alloc == set->nelem)
+    {
+      Idx *new_elems;
+      set->alloc = set->alloc * 2;
+      new_elems = re_realloc (set->elems, Idx, set->alloc);
+      if (BE (new_elems == NULL, 0))
+       return false;
+      set->elems = new_elems;
+    }
+
+  /* Move the elements which follows the new element.  Test the
+     first element separately to skip a check in the inner loop.  */
+  if (elem < set->elems[0])
+    {
+      idx = 0;
+      for (idx = set->nelem; idx > 0; idx--)
+       set->elems[idx] = set->elems[idx - 1];
+    }
+  else
+    {
+      for (idx = set->nelem; set->elems[idx - 1] > elem; idx--)
+       set->elems[idx] = set->elems[idx - 1];
+    }
+
+  /* Insert the new element.  */
+  set->elems[idx] = elem;
+  ++set->nelem;
+  return true;
+}
+
+/* Insert the new element ELEM to the re_node_set* SET.
+   SET should not already have any element greater than or equal to ELEM.
+   Return true if successful.  */
+
+static bool
+internal_function __attribute_warn_unused_result__
+re_node_set_insert_last (re_node_set *set, Idx elem)
+{
+  /* Realloc if we need.  */
+  if (set->alloc == set->nelem)
+    {
+      Idx *new_elems;
+      set->alloc = (set->alloc + 1) * 2;
+      new_elems = re_realloc (set->elems, Idx, set->alloc);
+      if (BE (new_elems == NULL, 0))
+       return false;
+      set->elems = new_elems;
+    }
+
+  /* Insert the new element.  */
+  set->elems[set->nelem++] = elem;
+  return true;
+}
+
+/* Compare two node sets SET1 and SET2.
+   Return true if SET1 and SET2 are equivalent.  */
+
+static bool
+internal_function __attribute ((pure))
+re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
+{
+  Idx i;
+  if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem)
+    return false;
+  for (i = set1->nelem ; REG_VALID_INDEX (--i) ; )
+    if (set1->elems[i] != set2->elems[i])
+      return false;
+  return true;
+}
+
+/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise.  */
+
+static Idx
+internal_function __attribute ((pure))
+re_node_set_contains (const re_node_set *set, Idx elem)
+{
+  __re_size_t idx, right, mid;
+  if (! REG_VALID_NONZERO_INDEX (set->nelem))
+    return 0;
+
+  /* Binary search the element.  */
+  idx = 0;
+  right = set->nelem - 1;
+  while (idx < right)
+    {
+      mid = (idx + right) / 2;
+      if (set->elems[mid] < elem)
+       idx = mid + 1;
+      else
+       right = mid;
+    }
+  return set->elems[idx] == elem ? idx + 1 : 0;
+}
+
+static void
+internal_function
+re_node_set_remove_at (re_node_set *set, Idx idx)
+{
+  if (idx < 0 || idx >= set->nelem)
+    return;
+  --set->nelem;
+  for (; idx < set->nelem; idx++)
+    set->elems[idx] = set->elems[idx + 1];
+}
+\f
+
+/* Add the token TOKEN to dfa->nodes, and return the index of the token.
+   Or return REG_MISSING if an error occurred.  */
+
+static Idx
+internal_function
+re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
+{
+  if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0))
+    {
+      size_t new_nodes_alloc = dfa->nodes_alloc * 2;
+      Idx *new_nexts, *new_indices;
+      re_node_set *new_edests, *new_eclosures;
+      re_token_t *new_nodes;
+      size_t max_object_size =
+       MAX (sizeof (re_token_t),
+            MAX (sizeof (re_node_set),
+                 sizeof (Idx)));
+
+      /* Avoid overflows.  */
+      if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0))
+       return REG_MISSING;
+
+      new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
+      if (BE (new_nodes == NULL, 0))
+       return REG_MISSING;
+      dfa->nodes = new_nodes;
+      new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc);
+      new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc);
+      new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc);
+      new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
+      if (BE (new_nexts == NULL || new_indices == NULL
+             || new_edests == NULL || new_eclosures == NULL, 0))
+       return REG_MISSING;
+      dfa->nexts = new_nexts;
+      dfa->org_indices = new_indices;
+      dfa->edests = new_edests;
+      dfa->eclosures = new_eclosures;
+      dfa->nodes_alloc = new_nodes_alloc;
+    }
+  dfa->nodes[dfa->nodes_len] = token;
+  dfa->nodes[dfa->nodes_len].constraint = 0;
+#ifdef RE_ENABLE_I18N
+  {
+  int type = token.type;
+  dfa->nodes[dfa->nodes_len].accept_mb =
+    (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
+  }
+#endif
+  dfa->nexts[dfa->nodes_len] = REG_MISSING;
+  re_node_set_init_empty (dfa->edests + dfa->nodes_len);
+  re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
+  return dfa->nodes_len++;
+}
+
+static inline re_hashval_t
+internal_function
+calc_state_hash (const re_node_set *nodes, unsigned int context)
+{
+  re_hashval_t hash = nodes->nelem + context;
+  Idx i;
+  for (i = 0 ; i < nodes->nelem ; i++)
+    hash += nodes->elems[i];
+  return hash;
+}
+
+/* Search for the state whose node_set is equivalent to NODES.
+   Return the pointer to the state, if we found it in the DFA.
+   Otherwise create the new one and return it.  In case of an error
+   return NULL and set the error code in ERR.
+   Note: - We assume NULL as the invalid state, then it is possible that
+          return value is NULL and ERR is REG_NOERROR.
+        - We never return non-NULL value in case of any errors, it is for
+          optimization.  */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
+                 const re_node_set *nodes)
+{
+  re_hashval_t hash;
+  re_dfastate_t *new_state;
+  struct re_state_table_entry *spot;
+  Idx i;
+#ifdef lint
+  /* Suppress bogus uninitialized-variable warnings.  */
+  *err = REG_NOERROR;
+#endif
+  if (BE (nodes->nelem == 0, 0))
+    {
+      *err = REG_NOERROR;
+      return NULL;
+    }
+  hash = calc_state_hash (nodes, 0);
+  spot = dfa->state_table + (hash & dfa->state_hash_mask);
+
+  for (i = 0 ; i < spot->num ; i++)
+    {
+      re_dfastate_t *state = spot->array[i];
+      if (hash != state->hash)
+       continue;
+      if (re_node_set_compare (&state->nodes, nodes))
+       return state;
+    }
+
+  /* There are no appropriate state in the dfa, create the new one.  */
+  new_state = create_ci_newstate (dfa, nodes, hash);
+  if (BE (new_state == NULL, 0))
+    *err = REG_ESPACE;
+
+  return new_state;
+}
+
+/* Search for the state whose node_set is equivalent to NODES and
+   whose context is equivalent to CONTEXT.
+   Return the pointer to the state, if we found it in the DFA.
+   Otherwise create the new one and return it.  In case of an error
+   return NULL and set the error code in ERR.
+   Note: - We assume NULL as the invalid state, then it is possible that
+          return value is NULL and ERR is REG_NOERROR.
+        - We never return non-NULL value in case of any errors, it is for
+          optimization.  */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
+                         const re_node_set *nodes, unsigned int context)
+{
+  re_hashval_t hash;
+  re_dfastate_t *new_state;
+  struct re_state_table_entry *spot;
+  Idx i;
+#ifdef lint
+  /* Suppress bogus uninitialized-variable warnings.  */
+  *err = REG_NOERROR;
+#endif
+  if (nodes->nelem == 0)
+    {
+      *err = REG_NOERROR;
+      return NULL;
+    }
+  hash = calc_state_hash (nodes, context);
+  spot = dfa->state_table + (hash & dfa->state_hash_mask);
+
+  for (i = 0 ; i < spot->num ; i++)
+    {
+      re_dfastate_t *state = spot->array[i];
+      if (state->hash == hash
+         && state->context == context
+         && re_node_set_compare (state->entrance_nodes, nodes))
+       return state;
+    }
+  /* There are no appropriate state in `dfa', create the new one.  */
+  new_state = create_cd_newstate (dfa, nodes, context, hash);
+  if (BE (new_state == NULL, 0))
+    *err = REG_ESPACE;
+
+  return new_state;
+}
+
+/* Finish initialization of the new state NEWSTATE, and using its hash value
+   HASH put in the appropriate bucket of DFA's state table.  Return value
+   indicates the error code if failed.  */
+
+static reg_errcode_t
+__attribute_warn_unused_result__
+register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
+               re_hashval_t hash)
+{
+  struct re_state_table_entry *spot;
+  reg_errcode_t err;
+  Idx i;
+
+  newstate->hash = hash;
+  err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem);
+  if (BE (err != REG_NOERROR, 0))
+    return REG_ESPACE;
+  for (i = 0; i < newstate->nodes.nelem; i++)
+    {
+      Idx elem = newstate->nodes.elems[i];
+      if (!IS_EPSILON_NODE (dfa->nodes[elem].type))
+       if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0))
+         return REG_ESPACE;
+    }
+
+  spot = dfa->state_table + (hash & dfa->state_hash_mask);
+  if (BE (spot->alloc <= spot->num, 0))
+    {
+      Idx new_alloc = 2 * spot->num + 2;
+      re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *,
+                                             new_alloc);
+      if (BE (new_array == NULL, 0))
+       return REG_ESPACE;
+      spot->array = new_array;
+      spot->alloc = new_alloc;
+    }
+  spot->array[spot->num++] = newstate;
+  return REG_NOERROR;
+}
+
+static void
+free_state (re_dfastate_t *state)
+{
+  re_node_set_free (&state->non_eps_nodes);
+  re_node_set_free (&state->inveclosure);
+  if (state->entrance_nodes != &state->nodes)
+    {
+      re_node_set_free (state->entrance_nodes);
+      re_free (state->entrance_nodes);
+    }
+  re_node_set_free (&state->nodes);
+  re_free (state->word_trtable);
+  re_free (state->trtable);
+  re_free (state);
+}
+
+/* Create the new state which is independ of contexts.
+   Return the new state if succeeded, otherwise return NULL.  */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
+                   re_hashval_t hash)
+{
+  Idx i;
+  reg_errcode_t err;
+  re_dfastate_t *newstate;
+
+  newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
+  if (BE (newstate == NULL, 0))
+    return NULL;
+  err = re_node_set_init_copy (&newstate->nodes, nodes);
+  if (BE (err != REG_NOERROR, 0))
+    {
+      re_free (newstate);
+      return NULL;
+    }
+
+  newstate->entrance_nodes = &newstate->nodes;
+  for (i = 0 ; i < nodes->nelem ; i++)
+    {
+      re_token_t *node = dfa->nodes + nodes->elems[i];
+      re_token_type_t type = node->type;
+      if (type == CHARACTER && !node->constraint)
+       continue;
+#ifdef RE_ENABLE_I18N
+      newstate->accept_mb |= node->accept_mb;
+#endif /* RE_ENABLE_I18N */
+
+      /* If the state has the halt node, the state is a halt state.  */
+      if (type == END_OF_RE)
+       newstate->halt = 1;
+      else if (type == OP_BACK_REF)
+       newstate->has_backref = 1;
+      else if (type == ANCHOR || node->constraint)
+       newstate->has_constraint = 1;
+    }
+  err = register_state (dfa, newstate, hash);
+  if (BE (err != REG_NOERROR, 0))
+    {
+      free_state (newstate);
+      newstate = NULL;
+    }
+  return newstate;
+}
+
+/* Create the new state which is depend on the context CONTEXT.
+   Return the new state if succeeded, otherwise return NULL.  */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
+                   unsigned int context, re_hashval_t hash)
+{
+  Idx i, nctx_nodes = 0;
+  reg_errcode_t err;
+  re_dfastate_t *newstate;
+
+  newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
+  if (BE (newstate == NULL, 0))
+    return NULL;
+  err = re_node_set_init_copy (&newstate->nodes, nodes);
+  if (BE (err != REG_NOERROR, 0))
+    {
+      re_free (newstate);
+      return NULL;
+    }
+
+  newstate->context = context;
+  newstate->entrance_nodes = &newstate->nodes;
+
+  for (i = 0 ; i < nodes->nelem ; i++)
+    {
+      re_token_t *node = dfa->nodes + nodes->elems[i];
+      re_token_type_t type = node->type;
+      unsigned int constraint = node->constraint;
+
+      if (type == CHARACTER && !constraint)
+       continue;
+#ifdef RE_ENABLE_I18N
+      newstate->accept_mb |= node->accept_mb;
+#endif /* RE_ENABLE_I18N */
+
+      /* If the state has the halt node, the state is a halt state.  */
+      if (type == END_OF_RE)
+       newstate->halt = 1;
+      else if (type == OP_BACK_REF)
+       newstate->has_backref = 1;
+
+      if (constraint)
+       {
+         if (newstate->entrance_nodes == &newstate->nodes)
+           {
+             newstate->entrance_nodes = re_malloc (re_node_set, 1);
+             if (BE (newstate->entrance_nodes == NULL, 0))
+               {
+                 free_state (newstate);
+                 return NULL;
+               }
+             if (re_node_set_init_copy (newstate->entrance_nodes, nodes)
+                 != REG_NOERROR)
+               return NULL;
+             nctx_nodes = 0;
+             newstate->has_constraint = 1;
+           }
+
+         if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context))
+           {
+             re_node_set_remove_at (&newstate->nodes, i - nctx_nodes);
+             ++nctx_nodes;
+           }
+       }
+    }
+  err = register_state (dfa, newstate, hash);
+  if (BE (err != REG_NOERROR, 0))
+    {
+      free_state (newstate);
+      newstate = NULL;
+    }
+  return  newstate;
+}
diff --git a/gnulib/lib/regex_internal.h b/gnulib/lib/regex_internal.h
new file mode 100644 (file)
index 0000000..df4a095
--- /dev/null
@@ -0,0 +1,870 @@
+/* Extended regular expression matching and search library.
+   Copyright (C) 2002-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _REGEX_INTERNAL_H
+#define _REGEX_INTERNAL_H 1
+
+#include <assert.h>
+#include <ctype.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <langinfo.h>
+#ifndef _LIBC
+# include "localcharset.h"
+#endif
+#include <locale.h>
+
+#include <wchar.h>
+#include <wctype.h>
+#include <stdint.h>
+#if defined _LIBC
+# include <bits/libc-lock.h>
+#else
+# define __libc_lock_init(NAME) do { } while (0)
+# define __libc_lock_lock(NAME) do { } while (0)
+# define __libc_lock_unlock(NAME) do { } while (0)
+#endif
+
+/* In case that the system doesn't have isblank().  */
+#if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
+# define isblank(ch) ((ch) == ' ' || (ch) == '\t')
+#endif
+
+#ifdef _LIBC
+# ifndef _RE_DEFINE_LOCALE_FUNCTIONS
+#  define _RE_DEFINE_LOCALE_FUNCTIONS 1
+#   include <locale/localeinfo.h>
+#   include <locale/elem-hash.h>
+#   include <locale/coll-lookup.h>
+# endif
+#endif
+
+/* This is for other GNU distributions with internationalized messages.  */
+#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
+# include <libintl.h>
+# ifdef _LIBC
+#  undef gettext
+#  define gettext(msgid) \
+  INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES)
+# endif
+#else
+# define gettext(msgid) (msgid)
+#endif
+
+#ifndef gettext_noop
+/* This define is so xgettext can find the internationalizable
+   strings.  */
+# define gettext_noop(String) String
+#endif
+
+/* For loser systems without the definition.  */
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC
+# define RE_ENABLE_I18N
+#endif
+
+#if __GNUC__ >= 3
+# define BE(expr, val) __builtin_expect (expr, val)
+#else
+# define BE(expr, val) (expr)
+# ifdef _LIBC
+#  define inline
+# endif
+#endif
+
+/* Number of ASCII characters.  */
+#define ASCII_CHARS 0x80
+
+/* Number of single byte characters.  */
+#define SBC_MAX (UCHAR_MAX + 1)
+
+#define COLL_ELEM_LEN_MAX 8
+
+/* The character which represents newline.  */
+#define NEWLINE_CHAR '\n'
+#define WIDE_NEWLINE_CHAR L'\n'
+
+/* Rename to standard API for using out of glibc.  */
+#ifndef _LIBC
+# define __wctype wctype
+# define __iswctype iswctype
+# define __btowc btowc
+# define __wcrtomb wcrtomb
+# define __mbrtowc mbrtowc
+# define __regfree regfree
+# define attribute_hidden
+#endif /* not _LIBC */
+
+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+# define __attribute(arg) __attribute__ (arg)
+#else
+# define __attribute(arg)
+#endif
+
+typedef __re_idx_t Idx;
+
+/* Special return value for failure to match.  */
+#define REG_MISSING ((Idx) -1)
+
+/* Special return value for internal error.  */
+#define REG_ERROR ((Idx) -2)
+
+/* Test whether N is a valid index, and is not one of the above.  */
+#ifdef _REGEX_LARGE_OFFSETS
+# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR)
+#else
+# define REG_VALID_INDEX(n) (0 <= (n))
+#endif
+
+/* Test whether N is a valid nonzero index.  */
+#ifdef _REGEX_LARGE_OFFSETS
+# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1))
+#else
+# define REG_VALID_NONZERO_INDEX(n) (0 < (n))
+#endif
+
+/* A hash value, suitable for computing hash tables.  */
+typedef __re_size_t re_hashval_t;
+
+/* An integer used to represent a set of bits.  It must be unsigned,
+   and must be at least as wide as unsigned int.  */
+typedef unsigned long int bitset_word_t;
+/* All bits set in a bitset_word_t.  */
+#define BITSET_WORD_MAX ULONG_MAX
+
+/* Number of bits in a bitset_word_t.  For portability to hosts with
+   padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)';
+   instead, deduce it directly from BITSET_WORD_MAX.  Avoid
+   greater-than-32-bit integers and unconditional shifts by more than
+   31 bits, as they're not portable.  */
+#if BITSET_WORD_MAX == 0xffffffffUL
+# define BITSET_WORD_BITS 32
+#elif BITSET_WORD_MAX >> 31 >> 4 == 1
+# define BITSET_WORD_BITS 36
+#elif BITSET_WORD_MAX >> 31 >> 16 == 1
+# define BITSET_WORD_BITS 48
+#elif BITSET_WORD_MAX >> 31 >> 28 == 1
+# define BITSET_WORD_BITS 60
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1
+# define BITSET_WORD_BITS 64
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1
+# define BITSET_WORD_BITS 72
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1
+# define BITSET_WORD_BITS 128
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1
+# define BITSET_WORD_BITS 256
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1
+# define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */
+# if BITSET_WORD_BITS <= SBC_MAX
+#  error "Invalid SBC_MAX"
+# endif
+#else
+# error "Add case for new bitset_word_t size"
+#endif
+
+/* Number of bitset_word_t values in a bitset_t.  */
+#define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS)
+
+typedef bitset_word_t bitset_t[BITSET_WORDS];
+typedef bitset_word_t *re_bitset_ptr_t;
+typedef const bitset_word_t *re_const_bitset_ptr_t;
+
+#define PREV_WORD_CONSTRAINT 0x0001
+#define PREV_NOTWORD_CONSTRAINT 0x0002
+#define NEXT_WORD_CONSTRAINT 0x0004
+#define NEXT_NOTWORD_CONSTRAINT 0x0008
+#define PREV_NEWLINE_CONSTRAINT 0x0010
+#define NEXT_NEWLINE_CONSTRAINT 0x0020
+#define PREV_BEGBUF_CONSTRAINT 0x0040
+#define NEXT_ENDBUF_CONSTRAINT 0x0080
+#define WORD_DELIM_CONSTRAINT 0x0100
+#define NOT_WORD_DELIM_CONSTRAINT 0x0200
+
+typedef enum
+{
+  INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT,
+  WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT,
+  WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT,
+  INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT,
+  LINE_FIRST = PREV_NEWLINE_CONSTRAINT,
+  LINE_LAST = NEXT_NEWLINE_CONSTRAINT,
+  BUF_FIRST = PREV_BEGBUF_CONSTRAINT,
+  BUF_LAST = NEXT_ENDBUF_CONSTRAINT,
+  WORD_DELIM = WORD_DELIM_CONSTRAINT,
+  NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT
+} re_context_type;
+
+typedef struct
+{
+  Idx alloc;
+  Idx nelem;
+  Idx *elems;
+} re_node_set;
+
+typedef enum
+{
+  NON_TYPE = 0,
+
+  /* Node type, These are used by token, node, tree.  */
+  CHARACTER = 1,
+  END_OF_RE = 2,
+  SIMPLE_BRACKET = 3,
+  OP_BACK_REF = 4,
+  OP_PERIOD = 5,
+#ifdef RE_ENABLE_I18N
+  COMPLEX_BRACKET = 6,
+  OP_UTF8_PERIOD = 7,
+#endif /* RE_ENABLE_I18N */
+
+  /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used
+     when the debugger shows values of this enum type.  */
+#define EPSILON_BIT 8
+  OP_OPEN_SUBEXP = EPSILON_BIT | 0,
+  OP_CLOSE_SUBEXP = EPSILON_BIT | 1,
+  OP_ALT = EPSILON_BIT | 2,
+  OP_DUP_ASTERISK = EPSILON_BIT | 3,
+  ANCHOR = EPSILON_BIT | 4,
+
+  /* Tree type, these are used only by tree. */
+  CONCAT = 16,
+  SUBEXP = 17,
+
+  /* Token type, these are used only by token.  */
+  OP_DUP_PLUS = 18,
+  OP_DUP_QUESTION,
+  OP_OPEN_BRACKET,
+  OP_CLOSE_BRACKET,
+  OP_CHARSET_RANGE,
+  OP_OPEN_DUP_NUM,
+  OP_CLOSE_DUP_NUM,
+  OP_NON_MATCH_LIST,
+  OP_OPEN_COLL_ELEM,
+  OP_CLOSE_COLL_ELEM,
+  OP_OPEN_EQUIV_CLASS,
+  OP_CLOSE_EQUIV_CLASS,
+  OP_OPEN_CHAR_CLASS,
+  OP_CLOSE_CHAR_CLASS,
+  OP_WORD,
+  OP_NOTWORD,
+  OP_SPACE,
+  OP_NOTSPACE,
+  BACK_SLASH
+
+} re_token_type_t;
+
+#ifdef RE_ENABLE_I18N
+typedef struct
+{
+  /* Multibyte characters.  */
+  wchar_t *mbchars;
+
+  /* Collating symbols.  */
+# ifdef _LIBC
+  int32_t *coll_syms;
+# endif
+
+  /* Equivalence classes. */
+# ifdef _LIBC
+  int32_t *equiv_classes;
+# endif
+
+  /* Range expressions. */
+# ifdef _LIBC
+  uint32_t *range_starts;
+  uint32_t *range_ends;
+# else /* not _LIBC */
+  wchar_t *range_starts;
+  wchar_t *range_ends;
+# endif /* not _LIBC */
+
+  /* Character classes. */
+  wctype_t *char_classes;
+
+  /* If this character set is the non-matching list.  */
+  unsigned int non_match : 1;
+
+  /* # of multibyte characters.  */
+  Idx nmbchars;
+
+  /* # of collating symbols.  */
+  Idx ncoll_syms;
+
+  /* # of equivalence classes. */
+  Idx nequiv_classes;
+
+  /* # of range expressions. */
+  Idx nranges;
+
+  /* # of character classes. */
+  Idx nchar_classes;
+} re_charset_t;
+#endif /* RE_ENABLE_I18N */
+
+typedef struct
+{
+  union
+  {
+    unsigned char c;           /* for CHARACTER */
+    re_bitset_ptr_t sbcset;    /* for SIMPLE_BRACKET */
+#ifdef RE_ENABLE_I18N
+    re_charset_t *mbcset;      /* for COMPLEX_BRACKET */
+#endif /* RE_ENABLE_I18N */
+    Idx idx;                   /* for BACK_REF */
+    re_context_type ctx_type;  /* for ANCHOR */
+  } opr;
+#if __GNUC__ >= 2 && !__STRICT_ANSI__
+  re_token_type_t type : 8;
+#else
+  re_token_type_t type;
+#endif
+  unsigned int constraint : 10;        /* context constraint */
+  unsigned int duplicated : 1;
+  unsigned int opt_subexp : 1;
+#ifdef RE_ENABLE_I18N
+  unsigned int accept_mb : 1;
+  /* These 2 bits can be moved into the union if needed (e.g. if running out
+     of bits; move opr.c to opr.c.c and move the flags to opr.c.flags).  */
+  unsigned int mb_partial : 1;
+#endif
+  unsigned int word_char : 1;
+} re_token_t;
+
+#define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT)
+
+struct re_string_t
+{
+  /* Indicate the raw buffer which is the original string passed as an
+     argument of regexec(), re_search(), etc..  */
+  const unsigned char *raw_mbs;
+  /* Store the multibyte string.  In case of "case insensitive mode" like
+     REG_ICASE, upper cases of the string are stored, otherwise MBS points
+     the same address that RAW_MBS points.  */
+  unsigned char *mbs;
+#ifdef RE_ENABLE_I18N
+  /* Store the wide character string which is corresponding to MBS.  */
+  wint_t *wcs;
+  Idx *offsets;
+  mbstate_t cur_state;
+#endif
+  /* Index in RAW_MBS.  Each character mbs[i] corresponds to
+     raw_mbs[raw_mbs_idx + i].  */
+  Idx raw_mbs_idx;
+  /* The length of the valid characters in the buffers.  */
+  Idx valid_len;
+  /* The corresponding number of bytes in raw_mbs array.  */
+  Idx valid_raw_len;
+  /* The length of the buffers MBS and WCS.  */
+  Idx bufs_len;
+  /* The index in MBS, which is updated by re_string_fetch_byte.  */
+  Idx cur_idx;
+  /* length of RAW_MBS array.  */
+  Idx raw_len;
+  /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN.  */
+  Idx len;
+  /* End of the buffer may be shorter than its length in the cases such
+     as re_match_2, re_search_2.  Then, we use STOP for end of the buffer
+     instead of LEN.  */
+  Idx raw_stop;
+  /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS.  */
+  Idx stop;
+
+  /* The context of mbs[0].  We store the context independently, since
+     the context of mbs[0] may be different from raw_mbs[0], which is
+     the beginning of the input string.  */
+  unsigned int tip_context;
+  /* The translation passed as a part of an argument of re_compile_pattern.  */
+  RE_TRANSLATE_TYPE trans;
+  /* Copy of re_dfa_t's word_char.  */
+  re_const_bitset_ptr_t word_char;
+  /* true if REG_ICASE.  */
+  unsigned char icase;
+  unsigned char is_utf8;
+  unsigned char map_notascii;
+  unsigned char mbs_allocated;
+  unsigned char offsets_needed;
+  unsigned char newline_anchor;
+  unsigned char word_ops_used;
+  int mb_cur_max;
+};
+typedef struct re_string_t re_string_t;
+
+
+struct re_dfa_t;
+typedef struct re_dfa_t re_dfa_t;
+
+#ifndef _LIBC
+# if defined __i386__ && !defined __EMX__
+#  define internal_function   __attribute ((regparm (3), stdcall))
+# else
+#  define internal_function
+# endif
+#endif
+
+static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
+                                               Idx new_buf_len)
+     internal_function;
+#ifdef RE_ENABLE_I18N
+static void build_wcs_buffer (re_string_t *pstr) internal_function;
+static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr)
+     internal_function;
+#endif /* RE_ENABLE_I18N */
+static void build_upper_buffer (re_string_t *pstr) internal_function;
+static void re_string_translate_buffer (re_string_t *pstr) internal_function;
+static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
+                                         int eflags)
+     internal_function __attribute ((pure));
+#define re_string_peek_byte(pstr, offset) \
+  ((pstr)->mbs[(pstr)->cur_idx + offset])
+#define re_string_fetch_byte(pstr) \
+  ((pstr)->mbs[(pstr)->cur_idx++])
+#define re_string_first_byte(pstr, idx) \
+  ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF)
+#define re_string_is_single_byte_char(pstr, idx) \
+  ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \
+                               || (pstr)->wcs[(idx) + 1] != WEOF))
+#define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx)
+#define re_string_cur_idx(pstr) ((pstr)->cur_idx)
+#define re_string_get_buffer(pstr) ((pstr)->mbs)
+#define re_string_length(pstr) ((pstr)->len)
+#define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx])
+#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
+#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
+
+#include <alloca.h>
+
+#ifndef _LIBC
+# if HAVE_ALLOCA
+/* The OS usually guarantees only one guard page at the bottom of the stack,
+   and a page size can be as small as 4096 bytes.  So we cannot safely
+   allocate anything larger than 4096 bytes.  Also care for the possibility
+   of a few compiler-allocated temporary stack slots.  */
+#  define __libc_use_alloca(n) ((n) < 4032)
+# else
+/* alloca is implemented with malloc, so just use malloc.  */
+#  define __libc_use_alloca(n) 0
+#  undef alloca
+#  define alloca(n) malloc (n)
+# endif
+#endif
+
+#ifndef MAX
+# define MAX(a,b) ((a) < (b) ? (b) : (a))
+#endif
+
+#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t)))
+#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t)))
+#define re_free(p) free (p)
+
+struct bin_tree_t
+{
+  struct bin_tree_t *parent;
+  struct bin_tree_t *left;
+  struct bin_tree_t *right;
+  struct bin_tree_t *first;
+  struct bin_tree_t *next;
+
+  re_token_t token;
+
+  /* `node_idx' is the index in dfa->nodes, if `type' == 0.
+     Otherwise `type' indicate the type of this node.  */
+  Idx node_idx;
+};
+typedef struct bin_tree_t bin_tree_t;
+
+#define BIN_TREE_STORAGE_SIZE \
+  ((1024 - sizeof (void *)) / sizeof (bin_tree_t))
+
+struct bin_tree_storage_t
+{
+  struct bin_tree_storage_t *next;
+  bin_tree_t data[BIN_TREE_STORAGE_SIZE];
+};
+typedef struct bin_tree_storage_t bin_tree_storage_t;
+
+#define CONTEXT_WORD 1
+#define CONTEXT_NEWLINE (CONTEXT_WORD << 1)
+#define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1)
+#define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1)
+
+#define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD)
+#define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE)
+#define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF)
+#define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF)
+#define IS_ORDINARY_CONTEXT(c) ((c) == 0)
+
+#define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_')
+#define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR)
+#define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_')
+#define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR)
+
+#define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \
+ ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \
+  || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \
+  || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\
+  || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context)))
+
+#define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \
+ ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \
+  || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \
+  || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \
+  || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context)))
+
+struct re_dfastate_t
+{
+  re_hashval_t hash;
+  re_node_set nodes;
+  re_node_set non_eps_nodes;
+  re_node_set inveclosure;
+  re_node_set *entrance_nodes;
+  struct re_dfastate_t **trtable, **word_trtable;
+  unsigned int context : 4;
+  unsigned int halt : 1;
+  /* If this state can accept `multi byte'.
+     Note that we refer to multibyte characters, and multi character
+     collating elements as `multi byte'.  */
+  unsigned int accept_mb : 1;
+  /* If this state has backreference node(s).  */
+  unsigned int has_backref : 1;
+  unsigned int has_constraint : 1;
+};
+typedef struct re_dfastate_t re_dfastate_t;
+
+struct re_state_table_entry
+{
+  Idx num;
+  Idx alloc;
+  re_dfastate_t **array;
+};
+
+/* Array type used in re_sub_match_last_t and re_sub_match_top_t.  */
+
+typedef struct
+{
+  Idx next_idx;
+  Idx alloc;
+  re_dfastate_t **array;
+} state_array_t;
+
+/* Store information about the node NODE whose type is OP_CLOSE_SUBEXP.  */
+
+typedef struct
+{
+  Idx node;
+  Idx str_idx; /* The position NODE match at.  */
+  state_array_t path;
+} re_sub_match_last_t;
+
+/* Store information about the node NODE whose type is OP_OPEN_SUBEXP.
+   And information about the node, whose type is OP_CLOSE_SUBEXP,
+   corresponding to NODE is stored in LASTS.  */
+
+typedef struct
+{
+  Idx str_idx;
+  Idx node;
+  state_array_t *path;
+  Idx alasts; /* Allocation size of LASTS.  */
+  Idx nlasts; /* The number of LASTS.  */
+  re_sub_match_last_t **lasts;
+} re_sub_match_top_t;
+
+struct re_backref_cache_entry
+{
+  Idx node;
+  Idx str_idx;
+  Idx subexp_from;
+  Idx subexp_to;
+  char more;
+  char unused;
+  unsigned short int eps_reachable_subexps_map;
+};
+
+typedef struct
+{
+  /* The string object corresponding to the input string.  */
+  re_string_t input;
+#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+  const re_dfa_t *const dfa;
+#else
+  const re_dfa_t *dfa;
+#endif
+  /* EFLAGS of the argument of regexec.  */
+  int eflags;
+  /* Where the matching ends.  */
+  Idx match_last;
+  Idx last_node;
+  /* The state log used by the matcher.  */
+  re_dfastate_t **state_log;
+  Idx state_log_top;
+  /* Back reference cache.  */
+  Idx nbkref_ents;
+  Idx abkref_ents;
+  struct re_backref_cache_entry *bkref_ents;
+  int max_mb_elem_len;
+  Idx nsub_tops;
+  Idx asub_tops;
+  re_sub_match_top_t **sub_tops;
+} re_match_context_t;
+
+typedef struct
+{
+  re_dfastate_t **sifted_states;
+  re_dfastate_t **limited_states;
+  Idx last_node;
+  Idx last_str_idx;
+  re_node_set limits;
+} re_sift_context_t;
+
+struct re_fail_stack_ent_t
+{
+  Idx idx;
+  Idx node;
+  regmatch_t *regs;
+  re_node_set eps_via_nodes;
+};
+
+struct re_fail_stack_t
+{
+  Idx num;
+  Idx alloc;
+  struct re_fail_stack_ent_t *stack;
+};
+
+struct re_dfa_t
+{
+  re_token_t *nodes;
+  size_t nodes_alloc;
+  size_t nodes_len;
+  Idx *nexts;
+  Idx *org_indices;
+  re_node_set *edests;
+  re_node_set *eclosures;
+  re_node_set *inveclosures;
+  struct re_state_table_entry *state_table;
+  re_dfastate_t *init_state;
+  re_dfastate_t *init_state_word;
+  re_dfastate_t *init_state_nl;
+  re_dfastate_t *init_state_begbuf;
+  bin_tree_t *str_tree;
+  bin_tree_storage_t *str_tree_storage;
+  re_bitset_ptr_t sb_char;
+  int str_tree_storage_idx;
+
+  /* number of subexpressions `re_nsub' is in regex_t.  */
+  re_hashval_t state_hash_mask;
+  Idx init_node;
+  Idx nbackref; /* The number of backreference in this dfa.  */
+
+  /* Bitmap expressing which backreference is used.  */
+  bitset_word_t used_bkref_map;
+  bitset_word_t completed_bkref_map;
+
+  unsigned int has_plural_match : 1;
+  /* If this dfa has "multibyte node", which is a backreference or
+     a node which can accept multibyte character or multi character
+     collating element.  */
+  unsigned int has_mb_node : 1;
+  unsigned int is_utf8 : 1;
+  unsigned int map_notascii : 1;
+  unsigned int word_ops_used : 1;
+  int mb_cur_max;
+  bitset_t word_char;
+  reg_syntax_t syntax;
+  Idx *subexp_map;
+#ifdef DEBUG
+  char* re_str;
+#endif
+#ifdef _LIBC
+  __libc_lock_define (, lock)
+#endif
+};
+
+#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
+#define re_node_set_remove(set,id) \
+  (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1))
+#define re_node_set_empty(p) ((p)->nelem = 0)
+#define re_node_set_free(set) re_free ((set)->elems)
+\f
+
+typedef enum
+{
+  SB_CHAR,
+  MB_CHAR,
+  EQUIV_CLASS,
+  COLL_SYM,
+  CHAR_CLASS
+} bracket_elem_type;
+
+typedef struct
+{
+  bracket_elem_type type;
+  union
+  {
+    unsigned char ch;
+    unsigned char *name;
+    wchar_t wch;
+  } opr;
+} bracket_elem_t;
+
+
+/* Inline functions for bitset_t operation.  */
+
+static inline void
+bitset_set (bitset_t set, Idx i)
+{
+  set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS;
+}
+
+static inline void
+bitset_clear (bitset_t set, Idx i)
+{
+  set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS);
+}
+
+static inline bool
+bitset_contain (const bitset_t set, Idx i)
+{
+  return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1;
+}
+
+static inline void
+bitset_empty (bitset_t set)
+{
+  memset (set, '\0', sizeof (bitset_t));
+}
+
+static inline void
+bitset_set_all (bitset_t set)
+{
+  memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS));
+  if (SBC_MAX % BITSET_WORD_BITS != 0)
+    set[BITSET_WORDS - 1] =
+      ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1;
+}
+
+static inline void
+bitset_copy (bitset_t dest, const bitset_t src)
+{
+  memcpy (dest, src, sizeof (bitset_t));
+}
+
+static inline void
+bitset_not (bitset_t set)
+{
+  int bitset_i;
+  for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i)
+    set[bitset_i] = ~set[bitset_i];
+  if (SBC_MAX % BITSET_WORD_BITS != 0)
+    set[BITSET_WORDS - 1] =
+      ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1)
+       & ~set[BITSET_WORDS - 1]);
+}
+
+static inline void
+bitset_merge (bitset_t dest, const bitset_t src)
+{
+  int bitset_i;
+  for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i)
+    dest[bitset_i] |= src[bitset_i];
+}
+
+static inline void
+bitset_mask (bitset_t dest, const bitset_t src)
+{
+  int bitset_i;
+  for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i)
+    dest[bitset_i] &= src[bitset_i];
+}
+
+#ifdef RE_ENABLE_I18N
+/* Inline functions for re_string.  */
+static inline int
+internal_function __attribute ((pure))
+re_string_char_size_at (const re_string_t *pstr, Idx idx)
+{
+  int byte_idx;
+  if (pstr->mb_cur_max == 1)
+    return 1;
+  for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx)
+    if (pstr->wcs[idx + byte_idx] != WEOF)
+      break;
+  return byte_idx;
+}
+
+static inline wint_t
+internal_function __attribute ((pure))
+re_string_wchar_at (const re_string_t *pstr, Idx idx)
+{
+  if (pstr->mb_cur_max == 1)
+    return (wint_t) pstr->mbs[idx];
+  return (wint_t) pstr->wcs[idx];
+}
+
+static int
+internal_function __attribute ((pure))
+re_string_elem_size_at (const re_string_t *pstr, Idx idx)
+{
+# ifdef _LIBC
+  const unsigned char *p, *extra;
+  const int32_t *table, *indirect;
+  int32_t tmp;
+#  include <locale/weight.h>
+  uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+
+  if (nrules != 0)
+    {
+      table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+      extra = (const unsigned char *)
+       _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+      indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+                                               _NL_COLLATE_INDIRECTMB);
+      p = pstr->mbs + idx;
+      tmp = findidx (&p);
+      return p - pstr->mbs - idx;
+    }
+  else
+# endif /* _LIBC */
+    return 1;
+}
+#endif /* RE_ENABLE_I18N */
+
+#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 /*  _REGEX_INTERNAL_H */
diff --git a/gnulib/lib/regexec.c b/gnulib/lib/regexec.c
new file mode 100644 (file)
index 0000000..a704c1b
--- /dev/null
@@ -0,0 +1,4417 @@
+/* Extended regular expression matching and search library.
+   Copyright (C) 2002-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
+                                    Idx n) internal_function;
+static void match_ctx_clean (re_match_context_t *mctx) internal_function;
+static void match_ctx_free (re_match_context_t *cache) internal_function;
+static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node,
+                                         Idx str_idx, Idx from, Idx to)
+     internal_function;
+static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
+     internal_function;
+static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node,
+                                          Idx str_idx) internal_function;
+static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop,
+                                                   Idx node, Idx str_idx)
+     internal_function;
+static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
+                          re_dfastate_t **limited_sts, Idx last_node,
+                          Idx last_str_idx)
+     internal_function;
+static reg_errcode_t re_search_internal (const regex_t *preg,
+                                        const char *string, Idx length,
+                                        Idx start, Idx last_start, Idx stop,
+                                        size_t nmatch, regmatch_t pmatch[],
+                                        int eflags) internal_function;
+static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp,
+                                 const char *string1, Idx length1,
+                                 const char *string2, Idx length2,
+                                 Idx start, regoff_t range,
+                                 struct re_registers *regs,
+                                 Idx stop, bool ret_len) internal_function;
+static regoff_t re_search_stub (struct re_pattern_buffer *bufp,
+                               const char *string, Idx length, Idx start,
+                               regoff_t range, Idx stop,
+                               struct re_registers *regs,
+                               bool ret_len) internal_function;
+static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
+                                 Idx nregs, int regs_allocated)
+     internal_function;
+static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
+     internal_function;
+static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match,
+                          Idx *p_match_first) internal_function;
+static Idx check_halt_state_context (const re_match_context_t *mctx,
+                                    const re_dfastate_t *state, Idx idx)
+     internal_function;
+static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
+                        regmatch_t *prev_idx_match, Idx cur_node,
+                        Idx cur_idx, Idx nmatch) internal_function;
+static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs,
+                                     Idx str_idx, Idx dest_node, Idx nregs,
+                                     regmatch_t *regs,
+                                     re_node_set *eps_via_nodes)
+     internal_function;
+static reg_errcode_t set_regs (const regex_t *preg,
+                              const re_match_context_t *mctx,
+                              size_t nmatch, regmatch_t *pmatch,
+                              bool fl_backtrack) internal_function;
+static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs)
+     internal_function;
+
+#ifdef RE_ENABLE_I18N
+static int sift_states_iter_mb (const re_match_context_t *mctx,
+                               re_sift_context_t *sctx,
+                               Idx node_idx, Idx str_idx, Idx max_str_idx)
+     internal_function;
+#endif /* RE_ENABLE_I18N */
+static reg_errcode_t sift_states_backward (const re_match_context_t *mctx,
+                                          re_sift_context_t *sctx)
+     internal_function;
+static reg_errcode_t build_sifted_states (const re_match_context_t *mctx,
+                                         re_sift_context_t *sctx, Idx str_idx,
+                                         re_node_set *cur_dest)
+     internal_function;
+static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx,
+                                             re_sift_context_t *sctx,
+                                             Idx str_idx,
+                                             re_node_set *dest_nodes)
+     internal_function;
+static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa,
+                                           re_node_set *dest_nodes,
+                                           const re_node_set *candidates)
+     internal_function;
+static bool check_dst_limits (const re_match_context_t *mctx,
+                             const re_node_set *limits,
+                             Idx dst_node, Idx dst_idx, Idx src_node,
+                             Idx src_idx) internal_function;
+static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx,
+                                       int boundaries, Idx subexp_idx,
+                                       Idx from_node, Idx bkref_idx)
+     internal_function;
+static int check_dst_limits_calc_pos (const re_match_context_t *mctx,
+                                     Idx limit, Idx subexp_idx,
+                                     Idx node, Idx str_idx,
+                                     Idx bkref_idx) internal_function;
+static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa,
+                                         re_node_set *dest_nodes,
+                                         const re_node_set *candidates,
+                                         re_node_set *limits,
+                                         struct re_backref_cache_entry *bkref_ents,
+                                         Idx str_idx) internal_function;
+static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx,
+                                       re_sift_context_t *sctx,
+                                       Idx str_idx, const re_node_set *candidates)
+     internal_function;
+static reg_errcode_t merge_state_array (const re_dfa_t *dfa,
+                                       re_dfastate_t **dst,
+                                       re_dfastate_t **src, Idx num)
+     internal_function;
+static re_dfastate_t *find_recover_state (reg_errcode_t *err,
+                                        re_match_context_t *mctx) internal_function;
+static re_dfastate_t *transit_state (reg_errcode_t *err,
+                                    re_match_context_t *mctx,
+                                    re_dfastate_t *state) internal_function;
+static re_dfastate_t *merge_state_with_log (reg_errcode_t *err,
+                                           re_match_context_t *mctx,
+                                           re_dfastate_t *next_state)
+     internal_function;
+static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx,
+                                               re_node_set *cur_nodes,
+                                               Idx str_idx) internal_function;
+#if 0
+static re_dfastate_t *transit_state_sb (reg_errcode_t *err,
+                                       re_match_context_t *mctx,
+                                       re_dfastate_t *pstate)
+     internal_function;
+#endif
+#ifdef RE_ENABLE_I18N
+static reg_errcode_t transit_state_mb (re_match_context_t *mctx,
+                                      re_dfastate_t *pstate)
+     internal_function;
+#endif /* RE_ENABLE_I18N */
+static reg_errcode_t transit_state_bkref (re_match_context_t *mctx,
+                                         const re_node_set *nodes)
+     internal_function;
+static reg_errcode_t get_subexp (re_match_context_t *mctx,
+                                Idx bkref_node, Idx bkref_str_idx)
+     internal_function;
+static reg_errcode_t get_subexp_sub (re_match_context_t *mctx,
+                                    const re_sub_match_top_t *sub_top,
+                                    re_sub_match_last_t *sub_last,
+                                    Idx bkref_node, Idx bkref_str)
+     internal_function;
+static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
+                            Idx subexp_idx, int type) internal_function;
+static reg_errcode_t check_arrival (re_match_context_t *mctx,
+                                   state_array_t *path, Idx top_node,
+                                   Idx top_str, Idx last_node, Idx last_str,
+                                   int type) internal_function;
+static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx,
+                                                  Idx str_idx,
+                                                  re_node_set *cur_nodes,
+                                                  re_node_set *next_nodes)
+     internal_function;
+static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa,
+                                              re_node_set *cur_nodes,
+                                              Idx ex_subexp, int type)
+     internal_function;
+static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa,
+                                                  re_node_set *dst_nodes,
+                                                  Idx target, Idx ex_subexp,
+                                                  int type) internal_function;
+static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx,
+                                        re_node_set *cur_nodes, Idx cur_str,
+                                        Idx subexp_num, int type)
+     internal_function;
+static bool build_trtable (const re_dfa_t *dfa,
+                          re_dfastate_t *state) internal_function;
+#ifdef RE_ENABLE_I18N
+static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
+                                   const re_string_t *input, Idx idx)
+     internal_function;
+# ifdef _LIBC
+static unsigned int find_collation_sequence_value (const unsigned char *mbs,
+                                                  size_t name_len)
+     internal_function;
+# endif /* _LIBC */
+#endif /* RE_ENABLE_I18N */
+static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
+                                      const re_dfastate_t *state,
+                                      re_node_set *states_node,
+                                      bitset_t *states_ch) internal_function;
+static bool check_node_accept (const re_match_context_t *mctx,
+                              const re_token_t *node, Idx idx)
+     internal_function;
+static reg_errcode_t extend_buffers (re_match_context_t *mctx)
+     internal_function;
+\f
+/* Entry point for POSIX code.  */
+
+/* regexec searches for a given pattern, specified by PREG, in the
+   string STRING.
+
+   If NMATCH is zero or REG_NOSUB was set in the cflags argument to
+   `regcomp', we ignore PMATCH.  Otherwise, we assume PMATCH has at
+   least NMATCH elements, and we set them to the offsets of the
+   corresponding matched substrings.
+
+   EFLAGS specifies `execution flags' which affect matching: if
+   REG_NOTBOL is set, then ^ does not match at the beginning of the
+   string; if REG_NOTEOL is set, then $ does not match at the end.
+
+   We return 0 if we find a match and REG_NOMATCH if not.  */
+
+int
+regexec (preg, string, nmatch, pmatch, eflags)
+    const regex_t *_Restrict_ preg;
+    const char *_Restrict_ string;
+    size_t nmatch;
+    regmatch_t pmatch[_Restrict_arr_];
+    int eflags;
+{
+  reg_errcode_t err;
+  Idx start, length;
+#ifdef _LIBC
+  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+#endif
+
+  if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND))
+    return REG_BADPAT;
+
+  if (eflags & REG_STARTEND)
+    {
+      start = pmatch[0].rm_so;
+      length = pmatch[0].rm_eo;
+    }
+  else
+    {
+      start = 0;
+      length = strlen (string);
+    }
+
+  __libc_lock_lock (dfa->lock);
+  if (preg->no_sub)
+    err = re_search_internal (preg, string, length, start, length,
+                             length, 0, NULL, eflags);
+  else
+    err = re_search_internal (preg, string, length, start, length,
+                             length, nmatch, pmatch, eflags);
+  __libc_lock_unlock (dfa->lock);
+  return err != REG_NOERROR;
+}
+
+#ifdef _LIBC
+# include <shlib-compat.h>
+versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
+
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
+__typeof__ (__regexec) __compat_regexec;
+
+int
+attribute_compat_text_section
+__compat_regexec (const regex_t *_Restrict_ preg,
+                 const char *_Restrict_ string, size_t nmatch,
+                 regmatch_t pmatch[], int eflags)
+{
+  return regexec (preg, string, nmatch, pmatch,
+                 eflags & (REG_NOTBOL | REG_NOTEOL));
+}
+compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
+# endif
+#endif
+
+/* Entry points for GNU code.  */
+
+/* re_match, re_search, re_match_2, re_search_2
+
+   The former two functions operate on STRING with length LENGTH,
+   while the later two operate on concatenation of STRING1 and STRING2
+   with lengths LENGTH1 and LENGTH2, respectively.
+
+   re_match() matches the compiled pattern in BUFP against the string,
+   starting at index START.
+
+   re_search() first tries matching at index START, then it tries to match
+   starting from index START + 1, and so on.  The last start position tried
+   is START + RANGE.  (Thus RANGE = 0 forces re_search to operate the same
+   way as re_match().)
+
+   The parameter STOP of re_{match,search}_2 specifies that no match exceeding
+   the first STOP characters of the concatenation of the strings should be
+   concerned.
+
+   If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match
+   and all groups is stored in REGS.  (For the "_2" variants, the offsets are
+   computed relative to the concatenation, not relative to the individual
+   strings.)
+
+   On success, re_match* functions return the length of the match, re_search*
+   return the position of the start of the match.  Return value -1 means no
+   match was found and -2 indicates an internal error.  */
+
+regoff_t
+re_match (bufp, string, length, start, regs)
+    struct re_pattern_buffer *bufp;
+    const char *string;
+    Idx length, start;
+    struct re_registers *regs;
+{
+  return re_search_stub (bufp, string, length, start, 0, length, regs, true);
+}
+#ifdef _LIBC
+weak_alias (__re_match, re_match)
+#endif
+
+regoff_t
+re_search (bufp, string, length, start, range, regs)
+    struct re_pattern_buffer *bufp;
+    const char *string;
+    Idx length, start;
+    regoff_t range;
+    struct re_registers *regs;
+{
+  return re_search_stub (bufp, string, length, start, range, length, regs,
+                        false);
+}
+#ifdef _LIBC
+weak_alias (__re_search, re_search)
+#endif
+
+regoff_t
+re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
+    struct re_pattern_buffer *bufp;
+    const char *string1, *string2;
+    Idx length1, length2, start, stop;
+    struct re_registers *regs;
+{
+  return re_search_2_stub (bufp, string1, length1, string2, length2,
+                          start, 0, regs, stop, true);
+}
+#ifdef _LIBC
+weak_alias (__re_match_2, re_match_2)
+#endif
+
+regoff_t
+re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
+    struct re_pattern_buffer *bufp;
+    const char *string1, *string2;
+    Idx length1, length2, start, stop;
+    regoff_t range;
+    struct re_registers *regs;
+{
+  return re_search_2_stub (bufp, string1, length1, string2, length2,
+                          start, range, regs, stop, false);
+}
+#ifdef _LIBC
+weak_alias (__re_search_2, re_search_2)
+#endif
+
+static regoff_t
+internal_function
+re_search_2_stub (struct re_pattern_buffer *bufp,
+                 const char *string1, Idx length1,
+                 const char *string2, Idx length2,
+                 Idx start, regoff_t range, struct re_registers *regs,
+                 Idx stop, bool ret_len)
+{
+  const char *str;
+  regoff_t rval;
+  Idx len = length1 + length2;
+  char *s = NULL;
+
+  if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0))
+    return -2;
+
+  /* Concatenate the strings.  */
+  if (length2 > 0)
+    if (length1 > 0)
+      {
+       s = re_malloc (char, len);
+
+       if (BE (s == NULL, 0))
+         return -2;
+#ifdef _LIBC
+       memcpy (__mempcpy (s, string1, length1), string2, length2);
+#else
+       memcpy (s, string1, length1);
+       memcpy (s + length1, string2, length2);
+#endif
+       str = s;
+      }
+    else
+      str = string2;
+  else
+    str = string1;
+
+  rval = re_search_stub (bufp, str, len, start, range, stop, regs,
+                        ret_len);
+  re_free (s);
+  return rval;
+}
+
+/* The parameters have the same meaning as those of re_search.
+   Additional parameters:
+   If RET_LEN is true the length of the match is returned (re_match style);
+   otherwise the position of the match is returned.  */
+
+static regoff_t
+internal_function
+re_search_stub (struct re_pattern_buffer *bufp,
+               const char *string, Idx length,
+               Idx start, regoff_t range, Idx stop, struct re_registers *regs,
+               bool ret_len)
+{
+  reg_errcode_t result;
+  regmatch_t *pmatch;
+  Idx nregs;
+  regoff_t rval;
+  int eflags = 0;
+#ifdef _LIBC
+  re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+#endif
+  Idx last_start = start + range;
+
+  /* Check for out-of-range.  */
+  if (BE (start < 0 || start > length, 0))
+    return -1;
+  if (BE (length < last_start || (0 <= range && last_start < start), 0))
+    last_start = length;
+  else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0))
+    last_start = 0;
+
+  __libc_lock_lock (dfa->lock);
+
+  eflags |= (bufp->not_bol) ? REG_NOTBOL : 0;
+  eflags |= (bufp->not_eol) ? REG_NOTEOL : 0;
+
+  /* Compile fastmap if we haven't yet.  */
+  if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate)
+    re_compile_fastmap (bufp);
+
+  if (BE (bufp->no_sub, 0))
+    regs = NULL;
+
+  /* We need at least 1 register.  */
+  if (regs == NULL)
+    nregs = 1;
+  else if (BE (bufp->regs_allocated == REGS_FIXED
+              && regs->num_regs <= bufp->re_nsub, 0))
+    {
+      nregs = regs->num_regs;
+      if (BE (nregs < 1, 0))
+       {
+         /* Nothing can be copied to regs.  */
+         regs = NULL;
+         nregs = 1;
+       }
+    }
+  else
+    nregs = bufp->re_nsub + 1;
+  pmatch = re_malloc (regmatch_t, nregs);
+  if (BE (pmatch == NULL, 0))
+    {
+      rval = -2;
+      goto out;
+    }
+
+  result = re_search_internal (bufp, string, length, start, last_start, stop,
+                              nregs, pmatch, eflags);
+
+  rval = 0;
+
+  /* I hope we needn't fill ther regs with -1's when no match was found.  */
+  if (result != REG_NOERROR)
+    rval = -1;
+  else if (regs != NULL)
+    {
+      /* If caller wants register contents data back, copy them.  */
+      bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs,
+                                          bufp->regs_allocated);
+      if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0))
+       rval = -2;
+    }
+
+  if (BE (rval == 0, 1))
+    {
+      if (ret_len)
+       {
+         assert (pmatch[0].rm_so == start);
+         rval = pmatch[0].rm_eo - start;
+       }
+      else
+       rval = pmatch[0].rm_so;
+    }
+  re_free (pmatch);
+ out:
+  __libc_lock_unlock (dfa->lock);
+  return rval;
+}
+
+static unsigned int
+internal_function
+re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
+             int regs_allocated)
+{
+  int rval = REGS_REALLOCATE;
+  Idx i;
+  Idx need_regs = nregs + 1;
+  /* We need one extra element beyond `num_regs' for the `-1' marker GNU code
+     uses.  */
+
+  /* Have the register data arrays been allocated?  */
+  if (regs_allocated == REGS_UNALLOCATED)
+    { /* No.  So allocate them with malloc.  */
+      regs->start = re_malloc (regoff_t, need_regs);
+      if (BE (regs->start == NULL, 0))
+       return REGS_UNALLOCATED;
+      regs->end = re_malloc (regoff_t, need_regs);
+      if (BE (regs->end == NULL, 0))
+       {
+         re_free (regs->start);
+         return REGS_UNALLOCATED;
+       }
+      regs->num_regs = need_regs;
+    }
+  else if (regs_allocated == REGS_REALLOCATE)
+    { /* Yes.  If we need more elements than were already
+        allocated, reallocate them.  If we need fewer, just
+        leave it alone.  */
+      if (BE (need_regs > regs->num_regs, 0))
+       {
+         regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs);
+         regoff_t *new_end;
+         if (BE (new_start == NULL, 0))
+           return REGS_UNALLOCATED;
+         new_end = re_realloc (regs->end, regoff_t, need_regs);
+         if (BE (new_end == NULL, 0))
+           {
+             re_free (new_start);
+             return REGS_UNALLOCATED;
+           }
+         regs->start = new_start;
+         regs->end = new_end;
+         regs->num_regs = need_regs;
+       }
+    }
+  else
+    {
+      assert (regs_allocated == REGS_FIXED);
+      /* This function may not be called with REGS_FIXED and nregs too big.  */
+      assert (regs->num_regs >= nregs);
+      rval = REGS_FIXED;
+    }
+
+  /* Copy the regs.  */
+  for (i = 0; i < nregs; ++i)
+    {
+      regs->start[i] = pmatch[i].rm_so;
+      regs->end[i] = pmatch[i].rm_eo;
+    }
+  for ( ; i < regs->num_regs; ++i)
+    regs->start[i] = regs->end[i] = -1;
+
+  return rval;
+}
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+   ENDS.  Subsequent matches using PATTERN_BUFFER and REGS will use
+   this memory for recording register information.  STARTS and ENDS
+   must be allocated using the malloc library routine, and must each
+   be at least NUM_REGS * sizeof (regoff_t) bytes long.
+
+   If NUM_REGS == 0, then subsequent matches should allocate their own
+   register data.
+
+   Unless this function is called, the first search or match using
+   PATTERN_BUFFER will allocate its own register data, without
+   freeing the old data.  */
+
+void
+re_set_registers (bufp, regs, num_regs, starts, ends)
+    struct re_pattern_buffer *bufp;
+    struct re_registers *regs;
+    __re_size_t num_regs;
+    regoff_t *starts, *ends;
+{
+  if (num_regs)
+    {
+      bufp->regs_allocated = REGS_REALLOCATE;
+      regs->num_regs = num_regs;
+      regs->start = starts;
+      regs->end = ends;
+    }
+  else
+    {
+      bufp->regs_allocated = REGS_UNALLOCATED;
+      regs->num_regs = 0;
+      regs->start = regs->end = NULL;
+    }
+}
+#ifdef _LIBC
+weak_alias (__re_set_registers, re_set_registers)
+#endif
+\f
+/* Entry points compatible with 4.2 BSD regex library.  We don't define
+   them unless specifically requested.  */
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+int
+# ifdef _LIBC
+weak_function
+# endif
+re_exec (s)
+     const char *s;
+{
+  return 0 == regexec (&re_comp_buf, s, 0, NULL, 0);
+}
+#endif /* _REGEX_RE_COMP */
+\f
+/* Internal entry point.  */
+
+/* Searches for a compiled pattern PREG in the string STRING, whose
+   length is LENGTH.  NMATCH, PMATCH, and EFLAGS have the same
+   meaning as with regexec.  LAST_START is START + RANGE, where
+   START and RANGE have the same meaning as with re_search.
+   Return REG_NOERROR if we find a match, and REG_NOMATCH if not,
+   otherwise return the error code.
+   Note: We assume front end functions already check ranges.
+   (0 <= LAST_START && LAST_START <= LENGTH)  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_search_internal (const regex_t *preg,
+                   const char *string, Idx length,
+                   Idx start, Idx last_start, Idx stop,
+                   size_t nmatch, regmatch_t pmatch[],
+                   int eflags)
+{
+  reg_errcode_t err;
+  const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+  Idx left_lim, right_lim;
+  int incr;
+  bool fl_longest_match;
+  int match_kind;
+  Idx match_first;
+  Idx match_last = REG_MISSING;
+  Idx extra_nmatch;
+  bool sb;
+  int ch;
+#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+  re_match_context_t mctx = { .dfa = dfa };
+#else
+  re_match_context_t mctx;
+#endif
+  char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate
+                   && start != last_start && !preg->can_be_null)
+                  ? preg->fastmap : NULL);
+  RE_TRANSLATE_TYPE t = preg->translate;
+
+#if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
+  memset (&mctx, '\0', sizeof (re_match_context_t));
+  mctx.dfa = dfa;
+#endif
+
+  extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0;
+  nmatch -= extra_nmatch;
+
+  /* Check if the DFA haven't been compiled.  */
+  if (BE (preg->used == 0 || dfa->init_state == NULL
+         || dfa->init_state_word == NULL || dfa->init_state_nl == NULL
+         || dfa->init_state_begbuf == NULL, 0))
+    return REG_NOMATCH;
+
+#ifdef DEBUG
+  /* We assume front-end functions already check them.  */
+  assert (0 <= last_start && last_start <= length);
+#endif
+
+  /* If initial states with non-begbuf contexts have no elements,
+     the regex must be anchored.  If preg->newline_anchor is set,
+     we'll never use init_state_nl, so do not check it.  */
+  if (dfa->init_state->nodes.nelem == 0
+      && dfa->init_state_word->nodes.nelem == 0
+      && (dfa->init_state_nl->nodes.nelem == 0
+         || !preg->newline_anchor))
+    {
+      if (start != 0 && last_start != 0)
+        return REG_NOMATCH;
+      start = last_start = 0;
+    }
+
+  /* We must check the longest matching, if nmatch > 0.  */
+  fl_longest_match = (nmatch != 0 || dfa->nbackref);
+
+  err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1,
+                           preg->translate, (preg->syntax & RE_ICASE) != 0,
+                           dfa);
+  if (BE (err != REG_NOERROR, 0))
+    goto free_return;
+  mctx.input.stop = stop;
+  mctx.input.raw_stop = stop;
+  mctx.input.newline_anchor = preg->newline_anchor;
+
+  err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2);
+  if (BE (err != REG_NOERROR, 0))
+    goto free_return;
+
+  /* We will log all the DFA states through which the dfa pass,
+     if nmatch > 1, or this dfa has "multibyte node", which is a
+     back-reference or a node which can accept multibyte character or
+     multi character collating element.  */
+  if (nmatch > 1 || dfa->has_mb_node)
+    {
+      /* Avoid overflow.  */
+      if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0))
+       {
+         err = REG_ESPACE;
+         goto free_return;
+       }
+
+      mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1);
+      if (BE (mctx.state_log == NULL, 0))
+       {
+         err = REG_ESPACE;
+         goto free_return;
+       }
+    }
+  else
+    mctx.state_log = NULL;
+
+  match_first = start;
+  mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF
+                          : CONTEXT_NEWLINE | CONTEXT_BEGBUF;
+
+  /* Check incrementally whether of not the input string match.  */
+  incr = (last_start < start) ? -1 : 1;
+  left_lim = (last_start < start) ? last_start : start;
+  right_lim = (last_start < start) ? start : last_start;
+  sb = dfa->mb_cur_max == 1;
+  match_kind =
+    (fastmap
+     ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0)
+       | (start <= last_start ? 2 : 0)
+       | (t != NULL ? 1 : 0))
+     : 8);
+
+  for (;; match_first += incr)
+    {
+      err = REG_NOMATCH;
+      if (match_first < left_lim || right_lim < match_first)
+       goto free_return;
+
+      /* Advance as rapidly as possible through the string, until we
+        find a plausible place to start matching.  This may be done
+        with varying efficiency, so there are various possibilities:
+        only the most common of them are specialized, in order to
+        save on code size.  We use a switch statement for speed.  */
+      switch (match_kind)
+       {
+       case 8:
+         /* No fastmap.  */
+         break;
+
+       case 7:
+         /* Fastmap with single-byte translation, match forward.  */
+         while (BE (match_first < right_lim, 1)
+                && !fastmap[t[(unsigned char) string[match_first]]])
+           ++match_first;
+         goto forward_match_found_start_or_reached_end;
+
+       case 6:
+         /* Fastmap without translation, match forward.  */
+         while (BE (match_first < right_lim, 1)
+                && !fastmap[(unsigned char) string[match_first]])
+           ++match_first;
+
+       forward_match_found_start_or_reached_end:
+         if (BE (match_first == right_lim, 0))
+           {
+             ch = match_first >= length
+                      ? 0 : (unsigned char) string[match_first];
+             if (!fastmap[t ? t[ch] : ch])
+               goto free_return;
+           }
+         break;
+
+       case 4:
+       case 5:
+         /* Fastmap without multi-byte translation, match backwards.  */
+         while (match_first >= left_lim)
+           {
+             ch = match_first >= length
+                      ? 0 : (unsigned char) string[match_first];
+             if (fastmap[t ? t[ch] : ch])
+               break;
+             --match_first;
+           }
+         if (match_first < left_lim)
+           goto free_return;
+         break;
+
+       default:
+         /* In this case, we can't determine easily the current byte,
+            since it might be a component byte of a multibyte
+            character.  Then we use the constructed buffer instead.  */
+         for (;;)
+           {
+             /* If MATCH_FIRST is out of the valid range, reconstruct the
+                buffers.  */
+             __re_size_t offset = match_first - mctx.input.raw_mbs_idx;
+             if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0))
+               {
+                 err = re_string_reconstruct (&mctx.input, match_first,
+                                              eflags);
+                 if (BE (err != REG_NOERROR, 0))
+                   goto free_return;
+
+                 offset = match_first - mctx.input.raw_mbs_idx;
+               }
+             /* If MATCH_FIRST is out of the buffer, leave it as '\0'.
+                Note that MATCH_FIRST must not be smaller than 0.  */
+             ch = (match_first >= length
+                   ? 0 : re_string_byte_at (&mctx.input, offset));
+             if (fastmap[ch])
+               break;
+             match_first += incr;
+             if (match_first < left_lim || match_first > right_lim)
+               {
+                 err = REG_NOMATCH;
+                 goto free_return;
+               }
+           }
+         break;
+       }
+
+      /* Reconstruct the buffers so that the matcher can assume that
+        the matching starts from the beginning of the buffer.  */
+      err = re_string_reconstruct (&mctx.input, match_first, eflags);
+      if (BE (err != REG_NOERROR, 0))
+       goto free_return;
+
+#ifdef RE_ENABLE_I18N
+     /* Don't consider this char as a possible match start if it part,
+       yet isn't the head, of a multibyte character.  */
+      if (!sb && !re_string_first_byte (&mctx.input, 0))
+       continue;
+#endif
+
+      /* It seems to be appropriate one, then use the matcher.  */
+      /* We assume that the matching starts from 0.  */
+      mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0;
+      match_last = check_matching (&mctx, fl_longest_match,
+                                  start <= last_start ? &match_first : NULL);
+      if (match_last != REG_MISSING)
+       {
+         if (BE (match_last == REG_ERROR, 0))
+           {
+             err = REG_ESPACE;
+             goto free_return;
+           }
+         else
+           {
+             mctx.match_last = match_last;
+             if ((!preg->no_sub && nmatch > 1) || dfa->nbackref)
+               {
+                 re_dfastate_t *pstate = mctx.state_log[match_last];
+                 mctx.last_node = check_halt_state_context (&mctx, pstate,
+                                                            match_last);
+               }
+             if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match)
+                 || dfa->nbackref)
+               {
+                 err = prune_impossible_nodes (&mctx);
+                 if (err == REG_NOERROR)
+                   break;
+                 if (BE (err != REG_NOMATCH, 0))
+                   goto free_return;
+                 match_last = REG_MISSING;
+               }
+             else
+               break; /* We found a match.  */
+           }
+       }
+
+      match_ctx_clean (&mctx);
+    }
+
+#ifdef DEBUG
+  assert (match_last != REG_MISSING);
+  assert (err == REG_NOERROR);
+#endif
+
+  /* Set pmatch[] if we need.  */
+  if (nmatch > 0)
+    {
+      Idx reg_idx;
+
+      /* Initialize registers.  */
+      for (reg_idx = 1; reg_idx < nmatch; ++reg_idx)
+       pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1;
+
+      /* Set the points where matching start/end.  */
+      pmatch[0].rm_so = 0;
+      pmatch[0].rm_eo = mctx.match_last;
+      /* FIXME: This function should fail if mctx.match_last exceeds
+        the maximum possible regoff_t value.  We need a new error
+        code REG_OVERFLOW.  */
+
+      if (!preg->no_sub && nmatch > 1)
+       {
+         err = set_regs (preg, &mctx, nmatch, pmatch,
+                         dfa->has_plural_match && dfa->nbackref > 0);
+         if (BE (err != REG_NOERROR, 0))
+           goto free_return;
+       }
+
+      /* At last, add the offset to the each registers, since we slided
+        the buffers so that we could assume that the matching starts
+        from 0.  */
+      for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
+       if (pmatch[reg_idx].rm_so != -1)
+         {
+#ifdef RE_ENABLE_I18N
+           if (BE (mctx.input.offsets_needed != 0, 0))
+             {
+               pmatch[reg_idx].rm_so =
+                 (pmatch[reg_idx].rm_so == mctx.input.valid_len
+                  ? mctx.input.valid_raw_len
+                  : mctx.input.offsets[pmatch[reg_idx].rm_so]);
+               pmatch[reg_idx].rm_eo =
+                 (pmatch[reg_idx].rm_eo == mctx.input.valid_len
+                  ? mctx.input.valid_raw_len
+                  : mctx.input.offsets[pmatch[reg_idx].rm_eo]);
+             }
+#else
+           assert (mctx.input.offsets_needed == 0);
+#endif
+           pmatch[reg_idx].rm_so += match_first;
+           pmatch[reg_idx].rm_eo += match_first;
+         }
+      for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx)
+       {
+         pmatch[nmatch + reg_idx].rm_so = -1;
+         pmatch[nmatch + reg_idx].rm_eo = -1;
+       }
+
+      if (dfa->subexp_map)
+       for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++)
+         if (dfa->subexp_map[reg_idx] != reg_idx)
+           {
+             pmatch[reg_idx + 1].rm_so
+               = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so;
+             pmatch[reg_idx + 1].rm_eo
+               = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo;
+           }
+    }
+
+ free_return:
+  re_free (mctx.state_log);
+  if (dfa->nbackref)
+    match_ctx_free (&mctx);
+  re_string_destruct (&mctx.input);
+  return err;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+prune_impossible_nodes (re_match_context_t *mctx)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  Idx halt_node, match_last;
+  reg_errcode_t ret;
+  re_dfastate_t **sifted_states;
+  re_dfastate_t **lim_states = NULL;
+  re_sift_context_t sctx;
+#ifdef DEBUG
+  assert (mctx->state_log != NULL);
+#endif
+  match_last = mctx->match_last;
+  halt_node = mctx->last_node;
+
+  /* Avoid overflow.  */
+  if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0))
+    return REG_ESPACE;
+
+  sifted_states = re_malloc (re_dfastate_t *, match_last + 1);
+  if (BE (sifted_states == NULL, 0))
+    {
+      ret = REG_ESPACE;
+      goto free_return;
+    }
+  if (dfa->nbackref)
+    {
+      lim_states = re_malloc (re_dfastate_t *, match_last + 1);
+      if (BE (lim_states == NULL, 0))
+       {
+         ret = REG_ESPACE;
+         goto free_return;
+       }
+      while (1)
+       {
+         memset (lim_states, '\0',
+                 sizeof (re_dfastate_t *) * (match_last + 1));
+         sift_ctx_init (&sctx, sifted_states, lim_states, halt_node,
+                        match_last);
+         ret = sift_states_backward (mctx, &sctx);
+         re_node_set_free (&sctx.limits);
+         if (BE (ret != REG_NOERROR, 0))
+             goto free_return;
+         if (sifted_states[0] != NULL || lim_states[0] != NULL)
+           break;
+         do
+           {
+             --match_last;
+             if (! REG_VALID_INDEX (match_last))
+               {
+                 ret = REG_NOMATCH;
+                 goto free_return;
+               }
+           } while (mctx->state_log[match_last] == NULL
+                    || !mctx->state_log[match_last]->halt);
+         halt_node = check_halt_state_context (mctx,
+                                               mctx->state_log[match_last],
+                                               match_last);
+       }
+      ret = merge_state_array (dfa, sifted_states, lim_states,
+                              match_last + 1);
+      re_free (lim_states);
+      lim_states = NULL;
+      if (BE (ret != REG_NOERROR, 0))
+       goto free_return;
+    }
+  else
+    {
+      sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last);
+      ret = sift_states_backward (mctx, &sctx);
+      re_node_set_free (&sctx.limits);
+      if (BE (ret != REG_NOERROR, 0))
+       goto free_return;
+      if (sifted_states[0] == NULL)
+       {
+         ret = REG_NOMATCH;
+         goto free_return;
+       }
+    }
+  re_free (mctx->state_log);
+  mctx->state_log = sifted_states;
+  sifted_states = NULL;
+  mctx->last_node = halt_node;
+  mctx->match_last = match_last;
+  ret = REG_NOERROR;
+ free_return:
+  re_free (sifted_states);
+  re_free (lim_states);
+  return ret;
+}
+
+/* Acquire an initial state and return it.
+   We must select appropriate initial state depending on the context,
+   since initial states may have constraints like "\<", "^", etc..  */
+
+static inline re_dfastate_t *
+__attribute ((always_inline)) internal_function
+acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
+                           Idx idx)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  if (dfa->init_state->has_constraint)
+    {
+      unsigned int context;
+      context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags);
+      if (IS_WORD_CONTEXT (context))
+       return dfa->init_state_word;
+      else if (IS_ORDINARY_CONTEXT (context))
+       return dfa->init_state;
+      else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context))
+       return dfa->init_state_begbuf;
+      else if (IS_NEWLINE_CONTEXT (context))
+       return dfa->init_state_nl;
+      else if (IS_BEGBUF_CONTEXT (context))
+       {
+         /* It is relatively rare case, then calculate on demand.  */
+         return re_acquire_state_context (err, dfa,
+                                          dfa->init_state->entrance_nodes,
+                                          context);
+       }
+      else
+       /* Must not happen?  */
+       return dfa->init_state;
+    }
+  else
+    return dfa->init_state;
+}
+
+/* Check whether the regular expression match input string INPUT or not,
+   and return the index where the matching end.  Return REG_MISSING if
+   there is no match, and return REG_ERROR in case of an error.
+   FL_LONGEST_MATCH means we want the POSIX longest matching.
+   If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
+   next place where we may want to try matching.
+   Note that the matcher assume that the maching starts from the current
+   index of the buffer.  */
+
+static Idx
+internal_function __attribute_warn_unused_result__
+check_matching (re_match_context_t *mctx, bool fl_longest_match,
+               Idx *p_match_first)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  reg_errcode_t err;
+  Idx match = 0;
+  Idx match_last = REG_MISSING;
+  Idx cur_str_idx = re_string_cur_idx (&mctx->input);
+  re_dfastate_t *cur_state;
+  bool at_init_state = p_match_first != NULL;
+  Idx next_start_idx = cur_str_idx;
+
+  err = REG_NOERROR;
+  cur_state = acquire_init_state_context (&err, mctx, cur_str_idx);
+  /* An initial state must not be NULL (invalid).  */
+  if (BE (cur_state == NULL, 0))
+    {
+      assert (err == REG_ESPACE);
+      return REG_ERROR;
+    }
+
+  if (mctx->state_log != NULL)
+    {
+      mctx->state_log[cur_str_idx] = cur_state;
+
+      /* Check OP_OPEN_SUBEXP in the initial state in case that we use them
+        later.  E.g. Processing back references.  */
+      if (BE (dfa->nbackref, 0))
+       {
+         at_init_state = false;
+         err = check_subexp_matching_top (mctx, &cur_state->nodes, 0);
+         if (BE (err != REG_NOERROR, 0))
+           return err;
+
+         if (cur_state->has_backref)
+           {
+             err = transit_state_bkref (mctx, &cur_state->nodes);
+             if (BE (err != REG_NOERROR, 0))
+               return err;
+           }
+       }
+    }
+
+  /* If the RE accepts NULL string.  */
+  if (BE (cur_state->halt, 0))
+    {
+      if (!cur_state->has_constraint
+         || check_halt_state_context (mctx, cur_state, cur_str_idx))
+       {
+         if (!fl_longest_match)
+           return cur_str_idx;
+         else
+           {
+             match_last = cur_str_idx;
+             match = 1;
+           }
+       }
+    }
+
+  while (!re_string_eoi (&mctx->input))
+    {
+      re_dfastate_t *old_state = cur_state;
+      Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1;
+
+      if (BE (next_char_idx >= mctx->input.bufs_len, 0)
+         || (BE (next_char_idx >= mctx->input.valid_len, 0)
+             && mctx->input.valid_len < mctx->input.len))
+       {
+         err = extend_buffers (mctx);
+         if (BE (err != REG_NOERROR, 0))
+           {
+             assert (err == REG_ESPACE);
+             return REG_ERROR;
+           }
+       }
+
+      cur_state = transit_state (&err, mctx, cur_state);
+      if (mctx->state_log != NULL)
+       cur_state = merge_state_with_log (&err, mctx, cur_state);
+
+      if (cur_state == NULL)
+       {
+         /* Reached the invalid state or an error.  Try to recover a valid
+            state using the state log, if available and if we have not
+            already found a valid (even if not the longest) match.  */
+         if (BE (err != REG_NOERROR, 0))
+           return REG_ERROR;
+
+         if (mctx->state_log == NULL
+             || (match && !fl_longest_match)
+             || (cur_state = find_recover_state (&err, mctx)) == NULL)
+           break;
+       }
+
+      if (BE (at_init_state, 0))
+       {
+         if (old_state == cur_state)
+           next_start_idx = next_char_idx;
+         else
+           at_init_state = false;
+       }
+
+      if (cur_state->halt)
+       {
+         /* Reached a halt state.
+            Check the halt state can satisfy the current context.  */
+         if (!cur_state->has_constraint
+             || check_halt_state_context (mctx, cur_state,
+                                          re_string_cur_idx (&mctx->input)))
+           {
+             /* We found an appropriate halt state.  */
+             match_last = re_string_cur_idx (&mctx->input);
+             match = 1;
+
+             /* We found a match, do not modify match_first below.  */
+             p_match_first = NULL;
+             if (!fl_longest_match)
+               break;
+           }
+       }
+    }
+
+  if (p_match_first)
+    *p_match_first += next_start_idx;
+
+  return match_last;
+}
+
+/* Check NODE match the current context.  */
+
+static bool
+internal_function
+check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context)
+{
+  re_token_type_t type = dfa->nodes[node].type;
+  unsigned int constraint = dfa->nodes[node].constraint;
+  if (type != END_OF_RE)
+    return false;
+  if (!constraint)
+    return true;
+  if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context))
+    return false;
+  return true;
+}
+
+/* Check the halt state STATE match the current context.
+   Return 0 if not match, if the node, STATE has, is a halt node and
+   match the context, return the node.  */
+
+static Idx
+internal_function
+check_halt_state_context (const re_match_context_t *mctx,
+                         const re_dfastate_t *state, Idx idx)
+{
+  Idx i;
+  unsigned int context;
+#ifdef DEBUG
+  assert (state->halt);
+#endif
+  context = re_string_context_at (&mctx->input, idx, mctx->eflags);
+  for (i = 0; i < state->nodes.nelem; ++i)
+    if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context))
+      return state->nodes.elems[i];
+  return 0;
+}
+
+/* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA
+   corresponding to the DFA).
+   Return the destination node, and update EPS_VIA_NODES;
+   return REG_MISSING in case of errors.  */
+
+static Idx
+internal_function
+proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
+                  Idx *pidx, Idx node, re_node_set *eps_via_nodes,
+                  struct re_fail_stack_t *fs)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  Idx i;
+  bool ok;
+  if (IS_EPSILON_NODE (dfa->nodes[node].type))
+    {
+      re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
+      re_node_set *edests = &dfa->edests[node];
+      Idx dest_node;
+      ok = re_node_set_insert (eps_via_nodes, node);
+      if (BE (! ok, 0))
+       return REG_ERROR;
+      /* Pick up a valid destination, or return REG_MISSING if none
+        is found.  */
+      for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i)
+       {
+         Idx candidate = edests->elems[i];
+         if (!re_node_set_contains (cur_nodes, candidate))
+           continue;
+          if (dest_node == REG_MISSING)
+           dest_node = candidate;
+
+         else
+           {
+             /* In order to avoid infinite loop like "(a*)*", return the second
+                epsilon-transition if the first was already considered.  */
+             if (re_node_set_contains (eps_via_nodes, dest_node))
+               return candidate;
+
+             /* Otherwise, push the second epsilon-transition on the fail stack.  */
+             else if (fs != NULL
+                      && push_fail_stack (fs, *pidx, candidate, nregs, regs,
+                                          eps_via_nodes))
+               return REG_ERROR;
+
+             /* We know we are going to exit.  */
+             break;
+           }
+       }
+      return dest_node;
+    }
+  else
+    {
+      Idx naccepted = 0;
+      re_token_type_t type = dfa->nodes[node].type;
+
+#ifdef RE_ENABLE_I18N
+      if (dfa->nodes[node].accept_mb)
+       naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx);
+      else
+#endif /* RE_ENABLE_I18N */
+      if (type == OP_BACK_REF)
+       {
+         Idx subexp_idx = dfa->nodes[node].opr.idx + 1;
+         naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so;
+         if (fs != NULL)
+           {
+             if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1)
+               return REG_MISSING;
+             else if (naccepted)
+               {
+                 char *buf = (char *) re_string_get_buffer (&mctx->input);
+                 if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
+                             naccepted) != 0)
+                   return REG_MISSING;
+               }
+           }
+
+         if (naccepted == 0)
+           {
+             Idx dest_node;
+             ok = re_node_set_insert (eps_via_nodes, node);
+             if (BE (! ok, 0))
+               return REG_ERROR;
+             dest_node = dfa->edests[node].elems[0];
+             if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
+                                       dest_node))
+               return dest_node;
+           }
+       }
+
+      if (naccepted != 0
+         || check_node_accept (mctx, dfa->nodes + node, *pidx))
+       {
+         Idx dest_node = dfa->nexts[node];
+         *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted;
+         if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL
+                    || !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
+                                              dest_node)))
+           return REG_MISSING;
+         re_node_set_empty (eps_via_nodes);
+         return dest_node;
+       }
+    }
+  return REG_MISSING;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
+                Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes)
+{
+  reg_errcode_t err;
+  Idx num = fs->num++;
+  if (fs->num == fs->alloc)
+    {
+      struct re_fail_stack_ent_t *new_array;
+      new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t)
+                                      * fs->alloc * 2));
+      if (new_array == NULL)
+       return REG_ESPACE;
+      fs->alloc *= 2;
+      fs->stack = new_array;
+    }
+  fs->stack[num].idx = str_idx;
+  fs->stack[num].node = dest_node;
+  fs->stack[num].regs = re_malloc (regmatch_t, nregs);
+  if (fs->stack[num].regs == NULL)
+    return REG_ESPACE;
+  memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs);
+  err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes);
+  return err;
+}
+
+static Idx
+internal_function
+pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs,
+               regmatch_t *regs, re_node_set *eps_via_nodes)
+{
+  Idx num = --fs->num;
+  assert (REG_VALID_INDEX (num));
+  *pidx = fs->stack[num].idx;
+  memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs);
+  re_node_set_free (eps_via_nodes);
+  re_free (fs->stack[num].regs);
+  *eps_via_nodes = fs->stack[num].eps_via_nodes;
+  return fs->stack[num].node;
+}
+
+/* Set the positions where the subexpressions are starts/ends to registers
+   PMATCH.
+   Note: We assume that pmatch[0] is already set, and
+   pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
+         regmatch_t *pmatch, bool fl_backtrack)
+{
+  const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+  Idx idx, cur_node;
+  re_node_set eps_via_nodes;
+  struct re_fail_stack_t *fs;
+  struct re_fail_stack_t fs_body = { 0, 2, NULL };
+  regmatch_t *prev_idx_match;
+  bool prev_idx_match_malloced = false;
+
+#ifdef DEBUG
+  assert (nmatch > 1);
+  assert (mctx->state_log != NULL);
+#endif
+  if (fl_backtrack)
+    {
+      fs = &fs_body;
+      fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc);
+      if (fs->stack == NULL)
+       return REG_ESPACE;
+    }
+  else
+    fs = NULL;
+
+  cur_node = dfa->init_node;
+  re_node_set_init_empty (&eps_via_nodes);
+
+  if (__libc_use_alloca (nmatch * sizeof (regmatch_t)))
+    prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t));
+  else
+    {
+      prev_idx_match = re_malloc (regmatch_t, nmatch);
+      if (prev_idx_match == NULL)
+       {
+         free_fail_stack_return (fs);
+         return REG_ESPACE;
+       }
+      prev_idx_match_malloced = true;
+    }
+  memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
+
+  for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;)
+    {
+      update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch);
+
+      if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
+       {
+         Idx reg_idx;
+         if (fs)
+           {
+             for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
+               if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1)
+                 break;
+             if (reg_idx == nmatch)
+               {
+                 re_node_set_free (&eps_via_nodes);
+                 if (prev_idx_match_malloced)
+                   re_free (prev_idx_match);
+                 return free_fail_stack_return (fs);
+               }
+             cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
+                                        &eps_via_nodes);
+           }
+         else
+           {
+             re_node_set_free (&eps_via_nodes);
+             if (prev_idx_match_malloced)
+               re_free (prev_idx_match);
+             return REG_NOERROR;
+           }
+       }
+
+      /* Proceed to next node.  */
+      cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node,
+                                   &eps_via_nodes, fs);
+
+      if (BE (! REG_VALID_INDEX (cur_node), 0))
+       {
+         if (BE (cur_node == REG_ERROR, 0))
+           {
+             re_node_set_free (&eps_via_nodes);
+             if (prev_idx_match_malloced)
+               re_free (prev_idx_match);
+             free_fail_stack_return (fs);
+             return REG_ESPACE;
+           }
+         if (fs)
+           cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
+                                      &eps_via_nodes);
+         else
+           {
+             re_node_set_free (&eps_via_nodes);
+             if (prev_idx_match_malloced)
+               re_free (prev_idx_match);
+             return REG_NOMATCH;
+           }
+       }
+    }
+  re_node_set_free (&eps_via_nodes);
+  if (prev_idx_match_malloced)
+    re_free (prev_idx_match);
+  return free_fail_stack_return (fs);
+}
+
+static reg_errcode_t
+internal_function
+free_fail_stack_return (struct re_fail_stack_t *fs)
+{
+  if (fs)
+    {
+      Idx fs_idx;
+      for (fs_idx = 0; fs_idx < fs->num; ++fs_idx)
+       {
+         re_node_set_free (&fs->stack[fs_idx].eps_via_nodes);
+         re_free (fs->stack[fs_idx].regs);
+       }
+      re_free (fs->stack);
+    }
+  return REG_NOERROR;
+}
+
+static void
+internal_function
+update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
+            regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch)
+{
+  int type = dfa->nodes[cur_node].type;
+  if (type == OP_OPEN_SUBEXP)
+    {
+      Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
+
+      /* We are at the first node of this sub expression.  */
+      if (reg_num < nmatch)
+       {
+         pmatch[reg_num].rm_so = cur_idx;
+         pmatch[reg_num].rm_eo = -1;
+       }
+    }
+  else if (type == OP_CLOSE_SUBEXP)
+    {
+      Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
+      if (reg_num < nmatch)
+       {
+         /* We are at the last node of this sub expression.  */
+         if (pmatch[reg_num].rm_so < cur_idx)
+           {
+             pmatch[reg_num].rm_eo = cur_idx;
+             /* This is a non-empty match or we are not inside an optional
+                subexpression.  Accept this right away.  */
+             memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
+           }
+         else
+           {
+             if (dfa->nodes[cur_node].opt_subexp
+                 && prev_idx_match[reg_num].rm_so != -1)
+               /* We transited through an empty match for an optional
+                  subexpression, like (a?)*, and this is not the subexp's
+                  first match.  Copy back the old content of the registers
+                  so that matches of an inner subexpression are undone as
+                  well, like in ((a?))*.  */
+               memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch);
+             else
+               /* We completed a subexpression, but it may be part of
+                  an optional one, so do not update PREV_IDX_MATCH.  */
+               pmatch[reg_num].rm_eo = cur_idx;
+           }
+       }
+    }
+}
+
+/* This function checks the STATE_LOG from the SCTX->last_str_idx to 0
+   and sift the nodes in each states according to the following rules.
+   Updated state_log will be wrote to STATE_LOG.
+
+   Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if...
+     1. When STR_IDX == MATCH_LAST(the last index in the state_log):
+       If `a' isn't the LAST_NODE and `a' can't epsilon transit to
+       the LAST_NODE, we throw away the node `a'.
+     2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts
+       string `s' and transit to `b':
+       i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw
+          away the node `a'.
+       ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is
+           thrown away, we throw away the node `a'.
+     3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b':
+       i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the
+          node `a'.
+       ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away,
+           we throw away the node `a'.  */
+
+#define STATE_NODE_CONTAINS(state,node) \
+  ((state) != NULL && re_node_set_contains (&(state)->nodes, node))
+
+static reg_errcode_t
+internal_function
+sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
+{
+  reg_errcode_t err;
+  int null_cnt = 0;
+  Idx str_idx = sctx->last_str_idx;
+  re_node_set cur_dest;
+
+#ifdef DEBUG
+  assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL);
+#endif
+
+  /* Build sifted state_log[str_idx].  It has the nodes which can epsilon
+     transit to the last_node and the last_node itself.  */
+  err = re_node_set_init_1 (&cur_dest, sctx->last_node);
+  if (BE (err != REG_NOERROR, 0))
+    return err;
+  err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
+  if (BE (err != REG_NOERROR, 0))
+    goto free_return;
+
+  /* Then check each states in the state_log.  */
+  while (str_idx > 0)
+    {
+      /* Update counters.  */
+      null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0;
+      if (null_cnt > mctx->max_mb_elem_len)
+       {
+         memset (sctx->sifted_states, '\0',
+                 sizeof (re_dfastate_t *) * str_idx);
+         re_node_set_free (&cur_dest);
+         return REG_NOERROR;
+       }
+      re_node_set_empty (&cur_dest);
+      --str_idx;
+
+      if (mctx->state_log[str_idx])
+       {
+         err = build_sifted_states (mctx, sctx, str_idx, &cur_dest);
+         if (BE (err != REG_NOERROR, 0))
+           goto free_return;
+       }
+
+      /* Add all the nodes which satisfy the following conditions:
+        - It can epsilon transit to a node in CUR_DEST.
+        - It is in CUR_SRC.
+        And update state_log.  */
+      err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
+      if (BE (err != REG_NOERROR, 0))
+       goto free_return;
+    }
+  err = REG_NOERROR;
+ free_return:
+  re_node_set_free (&cur_dest);
+  return err;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
+                    Idx str_idx, re_node_set *cur_dest)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes;
+  Idx i;
+
+  /* Then build the next sifted state.
+     We build the next sifted state on `cur_dest', and update
+     `sifted_states[str_idx]' with `cur_dest'.
+     Note:
+     `cur_dest' is the sifted state from `state_log[str_idx + 1]'.
+     `cur_src' points the node_set of the old `state_log[str_idx]'
+     (with the epsilon nodes pre-filtered out).  */
+  for (i = 0; i < cur_src->nelem; i++)
+    {
+      Idx prev_node = cur_src->elems[i];
+      int naccepted = 0;
+      bool ok;
+
+#ifdef DEBUG
+      re_token_type_t type = dfa->nodes[prev_node].type;
+      assert (!IS_EPSILON_NODE (type));
+#endif
+#ifdef RE_ENABLE_I18N
+      /* If the node may accept `multi byte'.  */
+      if (dfa->nodes[prev_node].accept_mb)
+       naccepted = sift_states_iter_mb (mctx, sctx, prev_node,
+                                        str_idx, sctx->last_str_idx);
+#endif /* RE_ENABLE_I18N */
+
+      /* We don't check backreferences here.
+        See update_cur_sifted_state().  */
+      if (!naccepted
+         && check_node_accept (mctx, dfa->nodes + prev_node, str_idx)
+         && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1],
+                                 dfa->nexts[prev_node]))
+       naccepted = 1;
+
+      if (naccepted == 0)
+       continue;
+
+      if (sctx->limits.nelem)
+       {
+         Idx to_idx = str_idx + naccepted;
+         if (check_dst_limits (mctx, &sctx->limits,
+                               dfa->nexts[prev_node], to_idx,
+                               prev_node, str_idx))
+           continue;
+       }
+      ok = re_node_set_insert (cur_dest, prev_node);
+      if (BE (! ok, 0))
+       return REG_ESPACE;
+    }
+
+  return REG_NOERROR;
+}
+
+/* Helper functions.  */
+
+static reg_errcode_t
+internal_function
+clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
+{
+  Idx top = mctx->state_log_top;
+
+  if (next_state_log_idx >= mctx->input.bufs_len
+      || (next_state_log_idx >= mctx->input.valid_len
+         && mctx->input.valid_len < mctx->input.len))
+    {
+      reg_errcode_t err;
+      err = extend_buffers (mctx);
+      if (BE (err != REG_NOERROR, 0))
+       return err;
+    }
+
+  if (top < next_state_log_idx)
+    {
+      memset (mctx->state_log + top + 1, '\0',
+             sizeof (re_dfastate_t *) * (next_state_log_idx - top));
+      mctx->state_log_top = next_state_log_idx;
+    }
+  return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function
+merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
+                  re_dfastate_t **src, Idx num)
+{
+  Idx st_idx;
+  reg_errcode_t err;
+  for (st_idx = 0; st_idx < num; ++st_idx)
+    {
+      if (dst[st_idx] == NULL)
+       dst[st_idx] = src[st_idx];
+      else if (src[st_idx] != NULL)
+       {
+         re_node_set merged_set;
+         err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes,
+                                       &src[st_idx]->nodes);
+         if (BE (err != REG_NOERROR, 0))
+           return err;
+         dst[st_idx] = re_acquire_state (&err, dfa, &merged_set);
+         re_node_set_free (&merged_set);
+         if (BE (err != REG_NOERROR, 0))
+           return err;
+       }
+    }
+  return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function
+update_cur_sifted_state (const re_match_context_t *mctx,
+                        re_sift_context_t *sctx, Idx str_idx,
+                        re_node_set *dest_nodes)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  reg_errcode_t err = REG_NOERROR;
+  const re_node_set *candidates;
+  candidates = ((mctx->state_log[str_idx] == NULL) ? NULL
+               : &mctx->state_log[str_idx]->nodes);
+
+  if (dest_nodes->nelem == 0)
+    sctx->sifted_states[str_idx] = NULL;
+  else
+    {
+      if (candidates)
+       {
+         /* At first, add the nodes which can epsilon transit to a node in
+            DEST_NODE.  */
+         err = add_epsilon_src_nodes (dfa, dest_nodes, candidates);
+         if (BE (err != REG_NOERROR, 0))
+           return err;
+
+         /* Then, check the limitations in the current sift_context.  */
+         if (sctx->limits.nelem)
+           {
+             err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits,
+                                        mctx->bkref_ents, str_idx);
+             if (BE (err != REG_NOERROR, 0))
+               return err;
+           }
+       }
+
+      sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes);
+      if (BE (err != REG_NOERROR, 0))
+       return err;
+    }
+
+  if (candidates && mctx->state_log[str_idx]->has_backref)
+    {
+      err = sift_states_bkref (mctx, sctx, str_idx, candidates);
+      if (BE (err != REG_NOERROR, 0))
+       return err;
+    }
+  return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes,
+                      const re_node_set *candidates)
+{
+  reg_errcode_t err = REG_NOERROR;
+  Idx i;
+
+  re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes);
+  if (BE (err != REG_NOERROR, 0))
+    return err;
+
+  if (!state->inveclosure.alloc)
+    {
+      err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem);
+      if (BE (err != REG_NOERROR, 0))
+       return REG_ESPACE;
+      for (i = 0; i < dest_nodes->nelem; i++)
+       {
+         err = re_node_set_merge (&state->inveclosure,
+                                  dfa->inveclosures + dest_nodes->elems[i]);
+         if (BE (err != REG_NOERROR, 0))
+           return REG_ESPACE;
+       }
+    }
+  return re_node_set_add_intersect (dest_nodes, candidates,
+                                   &state->inveclosure);
+}
+
+static reg_errcode_t
+internal_function
+sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes,
+                      const re_node_set *candidates)
+{
+    Idx ecl_idx;
+    reg_errcode_t err;
+    re_node_set *inv_eclosure = dfa->inveclosures + node;
+    re_node_set except_nodes;
+    re_node_set_init_empty (&except_nodes);
+    for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx)
+      {
+       Idx cur_node = inv_eclosure->elems[ecl_idx];
+       if (cur_node == node)
+         continue;
+       if (IS_EPSILON_NODE (dfa->nodes[cur_node].type))
+         {
+           Idx edst1 = dfa->edests[cur_node].elems[0];
+           Idx edst2 = ((dfa->edests[cur_node].nelem > 1)
+                        ? dfa->edests[cur_node].elems[1] : REG_MISSING);
+           if ((!re_node_set_contains (inv_eclosure, edst1)
+                && re_node_set_contains (dest_nodes, edst1))
+               || (REG_VALID_NONZERO_INDEX (edst2)
+                   && !re_node_set_contains (inv_eclosure, edst2)
+                   && re_node_set_contains (dest_nodes, edst2)))
+             {
+               err = re_node_set_add_intersect (&except_nodes, candidates,
+                                                dfa->inveclosures + cur_node);
+               if (BE (err != REG_NOERROR, 0))
+                 {
+                   re_node_set_free (&except_nodes);
+                   return err;
+                 }
+             }
+         }
+      }
+    for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx)
+      {
+       Idx cur_node = inv_eclosure->elems[ecl_idx];
+       if (!re_node_set_contains (&except_nodes, cur_node))
+         {
+           Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1;
+           re_node_set_remove_at (dest_nodes, idx);
+         }
+      }
+    re_node_set_free (&except_nodes);
+    return REG_NOERROR;
+}
+
+static bool
+internal_function
+check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits,
+                 Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  Idx lim_idx, src_pos, dst_pos;
+
+  Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx);
+  Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx);
+  for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx)
+    {
+      Idx subexp_idx;
+      struct re_backref_cache_entry *ent;
+      ent = mctx->bkref_ents + limits->elems[lim_idx];
+      subexp_idx = dfa->nodes[ent->node].opr.idx;
+
+      dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx],
+                                          subexp_idx, dst_node, dst_idx,
+                                          dst_bkref_idx);
+      src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx],
+                                          subexp_idx, src_node, src_idx,
+                                          src_bkref_idx);
+
+      /* In case of:
+        <src> <dst> ( <subexp> )
+        ( <subexp> ) <src> <dst>
+        ( <subexp1> <src> <subexp2> <dst> <subexp3> )  */
+      if (src_pos == dst_pos)
+       continue; /* This is unrelated limitation.  */
+      else
+       return true;
+    }
+  return false;
+}
+
+static int
+internal_function
+check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries,
+                            Idx subexp_idx, Idx from_node, Idx bkref_idx)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  const re_node_set *eclosures = dfa->eclosures + from_node;
+  Idx node_idx;
+
+  /* Else, we are on the boundary: examine the nodes on the epsilon
+     closure.  */
+  for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx)
+    {
+      Idx node = eclosures->elems[node_idx];
+      switch (dfa->nodes[node].type)
+       {
+       case OP_BACK_REF:
+         if (bkref_idx != REG_MISSING)
+           {
+             struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx;
+             do
+               {
+                 Idx dst;
+                 int cpos;
+
+                 if (ent->node != node)
+                   continue;
+
+                 if (subexp_idx < BITSET_WORD_BITS
+                     && !(ent->eps_reachable_subexps_map
+                          & ((bitset_word_t) 1 << subexp_idx)))
+                   continue;
+
+                 /* Recurse trying to reach the OP_OPEN_SUBEXP and
+                    OP_CLOSE_SUBEXP cases below.  But, if the
+                    destination node is the same node as the source
+                    node, don't recurse because it would cause an
+                    infinite loop: a regex that exhibits this behavior
+                    is ()\1*\1*  */
+                 dst = dfa->edests[node].elems[0];
+                 if (dst == from_node)
+                   {
+                     if (boundaries & 1)
+                       return -1;
+                     else /* if (boundaries & 2) */
+                       return 0;
+                   }
+
+                 cpos =
+                   check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx,
+                                                dst, bkref_idx);
+                 if (cpos == -1 /* && (boundaries & 1) */)
+                   return -1;
+                 if (cpos == 0 && (boundaries & 2))
+                   return 0;
+
+                 if (subexp_idx < BITSET_WORD_BITS)
+                   ent->eps_reachable_subexps_map
+                     &= ~((bitset_word_t) 1 << subexp_idx);
+               }
+             while (ent++->more);
+           }
+         break;
+
+       case OP_OPEN_SUBEXP:
+         if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx)
+           return -1;
+         break;
+
+       case OP_CLOSE_SUBEXP:
+         if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx)
+           return 0;
+         break;
+
+       default:
+           break;
+       }
+    }
+
+  return (boundaries & 2) ? 1 : 0;
+}
+
+static int
+internal_function
+check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit,
+                          Idx subexp_idx, Idx from_node, Idx str_idx,
+                          Idx bkref_idx)
+{
+  struct re_backref_cache_entry *lim = mctx->bkref_ents + limit;
+  int boundaries;
+
+  /* If we are outside the range of the subexpression, return -1 or 1.  */
+  if (str_idx < lim->subexp_from)
+    return -1;
+
+  if (lim->subexp_to < str_idx)
+    return 1;
+
+  /* If we are within the subexpression, return 0.  */
+  boundaries = (str_idx == lim->subexp_from);
+  boundaries |= (str_idx == lim->subexp_to) << 1;
+  if (boundaries == 0)
+    return 0;
+
+  /* Else, examine epsilon closure.  */
+  return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx,
+                                     from_node, bkref_idx);
+}
+
+/* Check the limitations of sub expressions LIMITS, and remove the nodes
+   which are against limitations from DEST_NODES. */
+
+static reg_errcode_t
+internal_function
+check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
+                    const re_node_set *candidates, re_node_set *limits,
+                    struct re_backref_cache_entry *bkref_ents, Idx str_idx)
+{
+  reg_errcode_t err;
+  Idx node_idx, lim_idx;
+
+  for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx)
+    {
+      Idx subexp_idx;
+      struct re_backref_cache_entry *ent;
+      ent = bkref_ents + limits->elems[lim_idx];
+
+      if (str_idx <= ent->subexp_from || ent->str_idx < str_idx)
+       continue; /* This is unrelated limitation.  */
+
+      subexp_idx = dfa->nodes[ent->node].opr.idx;
+      if (ent->subexp_to == str_idx)
+       {
+         Idx ops_node = REG_MISSING;
+         Idx cls_node = REG_MISSING;
+         for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
+           {
+             Idx node = dest_nodes->elems[node_idx];
+             re_token_type_t type = dfa->nodes[node].type;
+             if (type == OP_OPEN_SUBEXP
+                 && subexp_idx == dfa->nodes[node].opr.idx)
+               ops_node = node;
+             else if (type == OP_CLOSE_SUBEXP
+                      && subexp_idx == dfa->nodes[node].opr.idx)
+               cls_node = node;
+           }
+
+         /* Check the limitation of the open subexpression.  */
+         /* Note that (ent->subexp_to = str_idx != ent->subexp_from).  */
+         if (REG_VALID_INDEX (ops_node))
+           {
+             err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes,
+                                          candidates);
+             if (BE (err != REG_NOERROR, 0))
+               return err;
+           }
+
+         /* Check the limitation of the close subexpression.  */
+         if (REG_VALID_INDEX (cls_node))
+           for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
+             {
+               Idx node = dest_nodes->elems[node_idx];
+               if (!re_node_set_contains (dfa->inveclosures + node,
+                                          cls_node)
+                   && !re_node_set_contains (dfa->eclosures + node,
+                                             cls_node))
+                 {
+                   /* It is against this limitation.
+                      Remove it form the current sifted state.  */
+                   err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
+                                                candidates);
+                   if (BE (err != REG_NOERROR, 0))
+                     return err;
+                   --node_idx;
+                 }
+             }
+       }
+      else /* (ent->subexp_to != str_idx)  */
+       {
+         for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
+           {
+             Idx node = dest_nodes->elems[node_idx];
+             re_token_type_t type = dfa->nodes[node].type;
+             if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP)
+               {
+                 if (subexp_idx != dfa->nodes[node].opr.idx)
+                   continue;
+                 /* It is against this limitation.
+                    Remove it form the current sifted state.  */
+                 err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
+                                              candidates);
+                 if (BE (err != REG_NOERROR, 0))
+                   return err;
+               }
+           }
+       }
+    }
+  return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
+                  Idx str_idx, const re_node_set *candidates)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  reg_errcode_t err;
+  Idx node_idx, node;
+  re_sift_context_t local_sctx;
+  Idx first_idx = search_cur_bkref_entry (mctx, str_idx);
+
+  if (first_idx == REG_MISSING)
+    return REG_NOERROR;
+
+  local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized.  */
+
+  for (node_idx = 0; node_idx < candidates->nelem; ++node_idx)
+    {
+      Idx enabled_idx;
+      re_token_type_t type;
+      struct re_backref_cache_entry *entry;
+      node = candidates->elems[node_idx];
+      type = dfa->nodes[node].type;
+      /* Avoid infinite loop for the REs like "()\1+".  */
+      if (node == sctx->last_node && str_idx == sctx->last_str_idx)
+       continue;
+      if (type != OP_BACK_REF)
+       continue;
+
+      entry = mctx->bkref_ents + first_idx;
+      enabled_idx = first_idx;
+      do
+       {
+         Idx subexp_len;
+         Idx to_idx;
+         Idx dst_node;
+         bool ok;
+         re_dfastate_t *cur_state;
+
+         if (entry->node != node)
+           continue;
+         subexp_len = entry->subexp_to - entry->subexp_from;
+         to_idx = str_idx + subexp_len;
+         dst_node = (subexp_len ? dfa->nexts[node]
+                     : dfa->edests[node].elems[0]);
+
+         if (to_idx > sctx->last_str_idx
+             || sctx->sifted_states[to_idx] == NULL
+             || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node)
+             || check_dst_limits (mctx, &sctx->limits, node,
+                                  str_idx, dst_node, to_idx))
+           continue;
+
+         if (local_sctx.sifted_states == NULL)
+           {
+             local_sctx = *sctx;
+             err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits);
+             if (BE (err != REG_NOERROR, 0))
+               goto free_return;
+           }
+         local_sctx.last_node = node;
+         local_sctx.last_str_idx = str_idx;
+         ok = re_node_set_insert (&local_sctx.limits, enabled_idx);
+         if (BE (! ok, 0))
+           {
+             err = REG_ESPACE;
+             goto free_return;
+           }
+         cur_state = local_sctx.sifted_states[str_idx];
+         err = sift_states_backward (mctx, &local_sctx);
+         if (BE (err != REG_NOERROR, 0))
+           goto free_return;
+         if (sctx->limited_states != NULL)
+           {
+             err = merge_state_array (dfa, sctx->limited_states,
+                                      local_sctx.sifted_states,
+                                      str_idx + 1);
+             if (BE (err != REG_NOERROR, 0))
+               goto free_return;
+           }
+         local_sctx.sifted_states[str_idx] = cur_state;
+         re_node_set_remove (&local_sctx.limits, enabled_idx);
+
+         /* mctx->bkref_ents may have changed, reload the pointer.  */
+         entry = mctx->bkref_ents + enabled_idx;
+       }
+      while (enabled_idx++, entry++->more);
+    }
+  err = REG_NOERROR;
+ free_return:
+  if (local_sctx.sifted_states != NULL)
+    {
+      re_node_set_free (&local_sctx.limits);
+    }
+
+  return err;
+}
+
+
+#ifdef RE_ENABLE_I18N
+static int
+internal_function
+sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
+                    Idx node_idx, Idx str_idx, Idx max_str_idx)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  int naccepted;
+  /* Check the node can accept `multi byte'.  */
+  naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
+  if (naccepted > 0 && str_idx + naccepted <= max_str_idx &&
+      !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
+                           dfa->nexts[node_idx]))
+    /* The node can't accept the `multi byte', or the
+       destination was already thrown away, then the node
+       could't accept the current input `multi byte'.   */
+    naccepted = 0;
+  /* Otherwise, it is sure that the node could accept
+     `naccepted' bytes input.  */
+  return naccepted;
+}
+#endif /* RE_ENABLE_I18N */
+
+\f
+/* Functions for state transition.  */
+
+/* Return the next state to which the current state STATE will transit by
+   accepting the current input byte, and update STATE_LOG if necessary.
+   If STATE can accept a multibyte char/collating element/back reference
+   update the destination of STATE_LOG.  */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+transit_state (reg_errcode_t *err, re_match_context_t *mctx,
+              re_dfastate_t *state)
+{
+  re_dfastate_t **trtable;
+  unsigned char ch;
+
+#ifdef RE_ENABLE_I18N
+  /* If the current state can accept multibyte.  */
+  if (BE (state->accept_mb, 0))
+    {
+      *err = transit_state_mb (mctx, state);
+      if (BE (*err != REG_NOERROR, 0))
+       return NULL;
+    }
+#endif /* RE_ENABLE_I18N */
+
+  /* Then decide the next state with the single byte.  */
+#if 0
+  if (0)
+    /* don't use transition table  */
+    return transit_state_sb (err, mctx, state);
+#endif
+
+  /* Use transition table  */
+  ch = re_string_fetch_byte (&mctx->input);
+  for (;;)
+    {
+      trtable = state->trtable;
+      if (BE (trtable != NULL, 1))
+       return trtable[ch];
+
+      trtable = state->word_trtable;
+      if (BE (trtable != NULL, 1))
+       {
+         unsigned int context;
+         context
+           = re_string_context_at (&mctx->input,
+                                   re_string_cur_idx (&mctx->input) - 1,
+                                   mctx->eflags);
+         if (IS_WORD_CONTEXT (context))
+           return trtable[ch + SBC_MAX];
+         else
+           return trtable[ch];
+       }
+
+      if (!build_trtable (mctx->dfa, state))
+       {
+         *err = REG_ESPACE;
+         return NULL;
+       }
+
+      /* Retry, we now have a transition table.  */
+    }
+}
+
+/* Update the state_log if we need */
+static re_dfastate_t *
+internal_function
+merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
+                     re_dfastate_t *next_state)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  Idx cur_idx = re_string_cur_idx (&mctx->input);
+
+  if (cur_idx > mctx->state_log_top)
+    {
+      mctx->state_log[cur_idx] = next_state;
+      mctx->state_log_top = cur_idx;
+    }
+  else if (mctx->state_log[cur_idx] == 0)
+    {
+      mctx->state_log[cur_idx] = next_state;
+    }
+  else
+    {
+      re_dfastate_t *pstate;
+      unsigned int context;
+      re_node_set next_nodes, *log_nodes, *table_nodes = NULL;
+      /* If (state_log[cur_idx] != 0), it implies that cur_idx is
+        the destination of a multibyte char/collating element/
+        back reference.  Then the next state is the union set of
+        these destinations and the results of the transition table.  */
+      pstate = mctx->state_log[cur_idx];
+      log_nodes = pstate->entrance_nodes;
+      if (next_state != NULL)
+       {
+         table_nodes = next_state->entrance_nodes;
+         *err = re_node_set_init_union (&next_nodes, table_nodes,
+                                            log_nodes);
+         if (BE (*err != REG_NOERROR, 0))
+           return NULL;
+       }
+      else
+       next_nodes = *log_nodes;
+      /* Note: We already add the nodes of the initial state,
+        then we don't need to add them here.  */
+
+      context = re_string_context_at (&mctx->input,
+                                     re_string_cur_idx (&mctx->input) - 1,
+                                     mctx->eflags);
+      next_state = mctx->state_log[cur_idx]
+       = re_acquire_state_context (err, dfa, &next_nodes, context);
+      /* We don't need to check errors here, since the return value of
+        this function is next_state and ERR is already set.  */
+
+      if (table_nodes != NULL)
+       re_node_set_free (&next_nodes);
+    }
+
+  if (BE (dfa->nbackref, 0) && next_state != NULL)
+    {
+      /* Check OP_OPEN_SUBEXP in the current state in case that we use them
+        later.  We must check them here, since the back references in the
+        next state might use them.  */
+      *err = check_subexp_matching_top (mctx, &next_state->nodes,
+                                       cur_idx);
+      if (BE (*err != REG_NOERROR, 0))
+       return NULL;
+
+      /* If the next state has back references.  */
+      if (next_state->has_backref)
+       {
+         *err = transit_state_bkref (mctx, &next_state->nodes);
+         if (BE (*err != REG_NOERROR, 0))
+           return NULL;
+         next_state = mctx->state_log[cur_idx];
+       }
+    }
+
+  return next_state;
+}
+
+/* Skip bytes in the input that correspond to part of a
+   multi-byte match, then look in the log for a state
+   from which to restart matching.  */
+static re_dfastate_t *
+internal_function
+find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
+{
+  re_dfastate_t *cur_state;
+  do
+    {
+      Idx max = mctx->state_log_top;
+      Idx cur_str_idx = re_string_cur_idx (&mctx->input);
+
+      do
+       {
+         if (++cur_str_idx > max)
+           return NULL;
+         re_string_skip_bytes (&mctx->input, 1);
+       }
+      while (mctx->state_log[cur_str_idx] == NULL);
+
+      cur_state = merge_state_with_log (err, mctx, NULL);
+    }
+  while (*err == REG_NOERROR && cur_state == NULL);
+  return cur_state;
+}
+
+/* Helper functions for transit_state.  */
+
+/* From the node set CUR_NODES, pick up the nodes whose types are
+   OP_OPEN_SUBEXP and which have corresponding back references in the regular
+   expression. And register them to use them later for evaluating the
+   correspoding back references.  */
+
+static reg_errcode_t
+internal_function
+check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes,
+                          Idx str_idx)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  Idx node_idx;
+  reg_errcode_t err;
+
+  /* TODO: This isn't efficient.
+          Because there might be more than one nodes whose types are
+          OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all
+          nodes.
+          E.g. RE: (a){2}  */
+  for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx)
+    {
+      Idx node = cur_nodes->elems[node_idx];
+      if (dfa->nodes[node].type == OP_OPEN_SUBEXP
+         && dfa->nodes[node].opr.idx < BITSET_WORD_BITS
+         && (dfa->used_bkref_map
+             & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx)))
+       {
+         err = match_ctx_add_subtop (mctx, node, str_idx);
+         if (BE (err != REG_NOERROR, 0))
+           return err;
+       }
+    }
+  return REG_NOERROR;
+}
+
+#if 0
+/* Return the next state to which the current state STATE will transit by
+   accepting the current input byte.  */
+
+static re_dfastate_t *
+transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
+                 re_dfastate_t *state)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  re_node_set next_nodes;
+  re_dfastate_t *next_state;
+  Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input);
+  unsigned int context;
+
+  *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1);
+  if (BE (*err != REG_NOERROR, 0))
+    return NULL;
+  for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt)
+    {
+      Idx cur_node = state->nodes.elems[node_cnt];
+      if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx))
+       {
+         *err = re_node_set_merge (&next_nodes,
+                                   dfa->eclosures + dfa->nexts[cur_node]);
+         if (BE (*err != REG_NOERROR, 0))
+           {
+             re_node_set_free (&next_nodes);
+             return NULL;
+           }
+       }
+    }
+  context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags);
+  next_state = re_acquire_state_context (err, dfa, &next_nodes, context);
+  /* We don't need to check errors here, since the return value of
+     this function is next_state and ERR is already set.  */
+
+  re_node_set_free (&next_nodes);
+  re_string_skip_bytes (&mctx->input, 1);
+  return next_state;
+}
+#endif
+
+#ifdef RE_ENABLE_I18N
+static reg_errcode_t
+internal_function
+transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  reg_errcode_t err;
+  Idx i;
+
+  for (i = 0; i < pstate->nodes.nelem; ++i)
+    {
+      re_node_set dest_nodes, *new_nodes;
+      Idx cur_node_idx = pstate->nodes.elems[i];
+      int naccepted;
+      Idx dest_idx;
+      unsigned int context;
+      re_dfastate_t *dest_state;
+
+      if (!dfa->nodes[cur_node_idx].accept_mb)
+       continue;
+
+      if (dfa->nodes[cur_node_idx].constraint)
+       {
+         context = re_string_context_at (&mctx->input,
+                                         re_string_cur_idx (&mctx->input),
+                                         mctx->eflags);
+         if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint,
+                                          context))
+           continue;
+       }
+
+      /* How many bytes the node can accept?  */
+      naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input,
+                                          re_string_cur_idx (&mctx->input));
+      if (naccepted == 0)
+       continue;
+
+      /* The node can accepts `naccepted' bytes.  */
+      dest_idx = re_string_cur_idx (&mctx->input) + naccepted;
+      mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted
+                              : mctx->max_mb_elem_len);
+      err = clean_state_log_if_needed (mctx, dest_idx);
+      if (BE (err != REG_NOERROR, 0))
+       return err;
+#ifdef DEBUG
+      assert (dfa->nexts[cur_node_idx] != REG_MISSING);
+#endif
+      new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx];
+
+      dest_state = mctx->state_log[dest_idx];
+      if (dest_state == NULL)
+       dest_nodes = *new_nodes;
+      else
+       {
+         err = re_node_set_init_union (&dest_nodes,
+                                       dest_state->entrance_nodes, new_nodes);
+         if (BE (err != REG_NOERROR, 0))
+           return err;
+       }
+      context = re_string_context_at (&mctx->input, dest_idx - 1,
+                                     mctx->eflags);
+      mctx->state_log[dest_idx]
+       = re_acquire_state_context (&err, dfa, &dest_nodes, context);
+      if (dest_state != NULL)
+       re_node_set_free (&dest_nodes);
+      if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0))
+       return err;
+    }
+  return REG_NOERROR;
+}
+#endif /* RE_ENABLE_I18N */
+
+static reg_errcode_t
+internal_function
+transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  reg_errcode_t err;
+  Idx i;
+  Idx cur_str_idx = re_string_cur_idx (&mctx->input);
+
+  for (i = 0; i < nodes->nelem; ++i)
+    {
+      Idx dest_str_idx, prev_nelem, bkc_idx;
+      Idx node_idx = nodes->elems[i];
+      unsigned int context;
+      const re_token_t *node = dfa->nodes + node_idx;
+      re_node_set *new_dest_nodes;
+
+      /* Check whether `node' is a backreference or not.  */
+      if (node->type != OP_BACK_REF)
+       continue;
+
+      if (node->constraint)
+       {
+         context = re_string_context_at (&mctx->input, cur_str_idx,
+                                         mctx->eflags);
+         if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context))
+           continue;
+       }
+
+      /* `node' is a backreference.
+        Check the substring which the substring matched.  */
+      bkc_idx = mctx->nbkref_ents;
+      err = get_subexp (mctx, node_idx, cur_str_idx);
+      if (BE (err != REG_NOERROR, 0))
+       goto free_return;
+
+      /* And add the epsilon closures (which is `new_dest_nodes') of
+        the backreference to appropriate state_log.  */
+#ifdef DEBUG
+      assert (dfa->nexts[node_idx] != REG_MISSING);
+#endif
+      for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx)
+       {
+         Idx subexp_len;
+         re_dfastate_t *dest_state;
+         struct re_backref_cache_entry *bkref_ent;
+         bkref_ent = mctx->bkref_ents + bkc_idx;
+         if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx)
+           continue;
+         subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from;
+         new_dest_nodes = (subexp_len == 0
+                           ? dfa->eclosures + dfa->edests[node_idx].elems[0]
+                           : dfa->eclosures + dfa->nexts[node_idx]);
+         dest_str_idx = (cur_str_idx + bkref_ent->subexp_to
+                         - bkref_ent->subexp_from);
+         context = re_string_context_at (&mctx->input, dest_str_idx - 1,
+                                         mctx->eflags);
+         dest_state = mctx->state_log[dest_str_idx];
+         prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0
+                       : mctx->state_log[cur_str_idx]->nodes.nelem);
+         /* Add `new_dest_node' to state_log.  */
+         if (dest_state == NULL)
+           {
+             mctx->state_log[dest_str_idx]
+               = re_acquire_state_context (&err, dfa, new_dest_nodes,
+                                           context);
+             if (BE (mctx->state_log[dest_str_idx] == NULL
+                     && err != REG_NOERROR, 0))
+               goto free_return;
+           }
+         else
+           {
+             re_node_set dest_nodes;
+             err = re_node_set_init_union (&dest_nodes,
+                                           dest_state->entrance_nodes,
+                                           new_dest_nodes);
+             if (BE (err != REG_NOERROR, 0))
+               {
+                 re_node_set_free (&dest_nodes);
+                 goto free_return;
+               }
+             mctx->state_log[dest_str_idx]
+               = re_acquire_state_context (&err, dfa, &dest_nodes, context);
+             re_node_set_free (&dest_nodes);
+             if (BE (mctx->state_log[dest_str_idx] == NULL
+                     && err != REG_NOERROR, 0))
+               goto free_return;
+           }
+         /* We need to check recursively if the backreference can epsilon
+            transit.  */
+         if (subexp_len == 0
+             && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem)
+           {
+             err = check_subexp_matching_top (mctx, new_dest_nodes,
+                                              cur_str_idx);
+             if (BE (err != REG_NOERROR, 0))
+               goto free_return;
+             err = transit_state_bkref (mctx, new_dest_nodes);
+             if (BE (err != REG_NOERROR, 0))
+               goto free_return;
+           }
+       }
+    }
+  err = REG_NOERROR;
+ free_return:
+  return err;
+}
+
+/* Enumerate all the candidates which the backreference BKREF_NODE can match
+   at BKREF_STR_IDX, and register them by match_ctx_add_entry().
+   Note that we might collect inappropriate candidates here.
+   However, the cost of checking them strictly here is too high, then we
+   delay these checking for prune_impossible_nodes().  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  Idx subexp_num, sub_top_idx;
+  const char *buf = (const char *) re_string_get_buffer (&mctx->input);
+  /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX.  */
+  Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx);
+  if (cache_idx != REG_MISSING)
+    {
+      const struct re_backref_cache_entry *entry
+       = mctx->bkref_ents + cache_idx;
+      do
+       if (entry->node == bkref_node)
+         return REG_NOERROR; /* We already checked it.  */
+      while (entry++->more);
+    }
+
+  subexp_num = dfa->nodes[bkref_node].opr.idx;
+
+  /* For each sub expression  */
+  for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx)
+    {
+      reg_errcode_t err;
+      re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx];
+      re_sub_match_last_t *sub_last;
+      Idx sub_last_idx, sl_str, bkref_str_off;
+
+      if (dfa->nodes[sub_top->node].opr.idx != subexp_num)
+       continue; /* It isn't related.  */
+
+      sl_str = sub_top->str_idx;
+      bkref_str_off = bkref_str_idx;
+      /* At first, check the last node of sub expressions we already
+        evaluated.  */
+      for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx)
+       {
+         regoff_t sl_str_diff;
+         sub_last = sub_top->lasts[sub_last_idx];
+         sl_str_diff = sub_last->str_idx - sl_str;
+         /* The matched string by the sub expression match with the substring
+            at the back reference?  */
+         if (sl_str_diff > 0)
+           {
+             if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0))
+               {
+                 /* Not enough chars for a successful match.  */
+                 if (bkref_str_off + sl_str_diff > mctx->input.len)
+                   break;
+
+                 err = clean_state_log_if_needed (mctx,
+                                                  bkref_str_off
+                                                  + sl_str_diff);
+                 if (BE (err != REG_NOERROR, 0))
+                   return err;
+                 buf = (const char *) re_string_get_buffer (&mctx->input);
+               }
+             if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0)
+               /* We don't need to search this sub expression any more.  */
+               break;
+           }
+         bkref_str_off += sl_str_diff;
+         sl_str += sl_str_diff;
+         err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
+                               bkref_str_idx);
+
+         /* Reload buf, since the preceding call might have reallocated
+            the buffer.  */
+         buf = (const char *) re_string_get_buffer (&mctx->input);
+
+         if (err == REG_NOMATCH)
+           continue;
+         if (BE (err != REG_NOERROR, 0))
+           return err;
+       }
+
+      if (sub_last_idx < sub_top->nlasts)
+       continue;
+      if (sub_last_idx > 0)
+       ++sl_str;
+      /* Then, search for the other last nodes of the sub expression.  */
+      for (; sl_str <= bkref_str_idx; ++sl_str)
+       {
+         Idx cls_node;
+         regoff_t sl_str_off;
+         const re_node_set *nodes;
+         sl_str_off = sl_str - sub_top->str_idx;
+         /* The matched string by the sub expression match with the substring
+            at the back reference?  */
+         if (sl_str_off > 0)
+           {
+             if (BE (bkref_str_off >= mctx->input.valid_len, 0))
+               {
+                 /* If we are at the end of the input, we cannot match.  */
+                 if (bkref_str_off >= mctx->input.len)
+                   break;
+
+                 err = extend_buffers (mctx);
+                 if (BE (err != REG_NOERROR, 0))
+                   return err;
+
+                 buf = (const char *) re_string_get_buffer (&mctx->input);
+               }
+             if (buf [bkref_str_off++] != buf[sl_str - 1])
+               break; /* We don't need to search this sub expression
+                         any more.  */
+           }
+         if (mctx->state_log[sl_str] == NULL)
+           continue;
+         /* Does this state have a ')' of the sub expression?  */
+         nodes = &mctx->state_log[sl_str]->nodes;
+         cls_node = find_subexp_node (dfa, nodes, subexp_num,
+                                      OP_CLOSE_SUBEXP);
+         if (cls_node == REG_MISSING)
+           continue; /* No.  */
+         if (sub_top->path == NULL)
+           {
+             sub_top->path = calloc (sizeof (state_array_t),
+                                     sl_str - sub_top->str_idx + 1);
+             if (sub_top->path == NULL)
+               return REG_ESPACE;
+           }
+         /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node
+            in the current context?  */
+         err = check_arrival (mctx, sub_top->path, sub_top->node,
+                              sub_top->str_idx, cls_node, sl_str,
+                              OP_CLOSE_SUBEXP);
+         if (err == REG_NOMATCH)
+             continue;
+         if (BE (err != REG_NOERROR, 0))
+             return err;
+         sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str);
+         if (BE (sub_last == NULL, 0))
+           return REG_ESPACE;
+         err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
+                               bkref_str_idx);
+         if (err == REG_NOMATCH)
+           continue;
+       }
+    }
+  return REG_NOERROR;
+}
+
+/* Helper functions for get_subexp().  */
+
+/* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR.
+   If it can arrive, register the sub expression expressed with SUB_TOP
+   and SUB_LAST.  */
+
+static reg_errcode_t
+internal_function
+get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top,
+               re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str)
+{
+  reg_errcode_t err;
+  Idx to_idx;
+  /* Can the subexpression arrive the back reference?  */
+  err = check_arrival (mctx, &sub_last->path, sub_last->node,
+                      sub_last->str_idx, bkref_node, bkref_str,
+                      OP_OPEN_SUBEXP);
+  if (err != REG_NOERROR)
+    return err;
+  err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx,
+                            sub_last->str_idx);
+  if (BE (err != REG_NOERROR, 0))
+    return err;
+  to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx;
+  return clean_state_log_if_needed (mctx, to_idx);
+}
+
+/* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX.
+   Search '(' if FL_OPEN, or search ')' otherwise.
+   TODO: This function isn't efficient...
+        Because there might be more than one nodes whose types are
+        OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all
+        nodes.
+        E.g. RE: (a){2}  */
+
+static Idx
+internal_function
+find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
+                 Idx subexp_idx, int type)
+{
+  Idx cls_idx;
+  for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx)
+    {
+      Idx cls_node = nodes->elems[cls_idx];
+      const re_token_t *node = dfa->nodes + cls_node;
+      if (node->type == type
+         && node->opr.idx == subexp_idx)
+       return cls_node;
+    }
+  return REG_MISSING;
+}
+
+/* Check whether the node TOP_NODE at TOP_STR can arrive to the node
+   LAST_NODE at LAST_STR.  We record the path onto PATH since it will be
+   heavily reused.
+   Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
+              Idx top_str, Idx last_node, Idx last_str, int type)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  reg_errcode_t err = REG_NOERROR;
+  Idx subexp_num, backup_cur_idx, str_idx, null_cnt;
+  re_dfastate_t *cur_state = NULL;
+  re_node_set *cur_nodes, next_nodes;
+  re_dfastate_t **backup_state_log;
+  unsigned int context;
+
+  subexp_num = dfa->nodes[top_node].opr.idx;
+  /* Extend the buffer if we need.  */
+  if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0))
+    {
+      re_dfastate_t **new_array;
+      Idx old_alloc = path->alloc;
+      Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1;
+      if (BE (new_alloc < old_alloc, 0)
+         || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
+       return REG_ESPACE;
+      new_array = re_realloc (path->array, re_dfastate_t *, new_alloc);
+      if (BE (new_array == NULL, 0))
+       return REG_ESPACE;
+      path->array = new_array;
+      path->alloc = new_alloc;
+      memset (new_array + old_alloc, '\0',
+             sizeof (re_dfastate_t *) * (path->alloc - old_alloc));
+    }
+
+  str_idx = path->next_idx ? path->next_idx : top_str;
+
+  /* Temporary modify MCTX.  */
+  backup_state_log = mctx->state_log;
+  backup_cur_idx = mctx->input.cur_idx;
+  mctx->state_log = path->array;
+  mctx->input.cur_idx = str_idx;
+
+  /* Setup initial node set.  */
+  context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags);
+  if (str_idx == top_str)
+    {
+      err = re_node_set_init_1 (&next_nodes, top_node);
+      if (BE (err != REG_NOERROR, 0))
+       return err;
+      err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
+      if (BE (err != REG_NOERROR, 0))
+       {
+         re_node_set_free (&next_nodes);
+         return err;
+       }
+    }
+  else
+    {
+      cur_state = mctx->state_log[str_idx];
+      if (cur_state && cur_state->has_backref)
+       {
+         err = re_node_set_init_copy (&next_nodes, &cur_state->nodes);
+         if (BE (err != REG_NOERROR, 0))
+           return err;
+       }
+      else
+       re_node_set_init_empty (&next_nodes);
+    }
+  if (str_idx == top_str || (cur_state && cur_state->has_backref))
+    {
+      if (next_nodes.nelem)
+       {
+         err = expand_bkref_cache (mctx, &next_nodes, str_idx,
+                                   subexp_num, type);
+         if (BE (err != REG_NOERROR, 0))
+           {
+             re_node_set_free (&next_nodes);
+             return err;
+           }
+       }
+      cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
+      if (BE (cur_state == NULL && err != REG_NOERROR, 0))
+       {
+         re_node_set_free (&next_nodes);
+         return err;
+       }
+      mctx->state_log[str_idx] = cur_state;
+    }
+
+  for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;)
+    {
+      re_node_set_empty (&next_nodes);
+      if (mctx->state_log[str_idx + 1])
+       {
+         err = re_node_set_merge (&next_nodes,
+                                  &mctx->state_log[str_idx + 1]->nodes);
+         if (BE (err != REG_NOERROR, 0))
+           {
+             re_node_set_free (&next_nodes);
+             return err;
+           }
+       }
+      if (cur_state)
+       {
+         err = check_arrival_add_next_nodes (mctx, str_idx,
+                                             &cur_state->non_eps_nodes,
+                                             &next_nodes);
+         if (BE (err != REG_NOERROR, 0))
+           {
+             re_node_set_free (&next_nodes);
+             return err;
+           }
+       }
+      ++str_idx;
+      if (next_nodes.nelem)
+       {
+         err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
+         if (BE (err != REG_NOERROR, 0))
+           {
+             re_node_set_free (&next_nodes);
+             return err;
+           }
+         err = expand_bkref_cache (mctx, &next_nodes, str_idx,
+                                   subexp_num, type);
+         if (BE (err != REG_NOERROR, 0))
+           {
+             re_node_set_free (&next_nodes);
+             return err;
+           }
+       }
+      context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags);
+      cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
+      if (BE (cur_state == NULL && err != REG_NOERROR, 0))
+       {
+         re_node_set_free (&next_nodes);
+         return err;
+       }
+      mctx->state_log[str_idx] = cur_state;
+      null_cnt = cur_state == NULL ? null_cnt + 1 : 0;
+    }
+  re_node_set_free (&next_nodes);
+  cur_nodes = (mctx->state_log[last_str] == NULL ? NULL
+              : &mctx->state_log[last_str]->nodes);
+  path->next_idx = str_idx;
+
+  /* Fix MCTX.  */
+  mctx->state_log = backup_state_log;
+  mctx->input.cur_idx = backup_cur_idx;
+
+  /* Then check the current node set has the node LAST_NODE.  */
+  if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node))
+    return REG_NOERROR;
+
+  return REG_NOMATCH;
+}
+
+/* Helper functions for check_arrival.  */
+
+/* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them
+   to NEXT_NODES.
+   TODO: This function is similar to the functions transit_state*(),
+        however this function has many additional works.
+        Can't we unify them?  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
+                             re_node_set *cur_nodes, re_node_set *next_nodes)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  bool ok;
+  Idx cur_idx;
+#ifdef RE_ENABLE_I18N
+  reg_errcode_t err = REG_NOERROR;
+#endif
+  re_node_set union_set;
+  re_node_set_init_empty (&union_set);
+  for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)
+    {
+      int naccepted = 0;
+      Idx cur_node = cur_nodes->elems[cur_idx];
+#ifdef DEBUG
+      re_token_type_t type = dfa->nodes[cur_node].type;
+      assert (!IS_EPSILON_NODE (type));
+#endif
+#ifdef RE_ENABLE_I18N
+      /* If the node may accept `multi byte'.  */
+      if (dfa->nodes[cur_node].accept_mb)
+       {
+         naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input,
+                                              str_idx);
+         if (naccepted > 1)
+           {
+             re_dfastate_t *dest_state;
+             Idx next_node = dfa->nexts[cur_node];
+             Idx next_idx = str_idx + naccepted;
+             dest_state = mctx->state_log[next_idx];
+             re_node_set_empty (&union_set);
+             if (dest_state)
+               {
+                 err = re_node_set_merge (&union_set, &dest_state->nodes);
+                 if (BE (err != REG_NOERROR, 0))
+                   {
+                     re_node_set_free (&union_set);
+                     return err;
+                   }
+               }
+             ok = re_node_set_insert (&union_set, next_node);
+             if (BE (! ok, 0))
+               {
+                 re_node_set_free (&union_set);
+                 return REG_ESPACE;
+               }
+             mctx->state_log[next_idx] = re_acquire_state (&err, dfa,
+                                                           &union_set);
+             if (BE (mctx->state_log[next_idx] == NULL
+                     && err != REG_NOERROR, 0))
+               {
+                 re_node_set_free (&union_set);
+                 return err;
+               }
+           }
+       }
+#endif /* RE_ENABLE_I18N */
+      if (naccepted
+         || check_node_accept (mctx, dfa->nodes + cur_node, str_idx))
+       {
+         ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]);
+         if (BE (! ok, 0))
+           {
+             re_node_set_free (&union_set);
+             return REG_ESPACE;
+           }
+       }
+    }
+  re_node_set_free (&union_set);
+  return REG_NOERROR;
+}
+
+/* For all the nodes in CUR_NODES, add the epsilon closures of them to
+   CUR_NODES, however exclude the nodes which are:
+    - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN.
+    - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN.
+*/
+
+static reg_errcode_t
+internal_function
+check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
+                         Idx ex_subexp, int type)
+{
+  reg_errcode_t err;
+  Idx idx, outside_node;
+  re_node_set new_nodes;
+#ifdef DEBUG
+  assert (cur_nodes->nelem);
+#endif
+  err = re_node_set_alloc (&new_nodes, cur_nodes->nelem);
+  if (BE (err != REG_NOERROR, 0))
+    return err;
+  /* Create a new node set NEW_NODES with the nodes which are epsilon
+     closures of the node in CUR_NODES.  */
+
+  for (idx = 0; idx < cur_nodes->nelem; ++idx)
+    {
+      Idx cur_node = cur_nodes->elems[idx];
+      const re_node_set *eclosure = dfa->eclosures + cur_node;
+      outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type);
+      if (outside_node == REG_MISSING)
+       {
+         /* There are no problematic nodes, just merge them.  */
+         err = re_node_set_merge (&new_nodes, eclosure);
+         if (BE (err != REG_NOERROR, 0))
+           {
+             re_node_set_free (&new_nodes);
+             return err;
+           }
+       }
+      else
+       {
+         /* There are problematic nodes, re-calculate incrementally.  */
+         err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node,
+                                             ex_subexp, type);
+         if (BE (err != REG_NOERROR, 0))
+           {
+             re_node_set_free (&new_nodes);
+             return err;
+           }
+       }
+    }
+  re_node_set_free (cur_nodes);
+  *cur_nodes = new_nodes;
+  return REG_NOERROR;
+}
+
+/* Helper function for check_arrival_expand_ecl.
+   Check incrementally the epsilon closure of TARGET, and if it isn't
+   problematic append it to DST_NODES.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
+                             Idx target, Idx ex_subexp, int type)
+{
+  Idx cur_node;
+  for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);)
+    {
+      bool ok;
+
+      if (dfa->nodes[cur_node].type == type
+         && dfa->nodes[cur_node].opr.idx == ex_subexp)
+       {
+         if (type == OP_CLOSE_SUBEXP)
+           {
+             ok = re_node_set_insert (dst_nodes, cur_node);
+             if (BE (! ok, 0))
+               return REG_ESPACE;
+           }
+         break;
+       }
+      ok = re_node_set_insert (dst_nodes, cur_node);
+      if (BE (! ok, 0))
+       return REG_ESPACE;
+      if (dfa->edests[cur_node].nelem == 0)
+       break;
+      if (dfa->edests[cur_node].nelem == 2)
+       {
+         reg_errcode_t err;
+         err = check_arrival_expand_ecl_sub (dfa, dst_nodes,
+                                             dfa->edests[cur_node].elems[1],
+                                             ex_subexp, type);
+         if (BE (err != REG_NOERROR, 0))
+           return err;
+       }
+      cur_node = dfa->edests[cur_node].elems[0];
+    }
+  return REG_NOERROR;
+}
+
+
+/* For all the back references in the current state, calculate the
+   destination of the back references by the appropriate entry
+   in MCTX->BKREF_ENTS.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
+                   Idx cur_str, Idx subexp_num, int type)
+{
+  const re_dfa_t *const dfa = mctx->dfa;
+  reg_errcode_t err;
+  Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str);
+  struct re_backref_cache_entry *ent;
+
+  if (cache_idx_start == REG_MISSING)
+    return REG_NOERROR;
+
+ restart:
+  ent = mctx->bkref_ents + cache_idx_start;
+  do
+    {
+      Idx to_idx, next_node;
+
+      /* Is this entry ENT is appropriate?  */
+      if (!re_node_set_contains (cur_nodes, ent->node))
+       continue; /* No.  */
+
+      to_idx = cur_str + ent->subexp_to - ent->subexp_from;
+      /* Calculate the destination of the back reference, and append it
+        to MCTX->STATE_LOG.  */
+      if (to_idx == cur_str)
+       {
+         /* The backreference did epsilon transit, we must re-check all the
+            node in the current state.  */
+         re_node_set new_dests;
+         reg_errcode_t err2, err3;
+         next_node = dfa->edests[ent->node].elems[0];
+         if (re_node_set_contains (cur_nodes, next_node))
+           continue;
+         err = re_node_set_init_1 (&new_dests, next_node);
+         err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type);
+         err3 = re_node_set_merge (cur_nodes, &new_dests);
+         re_node_set_free (&new_dests);
+         if (BE (err != REG_NOERROR || err2 != REG_NOERROR
+                 || err3 != REG_NOERROR, 0))
+           {
+             err = (err != REG_NOERROR ? err
+                    : (err2 != REG_NOERROR ? err2 : err3));
+             return err;
+           }
+         /* TODO: It is still inefficient...  */
+         goto restart;
+       }
+      else
+       {
+         re_node_set union_set;
+         next_node = dfa->nexts[ent->node];
+         if (mctx->state_log[to_idx])
+           {
+             bool ok;
+             if (re_node_set_contains (&mctx->state_log[to_idx]->nodes,
+                                       next_node))
+               continue;
+             err = re_node_set_init_copy (&union_set,
+                                          &mctx->state_log[to_idx]->nodes);
+             ok = re_node_set_insert (&union_set, next_node);
+             if (BE (err != REG_NOERROR || ! ok, 0))
+               {
+                 re_node_set_free (&union_set);
+                 err = err != REG_NOERROR ? err : REG_ESPACE;
+                 return err;
+               }
+           }
+         else
+           {
+             err = re_node_set_init_1 (&union_set, next_node);
+             if (BE (err != REG_NOERROR, 0))
+               return err;
+           }
+         mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set);
+         re_node_set_free (&union_set);
+         if (BE (mctx->state_log[to_idx] == NULL
+                 && err != REG_NOERROR, 0))
+           return err;
+       }
+    }
+  while (ent++->more);
+  return REG_NOERROR;
+}
+
+/* Build transition table for the state.
+   Return true if successful.  */
+
+static bool
+internal_function
+build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
+{
+  reg_errcode_t err;
+  Idx i, j;
+  int ch;
+  bool need_word_trtable = false;
+  bitset_word_t elem, mask;
+  bool dests_node_malloced = false;
+  bool dest_states_malloced = false;
+  Idx ndests; /* Number of the destination states from `state'.  */
+  re_dfastate_t **trtable;
+  re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl;
+  re_node_set follows, *dests_node;
+  bitset_t *dests_ch;
+  bitset_t acceptable;
+
+  struct dests_alloc
+  {
+    re_node_set dests_node[SBC_MAX];
+    bitset_t dests_ch[SBC_MAX];
+  } *dests_alloc;
+
+  /* We build DFA states which corresponds to the destination nodes
+     from `state'.  `dests_node[i]' represents the nodes which i-th
+     destination state contains, and `dests_ch[i]' represents the
+     characters which i-th destination state accepts.  */
+  if (__libc_use_alloca (sizeof (struct dests_alloc)))
+    dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc));
+  else
+    {
+      dests_alloc = re_malloc (struct dests_alloc, 1);
+      if (BE (dests_alloc == NULL, 0))
+       return false;
+      dests_node_malloced = true;
+    }
+  dests_node = dests_alloc->dests_node;
+  dests_ch = dests_alloc->dests_ch;
+
+  /* Initialize transiton table.  */
+  state->word_trtable = state->trtable = NULL;
+
+  /* At first, group all nodes belonging to `state' into several
+     destinations.  */
+  ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch);
+  if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0))
+    {
+      if (dests_node_malloced)
+       free (dests_alloc);
+      if (ndests == 0)
+       {
+         state->trtable = (re_dfastate_t **)
+           calloc (sizeof (re_dfastate_t *), SBC_MAX);
+          if (BE (state->trtable == NULL, 0))
+            return false;
+         return true;
+       }
+      return false;
+    }
+
+  err = re_node_set_alloc (&follows, ndests + 1);
+  if (BE (err != REG_NOERROR, 0))
+    goto out_free;
+
+  /* Avoid arithmetic overflow in size calculation.  */
+  if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX)
+           / (3 * sizeof (re_dfastate_t *)))
+          < ndests),
+         0))
+    goto out_free;
+
+  if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX
+                        + ndests * 3 * sizeof (re_dfastate_t *)))
+    dest_states = (re_dfastate_t **)
+      alloca (ndests * 3 * sizeof (re_dfastate_t *));
+  else
+    {
+      dest_states = (re_dfastate_t **)
+       malloc (ndests * 3 * sizeof (re_dfastate_t *));
+      if (BE (dest_states == NULL, 0))
+       {
+out_free:
+         if (dest_states_malloced)
+           free (dest_states);
+         re_node_set_free (&follows);
+         for (i = 0; i < ndests; ++i)
+           re_node_set_free (dests_node + i);
+         if (dests_node_malloced)
+           free (dests_alloc);
+         return false;
+       }
+      dest_states_malloced = true;
+    }
+  dest_states_word = dest_states + ndests;
+  dest_states_nl = dest_states_word + ndests;
+  bitset_empty (acceptable);
+
+  /* Then build the states for all destinations.  */
+  for (i = 0; i < ndests; ++i)
+    {
+      Idx next_node;
+      re_node_set_empty (&follows);
+      /* Merge the follows of this destination states.  */
+      for (j = 0; j < dests_node[i].nelem; ++j)
+       {
+         next_node = dfa->nexts[dests_node[i].elems[j]];
+         if (next_node != REG_MISSING)
+           {
+             err = re_node_set_merge (&follows, dfa->eclosures + next_node);
+             if (BE (err != REG_NOERROR, 0))
+               goto out_free;
+           }
+       }
+      dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0);
+      if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0))
+       goto out_free;
+      /* If the new state has context constraint,
+        build appropriate states for these contexts.  */
+      if (dest_states[i]->has_constraint)
+       {
+         dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows,
+                                                         CONTEXT_WORD);
+         if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0))
+           goto out_free;
+
+         if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1)
+           need_word_trtable = true;
+
+         dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows,
+                                                       CONTEXT_NEWLINE);
+         if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0))
+           goto out_free;
+       }
+      else
+       {
+         dest_states_word[i] = dest_states[i];
+         dest_states_nl[i] = dest_states[i];
+       }
+      bitset_merge (acceptable, dests_ch[i]);
+    }
+
+  if (!BE (need_word_trtable, 0))
+    {
+      /* We don't care about whether the following character is a word
+        character, or we are in a single-byte character set so we can
+        discern by looking at the character code: allocate a
+        256-entry transition table.  */
+      trtable = state->trtable =
+       (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX);
+      if (BE (trtable == NULL, 0))
+       goto out_free;
+
+      /* For all characters ch...:  */
+      for (i = 0; i < BITSET_WORDS; ++i)
+       for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1;
+            elem;
+            mask <<= 1, elem >>= 1, ++ch)
+         if (BE (elem & 1, 0))
+           {
+             /* There must be exactly one destination which accepts
+                character ch.  See group_nodes_into_DFAstates.  */
+             for (j = 0; (dests_ch[j][i] & mask) == 0; ++j)
+               ;
+
+             /* j-th destination accepts the word character ch.  */
+             if (dfa->word_char[i] & mask)
+               trtable[ch] = dest_states_word[j];
+             else
+               trtable[ch] = dest_states[j];
+           }
+    }
+  else
+    {
+      /* We care about whether the following character is a word
+        character, and we are in a multi-byte character set: discern
+        by looking at the character code: build two 256-entry
+        transition tables, one starting at trtable[0] and one
+        starting at trtable[SBC_MAX].  */
+      trtable = state->word_trtable =
+       (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX);
+      if (BE (trtable == NULL, 0))
+       goto out_free;
+
+      /* For all characters ch...:  */
+      for (i = 0; i < BITSET_WORDS; ++i)
+       for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1;
+            elem;
+            mask <<= 1, elem >>= 1, ++ch)
+         if (BE (elem & 1, 0))
+           {
+             /* There must be exactly one destination which accepts
+                character ch.  See group_nodes_into_DFAstates.  */
+             for (j = 0; (dests_ch[j][i] & mask) == 0; ++j)
+               ;
+
+             /* j-th destination accepts the word character ch.  */
+             trtable[ch] = dest_states[j];
+             trtable[ch + SBC_MAX] = dest_states_word[j];
+           }
+    }
+
+  /* new line */
+  if (bitset_contain (acceptable, NEWLINE_CHAR))
+    {
+      /* The current state accepts newline character.  */
+      for (j = 0; j < ndests; ++j)
+       if (bitset_contain (dests_ch[j], NEWLINE_CHAR))
+         {
+           /* k-th destination accepts newline character.  */
+           trtable[NEWLINE_CHAR] = dest_states_nl[j];
+           if (need_word_trtable)
+             trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j];
+           /* There must be only one destination which accepts
+              newline.  See group_nodes_into_DFAstates.  */
+           break;
+         }
+    }
+
+  if (dest_states_malloced)
+    free (dest_states);
+
+  re_node_set_free (&follows);
+  for (i = 0; i < ndests; ++i)
+    re_node_set_free (dests_node + i);
+
+  if (dests_node_malloced)
+    free (dests_alloc);
+
+  return true;
+}
+
+/* Group all nodes belonging to STATE into several destinations.
+   Then for all destinations, set the nodes belonging to the destination
+   to DESTS_NODE[i] and set the characters accepted by the destination
+   to DEST_CH[i].  This function return the number of destinations.  */
+
+static Idx
+internal_function
+group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
+                           re_node_set *dests_node, bitset_t *dests_ch)
+{
+  reg_errcode_t err;
+  bool ok;
+  Idx i, j, k;
+  Idx ndests; /* Number of the destinations from `state'.  */
+  bitset_t accepts; /* Characters a node can accept.  */
+  const re_node_set *cur_nodes = &state->nodes;
+  bitset_empty (accepts);
+  ndests = 0;
+
+  /* For all the nodes belonging to `state',  */
+  for (i = 0; i < cur_nodes->nelem; ++i)
+    {
+      re_token_t *node = &dfa->nodes[cur_nodes->elems[i]];
+      re_token_type_t type = node->type;
+      unsigned int constraint = node->constraint;
+
+      /* Enumerate all single byte character this node can accept.  */
+      if (type == CHARACTER)
+       bitset_set (accepts, node->opr.c);
+      else if (type == SIMPLE_BRACKET)
+       {
+         bitset_merge (accepts, node->opr.sbcset);
+       }
+      else if (type == OP_PERIOD)
+       {
+#ifdef RE_ENABLE_I18N
+         if (dfa->mb_cur_max > 1)
+           bitset_merge (accepts, dfa->sb_char);
+         else
+#endif
+           bitset_set_all (accepts);
+         if (!(dfa->syntax & RE_DOT_NEWLINE))
+           bitset_clear (accepts, '\n');
+         if (dfa->syntax & RE_DOT_NOT_NULL)
+           bitset_clear (accepts, '\0');
+       }
+#ifdef RE_ENABLE_I18N
+      else if (type == OP_UTF8_PERIOD)
+       {
+         if (ASCII_CHARS % BITSET_WORD_BITS == 0)
+           memset (accepts, -1, ASCII_CHARS / CHAR_BIT);
+         else
+           bitset_merge (accepts, utf8_sb_map);
+         if (!(dfa->syntax & RE_DOT_NEWLINE))
+           bitset_clear (accepts, '\n');
+         if (dfa->syntax & RE_DOT_NOT_NULL)
+           bitset_clear (accepts, '\0');
+       }
+#endif
+      else
+       continue;
+
+      /* Check the `accepts' and sift the characters which are not
+        match it the context.  */
+      if (constraint)
+       {
+         if (constraint & NEXT_NEWLINE_CONSTRAINT)
+           {
+             bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR);
+             bitset_empty (accepts);
+             if (accepts_newline)
+               bitset_set (accepts, NEWLINE_CHAR);
+             else
+               continue;
+           }
+         if (constraint & NEXT_ENDBUF_CONSTRAINT)
+           {
+             bitset_empty (accepts);
+             continue;
+           }
+
+         if (constraint & NEXT_WORD_CONSTRAINT)
+           {
+             bitset_word_t any_set = 0;
+             if (type == CHARACTER && !node->word_char)
+               {
+                 bitset_empty (accepts);
+                 continue;
+               }
+#ifdef RE_ENABLE_I18N
+             if (dfa->mb_cur_max > 1)
+               for (j = 0; j < BITSET_WORDS; ++j)
+                 any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]));
+             else
+#endif
+               for (j = 0; j < BITSET_WORDS; ++j)
+                 any_set |= (accepts[j] &= dfa->word_char[j]);
+             if (!any_set)
+               continue;
+           }
+         if (constraint & NEXT_NOTWORD_CONSTRAINT)
+           {
+             bitset_word_t any_set = 0;
+             if (type == CHARACTER && node->word_char)
+               {
+                 bitset_empty (accepts);
+                 continue;
+               }
+#ifdef RE_ENABLE_I18N
+             if (dfa->mb_cur_max > 1)
+               for (j = 0; j < BITSET_WORDS; ++j)
+                 any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j]));
+             else
+#endif
+               for (j = 0; j < BITSET_WORDS; ++j)
+                 any_set |= (accepts[j] &= ~dfa->word_char[j]);
+             if (!any_set)
+               continue;
+           }
+       }
+
+      /* Then divide `accepts' into DFA states, or create a new
+        state.  Above, we make sure that accepts is not empty.  */
+      for (j = 0; j < ndests; ++j)
+       {
+         bitset_t intersec; /* Intersection sets, see below.  */
+         bitset_t remains;
+         /* Flags, see below.  */
+         bitset_word_t has_intersec, not_subset, not_consumed;
+
+         /* Optimization, skip if this state doesn't accept the character.  */
+         if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c))
+           continue;
+
+         /* Enumerate the intersection set of this state and `accepts'.  */
+         has_intersec = 0;
+         for (k = 0; k < BITSET_WORDS; ++k)
+           has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k];
+         /* And skip if the intersection set is empty.  */
+         if (!has_intersec)
+           continue;
+
+         /* Then check if this state is a subset of `accepts'.  */
+         not_subset = not_consumed = 0;
+         for (k = 0; k < BITSET_WORDS; ++k)
+           {
+             not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k];
+             not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k];
+           }
+
+         /* If this state isn't a subset of `accepts', create a
+            new group state, which has the `remains'. */
+         if (not_subset)
+           {
+             bitset_copy (dests_ch[ndests], remains);
+             bitset_copy (dests_ch[j], intersec);
+             err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]);
+             if (BE (err != REG_NOERROR, 0))
+               goto error_return;
+             ++ndests;
+           }
+
+         /* Put the position in the current group. */
+         ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]);
+         if (BE (! ok, 0))
+           goto error_return;
+
+         /* If all characters are consumed, go to next node. */
+         if (!not_consumed)
+           break;
+       }
+      /* Some characters remain, create a new group. */
+      if (j == ndests)
+       {
+         bitset_copy (dests_ch[ndests], accepts);
+         err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]);
+         if (BE (err != REG_NOERROR, 0))
+           goto error_return;
+         ++ndests;
+         bitset_empty (accepts);
+       }
+    }
+  return ndests;
+ error_return:
+  for (j = 0; j < ndests; ++j)
+    re_node_set_free (dests_node + j);
+  return REG_MISSING;
+}
+
+#ifdef RE_ENABLE_I18N
+/* Check how many bytes the node `dfa->nodes[node_idx]' accepts.
+   Return the number of the bytes the node accepts.
+   STR_IDX is the current index of the input string.
+
+   This function handles the nodes which can accept one character, or
+   one collating element like '.', '[a-z]', opposite to the other nodes
+   can only accept one byte.  */
+
+static int
+internal_function
+check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
+                        const re_string_t *input, Idx str_idx)
+{
+  const re_token_t *node = dfa->nodes + node_idx;
+  int char_len, elem_len;
+  Idx i;
+
+  if (BE (node->type == OP_UTF8_PERIOD, 0))
+    {
+      unsigned char c = re_string_byte_at (input, str_idx), d;
+      if (BE (c < 0xc2, 1))
+       return 0;
+
+      if (str_idx + 2 > input->len)
+       return 0;
+
+      d = re_string_byte_at (input, str_idx + 1);
+      if (c < 0xe0)
+       return (d < 0x80 || d > 0xbf) ? 0 : 2;
+      else if (c < 0xf0)
+       {
+         char_len = 3;
+         if (c == 0xe0 && d < 0xa0)
+           return 0;
+       }
+      else if (c < 0xf8)
+       {
+         char_len = 4;
+         if (c == 0xf0 && d < 0x90)
+           return 0;
+       }
+      else if (c < 0xfc)
+       {
+         char_len = 5;
+         if (c == 0xf8 && d < 0x88)
+           return 0;
+       }
+      else if (c < 0xfe)
+       {
+         char_len = 6;
+         if (c == 0xfc && d < 0x84)
+           return 0;
+       }
+      else
+       return 0;
+
+      if (str_idx + char_len > input->len)
+       return 0;
+
+      for (i = 1; i < char_len; ++i)
+       {
+         d = re_string_byte_at (input, str_idx + i);
+         if (d < 0x80 || d > 0xbf)
+           return 0;
+       }
+      return char_len;
+    }
+
+  char_len = re_string_char_size_at (input, str_idx);
+  if (node->type == OP_PERIOD)
+    {
+      if (char_len <= 1)
+       return 0;
+      /* FIXME: I don't think this if is needed, as both '\n'
+        and '\0' are char_len == 1.  */
+      /* '.' accepts any one character except the following two cases.  */
+      if ((!(dfa->syntax & RE_DOT_NEWLINE) &&
+          re_string_byte_at (input, str_idx) == '\n') ||
+         ((dfa->syntax & RE_DOT_NOT_NULL) &&
+          re_string_byte_at (input, str_idx) == '\0'))
+       return 0;
+      return char_len;
+    }
+
+  elem_len = re_string_elem_size_at (input, str_idx);
+  if ((elem_len <= 1 && char_len <= 1) || char_len == 0)
+    return 0;
+
+  if (node->type == COMPLEX_BRACKET)
+    {
+      const re_charset_t *cset = node->opr.mbcset;
+# ifdef _LIBC
+      const unsigned char *pin
+       = ((const unsigned char *) re_string_get_buffer (input) + str_idx);
+      Idx j;
+      uint32_t nrules;
+# endif /* _LIBC */
+      int match_len = 0;
+      wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars)
+                   ? re_string_wchar_at (input, str_idx) : 0);
+
+      /* match with multibyte character?  */
+      for (i = 0; i < cset->nmbchars; ++i)
+       if (wc == cset->mbchars[i])
+         {
+           match_len = char_len;
+           goto check_node_accept_bytes_match;
+         }
+      /* match with character_class?  */
+      for (i = 0; i < cset->nchar_classes; ++i)
+       {
+         wctype_t wt = cset->char_classes[i];
+         if (__iswctype (wc, wt))
+           {
+             match_len = char_len;
+             goto check_node_accept_bytes_match;
+           }
+       }
+
+# ifdef _LIBC
+      nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+      if (nrules != 0)
+       {
+         unsigned int in_collseq = 0;
+         const int32_t *table, *indirect;
+         const unsigned char *weights, *extra;
+         const char *collseqwc;
+         int32_t idx;
+         /* This #include defines a local function!  */
+#  include <locale/weight.h>
+
+         /* match with collating_symbol?  */
+         if (cset->ncoll_syms)
+           extra = (const unsigned char *)
+             _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
+         for (i = 0; i < cset->ncoll_syms; ++i)
+           {
+             const unsigned char *coll_sym = extra + cset->coll_syms[i];
+             /* Compare the length of input collating element and
+                the length of current collating element.  */
+             if (*coll_sym != elem_len)
+               continue;
+             /* Compare each bytes.  */
+             for (j = 0; j < *coll_sym; j++)
+               if (pin[j] != coll_sym[1 + j])
+                 break;
+             if (j == *coll_sym)
+               {
+                 /* Match if every bytes is equal.  */
+                 match_len = j;
+                 goto check_node_accept_bytes_match;
+               }
+           }
+
+         if (cset->nranges)
+           {
+             if (elem_len <= char_len)
+               {
+                 collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+                 in_collseq = __collseq_table_lookup (collseqwc, wc);
+               }
+             else
+               in_collseq = find_collation_sequence_value (pin, elem_len);
+           }
+         /* match with range expression?  */
+         for (i = 0; i < cset->nranges; ++i)
+           if (cset->range_starts[i] <= in_collseq
+               && in_collseq <= cset->range_ends[i])
+             {
+               match_len = elem_len;
+               goto check_node_accept_bytes_match;
+             }
+
+         /* match with equivalence_class?  */
+         if (cset->nequiv_classes)
+           {
+             const unsigned char *cp = pin;
+             table = (const int32_t *)
+               _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+             weights = (const unsigned char *)
+               _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB);
+             extra = (const unsigned char *)
+               _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+             indirect = (const int32_t *)
+               _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
+             int32_t idx = findidx (&cp);
+             if (idx > 0)
+               for (i = 0; i < cset->nequiv_classes; ++i)
+                 {
+                   int32_t equiv_class_idx = cset->equiv_classes[i];
+                   size_t weight_len = weights[idx & 0xffffff];
+                   if (weight_len == weights[equiv_class_idx & 0xffffff]
+                       && (idx >> 24) == (equiv_class_idx >> 24))
+                     {
+                       Idx cnt = 0;
+
+                       idx &= 0xffffff;
+                       equiv_class_idx &= 0xffffff;
+
+                       while (cnt <= weight_len
+                              && (weights[equiv_class_idx + 1 + cnt]
+                                  == weights[idx + 1 + cnt]))
+                         ++cnt;
+                       if (cnt > weight_len)
+                         {
+                           match_len = elem_len;
+                           goto check_node_accept_bytes_match;
+                         }
+                     }
+                 }
+           }
+       }
+      else
+# endif /* _LIBC */
+       {
+         /* match with range expression?  */
+#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__)
+         wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'};
+#else
+         wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'};
+         cmp_buf[2] = wc;
+#endif
+         for (i = 0; i < cset->nranges; ++i)
+           {
+             cmp_buf[0] = cset->range_starts[i];
+             cmp_buf[4] = cset->range_ends[i];
+             if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
+                 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
+               {
+                 match_len = char_len;
+                 goto check_node_accept_bytes_match;
+               }
+           }
+       }
+    check_node_accept_bytes_match:
+      if (!cset->non_match)
+       return match_len;
+      else
+       {
+         if (match_len > 0)
+           return 0;
+         else
+           return (elem_len > char_len) ? elem_len : char_len;
+       }
+    }
+  return 0;
+}
+
+# ifdef _LIBC
+static unsigned int
+internal_function
+find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
+{
+  uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+  if (nrules == 0)
+    {
+      if (mbs_len == 1)
+       {
+         /* No valid character.  Match it as a single byte character.  */
+         const unsigned char *collseq = (const unsigned char *)
+           _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+         return collseq[mbs[0]];
+       }
+      return UINT_MAX;
+    }
+  else
+    {
+      int32_t idx;
+      const unsigned char *extra = (const unsigned char *)
+       _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
+      int32_t extrasize = (const unsigned char *)
+       _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra;
+
+      for (idx = 0; idx < extrasize;)
+       {
+         int mbs_cnt;
+         bool found = false;
+         int32_t elem_mbs_len;
+         /* Skip the name of collating element name.  */
+         idx = idx + extra[idx] + 1;
+         elem_mbs_len = extra[idx++];
+         if (mbs_len == elem_mbs_len)
+           {
+             for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt)
+               if (extra[idx + mbs_cnt] != mbs[mbs_cnt])
+                 break;
+             if (mbs_cnt == elem_mbs_len)
+               /* Found the entry.  */
+               found = true;
+           }
+         /* Skip the byte sequence of the collating element.  */
+         idx += elem_mbs_len;
+         /* Adjust for the alignment.  */
+         idx = (idx + 3) & ~3;
+         /* Skip the collation sequence value.  */
+         idx += sizeof (uint32_t);
+         /* Skip the wide char sequence of the collating element.  */
+         idx = idx + sizeof (uint32_t) * (extra[idx] + 1);
+         /* If we found the entry, return the sequence value.  */
+         if (found)
+           return *(uint32_t *) (extra + idx);
+         /* Skip the collation sequence value.  */
+         idx += sizeof (uint32_t);
+       }
+      return UINT_MAX;
+    }
+}
+# endif /* _LIBC */
+#endif /* RE_ENABLE_I18N */
+
+/* Check whether the node accepts the byte which is IDX-th
+   byte of the INPUT.  */
+
+static bool
+internal_function
+check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
+                  Idx idx)
+{
+  unsigned char ch;
+  ch = re_string_byte_at (&mctx->input, idx);
+  switch (node->type)
+    {
+    case CHARACTER:
+      if (node->opr.c != ch)
+        return false;
+      break;
+
+    case SIMPLE_BRACKET:
+      if (!bitset_contain (node->opr.sbcset, ch))
+        return false;
+      break;
+
+#ifdef RE_ENABLE_I18N
+    case OP_UTF8_PERIOD:
+      if (ch >= ASCII_CHARS)
+        return false;
+      /* FALLTHROUGH */
+#endif
+    case OP_PERIOD:
+      if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE))
+         || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL)))
+       return false;
+      break;
+
+    default:
+      return false;
+    }
+
+  if (node->constraint)
+    {
+      /* The node has constraints.  Check whether the current context
+        satisfies the constraints.  */
+      unsigned int context = re_string_context_at (&mctx->input, idx,
+                                                  mctx->eflags);
+      if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context))
+       return false;
+    }
+
+  return true;
+}
+
+/* Extend the buffers, if the buffers have run out.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+extend_buffers (re_match_context_t *mctx)
+{
+  reg_errcode_t ret;
+  re_string_t *pstr = &mctx->input;
+
+  /* Avoid overflow.  */
+  if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0))
+    return REG_ESPACE;
+
+  /* Double the lengthes of the buffers.  */
+  ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+  if (BE (ret != REG_NOERROR, 0))
+    return ret;
+
+  if (mctx->state_log != NULL)
+    {
+      /* And double the length of state_log.  */
+      /* XXX We have no indication of the size of this buffer.  If this
+        allocation fail we have no indication that the state_log array
+        does not have the right size.  */
+      re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *,
+                                             pstr->bufs_len + 1);
+      if (BE (new_array == NULL, 0))
+       return REG_ESPACE;
+      mctx->state_log = new_array;
+    }
+
+  /* Then reconstruct the buffers.  */
+  if (pstr->icase)
+    {
+#ifdef RE_ENABLE_I18N
+      if (pstr->mb_cur_max > 1)
+       {
+         ret = build_wcs_upper_buffer (pstr);
+         if (BE (ret != REG_NOERROR, 0))
+           return ret;
+       }
+      else
+#endif /* RE_ENABLE_I18N  */
+       build_upper_buffer (pstr);
+    }
+  else
+    {
+#ifdef RE_ENABLE_I18N
+      if (pstr->mb_cur_max > 1)
+       build_wcs_buffer (pstr);
+      else
+#endif /* RE_ENABLE_I18N  */
+       {
+         if (pstr->trans != NULL)
+           re_string_translate_buffer (pstr);
+       }
+    }
+  return REG_NOERROR;
+}
+
+\f
+/* Functions for matching context.  */
+
+/* Initialize MCTX.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
+{
+  mctx->eflags = eflags;
+  mctx->match_last = REG_MISSING;
+  if (n > 0)
+    {
+      /* Avoid overflow.  */
+      size_t max_object_size =
+       MAX (sizeof (struct re_backref_cache_entry),
+            sizeof (re_sub_match_top_t *));
+      if (BE (SIZE_MAX / max_object_size < n, 0))
+       return REG_ESPACE;
+
+      mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n);
+      mctx->sub_tops = re_malloc (re_sub_match_top_t *, n);
+      if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0))
+       return REG_ESPACE;
+    }
+  /* Already zero-ed by the caller.
+     else
+       mctx->bkref_ents = NULL;
+     mctx->nbkref_ents = 0;
+     mctx->nsub_tops = 0;  */
+  mctx->abkref_ents = n;
+  mctx->max_mb_elem_len = 1;
+  mctx->asub_tops = n;
+  return REG_NOERROR;
+}
+
+/* Clean the entries which depend on the current input in MCTX.
+   This function must be invoked when the matcher changes the start index
+   of the input, or changes the input string.  */
+
+static void
+internal_function
+match_ctx_clean (re_match_context_t *mctx)
+{
+  Idx st_idx;
+  for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx)
+    {
+      Idx sl_idx;
+      re_sub_match_top_t *top = mctx->sub_tops[st_idx];
+      for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx)
+       {
+         re_sub_match_last_t *last = top->lasts[sl_idx];
+         re_free (last->path.array);
+         re_free (last);
+       }
+      re_free (top->lasts);
+      if (top->path)
+       {
+         re_free (top->path->array);
+         re_free (top->path);
+       }
+      free (top);
+    }
+
+  mctx->nsub_tops = 0;
+  mctx->nbkref_ents = 0;
+}
+
+/* Free all the memory associated with MCTX.  */
+
+static void
+internal_function
+match_ctx_free (re_match_context_t *mctx)
+{
+  /* First, free all the memory associated with MCTX->SUB_TOPS.  */
+  match_ctx_clean (mctx);
+  re_free (mctx->sub_tops);
+  re_free (mctx->bkref_ents);
+}
+
+/* Add a new backreference entry to MCTX.
+   Note that we assume that caller never call this function with duplicate
+   entry, and call with STR_IDX which isn't smaller than any existing entry.
+*/
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
+                    Idx to)
+{
+  if (mctx->nbkref_ents >= mctx->abkref_ents)
+    {
+      struct re_backref_cache_entry* new_entry;
+      new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry,
+                             mctx->abkref_ents * 2);
+      if (BE (new_entry == NULL, 0))
+       {
+         re_free (mctx->bkref_ents);
+         return REG_ESPACE;
+       }
+      mctx->bkref_ents = new_entry;
+      memset (mctx->bkref_ents + mctx->nbkref_ents, '\0',
+             sizeof (struct re_backref_cache_entry) * mctx->abkref_ents);
+      mctx->abkref_ents *= 2;
+    }
+  if (mctx->nbkref_ents > 0
+      && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx)
+    mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1;
+
+  mctx->bkref_ents[mctx->nbkref_ents].node = node;
+  mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx;
+  mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from;
+  mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to;
+
+  /* This is a cache that saves negative results of check_dst_limits_calc_pos.
+     If bit N is clear, means that this entry won't epsilon-transition to
+     an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression.  If
+     it is set, check_dst_limits_calc_pos_1 will recurse and try to find one
+     such node.
+
+     A backreference does not epsilon-transition unless it is empty, so set
+     to all zeros if FROM != TO.  */
+  mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map
+    = (from == to ? -1 : 0);
+
+  mctx->bkref_ents[mctx->nbkref_ents++].more = 0;
+  if (mctx->max_mb_elem_len < to - from)
+    mctx->max_mb_elem_len = to - from;
+  return REG_NOERROR;
+}
+
+/* Return the first entry with the same str_idx, or REG_MISSING if none is
+   found.  Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX.  */
+
+static Idx
+internal_function
+search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
+{
+  Idx left, right, mid, last;
+  last = right = mctx->nbkref_ents;
+  for (left = 0; left < right;)
+    {
+      mid = (left + right) / 2;
+      if (mctx->bkref_ents[mid].str_idx < str_idx)
+       left = mid + 1;
+      else
+       right = mid;
+    }
+  if (left < last && mctx->bkref_ents[left].str_idx == str_idx)
+    return left;
+  else
+    return REG_MISSING;
+}
+
+/* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches
+   at STR_IDX.  */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx)
+{
+#ifdef DEBUG
+  assert (mctx->sub_tops != NULL);
+  assert (mctx->asub_tops > 0);
+#endif
+  if (BE (mctx->nsub_tops == mctx->asub_tops, 0))
+    {
+      Idx new_asub_tops = mctx->asub_tops * 2;
+      re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops,
+                                                  re_sub_match_top_t *,
+                                                  new_asub_tops);
+      if (BE (new_array == NULL, 0))
+       return REG_ESPACE;
+      mctx->sub_tops = new_array;
+      mctx->asub_tops = new_asub_tops;
+    }
+  mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t));
+  if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0))
+    return REG_ESPACE;
+  mctx->sub_tops[mctx->nsub_tops]->node = node;
+  mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx;
+  return REG_NOERROR;
+}
+
+/* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches
+   at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP.  */
+
+static re_sub_match_last_t *
+internal_function
+match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx)
+{
+  re_sub_match_last_t *new_entry;
+  if (BE (subtop->nlasts == subtop->alasts, 0))
+    {
+      Idx new_alasts = 2 * subtop->alasts + 1;
+      re_sub_match_last_t **new_array = re_realloc (subtop->lasts,
+                                                   re_sub_match_last_t *,
+                                                   new_alasts);
+      if (BE (new_array == NULL, 0))
+       return NULL;
+      subtop->lasts = new_array;
+      subtop->alasts = new_alasts;
+    }
+  new_entry = calloc (1, sizeof (re_sub_match_last_t));
+  if (BE (new_entry != NULL, 1))
+    {
+      subtop->lasts[subtop->nlasts] = new_entry;
+      new_entry->node = node;
+      new_entry->str_idx = str_idx;
+      ++subtop->nlasts;
+    }
+  return new_entry;
+}
+
+static void
+internal_function
+sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
+              re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx)
+{
+  sctx->sifted_states = sifted_sts;
+  sctx->limited_states = limited_sts;
+  sctx->last_node = last_node;
+  sctx->last_str_idx = last_str_idx;
+  re_node_set_init_empty (&sctx->limits);
+}
diff --git a/gnulib/lib/rmdir.c b/gnulib/lib/rmdir.c
new file mode 100644 (file)
index 0000000..d7395a5
--- /dev/null
@@ -0,0 +1,53 @@
+/* Work around rmdir bugs.
+
+   Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-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/>.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <errno.h>
+#include <string.h>
+
+#include "dosname.h"
+
+#undef rmdir
+
+/* Remove directory DIR.
+   Return 0 if successful, -1 if not.  */
+
+int
+rpl_rmdir (char const *dir)
+{
+  /* Work around cygwin 1.5.x bug where rmdir("dir/./") succeeds.  */
+  size_t len = strlen (dir);
+  int result;
+  while (len && ISSLASH (dir[len - 1]))
+    len--;
+  if (len && dir[len - 1] == '.' && (1 == len || ISSLASH (dir[len - 2])))
+    {
+      errno = EINVAL;
+      return -1;
+    }
+  result = rmdir (dir);
+  /* Work around mingw bug, where rmdir("file/") fails with EINVAL
+     instead of ENOTDIR.  We've already filtered out trailing ., the
+     only reason allowed by POSIX for EINVAL.  */
+  if (result == -1 && errno == EINVAL)
+    errno = ENOTDIR;
+  return result;
+}
diff --git a/gnulib/lib/rpmatch.c b/gnulib/lib/rpmatch.c
new file mode 100644 (file)
index 0000000..ecc7917
--- /dev/null
@@ -0,0 +1,173 @@
+/* Determine whether string value is affirmation or negative response
+   according to current locale's data.
+
+   Copyright (C) 1996, 1998, 2000, 2002-2003, 2006-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <stdbool.h>
+#include <stddef.h>
+
+#if ENABLE_NLS
+# include <sys/types.h>
+# include <limits.h>
+# include <string.h>
+# if HAVE_LANGINFO_YESEXPR
+#  include <langinfo.h>
+# endif
+# include <regex.h>
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+# define N_(msgid) gettext_noop (msgid)
+
+# if HAVE_LANGINFO_YESEXPR
+/* Return the localized regular expression pattern corresponding to
+   ENGLISH_PATTERN.  NL_INDEX can be used with nl_langinfo.
+   The resulting string may only be used until the next nl_langinfo call.  */
+static const char *
+localized_pattern (const char *english_pattern, nl_item nl_index,
+                   bool posixly_correct)
+{
+  const char *translated_pattern;
+
+  /* We prefer to get the patterns from a PO file.  It would be possible to
+     always use nl_langinfo (YESEXPR) instead of _("^[yY]"), and
+     nl_langinfo (NOEXPR) instead of _("^[nN]"), if we could assume that the
+     system's locale support is good.  But this is not the case e.g. on Cygwin.
+     The localizations of gnulib.pot are of better quality in general.
+     Also, if we use locale info from non-free systems that don't have a
+     'localedef' command, we deprive the users of the freedom to localize
+     this pattern for their preferred language.
+     But some programs, such as 'cp', 'mv', 'rm', 'find', 'xargs', are
+     specified by POSIX to use nl_langinfo (YESEXPR).  We implement this
+     behaviour if POSIXLY_CORRECT is set, for the sake of these programs.  */
+
+  /* If the user wants strict POSIX compliance, use nl_langinfo.  */
+  if (posixly_correct)
+    {
+      translated_pattern = nl_langinfo (nl_index);
+      /* Check against a broken system return value.  */
+      if (translated_pattern != NULL && translated_pattern[0] != '\0')
+        return translated_pattern;
+   }
+
+  /* Look in the gnulib message catalog.  */
+  translated_pattern = _(english_pattern);
+  if (translated_pattern == english_pattern)
+    {
+      /* The gnulib message catalog provides no translation.
+         Try the system's message catalog.  */
+      translated_pattern = nl_langinfo (nl_index);
+      /* Check against a broken system return value.  */
+      if (translated_pattern != NULL && translated_pattern[0] != '\0')
+        return translated_pattern;
+      /* Fall back to English.  */
+      translated_pattern = english_pattern;
+    }
+  return translated_pattern;
+}
+# else
+#  define localized_pattern(english_pattern,nl_index,posixly_correct) \
+     _(english_pattern)
+# endif
+
+static int
+try (const char *response, const char *pattern, char **lastp, regex_t *re)
+{
+  if (*lastp == NULL || strcmp (pattern, *lastp) != 0)
+    {
+      char *safe_pattern;
+
+      /* The pattern has changed.  */
+      if (*lastp != NULL)
+        {
+          /* Free the old compiled pattern.  */
+          regfree (re);
+          free (*lastp);
+          *lastp = NULL;
+        }
+      /* Put the PATTERN into safe memory before calling regcomp.
+         (regcomp may call nl_langinfo, overwriting PATTERN's storage.  */
+      safe_pattern = strdup (pattern);
+      if (safe_pattern == NULL)
+        return -1;
+      /* Compile the pattern and cache it for future runs.  */
+      if (regcomp (re, safe_pattern, REG_EXTENDED) != 0)
+        return -1;
+      *lastp = safe_pattern;
+    }
+
+  /* See if the regular expression matches RESPONSE.  */
+  return regexec (re, response, 0, NULL, 0) == 0;
+}
+#endif
+
+
+int
+rpmatch (const char *response)
+{
+#if ENABLE_NLS
+  /* Match against one of the response patterns, compiling the pattern
+     first if necessary.  */
+
+  /* We cache the response patterns and compiled regexps here.  */
+  static char *last_yesexpr, *last_noexpr;
+  static regex_t cached_yesre, cached_nore;
+
+# if HAVE_LANGINFO_YESEXPR
+  bool posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL);
+# endif
+
+  const char *yesexpr, *noexpr;
+  int result;
+
+  /* TRANSLATORS: A regular expression testing for an affirmative answer
+     (english: "yes").  Testing the first character may be sufficient.
+     Take care to consider upper and lower case.
+     To enquire the regular expression that your system uses for this
+     purpose, you can use the command
+       locale -k LC_MESSAGES | grep '^yesexpr='  */
+  yesexpr = localized_pattern (N_("^[yY]"), YESEXPR, posixly_correct);
+  result = try (response, yesexpr, &last_yesexpr, &cached_yesre);
+  if (result < 0)
+    return -1;
+  if (result)
+    return 1;
+
+  /* TRANSLATORS: A regular expression testing for a negative answer
+     (english: "no").  Testing the first character may be sufficient.
+     Take care to consider upper and lower case.
+     To enquire the regular expression that your system uses for this
+     purpose, you can use the command
+       locale -k LC_MESSAGES | grep '^noexpr='  */
+  noexpr = localized_pattern (N_("^[nN]"), NOEXPR, posixly_correct);
+  result = try (response, noexpr, &last_noexpr, &cached_nore);
+  if (result < 0)
+    return -1;
+  if (result)
+    return 0;
+
+  return -1;
+#else
+  /* Test against "^[yY]" and "^[nN]", hardcoded to avoid requiring regex */
+  return (*response == 'y' || *response == 'Y' ? 1
+          : *response == 'n' || *response == 'N' ? 0 : -1);
+#endif
+}
diff --git a/gnulib/lib/same-inode.h b/gnulib/lib/same-inode.h
new file mode 100644 (file)
index 0000000..d434b94
--- /dev/null
@@ -0,0 +1,25 @@
+/* Determine whether two stat buffers refer to the same file.
+
+   Copyright (C) 2006, 2009-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 SAME_INODE_H
+# define SAME_INODE_H 1
+
+# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
+   ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
+    && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
+
+#endif
diff --git a/gnulib/lib/same.c b/gnulib/lib/same.c
new file mode 100644 (file)
index 0000000..3debcbf
--- /dev/null
@@ -0,0 +1,123 @@
+/* Determine whether two file names refer to the same file.
+
+   Copyright (C) 1997-2000, 2002-2006, 2009-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 Jim Meyering */
+
+#include <config.h>
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include <string.h>
+
+#include <limits.h>
+#ifndef _POSIX_NAME_MAX
+# define _POSIX_NAME_MAX 14
+#endif
+
+#include "same.h"
+#include "dirname.h"
+#include "error.h"
+#include "same-inode.h"
+
+#ifndef MIN
+# define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+/* Return nonzero if SOURCE and DEST point to the same name in the same
+   directory.  */
+
+bool
+same_name (const char *source, const char *dest)
+{
+  /* Compare the basenames.  */
+  char const *source_basename = last_component (source);
+  char const *dest_basename = last_component (dest);
+  size_t source_baselen = base_len (source_basename);
+  size_t dest_baselen = base_len (dest_basename);
+  bool identical_basenames =
+    (source_baselen == dest_baselen
+     && memcmp (source_basename, dest_basename, dest_baselen) == 0);
+  bool compare_dirs = identical_basenames;
+  bool same = false;
+
+#if ! _POSIX_NO_TRUNC && HAVE_PATHCONF && defined _PC_NAME_MAX
+  /* This implementation silently truncates components of file names.  If
+     the base names might be truncated, check whether the truncated
+     base names are the same, while checking the directories.  */
+  size_t slen_max = HAVE_LONG_FILE_NAMES ? 255 : _POSIX_NAME_MAX;
+  size_t min_baselen = MIN (source_baselen, dest_baselen);
+  if (slen_max <= min_baselen
+      && memcmp (source_basename, dest_basename, slen_max) == 0)
+    compare_dirs = true;
+#endif
+
+  if (compare_dirs)
+    {
+      struct stat source_dir_stats;
+      struct stat dest_dir_stats;
+      char *source_dirname, *dest_dirname;
+
+      /* Compare the parent directories (via the device and inode numbers).  */
+      source_dirname = dir_name (source);
+      dest_dirname = dir_name (dest);
+
+      if (stat (source_dirname, &source_dir_stats))
+        {
+          /* Shouldn't happen.  */
+          error (1, errno, "%s", source_dirname);
+        }
+
+      if (stat (dest_dirname, &dest_dir_stats))
+        {
+          /* Shouldn't happen.  */
+          error (1, errno, "%s", dest_dirname);
+        }
+
+      same = SAME_INODE (source_dir_stats, dest_dir_stats);
+
+#if ! _POSIX_NO_TRUNC && HAVE_PATHCONF && defined _PC_NAME_MAX
+      if (same && ! identical_basenames)
+        {
+          long name_max = (errno = 0, pathconf (dest_dirname, _PC_NAME_MAX));
+          if (name_max < 0)
+            {
+              if (errno)
+                {
+                  /* Shouldn't happen.  */
+                  error (1, errno, "%s", dest_dirname);
+                }
+              same = false;
+            }
+          else
+            same = (name_max <= min_baselen
+                    && memcmp (source_basename, dest_basename, name_max) == 0);
+        }
+#endif
+
+      free (source_dirname);
+      free (dest_dirname);
+    }
+
+  return same;
+}
diff --git a/gnulib/lib/same.h b/gnulib/lib/same.h
new file mode 100644 (file)
index 0000000..6206cba
--- /dev/null
@@ -0,0 +1,25 @@
+/* Determine whether two file names refer to the same file.
+
+   Copyright (C) 1997-2000, 2003-2004, 2009-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 SAME_H_
+# define SAME_H_ 1
+
+# include <stdbool.h>
+
+bool same_name (const char *source, const char *dest);
+
+#endif /* SAME_H_ */
diff --git a/gnulib/lib/save-cwd.c b/gnulib/lib/save-cwd.c
new file mode 100644 (file)
index 0000000..16ffa2c
--- /dev/null
@@ -0,0 +1,98 @@
+/* save-cwd.c -- Save and restore current working directory.
+
+   Copyright (C) 1995, 1997-1998, 2003-2006, 2009-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 Jim Meyering.  */
+
+#include <config.h>
+
+#include "save-cwd.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "chdir-long.h"
+#include "unistd--.h"
+#include "cloexec.h"
+
+#if GNULIB_FCNTL_SAFER
+# include "fcntl--.h"
+#else
+# define GNULIB_FCNTL_SAFER 0
+#endif
+
+/* Record the location of the current working directory in CWD so that
+   the program may change to other directories and later use restore_cwd
+   to return to the recorded location.  This function may allocate
+   space using malloc (via getcwd) or leave a file descriptor open;
+   use free_cwd to perform the necessary free or close.  Upon failure,
+   no memory is allocated, any locally opened file descriptors are
+   closed;  return non-zero -- in that case, free_cwd need not be
+   called, but doing so is ok.  Otherwise, return zero.
+
+   The `raison d'etre' for this interface is that the working directory
+   is sometimes inaccessible, and getcwd is not robust or as efficient.
+   So, we prefer to use the open/fchdir approach, but fall back on
+   getcwd if necessary.
+
+   Some systems lack fchdir altogether: e.g., OS/2, pre-2001 Cygwin,
+   SCO Xenix.  Also, SunOS 4 and Irix 5.3 provide the function, yet it
+   doesn't work for partitions on which auditing is enabled.  If
+   you're still using an obsolete system with these problems, please
+   send email to the maintainer of this code.  */
+
+int
+save_cwd (struct saved_cwd *cwd)
+{
+  cwd->name = NULL;
+
+  cwd->desc = open (".", O_SEARCH);
+  if (!GNULIB_FCNTL_SAFER)
+    cwd->desc = fd_safer (cwd->desc);
+  if (cwd->desc < 0)
+    {
+      cwd->name = getcwd (NULL, 0);
+      return cwd->name ? 0 : -1;
+    }
+
+  set_cloexec_flag (cwd->desc, true);
+  return 0;
+}
+
+/* Change to recorded location, CWD, in directory hierarchy.
+   Upon failure, return -1 (errno is set by chdir or fchdir).
+   Upon success, return zero.  */
+
+int
+restore_cwd (const struct saved_cwd *cwd)
+{
+  if (0 <= cwd->desc)
+    return fchdir (cwd->desc);
+  else
+    return chdir_long (cwd->name);
+}
+
+void
+free_cwd (struct saved_cwd *cwd)
+{
+  if (cwd->desc >= 0)
+    close (cwd->desc);
+  free (cwd->name);
+}
diff --git a/gnulib/lib/save-cwd.h b/gnulib/lib/save-cwd.h
new file mode 100644 (file)
index 0000000..983f890
--- /dev/null
@@ -0,0 +1,34 @@
+/* Save and restore current working directory.
+
+   Copyright (C) 1995, 1997-1998, 2003, 2009-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 Jim Meyering.  */
+
+#ifndef SAVE_CWD_H
+# define SAVE_CWD_H 1
+
+struct saved_cwd
+  {
+    int desc;
+    char *name;
+  };
+
+int save_cwd (struct saved_cwd *cwd);
+int restore_cwd (const struct saved_cwd *cwd);
+void free_cwd (struct saved_cwd *cwd);
+
+#endif /* SAVE_CWD_H */
diff --git a/gnulib/lib/savedir.c b/gnulib/lib/savedir.c
new file mode 100644 (file)
index 0000000..3e8762a
--- /dev/null
@@ -0,0 +1,145 @@
+/* savedir.c -- save the list of files in a directory in a string
+
+   Copyright (C) 1990, 1997-2001, 2003-2006, 2009-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 David MacKenzie <djm@gnu.ai.mit.edu>. */
+
+#include <config.h>
+
+#include "savedir.h"
+
+#include <sys/types.h>
+
+#include <errno.h>
+
+#include "dirent--.h"
+#ifndef _D_EXACT_NAMLEN
+# define _D_EXACT_NAMLEN(dp)    strlen ((dp)->d_name)
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "xalloc.h"
+
+#ifndef NAME_SIZE_DEFAULT
+# define NAME_SIZE_DEFAULT 512
+#endif
+
+/* Return a freshly allocated string containing the file names
+   in directory DIRP, separated by '\0' characters;
+   the end is marked by two '\0' characters in a row.
+   Return NULL (setting errno) if DIRP cannot be read.
+   If DIRP is NULL, return NULL without affecting errno.  */
+
+char *
+streamsavedir (DIR *dirp)
+{
+  char *name_space;
+  size_t allocated = NAME_SIZE_DEFAULT;
+  size_t used = 0;
+  int save_errno;
+
+  if (dirp == NULL)
+    return NULL;
+
+  name_space = xmalloc (allocated);
+
+  for (;;)
+    {
+      struct dirent const *dp;
+      char const *entry;
+
+      errno = 0;
+      dp = readdir (dirp);
+      if (! dp)
+        break;
+
+      /* Skip "", ".", and "..".  "" is returned by at least one buggy
+         implementation: Solaris 2.4 readdir on NFS file systems.  */
+      entry = dp->d_name;
+      if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0')
+        {
+          size_t entry_size = _D_EXACT_NAMLEN (dp) + 1;
+          if (used + entry_size < used)
+            xalloc_die ();
+          if (allocated <= used + entry_size)
+            {
+              do
+                {
+                  if (2 * allocated < allocated)
+                    xalloc_die ();
+                  allocated *= 2;
+                }
+              while (allocated <= used + entry_size);
+
+              name_space = xrealloc (name_space, allocated);
+            }
+          memcpy (name_space + used, entry, entry_size);
+          used += entry_size;
+        }
+    }
+  name_space[used] = '\0';
+  save_errno = errno;
+  if (save_errno != 0)
+    {
+      free (name_space);
+      errno = save_errno;
+      return NULL;
+    }
+  return name_space;
+}
+
+/* Like savedirstreamp (DIRP), except also close DIRP.  */
+
+static char *
+savedirstream (DIR *dirp)
+{
+  char *name_space = streamsavedir (dirp);
+  if (dirp && closedir (dirp) != 0)
+    {
+      int save_errno = errno;
+      free (name_space);
+      errno = save_errno;
+      return NULL;
+    }
+  return name_space;
+}
+
+/* Return a freshly allocated string containing the file names
+   in directory DIR, separated by '\0' characters;
+   the end is marked by two '\0' characters in a row.
+   Return NULL (setting errno) if DIR cannot be opened, read, or closed.  */
+
+char *
+savedir (char const *dir)
+{
+  return savedirstream (opendir (dir));
+}
+
+/* Return a freshly allocated string containing the file names
+   in directory FD, separated by '\0' characters;
+   the end is marked by two '\0' characters in a row.
+   Return NULL (setting errno) if FD cannot be read or closed.  */
+
+/* deprecated */
+char *
+fdsavedir (int fd)
+{
+  return savedirstream (fdopendir (fd));
+}
diff --git a/gnulib/lib/savedir.h b/gnulib/lib/savedir.h
new file mode 100644 (file)
index 0000000..d935b16
--- /dev/null
@@ -0,0 +1,29 @@
+/* Save the list of files in a directory in a string.
+
+   Copyright (C) 1997, 1999, 2001, 2003, 2005, 2009-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 David MacKenzie <djm@gnu.ai.mit.edu>. */
+
+#ifndef _GL_SAVEDIR_H
+#define _GL_SAVEDIR_H
+
+#include <dirent.h>
+char *streamsavedir (DIR *dirp);
+char *savedir (char const *dir);
+char *fdsavedir (int fd); /* deprecated */
+
+#endif
diff --git a/gnulib/lib/se-context.in.h b/gnulib/lib/se-context.in.h
new file mode 100644 (file)
index 0000000..cb7419a
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef SELINUX_CONTEXT_H
+# define SELINUX_CONTEXT_H
+
+# include <errno.h>
+
+/* The definition of _GL_UNUSED_PARAMETER is copied here.  */
+
+typedef int context_t;
+static inline context_t context_new (char const *s _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return 0; }
+static inline char *context_str (context_t con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return (void *) 0; }
+static inline void context_free (context_t c _GL_UNUSED_PARAMETER) {}
+
+static inline int context_user_set (context_t sc _GL_UNUSED_PARAMETER,
+                                    char const *s _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int context_role_set (context_t sc _GL_UNUSED_PARAMETER,
+                                    char const *s _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int context_range_set (context_t sc _GL_UNUSED_PARAMETER,
+                                     char const *s _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int context_type_set (context_t sc _GL_UNUSED_PARAMETER,
+                                    char const *s _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+
+#endif
diff --git a/gnulib/lib/se-selinux.in.h b/gnulib/lib/se-selinux.in.h
new file mode 100644 (file)
index 0000000..39f5881
--- /dev/null
@@ -0,0 +1,97 @@
+/* Replacement <selinux/selinux.h> for platforms that lack it.
+   Copyright (C) 2008-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 _GL_SELINUX_SELINUX_H
+# define _GL_SELINUX_SELINUX_H
+
+# if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+# endif
+@PRAGMA_COLUMNS@
+
+# if HAVE_SELINUX_SELINUX_H
+
+#@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@
+
+# else
+
+#  include <sys/types.h>
+#  include <errno.h>
+
+/* The definition of _GL_UNUSED_PARAMETER is copied here.  */
+
+#  if !GNULIB_defined_security_types
+
+typedef unsigned short security_class_t;
+#   define security_context_t char*
+#   define is_selinux_enabled() 0
+
+static inline int getcon (security_context_t *con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline void freecon (security_context_t con _GL_UNUSED_PARAMETER) {}
+
+
+static inline int getfscreatecon (security_context_t *con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int setfscreatecon (security_context_t con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int matchpathcon (char const *file _GL_UNUSED_PARAMETER,
+                                mode_t m _GL_UNUSED_PARAMETER,
+                                security_context_t *con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int getfilecon (char const *file _GL_UNUSED_PARAMETER,
+                              security_context_t *con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int lgetfilecon (char const *file _GL_UNUSED_PARAMETER,
+                               security_context_t *con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int fgetfilecon (int fd,
+                               security_context_t *con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int setfilecon (char const *file _GL_UNUSED_PARAMETER,
+                              security_context_t con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int lsetfilecon (char const *file _GL_UNUSED_PARAMETER,
+                               security_context_t con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int fsetfilecon (int fd _GL_UNUSED_PARAMETER,
+                               security_context_t con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+
+static inline int security_check_context
+    (security_context_t con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int security_check_context_raw
+    (security_context_t con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int setexeccon (security_context_t con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int security_compute_create
+    (security_context_t scon _GL_UNUSED_PARAMETER,
+     security_context_t tcon _GL_UNUSED_PARAMETER,
+     security_class_t tclass _GL_UNUSED_PARAMETER,
+     security_context_t *newcon _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+static inline int matchpathcon_init_prefix
+    (char const *path _GL_UNUSED_PARAMETER,
+     char const *prefix _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+
+#   define GNULIB_defined_security_types 1
+#  endif
+
+# endif
+#endif /* _GL_SELINUX_SELINUX_H */
diff --git a/gnulib/lib/selinux-at.c b/gnulib/lib/selinux-at.c
new file mode 100644 (file)
index 0000000..0aa918f
--- /dev/null
@@ -0,0 +1,72 @@
+/* openat-style fd-relative functions for SE Linux
+   Copyright (C) 2007, 2009-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 Jim Meyering */
+
+#include <config.h>
+
+#include "selinux-at.h"
+#include "openat.h"
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
+#include "save-cwd.h"
+
+#include "openat-priv.h"
+
+#define AT_FUNC_NAME getfileconat
+#define AT_FUNC_F1 getfilecon
+#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t *con
+#define AT_FUNC_POST_FILE_ARGS        , con
+#include "at-func.c"
+#undef AT_FUNC_NAME
+#undef AT_FUNC_F1
+#undef AT_FUNC_POST_FILE_PARAM_DECLS
+#undef AT_FUNC_POST_FILE_ARGS
+
+#define AT_FUNC_NAME lgetfileconat
+#define AT_FUNC_F1 lgetfilecon
+#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t *con
+#define AT_FUNC_POST_FILE_ARGS        , con
+#include "at-func.c"
+#undef AT_FUNC_NAME
+#undef AT_FUNC_F1
+#undef AT_FUNC_POST_FILE_PARAM_DECLS
+#undef AT_FUNC_POST_FILE_ARGS
+
+#define AT_FUNC_NAME setfileconat
+#define AT_FUNC_F1 setfilecon
+#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t con
+#define AT_FUNC_POST_FILE_ARGS        , con
+#include "at-func.c"
+#undef AT_FUNC_NAME
+#undef AT_FUNC_F1
+#undef AT_FUNC_POST_FILE_PARAM_DECLS
+#undef AT_FUNC_POST_FILE_ARGS
+
+#define AT_FUNC_NAME lsetfileconat
+#define AT_FUNC_F1 lsetfilecon
+#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t con
+#define AT_FUNC_POST_FILE_ARGS        , con
+#include "at-func.c"
+#undef AT_FUNC_NAME
+#undef AT_FUNC_F1
+#undef AT_FUNC_POST_FILE_PARAM_DECLS
+#undef AT_FUNC_POST_FILE_ARGS
diff --git a/gnulib/lib/selinux-at.h b/gnulib/lib/selinux-at.h
new file mode 100644 (file)
index 0000000..5fa3333
--- /dev/null
@@ -0,0 +1,52 @@
+/* Prototypes for openat-style fd-relative SELinux functions
+   Copyright (C) 2007, 2009-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/>.  */
+
+#include <selinux/selinux.h>
+#include <selinux/context.h>
+
+/* These are the dir-fd-relative variants of the functions without the
+   "at" suffix.  For example, getfileconat (AT_FDCWD, file, &c) is usually
+   equivalent to getfilecon (file, &c).  The emulation is accomplished
+   by first attempting getfilecon ("/proc/self/fd/DIR_FD/FILE", &c).
+   Failing that, simulate it via save_cwd/fchdir/getfilecon/restore_cwd.
+   If either the save_cwd or the restore_cwd fails (relatively unlikely),
+   then give a diagnostic and exit nonzero.  */
+
+/* dir-fd-relative getfilecon.  Set *CON to the SELinux security context
+   of the file specified by DIR_FD and FILE and return the length of *CON.
+   DIR_FD and FILE are interpreted as for fstatat[*].  A non-NULL *CON
+   must be freed with freecon.  Upon error, set *CON to NULL, set errno
+   and return -1.
+   [*] with flags=0 here, with flags=AT_SYMLINK_NOFOLLOW for lgetfileconat  */
+int  getfileconat (int dir_fd, char const *file, security_context_t *con);
+
+/* dir-fd-relative lgetfilecon.  This function is just like getfileconat,
+   except when DIR_FD and FILE specify a symlink:  lgetfileconat operates on
+   the symlink, while getfileconat operates on the referent of the symlink.  */
+int lgetfileconat (int dir_fd, char const *file, security_context_t *con);
+
+/* dir-fd-relative setfilecon.  Set the SELinux security context of
+   the file specified by DIR_FD and FILE to CON.  DIR_FD and FILE are
+   interpreted as for fstatat[*].  Upon success, return 0.
+   Otherwise, return -1 and set errno.  */
+int  setfileconat (int dir_fd, char const *file, security_context_t con);
+
+/* dir-fd-relative lsetfilecon.  This function is just like setfileconat,
+   except that rather than dereferencing a symlink, this function affects it. */
+/* dir-fd-relative lsetfilecon.  This function is just like setfileconat,
+   except when DIR_FD and FILE specify a symlink:  lsetfileconat operates on
+   the symlink, while setfileconat operates on the referent of the symlink.  */
+int lsetfileconat (int dir_fd, char const *file, security_context_t con);
diff --git a/gnulib/lib/setenv.c b/gnulib/lib/setenv.c
new file mode 100644 (file)
index 0000000..7c06192
--- /dev/null
@@ -0,0 +1,390 @@
+/* Copyright (C) 1992, 1995-2003, 2005-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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 !_LIBC
+# include <config.h>
+#endif
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit.  Otherwise gcc
+   optimizes away the name == NULL test below.  */
+#define _GL_ARG_NONNULL(params)
+
+#include <alloca.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(ev) ((errno) = (ev))
+#endif
+
+#include <string.h>
+#if _LIBC || HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if !_LIBC
+# include "malloca.h"
+#endif
+
+#if _LIBC || !HAVE_SETENV
+
+#if !_LIBC
+# define __environ      environ
+#endif
+
+#if _LIBC
+/* This lock protects against simultaneous modifications of `environ'.  */
+# include <bits/libc-lock.h>
+__libc_lock_define_initialized (static, envlock)
+# define LOCK   __libc_lock_lock (envlock)
+# define UNLOCK __libc_lock_unlock (envlock)
+#else
+# define LOCK
+# define UNLOCK
+#endif
+
+/* In the GNU C library we must keep the namespace clean.  */
+#ifdef _LIBC
+# define setenv __setenv
+# define clearenv __clearenv
+# define tfind __tfind
+# define tsearch __tsearch
+#else
+/* Use the system functions, not the gnulib overrides in this file.  */
+# undef malloc
+# undef realloc
+#endif
+
+/* In the GNU C library implementation we try to be more clever and
+   allow arbitrarily many changes of the environment given that the used
+   values are from a small set.  Outside glibc this will eat up all
+   memory after a while.  */
+#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \
+                      && defined __GNUC__)
+# define USE_TSEARCH    1
+# include <search.h>
+typedef int (*compar_fn_t) (const void *, const void *);
+
+/* This is a pointer to the root of the search tree with the known
+   values.  */
+static void *known_values;
+
+# define KNOWN_VALUE(Str) \
+  ({                                                                          \
+    void *value = tfind (Str, &known_values, (compar_fn_t) strcmp);           \
+    value != NULL ? *(char **) value : NULL;                                  \
+  })
+# define STORE_VALUE(Str) \
+  tsearch (Str, &known_values, (compar_fn_t) strcmp)
+
+#else
+# undef USE_TSEARCH
+
+# define KNOWN_VALUE(Str) NULL
+# define STORE_VALUE(Str) do { } while (0)
+
+#endif
+
+
+/* If this variable is not a null pointer we allocated the current
+   environment.  */
+static char **last_environ;
+
+
+/* This function is used by `setenv' and `putenv'.  The difference between
+   the two functions is that for the former must create a new string which
+   is then placed in the environment, while the argument of `putenv'
+   must be used directly.  This is all complicated by the fact that we try
+   to reuse values once generated for a `setenv' call since we can never
+   free the strings.  */
+int
+__add_to_environ (const char *name, const char *value, const char *combined,
+                  int replace)
+{
+  char **ep;
+  size_t size;
+  const size_t namelen = strlen (name);
+  const size_t vallen = value != NULL ? strlen (value) + 1 : 0;
+
+  LOCK;
+
+  /* We have to get the pointer now that we have the lock and not earlier
+     since another thread might have created a new environment.  */
+  ep = __environ;
+
+  size = 0;
+  if (ep != NULL)
+    {
+      for (; *ep != NULL; ++ep)
+        if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
+          break;
+        else
+          ++size;
+    }
+
+  if (ep == NULL || *ep == NULL)
+    {
+      char **new_environ;
+#ifdef USE_TSEARCH
+      char *new_value;
+#endif
+
+      /* We allocated this space; we can extend it.  */
+      new_environ =
+        (char **) (last_environ == NULL
+                   ? malloc ((size + 2) * sizeof (char *))
+                   : realloc (last_environ, (size + 2) * sizeof (char *)));
+      if (new_environ == NULL)
+        {
+          /* It's easier to set errno to ENOMEM than to rely on the
+             'malloc-posix' and 'realloc-posix' gnulib modules.  */
+          __set_errno (ENOMEM);
+          UNLOCK;
+          return -1;
+        }
+
+      /* If the whole entry is given add it.  */
+      if (combined != NULL)
+        /* We must not add the string to the search tree since it belongs
+           to the user.  */
+        new_environ[size] = (char *) combined;
+      else
+        {
+          /* See whether the value is already known.  */
+#ifdef USE_TSEARCH
+# ifdef _LIBC
+          new_value = (char *) alloca (namelen + 1 + vallen);
+          __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1),
+                     value, vallen);
+# else
+          new_value = (char *) malloca (namelen + 1 + vallen);
+          if (new_value == NULL)
+            {
+              __set_errno (ENOMEM);
+              UNLOCK;
+              return -1;
+            }
+          memcpy (new_value, name, namelen);
+          new_value[namelen] = '=';
+          memcpy (&new_value[namelen + 1], value, vallen);
+# endif
+
+          new_environ[size] = KNOWN_VALUE (new_value);
+          if (new_environ[size] == NULL)
+#endif
+            {
+              new_environ[size] = (char *) malloc (namelen + 1 + vallen);
+              if (new_environ[size] == NULL)
+                {
+#if defined USE_TSEARCH && !defined _LIBC
+                  freea (new_value);
+#endif
+                  __set_errno (ENOMEM);
+                  UNLOCK;
+                  return -1;
+                }
+
+#ifdef USE_TSEARCH
+              memcpy (new_environ[size], new_value, namelen + 1 + vallen);
+#else
+              memcpy (new_environ[size], name, namelen);
+              new_environ[size][namelen] = '=';
+              memcpy (&new_environ[size][namelen + 1], value, vallen);
+#endif
+              /* And save the value now.  We cannot do this when we remove
+                 the string since then we cannot decide whether it is a
+                 user string or not.  */
+              STORE_VALUE (new_environ[size]);
+            }
+#if defined USE_TSEARCH && !defined _LIBC
+          freea (new_value);
+#endif
+        }
+
+      if (__environ != last_environ)
+        memcpy ((char *) new_environ, (char *) __environ,
+                size * sizeof (char *));
+
+      new_environ[size + 1] = NULL;
+
+      last_environ = __environ = new_environ;
+    }
+  else if (replace)
+    {
+      char *np;
+
+      /* Use the user string if given.  */
+      if (combined != NULL)
+        np = (char *) combined;
+      else
+        {
+#ifdef USE_TSEARCH
+          char *new_value;
+# ifdef _LIBC
+          new_value = alloca (namelen + 1 + vallen);
+          __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1),
+                     value, vallen);
+# else
+          new_value = malloca (namelen + 1 + vallen);
+          if (new_value == NULL)
+            {
+              __set_errno (ENOMEM);
+              UNLOCK;
+              return -1;
+            }
+          memcpy (new_value, name, namelen);
+          new_value[namelen] = '=';
+          memcpy (&new_value[namelen + 1], value, vallen);
+# endif
+
+          np = KNOWN_VALUE (new_value);
+          if (np == NULL)
+#endif
+            {
+              np = (char *) malloc (namelen + 1 + vallen);
+              if (np == NULL)
+                {
+#if defined USE_TSEARCH && !defined _LIBC
+                  freea (new_value);
+#endif
+                  __set_errno (ENOMEM);
+                  UNLOCK;
+                  return -1;
+                }
+
+#ifdef USE_TSEARCH
+              memcpy (np, new_value, namelen + 1 + vallen);
+#else
+              memcpy (np, name, namelen);
+              np[namelen] = '=';
+              memcpy (&np[namelen + 1], value, vallen);
+#endif
+              /* And remember the value.  */
+              STORE_VALUE (np);
+            }
+#if defined USE_TSEARCH && !defined _LIBC
+          freea (new_value);
+#endif
+        }
+
+      *ep = np;
+    }
+
+  UNLOCK;
+
+  return 0;
+}
+
+int
+setenv (const char *name, const char *value, int replace)
+{
+  if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __add_to_environ (name, value, NULL, replace);
+}
+
+/* The `clearenv' was planned to be added to POSIX.1 but probably
+   never made it.  Nevertheless the POSIX.9 standard (POSIX bindings
+   for Fortran 77) requires this function.  */
+int
+clearenv (void)
+{
+  LOCK;
+
+  if (__environ == last_environ && __environ != NULL)
+    {
+      /* We allocated this environment so we can free it.  */
+      free (__environ);
+      last_environ = NULL;
+    }
+
+  /* Clear the environment pointer removes the whole environment.  */
+  __environ = NULL;
+
+  UNLOCK;
+
+  return 0;
+}
+
+#ifdef _LIBC
+static void
+free_mem (void)
+{
+  /* Remove all traces.  */
+  clearenv ();
+
+  /* Now remove the search tree.  */
+  __tdestroy (known_values, free);
+  known_values = NULL;
+}
+text_set_element (__libc_subfreeres, free_mem);
+
+
+# undef setenv
+# undef clearenv
+weak_alias (__setenv, setenv)
+weak_alias (__clearenv, clearenv)
+#endif
+
+#endif /* _LIBC || !HAVE_SETENV */
+
+/* The rest of this file is called into use when replacing an existing
+   but buggy setenv.  Known bugs include failure to diagnose invalid
+   name, and consuming a leading '=' from value.  */
+#if HAVE_SETENV
+
+# undef setenv
+# define STREQ(a, b) (strcmp (a, b) == 0)
+
+int
+rpl_setenv (const char *name, const char *value, int replace)
+{
+  int result;
+  if (!name || !*name || strchr (name, '='))
+    {
+      errno = EINVAL;
+      return -1;
+    }
+  /* Call the real setenv even if replace is 0, in case implementation
+     has underlying data to update, such as when environ changes.  */
+  result = setenv (name, value, replace);
+  if (result == 0 && replace && *value == '=')
+    {
+      char *tmp = getenv (name);
+      if (!STREQ (tmp, value))
+        {
+          int saved_errno;
+          size_t len = strlen (value);
+          tmp = malloca (len + 2);
+          /* Since leading '=' is eaten, double it up.  */
+          *tmp = '=';
+          memcpy (tmp + 1, value, len + 1);
+          result = setenv (name, tmp, replace);
+          saved_errno = errno;
+          freea (tmp);
+          errno = saved_errno;
+        }
+    }
+  return result;
+}
+
+#endif /* HAVE_SETENV */
diff --git a/gnulib/lib/size_max.h b/gnulib/lib/size_max.h
new file mode 100644 (file)
index 0000000..d5f3152
--- /dev/null
@@ -0,0 +1,31 @@
+/* size_max.h -- declare SIZE_MAX through system headers
+   Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+   Written by Simon Josefsson.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef GNULIB_SIZE_MAX_H
+#define GNULIB_SIZE_MAX_H
+
+/* Get SIZE_MAX declaration on systems like Solaris 7/8/9.  */
+# include <limits.h>
+/* Get SIZE_MAX declaration on systems like glibc 2.  */
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+/* On systems where these include files don't define it, SIZE_MAX is defined
+   in config.h.  */
+
+#endif /* GNULIB_SIZE_MAX_H */
diff --git a/gnulib/lib/snprintf.c b/gnulib/lib/snprintf.c
new file mode 100644 (file)
index 0000000..9db2379
--- /dev/null
@@ -0,0 +1,72 @@
+/* Formatted output to strings.
+   Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc.
+   Written by Simon Josefsson and Paul Eggert.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdio.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "vasnprintf.h"
+
+/* Print formatted output to string STR.  Similar to sprintf, but
+   additional length SIZE limit how much is written into STR.  Returns
+   string length of formatted string (which may be larger than SIZE).
+   STR may be NULL, in which case nothing will be written.  On error,
+   return a negative value.  */
+int
+snprintf (char *str, size_t size, const char *format, ...)
+{
+  char *output;
+  size_t len;
+  size_t lenbuf = size;
+  va_list args;
+
+  va_start (args, format);
+  output = vasnprintf (str, &lenbuf, format, args);
+  len = lenbuf;
+  va_end (args);
+
+  if (!output)
+    return -1;
+
+  if (output != str)
+    {
+      if (size)
+        {
+          size_t pruned_len = (len < size ? len : size - 1);
+          memcpy (str, output, pruned_len);
+          str[pruned_len] = '\0';
+        }
+
+      free (output);
+    }
+
+  if (INT_MAX < len)
+    {
+      errno = EOVERFLOW;
+      return -1;
+    }
+
+  return len;
+}
diff --git a/gnulib/lib/stat-macros.h b/gnulib/lib/stat-macros.h
new file mode 100644 (file)
index 0000000..690216c
--- /dev/null
@@ -0,0 +1,3 @@
+/* All the mode bits that can be affected by chmod.  */
+#define CHMOD_MODE_BITS \
+  (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
diff --git a/gnulib/lib/stat-time.h b/gnulib/lib/stat-time.h
new file mode 100644 (file)
index 0000000..8a11978
--- /dev/null
@@ -0,0 +1,187 @@
+/* stat-related time functions.
+
+   Copyright (C) 2005, 2007, 2009-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 Paul Eggert.  */
+
+#ifndef STAT_TIME_H
+#define STAT_TIME_H 1
+
+#include <sys/stat.h>
+#include <time.h>
+
+/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type
+   struct timespec, if available.  If not, then STAT_TIMESPEC_NS (ST,
+   ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST,
+   if available.  ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim
+   for access, status change, data modification, or birth (creation)
+   time respectively.
+
+   These macros are private to stat-time.h.  */
+#if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
+# ifdef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
+#  define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim)
+# else
+#  define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec)
+# endif
+#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
+# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec)
+#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC
+# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec)
+#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
+# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec)
+#endif
+
+/* Return the nanosecond component of *ST's access time.  */
+static inline long int
+get_stat_atime_ns (struct stat const *st)
+{
+# if defined STAT_TIMESPEC
+  return STAT_TIMESPEC (st, st_atim).tv_nsec;
+# elif defined STAT_TIMESPEC_NS
+  return STAT_TIMESPEC_NS (st, st_atim);
+# else
+  return 0;
+# endif
+}
+
+/* Return the nanosecond component of *ST's status change time.  */
+static inline long int
+get_stat_ctime_ns (struct stat const *st)
+{
+# if defined STAT_TIMESPEC
+  return STAT_TIMESPEC (st, st_ctim).tv_nsec;
+# elif defined STAT_TIMESPEC_NS
+  return STAT_TIMESPEC_NS (st, st_ctim);
+# else
+  return 0;
+# endif
+}
+
+/* Return the nanosecond component of *ST's data modification time.  */
+static inline long int
+get_stat_mtime_ns (struct stat const *st)
+{
+# if defined STAT_TIMESPEC
+  return STAT_TIMESPEC (st, st_mtim).tv_nsec;
+# elif defined STAT_TIMESPEC_NS
+  return STAT_TIMESPEC_NS (st, st_mtim);
+# else
+  return 0;
+# endif
+}
+
+/* Return the nanosecond component of *ST's birth time.  */
+static inline long int
+get_stat_birthtime_ns (struct stat const *st)
+{
+# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
+  return STAT_TIMESPEC (st, st_birthtim).tv_nsec;
+# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
+  return STAT_TIMESPEC_NS (st, st_birthtim);
+# else
+  /* Avoid a "parameter unused" warning.  */
+  (void) st;
+  return 0;
+# endif
+}
+
+/* Return *ST's access time.  */
+static inline struct timespec
+get_stat_atime (struct stat const *st)
+{
+#ifdef STAT_TIMESPEC
+  return STAT_TIMESPEC (st, st_atim);
+#else
+  struct timespec t;
+  t.tv_sec = st->st_atime;
+  t.tv_nsec = get_stat_atime_ns (st);
+  return t;
+#endif
+}
+
+/* Return *ST's status change time.  */
+static inline struct timespec
+get_stat_ctime (struct stat const *st)
+{
+#ifdef STAT_TIMESPEC
+  return STAT_TIMESPEC (st, st_ctim);
+#else
+  struct timespec t;
+  t.tv_sec = st->st_ctime;
+  t.tv_nsec = get_stat_ctime_ns (st);
+  return t;
+#endif
+}
+
+/* Return *ST's data modification time.  */
+static inline struct timespec
+get_stat_mtime (struct stat const *st)
+{
+#ifdef STAT_TIMESPEC
+  return STAT_TIMESPEC (st, st_mtim);
+#else
+  struct timespec t;
+  t.tv_sec = st->st_mtime;
+  t.tv_nsec = get_stat_mtime_ns (st);
+  return t;
+#endif
+}
+
+/* Return *ST's birth time, if available; otherwise return a value
+   with negative tv_nsec.  */
+static inline struct timespec
+get_stat_birthtime (struct stat const *st)
+{
+  struct timespec t;
+
+#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
+     || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC)
+  t = STAT_TIMESPEC (st, st_birthtim);
+#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
+  t.tv_sec = st->st_birthtime;
+  t.tv_nsec = st->st_birthtimensec;
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* Woe32 native platforms (but not Cygwin) put the "file creation
+     time" in st_ctime (!).  See
+     <http://msdn2.microsoft.com/de-de/library/14h5k7ff(VS.80).aspx>.  */
+  t.tv_sec = st->st_ctime;
+  t.tv_nsec = 0;
+#else
+  /* Birth time is not supported.  Set tv_sec to avoid undefined behavior.  */
+  t.tv_sec = -1;
+  t.tv_nsec = -1;
+  /* Avoid a "parameter unused" warning.  */
+  (void) st;
+#endif
+
+#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
+     || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \
+     || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC)
+  /* FreeBSD and NetBSD sometimes signal the absence of knowledge by
+     using zero.  Attempt to work around this problem.  Alas, this can
+     report failure even for valid time stamps.  Also, NetBSD
+     sometimes returns junk in the birth time fields; work around this
+     bug if it it is detected.  There's no need to detect negative
+     tv_nsec junk as negative tv_nsec already indicates an error.  */
+  if (t.tv_sec == 0 || 1000000000 <= t.tv_nsec)
+    t.tv_nsec = -1;
+#endif
+
+  return t;
+}
+
+#endif
diff --git a/gnulib/lib/stat.c b/gnulib/lib/stat.c
new file mode 100644 (file)
index 0000000..cbc9100
--- /dev/null
@@ -0,0 +1,105 @@
+/* Work around platform bugs in stat.
+   Copyright (C) 2009-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 Eric Blake */
+
+#include <config.h>
+
+/* Get the original definition of stat.  It might be defined as a macro.  */
+#define __need_system_sys_stat_h
+#include <sys/types.h>
+#include <sys/stat.h>
+#undef __need_system_sys_stat_h
+
+static inline int
+orig_stat (const char *filename, struct stat *buf)
+{
+  return stat (filename, buf);
+}
+
+/* Specification.  */
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <string.h>
+#include "dosname.h"
+
+/* Store information about NAME into ST.  Work around bugs with
+   trailing slashes.  Mingw has other bugs (such as st_ino always
+   being 0 on success) which this wrapper does not work around.  But
+   at least this implementation provides the ability to emulate fchdir
+   correctly.  */
+
+int
+rpl_stat (char const *name, struct stat *st)
+{
+  int result = orig_stat (name, st);
+#if REPLACE_FUNC_STAT_FILE
+  /* Solaris 9 mistakenly succeeds when given a non-directory with a
+     trailing slash.  */
+  if (result == 0 && !S_ISDIR (st->st_mode))
+    {
+      size_t len = strlen (name);
+      if (ISSLASH (name[len - 1]))
+        {
+          errno = ENOTDIR;
+          return -1;
+        }
+    }
+#endif /* REPLACE_FUNC_STAT_FILE */
+#if REPLACE_FUNC_STAT_DIR
+  if (result == -1 && errno == ENOENT)
+    {
+      /* Due to mingw's oddities, there are some directories (like
+         c:\) where stat() only succeeds with a trailing slash, and
+         other directories (like c:\windows) where stat() only
+         succeeds without a trailing slash.  But we want the two to be
+         synonymous, since chdir() manages either style.  Likewise, Mingw also
+         reports ENOENT for names longer than PATH_MAX, when we want
+         ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR.
+         Fortunately, mingw PATH_MAX is small enough for stack
+         allocation.  */
+      char fixed_name[PATH_MAX + 1] = {0};
+      size_t len = strlen (name);
+      bool check_dir = false;
+      if (PATH_MAX <= len)
+        errno = ENAMETOOLONG;
+      else if (len)
+        {
+          strcpy (fixed_name, name);
+          if (ISSLASH (fixed_name[len - 1]))
+            {
+              check_dir = true;
+              while (len && ISSLASH (fixed_name[len - 1]))
+                fixed_name[--len] = '\0';
+              if (!len)
+                fixed_name[0] = '/';
+            }
+          else
+            fixed_name[len++] = '/';
+          result = orig_stat (fixed_name, st);
+          if (result == 0 && check_dir && !S_ISDIR (st->st_mode))
+            {
+              result = -1;
+              errno = ENOTDIR;
+            }
+        }
+    }
+#endif /* REPLACE_FUNC_STAT_DIR */
+  return result;
+}
diff --git a/gnulib/lib/stdarg.in.h b/gnulib/lib/stdarg.in.h
new file mode 100644 (file)
index 0000000..4469d54
--- /dev/null
@@ -0,0 +1,36 @@
+/* Substitute for and wrapper around <stdarg.h>.
+   Copyright (C) 2008-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _GL_STDARG_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_STDARG_H@
+
+#ifndef _GL_STDARG_H
+#define _GL_STDARG_H
+
+#ifndef va_copy
+# define va_copy(a,b) ((a) = (b))
+#endif
+
+#endif /* _GL_STDARG_H */
+#endif /* _GL_STDARG_H */
diff --git a/gnulib/lib/stdbool.in.h b/gnulib/lib/stdbool.in.h
new file mode 100644 (file)
index 0000000..b64dc75
--- /dev/null
@@ -0,0 +1,122 @@
+/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _GL_STDBOOL_H
+#define _GL_STDBOOL_H
+
+/* ISO C 99 <stdbool.h> for platforms that lack it.  */
+
+/* Usage suggestions:
+
+   Programs that use <stdbool.h> should be aware of some limitations
+   and standards compliance issues.
+
+   Standards compliance:
+
+       - <stdbool.h> must be #included before 'bool', 'false', 'true'
+         can be used.
+
+       - You cannot assume that sizeof (bool) == 1.
+
+       - Programs should not undefine the macros bool, true, and false,
+         as C99 lists that as an "obsolescent feature".
+
+   Limitations of this substitute, when used in a C89 environment:
+
+       - <stdbool.h> must be #included before the '_Bool' type can be used.
+
+       - You cannot assume that _Bool is a typedef; it might be a macro.
+
+       - Bit-fields of type 'bool' are not supported.  Portable code
+         should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
+
+       - In C99, casts and automatic conversions to '_Bool' or 'bool' are
+         performed in such a way that every nonzero value gets converted
+         to 'true', and zero gets converted to 'false'.  This doesn't work
+         with this substitute.  With this substitute, only the values 0 and 1
+         give the expected result when converted to _Bool' or 'bool'.
+
+       - C99 allows the use of (_Bool)0.0 in constant expressions, but
+         this substitute cannot always provide this property.
+
+   Also, it is suggested that programs use 'bool' rather than '_Bool';
+   this isn't required, but 'bool' is more common.  */
+
+
+/* 7.16. Boolean type and values */
+
+/* BeOS <sys/socket.h> already #defines false 0, true 1.  We use the same
+   definitions below, but temporarily we have to #undef them.  */
+#if defined __BEOS__ && !defined __HAIKU__
+# include <OS.h> /* defines bool but not _Bool */
+# undef false
+# undef true
+#endif
+
+/* For the sake of symbolic names in gdb, we define true and false as
+   enum constants, not only as macros.
+   It is tempting to write
+      typedef enum { false = 0, true = 1 } _Bool;
+   so that gdb prints values of type 'bool' symbolically. But if we do
+   this, values of type '_Bool' may promote to 'int' or 'unsigned int'
+   (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+   (see ISO C 99 6.3.1.1.(2)).  So we add a negative value to the
+   enum; this ensures that '_Bool' promotes to 'int'.  */
+#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+  /* A compiler known to have 'bool'.  */
+  /* If the compiler already has both 'bool' and '_Bool', we can assume they
+     are the same types.  */
+# if !@HAVE__BOOL@
+typedef bool _Bool;
+# endif
+#else
+# if !defined __GNUC__
+   /* If @HAVE__BOOL@:
+        Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
+        the built-in _Bool type is used.  See
+          http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+          http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+          http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+        Similar bugs are likely with other compilers as well; this file
+        wouldn't be used if <stdbool.h> was working.
+        So we override the _Bool type.
+      If !@HAVE__BOOL@:
+        Need to define _Bool ourselves. As 'signed char' or as an enum type?
+        Use of a typedef, with SunPRO C, leads to a stupid
+          "warning: _Bool is a keyword in ISO C99".
+        Use of an enum type, with IRIX cc, leads to a stupid
+          "warning(1185): enumerated type mixed with another type".
+        Even the existence of an enum type, without a typedef,
+          "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
+        The only benefit of the enum, debuggability, is not important
+        with these compilers.  So use 'signed char' and no enum.  */
+#  define _Bool signed char
+# else
+   /* With this compiler, trust the _Bool type if the compiler has it.  */
+#  if !@HAVE__BOOL@
+typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+#  endif
+# endif
+#endif
+#define bool _Bool
+
+/* The other macros must be usable in preprocessor directives.  */
+#define false 0
+#define true 1
+#define __bool_true_false_are_defined 1
+
+#endif /* _GL_STDBOOL_H */
diff --git a/gnulib/lib/stddef.in.h b/gnulib/lib/stddef.in.h
new file mode 100644 (file)
index 0000000..62a91a7
--- /dev/null
@@ -0,0 +1,87 @@
+/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
+
+   Copyright (C) 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Eric Blake.  */
+
+/*
+ * POSIX 2008 <stddef.h> for platforms that have issues.
+ * <http://www.opengroup.org/susv3xbd/stddef.h.html>
+ */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined __need_wchar_t || defined __need_size_t  \
+  || defined __need_ptrdiff_t || defined __need_NULL \
+  || defined __need_wint_t
+/* Special invocation convention inside gcc header files.  In
+   particular, gcc provides a version of <stddef.h> that blindly
+   redefines NULL even when __need_wint_t was defined, even though
+   wint_t is not normally provided by <stddef.h>.  Hence, we must
+   remember if special invocation has ever been used to obtain wint_t,
+   in which case we need to clean up NULL yet again.  */
+
+# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
+#  ifdef __need_wint_t
+#   undef _GL_STDDEF_H
+#   define _GL_STDDEF_WINT_T
+#  endif
+#  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
+# endif
+
+#else
+/* Normal invocation convention.  */
+
+# ifndef _GL_STDDEF_H
+
+/* The include_next requires a split double-inclusion guard.  */
+
+#  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
+
+#  ifndef _GL_STDDEF_H
+#   define _GL_STDDEF_H
+
+/* On NetBSD 5.0, the definition of NULL lacks proper parentheses.  */
+#if @REPLACE_NULL@
+# undef NULL
+# ifdef __cplusplus
+   /* ISO C++ says that the macro NULL must expand to an integer constant
+      expression, hence '((void *) 0)' is not allowed in C++.  */
+#  if __GNUG__ >= 3
+    /* GNU C++ has a __null macro that behaves like an integer ('int' or
+       'long') but has the same size as a pointer.  Use that, to avoid
+       warnings.  */
+#   define NULL __null
+#  else
+#   define NULL 0L
+#  endif
+# else
+#  define NULL ((void *) 0)
+# endif
+#endif
+
+/* Some platforms lack wchar_t.  */
+#if !@HAVE_WCHAR_T@
+# define wchar_t int
+#endif
+
+#  endif /* _GL_STDDEF_H */
+# endif /* _GL_STDDEF_H */
+#endif /* __need_XXX */
diff --git a/gnulib/lib/stdint.in.h b/gnulib/lib/stdint.in.h
new file mode 100644 (file)
index 0000000..b32227b
--- /dev/null
@@ -0,0 +1,592 @@
+/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc.
+   Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
+   This file is part of gnulib.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/*
+ * ISO C 99 <stdint.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/stdint.h.html>
+ */
+
+#ifndef _GL_STDINT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* When including a system file that in turn includes <inttypes.h>,
+   use the system <inttypes.h>, not our substitute.  This avoids
+   problems with (for example) VMS, whose <sys/bitypes.h> includes
+   <inttypes.h>.  */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+
+/* Get those types that are already defined in other system include
+   files, so that we can "#define int8_t signed char" below without
+   worrying about a later system include file containing a "typedef
+   signed char int8_t;" that will get messed up by our macro.  Our
+   macros should all be consistent with the system versions, except
+   for the "fast" types and macros, which we recommend against using
+   in public interfaces due to compiler differences.  */
+
+#if @HAVE_STDINT_H@
+# if defined __sgi && ! defined __c99
+   /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users
+      with "This header file is to be used only for c99 mode compilations"
+      diagnostics.  */
+#  define __STDINT_H__
+# endif
+  /* Other systems may have an incomplete or buggy <stdint.h>.
+     Include it before <inttypes.h>, since any "#include <stdint.h>"
+     in <inttypes.h> would reinclude us, skipping our contents because
+     _GL_STDINT_H is defined.
+     The include_next requires a split double-inclusion guard.  */
+# @INCLUDE_NEXT@ @NEXT_STDINT_H@
+#endif
+
+#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+#define _GL_STDINT_H
+
+/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
+   IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
+   AIX 5.2 <sys/types.h> isn't needed and causes troubles.
+   MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+   relies on the system <stdint.h> definitions, so include
+   <sys/types.h> after @NEXT_STDINT_H@.  */
+#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
+# include <sys/types.h>
+#endif
+
+/* Get LONG_MIN, LONG_MAX, ULONG_MAX.  */
+#include <limits.h>
+
+#if @HAVE_INTTYPES_H@
+  /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
+     int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
+     <inttypes.h> also defines intptr_t and uintptr_t.  */
+# include <inttypes.h>
+#elif @HAVE_SYS_INTTYPES_H@
+  /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
+     the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX.  */
+# include <sys/inttypes.h>
+#endif
+
+#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
+  /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
+     int{8,16,32,64}_t and __BIT_TYPES_DEFINED__.  In libc5 >= 5.2.2 it is
+     included by <sys/types.h>.  */
+# include <sys/bitypes.h>
+#endif
+
+#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+
+/* Minimum and maximum values for a integer type under the usual assumption.
+   Return an unspecified value if BITS == 0, adding a check to pacify
+   picky compilers.  */
+
+#define _STDINT_MIN(signed, bits, zero) \
+  ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
+
+#define _STDINT_MAX(signed, bits, zero) \
+  ((signed) \
+   ? ~ _STDINT_MIN (signed, bits, zero) \
+   : /* The expression for the unsigned case.  The subtraction of (signed) \
+        is a nop in the unsigned case and avoids "signed integer overflow" \
+        warnings in the signed case.  */ \
+     ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
+
+#if !GNULIB_defined_stdint_types
+
+/* 7.18.1.1. Exact-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+   types have 8, 16, 32, optionally 64 bits.  */
+
+#undef int8_t
+#undef uint8_t
+typedef signed char gl_int8_t;
+typedef unsigned char gl_uint8_t;
+#define int8_t gl_int8_t
+#define uint8_t gl_uint8_t
+
+#undef int16_t
+#undef uint16_t
+typedef short int gl_int16_t;
+typedef unsigned short int gl_uint16_t;
+#define int16_t gl_int16_t
+#define uint16_t gl_uint16_t
+
+#undef int32_t
+#undef uint32_t
+typedef int gl_int32_t;
+typedef unsigned int gl_uint32_t;
+#define int32_t gl_int32_t
+#define uint32_t gl_uint32_t
+
+/* If the system defines INT64_MAX, assume int64_t works.  That way,
+   if the underlying platform defines int64_t to be a 64-bit long long
+   int, the code below won't mistakenly define it to be a 64-bit long
+   int, which would mess up C++ name mangling.  We must use #ifdef
+   rather than #if, to avoid an error with HP-UX 10.20 cc.  */
+
+#ifdef INT64_MAX
+# define GL_INT64_T
+#else
+/* Do not undefine int64_t if gnulib is not being used with 64-bit
+   types, since otherwise it breaks platforms like Tandem/NSK.  */
+# if LONG_MAX >> 31 >> 31 == 1
+#  undef int64_t
+typedef long int gl_int64_t;
+#  define int64_t gl_int64_t
+#  define GL_INT64_T
+# elif defined _MSC_VER
+#  undef int64_t
+typedef __int64 gl_int64_t;
+#  define int64_t gl_int64_t
+#  define GL_INT64_T
+# elif @HAVE_LONG_LONG_INT@
+#  undef int64_t
+typedef long long int gl_int64_t;
+#  define int64_t gl_int64_t
+#  define GL_INT64_T
+# endif
+#endif
+
+#ifdef UINT64_MAX
+# define GL_UINT64_T
+#else
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+#  undef uint64_t
+typedef unsigned long int gl_uint64_t;
+#  define uint64_t gl_uint64_t
+#  define GL_UINT64_T
+# elif defined _MSC_VER
+#  undef uint64_t
+typedef unsigned __int64 gl_uint64_t;
+#  define uint64_t gl_uint64_t
+#  define GL_UINT64_T
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+#  undef uint64_t
+typedef unsigned long long int gl_uint64_t;
+#  define uint64_t gl_uint64_t
+#  define GL_UINT64_T
+# endif
+#endif
+
+/* Avoid collision with Solaris 2.5.1 <pthread.h> etc.  */
+#define _UINT8_T
+#define _UINT32_T
+#define _UINT64_T
+
+
+/* 7.18.1.2. Minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+   types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
+   are the same as the corresponding N_t types.  */
+
+#undef int_least8_t
+#undef uint_least8_t
+#undef int_least16_t
+#undef uint_least16_t
+#undef int_least32_t
+#undef uint_least32_t
+#undef int_least64_t
+#undef uint_least64_t
+#define int_least8_t int8_t
+#define uint_least8_t uint8_t
+#define int_least16_t int16_t
+#define uint_least16_t uint16_t
+#define int_least32_t int32_t
+#define uint_least32_t uint32_t
+#ifdef GL_INT64_T
+# define int_least64_t int64_t
+#endif
+#ifdef GL_UINT64_T
+# define uint_least64_t uint64_t
+#endif
+
+/* 7.18.1.3. Fastest minimum-width integer types */
+
+/* Note: Other <stdint.h> substitutes may define these types differently.
+   It is not recommended to use these types in public header files. */
+
+/* Here we assume a standard architecture where the hardware integer
+   types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
+   are taken from the same list of types.  Assume that 'long int'
+   is fast enough for all narrower integers.  */
+
+#undef int_fast8_t
+#undef uint_fast8_t
+#undef int_fast16_t
+#undef uint_fast16_t
+#undef int_fast32_t
+#undef uint_fast32_t
+#undef int_fast64_t
+#undef uint_fast64_t
+typedef long int gl_int_fast8_t;
+typedef unsigned long int gl_uint_fast8_t;
+typedef long int gl_int_fast16_t;
+typedef unsigned long int gl_uint_fast16_t;
+typedef long int gl_int_fast32_t;
+typedef unsigned long int gl_uint_fast32_t;
+#define int_fast8_t gl_int_fast8_t
+#define uint_fast8_t gl_uint_fast8_t
+#define int_fast16_t gl_int_fast16_t
+#define uint_fast16_t gl_uint_fast16_t
+#define int_fast32_t gl_int_fast32_t
+#define uint_fast32_t gl_uint_fast32_t
+#ifdef GL_INT64_T
+# define int_fast64_t int64_t
+#endif
+#ifdef GL_UINT64_T
+# define uint_fast64_t uint64_t
+#endif
+
+/* 7.18.1.4. Integer types capable of holding object pointers */
+
+#undef intptr_t
+#undef uintptr_t
+typedef long int gl_intptr_t;
+typedef unsigned long int gl_uintptr_t;
+#define intptr_t gl_intptr_t
+#define uintptr_t gl_uintptr_t
+
+/* 7.18.1.5. Greatest-width integer types */
+
+/* Note: These types are compiler dependent. It may be unwise to use them in
+   public header files. */
+
+#undef intmax_t
+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+typedef long long int gl_intmax_t;
+# define intmax_t gl_intmax_t
+#elif defined GL_INT64_T
+# define intmax_t int64_t
+#else
+typedef long int gl_intmax_t;
+# define intmax_t gl_intmax_t
+#endif
+
+#undef uintmax_t
+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+typedef unsigned long long int gl_uintmax_t;
+# define uintmax_t gl_uintmax_t
+#elif defined GL_UINT64_T
+# define uintmax_t uint64_t
+#else
+typedef unsigned long int gl_uintmax_t;
+# define uintmax_t gl_uintmax_t
+#endif
+
+/* Verify that intmax_t and uintmax_t have the same size.  Too much code
+   breaks if this is not the case.  If this check fails, the reason is likely
+   to be found in the autoconf macros.  */
+typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
+                                ? 1 : -1];
+
+#define GNULIB_defined_stdint_types 1
+#endif /* !GNULIB_defined_stdint_types */
+
+/* 7.18.2. Limits of specified-width integer types */
+
+#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
+
+/* 7.18.2.1. Limits of exact-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+   types have 8, 16, 32, optionally 64 bits.  */
+
+#undef INT8_MIN
+#undef INT8_MAX
+#undef UINT8_MAX
+#define INT8_MIN  (~ INT8_MAX)
+#define INT8_MAX  127
+#define UINT8_MAX  255
+
+#undef INT16_MIN
+#undef INT16_MAX
+#undef UINT16_MAX
+#define INT16_MIN  (~ INT16_MAX)
+#define INT16_MAX  32767
+#define UINT16_MAX  65535
+
+#undef INT32_MIN
+#undef INT32_MAX
+#undef UINT32_MAX
+#define INT32_MIN  (~ INT32_MAX)
+#define INT32_MAX  2147483647
+#define UINT32_MAX  4294967295U
+
+#if defined GL_INT64_T && ! defined INT64_MAX
+/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
+   evaluates the latter incorrectly in preprocessor expressions.  */
+# define INT64_MIN  (- INTMAX_C (1) << 63)
+# define INT64_MAX  INTMAX_C (9223372036854775807)
+#endif
+
+#if defined GL_UINT64_T && ! defined UINT64_MAX
+# define UINT64_MAX  UINTMAX_C (18446744073709551615)
+#endif
+
+/* 7.18.2.2. Limits of minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+   types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
+   are the same as the corresponding N_t types.  */
+
+#undef INT_LEAST8_MIN
+#undef INT_LEAST8_MAX
+#undef UINT_LEAST8_MAX
+#define INT_LEAST8_MIN  INT8_MIN
+#define INT_LEAST8_MAX  INT8_MAX
+#define UINT_LEAST8_MAX  UINT8_MAX
+
+#undef INT_LEAST16_MIN
+#undef INT_LEAST16_MAX
+#undef UINT_LEAST16_MAX
+#define INT_LEAST16_MIN  INT16_MIN
+#define INT_LEAST16_MAX  INT16_MAX
+#define UINT_LEAST16_MAX  UINT16_MAX
+
+#undef INT_LEAST32_MIN
+#undef INT_LEAST32_MAX
+#undef UINT_LEAST32_MAX
+#define INT_LEAST32_MIN  INT32_MIN
+#define INT_LEAST32_MAX  INT32_MAX
+#define UINT_LEAST32_MAX  UINT32_MAX
+
+#undef INT_LEAST64_MIN
+#undef INT_LEAST64_MAX
+#ifdef GL_INT64_T
+# define INT_LEAST64_MIN  INT64_MIN
+# define INT_LEAST64_MAX  INT64_MAX
+#endif
+
+#undef UINT_LEAST64_MAX
+#ifdef GL_UINT64_T
+# define UINT_LEAST64_MAX  UINT64_MAX
+#endif
+
+/* 7.18.2.3. Limits of fastest minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+   types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
+   are taken from the same list of types.  */
+
+#undef INT_FAST8_MIN
+#undef INT_FAST8_MAX
+#undef UINT_FAST8_MAX
+#define INT_FAST8_MIN  LONG_MIN
+#define INT_FAST8_MAX  LONG_MAX
+#define UINT_FAST8_MAX  ULONG_MAX
+
+#undef INT_FAST16_MIN
+#undef INT_FAST16_MAX
+#undef UINT_FAST16_MAX
+#define INT_FAST16_MIN  LONG_MIN
+#define INT_FAST16_MAX  LONG_MAX
+#define UINT_FAST16_MAX  ULONG_MAX
+
+#undef INT_FAST32_MIN
+#undef INT_FAST32_MAX
+#undef UINT_FAST32_MAX
+#define INT_FAST32_MIN  LONG_MIN
+#define INT_FAST32_MAX  LONG_MAX
+#define UINT_FAST32_MAX  ULONG_MAX
+
+#undef INT_FAST64_MIN
+#undef INT_FAST64_MAX
+#ifdef GL_INT64_T
+# define INT_FAST64_MIN  INT64_MIN
+# define INT_FAST64_MAX  INT64_MAX
+#endif
+
+#undef UINT_FAST64_MAX
+#ifdef GL_UINT64_T
+# define UINT_FAST64_MAX  UINT64_MAX
+#endif
+
+/* 7.18.2.4. Limits of integer types capable of holding object pointers */
+
+#undef INTPTR_MIN
+#undef INTPTR_MAX
+#undef UINTPTR_MAX
+#define INTPTR_MIN  LONG_MIN
+#define INTPTR_MAX  LONG_MAX
+#define UINTPTR_MAX  ULONG_MAX
+
+/* 7.18.2.5. Limits of greatest-width integer types */
+
+#undef INTMAX_MIN
+#undef INTMAX_MAX
+#ifdef INT64_MAX
+# define INTMAX_MIN  INT64_MIN
+# define INTMAX_MAX  INT64_MAX
+#else
+# define INTMAX_MIN  INT32_MIN
+# define INTMAX_MAX  INT32_MAX
+#endif
+
+#undef UINTMAX_MAX
+#ifdef UINT64_MAX
+# define UINTMAX_MAX  UINT64_MAX
+#else
+# define UINTMAX_MAX  UINT32_MAX
+#endif
+
+/* 7.18.3. Limits of other integer types */
+
+/* ptrdiff_t limits */
+#undef PTRDIFF_MIN
+#undef PTRDIFF_MAX
+#if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+#  define PTRDIFF_MIN  _STDINT_MIN (1, 64, 0l)
+#  define PTRDIFF_MAX  _STDINT_MAX (1, 64, 0l)
+# else
+#  define PTRDIFF_MIN  _STDINT_MIN (1, 32, 0)
+#  define PTRDIFF_MAX  _STDINT_MAX (1, 32, 0)
+# endif
+#else
+# define PTRDIFF_MIN  \
+    _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
+# define PTRDIFF_MAX  \
+    _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
+#endif
+
+/* sig_atomic_t limits */
+#undef SIG_ATOMIC_MIN
+#undef SIG_ATOMIC_MAX
+#define SIG_ATOMIC_MIN  \
+   _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
+                0@SIG_ATOMIC_T_SUFFIX@)
+#define SIG_ATOMIC_MAX  \
+   _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
+                0@SIG_ATOMIC_T_SUFFIX@)
+
+
+/* size_t limit */
+#undef SIZE_MAX
+#if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+#  define SIZE_MAX  _STDINT_MAX (0, 64, 0ul)
+# else
+#  define SIZE_MAX  _STDINT_MAX (0, 32, 0ul)
+# endif
+#else
+# define SIZE_MAX  _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
+#endif
+
+/* wchar_t limits */
+/* Get WCHAR_MIN, WCHAR_MAX.
+   This include is not on the top, above, because on OSF/1 4.0 we have a
+   sequence of nested includes
+   <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
+   <stdint.h> and assumes its types are already defined.  */
+#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# include <wchar.h>
+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+#endif
+#undef WCHAR_MIN
+#undef WCHAR_MAX
+#define WCHAR_MIN  \
+   _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+#define WCHAR_MAX  \
+   _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+
+/* wint_t limits */
+#undef WINT_MIN
+#undef WINT_MAX
+#define WINT_MIN  \
+   _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+#define WINT_MAX  \
+   _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+
+#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
+
+/* 7.18.4. Macros for integer constants */
+
+#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
+
+/* 7.18.4.1. Macros for minimum-width integer constants */
+/* According to ISO C 99 Technical Corrigendum 1 */
+
+/* Here we assume a standard architecture where the hardware integer
+   types have 8, 16, 32, optionally 64 bits, and int is 32 bits.  */
+
+#undef INT8_C
+#undef UINT8_C
+#define INT8_C(x) x
+#define UINT8_C(x) x
+
+#undef INT16_C
+#undef UINT16_C
+#define INT16_C(x) x
+#define UINT16_C(x) x
+
+#undef INT32_C
+#undef UINT32_C
+#define INT32_C(x) x
+#define UINT32_C(x) x ## U
+
+#undef INT64_C
+#undef UINT64_C
+#if LONG_MAX >> 31 >> 31 == 1
+# define INT64_C(x) x##L
+#elif defined _MSC_VER
+# define INT64_C(x) x##i64
+#elif @HAVE_LONG_LONG_INT@
+# define INT64_C(x) x##LL
+#endif
+#if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# define UINT64_C(x) x##UL
+#elif defined _MSC_VER
+# define UINT64_C(x) x##ui64
+#elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# define UINT64_C(x) x##ULL
+#endif
+
+/* 7.18.4.2. Macros for greatest-width integer constants */
+
+#undef INTMAX_C
+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define INTMAX_C(x)   x##LL
+#elif defined GL_INT64_T
+# define INTMAX_C(x)   INT64_C(x)
+#else
+# define INTMAX_C(x)   x##L
+#endif
+
+#undef UINTMAX_C
+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define UINTMAX_C(x)  x##ULL
+#elif defined GL_UINT64_T
+# define UINTMAX_C(x)  UINT64_C(x)
+#else
+# define UINTMAX_C(x)  x##UL
+#endif
+
+#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
+
+#endif /* _GL_STDINT_H */
+#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
diff --git a/gnulib/lib/stdio--.h b/gnulib/lib/stdio--.h
new file mode 100644 (file)
index 0000000..adde0f9
--- /dev/null
@@ -0,0 +1,41 @@
+/* Like stdio.h, but redefine some names to avoid glitches.
+
+   Copyright (C) 2005-2006, 2009-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 Paul Eggert.  */
+
+#include <stdio.h>
+#include "stdio-safer.h"
+
+#if GNULIB_FOPEN_SAFER
+# undef fopen
+# define fopen fopen_safer
+#endif
+
+#if GNULIB_FREOPEN_SAFER
+# undef freopen
+# define freopen freopen_safer
+#endif
+
+#if GNULIB_TMPFILE_SAFER
+# undef tmpfile
+# define tmpfile tmpfile_safer
+#endif
+
+#if GNULIB_POPEN_SAFER
+# undef popen
+# define popen popen_safer
+#endif
diff --git a/gnulib/lib/stdio-impl.h b/gnulib/lib/stdio-impl.h
new file mode 100644 (file)
index 0000000..d41c32f
--- /dev/null
@@ -0,0 +1,110 @@
+/* Implementation details of FILE streams.
+   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/>.  */
+
+/* Many stdio implementations have the same logic and therefore can share
+   the same implementation of stdio extension API, except that some fields
+   have different naming conventions, or their access requires some casts.  */
+
+
+/* BSD stdio derived implementations.  */
+
+#if defined __NetBSD__                         /* NetBSD */
+/* Get __NetBSD_Version__.  */
+# include <sys/param.h>
+#endif
+
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+
+# if defined __DragonFly__          /* DragonFly */
+  /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>.  */
+#  define fp_ ((struct { struct __FILE_public pub; \
+                         struct { unsigned char *_base; int _size; } _bf; \
+                         void *cookie; \
+                         void *_close; \
+                         void *_read; \
+                         void *_seek; \
+                         void *_write; \
+                         struct { unsigned char *_base; int _size; } _ub; \
+                         int _ur; \
+                         unsigned char _ubuf[3]; \
+                         unsigned char _nbuf[1]; \
+                         struct { unsigned char *_base; int _size; } _lb; \
+                         int _blksize; \
+                         fpos_t _offset; \
+                         /* More fields, not relevant here.  */ \
+                       } *) fp)
+  /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>.  */
+#  define _p pub._p
+#  define _flags pub._flags
+#  define _r pub._r
+#  define _w pub._w
+# else
+#  define fp_ fp
+# endif
+
+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */
+  /* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
+     and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
+  struct __sfileext
+    {
+      struct  __sbuf _ub; /* ungetc buffer */
+      /* More fields, not relevant here.  */
+    };
+#  define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
+# else                                         /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */
+#  define fp_ub fp_->_ub
+# endif
+
+# define HASUB(fp) (fp_ub._base != NULL)
+
+#endif
+
+
+/* SystemV derived implementations.  */
+
+#ifdef __TANDEM                     /* NonStop Kernel */
+# ifndef _IOERR
+/* These values were determined by the program 'stdioext-flags' at
+   <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>.  */
+#  define _IOERR   0x40
+#  define _IOREAD  0x80
+#  define _IOWRT    0x4
+#  define _IORW   0x100
+# endif
+#endif
+
+#if defined _IOERR
+
+# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */
+#  define fp_ ((struct { unsigned char *_ptr; \
+                         unsigned char *_base; \
+                         unsigned char *_end; \
+                         long _cnt; \
+                         int _file; \
+                         unsigned int _flag; \
+                       } *) fp)
+# else
+#  define fp_ fp
+# endif
+
+# if defined _SCO_DS                /* OpenServer */
+#  define _cnt __cnt
+#  define _ptr __ptr
+#  define _base __base
+#  define _flag __flag
+# endif
+
+#endif
diff --git a/gnulib/lib/stdio-safer.h b/gnulib/lib/stdio-safer.h
new file mode 100644 (file)
index 0000000..62fdf64
--- /dev/null
@@ -0,0 +1,36 @@
+/* Invoke stdio functions, but avoid some glitches.
+
+   Copyright (C) 2001, 2003, 2006, 2009-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 Paul Eggert.  */
+
+#include <stdio.h>
+
+#if GNULIB_FOPEN_SAFER
+FILE *fopen_safer (char const *, char const *);
+#endif
+
+#if GNULIB_FREOPEN_SAFER
+FILE *freopen_safer (char const *, char const *, FILE *);
+#endif
+
+#if GNULIB_POPEN_SAFER
+FILE *popen_safer (char const *, char const *);
+#endif
+
+#if GNULIB_TMPFILE_SAFER
+FILE *tmpfile_safer (void);
+#endif
diff --git a/gnulib/lib/stdio.in.h b/gnulib/lib/stdio.in.h
new file mode 100644 (file)
index 0000000..57e93ba
--- /dev/null
@@ -0,0 +1,1163 @@
+/* A GNU-like <stdio.h>.
+
+   Copyright (C) 2004, 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H
+/* Special invocation convention:
+   - Inside glibc header files.
+   - On OSF/1 5.1 we have a sequence of nested includes
+     <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> ->
+     <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>.
+     In this situation, the functions are not yet declared, therefore we cannot
+     provide the C++ aliases.  */
+
+#@INCLUDE_NEXT@ @NEXT_STDIO_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _GL_STDIO_H
+
+#define _GL_ALREADY_INCLUDING_STDIO_H
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_STDIO_H@
+
+#undef _GL_ALREADY_INCLUDING_STDIO_H
+
+#ifndef _GL_STDIO_H
+#define _GL_STDIO_H
+
+/* Get va_list.  Needed on many systems, including glibc 2.8.  */
+#include <stdarg.h>
+
+#include <stddef.h>
+
+/* Get off_t and ssize_t.  Needed on many systems, including glibc 2.8
+   and eglibc 2.11.2.  */
+#include <sys/types.h>
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The __-protected variants of the attributes 'format' and 'printf' are
+   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
+   gnulib and libintl do '#define printf __printf__' when they override
+   the 'printf' function.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#else
+# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+#endif
+
+/* _GL_ATTRIBUTE_FORMAT_PRINTF
+   indicates to GCC that the function takes a format string and arguments,
+   where the format string directives are the ones standardized by ISO C99
+   and POSIX.  */
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
+   _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
+#else
+# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
+   _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
+#endif
+
+/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF,
+   except that it indicates to GCC that the supported format string directives
+   are the ones of the system printf(), rather than the ones standardized by
+   ISO C99 and POSIX.  */
+#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
+  _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
+
+/* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>.  */
+/* But in any case avoid namespace pollution on glibc systems.  */
+#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \
+    && ! defined __GLIBC__
+# include <unistd.h>
+#endif
+
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* Macros for stringification.  */
+#define _GL_STDIO_STRINGIZE(token) #token
+#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
+
+
+#if @GNULIB_DPRINTF@
+# if @REPLACE_DPRINTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define dprintf rpl_dprintf
+#  endif
+_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                                _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...));
+# else
+#  if !@HAVE_DPRINTF@
+_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                                _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (dprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef dprintf
+# if HAVE_RAW_DECL_DPRINTF
+_GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
+                 "use gnulib module dprintf for portability");
+# endif
+#endif
+
+#if @GNULIB_FCLOSE@
+/* Close STREAM and its underlying file descriptor.  */
+# if @REPLACE_FCLOSE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define fclose rpl_fclose
+#  endif
+_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (fclose, int, (FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fclose, int, (FILE *stream));
+# endif
+_GL_CXXALIASWARN (fclose);
+#elif defined GNULIB_POSIXCHECK
+# undef fclose
+/* Assume fclose is always declared.  */
+_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
+                 "use gnulib module fclose for portable POSIX compliance");
+#endif
+
+#if @GNULIB_FFLUSH@
+/* Flush all pending data on STREAM according to POSIX rules.  Both
+   output and seekable input streams are supported.
+   Note! LOSS OF DATA can occur if fflush is applied on an input stream
+   that is _not_seekable_ or on an update stream that is _not_seekable_
+   and in which the most recent operation was input.  Seekability can
+   be tested with lseek(fileno(fp),0,SEEK_CUR).  */
+# if @REPLACE_FFLUSH@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define fflush rpl_fflush
+#  endif
+_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream));
+_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream));
+# else
+_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream));
+# endif
+_GL_CXXALIASWARN (fflush);
+#elif defined GNULIB_POSIXCHECK
+# undef fflush
+/* Assume fflush is always declared.  */
+_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
+                 "use gnulib module fflush for portable POSIX compliance");
+#endif
+
+/* It is very rare that the developer ever has full control of stdin,
+   so any use of gets warrants an unconditional warning.  Assume it is
+   always declared, since it is required by C89.  */
+#undef gets
+_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+#if @GNULIB_FOPEN@
+# if @REPLACE_FOPEN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fopen
+#   define fopen rpl_fopen
+#  endif
+_GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode)
+                                 _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode));
+# else
+_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode));
+# endif
+_GL_CXXALIASWARN (fopen);
+#elif defined GNULIB_POSIXCHECK
+# undef fopen
+/* Assume fopen is always declared.  */
+_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - "
+                 "use gnulib module fopen for portability");
+#endif
+
+#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@
+# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \
+     || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define fprintf rpl_fprintf
+#  endif
+#  define GNULIB_overrides_fprintf 1
+#  if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
+_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                                _GL_ARG_NONNULL ((1, 2)));
+#  else
+_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3)
+                                _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
+# else
+_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (fprintf);
+#endif
+#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_fprintf
+#  undef fprintf
+# endif
+/* Assume fprintf is always declared.  */
+_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
+                 "use gnulib module fprintf-posix for portable "
+                 "POSIX compliance");
+#endif
+
+#if @GNULIB_FPURGE@
+/* Discard all pending buffered I/O data on STREAM.
+   STREAM must not be wide-character oriented.
+   When discarding pending output, the file position is set back to where it
+   was before the write calls.  When discarding pending input, the file
+   position is advanced to match the end of the previously read input.
+   Return 0 if successful.  Upon error, return -1 and set errno.  */
+# if @REPLACE_FPURGE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define fpurge rpl_fpurge
+#  endif
+_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream));
+# else
+#  if !@HAVE_DECL_FPURGE@
+_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream));
+# endif
+_GL_CXXALIASWARN (fpurge);
+#elif defined GNULIB_POSIXCHECK
+# undef fpurge
+# if HAVE_RAW_DECL_FPURGE
+_GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
+                 "use gnulib module fpurge for portability");
+# endif
+#endif
+
+#if @GNULIB_FPUTC@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fputc
+#   define fputc rpl_fputc
+#  endif
+_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream));
+# endif
+_GL_CXXALIASWARN (fputc);
+#endif
+
+#if @GNULIB_FPUTS@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fputs
+#   define fputs rpl_fputs
+#  endif
+_GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream)
+                              _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
+# endif
+_GL_CXXALIASWARN (fputs);
+#endif
+
+#if @GNULIB_FREOPEN@
+# if @REPLACE_FREOPEN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef freopen
+#   define freopen rpl_freopen
+#  endif
+_GL_FUNCDECL_RPL (freopen, FILE *,
+                  (const char *filename, const char *mode, FILE *stream)
+                  _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (freopen, FILE *,
+                  (const char *filename, const char *mode, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (freopen, FILE *,
+                  (const char *filename, const char *mode, FILE *stream));
+# endif
+_GL_CXXALIASWARN (freopen);
+#elif defined GNULIB_POSIXCHECK
+# undef freopen
+/* Assume freopen is always declared.  */
+_GL_WARN_ON_USE (freopen,
+                 "freopen on Win32 platforms is not POSIX compatible - "
+                 "use gnulib module freopen for portability");
+#endif
+
+
+/* Set up the following warnings, based on which modules are in use.
+   GNU Coding Standards discourage the use of fseek, since it imposes
+   an arbitrary limitation on some 32-bit hosts.  Remember that the
+   fseek module depends on the fseeko module, so we only have three
+   cases to consider:
+
+   1. The developer is not using either module.  Issue a warning under
+   GNULIB_POSIXCHECK for both functions, to remind them that both
+   functions have bugs on some systems.  _GL_NO_LARGE_FILES has no
+   impact on this warning.
+
+   2. The developer is using both modules.  They may be unaware of the
+   arbitrary limitations of fseek, so issue a warning under
+   GNULIB_POSIXCHECK.  On the other hand, they may be using both
+   modules intentionally, so the developer can define
+   _GL_NO_LARGE_FILES in the compilation units where the use of fseek
+   is safe, to silence the warning.
+
+   3. The developer is using the fseeko module, but not fseek.  Gnulib
+   guarantees that fseek will still work around platform bugs in that
+   case, but we presume that the developer is aware of the pitfalls of
+   fseek and was trying to avoid it, so issue a warning even when
+   GNULIB_POSIXCHECK is undefined.  Again, _GL_NO_LARGE_FILES can be
+   defined to silence the warning in particular compilation units.
+   In C++ compilations with GNULIB_NAMESPACE, in order to avoid that
+   fseek gets defined as a macro, it is recommended that the developer
+   uses the fseek module, even if he is not calling the fseek function.
+
+   Most gnulib clients that perform stream operations should fall into
+   category 3.  */
+
+#if @GNULIB_FSEEK@
+# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
+#  define _GL_FSEEK_WARN /* Category 2, above.  */
+#  undef fseek
+# endif
+# if @REPLACE_FSEEK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fseek
+#   define fseek rpl_fseek
+#  endif
+_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence)
+                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence));
+# else
+_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence));
+# endif
+_GL_CXXALIASWARN (fseek);
+#endif
+
+#if @GNULIB_FSEEKO@
+# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES
+#  define _GL_FSEEK_WARN /* Category 3, above.  */
+#  undef fseek
+# endif
+# if @REPLACE_FSEEKO@
+/* Provide an fseeko function that is aware of a preceding fflush(), and which
+   detects pipes.  */
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fseeko
+#   define fseeko rpl_fseeko
+#  endif
+_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)
+                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence));
+# else
+#  if ! @HAVE_DECL_FSEEKO@
+_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)
+                               _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
+# endif
+_GL_CXXALIASWARN (fseeko);
+# if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@
+   /* Provide an fseek function that is consistent with fseeko.  */
+   /* In order to avoid that fseek gets defined as a macro here, the
+      developer can request the 'fseek' module.  */
+#  if !GNULIB_defined_fseek_function
+#   undef fseek
+#   define fseek rpl_fseek
+static inline int _GL_ARG_NONNULL ((1))
+rpl_fseek (FILE *fp, long offset, int whence)
+{
+#   if @REPLACE_FSEEKO@
+  return rpl_fseeko (fp, offset, whence);
+#   else
+  return fseeko (fp, offset, whence);
+#   endif
+}
+#   define GNULIB_defined_fseek_function 1
+#  endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# define _GL_FSEEK_WARN /* Category 1, above.  */
+# undef fseek
+# undef fseeko
+# if HAVE_RAW_DECL_FSEEKO
+_GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
+                 "use gnulib module fseeko for portability");
+# endif
+#endif
+
+#ifdef _GL_FSEEK_WARN
+# undef _GL_FSEEK_WARN
+/* Here, either fseek is undefined (but C89 guarantees that it is
+   declared), or it is defined as rpl_fseek (declared above).  */
+_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
+                 "on 32-bit platforms - "
+                 "use fseeko function for handling of large files");
+#endif
+
+
+/* ftell, ftello.  See the comments on fseek/fseeko.  */
+
+#if @GNULIB_FTELL@
+# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
+#  define _GL_FTELL_WARN /* Category 2, above.  */
+#  undef ftell
+# endif
+# if @REPLACE_FTELL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ftell
+#   define ftell rpl_ftell
+#  endif
+_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (ftell, long, (FILE *fp));
+# else
+_GL_CXXALIAS_SYS (ftell, long, (FILE *fp));
+# endif
+_GL_CXXALIASWARN (ftell);
+#endif
+
+#if @GNULIB_FTELLO@
+# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES
+#  define _GL_FTELL_WARN /* Category 3, above.  */
+#  undef ftell
+# endif
+# if @REPLACE_FTELLO@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ftello
+#   define ftello rpl_ftello
+#  endif
+_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp));
+# else
+#  if ! @HAVE_DECL_FTELLO@
+_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
+# endif
+_GL_CXXALIASWARN (ftello);
+# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@
+   /* Provide an ftell function that is consistent with ftello.  */
+   /* In order to avoid that ftell gets defined as a macro here, the
+      developer can request the 'ftell' module.  */
+#  if !GNULIB_defined_ftell_function
+#   undef ftell
+#   define ftell rpl_ftell
+static inline long _GL_ARG_NONNULL ((1))
+rpl_ftell (FILE *f)
+{
+#   if @REPLACE_FTELLO@
+  return rpl_ftello (f);
+#   else
+  return ftello (f);
+#   endif
+}
+#   define GNULIB_defined_ftell_function 1
+#  endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# define _GL_FTELL_WARN /* Category 1, above.  */
+# undef ftell
+# undef ftello
+# if HAVE_RAW_DECL_FTELLO
+_GL_WARN_ON_USE (ftello, "ftello is unportable - "
+                 "use gnulib module ftello for portability");
+# endif
+#endif
+
+#ifdef _GL_FTELL_WARN
+# undef _GL_FTELL_WARN
+/* Here, either ftell is undefined (but C89 guarantees that it is
+   declared), or it is defined as rpl_ftell (declared above).  */
+_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
+                 "on 32-bit platforms - "
+                 "use ftello function for handling of large files");
+#endif
+
+
+#if @GNULIB_FWRITE@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fwrite
+#   define fwrite rpl_fwrite
+#  endif
+_GL_FUNCDECL_RPL (fwrite, size_t,
+                  (const void *ptr, size_t s, size_t n, FILE *stream)
+                  _GL_ARG_NONNULL ((1, 4)));
+_GL_CXXALIAS_RPL (fwrite, size_t,
+                  (const void *ptr, size_t s, size_t n, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fwrite, size_t,
+                  (const void *ptr, size_t s, size_t n, FILE *stream));
+
+/* Work around glibc bug 11959
+   <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
+   which sometimes causes an unwanted diagnostic for fwrite calls.
+   This affects only function declaration attributes, so it's not
+   needed for C++.  */
+#  if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL
+static inline size_t _GL_ARG_NONNULL ((1, 4))
+rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
+{
+  size_t r = fwrite (ptr, s, n, stream);
+  (void) r;
+  return r;
+}
+#   undef fwrite
+#   define fwrite rpl_fwrite
+#  endif
+# endif
+_GL_CXXALIASWARN (fwrite);
+#endif
+
+#if @GNULIB_GETDELIM@
+/* Read input, up to (and including) the next occurrence of DELIMITER, from
+   STREAM, store it in *LINEPTR (and NUL-terminate it).
+   *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
+   bytes of space.  It is realloc'd as necessary.
+   Return the number of bytes read and stored at *LINEPTR (not including the
+   NUL terminator), or -1 on error or EOF.  */
+# if @REPLACE_GETDELIM@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getdelim
+#   define getdelim rpl_getdelim
+#  endif
+_GL_FUNCDECL_RPL (getdelim, ssize_t,
+                  (char **lineptr, size_t *linesize, int delimiter,
+                   FILE *stream)
+                  _GL_ARG_NONNULL ((1, 2, 4)));
+_GL_CXXALIAS_RPL (getdelim, ssize_t,
+                  (char **lineptr, size_t *linesize, int delimiter,
+                   FILE *stream));
+# else
+#  if !@HAVE_DECL_GETDELIM@
+_GL_FUNCDECL_SYS (getdelim, ssize_t,
+                  (char **lineptr, size_t *linesize, int delimiter,
+                   FILE *stream)
+                  _GL_ARG_NONNULL ((1, 2, 4)));
+#  endif
+_GL_CXXALIAS_SYS (getdelim, ssize_t,
+                  (char **lineptr, size_t *linesize, int delimiter,
+                   FILE *stream));
+# endif
+_GL_CXXALIASWARN (getdelim);
+#elif defined GNULIB_POSIXCHECK
+# undef getdelim
+# if HAVE_RAW_DECL_GETDELIM
+_GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
+                 "use gnulib module getdelim for portability");
+# endif
+#endif
+
+#if @GNULIB_GETLINE@
+/* Read a line, up to (and including) the next newline, from STREAM, store it
+   in *LINEPTR (and NUL-terminate it).
+   *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
+   bytes of space.  It is realloc'd as necessary.
+   Return the number of bytes read and stored at *LINEPTR (not including the
+   NUL terminator), or -1 on error or EOF.  */
+# if @REPLACE_GETLINE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getline
+#   define getline rpl_getline
+#  endif
+_GL_FUNCDECL_RPL (getline, ssize_t,
+                  (char **lineptr, size_t *linesize, FILE *stream)
+                  _GL_ARG_NONNULL ((1, 2, 3)));
+_GL_CXXALIAS_RPL (getline, ssize_t,
+                  (char **lineptr, size_t *linesize, FILE *stream));
+# else
+#  if !@HAVE_DECL_GETLINE@
+_GL_FUNCDECL_SYS (getline, ssize_t,
+                  (char **lineptr, size_t *linesize, FILE *stream)
+                  _GL_ARG_NONNULL ((1, 2, 3)));
+#  endif
+_GL_CXXALIAS_SYS (getline, ssize_t,
+                  (char **lineptr, size_t *linesize, FILE *stream));
+# endif
+# if @HAVE_DECL_GETLINE@
+_GL_CXXALIASWARN (getline);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getline
+# if HAVE_RAW_DECL_GETLINE
+_GL_WARN_ON_USE (getline, "getline is unportable - "
+                 "use gnulib module getline for portability");
+# endif
+#endif
+
+#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
+struct obstack;
+/* Grow an obstack with formatted output.  Return the number of
+   bytes added to OBS.  No trailing nul byte is added, and the
+   object should be closed with obstack_finish before use.  Upon
+   memory allocation error, call obstack_alloc_failed_handler.  Upon
+   other error, return -1.  */
+# if @REPLACE_OBSTACK_PRINTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define obstack_printf rpl_obstack_printf
+#  endif
+_GL_FUNCDECL_RPL (obstack_printf, int,
+                  (struct obstack *obs, const char *format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (obstack_printf, int,
+                  (struct obstack *obs, const char *format, ...));
+# else
+#  if !@HAVE_DECL_OBSTACK_PRINTF@
+_GL_FUNCDECL_SYS (obstack_printf, int,
+                  (struct obstack *obs, const char *format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (obstack_printf, int,
+                  (struct obstack *obs, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (obstack_printf);
+# if @REPLACE_OBSTACK_PRINTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define obstack_vprintf rpl_obstack_vprintf
+#  endif
+_GL_FUNCDECL_RPL (obstack_vprintf, int,
+                  (struct obstack *obs, const char *format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (obstack_vprintf, int,
+                  (struct obstack *obs, const char *format, va_list args));
+# else
+#  if !@HAVE_DECL_OBSTACK_PRINTF@
+_GL_FUNCDECL_SYS (obstack_vprintf, int,
+                  (struct obstack *obs, const char *format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (obstack_vprintf, int,
+                  (struct obstack *obs, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (obstack_vprintf);
+#endif
+
+#if @GNULIB_PERROR@
+/* Print a message to standard error, describing the value of ERRNO,
+   (if STRING is not NULL and not empty) prefixed with STRING and ": ",
+   and terminated with a newline.  */
+# if @REPLACE_PERROR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define perror rpl_perror
+#  endif
+_GL_FUNCDECL_RPL (perror, void, (const char *string));
+_GL_CXXALIAS_RPL (perror, void, (const char *string));
+# else
+_GL_CXXALIAS_SYS (perror, void, (const char *string));
+# endif
+_GL_CXXALIASWARN (perror);
+#elif defined GNULIB_POSIXCHECK
+# undef perror
+/* Assume perror is always declared.  */
+_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
+                 "use gnulib module perror for portability");
+#endif
+
+#if @GNULIB_POPEN@
+# if @REPLACE_POPEN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef popen
+#   define popen rpl_popen
+#  endif
+_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode)
+                                 _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
+# else
+_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
+# endif
+_GL_CXXALIASWARN (popen);
+#elif defined GNULIB_POSIXCHECK
+# undef popen
+# if HAVE_RAW_DECL_POPEN
+_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
+                 "use gnulib module popen or pipe for more portability");
+# endif
+#endif
+
+#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
+# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
+     || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+#  if defined __GNUC__
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+/* Don't break __attribute__((format(printf,M,N))).  */
+#    define printf __printf__
+#   endif
+#   if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
+_GL_FUNCDECL_RPL_1 (__printf__, int,
+                    (const char *format, ...)
+                    __asm__ (@ASM_SYMBOL_PREFIX@
+                             _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
+                    _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
+                    _GL_ARG_NONNULL ((1)));
+#   else
+_GL_FUNCDECL_RPL_1 (__printf__, int,
+                    (const char *format, ...)
+                    __asm__ (@ASM_SYMBOL_PREFIX@
+                             _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
+                    _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2)
+                    _GL_ARG_NONNULL ((1)));
+#   endif
+_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
+#  else
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define printf rpl_printf
+#   endif
+_GL_FUNCDECL_RPL (printf, int,
+                  (const char *format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
+#  endif
+#  define GNULIB_overrides_printf 1
+# else
+_GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
+# endif
+_GL_CXXALIASWARN (printf);
+#endif
+#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_printf
+#  undef printf
+# endif
+/* Assume printf is always declared.  */
+_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
+                 "use gnulib module printf-posix for portable "
+                 "POSIX compliance");
+#endif
+
+#if @GNULIB_PUTC@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef putc
+#   define putc rpl_fputc
+#  endif
+_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream));
+# endif
+_GL_CXXALIASWARN (putc);
+#endif
+
+#if @GNULIB_PUTCHAR@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef putchar
+#   define putchar rpl_putchar
+#  endif
+_GL_FUNCDECL_RPL (putchar, int, (int c));
+_GL_CXXALIAS_RPL (putchar, int, (int c));
+# else
+_GL_CXXALIAS_SYS (putchar, int, (int c));
+# endif
+_GL_CXXALIASWARN (putchar);
+#endif
+
+#if @GNULIB_PUTS@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef puts
+#   define puts rpl_puts
+#  endif
+_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (puts, int, (const char *string));
+# else
+_GL_CXXALIAS_SYS (puts, int, (const char *string));
+# endif
+_GL_CXXALIASWARN (puts);
+#endif
+
+#if @GNULIB_REMOVE@
+# if @REPLACE_REMOVE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef remove
+#   define remove rpl_remove
+#  endif
+_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (remove, int, (const char *name));
+# else
+_GL_CXXALIAS_SYS (remove, int, (const char *name));
+# endif
+_GL_CXXALIASWARN (remove);
+#elif defined GNULIB_POSIXCHECK
+# undef remove
+/* Assume remove is always declared.  */
+_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
+                 "use gnulib module remove for more portability");
+#endif
+
+#if @GNULIB_RENAME@
+# if @REPLACE_RENAME@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef rename
+#   define rename rpl_rename
+#  endif
+_GL_FUNCDECL_RPL (rename, int,
+                  (const char *old_filename, const char *new_filename)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (rename, int,
+                  (const char *old_filename, const char *new_filename));
+# else
+_GL_CXXALIAS_SYS (rename, int,
+                  (const char *old_filename, const char *new_filename));
+# endif
+_GL_CXXALIASWARN (rename);
+#elif defined GNULIB_POSIXCHECK
+# undef rename
+/* Assume rename is always declared.  */
+_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
+                 "use gnulib module rename for more portability");
+#endif
+
+#if @GNULIB_RENAMEAT@
+# if @REPLACE_RENAMEAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef renameat
+#   define renameat rpl_renameat
+#  endif
+_GL_FUNCDECL_RPL (renameat, int,
+                  (int fd1, char const *file1, int fd2, char const *file2)
+                  _GL_ARG_NONNULL ((2, 4)));
+_GL_CXXALIAS_RPL (renameat, int,
+                  (int fd1, char const *file1, int fd2, char const *file2));
+# else
+#  if !@HAVE_RENAMEAT@
+_GL_FUNCDECL_SYS (renameat, int,
+                  (int fd1, char const *file1, int fd2, char const *file2)
+                  _GL_ARG_NONNULL ((2, 4)));
+#  endif
+_GL_CXXALIAS_SYS (renameat, int,
+                  (int fd1, char const *file1, int fd2, char const *file2));
+# endif
+_GL_CXXALIASWARN (renameat);
+#elif defined GNULIB_POSIXCHECK
+# undef renameat
+# if HAVE_RAW_DECL_RENAMEAT
+_GL_WARN_ON_USE (renameat, "renameat is not portable - "
+                 "use gnulib module renameat for portability");
+# endif
+#endif
+
+#if @GNULIB_SNPRINTF@
+# if @REPLACE_SNPRINTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define snprintf rpl_snprintf
+#  endif
+_GL_FUNCDECL_RPL (snprintf, int,
+                  (char *str, size_t size, const char *format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
+                  _GL_ARG_NONNULL ((3)));
+_GL_CXXALIAS_RPL (snprintf, int,
+                  (char *str, size_t size, const char *format, ...));
+# else
+#  if !@HAVE_DECL_SNPRINTF@
+_GL_FUNCDECL_SYS (snprintf, int,
+                  (char *str, size_t size, const char *format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
+                  _GL_ARG_NONNULL ((3)));
+#  endif
+_GL_CXXALIAS_SYS (snprintf, int,
+                  (char *str, size_t size, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (snprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef snprintf
+# if HAVE_RAW_DECL_SNPRINTF
+_GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
+                 "use gnulib module snprintf for portability");
+# endif
+#endif
+
+/* Some people would argue that sprintf should be handled like gets
+   (for example, OpenBSD issues a link warning for both functions),
+   since both can cause security holes due to buffer overruns.
+   However, we believe that sprintf can be used safely, and is more
+   efficient than snprintf in those safe cases; and as proof of our
+   belief, we use sprintf in several gnulib modules.  So this header
+   intentionally avoids adding a warning to sprintf except when
+   GNULIB_POSIXCHECK is defined.  */
+
+#if @GNULIB_SPRINTF_POSIX@
+# if @REPLACE_SPRINTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define sprintf rpl_sprintf
+#  endif
+_GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                                _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...));
+# else
+_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (sprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef sprintf
+/* Assume sprintf is always declared.  */
+_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
+                 "use gnulib module sprintf-posix for portable "
+                 "POSIX compliance");
+#endif
+
+#if @GNULIB_TMPFILE@
+# if @REPLACE_TMPFILE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define tmpfile rpl_tmpfile
+#  endif
+_GL_FUNCDECL_RPL (tmpfile, FILE *, (void));
+_GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
+# else
+_GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
+# endif
+_GL_CXXALIASWARN (tmpfile);
+#elif defined GNULIB_POSIXCHECK
+# undef tmpfile
+# if HAVE_RAW_DECL_TMPFILE
+_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - "
+                 "use gnulib module tmpfile for portability");
+# endif
+#endif
+
+#if @GNULIB_VASPRINTF@
+/* Write formatted output to a string dynamically allocated with malloc().
+   If the memory allocation succeeds, store the address of the string in
+   *RESULT and return the number of resulting bytes, excluding the trailing
+   NUL.  Upon memory allocation error, or some other error, return -1.  */
+# if @REPLACE_VASPRINTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define asprintf rpl_asprintf
+#  endif
+_GL_FUNCDECL_RPL (asprintf, int,
+                  (char **result, const char *format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (asprintf, int,
+                  (char **result, const char *format, ...));
+# else
+#  if !@HAVE_VASPRINTF@
+_GL_FUNCDECL_SYS (asprintf, int,
+                  (char **result, const char *format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (asprintf, int,
+                  (char **result, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (asprintf);
+# if @REPLACE_VASPRINTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define vasprintf rpl_vasprintf
+#  endif
+_GL_FUNCDECL_RPL (vasprintf, int,
+                  (char **result, const char *format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (vasprintf, int,
+                  (char **result, const char *format, va_list args));
+# else
+#  if !@HAVE_VASPRINTF@
+_GL_FUNCDECL_SYS (vasprintf, int,
+                  (char **result, const char *format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (vasprintf, int,
+                  (char **result, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vasprintf);
+#endif
+
+#if @GNULIB_VDPRINTF@
+# if @REPLACE_VDPRINTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define vdprintf rpl_vdprintf
+#  endif
+_GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args)
+                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                                 _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args));
+# else
+#  if !@HAVE_VDPRINTF@
+_GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args)
+                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                                 _GL_ARG_NONNULL ((2)));
+#  endif
+/* Need to cast, because on Solaris, the third parameter will likely be
+                                                    __va_list args.  */
+_GL_CXXALIAS_SYS_CAST (vdprintf, int,
+                       (int fd, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vdprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef vdprintf
+# if HAVE_RAW_DECL_VDPRINTF
+_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
+                 "use gnulib module vdprintf for portability");
+# endif
+#endif
+
+#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@
+# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \
+     || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define vfprintf rpl_vfprintf
+#  endif
+#  define GNULIB_overrides_vfprintf 1
+#  if @GNULIB_VFPRINTF_POSIX@
+_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
+                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                                 _GL_ARG_NONNULL ((1, 2)));
+#  else
+_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
+                                 _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0)
+                                 _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
+# else
+/* Need to cast, because on Solaris, the third parameter is
+                                                      __va_list args
+   and GCC's fixincludes did not change this to __gnuc_va_list.  */
+_GL_CXXALIAS_SYS_CAST (vfprintf, int,
+                       (FILE *fp, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vfprintf);
+#endif
+#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_vfprintf
+#  undef vfprintf
+# endif
+/* Assume vfprintf is always declared.  */
+_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
+                 "use gnulib module vfprintf-posix for portable "
+                      "POSIX compliance");
+#endif
+
+#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
+# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \
+     || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define vprintf rpl_vprintf
+#  endif
+#  define GNULIB_overrides_vprintf 1
+#  if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
+_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0)
+                                _GL_ARG_NONNULL ((1)));
+#  else
+_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0)
+                                _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
+# else
+/* Need to cast, because on Solaris, the second parameter is
+                                                          __va_list args
+   and GCC's fixincludes did not change this to __gnuc_va_list.  */
+_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vprintf);
+#endif
+#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_vprintf
+#  undef vprintf
+# endif
+/* Assume vprintf is always declared.  */
+_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
+                 "use gnulib module vprintf-posix for portable "
+                 "POSIX compliance");
+#endif
+
+#if @GNULIB_VSNPRINTF@
+# if @REPLACE_VSNPRINTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define vsnprintf rpl_vsnprintf
+#  endif
+_GL_FUNCDECL_RPL (vsnprintf, int,
+                  (char *str, size_t size, const char *format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
+                  _GL_ARG_NONNULL ((3)));
+_GL_CXXALIAS_RPL (vsnprintf, int,
+                  (char *str, size_t size, const char *format, va_list args));
+# else
+#  if !@HAVE_DECL_VSNPRINTF@
+_GL_FUNCDECL_SYS (vsnprintf, int,
+                  (char *str, size_t size, const char *format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
+                  _GL_ARG_NONNULL ((3)));
+#  endif
+_GL_CXXALIAS_SYS (vsnprintf, int,
+                  (char *str, size_t size, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vsnprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef vsnprintf
+# if HAVE_RAW_DECL_VSNPRINTF
+_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
+                 "use gnulib module vsnprintf for portability");
+# endif
+#endif
+
+#if @GNULIB_VSPRINTF_POSIX@
+# if @REPLACE_VSPRINTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define vsprintf rpl_vsprintf
+#  endif
+_GL_FUNCDECL_RPL (vsprintf, int,
+                  (char *str, const char *format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (vsprintf, int,
+                  (char *str, const char *format, va_list args));
+# else
+/* Need to cast, because on Solaris, the third parameter is
+                                                       __va_list args
+   and GCC's fixincludes did not change this to __gnuc_va_list.  */
+_GL_CXXALIAS_SYS_CAST (vsprintf, int,
+                       (char *str, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vsprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef vsprintf
+/* Assume vsprintf is always declared.  */
+_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
+                 "use gnulib module vsprintf-posix for portable "
+                      "POSIX compliance");
+#endif
+
+
+#endif /* _GL_STDIO_H */
+#endif /* _GL_STDIO_H */
+#endif
diff --git a/gnulib/lib/stdlib.in.h b/gnulib/lib/stdlib.in.h
new file mode 100644 (file)
index 0000000..2697a4b
--- /dev/null
@@ -0,0 +1,759 @@
+/* A GNU-like <stdlib.h>.
+
+   Copyright (C) 1995, 2001-2004, 2006-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 __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined __need_malloc_and_calloc
+/* Special invocation convention inside glibc header files.  */
+
+#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _GL_STDLIB_H
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
+
+#ifndef _GL_STDLIB_H
+#define _GL_STDLIB_H
+
+/* NetBSD 5.0 mis-defines NULL.  */
+#include <stddef.h>
+
+/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>.  */
+#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS
+# include <sys/wait.h>
+#endif
+
+/* Solaris declares getloadavg() in <sys/loadavg.h>.  */
+#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
+# include <sys/loadavg.h>
+#endif
+
+#if @GNULIB_RANDOM_R@
+
+/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
+   from <stdlib.h> if _REENTRANT is defined.  Include it whenever we need
+   'struct random_data'.  */
+# if @HAVE_RANDOM_H@
+#  include <random.h>
+# endif
+
+# if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@
+#  include <stdint.h>
+# endif
+
+# if !@HAVE_STRUCT_RANDOM_DATA@
+/* Define 'struct random_data'.
+   But allow multiple gnulib generated <stdlib.h> replacements to coexist.  */
+#  if !GNULIB_defined_struct_random_data
+struct random_data
+{
+  int32_t *fptr;                /* Front pointer.  */
+  int32_t *rptr;                /* Rear pointer.  */
+  int32_t *state;               /* Array of state values.  */
+  int rand_type;                /* Type of random number generator.  */
+  int rand_deg;                 /* Degree of random number generator.  */
+  int rand_sep;                 /* Distance between front and rear.  */
+  int32_t *end_ptr;             /* Pointer behind state table.  */
+};
+#   define GNULIB_defined_struct_random_data 1
+#  endif
+# endif
+#endif
+
+#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+/* On MacOS X 10.3, only <unistd.h> declares mkstemp.  */
+/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt.  */
+/* But avoid namespace pollution on glibc systems and native Windows.  */
+# include <unistd.h>
+#endif
+
+#if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__
+# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#else
+# define _GL_ATTRIBUTE_NORETURN
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
+/* Some systems do not define EXIT_*, despite otherwise supporting C89.  */
+#ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+#endif
+/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
+   with proper operation of xargs.  */
+#ifndef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#elif EXIT_FAILURE != 1
+# undef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#endif
+
+
+#if @GNULIB__EXIT@
+/* Terminate the current process with the given return code, without running
+   the 'atexit' handlers.  */
+# if !@HAVE__EXIT@
+_GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN);
+# endif
+_GL_CXXALIAS_SYS (_Exit, void, (int status));
+_GL_CXXALIASWARN (_Exit);
+#elif defined GNULIB_POSIXCHECK
+# undef _Exit
+# if HAVE_RAW_DECL__EXIT
+_GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
+                 "use gnulib module _Exit for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ATOLL@
+/* Parse a signed decimal integer.
+   Returns the value of the integer.  Errors are not detected.  */
+# if !@HAVE_ATOLL@
+_GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (atoll, long long, (const char *string));
+_GL_CXXALIASWARN (atoll);
+#elif defined GNULIB_POSIXCHECK
+# undef atoll
+# if HAVE_RAW_DECL_ATOLL
+_GL_WARN_ON_USE (atoll, "atoll is unportable - "
+                 "use gnulib module atoll for portability");
+# endif
+#endif
+
+#if @GNULIB_CALLOC_POSIX@
+# if @REPLACE_CALLOC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef calloc
+#   define calloc rpl_calloc
+#  endif
+_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size));
+_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
+# else
+_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
+# endif
+_GL_CXXALIASWARN (calloc);
+#elif defined GNULIB_POSIXCHECK
+# undef calloc
+/* Assume calloc is always declared.  */
+_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
+                 "use gnulib module calloc-posix for portability");
+#endif
+
+#if @GNULIB_CANONICALIZE_FILE_NAME@
+# if @REPLACE_CANONICALIZE_FILE_NAME@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define canonicalize_file_name rpl_canonicalize_file_name
+#  endif
+_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name)
+                                                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
+# else
+#  if !@HAVE_CANONICALIZE_FILE_NAME@
+_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
+                                                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
+# endif
+_GL_CXXALIASWARN (canonicalize_file_name);
+#elif defined GNULIB_POSIXCHECK
+# undef canonicalize_file_name
+# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
+_GL_WARN_ON_USE (canonicalize_file_name,
+                 "canonicalize_file_name is unportable - "
+                 "use gnulib module canonicalize-lgpl for portability");
+# endif
+#endif
+
+#if @GNULIB_GETLOADAVG@
+/* Store max(NELEM,3) load average numbers in LOADAVG[].
+   The three numbers are the load average of the last 1 minute, the last 5
+   minutes, and the last 15 minutes, respectively.
+   LOADAVG is an array of NELEM numbers.  */
+# if !@HAVE_DECL_GETLOADAVG@
+_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
+                                   _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
+_GL_CXXALIASWARN (getloadavg);
+#elif defined GNULIB_POSIXCHECK
+# undef getloadavg
+# if HAVE_RAW_DECL_GETLOADAVG
+_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
+                 "use gnulib module getloadavg for portability");
+# endif
+#endif
+
+#if @GNULIB_GETSUBOPT@
+/* Assuming *OPTIONP is a comma separated list of elements of the form
+   "token" or "token=value", getsubopt parses the first of these elements.
+   If the first element refers to a "token" that is member of the given
+   NULL-terminated array of tokens:
+     - It replaces the comma with a NUL byte, updates *OPTIONP to point past
+       the first option and the comma, sets *VALUEP to the value of the
+       element (or NULL if it doesn't contain an "=" sign),
+     - It returns the index of the "token" in the given array of tokens.
+   Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
+   For more details see the POSIX:2001 specification.
+   http://www.opengroup.org/susv3xsh/getsubopt.html */
+# if !@HAVE_GETSUBOPT@
+_GL_FUNCDECL_SYS (getsubopt, int,
+                  (char **optionp, char *const *tokens, char **valuep)
+                  _GL_ARG_NONNULL ((1, 2, 3)));
+# endif
+_GL_CXXALIAS_SYS (getsubopt, int,
+                  (char **optionp, char *const *tokens, char **valuep));
+_GL_CXXALIASWARN (getsubopt);
+#elif defined GNULIB_POSIXCHECK
+# undef getsubopt
+# if HAVE_RAW_DECL_GETSUBOPT
+_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
+                 "use gnulib module getsubopt for portability");
+# endif
+#endif
+
+#if @GNULIB_GRANTPT@
+/* Change the ownership and access permission of the slave side of the
+   pseudo-terminal whose master side is specified by FD.  */
+# if !@HAVE_GRANTPT@
+_GL_FUNCDECL_SYS (grantpt, int, (int fd));
+# endif
+_GL_CXXALIAS_SYS (grantpt, int, (int fd));
+_GL_CXXALIASWARN (grantpt);
+#elif defined GNULIB_POSIXCHECK
+# undef grantpt
+# if HAVE_RAW_DECL_GRANTPT
+_GL_WARN_ON_USE (ptsname, "grantpt is not portable - "
+                 "use gnulib module grantpt for portability");
+# endif
+#endif
+
+#if @GNULIB_MALLOC_POSIX@
+# if @REPLACE_MALLOC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef malloc
+#   define malloc rpl_malloc
+#  endif
+_GL_FUNCDECL_RPL (malloc, void *, (size_t size));
+_GL_CXXALIAS_RPL (malloc, void *, (size_t size));
+# else
+_GL_CXXALIAS_SYS (malloc, void *, (size_t size));
+# endif
+_GL_CXXALIASWARN (malloc);
+#elif defined GNULIB_POSIXCHECK
+# undef malloc
+/* Assume malloc is always declared.  */
+_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
+                 "use gnulib module malloc-posix for portability");
+#endif
+
+/* Convert a multibyte character to a wide character.  */
+#if @GNULIB_MBTOWC@
+# if @REPLACE_MBTOWC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mbtowc
+#   define mbtowc rpl_mbtowc
+#  endif
+_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+# else
+_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+# endif
+_GL_CXXALIASWARN (mbtowc);
+#endif
+
+#if @GNULIB_MKDTEMP@
+/* Create a unique temporary directory from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the directory name unique.
+   Returns TEMPLATE, or a null pointer if it cannot get a unique name.
+   The directory is created mode 700.  */
+# if !@HAVE_MKDTEMP@
+_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
+_GL_CXXALIASWARN (mkdtemp);
+#elif defined GNULIB_POSIXCHECK
+# undef mkdtemp
+# if HAVE_RAW_DECL_MKDTEMP
+_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
+                 "use gnulib module mkdtemp for portability");
+# endif
+#endif
+
+#if @GNULIB_MKOSTEMP@
+/* Create a unique temporary file from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the file name unique.
+   The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+   and O_TEXT, O_BINARY (defined in "binary-io.h").
+   The file is then created, with the specified flags, ensuring it didn't exist
+   before.
+   The file is created read-write (mask at least 0600 & ~umask), but it may be
+   world-readable and world-writable (mask 0666 & ~umask), depending on the
+   implementation.
+   Returns the open file descriptor if successful, otherwise -1 and errno
+   set.  */
+# if !@HAVE_MKOSTEMP@
+_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
+                                 _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
+_GL_CXXALIASWARN (mkostemp);
+#elif defined GNULIB_POSIXCHECK
+# undef mkostemp
+# if HAVE_RAW_DECL_MKOSTEMP
+_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
+                 "use gnulib module mkostemp for portability");
+# endif
+#endif
+
+#if @GNULIB_MKOSTEMPS@
+/* Create a unique temporary file from TEMPLATE.
+   The last six characters of TEMPLATE before a suffix of length
+   SUFFIXLEN must be "XXXXXX";
+   they are replaced with a string that makes the file name unique.
+   The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+   and O_TEXT, O_BINARY (defined in "binary-io.h").
+   The file is then created, with the specified flags, ensuring it didn't exist
+   before.
+   The file is created read-write (mask at least 0600 & ~umask), but it may be
+   world-readable and world-writable (mask 0666 & ~umask), depending on the
+   implementation.
+   Returns the open file descriptor if successful, otherwise -1 and errno
+   set.  */
+# if !@HAVE_MKOSTEMPS@
+_GL_FUNCDECL_SYS (mkostemps, int,
+                  (char * /*template*/, int /*suffixlen*/, int /*flags*/)
+                  _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (mkostemps, int,
+                  (char * /*template*/, int /*suffixlen*/, int /*flags*/));
+_GL_CXXALIASWARN (mkostemps);
+#elif defined GNULIB_POSIXCHECK
+# undef mkostemps
+# if HAVE_RAW_DECL_MKOSTEMPS
+_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
+                 "use gnulib module mkostemps for portability");
+# endif
+#endif
+
+#if @GNULIB_MKSTEMP@
+/* Create a unique temporary file from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the file name unique.
+   The file is then created, ensuring it didn't exist before.
+   The file is created read-write (mask at least 0600 & ~umask), but it may be
+   world-readable and world-writable (mask 0666 & ~umask), depending on the
+   implementation.
+   Returns the open file descriptor if successful, otherwise -1 and errno
+   set.  */
+# if @REPLACE_MKSTEMP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define mkstemp rpl_mkstemp
+#  endif
+_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
+# else
+#  if ! @HAVE_MKSTEMP@
+_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
+# endif
+_GL_CXXALIASWARN (mkstemp);
+#elif defined GNULIB_POSIXCHECK
+# undef mkstemp
+# if HAVE_RAW_DECL_MKSTEMP
+_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
+                 "use gnulib module mkstemp for portability");
+# endif
+#endif
+
+#if @GNULIB_MKSTEMPS@
+/* Create a unique temporary file from TEMPLATE.
+   The last six characters of TEMPLATE prior to a suffix of length
+   SUFFIXLEN must be "XXXXXX";
+   they are replaced with a string that makes the file name unique.
+   The file is then created, ensuring it didn't exist before.
+   The file is created read-write (mask at least 0600 & ~umask), but it may be
+   world-readable and world-writable (mask 0666 & ~umask), depending on the
+   implementation.
+   Returns the open file descriptor if successful, otherwise -1 and errno
+   set.  */
+# if !@HAVE_MKSTEMPS@
+_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
+                                 _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
+_GL_CXXALIASWARN (mkstemps);
+#elif defined GNULIB_POSIXCHECK
+# undef mkstemps
+# if HAVE_RAW_DECL_MKSTEMPS
+_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
+                 "use gnulib module mkstemps for portability");
+# endif
+#endif
+
+#if @GNULIB_PTSNAME@
+/* Return the pathname of the pseudo-terminal slave associated with
+   the master FD is open on, or NULL on errors.  */
+# if !@HAVE_PTSNAME@
+_GL_FUNCDECL_SYS (ptsname, char *, (int fd));
+# endif
+_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
+_GL_CXXALIASWARN (ptsname);
+#elif defined GNULIB_POSIXCHECK
+# undef ptsname
+# if HAVE_RAW_DECL_PTSNAME
+_GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
+                 "use gnulib module ptsname for portability");
+# endif
+#endif
+
+#if @GNULIB_PUTENV@
+# if @REPLACE_PUTENV@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef putenv
+#   define putenv rpl_putenv
+#  endif
+_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (putenv, int, (char *string));
+# else
+_GL_CXXALIAS_SYS (putenv, int, (char *string));
+# endif
+_GL_CXXALIASWARN (putenv);
+#endif
+
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+#  ifndef RAND_MAX
+#   define RAND_MAX 2147483647
+#  endif
+# endif
+#endif
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
+                                 _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
+_GL_CXXALIASWARN (random_r);
+#elif defined GNULIB_POSIXCHECK
+# undef random_r
+# if HAVE_RAW_DECL_RANDOM_R
+_GL_WARN_ON_USE (random_r, "random_r is unportable - "
+                 "use gnulib module random_r for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+_GL_FUNCDECL_SYS (srandom_r, int,
+                  (unsigned int seed, struct random_data *rand_state)
+                  _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (srandom_r, int,
+                  (unsigned int seed, struct random_data *rand_state));
+_GL_CXXALIASWARN (srandom_r);
+#elif defined GNULIB_POSIXCHECK
+# undef srandom_r
+# if HAVE_RAW_DECL_SRANDOM_R
+_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
+                 "use gnulib module random_r for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+_GL_FUNCDECL_SYS (initstate_r, int,
+                  (unsigned int seed, char *buf, size_t buf_size,
+                   struct random_data *rand_state)
+                  _GL_ARG_NONNULL ((2, 4)));
+# endif
+_GL_CXXALIAS_SYS (initstate_r, int,
+                  (unsigned int seed, char *buf, size_t buf_size,
+                   struct random_data *rand_state));
+_GL_CXXALIASWARN (initstate_r);
+#elif defined GNULIB_POSIXCHECK
+# undef initstate_r
+# if HAVE_RAW_DECL_INITSTATE_R
+_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
+                 "use gnulib module random_r for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+_GL_FUNCDECL_SYS (setstate_r, int,
+                  (char *arg_state, struct random_data *rand_state)
+                  _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (setstate_r, int,
+                  (char *arg_state, struct random_data *rand_state));
+_GL_CXXALIASWARN (setstate_r);
+#elif defined GNULIB_POSIXCHECK
+# undef setstate_r
+# if HAVE_RAW_DECL_SETSTATE_R
+_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
+                 "use gnulib module random_r for portability");
+# endif
+#endif
+
+
+#if @GNULIB_REALLOC_POSIX@
+# if @REPLACE_REALLOC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef realloc
+#   define realloc rpl_realloc
+#  endif
+_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size));
+_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
+# else
+_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
+# endif
+_GL_CXXALIASWARN (realloc);
+#elif defined GNULIB_POSIXCHECK
+# undef realloc
+/* Assume realloc is always declared.  */
+_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
+                 "use gnulib module realloc-posix for portability");
+#endif
+
+#if @GNULIB_REALPATH@
+# if @REPLACE_REALPATH@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define realpath rpl_realpath
+#  endif
+_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
+                                    _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
+# else
+#  if !@HAVE_REALPATH@
+_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
+                                    _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
+# endif
+_GL_CXXALIASWARN (realpath);
+#elif defined GNULIB_POSIXCHECK
+# undef realpath
+# if HAVE_RAW_DECL_REALPATH
+_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
+                 "canonicalize or canonicalize-lgpl for portability");
+# endif
+#endif
+
+#if @GNULIB_RPMATCH@
+/* Test a user response to a question.
+   Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear.  */
+# if !@HAVE_RPMATCH@
+_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
+_GL_CXXALIASWARN (rpmatch);
+#elif defined GNULIB_POSIXCHECK
+# undef rpmatch
+# if HAVE_RAW_DECL_RPMATCH
+_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
+                 "use gnulib module rpmatch for portability");
+# endif
+#endif
+
+#if @GNULIB_SETENV@
+/* Set NAME to VALUE in the environment.
+   If REPLACE is nonzero, overwrite an existing value.  */
+# if @REPLACE_SETENV@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef setenv
+#   define setenv rpl_setenv
+#  endif
+_GL_FUNCDECL_RPL (setenv, int,
+                  (const char *name, const char *value, int replace)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (setenv, int,
+                  (const char *name, const char *value, int replace));
+# else
+#  if !@HAVE_DECL_SETENV@
+_GL_FUNCDECL_SYS (setenv, int,
+                  (const char *name, const char *value, int replace)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (setenv, int,
+                  (const char *name, const char *value, int replace));
+# endif
+# if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@)
+_GL_CXXALIASWARN (setenv);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef setenv
+# if HAVE_RAW_DECL_SETENV
+_GL_WARN_ON_USE (setenv, "setenv is unportable - "
+                 "use gnulib module setenv for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOD@
+ /* Parse a double from STRING, updating ENDP if appropriate.  */
+# if @REPLACE_STRTOD@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define strtod rpl_strtod
+#  endif
+_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
+                                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
+# else
+#  if !@HAVE_STRTOD@
+_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
+                                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
+# endif
+_GL_CXXALIASWARN (strtod);
+#elif defined GNULIB_POSIXCHECK
+# undef strtod
+# if HAVE_RAW_DECL_STRTOD
+_GL_WARN_ON_USE (strtod, "strtod is unportable - "
+                 "use gnulib module strtod for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOLL@
+/* Parse a signed integer whose textual representation starts at STRING.
+   The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+   it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+   "0x").
+   If ENDPTR is not NULL, the address of the first byte after the integer is
+   stored in *ENDPTR.
+   Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
+   to ERANGE.  */
+# if !@HAVE_STRTOLL@
+_GL_FUNCDECL_SYS (strtoll, long long,
+                  (const char *string, char **endptr, int base)
+                  _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strtoll, long long,
+                  (const char *string, char **endptr, int base));
+_GL_CXXALIASWARN (strtoll);
+#elif defined GNULIB_POSIXCHECK
+# undef strtoll
+# if HAVE_RAW_DECL_STRTOLL
+_GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
+                 "use gnulib module strtoll for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOULL@
+/* Parse an unsigned integer whose textual representation starts at STRING.
+   The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+   it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+   "0x").
+   If ENDPTR is not NULL, the address of the first byte after the integer is
+   stored in *ENDPTR.
+   Upon overflow, the return value is ULLONG_MAX, and errno is set to
+   ERANGE.  */
+# if !@HAVE_STRTOULL@
+_GL_FUNCDECL_SYS (strtoull, unsigned long long,
+                  (const char *string, char **endptr, int base)
+                  _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strtoull, unsigned long long,
+                  (const char *string, char **endptr, int base));
+_GL_CXXALIASWARN (strtoull);
+#elif defined GNULIB_POSIXCHECK
+# undef strtoull
+# if HAVE_RAW_DECL_STRTOULL
+_GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
+                 "use gnulib module strtoull for portability");
+# endif
+#endif
+
+#if @GNULIB_UNLOCKPT@
+/* Unlock the slave side of the pseudo-terminal whose master side is specified
+   by FD, so that it can be opened.  */
+# if !@HAVE_UNLOCKPT@
+_GL_FUNCDECL_SYS (unlockpt, int, (int fd));
+# endif
+_GL_CXXALIAS_SYS (unlockpt, int, (int fd));
+_GL_CXXALIASWARN (unlockpt);
+#elif defined GNULIB_POSIXCHECK
+# undef unlockpt
+# if HAVE_RAW_DECL_UNLOCKPT
+_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - "
+                 "use gnulib module unlockpt for portability");
+# endif
+#endif
+
+#if @GNULIB_UNSETENV@
+/* Remove the variable NAME from the environment.  */
+# if @REPLACE_UNSETENV@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef unsetenv
+#   define unsetenv rpl_unsetenv
+#  endif
+_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
+# else
+#  if !@HAVE_DECL_UNSETENV@
+_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
+# endif
+# if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@)
+_GL_CXXALIASWARN (unsetenv);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef unsetenv
+# if HAVE_RAW_DECL_UNSETENV
+_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
+                 "use gnulib module unsetenv for portability");
+# endif
+#endif
+
+/* Convert a wide character to a multibyte character.  */
+#if @GNULIB_WCTOMB@
+# if @REPLACE_WCTOMB@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wctomb
+#   define wctomb rpl_wctomb
+#  endif
+_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
+_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
+# else
+_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
+# endif
+_GL_CXXALIASWARN (wctomb);
+#endif
+
+
+#endif /* _GL_STDLIB_H */
+#endif /* _GL_STDLIB_H */
+#endif
diff --git a/gnulib/lib/stpcpy.c b/gnulib/lib/stpcpy.c
new file mode 100644 (file)
index 0000000..fa42af4
--- /dev/null
@@ -0,0 +1,49 @@
+/* stpcpy.c -- copy a string and return pointer to end of new string
+   Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2011 Free Software
+   Foundation, Inc.
+
+   NOTE: The canonical source of this file is maintained with the GNU C Library.
+   Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+   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 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/>.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#undef __stpcpy
+#ifdef _LIBC
+# undef stpcpy
+#endif
+
+#ifndef weak_alias
+# define __stpcpy stpcpy
+#endif
+
+/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST.  */
+char *
+__stpcpy (char *dest, const char *src)
+{
+  register char *d = dest;
+  register const char *s = src;
+
+  do
+    *d++ = *s;
+  while (*s++ != '\0');
+
+  return d - 1;
+}
+#ifdef weak_alias
+weak_alias (__stpcpy, stpcpy)
+#endif
diff --git a/gnulib/lib/str-kmp.h b/gnulib/lib/str-kmp.h
new file mode 100644 (file)
index 0000000..b25f4d4
--- /dev/null
@@ -0,0 +1,154 @@
+/* Substring search in a NUL terminated string of UNIT elements,
+   using the Knuth-Morris-Pratt algorithm.
+   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2005.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Before including this file, you need to define:
+     UNIT                    The element type of the needle and haystack.
+     CANON_ELEMENT(c)        A macro that canonicalizes an element right after
+                             it has been fetched from needle or haystack.
+                             The argument is of type UNIT; the result must be
+                             of type UNIT as well.  */
+
+/* Knuth-Morris-Pratt algorithm.
+   See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm
+   HAYSTACK is the NUL terminated string in which to search for.
+   NEEDLE is the string to search for in HAYSTACK, consisting of NEEDLE_LEN
+   units.
+   Return a boolean indicating success:
+   Return true and set *RESULTP if the search was completed.
+   Return false if it was aborted because not enough memory was available.  */
+static bool
+knuth_morris_pratt (const UNIT *haystack,
+                    const UNIT *needle, size_t needle_len,
+                    const UNIT **resultp)
+{
+  size_t m = needle_len;
+
+  /* Allocate the table.  */
+  size_t *table = (size_t *) nmalloca (m, sizeof (size_t));
+  if (table == NULL)
+    return false;
+  /* Fill the table.
+     For 0 < i < m:
+       0 < table[i] <= i is defined such that
+       forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x],
+       and table[i] is as large as possible with this property.
+     This implies:
+     1) For 0 < i < m:
+          If table[i] < i,
+          needle[table[i]..i-1] = needle[0..i-1-table[i]].
+     2) For 0 < i < m:
+          rhaystack[0..i-1] == needle[0..i-1]
+          and exists h, i <= h < m: rhaystack[h] != needle[h]
+          implies
+          forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1].
+     table[0] remains uninitialized.  */
+  {
+    size_t i, j;
+
+    /* i = 1: Nothing to verify for x = 0.  */
+    table[1] = 1;
+    j = 0;
+
+    for (i = 2; i < m; i++)
+      {
+        /* Here: j = i-1 - table[i-1].
+           The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold
+           for x < table[i-1], by induction.
+           Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1].  */
+        UNIT b = CANON_ELEMENT (needle[i - 1]);
+
+        for (;;)
+          {
+            /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x]
+               is known to hold for x < i-1-j.
+               Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1].  */
+            if (b == CANON_ELEMENT (needle[j]))
+              {
+                /* Set table[i] := i-1-j.  */
+                table[i] = i - ++j;
+                break;
+              }
+            /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds
+               for x = i-1-j, because
+                 needle[i-1] != needle[j] = needle[i-1-x].  */
+            if (j == 0)
+              {
+                /* The inequality holds for all possible x.  */
+                table[i] = i;
+                break;
+              }
+            /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds
+               for i-1-j < x < i-1-j+table[j], because for these x:
+                 needle[x..i-2]
+                 = needle[x-(i-1-j)..j-1]
+                 != needle[0..j-1-(x-(i-1-j))]  (by definition of table[j])
+                    = needle[0..i-2-x],
+               hence needle[x..i-1] != needle[0..i-1-x].
+               Furthermore
+                 needle[i-1-j+table[j]..i-2]
+                 = needle[table[j]..j-1]
+                 = needle[0..j-1-table[j]]  (by definition of table[j]).  */
+            j = j - table[j];
+          }
+        /* Here: j = i - table[i].  */
+      }
+  }
+
+  /* Search, using the table to accelerate the processing.  */
+  {
+    size_t j;
+    const UNIT *rhaystack;
+    const UNIT *phaystack;
+
+    *resultp = NULL;
+    j = 0;
+    rhaystack = haystack;
+    phaystack = haystack;
+    /* Invariant: phaystack = rhaystack + j.  */
+    while (*phaystack != 0)
+      if (CANON_ELEMENT (needle[j]) == CANON_ELEMENT (*phaystack))
+        {
+          j++;
+          phaystack++;
+          if (j == m)
+            {
+              /* The entire needle has been found.  */
+              *resultp = rhaystack;
+              break;
+            }
+        }
+      else if (j > 0)
+        {
+          /* Found a match of needle[0..j-1], mismatch at needle[j].  */
+          rhaystack += table[j];
+          j -= table[j];
+        }
+      else
+        {
+          /* Found a mismatch at needle[0] already.  */
+          rhaystack++;
+          phaystack++;
+        }
+  }
+
+  freea (table);
+  return true;
+}
+
+#undef CANON_ELEMENT
diff --git a/gnulib/lib/str-two-way.h b/gnulib/lib/str-two-way.h
new file mode 100644 (file)
index 0000000..08a6cd3
--- /dev/null
@@ -0,0 +1,453 @@
+/* Byte-wise substring search, using the Two-Way algorithm.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Eric Blake <ebb9@byu.net>, 2008.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Before including this file, you need to include <config.h> and
+   <string.h>, and define:
+     RESULT_TYPE             A macro that expands to the return type.
+     AVAILABLE(h, h_l, j, n_l)
+                             A macro that returns nonzero if there are
+                             at least N_L bytes left starting at H[J].
+                             H is 'unsigned char *', H_L, J, and N_L
+                             are 'size_t'; H_L is an lvalue.  For
+                             NUL-terminated searches, H_L can be
+                             modified each iteration to avoid having
+                             to compute the end of H up front.
+
+  For case-insensitivity, you may optionally define:
+     CMP_FUNC(p1, p2, l)     A macro that returns 0 iff the first L
+                             characters of P1 and P2 are equal.
+     CANON_ELEMENT(c)        A macro that canonicalizes an element right after
+                             it has been fetched from one of the two strings.
+                             The argument is an 'unsigned char'; the result
+                             must be an 'unsigned char' as well.
+
+  This file undefines the macros documented above, and defines
+  LONG_NEEDLE_THRESHOLD.
+*/
+
+#include <limits.h>
+#include <stdint.h>
+
+/* We use the Two-Way string matching algorithm (also known as
+   Chrochemore-Perrin), which guarantees linear complexity with
+   constant space.  Additionally, for long needles, we also use a bad
+   character shift table similar to the Boyer-Moore algorithm to
+   achieve improved (potentially sub-linear) performance.
+
+   See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260,
+   http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm,
+   http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf
+*/
+
+/* Point at which computing a bad-byte shift table is likely to be
+   worthwhile.  Small needles should not compute a table, since it
+   adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a
+   speedup no greater than a factor of NEEDLE_LEN.  The larger the
+   needle, the better the potential performance gain.  On the other
+   hand, on non-POSIX systems with CHAR_BIT larger than eight, the
+   memory required for the table is prohibitive.  */
+#if CHAR_BIT < 10
+# define LONG_NEEDLE_THRESHOLD 32U
+#else
+# define LONG_NEEDLE_THRESHOLD SIZE_MAX
+#endif
+
+#ifndef MAX
+# define MAX(a, b) ((a < b) ? (b) : (a))
+#endif
+
+#ifndef CANON_ELEMENT
+# define CANON_ELEMENT(c) c
+#endif
+#ifndef CMP_FUNC
+# define CMP_FUNC memcmp
+#endif
+
+/* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN.
+   Return the index of the first byte in the right half, and set
+   *PERIOD to the global period of the right half.
+
+   The global period of a string is the smallest index (possibly its
+   length) at which all remaining bytes in the string are repetitions
+   of the prefix (the last repetition may be a subset of the prefix).
+
+   When NEEDLE is factored into two halves, a local period is the
+   length of the smallest word that shares a suffix with the left half
+   and shares a prefix with the right half.  All factorizations of a
+   non-empty NEEDLE have a local period of at least 1 and no greater
+   than NEEDLE_LEN.
+
+   A critical factorization has the property that the local period
+   equals the global period.  All strings have at least one critical
+   factorization with the left half smaller than the global period.
+   And while some strings have more than one critical factorization,
+   it is provable that with an ordered alphabet, at least one of the
+   critical factorizations corresponds to a maximal suffix.
+
+   Given an ordered alphabet, a critical factorization can be computed
+   in linear time, with 2 * NEEDLE_LEN comparisons, by computing the
+   shorter of two ordered maximal suffixes.  The ordered maximal
+   suffixes are determined by lexicographic comparison while tracking
+   periodicity.  */
+static size_t
+critical_factorization (const unsigned char *needle, size_t needle_len,
+                        size_t *period)
+{
+  /* Index of last byte of left half, or SIZE_MAX.  */
+  size_t max_suffix, max_suffix_rev;
+  size_t j; /* Index into NEEDLE for current candidate suffix.  */
+  size_t k; /* Offset into current period.  */
+  size_t p; /* Intermediate period.  */
+  unsigned char a, b; /* Current comparison bytes.  */
+
+  /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered
+     out 0-length needles.  */
+  if (needle_len < 3)
+    {
+      *period = 1;
+      return needle_len - 1;
+    }
+
+  /* Invariants:
+     0 <= j < NEEDLE_LEN - 1
+     -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed)
+     min(max_suffix, max_suffix_rev) < global period of NEEDLE
+     1 <= p <= global period of NEEDLE
+     p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j]
+     1 <= k <= p
+  */
+
+  /* Perform lexicographic search.  */
+  max_suffix = SIZE_MAX;
+  j = 0;
+  k = p = 1;
+  while (j + k < needle_len)
+    {
+      a = CANON_ELEMENT (needle[j + k]);
+      b = CANON_ELEMENT (needle[max_suffix + k]);
+      if (a < b)
+        {
+          /* Suffix is smaller, period is entire prefix so far.  */
+          j += k;
+          k = 1;
+          p = j - max_suffix;
+        }
+      else if (a == b)
+        {
+          /* Advance through repetition of the current period.  */
+          if (k != p)
+            ++k;
+          else
+            {
+              j += p;
+              k = 1;
+            }
+        }
+      else /* b < a */
+        {
+          /* Suffix is larger, start over from current location.  */
+          max_suffix = j++;
+          k = p = 1;
+        }
+    }
+  *period = p;
+
+  /* Perform reverse lexicographic search.  */
+  max_suffix_rev = SIZE_MAX;
+  j = 0;
+  k = p = 1;
+  while (j + k < needle_len)
+    {
+      a = CANON_ELEMENT (needle[j + k]);
+      b = CANON_ELEMENT (needle[max_suffix_rev + k]);
+      if (b < a)
+        {
+          /* Suffix is smaller, period is entire prefix so far.  */
+          j += k;
+          k = 1;
+          p = j - max_suffix_rev;
+        }
+      else if (a == b)
+        {
+          /* Advance through repetition of the current period.  */
+          if (k != p)
+            ++k;
+          else
+            {
+              j += p;
+              k = 1;
+            }
+        }
+      else /* a < b */
+        {
+          /* Suffix is larger, start over from current location.  */
+          max_suffix_rev = j++;
+          k = p = 1;
+        }
+    }
+
+  /* Choose the shorter suffix.  Return the index of the first byte of
+     the right half, rather than the last byte of the left half.
+
+     For some examples, 'banana' has two critical factorizations, both
+     exposed by the two lexicographic extreme suffixes of 'anana' and
+     'nana', where both suffixes have a period of 2.  On the other
+     hand, with 'aab' and 'bba', both strings have a single critical
+     factorization of the last byte, with the suffix having a period
+     of 1.  While the maximal lexicographic suffix of 'aab' is 'b',
+     the maximal lexicographic suffix of 'bba' is 'ba', which is not a
+     critical factorization.  Conversely, the maximal reverse
+     lexicographic suffix of 'a' works for 'bba', but not 'ab' for
+     'aab'.  The shorter suffix of the two will always be a critical
+     factorization.  */
+  if (max_suffix_rev + 1 < max_suffix + 1)
+    return max_suffix + 1;
+  *period = p;
+  return max_suffix_rev + 1;
+}
+
+/* Return the first location of non-empty NEEDLE within HAYSTACK, or
+   NULL.  HAYSTACK_LEN is the minimum known length of HAYSTACK.  This
+   method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD.
+   Performance is guaranteed to be linear, with an initialization cost
+   of 2 * NEEDLE_LEN comparisons.
+
+   If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at
+   most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.
+   If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 *
+   HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.  */
+static RETURN_TYPE
+two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
+                      const unsigned char *needle, size_t needle_len)
+{
+  size_t i; /* Index into current byte of NEEDLE.  */
+  size_t j; /* Index into current window of HAYSTACK.  */
+  size_t period; /* The period of the right half of needle.  */
+  size_t suffix; /* The index of the right half of needle.  */
+
+  /* Factor the needle into two halves, such that the left half is
+     smaller than the global period, and the right half is
+     periodic (with a period as large as NEEDLE_LEN - suffix).  */
+  suffix = critical_factorization (needle, needle_len, &period);
+
+  /* Perform the search.  Each iteration compares the right half
+     first.  */
+  if (CMP_FUNC (needle, needle + period, suffix) == 0)
+    {
+      /* Entire needle is periodic; a mismatch in the left half can
+         only advance by the period, so use memory to avoid rescanning
+         known occurrences of the period in the right half.  */
+      size_t memory = 0;
+      j = 0;
+      while (AVAILABLE (haystack, haystack_len, j, needle_len))
+        {
+          /* Scan for matches in right half.  */
+          i = MAX (suffix, memory);
+          while (i < needle_len && (CANON_ELEMENT (needle[i])
+                                    == CANON_ELEMENT (haystack[i + j])))
+            ++i;
+          if (needle_len <= i)
+            {
+              /* Scan for matches in left half.  */
+              i = suffix - 1;
+              while (memory < i + 1 && (CANON_ELEMENT (needle[i])
+                                        == CANON_ELEMENT (haystack[i + j])))
+                --i;
+              if (i + 1 < memory + 1)
+                return (RETURN_TYPE) (haystack + j);
+              /* No match, so remember how many repetitions of period
+                 on the right half were scanned.  */
+              j += period;
+              memory = needle_len - period;
+            }
+          else
+            {
+              j += i - suffix + 1;
+              memory = 0;
+            }
+        }
+    }
+  else
+    {
+      /* The two halves of needle are distinct; no extra memory is
+         required, and any mismatch results in a maximal shift.  */
+      period = MAX (suffix, needle_len - suffix) + 1;
+      j = 0;
+      while (AVAILABLE (haystack, haystack_len, j, needle_len))
+        {
+          /* Scan for matches in right half.  */
+          i = suffix;
+          while (i < needle_len && (CANON_ELEMENT (needle[i])
+                                    == CANON_ELEMENT (haystack[i + j])))
+            ++i;
+          if (needle_len <= i)
+            {
+              /* Scan for matches in left half.  */
+              i = suffix - 1;
+              while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
+                                       == CANON_ELEMENT (haystack[i + j])))
+                --i;
+              if (i == SIZE_MAX)
+                return (RETURN_TYPE) (haystack + j);
+              j += period;
+            }
+          else
+            j += i - suffix + 1;
+        }
+    }
+  return NULL;
+}
+
+/* Return the first location of non-empty NEEDLE within HAYSTACK, or
+   NULL.  HAYSTACK_LEN is the minimum known length of HAYSTACK.  This
+   method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN.
+   Performance is guaranteed to be linear, with an initialization cost
+   of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations.
+
+   If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at
+   most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching,
+   and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible.
+   If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 *
+   HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and
+   sublinear performance is not possible.  */
+static RETURN_TYPE
+two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
+                     const unsigned char *needle, size_t needle_len)
+{
+  size_t i; /* Index into current byte of NEEDLE.  */
+  size_t j; /* Index into current window of HAYSTACK.  */
+  size_t period; /* The period of the right half of needle.  */
+  size_t suffix; /* The index of the right half of needle.  */
+  size_t shift_table[1U << CHAR_BIT]; /* See below.  */
+
+  /* Factor the needle into two halves, such that the left half is
+     smaller than the global period, and the right half is
+     periodic (with a period as large as NEEDLE_LEN - suffix).  */
+  suffix = critical_factorization (needle, needle_len, &period);
+
+  /* Populate shift_table.  For each possible byte value c,
+     shift_table[c] is the distance from the last occurrence of c to
+     the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE.
+     shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0.  */
+  for (i = 0; i < 1U << CHAR_BIT; i++)
+    shift_table[i] = needle_len;
+  for (i = 0; i < needle_len; i++)
+    shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1;
+
+  /* Perform the search.  Each iteration compares the right half
+     first.  */
+  if (CMP_FUNC (needle, needle + period, suffix) == 0)
+    {
+      /* Entire needle is periodic; a mismatch in the left half can
+         only advance by the period, so use memory to avoid rescanning
+         known occurrences of the period in the right half.  */
+      size_t memory = 0;
+      size_t shift;
+      j = 0;
+      while (AVAILABLE (haystack, haystack_len, j, needle_len))
+        {
+          /* Check the last byte first; if it does not match, then
+             shift to the next possible match location.  */
+          shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
+          if (0 < shift)
+            {
+              if (memory && shift < period)
+                {
+                  /* Since needle is periodic, but the last period has
+                     a byte out of place, there can be no match until
+                     after the mismatch.  */
+                  shift = needle_len - period;
+                }
+              memory = 0;
+              j += shift;
+              continue;
+            }
+          /* Scan for matches in right half.  The last byte has
+             already been matched, by virtue of the shift table.  */
+          i = MAX (suffix, memory);
+          while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
+                                        == CANON_ELEMENT (haystack[i + j])))
+            ++i;
+          if (needle_len - 1 <= i)
+            {
+              /* Scan for matches in left half.  */
+              i = suffix - 1;
+              while (memory < i + 1 && (CANON_ELEMENT (needle[i])
+                                        == CANON_ELEMENT (haystack[i + j])))
+                --i;
+              if (i + 1 < memory + 1)
+                return (RETURN_TYPE) (haystack + j);
+              /* No match, so remember how many repetitions of period
+                 on the right half were scanned.  */
+              j += period;
+              memory = needle_len - period;
+            }
+          else
+            {
+              j += i - suffix + 1;
+              memory = 0;
+            }
+        }
+    }
+  else
+    {
+      /* The two halves of needle are distinct; no extra memory is
+         required, and any mismatch results in a maximal shift.  */
+      size_t shift;
+      period = MAX (suffix, needle_len - suffix) + 1;
+      j = 0;
+      while (AVAILABLE (haystack, haystack_len, j, needle_len))
+        {
+          /* Check the last byte first; if it does not match, then
+             shift to the next possible match location.  */
+          shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
+          if (0 < shift)
+            {
+              j += shift;
+              continue;
+            }
+          /* Scan for matches in right half.  The last byte has
+             already been matched, by virtue of the shift table.  */
+          i = suffix;
+          while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
+                                        == CANON_ELEMENT (haystack[i + j])))
+            ++i;
+          if (needle_len - 1 <= i)
+            {
+              /* Scan for matches in left half.  */
+              i = suffix - 1;
+              while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
+                                       == CANON_ELEMENT (haystack[i + j])))
+                --i;
+              if (i == SIZE_MAX)
+                return (RETURN_TYPE) (haystack + j);
+              j += period;
+            }
+          else
+            j += i - suffix + 1;
+        }
+    }
+  return NULL;
+}
+
+#undef AVAILABLE
+#undef CANON_ELEMENT
+#undef CMP_FUNC
+#undef MAX
+#undef RETURN_TYPE
diff --git a/gnulib/lib/strcasecmp.c b/gnulib/lib/strcasecmp.c
new file mode 100644 (file)
index 0000000..9a77bb5
--- /dev/null
@@ -0,0 +1,63 @@
+/* Case-insensitive string comparison function.
+   Copyright (C) 1998-1999, 2005-2007, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+#include <ctype.h>
+#include <limits.h>
+
+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
+
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
+   greater than zero if S1 is lexicographically less than, equal to or greater
+   than S2.
+   Note: This function does not work with multibyte strings!  */
+
+int
+strcasecmp (const char *s1, const char *s2)
+{
+  const unsigned char *p1 = (const unsigned char *) s1;
+  const unsigned char *p2 = (const unsigned char *) s2;
+  unsigned char c1, c2;
+
+  if (p1 == p2)
+    return 0;
+
+  do
+    {
+      c1 = TOLOWER (*p1);
+      c2 = TOLOWER (*p2);
+
+      if (c1 == '\0')
+        break;
+
+      ++p1;
+      ++p2;
+    }
+  while (c1 == c2);
+
+  if (UCHAR_MAX <= INT_MAX)
+    return c1 - c2;
+  else
+    /* On machines where 'char' and 'int' are types of the same size, the
+       difference of two 'unsigned char' values - including the sign bit -
+       doesn't fit in an 'int'.  */
+    return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+}
diff --git a/gnulib/lib/strcasestr.c b/gnulib/lib/strcasestr.c
new file mode 100644 (file)
index 0000000..8f8fd97
--- /dev/null
@@ -0,0 +1,83 @@
+/* Case-insensitive searching in a string.
+   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2005.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+#include <ctype.h>
+#include <stdbool.h>
+#include <strings.h>
+
+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
+
+/* Two-Way algorithm.  */
+#define RETURN_TYPE char *
+#define AVAILABLE(h, h_l, j, n_l)                       \
+  (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l))     \
+   && ((h_l) = (j) + (n_l)))
+#define CANON_ELEMENT(c) TOLOWER (c)
+#define CMP_FUNC(p1, p2, l)                             \
+  strncasecmp ((const char *) (p1), (const char *) (p2), l)
+#include "str-two-way.h"
+
+/* Find the first occurrence of NEEDLE in HAYSTACK, using
+   case-insensitive comparison.  This function gives unspecified
+   results in multibyte locales.  */
+char *
+strcasestr (const char *haystack_start, const char *needle_start)
+{
+  const char *haystack = haystack_start;
+  const char *needle = needle_start;
+  size_t needle_len; /* Length of NEEDLE.  */
+  size_t haystack_len; /* Known minimum length of HAYSTACK.  */
+  bool ok = true; /* True if NEEDLE is prefix of HAYSTACK.  */
+
+  /* Determine length of NEEDLE, and in the process, make sure
+     HAYSTACK is at least as long (no point processing all of a long
+     NEEDLE if HAYSTACK is too short).  */
+  while (*haystack && *needle)
+    {
+      ok &= (TOLOWER ((unsigned char) *haystack)
+             == TOLOWER ((unsigned char) *needle));
+      haystack++;
+      needle++;
+    }
+  if (*needle)
+    return NULL;
+  if (ok)
+    return (char *) haystack_start;
+  needle_len = needle - needle_start;
+  haystack = haystack_start + 1;
+  haystack_len = needle_len - 1;
+
+  /* Perform the search.  Abstract memory is considered to be an array
+     of 'unsigned char' values, not an array of 'char' values.  See
+     ISO C 99 section 6.2.6.1.  */
+  if (needle_len < LONG_NEEDLE_THRESHOLD)
+    return two_way_short_needle ((const unsigned char *) haystack,
+                                 haystack_len,
+                                 (const unsigned char *) needle_start,
+                                 needle_len);
+  return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
+                              (const unsigned char *) needle_start,
+                              needle_len);
+}
+
+#undef LONG_NEEDLE_THRESHOLD
diff --git a/gnulib/lib/strdup.c b/gnulib/lib/strdup.c
new file mode 100644 (file)
index 0000000..ba7e76b
--- /dev/null
@@ -0,0 +1,55 @@
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2011 Free Software
+   Foundation, Inc.
+
+   This file is part of the GNU C Library.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+/* Get specification.  */
+#include <string.h>
+
+#include <stdlib.h>
+
+#undef __strdup
+#ifdef _LIBC
+# undef strdup
+#endif
+
+#ifndef weak_alias
+# define __strdup strdup
+#endif
+
+/* Duplicate S, returning an identical malloc'd string.  */
+char *
+__strdup (const char *s)
+{
+  size_t len = strlen (s) + 1;
+  void *new = malloc (len);
+
+  if (new == NULL)
+    return NULL;
+
+  return (char *) memcpy (new, s, len);
+}
+#ifdef libc_hidden_def
+libc_hidden_def (__strdup)
+#endif
+#ifdef weak_alias
+weak_alias (__strdup, strdup)
+#endif
diff --git a/gnulib/lib/streq.h b/gnulib/lib/streq.h
new file mode 100644 (file)
index 0000000..c7794f6
--- /dev/null
@@ -0,0 +1,176 @@
+/* Optimized string comparison.
+   Copyright (C) 2001-2002, 2007, 2009-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 Bruno Haible <bruno@clisp.org>.  */
+
+#ifndef _GL_STREQ_H
+#define _GL_STREQ_H
+
+#include <string.h>
+
+/* STREQ allows to optimize string comparison with a small literal string.
+     STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+   is semantically equivalent to
+     strcmp (s, "EUC-KR") == 0
+   just faster.  */
+
+/* Help GCC to generate good code for string comparisons with
+   immediate strings. */
+#if defined (__GNUC__) && defined (__OPTIMIZE__)
+
+static inline int
+streq9 (const char *s1, const char *s2)
+{
+  return strcmp (s1 + 9, s2 + 9) == 0;
+}
+
+static inline int
+streq8 (const char *s1, const char *s2, char s28)
+{
+  if (s1[8] == s28)
+    {
+      if (s28 == 0)
+        return 1;
+      else
+        return streq9 (s1, s2);
+    }
+  else
+    return 0;
+}
+
+static inline int
+streq7 (const char *s1, const char *s2, char s27, char s28)
+{
+  if (s1[7] == s27)
+    {
+      if (s27 == 0)
+        return 1;
+      else
+        return streq8 (s1, s2, s28);
+    }
+  else
+    return 0;
+}
+
+static inline int
+streq6 (const char *s1, const char *s2, char s26, char s27, char s28)
+{
+  if (s1[6] == s26)
+    {
+      if (s26 == 0)
+        return 1;
+      else
+        return streq7 (s1, s2, s27, s28);
+    }
+  else
+    return 0;
+}
+
+static inline int
+streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28)
+{
+  if (s1[5] == s25)
+    {
+      if (s25 == 0)
+        return 1;
+      else
+        return streq6 (s1, s2, s26, s27, s28);
+    }
+  else
+    return 0;
+}
+
+static inline int
+streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28)
+{
+  if (s1[4] == s24)
+    {
+      if (s24 == 0)
+        return 1;
+      else
+        return streq5 (s1, s2, s25, s26, s27, s28);
+    }
+  else
+    return 0;
+}
+
+static inline int
+streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+  if (s1[3] == s23)
+    {
+      if (s23 == 0)
+        return 1;
+      else
+        return streq4 (s1, s2, s24, s25, s26, s27, s28);
+    }
+  else
+    return 0;
+}
+
+static inline int
+streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+  if (s1[2] == s22)
+    {
+      if (s22 == 0)
+        return 1;
+      else
+        return streq3 (s1, s2, s23, s24, s25, s26, s27, s28);
+    }
+  else
+    return 0;
+}
+
+static inline int
+streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+  if (s1[1] == s21)
+    {
+      if (s21 == 0)
+        return 1;
+      else
+        return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28);
+    }
+  else
+    return 0;
+}
+
+static inline int
+streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+  if (s1[0] == s20)
+    {
+      if (s20 == 0)
+        return 1;
+      else
+        return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28);
+    }
+  else
+    return 0;
+}
+
+#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+  streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
+
+#else
+
+#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+  (strcmp (s1, s2) == 0)
+
+#endif
+
+#endif /* _GL_STREQ_H */
diff --git a/gnulib/lib/strerror.c b/gnulib/lib/strerror.c
new file mode 100644 (file)
index 0000000..5dae111
--- /dev/null
@@ -0,0 +1,356 @@
+/* strerror.c --- POSIX compatible system error routine
+
+   Copyright (C) 2007-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/>.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#if REPLACE_STRERROR
+
+# include <errno.h>
+# include <stdio.h>
+
+# if GNULIB_defined_ESOCK /* native Windows platforms */
+#  if HAVE_WINSOCK2_H
+#   include <winsock2.h>
+#  endif
+# endif
+
+# include "intprops.h"
+
+/* Use the system functions, not the gnulib overrides in this file.  */
+# undef sprintf
+
+# undef strerror
+# if ! HAVE_DECL_STRERROR
+#  define strerror(n) NULL
+# endif
+
+char *
+rpl_strerror (int n)
+{
+  char const *msg = NULL;
+  /* These error messages are taken from glibc/sysdeps/gnu/errlist.c.  */
+  switch (n)
+    {
+# if GNULIB_defined_ETXTBSY
+    case ETXTBSY:
+      msg = "Text file busy";
+      break;
+# endif
+
+# if GNULIB_defined_ESOCK /* native Windows platforms */
+    /* EWOULDBLOCK is the same as EAGAIN.  */
+    case EINPROGRESS:
+      msg = "Operation now in progress";
+      break;
+    case EALREADY:
+      msg = "Operation already in progress";
+      break;
+    case ENOTSOCK:
+      msg = "Socket operation on non-socket";
+      break;
+    case EDESTADDRREQ:
+      msg = "Destination address required";
+      break;
+    case EMSGSIZE:
+      msg = "Message too long";
+      break;
+    case EPROTOTYPE:
+      msg = "Protocol wrong type for socket";
+      break;
+    case ENOPROTOOPT:
+      msg = "Protocol not available";
+      break;
+    case EPROTONOSUPPORT:
+      msg = "Protocol not supported";
+      break;
+    case ESOCKTNOSUPPORT:
+      msg = "Socket type not supported";
+      break;
+    case EOPNOTSUPP:
+      msg = "Operation not supported";
+      break;
+    case EPFNOSUPPORT:
+      msg = "Protocol family not supported";
+      break;
+    case EAFNOSUPPORT:
+      msg = "Address family not supported by protocol";
+      break;
+    case EADDRINUSE:
+      msg = "Address already in use";
+      break;
+    case EADDRNOTAVAIL:
+      msg = "Cannot assign requested address";
+      break;
+    case ENETDOWN:
+      msg = "Network is down";
+      break;
+    case ENETUNREACH:
+      msg = "Network is unreachable";
+      break;
+    case ENETRESET:
+      msg = "Network dropped connection on reset";
+      break;
+    case ECONNABORTED:
+      msg = "Software caused connection abort";
+      break;
+    case ECONNRESET:
+      msg = "Connection reset by peer";
+      break;
+    case ENOBUFS:
+      msg = "No buffer space available";
+      break;
+    case EISCONN:
+      msg = "Transport endpoint is already connected";
+      break;
+    case ENOTCONN:
+      msg = "Transport endpoint is not connected";
+      break;
+    case ESHUTDOWN:
+      msg = "Cannot send after transport endpoint shutdown";
+      break;
+    case ETOOMANYREFS:
+      msg = "Too many references: cannot splice";
+      break;
+    case ETIMEDOUT:
+      msg = "Connection timed out";
+      break;
+    case ECONNREFUSED:
+      msg = "Connection refused";
+      break;
+    case ELOOP:
+      msg = "Too many levels of symbolic links";
+      break;
+    case EHOSTDOWN:
+      msg = "Host is down";
+      break;
+    case EHOSTUNREACH:
+      msg = "No route to host";
+      break;
+    case EPROCLIM:
+      msg = "Too many processes";
+      break;
+    case EUSERS:
+      msg = "Too many users";
+      break;
+    case EDQUOT:
+      msg = "Disk quota exceeded";
+      break;
+    case ESTALE:
+      msg = "Stale NFS file handle";
+      break;
+    case EREMOTE:
+      msg = "Object is remote";
+      break;
+#  if HAVE_WINSOCK2_H
+    /* WSA_INVALID_HANDLE maps to EBADF */
+    /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
+    /* WSA_INVALID_PARAMETER maps to EINVAL */
+    case WSA_OPERATION_ABORTED:
+      msg = "Overlapped operation aborted";
+      break;
+    case WSA_IO_INCOMPLETE:
+      msg = "Overlapped I/O event object not in signaled state";
+      break;
+    case WSA_IO_PENDING:
+      msg = "Overlapped operations will complete later";
+      break;
+    /* WSAEINTR maps to EINTR */
+    /* WSAEBADF maps to EBADF */
+    /* WSAEACCES maps to EACCES */
+    /* WSAEFAULT maps to EFAULT */
+    /* WSAEINVAL maps to EINVAL */
+    /* WSAEMFILE maps to EMFILE */
+    /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
+    /* WSAEINPROGRESS is EINPROGRESS */
+    /* WSAEALREADY is EALREADY */
+    /* WSAENOTSOCK is ENOTSOCK */
+    /* WSAEDESTADDRREQ is EDESTADDRREQ */
+    /* WSAEMSGSIZE is EMSGSIZE */
+    /* WSAEPROTOTYPE is EPROTOTYPE */
+    /* WSAENOPROTOOPT is ENOPROTOOPT */
+    /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
+    /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
+    /* WSAEOPNOTSUPP is EOPNOTSUPP */
+    /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
+    /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
+    /* WSAEADDRINUSE is EADDRINUSE */
+    /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
+    /* WSAENETDOWN is ENETDOWN */
+    /* WSAENETUNREACH is ENETUNREACH */
+    /* WSAENETRESET is ENETRESET */
+    /* WSAECONNABORTED is ECONNABORTED */
+    /* WSAECONNRESET is ECONNRESET */
+    /* WSAENOBUFS is ENOBUFS */
+    /* WSAEISCONN is EISCONN */
+    /* WSAENOTCONN is ENOTCONN */
+    /* WSAESHUTDOWN is ESHUTDOWN */
+    /* WSAETOOMANYREFS is ETOOMANYREFS */
+    /* WSAETIMEDOUT is ETIMEDOUT */
+    /* WSAECONNREFUSED is ECONNREFUSED */
+    /* WSAELOOP is ELOOP */
+    /* WSAENAMETOOLONG maps to ENAMETOOLONG */
+    /* WSAEHOSTDOWN is EHOSTDOWN */
+    /* WSAEHOSTUNREACH is EHOSTUNREACH */
+    /* WSAENOTEMPTY maps to ENOTEMPTY */
+    /* WSAEPROCLIM is EPROCLIM */
+    /* WSAEUSERS is EUSERS */
+    /* WSAEDQUOT is EDQUOT */
+    /* WSAESTALE is ESTALE */
+    /* WSAEREMOTE is EREMOTE */
+    case WSASYSNOTREADY:
+      msg = "Network subsystem is unavailable";
+      break;
+    case WSAVERNOTSUPPORTED:
+      msg = "Winsock.dll version out of range";
+      break;
+    case WSANOTINITIALISED:
+      msg = "Successful WSAStartup not yet performed";
+      break;
+    case WSAEDISCON:
+      msg = "Graceful shutdown in progress";
+      break;
+    case WSAENOMORE: case WSA_E_NO_MORE:
+      msg = "No more results";
+      break;
+    case WSAECANCELLED: case WSA_E_CANCELLED:
+      msg = "Call was canceled";
+      break;
+    case WSAEINVALIDPROCTABLE:
+      msg = "Procedure call table is invalid";
+      break;
+    case WSAEINVALIDPROVIDER:
+      msg = "Service provider is invalid";
+      break;
+    case WSAEPROVIDERFAILEDINIT:
+      msg = "Service provider failed to initialize";
+      break;
+    case WSASYSCALLFAILURE:
+      msg = "System call failure";
+      break;
+    case WSASERVICE_NOT_FOUND:
+      msg = "Service not found";
+      break;
+    case WSATYPE_NOT_FOUND:
+      msg = "Class type not found";
+      break;
+    case WSAEREFUSED:
+      msg = "Database query was refused";
+      break;
+    case WSAHOST_NOT_FOUND:
+      msg = "Host not found";
+      break;
+    case WSATRY_AGAIN:
+      msg = "Nonauthoritative host not found";
+      break;
+    case WSANO_RECOVERY:
+      msg = "Nonrecoverable error";
+      break;
+    case WSANO_DATA:
+      msg = "Valid name, no data record of requested type";
+      break;
+    /* WSA_QOS_* omitted */
+#  endif
+# endif
+
+# if GNULIB_defined_ENOMSG
+    case ENOMSG:
+      msg = "No message of desired type";
+      break;
+# endif
+
+# if GNULIB_defined_EIDRM
+    case EIDRM:
+      msg = "Identifier removed";
+      break;
+# endif
+
+# if GNULIB_defined_ENOLINK
+    case ENOLINK:
+      msg = "Link has been severed";
+      break;
+# endif
+
+# if GNULIB_defined_EPROTO
+    case EPROTO:
+      msg = "Protocol error";
+      break;
+# endif
+
+# if GNULIB_defined_EMULTIHOP
+    case EMULTIHOP:
+      msg = "Multihop attempted";
+      break;
+# endif
+
+# if GNULIB_defined_EBADMSG
+    case EBADMSG:
+      msg = "Bad message";
+      break;
+# endif
+
+# if GNULIB_defined_EOVERFLOW
+    case EOVERFLOW:
+      msg = "Value too large for defined data type";
+      break;
+# endif
+
+# if GNULIB_defined_ENOTSUP
+    case ENOTSUP:
+      msg = "Not supported";
+      break;
+# endif
+
+# if GNULIB_defined_ESTALE
+    case ESTALE:
+      msg = "Stale NFS file handle";
+      break;
+# endif
+
+# if GNULIB_defined_EDQUOT
+    case EDQUOT:
+      msg = "Disk quota exceeded";
+      break;
+# endif
+
+# if GNULIB_defined_ECANCELED
+    case ECANCELED:
+      msg = "Operation canceled";
+      break;
+# endif
+    }
+
+  if (msg)
+    return (char *) msg;
+
+  {
+    char *result = strerror (n);
+
+    if (result == NULL || result[0] == '\0')
+      {
+        static char const fmt[] = "Unknown error (%d)";
+        static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)];
+        sprintf (msg_buf, fmt, n);
+        return msg_buf;
+      }
+
+    return result;
+  }
+}
+
+#endif
diff --git a/gnulib/lib/strftime.c b/gnulib/lib/strftime.c
new file mode 100644 (file)
index 0000000..acebc9a
--- /dev/null
@@ -0,0 +1,1469 @@
+/* Copyright (C) 1991-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+
+   NOTE: The canonical source of this file is maintained with the GNU C Library.
+   Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+   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/>.  */
+
+#ifdef _LIBC
+# define HAVE_STRUCT_ERA_ENTRY 1
+# define HAVE_TM_GMTOFF 1
+# define HAVE_TM_ZONE 1
+# define HAVE_TZNAME 1
+# define HAVE_TZSET 1
+# include "../locale/localeinfo.h"
+#else
+# include <config.h>
+# if FPRINTFTIME
+#  include "ignore-value.h"
+#  include "fprintftime.h"
+# else
+#  include "strftime.h"
+# endif
+#endif
+
+#include <ctype.h>
+#include <time.h>
+
+#if HAVE_TZNAME && !HAVE_DECL_TZNAME
+extern char *tzname[];
+#endif
+
+/* Do multibyte processing if multibytes are supported, unless
+   multibyte sequences are safe in formats.  Multibyte sequences are
+   safe if they cannot contain byte sequences that look like format
+   conversion specifications.  The multibyte encodings used by the
+   C library on the various platforms (UTF-8, GB2312, GBK, CP936,
+   GB18030, EUC-TW, BIG5, BIG5-HKSCS, CP950, EUC-JP, EUC-KR, CP949,
+   SHIFT_JIS, CP932, JOHAB) are safe for formats, because the byte '%'
+   cannot occur in a multibyte character except in the first byte.
+
+   The DEC-HANYU encoding used on OSF/1 is not safe for formats, but
+   this encoding has never been seen in real-life use, so we ignore
+   it.  */
+#if !(defined __osf__ && 0)
+# define MULTIBYTE_IS_FORMAT_SAFE 1
+#endif
+#define DO_MULTIBYTE (! MULTIBYTE_IS_FORMAT_SAFE)
+
+#if DO_MULTIBYTE
+# include <wchar.h>
+  static const mbstate_t mbstate_zero;
+#endif
+
+#include <limits.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef COMPILE_WIDE
+# include <endian.h>
+# define CHAR_T wchar_t
+# define UCHAR_T unsigned int
+# define L_(Str) L##Str
+# define NLW(Sym) _NL_W##Sym
+
+# define MEMCPY(d, s, n) __wmemcpy (d, s, n)
+# define STRLEN(s) __wcslen (s)
+
+#else
+# define CHAR_T char
+# define UCHAR_T unsigned char
+# define L_(Str) Str
+# define NLW(Sym) Sym
+
+# define MEMCPY(d, s, n) memcpy (d, s, n)
+# define STRLEN(s) strlen (s)
+
+#endif
+
+/* Shift A right by B bits portably, by dividing A by 2**B and
+   truncating towards minus infinity.  A and B should be free of side
+   effects, and B should be in the range 0 <= B <= INT_BITS - 2, where
+   INT_BITS is the number of useful bits in an int.  GNU code can
+   assume that INT_BITS is at least 32.
+
+   ISO C99 says that A >> B is implementation-defined if A < 0.  Some
+   implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift
+   right in the usual way when A < 0, so SHR falls back on division if
+   ordinary A >> B doesn't seem to be the usual signed shift.  */
+#define SHR(a, b)       \
+  (-1 >> 1 == -1        \
+   ? (a) >> (b)         \
+   : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
+
+/* Bound on length of the string representing an integer type or expression T.
+   Subtract 1 for the sign bit if t is signed; log10 (2.0) < 146/485;
+   add 1 for integer division truncation; add 1 more for a minus sign
+   if needed.  */
+#define INT_STRLEN_BOUND(t) \
+  ((sizeof (t) * CHAR_BIT - 1) * 146 / 485 + 2)
+
+#define TM_YEAR_BASE 1900
+
+#ifndef __isleap
+/* Nonzero if YEAR is a leap year (every 4 years,
+   except every 100th isn't, and every 400th is).  */
+# define __isleap(year) \
+  ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
+#endif
+
+
+#ifdef _LIBC
+# define tzname __tzname
+# define tzset __tzset
+#endif
+
+#if !HAVE_TM_GMTOFF
+/* Portable standalone applications should supply a "time.h" that
+   declares a POSIX-compliant localtime_r, for the benefit of older
+   implementations that lack localtime_r or have a nonstandard one.
+   See the gnulib time_r module for one way to implement this.  */
+# undef __gmtime_r
+# undef __localtime_r
+# define __gmtime_r gmtime_r
+# define __localtime_r localtime_r
+#endif
+
+
+#ifndef FPRINTFTIME
+# define FPRINTFTIME 0
+#endif
+
+#if FPRINTFTIME
+# define STREAM_OR_CHAR_T FILE
+# define STRFTIME_ARG(x) /* empty */
+#else
+# define STREAM_OR_CHAR_T CHAR_T
+# define STRFTIME_ARG(x) x,
+#endif
+
+#if FPRINTFTIME
+# define memset_byte(P, Len, Byte) \
+  do { size_t _i; for (_i = 0; _i < Len; _i++) fputc (Byte, P); } while (0)
+# define memset_space(P, Len) memset_byte (P, Len, ' ')
+# define memset_zero(P, Len) memset_byte (P, Len, '0')
+#elif defined COMPILE_WIDE
+# define memset_space(P, Len) (wmemset (P, L' ', Len), (P) += (Len))
+# define memset_zero(P, Len) (wmemset (P, L'0', Len), (P) += (Len))
+#else
+# define memset_space(P, Len) (memset (P, ' ', Len), (P) += (Len))
+# define memset_zero(P, Len) (memset (P, '0', Len), (P) += (Len))
+#endif
+
+#if FPRINTFTIME
+# define advance(P, N)
+#else
+# define advance(P, N) ((P) += (N))
+#endif
+
+#define add(n, f)                                                             \
+  do                                                                          \
+    {                                                                         \
+      size_t _n = (n);                                                        \
+      size_t _w = (width < 0 ? 0 : width);                                    \
+      size_t _incr = _n < _w ? _w : _n;                                       \
+      if (_incr >= maxsize - i)                                               \
+        return 0;                                                             \
+      if (p)                                                                  \
+        {                                                                     \
+          if (digits == 0 && _n < _w)                                         \
+            {                                                                 \
+              size_t _delta = width - _n;                                     \
+              if (pad == L_('0'))                                             \
+                memset_zero (p, _delta);                                      \
+              else                                                            \
+                memset_space (p, _delta);                                     \
+            }                                                                 \
+          f;                                                                  \
+          advance (p, _n);                                                    \
+        }                                                                     \
+      i += _incr;                                                             \
+    } while (0)
+
+#if FPRINTFTIME
+# define add1(C) add (1, fputc (C, p))
+#else
+# define add1(C) add (1, *p = C)
+#endif
+
+#if FPRINTFTIME
+# define cpy(n, s) \
+    add ((n),                                                                 \
+     do                                                                       \
+       {                                                                      \
+         if (to_lowcase)                                                      \
+           fwrite_lowcase (p, (s), _n);                                       \
+         else if (to_uppcase)                                                 \
+           fwrite_uppcase (p, (s), _n);                                       \
+         else                                                                 \
+           {                                                                  \
+             /* We are ignoring the value of fwrite here, in spite of the     \
+                fact that technically, that may not be valid: the fwrite      \
+                specification in POSIX 2008 defers to that of fputc, which    \
+                is intended to be consistent with the one from ISO C,         \
+                which permits failure due to ENOMEM *without* setting the     \
+                stream's error indicator.  */                                 \
+             ignore_value (fwrite ((s), _n, 1, p));                           \
+           }                                                                  \
+       }                                                                      \
+     while (0)                                                                \
+    )
+#else
+# define cpy(n, s)                                                            \
+    add ((n),                                                                 \
+         if (to_lowcase)                                                      \
+           memcpy_lowcase (p, (s), _n LOCALE_ARG);                            \
+         else if (to_uppcase)                                                 \
+           memcpy_uppcase (p, (s), _n LOCALE_ARG);                            \
+         else                                                                 \
+           MEMCPY ((void *) p, (void const *) (s), _n))
+#endif
+
+#ifdef COMPILE_WIDE
+# ifndef USE_IN_EXTENDED_LOCALE_MODEL
+#  undef __mbsrtowcs_l
+#  define __mbsrtowcs_l(d, s, l, st, loc) __mbsrtowcs (d, s, l, st)
+# endif
+# define widen(os, ws, l) \
+  {                                                                           \
+    mbstate_t __st;                                                           \
+    const char *__s = os;                                                     \
+    memset (&__st, '\0', sizeof (__st));                                      \
+    l = __mbsrtowcs_l (NULL, &__s, 0, &__st, loc);                            \
+    ws = (wchar_t *) alloca ((l + 1) * sizeof (wchar_t));                     \
+    (void) __mbsrtowcs_l (ws, &__s, l, &__st, loc);                           \
+  }
+#endif
+
+
+#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL
+/* We use this code also for the extended locale handling where the
+   function gets as an additional argument the locale which has to be
+   used.  To access the values we have to redefine the _NL_CURRENT
+   macro.  */
+# define strftime               __strftime_l
+# define wcsftime               __wcsftime_l
+# undef _NL_CURRENT
+# define _NL_CURRENT(category, item) \
+  (current->values[_NL_ITEM_INDEX (item)].string)
+# define LOCALE_ARG , loc
+# define LOCALE_PARAM_PROTO , __locale_t loc
+# define HELPER_LOCALE_ARG  , current
+#else
+# define LOCALE_PARAM_PROTO
+# define LOCALE_ARG
+# ifdef _LIBC
+#  define HELPER_LOCALE_ARG , _NL_CURRENT_DATA (LC_TIME)
+# else
+#  define HELPER_LOCALE_ARG
+# endif
+#endif
+
+#ifdef COMPILE_WIDE
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+#  define TOUPPER(Ch, L) __towupper_l (Ch, L)
+#  define TOLOWER(Ch, L) __towlower_l (Ch, L)
+# else
+#  define TOUPPER(Ch, L) towupper (Ch)
+#  define TOLOWER(Ch, L) towlower (Ch)
+# endif
+#else
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+#  define TOUPPER(Ch, L) __toupper_l (Ch, L)
+#  define TOLOWER(Ch, L) __tolower_l (Ch, L)
+# else
+#  define TOUPPER(Ch, L) toupper (Ch)
+#  define TOLOWER(Ch, L) tolower (Ch)
+# endif
+#endif
+/* We don't use `isdigit' here since the locale dependent
+   interpretation is not what we want here.  We only need to accept
+   the arabic digits in the ASCII range.  One day there is perhaps a
+   more reliable way to accept other sets of digits.  */
+#define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9)
+
+#if FPRINTFTIME
+static void
+fwrite_lowcase (FILE *fp, const CHAR_T *src, size_t len)
+{
+  while (len-- > 0)
+    {
+      fputc (TOLOWER ((UCHAR_T) *src, loc), fp);
+      ++src;
+    }
+}
+
+static void
+fwrite_uppcase (FILE *fp, const CHAR_T *src, size_t len)
+{
+  while (len-- > 0)
+    {
+      fputc (TOUPPER ((UCHAR_T) *src, loc), fp);
+      ++src;
+    }
+}
+#else
+static CHAR_T *
+memcpy_lowcase (CHAR_T *dest, const CHAR_T *src,
+                size_t len LOCALE_PARAM_PROTO)
+{
+  while (len-- > 0)
+    dest[len] = TOLOWER ((UCHAR_T) src[len], loc);
+  return dest;
+}
+
+static CHAR_T *
+memcpy_uppcase (CHAR_T *dest, const CHAR_T *src,
+                size_t len LOCALE_PARAM_PROTO)
+{
+  while (len-- > 0)
+    dest[len] = TOUPPER ((UCHAR_T) src[len], loc);
+  return dest;
+}
+#endif
+
+
+#if ! HAVE_TM_GMTOFF
+/* Yield the difference between *A and *B,
+   measured in seconds, ignoring leap seconds.  */
+# define tm_diff ftime_tm_diff
+static int
+tm_diff (const struct tm *a, const struct tm *b)
+{
+  /* Compute intervening leap days correctly even if year is negative.
+     Take care to avoid int overflow in leap day calculations,
+     but it's OK to assume that A and B are close to each other.  */
+  int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3);
+  int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3);
+  int a100 = a4 / 25 - (a4 % 25 < 0);
+  int b100 = b4 / 25 - (b4 % 25 < 0);
+  int a400 = SHR (a100, 2);
+  int b400 = SHR (b100, 2);
+  int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
+  int years = a->tm_year - b->tm_year;
+  int days = (365 * years + intervening_leap_days
+              + (a->tm_yday - b->tm_yday));
+  return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour))
+                + (a->tm_min - b->tm_min))
+          + (a->tm_sec - b->tm_sec));
+}
+#endif /* ! HAVE_TM_GMTOFF */
+
+
+
+/* The number of days from the first day of the first ISO week of this
+   year to the year day YDAY with week day WDAY.  ISO weeks start on
+   Monday; the first ISO week has the year's first Thursday.  YDAY may
+   be as small as YDAY_MINIMUM.  */
+#define ISO_WEEK_START_WDAY 1 /* Monday */
+#define ISO_WEEK1_WDAY 4 /* Thursday */
+#define YDAY_MINIMUM (-366)
+#ifdef __GNUC__
+__inline__
+#endif
+static int
+iso_week_days (int yday, int wday)
+{
+  /* Add enough to the first operand of % to make it nonnegative.  */
+  int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7;
+  return (yday
+          - (yday - wday + ISO_WEEK1_WDAY + big_enough_multiple_of_7) % 7
+          + ISO_WEEK1_WDAY - ISO_WEEK_START_WDAY);
+}
+
+
+/* When compiling this file, GNU applications can #define my_strftime
+   to a symbol (typically nstrftime) to get an extended strftime with
+   extra arguments UT and NS.  Emacs is a special case for now, but
+   this Emacs-specific code can be removed once Emacs's config.h
+   defines my_strftime.  */
+#if defined emacs && !defined my_strftime
+# define my_strftime nstrftime
+#endif
+
+#if FPRINTFTIME
+# undef my_strftime
+# define my_strftime fprintftime
+#endif
+
+#ifdef my_strftime
+# define extra_args , ut, ns
+# define extra_args_spec , int ut, int ns
+#else
+# if defined COMPILE_WIDE
+#  define my_strftime wcsftime
+#  define nl_get_alt_digit _nl_get_walt_digit
+# else
+#  define my_strftime strftime
+#  define nl_get_alt_digit _nl_get_alt_digit
+# endif
+# define extra_args
+# define extra_args_spec
+/* We don't have this information in general.  */
+# define ut 0
+# define ns 0
+#endif
+
+
+/* Just like my_strftime, below, but with one more parameter, UPCASE,
+   to indicate that the result should be converted to upper case.  */
+static size_t
+strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
+                STRFTIME_ARG (size_t maxsize)
+                const CHAR_T *format,
+                const struct tm *tp extra_args_spec LOCALE_PARAM_PROTO)
+{
+#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL
+  struct locale_data *const current = loc->__locales[LC_TIME];
+#endif
+#if FPRINTFTIME
+  size_t maxsize = (size_t) -1;
+#endif
+
+  int hour12 = tp->tm_hour;
+#ifdef _NL_CURRENT
+  /* We cannot make the following values variables since we must delay
+     the evaluation of these values until really needed since some
+     expressions might not be valid in every situation.  The `struct tm'
+     might be generated by a strptime() call that initialized
+     only a few elements.  Dereference the pointers only if the format
+     requires this.  Then it is ok to fail if the pointers are invalid.  */
+# define a_wkday \
+  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday))
+# define f_wkday \
+  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday))
+# define a_month \
+  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon))
+# define f_month \
+  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon))
+# define ampm \
+  ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11                    \
+                                 ? NLW(PM_STR) : NLW(AM_STR)))
+
+# define aw_len STRLEN (a_wkday)
+# define am_len STRLEN (a_month)
+# define ap_len STRLEN (ampm)
+#endif
+  const char *zone;
+  size_t i = 0;
+  STREAM_OR_CHAR_T *p = s;
+  const CHAR_T *f;
+#if DO_MULTIBYTE && !defined COMPILE_WIDE
+  const char *format_end = NULL;
+#endif
+
+#if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST
+  /* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned
+     by localtime.  On such systems, we must either use the tzset and
+     localtime wrappers to work around the bug (which sets
+     HAVE_RUN_TZSET_TEST) or make a copy of the structure.  */
+  struct tm copy = *tp;
+  tp = &copy;
+#endif
+
+  zone = NULL;
+#if HAVE_TM_ZONE
+  /* The POSIX test suite assumes that setting
+     the environment variable TZ to a new value before calling strftime()
+     will influence the result (the %Z format) even if the information in
+     TP is computed with a totally different time zone.
+     This is bogus: though POSIX allows bad behavior like this,
+     POSIX does not require it.  Do the right thing instead.  */
+  zone = (const char *) tp->tm_zone;
+#endif
+#if HAVE_TZNAME
+  if (ut)
+    {
+      if (! (zone && *zone))
+        zone = "GMT";
+    }
+  else
+    {
+      /* POSIX.1 requires that local time zone information be used as
+         though strftime called tzset.  */
+# if HAVE_TZSET
+      tzset ();
+# endif
+    }
+#endif
+
+  if (hour12 > 12)
+    hour12 -= 12;
+  else
+    if (hour12 == 0)
+      hour12 = 12;
+
+  for (f = format; *f != '\0'; ++f)
+    {
+      int pad = 0;              /* Padding for number ('-', '_', or 0).  */
+      int modifier;             /* Field modifier ('E', 'O', or 0).  */
+      int digits = 0;           /* Max digits for numeric format.  */
+      int number_value;         /* Numeric value to be printed.  */
+      unsigned int u_number_value; /* (unsigned int) number_value.  */
+      bool negative_number;     /* The number is negative.  */
+      bool always_output_a_sign; /* +/- should always be output.  */
+      int tz_colon_mask;        /* Bitmask of where ':' should appear.  */
+      const CHAR_T *subfmt;
+      CHAR_T sign_char;
+      CHAR_T *bufp;
+      CHAR_T buf[1
+                 + 2 /* for the two colons in a %::z or %:::z time zone */
+                 + (sizeof (int) < sizeof (time_t)
+                    ? INT_STRLEN_BOUND (time_t)
+                    : INT_STRLEN_BOUND (int))];
+      int width = -1;
+      bool to_lowcase = false;
+      bool to_uppcase = upcase;
+      size_t colons;
+      bool change_case = false;
+      int format_char;
+
+#if DO_MULTIBYTE && !defined COMPILE_WIDE
+      switch (*f)
+        {
+        case L_('%'):
+          break;
+
+        case L_('\b'): case L_('\t'): case L_('\n'):
+        case L_('\v'): case L_('\f'): case L_('\r'):
+        case L_(' '): case L_('!'): case L_('"'): case L_('#'): case L_('&'):
+        case L_('\''): case L_('('): case L_(')'): case L_('*'): case L_('+'):
+        case L_(','): case L_('-'): case L_('.'): case L_('/'): case L_('0'):
+        case L_('1'): case L_('2'): case L_('3'): case L_('4'): case L_('5'):
+        case L_('6'): case L_('7'): case L_('8'): case L_('9'): case L_(':'):
+        case L_(';'): case L_('<'): case L_('='): case L_('>'): case L_('?'):
+        case L_('A'): case L_('B'): case L_('C'): case L_('D'): case L_('E'):
+        case L_('F'): case L_('G'): case L_('H'): case L_('I'): case L_('J'):
+        case L_('K'): case L_('L'): case L_('M'): case L_('N'): case L_('O'):
+        case L_('P'): case L_('Q'): case L_('R'): case L_('S'): case L_('T'):
+        case L_('U'): case L_('V'): case L_('W'): case L_('X'): case L_('Y'):
+        case L_('Z'): case L_('['): case L_('\\'): case L_(']'): case L_('^'):
+        case L_('_'): case L_('a'): case L_('b'): case L_('c'): case L_('d'):
+        case L_('e'): case L_('f'): case L_('g'): case L_('h'): case L_('i'):
+        case L_('j'): case L_('k'): case L_('l'): case L_('m'): case L_('n'):
+        case L_('o'): case L_('p'): case L_('q'): case L_('r'): case L_('s'):
+        case L_('t'): case L_('u'): case L_('v'): case L_('w'): case L_('x'):
+        case L_('y'): case L_('z'): case L_('{'): case L_('|'): case L_('}'):
+        case L_('~'):
+          /* The C Standard requires these 98 characters (plus '%') to
+             be in the basic execution character set.  None of these
+             characters can start a multibyte sequence, so they need
+             not be analyzed further.  */
+          add1 (*f);
+          continue;
+
+        default:
+          /* Copy this multibyte sequence until we reach its end, find
+             an error, or come back to the initial shift state.  */
+          {
+            mbstate_t mbstate = mbstate_zero;
+            size_t len = 0;
+            size_t fsize;
+
+            if (! format_end)
+              format_end = f + strlen (f) + 1;
+            fsize = format_end - f;
+
+            do
+              {
+                size_t bytes = mbrlen (f + len, fsize - len, &mbstate);
+
+                if (bytes == 0)
+                  break;
+
+                if (bytes == (size_t) -2)
+                  {
+                    len += strlen (f + len);
+                    break;
+                  }
+
+                if (bytes == (size_t) -1)
+                  {
+                    len++;
+                    break;
+                  }
+
+                len += bytes;
+              }
+            while (! mbsinit (&mbstate));
+
+            cpy (len, f);
+            f += len - 1;
+            continue;
+          }
+        }
+
+#else /* ! DO_MULTIBYTE */
+
+      /* Either multibyte encodings are not supported, they are
+         safe for formats, so any non-'%' byte can be copied through,
+         or this is the wide character version.  */
+      if (*f != L_('%'))
+        {
+          add1 (*f);
+          continue;
+        }
+
+#endif /* ! DO_MULTIBYTE */
+
+      /* Check for flags that can modify a format.  */
+      while (1)
+        {
+          switch (*++f)
+            {
+              /* This influences the number formats.  */
+            case L_('_'):
+            case L_('-'):
+            case L_('0'):
+              pad = *f;
+              continue;
+
+              /* This changes textual output.  */
+            case L_('^'):
+              to_uppcase = true;
+              continue;
+            case L_('#'):
+              change_case = true;
+              continue;
+
+            default:
+              break;
+            }
+          break;
+        }
+
+      /* As a GNU extension we allow to specify the field width.  */
+      if (ISDIGIT (*f))
+        {
+          width = 0;
+          do
+            {
+              if (width > INT_MAX / 10
+                  || (width == INT_MAX / 10 && *f - L_('0') > INT_MAX % 10))
+                /* Avoid overflow.  */
+                width = INT_MAX;
+              else
+                {
+                  width *= 10;
+                  width += *f - L_('0');
+                }
+              ++f;
+            }
+          while (ISDIGIT (*f));
+        }
+
+      /* Check for modifiers.  */
+      switch (*f)
+        {
+        case L_('E'):
+        case L_('O'):
+          modifier = *f++;
+          break;
+
+        default:
+          modifier = 0;
+          break;
+        }
+
+      /* Now do the specified format.  */
+      format_char = *f;
+      switch (format_char)
+        {
+#define DO_NUMBER(d, v) \
+          digits = d;                                                         \
+          number_value = v; goto do_number
+#define DO_SIGNED_NUMBER(d, negative, v) \
+          digits = d;                                                         \
+          negative_number = negative;                                         \
+          u_number_value = v; goto do_signed_number
+
+          /* The mask is not what you might think.
+             When the ordinal i'th bit is set, insert a colon
+             before the i'th digit of the time zone representation.  */
+#define DO_TZ_OFFSET(d, negative, mask, v) \
+          digits = d;                                                         \
+          negative_number = negative;                                         \
+          tz_colon_mask = mask;                                               \
+          u_number_value = v; goto do_tz_offset
+#define DO_NUMBER_SPACEPAD(d, v) \
+          digits = d;                                                         \
+          number_value = v; goto do_number_spacepad
+
+        case L_('%'):
+          if (modifier != 0)
+            goto bad_format;
+          add1 (*f);
+          break;
+
+        case L_('a'):
+          if (modifier != 0)
+            goto bad_format;
+          if (change_case)
+            {
+              to_uppcase = true;
+              to_lowcase = false;
+            }
+#ifdef _NL_CURRENT
+          cpy (aw_len, a_wkday);
+          break;
+#else
+          goto underlying_strftime;
+#endif
+
+        case 'A':
+          if (modifier != 0)
+            goto bad_format;
+          if (change_case)
+            {
+              to_uppcase = true;
+              to_lowcase = false;
+            }
+#ifdef _NL_CURRENT
+          cpy (STRLEN (f_wkday), f_wkday);
+          break;
+#else
+          goto underlying_strftime;
+#endif
+
+        case L_('b'):
+        case L_('h'):
+          if (change_case)
+            {
+              to_uppcase = true;
+              to_lowcase = false;
+            }
+          if (modifier != 0)
+            goto bad_format;
+#ifdef _NL_CURRENT
+          cpy (am_len, a_month);
+          break;
+#else
+          goto underlying_strftime;
+#endif
+
+        case L_('B'):
+          if (modifier != 0)
+            goto bad_format;
+          if (change_case)
+            {
+              to_uppcase = true;
+              to_lowcase = false;
+            }
+#ifdef _NL_CURRENT
+          cpy (STRLEN (f_month), f_month);
+          break;
+#else
+          goto underlying_strftime;
+#endif
+
+        case L_('c'):
+          if (modifier == L_('O'))
+            goto bad_format;
+#ifdef _NL_CURRENT
+          if (! (modifier == 'E'
+                 && (*(subfmt =
+                       (const CHAR_T *) _NL_CURRENT (LC_TIME,
+                                                     NLW(ERA_D_T_FMT)))
+                     != '\0')))
+            subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT));
+#else
+          goto underlying_strftime;
+#endif
+
+        subformat:
+          {
+            size_t len = strftime_case_ (to_uppcase,
+                                         NULL, STRFTIME_ARG ((size_t) -1)
+                                         subfmt,
+                                         tp extra_args LOCALE_ARG);
+            add (len, strftime_case_ (to_uppcase, p,
+                                      STRFTIME_ARG (maxsize - i)
+                                      subfmt,
+                                      tp extra_args LOCALE_ARG));
+          }
+          break;
+
+#if !(defined _NL_CURRENT && HAVE_STRUCT_ERA_ENTRY)
+        underlying_strftime:
+          {
+            /* The relevant information is available only via the
+               underlying strftime implementation, so use that.  */
+            char ufmt[5];
+            char *u = ufmt;
+            char ubuf[1024]; /* enough for any single format in practice */
+            size_t len;
+            /* Make sure we're calling the actual underlying strftime.
+               In some cases, config.h contains something like
+               "#define strftime rpl_strftime".  */
+# ifdef strftime
+#  undef strftime
+            size_t strftime ();
+# endif
+
+            /* The space helps distinguish strftime failure from empty
+               output.  */
+            *u++ = ' ';
+            *u++ = '%';
+            if (modifier != 0)
+              *u++ = modifier;
+            *u++ = format_char;
+            *u = '\0';
+            len = strftime (ubuf, sizeof ubuf, ufmt, tp);
+            if (len != 0)
+              cpy (len - 1, ubuf + 1);
+          }
+          break;
+#endif
+
+        case L_('C'):
+          if (modifier == L_('O'))
+            goto bad_format;
+          if (modifier == L_('E'))
+            {
+#if HAVE_STRUCT_ERA_ENTRY
+              struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
+              if (era)
+                {
+# ifdef COMPILE_WIDE
+                  size_t len = __wcslen (era->era_wname);
+                  cpy (len, era->era_wname);
+# else
+                  size_t len = strlen (era->era_name);
+                  cpy (len, era->era_name);
+# endif
+                  break;
+                }
+#else
+              goto underlying_strftime;
+#endif
+            }
+
+          {
+            int century = tp->tm_year / 100 + TM_YEAR_BASE / 100;
+            century -= tp->tm_year % 100 < 0 && 0 < century;
+            DO_SIGNED_NUMBER (2, tp->tm_year < - TM_YEAR_BASE, century);
+          }
+
+        case L_('x'):
+          if (modifier == L_('O'))
+            goto bad_format;
+#ifdef _NL_CURRENT
+          if (! (modifier == L_('E')
+                 && (*(subfmt =
+                       (const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT)))
+                     != L_('\0'))))
+            subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT));
+          goto subformat;
+#else
+          goto underlying_strftime;
+#endif
+        case L_('D'):
+          if (modifier != 0)
+            goto bad_format;
+          subfmt = L_("%m/%d/%y");
+          goto subformat;
+
+        case L_('d'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER (2, tp->tm_mday);
+
+        case L_('e'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER_SPACEPAD (2, tp->tm_mday);
+
+          /* All numeric formats set DIGITS and NUMBER_VALUE (or U_NUMBER_VALUE)
+             and then jump to one of these labels.  */
+
+        do_tz_offset:
+          always_output_a_sign = true;
+          goto do_number_body;
+
+        do_number_spacepad:
+          /* Force `_' flag unless overridden by `0' or `-' flag.  */
+          if (pad != L_('0') && pad != L_('-'))
+            pad = L_('_');
+
+        do_number:
+          /* Format NUMBER_VALUE according to the MODIFIER flag.  */
+          negative_number = number_value < 0;
+          u_number_value = number_value;
+
+        do_signed_number:
+          always_output_a_sign = false;
+          tz_colon_mask = 0;
+
+        do_number_body:
+          /* Format U_NUMBER_VALUE according to the MODIFIER flag.
+             NEGATIVE_NUMBER is nonzero if the original number was
+             negative; in this case it was converted directly to
+             unsigned int (i.e., modulo (UINT_MAX + 1)) without
+             negating it.  */
+          if (modifier == L_('O') && !negative_number)
+            {
+#ifdef _NL_CURRENT
+              /* Get the locale specific alternate representation of
+                 the number.  If none exist NULL is returned.  */
+              const CHAR_T *cp = nl_get_alt_digit (u_number_value
+                                                   HELPER_LOCALE_ARG);
+
+              if (cp != NULL)
+                {
+                  size_t digitlen = STRLEN (cp);
+                  if (digitlen != 0)
+                    {
+                      cpy (digitlen, cp);
+                      break;
+                    }
+                }
+#else
+              goto underlying_strftime;
+#endif
+            }
+
+          bufp = buf + sizeof (buf) / sizeof (buf[0]);
+
+          if (negative_number)
+            u_number_value = - u_number_value;
+
+          do
+            {
+              if (tz_colon_mask & 1)
+                *--bufp = ':';
+              tz_colon_mask >>= 1;
+              *--bufp = u_number_value % 10 + L_('0');
+              u_number_value /= 10;
+            }
+          while (u_number_value != 0 || tz_colon_mask != 0);
+
+        do_number_sign_and_padding:
+          if (digits < width)
+            digits = width;
+
+          sign_char = (negative_number ? L_('-')
+                       : always_output_a_sign ? L_('+')
+                       : 0);
+
+          if (pad == L_('-'))
+            {
+              if (sign_char)
+                add1 (sign_char);
+            }
+          else
+            {
+              int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0]))
+                                      - bufp) - !!sign_char;
+
+              if (padding > 0)
+                {
+                  if (pad == L_('_'))
+                    {
+                      if ((size_t) padding >= maxsize - i)
+                        return 0;
+
+                      if (p)
+                        memset_space (p, padding);
+                      i += padding;
+                      width = width > padding ? width - padding : 0;
+                      if (sign_char)
+                        add1 (sign_char);
+                    }
+                  else
+                    {
+                      if ((size_t) digits >= maxsize - i)
+                        return 0;
+
+                      if (sign_char)
+                        add1 (sign_char);
+
+                      if (p)
+                        memset_zero (p, padding);
+                      i += padding;
+                      width = 0;
+                    }
+                }
+              else
+                {
+                  if (sign_char)
+                    add1 (sign_char);
+                }
+            }
+
+          cpy (buf + sizeof (buf) / sizeof (buf[0]) - bufp, bufp);
+          break;
+
+        case L_('F'):
+          if (modifier != 0)
+            goto bad_format;
+          subfmt = L_("%Y-%m-%d");
+          goto subformat;
+
+        case L_('H'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER (2, tp->tm_hour);
+
+        case L_('I'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER (2, hour12);
+
+        case L_('k'):           /* GNU extension.  */
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER_SPACEPAD (2, tp->tm_hour);
+
+        case L_('l'):           /* GNU extension.  */
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER_SPACEPAD (2, hour12);
+
+        case L_('j'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_SIGNED_NUMBER (3, tp->tm_yday < -1, tp->tm_yday + 1U);
+
+        case L_('M'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER (2, tp->tm_min);
+
+        case L_('m'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_SIGNED_NUMBER (2, tp->tm_mon < -1, tp->tm_mon + 1U);
+
+#ifndef _LIBC
+        case L_('N'):           /* GNU extension.  */
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          number_value = ns;
+          if (width == -1)
+            width = 9;
+          else
+            {
+              /* Take an explicit width less than 9 as a precision.  */
+              int j;
+              for (j = width; j < 9; j++)
+                number_value /= 10;
+            }
+
+          DO_NUMBER (width, number_value);
+#endif
+
+        case L_('n'):
+          add1 (L_('\n'));
+          break;
+
+        case L_('P'):
+          to_lowcase = true;
+#ifndef _NL_CURRENT
+          format_char = L_('p');
+#endif
+          /* FALLTHROUGH */
+
+        case L_('p'):
+          if (change_case)
+            {
+              to_uppcase = false;
+              to_lowcase = true;
+            }
+#ifdef _NL_CURRENT
+          cpy (ap_len, ampm);
+          break;
+#else
+          goto underlying_strftime;
+#endif
+
+        case L_('R'):
+          subfmt = L_("%H:%M");
+          goto subformat;
+
+        case L_('r'):
+#ifdef _NL_CURRENT
+          if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME,
+                                                       NLW(T_FMT_AMPM)))
+              == L_('\0'))
+            subfmt = L_("%I:%M:%S %p");
+          goto subformat;
+#else
+          goto underlying_strftime;
+#endif
+
+        case L_('S'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER (2, tp->tm_sec);
+
+        case L_('s'):           /* GNU extension.  */
+          {
+            struct tm ltm;
+            time_t t;
+
+            ltm = *tp;
+            t = mktime (&ltm);
+
+            /* Generate string value for T using time_t arithmetic;
+               this works even if sizeof (long) < sizeof (time_t).  */
+
+            bufp = buf + sizeof (buf) / sizeof (buf[0]);
+            negative_number = t < 0;
+
+            do
+              {
+                int d = t % 10;
+                t /= 10;
+                *--bufp = (negative_number ? -d : d) + L_('0');
+              }
+            while (t != 0);
+
+            digits = 1;
+            always_output_a_sign = false;
+            goto do_number_sign_and_padding;
+          }
+
+        case L_('X'):
+          if (modifier == L_('O'))
+            goto bad_format;
+#ifdef _NL_CURRENT
+          if (! (modifier == L_('E')
+                 && (*(subfmt =
+                       (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_T_FMT)))
+                     != L_('\0'))))
+            subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT));
+          goto subformat;
+#else
+          goto underlying_strftime;
+#endif
+        case L_('T'):
+          subfmt = L_("%H:%M:%S");
+          goto subformat;
+
+        case L_('t'):
+          add1 (L_('\t'));
+          break;
+
+        case L_('u'):
+          DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1);
+
+        case L_('U'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7);
+
+        case L_('V'):
+        case L_('g'):
+        case L_('G'):
+          if (modifier == L_('E'))
+            goto bad_format;
+          {
+            /* YEAR is a leap year if and only if (tp->tm_year + TM_YEAR_BASE)
+               is a leap year, except that YEAR and YEAR - 1 both work
+               correctly even when (tp->tm_year + TM_YEAR_BASE) would
+               overflow.  */
+            int year = (tp->tm_year
+                        + (tp->tm_year < 0
+                           ? TM_YEAR_BASE % 400
+                           : TM_YEAR_BASE % 400 - 400));
+            int year_adjust = 0;
+            int days = iso_week_days (tp->tm_yday, tp->tm_wday);
+
+            if (days < 0)
+              {
+                /* This ISO week belongs to the previous year.  */
+                year_adjust = -1;
+                days = iso_week_days (tp->tm_yday + (365 + __isleap (year - 1)),
+                                      tp->tm_wday);
+              }
+            else
+              {
+                int d = iso_week_days (tp->tm_yday - (365 + __isleap (year)),
+                                       tp->tm_wday);
+                if (0 <= d)
+                  {
+                    /* This ISO week belongs to the next year.  */
+                    year_adjust = 1;
+                    days = d;
+                  }
+              }
+
+            switch (*f)
+              {
+              case L_('g'):
+                {
+                  int yy = (tp->tm_year % 100 + year_adjust) % 100;
+                  DO_NUMBER (2, (0 <= yy
+                                 ? yy
+                                 : tp->tm_year < -TM_YEAR_BASE - year_adjust
+                                 ? -yy
+                                 : yy + 100));
+                }
+
+              case L_('G'):
+                DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE - year_adjust,
+                                  (tp->tm_year + (unsigned int) TM_YEAR_BASE
+                                   + year_adjust));
+
+              default:
+                DO_NUMBER (2, days / 7 + 1);
+              }
+          }
+
+        case L_('W'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER (2, (tp->tm_yday - (tp->tm_wday - 1 + 7) % 7 + 7) / 7);
+
+        case L_('w'):
+          if (modifier == L_('E'))
+            goto bad_format;
+
+          DO_NUMBER (1, tp->tm_wday);
+
+        case L_('Y'):
+          if (modifier == 'E')
+            {
+#if HAVE_STRUCT_ERA_ENTRY
+              struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
+              if (era)
+                {
+# ifdef COMPILE_WIDE
+                  subfmt = era->era_wformat;
+# else
+                  subfmt = era->era_format;
+# endif
+                  goto subformat;
+                }
+#else
+              goto underlying_strftime;
+#endif
+            }
+          if (modifier == L_('O'))
+            goto bad_format;
+          else
+            DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE,
+                              tp->tm_year + (unsigned int) TM_YEAR_BASE);
+
+        case L_('y'):
+          if (modifier == L_('E'))
+            {
+#if HAVE_STRUCT_ERA_ENTRY
+              struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
+              if (era)
+                {
+                  int delta = tp->tm_year - era->start_date[0];
+                  DO_NUMBER (1, (era->offset
+                                 + delta * era->absolute_direction));
+                }
+#else
+              goto underlying_strftime;
+#endif
+            }
+
+          {
+            int yy = tp->tm_year % 100;
+            if (yy < 0)
+              yy = tp->tm_year < - TM_YEAR_BASE ? -yy : yy + 100;
+            DO_NUMBER (2, yy);
+          }
+
+        case L_('Z'):
+          if (change_case)
+            {
+              to_uppcase = false;
+              to_lowcase = true;
+            }
+
+#if HAVE_TZNAME
+          /* The tzset() call might have changed the value.  */
+          if (!(zone && *zone) && tp->tm_isdst >= 0)
+            zone = tzname[tp->tm_isdst != 0];
+#endif
+          if (! zone)
+            zone = "";
+
+#ifdef COMPILE_WIDE
+          {
+            /* The zone string is always given in multibyte form.  We have
+               to transform it first.  */
+            wchar_t *wczone;
+            size_t len;
+            widen (zone, wczone, len);
+            cpy (len, wczone);
+          }
+#else
+          cpy (strlen (zone), zone);
+#endif
+          break;
+
+        case L_(':'):
+          /* :, ::, and ::: are valid only just before 'z'.
+             :::: etc. are rejected later.  */
+          for (colons = 1; f[colons] == L_(':'); colons++)
+            continue;
+          if (f[colons] != L_('z'))
+            goto bad_format;
+          f += colons;
+          goto do_z_conversion;
+
+        case L_('z'):
+          colons = 0;
+
+        do_z_conversion:
+          if (tp->tm_isdst < 0)
+            break;
+
+          {
+            int diff;
+            int hour_diff;
+            int min_diff;
+            int sec_diff;
+#if HAVE_TM_GMTOFF
+            diff = tp->tm_gmtoff;
+#else
+            if (ut)
+              diff = 0;
+            else
+              {
+                struct tm gtm;
+                struct tm ltm;
+                time_t lt;
+
+                ltm = *tp;
+                lt = mktime (&ltm);
+
+                if (lt == (time_t) -1)
+                  {
+                    /* mktime returns -1 for errors, but -1 is also a
+                       valid time_t value.  Check whether an error really
+                       occurred.  */
+                    struct tm tm;
+
+                    if (! __localtime_r (&lt, &tm)
+                        || ((ltm.tm_sec ^ tm.tm_sec)
+                            | (ltm.tm_min ^ tm.tm_min)
+                            | (ltm.tm_hour ^ tm.tm_hour)
+                            | (ltm.tm_mday ^ tm.tm_mday)
+                            | (ltm.tm_mon ^ tm.tm_mon)
+                            | (ltm.tm_year ^ tm.tm_year)))
+                      break;
+                  }
+
+                if (! __gmtime_r (&lt, &gtm))
+                  break;
+
+                diff = tm_diff (&ltm, &gtm);
+              }
+#endif
+
+            hour_diff = diff / 60 / 60;
+            min_diff = diff / 60 % 60;
+            sec_diff = diff % 60;
+
+            switch (colons)
+              {
+              case 0: /* +hhmm */
+                DO_TZ_OFFSET (5, diff < 0, 0, hour_diff * 100 + min_diff);
+
+              case 1: tz_hh_mm: /* +hh:mm */
+                DO_TZ_OFFSET (6, diff < 0, 04, hour_diff * 100 + min_diff);
+
+              case 2: tz_hh_mm_ss: /* +hh:mm:ss */
+                DO_TZ_OFFSET (9, diff < 0, 024,
+                              hour_diff * 10000 + min_diff * 100 + sec_diff);
+
+              case 3: /* +hh if possible, else +hh:mm, else +hh:mm:ss */
+                if (sec_diff != 0)
+                  goto tz_hh_mm_ss;
+                if (min_diff != 0)
+                  goto tz_hh_mm;
+                DO_TZ_OFFSET (3, diff < 0, 0, hour_diff);
+
+              default:
+                goto bad_format;
+              }
+          }
+
+        case L_('\0'):          /* GNU extension: % at end of format.  */
+            --f;
+            /* Fall through.  */
+        default:
+          /* Unknown format; output the format, including the '%',
+             since this is most likely the right thing to do if a
+             multibyte string has been misparsed.  */
+        bad_format:
+          {
+            int flen;
+            for (flen = 1; f[1 - flen] != L_('%'); flen++)
+              continue;
+            cpy (flen, &f[1 - flen]);
+          }
+          break;
+        }
+    }
+
+#if ! FPRINTFTIME
+  if (p && maxsize != 0)
+    *p = L_('\0');
+#endif
+
+  return i;
+}
+
+/* Write information from TP into S according to the format
+   string FORMAT, writing no more that MAXSIZE characters
+   (including the terminating '\0') and returning number of
+   characters written.  If S is NULL, nothing will be written
+   anywhere, so to determine how many characters would be
+   written, use NULL for S and (size_t) -1 for MAXSIZE.  */
+size_t
+my_strftime (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
+             const CHAR_T *format,
+             const struct tm *tp extra_args_spec LOCALE_PARAM_PROTO)
+{
+  return strftime_case_ (false, s, STRFTIME_ARG (maxsize)
+                         format, tp extra_args LOCALE_ARG);
+}
+
+#if defined _LIBC && ! FPRINTFTIME
+libc_hidden_def (my_strftime)
+#endif
+
+
+#if defined emacs && ! FPRINTFTIME
+/* For Emacs we have a separate interface which corresponds to the normal
+   strftime function plus the ut argument, but without the ns argument.  */
+size_t
+emacs_strftimeu (char *s, size_t maxsize, const char *format,
+                 const struct tm *tp, int ut)
+{
+  return my_strftime (s, maxsize, format, tp, ut, 0);
+}
+#endif
diff --git a/gnulib/lib/strftime.h b/gnulib/lib/strftime.h
new file mode 100644 (file)
index 0000000..3410568
--- /dev/null
@@ -0,0 +1,34 @@
+/* declarations for strftime.c
+
+   Copyright (C) 2002, 2004, 2008-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/>.  */
+
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Just like strftime, but with two more arguments:
+   POSIX requires that strftime use the local timezone information.
+   When __UTC is nonzero and tm->tm_zone is NULL or the empty string,
+   use UTC instead.  Use __NS as the number of nanoseconds in the
+   %N directive.  */
+size_t nstrftime (char *, size_t, char const *, struct tm const *,
+                  int __utc, int __ns);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gnulib/lib/string.in.h b/gnulib/lib/string.in.h
new file mode 100644 (file)
index 0000000..336e246
--- /dev/null
@@ -0,0 +1,970 @@
+/* A GNU-like <string.h>.
+
+   Copyright (C) 1995-1996, 2001-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _GL_STRING_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_STRING_H@
+
+#ifndef _GL_STRING_H
+#define _GL_STRING_H
+
+/* NetBSD 5.0 mis-defines NULL.  */
+#include <stddef.h>
+
+/* MirBSD defines mbslen as a macro.  */
+#if @GNULIB_MBSLEN@ && defined __MirBSD__
+# include <wchar.h>
+#endif
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The attribute __pure__ was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>.  */
+/* But in any case avoid namespace pollution on glibc systems.  */
+#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \
+    && ! defined __GLIBC__
+# include <unistd.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
+/* Return the first instance of C within N bytes of S, or NULL.  */
+#if @GNULIB_MEMCHR@
+# if @REPLACE_MEMCHR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define memchr rpl_memchr
+#  endif
+_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
+                                  _GL_ATTRIBUTE_PURE
+                                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
+# else
+#  if ! @HAVE_MEMCHR@
+_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
+                                  _GL_ATTRIBUTE_PURE
+                                  _GL_ARG_NONNULL ((1)));
+#  endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C" { const void * std::memchr (const void *, int, size_t); }
+       extern "C++" { void * std::memchr (void *, int, size_t); }  */
+_GL_CXXALIAS_SYS_CAST2 (memchr,
+                        void *, (void const *__s, int __c, size_t __n),
+                        void const *, (void const *__s, int __c, size_t __n));
+# endif
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
+_GL_CXXALIASWARN1 (memchr, void const *,
+                   (void const *__s, int __c, size_t __n));
+# else
+_GL_CXXALIASWARN (memchr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef memchr
+/* Assume memchr is always declared.  */
+_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
+                 "use gnulib module memchr for portability" );
+#endif
+
+/* Return the first occurrence of NEEDLE in HAYSTACK.  */
+#if @GNULIB_MEMMEM@
+# if @REPLACE_MEMMEM@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define memmem rpl_memmem
+#  endif
+_GL_FUNCDECL_RPL (memmem, void *,
+                  (void const *__haystack, size_t __haystack_len,
+                   void const *__needle, size_t __needle_len)
+                  _GL_ATTRIBUTE_PURE
+                  _GL_ARG_NONNULL ((1, 3)));
+_GL_CXXALIAS_RPL (memmem, void *,
+                  (void const *__haystack, size_t __haystack_len,
+                   void const *__needle, size_t __needle_len));
+# else
+#  if ! @HAVE_DECL_MEMMEM@
+_GL_FUNCDECL_SYS (memmem, void *,
+                  (void const *__haystack, size_t __haystack_len,
+                   void const *__needle, size_t __needle_len)
+                  _GL_ATTRIBUTE_PURE
+                  _GL_ARG_NONNULL ((1, 3)));
+#  endif
+_GL_CXXALIAS_SYS (memmem, void *,
+                  (void const *__haystack, size_t __haystack_len,
+                   void const *__needle, size_t __needle_len));
+# endif
+_GL_CXXALIASWARN (memmem);
+#elif defined GNULIB_POSIXCHECK
+# undef memmem
+# if HAVE_RAW_DECL_MEMMEM
+_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
+                 "use gnulib module memmem-simple for portability, "
+                 "and module memmem for speed" );
+# endif
+#endif
+
+/* Copy N bytes of SRC to DEST, return pointer to bytes after the
+   last written byte.  */
+#if @GNULIB_MEMPCPY@
+# if ! @HAVE_MEMPCPY@
+_GL_FUNCDECL_SYS (mempcpy, void *,
+                  (void *restrict __dest, void const *restrict __src,
+                   size_t __n)
+                  _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (mempcpy, void *,
+                  (void *restrict __dest, void const *restrict __src,
+                   size_t __n));
+_GL_CXXALIASWARN (mempcpy);
+#elif defined GNULIB_POSIXCHECK
+# undef mempcpy
+# if HAVE_RAW_DECL_MEMPCPY
+_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
+                 "use gnulib module mempcpy for portability");
+# endif
+#endif
+
+/* Search backwards through a block for a byte (specified as an int).  */
+#if @GNULIB_MEMRCHR@
+# if ! @HAVE_DECL_MEMRCHR@
+_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
+                                   _GL_ATTRIBUTE_PURE
+                                   _GL_ARG_NONNULL ((1)));
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" { const void * std::memrchr (const void *, int, size_t); }
+       extern "C++" { void * std::memrchr (void *, int, size_t); }  */
+_GL_CXXALIAS_SYS_CAST2 (memrchr,
+                        void *, (void const *, int, size_t),
+                        void const *, (void const *, int, size_t));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
+_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
+# else
+_GL_CXXALIASWARN (memrchr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef memrchr
+# if HAVE_RAW_DECL_MEMRCHR
+_GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
+                 "use gnulib module memrchr for portability");
+# endif
+#endif
+
+/* Find the first occurrence of C in S.  More efficient than
+   memchr(S,C,N), at the expense of undefined behavior if C does not
+   occur within N bytes.  */
+#if @GNULIB_RAWMEMCHR@
+# if ! @HAVE_RAWMEMCHR@
+_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
+                                     _GL_ATTRIBUTE_PURE
+                                     _GL_ARG_NONNULL ((1)));
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" { const void * std::rawmemchr (const void *, int); }
+       extern "C++" { void * std::rawmemchr (void *, int); }  */
+_GL_CXXALIAS_SYS_CAST2 (rawmemchr,
+                        void *, (void const *__s, int __c_in),
+                        void const *, (void const *__s, int __c_in));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
+_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
+# else
+_GL_CXXALIASWARN (rawmemchr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rawmemchr
+# if HAVE_RAW_DECL_RAWMEMCHR
+_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
+                 "use gnulib module rawmemchr for portability");
+# endif
+#endif
+
+/* Copy SRC to DST, returning the address of the terminating '\0' in DST.  */
+#if @GNULIB_STPCPY@
+# if ! @HAVE_STPCPY@
+_GL_FUNCDECL_SYS (stpcpy, char *,
+                  (char *restrict __dst, char const *restrict __src)
+                  _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (stpcpy, char *,
+                  (char *restrict __dst, char const *restrict __src));
+_GL_CXXALIASWARN (stpcpy);
+#elif defined GNULIB_POSIXCHECK
+# undef stpcpy
+# if HAVE_RAW_DECL_STPCPY
+_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
+                 "use gnulib module stpcpy for portability");
+# endif
+#endif
+
+/* Copy no more than N bytes of SRC to DST, returning a pointer past the
+   last non-NUL byte written into DST.  */
+#if @GNULIB_STPNCPY@
+# if @REPLACE_STPNCPY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef stpncpy
+#   define stpncpy rpl_stpncpy
+#  endif
+_GL_FUNCDECL_RPL (stpncpy, char *,
+                  (char *restrict __dst, char const *restrict __src,
+                   size_t __n)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (stpncpy, char *,
+                  (char *restrict __dst, char const *restrict __src,
+                   size_t __n));
+# else
+#  if ! @HAVE_STPNCPY@
+_GL_FUNCDECL_SYS (stpncpy, char *,
+                  (char *restrict __dst, char const *restrict __src,
+                   size_t __n)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (stpncpy, char *,
+                  (char *restrict __dst, char const *restrict __src,
+                   size_t __n));
+# endif
+_GL_CXXALIASWARN (stpncpy);
+#elif defined GNULIB_POSIXCHECK
+# undef stpncpy
+# if HAVE_RAW_DECL_STPNCPY
+_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
+                 "use gnulib module stpncpy for portability");
+# endif
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strchr() does not work with multibyte strings if the locale encoding is
+   GB18030 and the character to be searched is a digit.  */
+# undef strchr
+/* Assume strchr is always declared.  */
+_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
+                 "in some multibyte locales - "
+                 "use mbschr if you care about internationalization");
+#endif
+
+/* Find the first occurrence of C in S or the final NUL byte.  */
+#if @GNULIB_STRCHRNUL@
+# if ! @HAVE_STRCHRNUL@
+_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
+                                     _GL_ATTRIBUTE_PURE
+                                     _GL_ARG_NONNULL ((1)));
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" { const char * std::strchrnul (const char *, int); }
+       extern "C++" { char * std::strchrnul (char *, int); }  */
+_GL_CXXALIAS_SYS_CAST2 (strchrnul,
+                        char *, (char const *__s, int __c_in),
+                        char const *, (char const *__s, int __c_in));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
+_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
+# else
+_GL_CXXALIASWARN (strchrnul);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strchrnul
+# if HAVE_RAW_DECL_STRCHRNUL
+_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
+                 "use gnulib module strchrnul for portability");
+# endif
+#endif
+
+/* Duplicate S, returning an identical malloc'd string.  */
+#if @GNULIB_STRDUP@
+# if @REPLACE_STRDUP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strdup
+#   define strdup rpl_strdup
+#  endif
+_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
+# else
+#  if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
+    /* strdup exists as a function and as a macro.  Get rid of the macro.  */
+#   undef strdup
+#  endif
+#  if !(@HAVE_DECL_STRDUP@ || defined strdup)
+_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (strdup, char *, (char const *__s));
+# endif
+_GL_CXXALIASWARN (strdup);
+#elif defined GNULIB_POSIXCHECK
+# undef strdup
+# if HAVE_RAW_DECL_STRDUP
+_GL_WARN_ON_USE (strdup, "strdup is unportable - "
+                 "use gnulib module strdup for portability");
+# endif
+#endif
+
+/* Append no more than N characters from SRC onto DEST.  */
+#if @GNULIB_STRNCAT@
+# if @REPLACE_STRNCAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strncat
+#   define strncat rpl_strncat
+#  endif
+_GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n)
+                                   _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n));
+# else
+_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n));
+# endif
+_GL_CXXALIASWARN (strncat);
+#elif defined GNULIB_POSIXCHECK
+# undef strncat
+# if HAVE_RAW_DECL_STRNCAT
+_GL_WARN_ON_USE (strncat, "strncat is unportable - "
+                 "use gnulib module strncat for portability");
+# endif
+#endif
+
+/* Return a newly allocated copy of at most N bytes of STRING.  */
+#if @GNULIB_STRNDUP@
+# if @REPLACE_STRNDUP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strndup
+#   define strndup rpl_strndup
+#  endif
+_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n)
+                                   _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n));
+# else
+#  if ! @HAVE_DECL_STRNDUP@
+_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n)
+                                   _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n));
+# endif
+_GL_CXXALIASWARN (strndup);
+#elif defined GNULIB_POSIXCHECK
+# undef strndup
+# if HAVE_RAW_DECL_STRNDUP
+_GL_WARN_ON_USE (strndup, "strndup is unportable - "
+                 "use gnulib module strndup for portability");
+# endif
+#endif
+
+/* Find the length (number of bytes) of STRING, but scan at most
+   MAXLEN bytes.  If no '\0' terminator is found in that many bytes,
+   return MAXLEN.  */
+#if @GNULIB_STRNLEN@
+# if @REPLACE_STRNLEN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strnlen
+#   define strnlen rpl_strnlen
+#  endif
+_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
+                                   _GL_ATTRIBUTE_PURE
+                                   _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
+# else
+#  if ! @HAVE_DECL_STRNLEN@
+_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
+                                   _GL_ATTRIBUTE_PURE
+                                   _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
+# endif
+_GL_CXXALIASWARN (strnlen);
+#elif defined GNULIB_POSIXCHECK
+# undef strnlen
+# if HAVE_RAW_DECL_STRNLEN
+_GL_WARN_ON_USE (strnlen, "strnlen is unportable - "
+                 "use gnulib module strnlen for portability");
+# endif
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strcspn() assumes the second argument is a list of single-byte characters.
+   Even in this simple case, it does not work with multibyte strings if the
+   locale encoding is GB18030 and one of the characters to be searched is a
+   digit.  */
+# undef strcspn
+/* Assume strcspn is always declared.  */
+_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
+                 "in multibyte locales - "
+                 "use mbscspn if you care about internationalization");
+#endif
+
+/* Find the first occurrence in S of any character in ACCEPT.  */
+#if @GNULIB_STRPBRK@
+# if ! @HAVE_STRPBRK@
+_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
+                                   _GL_ATTRIBUTE_PURE
+                                   _GL_ARG_NONNULL ((1, 2)));
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C" { const char * strpbrk (const char *, const char *); }
+       extern "C++" { char * strpbrk (char *, const char *); }  */
+_GL_CXXALIAS_SYS_CAST2 (strpbrk,
+                        char *, (char const *__s, char const *__accept),
+                        const char *, (char const *__s, char const *__accept));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
+_GL_CXXALIASWARN1 (strpbrk, char const *,
+                   (char const *__s, char const *__accept));
+# else
+_GL_CXXALIASWARN (strpbrk);
+# endif
+# if defined GNULIB_POSIXCHECK
+/* strpbrk() assumes the second argument is a list of single-byte characters.
+   Even in this simple case, it does not work with multibyte strings if the
+   locale encoding is GB18030 and one of the characters to be searched is a
+   digit.  */
+#  undef strpbrk
+_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings "
+                 "in multibyte locales - "
+                 "use mbspbrk if you care about internationalization");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strpbrk
+# if HAVE_RAW_DECL_STRPBRK
+_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - "
+                 "use gnulib module strpbrk for portability");
+# endif
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strspn() assumes the second argument is a list of single-byte characters.
+   Even in this simple case, it cannot work with multibyte strings.  */
+# undef strspn
+/* Assume strspn is always declared.  */
+_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
+                 "in multibyte locales - "
+                 "use mbsspn if you care about internationalization");
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strrchr() does not work with multibyte strings if the locale encoding is
+   GB18030 and the character to be searched is a digit.  */
+# undef strrchr
+/* Assume strrchr is always declared.  */
+_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
+                 "in some multibyte locales - "
+                 "use mbsrchr if you care about internationalization");
+#endif
+
+/* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
+   If one is found, overwrite it with a NUL, and advance *STRINGP
+   to point to the next char after it.  Otherwise, set *STRINGP to NULL.
+   If *STRINGP was already NULL, nothing happens.
+   Return the old value of *STRINGP.
+
+   This is a variant of strtok() that is multithread-safe and supports
+   empty fields.
+
+   Caveat: It modifies the original string.
+   Caveat: These functions cannot be used on constant strings.
+   Caveat: The identity of the delimiting character is lost.
+   Caveat: It doesn't work with multibyte strings unless all of the delimiter
+           characters are ASCII characters < 0x30.
+
+   See also strtok_r().  */
+#if @GNULIB_STRSEP@
+# if ! @HAVE_STRSEP@
+_GL_FUNCDECL_SYS (strsep, char *,
+                  (char **restrict __stringp, char const *restrict __delim)
+                  _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (strsep, char *,
+                  (char **restrict __stringp, char const *restrict __delim));
+_GL_CXXALIASWARN (strsep);
+# if defined GNULIB_POSIXCHECK
+#  undef strsep
+_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings "
+                 "in multibyte locales - "
+                 "use mbssep if you care about internationalization");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strsep
+# if HAVE_RAW_DECL_STRSEP
+_GL_WARN_ON_USE (strsep, "strsep is unportable - "
+                 "use gnulib module strsep for portability");
+# endif
+#endif
+
+#if @GNULIB_STRSTR@
+# if @REPLACE_STRSTR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define strstr rpl_strstr
+#  endif
+_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle)
+                                  _GL_ATTRIBUTE_PURE
+                                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle));
+# else
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" { const char * strstr (const char *, const char *); }
+       extern "C++" { char * strstr (char *, const char *); }  */
+_GL_CXXALIAS_SYS_CAST2 (strstr,
+                        char *, (const char *haystack, const char *needle),
+                        const char *, (const char *haystack, const char *needle));
+# endif
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
+_GL_CXXALIASWARN1 (strstr, const char *,
+                   (const char *haystack, const char *needle));
+# else
+_GL_CXXALIASWARN (strstr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+/* strstr() does not work with multibyte strings if the locale encoding is
+   different from UTF-8:
+   POSIX says that it operates on "strings", and "string" in POSIX is defined
+   as a sequence of bytes, not of characters.  */
+# undef strstr
+/* Assume strstr is always declared.  */
+_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
+                 "work correctly on character strings in most "
+                 "multibyte locales - "
+                 "use mbsstr if you care about internationalization, "
+                 "or use strstr if you care about speed");
+#endif
+
+/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
+   comparison.  */
+#if @GNULIB_STRCASESTR@
+# if @REPLACE_STRCASESTR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define strcasestr rpl_strcasestr
+#  endif
+_GL_FUNCDECL_RPL (strcasestr, char *,
+                  (const char *haystack, const char *needle)
+                  _GL_ATTRIBUTE_PURE
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (strcasestr, char *,
+                  (const char *haystack, const char *needle));
+# else
+#  if ! @HAVE_STRCASESTR@
+_GL_FUNCDECL_SYS (strcasestr, char *,
+                  (const char *haystack, const char *needle)
+                  _GL_ATTRIBUTE_PURE
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" { const char * strcasestr (const char *, const char *); }
+       extern "C++" { char * strcasestr (char *, const char *); }  */
+_GL_CXXALIAS_SYS_CAST2 (strcasestr,
+                        char *, (const char *haystack, const char *needle),
+                        const char *, (const char *haystack, const char *needle));
+# endif
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
+_GL_CXXALIASWARN1 (strcasestr, const char *,
+                   (const char *haystack, const char *needle));
+# else
+_GL_CXXALIASWARN (strcasestr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+/* strcasestr() does not work with multibyte strings:
+   It is a glibc extension, and glibc implements it only for unibyte
+   locales.  */
+# undef strcasestr
+# if HAVE_RAW_DECL_STRCASESTR
+_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
+                 "strings in multibyte locales - "
+                 "use mbscasestr if you care about "
+                 "internationalization, or use c-strcasestr if you want "
+                 "a locale independent function");
+# endif
+#endif
+
+/* Parse S into tokens separated by characters in DELIM.
+   If S is NULL, the saved pointer in SAVE_PTR is used as
+   the next starting point.  For example:
+        char s[] = "-abc-=-def";
+        char *sp;
+        x = strtok_r(s, "-", &sp);      // x = "abc", sp = "=-def"
+        x = strtok_r(NULL, "-=", &sp);  // x = "def", sp = NULL
+        x = strtok_r(NULL, "=", &sp);   // x = NULL
+                // s = "abc\0-def\0"
+
+   This is a variant of strtok() that is multithread-safe.
+
+   For the POSIX documentation for this function, see:
+   http://www.opengroup.org/susv3xsh/strtok.html
+
+   Caveat: It modifies the original string.
+   Caveat: These functions cannot be used on constant strings.
+   Caveat: The identity of the delimiting character is lost.
+   Caveat: It doesn't work with multibyte strings unless all of the delimiter
+           characters are ASCII characters < 0x30.
+
+   See also strsep().  */
+#if @GNULIB_STRTOK_R@
+# if @REPLACE_STRTOK_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strtok_r
+#   define strtok_r rpl_strtok_r
+#  endif
+_GL_FUNCDECL_RPL (strtok_r, char *,
+                  (char *restrict s, char const *restrict delim,
+                   char **restrict save_ptr)
+                  _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (strtok_r, char *,
+                  (char *restrict s, char const *restrict delim,
+                   char **restrict save_ptr));
+# else
+#  if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
+#   undef strtok_r
+#  endif
+#  if ! @HAVE_DECL_STRTOK_R@
+_GL_FUNCDECL_SYS (strtok_r, char *,
+                  (char *restrict s, char const *restrict delim,
+                   char **restrict save_ptr)
+                  _GL_ARG_NONNULL ((2, 3)));
+#  endif
+_GL_CXXALIAS_SYS (strtok_r, char *,
+                  (char *restrict s, char const *restrict delim,
+                   char **restrict save_ptr));
+# endif
+_GL_CXXALIASWARN (strtok_r);
+# if defined GNULIB_POSIXCHECK
+_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character "
+                 "strings in multibyte locales - "
+                 "use mbstok_r if you care about internationalization");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtok_r
+# if HAVE_RAW_DECL_STRTOK_R
+_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
+                 "use gnulib module strtok_r for portability");
+# endif
+#endif
+
+
+/* The following functions are not specified by POSIX.  They are gnulib
+   extensions.  */
+
+#if @GNULIB_MBSLEN@
+/* Return the number of multibyte characters in the character string STRING.
+   This considers multibyte characters, unlike strlen, which counts bytes.  */
+# ifdef __MirBSD__  /* MirBSD defines mbslen as a macro.  Override it.  */
+#  undef mbslen
+# endif
+# if @HAVE_MBSLEN@  /* AIX, OSF/1, MirBSD define mbslen already in libc.  */
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define mbslen rpl_mbslen
+#  endif
+_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
+# else
+_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
+# endif
+_GL_CXXALIASWARN (mbslen);
+#endif
+
+#if @GNULIB_MBSNLEN@
+/* Return the number of multibyte characters in the character string starting
+   at STRING and ending at STRING + LEN.  */
+_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
+     _GL_ARG_NONNULL ((1));
+#endif
+
+#if @GNULIB_MBSCHR@
+/* Locate the first single-byte character C in the character string STRING,
+   and return a pointer to it.  Return NULL if C is not found in STRING.
+   Unlike strchr(), this function works correctly in multibyte locales with
+   encodings such as GB18030.  */
+# if defined __hpux
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define mbschr rpl_mbschr /* avoid collision with HP-UX function */
+#  endif
+_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c)
+                                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c));
+# else
+_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c)
+                                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c));
+# endif
+_GL_CXXALIASWARN (mbschr);
+#endif
+
+#if @GNULIB_MBSRCHR@
+/* Locate the last single-byte character C in the character string STRING,
+   and return a pointer to it.  Return NULL if C is not found in STRING.
+   Unlike strrchr(), this function works correctly in multibyte locales with
+   encodings such as GB18030.  */
+# if defined __hpux
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
+#  endif
+_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
+                                   _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c));
+# else
+_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c)
+                                   _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c));
+# endif
+_GL_CXXALIASWARN (mbsrchr);
+#endif
+
+#if @GNULIB_MBSSTR@
+/* Find the first occurrence of the character string NEEDLE in the character
+   string HAYSTACK.  Return NULL if NEEDLE is not found in HAYSTACK.
+   Unlike strstr(), this function works correctly in multibyte locales with
+   encodings different from UTF-8.  */
+_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSCASECMP@
+/* Compare the character strings S1 and S2, ignoring case, returning less than,
+   equal to or greater than zero if S1 is lexicographically less than, equal to
+   or greater than S2.
+   Note: This function may, in multibyte locales, return 0 for strings of
+   different lengths!
+   Unlike strcasecmp(), this function works correctly in multibyte locales.  */
+_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSNCASECMP@
+/* Compare the initial segment of the character string S1 consisting of at most
+   N characters with the initial segment of the character string S2 consisting
+   of at most N characters, ignoring case, returning less than, equal to or
+   greater than zero if the initial segment of S1 is lexicographically less
+   than, equal to or greater than the initial segment of S2.
+   Note: This function may, in multibyte locales, return 0 for initial segments
+   of different lengths!
+   Unlike strncasecmp(), this function works correctly in multibyte locales.
+   But beware that N is not a byte count but a character count!  */
+_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSPCASECMP@
+/* Compare the initial segment of the character string STRING consisting of
+   at most mbslen (PREFIX) characters with the character string PREFIX,
+   ignoring case.  If the two match, return a pointer to the first byte
+   after this prefix in STRING.  Otherwise, return NULL.
+   Note: This function may, in multibyte locales, return non-NULL if STRING
+   is of smaller length than PREFIX!
+   Unlike strncasecmp(), this function works correctly in multibyte
+   locales.  */
+_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSCASESTR@
+/* Find the first occurrence of the character string NEEDLE in the character
+   string HAYSTACK, using case-insensitive comparison.
+   Note: This function may, in multibyte locales, return success even if
+   strlen (haystack) < strlen (needle) !
+   Unlike strcasestr(), this function works correctly in multibyte locales.  */
+_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSCSPN@
+/* Find the first occurrence in the character string STRING of any character
+   in the character string ACCEPT.  Return the number of bytes from the
+   beginning of the string to this occurrence, or to the end of the string
+   if none exists.
+   Unlike strcspn(), this function works correctly in multibyte locales.  */
+_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSPBRK@
+/* Find the first occurrence in the character string STRING of any character
+   in the character string ACCEPT.  Return the pointer to it, or NULL if none
+   exists.
+   Unlike strpbrk(), this function works correctly in multibyte locales.  */
+# if defined __hpux
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
+#  endif
+_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept)
+                                   _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept));
+# else
+_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept)
+                                   _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept));
+# endif
+_GL_CXXALIASWARN (mbspbrk);
+#endif
+
+#if @GNULIB_MBSSPN@
+/* Find the first occurrence in the character string STRING of any character
+   not in the character string REJECT.  Return the number of bytes from the
+   beginning of the string to this occurrence, or to the end of the string
+   if none exists.
+   Unlike strspn(), this function works correctly in multibyte locales.  */
+_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSSEP@
+/* Search the next delimiter (multibyte character listed in the character
+   string DELIM) starting at the character string *STRINGP.
+   If one is found, overwrite it with a NUL, and advance *STRINGP to point
+   to the next multibyte character after it.  Otherwise, set *STRINGP to NULL.
+   If *STRINGP was already NULL, nothing happens.
+   Return the old value of *STRINGP.
+
+   This is a variant of mbstok_r() that supports empty fields.
+
+   Caveat: It modifies the original string.
+   Caveat: These functions cannot be used on constant strings.
+   Caveat: The identity of the delimiting character is lost.
+
+   See also mbstok_r().  */
+_GL_EXTERN_C char * mbssep (char **stringp, const char *delim)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSTOK_R@
+/* Parse the character string STRING into tokens separated by characters in
+   the character string DELIM.
+   If STRING is NULL, the saved pointer in SAVE_PTR is used as
+   the next starting point.  For example:
+        char s[] = "-abc-=-def";
+        char *sp;
+        x = mbstok_r(s, "-", &sp);      // x = "abc", sp = "=-def"
+        x = mbstok_r(NULL, "-=", &sp);  // x = "def", sp = NULL
+        x = mbstok_r(NULL, "=", &sp);   // x = NULL
+                // s = "abc\0-def\0"
+
+   Caveat: It modifies the original string.
+   Caveat: These functions cannot be used on constant strings.
+   Caveat: The identity of the delimiting character is lost.
+
+   See also mbssep().  */
+_GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr)
+     _GL_ARG_NONNULL ((2, 3));
+#endif
+
+/* Map any int, typically from errno, into an error message.  */
+#if @GNULIB_STRERROR@
+# if @REPLACE_STRERROR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strerror
+#   define strerror rpl_strerror
+#  endif
+_GL_FUNCDECL_RPL (strerror, char *, (int));
+_GL_CXXALIAS_RPL (strerror, char *, (int));
+# else
+_GL_CXXALIAS_SYS (strerror, char *, (int));
+# endif
+_GL_CXXALIASWARN (strerror);
+#elif defined GNULIB_POSIXCHECK
+# undef strerror
+/* Assume strerror is always declared.  */
+_GL_WARN_ON_USE (strerror, "strerror is unportable - "
+                 "use gnulib module strerror to guarantee non-NULL result");
+#endif
+
+/* Map any int, typically from errno, into an error message.  Multithread-safe.
+   Uses the POSIX declaration, not the glibc declaration.  */
+#if @GNULIB_STRERROR_R@
+# if @REPLACE_STRERROR_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strerror_r
+#   define strerror_r rpl_strerror_r
+#  endif
+_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)
+                                   _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen));
+# else
+#  if !@HAVE_DECL_STRERROR_R@
+_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
+                                   _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
+# endif
+# if @HAVE_DECL_STRERROR_R@
+_GL_CXXALIASWARN (strerror_r);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strerror_r
+# if HAVE_RAW_DECL_STRERROR_R
+_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
+                 "use gnulib module strerror_r-posix for portability");
+# endif
+#endif
+
+#if @GNULIB_STRSIGNAL@
+# if @REPLACE_STRSIGNAL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define strsignal rpl_strsignal
+#  endif
+_GL_FUNCDECL_RPL (strsignal, char *, (int __sig));
+_GL_CXXALIAS_RPL (strsignal, char *, (int __sig));
+# else
+#  if ! @HAVE_DECL_STRSIGNAL@
+_GL_FUNCDECL_SYS (strsignal, char *, (int __sig));
+#  endif
+/* Need to cast, because on Cygwin 1.5.x systems, the return type is
+   'const char *'.  */
+_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig));
+# endif
+_GL_CXXALIASWARN (strsignal);
+#elif defined GNULIB_POSIXCHECK
+# undef strsignal
+# if HAVE_RAW_DECL_STRSIGNAL
+_GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
+                 "use gnulib module strsignal for portability");
+# endif
+#endif
+
+#if @GNULIB_STRVERSCMP@
+# if !@HAVE_STRVERSCMP@
+_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
+                                   _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
+_GL_CXXALIASWARN (strverscmp);
+#elif defined GNULIB_POSIXCHECK
+# undef strverscmp
+# if HAVE_RAW_DECL_STRVERSCMP
+_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
+                 "use gnulib module strverscmp for portability");
+# endif
+#endif
+
+
+#endif /* _GL_STRING_H */
+#endif /* _GL_STRING_H */
diff --git a/gnulib/lib/strings.in.h b/gnulib/lib/strings.in.h
new file mode 100644 (file)
index 0000000..0709aae
--- /dev/null
@@ -0,0 +1,94 @@
+/* A substitute <strings.h>.
+
+   Copyright (C) 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _GL_STRINGS_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_STRINGS_H@
+
+#ifndef _GL_STRINGS_H
+#define _GL_STRINGS_H
+
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
+   greater than zero if S1 is lexicographically less than, equal to or greater
+   than S2.
+   Note: This function does not work in multibyte locales.  */
+#if ! @HAVE_STRCASECMP@
+extern int strcasecmp (char const *s1, char const *s2)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+#if defined GNULIB_POSIXCHECK
+/* strcasecmp() does not work with multibyte strings:
+   POSIX says that it operates on "strings", and "string" in POSIX is defined
+   as a sequence of bytes, not of characters.   */
+# undef strcasecmp
+# if HAVE_RAW_DECL_STRCASECMP
+_GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character "
+                 "strings in multibyte locales - "
+                 "use mbscasecmp if you care about "
+                 "internationalization, or use c_strcasecmp , "
+                 "gnulib module c-strcase) if you want a locale "
+                 "independent function");
+# endif
+#endif
+
+/* Compare no more than N bytes of strings S1 and S2, ignoring case,
+   returning less than, equal to or greater than zero if S1 is
+   lexicographically less than, equal to or greater than S2.
+   Note: This function cannot work correctly in multibyte locales.  */
+#if ! @HAVE_DECL_STRNCASECMP@
+extern int strncasecmp (char const *s1, char const *s2, size_t n)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+#if defined GNULIB_POSIXCHECK
+/* strncasecmp() does not work with multibyte strings:
+   POSIX says that it operates on "strings", and "string" in POSIX is defined
+   as a sequence of bytes, not of characters.  */
+# undef strncasecmp
+# if HAVE_RAW_DECL_STRNCASECMP
+_GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character "
+                 "strings in multibyte locales - "
+                 "use mbsncasecmp or mbspcasecmp if you care about "
+                 "internationalization, or use c_strncasecmp , "
+                 "gnulib module c-strcase) if you want a locale "
+                 "independent function");
+# endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_STRING_H */
+#endif /* _GL_STRING_H */
diff --git a/gnulib/lib/stripslash.c b/gnulib/lib/stripslash.c
new file mode 100644 (file)
index 0000000..1212440
--- /dev/null
@@ -0,0 +1,45 @@
+/* stripslash.c -- remove redundant trailing slashes from a file name
+
+   Copyright (C) 1990, 2001, 2003-2006, 2009-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/>.  */
+
+#include <config.h>
+
+#include "dirname.h"
+
+/* Remove trailing slashes from FILE.  Return true if a trailing slash
+   was removed.  This is useful when using file name completion from a
+   shell that adds a "/" after directory names (such as tcsh and
+   bash), because on symlinks to directories, several system calls
+   have different semantics according to whether a trailing slash is
+   present.  */
+
+bool
+strip_trailing_slashes (char *file)
+{
+  char *base = last_component (file);
+  char *base_lim;
+  bool had_slash;
+
+  /* last_component returns "" for file system roots, but we need to turn
+     `///' into `/'.  */
+  if (! *base)
+    base = file;
+  base_lim = base + base_len (base);
+  had_slash = (*base_lim != '\0');
+  *base_lim = '\0';
+  return had_slash;
+}
diff --git a/gnulib/lib/strncasecmp.c b/gnulib/lib/strncasecmp.c
new file mode 100644 (file)
index 0000000..1e0d75f
--- /dev/null
@@ -0,0 +1,63 @@
+/* strncasecmp.c -- case insensitive string comparator
+   Copyright (C) 1998-1999, 2005-2007, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+#include <ctype.h>
+#include <limits.h>
+
+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
+
+/* Compare no more than N bytes of strings S1 and S2, ignoring case,
+   returning less than, equal to or greater than zero if S1 is
+   lexicographically less than, equal to or greater than S2.
+   Note: This function cannot work correctly in multibyte locales.  */
+
+int
+strncasecmp (const char *s1, const char *s2, size_t n)
+{
+  register const unsigned char *p1 = (const unsigned char *) s1;
+  register const unsigned char *p2 = (const unsigned char *) s2;
+  unsigned char c1, c2;
+
+  if (p1 == p2 || n == 0)
+    return 0;
+
+  do
+    {
+      c1 = TOLOWER (*p1);
+      c2 = TOLOWER (*p2);
+
+      if (--n == 0 || c1 == '\0')
+        break;
+
+      ++p1;
+      ++p2;
+    }
+  while (c1 == c2);
+
+  if (UCHAR_MAX <= INT_MAX)
+    return c1 - c2;
+  else
+    /* On machines where 'char' and 'int' are types of the same size, the
+       difference of two 'unsigned char' values - including the sign bit -
+       doesn't fit in an 'int'.  */
+    return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+}
diff --git a/gnulib/lib/strndup.c b/gnulib/lib/strndup.c
new file mode 100644 (file)
index 0000000..4a3bece
--- /dev/null
@@ -0,0 +1,37 @@
+/* A replacement function, for systems that lack strndup.
+
+   Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <stdlib.h>
+
+char *
+strndup (char const *s, size_t n)
+{
+  size_t len = strnlen (s, n);
+  char *new = malloc (len + 1);
+
+  if (new == NULL)
+    return NULL;
+
+  new[len] = '\0';
+  return memcpy (new, s, len);
+}
diff --git a/gnulib/lib/strnlen.c b/gnulib/lib/strnlen.c
new file mode 100644 (file)
index 0000000..3cefa97
--- /dev/null
@@ -0,0 +1,31 @@
+/* Find the length of STRING, but scan at most MAXLEN characters.
+   Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+   Written by Simon Josefsson.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+#include <string.h>
+
+/* Find the length of STRING, but scan at most MAXLEN characters.
+   If no '\0' terminator is found in that many characters, return MAXLEN.  */
+
+size_t
+strnlen (const char *string, size_t maxlen)
+{
+  const char *end = memchr (string, '\0', maxlen);
+  return end ? (size_t) (end - string) : maxlen;
+}
diff --git a/gnulib/lib/strnlen1.c b/gnulib/lib/strnlen1.c
new file mode 100644 (file)
index 0000000..f64ce10
--- /dev/null
@@ -0,0 +1,35 @@
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+   Copyright (C) 2005-2006, 2009-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "strnlen1.h"
+
+#include <string.h>
+
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+   If no '\0' terminator is found in that many characters, return MAXLEN.  */
+/* This is the same as strnlen (string, maxlen - 1) + 1.  */
+size_t
+strnlen1 (const char *string, size_t maxlen)
+{
+  const char *end = (const char *) memchr (string, '\0', maxlen);
+  if (end != NULL)
+    return end - string + 1;
+  else
+    return maxlen;
+}
diff --git a/gnulib/lib/strnlen1.h b/gnulib/lib/strnlen1.h
new file mode 100644 (file)
index 0000000..1bb13de
--- /dev/null
@@ -0,0 +1,39 @@
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+   Copyright (C) 2005, 2009-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 _STRNLEN1_H
+#define _STRNLEN1_H
+
+#include <stddef.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+   If no '\0' terminator is found in that many characters, return MAXLEN.  */
+/* This is the same as strnlen (string, maxlen - 1) + 1.  */
+extern size_t strnlen1 (const char *string, size_t maxlen);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _STRNLEN1_H */
diff --git a/gnulib/lib/strstr.c b/gnulib/lib/strstr.c
new file mode 100644 (file)
index 0000000..433cad6
--- /dev/null
@@ -0,0 +1,83 @@
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2011 Free Software
+   Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* This particular implementation was written by Eric Blake, 2008.  */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+/* Specification of strstr.  */
+#include <string.h>
+
+#include <stdbool.h>
+
+#ifndef _LIBC
+# define __builtin_expect(expr, val)   (expr)
+#endif
+
+#define RETURN_TYPE char *
+#define AVAILABLE(h, h_l, j, n_l)                       \
+  (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l))     \
+   && ((h_l) = (j) + (n_l)))
+#include "str-two-way.h"
+
+/* Return the first occurrence of NEEDLE in HAYSTACK.  Return HAYSTACK
+   if NEEDLE is empty, otherwise NULL if NEEDLE is not found in
+   HAYSTACK.  */
+char *
+strstr (const char *haystack_start, const char *needle_start)
+{
+  const char *haystack = haystack_start;
+  const char *needle = needle_start;
+  size_t needle_len; /* Length of NEEDLE.  */
+  size_t haystack_len; /* Known minimum length of HAYSTACK.  */
+  bool ok = true; /* True if NEEDLE is prefix of HAYSTACK.  */
+
+  /* Determine length of NEEDLE, and in the process, make sure
+     HAYSTACK is at least as long (no point processing all of a long
+     NEEDLE if HAYSTACK is too short).  */
+  while (*haystack && *needle)
+    ok &= *haystack++ == *needle++;
+  if (*needle)
+    return NULL;
+  if (ok)
+    return (char *) haystack_start;
+
+  /* Reduce the size of haystack using strchr, since it has a smaller
+     linear coefficient than the Two-Way algorithm.  */
+  needle_len = needle - needle_start;
+  haystack = strchr (haystack_start + 1, *needle_start);
+  if (!haystack || __builtin_expect (needle_len == 1, 0))
+    return (char *) haystack;
+  needle -= needle_len;
+  haystack_len = (haystack > haystack_start + needle_len ? 1
+                  : needle_len + haystack_start - haystack);
+
+  /* Perform the search.  Abstract memory is considered to be an array
+     of 'unsigned char' values, not an array of 'char' values.  See
+     ISO C 99 section 6.2.6.1.  */
+  if (needle_len < LONG_NEEDLE_THRESHOLD)
+    return two_way_short_needle ((const unsigned char *) haystack,
+                                 haystack_len,
+                                 (const unsigned char *) needle, needle_len);
+  return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
+                              (const unsigned char *) needle, needle_len);
+}
+
+#undef LONG_NEEDLE_THRESHOLD
diff --git a/gnulib/lib/strtoimax.c b/gnulib/lib/strtoimax.c
new file mode 100644 (file)
index 0000000..497d155
--- /dev/null
@@ -0,0 +1,75 @@
+/* Convert string representation of a number into an intmax_t value.
+
+   Copyright (C) 1999, 2001-2004, 2006, 2009-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 Paul Eggert. */
+
+#include <config.h>
+
+/* Verify interface.  */
+#include <inttypes.h>
+
+#include <stdlib.h>
+
+#include "verify.h"
+
+#ifdef UNSIGNED
+# ifndef HAVE_DECL_STRTOULL
+"this configure-time declaration test was not run"
+# endif
+# if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG_INT
+unsigned long long int strtoull (char const *, char **, int);
+# endif
+
+#else
+
+# ifndef HAVE_DECL_STRTOLL
+"this configure-time declaration test was not run"
+# endif
+# if !HAVE_DECL_STRTOLL && HAVE_LONG_LONG_INT
+long long int strtoll (char const *, char **, int);
+# endif
+#endif
+
+#ifdef UNSIGNED
+# define Have_long_long HAVE_UNSIGNED_LONG_LONG_INT
+# define Int uintmax_t
+# define Unsigned unsigned
+# define strtoimax strtoumax
+# define strtol strtoul
+# define strtoll strtoull
+#else
+# define Have_long_long HAVE_LONG_LONG_INT
+# define Int intmax_t
+# define Unsigned
+#endif
+
+Int
+strtoimax (char const *ptr, char **endptr, int base)
+{
+#if Have_long_long
+  verify (sizeof (Int) == sizeof (Unsigned long int)
+          || sizeof (Int) == sizeof (Unsigned long long int));
+
+  if (sizeof (Int) != sizeof (Unsigned long int))
+    return strtoll (ptr, endptr, base);
+#else
+  verify (sizeof (Int) == sizeof (Unsigned long int));
+#endif
+
+  return strtol (ptr, endptr, base);
+}
diff --git a/gnulib/lib/strtol.c b/gnulib/lib/strtol.c
new file mode 100644 (file)
index 0000000..b6a761e
--- /dev/null
@@ -0,0 +1,434 @@
+/* Convert string representation of a number into an integer value.
+
+   Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2011 Free Software
+   Foundation, Inc.
+
+   NOTE: The canonical source of this file is maintained with the GNU C
+   Library.  Bugs can be reported to bug-glibc@gnu.org.
+
+   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 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/>.  */
+
+#ifdef _LIBC
+# define USE_NUMBER_GROUPING
+#else
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
+
+#include <limits.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef USE_NUMBER_GROUPING
+# include "../locale/localeinfo.h"
+#endif
+
+/* Nonzero if we are defining `strtoul' or `strtoull', operating on
+   unsigned integers.  */
+#ifndef UNSIGNED
+# define UNSIGNED 0
+# define INT LONG int
+#else
+# define INT unsigned LONG int
+#endif
+
+/* Determine the name.  */
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# if UNSIGNED
+#  ifdef USE_WIDE_CHAR
+#   ifdef QUAD
+#    define strtol __wcstoull_l
+#   else
+#    define strtol __wcstoul_l
+#   endif
+#  else
+#   ifdef QUAD
+#    define strtol __strtoull_l
+#   else
+#    define strtol __strtoul_l
+#   endif
+#  endif
+# else
+#  ifdef USE_WIDE_CHAR
+#   ifdef QUAD
+#    define strtol __wcstoll_l
+#   else
+#    define strtol __wcstol_l
+#   endif
+#  else
+#   ifdef QUAD
+#    define strtol __strtoll_l
+#   else
+#    define strtol __strtol_l
+#   endif
+#  endif
+# endif
+#else
+# if UNSIGNED
+#  ifdef USE_WIDE_CHAR
+#   ifdef QUAD
+#    define strtol wcstoull
+#   else
+#    define strtol wcstoul
+#   endif
+#  else
+#   ifdef QUAD
+#    define strtol strtoull
+#   else
+#    define strtol strtoul
+#   endif
+#  endif
+# else
+#  ifdef USE_WIDE_CHAR
+#   ifdef QUAD
+#    define strtol wcstoll
+#   else
+#    define strtol wcstol
+#   endif
+#  else
+#   ifdef QUAD
+#    define strtol strtoll
+#   endif
+#  endif
+# endif
+#endif
+
+/* If QUAD is defined, we are defining `strtoll' or `strtoull',
+   operating on `long long int's.  */
+#ifdef QUAD
+# define LONG long long
+# define STRTOL_LONG_MIN LLONG_MIN
+# define STRTOL_LONG_MAX LLONG_MAX
+# define STRTOL_ULONG_MAX ULLONG_MAX
+
+/* The extra casts in the following macros work around compiler bugs,
+   e.g., in Cray C 5.0.3.0.  */
+
+/* True if negative values of the signed integer type T use two's
+   complement, ones' complement, or signed magnitude representation,
+   respectively.  Much GNU code assumes two's complement, but some
+   people like to be portable to all possible C hosts.  */
+# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the arithmetic type T is signed.  */
+# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* The maximum and minimum values for the integer type T.  These
+   macros have undefined behavior if T is signed and has padding bits.
+   If this is a problem for you, please let us know how to fix it for
+   your host.  */
+# define TYPE_MINIMUM(t) \
+   ((t) (! TYPE_SIGNED (t) \
+         ? (t) 0 \
+         : TYPE_SIGNED_MAGNITUDE (t) \
+         ? ~ (t) 0 \
+         : ~ TYPE_MAXIMUM (t)))
+# define TYPE_MAXIMUM(t) \
+   ((t) (! TYPE_SIGNED (t) \
+         ? (t) -1 \
+         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+
+# ifndef ULLONG_MAX
+#  define ULLONG_MAX TYPE_MAXIMUM (unsigned long long)
+# endif
+# ifndef LLONG_MAX
+#  define LLONG_MAX TYPE_MAXIMUM (long long int)
+# endif
+# ifndef LLONG_MIN
+#  define LLONG_MIN TYPE_MINIMUM (long long int)
+# endif
+
+# if __GNUC__ == 2 && __GNUC_MINOR__ < 7
+   /* Work around gcc bug with using this constant.  */
+   static const unsigned long long int maxquad = ULLONG_MAX;
+#  undef STRTOL_ULONG_MAX
+#  define STRTOL_ULONG_MAX maxquad
+# endif
+#else
+# define LONG long
+# define STRTOL_LONG_MIN LONG_MIN
+# define STRTOL_LONG_MAX LONG_MAX
+# define STRTOL_ULONG_MAX ULONG_MAX
+#endif
+
+
+/* We use this code also for the extended locale handling where the
+   function gets as an additional argument the locale which has to be
+   used.  To access the values we have to redefine the _NL_CURRENT
+   macro.  */
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# undef _NL_CURRENT
+# define _NL_CURRENT(category, item) \
+  (current->values[_NL_ITEM_INDEX (item)].string)
+# define LOCALE_PARAM , loc
+# define LOCALE_PARAM_PROTO , __locale_t loc
+#else
+# define LOCALE_PARAM
+# define LOCALE_PARAM_PROTO
+#endif
+
+#include <wchar.h>
+
+#ifdef USE_WIDE_CHAR
+# include <wctype.h>
+# define L_(Ch) L##Ch
+# define UCHAR_TYPE wint_t
+# define STRING_TYPE wchar_t
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+#  define ISSPACE(Ch) __iswspace_l ((Ch), loc)
+#  define ISALPHA(Ch) __iswalpha_l ((Ch), loc)
+#  define TOUPPER(Ch) __towupper_l ((Ch), loc)
+# else
+#  define ISSPACE(Ch) iswspace (Ch)
+#  define ISALPHA(Ch) iswalpha (Ch)
+#  define TOUPPER(Ch) towupper (Ch)
+# endif
+#else
+# define L_(Ch) Ch
+# define UCHAR_TYPE unsigned char
+# define STRING_TYPE char
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+#  define ISSPACE(Ch) __isspace_l ((Ch), loc)
+#  define ISALPHA(Ch) __isalpha_l ((Ch), loc)
+#  define TOUPPER(Ch) __toupper_l ((Ch), loc)
+# else
+#  define ISSPACE(Ch) isspace (Ch)
+#  define ISALPHA(Ch) isalpha (Ch)
+#  define TOUPPER(Ch) toupper (Ch)
+# endif
+#endif
+
+#define INTERNAL(X) INTERNAL1(X)
+#define INTERNAL1(X) __##X##_internal
+#define WEAKNAME(X) WEAKNAME1(X)
+
+#ifdef USE_NUMBER_GROUPING
+/* This file defines a function to check for correct grouping.  */
+# include "grouping.h"
+#endif
+
+
+
+/* Convert NPTR to an `unsigned long int' or `long int' in base BASE.
+   If BASE is 0 the base is determined by the presence of a leading
+   zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal.
+   If BASE is < 2 or > 36, it is reset to 10.
+   If ENDPTR is not NULL, a pointer to the character after the last
+   one converted is stored in *ENDPTR.  */
+
+INT
+INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+                   int base, int group LOCALE_PARAM_PROTO)
+{
+  int negative;
+  register unsigned LONG int cutoff;
+  register unsigned int cutlim;
+  register unsigned LONG int i;
+  register const STRING_TYPE *s;
+  register UCHAR_TYPE c;
+  const STRING_TYPE *save, *end;
+  int overflow;
+
+#ifdef USE_NUMBER_GROUPING
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+  struct locale_data *current = loc->__locales[LC_NUMERIC];
+# endif
+  /* The thousands character of the current locale.  */
+  wchar_t thousands = L'\0';
+  /* The numeric grouping specification of the current locale,
+     in the format described in <locale.h>.  */
+  const char *grouping;
+
+  if (group)
+    {
+      grouping = _NL_CURRENT (LC_NUMERIC, GROUPING);
+      if (*grouping <= 0 || *grouping == CHAR_MAX)
+        grouping = NULL;
+      else
+        {
+          /* Figure out the thousands separator character.  */
+# if defined _LIBC || defined _HAVE_BTOWC
+          thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP));
+          if (thousands == WEOF)
+            thousands = L'\0';
+# endif
+          if (thousands == L'\0')
+            grouping = NULL;
+        }
+    }
+  else
+    grouping = NULL;
+#endif
+
+  if (base < 0 || base == 1 || base > 36)
+    {
+      __set_errno (EINVAL);
+      return 0;
+    }
+
+  save = s = nptr;
+
+  /* Skip white space.  */
+  while (ISSPACE (*s))
+    ++s;
+  if (*s == L_('\0'))
+    goto noconv;
+
+  /* Check for a sign.  */
+  if (*s == L_('-'))
+    {
+      negative = 1;
+      ++s;
+    }
+  else if (*s == L_('+'))
+    {
+      negative = 0;
+      ++s;
+    }
+  else
+    negative = 0;
+
+  /* Recognize number prefix and if BASE is zero, figure it out ourselves.  */
+  if (*s == L_('0'))
+    {
+      if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X'))
+        {
+          s += 2;
+          base = 16;
+        }
+      else if (base == 0)
+        base = 8;
+    }
+  else if (base == 0)
+    base = 10;
+
+  /* Save the pointer so we can check later if anything happened.  */
+  save = s;
+
+#ifdef USE_NUMBER_GROUPING
+  if (group)
+    {
+      /* Find the end of the digit string and check its grouping.  */
+      end = s;
+      for (c = *end; c != L_('\0'); c = *++end)
+        if ((wchar_t) c != thousands
+            && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9'))
+            && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base))
+          break;
+      if (*s == thousands)
+        end = s;
+      else
+        end = correctly_grouped_prefix (s, end, thousands, grouping);
+    }
+  else
+#endif
+    end = NULL;
+
+  cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base;
+  cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base;
+
+  overflow = 0;
+  i = 0;
+  for (c = *s; c != L_('\0'); c = *++s)
+    {
+      if (s == end)
+        break;
+      if (c >= L_('0') && c <= L_('9'))
+        c -= L_('0');
+      else if (ISALPHA (c))
+        c = TOUPPER (c) - L_('A') + 10;
+      else
+        break;
+      if ((int) c >= base)
+        break;
+      /* Check for overflow.  */
+      if (i > cutoff || (i == cutoff && c > cutlim))
+        overflow = 1;
+      else
+        {
+          i *= (unsigned LONG int) base;
+          i += c;
+        }
+    }
+
+  /* Check if anything actually happened.  */
+  if (s == save)
+    goto noconv;
+
+  /* Store in ENDPTR the address of one character
+     past the last character we converted.  */
+  if (endptr != NULL)
+    *endptr = (STRING_TYPE *) s;
+
+#if !UNSIGNED
+  /* Check for a value that is within the range of
+     `unsigned LONG int', but outside the range of `LONG int'.  */
+  if (overflow == 0
+      && i > (negative
+              ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1
+              : (unsigned LONG int) STRTOL_LONG_MAX))
+    overflow = 1;
+#endif
+
+  if (overflow)
+    {
+      __set_errno (ERANGE);
+#if UNSIGNED
+      return STRTOL_ULONG_MAX;
+#else
+      return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX;
+#endif
+    }
+
+  /* Return the result of the appropriate sign.  */
+  return negative ? -i : i;
+
+noconv:
+  /* We must handle a special case here: the base is 0 or 16 and the
+     first two characters are '0' and 'x', but the rest are no
+     hexadecimal digits.  This is no error case.  We return 0 and
+     ENDPTR points to the `x`.  */
+  if (endptr != NULL)
+    {
+      if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X')
+          && save[-2] == L_('0'))
+        *endptr = (STRING_TYPE *) &save[-1];
+      else
+        /*  There was no number to convert.  */
+        *endptr = (STRING_TYPE *) nptr;
+    }
+
+  return 0L;
+}
+\f
+/* External user entry point.  */
+
+
+INT
+#ifdef weak_function
+weak_function
+#endif
+strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+        int base LOCALE_PARAM_PROTO)
+{
+  return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM);
+}
diff --git a/gnulib/lib/strtoll.c b/gnulib/lib/strtoll.c
new file mode 100644 (file)
index 0000000..75afa4d
--- /dev/null
@@ -0,0 +1,33 @@
+/* Function to parse a `long long int' from text.
+   Copyright (C) 1995-1997, 1999, 2001, 2009-2011 Free Software Foundation,
+   Inc.
+   This file is part of the GNU C Library.
+
+   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/>.  */
+
+#define QUAD    1
+
+#include <strtol.c>
+
+#ifdef _LIBC
+# ifdef SHARED
+#  include <shlib-compat.h>
+
+#  if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
+compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0);
+#  endif
+
+# endif
+weak_alias (strtoll, strtoq)
+#endif
diff --git a/gnulib/lib/strtoul.c b/gnulib/lib/strtoul.c
new file mode 100644 (file)
index 0000000..6fa6d0c
--- /dev/null
@@ -0,0 +1,19 @@
+/* Copyright (C) 1991, 1997, 2009-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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/>.  */
+
+#define UNSIGNED        1
+
+#include "strtol.c"
diff --git a/gnulib/lib/strtoull.c b/gnulib/lib/strtoull.c
new file mode 100644 (file)
index 0000000..bf25995
--- /dev/null
@@ -0,0 +1,26 @@
+/* Function to parse an `unsigned long long int' from text.
+   Copyright (C) 1995-1997, 1999, 2009-2011 Free Software Foundation, Inc.
+   NOTE: The canonical source of this file is maintained with the GNU C
+   Library.  Bugs can be reported to bug-glibc@gnu.org.
+
+   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 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/>.  */
+
+#define QUAD 1
+
+#include "strtoul.c"
+
+#ifdef _LIBC
+strong_alias (__strtoull_internal, __strtouq_internal)
+weak_alias (strtoull, strtouq)
+#endif
diff --git a/gnulib/lib/strtoumax.c b/gnulib/lib/strtoumax.c
new file mode 100644 (file)
index 0000000..dc395d6
--- /dev/null
@@ -0,0 +1,2 @@
+#define UNSIGNED 1
+#include "strtoimax.c"
diff --git a/gnulib/lib/sys_stat.in.h b/gnulib/lib/sys_stat.in.h
new file mode 100644 (file)
index 0000000..13fae7b
--- /dev/null
@@ -0,0 +1,658 @@
+/* Provide a more complete sys/stat header file.
+   Copyright (C) 2005-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Eric Blake, Paul Eggert, and Jim Meyering.  */
+
+/* This file is supposed to be used on platforms where <sys/stat.h> is
+   incomplete.  It is intended to provide definitions and prototypes
+   needed by an application.  Start with what the system provides.  */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined __need_system_sys_stat_h
+/* Special invocation convention.  */
+
+#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _GL_SYS_STAT_H
+
+/* Get nlink_t.  */
+#include <sys/types.h>
+
+/* Get struct timespec.  */
+#include <time.h>
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
+
+#ifndef _GL_SYS_STAT_H
+#define _GL_SYS_STAT_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
+   headers that may declare mkdir().  */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>     /* mingw32, mingw64 */
+# include <direct.h> /* mingw64 */
+#endif
+
+#ifndef S_IFMT
+# define S_IFMT 0170000
+#endif
+
+#if STAT_MACROS_BROKEN
+# undef S_ISBLK
+# undef S_ISCHR
+# undef S_ISDIR
+# undef S_ISFIFO
+# undef S_ISLNK
+# undef S_ISNAM
+# undef S_ISMPB
+# undef S_ISMPC
+# undef S_ISNWK
+# undef S_ISREG
+# undef S_ISSOCK
+#endif
+
+#ifndef S_ISBLK
+# ifdef S_IFBLK
+#  define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+# else
+#  define S_ISBLK(m) 0
+# endif
+#endif
+
+#ifndef S_ISCHR
+# ifdef S_IFCHR
+#  define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+# else
+#  define S_ISCHR(m) 0
+# endif
+#endif
+
+#ifndef S_ISDIR
+# ifdef S_IFDIR
+#  define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+# else
+#  define S_ISDIR(m) 0
+# endif
+#endif
+
+#ifndef S_ISDOOR /* Solaris 2.5 and up */
+# define S_ISDOOR(m) 0
+#endif
+
+#ifndef S_ISFIFO
+# ifdef S_IFIFO
+#  define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+# else
+#  define S_ISFIFO(m) 0
+# endif
+#endif
+
+#ifndef S_ISLNK
+# ifdef S_IFLNK
+#  define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+# else
+#  define S_ISLNK(m) 0
+# endif
+#endif
+
+#ifndef S_ISMPB /* V7 */
+# ifdef S_IFMPB
+#  define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
+#  define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
+# else
+#  define S_ISMPB(m) 0
+#  define S_ISMPC(m) 0
+# endif
+#endif
+
+#ifndef S_ISNAM /* Xenix */
+# ifdef S_IFNAM
+#  define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
+# else
+#  define S_ISNAM(m) 0
+# endif
+#endif
+
+#ifndef S_ISNWK /* HP/UX */
+# ifdef S_IFNWK
+#  define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
+# else
+#  define S_ISNWK(m) 0
+# endif
+#endif
+
+#ifndef S_ISPORT /* Solaris 10 and up */
+# define S_ISPORT(m) 0
+#endif
+
+#ifndef S_ISREG
+# ifdef S_IFREG
+#  define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+# else
+#  define S_ISREG(m) 0
+# endif
+#endif
+
+#ifndef S_ISSOCK
+# ifdef S_IFSOCK
+#  define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+# else
+#  define S_ISSOCK(m) 0
+# endif
+#endif
+
+
+#ifndef S_TYPEISMQ
+# define S_TYPEISMQ(p) 0
+#endif
+
+#ifndef S_TYPEISTMO
+# define S_TYPEISTMO(p) 0
+#endif
+
+
+#ifndef S_TYPEISSEM
+# ifdef S_INSEM
+#  define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
+# else
+#  define S_TYPEISSEM(p) 0
+# endif
+#endif
+
+#ifndef S_TYPEISSHM
+# ifdef S_INSHD
+#  define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
+# else
+#  define S_TYPEISSHM(p) 0
+# endif
+#endif
+
+/* high performance ("contiguous data") */
+#ifndef S_ISCTG
+# define S_ISCTG(p) 0
+#endif
+
+/* Cray DMF (data migration facility): off line, with data  */
+#ifndef S_ISOFD
+# define S_ISOFD(p) 0
+#endif
+
+/* Cray DMF (data migration facility): off line, with no data  */
+#ifndef S_ISOFL
+# define S_ISOFL(p) 0
+#endif
+
+/* 4.4BSD whiteout */
+#ifndef S_ISWHT
+# define S_ISWHT(m) 0
+#endif
+
+/* If any of the following are undefined,
+   define them to their de facto standard values.  */
+#if !S_ISUID
+# define S_ISUID 04000
+#endif
+#if !S_ISGID
+# define S_ISGID 02000
+#endif
+
+/* S_ISVTX is a common extension to POSIX.  */
+#ifndef S_ISVTX
+# define S_ISVTX 01000
+#endif
+
+#if !S_IRUSR && S_IREAD
+# define S_IRUSR S_IREAD
+#endif
+#if !S_IRUSR
+# define S_IRUSR 00400
+#endif
+#if !S_IRGRP
+# define S_IRGRP (S_IRUSR >> 3)
+#endif
+#if !S_IROTH
+# define S_IROTH (S_IRUSR >> 6)
+#endif
+
+#if !S_IWUSR && S_IWRITE
+# define S_IWUSR S_IWRITE
+#endif
+#if !S_IWUSR
+# define S_IWUSR 00200
+#endif
+#if !S_IWGRP
+# define S_IWGRP (S_IWUSR >> 3)
+#endif
+#if !S_IWOTH
+# define S_IWOTH (S_IWUSR >> 6)
+#endif
+
+#if !S_IXUSR && S_IEXEC
+# define S_IXUSR S_IEXEC
+#endif
+#if !S_IXUSR
+# define S_IXUSR 00100
+#endif
+#if !S_IXGRP
+# define S_IXGRP (S_IXUSR >> 3)
+#endif
+#if !S_IXOTH
+# define S_IXOTH (S_IXUSR >> 6)
+#endif
+
+#if !S_IRWXU
+# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
+#endif
+#if !S_IRWXG
+# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
+#endif
+#if !S_IRWXO
+# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
+#endif
+
+/* S_IXUGO is a common extension to POSIX.  */
+#if !S_IXUGO
+# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
+#endif
+
+#ifndef S_IRWXUGO
+# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
+#endif
+
+/* Macros for futimens and utimensat.  */
+#ifndef UTIME_NOW
+# define UTIME_NOW (-1)
+# define UTIME_OMIT (-2)
+#endif
+
+
+#if @GNULIB_FCHMODAT@
+# if !@HAVE_FCHMODAT@
+_GL_FUNCDECL_SYS (fchmodat, int,
+                  (int fd, char const *file, mode_t mode, int flag)
+                  _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (fchmodat, int,
+                  (int fd, char const *file, mode_t mode, int flag));
+_GL_CXXALIASWARN (fchmodat);
+#elif defined GNULIB_POSIXCHECK
+# undef fchmodat
+# if HAVE_RAW_DECL_FCHMODAT
+_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
+                 "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @REPLACE_FSTAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  define fstat rpl_fstat
+# endif
+_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
+#else
+_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
+#endif
+_GL_CXXALIASWARN (fstat);
+
+
+#if @GNULIB_FSTATAT@
+# if @REPLACE_FSTATAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fstatat
+#   define fstatat rpl_fstatat
+#  endif
+_GL_FUNCDECL_RPL (fstatat, int,
+                  (int fd, char const *name, struct stat *st, int flags)
+                  _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (fstatat, int,
+                  (int fd, char const *name, struct stat *st, int flags));
+# else
+#  if !@HAVE_FSTATAT@
+_GL_FUNCDECL_SYS (fstatat, int,
+                  (int fd, char const *name, struct stat *st, int flags)
+                  _GL_ARG_NONNULL ((2, 3)));
+#  endif
+_GL_CXXALIAS_SYS (fstatat, int,
+                  (int fd, char const *name, struct stat *st, int flags));
+# endif
+_GL_CXXALIASWARN (fstatat);
+#elif defined GNULIB_POSIXCHECK
+# undef fstatat
+# if HAVE_RAW_DECL_FSTATAT
+_GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
+                 "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FUTIMENS@
+/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens
+   implementation relies on futimesat, which on Solaris 10 makes an invocation
+   to futimens that is meant to invoke the libc's futimens(), not gnulib's
+   futimens().  */
+# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun)
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef futimens
+#   define futimens rpl_futimens
+#  endif
+_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2]));
+_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2]));
+# else
+#  if !@HAVE_FUTIMENS@
+_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
+#  endif
+_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
+# endif
+# if @HAVE_FUTIMENS@
+_GL_CXXALIASWARN (futimens);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef futimens
+# if HAVE_RAW_DECL_FUTIMENS
+_GL_WARN_ON_USE (futimens, "futimens is not portable - "
+                 "use gnulib module futimens for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LCHMOD@
+/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
+   denotes a symbolic link.  */
+# if !@HAVE_LCHMOD@
+/* The lchmod replacement follows symbolic links.  Callers should take
+   this into account; lchmod should be applied only to arguments that
+   are known to not be symbolic links.  On hosts that lack lchmod,
+   this can lead to race conditions between the check and the
+   invocation of lchmod, but we know of no workarounds that are
+   reliable in general.  You might try requesting support for lchmod
+   from your operating system supplier.  */
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define lchmod chmod
+#  endif
+/* Need to cast, because on mingw, the second parameter of chmod is
+                                                int mode.  */
+_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int,
+                         (const char *filename, mode_t mode));
+# else
+#  if 0 /* assume already declared */
+_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
+                               _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
+# endif
+# if @HAVE_LCHMOD@
+_GL_CXXALIASWARN (lchmod);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lchmod
+# if HAVE_RAW_DECL_LCHMOD
+_GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
+                 "use gnulib module lchmod for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LSTAT@
+# if ! @HAVE_LSTAT@
+/* mingw does not support symlinks, therefore it does not have lstat.  But
+   without links, stat does just fine.  */
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define lstat stat
+#  endif
+_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf));
+# elif @REPLACE_LSTAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef lstat
+#   define lstat rpl_lstat
+#  endif
+_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf)
+                              _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
+# else
+_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
+# endif
+# if @HAVE_LSTAT@
+_GL_CXXALIASWARN (lstat);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lstat
+# if HAVE_RAW_DECL_LSTAT
+_GL_WARN_ON_USE (lstat, "lstat is unportable - "
+                 "use gnulib module lstat for portability");
+# endif
+#endif
+
+
+#if @REPLACE_MKDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  undef mkdir
+#  define mkdir rpl_mkdir
+# endif
+_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode)
+                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
+#else
+/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
+   Additionally, it declares _mkdir (and depending on compile flags, an
+   alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
+   which are included above.  */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+#  if !GNULIB_defined_rpl_mkdir
+static inline int
+rpl_mkdir (char const *name, mode_t mode)
+{
+  return _mkdir (name);
+}
+#   define GNULIB_defined_rpl_mkdir 1
+#  endif
+
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define mkdir rpl_mkdir
+#  endif
+_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
+# else
+_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
+# endif
+#endif
+_GL_CXXALIASWARN (mkdir);
+
+
+#if @GNULIB_MKDIRAT@
+# if !@HAVE_MKDIRAT@
+_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)
+                                _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode));
+_GL_CXXALIASWARN (mkdirat);
+#elif defined GNULIB_POSIXCHECK
+# undef mkdirat
+# if HAVE_RAW_DECL_MKDIRAT
+_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
+                 "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKFIFO@
+# if @REPLACE_MKFIFO@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkfifo
+#   define mkfifo rpl_mkfifo
+#  endif
+_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode)
+                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode));
+# else
+#  if !@HAVE_MKFIFO@
+_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode)
+                               _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode));
+# endif
+_GL_CXXALIASWARN (mkfifo);
+#elif defined GNULIB_POSIXCHECK
+# undef mkfifo
+# if HAVE_RAW_DECL_MKFIFO
+_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
+                 "use gnulib module mkfifo for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKFIFOAT@
+# if !@HAVE_MKFIFOAT@
+_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
+                                 _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
+_GL_CXXALIASWARN (mkfifoat);
+#elif defined GNULIB_POSIXCHECK
+# undef mkfifoat
+# if HAVE_RAW_DECL_MKFIFOAT
+_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
+                 "use gnulib module mkfifoat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKNOD@
+# if @REPLACE_MKNOD@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mknod
+#   define mknod rpl_mknod
+#  endif
+_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)
+                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev));
+# else
+#  if !@HAVE_MKNOD@
+_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)
+                              _GL_ARG_NONNULL ((1)));
+#  endif
+/* Need to cast, because on OSF/1 5.1, the third parameter is '...'.  */
+_GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev));
+# endif
+_GL_CXXALIASWARN (mknod);
+#elif defined GNULIB_POSIXCHECK
+# undef mknod
+# if HAVE_RAW_DECL_MKNOD
+_GL_WARN_ON_USE (mknod, "mknod is not portable - "
+                 "use gnulib module mknod for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKNODAT@
+# if !@HAVE_MKNODAT@
+_GL_FUNCDECL_SYS (mknodat, int,
+                  (int fd, char const *file, mode_t mode, dev_t dev)
+                  _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (mknodat, int,
+                  (int fd, char const *file, mode_t mode, dev_t dev));
+_GL_CXXALIASWARN (mknodat);
+#elif defined GNULIB_POSIXCHECK
+# undef mknodat
+# if HAVE_RAW_DECL_MKNODAT
+_GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
+                 "use gnulib module mkfifoat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_STAT@
+# if @REPLACE_STAT@
+/* We can't use the object-like #define stat rpl_stat, because of
+   struct stat.  This means that rpl_stat will not be used if the user
+   does (stat)(a,b).  Oh well.  */
+#  undef stat
+#  ifdef _LARGE_FILES
+    /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
+       so we have to replace stat64() instead of stat(). */
+#   define stat stat64
+#   undef stat64
+#   define stat64(name, st) rpl_stat (name, st)
+#  else /* !_LARGE_FILES */
+#   define stat(name, st) rpl_stat (name, st)
+#  endif /* !_LARGE_FILES */
+_GL_EXTERN_C int stat (const char *name, struct stat *buf)
+                      _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef stat
+# if HAVE_RAW_DECL_STAT
+_GL_WARN_ON_USE (stat, "stat is unportable - "
+                 "use gnulib module stat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_UTIMENSAT@
+/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
+   implementation relies on futimesat, which on Solaris 10 makes an invocation
+   to utimensat that is meant to invoke the libc's utimensat(), not gnulib's
+   utimensat().  */
+# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun)
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef utimensat
+#   define utimensat rpl_utimensat
+#  endif
+_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name,
+                                   struct timespec const times[2], int flag)
+                                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name,
+                                   struct timespec const times[2], int flag));
+# else
+#  if !@HAVE_UTIMENSAT@
+_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
+                                   struct timespec const times[2], int flag)
+                                  _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
+                                   struct timespec const times[2], int flag));
+# endif
+# if @HAVE_UTIMENSAT@
+_GL_CXXALIASWARN (utimensat);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef utimensat
+# if HAVE_RAW_DECL_UTIMENSAT
+_GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
+                 "use gnulib module utimensat for portability");
+# endif
+#endif
+
+
+#endif /* _GL_SYS_STAT_H */
+#endif /* _GL_SYS_STAT_H */
+#endif
diff --git a/gnulib/lib/sys_time.in.h b/gnulib/lib/sys_time.in.h
new file mode 100644 (file)
index 0000000..d4319d2
--- /dev/null
@@ -0,0 +1,101 @@
+/* Provide a more complete sys/time.h.
+
+   Copyright (C) 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Paul Eggert.  */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined _GL_SYS_TIME_H
+
+/* Simply delegate to the system's header, without adding anything.  */
+# if @HAVE_SYS_TIME_H@
+#  @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+# endif
+
+#else
+
+# define _GL_SYS_TIME_H
+
+# if @HAVE_SYS_TIME_H@
+#  @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+# else
+#  include <time.h>
+# endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if ! @HAVE_STRUCT_TIMEVAL@
+
+#  if !GNULIB_defined_struct_timeval
+struct timeval
+{
+  time_t tv_sec;
+  long int tv_usec;
+};
+#   define GNULIB_defined_struct_timeval 1
+#  endif
+
+# endif
+
+# ifdef __cplusplus
+}
+# endif
+
+# if @GNULIB_GETTIMEOFDAY@
+#  if @REPLACE_GETTIMEOFDAY@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef gettimeofday
+#    define gettimeofday rpl_gettimeofday
+#   endif
+_GL_FUNCDECL_RPL (gettimeofday, int,
+                  (struct timeval *restrict, void *restrict)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (gettimeofday, int,
+                  (struct timeval *restrict, void *restrict));
+#  else
+#   if !@HAVE_GETTIMEOFDAY@
+_GL_FUNCDECL_SYS (gettimeofday, int,
+                  (struct timeval *restrict, void *restrict)
+                  _GL_ARG_NONNULL ((1)));
+#   endif
+/* Need to cast, because on glibc systems, by default, the second argument is
+                                                  struct timezone *.  */
+_GL_CXXALIAS_SYS_CAST (gettimeofday, int,
+                       (struct timeval *restrict, void *restrict));
+#  endif
+_GL_CXXALIASWARN (gettimeofday);
+# elif defined GNULIB_POSIXCHECK
+#  undef gettimeofday
+#  if HAVE_RAW_DECL_GETTIMEOFDAY
+_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
+                 "use gnulib module gettimeofday for portability");
+#  endif
+# endif
+
+#endif /* _GL_SYS_TIME_H */
diff --git a/gnulib/lib/sys_wait.in.h b/gnulib/lib/sys_wait.in.h
new file mode 100644 (file)
index 0000000..8eabf6f
--- /dev/null
@@ -0,0 +1,130 @@
+/* A POSIX-like <sys/wait.h>.
+   Copyright (C) 2001-2003, 2005-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+
+#ifndef _GL_SYS_WAIT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# @INCLUDE_NEXT@ @NEXT_SYS_WAIT_H@
+#endif
+
+#ifndef _GL_SYS_WAIT_H
+#define _GL_SYS_WAIT_H
+
+/* Get pid_t.  */
+#include <sys/types.h>
+
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+/* Unix API.  */
+
+/* The following macros apply to an argument x, that is a status of a process,
+   as returned by waitpid().
+   On nearly all systems, including Linux/x86, WEXITSTATUS are bits 15..8 and
+   WTERMSIG are bits 7..0, while BeOS uses the opposite.  Therefore programs
+   have to use the abstract macros.  */
+
+/* For valid x, exactly one of WIFSIGNALED(x), WIFEXITED(x), WIFSTOPPED(x)
+   is true.  */
+# ifndef WIFSIGNALED
+#  define WIFSIGNALED(x) (WTERMSIG (x) != 0 && WTERMSIG(x) != 0x7f)
+# endif
+# ifndef WIFEXITED
+#  define WIFEXITED(x) (WTERMSIG (x) == 0)
+# endif
+# ifndef WIFSTOPPED
+#  define WIFSTOPPED(x) (WTERMSIG (x) == 0x7f)
+# endif
+
+/* The termination signal. Only to be accessed if WIFSIGNALED(x) is true.  */
+# ifndef WTERMSIG
+#  define WTERMSIG(x) ((x) & 0x7f)
+# endif
+
+/* The exit status. Only to be accessed if WIFEXITED(x) is true.  */
+# ifndef WEXITSTATUS
+#  define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+# endif
+
+/* The stopping signal. Only to be accessed if WIFSTOPPED(x) is true.  */
+# ifndef WSTOPSIG
+#  define WSTOPSIG(x) (((x) >> 8) & 0x7f)
+# endif
+
+/* True if the process dumped core.  Not standardized by POSIX.  */
+# ifndef WCOREDUMP
+#  define WCOREDUMP(x) ((x) & 0x80)
+# endif
+
+#else
+/* Native Windows API.  */
+
+# include <signal.h> /* for SIGTERM */
+
+/* The following macros apply to an argument x, that is a status of a process,
+   as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess().
+   This value is simply an 'int', not composed of bit fields.  */
+
+/* When an unhandled fatal signal terminates a process, the exit code is 3.  */
+# define WIFSIGNALED(x) ((x) == 3)
+# define WIFEXITED(x) ((x) != 3)
+# define WIFSTOPPED(x) 0
+
+/* The signal that terminated a process is not known posthum.  */
+# define WTERMSIG(x) SIGTERM
+
+# define WEXITSTATUS(x) (x)
+
+/* There are no stopping signals.  */
+# define WSTOPSIG(x) 0
+
+/* There are no core dumps.  */
+# define WCOREDUMP(x) 0
+
+#endif
+
+
+/* Declarations of functions.  */
+
+#if @GNULIB_WAITPID@
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+_GL_FUNCDECL_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options));
+# endif
+_GL_CXXALIAS_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options));
+_GL_CXXALIASWARN (waitpid);
+#elif defined GNULIB_POSIXCHECK
+# undef waitpid
+# if HAVE_RAW_DECL_WAITPID
+_GL_WARN_ON_USE (waitpid, "waitpid is unportable - "
+                 "use gnulib module sys_wait for portability");
+# endif
+#endif
+
+
+#endif /* _GL_SYS_WAIT_H */
+#endif /* _GL_SYS_WAIT_H */
diff --git a/gnulib/lib/time.in.h b/gnulib/lib/time.in.h
new file mode 100644 (file)
index 0000000..cb533a4
--- /dev/null
@@ -0,0 +1,249 @@
+/* A more-standard <time.h>.
+
+   Copyright (C) 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* Don't get in the way of glibc when it includes time.h merely to
+   declare a few standard symbols, rather than to declare all the
+   symbols.  Also, Solaris 8 <time.h> eventually includes itself
+   recursively; if that is happening, just include the system <time.h>
+   without adding our own declarations.  */
+#if (defined __need_time_t || defined __need_clock_t \
+     || defined __need_timespec \
+     || defined _GL_TIME_H)
+
+# @INCLUDE_NEXT@ @NEXT_TIME_H@
+
+#else
+
+# define _GL_TIME_H
+
+# @INCLUDE_NEXT@ @NEXT_TIME_H@
+
+/* NetBSD 5.0 mis-defines NULL.  */
+# include <stddef.h>
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
+   Or they define it with the wrong member names or define it in <sys/time.h>
+   (e.g., FreeBSD circa 1997).  Stock Mingw does not define it, but the
+   pthreads-win32 library defines it in <pthread.h>.  */
+# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
+#  if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+#   include <sys/time.h>
+#  elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+#   include <pthread.h>
+/* The pthreads-win32 <pthread.h> also defines a couple of broken macros.  */
+#   undef asctime_r
+#   undef ctime_r
+#   undef gmtime_r
+#   undef localtime_r
+#   undef rand_r
+#   undef strtok_r
+#  else
+
+#   ifdef __cplusplus
+extern "C" {
+#   endif
+
+#   if !GNULIB_defined_struct_timespec
+#    undef timespec
+#    define timespec rpl_timespec
+struct timespec
+{
+  time_t tv_sec;
+  long int tv_nsec;
+};
+#    define GNULIB_defined_struct_timespec 1
+#   endif
+
+#   ifdef __cplusplus
+}
+#   endif
+
+#  endif
+# endif
+
+# if !GNULIB_defined_struct_time_t_must_be_integral
+/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
+   time_t to be an integer type, even though C99 permits floating
+   point.  We don't know of any implementation that uses floating
+   point, and it is much easier to write code that doesn't have to
+   worry about that corner case, so we force the issue.  */
+struct __time_t_must_be_integral {
+  unsigned int __floating_time_t_unsupported : (time_t) 1;
+};
+#  define GNULIB_defined_struct_time_t_must_be_integral 1
+# endif
+
+/* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
+   return -1 and store the remaining time into RMTP.  See
+   <http://www.opengroup.org/susv3xsh/nanosleep.html>.  */
+# if @GNULIB_NANOSLEEP@
+#  if @REPLACE_NANOSLEEP@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define nanosleep rpl_nanosleep
+#   endif
+_GL_FUNCDECL_RPL (nanosleep, int,
+                  (struct timespec const *__rqtp, struct timespec *__rmtp)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (nanosleep, int,
+                  (struct timespec const *__rqtp, struct timespec *__rmtp));
+#  else
+#   if ! @HAVE_NANOSLEEP@
+_GL_FUNCDECL_SYS (nanosleep, int,
+                  (struct timespec const *__rqtp, struct timespec *__rmtp)
+                  _GL_ARG_NONNULL ((1)));
+#   endif
+_GL_CXXALIAS_SYS (nanosleep, int,
+                  (struct timespec const *__rqtp, struct timespec *__rmtp));
+#  endif
+_GL_CXXALIASWARN (nanosleep);
+# endif
+
+/* Return the 'time_t' representation of TP and normalize TP.  */
+# if @GNULIB_MKTIME@
+#  if @REPLACE_MKTIME@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define mktime rpl_mktime
+#   endif
+_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp));
+#  else
+_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp));
+#  endif
+_GL_CXXALIASWARN (mktime);
+# endif
+
+/* Convert TIMER to RESULT, assuming local time and UTC respectively.  See
+   <http://www.opengroup.org/susv3xsh/localtime_r.html> and
+   <http://www.opengroup.org/susv3xsh/gmtime_r.html>.  */
+# if @GNULIB_TIME_R@
+#  if @REPLACE_LOCALTIME_R@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef localtime_r
+#    define localtime_r rpl_localtime_r
+#   endif
+_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
+                                             struct tm *restrict __result)
+                                            _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
+                                             struct tm *restrict __result));
+#  else
+#   if ! @HAVE_DECL_LOCALTIME_R@
+_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
+                                             struct tm *restrict __result)
+                                            _GL_ARG_NONNULL ((1, 2)));
+#   endif
+_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
+                                             struct tm *restrict __result));
+#  endif
+#  if @HAVE_DECL_LOCALTIME_R@
+_GL_CXXALIASWARN (localtime_r);
+#  endif
+#  if @REPLACE_LOCALTIME_R@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef gmtime_r
+#    define gmtime_r rpl_gmtime_r
+#   endif
+_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
+                                          struct tm *restrict __result)
+                                         _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
+                                          struct tm *restrict __result));
+#  else
+#   if ! @HAVE_DECL_LOCALTIME_R@
+_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
+                                          struct tm *restrict __result)
+                                         _GL_ARG_NONNULL ((1, 2)));
+#   endif
+_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
+                                          struct tm *restrict __result));
+#  endif
+#  if @HAVE_DECL_LOCALTIME_R@
+_GL_CXXALIASWARN (gmtime_r);
+#  endif
+# endif
+
+/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
+   the resulting broken-down time into TM.  See
+   <http://www.opengroup.org/susv3xsh/strptime.html>.  */
+# if @GNULIB_STRPTIME@
+#  if ! @HAVE_STRPTIME@
+_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf,
+                                     char const *restrict __format,
+                                     struct tm *restrict __tm)
+                                    _GL_ARG_NONNULL ((1, 2, 3)));
+#  endif
+_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf,
+                                     char const *restrict __format,
+                                     struct tm *restrict __tm));
+_GL_CXXALIASWARN (strptime);
+# endif
+
+/* Convert TM to a time_t value, assuming UTC.  */
+# if @GNULIB_TIMEGM@
+#  if @REPLACE_TIMEGM@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef timegm
+#    define timegm rpl_timegm
+#   endif
+_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm));
+#  else
+#   if ! @HAVE_TIMEGM@
+_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
+#   endif
+_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm));
+#  endif
+_GL_CXXALIASWARN (timegm);
+# endif
+
+/* Encourage applications to avoid unsafe functions that can overrun
+   buffers when given outlandish struct tm values.  Portable
+   applications should use strftime (or even sprintf) instead.  */
+# if defined GNULIB_POSIXCHECK
+#  undef asctime
+_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
+#  undef asctime_r
+_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
+#  undef ctime
+_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
+#  undef ctime_r
+_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+
+#endif
diff --git a/gnulib/lib/time_r.c b/gnulib/lib/time_r.c
new file mode 100644 (file)
index 0000000..31d010e
--- /dev/null
@@ -0,0 +1,45 @@
+/* Reentrant time functions like localtime_r.
+
+   Copyright (C) 2003, 2006-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Paul Eggert.  */
+
+#include <config.h>
+
+#include <time.h>
+
+static struct tm *
+copy_tm_result (struct tm *dest, struct tm const *src)
+{
+  if (! src)
+    return 0;
+  *dest = *src;
+  return dest;
+}
+
+
+struct tm *
+gmtime_r (time_t const * restrict t, struct tm * restrict tp)
+{
+  return copy_tm_result (tp, gmtime (t));
+}
+
+struct tm *
+localtime_r (time_t const * restrict t, struct tm * restrict tp)
+{
+  return copy_tm_result (tp, localtime (t));
+}
diff --git a/gnulib/lib/timespec.h b/gnulib/lib/timespec.h
new file mode 100644 (file)
index 0000000..74d5749
--- /dev/null
@@ -0,0 +1,63 @@
+/* timespec -- System time interface
+
+   Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-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 TIMESPEC_H
+# define TIMESPEC_H
+
+# include <time.h>
+
+/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
+
+   For each time stamp T, this code assumes that either:
+
+     * T.tv_nsec is in the range 0..999999999; or
+     * T.tv_sec corresponds to a valid leap second on a host that supports
+       leap seconds, and T.tv_nsec is in the range 1000000000..1999999999; or
+     * T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or
+       T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000.
+       This allows for special struct timespec values that are less or
+       greater than all possible valid time stamps.
+
+   In all these cases, it is safe to subtract two tv_nsec values and
+   convert the result to integer without worrying about overflow on
+   any platform of interest to the GNU project, since all such
+   platforms have 32-bit int or wider.
+
+   Replacing "(int) (a.tv_nsec - b.tv_nsec)" with something like
+   "a.tv_nsec < b.tv_nsec ? -1 : a.tv_nsec > b.tv_nsec" would cause
+   this function to work in some cases where the above assumption is
+   violated, but not in all cases (e.g., a.tv_sec==1, a.tv_nsec==-2,
+   b.tv_sec==0, b.tv_nsec==999999999) and is arguably not worth the
+   extra instructions.  Using a subtraction has the advantage of
+   detecting some invalid cases on platforms that detect integer
+   overflow.
+
+   The (int) cast avoids a gcc -Wconversion warning.  */
+
+static inline int
+timespec_cmp (struct timespec a, struct timespec b)
+{
+  return (a.tv_sec < b.tv_sec ? -1
+          : a.tv_sec > b.tv_sec ? 1
+          : (int) (a.tv_nsec - b.tv_nsec));
+}
+
+void gettime (struct timespec *);
+int settime (struct timespec const *);
+
+#endif
diff --git a/gnulib/lib/unistd--.h b/gnulib/lib/unistd--.h
new file mode 100644 (file)
index 0000000..27307c8
--- /dev/null
@@ -0,0 +1,32 @@
+/* Like unistd.h, but redefine some names to avoid glitches.
+
+   Copyright (C) 2005, 2009-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 Paul Eggert.  */
+
+#include <unistd.h>
+#include "unistd-safer.h"
+
+#undef dup
+#define dup dup_safer
+
+#undef pipe
+#define pipe pipe_safer
+
+#if GNULIB_PIPE2_SAFER
+# undef pipe2
+# define pipe2 pipe2_safer
+#endif
diff --git a/gnulib/lib/unistd-safer.h b/gnulib/lib/unistd-safer.h
new file mode 100644 (file)
index 0000000..14f537f
--- /dev/null
@@ -0,0 +1,31 @@
+/* Invoke unistd-like functions, but avoid some glitches.
+
+   Copyright (C) 2001, 2003, 2005, 2009-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 Paul Eggert and Eric Blake.  */
+
+int dup_safer (int);
+int fd_safer (int);
+int pipe_safer (int[2]);
+
+#if GNULIB_FD_SAFER_FLAG
+int dup_safer_flag (int, int);
+int fd_safer_flag (int, int);
+#endif
+
+#if GNULIB_PIPE2_SAFER
+int pipe2_safer (int[2], int);
+#endif
diff --git a/gnulib/lib/unistd.in.h b/gnulib/lib/unistd.in.h
new file mode 100644 (file)
index 0000000..15893d7
--- /dev/null
@@ -0,0 +1,1381 @@
+/* Substitute for and wrapper around <unistd.h>.
+   Copyright (C) 2003-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* Special invocation convention:
+   - On mingw, several headers, including <winsock2.h>, include <unistd.h>,
+     but we need to ensure that both the system <unistd.h> and <winsock2.h>
+     are completely included before we replace gethostname.  */
+#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
+  && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
+/* <unistd.h> is being indirectly included for the first time from
+   <winsock2.h>; avoid declaring any overrides.  */
+# if @HAVE_UNISTD_H@
+#  @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+# else
+#  error unexpected; report this to bug-gnulib@gnu.org
+# endif
+# define _GL_WINSOCK2_H_WITNESS
+
+/* Normal invocation.  */
+#elif !defined _GL_UNISTD_H
+
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_UNISTD_H@
+# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+#endif
+
+/* Get all possible declarations of gethostname().  */
+#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
+  && !defined _GL_INCLUDING_WINSOCK2_H
+# define _GL_INCLUDING_WINSOCK2_H
+# include <winsock2.h>
+# undef _GL_INCLUDING_WINSOCK2_H
+#endif
+
+#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
+#define _GL_UNISTD_H
+
+/* NetBSD 5.0 mis-defines NULL.  Also get size_t.  */
+#include <stddef.h>
+
+/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>.  */
+/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>.  */
+/* But avoid namespace pollution on glibc systems.  */
+#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
+     || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
+         && defined __CYGWIN__)) \
+    && ! defined __GLIBC__
+# include <stdio.h>
+#endif
+
+/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>.  */
+/* But avoid namespace pollution on glibc systems.  */
+#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \
+    && ! defined __GLIBC__
+# include <fcntl.h>
+#endif
+
+/* mingw fails to declare _exit in <unistd.h>.  */
+/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
+/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>.  */
+/* But avoid namespace pollution on glibc systems.  */
+#ifndef __GLIBC__
+# include <stdlib.h>
+#endif
+
+/* mingw declares getcwd in <io.h>, not in <unistd.h>.  */
+#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
+     && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# include <io.h>
+#endif
+
+/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.
+   NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>.  */
+/* But avoid namespace pollution on glibc systems.  */
+#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \
+     || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \
+    && !defined __GLIBC__
+# include <netdb.h>
+#endif
+
+#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
+     || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
+/* Get ssize_t.  */
+# include <sys/types.h>
+#endif
+
+/* Get getopt(), optarg, optind, opterr, optopt.
+   But avoid namespace pollution on glibc systems.  */
+#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
+# include <getopt.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
+#if @GNULIB_GETHOSTNAME@
+/* Get all possible declarations of gethostname().  */
+# if @UNISTD_H_HAVE_WINSOCK2_H@
+#  if !defined _GL_SYS_SOCKET_H
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef socket
+#    define socket              socket_used_without_including_sys_socket_h
+#    undef connect
+#    define connect             connect_used_without_including_sys_socket_h
+#    undef accept
+#    define accept              accept_used_without_including_sys_socket_h
+#    undef bind
+#    define bind                bind_used_without_including_sys_socket_h
+#    undef getpeername
+#    define getpeername         getpeername_used_without_including_sys_socket_h
+#    undef getsockname
+#    define getsockname         getsockname_used_without_including_sys_socket_h
+#    undef getsockopt
+#    define getsockopt          getsockopt_used_without_including_sys_socket_h
+#    undef listen
+#    define listen              listen_used_without_including_sys_socket_h
+#    undef recv
+#    define recv                recv_used_without_including_sys_socket_h
+#    undef send
+#    define send                send_used_without_including_sys_socket_h
+#    undef recvfrom
+#    define recvfrom            recvfrom_used_without_including_sys_socket_h
+#    undef sendto
+#    define sendto              sendto_used_without_including_sys_socket_h
+#    undef setsockopt
+#    define setsockopt          setsockopt_used_without_including_sys_socket_h
+#    undef shutdown
+#    define shutdown            shutdown_used_without_including_sys_socket_h
+#   else
+     _GL_WARN_ON_USE (socket,
+                      "socket() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (connect,
+                      "connect() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (accept,
+                      "accept() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (bind,
+                      "bind() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (getpeername,
+                      "getpeername() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (getsockname,
+                      "getsockname() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (getsockopt,
+                      "getsockopt() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (listen,
+                      "listen() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (recv,
+                      "recv() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (send,
+                      "send() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (recvfrom,
+                      "recvfrom() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (sendto,
+                      "sendto() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (setsockopt,
+                      "setsockopt() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (shutdown,
+                      "shutdown() used without including <sys/socket.h>");
+#   endif
+#  endif
+#  if !defined _GL_SYS_SELECT_H
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef select
+#    define select              select_used_without_including_sys_select_h
+#   else
+     _GL_WARN_ON_USE (select,
+                      "select() used without including <sys/select.h>");
+#   endif
+#  endif
+# endif
+#endif
+
+
+/* OS/2 EMX lacks these macros.  */
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+/* Ensure *_OK macros exist.  */
+#ifndef F_OK
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+#endif
+
+
+/* Declare overridden functions.  */
+
+
+#if defined GNULIB_POSIXCHECK
+/* The access() function is a security risk.  */
+_GL_WARN_ON_USE (access, "the access function is a security risk - "
+                 "use the gnulib module faccessat instead");
+#endif
+
+
+#if @GNULIB_CHOWN@
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
+   to GID (if GID is not -1).  Follow symbolic links.
+   Return 0 if successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/chown.html>.  */
+# if @REPLACE_CHOWN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef chown
+#   define chown rpl_chown
+#  endif
+_GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)
+                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid));
+# else
+#  if !@HAVE_CHOWN@
+_GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)
+                              _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid));
+# endif
+_GL_CXXALIASWARN (chown);
+#elif defined GNULIB_POSIXCHECK
+# undef chown
+# if HAVE_RAW_DECL_CHOWN
+_GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and "
+                 "doesn't treat a uid or gid of -1 on some systems - "
+                 "use gnulib module chown for portability");
+# endif
+#endif
+
+
+#if @GNULIB_CLOSE@
+# if @REPLACE_CLOSE@
+/* Automatically included by modules that need a replacement for close.  */
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef close
+#   define close rpl_close
+#  endif
+_GL_FUNCDECL_RPL (close, int, (int fd));
+_GL_CXXALIAS_RPL (close, int, (int fd));
+# else
+_GL_CXXALIAS_SYS (close, int, (int fd));
+# endif
+_GL_CXXALIASWARN (close);
+#elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+# undef close
+# define close close_used_without_requesting_gnulib_module_close
+#elif defined GNULIB_POSIXCHECK
+# undef close
+/* Assume close is always declared.  */
+_GL_WARN_ON_USE (close, "close does not portably work on sockets - "
+                 "use gnulib module close for portability");
+#endif
+
+
+#if @REPLACE_DUP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  define dup rpl_dup
+# endif
+_GL_FUNCDECL_RPL (dup, int, (int oldfd));
+_GL_CXXALIAS_RPL (dup, int, (int oldfd));
+#else
+_GL_CXXALIAS_SYS (dup, int, (int oldfd));
+#endif
+_GL_CXXALIASWARN (dup);
+
+
+#if @GNULIB_DUP2@
+/* Copy the file descriptor OLDFD into file descriptor NEWFD.  Do nothing if
+   NEWFD = OLDFD, otherwise close NEWFD first if it is open.
+   Return newfd if successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/dup2.html>.  */
+# if @REPLACE_DUP2@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define dup2 rpl_dup2
+#  endif
+_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd));
+_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd));
+# else
+#  if !@HAVE_DUP2@
+_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd));
+#  endif
+_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
+# endif
+_GL_CXXALIASWARN (dup2);
+#elif defined GNULIB_POSIXCHECK
+# undef dup2
+# if HAVE_RAW_DECL_DUP2
+_GL_WARN_ON_USE (dup2, "dup2 is unportable - "
+                 "use gnulib module dup2 for portability");
+# endif
+#endif
+
+
+#if @GNULIB_DUP3@
+/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the
+   specified flags.
+   The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+   and O_TEXT, O_BINARY (defined in "binary-io.h").
+   Close NEWFD first if it is open.
+   Return newfd if successful, otherwise -1 and errno set.
+   See the Linux man page at
+   <http://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>.  */
+# if @HAVE_DUP3@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define dup3 rpl_dup3
+#  endif
+_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags));
+_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags));
+# else
+_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags));
+_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags));
+# endif
+_GL_CXXALIASWARN (dup3);
+#elif defined GNULIB_POSIXCHECK
+# undef dup3
+# if HAVE_RAW_DECL_DUP3
+_GL_WARN_ON_USE (dup3, "dup3 is unportable - "
+                 "use gnulib module dup3 for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ENVIRON@
+# if !@HAVE_DECL_ENVIRON@
+/* Set of environment variables and values.  An array of strings of the form
+   "VARIABLE=VALUE", terminated with a NULL.  */
+#  if defined __APPLE__ && defined __MACH__
+#   include <crt_externs.h>
+#   define environ (*_NSGetEnviron ())
+#  else
+#   ifdef __cplusplus
+extern "C" {
+#   endif
+extern char **environ;
+#   ifdef __cplusplus
+}
+#   endif
+#  endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if HAVE_RAW_DECL_ENVIRON
+static inline char ***
+rpl_environ (void)
+{
+  return &environ;
+}
+_GL_WARN_ON_USE (rpl_environ, "environ is unportable - "
+                 "use gnulib module environ for portability");
+#  undef environ
+#  define environ (*rpl_environ ())
+# endif
+#endif
+
+
+#if @GNULIB_EUIDACCESS@
+/* Like access(), except that it uses the effective user id and group id of
+   the current process.  */
+# if !@HAVE_EUIDACCESS@
+_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode)
+                                   _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode));
+_GL_CXXALIASWARN (euidaccess);
+# if defined GNULIB_POSIXCHECK
+/* Like access(), this function is a security risk.  */
+_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - "
+                 "use the gnulib module faccessat instead");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef euidaccess
+# if HAVE_RAW_DECL_EUIDACCESS
+_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
+                 "use gnulib module euidaccess for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FACCESSAT@
+# if !@HAVE_FACCESSAT@
+_GL_FUNCDECL_SYS (faccessat, int,
+                  (int fd, char const *file, int mode, int flag)
+                  _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (faccessat, int,
+                  (int fd, char const *file, int mode, int flag));
+_GL_CXXALIASWARN (faccessat);
+#elif defined GNULIB_POSIXCHECK
+# undef faccessat
+# if HAVE_RAW_DECL_FACCESSAT
+_GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
+                 "use gnulib module faccessat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FCHDIR@
+/* Change the process' current working directory to the directory on which
+   the given file descriptor is open.
+   Return 0 if successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/fchdir.html>.  */
+# if ! @HAVE_FCHDIR@
+_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
+
+/* Gnulib internal hooks needed to maintain the fchdir metadata.  */
+_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename)
+     _GL_ARG_NONNULL ((2));
+_GL_EXTERN_C void _gl_unregister_fd (int fd);
+_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);
+_GL_EXTERN_C const char *_gl_directory_name (int fd);
+
+# else
+#  if !@HAVE_DECL_FCHDIR@
+_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
+#  endif
+# endif
+_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
+_GL_CXXALIASWARN (fchdir);
+#elif defined GNULIB_POSIXCHECK
+# undef fchdir
+# if HAVE_RAW_DECL_FCHDIR
+_GL_WARN_ON_USE (fchdir, "fchdir is unportable - "
+                 "use gnulib module fchdir for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FCHOWNAT@
+# if @REPLACE_FCHOWNAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fchownat
+#   define fchownat rpl_fchownat
+#  endif
+_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file,
+                                  uid_t owner, gid_t group, int flag)
+                                 _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file,
+                                  uid_t owner, gid_t group, int flag));
+# else
+#  if !@HAVE_FCHOWNAT@
+_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file,
+                                  uid_t owner, gid_t group, int flag)
+                                 _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file,
+                                  uid_t owner, gid_t group, int flag));
+# endif
+_GL_CXXALIASWARN (fchownat);
+#elif defined GNULIB_POSIXCHECK
+# undef fchownat
+# if HAVE_RAW_DECL_FCHOWNAT
+_GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
+                 "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FSYNC@
+/* Synchronize changes to a file.
+   Return 0 if successful, otherwise -1 and errno set.
+   See POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/fsync.html>.  */
+# if !@HAVE_FSYNC@
+_GL_FUNCDECL_SYS (fsync, int, (int fd));
+# endif
+_GL_CXXALIAS_SYS (fsync, int, (int fd));
+_GL_CXXALIASWARN (fsync);
+#elif defined GNULIB_POSIXCHECK
+# undef fsync
+# if HAVE_RAW_DECL_FSYNC
+_GL_WARN_ON_USE (fsync, "fsync is unportable - "
+                 "use gnulib module fsync for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FTRUNCATE@
+/* Change the size of the file to which FD is opened to become equal to LENGTH.
+   Return 0 if successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/ftruncate.html>.  */
+# if !@HAVE_FTRUNCATE@
+_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
+# endif
+_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
+_GL_CXXALIASWARN (ftruncate);
+#elif defined GNULIB_POSIXCHECK
+# undef ftruncate
+# if HAVE_RAW_DECL_FTRUNCATE
+_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
+                 "use gnulib module ftruncate for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETCWD@
+/* Get the name of the current working directory, and put it in SIZE bytes
+   of BUF.
+   Return BUF if successful, or NULL if the directory couldn't be determined
+   or SIZE was too small.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/getcwd.html>.
+   Additionally, the gnulib module 'getcwd' guarantees the following GNU
+   extension: If BUF is NULL, an array is allocated with 'malloc'; the array
+   is SIZE bytes long, unless SIZE == 0, in which case it is as big as
+   necessary.  */
+# if @REPLACE_GETCWD@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define getcwd rpl_getcwd
+#  endif
+_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
+_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
+# else
+/* Need to cast, because on mingw, the second parameter is
+                                                   int size.  */
+_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
+# endif
+_GL_CXXALIASWARN (getcwd);
+#elif defined GNULIB_POSIXCHECK
+# undef getcwd
+# if HAVE_RAW_DECL_GETCWD
+_GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
+                 "use gnulib module getcwd for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETDOMAINNAME@
+/* Return the NIS domain name of the machine.
+   WARNING! The NIS domain name is unrelated to the fully qualified host name
+            of the machine.  It is also unrelated to email addresses.
+   WARNING! The NIS domain name is usually the empty string or "(none)" when
+            not using NIS.
+
+   Put up to LEN bytes of the NIS domain name into NAME.
+   Null terminate it if the name is shorter than LEN.
+   If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
+   Return 0 if successful, otherwise set errno and return -1.  */
+# if @REPLACE_GETDOMAINNAME@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getdomainname
+#   define getdomainname rpl_getdomainname
+#  endif
+_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len)
+                                      _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len));
+# else
+#  if !@HAVE_DECL_GETDOMAINNAME@
+_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
+                                      _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len));
+# endif
+_GL_CXXALIASWARN (getdomainname);
+#elif defined GNULIB_POSIXCHECK
+# undef getdomainname
+# if HAVE_RAW_DECL_GETDOMAINNAME
+_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
+                 "use gnulib module getdomainname for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETDTABLESIZE@
+/* Return the maximum number of file descriptors in the current process.
+   In POSIX, this is same as sysconf (_SC_OPEN_MAX).  */
+# if !@HAVE_GETDTABLESIZE@
+_GL_FUNCDECL_SYS (getdtablesize, int, (void));
+# endif
+_GL_CXXALIAS_SYS (getdtablesize, int, (void));
+_GL_CXXALIASWARN (getdtablesize);
+#elif defined GNULIB_POSIXCHECK
+# undef getdtablesize
+# if HAVE_RAW_DECL_GETDTABLESIZE
+_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
+                 "use gnulib module getdtablesize for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETGROUPS@
+/* Return the supplemental groups that the current process belongs to.
+   It is unspecified whether the effective group id is in the list.
+   If N is 0, return the group count; otherwise, N describes how many
+   entries are available in GROUPS.  Return -1 and set errno if N is
+   not 0 and not large enough.  Fails with ENOSYS on some systems.  */
+# if @REPLACE_GETGROUPS@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getgroups
+#   define getgroups rpl_getgroups
+#  endif
+_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups));
+_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups));
+# else
+#  if !@HAVE_GETGROUPS@
+_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups));
+#  endif
+_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups));
+# endif
+_GL_CXXALIASWARN (getgroups);
+#elif defined GNULIB_POSIXCHECK
+# undef getgroups
+# if HAVE_RAW_DECL_GETGROUPS
+_GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
+                 "use gnulib module getgroups for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETHOSTNAME@
+/* Return the standard host name of the machine.
+   WARNING! The host name may or may not be fully qualified.
+
+   Put up to LEN bytes of the host name into NAME.
+   Null terminate it if the name is shorter than LEN.
+   If the host name is longer than LEN, set errno = EINVAL and return -1.
+   Return 0 if successful, otherwise set errno and return -1.  */
+# if @UNISTD_H_HAVE_WINSOCK2_H@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef gethostname
+#   define gethostname rpl_gethostname
+#  endif
+_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len)
+                                    _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len));
+# else
+#  if !@HAVE_GETHOSTNAME@
+_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len)
+                                    _GL_ARG_NONNULL ((1)));
+#  endif
+/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second
+   parameter is
+                                                      int len.  */
+_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
+# endif
+_GL_CXXALIASWARN (gethostname);
+#elif @UNISTD_H_HAVE_WINSOCK2_H@
+# undef gethostname
+# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
+#elif defined GNULIB_POSIXCHECK
+# undef gethostname
+# if HAVE_RAW_DECL_GETHOSTNAME
+_GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
+                 "use gnulib module gethostname for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETLOGIN@
+/* Returns the user's login name, or NULL if it cannot be found.  Upon error,
+   returns NULL with errno set.
+
+   See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+
+   Most programs don't need to use this function, because the information is
+   available through environment variables:
+     ${LOGNAME-$USER}        on Unix platforms,
+     $USERNAME               on native Windows platforms.
+ */
+# if !@HAVE_GETLOGIN@
+_GL_FUNCDECL_SYS (getlogin, char *, (void));
+# endif
+_GL_CXXALIAS_SYS (getlogin, char *, (void));
+_GL_CXXALIASWARN (getlogin);
+#elif defined GNULIB_POSIXCHECK
+# undef getlogin
+# if HAVE_RAW_DECL_GETLOGIN
+_GL_WARN_ON_USE (getlogin, "getlogin is unportable - "
+                 "use gnulib module getlogin for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETLOGIN_R@
+/* Copies the user's login name to NAME.
+   The array pointed to by NAME has room for SIZE bytes.
+
+   Returns 0 if successful.  Upon error, an error number is returned, or -1 in
+   the case that the login name cannot be found but no specific error is
+   provided (this case is hopefully rare but is left open by the POSIX spec).
+
+   See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+
+   Most programs don't need to use this function, because the information is
+   available through environment variables:
+     ${LOGNAME-$USER}        on Unix platforms,
+     $USERNAME               on native Windows platforms.
+ */
+# if @REPLACE_GETLOGIN_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define getlogin_r rpl_getlogin_r
+#  endif
+_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size)
+                                   _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size));
+# else
+#  if !@HAVE_DECL_GETLOGIN_R@
+_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size)
+                                   _GL_ARG_NONNULL ((1)));
+#  endif
+/* Need to cast, because on Solaris 10 systems, the second argument is
+                                                     int size.  */
+_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size));
+# endif
+_GL_CXXALIASWARN (getlogin_r);
+#elif defined GNULIB_POSIXCHECK
+# undef getlogin_r
+# if HAVE_RAW_DECL_GETLOGIN_R
+_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
+                 "use gnulib module getlogin_r for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETPAGESIZE@
+# if @REPLACE_GETPAGESIZE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define getpagesize rpl_getpagesize
+#  endif
+_GL_FUNCDECL_RPL (getpagesize, int, (void));
+_GL_CXXALIAS_RPL (getpagesize, int, (void));
+# else
+#  if !@HAVE_GETPAGESIZE@
+#   if !defined getpagesize
+/* This is for POSIX systems.  */
+#    if !defined _gl_getpagesize && defined _SC_PAGESIZE
+#     if ! (defined __VMS && __VMS_VER < 70000000)
+#      define _gl_getpagesize() sysconf (_SC_PAGESIZE)
+#     endif
+#    endif
+/* This is for older VMS.  */
+#    if !defined _gl_getpagesize && defined __VMS
+#     ifdef __ALPHA
+#      define _gl_getpagesize() 8192
+#     else
+#      define _gl_getpagesize() 512
+#     endif
+#    endif
+/* This is for BeOS.  */
+#    if !defined _gl_getpagesize && @HAVE_OS_H@
+#     include <OS.h>
+#     if defined B_PAGE_SIZE
+#      define _gl_getpagesize() B_PAGE_SIZE
+#     endif
+#    endif
+/* This is for AmigaOS4.0.  */
+#    if !defined _gl_getpagesize && defined __amigaos4__
+#     define _gl_getpagesize() 2048
+#    endif
+/* This is for older Unix systems.  */
+#    if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@
+#     include <sys/param.h>
+#     ifdef EXEC_PAGESIZE
+#      define _gl_getpagesize() EXEC_PAGESIZE
+#     else
+#      ifdef NBPG
+#       ifndef CLSIZE
+#        define CLSIZE 1
+#       endif
+#       define _gl_getpagesize() (NBPG * CLSIZE)
+#      else
+#       ifdef NBPC
+#        define _gl_getpagesize() NBPC
+#       endif
+#      endif
+#     endif
+#    endif
+#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#     define getpagesize() _gl_getpagesize ()
+#    else
+#     if !GNULIB_defined_getpagesize_function
+static inline int
+getpagesize ()
+{
+  return _gl_getpagesize ();
+}
+#      define GNULIB_defined_getpagesize_function 1
+#     endif
+#    endif
+#   endif
+#  endif
+/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t.  */
+_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void));
+# endif
+# if @HAVE_DECL_GETPAGESIZE@
+_GL_CXXALIASWARN (getpagesize);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getpagesize
+# if HAVE_RAW_DECL_GETPAGESIZE
+_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
+                 "use gnulib module getpagesize for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETUSERSHELL@
+/* Return the next valid login shell on the system, or NULL when the end of
+   the list has been reached.  */
+# if !@HAVE_DECL_GETUSERSHELL@
+_GL_FUNCDECL_SYS (getusershell, char *, (void));
+# endif
+_GL_CXXALIAS_SYS (getusershell, char *, (void));
+_GL_CXXALIASWARN (getusershell);
+#elif defined GNULIB_POSIXCHECK
+# undef getusershell
+# if HAVE_RAW_DECL_GETUSERSHELL
+_GL_WARN_ON_USE (getusershell, "getusershell is unportable - "
+                 "use gnulib module getusershell for portability");
+# endif
+#endif
+
+#if @GNULIB_GETUSERSHELL@
+/* Rewind to pointer that is advanced at each getusershell() call.  */
+# if !@HAVE_DECL_GETUSERSHELL@
+_GL_FUNCDECL_SYS (setusershell, void, (void));
+# endif
+_GL_CXXALIAS_SYS (setusershell, void, (void));
+_GL_CXXALIASWARN (setusershell);
+#elif defined GNULIB_POSIXCHECK
+# undef setusershell
+# if HAVE_RAW_DECL_SETUSERSHELL
+_GL_WARN_ON_USE (setusershell, "setusershell is unportable - "
+                 "use gnulib module getusershell for portability");
+# endif
+#endif
+
+#if @GNULIB_GETUSERSHELL@
+/* Free the pointer that is advanced at each getusershell() call and
+   associated resources.  */
+# if !@HAVE_DECL_GETUSERSHELL@
+_GL_FUNCDECL_SYS (endusershell, void, (void));
+# endif
+_GL_CXXALIAS_SYS (endusershell, void, (void));
+_GL_CXXALIASWARN (endusershell);
+#elif defined GNULIB_POSIXCHECK
+# undef endusershell
+# if HAVE_RAW_DECL_ENDUSERSHELL
+_GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
+                 "use gnulib module getusershell for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LCHOWN@
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
+   to GID (if GID is not -1).  Do not follow symbolic links.
+   Return 0 if successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/lchown.html>.  */
+# if @REPLACE_LCHOWN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef lchown
+#   define lchown rpl_lchown
+#  endif
+_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)
+                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group));
+# else
+#  if !@HAVE_LCHOWN@
+_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)
+                               _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group));
+# endif
+_GL_CXXALIASWARN (lchown);
+#elif defined GNULIB_POSIXCHECK
+# undef lchown
+# if HAVE_RAW_DECL_LCHOWN
+_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
+                 "use gnulib module lchown for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LINK@
+/* Create a new hard link for an existing file.
+   Return 0 if successful, otherwise -1 and errno set.
+   See POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/link.html>.  */
+# if @REPLACE_LINK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define link rpl_link
+#  endif
+_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2)
+                             _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2));
+# else
+#  if !@HAVE_LINK@
+_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2)
+                             _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2));
+# endif
+_GL_CXXALIASWARN (link);
+#elif defined GNULIB_POSIXCHECK
+# undef link
+# if HAVE_RAW_DECL_LINK
+_GL_WARN_ON_USE (link, "link is unportable - "
+                 "use gnulib module link for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LINKAT@
+/* Create a new hard link for an existing file, relative to two
+   directories.  FLAG controls whether symlinks are followed.
+   Return 0 if successful, otherwise -1 and errno set.  */
+# if @REPLACE_LINKAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef linkat
+#   define linkat rpl_linkat
+#  endif
+_GL_FUNCDECL_RPL (linkat, int,
+                  (int fd1, const char *path1, int fd2, const char *path2,
+                   int flag)
+                  _GL_ARG_NONNULL ((2, 4)));
+_GL_CXXALIAS_RPL (linkat, int,
+                  (int fd1, const char *path1, int fd2, const char *path2,
+                   int flag));
+# else
+#  if !@HAVE_LINKAT@
+_GL_FUNCDECL_SYS (linkat, int,
+                  (int fd1, const char *path1, int fd2, const char *path2,
+                   int flag)
+                  _GL_ARG_NONNULL ((2, 4)));
+#  endif
+_GL_CXXALIAS_SYS (linkat, int,
+                  (int fd1, const char *path1, int fd2, const char *path2,
+                   int flag));
+# endif
+_GL_CXXALIASWARN (linkat);
+#elif defined GNULIB_POSIXCHECK
+# undef linkat
+# if HAVE_RAW_DECL_LINKAT
+_GL_WARN_ON_USE (linkat, "linkat is unportable - "
+                 "use gnulib module linkat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LSEEK@
+/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
+   Return the new offset if successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/lseek.html>.  */
+# if @REPLACE_LSEEK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define lseek rpl_lseek
+#  endif
+_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence));
+_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence));
+# else
+_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
+# endif
+_GL_CXXALIASWARN (lseek);
+#elif defined GNULIB_POSIXCHECK
+# undef lseek
+# if HAVE_RAW_DECL_LSEEK
+_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
+                 "systems - use gnulib module lseek for portability");
+# endif
+#endif
+
+
+#if @GNULIB_PIPE@
+/* Create a pipe, defaulting to O_BINARY mode.
+   Store the read-end as fd[0] and the write-end as fd[1].
+   Return 0 upon success, or -1 with errno set upon failure.  */
+# if !@HAVE_PIPE@
+_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pipe, int, (int fd[2]));
+_GL_CXXALIASWARN (pipe);
+#elif defined GNULIB_POSIXCHECK
+# undef pipe
+# if HAVE_RAW_DECL_PIPE
+_GL_WARN_ON_USE (pipe, "pipe is unportable - "
+                 "use gnulib module pipe-posix for portability");
+# endif
+#endif
+
+
+#if @GNULIB_PIPE2@
+/* Create a pipe, applying the given flags when opening the read-end of the
+   pipe and the write-end of the pipe.
+   The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+   and O_TEXT, O_BINARY (defined in "binary-io.h").
+   Store the read-end as fd[0] and the write-end as fd[1].
+   Return 0 upon success, or -1 with errno set upon failure.
+   See also the Linux man page at
+   <http://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>.  */
+# if @HAVE_PIPE2@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define pipe2 rpl_pipe2
+#  endif
+_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags));
+# else
+_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags));
+# endif
+_GL_CXXALIASWARN (pipe2);
+#elif defined GNULIB_POSIXCHECK
+# undef pipe2
+# if HAVE_RAW_DECL_PIPE2
+_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
+                 "use gnulib module pipe2 for portability");
+# endif
+#endif
+
+
+#if @GNULIB_PREAD@
+/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET.
+   Return the number of bytes placed into BUF if successful, otherwise
+   set errno and return -1.  0 indicates EOF.  See the POSIX:2001
+   specification <http://www.opengroup.org/susv3xsh/pread.html>.  */
+# if @REPLACE_PREAD@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define pread rpl_pread
+#  endif
+_GL_FUNCDECL_RPL (pread, ssize_t,
+                  (int fd, void *buf, size_t bufsize, off_t offset)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (pread, ssize_t,
+                  (int fd, void *buf, size_t bufsize, off_t offset));
+# else
+#  if !@HAVE_PREAD@
+_GL_FUNCDECL_SYS (pread, ssize_t,
+                  (int fd, void *buf, size_t bufsize, off_t offset)
+                  _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (pread, ssize_t,
+                  (int fd, void *buf, size_t bufsize, off_t offset));
+# endif
+_GL_CXXALIASWARN (pread);
+#elif defined GNULIB_POSIXCHECK
+# undef pread
+# if HAVE_RAW_DECL_PREAD
+_GL_WARN_ON_USE (pread, "pread is unportable - "
+                 "use gnulib module pread for portability");
+# endif
+#endif
+
+
+#if @GNULIB_PWRITE@
+/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET.
+   Return the number of bytes written if successful, otherwise
+   set errno and return -1.  0 indicates nothing written.  See the
+   POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/pwrite.html>.  */
+# if @REPLACE_PWRITE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define pwrite rpl_pwrite
+#  endif
+_GL_FUNCDECL_RPL (pwrite, ssize_t,
+                  (int fd, const void *buf, size_t bufsize, off_t offset)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (pwrite, ssize_t,
+                  (int fd, const void *buf, size_t bufsize, off_t offset));
+# else
+#  if !@HAVE_PWRITE@
+_GL_FUNCDECL_SYS (pwrite, ssize_t,
+                  (int fd, const void *buf, size_t bufsize, off_t offset)
+                  _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (pwrite, ssize_t,
+                  (int fd, const void *buf, size_t bufsize, off_t offset));
+# endif
+_GL_CXXALIASWARN (pwrite);
+#elif defined GNULIB_POSIXCHECK
+# undef pwrite
+# if HAVE_RAW_DECL_PWRITE
+_GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
+                 "use gnulib module pwrite for portability");
+# endif
+#endif
+
+
+#if @GNULIB_READLINK@
+/* Read the contents of the symbolic link FILE and place the first BUFSIZE
+   bytes of it into BUF.  Return the number of bytes placed into BUF if
+   successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/readlink.html>.  */
+# if @REPLACE_READLINK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define readlink rpl_readlink
+#  endif
+_GL_FUNCDECL_RPL (readlink, ssize_t,
+                  (const char *file, char *buf, size_t bufsize)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (readlink, ssize_t,
+                  (const char *file, char *buf, size_t bufsize));
+# else
+#  if !@HAVE_READLINK@
+_GL_FUNCDECL_SYS (readlink, ssize_t,
+                  (const char *file, char *buf, size_t bufsize)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (readlink, ssize_t,
+                  (const char *file, char *buf, size_t bufsize));
+# endif
+_GL_CXXALIASWARN (readlink);
+#elif defined GNULIB_POSIXCHECK
+# undef readlink
+# if HAVE_RAW_DECL_READLINK
+_GL_WARN_ON_USE (readlink, "readlink is unportable - "
+                 "use gnulib module readlink for portability");
+# endif
+#endif
+
+
+#if @GNULIB_READLINKAT@
+# if !@HAVE_READLINKAT@
+_GL_FUNCDECL_SYS (readlinkat, ssize_t,
+                  (int fd, char const *file, char *buf, size_t len)
+                  _GL_ARG_NONNULL ((2, 3)));
+# endif
+_GL_CXXALIAS_SYS (readlinkat, ssize_t,
+                  (int fd, char const *file, char *buf, size_t len));
+_GL_CXXALIASWARN (readlinkat);
+#elif defined GNULIB_POSIXCHECK
+# undef readlinkat
+# if HAVE_RAW_DECL_READLINKAT
+_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
+                 "use gnulib module readlinkat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_RMDIR@
+/* Remove the directory DIR.  */
+# if @REPLACE_RMDIR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define rmdir rpl_rmdir
+#  endif
+_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (rmdir, int, (char const *name));
+# else
+_GL_CXXALIAS_SYS (rmdir, int, (char const *name));
+# endif
+_GL_CXXALIASWARN (rmdir);
+#elif defined GNULIB_POSIXCHECK
+# undef rmdir
+# if HAVE_RAW_DECL_RMDIR
+_GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
+                 "use gnulib module rmdir for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SLEEP@
+/* Pause the execution of the current thread for N seconds.
+   Returns the number of seconds left to sleep.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/sleep.html>.  */
+# if @REPLACE_SLEEP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef sleep
+#   define sleep rpl_sleep
+#  endif
+_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n));
+_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n));
+# else
+#  if !@HAVE_SLEEP@
+_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n));
+#  endif
+_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n));
+# endif
+_GL_CXXALIASWARN (sleep);
+#elif defined GNULIB_POSIXCHECK
+# undef sleep
+# if HAVE_RAW_DECL_SLEEP
+_GL_WARN_ON_USE (sleep, "sleep is unportable - "
+                 "use gnulib module sleep for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SYMLINK@
+# if @REPLACE_SYMLINK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef symlink
+#   define symlink rpl_symlink
+#  endif
+_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file)
+                                _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file));
+# else
+#  if !@HAVE_SYMLINK@
+_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file)
+                                _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file));
+# endif
+_GL_CXXALIASWARN (symlink);
+#elif defined GNULIB_POSIXCHECK
+# undef symlink
+# if HAVE_RAW_DECL_SYMLINK
+_GL_WARN_ON_USE (symlink, "symlink is not portable - "
+                 "use gnulib module symlink for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SYMLINKAT@
+# if !@HAVE_SYMLINKAT@
+_GL_FUNCDECL_SYS (symlinkat, int,
+                  (char const *contents, int fd, char const *file)
+                  _GL_ARG_NONNULL ((1, 3)));
+# endif
+_GL_CXXALIAS_SYS (symlinkat, int,
+                  (char const *contents, int fd, char const *file));
+_GL_CXXALIASWARN (symlinkat);
+#elif defined GNULIB_POSIXCHECK
+# undef symlinkat
+# if HAVE_RAW_DECL_SYMLINKAT
+_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
+                 "use gnulib module symlinkat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_TTYNAME_R@
+/* Store at most BUFLEN characters of the pathname of the terminal FD is
+   open on in BUF.  Return 0 on success, otherwise an error number.  */
+# if @REPLACE_TTYNAME_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ttyname_r
+#   define ttyname_r rpl_ttyname_r
+#  endif
+_GL_FUNCDECL_RPL (ttyname_r, int,
+                  (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (ttyname_r, int,
+                  (int fd, char *buf, size_t buflen));
+# else
+#  if !@HAVE_DECL_TTYNAME_R@
+_GL_FUNCDECL_SYS (ttyname_r, int,
+                  (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (ttyname_r, int,
+                  (int fd, char *buf, size_t buflen));
+# endif
+_GL_CXXALIASWARN (ttyname_r);
+#elif defined GNULIB_POSIXCHECK
+# undef ttyname_r
+# if HAVE_RAW_DECL_TTYNAME_R
+_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - "
+                 "use gnulib module ttyname_r for portability");
+# endif
+#endif
+
+
+#if @GNULIB_UNLINK@
+# if @REPLACE_UNLINK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef unlink
+#   define unlink rpl_unlink
+#  endif
+_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (unlink, int, (char const *file));
+# else
+_GL_CXXALIAS_SYS (unlink, int, (char const *file));
+# endif
+_GL_CXXALIASWARN (unlink);
+#elif defined GNULIB_POSIXCHECK
+# undef unlink
+# if HAVE_RAW_DECL_UNLINK
+_GL_WARN_ON_USE (unlink, "unlink is not portable - "
+                 "use gnulib module unlink for portability");
+# endif
+#endif
+
+
+#if @GNULIB_UNLINKAT@
+# if @REPLACE_UNLINKAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef unlinkat
+#   define unlinkat rpl_unlinkat
+#  endif
+_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag)
+                                 _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag));
+# else
+#  if !@HAVE_UNLINKAT@
+_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag)
+                                 _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag));
+# endif
+_GL_CXXALIASWARN (unlinkat);
+#elif defined GNULIB_POSIXCHECK
+# undef unlinkat
+# if HAVE_RAW_DECL_UNLINKAT
+_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
+                 "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_USLEEP@
+/* Pause the execution of the current thread for N microseconds.
+   Returns 0 on completion, or -1 on range error.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/sleep.html>.  */
+# if @REPLACE_USLEEP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef usleep
+#   define usleep rpl_usleep
+#  endif
+_GL_FUNCDECL_RPL (usleep, int, (useconds_t n));
+_GL_CXXALIAS_RPL (usleep, int, (useconds_t n));
+# else
+#  if !@HAVE_USLEEP@
+_GL_FUNCDECL_SYS (usleep, int, (useconds_t n));
+#  endif
+_GL_CXXALIAS_SYS (usleep, int, (useconds_t n));
+# endif
+_GL_CXXALIASWARN (usleep);
+#elif defined GNULIB_POSIXCHECK
+# undef usleep
+# if HAVE_RAW_DECL_USLEEP
+_GL_WARN_ON_USE (usleep, "usleep is unportable - "
+                 "use gnulib module usleep for portability");
+# endif
+#endif
+
+
+#if @GNULIB_WRITE@
+/* Write up to COUNT bytes starting at BUF to file descriptor FD.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/write.html>.  */
+# if @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef write
+#   define write rpl_write
+#  endif
+_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count)
+                                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
+# else
+/* Need to cast, because on mingw, the third parameter is
+                                                             unsigned int count
+   and the return type is 'int'.  */
+_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
+# endif
+_GL_CXXALIASWARN (write);
+#endif
+
+
+#endif /* _GL_UNISTD_H */
+#endif /* _GL_UNISTD_H */
diff --git a/gnulib/lib/unitypes.in.h b/gnulib/lib/unitypes.in.h
new file mode 100644 (file)
index 0000000..20cbf45
--- /dev/null
@@ -0,0 +1,26 @@
+/* Elementary types for the GNU UniString library.
+   Copyright (C) 2002, 2005-2006, 2009-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 _UNITYPES_H
+#define _UNITYPES_H
+
+/* Get uint8_t, uint16_t, uint32_t.  */
+#include <stdint.h>
+
+/* Type representing a Unicode character.  */
+typedef uint32_t ucs4_t;
+
+#endif /* _UNITYPES_H */
diff --git a/gnulib/lib/uniwidth.in.h b/gnulib/lib/uniwidth.in.h
new file mode 100644 (file)
index 0000000..0331568
--- /dev/null
@@ -0,0 +1,65 @@
+/* Display width functions.
+   Copyright (C) 2001-2002, 2005, 2007, 2009-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 _UNIWIDTH_H
+#define _UNIWIDTH_H
+
+#include "unitypes.h"
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Get locale_charset() declaration.  */
+#include "localcharset.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Display width.  */
+
+/* These functions are locale dependent.  The encoding argument identifies
+   the encoding (e.g. "ISO-8859-2" for Polish).  */
+
+/* Determine number of column positions required for UC.  */
+extern int
+       uc_width (ucs4_t uc, const char *encoding);
+
+/* Determine number of column positions required for first N units
+   (or fewer if S ends before this) in S.  */
+extern int
+       u8_width (const uint8_t *s, size_t n, const char *encoding);
+extern int
+       u16_width (const uint16_t *s, size_t n, const char *encoding);
+extern int
+       u32_width (const uint32_t *s, size_t n, const char *encoding);
+
+/* Determine number of column positions required for S.  */
+extern int
+       u8_strwidth (const uint8_t *s, const char *encoding);
+extern int
+       u16_strwidth (const uint16_t *s, const char *encoding);
+extern int
+       u32_strwidth (const uint32_t *s, const char *encoding);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UNIWIDTH_H */
diff --git a/gnulib/lib/uniwidth/cjk.h b/gnulib/lib/uniwidth/cjk.h
new file mode 100644 (file)
index 0000000..92d8752
--- /dev/null
@@ -0,0 +1,37 @@
+/* Test for CJK encoding.
+   Copyright (C) 2001-2002, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2002.
+
+   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/>.  */
+
+#include "streq.h"
+
+static int
+is_cjk_encoding (const char *encoding)
+{
+  if (0
+      /* Legacy Japanese encodings */
+      || STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)
+      /* Legacy Chinese encodings */
+      || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+      || STREQ (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0)
+      || STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)
+      || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)
+      /* Legacy Korean encodings */
+      || STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+      || STREQ (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0)
+      || STREQ (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0))
+    return 1;
+  return 0;
+}
diff --git a/gnulib/lib/uniwidth/width.c b/gnulib/lib/uniwidth/width.c
new file mode 100644 (file)
index 0000000..23958ba
--- /dev/null
@@ -0,0 +1,368 @@
+/* Determine display width of Unicode character.
+   Copyright (C) 2001-2002, 2006-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2002.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "uniwidth.h"
+
+#include "cjk.h"
+
+/*
+ * Non-spacing attribute table.
+ * Consists of:
+ * - Non-spacing characters; generated from PropList.txt or
+ *   "grep '^[^;]*;[^;]*;[^;]*;[^;]*;NSM;' UnicodeData.txt"
+ * - Format control characters; generated from
+ *   "grep '^[^;]*;[^;]*;Cf;' UnicodeData.txt"
+ * - Zero width characters; generated from
+ *   "grep '^[^;]*;ZERO WIDTH ' UnicodeData.txt"
+ */
+static const unsigned char nonspacing_table_data[27*64] = {
+  /* 0x0000-0x01ff */
+  0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */
+  0xff, 0xff, 0xff, 0xff, 0x00, 0x20, 0x00, 0x00, /* 0x0080-0x00bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00c0-0x00ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0100-0x013f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0140-0x017f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0180-0x01bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x01c0-0x01ff */
+  /* 0x0200-0x03ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0200-0x023f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0240-0x027f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0280-0x02bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x02c0-0x02ff */
+  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x0300-0x033f */
+  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, /* 0x0340-0x037f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0380-0x03bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x03c0-0x03ff */
+  /* 0x0400-0x05ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0400-0x043f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0440-0x047f */
+  0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0480-0x04bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x04c0-0x04ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0500-0x053f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0540-0x057f */
+  0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, /* 0x0580-0x05bf */
+  0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x05c0-0x05ff */
+  /* 0x0600-0x07ff */
+  0x0f, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, /* 0x0600-0x063f */
+  0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, /* 0x0640-0x067f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0680-0x06bf */
+  0x00, 0x00, 0xc0, 0xbf, 0x9f, 0x3d, 0x00, 0x00, /* 0x06c0-0x06ff */
+  0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x0700-0x073f */
+  0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0740-0x077f */
+  0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, /* 0x0780-0x07bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x07c0-0x07ff */
+  /* 0x0800-0x09ff */
+  0x00, 0x00, 0xc0, 0xfb, 0xef, 0x3e, 0x00, 0x00, /* 0x0800-0x083f */
+  0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, /* 0x0840-0x087f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08c0-0x08ff */
+  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, /* 0x0900-0x093f */
+  0xfe, 0x21, 0xfe, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0940-0x097f */
+  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0980-0x09bf */
+  0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x09c0-0x09ff */
+  /* 0x0a00-0x0bff */
+  0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a00-0x0a3f */
+  0x86, 0x39, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, /* 0x0a40-0x0a7f */
+  0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a80-0x0abf */
+  0xbe, 0x21, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0ac0-0x0aff */
+  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, /* 0x0b00-0x0b3f */
+  0x1e, 0x20, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0b40-0x0b7f */
+  0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0b80-0x0bbf */
+  0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0bc0-0x0bff */
+  /* 0x0c00-0x0dff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, /* 0x0c00-0x0c3f */
+  0xc1, 0x3d, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0c40-0x0c7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0c80-0x0cbf */
+  0x00, 0x30, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0cc0-0x0cff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d00-0x0d3f */
+  0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0d40-0x0d7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d80-0x0dbf */
+  0x00, 0x04, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0dc0-0x0dff */
+  /* 0x0e00-0x0fff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x07, /* 0x0e00-0x0e3f */
+  0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0e40-0x0e7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x1b, /* 0x0e80-0x0ebf */
+  0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0ec0-0x0eff */
+  0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x02, /* 0x0f00-0x0f3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, /* 0x0f40-0x0f7f */
+  0xdf, 0xe0, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x1f, /* 0x0f80-0x0fbf */
+  0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0fc0-0x0fff */
+  /* 0x1000-0x11ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfd, 0x66, /* 0x1000-0x103f */
+  0x00, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x1e, 0x00, /* 0x1040-0x107f */
+  0x64, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x1080-0x10bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10c0-0x10ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1100-0x113f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1140-0x117f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1180-0x11bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11c0-0x11ff */
+  /* 0x1200-0x13ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1200-0x123f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1240-0x127f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1280-0x12bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x12c0-0x12ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1300-0x133f */
+  0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, /* 0x1340-0x137f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1380-0x13bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13c0-0x13ff */
+  /* 0x1600-0x17ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1600-0x163f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1640-0x167f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1680-0x16bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16c0-0x16ff */
+  0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, /* 0x1700-0x173f */
+  0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, /* 0x1740-0x177f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x3f, /* 0x1780-0x17bf */
+  0x40, 0xfe, 0x0f, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x17c0-0x17ff */
+  /* 0x1800-0x19ff */
+  0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1800-0x183f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1840-0x187f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18c0-0x18ff */
+  0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x04, 0x0e, /* 0x1900-0x193f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1940-0x197f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1980-0x19bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x19c0-0x19ff */
+  /* 0x1a00-0x1bff */
+  0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, /* 0x1a00-0x1a3f */
+  0x00, 0x00, 0x40, 0x7f, 0xe5, 0x1f, 0xf8, 0x9f, /* 0x1a40-0x1a7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1a80-0x1abf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1ac0-0x1aff */
+  0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x17, /* 0x1b00-0x1b3f */
+  0x04, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x1b40-0x1b7f */
+  0x03, 0x00, 0x00, 0x00, 0x3c, 0x03, 0x00, 0x00, /* 0x1b80-0x1bbf */
+  0x00, 0x00, 0x00, 0x00, 0x40, 0xa3, 0x03, 0x00, /* 0x1bc0-0x1bff */
+  /* 0x1c00-0x1dff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xcf, 0x00, /* 0x1c00-0x1c3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c40-0x1c7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c80-0x1cbf */
+  0x00, 0x00, 0xf7, 0xff, 0xfd, 0x21, 0x00, 0x00, /* 0x1cc0-0x1cff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d00-0x1d3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d40-0x1d7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d80-0x1dbf */
+  0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xf0, /* 0x1dc0-0x1dff */
+  /* 0x2000-0x21ff */
+  0x00, 0xf8, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, /* 0x2000-0x203f */
+  0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, /* 0x2040-0x207f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2080-0x20bf */
+  0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, /* 0x20c0-0x20ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2100-0x213f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2140-0x217f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2180-0x21bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x21c0-0x21ff */
+  /* 0x2c00-0x2dff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c00-0x2c3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c40-0x2c7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c80-0x2cbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, /* 0x2cc0-0x2cff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d00-0x2d3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x2d40-0x2d7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d80-0x2dbf */
+  0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* 0x2dc0-0x2dff */
+  /* 0x3000-0x31ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* 0x3000-0x303f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3040-0x307f */
+  0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, /* 0x3080-0x30bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30c0-0x30ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3100-0x313f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3140-0x317f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3180-0x31bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x31c0-0x31ff */
+  /* 0xa600-0xa7ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa600-0xa63f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x30, /* 0xa640-0xa67f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa680-0xa6bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, /* 0xa6c0-0xa6ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa700-0xa73f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa740-0xa77f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa780-0xa7bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa7c0-0xa7ff */
+  /* 0xa800-0xa9ff */
+  0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, /* 0xa800-0xa83f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa840-0xa87f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa880-0xa8bf */
+  0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, /* 0xa8c0-0xa8ff */
+  0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, /* 0xa900-0xa93f */
+  0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa940-0xa97f */
+  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x13, /* 0xa980-0xa9bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa9c0-0xa9ff */
+  /* 0xaa00-0xabff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x00, /* 0xaa00-0xaa3f */
+  0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaa40-0xaa7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0xc1, /* 0xaa80-0xaabf */
+  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaac0-0xaaff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab00-0xab3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab40-0xab7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab80-0xabbf */
+  0x00, 0x00, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00, /* 0xabc0-0xabff */
+  /* 0xfa00-0xfbff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa00-0xfa3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa40-0xfa7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa80-0xfabf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfac0-0xfaff */
+  0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* 0xfb00-0xfb3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb40-0xfb7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb80-0xfbbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfbc0-0xfbff */
+  /* 0xfe00-0xffff */
+  0xff, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, /* 0xfe00-0xfe3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe40-0xfe7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe80-0xfebf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0xfec0-0xfeff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff00-0xff3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff40-0xff7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff80-0xffbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, /* 0xffc0-0xffff */
+  /* 0x10000-0x101ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10000-0x1003f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10040-0x1007f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10080-0x100bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x100c0-0x100ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10100-0x1013f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10140-0x1017f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10180-0x101bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, /* 0x101c0-0x101ff */
+  /* 0x10a00-0x10bff */
+  0x6e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, /* 0x10a00-0x10a3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a40-0x10a7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a80-0x10abf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10ac0-0x10aff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b00-0x10b3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b40-0x10b7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b80-0x10bbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10bc0-0x10bff */
+  /* 0x11000-0x111ff */
+  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, /* 0x11000-0x1103f */
+  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11040-0x1107f */
+  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x26, /* 0x11080-0x110bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x110c0-0x110ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11100-0x1113f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11140-0x1117f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11180-0x111bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x111c0-0x111ff */
+  /* 0x1d000-0x1d1ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d000-0x1d03f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d040-0x1d07f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d080-0x1d0bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d0c0-0x1d0ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d100-0x1d13f */
+  0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0xf8, 0xff, /* 0x1d140-0x1d17f */
+  0xe7, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, /* 0x1d180-0x1d1bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d1c0-0x1d1ff */
+  /* 0x1d200-0x1d3ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d200-0x1d23f */
+  0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d240-0x1d27f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d280-0x1d2bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d2c0-0x1d2ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d300-0x1d33f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d340-0x1d37f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d380-0x1d3bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  /* 0x1d3c0-0x1d3ff */
+};
+static const signed char nonspacing_table_ind[240] = {
+   0,  1,  2,  3,  4,  5,  6,  7, /* 0x0000-0x0fff */
+   8,  9, -1, 10, 11, 12, 13, -1, /* 0x1000-0x1fff */
+  14, -1, -1, -1, -1, -1, 15, -1, /* 0x2000-0x2fff */
+  16, -1, -1, -1, -1, -1, -1, -1, /* 0x3000-0x3fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x4000-0x4fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x5000-0x5fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x6000-0x6fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x7000-0x7fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x8000-0x8fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x9000-0x9fff */
+  -1, -1, -1, 17, 18, 19, -1, -1, /* 0xa000-0xafff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb000-0xbfff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc000-0xcfff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd000-0xdfff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe000-0xefff */
+  -1, -1, -1, -1, -1, 20, -1, 21, /* 0xf000-0xffff */
+  22, -1, -1, -1, -1, 23, -1, -1, /* 0x10000-0x10fff */
+  24, -1, -1, -1, -1, -1, -1, -1, /* 0x11000-0x11fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x12000-0x12fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x13000-0x13fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x14000-0x14fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x15000-0x15fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x16000-0x16fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x17000-0x17fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x18000-0x18fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x19000-0x19fff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1a000-0x1afff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1b000-0x1bfff */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1c000-0x1cfff */
+  25, 26, -1, -1, -1, -1, -1, -1  /* 0x1d000-0x1dfff */
+};
+
+/* Determine number of column positions required for UC.  */
+int
+uc_width (ucs4_t uc, const char *encoding)
+{
+  /* Test for non-spacing or control character.  */
+  if ((uc >> 9) < 240)
+    {
+      int ind = nonspacing_table_ind[uc >> 9];
+      if (ind >= 0)
+        if ((nonspacing_table_data[64*ind + ((uc >> 3) & 63)] >> (uc & 7)) & 1)
+          {
+            if (uc > 0 && uc < 0xa0)
+              return -1;
+            else
+              return 0;
+          }
+    }
+  else if ((uc >> 9) == (0xe0000 >> 9))
+    {
+      if (uc >= 0xe0100)
+        {
+          if (uc <= 0xe01ef)
+            return 0;
+        }
+      else
+        {
+          if (uc >= 0xe0020 ? uc <= 0xe007f : uc == 0xe0001)
+            return 0;
+        }
+    }
+  /* Test for double-width character.
+   * Generated from "grep '^[^;]\{4,5\};[WF]' EastAsianWidth.txt"
+   * and            "grep '^[^;]\{4,5\};[^WF]' EastAsianWidth.txt"
+   */
+  if (uc >= 0x1100
+      && ((uc < 0x1160) /* Hangul Jamo */
+          || (uc >= 0x2329 && uc < 0x232b) /* Angle Brackets */
+          || (uc >= 0x2e80 && uc < 0xa4d0  /* CJK ... Yi */
+              && !(uc == 0x303f) && !(uc >= 0x4dc0 && uc < 0x4e00))
+          || (uc >= 0xac00 && uc < 0xd7a4) /* Hangul Syllables */
+          || (uc >= 0xf900 && uc < 0xfb00) /* CJK Compatibility Ideographs */
+          || (uc >= 0xfe10 && uc < 0xfe20) /* Presentation Forms for Vertical */
+          || (uc >= 0xfe30 && uc < 0xfe70) /* CJK Compatibility Forms */
+          || (uc >= 0xff00 && uc < 0xff61) /* Fullwidth Forms */
+          || (uc >= 0xffe0 && uc < 0xffe7) /* Fullwidth Signs */
+          || (uc >= 0x20000 && uc <= 0x2ffff) /* Supplementary Ideographic Plane */
+          || (uc >= 0x30000 && uc <= 0x3ffff) /* Tertiary Ideographic Plane */
+     )   )
+    return 2;
+  /* In ancient CJK encodings, Cyrillic and most other characters are
+     double-width as well.  */
+  if (uc >= 0x00A1 && uc < 0xFF61 && uc != 0x20A9
+      && is_cjk_encoding (encoding))
+    return 2;
+  return 1;
+}
diff --git a/gnulib/lib/unlink.c b/gnulib/lib/unlink.c
new file mode 100644 (file)
index 0000000..677d584
--- /dev/null
@@ -0,0 +1,97 @@
+/* Work around unlink bugs.
+
+   Copyright (C) 2009-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/>.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "dosname.h"
+
+#undef unlink
+
+/* Remove file NAME.
+   Return 0 if successful, -1 if not.  */
+
+int
+rpl_unlink (char const *name)
+{
+  /* Work around Solaris 9 bug where unlink("file/") succeeds.  */
+  size_t len = strlen (name);
+  int result = 0;
+  if (len && ISSLASH (name[len - 1]))
+    {
+      /* We can't unlink(2) something if it doesn't exist.  If it does
+         exist, then it resolved to a directory, due to the trailing
+         slash, and POSIX requires that the unlink attempt to remove
+         that directory (which would leave the symlink dangling).
+         Unfortunately, Solaris 9 is one of the platforms where the
+         root user can unlink directories, and we don't want to
+         cripple this behavior on real directories, even if it is
+         seldom needed (at any rate, it's nicer to let coreutils'
+         unlink(1) give the correct errno for non-root users).  But we
+         don't know whether name was an actual directory, or a symlink
+         to a directory; and due to the bug of ignoring trailing
+         slash, Solaris 9 would end up successfully unlinking the
+         symlink instead of the directory.  Technically, we could use
+         realpath to find the canonical directory name to attempt
+         deletion on.  But that is a lot of work for a corner case; so
+         we instead just use an lstat on the shortened name, and
+         reject symlinks with trailing slashes.  The root user of
+         unlink(1) will just have to live with the rule that they
+         can't delete a directory via a symlink.  */
+      struct stat st;
+      result = lstat (name, &st);
+      if (result == 0)
+        {
+          /* Trailing NUL will overwrite the trailing slash.  */
+          char *short_name = malloc (len);
+          if (!short_name)
+            {
+              errno = EPERM;
+              return -1;
+            }
+          memcpy (short_name, name, len);
+          while (len && ISSLASH (short_name[len - 1]))
+            short_name[--len] = '\0';
+          if (len && (lstat (short_name, &st) || S_ISLNK (st.st_mode)))
+            {
+              free (short_name);
+              errno = EPERM;
+              return -1;
+            }
+          free (short_name);
+        }
+    }
+  if (!result)
+    {
+#if UNLINK_PARENT_BUG
+      if (len >= 2 && name[len - 1] == '.' && name[len - 2] == '.'
+          && (len == 2 || ISSLASH (name[len - 3])))
+        {
+          errno = EISDIR; /* could also use EPERM */
+          return -1;
+        }
+#endif
+      result = unlink (name);
+    }
+  return result;
+}
diff --git a/gnulib/lib/unlinkat.c b/gnulib/lib/unlinkat.c
new file mode 100644 (file)
index 0000000..fd1c69e
--- /dev/null
@@ -0,0 +1,106 @@
+/* Work around unlinkat bugs on Solaris 9.
+
+   Copyright (C) 2009-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 Eric Blake.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "dosname.h"
+#include "openat.h"
+
+#if HAVE_UNLINKAT
+
+# undef unlinkat
+
+/* unlinkat without AT_REMOVEDIR does not honor trailing / on Solaris
+   9.  Solve it in a similar manner to unlink.  */
+
+int
+rpl_unlinkat (int fd, char const *name, int flag)
+{
+  size_t len;
+  int result = 0;
+  /* rmdir behavior has no problems with trailing slash.  */
+  if (flag & AT_REMOVEDIR)
+    return unlinkat (fd, name, flag);
+
+  len = strlen (name);
+  if (len && ISSLASH (name[len - 1]))
+    {
+      /* See the lengthy comment in unlink.c why we disobey the POSIX
+         rule of letting unlink("link-to-dir/") attempt to unlink a
+         directory.  */
+      struct stat st;
+      result = lstatat (fd, name, &st);
+      if (result == 0)
+        {
+          /* Trailing NUL will overwrite the trailing slash.  */
+          char *short_name = malloc (len);
+          if (!short_name)
+            {
+              errno = EPERM;
+              return -1;
+            }
+          memcpy (short_name, name, len);
+          while (len && ISSLASH (short_name[len - 1]))
+            short_name[--len] = '\0';
+          if (len && (lstatat (fd, short_name, &st) || S_ISLNK (st.st_mode)))
+            {
+              free (short_name);
+              errno = EPERM;
+              return -1;
+            }
+          free (short_name);
+        }
+    }
+  if (!result)
+    result = unlinkat (fd, name, flag);
+  return result;
+}
+
+#else /* !HAVE_UNLINKAT */
+
+/* Replacement for Solaris' function by the same name.
+   <http://www.google.com/search?q=unlinkat+site:docs.sun.com>
+   First, try to simulate it via (unlink|rmdir) ("/proc/self/fd/FD/FILE").
+   Failing that, simulate it via save_cwd/fchdir/(unlink|rmdir)/restore_cwd.
+   If either the save_cwd or the restore_cwd fails (relatively unlikely),
+   then give a diagnostic and exit nonzero.
+   Otherwise, this function works just like Solaris' unlinkat.  */
+
+# define AT_FUNC_NAME unlinkat
+# define AT_FUNC_F1 rmdir
+# define AT_FUNC_F2 unlink
+# define AT_FUNC_USE_F1_COND AT_REMOVEDIR
+# define AT_FUNC_POST_FILE_PARAM_DECLS , int flag
+# define AT_FUNC_POST_FILE_ARGS        /* empty */
+# include "at-func.c"
+# undef AT_FUNC_NAME
+# undef AT_FUNC_F1
+# undef AT_FUNC_F2
+# undef AT_FUNC_USE_F1_COND
+# undef AT_FUNC_POST_FILE_PARAM_DECLS
+# undef AT_FUNC_POST_FILE_ARGS
+
+#endif /* !HAVE_UNLINKAT */
diff --git a/gnulib/lib/unsetenv.c b/gnulib/lib/unsetenv.c
new file mode 100644 (file)
index 0000000..215bba0
--- /dev/null
@@ -0,0 +1,120 @@
+/* Copyright (C) 1992, 1995-2002, 2005-2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit.  Otherwise gcc
+   optimizes away the name == NULL test below.  */
+#define _GL_ARG_NONNULL(params)
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <errno.h>
+#if !_LIBC
+# define __set_errno(ev) ((errno) = (ev))
+#endif
+
+#include <string.h>
+#include <unistd.h>
+
+#if !_LIBC
+# define __environ      environ
+#endif
+
+#if _LIBC
+/* This lock protects against simultaneous modifications of `environ'.  */
+# include <bits/libc-lock.h>
+__libc_lock_define_initialized (static, envlock)
+# define LOCK   __libc_lock_lock (envlock)
+# define UNLOCK __libc_lock_unlock (envlock)
+#else
+# define LOCK
+# define UNLOCK
+#endif
+
+/* In the GNU C library we must keep the namespace clean.  */
+#ifdef _LIBC
+# define unsetenv __unsetenv
+#endif
+
+#if _LIBC || !HAVE_UNSETENV
+
+int
+unsetenv (const char *name)
+{
+  size_t len;
+  char **ep;
+
+  if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  len = strlen (name);
+
+  LOCK;
+
+  ep = __environ;
+  while (*ep != NULL)
+    if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+      {
+        /* Found it.  Remove this pointer by moving later ones back.  */
+        char **dp = ep;
+
+        do
+          dp[0] = dp[1];
+        while (*dp++);
+        /* Continue the loop in case NAME appears again.  */
+      }
+    else
+      ++ep;
+
+  UNLOCK;
+
+  return 0;
+}
+
+#ifdef _LIBC
+# undef unsetenv
+weak_alias (__unsetenv, unsetenv)
+#endif
+
+#else /* HAVE_UNSETENV */
+
+# undef unsetenv
+
+/* Call the underlying unsetenv, in case there is hidden bookkeeping
+   that needs updating beyond just modifying environ.  */
+int
+rpl_unsetenv (const char *name)
+{
+  int result = 0;
+  if (!name || !*name || strchr (name, '='))
+    {
+      errno = EINVAL;
+      return -1;
+    }
+  while (getenv (name))
+# if !VOID_UNSETENV
+    result =
+# endif
+      unsetenv (name);
+  return result;
+}
+
+#endif /* HAVE_UNSETENV */
diff --git a/gnulib/lib/vasnprintf.c b/gnulib/lib/vasnprintf.c
new file mode 100644 (file)
index 0000000..3f2e91d
--- /dev/null
@@ -0,0 +1,5578 @@
+/* vsprintf with automatic memory allocation.
+   Copyright (C) 1999, 2002-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* This file can be parametrized with the following macros:
+     VASNPRINTF         The name of the function being defined.
+     FCHAR_T            The element type of the format string.
+     DCHAR_T            The element type of the destination (result) string.
+     FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters
+                        in the format string are ASCII. MUST be set if
+                        FCHAR_T and DCHAR_T are not the same type.
+     DIRECTIVE          Structure denoting a format directive.
+                        Depends on FCHAR_T.
+     DIRECTIVES         Structure denoting the set of format directives of a
+                        format string.  Depends on FCHAR_T.
+     PRINTF_PARSE       Function that parses a format string.
+                        Depends on FCHAR_T.
+     DCHAR_CPY          memcpy like function for DCHAR_T[] arrays.
+     DCHAR_SET          memset like function for DCHAR_T[] arrays.
+     DCHAR_MBSNLEN      mbsnlen like function for DCHAR_T[] arrays.
+     SNPRINTF           The system's snprintf (or similar) function.
+                        This may be either snprintf or swprintf.
+     TCHAR_T            The element type of the argument and result string
+                        of the said SNPRINTF function.  This may be either
+                        char or wchar_t.  The code exploits that
+                        sizeof (TCHAR_T) | sizeof (DCHAR_T) and
+                        alignof (TCHAR_T) <= alignof (DCHAR_T).
+     DCHAR_IS_TCHAR     Set to 1 if DCHAR_T and TCHAR_T are the same type.
+     DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[].
+     DCHAR_IS_UINT8_T   Set to 1 if DCHAR_T is uint8_t.
+     DCHAR_IS_UINT16_T  Set to 1 if DCHAR_T is uint16_t.
+     DCHAR_IS_UINT32_T  Set to 1 if DCHAR_T is uint32_t.  */
+
+/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE    1
+#endif
+
+#ifndef VASNPRINTF
+# include <config.h>
+#endif
+#ifndef IN_LIBINTL
+# include <alloca.h>
+#endif
+
+/* Specification.  */
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+#  include "vasnwprintf.h"
+# else
+#  include "vasnprintf.h"
+# endif
+#endif
+
+#include <locale.h>     /* localeconv() */
+#include <stdio.h>      /* snprintf(), sprintf() */
+#include <stdlib.h>     /* abort(), malloc(), realloc(), free() */
+#include <string.h>     /* memcpy(), strlen() */
+#include <errno.h>      /* errno */
+#include <limits.h>     /* CHAR_BIT */
+#include <float.h>      /* DBL_MAX_EXP, LDBL_MAX_EXP */
+#if HAVE_NL_LANGINFO
+# include <langinfo.h>
+#endif
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+#  include "wprintf-parse.h"
+# else
+#  include "printf-parse.h"
+# endif
+#endif
+
+/* Checked size_t computations.  */
+#include "xsize.h"
+
+#include "verify.h"
+
+#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "float+.h"
+#endif
+
+#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnand-nolibm.h"
+#endif
+
+#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnanl-nolibm.h"
+# include "fpucw.h"
+#endif
+
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnand-nolibm.h"
+# include "printf-frexp.h"
+#endif
+
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnanl-nolibm.h"
+# include "printf-frexpl.h"
+# include "fpucw.h"
+#endif
+
+/* Default parameters.  */
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+#  define VASNPRINTF vasnwprintf
+#  define FCHAR_T wchar_t
+#  define DCHAR_T wchar_t
+#  define TCHAR_T wchar_t
+#  define DCHAR_IS_TCHAR 1
+#  define DIRECTIVE wchar_t_directive
+#  define DIRECTIVES wchar_t_directives
+#  define PRINTF_PARSE wprintf_parse
+#  define DCHAR_CPY wmemcpy
+#  define DCHAR_SET wmemset
+# else
+#  define VASNPRINTF vasnprintf
+#  define FCHAR_T char
+#  define DCHAR_T char
+#  define TCHAR_T char
+#  define DCHAR_IS_TCHAR 1
+#  define DIRECTIVE char_directive
+#  define DIRECTIVES char_directives
+#  define PRINTF_PARSE printf_parse
+#  define DCHAR_CPY memcpy
+#  define DCHAR_SET memset
+# endif
+#endif
+#if WIDE_CHAR_VERSION
+  /* TCHAR_T is wchar_t.  */
+# define USE_SNPRINTF 1
+# if HAVE_DECL__SNWPRINTF
+   /* On Windows, the function swprintf() has a different signature than
+      on Unix; we use the function _snwprintf() or - on mingw - snwprintf()
+      instead.  The mingw function snwprintf() has fewer bugs than the
+      MSVCRT function _snwprintf(), so prefer that.  */
+#  if defined __MINGW32__
+#   define SNPRINTF snwprintf
+#  else
+#   define SNPRINTF _snwprintf
+#  endif
+# else
+   /* Unix.  */
+#  define SNPRINTF swprintf
+# endif
+#else
+  /* TCHAR_T is char.  */
+  /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'.
+     But don't use it on BeOS, since BeOS snprintf produces no output if the
+     size argument is >= 0x3000000.
+     Also don't use it on Linux libc5, since there snprintf with size = 1
+     writes any output without bounds, like sprintf.  */
+# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1)
+#  define USE_SNPRINTF 1
+# else
+#  define USE_SNPRINTF 0
+# endif
+# if HAVE_DECL__SNPRINTF
+   /* Windows.  The mingw function snprintf() has fewer bugs than the MSVCRT
+      function _snprintf(), so prefer that.  */
+#  if defined __MINGW32__
+#   define SNPRINTF snprintf
+    /* Here we need to call the native snprintf, not rpl_snprintf.  */
+#   undef snprintf
+#  else
+#   define SNPRINTF _snprintf
+#  endif
+# else
+   /* Unix.  */
+#  define SNPRINTF snprintf
+   /* Here we need to call the native snprintf, not rpl_snprintf.  */
+#  undef snprintf
+# endif
+#endif
+/* Here we need to call the native sprintf, not rpl_sprintf.  */
+#undef sprintf
+
+/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized"
+   warnings in this file.  Use -Dlint to suppress them.  */
+#ifdef lint
+# define IF_LINT(Code) Code
+#else
+# define IF_LINT(Code) /* empty */
+#endif
+
+/* Avoid some warnings from "gcc -Wshadow".
+   This file doesn't use the exp() and remainder() functions.  */
+#undef exp
+#define exp expo
+#undef remainder
+#define remainder rem
+
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION
+# if (HAVE_STRNLEN && !defined _AIX)
+#  define local_strnlen strnlen
+# else
+#  ifndef local_strnlen_defined
+#   define local_strnlen_defined 1
+static size_t
+local_strnlen (const char *string, size_t maxlen)
+{
+  const char *end = memchr (string, '\0', maxlen);
+  return end ? (size_t) (end - string) : maxlen;
+}
+#  endif
+# endif
+#endif
+
+#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
+# if HAVE_WCSLEN
+#  define local_wcslen wcslen
+# else
+   /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
+      a dependency towards this library, here is a local substitute.
+      Define this substitute only once, even if this file is included
+      twice in the same compilation unit.  */
+#  ifndef local_wcslen_defined
+#   define local_wcslen_defined 1
+static size_t
+local_wcslen (const wchar_t *s)
+{
+  const wchar_t *ptr;
+
+  for (ptr = s; *ptr != (wchar_t) 0; ptr++)
+    ;
+  return ptr - s;
+}
+#  endif
+# endif
+#endif
+
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T && WIDE_CHAR_VERSION
+# if HAVE_WCSNLEN
+#  define local_wcsnlen wcsnlen
+# else
+#  ifndef local_wcsnlen_defined
+#   define local_wcsnlen_defined 1
+static size_t
+local_wcsnlen (const wchar_t *s, size_t maxlen)
+{
+  const wchar_t *ptr;
+
+  for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--)
+    ;
+  return ptr - s;
+}
+#  endif
+# endif
+#endif
+
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+/* Determine the decimal-point character according to the current locale.  */
+# ifndef decimal_point_char_defined
+#  define decimal_point_char_defined 1
+static char
+decimal_point_char (void)
+{
+  const char *point;
+  /* Determine it in a multithread-safe way.  We know nl_langinfo is
+     multithread-safe on glibc systems and MacOS X systems, but is not required
+     to be multithread-safe by POSIX.  sprintf(), however, is multithread-safe.
+     localeconv() is rarely multithread-safe.  */
+#  if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__))
+  point = nl_langinfo (RADIXCHAR);
+#  elif 1
+  char pointbuf[5];
+  sprintf (pointbuf, "%#.0f", 1.0);
+  point = &pointbuf[1];
+#  else
+  point = localeconv () -> decimal_point;
+#  endif
+  /* The decimal point is always a single byte: either '.' or ','.  */
+  return (point[0] != '\0' ? point[0] : '.');
+}
+# endif
+#endif
+
+#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL
+
+/* Equivalent to !isfinite(x) || x == 0, but does not require libm.  */
+static int
+is_infinite_or_zero (double x)
+{
+  return isnand (x) || x + x == x;
+}
+
+#endif
+
+#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL
+
+/* Equivalent to !isfinite(x) || x == 0, but does not require libm.  */
+static int
+is_infinite_or_zerol (long double x)
+{
+  return isnanl (x) || x + x == x;
+}
+
+#endif
+
+#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+
+/* Converting 'long double' to decimal without rare rounding bugs requires
+   real bignums.  We use the naming conventions of GNU gmp, but vastly simpler
+   (and slower) algorithms.  */
+
+typedef unsigned int mp_limb_t;
+# define GMP_LIMB_BITS 32
+verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
+
+typedef unsigned long long mp_twolimb_t;
+# define GMP_TWOLIMB_BITS 64
+verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
+
+/* Representation of a bignum >= 0.  */
+typedef struct
+{
+  size_t nlimbs;
+  mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc().  */
+} mpn_t;
+
+/* Compute the product of two bignums >= 0.
+   Return the allocated memory in case of success, NULL in case of memory
+   allocation failure.  */
+static void *
+multiply (mpn_t src1, mpn_t src2, mpn_t *dest)
+{
+  const mp_limb_t *p1;
+  const mp_limb_t *p2;
+  size_t len1;
+  size_t len2;
+
+  if (src1.nlimbs <= src2.nlimbs)
+    {
+      len1 = src1.nlimbs;
+      p1 = src1.limbs;
+      len2 = src2.nlimbs;
+      p2 = src2.limbs;
+    }
+  else
+    {
+      len1 = src2.nlimbs;
+      p1 = src2.limbs;
+      len2 = src1.nlimbs;
+      p2 = src1.limbs;
+    }
+  /* Now 0 <= len1 <= len2.  */
+  if (len1 == 0)
+    {
+      /* src1 or src2 is zero.  */
+      dest->nlimbs = 0;
+      dest->limbs = (mp_limb_t *) malloc (1);
+    }
+  else
+    {
+      /* Here 1 <= len1 <= len2.  */
+      size_t dlen;
+      mp_limb_t *dp;
+      size_t k, i, j;
+
+      dlen = len1 + len2;
+      dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t));
+      if (dp == NULL)
+        return NULL;
+      for (k = len2; k > 0; )
+        dp[--k] = 0;
+      for (i = 0; i < len1; i++)
+        {
+          mp_limb_t digit1 = p1[i];
+          mp_twolimb_t carry = 0;
+          for (j = 0; j < len2; j++)
+            {
+              mp_limb_t digit2 = p2[j];
+              carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2;
+              carry += dp[i + j];
+              dp[i + j] = (mp_limb_t) carry;
+              carry = carry >> GMP_LIMB_BITS;
+            }
+          dp[i + len2] = (mp_limb_t) carry;
+        }
+      /* Normalise.  */
+      while (dlen > 0 && dp[dlen - 1] == 0)
+        dlen--;
+      dest->nlimbs = dlen;
+      dest->limbs = dp;
+    }
+  return dest->limbs;
+}
+
+/* Compute the quotient of a bignum a >= 0 and a bignum b > 0.
+   a is written as  a = q * b + r  with 0 <= r < b.  q is the quotient, r
+   the remainder.
+   Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd,
+   q is incremented.
+   Return the allocated memory in case of success, NULL in case of memory
+   allocation failure.  */
+static void *
+divide (mpn_t a, mpn_t b, mpn_t *q)
+{
+  /* Algorithm:
+     First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]]
+     with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS).
+     If m<n, then q:=0 and r:=a.
+     If m>=n=1, perform a single-precision division:
+       r:=0, j:=m,
+       while j>0 do
+         {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j =
+               = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r<b[0]<beta}
+         j:=j-1, r:=r*beta+a[j], q[j]:=floor(r/b[0]), r:=r-b[0]*q[j].
+       Normalise [q[m-1],...,q[0]], yields q.
+     If m>=n>1, perform a multiple-precision division:
+       We have a/b < beta^(m-n+1).
+       s:=intDsize-1-(highest bit in b[n-1]), 0<=s<intDsize.
+       Shift a and b left by s bits, copying them. r:=a.
+       r=[r[m],...,r[0]], b=[b[n-1],...,b[0]] with b[n-1]>=beta/2.
+       For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).}
+         Compute q* :
+           q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]).
+           In case of overflow (q* >= beta) set q* := beta-1.
+           Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2]
+           and c3 := b[n-2] * q*.
+           {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow
+            occurred.  Furthermore 0 <= c3 < beta^2.
+            If there was overflow and
+            r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2,
+            the next test can be skipped.}
+           While c3 > c2, {Here 0 <= c2 < c3 < beta^2}
+             Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2].
+           If q* > 0:
+             Put r := r - b * q* * beta^j. In detail:
+               [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]].
+               hence: u:=0, for i:=0 to n-1 do
+                              u := u + q* * b[i],
+                              r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry),
+                              u:=u div beta (+ 1, if carry in subtraction)
+                      r[n+j]:=r[n+j]-u.
+               {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1
+                               < q* + 1 <= beta,
+                the carry u does not overflow.}
+             If a negative carry occurs, put q* := q* - 1
+               and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]].
+         Set q[j] := q*.
+       Normalise [q[m-n],..,q[0]]; this yields the quotient q.
+       Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the
+       rest r.
+       The room for q[j] can be allocated at the memory location of r[n+j].
+     Finally, round-to-even:
+       Shift r left by 1 bit.
+       If r > b or if r = b and q[0] is odd, q := q+1.
+   */
+  const mp_limb_t *a_ptr = a.limbs;
+  size_t a_len = a.nlimbs;
+  const mp_limb_t *b_ptr = b.limbs;
+  size_t b_len = b.nlimbs;
+  mp_limb_t *roomptr;
+  mp_limb_t *tmp_roomptr = NULL;
+  mp_limb_t *q_ptr;
+  size_t q_len;
+  mp_limb_t *r_ptr;
+  size_t r_len;
+
+  /* Allocate room for a_len+2 digits.
+     (Need a_len+1 digits for the real division and 1 more digit for the
+     final rounding of q.)  */
+  roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t));
+  if (roomptr == NULL)
+    return NULL;
+
+  /* Normalise a.  */
+  while (a_len > 0 && a_ptr[a_len - 1] == 0)
+    a_len--;
+
+  /* Normalise b.  */
+  for (;;)
+    {
+      if (b_len == 0)
+        /* Division by zero.  */
+        abort ();
+      if (b_ptr[b_len - 1] == 0)
+        b_len--;
+      else
+        break;
+    }
+
+  /* Here m = a_len >= 0 and n = b_len > 0.  */
+
+  if (a_len < b_len)
+    {
+      /* m<n: trivial case.  q=0, r := copy of a.  */
+      r_ptr = roomptr;
+      r_len = a_len;
+      memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t));
+      q_ptr = roomptr + a_len;
+      q_len = 0;
+    }
+  else if (b_len == 1)
+    {
+      /* n=1: single precision division.
+         beta^(m-1) <= a < beta^m  ==>  beta^(m-2) <= a/b < beta^m  */
+      r_ptr = roomptr;
+      q_ptr = roomptr + 1;
+      {
+        mp_limb_t den = b_ptr[0];
+        mp_limb_t remainder = 0;
+        const mp_limb_t *sourceptr = a_ptr + a_len;
+        mp_limb_t *destptr = q_ptr + a_len;
+        size_t count;
+        for (count = a_len; count > 0; count--)
+          {
+            mp_twolimb_t num =
+              ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr;
+            *--destptr = num / den;
+            remainder = num % den;
+          }
+        /* Normalise and store r.  */
+        if (remainder > 0)
+          {
+            r_ptr[0] = remainder;
+            r_len = 1;
+          }
+        else
+          r_len = 0;
+        /* Normalise q.  */
+        q_len = a_len;
+        if (q_ptr[q_len - 1] == 0)
+          q_len--;
+      }
+    }
+  else
+    {
+      /* n>1: multiple precision division.
+         beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n  ==>
+         beta^(m-n-1) <= a/b < beta^(m-n+1).  */
+      /* Determine s.  */
+      size_t s;
+      {
+        mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */
+        s = 31;
+        if (msd >= 0x10000)
+          {
+            msd = msd >> 16;
+            s -= 16;
+          }
+        if (msd >= 0x100)
+          {
+            msd = msd >> 8;
+            s -= 8;
+          }
+        if (msd >= 0x10)
+          {
+            msd = msd >> 4;
+            s -= 4;
+          }
+        if (msd >= 0x4)
+          {
+            msd = msd >> 2;
+            s -= 2;
+          }
+        if (msd >= 0x2)
+          {
+            msd = msd >> 1;
+            s -= 1;
+          }
+      }
+      /* 0 <= s < GMP_LIMB_BITS.
+         Copy b, shifting it left by s bits.  */
+      if (s > 0)
+        {
+          tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t));
+          if (tmp_roomptr == NULL)
+            {
+              free (roomptr);
+              return NULL;
+            }
+          {
+            const mp_limb_t *sourceptr = b_ptr;
+            mp_limb_t *destptr = tmp_roomptr;
+            mp_twolimb_t accu = 0;
+            size_t count;
+            for (count = b_len; count > 0; count--)
+              {
+                accu += (mp_twolimb_t) *sourceptr++ << s;
+                *destptr++ = (mp_limb_t) accu;
+                accu = accu >> GMP_LIMB_BITS;
+              }
+            /* accu must be zero, since that was how s was determined.  */
+            if (accu != 0)
+              abort ();
+          }
+          b_ptr = tmp_roomptr;
+        }
+      /* Copy a, shifting it left by s bits, yields r.
+         Memory layout:
+         At the beginning: r = roomptr[0..a_len],
+         at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len]  */
+      r_ptr = roomptr;
+      if (s == 0)
+        {
+          memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t));
+          r_ptr[a_len] = 0;
+        }
+      else
+        {
+          const mp_limb_t *sourceptr = a_ptr;
+          mp_limb_t *destptr = r_ptr;
+          mp_twolimb_t accu = 0;
+          size_t count;
+          for (count = a_len; count > 0; count--)
+            {
+              accu += (mp_twolimb_t) *sourceptr++ << s;
+              *destptr++ = (mp_limb_t) accu;
+              accu = accu >> GMP_LIMB_BITS;
+            }
+          *destptr++ = (mp_limb_t) accu;
+        }
+      q_ptr = roomptr + b_len;
+      q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */
+      {
+        size_t j = a_len - b_len; /* m-n */
+        mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */
+        mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */
+        mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */
+          ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd;
+        /* Division loop, traversed m-n+1 times.
+           j counts down, b is unchanged, beta/2 <= b[n-1] < beta.  */
+        for (;;)
+          {
+            mp_limb_t q_star;
+            mp_limb_t c1;
+            if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */
+              {
+                /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow.  */
+                mp_twolimb_t num =
+                  ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS)
+                  | r_ptr[j + b_len - 1];
+                q_star = num / b_msd;
+                c1 = num % b_msd;
+              }
+            else
+              {
+                /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1].  */
+                q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */
+                /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta
+                   <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta
+                   <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta)
+                        {<= beta !}.
+                   If yes, jump directly to the subtraction loop.
+                   (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta
+                    <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */
+                if (r_ptr[j + b_len] > b_msd
+                    || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd)
+                  /* r[j+n] >= b[n-1]+1 or
+                     r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a
+                     carry.  */
+                  goto subtract;
+              }
+            /* q_star = q*,
+               c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, <beta).  */
+            {
+              mp_twolimb_t c2 = /* c1*beta+r[j+n-2] */
+                ((mp_twolimb_t) c1 << GMP_LIMB_BITS) | r_ptr[j + b_len - 2];
+              mp_twolimb_t c3 = /* b[n-2] * q* */
+                (mp_twolimb_t) b_2msd * (mp_twolimb_t) q_star;
+              /* While c2 < c3, increase c2 and decrease c3.
+                 Consider c3-c2.  While it is > 0, decrease it by
+                 b[n-1]*beta+b[n-2].  Because of b[n-1]*beta+b[n-2] >= beta^2/2
+                 this can happen only twice.  */
+              if (c3 > c2)
+                {
+                  q_star = q_star - 1; /* q* := q* - 1 */
+                  if (c3 - c2 > b_msdd)
+                    q_star = q_star - 1; /* q* := q* - 1 */
+                }
+            }
+            if (q_star > 0)
+              subtract:
+              {
+                /* Subtract r := r - b * q* * beta^j.  */
+                mp_limb_t cr;
+                {
+                  const mp_limb_t *sourceptr = b_ptr;
+                  mp_limb_t *destptr = r_ptr + j;
+                  mp_twolimb_t carry = 0;
+                  size_t count;
+                  for (count = b_len; count > 0; count--)
+                    {
+                      /* Here 0 <= carry <= q*.  */
+                      carry =
+                        carry
+                        + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++
+                        + (mp_limb_t) ~(*destptr);
+                      /* Here 0 <= carry <= beta*q* + beta-1.  */
+                      *destptr++ = ~(mp_limb_t) carry;
+                      carry = carry >> GMP_LIMB_BITS; /* <= q* */
+                    }
+                  cr = (mp_limb_t) carry;
+                }
+                /* Subtract cr from r_ptr[j + b_len], then forget about
+                   r_ptr[j + b_len].  */
+                if (cr > r_ptr[j + b_len])
+                  {
+                    /* Subtraction gave a carry.  */
+                    q_star = q_star - 1; /* q* := q* - 1 */
+                    /* Add b back.  */
+                    {
+                      const mp_limb_t *sourceptr = b_ptr;
+                      mp_limb_t *destptr = r_ptr + j;
+                      mp_limb_t carry = 0;
+                      size_t count;
+                      for (count = b_len; count > 0; count--)
+                        {
+                          mp_limb_t source1 = *sourceptr++;
+                          mp_limb_t source2 = *destptr;
+                          *destptr++ = source1 + source2 + carry;
+                          carry =
+                            (carry
+                             ? source1 >= (mp_limb_t) ~source2
+                             : source1 > (mp_limb_t) ~source2);
+                        }
+                    }
+                    /* Forget about the carry and about r[j+n].  */
+                  }
+              }
+            /* q* is determined.  Store it as q[j].  */
+            q_ptr[j] = q_star;
+            if (j == 0)
+              break;
+            j--;
+          }
+      }
+      r_len = b_len;
+      /* Normalise q.  */
+      if (q_ptr[q_len - 1] == 0)
+        q_len--;
+# if 0 /* Not needed here, since we need r only to compare it with b/2, and
+          b is shifted left by s bits.  */
+      /* Shift r right by s bits.  */
+      if (s > 0)
+        {
+          mp_limb_t ptr = r_ptr + r_len;
+          mp_twolimb_t accu = 0;
+          size_t count;
+          for (count = r_len; count > 0; count--)
+            {
+              accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS;
+              accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s);
+              *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS);
+            }
+        }
+# endif
+      /* Normalise r.  */
+      while (r_len > 0 && r_ptr[r_len - 1] == 0)
+        r_len--;
+    }
+  /* Compare r << 1 with b.  */
+  if (r_len > b_len)
+    goto increment_q;
+  {
+    size_t i;
+    for (i = b_len;;)
+      {
+        mp_limb_t r_i =
+          (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0)
+          | (i < r_len ? r_ptr[i] << 1 : 0);
+        mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0);
+        if (r_i > b_i)
+          goto increment_q;
+        if (r_i < b_i)
+          goto keep_q;
+        if (i == 0)
+          break;
+        i--;
+      }
+  }
+  if (q_len > 0 && ((q_ptr[0] & 1) != 0))
+    /* q is odd.  */
+    increment_q:
+    {
+      size_t i;
+      for (i = 0; i < q_len; i++)
+        if (++(q_ptr[i]) != 0)
+          goto keep_q;
+      q_ptr[q_len++] = 1;
+    }
+  keep_q:
+  if (tmp_roomptr != NULL)
+    free (tmp_roomptr);
+  q->limbs = q_ptr;
+  q->nlimbs = q_len;
+  return roomptr;
+}
+
+/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal
+   representation.
+   Destroys the contents of a.
+   Return the allocated memory - containing the decimal digits in low-to-high
+   order, terminated with a NUL character - in case of success, NULL in case
+   of memory allocation failure.  */
+static char *
+convert_to_decimal (mpn_t a, size_t extra_zeroes)
+{
+  mp_limb_t *a_ptr = a.limbs;
+  size_t a_len = a.nlimbs;
+  /* 0.03345 is slightly larger than log(2)/(9*log(10)).  */
+  size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1);
+  char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes));
+  if (c_ptr != NULL)
+    {
+      char *d_ptr = c_ptr;
+      for (; extra_zeroes > 0; extra_zeroes--)
+        *d_ptr++ = '0';
+      while (a_len > 0)
+        {
+          /* Divide a by 10^9, in-place.  */
+          mp_limb_t remainder = 0;
+          mp_limb_t *ptr = a_ptr + a_len;
+          size_t count;
+          for (count = a_len; count > 0; count--)
+            {
+              mp_twolimb_t num =
+                ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr;
+              *ptr = num / 1000000000;
+              remainder = num % 1000000000;
+            }
+          /* Store the remainder as 9 decimal digits.  */
+          for (count = 9; count > 0; count--)
+            {
+              *d_ptr++ = '0' + (remainder % 10);
+              remainder = remainder / 10;
+            }
+          /* Normalize a.  */
+          if (a_ptr[a_len - 1] == 0)
+            a_len--;
+        }
+      /* Remove leading zeroes.  */
+      while (d_ptr > c_ptr && d_ptr[-1] == '0')
+        d_ptr--;
+      /* But keep at least one zero.  */
+      if (d_ptr == c_ptr)
+        *d_ptr++ = '0';
+      /* Terminate the string.  */
+      *d_ptr = '\0';
+    }
+  return c_ptr;
+}
+
+# if NEED_PRINTF_LONG_DOUBLE
+
+/* Assuming x is finite and >= 0:
+   write x as x = 2^e * m, where m is a bignum.
+   Return the allocated memory in case of success, NULL in case of memory
+   allocation failure.  */
+static void *
+decode_long_double (long double x, int *ep, mpn_t *mp)
+{
+  mpn_t m;
+  int exp;
+  long double y;
+  size_t i;
+
+  /* Allocate memory for result.  */
+  m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS;
+  m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t));
+  if (m.limbs == NULL)
+    return NULL;
+  /* Split into exponential part and mantissa.  */
+  y = frexpl (x, &exp);
+  if (!(y >= 0.0L && y < 1.0L))
+    abort ();
+  /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the
+     latter is an integer.  */
+  /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs.
+     I'm not sure whether it's safe to cast a 'long double' value between
+     2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
+     'long double' values between 0 and 2^16 (to 'unsigned int' or 'int',
+     doesn't matter).  */
+#  if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0
+#   if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2
+    {
+      mp_limb_t hi, lo;
+      y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2));
+      hi = (int) y;
+      y -= hi;
+      if (!(y >= 0.0L && y < 1.0L))
+        abort ();
+      y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+      lo = (int) y;
+      y -= lo;
+      if (!(y >= 0.0L && y < 1.0L))
+        abort ();
+      m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+    }
+#   else
+    {
+      mp_limb_t d;
+      y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS);
+      d = (int) y;
+      y -= d;
+      if (!(y >= 0.0L && y < 1.0L))
+        abort ();
+      m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d;
+    }
+#   endif
+#  endif
+  for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; )
+    {
+      mp_limb_t hi, lo;
+      y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+      hi = (int) y;
+      y -= hi;
+      if (!(y >= 0.0L && y < 1.0L))
+        abort ();
+      y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+      lo = (int) y;
+      y -= lo;
+      if (!(y >= 0.0L && y < 1.0L))
+        abort ();
+      m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+    }
+#  if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess
+           precision.  */
+  if (!(y == 0.0L))
+    abort ();
+#  endif
+  /* Normalise.  */
+  while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0)
+    m.nlimbs--;
+  *mp = m;
+  *ep = exp - LDBL_MANT_BIT;
+  return m.limbs;
+}
+
+# endif
+
+# if NEED_PRINTF_DOUBLE
+
+/* Assuming x is finite and >= 0:
+   write x as x = 2^e * m, where m is a bignum.
+   Return the allocated memory in case of success, NULL in case of memory
+   allocation failure.  */
+static void *
+decode_double (double x, int *ep, mpn_t *mp)
+{
+  mpn_t m;
+  int exp;
+  double y;
+  size_t i;
+
+  /* Allocate memory for result.  */
+  m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS;
+  m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t));
+  if (m.limbs == NULL)
+    return NULL;
+  /* Split into exponential part and mantissa.  */
+  y = frexp (x, &exp);
+  if (!(y >= 0.0 && y < 1.0))
+    abort ();
+  /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the
+     latter is an integer.  */
+  /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs.
+     I'm not sure whether it's safe to cast a 'double' value between
+     2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
+     'double' values between 0 and 2^16 (to 'unsigned int' or 'int',
+     doesn't matter).  */
+#  if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0
+#   if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2
+    {
+      mp_limb_t hi, lo;
+      y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2));
+      hi = (int) y;
+      y -= hi;
+      if (!(y >= 0.0 && y < 1.0))
+        abort ();
+      y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+      lo = (int) y;
+      y -= lo;
+      if (!(y >= 0.0 && y < 1.0))
+        abort ();
+      m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+    }
+#   else
+    {
+      mp_limb_t d;
+      y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS);
+      d = (int) y;
+      y -= d;
+      if (!(y >= 0.0 && y < 1.0))
+        abort ();
+      m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d;
+    }
+#   endif
+#  endif
+  for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; )
+    {
+      mp_limb_t hi, lo;
+      y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+      hi = (int) y;
+      y -= hi;
+      if (!(y >= 0.0 && y < 1.0))
+        abort ();
+      y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+      lo = (int) y;
+      y -= lo;
+      if (!(y >= 0.0 && y < 1.0))
+        abort ();
+      m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+    }
+  if (!(y == 0.0))
+    abort ();
+  /* Normalise.  */
+  while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0)
+    m.nlimbs--;
+  *mp = m;
+  *ep = exp - DBL_MANT_BIT;
+  return m.limbs;
+}
+
+# endif
+
+/* Assuming x = 2^e * m is finite and >= 0, and n is an integer:
+   Returns the decimal representation of round (x * 10^n).
+   Return the allocated memory - containing the decimal digits in low-to-high
+   order, terminated with a NUL character - in case of success, NULL in case
+   of memory allocation failure.  */
+static char *
+scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n)
+{
+  int s;
+  size_t extra_zeroes;
+  unsigned int abs_n;
+  unsigned int abs_s;
+  mp_limb_t *pow5_ptr;
+  size_t pow5_len;
+  unsigned int s_limbs;
+  unsigned int s_bits;
+  mpn_t pow5;
+  mpn_t z;
+  void *z_memory;
+  char *digits;
+
+  if (memory == NULL)
+    return NULL;
+  /* x = 2^e * m, hence
+     y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m)
+       = round (2^s * 5^n * m).  */
+  s = e + n;
+  extra_zeroes = 0;
+  /* Factor out a common power of 10 if possible.  */
+  if (s > 0 && n > 0)
+    {
+      extra_zeroes = (s < n ? s : n);
+      s -= extra_zeroes;
+      n -= extra_zeroes;
+    }
+  /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes.
+     Before converting to decimal, we need to compute
+     z = round (2^s * 5^n * m).  */
+  /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same
+     sign.  2.322 is slightly larger than log(5)/log(2).  */
+  abs_n = (n >= 0 ? n : -n);
+  abs_s = (s >= 0 ? s : -s);
+  pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1
+                                    + abs_s / GMP_LIMB_BITS + 1)
+                                   * sizeof (mp_limb_t));
+  if (pow5_ptr == NULL)
+    {
+      free (memory);
+      return NULL;
+    }
+  /* Initialize with 1.  */
+  pow5_ptr[0] = 1;
+  pow5_len = 1;
+  /* Multiply with 5^|n|.  */
+  if (abs_n > 0)
+    {
+      static mp_limb_t const small_pow5[13 + 1] =
+        {
+          1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625,
+          48828125, 244140625, 1220703125
+        };
+      unsigned int n13;
+      for (n13 = 0; n13 <= abs_n; n13 += 13)
+        {
+          mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13];
+          size_t j;
+          mp_twolimb_t carry = 0;
+          for (j = 0; j < pow5_len; j++)
+            {
+              mp_limb_t digit2 = pow5_ptr[j];
+              carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2;
+              pow5_ptr[j] = (mp_limb_t) carry;
+              carry = carry >> GMP_LIMB_BITS;
+            }
+          if (carry > 0)
+            pow5_ptr[pow5_len++] = (mp_limb_t) carry;
+        }
+    }
+  s_limbs = abs_s / GMP_LIMB_BITS;
+  s_bits = abs_s % GMP_LIMB_BITS;
+  if (n >= 0 ? s >= 0 : s <= 0)
+    {
+      /* Multiply with 2^|s|.  */
+      if (s_bits > 0)
+        {
+          mp_limb_t *ptr = pow5_ptr;
+          mp_twolimb_t accu = 0;
+          size_t count;
+          for (count = pow5_len; count > 0; count--)
+            {
+              accu += (mp_twolimb_t) *ptr << s_bits;
+              *ptr++ = (mp_limb_t) accu;
+              accu = accu >> GMP_LIMB_BITS;
+            }
+          if (accu > 0)
+            {
+              *ptr = (mp_limb_t) accu;
+              pow5_len++;
+            }
+        }
+      if (s_limbs > 0)
+        {
+          size_t count;
+          for (count = pow5_len; count > 0;)
+            {
+              count--;
+              pow5_ptr[s_limbs + count] = pow5_ptr[count];
+            }
+          for (count = s_limbs; count > 0;)
+            {
+              count--;
+              pow5_ptr[count] = 0;
+            }
+          pow5_len += s_limbs;
+        }
+      pow5.limbs = pow5_ptr;
+      pow5.nlimbs = pow5_len;
+      if (n >= 0)
+        {
+          /* Multiply m with pow5.  No division needed.  */
+          z_memory = multiply (m, pow5, &z);
+        }
+      else
+        {
+          /* Divide m by pow5 and round.  */
+          z_memory = divide (m, pow5, &z);
+        }
+    }
+  else
+    {
+      pow5.limbs = pow5_ptr;
+      pow5.nlimbs = pow5_len;
+      if (n >= 0)
+        {
+          /* n >= 0, s < 0.
+             Multiply m with pow5, then divide by 2^|s|.  */
+          mpn_t numerator;
+          mpn_t denominator;
+          void *tmp_memory;
+          tmp_memory = multiply (m, pow5, &numerator);
+          if (tmp_memory == NULL)
+            {
+              free (pow5_ptr);
+              free (memory);
+              return NULL;
+            }
+          /* Construct 2^|s|.  */
+          {
+            mp_limb_t *ptr = pow5_ptr + pow5_len;
+            size_t i;
+            for (i = 0; i < s_limbs; i++)
+              ptr[i] = 0;
+            ptr[s_limbs] = (mp_limb_t) 1 << s_bits;
+            denominator.limbs = ptr;
+            denominator.nlimbs = s_limbs + 1;
+          }
+          z_memory = divide (numerator, denominator, &z);
+          free (tmp_memory);
+        }
+      else
+        {
+          /* n < 0, s > 0.
+             Multiply m with 2^s, then divide by pow5.  */
+          mpn_t numerator;
+          mp_limb_t *num_ptr;
+          num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1)
+                                          * sizeof (mp_limb_t));
+          if (num_ptr == NULL)
+            {
+              free (pow5_ptr);
+              free (memory);
+              return NULL;
+            }
+          {
+            mp_limb_t *destptr = num_ptr;
+            {
+              size_t i;
+              for (i = 0; i < s_limbs; i++)
+                *destptr++ = 0;
+            }
+            if (s_bits > 0)
+              {
+                const mp_limb_t *sourceptr = m.limbs;
+                mp_twolimb_t accu = 0;
+                size_t count;
+                for (count = m.nlimbs; count > 0; count--)
+                  {
+                    accu += (mp_twolimb_t) *sourceptr++ << s_bits;
+                    *destptr++ = (mp_limb_t) accu;
+                    accu = accu >> GMP_LIMB_BITS;
+                  }
+                if (accu > 0)
+                  *destptr++ = (mp_limb_t) accu;
+              }
+            else
+              {
+                const mp_limb_t *sourceptr = m.limbs;
+                size_t count;
+                for (count = m.nlimbs; count > 0; count--)
+                  *destptr++ = *sourceptr++;
+              }
+            numerator.limbs = num_ptr;
+            numerator.nlimbs = destptr - num_ptr;
+          }
+          z_memory = divide (numerator, pow5, &z);
+          free (num_ptr);
+        }
+    }
+  free (pow5_ptr);
+  free (memory);
+
+  /* Here y = round (x * 10^n) = z * 10^extra_zeroes.  */
+
+  if (z_memory == NULL)
+    return NULL;
+  digits = convert_to_decimal (z, extra_zeroes);
+  free (z_memory);
+  return digits;
+}
+
+# if NEED_PRINTF_LONG_DOUBLE
+
+/* Assuming x is finite and >= 0, and n is an integer:
+   Returns the decimal representation of round (x * 10^n).
+   Return the allocated memory - containing the decimal digits in low-to-high
+   order, terminated with a NUL character - in case of success, NULL in case
+   of memory allocation failure.  */
+static char *
+scale10_round_decimal_long_double (long double x, int n)
+{
+  int e IF_LINT(= 0);
+  mpn_t m;
+  void *memory = decode_long_double (x, &e, &m);
+  return scale10_round_decimal_decoded (e, m, memory, n);
+}
+
+# endif
+
+# if NEED_PRINTF_DOUBLE
+
+/* Assuming x is finite and >= 0, and n is an integer:
+   Returns the decimal representation of round (x * 10^n).
+   Return the allocated memory - containing the decimal digits in low-to-high
+   order, terminated with a NUL character - in case of success, NULL in case
+   of memory allocation failure.  */
+static char *
+scale10_round_decimal_double (double x, int n)
+{
+  int e IF_LINT(= 0);
+  mpn_t m;
+  void *memory = decode_double (x, &e, &m);
+  return scale10_round_decimal_decoded (e, m, memory, n);
+}
+
+# endif
+
+# if NEED_PRINTF_LONG_DOUBLE
+
+/* Assuming x is finite and > 0:
+   Return an approximation for n with 10^n <= x < 10^(n+1).
+   The approximation is usually the right n, but may be off by 1 sometimes.  */
+static int
+floorlog10l (long double x)
+{
+  int exp;
+  long double y;
+  double z;
+  double l;
+
+  /* Split into exponential part and mantissa.  */
+  y = frexpl (x, &exp);
+  if (!(y >= 0.0L && y < 1.0L))
+    abort ();
+  if (y == 0.0L)
+    return INT_MIN;
+  if (y < 0.5L)
+    {
+      while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2))))
+        {
+          y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2));
+          exp -= GMP_LIMB_BITS;
+        }
+      if (y < (1.0L / (1 << 16)))
+        {
+          y *= 1.0L * (1 << 16);
+          exp -= 16;
+        }
+      if (y < (1.0L / (1 << 8)))
+        {
+          y *= 1.0L * (1 << 8);
+          exp -= 8;
+        }
+      if (y < (1.0L / (1 << 4)))
+        {
+          y *= 1.0L * (1 << 4);
+          exp -= 4;
+        }
+      if (y < (1.0L / (1 << 2)))
+        {
+          y *= 1.0L * (1 << 2);
+          exp -= 2;
+        }
+      if (y < (1.0L / (1 << 1)))
+        {
+          y *= 1.0L * (1 << 1);
+          exp -= 1;
+        }
+    }
+  if (!(y >= 0.5L && y < 1.0L))
+    abort ();
+  /* Compute an approximation for l = log2(x) = exp + log2(y).  */
+  l = exp;
+  z = y;
+  if (z < 0.70710678118654752444)
+    {
+      z *= 1.4142135623730950488;
+      l -= 0.5;
+    }
+  if (z < 0.8408964152537145431)
+    {
+      z *= 1.1892071150027210667;
+      l -= 0.25;
+    }
+  if (z < 0.91700404320467123175)
+    {
+      z *= 1.0905077326652576592;
+      l -= 0.125;
+    }
+  if (z < 0.9576032806985736469)
+    {
+      z *= 1.0442737824274138403;
+      l -= 0.0625;
+    }
+  /* Now 0.95 <= z <= 1.01.  */
+  z = 1 - z;
+  /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...)
+     Four terms are enough to get an approximation with error < 10^-7.  */
+  l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25)));
+  /* Finally multiply with log(2)/log(10), yields an approximation for
+     log10(x).  */
+  l *= 0.30102999566398119523;
+  /* Round down to the next integer.  */
+  return (int) l + (l < 0 ? -1 : 0);
+}
+
+# endif
+
+# if NEED_PRINTF_DOUBLE
+
+/* Assuming x is finite and > 0:
+   Return an approximation for n with 10^n <= x < 10^(n+1).
+   The approximation is usually the right n, but may be off by 1 sometimes.  */
+static int
+floorlog10 (double x)
+{
+  int exp;
+  double y;
+  double z;
+  double l;
+
+  /* Split into exponential part and mantissa.  */
+  y = frexp (x, &exp);
+  if (!(y >= 0.0 && y < 1.0))
+    abort ();
+  if (y == 0.0)
+    return INT_MIN;
+  if (y < 0.5)
+    {
+      while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2))))
+        {
+          y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2));
+          exp -= GMP_LIMB_BITS;
+        }
+      if (y < (1.0 / (1 << 16)))
+        {
+          y *= 1.0 * (1 << 16);
+          exp -= 16;
+        }
+      if (y < (1.0 / (1 << 8)))
+        {
+          y *= 1.0 * (1 << 8);
+          exp -= 8;
+        }
+      if (y < (1.0 / (1 << 4)))
+        {
+          y *= 1.0 * (1 << 4);
+          exp -= 4;
+        }
+      if (y < (1.0 / (1 << 2)))
+        {
+          y *= 1.0 * (1 << 2);
+          exp -= 2;
+        }
+      if (y < (1.0 / (1 << 1)))
+        {
+          y *= 1.0 * (1 << 1);
+          exp -= 1;
+        }
+    }
+  if (!(y >= 0.5 && y < 1.0))
+    abort ();
+  /* Compute an approximation for l = log2(x) = exp + log2(y).  */
+  l = exp;
+  z = y;
+  if (z < 0.70710678118654752444)
+    {
+      z *= 1.4142135623730950488;
+      l -= 0.5;
+    }
+  if (z < 0.8408964152537145431)
+    {
+      z *= 1.1892071150027210667;
+      l -= 0.25;
+    }
+  if (z < 0.91700404320467123175)
+    {
+      z *= 1.0905077326652576592;
+      l -= 0.125;
+    }
+  if (z < 0.9576032806985736469)
+    {
+      z *= 1.0442737824274138403;
+      l -= 0.0625;
+    }
+  /* Now 0.95 <= z <= 1.01.  */
+  z = 1 - z;
+  /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...)
+     Four terms are enough to get an approximation with error < 10^-7.  */
+  l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25)));
+  /* Finally multiply with log(2)/log(10), yields an approximation for
+     log10(x).  */
+  l *= 0.30102999566398119523;
+  /* Round down to the next integer.  */
+  return (int) l + (l < 0 ? -1 : 0);
+}
+
+# endif
+
+/* Tests whether a string of digits consists of exactly PRECISION zeroes and
+   a single '1' digit.  */
+static int
+is_borderline (const char *digits, size_t precision)
+{
+  for (; precision > 0; precision--, digits++)
+    if (*digits != '0')
+      return 0;
+  if (*digits != '1')
+    return 0;
+  digits++;
+  return *digits == '\0';
+}
+
+#endif
+
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99
+
+/* Use a different function name, to make it possible that the 'wchar_t'
+   parametrization and the 'char' parametrization get compiled in the same
+   translation unit.  */
+# if WIDE_CHAR_VERSION
+#  define MAX_ROOM_NEEDED wmax_room_needed
+# else
+#  define MAX_ROOM_NEEDED max_room_needed
+# endif
+
+/* Returns the number of TCHAR_T units needed as temporary space for the result
+   of sprintf or SNPRINTF of a single conversion directive.  */
+static inline size_t
+MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
+                 arg_type type, int flags, size_t width, int has_precision,
+                 size_t precision, int pad_ourselves)
+{
+  size_t tmp_length;
+
+  switch (conversion)
+    {
+    case 'd': case 'i': case 'u':
+# if HAVE_LONG_LONG_INT
+      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+        tmp_length =
+          (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+                          * 0.30103 /* binary -> decimal */
+                         )
+          + 1; /* turn floor into ceil */
+      else
+# endif
+      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+        tmp_length =
+          (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+                          * 0.30103 /* binary -> decimal */
+                         )
+          + 1; /* turn floor into ceil */
+      else
+        tmp_length =
+          (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+                          * 0.30103 /* binary -> decimal */
+                         )
+          + 1; /* turn floor into ceil */
+      if (tmp_length < precision)
+        tmp_length = precision;
+      /* Multiply by 2, as an estimate for FLAG_GROUP.  */
+      tmp_length = xsum (tmp_length, tmp_length);
+      /* Add 1, to account for a leading sign.  */
+      tmp_length = xsum (tmp_length, 1);
+      break;
+
+    case 'o':
+# if HAVE_LONG_LONG_INT
+      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+        tmp_length =
+          (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+                          * 0.333334 /* binary -> octal */
+                         )
+          + 1; /* turn floor into ceil */
+      else
+# endif
+      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+        tmp_length =
+          (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+                          * 0.333334 /* binary -> octal */
+                         )
+          + 1; /* turn floor into ceil */
+      else
+        tmp_length =
+          (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+                          * 0.333334 /* binary -> octal */
+                         )
+          + 1; /* turn floor into ceil */
+      if (tmp_length < precision)
+        tmp_length = precision;
+      /* Add 1, to account for a leading sign.  */
+      tmp_length = xsum (tmp_length, 1);
+      break;
+
+    case 'x': case 'X':
+# if HAVE_LONG_LONG_INT
+      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+        tmp_length =
+          (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+                          * 0.25 /* binary -> hexadecimal */
+                         )
+          + 1; /* turn floor into ceil */
+      else
+# endif
+      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+        tmp_length =
+          (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+                          * 0.25 /* binary -> hexadecimal */
+                         )
+          + 1; /* turn floor into ceil */
+      else
+        tmp_length =
+          (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+                          * 0.25 /* binary -> hexadecimal */
+                         )
+          + 1; /* turn floor into ceil */
+      if (tmp_length < precision)
+        tmp_length = precision;
+      /* Add 2, to account for a leading sign or alternate form.  */
+      tmp_length = xsum (tmp_length, 2);
+      break;
+
+    case 'f': case 'F':
+      if (type == TYPE_LONGDOUBLE)
+        tmp_length =
+          (unsigned int) (LDBL_MAX_EXP
+                          * 0.30103 /* binary -> decimal */
+                          * 2 /* estimate for FLAG_GROUP */
+                         )
+          + 1 /* turn floor into ceil */
+          + 10; /* sign, decimal point etc. */
+      else
+        tmp_length =
+          (unsigned int) (DBL_MAX_EXP
+                          * 0.30103 /* binary -> decimal */
+                          * 2 /* estimate for FLAG_GROUP */
+                         )
+          + 1 /* turn floor into ceil */
+          + 10; /* sign, decimal point etc. */
+      tmp_length = xsum (tmp_length, precision);
+      break;
+
+    case 'e': case 'E': case 'g': case 'G':
+      tmp_length =
+        12; /* sign, decimal point, exponent etc. */
+      tmp_length = xsum (tmp_length, precision);
+      break;
+
+    case 'a': case 'A':
+      if (type == TYPE_LONGDOUBLE)
+        tmp_length =
+          (unsigned int) (LDBL_DIG
+                          * 0.831 /* decimal -> hexadecimal */
+                         )
+          + 1; /* turn floor into ceil */
+      else
+        tmp_length =
+          (unsigned int) (DBL_DIG
+                          * 0.831 /* decimal -> hexadecimal */
+                         )
+          + 1; /* turn floor into ceil */
+      if (tmp_length < precision)
+        tmp_length = precision;
+      /* Account for sign, decimal point etc. */
+      tmp_length = xsum (tmp_length, 12);
+      break;
+
+    case 'c':
+# if HAVE_WINT_T && !WIDE_CHAR_VERSION
+      if (type == TYPE_WIDE_CHAR)
+        tmp_length = MB_CUR_MAX;
+      else
+# endif
+        tmp_length = 1;
+      break;
+
+    case 's':
+# if HAVE_WCHAR_T
+      if (type == TYPE_WIDE_STRING)
+        {
+#  if WIDE_CHAR_VERSION
+          /* ISO C says about %ls in fwprintf:
+               "If the precision is not specified or is greater than the size
+                of the array, the array shall contain a null wide character."
+             So if there is a precision, we must not use wcslen.  */
+          const wchar_t *arg = ap->arg[arg_index].a.a_wide_string;
+
+          if (has_precision)
+            tmp_length = local_wcsnlen (arg, precision);
+          else
+            tmp_length = local_wcslen (arg);
+#  else
+          /* ISO C says about %ls in fprintf:
+               "If a precision is specified, no more than that many bytes are
+                written (including shift sequences, if any), and the array
+                shall contain a null wide character if, to equal the multibyte
+                character sequence length given by the precision, the function
+                would need to access a wide character one past the end of the
+                array."
+             So if there is a precision, we must not use wcslen.  */
+          /* This case has already been handled separately in VASNPRINTF.  */
+          abort ();
+#  endif
+        }
+      else
+# endif
+        {
+# if WIDE_CHAR_VERSION
+          /* ISO C says about %s in fwprintf:
+               "If the precision is not specified or is greater than the size
+                of the converted array, the converted array shall contain a
+                null wide character."
+             So if there is a precision, we must not use strlen.  */
+          /* This case has already been handled separately in VASNPRINTF.  */
+          abort ();
+# else
+          /* ISO C says about %s in fprintf:
+               "If the precision is not specified or greater than the size of
+                the array, the array shall contain a null character."
+             So if there is a precision, we must not use strlen.  */
+          const char *arg = ap->arg[arg_index].a.a_string;
+
+          if (has_precision)
+            tmp_length = local_strnlen (arg, precision);
+          else
+            tmp_length = strlen (arg);
+# endif
+        }
+      break;
+
+    case 'p':
+      tmp_length =
+        (unsigned int) (sizeof (void *) * CHAR_BIT
+                        * 0.25 /* binary -> hexadecimal */
+                       )
+          + 1 /* turn floor into ceil */
+          + 2; /* account for leading 0x */
+      break;
+
+    default:
+      abort ();
+    }
+
+  if (!pad_ourselves)
+    {
+# if ENABLE_UNISTDIO
+      /* Padding considers the number of characters, therefore the number of
+         elements after padding may be
+           > max (tmp_length, width)
+         but is certainly
+           <= tmp_length + width.  */
+      tmp_length = xsum (tmp_length, width);
+# else
+      /* Padding considers the number of elements, says POSIX.  */
+      if (tmp_length < width)
+        tmp_length = width;
+# endif
+    }
+
+  tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+
+  return tmp_length;
+}
+
+#endif
+
+DCHAR_T *
+VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+            const FCHAR_T *format, va_list args)
+{
+  DIRECTIVES d;
+  arguments a;
+
+  if (PRINTF_PARSE (format, &d, &a) < 0)
+    /* errno is already set.  */
+    return NULL;
+
+#define CLEANUP() \
+  if (d.dir != d.direct_alloc_dir)                                      \
+    free (d.dir);                                                       \
+  if (a.arg != a.direct_alloc_arg)                                      \
+    free (a.arg);
+
+  if (PRINTF_FETCHARGS (args, &a) < 0)
+    {
+      CLEANUP ();
+      errno = EINVAL;
+      return NULL;
+    }
+
+  {
+    size_t buf_neededlength;
+    TCHAR_T *buf;
+    TCHAR_T *buf_malloced;
+    const FCHAR_T *cp;
+    size_t i;
+    DIRECTIVE *dp;
+    /* Output string accumulator.  */
+    DCHAR_T *result;
+    size_t allocated;
+    size_t length;
+
+    /* Allocate a small buffer that will hold a directive passed to
+       sprintf or snprintf.  */
+    buf_neededlength =
+      xsum4 (7, d.max_width_length, d.max_precision_length, 6);
+#if HAVE_ALLOCA
+    if (buf_neededlength < 4000 / sizeof (TCHAR_T))
+      {
+        buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T));
+        buf_malloced = NULL;
+      }
+    else
+#endif
+      {
+        size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T));
+        if (size_overflow_p (buf_memsize))
+          goto out_of_memory_1;
+        buf = (TCHAR_T *) malloc (buf_memsize);
+        if (buf == NULL)
+          goto out_of_memory_1;
+        buf_malloced = buf;
+      }
+
+    if (resultbuf != NULL)
+      {
+        result = resultbuf;
+        allocated = *lengthp;
+      }
+    else
+      {
+        result = NULL;
+        allocated = 0;
+      }
+    length = 0;
+    /* Invariants:
+       result is either == resultbuf or == NULL or malloc-allocated.
+       If length > 0, then result != NULL.  */
+
+    /* Ensures that allocated >= needed.  Aborts through a jump to
+       out_of_memory if needed is SIZE_MAX or otherwise too big.  */
+#define ENSURE_ALLOCATION(needed) \
+    if ((needed) > allocated)                                                \
+      {                                                                      \
+        size_t memory_size;                                                  \
+        DCHAR_T *memory;                                                     \
+                                                                             \
+        allocated = (allocated > 0 ? xtimes (allocated, 2) : 12);            \
+        if ((needed) > allocated)                                            \
+          allocated = (needed);                                              \
+        memory_size = xtimes (allocated, sizeof (DCHAR_T));                  \
+        if (size_overflow_p (memory_size))                                   \
+          goto out_of_memory;                                                \
+        if (result == resultbuf || result == NULL)                           \
+          memory = (DCHAR_T *) malloc (memory_size);                         \
+        else                                                                 \
+          memory = (DCHAR_T *) realloc (result, memory_size);                \
+        if (memory == NULL)                                                  \
+          goto out_of_memory;                                                \
+        if (result == resultbuf && length > 0)                               \
+          DCHAR_CPY (memory, result, length);                                \
+        result = memory;                                                     \
+      }
+
+    for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
+      {
+        if (cp != dp->dir_start)
+          {
+            size_t n = dp->dir_start - cp;
+            size_t augmented_length = xsum (length, n);
+
+            ENSURE_ALLOCATION (augmented_length);
+            /* This copies a piece of FCHAR_T[] into a DCHAR_T[].  Here we
+               need that the format string contains only ASCII characters
+               if FCHAR_T and DCHAR_T are not the same type.  */
+            if (sizeof (FCHAR_T) == sizeof (DCHAR_T))
+              {
+                DCHAR_CPY (result + length, (const DCHAR_T *) cp, n);
+                length = augmented_length;
+              }
+            else
+              {
+                do
+                  result[length++] = (unsigned char) *cp++;
+                while (--n > 0);
+              }
+          }
+        if (i == d.count)
+          break;
+
+        /* Execute a single directive.  */
+        if (dp->conversion == '%')
+          {
+            size_t augmented_length;
+
+            if (!(dp->arg_index == ARG_NONE))
+              abort ();
+            augmented_length = xsum (length, 1);
+            ENSURE_ALLOCATION (augmented_length);
+            result[length] = '%';
+            length = augmented_length;
+          }
+        else
+          {
+            if (!(dp->arg_index != ARG_NONE))
+              abort ();
+
+            if (dp->conversion == 'n')
+              {
+                switch (a.arg[dp->arg_index].type)
+                  {
+                  case TYPE_COUNT_SCHAR_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
+                    break;
+                  case TYPE_COUNT_SHORT_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_short_pointer = length;
+                    break;
+                  case TYPE_COUNT_INT_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_int_pointer = length;
+                    break;
+                  case TYPE_COUNT_LONGINT_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
+                    break;
+#if HAVE_LONG_LONG_INT
+                  case TYPE_COUNT_LONGLONGINT_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
+                    break;
+#endif
+                  default:
+                    abort ();
+                  }
+              }
+#if ENABLE_UNISTDIO
+            /* The unistdio extensions.  */
+            else if (dp->conversion == 'U')
+              {
+                arg_type type = a.arg[dp->arg_index].type;
+                int flags = dp->flags;
+                int has_width;
+                size_t width;
+                int has_precision;
+                size_t precision;
+
+                has_width = 0;
+                width = 0;
+                if (dp->width_start != dp->width_end)
+                  {
+                    if (dp->width_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->width_arg_index].a.a_int;
+                        if (arg < 0)
+                          {
+                            /* "A negative field width is taken as a '-' flag
+                                followed by a positive field width."  */
+                            flags |= FLAG_LEFT;
+                            width = (unsigned int) (-arg);
+                          }
+                        else
+                          width = arg;
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->width_start;
+
+                        do
+                          width = xsum (xtimes (width, 10), *digitp++ - '0');
+                        while (digitp != dp->width_end);
+                      }
+                    has_width = 1;
+                  }
+
+                has_precision = 0;
+                precision = 0;
+                if (dp->precision_start != dp->precision_end)
+                  {
+                    if (dp->precision_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->precision_arg_index].a.a_int;
+                        /* "A negative precision is taken as if the precision
+                            were omitted."  */
+                        if (arg >= 0)
+                          {
+                            precision = arg;
+                            has_precision = 1;
+                          }
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->precision_start + 1;
+
+                        precision = 0;
+                        while (digitp != dp->precision_end)
+                          precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+                        has_precision = 1;
+                      }
+                  }
+
+                switch (type)
+                  {
+                  case TYPE_U8_STRING:
+                    {
+                      const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string;
+                      const uint8_t *arg_end;
+                      size_t characters;
+
+                      if (has_precision)
+                        {
+                          /* Use only PRECISION characters, from the left.  */
+                          arg_end = arg;
+                          characters = 0;
+                          for (; precision > 0; precision--)
+                            {
+                              int count = u8_strmblen (arg_end);
+                              if (count == 0)
+                                break;
+                              if (count < 0)
+                                {
+                                  if (!(result == resultbuf || result == NULL))
+                                    free (result);
+                                  if (buf_malloced != NULL)
+                                    free (buf_malloced);
+                                  CLEANUP ();
+                                  errno = EILSEQ;
+                                  return NULL;
+                                }
+                              arg_end += count;
+                              characters++;
+                            }
+                        }
+                      else if (has_width)
+                        {
+                          /* Use the entire string, and count the number of
+                             characters.  */
+                          arg_end = arg;
+                          characters = 0;
+                          for (;;)
+                            {
+                              int count = u8_strmblen (arg_end);
+                              if (count == 0)
+                                break;
+                              if (count < 0)
+                                {
+                                  if (!(result == resultbuf || result == NULL))
+                                    free (result);
+                                  if (buf_malloced != NULL)
+                                    free (buf_malloced);
+                                  CLEANUP ();
+                                  errno = EILSEQ;
+                                  return NULL;
+                                }
+                              arg_end += count;
+                              characters++;
+                            }
+                        }
+                      else
+                        {
+                          /* Use the entire string.  */
+                          arg_end = arg + u8_strlen (arg);
+                          /* The number of characters doesn't matter.  */
+                          characters = 0;
+                        }
+
+                      if (has_width && width > characters
+                          && !(dp->flags & FLAG_LEFT))
+                        {
+                          size_t n = width - characters;
+                          ENSURE_ALLOCATION (xsum (length, n));
+                          DCHAR_SET (result + length, ' ', n);
+                          length += n;
+                        }
+
+# if DCHAR_IS_UINT8_T
+                      {
+                        size_t n = arg_end - arg;
+                        ENSURE_ALLOCATION (xsum (length, n));
+                        DCHAR_CPY (result + length, arg, n);
+                        length += n;
+                      }
+# else
+                      { /* Convert.  */
+                        DCHAR_T *converted = result + length;
+                        size_t converted_len = allocated - length;
+#  if DCHAR_IS_TCHAR
+                        /* Convert from UTF-8 to locale encoding.  */
+                        converted =
+                          u8_conv_to_encoding (locale_charset (),
+                                               iconveh_question_mark,
+                                               arg, arg_end - arg, NULL,
+                                               converted, &converted_len);
+#  else
+                        /* Convert from UTF-8 to UTF-16/UTF-32.  */
+                        converted =
+                          U8_TO_DCHAR (arg, arg_end - arg,
+                                       converted, &converted_len);
+#  endif
+                        if (converted == NULL)
+                          {
+                            int saved_errno = errno;
+                            if (!(result == resultbuf || result == NULL))
+                              free (result);
+                            if (buf_malloced != NULL)
+                              free (buf_malloced);
+                            CLEANUP ();
+                            errno = saved_errno;
+                            return NULL;
+                          }
+                        if (converted != result + length)
+                          {
+                            ENSURE_ALLOCATION (xsum (length, converted_len));
+                            DCHAR_CPY (result + length, converted, converted_len);
+                            free (converted);
+                          }
+                        length += converted_len;
+                      }
+# endif
+
+                      if (has_width && width > characters
+                          && (dp->flags & FLAG_LEFT))
+                        {
+                          size_t n = width - characters;
+                          ENSURE_ALLOCATION (xsum (length, n));
+                          DCHAR_SET (result + length, ' ', n);
+                          length += n;
+                        }
+                    }
+                    break;
+
+                  case TYPE_U16_STRING:
+                    {
+                      const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string;
+                      const uint16_t *arg_end;
+                      size_t characters;
+
+                      if (has_precision)
+                        {
+                          /* Use only PRECISION characters, from the left.  */
+                          arg_end = arg;
+                          characters = 0;
+                          for (; precision > 0; precision--)
+                            {
+                              int count = u16_strmblen (arg_end);
+                              if (count == 0)
+                                break;
+                              if (count < 0)
+                                {
+                                  if (!(result == resultbuf || result == NULL))
+                                    free (result);
+                                  if (buf_malloced != NULL)
+                                    free (buf_malloced);
+                                  CLEANUP ();
+                                  errno = EILSEQ;
+                                  return NULL;
+                                }
+                              arg_end += count;
+                              characters++;
+                            }
+                        }
+                      else if (has_width)
+                        {
+                          /* Use the entire string, and count the number of
+                             characters.  */
+                          arg_end = arg;
+                          characters = 0;
+                          for (;;)
+                            {
+                              int count = u16_strmblen (arg_end);
+                              if (count == 0)
+                                break;
+                              if (count < 0)
+                                {
+                                  if (!(result == resultbuf || result == NULL))
+                                    free (result);
+                                  if (buf_malloced != NULL)
+                                    free (buf_malloced);
+                                  CLEANUP ();
+                                  errno = EILSEQ;
+                                  return NULL;
+                                }
+                              arg_end += count;
+                              characters++;
+                            }
+                        }
+                      else
+                        {
+                          /* Use the entire string.  */
+                          arg_end = arg + u16_strlen (arg);
+                          /* The number of characters doesn't matter.  */
+                          characters = 0;
+                        }
+
+                      if (has_width && width > characters
+                          && !(dp->flags & FLAG_LEFT))
+                        {
+                          size_t n = width - characters;
+                          ENSURE_ALLOCATION (xsum (length, n));
+                          DCHAR_SET (result + length, ' ', n);
+                          length += n;
+                        }
+
+# if DCHAR_IS_UINT16_T
+                      {
+                        size_t n = arg_end - arg;
+                        ENSURE_ALLOCATION (xsum (length, n));
+                        DCHAR_CPY (result + length, arg, n);
+                        length += n;
+                      }
+# else
+                      { /* Convert.  */
+                        DCHAR_T *converted = result + length;
+                        size_t converted_len = allocated - length;
+#  if DCHAR_IS_TCHAR
+                        /* Convert from UTF-16 to locale encoding.  */
+                        converted =
+                          u16_conv_to_encoding (locale_charset (),
+                                                iconveh_question_mark,
+                                                arg, arg_end - arg, NULL,
+                                                converted, &converted_len);
+#  else
+                        /* Convert from UTF-16 to UTF-8/UTF-32.  */
+                        converted =
+                          U16_TO_DCHAR (arg, arg_end - arg,
+                                        converted, &converted_len);
+#  endif
+                        if (converted == NULL)
+                          {
+                            int saved_errno = errno;
+                            if (!(result == resultbuf || result == NULL))
+                              free (result);
+                            if (buf_malloced != NULL)
+                              free (buf_malloced);
+                            CLEANUP ();
+                            errno = saved_errno;
+                            return NULL;
+                          }
+                        if (converted != result + length)
+                          {
+                            ENSURE_ALLOCATION (xsum (length, converted_len));
+                            DCHAR_CPY (result + length, converted, converted_len);
+                            free (converted);
+                          }
+                        length += converted_len;
+                      }
+# endif
+
+                      if (has_width && width > characters
+                          && (dp->flags & FLAG_LEFT))
+                        {
+                          size_t n = width - characters;
+                          ENSURE_ALLOCATION (xsum (length, n));
+                          DCHAR_SET (result + length, ' ', n);
+                          length += n;
+                        }
+                    }
+                    break;
+
+                  case TYPE_U32_STRING:
+                    {
+                      const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string;
+                      const uint32_t *arg_end;
+                      size_t characters;
+
+                      if (has_precision)
+                        {
+                          /* Use only PRECISION characters, from the left.  */
+                          arg_end = arg;
+                          characters = 0;
+                          for (; precision > 0; precision--)
+                            {
+                              int count = u32_strmblen (arg_end);
+                              if (count == 0)
+                                break;
+                              if (count < 0)
+                                {
+                                  if (!(result == resultbuf || result == NULL))
+                                    free (result);
+                                  if (buf_malloced != NULL)
+                                    free (buf_malloced);
+                                  CLEANUP ();
+                                  errno = EILSEQ;
+                                  return NULL;
+                                }
+                              arg_end += count;
+                              characters++;
+                            }
+                        }
+                      else if (has_width)
+                        {
+                          /* Use the entire string, and count the number of
+                             characters.  */
+                          arg_end = arg;
+                          characters = 0;
+                          for (;;)
+                            {
+                              int count = u32_strmblen (arg_end);
+                              if (count == 0)
+                                break;
+                              if (count < 0)
+                                {
+                                  if (!(result == resultbuf || result == NULL))
+                                    free (result);
+                                  if (buf_malloced != NULL)
+                                    free (buf_malloced);
+                                  CLEANUP ();
+                                  errno = EILSEQ;
+                                  return NULL;
+                                }
+                              arg_end += count;
+                              characters++;
+                            }
+                        }
+                      else
+                        {
+                          /* Use the entire string.  */
+                          arg_end = arg + u32_strlen (arg);
+                          /* The number of characters doesn't matter.  */
+                          characters = 0;
+                        }
+
+                      if (has_width && width > characters
+                          && !(dp->flags & FLAG_LEFT))
+                        {
+                          size_t n = width - characters;
+                          ENSURE_ALLOCATION (xsum (length, n));
+                          DCHAR_SET (result + length, ' ', n);
+                          length += n;
+                        }
+
+# if DCHAR_IS_UINT32_T
+                      {
+                        size_t n = arg_end - arg;
+                        ENSURE_ALLOCATION (xsum (length, n));
+                        DCHAR_CPY (result + length, arg, n);
+                        length += n;
+                      }
+# else
+                      { /* Convert.  */
+                        DCHAR_T *converted = result + length;
+                        size_t converted_len = allocated - length;
+#  if DCHAR_IS_TCHAR
+                        /* Convert from UTF-32 to locale encoding.  */
+                        converted =
+                          u32_conv_to_encoding (locale_charset (),
+                                                iconveh_question_mark,
+                                                arg, arg_end - arg, NULL,
+                                                converted, &converted_len);
+#  else
+                        /* Convert from UTF-32 to UTF-8/UTF-16.  */
+                        converted =
+                          U32_TO_DCHAR (arg, arg_end - arg,
+                                        converted, &converted_len);
+#  endif
+                        if (converted == NULL)
+                          {
+                            int saved_errno = errno;
+                            if (!(result == resultbuf || result == NULL))
+                              free (result);
+                            if (buf_malloced != NULL)
+                              free (buf_malloced);
+                            CLEANUP ();
+                            errno = saved_errno;
+                            return NULL;
+                          }
+                        if (converted != result + length)
+                          {
+                            ENSURE_ALLOCATION (xsum (length, converted_len));
+                            DCHAR_CPY (result + length, converted, converted_len);
+                            free (converted);
+                          }
+                        length += converted_len;
+                      }
+# endif
+
+                      if (has_width && width > characters
+                          && (dp->flags & FLAG_LEFT))
+                        {
+                          size_t n = width - characters;
+                          ENSURE_ALLOCATION (xsum (length, n));
+                          DCHAR_SET (result + length, ' ', n);
+                          length += n;
+                        }
+                    }
+                    break;
+
+                  default:
+                    abort ();
+                  }
+              }
+#endif
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T
+            else if (dp->conversion == 's'
+# if WIDE_CHAR_VERSION
+                     && a.arg[dp->arg_index].type != TYPE_WIDE_STRING
+# else
+                     && a.arg[dp->arg_index].type == TYPE_WIDE_STRING
+# endif
+                    )
+              {
+                /* The normal handling of the 's' directive below requires
+                   allocating a temporary buffer.  The determination of its
+                   length (tmp_length), in the case when a precision is
+                   specified, below requires a conversion between a char[]
+                   string and a wchar_t[] wide string.  It could be done, but
+                   we have no guarantee that the implementation of sprintf will
+                   use the exactly same algorithm.  Without this guarantee, it
+                   is possible to have buffer overrun bugs.  In order to avoid
+                   such bugs, we implement the entire processing of the 's'
+                   directive ourselves.  */
+                int flags = dp->flags;
+                int has_width;
+                size_t width;
+                int has_precision;
+                size_t precision;
+
+                has_width = 0;
+                width = 0;
+                if (dp->width_start != dp->width_end)
+                  {
+                    if (dp->width_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->width_arg_index].a.a_int;
+                        if (arg < 0)
+                          {
+                            /* "A negative field width is taken as a '-' flag
+                                followed by a positive field width."  */
+                            flags |= FLAG_LEFT;
+                            width = (unsigned int) (-arg);
+                          }
+                        else
+                          width = arg;
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->width_start;
+
+                        do
+                          width = xsum (xtimes (width, 10), *digitp++ - '0');
+                        while (digitp != dp->width_end);
+                      }
+                    has_width = 1;
+                  }
+
+                has_precision = 0;
+                precision = 6;
+                if (dp->precision_start != dp->precision_end)
+                  {
+                    if (dp->precision_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->precision_arg_index].a.a_int;
+                        /* "A negative precision is taken as if the precision
+                            were omitted."  */
+                        if (arg >= 0)
+                          {
+                            precision = arg;
+                            has_precision = 1;
+                          }
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->precision_start + 1;
+
+                        precision = 0;
+                        while (digitp != dp->precision_end)
+                          precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+                        has_precision = 1;
+                      }
+                  }
+
+# if WIDE_CHAR_VERSION
+                /* %s in vasnwprintf.  See the specification of fwprintf.  */
+                {
+                  const char *arg = a.arg[dp->arg_index].a.a_string;
+                  const char *arg_end;
+                  size_t characters;
+
+                  if (has_precision)
+                    {
+                      /* Use only as many bytes as needed to produce PRECISION
+                         wide characters, from the left.  */
+#  if HAVE_MBRTOWC
+                      mbstate_t state;
+                      memset (&state, '\0', sizeof (mbstate_t));
+#  endif
+                      arg_end = arg;
+                      characters = 0;
+                      for (; precision > 0; precision--)
+                        {
+                          int count;
+#  if HAVE_MBRTOWC
+                          count = mbrlen (arg_end, MB_CUR_MAX, &state);
+#  else
+                          count = mblen (arg_end, MB_CUR_MAX);
+#  endif
+                          if (count == 0)
+                            /* Found the terminating NUL.  */
+                            break;
+                          if (count < 0)
+                            {
+                              /* Invalid or incomplete multibyte character.  */
+                              if (!(result == resultbuf || result == NULL))
+                                free (result);
+                              if (buf_malloced != NULL)
+                                free (buf_malloced);
+                              CLEANUP ();
+                              errno = EILSEQ;
+                              return NULL;
+                            }
+                          arg_end += count;
+                          characters++;
+                        }
+                    }
+                  else if (has_width)
+                    {
+                      /* Use the entire string, and count the number of wide
+                         characters.  */
+#  if HAVE_MBRTOWC
+                      mbstate_t state;
+                      memset (&state, '\0', sizeof (mbstate_t));
+#  endif
+                      arg_end = arg;
+                      characters = 0;
+                      for (;;)
+                        {
+                          int count;
+#  if HAVE_MBRTOWC
+                          count = mbrlen (arg_end, MB_CUR_MAX, &state);
+#  else
+                          count = mblen (arg_end, MB_CUR_MAX);
+#  endif
+                          if (count == 0)
+                            /* Found the terminating NUL.  */
+                            break;
+                          if (count < 0)
+                            {
+                              /* Invalid or incomplete multibyte character.  */
+                              if (!(result == resultbuf || result == NULL))
+                                free (result);
+                              if (buf_malloced != NULL)
+                                free (buf_malloced);
+                              CLEANUP ();
+                              errno = EILSEQ;
+                              return NULL;
+                            }
+                          arg_end += count;
+                          characters++;
+                        }
+                    }
+                  else
+                    {
+                      /* Use the entire string.  */
+                      arg_end = arg + strlen (arg);
+                      /* The number of characters doesn't matter.  */
+                      characters = 0;
+                    }
+
+                  if (has_width && width > characters
+                      && !(dp->flags & FLAG_LEFT))
+                    {
+                      size_t n = width - characters;
+                      ENSURE_ALLOCATION (xsum (length, n));
+                      DCHAR_SET (result + length, ' ', n);
+                      length += n;
+                    }
+
+                  if (has_precision || has_width)
+                    {
+                      /* We know the number of wide characters in advance.  */
+                      size_t remaining;
+#  if HAVE_MBRTOWC
+                      mbstate_t state;
+                      memset (&state, '\0', sizeof (mbstate_t));
+#  endif
+                      ENSURE_ALLOCATION (xsum (length, characters));
+                      for (remaining = characters; remaining > 0; remaining--)
+                        {
+                          wchar_t wc;
+                          int count;
+#  if HAVE_MBRTOWC
+                          count = mbrtowc (&wc, arg, arg_end - arg, &state);
+#  else
+                          count = mbtowc (&wc, arg, arg_end - arg);
+#  endif
+                          if (count <= 0)
+                            /* mbrtowc not consistent with mbrlen, or mbtowc
+                               not consistent with mblen.  */
+                            abort ();
+                          result[length++] = wc;
+                          arg += count;
+                        }
+                      if (!(arg == arg_end))
+                        abort ();
+                    }
+                  else
+                    {
+#  if HAVE_MBRTOWC
+                      mbstate_t state;
+                      memset (&state, '\0', sizeof (mbstate_t));
+#  endif
+                      while (arg < arg_end)
+                        {
+                          wchar_t wc;
+                          int count;
+#  if HAVE_MBRTOWC
+                          count = mbrtowc (&wc, arg, arg_end - arg, &state);
+#  else
+                          count = mbtowc (&wc, arg, arg_end - arg);
+#  endif
+                          if (count <= 0)
+                            /* mbrtowc not consistent with mbrlen, or mbtowc
+                               not consistent with mblen.  */
+                            abort ();
+                          ENSURE_ALLOCATION (xsum (length, 1));
+                          result[length++] = wc;
+                          arg += count;
+                        }
+                    }
+
+                  if (has_width && width > characters
+                      && (dp->flags & FLAG_LEFT))
+                    {
+                      size_t n = width - characters;
+                      ENSURE_ALLOCATION (xsum (length, n));
+                      DCHAR_SET (result + length, ' ', n);
+                      length += n;
+                    }
+                }
+# else
+                /* %ls in vasnprintf.  See the specification of fprintf.  */
+                {
+                  const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
+                  const wchar_t *arg_end;
+                  size_t characters;
+#  if !DCHAR_IS_TCHAR
+                  /* This code assumes that TCHAR_T is 'char'.  */
+                  verify (sizeof (TCHAR_T) == 1);
+                  TCHAR_T *tmpsrc;
+                  DCHAR_T *tmpdst;
+                  size_t tmpdst_len;
+#  endif
+                  size_t w;
+
+                  if (has_precision)
+                    {
+                      /* Use only as many wide characters as needed to produce
+                         at most PRECISION bytes, from the left.  */
+#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                      mbstate_t state;
+                      memset (&state, '\0', sizeof (mbstate_t));
+#  endif
+                      arg_end = arg;
+                      characters = 0;
+                      while (precision > 0)
+                        {
+                          char cbuf[64]; /* Assume MB_CUR_MAX <= 64.  */
+                          int count;
+
+                          if (*arg_end == 0)
+                            /* Found the terminating null wide character.  */
+                            break;
+#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                          count = wcrtomb (cbuf, *arg_end, &state);
+#  else
+                          count = wctomb (cbuf, *arg_end);
+#  endif
+                          if (count < 0)
+                            {
+                              /* Cannot convert.  */
+                              if (!(result == resultbuf || result == NULL))
+                                free (result);
+                              if (buf_malloced != NULL)
+                                free (buf_malloced);
+                              CLEANUP ();
+                              errno = EILSEQ;
+                              return NULL;
+                            }
+                          if (precision < count)
+                            break;
+                          arg_end++;
+                          characters += count;
+                          precision -= count;
+                        }
+                    }
+#  if DCHAR_IS_TCHAR
+                  else if (has_width)
+#  else
+                  else
+#  endif
+                    {
+                      /* Use the entire string, and count the number of
+                         bytes.  */
+#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                      mbstate_t state;
+                      memset (&state, '\0', sizeof (mbstate_t));
+#  endif
+                      arg_end = arg;
+                      characters = 0;
+                      for (;;)
+                        {
+                          char cbuf[64]; /* Assume MB_CUR_MAX <= 64.  */
+                          int count;
+
+                          if (*arg_end == 0)
+                            /* Found the terminating null wide character.  */
+                            break;
+#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                          count = wcrtomb (cbuf, *arg_end, &state);
+#  else
+                          count = wctomb (cbuf, *arg_end);
+#  endif
+                          if (count < 0)
+                            {
+                              /* Cannot convert.  */
+                              if (!(result == resultbuf || result == NULL))
+                                free (result);
+                              if (buf_malloced != NULL)
+                                free (buf_malloced);
+                              CLEANUP ();
+                              errno = EILSEQ;
+                              return NULL;
+                            }
+                          arg_end++;
+                          characters += count;
+                        }
+                    }
+#  if DCHAR_IS_TCHAR
+                  else
+                    {
+                      /* Use the entire string.  */
+                      arg_end = arg + local_wcslen (arg);
+                      /* The number of bytes doesn't matter.  */
+                      characters = 0;
+                    }
+#  endif
+
+#  if !DCHAR_IS_TCHAR
+                  /* Convert the string into a piece of temporary memory.  */
+                  tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T));
+                  if (tmpsrc == NULL)
+                    goto out_of_memory;
+                  {
+                    TCHAR_T *tmpptr = tmpsrc;
+                    size_t remaining;
+#   if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                    mbstate_t state;
+                    memset (&state, '\0', sizeof (mbstate_t));
+#   endif
+                    for (remaining = characters; remaining > 0; )
+                      {
+                        char cbuf[64]; /* Assume MB_CUR_MAX <= 64.  */
+                        int count;
+
+                        if (*arg == 0)
+                          abort ();
+#   if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                        count = wcrtomb (cbuf, *arg, &state);
+#   else
+                        count = wctomb (cbuf, *arg);
+#   endif
+                        if (count <= 0)
+                          /* Inconsistency.  */
+                          abort ();
+                        memcpy (tmpptr, cbuf, count);
+                        tmpptr += count;
+                        arg++;
+                        remaining -= count;
+                      }
+                    if (!(arg == arg_end))
+                      abort ();
+                  }
+
+                  /* Convert from TCHAR_T[] to DCHAR_T[].  */
+                  tmpdst =
+                    DCHAR_CONV_FROM_ENCODING (locale_charset (),
+                                              iconveh_question_mark,
+                                              tmpsrc, characters,
+                                              NULL,
+                                              NULL, &tmpdst_len);
+                  if (tmpdst == NULL)
+                    {
+                      int saved_errno = errno;
+                      free (tmpsrc);
+                      if (!(result == resultbuf || result == NULL))
+                        free (result);
+                      if (buf_malloced != NULL)
+                        free (buf_malloced);
+                      CLEANUP ();
+                      errno = saved_errno;
+                      return NULL;
+                    }
+                  free (tmpsrc);
+#  endif
+
+                  if (has_width)
+                    {
+#  if ENABLE_UNISTDIO
+                      /* Outside POSIX, it's preferrable to compare the width
+                         against the number of _characters_ of the converted
+                         value.  */
+                      w = DCHAR_MBSNLEN (result + length, characters);
+#  else
+                      /* The width is compared against the number of _bytes_
+                         of the converted value, says POSIX.  */
+                      w = characters;
+#  endif
+                    }
+                  else
+                    /* w doesn't matter.  */
+                    w = 0;
+
+                  if (has_width && width > w
+                      && !(dp->flags & FLAG_LEFT))
+                    {
+                      size_t n = width - w;
+                      ENSURE_ALLOCATION (xsum (length, n));
+                      DCHAR_SET (result + length, ' ', n);
+                      length += n;
+                    }
+
+#  if DCHAR_IS_TCHAR
+                  if (has_precision || has_width)
+                    {
+                      /* We know the number of bytes in advance.  */
+                      size_t remaining;
+#   if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                      mbstate_t state;
+                      memset (&state, '\0', sizeof (mbstate_t));
+#   endif
+                      ENSURE_ALLOCATION (xsum (length, characters));
+                      for (remaining = characters; remaining > 0; )
+                        {
+                          char cbuf[64]; /* Assume MB_CUR_MAX <= 64.  */
+                          int count;
+
+                          if (*arg == 0)
+                            abort ();
+#   if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                          count = wcrtomb (cbuf, *arg, &state);
+#   else
+                          count = wctomb (cbuf, *arg);
+#   endif
+                          if (count <= 0)
+                            /* Inconsistency.  */
+                            abort ();
+                          memcpy (result + length, cbuf, count);
+                          length += count;
+                          arg++;
+                          remaining -= count;
+                        }
+                      if (!(arg == arg_end))
+                        abort ();
+                    }
+                  else
+                    {
+#   if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                      mbstate_t state;
+                      memset (&state, '\0', sizeof (mbstate_t));
+#   endif
+                      while (arg < arg_end)
+                        {
+                          char cbuf[64]; /* Assume MB_CUR_MAX <= 64.  */
+                          int count;
+
+                          if (*arg == 0)
+                            abort ();
+#   if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                          count = wcrtomb (cbuf, *arg, &state);
+#   else
+                          count = wctomb (cbuf, *arg);
+#   endif
+                          if (count <= 0)
+                            {
+                              /* Cannot convert.  */
+                              if (!(result == resultbuf || result == NULL))
+                                free (result);
+                              if (buf_malloced != NULL)
+                                free (buf_malloced);
+                              CLEANUP ();
+                              errno = EILSEQ;
+                              return NULL;
+                            }
+                          ENSURE_ALLOCATION (xsum (length, count));
+                          memcpy (result + length, cbuf, count);
+                          length += count;
+                          arg++;
+                        }
+                    }
+#  else
+                  ENSURE_ALLOCATION (xsum (length, tmpdst_len));
+                  DCHAR_CPY (result + length, tmpdst, tmpdst_len);
+                  free (tmpdst);
+                  length += tmpdst_len;
+#  endif
+
+                  if (has_width && width > w
+                      && (dp->flags & FLAG_LEFT))
+                    {
+                      size_t n = width - w;
+                      ENSURE_ALLOCATION (xsum (length, n));
+                      DCHAR_SET (result + length, ' ', n);
+                      length += n;
+                    }
+                }
+# endif
+              }
+#endif
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+            else if ((dp->conversion == 'a' || dp->conversion == 'A')
+# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE))
+                     && (0
+#  if NEED_PRINTF_DOUBLE
+                         || a.arg[dp->arg_index].type == TYPE_DOUBLE
+#  endif
+#  if NEED_PRINTF_LONG_DOUBLE
+                         || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
+#  endif
+                        )
+# endif
+                    )
+              {
+                arg_type type = a.arg[dp->arg_index].type;
+                int flags = dp->flags;
+                int has_width;
+                size_t width;
+                int has_precision;
+                size_t precision;
+                size_t tmp_length;
+                DCHAR_T tmpbuf[700];
+                DCHAR_T *tmp;
+                DCHAR_T *pad_ptr;
+                DCHAR_T *p;
+
+                has_width = 0;
+                width = 0;
+                if (dp->width_start != dp->width_end)
+                  {
+                    if (dp->width_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->width_arg_index].a.a_int;
+                        if (arg < 0)
+                          {
+                            /* "A negative field width is taken as a '-' flag
+                                followed by a positive field width."  */
+                            flags |= FLAG_LEFT;
+                            width = (unsigned int) (-arg);
+                          }
+                        else
+                          width = arg;
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->width_start;
+
+                        do
+                          width = xsum (xtimes (width, 10), *digitp++ - '0');
+                        while (digitp != dp->width_end);
+                      }
+                    has_width = 1;
+                  }
+
+                has_precision = 0;
+                precision = 0;
+                if (dp->precision_start != dp->precision_end)
+                  {
+                    if (dp->precision_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->precision_arg_index].a.a_int;
+                        /* "A negative precision is taken as if the precision
+                            were omitted."  */
+                        if (arg >= 0)
+                          {
+                            precision = arg;
+                            has_precision = 1;
+                          }
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->precision_start + 1;
+
+                        precision = 0;
+                        while (digitp != dp->precision_end)
+                          precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+                        has_precision = 1;
+                      }
+                  }
+
+                /* Allocate a temporary buffer of sufficient size.  */
+                if (type == TYPE_LONGDOUBLE)
+                  tmp_length =
+                    (unsigned int) ((LDBL_DIG + 1)
+                                    * 0.831 /* decimal -> hexadecimal */
+                                   )
+                    + 1; /* turn floor into ceil */
+                else
+                  tmp_length =
+                    (unsigned int) ((DBL_DIG + 1)
+                                    * 0.831 /* decimal -> hexadecimal */
+                                   )
+                    + 1; /* turn floor into ceil */
+                if (tmp_length < precision)
+                  tmp_length = precision;
+                /* Account for sign, decimal point etc. */
+                tmp_length = xsum (tmp_length, 12);
+
+                if (tmp_length < width)
+                  tmp_length = width;
+
+                tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+
+                if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T))
+                  tmp = tmpbuf;
+                else
+                  {
+                    size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T));
+
+                    if (size_overflow_p (tmp_memsize))
+                      /* Overflow, would lead to out of memory.  */
+                      goto out_of_memory;
+                    tmp = (DCHAR_T *) malloc (tmp_memsize);
+                    if (tmp == NULL)
+                      /* Out of memory.  */
+                      goto out_of_memory;
+                  }
+
+                pad_ptr = NULL;
+                p = tmp;
+                if (type == TYPE_LONGDOUBLE)
+                  {
+# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE
+                    long double arg = a.arg[dp->arg_index].a.a_longdouble;
+
+                    if (isnanl (arg))
+                      {
+                        if (dp->conversion == 'A')
+                          {
+                            *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+                          }
+                        else
+                          {
+                            *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+                          }
+                      }
+                    else
+                      {
+                        int sign = 0;
+                        DECL_LONG_DOUBLE_ROUNDING
+
+                        BEGIN_LONG_DOUBLE_ROUNDING ();
+
+                        if (signbit (arg)) /* arg < 0.0L or negative zero */
+                          {
+                            sign = -1;
+                            arg = -arg;
+                          }
+
+                        if (sign < 0)
+                          *p++ = '-';
+                        else if (flags & FLAG_SHOWSIGN)
+                          *p++ = '+';
+                        else if (flags & FLAG_SPACE)
+                          *p++ = ' ';
+
+                        if (arg > 0.0L && arg + arg == arg)
+                          {
+                            if (dp->conversion == 'A')
+                              {
+                                *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+                              }
+                            else
+                              {
+                                *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+                              }
+                          }
+                        else
+                          {
+                            int exponent;
+                            long double mantissa;
+
+                            if (arg > 0.0L)
+                              mantissa = printf_frexpl (arg, &exponent);
+                            else
+                              {
+                                exponent = 0;
+                                mantissa = 0.0L;
+                              }
+
+                            if (has_precision
+                                && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1)
+                              {
+                                /* Round the mantissa.  */
+                                long double tail = mantissa;
+                                size_t q;
+
+                                for (q = precision; ; q--)
+                                  {
+                                    int digit = (int) tail;
+                                    tail -= digit;
+                                    if (q == 0)
+                                      {
+                                        if (digit & 1 ? tail >= 0.5L : tail > 0.5L)
+                                          tail = 1 - tail;
+                                        else
+                                          tail = - tail;
+                                        break;
+                                      }
+                                    tail *= 16.0L;
+                                  }
+                                if (tail != 0.0L)
+                                  for (q = precision; q > 0; q--)
+                                    tail *= 0.0625L;
+                                mantissa += tail;
+                              }
+
+                            *p++ = '0';
+                            *p++ = dp->conversion - 'A' + 'X';
+                            pad_ptr = p;
+                            {
+                              int digit;
+
+                              digit = (int) mantissa;
+                              mantissa -= digit;
+                              *p++ = '0' + digit;
+                              if ((flags & FLAG_ALT)
+                                  || mantissa > 0.0L || precision > 0)
+                                {
+                                  *p++ = decimal_point_char ();
+                                  /* This loop terminates because we assume
+                                     that FLT_RADIX is a power of 2.  */
+                                  while (mantissa > 0.0L)
+                                    {
+                                      mantissa *= 16.0L;
+                                      digit = (int) mantissa;
+                                      mantissa -= digit;
+                                      *p++ = digit
+                                             + (digit < 10
+                                                ? '0'
+                                                : dp->conversion - 10);
+                                      if (precision > 0)
+                                        precision--;
+                                    }
+                                  while (precision > 0)
+                                    {
+                                      *p++ = '0';
+                                      precision--;
+                                    }
+                                }
+                              }
+                              *p++ = dp->conversion - 'A' + 'P';
+#  if WIDE_CHAR_VERSION
+                              {
+                                static const wchar_t decimal_format[] =
+                                  { '%', '+', 'd', '\0' };
+                                SNPRINTF (p, 6 + 1, decimal_format, exponent);
+                              }
+                              while (*p != '\0')
+                                p++;
+#  else
+                              if (sizeof (DCHAR_T) == 1)
+                                {
+                                  sprintf ((char *) p, "%+d", exponent);
+                                  while (*p != '\0')
+                                    p++;
+                                }
+                              else
+                                {
+                                  char expbuf[6 + 1];
+                                  const char *ep;
+                                  sprintf (expbuf, "%+d", exponent);
+                                  for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+                                    p++;
+                                }
+#  endif
+                          }
+
+                        END_LONG_DOUBLE_ROUNDING ();
+                      }
+# else
+                    abort ();
+# endif
+                  }
+                else
+                  {
+# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE
+                    double arg = a.arg[dp->arg_index].a.a_double;
+
+                    if (isnand (arg))
+                      {
+                        if (dp->conversion == 'A')
+                          {
+                            *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+                          }
+                        else
+                          {
+                            *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+                          }
+                      }
+                    else
+                      {
+                        int sign = 0;
+
+                        if (signbit (arg)) /* arg < 0.0 or negative zero */
+                          {
+                            sign = -1;
+                            arg = -arg;
+                          }
+
+                        if (sign < 0)
+                          *p++ = '-';
+                        else if (flags & FLAG_SHOWSIGN)
+                          *p++ = '+';
+                        else if (flags & FLAG_SPACE)
+                          *p++ = ' ';
+
+                        if (arg > 0.0 && arg + arg == arg)
+                          {
+                            if (dp->conversion == 'A')
+                              {
+                                *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+                              }
+                            else
+                              {
+                                *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+                              }
+                          }
+                        else
+                          {
+                            int exponent;
+                            double mantissa;
+
+                            if (arg > 0.0)
+                              mantissa = printf_frexp (arg, &exponent);
+                            else
+                              {
+                                exponent = 0;
+                                mantissa = 0.0;
+                              }
+
+                            if (has_precision
+                                && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1)
+                              {
+                                /* Round the mantissa.  */
+                                double tail = mantissa;
+                                size_t q;
+
+                                for (q = precision; ; q--)
+                                  {
+                                    int digit = (int) tail;
+                                    tail -= digit;
+                                    if (q == 0)
+                                      {
+                                        if (digit & 1 ? tail >= 0.5 : tail > 0.5)
+                                          tail = 1 - tail;
+                                        else
+                                          tail = - tail;
+                                        break;
+                                      }
+                                    tail *= 16.0;
+                                  }
+                                if (tail != 0.0)
+                                  for (q = precision; q > 0; q--)
+                                    tail *= 0.0625;
+                                mantissa += tail;
+                              }
+
+                            *p++ = '0';
+                            *p++ = dp->conversion - 'A' + 'X';
+                            pad_ptr = p;
+                            {
+                              int digit;
+
+                              digit = (int) mantissa;
+                              mantissa -= digit;
+                              *p++ = '0' + digit;
+                              if ((flags & FLAG_ALT)
+                                  || mantissa > 0.0 || precision > 0)
+                                {
+                                  *p++ = decimal_point_char ();
+                                  /* This loop terminates because we assume
+                                     that FLT_RADIX is a power of 2.  */
+                                  while (mantissa > 0.0)
+                                    {
+                                      mantissa *= 16.0;
+                                      digit = (int) mantissa;
+                                      mantissa -= digit;
+                                      *p++ = digit
+                                             + (digit < 10
+                                                ? '0'
+                                                : dp->conversion - 10);
+                                      if (precision > 0)
+                                        precision--;
+                                    }
+                                  while (precision > 0)
+                                    {
+                                      *p++ = '0';
+                                      precision--;
+                                    }
+                                }
+                              }
+                              *p++ = dp->conversion - 'A' + 'P';
+#  if WIDE_CHAR_VERSION
+                              {
+                                static const wchar_t decimal_format[] =
+                                  { '%', '+', 'd', '\0' };
+                                SNPRINTF (p, 6 + 1, decimal_format, exponent);
+                              }
+                              while (*p != '\0')
+                                p++;
+#  else
+                              if (sizeof (DCHAR_T) == 1)
+                                {
+                                  sprintf ((char *) p, "%+d", exponent);
+                                  while (*p != '\0')
+                                    p++;
+                                }
+                              else
+                                {
+                                  char expbuf[6 + 1];
+                                  const char *ep;
+                                  sprintf (expbuf, "%+d", exponent);
+                                  for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+                                    p++;
+                                }
+#  endif
+                          }
+                      }
+# else
+                    abort ();
+# endif
+                  }
+                /* The generated string now extends from tmp to p, with the
+                   zero padding insertion point being at pad_ptr.  */
+                if (has_width && p - tmp < width)
+                  {
+                    size_t pad = width - (p - tmp);
+                    DCHAR_T *end = p + pad;
+
+                    if (flags & FLAG_LEFT)
+                      {
+                        /* Pad with spaces on the right.  */
+                        for (; pad > 0; pad--)
+                          *p++ = ' ';
+                      }
+                    else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+                      {
+                        /* Pad with zeroes.  */
+                        DCHAR_T *q = end;
+
+                        while (p > pad_ptr)
+                          *--q = *--p;
+                        for (; pad > 0; pad--)
+                          *p++ = '0';
+                      }
+                    else
+                      {
+                        /* Pad with spaces on the left.  */
+                        DCHAR_T *q = end;
+
+                        while (p > tmp)
+                          *--q = *--p;
+                        for (; pad > 0; pad--)
+                          *p++ = ' ';
+                      }
+
+                    p = end;
+                  }
+
+                {
+                  size_t count = p - tmp;
+
+                  if (count >= tmp_length)
+                    /* tmp_length was incorrectly calculated - fix the
+                       code above!  */
+                    abort ();
+
+                  /* Make room for the result.  */
+                  if (count >= allocated - length)
+                    {
+                      size_t n = xsum (length, count);
+
+                      ENSURE_ALLOCATION (n);
+                    }
+
+                  /* Append the result.  */
+                  memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+                  if (tmp != tmpbuf)
+                    free (tmp);
+                  length += count;
+                }
+              }
+#endif
+#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+            else if ((dp->conversion == 'f' || dp->conversion == 'F'
+                      || dp->conversion == 'e' || dp->conversion == 'E'
+                      || dp->conversion == 'g' || dp->conversion == 'G'
+                      || dp->conversion == 'a' || dp->conversion == 'A')
+                     && (0
+# if NEED_PRINTF_DOUBLE
+                         || a.arg[dp->arg_index].type == TYPE_DOUBLE
+# elif NEED_PRINTF_INFINITE_DOUBLE
+                         || (a.arg[dp->arg_index].type == TYPE_DOUBLE
+                             /* The systems (mingw) which produce wrong output
+                                for Inf, -Inf, and NaN also do so for -0.0.
+                                Therefore we treat this case here as well.  */
+                             && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double))
+# endif
+# if NEED_PRINTF_LONG_DOUBLE
+                         || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
+# elif NEED_PRINTF_INFINITE_LONG_DOUBLE
+                         || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
+                             /* Some systems produce wrong output for Inf,
+                                -Inf, and NaN.  Some systems in this category
+                                (IRIX 5.3) also do so for -0.0.  Therefore we
+                                treat this case here as well.  */
+                             && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble))
+# endif
+                        ))
+              {
+# if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE)
+                arg_type type = a.arg[dp->arg_index].type;
+# endif
+                int flags = dp->flags;
+                int has_width;
+                size_t width;
+                int has_precision;
+                size_t precision;
+                size_t tmp_length;
+                DCHAR_T tmpbuf[700];
+                DCHAR_T *tmp;
+                DCHAR_T *pad_ptr;
+                DCHAR_T *p;
+
+                has_width = 0;
+                width = 0;
+                if (dp->width_start != dp->width_end)
+                  {
+                    if (dp->width_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->width_arg_index].a.a_int;
+                        if (arg < 0)
+                          {
+                            /* "A negative field width is taken as a '-' flag
+                                followed by a positive field width."  */
+                            flags |= FLAG_LEFT;
+                            width = (unsigned int) (-arg);
+                          }
+                        else
+                          width = arg;
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->width_start;
+
+                        do
+                          width = xsum (xtimes (width, 10), *digitp++ - '0');
+                        while (digitp != dp->width_end);
+                      }
+                    has_width = 1;
+                  }
+
+                has_precision = 0;
+                precision = 0;
+                if (dp->precision_start != dp->precision_end)
+                  {
+                    if (dp->precision_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->precision_arg_index].a.a_int;
+                        /* "A negative precision is taken as if the precision
+                            were omitted."  */
+                        if (arg >= 0)
+                          {
+                            precision = arg;
+                            has_precision = 1;
+                          }
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->precision_start + 1;
+
+                        precision = 0;
+                        while (digitp != dp->precision_end)
+                          precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+                        has_precision = 1;
+                      }
+                  }
+
+                /* POSIX specifies the default precision to be 6 for %f, %F,
+                   %e, %E, but not for %g, %G.  Implementations appear to use
+                   the same default precision also for %g, %G.  But for %a, %A,
+                   the default precision is 0.  */
+                if (!has_precision)
+                  if (!(dp->conversion == 'a' || dp->conversion == 'A'))
+                    precision = 6;
+
+                /* Allocate a temporary buffer of sufficient size.  */
+# if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE
+                tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1);
+# elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE
+                tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0);
+# elif NEED_PRINTF_LONG_DOUBLE
+                tmp_length = LDBL_DIG + 1;
+# elif NEED_PRINTF_DOUBLE
+                tmp_length = DBL_DIG + 1;
+# else
+                tmp_length = 0;
+# endif
+                if (tmp_length < precision)
+                  tmp_length = precision;
+# if NEED_PRINTF_LONG_DOUBLE
+#  if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+                if (type == TYPE_LONGDOUBLE)
+#  endif
+                  if (dp->conversion == 'f' || dp->conversion == 'F')
+                    {
+                      long double arg = a.arg[dp->arg_index].a.a_longdouble;
+                      if (!(isnanl (arg) || arg + arg == arg))
+                        {
+                          /* arg is finite and nonzero.  */
+                          int exponent = floorlog10l (arg < 0 ? -arg : arg);
+                          if (exponent >= 0 && tmp_length < exponent + precision)
+                            tmp_length = exponent + precision;
+                        }
+                    }
+# endif
+# if NEED_PRINTF_DOUBLE
+#  if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE
+                if (type == TYPE_DOUBLE)
+#  endif
+                  if (dp->conversion == 'f' || dp->conversion == 'F')
+                    {
+                      double arg = a.arg[dp->arg_index].a.a_double;
+                      if (!(isnand (arg) || arg + arg == arg))
+                        {
+                          /* arg is finite and nonzero.  */
+                          int exponent = floorlog10 (arg < 0 ? -arg : arg);
+                          if (exponent >= 0 && tmp_length < exponent + precision)
+                            tmp_length = exponent + precision;
+                        }
+                    }
+# endif
+                /* Account for sign, decimal point etc. */
+                tmp_length = xsum (tmp_length, 12);
+
+                if (tmp_length < width)
+                  tmp_length = width;
+
+                tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+
+                if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T))
+                  tmp = tmpbuf;
+                else
+                  {
+                    size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T));
+
+                    if (size_overflow_p (tmp_memsize))
+                      /* Overflow, would lead to out of memory.  */
+                      goto out_of_memory;
+                    tmp = (DCHAR_T *) malloc (tmp_memsize);
+                    if (tmp == NULL)
+                      /* Out of memory.  */
+                      goto out_of_memory;
+                  }
+
+                pad_ptr = NULL;
+                p = tmp;
+
+# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE
+#  if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+                if (type == TYPE_LONGDOUBLE)
+#  endif
+                  {
+                    long double arg = a.arg[dp->arg_index].a.a_longdouble;
+
+                    if (isnanl (arg))
+                      {
+                        if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+                          {
+                            *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+                          }
+                        else
+                          {
+                            *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+                          }
+                      }
+                    else
+                      {
+                        int sign = 0;
+                        DECL_LONG_DOUBLE_ROUNDING
+
+                        BEGIN_LONG_DOUBLE_ROUNDING ();
+
+                        if (signbit (arg)) /* arg < 0.0L or negative zero */
+                          {
+                            sign = -1;
+                            arg = -arg;
+                          }
+
+                        if (sign < 0)
+                          *p++ = '-';
+                        else if (flags & FLAG_SHOWSIGN)
+                          *p++ = '+';
+                        else if (flags & FLAG_SPACE)
+                          *p++ = ' ';
+
+                        if (arg > 0.0L && arg + arg == arg)
+                          {
+                            if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+                              {
+                                *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+                              }
+                            else
+                              {
+                                *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+                              }
+                          }
+                        else
+                          {
+#  if NEED_PRINTF_LONG_DOUBLE
+                            pad_ptr = p;
+
+                            if (dp->conversion == 'f' || dp->conversion == 'F')
+                              {
+                                char *digits;
+                                size_t ndigits;
+
+                                digits =
+                                  scale10_round_decimal_long_double (arg, precision);
+                                if (digits == NULL)
+                                  {
+                                    END_LONG_DOUBLE_ROUNDING ();
+                                    goto out_of_memory;
+                                  }
+                                ndigits = strlen (digits);
+
+                                if (ndigits > precision)
+                                  do
+                                    {
+                                      --ndigits;
+                                      *p++ = digits[ndigits];
+                                    }
+                                  while (ndigits > precision);
+                                else
+                                  *p++ = '0';
+                                /* Here ndigits <= precision.  */
+                                if ((flags & FLAG_ALT) || precision > 0)
+                                  {
+                                    *p++ = decimal_point_char ();
+                                    for (; precision > ndigits; precision--)
+                                      *p++ = '0';
+                                    while (ndigits > 0)
+                                      {
+                                        --ndigits;
+                                        *p++ = digits[ndigits];
+                                      }
+                                  }
+
+                                free (digits);
+                              }
+                            else if (dp->conversion == 'e' || dp->conversion == 'E')
+                              {
+                                int exponent;
+
+                                if (arg == 0.0L)
+                                  {
+                                    exponent = 0;
+                                    *p++ = '0';
+                                    if ((flags & FLAG_ALT) || precision > 0)
+                                      {
+                                        *p++ = decimal_point_char ();
+                                        for (; precision > 0; precision--)
+                                          *p++ = '0';
+                                      }
+                                  }
+                                else
+                                  {
+                                    /* arg > 0.0L.  */
+                                    int adjusted;
+                                    char *digits;
+                                    size_t ndigits;
+
+                                    exponent = floorlog10l (arg);
+                                    adjusted = 0;
+                                    for (;;)
+                                      {
+                                        digits =
+                                          scale10_round_decimal_long_double (arg,
+                                                                             (int)precision - exponent);
+                                        if (digits == NULL)
+                                          {
+                                            END_LONG_DOUBLE_ROUNDING ();
+                                            goto out_of_memory;
+                                          }
+                                        ndigits = strlen (digits);
+
+                                        if (ndigits == precision + 1)
+                                          break;
+                                        if (ndigits < precision
+                                            || ndigits > precision + 2)
+                                          /* The exponent was not guessed
+                                             precisely enough.  */
+                                          abort ();
+                                        if (adjusted)
+                                          /* None of two values of exponent is
+                                             the right one.  Prevent an endless
+                                             loop.  */
+                                          abort ();
+                                        free (digits);
+                                        if (ndigits == precision)
+                                          exponent -= 1;
+                                        else
+                                          exponent += 1;
+                                        adjusted = 1;
+                                      }
+                                    /* Here ndigits = precision+1.  */
+                                    if (is_borderline (digits, precision))
+                                      {
+                                        /* Maybe the exponent guess was too high
+                                           and a smaller exponent can be reached
+                                           by turning a 10...0 into 9...9x.  */
+                                        char *digits2 =
+                                          scale10_round_decimal_long_double (arg,
+                                                                             (int)precision - exponent + 1);
+                                        if (digits2 == NULL)
+                                          {
+                                            free (digits);
+                                            END_LONG_DOUBLE_ROUNDING ();
+                                            goto out_of_memory;
+                                          }
+                                        if (strlen (digits2) == precision + 1)
+                                          {
+                                            free (digits);
+                                            digits = digits2;
+                                            exponent -= 1;
+                                          }
+                                        else
+                                          free (digits2);
+                                      }
+                                    /* Here ndigits = precision+1.  */
+
+                                    *p++ = digits[--ndigits];
+                                    if ((flags & FLAG_ALT) || precision > 0)
+                                      {
+                                        *p++ = decimal_point_char ();
+                                        while (ndigits > 0)
+                                          {
+                                            --ndigits;
+                                            *p++ = digits[ndigits];
+                                          }
+                                      }
+
+                                    free (digits);
+                                  }
+
+                                *p++ = dp->conversion; /* 'e' or 'E' */
+#   if WIDE_CHAR_VERSION
+                                {
+                                  static const wchar_t decimal_format[] =
+                                    { '%', '+', '.', '2', 'd', '\0' };
+                                  SNPRINTF (p, 6 + 1, decimal_format, exponent);
+                                }
+                                while (*p != '\0')
+                                  p++;
+#   else
+                                if (sizeof (DCHAR_T) == 1)
+                                  {
+                                    sprintf ((char *) p, "%+.2d", exponent);
+                                    while (*p != '\0')
+                                      p++;
+                                  }
+                                else
+                                  {
+                                    char expbuf[6 + 1];
+                                    const char *ep;
+                                    sprintf (expbuf, "%+.2d", exponent);
+                                    for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+                                      p++;
+                                  }
+#   endif
+                              }
+                            else if (dp->conversion == 'g' || dp->conversion == 'G')
+                              {
+                                if (precision == 0)
+                                  precision = 1;
+                                /* precision >= 1.  */
+
+                                if (arg == 0.0L)
+                                  /* The exponent is 0, >= -4, < precision.
+                                     Use fixed-point notation.  */
+                                  {
+                                    size_t ndigits = precision;
+                                    /* Number of trailing zeroes that have to be
+                                       dropped.  */
+                                    size_t nzeroes =
+                                      (flags & FLAG_ALT ? 0 : precision - 1);
+
+                                    --ndigits;
+                                    *p++ = '0';
+                                    if ((flags & FLAG_ALT) || ndigits > nzeroes)
+                                      {
+                                        *p++ = decimal_point_char ();
+                                        while (ndigits > nzeroes)
+                                          {
+                                            --ndigits;
+                                            *p++ = '0';
+                                          }
+                                      }
+                                  }
+                                else
+                                  {
+                                    /* arg > 0.0L.  */
+                                    int exponent;
+                                    int adjusted;
+                                    char *digits;
+                                    size_t ndigits;
+                                    size_t nzeroes;
+
+                                    exponent = floorlog10l (arg);
+                                    adjusted = 0;
+                                    for (;;)
+                                      {
+                                        digits =
+                                          scale10_round_decimal_long_double (arg,
+                                                                             (int)(precision - 1) - exponent);
+                                        if (digits == NULL)
+                                          {
+                                            END_LONG_DOUBLE_ROUNDING ();
+                                            goto out_of_memory;
+                                          }
+                                        ndigits = strlen (digits);
+
+                                        if (ndigits == precision)
+                                          break;
+                                        if (ndigits < precision - 1
+                                            || ndigits > precision + 1)
+                                          /* The exponent was not guessed
+                                             precisely enough.  */
+                                          abort ();
+                                        if (adjusted)
+                                          /* None of two values of exponent is
+                                             the right one.  Prevent an endless
+                                             loop.  */
+                                          abort ();
+                                        free (digits);
+                                        if (ndigits < precision)
+                                          exponent -= 1;
+                                        else
+                                          exponent += 1;
+                                        adjusted = 1;
+                                      }
+                                    /* Here ndigits = precision.  */
+                                    if (is_borderline (digits, precision - 1))
+                                      {
+                                        /* Maybe the exponent guess was too high
+                                           and a smaller exponent can be reached
+                                           by turning a 10...0 into 9...9x.  */
+                                        char *digits2 =
+                                          scale10_round_decimal_long_double (arg,
+                                                                             (int)(precision - 1) - exponent + 1);
+                                        if (digits2 == NULL)
+                                          {
+                                            free (digits);
+                                            END_LONG_DOUBLE_ROUNDING ();
+                                            goto out_of_memory;
+                                          }
+                                        if (strlen (digits2) == precision)
+                                          {
+                                            free (digits);
+                                            digits = digits2;
+                                            exponent -= 1;
+                                          }
+                                        else
+                                          free (digits2);
+                                      }
+                                    /* Here ndigits = precision.  */
+
+                                    /* Determine the number of trailing zeroes
+                                       that have to be dropped.  */
+                                    nzeroes = 0;
+                                    if ((flags & FLAG_ALT) == 0)
+                                      while (nzeroes < ndigits
+                                             && digits[nzeroes] == '0')
+                                        nzeroes++;
+
+                                    /* The exponent is now determined.  */
+                                    if (exponent >= -4
+                                        && exponent < (long)precision)
+                                      {
+                                        /* Fixed-point notation:
+                                           max(exponent,0)+1 digits, then the
+                                           decimal point, then the remaining
+                                           digits without trailing zeroes.  */
+                                        if (exponent >= 0)
+                                          {
+                                            size_t count = exponent + 1;
+                                            /* Note: count <= precision = ndigits.  */
+                                            for (; count > 0; count--)
+                                              *p++ = digits[--ndigits];
+                                            if ((flags & FLAG_ALT) || ndigits > nzeroes)
+                                              {
+                                                *p++ = decimal_point_char ();
+                                                while (ndigits > nzeroes)
+                                                  {
+                                                    --ndigits;
+                                                    *p++ = digits[ndigits];
+                                                  }
+                                              }
+                                          }
+                                        else
+                                          {
+                                            size_t count = -exponent - 1;
+                                            *p++ = '0';
+                                            *p++ = decimal_point_char ();
+                                            for (; count > 0; count--)
+                                              *p++ = '0';
+                                            while (ndigits > nzeroes)
+                                              {
+                                                --ndigits;
+                                                *p++ = digits[ndigits];
+                                              }
+                                          }
+                                      }
+                                    else
+                                      {
+                                        /* Exponential notation.  */
+                                        *p++ = digits[--ndigits];
+                                        if ((flags & FLAG_ALT) || ndigits > nzeroes)
+                                          {
+                                            *p++ = decimal_point_char ();
+                                            while (ndigits > nzeroes)
+                                              {
+                                                --ndigits;
+                                                *p++ = digits[ndigits];
+                                              }
+                                          }
+                                        *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
+#   if WIDE_CHAR_VERSION
+                                        {
+                                          static const wchar_t decimal_format[] =
+                                            { '%', '+', '.', '2', 'd', '\0' };
+                                          SNPRINTF (p, 6 + 1, decimal_format, exponent);
+                                        }
+                                        while (*p != '\0')
+                                          p++;
+#   else
+                                        if (sizeof (DCHAR_T) == 1)
+                                          {
+                                            sprintf ((char *) p, "%+.2d", exponent);
+                                            while (*p != '\0')
+                                              p++;
+                                          }
+                                        else
+                                          {
+                                            char expbuf[6 + 1];
+                                            const char *ep;
+                                            sprintf (expbuf, "%+.2d", exponent);
+                                            for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+                                              p++;
+                                          }
+#   endif
+                                      }
+
+                                    free (digits);
+                                  }
+                              }
+                            else
+                              abort ();
+#  else
+                            /* arg is finite.  */
+                            if (!(arg == 0.0L))
+                              abort ();
+
+                            pad_ptr = p;
+
+                            if (dp->conversion == 'f' || dp->conversion == 'F')
+                              {
+                                *p++ = '0';
+                                if ((flags & FLAG_ALT) || precision > 0)
+                                  {
+                                    *p++ = decimal_point_char ();
+                                    for (; precision > 0; precision--)
+                                      *p++ = '0';
+                                  }
+                              }
+                            else if (dp->conversion == 'e' || dp->conversion == 'E')
+                              {
+                                *p++ = '0';
+                                if ((flags & FLAG_ALT) || precision > 0)
+                                  {
+                                    *p++ = decimal_point_char ();
+                                    for (; precision > 0; precision--)
+                                      *p++ = '0';
+                                  }
+                                *p++ = dp->conversion; /* 'e' or 'E' */
+                                *p++ = '+';
+                                *p++ = '0';
+                                *p++ = '0';
+                              }
+                            else if (dp->conversion == 'g' || dp->conversion == 'G')
+                              {
+                                *p++ = '0';
+                                if (flags & FLAG_ALT)
+                                  {
+                                    size_t ndigits =
+                                      (precision > 0 ? precision - 1 : 0);
+                                    *p++ = decimal_point_char ();
+                                    for (; ndigits > 0; --ndigits)
+                                      *p++ = '0';
+                                  }
+                              }
+                            else if (dp->conversion == 'a' || dp->conversion == 'A')
+                              {
+                                *p++ = '0';
+                                *p++ = dp->conversion - 'A' + 'X';
+                                pad_ptr = p;
+                                *p++ = '0';
+                                if ((flags & FLAG_ALT) || precision > 0)
+                                  {
+                                    *p++ = decimal_point_char ();
+                                    for (; precision > 0; precision--)
+                                      *p++ = '0';
+                                  }
+                                *p++ = dp->conversion - 'A' + 'P';
+                                *p++ = '+';
+                                *p++ = '0';
+                              }
+                            else
+                              abort ();
+#  endif
+                          }
+
+                        END_LONG_DOUBLE_ROUNDING ();
+                      }
+                  }
+#  if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+                else
+#  endif
+# endif
+# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+                  {
+                    double arg = a.arg[dp->arg_index].a.a_double;
+
+                    if (isnand (arg))
+                      {
+                        if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+                          {
+                            *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+                          }
+                        else
+                          {
+                            *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+                          }
+                      }
+                    else
+                      {
+                        int sign = 0;
+
+                        if (signbit (arg)) /* arg < 0.0 or negative zero */
+                          {
+                            sign = -1;
+                            arg = -arg;
+                          }
+
+                        if (sign < 0)
+                          *p++ = '-';
+                        else if (flags & FLAG_SHOWSIGN)
+                          *p++ = '+';
+                        else if (flags & FLAG_SPACE)
+                          *p++ = ' ';
+
+                        if (arg > 0.0 && arg + arg == arg)
+                          {
+                            if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+                              {
+                                *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+                              }
+                            else
+                              {
+                                *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+                              }
+                          }
+                        else
+                          {
+#  if NEED_PRINTF_DOUBLE
+                            pad_ptr = p;
+
+                            if (dp->conversion == 'f' || dp->conversion == 'F')
+                              {
+                                char *digits;
+                                size_t ndigits;
+
+                                digits =
+                                  scale10_round_decimal_double (arg, precision);
+                                if (digits == NULL)
+                                  goto out_of_memory;
+                                ndigits = strlen (digits);
+
+                                if (ndigits > precision)
+                                  do
+                                    {
+                                      --ndigits;
+                                      *p++ = digits[ndigits];
+                                    }
+                                  while (ndigits > precision);
+                                else
+                                  *p++ = '0';
+                                /* Here ndigits <= precision.  */
+                                if ((flags & FLAG_ALT) || precision > 0)
+                                  {
+                                    *p++ = decimal_point_char ();
+                                    for (; precision > ndigits; precision--)
+                                      *p++ = '0';
+                                    while (ndigits > 0)
+                                      {
+                                        --ndigits;
+                                        *p++ = digits[ndigits];
+                                      }
+                                  }
+
+                                free (digits);
+                              }
+                            else if (dp->conversion == 'e' || dp->conversion == 'E')
+                              {
+                                int exponent;
+
+                                if (arg == 0.0)
+                                  {
+                                    exponent = 0;
+                                    *p++ = '0';
+                                    if ((flags & FLAG_ALT) || precision > 0)
+                                      {
+                                        *p++ = decimal_point_char ();
+                                        for (; precision > 0; precision--)
+                                          *p++ = '0';
+                                      }
+                                  }
+                                else
+                                  {
+                                    /* arg > 0.0.  */
+                                    int adjusted;
+                                    char *digits;
+                                    size_t ndigits;
+
+                                    exponent = floorlog10 (arg);
+                                    adjusted = 0;
+                                    for (;;)
+                                      {
+                                        digits =
+                                          scale10_round_decimal_double (arg,
+                                                                        (int)precision - exponent);
+                                        if (digits == NULL)
+                                          goto out_of_memory;
+                                        ndigits = strlen (digits);
+
+                                        if (ndigits == precision + 1)
+                                          break;
+                                        if (ndigits < precision
+                                            || ndigits > precision + 2)
+                                          /* The exponent was not guessed
+                                             precisely enough.  */
+                                          abort ();
+                                        if (adjusted)
+                                          /* None of two values of exponent is
+                                             the right one.  Prevent an endless
+                                             loop.  */
+                                          abort ();
+                                        free (digits);
+                                        if (ndigits == precision)
+                                          exponent -= 1;
+                                        else
+                                          exponent += 1;
+                                        adjusted = 1;
+                                      }
+                                    /* Here ndigits = precision+1.  */
+                                    if (is_borderline (digits, precision))
+                                      {
+                                        /* Maybe the exponent guess was too high
+                                           and a smaller exponent can be reached
+                                           by turning a 10...0 into 9...9x.  */
+                                        char *digits2 =
+                                          scale10_round_decimal_double (arg,
+                                                                        (int)precision - exponent + 1);
+                                        if (digits2 == NULL)
+                                          {
+                                            free (digits);
+                                            goto out_of_memory;
+                                          }
+                                        if (strlen (digits2) == precision + 1)
+                                          {
+                                            free (digits);
+                                            digits = digits2;
+                                            exponent -= 1;
+                                          }
+                                        else
+                                          free (digits2);
+                                      }
+                                    /* Here ndigits = precision+1.  */
+
+                                    *p++ = digits[--ndigits];
+                                    if ((flags & FLAG_ALT) || precision > 0)
+                                      {
+                                        *p++ = decimal_point_char ();
+                                        while (ndigits > 0)
+                                          {
+                                            --ndigits;
+                                            *p++ = digits[ndigits];
+                                          }
+                                      }
+
+                                    free (digits);
+                                  }
+
+                                *p++ = dp->conversion; /* 'e' or 'E' */
+#   if WIDE_CHAR_VERSION
+                                {
+                                  static const wchar_t decimal_format[] =
+                                    /* Produce the same number of exponent digits
+                                       as the native printf implementation.  */
+#    if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+                                    { '%', '+', '.', '3', 'd', '\0' };
+#    else
+                                    { '%', '+', '.', '2', 'd', '\0' };
+#    endif
+                                  SNPRINTF (p, 6 + 1, decimal_format, exponent);
+                                }
+                                while (*p != '\0')
+                                  p++;
+#   else
+                                {
+                                  static const char decimal_format[] =
+                                    /* Produce the same number of exponent digits
+                                       as the native printf implementation.  */
+#    if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+                                    "%+.3d";
+#    else
+                                    "%+.2d";
+#    endif
+                                  if (sizeof (DCHAR_T) == 1)
+                                    {
+                                      sprintf ((char *) p, decimal_format, exponent);
+                                      while (*p != '\0')
+                                        p++;
+                                    }
+                                  else
+                                    {
+                                      char expbuf[6 + 1];
+                                      const char *ep;
+                                      sprintf (expbuf, decimal_format, exponent);
+                                      for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+                                        p++;
+                                    }
+                                }
+#   endif
+                              }
+                            else if (dp->conversion == 'g' || dp->conversion == 'G')
+                              {
+                                if (precision == 0)
+                                  precision = 1;
+                                /* precision >= 1.  */
+
+                                if (arg == 0.0)
+                                  /* The exponent is 0, >= -4, < precision.
+                                     Use fixed-point notation.  */
+                                  {
+                                    size_t ndigits = precision;
+                                    /* Number of trailing zeroes that have to be
+                                       dropped.  */
+                                    size_t nzeroes =
+                                      (flags & FLAG_ALT ? 0 : precision - 1);
+
+                                    --ndigits;
+                                    *p++ = '0';
+                                    if ((flags & FLAG_ALT) || ndigits > nzeroes)
+                                      {
+                                        *p++ = decimal_point_char ();
+                                        while (ndigits > nzeroes)
+                                          {
+                                            --ndigits;
+                                            *p++ = '0';
+                                          }
+                                      }
+                                  }
+                                else
+                                  {
+                                    /* arg > 0.0.  */
+                                    int exponent;
+                                    int adjusted;
+                                    char *digits;
+                                    size_t ndigits;
+                                    size_t nzeroes;
+
+                                    exponent = floorlog10 (arg);
+                                    adjusted = 0;
+                                    for (;;)
+                                      {
+                                        digits =
+                                          scale10_round_decimal_double (arg,
+                                                                        (int)(precision - 1) - exponent);
+                                        if (digits == NULL)
+                                          goto out_of_memory;
+                                        ndigits = strlen (digits);
+
+                                        if (ndigits == precision)
+                                          break;
+                                        if (ndigits < precision - 1
+                                            || ndigits > precision + 1)
+                                          /* The exponent was not guessed
+                                             precisely enough.  */
+                                          abort ();
+                                        if (adjusted)
+                                          /* None of two values of exponent is
+                                             the right one.  Prevent an endless
+                                             loop.  */
+                                          abort ();
+                                        free (digits);
+                                        if (ndigits < precision)
+                                          exponent -= 1;
+                                        else
+                                          exponent += 1;
+                                        adjusted = 1;
+                                      }
+                                    /* Here ndigits = precision.  */
+                                    if (is_borderline (digits, precision - 1))
+                                      {
+                                        /* Maybe the exponent guess was too high
+                                           and a smaller exponent can be reached
+                                           by turning a 10...0 into 9...9x.  */
+                                        char *digits2 =
+                                          scale10_round_decimal_double (arg,
+                                                                        (int)(precision - 1) - exponent + 1);
+                                        if (digits2 == NULL)
+                                          {
+                                            free (digits);
+                                            goto out_of_memory;
+                                          }
+                                        if (strlen (digits2) == precision)
+                                          {
+                                            free (digits);
+                                            digits = digits2;
+                                            exponent -= 1;
+                                          }
+                                        else
+                                          free (digits2);
+                                      }
+                                    /* Here ndigits = precision.  */
+
+                                    /* Determine the number of trailing zeroes
+                                       that have to be dropped.  */
+                                    nzeroes = 0;
+                                    if ((flags & FLAG_ALT) == 0)
+                                      while (nzeroes < ndigits
+                                             && digits[nzeroes] == '0')
+                                        nzeroes++;
+
+                                    /* The exponent is now determined.  */
+                                    if (exponent >= -4
+                                        && exponent < (long)precision)
+                                      {
+                                        /* Fixed-point notation:
+                                           max(exponent,0)+1 digits, then the
+                                           decimal point, then the remaining
+                                           digits without trailing zeroes.  */
+                                        if (exponent >= 0)
+                                          {
+                                            size_t count = exponent + 1;
+                                            /* Note: count <= precision = ndigits.  */
+                                            for (; count > 0; count--)
+                                              *p++ = digits[--ndigits];
+                                            if ((flags & FLAG_ALT) || ndigits > nzeroes)
+                                              {
+                                                *p++ = decimal_point_char ();
+                                                while (ndigits > nzeroes)
+                                                  {
+                                                    --ndigits;
+                                                    *p++ = digits[ndigits];
+                                                  }
+                                              }
+                                          }
+                                        else
+                                          {
+                                            size_t count = -exponent - 1;
+                                            *p++ = '0';
+                                            *p++ = decimal_point_char ();
+                                            for (; count > 0; count--)
+                                              *p++ = '0';
+                                            while (ndigits > nzeroes)
+                                              {
+                                                --ndigits;
+                                                *p++ = digits[ndigits];
+                                              }
+                                          }
+                                      }
+                                    else
+                                      {
+                                        /* Exponential notation.  */
+                                        *p++ = digits[--ndigits];
+                                        if ((flags & FLAG_ALT) || ndigits > nzeroes)
+                                          {
+                                            *p++ = decimal_point_char ();
+                                            while (ndigits > nzeroes)
+                                              {
+                                                --ndigits;
+                                                *p++ = digits[ndigits];
+                                              }
+                                          }
+                                        *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
+#   if WIDE_CHAR_VERSION
+                                        {
+                                          static const wchar_t decimal_format[] =
+                                            /* Produce the same number of exponent digits
+                                               as the native printf implementation.  */
+#    if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+                                            { '%', '+', '.', '3', 'd', '\0' };
+#    else
+                                            { '%', '+', '.', '2', 'd', '\0' };
+#    endif
+                                          SNPRINTF (p, 6 + 1, decimal_format, exponent);
+                                        }
+                                        while (*p != '\0')
+                                          p++;
+#   else
+                                        {
+                                          static const char decimal_format[] =
+                                            /* Produce the same number of exponent digits
+                                               as the native printf implementation.  */
+#    if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+                                            "%+.3d";
+#    else
+                                            "%+.2d";
+#    endif
+                                          if (sizeof (DCHAR_T) == 1)
+                                            {
+                                              sprintf ((char *) p, decimal_format, exponent);
+                                              while (*p != '\0')
+                                                p++;
+                                            }
+                                          else
+                                            {
+                                              char expbuf[6 + 1];
+                                              const char *ep;
+                                              sprintf (expbuf, decimal_format, exponent);
+                                              for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+                                                p++;
+                                            }
+                                        }
+#   endif
+                                      }
+
+                                    free (digits);
+                                  }
+                              }
+                            else
+                              abort ();
+#  else
+                            /* arg is finite.  */
+                            if (!(arg == 0.0))
+                              abort ();
+
+                            pad_ptr = p;
+
+                            if (dp->conversion == 'f' || dp->conversion == 'F')
+                              {
+                                *p++ = '0';
+                                if ((flags & FLAG_ALT) || precision > 0)
+                                  {
+                                    *p++ = decimal_point_char ();
+                                    for (; precision > 0; precision--)
+                                      *p++ = '0';
+                                  }
+                              }
+                            else if (dp->conversion == 'e' || dp->conversion == 'E')
+                              {
+                                *p++ = '0';
+                                if ((flags & FLAG_ALT) || precision > 0)
+                                  {
+                                    *p++ = decimal_point_char ();
+                                    for (; precision > 0; precision--)
+                                      *p++ = '0';
+                                  }
+                                *p++ = dp->conversion; /* 'e' or 'E' */
+                                *p++ = '+';
+                                /* Produce the same number of exponent digits as
+                                   the native printf implementation.  */
+#   if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+                                *p++ = '0';
+#   endif
+                                *p++ = '0';
+                                *p++ = '0';
+                              }
+                            else if (dp->conversion == 'g' || dp->conversion == 'G')
+                              {
+                                *p++ = '0';
+                                if (flags & FLAG_ALT)
+                                  {
+                                    size_t ndigits =
+                                      (precision > 0 ? precision - 1 : 0);
+                                    *p++ = decimal_point_char ();
+                                    for (; ndigits > 0; --ndigits)
+                                      *p++ = '0';
+                                  }
+                              }
+                            else
+                              abort ();
+#  endif
+                          }
+                      }
+                  }
+# endif
+
+                /* The generated string now extends from tmp to p, with the
+                   zero padding insertion point being at pad_ptr.  */
+                if (has_width && p - tmp < width)
+                  {
+                    size_t pad = width - (p - tmp);
+                    DCHAR_T *end = p + pad;
+
+                    if (flags & FLAG_LEFT)
+                      {
+                        /* Pad with spaces on the right.  */
+                        for (; pad > 0; pad--)
+                          *p++ = ' ';
+                      }
+                    else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+                      {
+                        /* Pad with zeroes.  */
+                        DCHAR_T *q = end;
+
+                        while (p > pad_ptr)
+                          *--q = *--p;
+                        for (; pad > 0; pad--)
+                          *p++ = '0';
+                      }
+                    else
+                      {
+                        /* Pad with spaces on the left.  */
+                        DCHAR_T *q = end;
+
+                        while (p > tmp)
+                          *--q = *--p;
+                        for (; pad > 0; pad--)
+                          *p++ = ' ';
+                      }
+
+                    p = end;
+                  }
+
+                {
+                  size_t count = p - tmp;
+
+                  if (count >= tmp_length)
+                    /* tmp_length was incorrectly calculated - fix the
+                       code above!  */
+                    abort ();
+
+                  /* Make room for the result.  */
+                  if (count >= allocated - length)
+                    {
+                      size_t n = xsum (length, count);
+
+                      ENSURE_ALLOCATION (n);
+                    }
+
+                  /* Append the result.  */
+                  memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+                  if (tmp != tmpbuf)
+                    free (tmp);
+                  length += count;
+                }
+              }
+#endif
+            else
+              {
+                arg_type type = a.arg[dp->arg_index].type;
+                int flags = dp->flags;
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+                int has_width;
+                size_t width;
+#endif
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION
+                int has_precision;
+                size_t precision;
+#endif
+#if NEED_PRINTF_UNBOUNDED_PRECISION
+                int prec_ourselves;
+#else
+#               define prec_ourselves 0
+#endif
+#if NEED_PRINTF_FLAG_LEFTADJUST
+#               define pad_ourselves 1
+#elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+                int pad_ourselves;
+#else
+#               define pad_ourselves 0
+#endif
+                TCHAR_T *fbp;
+                unsigned int prefix_count;
+                int prefixes[2] IF_LINT (= { 0 });
+                int orig_errno;
+#if !USE_SNPRINTF
+                size_t tmp_length;
+                TCHAR_T tmpbuf[700];
+                TCHAR_T *tmp;
+#endif
+
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+                has_width = 0;
+                width = 0;
+                if (dp->width_start != dp->width_end)
+                  {
+                    if (dp->width_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->width_arg_index].a.a_int;
+                        if (arg < 0)
+                          {
+                            /* "A negative field width is taken as a '-' flag
+                                followed by a positive field width."  */
+                            flags |= FLAG_LEFT;
+                            width = (unsigned int) (-arg);
+                          }
+                        else
+                          width = arg;
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->width_start;
+
+                        do
+                          width = xsum (xtimes (width, 10), *digitp++ - '0');
+                        while (digitp != dp->width_end);
+                      }
+                    has_width = 1;
+                  }
+#endif
+
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION
+                has_precision = 0;
+                precision = 6;
+                if (dp->precision_start != dp->precision_end)
+                  {
+                    if (dp->precision_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->precision_arg_index].a.a_int;
+                        /* "A negative precision is taken as if the precision
+                            were omitted."  */
+                        if (arg >= 0)
+                          {
+                            precision = arg;
+                            has_precision = 1;
+                          }
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->precision_start + 1;
+
+                        precision = 0;
+                        while (digitp != dp->precision_end)
+                          precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+                        has_precision = 1;
+                      }
+                  }
+#endif
+
+                /* Decide whether to handle the precision ourselves.  */
+#if NEED_PRINTF_UNBOUNDED_PRECISION
+                switch (dp->conversion)
+                  {
+                  case 'd': case 'i': case 'u':
+                  case 'o':
+                  case 'x': case 'X': case 'p':
+                    prec_ourselves = has_precision && (precision > 0);
+                    break;
+                  default:
+                    prec_ourselves = 0;
+                    break;
+                  }
+#endif
+
+                /* Decide whether to perform the padding ourselves.  */
+#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION)
+                switch (dp->conversion)
+                  {
+# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
+                  /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need
+                     to perform the padding after this conversion.  Functions
+                     with unistdio extensions perform the padding based on
+                     character count rather than element count.  */
+                  case 'c': case 's':
+# endif
+# if NEED_PRINTF_FLAG_ZERO
+                  case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+                  case 'a': case 'A':
+# endif
+                    pad_ourselves = 1;
+                    break;
+                  default:
+                    pad_ourselves = prec_ourselves;
+                    break;
+                  }
+#endif
+
+#if !USE_SNPRINTF
+                /* Allocate a temporary buffer of sufficient size for calling
+                   sprintf.  */
+                tmp_length =
+                  MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type,
+                                   flags, width, has_precision, precision,
+                                   pad_ourselves);
+
+                if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T))
+                  tmp = tmpbuf;
+                else
+                  {
+                    size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T));
+
+                    if (size_overflow_p (tmp_memsize))
+                      /* Overflow, would lead to out of memory.  */
+                      goto out_of_memory;
+                    tmp = (TCHAR_T *) malloc (tmp_memsize);
+                    if (tmp == NULL)
+                      /* Out of memory.  */
+                      goto out_of_memory;
+                  }
+#endif
+
+                /* Construct the format string for calling snprintf or
+                   sprintf.  */
+                fbp = buf;
+                *fbp++ = '%';
+#if NEED_PRINTF_FLAG_GROUPING
+                /* The underlying implementation doesn't support the ' flag.
+                   Produce no grouping characters in this case; this is
+                   acceptable because the grouping is locale dependent.  */
+#else
+                if (flags & FLAG_GROUP)
+                  *fbp++ = '\'';
+#endif
+                if (flags & FLAG_LEFT)
+                  *fbp++ = '-';
+                if (flags & FLAG_SHOWSIGN)
+                  *fbp++ = '+';
+                if (flags & FLAG_SPACE)
+                  *fbp++ = ' ';
+                if (flags & FLAG_ALT)
+                  *fbp++ = '#';
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
+                if (flags & FLAG_LOCALIZED)
+                  *fbp++ = 'I';
+#endif
+                if (!pad_ourselves)
+                  {
+                    if (flags & FLAG_ZERO)
+                      *fbp++ = '0';
+                    if (dp->width_start != dp->width_end)
+                      {
+                        size_t n = dp->width_end - dp->width_start;
+                        /* The width specification is known to consist only
+                           of standard ASCII characters.  */
+                        if (sizeof (FCHAR_T) == sizeof (TCHAR_T))
+                          {
+                            memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T));
+                            fbp += n;
+                          }
+                        else
+                          {
+                            const FCHAR_T *mp = dp->width_start;
+                            do
+                              *fbp++ = (unsigned char) *mp++;
+                            while (--n > 0);
+                          }
+                      }
+                  }
+                if (!prec_ourselves)
+                  {
+                    if (dp->precision_start != dp->precision_end)
+                      {
+                        size_t n = dp->precision_end - dp->precision_start;
+                        /* The precision specification is known to consist only
+                           of standard ASCII characters.  */
+                        if (sizeof (FCHAR_T) == sizeof (TCHAR_T))
+                          {
+                            memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T));
+                            fbp += n;
+                          }
+                        else
+                          {
+                            const FCHAR_T *mp = dp->precision_start;
+                            do
+                              *fbp++ = (unsigned char) *mp++;
+                            while (--n > 0);
+                          }
+                      }
+                  }
+
+                switch (type)
+                  {
+#if HAVE_LONG_LONG_INT
+                  case TYPE_LONGLONGINT:
+                  case TYPE_ULONGLONGINT:
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+                    *fbp++ = 'I';
+                    *fbp++ = '6';
+                    *fbp++ = '4';
+                    break;
+# else
+                    *fbp++ = 'l';
+                    /*FALLTHROUGH*/
+# endif
+#endif
+                  case TYPE_LONGINT:
+                  case TYPE_ULONGINT:
+#if HAVE_WINT_T
+                  case TYPE_WIDE_CHAR:
+#endif
+#if HAVE_WCHAR_T
+                  case TYPE_WIDE_STRING:
+#endif
+                    *fbp++ = 'l';
+                    break;
+                  case TYPE_LONGDOUBLE:
+                    *fbp++ = 'L';
+                    break;
+                  default:
+                    break;
+                  }
+#if NEED_PRINTF_DIRECTIVE_F
+                if (dp->conversion == 'F')
+                  *fbp = 'f';
+                else
+#endif
+                  *fbp = dp->conversion;
+#if USE_SNPRINTF
+# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+                fbp[1] = '%';
+                fbp[2] = 'n';
+                fbp[3] = '\0';
+# else
+                /* On glibc2 systems from glibc >= 2.3 - probably also older
+                   ones - we know that snprintf's return value conforms to
+                   ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and
+                   gl_SNPRINTF_TRUNCATION_C99 pass.
+                   Therefore we can avoid using %n in this situation.
+                   On glibc2 systems from 2004-10-18 or newer, the use of %n
+                   in format strings in writable memory may crash the program
+                   (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
+                   in this situation.  */
+                /* On native Win32 systems (such as mingw), we can avoid using
+                   %n because:
+                     - Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
+                       snprintf does not write more than the specified number
+                       of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes
+                       '4', '5', '6' into buf, not '4', '5', '\0'.)
+                     - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf
+                       allows us to recognize the case of an insufficient
+                       buffer size: it returns -1 in this case.
+                   On native Win32 systems (such as mingw) where the OS is
+                   Windows Vista, the use of %n in format strings by default
+                   crashes the program. See
+                     <http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
+                     <http://msdn2.microsoft.com/en-us/library/ms175782(VS.80).aspx>
+                   So we should avoid %n in this situation.  */
+                fbp[1] = '\0';
+# endif
+#else
+                fbp[1] = '\0';
+#endif
+
+                /* Construct the arguments for calling snprintf or sprintf.  */
+                prefix_count = 0;
+                if (!pad_ourselves && dp->width_arg_index != ARG_NONE)
+                  {
+                    if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                      abort ();
+                    prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
+                  }
+                if (!prec_ourselves && dp->precision_arg_index != ARG_NONE)
+                  {
+                    if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                      abort ();
+                    prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
+                  }
+
+#if USE_SNPRINTF
+                /* The SNPRINTF result is appended after result[0..length].
+                   The latter is an array of DCHAR_T; SNPRINTF appends an
+                   array of TCHAR_T to it.  This is possible because
+                   sizeof (TCHAR_T) divides sizeof (DCHAR_T) and
+                   alignof (TCHAR_T) <= alignof (DCHAR_T).  */
+# define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T))
+                /* Ensure that maxlen below will be >= 2.  Needed on BeOS,
+                   where an snprintf() with maxlen==1 acts like sprintf().  */
+                ENSURE_ALLOCATION (xsum (length,
+                                         (2 + TCHARS_PER_DCHAR - 1)
+                                         / TCHARS_PER_DCHAR));
+                /* Prepare checking whether snprintf returns the count
+                   via %n.  */
+                *(TCHAR_T *) (result + length) = '\0';
+#endif
+
+                orig_errno = errno;
+
+                for (;;)
+                  {
+                    int count = -1;
+
+#if USE_SNPRINTF
+                    int retcount = 0;
+                    size_t maxlen = allocated - length;
+                    /* SNPRINTF can fail if its second argument is
+                       > INT_MAX.  */
+                    if (maxlen > INT_MAX / TCHARS_PER_DCHAR)
+                      maxlen = INT_MAX / TCHARS_PER_DCHAR;
+                    maxlen = maxlen * TCHARS_PER_DCHAR;
+# define SNPRINTF_BUF(arg) \
+                    switch (prefix_count)                                   \
+                      {                                                     \
+                      case 0:                                               \
+                        retcount = SNPRINTF ((TCHAR_T *) (result + length), \
+                                             maxlen, buf,                   \
+                                             arg, &count);                  \
+                        break;                                              \
+                      case 1:                                               \
+                        retcount = SNPRINTF ((TCHAR_T *) (result + length), \
+                                             maxlen, buf,                   \
+                                             prefixes[0], arg, &count);     \
+                        break;                                              \
+                      case 2:                                               \
+                        retcount = SNPRINTF ((TCHAR_T *) (result + length), \
+                                             maxlen, buf,                   \
+                                             prefixes[0], prefixes[1], arg, \
+                                             &count);                       \
+                        break;                                              \
+                      default:                                              \
+                        abort ();                                           \
+                      }
+#else
+# define SNPRINTF_BUF(arg) \
+                    switch (prefix_count)                                   \
+                      {                                                     \
+                      case 0:                                               \
+                        count = sprintf (tmp, buf, arg);                    \
+                        break;                                              \
+                      case 1:                                               \
+                        count = sprintf (tmp, buf, prefixes[0], arg);       \
+                        break;                                              \
+                      case 2:                                               \
+                        count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
+                                         arg);                              \
+                        break;                                              \
+                      default:                                              \
+                        abort ();                                           \
+                      }
+#endif
+
+                    errno = 0;
+                    switch (type)
+                      {
+                      case TYPE_SCHAR:
+                        {
+                          int arg = a.arg[dp->arg_index].a.a_schar;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_UCHAR:
+                        {
+                          unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_SHORT:
+                        {
+                          int arg = a.arg[dp->arg_index].a.a_short;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_USHORT:
+                        {
+                          unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_INT:
+                        {
+                          int arg = a.arg[dp->arg_index].a.a_int;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_UINT:
+                        {
+                          unsigned int arg = a.arg[dp->arg_index].a.a_uint;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_LONGINT:
+                        {
+                          long int arg = a.arg[dp->arg_index].a.a_longint;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_ULONGINT:
+                        {
+                          unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+#if HAVE_LONG_LONG_INT
+                      case TYPE_LONGLONGINT:
+                        {
+                          long long int arg = a.arg[dp->arg_index].a.a_longlongint;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_ULONGLONGINT:
+                        {
+                          unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+#endif
+                      case TYPE_DOUBLE:
+                        {
+                          double arg = a.arg[dp->arg_index].a.a_double;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_LONGDOUBLE:
+                        {
+                          long double arg = a.arg[dp->arg_index].a.a_longdouble;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_CHAR:
+                        {
+                          int arg = a.arg[dp->arg_index].a.a_char;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+#if HAVE_WINT_T
+                      case TYPE_WIDE_CHAR:
+                        {
+                          wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+#endif
+                      case TYPE_STRING:
+                        {
+                          const char *arg = a.arg[dp->arg_index].a.a_string;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+#if HAVE_WCHAR_T
+                      case TYPE_WIDE_STRING:
+                        {
+                          const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+#endif
+                      case TYPE_POINTER:
+                        {
+                          void *arg = a.arg[dp->arg_index].a.a_pointer;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      default:
+                        abort ();
+                      }
+
+#if USE_SNPRINTF
+                    /* Portability: Not all implementations of snprintf()
+                       are ISO C 99 compliant.  Determine the number of
+                       bytes that snprintf() has produced or would have
+                       produced.  */
+                    if (count >= 0)
+                      {
+                        /* Verify that snprintf() has NUL-terminated its
+                           result.  */
+                        if (count < maxlen
+                            && ((TCHAR_T *) (result + length)) [count] != '\0')
+                          abort ();
+                        /* Portability hack.  */
+                        if (retcount > count)
+                          count = retcount;
+                      }
+                    else
+                      {
+                        /* snprintf() doesn't understand the '%n'
+                           directive.  */
+                        if (fbp[1] != '\0')
+                          {
+                            /* Don't use the '%n' directive; instead, look
+                               at the snprintf() return value.  */
+                            fbp[1] = '\0';
+                            continue;
+                          }
+                        else
+                          {
+                            /* Look at the snprintf() return value.  */
+                            if (retcount < 0)
+                              {
+# if !HAVE_SNPRINTF_RETVAL_C99
+                                /* HP-UX 10.20 snprintf() is doubly deficient:
+                                   It doesn't understand the '%n' directive,
+                                   *and* it returns -1 (rather than the length
+                                   that would have been required) when the
+                                   buffer is too small.
+                                   But a failure at this point can also come
+                                   from other reasons than a too small buffer,
+                                   such as an invalid wide string argument to
+                                   the %ls directive, or possibly an invalid
+                                   floating-point argument.  */
+                                size_t tmp_length =
+                                  MAX_ROOM_NEEDED (&a, dp->arg_index,
+                                                   dp->conversion, type, flags,
+                                                   width, has_precision,
+                                                   precision, pad_ourselves);
+
+                                if (maxlen < tmp_length)
+                                  {
+                                    /* Make more room.  But try to do through
+                                       this reallocation only once.  */
+                                    size_t bigger_need =
+                                      xsum (length,
+                                            xsum (tmp_length,
+                                                  TCHARS_PER_DCHAR - 1)
+                                            / TCHARS_PER_DCHAR);
+                                    /* And always grow proportionally.
+                                       (There may be several arguments, each
+                                       needing a little more room than the
+                                       previous one.)  */
+                                    size_t bigger_need2 =
+                                      xsum (xtimes (allocated, 2), 12);
+                                    if (bigger_need < bigger_need2)
+                                      bigger_need = bigger_need2;
+                                    ENSURE_ALLOCATION (bigger_need);
+                                    continue;
+                                  }
+# endif
+                              }
+                            else
+                              count = retcount;
+                          }
+                      }
+#endif
+
+                    /* Attempt to handle failure.  */
+                    if (count < 0)
+                      {
+                        /* SNPRINTF or sprintf failed.  Save and use the errno
+                           that it has set, if any.  */
+                        int saved_errno = errno;
+
+                        if (!(result == resultbuf || result == NULL))
+                          free (result);
+                        if (buf_malloced != NULL)
+                          free (buf_malloced);
+                        CLEANUP ();
+                        errno =
+                          (saved_errno != 0
+                           ? saved_errno
+                           : (dp->conversion == 'c' || dp->conversion == 's'
+                              ? EILSEQ
+                              : EINVAL));
+                        return NULL;
+                      }
+
+#if USE_SNPRINTF
+                    /* Handle overflow of the allocated buffer.
+                       If such an overflow occurs, a C99 compliant snprintf()
+                       returns a count >= maxlen.  However, a non-compliant
+                       snprintf() function returns only count = maxlen - 1.  To
+                       cover both cases, test whether count >= maxlen - 1.  */
+                    if ((unsigned int) count + 1 >= maxlen)
+                      {
+                        /* If maxlen already has attained its allowed maximum,
+                           allocating more memory will not increase maxlen.
+                           Instead of looping, bail out.  */
+                        if (maxlen == INT_MAX / TCHARS_PER_DCHAR)
+                          goto overflow;
+                        else
+                          {
+                            /* Need at least (count + 1) * sizeof (TCHAR_T)
+                               bytes.  (The +1 is for the trailing NUL.)
+                               But ask for (count + 2) * sizeof (TCHAR_T)
+                               bytes, so that in the next round, we likely get
+                                 maxlen > (unsigned int) count + 1
+                               and so we don't get here again.
+                               And allocate proportionally, to avoid looping
+                               eternally if snprintf() reports a too small
+                               count.  */
+                            size_t n =
+                              xmax (xsum (length,
+                                          ((unsigned int) count + 2
+                                           + TCHARS_PER_DCHAR - 1)
+                                          / TCHARS_PER_DCHAR),
+                                    xtimes (allocated, 2));
+
+                            ENSURE_ALLOCATION (n);
+                            continue;
+                          }
+                      }
+#endif
+
+#if NEED_PRINTF_UNBOUNDED_PRECISION
+                    if (prec_ourselves)
+                      {
+                        /* Handle the precision.  */
+                        TCHAR_T *prec_ptr =
+# if USE_SNPRINTF
+                          (TCHAR_T *) (result + length);
+# else
+                          tmp;
+# endif
+                        size_t prefix_count;
+                        size_t move;
+
+                        prefix_count = 0;
+                        /* Put the additional zeroes after the sign.  */
+                        if (count >= 1
+                            && (*prec_ptr == '-' || *prec_ptr == '+'
+                                || *prec_ptr == ' '))
+                          prefix_count = 1;
+                        /* Put the additional zeroes after the 0x prefix if
+                           (flags & FLAG_ALT) || (dp->conversion == 'p').  */
+                        else if (count >= 2
+                                 && prec_ptr[0] == '0'
+                                 && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X'))
+                          prefix_count = 2;
+
+                        move = count - prefix_count;
+                        if (precision > move)
+                          {
+                            /* Insert zeroes.  */
+                            size_t insert = precision - move;
+                            TCHAR_T *prec_end;
+
+# if USE_SNPRINTF
+                            size_t n =
+                              xsum (length,
+                                    (count + insert + TCHARS_PER_DCHAR - 1)
+                                    / TCHARS_PER_DCHAR);
+                            length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR;
+                            ENSURE_ALLOCATION (n);
+                            length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR;
+                            prec_ptr = (TCHAR_T *) (result + length);
+# endif
+
+                            prec_end = prec_ptr + count;
+                            prec_ptr += prefix_count;
+
+                            while (prec_end > prec_ptr)
+                              {
+                                prec_end--;
+                                prec_end[insert] = prec_end[0];
+                              }
+
+                            prec_end += insert;
+                            do
+                              *--prec_end = '0';
+                            while (prec_end > prec_ptr);
+
+                            count += insert;
+                          }
+                      }
+#endif
+
+#if !USE_SNPRINTF
+                    if (count >= tmp_length)
+                      /* tmp_length was incorrectly calculated - fix the
+                         code above!  */
+                      abort ();
+#endif
+
+#if !DCHAR_IS_TCHAR
+                    /* Convert from TCHAR_T[] to DCHAR_T[].  */
+                    if (dp->conversion == 'c' || dp->conversion == 's')
+                      {
+                        /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING
+                           TYPE_WIDE_STRING.
+                           The result string is not certainly ASCII.  */
+                        const TCHAR_T *tmpsrc;
+                        DCHAR_T *tmpdst;
+                        size_t tmpdst_len;
+                        /* This code assumes that TCHAR_T is 'char'.  */
+                        verify (sizeof (TCHAR_T) == 1);
+# if USE_SNPRINTF
+                        tmpsrc = (TCHAR_T *) (result + length);
+# else
+                        tmpsrc = tmp;
+# endif
+                        tmpdst =
+                          DCHAR_CONV_FROM_ENCODING (locale_charset (),
+                                                    iconveh_question_mark,
+                                                    tmpsrc, count,
+                                                    NULL,
+                                                    NULL, &tmpdst_len);
+                        if (tmpdst == NULL)
+                          {
+                            int saved_errno = errno;
+                            if (!(result == resultbuf || result == NULL))
+                              free (result);
+                            if (buf_malloced != NULL)
+                              free (buf_malloced);
+                            CLEANUP ();
+                            errno = saved_errno;
+                            return NULL;
+                          }
+                        ENSURE_ALLOCATION (xsum (length, tmpdst_len));
+                        DCHAR_CPY (result + length, tmpdst, tmpdst_len);
+                        free (tmpdst);
+                        count = tmpdst_len;
+                      }
+                    else
+                      {
+                        /* The result string is ASCII.
+                           Simple 1:1 conversion.  */
+# if USE_SNPRINTF
+                        /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a
+                           no-op conversion, in-place on the array starting
+                           at (result + length).  */
+                        if (sizeof (DCHAR_T) != sizeof (TCHAR_T))
+# endif
+                          {
+                            const TCHAR_T *tmpsrc;
+                            DCHAR_T *tmpdst;
+                            size_t n;
+
+# if USE_SNPRINTF
+                            if (result == resultbuf)
+                              {
+                                tmpsrc = (TCHAR_T *) (result + length);
+                                /* ENSURE_ALLOCATION will not move tmpsrc
+                                   (because it's part of resultbuf).  */
+                                ENSURE_ALLOCATION (xsum (length, count));
+                              }
+                            else
+                              {
+                                /* ENSURE_ALLOCATION will move the array
+                                   (because it uses realloc().  */
+                                ENSURE_ALLOCATION (xsum (length, count));
+                                tmpsrc = (TCHAR_T *) (result + length);
+                              }
+# else
+                            tmpsrc = tmp;
+                            ENSURE_ALLOCATION (xsum (length, count));
+# endif
+                            tmpdst = result + length;
+                            /* Copy backwards, because of overlapping.  */
+                            tmpsrc += count;
+                            tmpdst += count;
+                            for (n = count; n > 0; n--)
+                              *--tmpdst = (unsigned char) *--tmpsrc;
+                          }
+                      }
+#endif
+
+#if DCHAR_IS_TCHAR && !USE_SNPRINTF
+                    /* Make room for the result.  */
+                    if (count > allocated - length)
+                      {
+                        /* Need at least count elements.  But allocate
+                           proportionally.  */
+                        size_t n =
+                          xmax (xsum (length, count), xtimes (allocated, 2));
+
+                        ENSURE_ALLOCATION (n);
+                      }
+#endif
+
+                    /* Here count <= allocated - length.  */
+
+                    /* Perform padding.  */
+#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+                    if (pad_ourselves && has_width)
+                      {
+                        size_t w;
+# if ENABLE_UNISTDIO
+                        /* Outside POSIX, it's preferrable to compare the width
+                           against the number of _characters_ of the converted
+                           value.  */
+                        w = DCHAR_MBSNLEN (result + length, count);
+# else
+                        /* The width is compared against the number of _bytes_
+                           of the converted value, says POSIX.  */
+                        w = count;
+# endif
+                        if (w < width)
+                          {
+                            size_t pad = width - w;
+
+                            /* Make room for the result.  */
+                            if (xsum (count, pad) > allocated - length)
+                              {
+                                /* Need at least count + pad elements.  But
+                                   allocate proportionally.  */
+                                size_t n =
+                                  xmax (xsum3 (length, count, pad),
+                                        xtimes (allocated, 2));
+
+# if USE_SNPRINTF
+                                length += count;
+                                ENSURE_ALLOCATION (n);
+                                length -= count;
+# else
+                                ENSURE_ALLOCATION (n);
+# endif
+                              }
+                            /* Here count + pad <= allocated - length.  */
+
+                            {
+# if !DCHAR_IS_TCHAR || USE_SNPRINTF
+                              DCHAR_T * const rp = result + length;
+# else
+                              DCHAR_T * const rp = tmp;
+# endif
+                              DCHAR_T *p = rp + count;
+                              DCHAR_T *end = p + pad;
+                              DCHAR_T *pad_ptr;
+# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
+                              if (dp->conversion == 'c'
+                                  || dp->conversion == 's')
+                                /* No zero-padding for string directives.  */
+                                pad_ptr = NULL;
+                              else
+# endif
+                                {
+                                  pad_ptr = (*rp == '-' ? rp + 1 : rp);
+                                  /* No zero-padding of "inf" and "nan".  */
+                                  if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z')
+                                      || (*pad_ptr >= 'a' && *pad_ptr <= 'z'))
+                                    pad_ptr = NULL;
+                                }
+                              /* The generated string now extends from rp to p,
+                                 with the zero padding insertion point being at
+                                 pad_ptr.  */
+
+                              count = count + pad; /* = end - rp */
+
+                              if (flags & FLAG_LEFT)
+                                {
+                                  /* Pad with spaces on the right.  */
+                                  for (; pad > 0; pad--)
+                                    *p++ = ' ';
+                                }
+                              else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+                                {
+                                  /* Pad with zeroes.  */
+                                  DCHAR_T *q = end;
+
+                                  while (p > pad_ptr)
+                                    *--q = *--p;
+                                  for (; pad > 0; pad--)
+                                    *p++ = '0';
+                                }
+                              else
+                                {
+                                  /* Pad with spaces on the left.  */
+                                  DCHAR_T *q = end;
+
+                                  while (p > rp)
+                                    *--q = *--p;
+                                  for (; pad > 0; pad--)
+                                    *p++ = ' ';
+                                }
+                            }
+                          }
+                      }
+#endif
+
+                    /* Here still count <= allocated - length.  */
+
+#if !DCHAR_IS_TCHAR || USE_SNPRINTF
+                    /* The snprintf() result did fit.  */
+#else
+                    /* Append the sprintf() result.  */
+                    memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+#endif
+#if !USE_SNPRINTF
+                    if (tmp != tmpbuf)
+                      free (tmp);
+#endif
+
+#if NEED_PRINTF_DIRECTIVE_F
+                    if (dp->conversion == 'F')
+                      {
+                        /* Convert the %f result to upper case for %F.  */
+                        DCHAR_T *rp = result + length;
+                        size_t rc;
+                        for (rc = count; rc > 0; rc--, rp++)
+                          if (*rp >= 'a' && *rp <= 'z')
+                            *rp = *rp - 'a' + 'A';
+                      }
+#endif
+
+                    length += count;
+                    break;
+                  }
+                errno = orig_errno;
+#undef pad_ourselves
+#undef prec_ourselves
+              }
+          }
+      }
+
+    /* Add the final NUL.  */
+    ENSURE_ALLOCATION (xsum (length, 1));
+    result[length] = '\0';
+
+    if (result != resultbuf && length + 1 < allocated)
+      {
+        /* Shrink the allocated memory if possible.  */
+        DCHAR_T *memory;
+
+        memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T));
+        if (memory != NULL)
+          result = memory;
+      }
+
+    if (buf_malloced != NULL)
+      free (buf_malloced);
+    CLEANUP ();
+    *lengthp = length;
+    /* Note that we can produce a big string of a length > INT_MAX.  POSIX
+       says that snprintf() fails with errno = EOVERFLOW in this case, but
+       that's only because snprintf() returns an 'int'.  This function does
+       not have this limitation.  */
+    return result;
+
+#if USE_SNPRINTF
+  overflow:
+    if (!(result == resultbuf || result == NULL))
+      free (result);
+    if (buf_malloced != NULL)
+      free (buf_malloced);
+    CLEANUP ();
+    errno = EOVERFLOW;
+    return NULL;
+#endif
+
+  out_of_memory:
+    if (!(result == resultbuf || result == NULL))
+      free (result);
+    if (buf_malloced != NULL)
+      free (buf_malloced);
+  out_of_memory_1:
+    CLEANUP ();
+    errno = ENOMEM;
+    return NULL;
+  }
+}
+
+#undef MAX_ROOM_NEEDED
+#undef TCHARS_PER_DCHAR
+#undef SNPRINTF
+#undef USE_SNPRINTF
+#undef DCHAR_SET
+#undef DCHAR_CPY
+#undef PRINTF_PARSE
+#undef DIRECTIVES
+#undef DIRECTIVE
+#undef DCHAR_IS_TCHAR
+#undef TCHAR_T
+#undef DCHAR_T
+#undef FCHAR_T
+#undef VASNPRINTF
diff --git a/gnulib/lib/vasnprintf.h b/gnulib/lib/vasnprintf.h
new file mode 100644 (file)
index 0000000..c9f4c21
--- /dev/null
@@ -0,0 +1,80 @@
+/* vsprintf with automatic memory allocation.
+   Copyright (C) 2002-2004, 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _VASNPRINTF_H
+#define _VASNPRINTF_H
+
+/* Get va_list.  */
+#include <stdarg.h>
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The __-protected variants of the attributes 'format' and 'printf' are
+   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
+   gnulib and libintl do '#define printf __printf__' when they override
+   the 'printf' function.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#else
+# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Write formatted output to a string dynamically allocated with malloc().
+   You can pass a preallocated buffer for the result in RESULTBUF and its
+   size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
+   If successful, return the address of the string (this may be = RESULTBUF
+   if no dynamic memory allocation was necessary) and set *LENGTHP to the
+   number of resulting bytes, excluding the trailing NUL.  Upon error, set
+   errno and return NULL.
+
+   When dynamic memory allocation occurs, the preallocated buffer is left
+   alone (with possibly modified contents).  This makes it possible to use
+   a statically allocated or stack-allocated buffer, like this:
+
+          char buf[100];
+          size_t len = sizeof (buf);
+          char *output = vasnprintf (buf, &len, format, args);
+          if (output == NULL)
+            ... error handling ...;
+          else
+            {
+              ... use the output string ...;
+              if (output != buf)
+                free (output);
+            }
+  */
+#if REPLACE_VASNPRINTF
+# define asnprintf rpl_asnprintf
+# define vasnprintf rpl_vasnprintf
+#endif
+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+       _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4));
+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
+       _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _VASNPRINTF_H */
diff --git a/gnulib/lib/verify.h b/gnulib/lib/verify.h
new file mode 100644 (file)
index 0000000..5e91abd
--- /dev/null
@@ -0,0 +1,163 @@
+/* Compile-time assert-like macros.
+
+   Copyright (C) 2005-2006, 2009-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 Paul Eggert, Bruno Haible, and Jim Meyering.  */
+
+#ifndef VERIFY_H
+# define VERIFY_H 1
+
+/* Each of these macros verifies that its argument R is nonzero.  To
+   be portable, R should be an integer constant expression.  Unlike
+   assert (R), there is no run-time overhead.
+
+   There are two macros, since no single macro can be used in all
+   contexts in C.  verify_true (R) is for scalar contexts, including
+   integer constant expression contexts.  verify (R) is for declaration
+   contexts, e.g., the top level.
+
+   Symbols ending in "__" are private to this header.
+
+   The code below uses several ideas.
+
+   * The first step is ((R) ? 1 : -1).  Given an expression R, of
+     integral or boolean or floating-point type, this yields an
+     expression of integral type, whose value is later verified to be
+     constant and nonnegative.
+
+   * Next this expression W is wrapped in a type
+     struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
+     If W is negative, this yields a compile-time error.  No compiler can
+     deal with a bit-field of negative size.
+
+     One might think that an array size check would have the same
+     effect, that is, that the type struct { unsigned int dummy[W]; }
+     would work as well.  However, inside a function, some compilers
+     (such as C++ compilers and GNU C) allow local parameters and
+     variables inside array size expressions.  With these compilers,
+     an array size check would not properly diagnose this misuse of
+     the verify macro:
+
+       void function (int n) { verify (n < 0); }
+
+   * For the verify macro, the struct verify_type__ will need to
+     somehow be embedded into a declaration.  To be portable, this
+     declaration must declare an object, a constant, a function, or a
+     typedef name.  If the declared entity uses the type directly,
+     such as in
+
+       struct dummy {...};
+       typedef struct {...} dummy;
+       extern struct {...} *dummy;
+       extern void dummy (struct {...} *);
+       extern struct {...} *dummy (void);
+
+     two uses of the verify macro would yield colliding declarations
+     if the entity names are not disambiguated.  A workaround is to
+     attach the current line number to the entity name:
+
+       #define _GL_CONCAT0(x, y) x##y
+       #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
+       extern struct {...} * _GL_CONCAT (dummy, __LINE__);
+
+     But this has the problem that two invocations of verify from
+     within the same macro would collide, since the __LINE__ value
+     would be the same for both invocations.  (The GCC __COUNTER__
+     macro solves this problem, but is not portable.)
+
+     A solution is to use the sizeof operator.  It yields a number,
+     getting rid of the identity of the type.  Declarations like
+
+       extern int dummy [sizeof (struct {...})];
+       extern void dummy (int [sizeof (struct {...})]);
+       extern int (*dummy (void)) [sizeof (struct {...})];
+
+     can be repeated.
+
+   * Should the implementation use a named struct or an unnamed struct?
+     Which of the following alternatives can be used?
+
+       extern int dummy [sizeof (struct {...})];
+       extern int dummy [sizeof (struct verify_type__ {...})];
+       extern void dummy (int [sizeof (struct {...})]);
+       extern void dummy (int [sizeof (struct verify_type__ {...})]);
+       extern int (*dummy (void)) [sizeof (struct {...})];
+       extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
+
+     In the second and sixth case, the struct type is exported to the
+     outer scope; two such declarations therefore collide.  GCC warns
+     about the first, third, and fourth cases.  So the only remaining
+     possibility is the fifth case:
+
+       extern int (*dummy (void)) [sizeof (struct {...})];
+
+   * GCC warns about duplicate declarations of the dummy function if
+     -Wredundant_decls is used.  GCC 4.3 and later have a builtin
+     __COUNTER__ macro that can let us generate unique identifiers for
+     each dummy function, to suppress this warning.
+
+   * This implementation exploits the fact that GCC does not warn about
+     the last declaration mentioned above.  If a future version of GCC
+     introduces a warning for this, the problem could be worked around
+     by using code specialized to GCC, just as __COUNTER__ is already
+     being used if available.
+
+       #if 4 <= __GNUC__
+       # define verify(R) [another version to keep GCC happy]
+       #endif
+
+   * In C++, any struct definition inside sizeof is invalid.
+     Use a template type to work around the problem.  */
+
+/* Concatenate two preprocessor tokens.  */
+# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
+# define _GL_CONCAT0(x, y) x##y
+
+/* _GL_COUNTER is an integer, preferably one that changes each time we
+   use it.  Use __COUNTER__ if it works, falling back on __LINE__
+   otherwise.  __LINE__ isn't perfect, but it's better than a
+   constant.  */
+# if defined __COUNTER__ && __COUNTER__ != __COUNTER__
+#  define _GL_COUNTER __COUNTER__
+# else
+#  define _GL_COUNTER __LINE__
+# endif
+
+/* Generate a symbol with the given prefix, making it unique if
+   possible.  */
+# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
+
+/* Verify requirement R at compile-time, as an integer constant expression.
+   Return 1.  */
+
+# ifdef __cplusplus
+template <int w>
+  struct verify_type__ { unsigned int verify_error_if_negative_size__: w; };
+#  define verify_true(R) \
+     (!!sizeof (verify_type__<(R) ? 1 : -1>))
+# else
+#  define verify_true(R) \
+     (!!sizeof \
+      (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
+# endif
+
+/* Verify requirement R at compile-time, as a declaration without a
+   trailing ';'.  */
+
+# define verify(R) \
+    extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)]
+
+#endif
diff --git a/gnulib/lib/version-etc-fsf.c b/gnulib/lib/version-etc-fsf.c
new file mode 100644 (file)
index 0000000..c821583
--- /dev/null
@@ -0,0 +1,30 @@
+/* Variable with FSF copyright information, for version-etc.
+   Copyright (C) 1999-2006, 2009-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 Jim Meyering. */
+
+#include <config.h>
+
+/* Specification.  */
+#include "version-etc.h"
+
+/* Default copyright goes to the FSF. */
+
+const char version_etc_copyright[] =
+  /* Do *not* mark this string for translation.  %s is a copyright
+     symbol suitable for this locale, and %d is the copyright
+     year.  */
+  "Copyright %s %d Free Software Foundation, Inc.";
diff --git a/gnulib/lib/version-etc.c b/gnulib/lib/version-etc.c
new file mode 100644 (file)
index 0000000..b8d4724
--- /dev/null
@@ -0,0 +1,258 @@
+/* Print --version and bug-reporting information in a consistent format.
+   Copyright (C) 1999-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 Jim Meyering. */
+
+#include <config.h>
+
+/* Specification.  */
+#include "version-etc.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+/* If you use AM_INIT_AUTOMAKE's no-define option,
+   PACKAGE is not defined.  Use PACKAGE_TARNAME instead.  */
+#if ! defined PACKAGE && defined PACKAGE_TARNAME
+# define PACKAGE PACKAGE_TARNAME
+#endif
+
+enum { COPYRIGHT_YEAR = 2011 };
+
+/* The three functions below display the --version information the
+   standard way.
+
+   If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of
+   the program.  The formats are therefore:
+
+   PACKAGE VERSION
+
+   or
+
+   COMMAND_NAME (PACKAGE) VERSION.
+
+   The functions differ in the way they are passed author names. */
+
+/* Display the --version information the standard way.
+
+   Author names are given in the array AUTHORS. N_AUTHORS is the
+   number of elements in the array. */
+void
+version_etc_arn (FILE *stream,
+                 const char *command_name, const char *package,
+                 const char *version,
+                 const char * const * authors, size_t n_authors)
+{
+  if (command_name)
+    fprintf (stream, "%s (%s) %s\n", command_name, package, version);
+  else
+    fprintf (stream, "%s %s\n", package, version);
+
+#ifdef PACKAGE_PACKAGER
+# ifdef PACKAGE_PACKAGER_VERSION
+  fprintf (stream, _("Packaged by %s (%s)\n"), PACKAGE_PACKAGER,
+           PACKAGE_PACKAGER_VERSION);
+# else
+  fprintf (stream, _("Packaged by %s\n"), PACKAGE_PACKAGER);
+# endif
+#endif
+
+  /* TRANSLATORS: Translate "(C)" to the copyright symbol
+     (C-in-a-circle), if this symbol is available in the user's
+     locale.  Otherwise, do not translate "(C)"; leave it as-is.  */
+  fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR);
+
+  fputs (_("\
+\n\
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n\
+This is free software: you are free to change and redistribute it.\n\
+There is NO WARRANTY, to the extent permitted by law.\n\
+\n\
+"),
+         stream);
+
+  switch (n_authors)
+    {
+    case 0:
+      /* The caller must provide at least one author name.  */
+      abort ();
+    case 1:
+      /* TRANSLATORS: %s denotes an author name.  */
+      fprintf (stream, _("Written by %s.\n"), authors[0]);
+      break;
+    case 2:
+      /* TRANSLATORS: Each %s denotes an author name.  */
+      fprintf (stream, _("Written by %s and %s.\n"), authors[0], authors[1]);
+      break;
+    case 3:
+      /* TRANSLATORS: Each %s denotes an author name.  */
+      fprintf (stream, _("Written by %s, %s, and %s.\n"),
+               authors[0], authors[1], authors[2]);
+      break;
+    case 4:
+      /* TRANSLATORS: Each %s denotes an author name.
+         You can use line breaks, estimating that each author name occupies
+         ca. 16 screen columns and that a screen line has ca. 80 columns.  */
+      fprintf (stream, _("Written by %s, %s, %s,\nand %s.\n"),
+               authors[0], authors[1], authors[2], authors[3]);
+      break;
+    case 5:
+      /* TRANSLATORS: Each %s denotes an author name.
+         You can use line breaks, estimating that each author name occupies
+         ca. 16 screen columns and that a screen line has ca. 80 columns.  */
+      fprintf (stream, _("Written by %s, %s, %s,\n%s, and %s.\n"),
+               authors[0], authors[1], authors[2], authors[3], authors[4]);
+      break;
+    case 6:
+      /* TRANSLATORS: Each %s denotes an author name.
+         You can use line breaks, estimating that each author name occupies
+         ca. 16 screen columns and that a screen line has ca. 80 columns.  */
+      fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, and %s.\n"),
+               authors[0], authors[1], authors[2], authors[3], authors[4],
+               authors[5]);
+      break;
+    case 7:
+      /* TRANSLATORS: Each %s denotes an author name.
+         You can use line breaks, estimating that each author name occupies
+         ca. 16 screen columns and that a screen line has ca. 80 columns.  */
+      fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"),
+               authors[0], authors[1], authors[2], authors[3], authors[4],
+               authors[5], authors[6]);
+      break;
+    case 8:
+      /* TRANSLATORS: Each %s denotes an author name.
+         You can use line breaks, estimating that each author name occupies
+         ca. 16 screen columns and that a screen line has ca. 80 columns.  */
+      fprintf (stream, _("\
+Written by %s, %s, %s,\n%s, %s, %s, %s,\nand %s.\n"),
+                authors[0], authors[1], authors[2], authors[3], authors[4],
+                authors[5], authors[6], authors[7]);
+      break;
+    case 9:
+      /* TRANSLATORS: Each %s denotes an author name.
+         You can use line breaks, estimating that each author name occupies
+         ca. 16 screen columns and that a screen line has ca. 80 columns.  */
+      fprintf (stream, _("\
+Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"),
+               authors[0], authors[1], authors[2], authors[3], authors[4],
+               authors[5], authors[6], authors[7], authors[8]);
+      break;
+    default:
+      /* 10 or more authors.  Use an abbreviation, since the human reader
+         will probably not want to read the entire list anyway.  */
+      /* TRANSLATORS: Each %s denotes an author name.
+         You can use line breaks, estimating that each author name occupies
+         ca. 16 screen columns and that a screen line has ca. 80 columns.  */
+      fprintf (stream, _("\
+Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"),
+                authors[0], authors[1], authors[2], authors[3], authors[4],
+                authors[5], authors[6], authors[7], authors[8]);
+      break;
+    }
+}
+
+/* Display the --version information the standard way.  See the initial
+   comment to this module, for more information.
+
+   Author names are given in the NULL-terminated array AUTHORS. */
+void
+version_etc_ar (FILE *stream,
+                const char *command_name, const char *package,
+                const char *version, const char * const * authors)
+{
+  size_t n_authors;
+
+  for (n_authors = 0; authors[n_authors]; n_authors++)
+    ;
+  version_etc_arn (stream, command_name, package, version, authors, n_authors);
+}
+
+/* Display the --version information the standard way.  See the initial
+   comment to this module, for more information.
+
+   Author names are given in the NULL-terminated va_list AUTHORS. */
+void
+version_etc_va (FILE *stream,
+                const char *command_name, const char *package,
+                const char *version, va_list authors)
+{
+  size_t n_authors;
+  const char *authtab[10];
+
+  for (n_authors = 0;
+       n_authors < 10
+         && (authtab[n_authors] = va_arg (authors, const char *)) != NULL;
+       n_authors++)
+    ;
+  version_etc_arn (stream, command_name, package, version,
+                   authtab, n_authors);
+}
+
+
+/* Display the --version information the standard way.
+
+   If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of
+   the program.  The formats are therefore:
+
+   PACKAGE VERSION
+
+   or
+
+   COMMAND_NAME (PACKAGE) VERSION.
+
+   The authors names are passed as separate arguments, with an additional
+   NULL argument at the end.  */
+void
+version_etc (FILE *stream,
+             const char *command_name, const char *package,
+             const char *version, /* const char *author1, ...*/ ...)
+{
+  va_list authors;
+
+  va_start (authors, version);
+  version_etc_va (stream, command_name, package, version, authors);
+  va_end (authors);
+}
+
+void
+emit_bug_reporting_address (void)
+{
+  /* TRANSLATORS: The placeholder indicates the bug-reporting address
+     for this package.  Please add _another line_ saying
+     "Report translation bugs to <...>\n" with the address for translation
+     bugs (typically your translation team's web or email address).  */
+  printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT);
+#ifdef PACKAGE_PACKAGER_BUG_REPORTS
+  printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER,
+          PACKAGE_PACKAGER_BUG_REPORTS);
+#endif
+#ifdef PACKAGE_URL
+  printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+#else
+  printf (_("%s home page: <http://www.gnu.org/software/%s/>\n"),
+          PACKAGE_NAME, PACKAGE);
+#endif
+  fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>\n"),
+         stdout);
+}
diff --git a/gnulib/lib/version-etc.h b/gnulib/lib/version-etc.h
new file mode 100644 (file)
index 0000000..a9b313d
--- /dev/null
@@ -0,0 +1,78 @@
+/* Print --version and bug-reporting information in a consistent format.
+   Copyright (C) 1999, 2003, 2005, 2009-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 Jim Meyering. */
+
+#ifndef VERSION_ETC_H
+# define VERSION_ETC_H 1
+
+# include <stdarg.h>
+# include <stdio.h>
+
+/* The `sentinel' attribute was added in gcc 4.0.  */
+#ifndef _GL_ATTRIBUTE_SENTINEL
+# if 4 <= __GNUC__
+#  define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
+# else
+#  define _GL_ATTRIBUTE_SENTINEL /* empty */
+# endif
+#endif
+
+extern const char version_etc_copyright[];
+
+/* The three functions below display the --version information in the
+   standard way: command and package names, package version, followed
+   by a short GPLv3+ notice and a list of up to 10 author names.
+
+   If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of
+   the program.  The formats are therefore:
+
+   PACKAGE VERSION
+
+   or
+
+   COMMAND_NAME (PACKAGE) VERSION.
+
+   The functions differ in the way they are passed author names: */
+
+/* N_AUTHORS names are supplied in array AUTHORS.  */
+extern void version_etc_arn (FILE *stream,
+                             const char *command_name, const char *package,
+                             const char *version,
+                             const char * const * authors, size_t n_authors);
+
+/* Names are passed in the NULL-terminated array AUTHORS.  */
+extern void version_etc_ar (FILE *stream,
+                            const char *command_name, const char *package,
+                            const char *version, const char * const * authors);
+
+/* Names are passed in the NULL-terminated va_list.  */
+extern void version_etc_va (FILE *stream,
+                            const char *command_name, const char *package,
+                            const char *version, va_list authors);
+
+/* Names are passed as separate arguments, with an additional
+   NULL argument at the end.  */
+extern void version_etc (FILE *stream,
+                         const char *command_name, const char *package,
+                         const char *version,
+                         /* const char *author1, ..., NULL */ ...)
+  _GL_ATTRIBUTE_SENTINEL;
+
+/* Display the usual `Report bugs to' stanza */
+extern void emit_bug_reporting_address (void);
+
+#endif /* VERSION_ETC_H */
diff --git a/gnulib/lib/wchar.in.h b/gnulib/lib/wchar.in.h
new file mode 100644 (file)
index 0000000..ab4c806
--- /dev/null
@@ -0,0 +1,990 @@
+/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
+
+   Copyright (C) 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Eric Blake.  */
+
+/*
+ * ISO C 99 <wchar.h> for platforms that have issues.
+ * <http://www.opengroup.org/susv3xbd/wchar.h.html>
+ *
+ * For now, this just ensures proper prerequisite inclusion order and
+ * the declaration of wcwidth().
+ */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
+/* Special invocation convention:
+   - Inside glibc and uClibc header files.
+   - On HP-UX 11.00 we have a sequence of nested includes
+     <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
+     once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
+     and once directly.  In both situations 'wint_t' is not yet defined,
+     therefore we cannot provide the function overrides; instead include only
+     the system's <wchar.h>.
+   - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
+     the latter includes <wchar.h>.  But here, we have no way to detect whether
+     <wctype.h> is completely included or is still being included.  */
+
+#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _GL_WCHAR_H
+
+#define _GL_ALREADY_INCLUDING_WCHAR_H
+
+#if @HAVE_FEATURES_H@
+# include <features.h> /* for __GLIBC__ */
+#endif
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.
+   But avoid namespace pollution on glibc systems.  */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+
+/* Include the original <wchar.h> if it exists.
+   Some builds of uClibc lack it.  */
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_WCHAR_H@
+# @INCLUDE_NEXT@ @NEXT_WCHAR_H@
+#endif
+
+#undef _GL_ALREADY_INCLUDING_WCHAR_H
+
+#ifndef _GL_WCHAR_H
+#define _GL_WCHAR_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
+/* Define wint_t and WEOF.  (Also done in wctype.in.h.)  */
+#if !@HAVE_WINT_T@ && !defined wint_t
+# define wint_t int
+# ifndef WEOF
+#  define WEOF -1
+# endif
+#else
+# ifndef WEOF
+#  define WEOF ((wint_t) -1)
+# endif
+#endif
+
+
+/* Override mbstate_t if it is too small.
+   On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
+   implementing mbrtowc for encodings like UTF-8.  */
+#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
+# if !GNULIB_defined_mbstate_t
+typedef int rpl_mbstate_t;
+#  undef mbstate_t
+#  define mbstate_t rpl_mbstate_t
+#  define GNULIB_defined_mbstate_t 1
+# endif
+#endif
+
+
+/* Convert a single-byte character to a wide character.  */
+#if @GNULIB_BTOWC@
+# if @REPLACE_BTOWC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef btowc
+#   define btowc rpl_btowc
+#  endif
+_GL_FUNCDECL_RPL (btowc, wint_t, (int c));
+_GL_CXXALIAS_RPL (btowc, wint_t, (int c));
+# else
+#  if !@HAVE_BTOWC@
+_GL_FUNCDECL_SYS (btowc, wint_t, (int c));
+#  endif
+_GL_CXXALIAS_SYS (btowc, wint_t, (int c));
+# endif
+_GL_CXXALIASWARN (btowc);
+#elif defined GNULIB_POSIXCHECK
+# undef btowc
+# if HAVE_RAW_DECL_BTOWC
+_GL_WARN_ON_USE (btowc, "btowc is unportable - "
+                 "use gnulib module btowc for portability");
+# endif
+#endif
+
+
+/* Convert a wide character to a single-byte character.  */
+#if @GNULIB_WCTOB@
+# if @REPLACE_WCTOB@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wctob
+#   define wctob rpl_wctob
+#  endif
+_GL_FUNCDECL_RPL (wctob, int, (wint_t wc));
+_GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
+# else
+#  if !defined wctob && !@HAVE_DECL_WCTOB@
+/* wctob is provided by gnulib, or wctob exists but is not declared.  */
+_GL_FUNCDECL_SYS (wctob, int, (wint_t wc));
+#  endif
+_GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
+# endif
+_GL_CXXALIASWARN (wctob);
+#elif defined GNULIB_POSIXCHECK
+# undef wctob
+# if HAVE_RAW_DECL_WCTOB
+_GL_WARN_ON_USE (wctob, "wctob is unportable - "
+                 "use gnulib module wctob for portability");
+# endif
+#endif
+
+
+/* Test whether *PS is in the initial state.  */
+#if @GNULIB_MBSINIT@
+# if @REPLACE_MBSINIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mbsinit
+#   define mbsinit rpl_mbsinit
+#  endif
+_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps));
+_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps));
+# else
+#  if !@HAVE_MBSINIT@
+_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
+#  endif
+_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (mbsinit);
+#elif defined GNULIB_POSIXCHECK
+# undef mbsinit
+# if HAVE_RAW_DECL_MBSINIT
+_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
+                 "use gnulib module mbsinit for portability");
+# endif
+#endif
+
+
+/* Convert a multibyte character to a wide character.  */
+#if @GNULIB_MBRTOWC@
+# if @REPLACE_MBRTOWC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mbrtowc
+#   define mbrtowc rpl_mbrtowc
+#  endif
+_GL_FUNCDECL_RPL (mbrtowc, size_t,
+                  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+_GL_CXXALIAS_RPL (mbrtowc, size_t,
+                  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+# else
+#  if !@HAVE_MBRTOWC@
+_GL_FUNCDECL_SYS (mbrtowc, size_t,
+                  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+#  endif
+_GL_CXXALIAS_SYS (mbrtowc, size_t,
+                  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (mbrtowc);
+#elif defined GNULIB_POSIXCHECK
+# undef mbrtowc
+# if HAVE_RAW_DECL_MBRTOWC
+_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
+                 "use gnulib module mbrtowc for portability");
+# endif
+#endif
+
+
+/* Recognize a multibyte character.  */
+#if @GNULIB_MBRLEN@
+# if @REPLACE_MBRLEN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mbrlen
+#   define mbrlen rpl_mbrlen
+#  endif
+_GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+_GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+# else
+#  if !@HAVE_MBRLEN@
+_GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+#  endif
+_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (mbrlen);
+#elif defined GNULIB_POSIXCHECK
+# undef mbrlen
+# if HAVE_RAW_DECL_MBRLEN
+_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
+                 "use gnulib module mbrlen for portability");
+# endif
+#endif
+
+
+/* Convert a string to a wide string.  */
+#if @GNULIB_MBSRTOWCS@
+# if @REPLACE_MBSRTOWCS@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mbsrtowcs
+#   define mbsrtowcs rpl_mbsrtowcs
+#  endif
+_GL_FUNCDECL_RPL (mbsrtowcs, size_t,
+                  (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (mbsrtowcs, size_t,
+                  (wchar_t *dest, const char **srcp, size_t len,
+                   mbstate_t *ps));
+# else
+#  if !@HAVE_MBSRTOWCS@
+_GL_FUNCDECL_SYS (mbsrtowcs, size_t,
+                  (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+                  _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (mbsrtowcs, size_t,
+                  (wchar_t *dest, const char **srcp, size_t len,
+                   mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (mbsrtowcs);
+#elif defined GNULIB_POSIXCHECK
+# undef mbsrtowcs
+# if HAVE_RAW_DECL_MBSRTOWCS
+_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
+                 "use gnulib module mbsrtowcs for portability");
+# endif
+#endif
+
+
+/* Convert a string to a wide string.  */
+#if @GNULIB_MBSNRTOWCS@
+# if @REPLACE_MBSNRTOWCS@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mbsnrtowcs
+#   define mbsnrtowcs rpl_mbsnrtowcs
+#  endif
+_GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
+                  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
+                   mbstate_t *ps)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
+                  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
+                   mbstate_t *ps));
+# else
+#  if !@HAVE_MBSNRTOWCS@
+_GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
+                  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
+                   mbstate_t *ps)
+                  _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
+                  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
+                   mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (mbsnrtowcs);
+#elif defined GNULIB_POSIXCHECK
+# undef mbsnrtowcs
+# if HAVE_RAW_DECL_MBSNRTOWCS
+_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
+                 "use gnulib module mbsnrtowcs for portability");
+# endif
+#endif
+
+
+/* Convert a wide character to a multibyte character.  */
+#if @GNULIB_WCRTOMB@
+# if @REPLACE_WCRTOMB@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcrtomb
+#   define wcrtomb rpl_wcrtomb
+#  endif
+_GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+_GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+# else
+#  if !@HAVE_WCRTOMB@
+_GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+#  endif
+_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (wcrtomb);
+#elif defined GNULIB_POSIXCHECK
+# undef wcrtomb
+# if HAVE_RAW_DECL_WCRTOMB
+_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
+                 "use gnulib module wcrtomb for portability");
+# endif
+#endif
+
+
+/* Convert a wide string to a string.  */
+#if @GNULIB_WCSRTOMBS@
+# if @REPLACE_WCSRTOMBS@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcsrtombs
+#   define wcsrtombs rpl_wcsrtombs
+#  endif
+_GL_FUNCDECL_RPL (wcsrtombs, size_t,
+                  (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (wcsrtombs, size_t,
+                  (char *dest, const wchar_t **srcp, size_t len,
+                   mbstate_t *ps));
+# else
+#  if !@HAVE_WCSRTOMBS@
+_GL_FUNCDECL_SYS (wcsrtombs, size_t,
+                  (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
+                  _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (wcsrtombs, size_t,
+                  (char *dest, const wchar_t **srcp, size_t len,
+                   mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (wcsrtombs);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsrtombs
+# if HAVE_RAW_DECL_WCSRTOMBS
+_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
+                 "use gnulib module wcsrtombs for portability");
+# endif
+#endif
+
+
+/* Convert a wide string to a string.  */
+#if @GNULIB_WCSNRTOMBS@
+# if @REPLACE_WCSNRTOMBS@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcsnrtombs
+#   define wcsnrtombs rpl_wcsnrtombs
+#  endif
+_GL_FUNCDECL_RPL (wcsnrtombs, size_t,
+                  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
+                   mbstate_t *ps)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (wcsnrtombs, size_t,
+                  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
+                   mbstate_t *ps));
+# else
+#  if !@HAVE_WCSNRTOMBS@
+_GL_FUNCDECL_SYS (wcsnrtombs, size_t,
+                  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
+                   mbstate_t *ps)
+                  _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (wcsnrtombs, size_t,
+                  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
+                   mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (wcsnrtombs);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsnrtombs
+# if HAVE_RAW_DECL_WCSNRTOMBS
+_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
+                 "use gnulib module wcsnrtombs for portability");
+# endif
+#endif
+
+
+/* Return the number of screen columns needed for WC.  */
+#if @GNULIB_WCWIDTH@
+# if @REPLACE_WCWIDTH@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcwidth
+#   define wcwidth rpl_wcwidth
+#  endif
+_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t));
+_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
+# else
+#  if !@HAVE_DECL_WCWIDTH@
+/* wcwidth exists but is not declared.  */
+_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t));
+#  endif
+_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
+# endif
+_GL_CXXALIASWARN (wcwidth);
+#elif defined GNULIB_POSIXCHECK
+# undef wcwidth
+# if HAVE_RAW_DECL_WCWIDTH
+_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
+                 "use gnulib module wcwidth for portability");
+# endif
+#endif
+
+
+/* Search N wide characters of S for C.  */
+#if @GNULIB_WMEMCHR@
+# if !@HAVE_WMEMCHR@
+_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n));
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" {
+         const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t);
+         wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t);
+       }  */
+_GL_CXXALIAS_SYS_CAST2 (wmemchr,
+                        wchar_t *, (const wchar_t *, wchar_t, size_t),
+                        const wchar_t *, (const wchar_t *, wchar_t, size_t));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
+_GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
+                   (const wchar_t *s, wchar_t c, size_t n));
+# else
+_GL_CXXALIASWARN (wmemchr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wmemchr
+# if HAVE_RAW_DECL_WMEMCHR
+_GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
+                 "use gnulib module wmemchr for portability");
+# endif
+#endif
+
+
+/* Compare N wide characters of S1 and S2.  */
+#if @GNULIB_WMEMCMP@
+# if !@HAVE_WMEMCMP@
+_GL_FUNCDECL_SYS (wmemcmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wmemcmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+_GL_CXXALIASWARN (wmemcmp);
+#elif defined GNULIB_POSIXCHECK
+# undef wmemcmp
+# if HAVE_RAW_DECL_WMEMCMP
+_GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - "
+                 "use gnulib module wmemcmp for portability");
+# endif
+#endif
+
+
+/* Copy N wide characters of SRC to DEST.  */
+#if @GNULIB_WMEMCPY@
+# if !@HAVE_WMEMCPY@
+_GL_FUNCDECL_SYS (wmemcpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wmemcpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+_GL_CXXALIASWARN (wmemcpy);
+#elif defined GNULIB_POSIXCHECK
+# undef wmemcpy
+# if HAVE_RAW_DECL_WMEMCPY
+_GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - "
+                 "use gnulib module wmemcpy for portability");
+# endif
+#endif
+
+
+/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for
+   overlapping memory areas.  */
+#if @GNULIB_WMEMMOVE@
+# if !@HAVE_WMEMMOVE@
+_GL_FUNCDECL_SYS (wmemmove, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wmemmove, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+_GL_CXXALIASWARN (wmemmove);
+#elif defined GNULIB_POSIXCHECK
+# undef wmemmove
+# if HAVE_RAW_DECL_WMEMMOVE
+_GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
+                 "use gnulib module wmemmove for portability");
+# endif
+#endif
+
+
+/* Set N wide characters of S to C.  */
+#if @GNULIB_WMEMSET@
+# if !@HAVE_WMEMSET@
+_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
+_GL_CXXALIASWARN (wmemset);
+#elif defined GNULIB_POSIXCHECK
+# undef wmemset
+# if HAVE_RAW_DECL_WMEMSET
+_GL_WARN_ON_USE (wmemset, "wmemset is unportable - "
+                 "use gnulib module wmemset for portability");
+# endif
+#endif
+
+
+/* Return the number of wide characters in S.  */
+#if @GNULIB_WCSLEN@
+# if !@HAVE_WCSLEN@
+_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s));
+# endif
+_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
+_GL_CXXALIASWARN (wcslen);
+#elif defined GNULIB_POSIXCHECK
+# undef wcslen
+# if HAVE_RAW_DECL_WCSLEN
+_GL_WARN_ON_USE (wcslen, "wcslen is unportable - "
+                 "use gnulib module wcslen for portability");
+# endif
+#endif
+
+
+/* Return the number of wide characters in S, but at most MAXLEN.  */
+#if @GNULIB_WCSNLEN@
+# if !@HAVE_WCSNLEN@
+_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
+# endif
+_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
+_GL_CXXALIASWARN (wcsnlen);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsnlen
+# if HAVE_RAW_DECL_WCSNLEN
+_GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - "
+                 "use gnulib module wcsnlen for portability");
+# endif
+#endif
+
+
+/* Copy SRC to DEST.  */
+#if @GNULIB_WCSCPY@
+# if !@HAVE_WCSCPY@
+_GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+# endif
+_GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_CXXALIASWARN (wcscpy);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscpy
+# if HAVE_RAW_DECL_WCSCPY
+_GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - "
+                 "use gnulib module wcscpy for portability");
+# endif
+#endif
+
+
+/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST.  */
+#if @GNULIB_WCPCPY@
+# if !@HAVE_WCPCPY@
+_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+# endif
+_GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_CXXALIASWARN (wcpcpy);
+#elif defined GNULIB_POSIXCHECK
+# undef wcpcpy
+# if HAVE_RAW_DECL_WCPCPY
+_GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - "
+                 "use gnulib module wcpcpy for portability");
+# endif
+#endif
+
+
+/* Copy no more than N wide characters of SRC to DEST.  */
+#if @GNULIB_WCSNCPY@
+# if !@HAVE_WCSNCPY@
+_GL_FUNCDECL_SYS (wcsncpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wcsncpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+_GL_CXXALIASWARN (wcsncpy);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsncpy
+# if HAVE_RAW_DECL_WCSNCPY
+_GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - "
+                 "use gnulib module wcsncpy for portability");
+# endif
+#endif
+
+
+/* Copy no more than N characters of SRC to DEST, returning the address of
+   the last character written into DEST.  */
+#if @GNULIB_WCPNCPY@
+# if !@HAVE_WCPNCPY@
+_GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wcpncpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+_GL_CXXALIASWARN (wcpncpy);
+#elif defined GNULIB_POSIXCHECK
+# undef wcpncpy
+# if HAVE_RAW_DECL_WCPNCPY
+_GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - "
+                 "use gnulib module wcpncpy for portability");
+# endif
+#endif
+
+
+/* Append SRC onto DEST.  */
+#if @GNULIB_WCSCAT@
+# if !@HAVE_WCSCAT@
+_GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
+# endif
+_GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_CXXALIASWARN (wcscat);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscat
+# if HAVE_RAW_DECL_WCSCAT
+_GL_WARN_ON_USE (wcscat, "wcscat is unportable - "
+                 "use gnulib module wcscat for portability");
+# endif
+#endif
+
+
+/* Append no more than N wide characters of SRC onto DEST.  */
+#if @GNULIB_WCSNCAT@
+# if !@HAVE_WCSNCAT@
+_GL_FUNCDECL_SYS (wcsncat, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wcsncat, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+_GL_CXXALIASWARN (wcsncat);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsncat
+# if HAVE_RAW_DECL_WCSNCAT
+_GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
+                 "use gnulib module wcsncat for portability");
+# endif
+#endif
+
+
+/* Compare S1 and S2.  */
+#if @GNULIB_WCSCMP@
+# if !@HAVE_WCSCMP@
+_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+# endif
+_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+_GL_CXXALIASWARN (wcscmp);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscmp
+# if HAVE_RAW_DECL_WCSCMP
+_GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
+                 "use gnulib module wcscmp for portability");
+# endif
+#endif
+
+
+/* Compare no more than N wide characters of S1 and S2.  */
+#if @GNULIB_WCSNCMP@
+# if !@HAVE_WCSNCMP@
+_GL_FUNCDECL_SYS (wcsncmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wcsncmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+_GL_CXXALIASWARN (wcsncmp);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsncmp
+# if HAVE_RAW_DECL_WCSNCMP
+_GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - "
+                 "use gnulib module wcsncmp for portability");
+# endif
+#endif
+
+
+/* Compare S1 and S2, ignoring case.  */
+#if @GNULIB_WCSCASECMP@
+# if !@HAVE_WCSCASECMP@
+_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
+# endif
+_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
+_GL_CXXALIASWARN (wcscasecmp);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscasecmp
+# if HAVE_RAW_DECL_WCSCASECMP
+_GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - "
+                 "use gnulib module wcscasecmp for portability");
+# endif
+#endif
+
+
+/* Compare no more than N chars of S1 and S2, ignoring case.  */
+#if @GNULIB_WCSNCASECMP@
+# if !@HAVE_WCSNCASECMP@
+_GL_FUNCDECL_SYS (wcsncasecmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wcsncasecmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+_GL_CXXALIASWARN (wcsncasecmp);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsncasecmp
+# if HAVE_RAW_DECL_WCSNCASECMP
+_GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - "
+                 "use gnulib module wcsncasecmp for portability");
+# endif
+#endif
+
+
+/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE
+   category of the current locale.  */
+#if @GNULIB_WCSCOLL@
+# if !@HAVE_WCSCOLL@
+_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
+# endif
+_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
+_GL_CXXALIASWARN (wcscoll);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscoll
+# if HAVE_RAW_DECL_WCSCOLL
+_GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - "
+                 "use gnulib module wcscoll for portability");
+# endif
+#endif
+
+
+/* Transform S2 into array pointed to by S1 such that if wcscmp is applied
+   to two transformed strings the result is the as applying 'wcscoll' to the
+   original strings.  */
+#if @GNULIB_WCSXFRM@
+# if !@HAVE_WCSXFRM@
+_GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
+_GL_CXXALIASWARN (wcsxfrm);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsxfrm
+# if HAVE_RAW_DECL_WCSXFRM
+_GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
+                 "use gnulib module wcsxfrm for portability");
+# endif
+#endif
+
+
+/* Duplicate S, returning an identical malloc'd string.  */
+#if @GNULIB_WCSDUP@
+# if !@HAVE_WCSDUP@
+_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
+# endif
+_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
+_GL_CXXALIASWARN (wcsdup);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsdup
+# if HAVE_RAW_DECL_WCSDUP
+_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - "
+                 "use gnulib module wcsdup for portability");
+# endif
+#endif
+
+
+/* Find the first occurrence of WC in WCS.  */
+#if @GNULIB_WCSCHR@
+# if !@HAVE_WCSCHR@
+_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" {
+         const wchar_t * std::wcschr (const wchar_t *, wchar_t);
+         wchar_t * std::wcschr (wchar_t *, wchar_t);
+       }  */
+_GL_CXXALIAS_SYS_CAST2 (wcschr,
+                        wchar_t *, (const wchar_t *, wchar_t),
+                        const wchar_t *, (const wchar_t *, wchar_t));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
+_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
+# else
+_GL_CXXALIASWARN (wcschr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcschr
+# if HAVE_RAW_DECL_WCSCHR
+_GL_WARN_ON_USE (wcschr, "wcschr is unportable - "
+                 "use gnulib module wcschr for portability");
+# endif
+#endif
+
+
+/* Find the last occurrence of WC in WCS.  */
+#if @GNULIB_WCSRCHR@
+# if !@HAVE_WCSRCHR@
+_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" {
+         const wchar_t * std::wcsrchr (const wchar_t *, wchar_t);
+         wchar_t * std::wcsrchr (wchar_t *, wchar_t);
+       }  */
+_GL_CXXALIAS_SYS_CAST2 (wcsrchr,
+                        wchar_t *, (const wchar_t *, wchar_t),
+                        const wchar_t *, (const wchar_t *, wchar_t));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
+_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
+# else
+_GL_CXXALIASWARN (wcsrchr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcsrchr
+# if HAVE_RAW_DECL_WCSRCHR
+_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
+                 "use gnulib module wcsrchr for portability");
+# endif
+#endif
+
+
+/* Return the length of the initial segmet of WCS which consists entirely
+   of wide characters not in REJECT.  */
+#if @GNULIB_WCSCSPN@
+# if !@HAVE_WCSCSPN@
+_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
+# endif
+_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
+_GL_CXXALIASWARN (wcscspn);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscspn
+# if HAVE_RAW_DECL_WCSCSPN
+_GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - "
+                 "use gnulib module wcscspn for portability");
+# endif
+#endif
+
+
+/* Return the length of the initial segmet of WCS which consists entirely
+   of wide characters in ACCEPT.  */
+#if @GNULIB_WCSSPN@
+# if !@HAVE_WCSSPN@
+_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
+# endif
+_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
+_GL_CXXALIASWARN (wcsspn);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsspn
+# if HAVE_RAW_DECL_WCSSPN
+_GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - "
+                 "use gnulib module wcsspn for portability");
+# endif
+#endif
+
+
+/* Find the first occurrence in WCS of any character in ACCEPT.  */
+#if @GNULIB_WCSPBRK@
+# if !@HAVE_WCSPBRK@
+_GL_FUNCDECL_SYS (wcspbrk, wchar_t *,
+                  (const wchar_t *wcs, const wchar_t *accept));
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" {
+         const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *);
+         wchar_t * std::wcspbrk (wchar_t *, const wchar_t *);
+       }  */
+_GL_CXXALIAS_SYS_CAST2 (wcspbrk,
+                        wchar_t *, (const wchar_t *, const wchar_t *),
+                        const wchar_t *, (const wchar_t *, const wchar_t *));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
+                   (wchar_t *wcs, const wchar_t *accept));
+_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
+                   (const wchar_t *wcs, const wchar_t *accept));
+# else
+_GL_CXXALIASWARN (wcspbrk);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcspbrk
+# if HAVE_RAW_DECL_WCSPBRK
+_GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
+                 "use gnulib module wcspbrk for portability");
+# endif
+#endif
+
+
+/* Find the first occurrence of NEEDLE in HAYSTACK.  */
+#if @GNULIB_WCSSTR@
+# if !@HAVE_WCSSTR@
+_GL_FUNCDECL_SYS (wcsstr, wchar_t *,
+                  (const wchar_t *haystack, const wchar_t *needle));
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" {
+         const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
+         wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
+       }  */
+_GL_CXXALIAS_SYS_CAST2 (wcsstr,
+                        wchar_t *, (const wchar_t *, const wchar_t *),
+                        const wchar_t *, (const wchar_t *, const wchar_t *));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcsstr, wchar_t *,
+                   (wchar_t *haystack, const wchar_t *needle));
+_GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
+                   (const wchar_t *haystack, const wchar_t *needle));
+# else
+_GL_CXXALIASWARN (wcsstr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcsstr
+# if HAVE_RAW_DECL_WCSSTR
+_GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - "
+                 "use gnulib module wcsstr for portability");
+# endif
+#endif
+
+
+/* Divide WCS into tokens separated by characters in DELIM.  */
+#if @GNULIB_WCSTOK@
+# if !@HAVE_WCSTOK@
+_GL_FUNCDECL_SYS (wcstok, wchar_t *,
+                  (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
+# endif
+_GL_CXXALIAS_SYS (wcstok, wchar_t *,
+                  (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
+_GL_CXXALIASWARN (wcstok);
+#elif defined GNULIB_POSIXCHECK
+# undef wcstok
+# if HAVE_RAW_DECL_WCSTOK
+_GL_WARN_ON_USE (wcstok, "wcstok is unportable - "
+                 "use gnulib module wcstok for portability");
+# endif
+#endif
+
+
+/* Determine number of column positions required for first N wide
+   characters (or fewer if S ends before this) in S.  */
+#if @GNULIB_WCSWIDTH@
+# if @REPLACE_WCSWIDTH@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcswidth
+#   define wcswidth rpl_wcswidth
+#  endif
+_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n));
+_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n));
+# else
+#  if !@HAVE_WCSWIDTH@
+_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n));
+#  endif
+_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
+# endif
+_GL_CXXALIASWARN (wcswidth);
+#elif defined GNULIB_POSIXCHECK
+# undef wcswidth
+# if HAVE_RAW_DECL_WCSWIDTH
+_GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
+                 "use gnulib module wcswidth for portability");
+# endif
+#endif
+
+
+#endif /* _GL_WCHAR_H */
+#endif /* _GL_WCHAR_H */
+#endif
diff --git a/gnulib/lib/wcrtomb.c b/gnulib/lib/wcrtomb.c
new file mode 100644 (file)
index 0000000..6632589
--- /dev/null
@@ -0,0 +1,53 @@
+/* Convert wide character to multibyte character.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wchar.h>
+
+#include <errno.h>
+#include <stdlib.h>
+
+
+size_t
+wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
+{
+  /* This implementation of wcrtomb on top of wctomb() supports only
+     stateless encodings.  ps must be in the initial state.  */
+  if (ps != NULL && !mbsinit (ps))
+    {
+      errno = EINVAL;
+      return (size_t)(-1);
+    }
+
+  if (s == NULL)
+    /* We know the NUL wide character corresponds to the NUL character.  */
+    return 1;
+  else
+    {
+      int ret = wctomb (s, wc);
+
+      if (ret >= 0)
+        return ret;
+      else
+        {
+          errno = EILSEQ;
+          return (size_t)(-1);
+        }
+    }
+}
diff --git a/gnulib/lib/wctype.in.h b/gnulib/lib/wctype.in.h
new file mode 100644 (file)
index 0000000..65879aa
--- /dev/null
@@ -0,0 +1,470 @@
+/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
+
+   Copyright (C) 2006-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Bruno Haible and Paul Eggert.  */
+
+/*
+ * ISO C 99 <wctype.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/wctype.h.html>
+ *
+ * iswctype, towctrans, towlower, towupper, wctrans, wctype,
+ * wctrans_t, and wctype_t are not yet implemented.
+ */
+
+#ifndef _GL_WCTYPE_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if @HAVE_WINT_T@
+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
+   Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# include <wchar.h>
+#endif
+
+/* Include the original <wctype.h> if it exists.
+   BeOS 5 has the functions but no <wctype.h>.  */
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_WCTYPE_H@
+# @INCLUDE_NEXT@ @NEXT_WCTYPE_H@
+#endif
+
+#ifndef _GL_WCTYPE_H
+#define _GL_WCTYPE_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* Define wint_t and WEOF.  (Also done in wchar.in.h.)  */
+#if !@HAVE_WINT_T@ && !defined wint_t
+# define wint_t int
+# ifndef WEOF
+#  define WEOF -1
+# endif
+#else
+# ifndef WEOF
+#  define WEOF ((wint_t) -1)
+# endif
+#endif
+
+
+#if !GNULIB_defined_wctype_functions
+
+/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
+   Linux libc5 has <wctype.h> and the functions but they are broken.
+   Assume all 11 functions (all isw* except iswblank) are implemented the
+   same way, or not at all.  */
+# if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
+
+/* IRIX 5.3 has macros but no functions, its isw* macros refer to an
+   undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
+   refer to system functions like _iswctype that are not in the
+   standard C library.  Rather than try to get ancient buggy
+   implementations like this to work, just disable them.  */
+#  undef iswalnum
+#  undef iswalpha
+#  undef iswblank
+#  undef iswcntrl
+#  undef iswdigit
+#  undef iswgraph
+#  undef iswlower
+#  undef iswprint
+#  undef iswpunct
+#  undef iswspace
+#  undef iswupper
+#  undef iswxdigit
+#  undef towlower
+#  undef towupper
+
+/* Linux libc5 has <wctype.h> and the functions but they are broken.  */
+#  if @REPLACE_ISWCNTRL@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define iswalnum rpl_iswalnum
+#    define iswalpha rpl_iswalpha
+#    define iswblank rpl_iswblank
+#    define iswcntrl rpl_iswcntrl
+#    define iswdigit rpl_iswdigit
+#    define iswgraph rpl_iswgraph
+#    define iswlower rpl_iswlower
+#    define iswprint rpl_iswprint
+#    define iswpunct rpl_iswpunct
+#    define iswspace rpl_iswspace
+#    define iswupper rpl_iswupper
+#    define iswxdigit rpl_iswxdigit
+#    define towlower rpl_towlower
+#    define towupper rpl_towupper
+#   endif
+#  endif
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswalnum
+#  else
+iswalnum
+#  endif
+         (wint_t wc)
+{
+  return ((wc >= '0' && wc <= '9')
+          || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswalpha
+#  else
+iswalpha
+#  endif
+         (wint_t wc)
+{
+  return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswblank
+#  else
+iswblank
+#  endif
+         (wint_t wc)
+{
+  return wc == ' ' || wc == '\t';
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswcntrl
+#  else
+iswcntrl
+#  endif
+        (wint_t wc)
+{
+  return (wc & ~0x1f) == 0 || wc == 0x7f;
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswdigit
+#  else
+iswdigit
+#  endif
+         (wint_t wc)
+{
+  return wc >= '0' && wc <= '9';
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswgraph
+#  else
+iswgraph
+#  endif
+         (wint_t wc)
+{
+  return wc >= '!' && wc <= '~';
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswlower
+#  else
+iswlower
+#  endif
+         (wint_t wc)
+{
+  return wc >= 'a' && wc <= 'z';
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswprint
+#  else
+iswprint
+#  endif
+         (wint_t wc)
+{
+  return wc >= ' ' && wc <= '~';
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswpunct
+#  else
+iswpunct
+#  endif
+         (wint_t wc)
+{
+  return (wc >= '!' && wc <= '~'
+          && !((wc >= '0' && wc <= '9')
+               || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswspace
+#  else
+iswspace
+#  endif
+         (wint_t wc)
+{
+  return (wc == ' ' || wc == '\t'
+          || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswupper
+#  else
+iswupper
+#  endif
+         (wint_t wc)
+{
+  return wc >= 'A' && wc <= 'Z';
+}
+
+static inline int
+#  if @REPLACE_ISWCNTRL@
+rpl_iswxdigit
+#  else
+iswxdigit
+#  endif
+          (wint_t wc)
+{
+  return ((wc >= '0' && wc <= '9')
+          || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
+}
+
+static inline wint_t
+#  if @REPLACE_ISWCNTRL@
+rpl_towlower
+#  else
+towlower
+#  endif
+         (wint_t wc)
+{
+  return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
+}
+
+static inline wint_t
+#  if @REPLACE_ISWCNTRL@
+rpl_towupper
+#  else
+towupper
+#  endif
+         (wint_t wc)
+{
+  return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc);
+}
+
+# elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@)
+/* Only the iswblank function is missing.  */
+
+#  if @REPLACE_ISWBLANK@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define iswblank rpl_iswblank
+#   endif
+_GL_FUNCDECL_RPL (iswblank, int, (wint_t wc));
+#  else
+_GL_FUNCDECL_SYS (iswblank, int, (wint_t wc));
+#  endif
+
+# endif
+
+# if defined __MINGW32__
+
+/* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t.
+   The functions towlower and towupper are implemented in the MSVCRT library
+   to take a wchar_t argument and return a wchar_t result.  mingw declares
+   these functions to take a wint_t argument and return a wint_t result.
+   This means that:
+   1. When the user passes an argument outside the range 0x0000..0xFFFF, the
+      function will look only at the lower 16 bits.  This is allowed according
+      to POSIX.
+   2. The return value is returned in the lower 16 bits of the result register.
+      The upper 16 bits are random: whatever happened to be in that part of the
+      result register.  We need to fix this by adding a zero-extend from
+      wchar_t to wint_t after the call.  */
+
+static inline wint_t
+rpl_towlower (wint_t wc)
+{
+  return (wint_t) (wchar_t) towlower (wc);
+}
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define towlower rpl_towlower
+#  endif
+
+static inline wint_t
+rpl_towupper (wint_t wc)
+{
+  return (wint_t) (wchar_t) towupper (wc);
+}
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define towupper rpl_towupper
+#  endif
+
+# endif /* __MINGW32__ */
+
+# define GNULIB_defined_wctype_functions 1
+#endif
+
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc));
+#else
+_GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswlower, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswprint, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswspace, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswupper, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc));
+#endif
+_GL_CXXALIASWARN (iswalnum);
+_GL_CXXALIASWARN (iswalpha);
+_GL_CXXALIASWARN (iswcntrl);
+_GL_CXXALIASWARN (iswdigit);
+_GL_CXXALIASWARN (iswgraph);
+_GL_CXXALIASWARN (iswlower);
+_GL_CXXALIASWARN (iswprint);
+_GL_CXXALIASWARN (iswpunct);
+_GL_CXXALIASWARN (iswspace);
+_GL_CXXALIASWARN (iswupper);
+_GL_CXXALIASWARN (iswxdigit);
+
+#if @GNULIB_ISWBLANK@
+# if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@
+_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
+# else
+_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc));
+# endif
+_GL_CXXALIASWARN (iswblank);
+#endif
+
+#if !@HAVE_WCTYPE_T@
+# if !GNULIB_defined_wctype_t
+typedef void * wctype_t;
+#  define GNULIB_defined_wctype_t 1
+# endif
+#endif
+
+/* Get a descriptor for a wide character property.  */
+#if @GNULIB_WCTYPE@
+# if !@HAVE_WCTYPE_T@
+_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name));
+# endif
+_GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name));
+_GL_CXXALIASWARN (wctype);
+#elif defined GNULIB_POSIXCHECK
+# undef wctype
+# if HAVE_RAW_DECL_WCTYPE
+_GL_WARN_ON_USE (wctype, "wctype is unportable - "
+                 "use gnulib module wctype for portability");
+# endif
+#endif
+
+/* Test whether a wide character has a given property.
+   The argument WC must be either a wchar_t value or WEOF.
+   The argument DESC must have been returned by the wctype() function.  */
+#if @GNULIB_ISWCTYPE@
+# if !@HAVE_WCTYPE_T@
+_GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc));
+# endif
+_GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc));
+_GL_CXXALIASWARN (iswctype);
+#elif defined GNULIB_POSIXCHECK
+# undef iswctype
+# if HAVE_RAW_DECL_ISWCTYPE
+_GL_WARN_ON_USE (iswctype, "iswctype is unportable - "
+                 "use gnulib module iswctype for portability");
+# endif
+#endif
+
+#if @REPLACE_ISWCNTRL@ || defined __MINGW32__
+_GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc));
+_GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc));
+#else
+_GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc));
+_GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc));
+#endif
+_GL_CXXALIASWARN (towlower);
+_GL_CXXALIASWARN (towupper);
+
+#if !@HAVE_WCTRANS_T@
+# if !GNULIB_defined_wctrans_t
+typedef void * wctrans_t;
+#  define GNULIB_defined_wctrans_t 1
+# endif
+#endif
+
+/* Get a descriptor for a wide character case conversion.  */
+#if @GNULIB_WCTRANS@
+# if !@HAVE_WCTRANS_T@
+_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name));
+# endif
+_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name));
+_GL_CXXALIASWARN (wctrans);
+#elif defined GNULIB_POSIXCHECK
+# undef wctrans
+# if HAVE_RAW_DECL_WCTRANS
+_GL_WARN_ON_USE (wctrans, "wctrans is unportable - "
+                 "use gnulib module wctrans for portability");
+# endif
+#endif
+
+/* Perform a given case conversion on a wide character.
+   The argument WC must be either a wchar_t value or WEOF.
+   The argument DESC must have been returned by the wctrans() function.  */
+#if @GNULIB_TOWCTRANS@
+# if !@HAVE_WCTRANS_T@
+_GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
+# endif
+_GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
+_GL_CXXALIASWARN (towctrans);
+#elif defined GNULIB_POSIXCHECK
+# undef towctrans
+# if HAVE_RAW_DECL_TOWCTRANS
+_GL_WARN_ON_USE (towctrans, "towctrans is unportable - "
+                 "use gnulib module towctrans for portability");
+# endif
+#endif
+
+
+#endif /* _GL_WCTYPE_H */
+#endif /* _GL_WCTYPE_H */
diff --git a/gnulib/lib/wcwidth.c b/gnulib/lib/wcwidth.c
new file mode 100644 (file)
index 0000000..a006ca7
--- /dev/null
@@ -0,0 +1,50 @@
+/* Determine the number of screen columns needed for a character.
+   Copyright (C) 2006-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wchar.h>
+
+/* Get iswprint.  */
+#include <wctype.h>
+
+#include "localcharset.h"
+#include "streq.h"
+#include "uniwidth.h"
+
+int
+wcwidth (wchar_t wc)
+#undef wcwidth
+{
+  /* In UTF-8 locales, use a Unicode aware width function.  */
+  const char *encoding = locale_charset ();
+  if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0))
+    {
+      /* We assume that in a UTF-8 locale, a wide character is the same as a
+         Unicode character.  */
+      return uc_width (wc, encoding);
+    }
+  else
+    {
+      /* Otherwise, fall back to the system's wcwidth function.  */
+#if HAVE_WCWIDTH
+      return wcwidth (wc);
+#else
+      return wc == 0 ? 0 : iswprint (wc) ? 1 : -1;
+#endif
+    }
+}
diff --git a/gnulib/lib/xalloc-die.c b/gnulib/lib/xalloc-die.c
new file mode 100644 (file)
index 0000000..aba4a06
--- /dev/null
@@ -0,0 +1,41 @@
+/* Report a memory allocation failure and exit.
+
+   Copyright (C) 1997-2000, 2002-2004, 2006, 2009-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/>.  */
+
+#include <config.h>
+
+#include "xalloc.h"
+
+#include <stdlib.h>
+
+#include "error.h"
+#include "exitfail.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+void
+xalloc_die (void)
+{
+  error (exit_failure, 0, "%s", _("memory exhausted"));
+
+  /* The `noreturn' cannot be given to error, since it may return if
+     its first argument is 0.  To help compilers understand the
+     xalloc_die does not return, call abort.  Also, the abort is a
+     safety feature if exit_failure is 0 (which shouldn't happen).  */
+  abort ();
+}
diff --git a/gnulib/lib/xalloc.h b/gnulib/lib/xalloc.h
new file mode 100644 (file)
index 0000000..86b9b3e
--- /dev/null
@@ -0,0 +1,292 @@
+/* xalloc.h -- malloc with out-of-memory checking
+
+   Copyright (C) 1990-2000, 2003-2004, 2006-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 XALLOC_H_
+# define XALLOC_H_
+
+# include <stddef.h>
+
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+#  define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+# else
+#  define _GL_ATTRIBUTE_NORETURN /* empty */
+# endif
+
+# if __GNUC__ >= 3
+#  define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+#  define _GL_ATTRIBUTE_MALLOC
+# endif
+
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
+# else
+#  define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+# endif
+
+/* This function is always triggered when memory is exhausted.
+   It must be defined by the application, either explicitly
+   or by using gnulib's xalloc-die module.  This is the
+   function to call when one wants the program to die because of a
+   memory allocation failure.  */
+extern void xalloc_die (void) _GL_ATTRIBUTE_NORETURN;
+
+void *xmalloc (size_t s)
+      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
+void *xzalloc (size_t s)
+      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
+void *xcalloc (size_t n, size_t s)
+      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
+void *xrealloc (void *p, size_t s)
+      _GL_ATTRIBUTE_ALLOC_SIZE ((2));
+void *x2realloc (void *p, size_t *pn);
+void *xmemdup (void const *p, size_t s)
+      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((2));
+char *xstrdup (char const *str)
+      _GL_ATTRIBUTE_MALLOC;
+
+/* Return 1 if an array of N objects, each of size S, cannot exist due
+   to size arithmetic overflow.  S must be positive and N must be
+   nonnegative.  This is a macro, not an inline function, so that it
+   works correctly even when SIZE_MAX < N.
+
+   By gnulib convention, SIZE_MAX represents overflow in size
+   calculations, so the conservative dividend to use here is
+   SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value.
+   However, malloc (SIZE_MAX) fails on all known hosts where
+   sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for
+   exactly-SIZE_MAX allocations on such hosts; this avoids a test and
+   branch when S is known to be 1.  */
+# define xalloc_oversized(n, s) \
+    ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
+
+
+/* In the following macros, T must be an elementary or structure/union or
+   typedef'ed type, or a pointer to such a type.  To apply one of the
+   following macros to a function pointer or array type, you need to typedef
+   it first and use the typedef name.  */
+
+/* Allocate an object of type T dynamically, with error checking.  */
+/* extern t *XMALLOC (typename t); */
+# define XMALLOC(t) ((t *) xmalloc (sizeof (t)))
+
+/* Allocate memory for N elements of type T, with error checking.  */
+/* extern t *XNMALLOC (size_t n, typename t); */
+# define XNMALLOC(n, t) \
+    ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
+
+/* Allocate an object of type T dynamically, with error checking,
+   and zero it.  */
+/* extern t *XZALLOC (typename t); */
+# define XZALLOC(t) ((t *) xzalloc (sizeof (t)))
+
+/* Allocate memory for N elements of type T, with error checking,
+   and zero it.  */
+/* extern t *XCALLOC (size_t n, typename t); */
+# define XCALLOC(n, t) \
+    ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
+
+
+# if HAVE_INLINE
+#  define static_inline static inline
+# else
+void *xnmalloc (size_t n, size_t s)
+      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
+void *xnrealloc (void *p, size_t n, size_t s)
+      _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
+void *x2nrealloc (void *p, size_t *pn, size_t s);
+char *xcharalloc (size_t n)
+      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
+# endif
+
+# ifdef static_inline
+
+/* Allocate an array of N objects, each with S bytes of memory,
+   dynamically, with error checking.  S must be nonzero.  */
+
+static_inline void *xnmalloc (size_t n, size_t s)
+                    _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
+static_inline void *
+xnmalloc (size_t n, size_t s)
+{
+  if (xalloc_oversized (n, s))
+    xalloc_die ();
+  return xmalloc (n * s);
+}
+
+/* Change the size of an allocated block of memory P to an array of N
+   objects each of S bytes, with error checking.  S must be nonzero.  */
+
+static_inline void *xnrealloc (void *p, size_t n, size_t s)
+                    _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
+static_inline void *
+xnrealloc (void *p, size_t n, size_t s)
+{
+  if (xalloc_oversized (n, s))
+    xalloc_die ();
+  return xrealloc (p, n * s);
+}
+
+/* If P is null, allocate a block of at least *PN such objects;
+   otherwise, reallocate P so that it contains more than *PN objects
+   each of S bytes.  *PN must be nonzero unless P is null, and S must
+   be nonzero.  Set *PN to the new number of objects, and return the
+   pointer to the new block.  *PN is never set to zero, and the
+   returned pointer is never null.
+
+   Repeated reallocations are guaranteed to make progress, either by
+   allocating an initial block with a nonzero size, or by allocating a
+   larger block.
+
+   In the following implementation, nonzero sizes are increased by a
+   factor of approximately 1.5 so that repeated reallocations have
+   O(N) overall cost rather than O(N**2) cost, but the
+   specification for this function does not guarantee that rate.
+
+   Here is an example of use:
+
+     int *p = NULL;
+     size_t used = 0;
+     size_t allocated = 0;
+
+     void
+     append_int (int value)
+       {
+         if (used == allocated)
+           p = x2nrealloc (p, &allocated, sizeof *p);
+         p[used++] = value;
+       }
+
+   This causes x2nrealloc to allocate a block of some nonzero size the
+   first time it is called.
+
+   To have finer-grained control over the initial size, set *PN to a
+   nonzero value before calling this function with P == NULL.  For
+   example:
+
+     int *p = NULL;
+     size_t used = 0;
+     size_t allocated = 0;
+     size_t allocated1 = 1000;
+
+     void
+     append_int (int value)
+       {
+         if (used == allocated)
+           {
+             p = x2nrealloc (p, &allocated1, sizeof *p);
+             allocated = allocated1;
+           }
+         p[used++] = value;
+       }
+
+   */
+
+static_inline void *
+x2nrealloc (void *p, size_t *pn, size_t s)
+{
+  size_t n = *pn;
+
+  if (! p)
+    {
+      if (! n)
+        {
+          /* The approximate size to use for initial small allocation
+             requests, when the invoking code specifies an old size of
+             zero.  64 bytes is the largest "small" request for the
+             GNU C library malloc.  */
+          enum { DEFAULT_MXFAST = 64 };
+
+          n = DEFAULT_MXFAST / s;
+          n += !n;
+        }
+    }
+  else
+    {
+      /* Set N = ceil (1.5 * N) so that progress is made if N == 1.
+         Check for overflow, so that N * S stays in size_t range.
+         The check is slightly conservative, but an exact check isn't
+         worth the trouble.  */
+      if ((size_t) -1 / 3 * 2 / s <= n)
+        xalloc_die ();
+      n += (n + 1) / 2;
+    }
+
+  *pn = n;
+  return xrealloc (p, n * s);
+}
+
+/* Return a pointer to a new buffer of N bytes.  This is like xmalloc,
+   except it returns char *.  */
+
+static_inline char *xcharalloc (size_t n)
+                    _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
+static_inline char *
+xcharalloc (size_t n)
+{
+  return XNMALLOC (n, char);
+}
+
+# endif
+
+# ifdef __cplusplus
+}
+
+/* C++ does not allow conversions from void * to other pointer types
+   without a cast.  Use templates to work around the problem when
+   possible.  */
+
+template <typename T> inline T *
+xrealloc (T *p, size_t s)
+{
+  return (T *) xrealloc ((void *) p, s);
+}
+
+template <typename T> inline T *
+xnrealloc (T *p, size_t n, size_t s)
+{
+  return (T *) xnrealloc ((void *) p, n, s);
+}
+
+template <typename T> inline T *
+x2realloc (T *p, size_t *pn)
+{
+  return (T *) x2realloc ((void *) p, pn);
+}
+
+template <typename T> inline T *
+x2nrealloc (T *p, size_t *pn, size_t s)
+{
+  return (T *) x2nrealloc ((void *) p, pn, s);
+}
+
+template <typename T> inline T *
+xmemdup (T const *p, size_t s)
+{
+  return (T *) xmemdup ((void const *) p, s);
+}
+
+# endif
+
+
+#endif /* !XALLOC_H_ */
diff --git a/gnulib/lib/xgetcwd.c b/gnulib/lib/xgetcwd.c
new file mode 100644 (file)
index 0000000..1cf8cf0
--- /dev/null
@@ -0,0 +1,41 @@
+/* xgetcwd.c -- return current directory with unlimited length
+
+   Copyright (C) 2001, 2003-2004, 2006-2007, 2009-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 Jim Meyering.  */
+
+#include <config.h>
+
+#include "xgetcwd.h"
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "xalloc.h"
+
+/* Return the current directory, newly allocated.
+   Upon an out-of-memory error, call xalloc_die.
+   Upon any other type of error, return NULL.  */
+
+char *
+xgetcwd (void)
+{
+  char *cwd = getcwd (NULL, 0);
+  if (! cwd && errno == ENOMEM)
+    xalloc_die ();
+  return cwd;
+}
diff --git a/gnulib/lib/xgetcwd.h b/gnulib/lib/xgetcwd.h
new file mode 100644 (file)
index 0000000..18685f6
--- /dev/null
@@ -0,0 +1,17 @@
+/* prototype for xgetcwd
+   Copyright (C) 1995, 2001, 2003, 2009-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/>.  */
+
+extern char *xgetcwd (void);
diff --git a/gnulib/lib/xmalloc.c b/gnulib/lib/xmalloc.c
new file mode 100644 (file)
index 0000000..08c30fb
--- /dev/null
@@ -0,0 +1,124 @@
+/* xmalloc.c -- malloc with out of memory checking
+
+   Copyright (C) 1990-2000, 2002-2006, 2008-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/>.  */
+
+#include <config.h>
+
+#if ! HAVE_INLINE
+# define static_inline
+#endif
+#include "xalloc.h"
+#undef static_inline
+
+#include <stdlib.h>
+#include <string.h>
+
+/* 1 if calloc is known to be compatible with GNU calloc.  This
+   matters if we are not also using the calloc module, which defines
+   HAVE_CALLOC_GNU and supports the GNU API even on non-GNU platforms.  */
+#if defined HAVE_CALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__)
+enum { HAVE_GNU_CALLOC = 1 };
+#else
+enum { HAVE_GNU_CALLOC = 0 };
+#endif
+
+/* Allocate N bytes of memory dynamically, with error checking.  */
+
+void *
+xmalloc (size_t n)
+{
+  void *p = malloc (n);
+  if (!p && n != 0)
+    xalloc_die ();
+  return p;
+}
+
+/* Change the size of an allocated block of memory P to N bytes,
+   with error checking.  */
+
+void *
+xrealloc (void *p, size_t n)
+{
+  if (!n && p)
+    {
+      /* The GNU and C99 realloc behaviors disagree here.  Act like
+         GNU, even if the underlying realloc is C99.  */
+      free (p);
+      return NULL;
+    }
+
+  p = realloc (p, n);
+  if (!p && n)
+    xalloc_die ();
+  return p;
+}
+
+/* If P is null, allocate a block of at least *PN bytes; otherwise,
+   reallocate P so that it contains more than *PN bytes.  *PN must be
+   nonzero unless P is null.  Set *PN to the new block's size, and
+   return the pointer to the new block.  *PN is never set to zero, and
+   the returned pointer is never null.  */
+
+void *
+x2realloc (void *p, size_t *pn)
+{
+  return x2nrealloc (p, pn, 1);
+}
+
+/* Allocate S bytes of zeroed memory dynamically, with error checking.
+   There's no need for xnzalloc (N, S), since it would be equivalent
+   to xcalloc (N, S).  */
+
+void *
+xzalloc (size_t s)
+{
+  return memset (xmalloc (s), 0, s);
+}
+
+/* Allocate zeroed memory for N elements of S bytes, with error
+   checking.  S must be nonzero.  */
+
+void *
+xcalloc (size_t n, size_t s)
+{
+  void *p;
+  /* Test for overflow, since some calloc implementations don't have
+     proper overflow checks.  But omit overflow and size-zero tests if
+     HAVE_GNU_CALLOC, since GNU calloc catches overflow and never
+     returns NULL if successful.  */
+  if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s))
+      || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0)))
+    xalloc_die ();
+  return p;
+}
+
+/* Clone an object P of size S, with error checking.  There's no need
+   for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any
+   need for an arithmetic overflow check.  */
+
+void *
+xmemdup (void const *p, size_t s)
+{
+  return memcpy (xmalloc (s), p, s);
+}
+
+/* Clone STRING.  */
+
+char *
+xstrdup (char const *string)
+{
+  return xmemdup (string, strlen (string) + 1);
+}
diff --git a/gnulib/lib/xsize.h b/gnulib/lib/xsize.h
new file mode 100644 (file)
index 0000000..6505c42
--- /dev/null
@@ -0,0 +1,108 @@
+/* xsize.h -- Checked size_t computations.
+
+   Copyright (C) 2003, 2008-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _XSIZE_H
+#define _XSIZE_H
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Get SIZE_MAX.  */
+#include <limits.h>
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+/* The size of memory objects is often computed through expressions of
+   type size_t. Example:
+      void* p = malloc (header_size + n * element_size).
+   These computations can lead to overflow.  When this happens, malloc()
+   returns a piece of memory that is way too small, and the program then
+   crashes while attempting to fill the memory.
+   To avoid this, the functions and macros in this file check for overflow.
+   The convention is that SIZE_MAX represents overflow.
+   malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
+   implementation that uses mmap --, it's recommended to use size_overflow_p()
+   or size_in_bounds_p() before invoking malloc().
+   The example thus becomes:
+      size_t size = xsum (header_size, xtimes (n, element_size));
+      void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
+*/
+
+/* Convert an arbitrary value >= 0 to type size_t.  */
+#define xcast_size_t(N) \
+  ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
+
+/* Sum of two sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum (size_t size1, size_t size2)
+{
+  size_t sum = size1 + size2;
+  return (sum >= size1 ? sum : SIZE_MAX);
+}
+
+/* Sum of three sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum3 (size_t size1, size_t size2, size_t size3)
+{
+  return xsum (xsum (size1, size2), size3);
+}
+
+/* Sum of four sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
+{
+  return xsum (xsum (xsum (size1, size2), size3), size4);
+}
+
+/* Maximum of two sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xmax (size_t size1, size_t size2)
+{
+  /* No explicit check is needed here, because for any n:
+     max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX.  */
+  return (size1 >= size2 ? size1 : size2);
+}
+
+/* Multiplication of a count with an element size, with overflow check.
+   The count must be >= 0 and the element size must be > 0.
+   This is a macro, not an inline function, so that it works correctly even
+   when N is of a wider type and N > SIZE_MAX.  */
+#define xtimes(N, ELSIZE) \
+  ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
+
+/* Check for overflow.  */
+#define size_overflow_p(SIZE) \
+  ((SIZE) == SIZE_MAX)
+/* Check against overflow.  */
+#define size_in_bounds_p(SIZE) \
+  ((SIZE) != SIZE_MAX)
+
+#endif /* _XSIZE_H */
diff --git a/gnulib/lib/xstrndup.c b/gnulib/lib/xstrndup.c
new file mode 100644 (file)
index 0000000..d58302a
--- /dev/null
@@ -0,0 +1,36 @@
+/* Duplicate a bounded initial segment of a string, with out-of-memory
+   checking.
+   Copyright (C) 2003, 2006-2007, 2009-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "xstrndup.h"
+
+#include <string.h>
+#include "xalloc.h"
+
+/* Return a newly allocated copy of at most N bytes of STRING.
+   In other words, return a copy of the initial segment of length N of
+   STRING.  */
+char *
+xstrndup (const char *string, size_t n)
+{
+  char *s = strndup (string, n);
+  if (! s)
+    xalloc_die ();
+  return s;
+}
diff --git a/gnulib/lib/xstrndup.h b/gnulib/lib/xstrndup.h
new file mode 100644 (file)
index 0000000..f96a538
--- /dev/null
@@ -0,0 +1,23 @@
+/* Duplicate a bounded initial segment of a string, with out-of-memory
+   checking.
+   Copyright (C) 2003, 2009-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/>.  */
+
+#include <stddef.h>
+
+/* Return a newly allocated copy of at most N bytes of STRING.
+   In other words, return a copy of the initial segment of length N of
+   STRING.  */
+extern char *xstrndup (const char *string, size_t n);
diff --git a/gnulib/lib/xstrtod.c b/gnulib/lib/xstrtod.c
new file mode 100644 (file)
index 0000000..1ecb638
--- /dev/null
@@ -0,0 +1,71 @@
+/* error-checking interface to strtod-like functions
+
+   Copyright (C) 1996, 1999-2000, 2003-2006, 2009-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 Jim Meyering.  */
+
+#include <config.h>
+
+#include "xstrtod.h"
+
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+
+#if LONG
+# define XSTRTOD xstrtold
+# define DOUBLE long double
+#else
+# define XSTRTOD xstrtod
+# define DOUBLE double
+#endif
+
+/* An interface to a string-to-floating-point conversion function that
+   encapsulates all the error checking one should usually perform.
+   Like strtod/strtold, but upon successful
+   conversion put the result in *RESULT and return true.  Return
+   false and don't modify *RESULT upon any failure.  CONVERT
+   specifies the conversion function, e.g., strtod itself.  */
+
+bool
+XSTRTOD (char const *str, char const **ptr, DOUBLE *result,
+         DOUBLE (*convert) (char const *, char **))
+{
+  DOUBLE val;
+  char *terminator;
+  bool ok = true;
+
+  errno = 0;
+  val = convert (str, &terminator);
+
+  /* Having a non-zero terminator is an error only when PTR is NULL. */
+  if (terminator == str || (ptr == NULL && *terminator != '\0'))
+    ok = false;
+  else
+    {
+      /* Allow underflow (in which case CONVERT returns zero),
+         but flag overflow as an error. */
+      if (val != 0 && errno == ERANGE)
+        ok = false;
+    }
+
+  if (ptr != NULL)
+    *ptr = terminator;
+
+  *result = val;
+  return ok;
+}
diff --git a/gnulib/lib/xstrtod.h b/gnulib/lib/xstrtod.h
new file mode 100644 (file)
index 0000000..6865776
--- /dev/null
@@ -0,0 +1,31 @@
+/* Error-checking interface to strtod-like functions.
+
+   Copyright (C) 1996, 1998, 2003-2004, 2006, 2009-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 Jim Meyering.  */
+
+#ifndef XSTRTOD_H
+# define XSTRTOD_H 1
+
+# include <stdbool.h>
+
+bool xstrtod (const char *str, const char **ptr, double *result,
+              double (*convert) (char const *, char **));
+bool xstrtold (const char *str, const char **ptr, long double *result,
+               long double (*convert) (char const *, char **));
+
+#endif /* not XSTRTOD_H */
diff --git a/gnulib/lib/xstrtol-error.c b/gnulib/lib/xstrtol-error.c
new file mode 100644 (file)
index 0000000..52e712c
--- /dev/null
@@ -0,0 +1,98 @@
+/* A more useful interface to strtol.
+
+   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-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/>.  */
+
+#include <config.h>
+#include "xstrtol.h"
+
+#include <stdlib.h>
+
+#include "error.h"
+#include "exitfail.h"
+#include "gettext.h"
+
+#define N_(msgid) msgid
+
+/* Report an error for an invalid integer in an option argument.
+
+   ERR is the error code returned by one of the xstrto* functions.
+
+   Use OPT_IDX to decide whether to print the short option string "C"
+   or "-C" or a long option string derived from LONG_OPTION.  OPT_IDX
+   is -2 if the short option "C" was used, without any leading "-"; it
+   is -1 if the short option "-C" was used; otherwise it is an index
+   into LONG_OPTIONS, which should have a name preceded by two '-'
+   characters.
+
+   ARG is the option-argument containing the integer.
+
+   After reporting an error, exit with status EXIT_STATUS if it is
+   nonzero.  */
+
+static void
+xstrtol_error (enum strtol_error err,
+               int opt_idx, char c, struct option const *long_options,
+               char const *arg,
+               int exit_status)
+{
+  char const *hyphens = "--";
+  char const *msgid;
+  char const *option;
+  char option_buffer[2];
+
+  switch (err)
+    {
+    default:
+      abort ();
+
+    case LONGINT_INVALID:
+      msgid = N_("invalid %s%s argument `%s'");
+      break;
+
+    case LONGINT_INVALID_SUFFIX_CHAR:
+    case LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW:
+      msgid = N_("invalid suffix in %s%s argument `%s'");
+      break;
+
+    case LONGINT_OVERFLOW:
+      msgid = N_("%s%s argument `%s' too large");
+      break;
+    }
+
+  if (opt_idx < 0)
+    {
+      hyphens -= opt_idx;
+      option_buffer[0] = c;
+      option_buffer[1] = '\0';
+      option = option_buffer;
+    }
+  else
+    option = long_options[opt_idx].name;
+
+  error (exit_status, 0, gettext (msgid), hyphens, option, arg);
+}
+
+/* Like xstrtol_error, except exit with a failure status.  */
+
+void
+xstrtol_fatal (enum strtol_error err,
+               int opt_idx, char c, struct option const *long_options,
+               char const *arg)
+{
+  xstrtol_error (err, opt_idx, c, long_options, arg, exit_failure);
+  abort ();
+}
diff --git a/gnulib/lib/xstrtol.c b/gnulib/lib/xstrtol.c
new file mode 100644 (file)
index 0000000..97ebd90
--- /dev/null
@@ -0,0 +1,228 @@
+/* A more useful interface to strtol.
+
+   Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-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 Jim Meyering. */
+
+#ifndef __strtol
+# define __strtol strtol
+# define __strtol_t long int
+# define __xstrtol xstrtol
+# define STRTOL_T_MINIMUM LONG_MIN
+# define STRTOL_T_MAXIMUM LONG_MAX
+#endif
+
+#include <config.h>
+
+#include "xstrtol.h"
+
+/* Some pre-ANSI implementations (e.g. SunOS 4)
+   need stderr defined if assertion checking is enabled.  */
+#include <stdio.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "intprops.h"
+
+static strtol_error
+bkm_scale (__strtol_t *x, int scale_factor)
+{
+  if (TYPE_SIGNED (__strtol_t) && *x < STRTOL_T_MINIMUM / scale_factor)
+    {
+      *x = STRTOL_T_MINIMUM;
+      return LONGINT_OVERFLOW;
+    }
+  if (STRTOL_T_MAXIMUM / scale_factor < *x)
+    {
+      *x = STRTOL_T_MAXIMUM;
+      return LONGINT_OVERFLOW;
+    }
+  *x *= scale_factor;
+  return LONGINT_OK;
+}
+
+static strtol_error
+bkm_scale_by_power (__strtol_t *x, int base, int power)
+{
+  strtol_error err = LONGINT_OK;
+  while (power--)
+    err |= bkm_scale (x, base);
+  return err;
+}
+
+/* FIXME: comment.  */
+
+strtol_error
+__xstrtol (const char *s, char **ptr, int strtol_base,
+           __strtol_t *val, const char *valid_suffixes)
+{
+  char *t_ptr;
+  char **p;
+  __strtol_t tmp;
+  strtol_error err = LONGINT_OK;
+
+  assert (0 <= strtol_base && strtol_base <= 36);
+
+  p = (ptr ? ptr : &t_ptr);
+
+  if (! TYPE_SIGNED (__strtol_t))
+    {
+      const char *q = s;
+      unsigned char ch = *q;
+      while (isspace (ch))
+        ch = *++q;
+      if (ch == '-')
+        return LONGINT_INVALID;
+    }
+
+  errno = 0;
+  tmp = __strtol (s, p, strtol_base);
+
+  if (*p == s)
+    {
+      /* If there is no number but there is a valid suffix, assume the
+         number is 1.  The string is invalid otherwise.  */
+      if (valid_suffixes && **p && strchr (valid_suffixes, **p))
+        tmp = 1;
+      else
+        return LONGINT_INVALID;
+    }
+  else if (errno != 0)
+    {
+      if (errno != ERANGE)
+        return LONGINT_INVALID;
+      err = LONGINT_OVERFLOW;
+    }
+
+  /* Let valid_suffixes == NULL mean `allow any suffix'.  */
+  /* FIXME: update all callers except the ones that allow suffixes
+     after the number, changing last parameter NULL to `""'.  */
+  if (!valid_suffixes)
+    {
+      *val = tmp;
+      return err;
+    }
+
+  if (**p != '\0')
+    {
+      int base = 1024;
+      int suffixes = 1;
+      strtol_error overflow;
+
+      if (!strchr (valid_suffixes, **p))
+        {
+          *val = tmp;
+          return err | LONGINT_INVALID_SUFFIX_CHAR;
+        }
+
+      if (strchr (valid_suffixes, '0'))
+        {
+          /* The ``valid suffix'' '0' is a special flag meaning that
+             an optional second suffix is allowed, which can change
+             the base.  A suffix "B" (e.g. "100MB") stands for a power
+             of 1000, whereas a suffix "iB" (e.g. "100MiB") stands for
+             a power of 1024.  If no suffix (e.g. "100M"), assume
+             power-of-1024.  */
+
+          switch (p[0][1])
+            {
+            case 'i':
+              if (p[0][2] == 'B')
+                suffixes += 2;
+              break;
+
+            case 'B':
+            case 'D': /* 'D' is obsolescent */
+              base = 1000;
+              suffixes++;
+              break;
+            }
+        }
+
+      switch (**p)
+        {
+        case 'b':
+          overflow = bkm_scale (&tmp, 512);
+          break;
+
+        case 'B':
+          overflow = bkm_scale (&tmp, 1024);
+          break;
+
+        case 'c':
+          overflow = 0;
+          break;
+
+        case 'E': /* exa or exbi */
+          overflow = bkm_scale_by_power (&tmp, base, 6);
+          break;
+
+        case 'G': /* giga or gibi */
+        case 'g': /* 'g' is undocumented; for compatibility only */
+          overflow = bkm_scale_by_power (&tmp, base, 3);
+          break;
+
+        case 'k': /* kilo */
+        case 'K': /* kibi */
+          overflow = bkm_scale_by_power (&tmp, base, 1);
+          break;
+
+        case 'M': /* mega or mebi */
+        case 'm': /* 'm' is undocumented; for compatibility only */
+          overflow = bkm_scale_by_power (&tmp, base, 2);
+          break;
+
+        case 'P': /* peta or pebi */
+          overflow = bkm_scale_by_power (&tmp, base, 5);
+          break;
+
+        case 'T': /* tera or tebi */
+        case 't': /* 't' is undocumented; for compatibility only */
+          overflow = bkm_scale_by_power (&tmp, base, 4);
+          break;
+
+        case 'w':
+          overflow = bkm_scale (&tmp, 2);
+          break;
+
+        case 'Y': /* yotta or 2**80 */
+          overflow = bkm_scale_by_power (&tmp, base, 8);
+          break;
+
+        case 'Z': /* zetta or 2**70 */
+          overflow = bkm_scale_by_power (&tmp, base, 7);
+          break;
+
+        default:
+          *val = tmp;
+          return err | LONGINT_INVALID_SUFFIX_CHAR;
+        }
+
+      err |= overflow;
+      *p += suffixes;
+      if (**p)
+        err |= LONGINT_INVALID_SUFFIX_CHAR;
+    }
+
+  *val = tmp;
+  return err;
+}
diff --git a/gnulib/lib/xstrtol.h b/gnulib/lib/xstrtol.h
new file mode 100644 (file)
index 0000000..716a94f
--- /dev/null
@@ -0,0 +1,79 @@
+/* A more useful interface to strtol.
+
+   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-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 XSTRTOL_H_
+# define XSTRTOL_H_ 1
+
+# include <getopt.h>
+# include <inttypes.h>
+
+# ifndef _STRTOL_ERROR
+enum strtol_error
+  {
+    LONGINT_OK = 0,
+
+    /* These two values can be ORed together, to indicate that both
+       errors occurred.  */
+    LONGINT_OVERFLOW = 1,
+    LONGINT_INVALID_SUFFIX_CHAR = 2,
+
+    LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW = (LONGINT_INVALID_SUFFIX_CHAR
+                                                 | LONGINT_OVERFLOW),
+    LONGINT_INVALID = 4
+  };
+typedef enum strtol_error strtol_error;
+# endif
+
+# define _DECLARE_XSTRTOL(name, type) \
+  strtol_error name (const char *, char **, int, type *, const char *);
+_DECLARE_XSTRTOL (xstrtol, long int)
+_DECLARE_XSTRTOL (xstrtoul, unsigned long int)
+_DECLARE_XSTRTOL (xstrtoimax, intmax_t)
+_DECLARE_XSTRTOL (xstrtoumax, uintmax_t)
+
+#if HAVE_LONG_LONG_INT
+_DECLARE_XSTRTOL (xstrtoll, long long int)
+_DECLARE_XSTRTOL (xstrtoull, unsigned long long int)
+#endif
+
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#else
+# define _GL_ATTRIBUTE_NORETURN /* empty */
+#endif
+
+/* Report an error for an invalid integer in an option argument.
+
+   ERR is the error code returned by one of the xstrto* functions.
+
+   Use OPT_IDX to decide whether to print the short option string "C"
+   or "-C" or a long option string derived from LONG_OPTION.  OPT_IDX
+   is -2 if the short option "C" was used, without any leading "-"; it
+   is -1 if the short option "-C" was used; otherwise it is an index
+   into LONG_OPTIONS, which should have a name preceded by two '-'
+   characters.
+
+   ARG is the option-argument containing the integer.
+
+   After reporting an error, exit with a failure status.  */
+
+void xstrtol_fatal (enum strtol_error,
+                    int, char, struct option const *,
+                    char const *) _GL_ATTRIBUTE_NORETURN;
+
+#endif /* not XSTRTOL_H_ */
diff --git a/gnulib/lib/xstrtoul.c b/gnulib/lib/xstrtoul.c
new file mode 100644 (file)
index 0000000..285f7b9
--- /dev/null
@@ -0,0 +1,6 @@
+#define __strtol strtoul
+#define __strtol_t unsigned long int
+#define __xstrtol xstrtoul
+#define STRTOL_T_MINIMUM 0
+#define STRTOL_T_MAXIMUM ULONG_MAX
+#include "xstrtol.c"
diff --git a/gnulib/lib/xstrtoumax.c b/gnulib/lib/xstrtoumax.c
new file mode 100644 (file)
index 0000000..9a2349f
--- /dev/null
@@ -0,0 +1,6 @@
+#define __strtol strtoumax
+#define __strtol_t uintmax_t
+#define __xstrtol xstrtoumax
+#define STRTOL_T_MINIMUM 0
+#define STRTOL_T_MAXIMUM UINTMAX_MAX
+#include "xstrtol.c"
diff --git a/gnulib/lib/yesno.c b/gnulib/lib/yesno.c
new file mode 100644 (file)
index 0000000..6502538
--- /dev/null
@@ -0,0 +1,60 @@
+/* yesno.c -- read a yes/no response from stdin
+
+   Copyright (C) 1990, 1998, 2001, 2003-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/>.  */
+
+#include <config.h>
+
+#include "yesno.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+
+/* Return true if we read an affirmative line from standard input.
+
+   Since this function uses stdin, it is suggested that the caller not
+   use STDIN_FILENO directly, and also that the line
+   atexit(close_stdin) be added to main().  */
+
+bool
+yesno (void)
+{
+  bool yes;
+
+#if ENABLE_NLS
+  char *response = NULL;
+  size_t response_size = 0;
+  ssize_t response_len = getline (&response, &response_size, stdin);
+
+  if (response_len <= 0)
+    yes = false;
+  else
+    {
+      response[response_len - 1] = '\0';
+      yes = (0 < rpmatch (response));
+    }
+
+  free (response);
+#else
+  /* Test against "^[yY]", hardcoded to avoid requiring getline,
+     regex, and rpmatch.  */
+  int c = getchar ();
+  yes = (c == 'y' || c == 'Y');
+  while (c != '\n' && c != EOF)
+    c = getchar ();
+#endif
+
+  return yes;
+}
diff --git a/gnulib/lib/yesno.h b/gnulib/lib/yesno.h
new file mode 100644 (file)
index 0000000..36e624f
--- /dev/null
@@ -0,0 +1,24 @@
+/* declare yesno
+   Copyright (C) 2004, 2009-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 YESNO_H_
+# define YESNO_H_
+
+# include <stdbool.h>
+
+bool yesno (void);
+
+#endif
diff --git a/gnulib/m4/00gnulib.m4 b/gnulib/m4/00gnulib.m4
new file mode 100644 (file)
index 0000000..7feed46
--- /dev/null
@@ -0,0 +1,30 @@
+# 00gnulib.m4 serial 2
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This file must be named something that sorts before all other
+dnl gnulib-provided .m4 files.  It is needed until such time as we can
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+
+# AC_DEFUN_ONCE([NAME], VALUE)
+# ----------------------------
+# Define NAME to expand to VALUE on the first use (whether by direct
+# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
+# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier.  This
+# definition is slower than the version in Autoconf 2.64, because it
+# can only use interfaces that existed since 2.59; but it achieves the
+# same effect.  Quoting is necessary to avoid confusing Automake.
+m4_version_prereq([2.63.263], [],
+[m4_define([AC][_DEFUN_ONCE],
+  [AC][_DEFUN([$1],
+    [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
+      [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
+[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+
+# gl_00GNULIB
+# -----------
+# Witness macro that this file has been included.  Needed to force
+# Automake to include this file prior to all other gnulib .m4 files.
+AC_DEFUN([gl_00GNULIB])
diff --git a/gnulib/m4/alloca.m4 b/gnulib/m4/alloca.m4
new file mode 100644 (file)
index 0000000..e2e8a05
--- /dev/null
@@ -0,0 +1,43 @@
+# alloca.m4 serial 10
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ALLOCA],
+[
+  AC_REQUIRE([AC_FUNC_ALLOCA])
+  if test $ac_cv_func_alloca_works = no; then
+    gl_PREREQ_ALLOCA
+  fi
+
+  # Define an additional variable used in the Makefile substitution.
+  if test $ac_cv_working_alloca_h = yes; then
+    AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [
+      AC_EGREP_CPP([Need own alloca], [
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+        Need own alloca
+#endif
+        ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
+    ])
+    if test $gl_cv_rpl_alloca = yes; then
+      dnl OK, alloca can be implemented through a compiler built-in.
+      AC_DEFINE([HAVE_ALLOCA], [1],
+        [Define to 1 if you have 'alloca' after including <alloca.h>,
+         a header that may be supplied by this distribution.])
+      ALLOCA_H=alloca.h
+    else
+      dnl alloca exists as a library function, i.e. it is slow and probably
+      dnl a memory leak. Don't define HAVE_ALLOCA in this case.
+      ALLOCA_H=
+    fi
+  else
+    ALLOCA_H=alloca.h
+  fi
+  AC_SUBST([ALLOCA_H])
+])
+
+# Prerequisites of lib/alloca.c.
+# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
+AC_DEFUN([gl_PREREQ_ALLOCA], [:])
diff --git a/gnulib/m4/argmatch.m4 b/gnulib/m4/argmatch.m4
new file mode 100644 (file)
index 0000000..eddca3f
--- /dev/null
@@ -0,0 +1,10 @@
+#serial 3
+dnl Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_ARGMATCH],
+[
+  AC_LIBOBJ([argmatch])
+])
diff --git a/gnulib/m4/assert.m4 b/gnulib/m4/assert.m4
new file mode 100644 (file)
index 0000000..2de5ef5
--- /dev/null
@@ -0,0 +1,24 @@
+#serial 7
+
+# Copyright (C) 1998-1999, 2001, 2004, 2008-2011 Free Software Foundation, Inc.
+# This file 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.
+
+dnl based on code from Eleftherios Gkioulekas
+dnl Autoconf 2.60 provides AC_HEADER_ASSERT for the same purpose, but
+dnl it has broken semantics for --enable-assert until 2.64.
+AC_DEFUN([gl_ASSERT],
+[
+  AC_MSG_CHECKING([whether to enable assertions])
+  AC_ARG_ENABLE([assert],
+    [AS_HELP_STRING([--disable-assert], [turn off assertions])],
+    [AS_IF([test "x$enableval" = xno],
+      [AC_DEFINE([NDEBUG], [1],
+        [Define to 1 if assertions should be disabled.])],
+      [test "x$enableval" != xyes],
+      [AC_MSG_WARN([invalid argument supplied to --enable-assert])
+      enable_assert=yes])],
+    [enable_assert=yes])
+  AC_MSG_RESULT([$enable_assert])
+])
diff --git a/gnulib/m4/bison.m4 b/gnulib/m4/bison.m4
new file mode 100644 (file)
index 0000000..87c090e
--- /dev/null
@@ -0,0 +1,24 @@
+# serial 6
+
+# Copyright (C) 2002, 2005, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+AC_DEFUN([gl_BISON],
+[
+  # parse-datetime.y works with bison only.
+  : ${YACC='bison -y'}
+dnl
+dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB
+dnl requires an Autoconf greater than 2.59c, but it will probably still be
+dnl useful to override the description of YACC in the --help output, re
+dnl parse-datetime.y assuming `bison -y'.
+  AC_ARG_VAR([YACC],
+[The `Yet Another C Compiler' implementation to use.  Defaults to `bison -y'.
+Values other than `bison -y' will most likely break on most systems.])dnl
+  AC_ARG_VAR([YFLAGS],
+[YFLAGS contains the list arguments that will be passed by default to Bison.
+This script will default YFLAGS to the empty string to avoid a default value of
+`-d' given by some make applications.])dnl
+])
diff --git a/gnulib/m4/btowc.m4 b/gnulib/m4/btowc.m4
new file mode 100644 (file)
index 0000000..603298f
--- /dev/null
@@ -0,0 +1,121 @@
+# btowc.m4 serial 8
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_BTOWC],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+  dnl Check whether <wchar.h> is usable at all, first. Otherwise the test
+  dnl program below may lead to an endless loop. See
+  dnl <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>.
+  AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
+
+  AC_CHECK_FUNCS_ONCE([btowc])
+  if test $ac_cv_func_btowc = no; then
+    HAVE_BTOWC=0
+  else
+
+    AC_REQUIRE([AC_PROG_CC])
+    AC_REQUIRE([gt_LOCALE_FR])
+    AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+    dnl Cygwin 1.7.2 btowc('\0') is WEOF, not 0.
+    AC_CACHE_CHECK([whether btowc(0) is correct],
+      [gl_cv_func_btowc_nul],
+      [
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (btowc ('\0') != 0)
+    return 1;
+  return 0;
+}]])],
+          [gl_cv_func_btowc_nul=yes],
+          [gl_cv_func_btowc_nul=no],
+          [
+changequote(,)dnl
+           case "$host_os" in
+                      # Guess no on Cygwin.
+             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
+                      # Guess yes otherwise.
+             *)       gl_cv_func_btowc_nul="guessing yes" ;;
+           esac
+changequote([,])dnl
+          ])
+      ])
+
+    dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF.
+    AC_CACHE_CHECK([whether btowc(EOF) is correct],
+      [gl_cv_func_btowc_eof],
+      [
+        dnl Initial guess, used when cross-compiling or when no suitable locale
+        dnl is present.
+changequote(,)dnl
+        case "$host_os" in
+                 # Guess no on IRIX.
+          irix*) gl_cv_func_btowc_eof="guessing no" ;;
+                 # Guess yes otherwise.
+          *)     gl_cv_func_btowc_eof="guessing yes" ;;
+        esac
+changequote([,])dnl
+        if test $LOCALE_FR != none; then
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      if (btowc (EOF) != WEOF)
+        return 1;
+    }
+  return 0;
+}]])],
+            [gl_cv_func_btowc_eof=yes],
+            [gl_cv_func_btowc_eof=no],
+            [:])
+        fi
+      ])
+
+    case "$gl_cv_func_btowc_nul" in
+      *yes) ;;
+      *) REPLACE_BTOWC=1 ;;
+    esac
+    case "$gl_cv_func_btowc_eof" in
+      *yes) ;;
+      *) REPLACE_BTOWC=1 ;;
+    esac
+  fi
+  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+    gl_REPLACE_WCHAR_H
+    AC_LIBOBJ([btowc])
+    gl_PREREQ_BTOWC
+  fi
+])
+
+# Prerequisites of lib/btowc.c.
+AC_DEFUN([gl_PREREQ_BTOWC], [
+  :
+])
diff --git a/gnulib/m4/canonicalize.m4 b/gnulib/m4/canonicalize.m4
new file mode 100644 (file)
index 0000000..dcc6039
--- /dev/null
@@ -0,0 +1,94 @@
+# canonicalize.m4 serial 17
+
+dnl Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Provides canonicalize_file_name and canonicalize_filename_mode, but does
+# not provide or fix realpath.
+AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
+[
+  AC_LIBOBJ([canonicalize])
+
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
+  AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+  AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
+  if test $ac_cv_func_canonicalize_file_name = no; then
+    HAVE_CANONICALIZE_FILE_NAME=0
+  elif test "$gl_cv_func_realpath_works" != yes; then
+    REPLACE_CANONICALIZE_FILE_NAME=1
+  fi
+])
+
+# Provides canonicalize_file_name and realpath.
+AC_DEFUN([gl_CANONICALIZE_LGPL],
+[
+  AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE])
+  if test $ac_cv_func_canonicalize_file_name = no; then
+    HAVE_CANONICALIZE_FILE_NAME=0
+    AC_LIBOBJ([canonicalize-lgpl])
+    if test $ac_cv_func_realpath = no; then
+      HAVE_REALPATH=0
+    elif test "$gl_cv_func_realpath_works" != yes; then
+      REPLACE_REALPATH=1
+    fi
+  elif test "$gl_cv_func_realpath_works" != yes; then
+    AC_LIBOBJ([canonicalize-lgpl])
+    REPLACE_REALPATH=1
+    REPLACE_CANONICALIZE_FILE_NAME=1
+  fi
+])
+
+# Like gl_CANONICALIZE_LGPL, except prepare for separate compilation
+# (no AC_LIBOBJ).
+AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
+[
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink])
+  AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+  AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
+  AC_CHECK_HEADERS_ONCE([sys/param.h])
+])
+
+# Check whether realpath works.  Assume that if a platform has both
+# realpath and canonicalize_file_name, but the former is broken, then
+# so is the latter.
+AC_DEFUN([gl_FUNC_REALPATH_WORKS],
+[
+  AC_CHECK_FUNCS_ONCE([realpath])
+  AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [
+    touch conftest.a
+    AC_RUN_IFELSE([
+      AC_LANG_PROGRAM([[
+        #include <stdlib.h>
+      ]], [[
+        int result = 0;
+        {
+          char *name = realpath ("conftest.a", NULL);
+          if (!(name && *name == '/'))
+            result |= 1;
+        }
+        {
+          char *name = realpath ("conftest.b/../conftest.a", NULL);
+          if (name != NULL)
+            result |= 2;
+        }
+        {
+          char *name = realpath ("conftest.a/", NULL);
+          if (name != NULL)
+            result |= 4;
+        }
+        return result;
+      ]])
+    ], [gl_cv_func_realpath_works=yes], [gl_cv_func_realpath_works=no],
+       [gl_cv_func_realpath_works="guessing no"])
+  ])
+  if test "$gl_cv_func_realpath_works" = yes; then
+    AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath()
+      can malloc memory, always gives an absolute path, and handles
+      trailing slash correctly.])
+  fi
+])
diff --git a/gnulib/m4/chdir-long.m4 b/gnulib/m4/chdir-long.m4
new file mode 100644 (file)
index 0000000..27c61d2
--- /dev/null
@@ -0,0 +1,39 @@
+#serial 11
+
+# Use Gnulib's robust chdir function.
+# It can handle arbitrarily long directory names, which means
+# that when it is given the name of an existing directory, it
+# never fails with ENAMETOOLONG.
+# Arrange to compile chdir-long.c only on systems that define PATH_MAX.
+
+dnl Copyright (C) 2004-2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Jim Meyering.
+
+AC_DEFUN([gl_FUNC_CHDIR_LONG],
+[
+  AC_CACHE_CHECK([whether this system has an arbitrary file name length limit],
+    gl_cv_have_arbitrary_file_name_length_limit,
+    [AC_EGREP_CPP([have_arbitrary_file_name_length_limit],
+                  [#include <unistd.h>
+#include <limits.h>
+#if defined PATH_MAX || defined MAXPATHLEN
+have_arbitrary_file_name_length_limit
+#endif],
+    gl_cv_have_arbitrary_file_name_length_limit=yes,
+    gl_cv_have_arbitrary_file_name_length_limit=no)])
+
+  if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
+    AC_LIBOBJ([chdir-long])
+    gl_PREREQ_CHDIR_LONG
+  fi
+])
+
+AC_DEFUN([gl_PREREQ_CHDIR_LONG],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  :
+])
diff --git a/gnulib/m4/chown.m4 b/gnulib/m4/chown.m4
new file mode 100644 (file)
index 0000000..f664e7c
--- /dev/null
@@ -0,0 +1,144 @@
+# serial 24
+# Determine whether we need the chown wrapper.
+
+dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2011 Free Software
+dnl Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# chown should accept arguments of -1 for uid and gid, and it should
+# dereference symlinks.  If it doesn't, arrange to use the replacement
+# function.
+
+# From Jim Meyering.
+
+AC_DEFUN_ONCE([gl_FUNC_CHOWN],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_TYPE_UID_T])
+  AC_REQUIRE([AC_FUNC_CHOWN])
+  AC_REQUIRE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK])
+  AC_CHECK_FUNCS_ONCE([chown fchown])
+
+  dnl mingw lacks chown altogether.
+  if test $ac_cv_func_chown = no; then
+    HAVE_CHOWN=0
+    AC_LIBOBJ([chown])
+  else
+    dnl Some old systems treated chown like lchown.
+    if test $gl_cv_func_chown_follows_symlink = no; then
+      REPLACE_CHOWN=1
+      AC_LIBOBJ([chown])
+    fi
+
+    dnl Some old systems tried to use uid/gid -1 literally.
+    if test $ac_cv_func_chown_works = no; then
+      AC_DEFINE([CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE], [1],
+        [Define if chown is not POSIX compliant regarding IDs of -1.])
+      REPLACE_CHOWN=1
+      AC_LIBOBJ([chown])
+    fi
+
+    dnl Solaris 9 ignores trailing slash.
+    dnl FreeBSD 7.2 mishandles trailing slash on symlinks.
+    dnl Likewise for AIX 7.1.
+    AC_CACHE_CHECK([whether chown honors trailing slash],
+      [gl_cv_func_chown_slash_works],
+      [touch conftest.file && rm -f conftest.link
+       AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+]], [[    if (symlink ("conftest.file", "conftest.link")) return 1;
+          if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
+        ]])],
+        [gl_cv_func_chown_slash_works=yes],
+        [gl_cv_func_chown_slash_works=no],
+        [gl_cv_func_chown_slash_works="guessing no"])
+      rm -f conftest.link conftest.file])
+    if test "$gl_cv_func_chown_slash_works" != yes; then
+      AC_DEFINE([CHOWN_TRAILING_SLASH_BUG], [1],
+        [Define to 1 if chown mishandles trailing slash.])
+      REPLACE_CHOWN=1
+      AC_LIBOBJ([chown])
+    fi
+
+    dnl OpenBSD fails to update ctime if ownership does not change.
+    AC_CACHE_CHECK([whether chown always updates ctime],
+      [gl_cv_func_chown_ctime_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+]], [[    struct stat st1, st2;
+          if (close (creat ("conftest.file", 0600))) return 1;
+          if (stat ("conftest.file", &st1)) return 2;
+          sleep (1);
+          if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
+          if (stat ("conftest.file", &st2)) return 4;
+          if (st2.st_ctime <= st1.st_ctime) return 5;
+        ]])],
+        [gl_cv_func_chown_ctime_works=yes],
+        [gl_cv_func_chown_ctime_works=no],
+        [gl_cv_func_chown_ctime_works="guessing no"])
+      rm -f conftest.file])
+    if test "$gl_cv_func_chown_ctime_works" != yes; then
+      AC_DEFINE([CHOWN_CHANGE_TIME_BUG], [1], [Define to 1 if chown fails
+        to change ctime when at least one argument was not -1.])
+      REPLACE_CHOWN=1
+      AC_LIBOBJ([chown])
+    fi
+
+    if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
+      AC_LIBOBJ([fchown-stub])
+    fi
+  fi
+])
+
+# Determine whether chown follows symlinks (it should).
+AC_DEFUN_ONCE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK],
+[
+  AC_CACHE_CHECK(
+    [whether chown dereferences symlinks],
+    [gl_cv_func_chown_follows_symlink],
+    [
+      AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+
+        int
+        main ()
+        {
+          int result = 0;
+          char const *dangling_symlink = "conftest.dangle";
+
+          unlink (dangling_symlink);
+          if (symlink ("conftest.no-such", dangling_symlink))
+            abort ();
+
+          /* Exit successfully on a conforming system,
+             i.e., where chown must fail with ENOENT.  */
+          if (chown (dangling_symlink, getuid (), getgid ()) == 0)
+            result |= 1;
+          if (errno != ENOENT)
+            result |= 2;
+          return result;
+        }
+        ]])],
+        [gl_cv_func_chown_follows_symlink=yes],
+        [gl_cv_func_chown_follows_symlink=no],
+        [gl_cv_func_chown_follows_symlink=yes]
+      )
+    ]
+  )
+
+  if test $gl_cv_func_chown_follows_symlink = no; then
+    AC_DEFINE([CHOWN_MODIFIES_SYMLINK], [1],
+      [Define if chown modifies symlinks.])
+  fi
+])
diff --git a/gnulib/m4/clock_time.m4 b/gnulib/m4/clock_time.m4
new file mode 100644 (file)
index 0000000..3c08512
--- /dev/null
@@ -0,0 +1,31 @@
+# clock_time.m4 serial 10
+dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME.
+# For a program named, say foo, you should add a line like the following
+# in the corresponding Makefile.am file:
+# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
+
+AC_DEFUN([gl_CLOCK_TIME],
+[
+  dnl Persuade glibc and Solaris <time.h> to declare these functions.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
+  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+
+  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
+  # programs in the package would end up linked with that potentially-shared
+  # library, inducing unnecessary run-time overhead.
+  LIB_CLOCK_GETTIME=
+  AC_SUBST([LIB_CLOCK_GETTIME])
+  gl_saved_libs=$LIBS
+    AC_SEARCH_LIBS([clock_gettime], [rt posix4],
+                   [test "$ac_cv_search_clock_gettime" = "none required" ||
+                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+    AC_CHECK_FUNCS([clock_gettime clock_settime])
+  LIBS=$gl_saved_libs
+])
diff --git a/gnulib/m4/cloexec.m4 b/gnulib/m4/cloexec.m4
new file mode 100644 (file)
index 0000000..c936f43
--- /dev/null
@@ -0,0 +1,10 @@
+#serial 6
+dnl Copyright (C) 2004-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CLOEXEC],
+[
+  AC_LIBOBJ([cloexec])
+])
diff --git a/gnulib/m4/close-stream.m4 b/gnulib/m4/close-stream.m4
new file mode 100644 (file)
index 0000000..2a7349c
--- /dev/null
@@ -0,0 +1,13 @@
+#serial 3
+dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CLOSE_STREAM],
+[
+  AC_LIBOBJ([close-stream])
+
+  dnl Prerequisites of lib/close-stream.c.
+  :
+])
diff --git a/gnulib/m4/close.m4 b/gnulib/m4/close.m4
new file mode 100644 (file)
index 0000000..fc13138
--- /dev/null
@@ -0,0 +1,26 @@
+# close.m4 serial 5
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_CLOSE],
+[
+  m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [
+    gl_PREREQ_SYS_H_WINSOCK2
+    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
+      dnl Even if the 'socket' module is not used here, another part of the
+      dnl application may use it and pass file descriptors that refer to
+      dnl sockets to the close() function. So enable the support for sockets.
+      gl_REPLACE_CLOSE
+    fi
+  ])
+])
+
+AC_DEFUN([gl_REPLACE_CLOSE],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  REPLACE_CLOSE=1
+  AC_LIBOBJ([close])
+  gl_REPLACE_FCLOSE
+])
diff --git a/gnulib/m4/closein.m4 b/gnulib/m4/closein.m4
new file mode 100644 (file)
index 0000000..a5731ee
--- /dev/null
@@ -0,0 +1,13 @@
+# closein.m4 serial 1
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CLOSEIN],
+[
+  AC_LIBOBJ([closein])
+
+  dnl Prerequisites of lib/closein.c.
+  :
+])
diff --git a/gnulib/m4/closeout.m4 b/gnulib/m4/closeout.m4
new file mode 100644 (file)
index 0000000..0586b32
--- /dev/null
@@ -0,0 +1,14 @@
+# closeout.m4 serial 5
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CLOSEOUT],
+[
+  AC_LIBOBJ([closeout])
+
+  dnl Prerequisites of lib/closeout.c.
+  :
+])
diff --git a/gnulib/m4/codeset.m4 b/gnulib/m4/codeset.m4
new file mode 100644 (file)
index 0000000..da73552
--- /dev/null
@@ -0,0 +1,23 @@
+# codeset.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2000-2002, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <langinfo.h>]],
+          [[char* cs = nl_langinfo(CODESET); return !cs;]])],
+       [am_cv_langinfo_codeset=yes],
+       [am_cv_langinfo_codeset=no])
+    ])
+  if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+  fi
+])
diff --git a/gnulib/m4/configmake.m4 b/gnulib/m4/configmake.m4
new file mode 100644 (file)
index 0000000..a029823
--- /dev/null
@@ -0,0 +1,50 @@
+# configmake.m4 serial 1
+dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_CONFIGMAKE_PREP
+# ------------------
+# Guarantee all of the standard directory variables, even when used with
+# autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake
+# 1.9.6 (pkglibexecdir wasn't supported until 1.10b.).
+AC_DEFUN([gl_CONFIGMAKE_PREP],
+[
+  dnl Technically, datadir should default to datarootdir.  But if
+  dnl autoconf is too old to provide datarootdir, then reversing the
+  dnl definition is a reasonable compromise.  Only AC_SUBST a variable
+  dnl if it was not already defined earlier by autoconf.
+  if test "x$datarootdir" = x; then
+    AC_SUBST([datarootdir], ['${datadir}'])
+  fi
+  dnl Copy the approach used in autoconf 2.60.
+  if test "x$docdir" = x; then
+    AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
+      ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
+      ['${datarootdir}/doc/${PACKAGE}'])])
+  fi
+  dnl The remaining variables missing from autoconf 2.59 are easier.
+  if test "x$htmldir" = x; then
+    AC_SUBST([htmldir], ['${docdir}'])
+  fi
+  if test "x$dvidir" = x; then
+    AC_SUBST([dvidir], ['${docdir}'])
+  fi
+  if test "x$pdfdir" = x; then
+    AC_SUBST([pdfdir], ['${docdir}'])
+  fi
+  if test "x$psdir" = x; then
+    AC_SUBST([psdir], ['${docdir}'])
+  fi
+  if test "x$lispdir" = x; then
+    AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp'])
+  fi
+  if test "x$localedir" = x; then
+    AC_SUBST([localedir], ['${datarootdir}/locale'])
+  fi
+
+  dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely
+  dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe.
+  AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}'])
+])
diff --git a/gnulib/m4/ctype.m4 b/gnulib/m4/ctype.m4
new file mode 100644 (file)
index 0000000..4a86ba9
--- /dev/null
@@ -0,0 +1,32 @@
+# ctype_h.m4 serial 6
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CTYPE_H],
+[
+  AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+
+  dnl <ctype.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_NEXT_HEADERS([ctype.h])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <ctype.h>
+    ]], [isblank])
+])
+
+AC_DEFUN([gl_CTYPE_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_CTYPE_H_DEFAULTS],
+[
+  GNULIB_ISBLANK=0; AC_SUBST([GNULIB_ISBLANK])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_ISBLANK=1;   AC_SUBST([HAVE_ISBLANK])
+])
diff --git a/gnulib/m4/cycle-check.m4 b/gnulib/m4/cycle-check.m4
new file mode 100644 (file)
index 0000000..42ad2ff
--- /dev/null
@@ -0,0 +1,11 @@
+#serial 5
+dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CYCLE_CHECK],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AC_LIBOBJ([cycle-check])
+])
diff --git a/gnulib/m4/d-ino.m4 b/gnulib/m4/d-ino.m4
new file mode 100644 (file)
index 0000000..baf0dcc
--- /dev/null
@@ -0,0 +1,46 @@
+# serial 12
+
+dnl From Jim Meyering.
+dnl
+dnl Check whether struct dirent has a member named d_ino.
+dnl
+
+# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2011 Free Software
+# Foundation, Inc.
+
+# This file 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.
+
+AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
+  [AC_CACHE_CHECK([for d_ino member in directory struct],
+                  gl_cv_struct_dirent_d_ino,
+     [AC_RUN_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <sys/types.h>
+             #include <sys/stat.h>
+             #include <dirent.h>
+           ]],
+           [[DIR *dp = opendir (".");
+             struct dirent *e;
+             struct stat st;
+             if (! dp)
+               return 1;
+             e = readdir (dp);
+             if (! e)
+               return 2;
+             if (stat (e->d_name, &st) != 0)
+               return 3;
+             if (e->d_ino != st.st_ino)
+               return 4;
+             return 0;
+           ]])],
+           [gl_cv_struct_dirent_d_ino=yes],
+           [gl_cv_struct_dirent_d_ino=no],
+           [gl_cv_struct_dirent_d_ino=no])])
+   if test $gl_cv_struct_dirent_d_ino = yes; then
+     AC_DEFINE([D_INO_IN_DIRENT], [1],
+       [Define if struct dirent has a member d_ino that actually works.])
+   fi
+  ]
+)
diff --git a/gnulib/m4/d-type.m4 b/gnulib/m4/d-type.m4
new file mode 100644 (file)
index 0000000..f5e1105
--- /dev/null
@@ -0,0 +1,32 @@
+# serial 11
+
+dnl From Jim Meyering.
+dnl
+dnl Check whether struct dirent has a member named d_type.
+dnl
+
+# Copyright (C) 1997, 1999-2004, 2006, 2009-2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
+  [AC_CACHE_CHECK([for d_type member in directory struct],
+                  gl_cv_struct_dirent_d_type,
+     [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <dirent.h>
+         ]],
+         [[struct dirent dp; dp.d_type = 0;]])],
+       [gl_cv_struct_dirent_d_type=yes],
+       [gl_cv_struct_dirent_d_type=no])
+     ]
+   )
+   if test $gl_cv_struct_dirent_d_type = yes; then
+     AC_DEFINE([HAVE_STRUCT_DIRENT_D_TYPE], [1],
+       [Define if there is a member named d_type in the struct describing
+        directory headers.])
+   fi
+  ]
+)
diff --git a/gnulib/m4/dirent-safer.m4 b/gnulib/m4/dirent-safer.m4
new file mode 100644 (file)
index 0000000..0b557ca
--- /dev/null
@@ -0,0 +1,11 @@
+#serial 1
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_DIRENT_SAFER],
+[
+  AC_CHECK_FUNCS_ONCE([fdopendir])
+  AC_LIBOBJ([opendir-safer])
+])
diff --git a/gnulib/m4/dirent_h.m4 b/gnulib/m4/dirent_h.m4
new file mode 100644 (file)
index 0000000..853ac7d
--- /dev/null
@@ -0,0 +1,57 @@
+# dirent_h.m4 serial 13
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Bruno Haible.
+
+AC_DEFUN([gl_DIRENT_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+  dnl <dirent.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_CHECK_NEXT_HEADERS([dirent.h])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <dirent.h>
+    ]], [alphasort dirfd fdopendir scandir])
+])
+
+dnl Unconditionally enables the replacement of <dirent.h>.
+AC_DEFUN([gl_REPLACE_DIRENT_H],
+[
+  dnl This is a no-op, because <dirent.h> is always overridden.
+  :
+])
+
+AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_DIRENT_H_DEFAULTS],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
+  GNULIB_DIRFD=0;       AC_SUBST([GNULIB_DIRFD])
+  GNULIB_FDOPENDIR=0;   AC_SUBST([GNULIB_FDOPENDIR])
+  GNULIB_SCANDIR=0;     AC_SUBST([GNULIB_SCANDIR])
+  GNULIB_ALPHASORT=0;   AC_SUBST([GNULIB_ALPHASORT])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_DIRFD=1;    AC_SUBST([HAVE_DECL_DIRFD])
+  HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR])
+  HAVE_FDOPENDIR=1;     AC_SUBST([HAVE_FDOPENDIR])
+  HAVE_SCANDIR=1;       AC_SUBST([HAVE_SCANDIR])
+  HAVE_ALPHASORT=1;     AC_SUBST([HAVE_ALPHASORT])
+  REPLACE_CLOSEDIR=0;   AC_SUBST([REPLACE_CLOSEDIR])
+  REPLACE_DIRFD=0;      AC_SUBST([REPLACE_DIRFD])
+  REPLACE_FDOPENDIR=0;  AC_SUBST([REPLACE_FDOPENDIR])
+  REPLACE_OPENDIR=0;    AC_SUBST([REPLACE_OPENDIR])
+])
diff --git a/gnulib/m4/dirfd.m4 b/gnulib/m4/dirfd.m4
new file mode 100644 (file)
index 0000000..b8789c2
--- /dev/null
@@ -0,0 +1,81 @@
+# serial 19   -*- Autoconf -*-
+
+dnl Find out how to get the file descriptor associated with an open DIR*.
+
+# Copyright (C) 2001-2006, 2008-2011 Free Software Foundation, Inc.
+# This file 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.
+
+dnl From Jim Meyering
+
+AC_DEFUN([gl_FUNC_DIRFD],
+[
+  AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+  gl_REPLACE_DIRENT_H
+
+  dnl Persuade glibc <dirent.h> to declare dirfd().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_CHECK_FUNCS([dirfd])
+  AC_CHECK_DECLS([dirfd], , ,
+    [#include <sys/types.h>
+     #include <dirent.h>])
+  if test $ac_cv_have_decl_dirfd = no; then
+    HAVE_DECL_DIRFD=0
+  fi
+
+  AC_CACHE_CHECK([whether dirfd is a macro],
+    gl_cv_func_dirfd_macro,
+    [AC_EGREP_CPP([dirent_header_defines_dirfd], [
+#include <sys/types.h>
+#include <dirent.h>
+#ifdef dirfd
+ dirent_header_defines_dirfd
+#endif],
+       gl_cv_func_dirfd_macro=yes,
+       gl_cv_func_dirfd_macro=no)])
+
+  # Use the replacement only if we have no function or macro with that name.
+  if test $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro = no,no; then
+    if test $ac_cv_have_decl_dirfd = yes; then
+      # If the system declares dirfd already, let's declare rpl_dirfd instead.
+      REPLACE_DIRFD=1
+    fi
+    AC_LIBOBJ([dirfd])
+    AC_CACHE_CHECK(
+              [how to get the file descriptor associated with an open DIR*],
+                   gl_cv_sys_dir_fd_member_name,
+      [
+        dirfd_save_CFLAGS=$CFLAGS
+        for ac_expr in d_fd dd_fd; do
+
+          CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
+          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+             #include <sys/types.h>
+             #include <dirent.h>]],
+            [[DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;]])],
+            [dir_fd_found=yes]
+          )
+          CFLAGS=$dirfd_save_CFLAGS
+          test "$dir_fd_found" = yes && break
+        done
+        test "$dir_fd_found" = yes || ac_expr=no_such_member
+
+        gl_cv_sys_dir_fd_member_name=$ac_expr
+      ]
+    )
+    if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
+      AC_DEFINE_UNQUOTED([DIR_FD_MEMBER_NAME],
+        $gl_cv_sys_dir_fd_member_name,
+        [the name of the file descriptor member of DIR])
+    fi
+    AH_VERBATIM(DIR_TO_FD,
+                [#ifdef DIR_FD_MEMBER_NAME
+# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
+#else
+# define DIR_TO_FD(Dir_p) -1
+#endif
+])
+  fi
+])
diff --git a/gnulib/m4/dirname.m4 b/gnulib/m4/dirname.m4
new file mode 100644 (file)
index 0000000..9d5f40d
--- /dev/null
@@ -0,0 +1,25 @@
+#serial 9   -*- autoconf -*-
+dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_DIRNAME],
+[
+  AC_REQUIRE([gl_DIRNAME_LGPL])
+  AC_LIBOBJ([basename])
+  AC_LIBOBJ([dirname])
+])
+
+AC_DEFUN([gl_DIRNAME_LGPL],
+[
+  AC_LIBOBJ([basename-lgpl])
+  AC_LIBOBJ([dirname-lgpl])
+  AC_LIBOBJ([stripslash])
+
+  dnl Prerequisites of lib/dirname.h.
+  AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+
+  dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c,
+  dnl lib/stripslash.c.
+])
diff --git a/gnulib/m4/double-slash-root.m4 b/gnulib/m4/double-slash-root.m4
new file mode 100644 (file)
index 0000000..16a4e3e
--- /dev/null
@@ -0,0 +1,38 @@
+# double-slash-root.m4 serial 4   -*- Autoconf -*-
+dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root],
+    [ if test x"$cross_compiling" = xyes ; then
+        # When cross-compiling, there is no way to tell whether // is special
+        # short of a list of hosts.  However, the only known hosts to date
+        # that have a distinct // are Apollo DomainOS (too old to port to),
+        # Cygwin, and z/OS.  If anyone knows of another system for which // has
+        # special semantics and is distinct from /, please report it to
+        # <bug-gnulib@gnu.org>.
+        case $host in
+          *-cygwin | i370-ibm-openedition)
+            gl_cv_double_slash_root=yes ;;
+          *)
+            # Be optimistic and assume that / and // are the same when we
+            # don't know.
+            gl_cv_double_slash_root='unknown, assuming no' ;;
+        esac
+      else
+        set x `ls -di / // 2>/dev/null`
+        if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then
+          gl_cv_double_slash_root=no
+        else
+          gl_cv_double_slash_root=yes
+        fi
+      fi])
+  if test "$gl_cv_double_slash_root" = yes; then
+    AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1],
+      [Define to 1 if // is a file system root distinct from /.])
+  fi
+])
diff --git a/gnulib/m4/dup2.m4 b/gnulib/m4/dup2.m4
new file mode 100644 (file)
index 0000000..def263b
--- /dev/null
@@ -0,0 +1,70 @@
+#serial 12
+dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_DUP2],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CHECK_FUNCS_ONCE([dup2 fcntl])
+  if test $ac_cv_func_dup2 = no; then
+    HAVE_DUP2=0
+    AC_LIBOBJ([dup2])
+  else
+    AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
+      [AC_RUN_IFELSE([
+         AC_LANG_PROGRAM([[#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>]],
+           [int result = 0;
+#if HAVE_FCNTL
+            if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
+              result |= 1;
+#endif HAVE_FCNTL
+            if (dup2 (1, 1) == 0)
+              result |= 2;
+#if HAVE_FCNTL
+            if (fcntl (1, F_GETFD) != FD_CLOEXEC)
+              result |= 4;
+#endif
+            close (0);
+            if (dup2 (0, 0) != -1)
+              result |= 8;
+            /* Many gnulib modules require POSIX conformance of EBADF.  */
+            if (dup2 (2, 1000000) == -1 && errno != EBADF)
+              result |= 16;
+            return result;
+           ])
+        ],
+        [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
+        [case "$host_os" in
+           mingw*) # on this platform, dup2 always returns 0 for success
+             gl_cv_func_dup2_works=no;;
+           cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+             gl_cv_func_dup2_works=no;;
+           linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
+                   # closed fd may yield -EBADF instead of -1 / errno=EBADF.
+             gl_cv_func_dup2_works=no;;
+           freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
+             gl_cv_func_dup2_works=no;;
+           haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
+             gl_cv_func_dup2_works=no;;
+           *) gl_cv_func_dup2_works=yes;;
+         esac])
+      ])
+    if test "$gl_cv_func_dup2_works" = no; then
+      gl_REPLACE_DUP2
+    fi
+  fi
+])
+
+AC_DEFUN([gl_REPLACE_DUP2],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  if test $ac_cv_func_dup2 = yes; then
+    REPLACE_DUP2=1
+  fi
+  AC_LIBOBJ([dup2])
+])
diff --git a/gnulib/m4/eealloc.m4 b/gnulib/m4/eealloc.m4
new file mode 100644 (file)
index 0000000..3006c48
--- /dev/null
@@ -0,0 +1,32 @@
+# eealloc.m4 serial 2
+dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EEALLOC],
+[
+  AC_REQUIRE([gl_EEMALLOC])
+  AC_REQUIRE([gl_EEREALLOC])
+  AC_REQUIRE([AC_C_INLINE])
+])
+
+AC_DEFUN([gl_EEMALLOC],
+[
+  _AC_FUNC_MALLOC_IF(
+    [gl_cv_func_malloc_0_nonnull=1],
+    [gl_cv_func_malloc_0_nonnull=0])
+  AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull],
+    [If malloc(0) is != NULL, define this to 1.  Otherwise define this
+     to 0.])
+])
+
+AC_DEFUN([gl_EEREALLOC],
+[
+  _AC_FUNC_REALLOC_IF(
+    [gl_cv_func_realloc_0_nonnull=1],
+    [gl_cv_func_realloc_0_nonnull=0])
+  AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull],
+    [If realloc(NULL,0) is != NULL, define this to 1.  Otherwise define this
+     to 0.])
+])
diff --git a/gnulib/m4/environ.m4 b/gnulib/m4/environ.m4
new file mode 100644 (file)
index 0000000..7457ad1
--- /dev/null
@@ -0,0 +1,38 @@
+# environ.m4 serial 5
+dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_ENVIRON],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  dnl Persuade glibc <unistd.h> to declare environ.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
+  if test $gt_cv_var_environ_declaration != yes; then
+    HAVE_DECL_ENVIRON=0
+  fi
+])
+
+# Check if a variable is properly declared.
+# gt_CHECK_VAR_DECL(includes,variable)
+AC_DEFUN([gt_CHECK_VAR_DECL],
+[
+  define([gt_cv_var], [gt_cv_var_]$2[_declaration])
+  AC_MSG_CHECKING([if $2 is properly declared])
+  AC_CACHE_VAL([gt_cv_var], [
+    AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[$1
+           extern struct { int foo; } $2;]],
+         [[$2.foo = 1;]])],
+      [gt_cv_var=no],
+      [gt_cv_var=yes])])
+  AC_MSG_RESULT([$gt_cv_var])
+  if test $gt_cv_var = yes; then
+    AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1,
+              [Define if you have the declaration of $2.])
+  fi
+  undefine([gt_cv_var])
+])
diff --git a/gnulib/m4/errno_h.m4 b/gnulib/m4/errno_h.m4
new file mode 100644 (file)
index 0000000..687baff
--- /dev/null
@@ -0,0 +1,118 @@
+# errno_h.m4 serial 8
+dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
+    AC_EGREP_CPP([booboo],[
+#include <errno.h>
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ESTALE
+booboo
+#endif
+#if !defined EDQUOT
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+      ],
+      [gl_cv_header_errno_h_complete=no],
+      [gl_cv_header_errno_h_complete=yes])
+  ])
+  if test $gl_cv_header_errno_h_complete = yes; then
+    ERRNO_H=''
+  else
+    gl_NEXT_HEADERS([errno.h])
+    ERRNO_H='errno.h'
+  fi
+  AC_SUBST([ERRNO_H])
+  gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
+  gl_REPLACE_ERRNO_VALUE([ENOLINK])
+  gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
+])
+
+# Assuming $1 = EOVERFLOW.
+# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
+# POSIX.  But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and
+# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
+# Check for the value of EOVERFLOW.
+# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
+AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
+[
+  if test -n "$ERRNO_H"; then
+    AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
+      AC_EGREP_CPP([yes],[
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+      ],
+      [gl_cv_header_errno_h_]$1[=yes],
+      [gl_cv_header_errno_h_]$1[=no])
+      if test $gl_cv_header_errno_h_]$1[ = no; then
+        AC_EGREP_CPP([yes],[
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+          ], [gl_cv_header_errno_h_]$1[=hidden])
+        if test $gl_cv_header_errno_h_]$1[ = hidden; then
+          dnl The macro exists but is hidden.
+          dnl Define it to the same value.
+          AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+])
+        fi
+      fi
+    ])
+    case $gl_cv_header_errno_h_]$1[ in
+      yes | no)
+        ]$1[_HIDDEN=0; ]$1[_VALUE=
+        ;;
+      *)
+        ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1["
+        ;;
+    esac
+    AC_SUBST($1[_HIDDEN])
+    AC_SUBST($1[_VALUE])
+  fi
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+  AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
diff --git a/gnulib/m4/error.m4 b/gnulib/m4/error.m4
new file mode 100644 (file)
index 0000000..6ea75ac
--- /dev/null
@@ -0,0 +1,39 @@
+#serial 13
+
+# Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+AC_DEFUN([gl_ERROR],
+[
+  AC_FUNC_ERROR_AT_LINE
+  dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
+  gl_PREREQ_ERROR
+])
+
+# Redefine AC_FUNC_ERROR_AT_LINE, because it is no longer maintained in
+# Autoconf.
+AC_DEFUN([AC_FUNC_ERROR_AT_LINE],
+[
+  AC_LIBSOURCES([error.h, error.c])dnl
+  AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <error.h>]],
+          [[error_at_line (0, 0, "", 0, "an error occurred");]])],
+       [ac_cv_lib_error_at_line=yes],
+       [ac_cv_lib_error_at_line=no])])
+  if test $ac_cv_lib_error_at_line = no; then
+    AC_LIBOBJ([error])
+  fi
+])
+
+# Prerequisites of lib/error.c.
+AC_DEFUN([gl_PREREQ_ERROR],
+[
+  AC_REQUIRE([AC_FUNC_STRERROR_R])
+  AC_REQUIRE([AC_C_INLINE])
+  :
+])
diff --git a/gnulib/m4/euidaccess.m4 b/gnulib/m4/euidaccess.m4
new file mode 100644 (file)
index 0000000..5d0d68d
--- /dev/null
@@ -0,0 +1,53 @@
+# euidaccess.m4 serial 12
+dnl Copyright (C) 2002-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_NONREENTRANT_EUIDACCESS],
+[
+  AC_REQUIRE([gl_FUNC_EUIDACCESS])
+  AC_DEFINE([PREFER_NONREENTRANT_EUIDACCESS], [1],
+    [Define this if you prefer euidaccess to return the correct result
+     even if this would make it nonreentrant.  Define this only if your
+     entire application is safe even if the uid or gid might temporarily
+     change.  If your application uses signal handlers or threads it
+     is probably not safe.])
+])
+
+AC_DEFUN([gl_FUNC_EUIDACCESS],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+  dnl Persuade glibc <unistd.h> to declare euidaccess().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_REPLACE_FUNCS([euidaccess])
+  if test $ac_cv_func_euidaccess = no; then
+    HAVE_EUIDACCESS=0
+    gl_PREREQ_EUIDACCESS
+  fi
+])
+
+# Prerequisites of lib/euidaccess.c.
+AC_DEFUN([gl_PREREQ_EUIDACCESS], [
+  dnl Prefer POSIX faccessat over non-standard euidaccess.
+  AC_CHECK_FUNCS_ONCE([faccessat])
+  dnl Try various other non-standard fallbacks.
+  AC_CHECK_HEADERS_ONCE([libgen.h])
+  AC_CHECK_DECLS_ONCE([setregid])
+  AC_REQUIRE([AC_FUNC_GETGROUPS])
+
+  # Solaris 9 needs -lgen to get the eaccess function.
+  # Save and restore LIBS so -lgen isn't added to it.  Otherwise, *all*
+  # programs in the package would end up linked with that potentially-shared
+  # library, inducing unnecessary run-time overhead.
+  LIB_EACCESS=
+  AC_SUBST([LIB_EACCESS])
+  gl_saved_libs=$LIBS
+    AC_SEARCH_LIBS([eaccess], [gen],
+                   [test "$ac_cv_search_eaccess" = "none required" ||
+                    LIB_EACCESS=$ac_cv_search_eaccess])
+    AC_CHECK_FUNCS([eaccess])
+  LIBS=$gl_saved_libs
+])
diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4
new file mode 100644 (file)
index 0000000..1330503
--- /dev/null
@@ -0,0 +1,118 @@
+# serial 9  -*- Autoconf -*-
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
+# This file 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 definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# Autoconf.  Perhaps we can remove this once we can assume Autoconf
+# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
+# enough in this area it's likely we'll need to redefine
+# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+# If autoconf reports a warning
+#     warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# or  warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# the fix is
+#   1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
+#      but always AC_REQUIREd,
+#   2) to ensure that for each occurrence of
+#        AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+#      or
+#        AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+#      the corresponding gnulib module description has 'extensions' among
+#      its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
+#      invocation occurs in gl_EARLY, not in gl_INIT.
+
+# AC_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+# Remember that #undef in AH_VERBATIM gets replaced with #define by
+# AC_DEFINE.  The goal here is to define all known feature-enabling
+# macros, then, if reports of conflicts are made, disable macros that
+# cause problems on some platforms (such as __EXTENSIONS__).
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
+[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+
+  AC_REQUIRE([AC_CANONICAL_HOST])
+
+  AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+  if test "$MINIX" = yes; then
+    AC_DEFINE([_POSIX_SOURCE], [1],
+      [Define to 1 if you need to in order for `stat' and other
+       things to work.])
+    AC_DEFINE([_POSIX_1_SOURCE], [2],
+      [Define to 2 if the system does not provide POSIX.1 features
+       except with this defined.])
+    AC_DEFINE([_MINIX], [1],
+      [Define to 1 if on MINIX.])
+  fi
+
+  dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
+  dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
+  dnl provided.
+  case "$host_os" in
+    hpux*)
+      AC_DEFINE([_XOPEN_SOURCE], [500],
+        [Define to 500 only on HP-UX.])
+      ;;
+  esac
+
+  AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
+  AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+    [ac_cv_safe_to_define___extensions__],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM([[
+#         define __EXTENSIONS__ 1
+          ]AC_INCLUDES_DEFAULT])],
+       [ac_cv_safe_to_define___extensions__=yes],
+       [ac_cv_safe_to_define___extensions__=no])])
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    AC_DEFINE([__EXTENSIONS__])
+  AC_DEFINE([_ALL_SOURCE])
+  AC_DEFINE([_GNU_SOURCE])
+  AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+  AC_DEFINE([_TANDEM_SOURCE])
+])# AC_USE_SYSTEM_EXTENSIONS
+
+# gl_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
+[
+  dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+  dnl gnulib does not need it. But if it gets required by third-party macros
+  dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+  dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+  dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+  dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+  AC_REQUIRE([AC_GNU_SOURCE])
+
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
diff --git a/gnulib/m4/faccessat.m4 b/gnulib/m4/faccessat.m4
new file mode 100644 (file)
index 0000000..d7ba5ac
--- /dev/null
@@ -0,0 +1,23 @@
+# serial 3
+# See if we need to provide faccessat replacement.
+
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Eric Blake.
+
+AC_DEFUN([gl_FUNC_FACCESSAT],
+[
+  AC_REQUIRE([gl_FUNC_OPENAT])
+  AC_REQUIRE([gl_FUNC_EUIDACCESS])
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_FUNCS_ONCE([access])
+  AC_CHECK_FUNCS_ONCE([faccessat])
+  if test $ac_cv_func_faccessat = no; then
+    HAVE_FACCESSAT=0
+    AC_LIBOBJ([faccessat])
+  fi
+])
diff --git a/gnulib/m4/fchdir.m4 b/gnulib/m4/fchdir.m4
new file mode 100644 (file)
index 0000000..49d89d1
--- /dev/null
@@ -0,0 +1,53 @@
+# fchdir.m4 serial 15
+dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FCHDIR],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
+  AC_CHECK_DECLS_ONCE([fchdir])
+  if test $ac_cv_have_decl_fchdir = no; then
+    HAVE_DECL_FCHDIR=0
+  fi
+
+  AC_CHECK_FUNCS_ONCE([fchdir])
+  if test $ac_cv_func_fchdir = no; then
+    HAVE_FCHDIR=0
+    AC_LIBOBJ([fchdir])
+    gl_PREREQ_FCHDIR
+    AC_DEFINE([REPLACE_FCHDIR], [1],
+      [Define to 1 if gnulib's fchdir() replacement is used.])
+    dnl We must also replace anything that can manipulate a directory fd,
+    dnl to keep our bookkeeping up-to-date.  We don't have to replace
+    dnl fstatat, since no platform has fstatat but lacks fchdir.
+    REPLACE_OPENDIR=1
+    REPLACE_CLOSEDIR=1
+    REPLACE_DUP=1
+    gl_REPLACE_OPEN
+    gl_REPLACE_CLOSE
+    gl_REPLACE_DUP2
+    dnl dup3 is already unconditionally replaced
+    gl_REPLACE_FCNTL
+    gl_REPLACE_DIRENT_H
+    AC_CACHE_CHECK([whether open can visit directories],
+      [gl_cv_func_open_directory_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <fcntl.h>
+]], [return open(".", O_RDONLY) < 0;])],
+        [gl_cv_func_open_directory_works=yes],
+        [gl_cv_func_open_directory_works=no],
+        [gl_cv_func_open_directory_works="guessing no"])])
+    if test "$gl_cv_func_open_directory_works" != yes; then
+      AC_DEFINE([REPLACE_OPEN_DIRECTORY], [1], [Define to 1 if open() should
+work around the inability to open a directory.])
+      REPLACE_FSTAT=1
+    fi
+  fi
+])
+
+# Prerequisites of lib/fchdir.c.
+AC_DEFUN([gl_PREREQ_FCHDIR], [:])
diff --git a/gnulib/m4/fclose.m4 b/gnulib/m4/fclose.m4
new file mode 100644 (file)
index 0000000..278859c
--- /dev/null
@@ -0,0 +1,16 @@
+# fclose.m4 serial 2
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FCLOSE],
+[
+])
+
+AC_DEFUN([gl_REPLACE_FCLOSE],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  REPLACE_FCLOSE=1
+  AC_LIBOBJ([fclose])
+])
diff --git a/gnulib/m4/fcntl-o.m4 b/gnulib/m4/fcntl-o.m4
new file mode 100644 (file)
index 0000000..88db07e
--- /dev/null
@@ -0,0 +1,112 @@
+# fcntl-o.m4 serial 3
+dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
+# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
+# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
+AC_DEFUN([gl_FCNTL_O_FLAGS],
+[
+  dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
+  dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+  dnl AC_GNU_SOURCE.
+  m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+    [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+    [AC_REQUIRE([AC_GNU_SOURCE])])
+  AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <sys/types.h>
+           #include <sys/stat.h>
+           #include <unistd.h>
+           #include <fcntl.h>
+           #ifndef O_NOATIME
+            #define O_NOATIME 0
+           #endif
+           #ifndef O_NOFOLLOW
+            #define O_NOFOLLOW 0
+           #endif
+           static int const constants[] =
+            {
+              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+            };
+          ]],
+          [[
+            int result = !constants;
+            {
+              static char const sym[] = "conftest.sym";
+              if (symlink (".", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              unlink (sym);
+            }
+            {
+              static char const file[] = "confdefs.h";
+              int fd = open (file, O_RDONLY | O_NOATIME);
+              if (fd < 0)
+                result |= 8;
+              else
+                {
+                  struct stat st0;
+                  if (fstat (fd, &st0) != 0)
+                    result |= 16;
+                  else
+                    {
+                      char c;
+                      sleep (1);
+                      if (read (fd, &c, 1) != 1)
+                        result |= 24;
+                      else
+                        {
+                          if (close (fd) != 0)
+                            result |= 32;
+                          else
+                            {
+                              struct stat st1;
+                              if (stat (file, &st1) != 0)
+                                result |= 40;
+                              else
+                                if (st0.st_atime != st1.st_atime)
+                                  result |= 64;
+                            }
+                        }
+                    }
+                }
+            }
+            return result;]])],
+       [gl_cv_header_working_fcntl_h=yes],
+       [case $? in #(
+        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+         *) gl_cv_header_working_fcntl_h='no';;
+        esac],
+       [gl_cv_header_working_fcntl_h=cross-compiling])])
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+  AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
+    [Define to 1 if O_NOATIME works.])
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+  AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
+    [Define to 1 if O_NOFOLLOW works.])
+])
diff --git a/gnulib/m4/fcntl-safer.m4 b/gnulib/m4/fcntl-safer.m4
new file mode 100644 (file)
index 0000000..b120101
--- /dev/null
@@ -0,0 +1,19 @@
+#serial 7
+dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FCNTL_SAFER],
+[
+  AC_LIBOBJ([open-safer])
+  AC_LIBOBJ([creat-safer])
+  # Prerequisites of lib/open-safer.c.
+  AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
+])
+
+AC_DEFUN([gl_OPENAT_SAFER],
+[
+  AC_REQUIRE([gl_FCNTL_SAFER])
+  AC_LIBOBJ([openat-safer])
+])
diff --git a/gnulib/m4/fcntl.m4 b/gnulib/m4/fcntl.m4
new file mode 100644 (file)
index 0000000..a93ed85
--- /dev/null
@@ -0,0 +1,88 @@
+# fcntl.m4 serial 4
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# For now, this module ensures that fcntl()
+# - supports F_DUPFD correctly
+# - supports or emulates F_DUPFD_CLOEXEC
+# - supports F_GETFD
+# Still to be ported to mingw:
+# - F_SETFD
+# - F_GETFL, F_SETFL
+# - F_GETOWN, F_SETOWN
+# - F_GETLK, F_SETLK, F_SETLKW
+AC_DEFUN([gl_FUNC_FCNTL],
+[
+  dnl Persuade glibc to expose F_DUPFD_CLOEXEC.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CHECK_FUNCS_ONCE([fcntl])
+  if test $ac_cv_func_fcntl = no; then
+    gl_REPLACE_FCNTL
+  else
+    dnl cygwin 1.5.x F_DUPFD has wrong errno, and allows negative target
+    dnl haiku alpha 2 F_DUPFD has wrong errno
+    AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly],
+      [gl_cv_func_fcntl_f_dupfd_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <fcntl.h>
+#include <errno.h>
+]], [[int result = 0;
+      if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
+      if (errno != EINVAL) result |= 2;
+      return result;
+         ]])],
+         [gl_cv_func_fcntl_f_dupfd_works=yes],
+         [gl_cv_func_fcntl_f_dupfd_works=no],
+         [# Guess that it works on glibc systems
+          case $host_os in #((
+            *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
+            *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+          esac])])
+    case $gl_cv_func_fcntl_f_dupfd_works in
+      *yes) ;;
+      *) gl_REPLACE_FCNTL
+        AC_DEFINE([FCNTL_DUPFD_BUGGY], [1], [Define this to 1 if F_DUPFD
+          behavior does not match POSIX]) ;;
+    esac
+
+    dnl Many systems lack F_DUPFD_CLOEXEC
+    AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC],
+      [gl_cv_func_fcntl_f_dupfd_cloexec],
+      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <fcntl.h>
+#ifndef F_DUPFD_CLOEXEC
+choke me
+#endif
+         ]])],
+         [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+   it to support the semantics on older kernels that failed with EINVAL.  */
+choke me
+#endif
+           ]])],
+           [gl_cv_func_fcntl_f_dupfd_cloexec=yes],
+           [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])],
+         [gl_cv_func_fcntl_f_dupfd_cloexec=no])])
+    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
+      gl_REPLACE_FCNTL
+      dnl No witness macro needed for this bug.
+    fi
+  fi
+])
+
+AC_DEFUN([gl_REPLACE_FCNTL],
+[
+  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([fcntl])
+  if test $ac_cv_func_fcntl = no; then
+    HAVE_FCNTL=0
+  else
+    REPLACE_FCNTL=1
+  fi
+  AC_LIBOBJ([fcntl])
+])
diff --git a/gnulib/m4/fcntl_h.m4 b/gnulib/m4/fcntl_h.m4
new file mode 100644 (file)
index 0000000..1ef4f45
--- /dev/null
@@ -0,0 +1,43 @@
+# serial 13
+# Configure fcntl.h.
+dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_FCNTL_H],
+[
+  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+  AC_REQUIRE([gl_FCNTL_O_FLAGS])
+  gl_NEXT_HEADERS([fcntl.h])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use, if it is not common
+  dnl enough to be declared everywhere.
+  gl_WARN_ON_USE_PREPARE([[#include <fcntl.h>
+    ]], [fcntl openat])
+])
+
+AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_FCNTL_H_DEFAULTS],
+[
+  GNULIB_FCNTL=0;   AC_SUBST([GNULIB_FCNTL])
+  GNULIB_OPEN=0;    AC_SUBST([GNULIB_OPEN])
+  GNULIB_OPENAT=0;  AC_SUBST([GNULIB_OPENAT])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_FCNTL=1;     AC_SUBST([HAVE_FCNTL])
+  HAVE_OPENAT=1;    AC_SUBST([HAVE_OPENAT])
+  REPLACE_FCNTL=0;  AC_SUBST([REPLACE_FCNTL])
+  REPLACE_OPEN=0;   AC_SUBST([REPLACE_OPEN])
+  REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
+])
diff --git a/gnulib/m4/fdopendir.m4 b/gnulib/m4/fdopendir.m4
new file mode 100644 (file)
index 0000000..f192a62
--- /dev/null
@@ -0,0 +1,49 @@
+# serial 5
+# See if we need to provide fdopendir.
+
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Eric Blake.
+
+AC_DEFUN([gl_FUNC_FDOPENDIR],
+[
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  dnl FreeBSD 7.3 has the function, but failed to declare it.
+  AC_CHECK_DECLS([fdopendir], [], [HAVE_DECL_FDOPENDIR=0], [[
+#include <dirent.h>
+    ]])
+  AC_CHECK_FUNCS_ONCE([fdopendir])
+  if test $ac_cv_func_fdopendir = no; then
+    AC_LIBOBJ([openat-proc])
+    AC_LIBOBJ([fdopendir])
+    gl_REPLACE_DIRENT_H
+    HAVE_FDOPENDIR=0
+  else
+    AC_CACHE_CHECK([whether fdopendir works],
+      [gl_cv_func_fdopendir_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <dirent.h>
+#include <fcntl.h>
+#include <unistd.h>
+#if !HAVE_DECL_FDOPENDIR
+extern DIR *fdopendir (int);
+#endif
+]], [int result = 0;
+     int fd = open ("conftest.c", O_RDONLY);
+     if (fd < 0) result |= 1;
+     if (fdopendir (fd)) result |= 2;
+     if (close (fd)) result |= 4;
+     return result;])],
+         [gl_cv_func_fdopendir_works=yes],
+         [gl_cv_func_fdopendir_works=no],
+         [gl_cv_func_fdopendir_works="guessing no"])])
+    if test "$gl_cv_func_fdopendir_works" != yes; then
+      REPLACE_FDOPENDIR=1
+      gl_REPLACE_DIRENT_H
+      AC_LIBOBJ([fdopendir])
+    fi
+  fi
+])
diff --git a/gnulib/m4/fflush.m4 b/gnulib/m4/fflush.m4
new file mode 100644 (file)
index 0000000..f7645de
--- /dev/null
@@ -0,0 +1,81 @@
+# fflush.m4 serial 8
+
+# Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# This file 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.
+
+dnl From Eric Blake
+
+dnl Find out how to obey POSIX semantics of fflush(stdin) discarding
+dnl unread input on seekable streams, rather than C99 undefined semantics.
+
+AC_DEFUN([gl_FUNC_FFLUSH],
+[
+  AC_CACHE_CHECK([whether fflush works on input streams],
+    [gl_cv_func_fflush_stdin],
+    [echo hello world > conftest.txt
+     AC_RUN_IFELSE([AC_LANG_PROGRAM(
+       [[
+#include <stdio.h>
+#include <unistd.h>
+       ]], [[FILE *f = fopen ("conftest.txt", "r");
+         char buffer[10];
+         int fd;
+         int c;
+         if (f == NULL)
+           return 1;
+         fd = fileno (f);
+         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+           return 2;
+         /* For deterministic results, ensure f read a bigger buffer.  */
+         if (lseek (fd, 0, SEEK_CUR) == 5)
+           return 3;
+         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
+            on BSD systems and on mingw.  */
+         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+           return 4;
+         if (lseek (fd, 0, SEEK_CUR) != 5)
+           return 5;
+         /* Verify behaviour of fflush after ungetc. See
+            <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
+         /* Verify behaviour of fflush after a backup ungetc.  This fails on
+            mingw.  */
+         c = fgetc (f);
+         ungetc (c, f);
+         fflush (f);
+         if (fgetc (f) != c)
+           return 6;
+         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
+            on glibc 2.8 and on BSD systems.  */
+         c = fgetc (f);
+         ungetc ('@', f);
+         fflush (f);
+         if (fgetc (f) != c)
+           return 7;
+         return 0;
+       ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no],
+     [dnl Pessimistically assume fflush is broken.
+      gl_cv_func_fflush_stdin=no])
+     rm conftest.txt
+    ])
+  if test $gl_cv_func_fflush_stdin = no; then
+    gl_REPLACE_FFLUSH
+  fi
+])
+
+AC_DEFUN([gl_REPLACE_FFLUSH],
+[
+  AC_LIBOBJ([fflush])
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  REPLACE_FFLUSH=1
+  gl_PREREQ_FFLUSH
+  gl_REPLACE_FSEEKO
+])
+
+# Prerequisites of lib/fflush.c.
+AC_DEFUN([gl_PREREQ_FFLUSH],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  :
+])
diff --git a/gnulib/m4/fileblocks.m4 b/gnulib/m4/fileblocks.m4
new file mode 100644 (file)
index 0000000..c8f9962
--- /dev/null
@@ -0,0 +1,20 @@
+# fileblocks.m4 serial 5
+dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FILEBLOCKS],
+[
+  AC_STRUCT_ST_BLOCKS
+  dnl Note: AC_STRUCT_ST_BLOCKS does AC_LIBOBJ([fileblocks]).
+  if test $ac_cv_member_struct_stat_st_blocks = no; then
+    gl_PREREQ_FILEBLOCKS
+  fi
+])
+
+# Prerequisites of lib/fileblocks.c.
+AC_DEFUN([gl_PREREQ_FILEBLOCKS], [
+  AC_CHECK_HEADERS_ONCE([sys/param.h])
+  :
+])
diff --git a/gnulib/m4/filemode.m4 b/gnulib/m4/filemode.m4
new file mode 100644 (file)
index 0000000..4147fd0
--- /dev/null
@@ -0,0 +1,12 @@
+# filemode.m4 serial 7
+dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FILEMODE],
+[
+  AC_REQUIRE([AC_STRUCT_ST_DM_MODE])
+  AC_LIBOBJ([filemode])
+  AC_CHECK_DECLS_ONCE([strmode])
+])
diff --git a/gnulib/m4/flexmember.m4 b/gnulib/m4/flexmember.m4
new file mode 100644 (file)
index 0000000..8884cb1
--- /dev/null
@@ -0,0 +1,41 @@
+# serial 2
+# Check for flexible array member support.
+
+# Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER],
+[
+  AC_CACHE_CHECK([for flexible array member],
+    ac_cv_c_flexmember,
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stdlib.h>
+            #include <stdio.h>
+            #include <stddef.h>
+            struct s { int n; double d[]; };]],
+          [[int m = getchar ();
+            struct s *p = malloc (offsetof (struct s, d)
+                                  + m * sizeof (double));
+            p->d[0] = 0.0;
+            return p->d != (double *) NULL;]])],
+       [ac_cv_c_flexmember=yes],
+       [ac_cv_c_flexmember=no])])
+  if test $ac_cv_c_flexmember = yes; then
+    AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [],
+      [Define to nothing if C supports flexible array members, and to
+       1 if it does not.  That way, with a declaration like `struct s
+       { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack
+       can be used with pre-C99 compilers.
+       When computing the size of such an object, don't use 'sizeof (struct s)'
+       as it overestimates the size.  Use 'offsetof (struct s, d)' instead.
+       Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with
+       MSVC and with C++ compilers.])
+  else
+    AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1])
+  fi
+])
diff --git a/gnulib/m4/float_h.m4 b/gnulib/m4/float_h.m4
new file mode 100644 (file)
index 0000000..265a4c1
--- /dev/null
@@ -0,0 +1,19 @@
+# float_h.m4 serial 5
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FLOAT_H],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  FLOAT_H=
+  case "$host_os" in
+    beos* | openbsd* | mirbsd*)
+      FLOAT_H=float.h
+      gl_NEXT_HEADERS([float.h])
+      ;;
+  esac
+  AC_SUBST([FLOAT_H])
+])
diff --git a/gnulib/m4/fnmatch.m4 b/gnulib/m4/fnmatch.m4
new file mode 100644 (file)
index 0000000..9b537a7
--- /dev/null
@@ -0,0 +1,150 @@
+# Check for fnmatch - serial 5.
+
+# Copyright (C) 2000-2007, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# Autoconf defines AC_FUNC_FNMATCH, but that is obsolescent.
+# New applications should use the macros below instead.
+
+# Request a POSIX compliant fnmatch function.
+AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
+[
+  m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX])
+
+  dnl Persuade glibc <fnmatch.h> to declare FNM_CASEFOLD etc.
+  dnl This is only needed if gl_fnmatch_required = GNU. It would be possible
+  dnl to avoid this dependency for gl_FUNC_FNMATCH_POSIX by putting
+  dnl gl_FUNC_FNMATCH_GNU into a separate .m4 file.
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  FNMATCH_H=
+  gl_fnmatch_required_lowercase=`
+    echo $gl_fnmatch_required | tr '[[A-Z]]' '[[a-z]]'
+  `
+  gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
+  AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch],
+    [$gl_fnmatch_cache_var],
+    [dnl Some versions of Solaris, SCO, and the GNU C Library
+     dnl have a broken or incompatible fnmatch.
+     dnl So we run a test program.  If we are cross-compiling, take no chance.
+     dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this
+     dnl test.
+     if test $gl_fnmatch_required = GNU; then
+       gl_fnmatch_gnu_start=
+       gl_fnmatch_gnu_end=
+     else
+       gl_fnmatch_gnu_start='#if 0'
+       gl_fnmatch_gnu_end='#endif'
+     fi
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <fnmatch.h>
+            static int
+            y (char const *pattern, char const *string, int flags)
+            {
+              return fnmatch (pattern, string, flags) == 0;
+            }
+            static int
+            n (char const *pattern, char const *string, int flags)
+            {
+              return fnmatch (pattern, string, flags) == FNM_NOMATCH;
+            }
+          ]],
+          [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
+            char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
+            static char const A_1[] = { 'A' - 1, 0 };
+            static char const A01[] = { 'A' + 1, 0 };
+            static char const a_1[] = { 'a' - 1, 0 };
+            static char const a01[] = { 'a' + 1, 0 };
+            static char const bs_1[] = { '\\\\' - 1, 0 };
+            static char const bs01[] = { '\\\\' + 1, 0 };
+            int result = 0;
+            if (!n ("a*", "", 0))
+              return 1;
+            if (!y ("a*", "abc", 0))
+              return 1;
+            if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
+              return 2;
+            if (!y ("a\\\\bc", "abc", 0))
+              return 3;
+            if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
+              return 3;
+            if (!y ("*x", ".x", 0))
+              return 4;
+            if (!n ("*x", ".x", FNM_PERIOD))
+              return 4;
+            if (!y (Apat, "\\\\", 0))
+              return 5;
+            if (!y (Apat, "A", 0))
+              return 5;
+            if (!y (apat, "\\\\", 0))
+              return 5;
+            if (!y (apat, "a", 0))
+              return 5;
+            if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
+              return 5;
+            if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
+              return 5;
+            if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
+              return 5;
+            if (!(y (apat, a01, 0) == ('a' < '\\\\')))
+              return 5;
+            if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
+              return 5;
+            if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
+              return 5;
+            if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
+              return 5;
+            if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
+              return 5;
+            $gl_fnmatch_gnu_start
+            if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
+              result |= 8;
+            if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
+              result |= 16;
+            if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
+              result |= 32;
+            if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
+              result |= 64;
+            if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
+              result |= 64;
+            if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
+              result |= 64;
+            $gl_fnmatch_gnu_end
+            return result;
+          ]])],
+       [eval "$gl_fnmatch_cache_var=yes"],
+       [eval "$gl_fnmatch_cache_var=no"],
+       [eval "$gl_fnmatch_cache_var=\"guessing no\""])
+    ])
+  eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
+  if test "$gl_fnmatch_result" = yes; then
+    dnl Not strictly necessary. Only to avoid spurious leftover files if people
+    dnl don't do "make distclean".
+    rm -f "$gl_source_base/fnmatch.h"
+  else
+    FNMATCH_H=fnmatch.h
+    AC_LIBOBJ([fnmatch])
+    dnl We must choose a different name for our function, since on ELF systems
+    dnl a broken fnmatch() in libc.so would override our fnmatch() if it is
+    dnl compiled into a shared library.
+    AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch],
+      [Define to a replacement function name for fnmatch().])
+    dnl Prerequisites of lib/fnmatch.c.
+    AC_REQUIRE([AC_TYPE_MBSTATE_T])
+    AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
+    AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
+    AC_CHECK_HEADERS_ONCE([wctype.h])
+  fi
+  AC_SUBST([FNMATCH_H])
+])
+
+# Request a POSIX compliant fnmatch function with GNU extensions.
+AC_DEFUN([gl_FUNC_FNMATCH_GNU],
+[
+  m4_divert_text([INIT_PREPARE], [gl_fnmatch_required=GNU])
+
+  AC_REQUIRE([gl_FUNC_FNMATCH_POSIX])
+])
diff --git a/gnulib/m4/fopen.m4 b/gnulib/m4/fopen.m4
new file mode 100644 (file)
index 0000000..8407ed4
--- /dev/null
@@ -0,0 +1,65 @@
+# fopen.m4 serial 7
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FOPEN],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw* | pw*)
+      dnl Replace fopen, for handling of "/dev/null".
+      REPLACE_FOPEN=1
+      dnl fopen on mingw also has the trailing slash bug.
+      gl_cv_func_fopen_slash="guessing no"
+      ;;
+    *)
+      dnl fopen("foo/", "w") should not create a file when the file name has a
+      dnl trailing slash.
+      AC_CACHE_CHECK([whether fopen recognizes a trailing slash],
+        [gl_cv_func_fopen_slash],
+        [
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#include <stddef.h>
+#include <stdio.h>
+int main ()
+{
+  return fopen ("conftest.sl/", "w") != NULL;
+}]])],
+            [gl_cv_func_fopen_slash=yes],
+            [gl_cv_func_fopen_slash=no],
+            [
+changequote(,)dnl
+             case "$host_os" in
+               aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
+                 gl_cv_func_fopen_slash="guessing no" ;;
+               *)
+                 gl_cv_func_fopen_slash="guessing yes" ;;
+             esac
+changequote([,])dnl
+            ])
+          rm -f conftest.sl
+        ])
+      ;;
+  esac
+  case "$gl_cv_func_fopen_slash" in
+    *no)
+      AC_DEFINE([FOPEN_TRAILING_SLASH_BUG], [1],
+        [Define to 1 if fopen() fails to recognize a trailing slash.])
+      REPLACE_FOPEN=1
+      ;;
+  esac
+  if test $REPLACE_FOPEN = 1; then
+    AC_LIBOBJ([fopen])
+    gl_PREREQ_FOPEN
+  fi
+])
+
+# Prerequisites of lib/fopen.c.
+AC_DEFUN([gl_PREREQ_FOPEN],
+[
+  AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/gnulib/m4/fpending.m4 b/gnulib/m4/fpending.m4
new file mode 100644 (file)
index 0000000..314e003
--- /dev/null
@@ -0,0 +1,83 @@
+# serial 15
+
+# Copyright (C) 2000-2001, 2004-2011 Free Software Foundation, Inc.
+# This file 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.
+
+dnl From Jim Meyering
+dnl Using code from emacs, based on suggestions from Paul Eggert
+dnl and Ulrich Drepper.
+
+dnl Find out how to determine the number of pending output bytes on a stream.
+dnl glibc (2.1.93 and newer) and Solaris provide __fpending.  On other systems,
+dnl we have to grub around in the FILE struct.
+
+AC_DEFUN([gl_FUNC_FPENDING],
+[
+  AC_CHECK_HEADERS_ONCE([stdio_ext.h])
+  AC_CHECK_FUNCS_ONCE([__fpending])
+  fp_headers='
+#     include <stdio.h>
+#     if HAVE_STDIO_EXT_H
+#      include <stdio_ext.h>
+#     endif
+'
+  AC_CHECK_DECLS([__fpending], , , $fp_headers)
+  if test $ac_cv_func___fpending = no; then
+    AC_CACHE_CHECK(
+              [how to determine the number of pending output bytes on a stream],
+                   ac_cv_sys_pending_output_n_bytes,
+      [
+        for ac_expr in                                                    \
+                                                                          \
+            '# glibc2'                                                    \
+            'fp->_IO_write_ptr - fp->_IO_write_base'                      \
+                                                                          \
+            '# traditional Unix'                                          \
+            'fp->_ptr - fp->_base'                                        \
+                                                                          \
+            '# BSD'                                                       \
+            'fp->_p - fp->_bf._base'                                      \
+                                                                          \
+            '# SCO, Unixware'                                             \
+            '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
+                                                                          \
+            '# QNX'                                                       \
+            '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
+                                                                          \
+            '# old glibc?'                                                \
+            'fp->__bufp - fp->__buffer'                                   \
+                                                                          \
+            '# old glibc iostream?'                                       \
+            'fp->_pptr - fp->_pbase'                                      \
+                                                                          \
+            '# emx+gcc'                                                   \
+            'fp->_ptr - fp->_buffer'                                      \
+                                                                          \
+            '# VMS'                                                       \
+            '(*fp)->_ptr - (*fp)->_base'                                  \
+                                                                          \
+            '# e.g., DGUX R4.11; the info is not available'               \
+            1                                                             \
+            ; do
+
+          # Skip each embedded comment.
+          case "$ac_expr" in '#'*) continue;; esac
+
+          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+            [[FILE *fp = stdin; (void) ($ac_expr);]])],
+            [fp_done=yes]
+          )
+          test "$fp_done" = yes && break
+        done
+
+        ac_cv_sys_pending_output_n_bytes=$ac_expr
+      ]
+    )
+    AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES],
+      $ac_cv_sys_pending_output_n_bytes,
+      [the number of pending output bytes on stream `fp'])
+    AC_LIBOBJ([fpending])
+  fi
+])
diff --git a/gnulib/m4/fpurge.m4 b/gnulib/m4/fpurge.m4
new file mode 100644 (file)
index 0000000..a62c2fe
--- /dev/null
@@ -0,0 +1,45 @@
+# fpurge.m4 serial 6
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FPURGE],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([fpurge])
+  AC_CHECK_FUNCS_ONCE([__fpurge])
+  AC_CHECK_DECLS([fpurge], , , [[#include <stdio.h>]])
+  if test "x$ac_cv_func_fpurge" = xyes; then
+    # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
+    AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+]], [FILE *f = fopen ("conftest.txt", "w+");
+        if (!f) return 1;
+        if (fputc ('a', f) != 'a') return 2;
+        rewind (f);
+        if (fgetc (f) != 'a') return 3;
+        if (fgetc (f) != EOF) return 4;
+        if (fpurge (f) != 0) return 5;
+        if (putc ('b', f) != 'b') return 6;
+        if (fclose (f) != 0) return 7;
+        if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
+        if (fgetc (f) != 'a') return 9;
+        if (fgetc (f) != 'b') return 10;
+        if (fgetc (f) != EOF) return 11;
+        if (fclose (f) != 0) return 12;
+        if (remove ("conftest.txt") != 0) return 13;
+        return 0;])],
+      [gl_cv_func_fpurge_works=yes], [gl_cv_func_fpurge_works=no],
+      [gl_cv_func_fpurge_works='guessing no'])])
+    if test "x$gl_cv_func_fpurge_works" != xyes; then
+      REPLACE_FPURGE=1
+      AC_LIBOBJ([fpurge])
+    fi
+  else
+    AC_LIBOBJ([fpurge])
+  fi
+  if test "x$ac_cv_have_decl_fpurge" = xno; then
+    HAVE_DECL_FPURGE=0
+  fi
+])
diff --git a/gnulib/m4/freading.m4 b/gnulib/m4/freading.m4
new file mode 100644 (file)
index 0000000..59d502e
--- /dev/null
@@ -0,0 +1,10 @@
+# freading.m4 serial 1
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FREADING],
+[
+  AC_CHECK_FUNCS_ONCE([__freading])
+])
diff --git a/gnulib/m4/fseeko.m4 b/gnulib/m4/fseeko.m4
new file mode 100644 (file)
index 0000000..76507d1
--- /dev/null
@@ -0,0 +1,75 @@
+# fseeko.m4 serial 11
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FSEEKO],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_REQUIRE([gl_HAVE_FSEEKO])
+  AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+
+  AC_CHECK_DECLS_ONCE([fseeko])
+  if test $ac_cv_have_decl_fseeko = no; then
+    HAVE_DECL_FSEEKO=0
+  fi
+
+  if test $gl_cv_func_fseeko = no; then
+    HAVE_FSEEKO=0
+    gl_REPLACE_FSEEKO
+  else
+    if test $gl_cv_var_stdin_large_offset = no; then
+      gl_REPLACE_FSEEKO
+    fi
+  fi
+])
+
+dnl Tests whether fseeko is available.
+dnl Result is gl_cv_func_fseeko.
+AC_DEFUN([gl_HAVE_FSEEKO],
+[
+  AC_REQUIRE([AC_PROG_CC])
+
+  dnl Persuade glibc <stdio.h> to declare fseeko().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
+    [
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+]], [fseeko (stdin, 0, 0);])],
+        [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
+    ])
+])
+
+AC_DEFUN([gl_REPLACE_FSEEKO],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_REQUIRE([gl_HAVE_FSEEKO])
+  if test $gl_cv_func_fseeko = yes; then
+    REPLACE_FSEEKO=1
+  fi
+  AC_LIBOBJ([fseeko])
+  dnl If we are also using the fseek module, then fseek needs replacing, too.
+  m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK])
+])
+
+dnl Code shared by fseeko and ftello.  Determine if large files are supported,
+dnl but stdin does not start as a large file by default.
+AC_DEFUN([gl_STDIN_LARGE_OFFSET],
+  [
+    AC_CACHE_CHECK([whether stdin defaults to large file offsets],
+      [gl_cv_var_stdin_large_offset],
+      [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+[[#if defined __SL64 && defined __SCLE /* cygwin */
+  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
+     it is easier to do a version check than building a runtime test.  */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+  choke me
+# endif
+#endif]])],
+        [gl_cv_var_stdin_large_offset=yes],
+        [gl_cv_var_stdin_large_offset=no])])
+])
diff --git a/gnulib/m4/fstypename.m4 b/gnulib/m4/fstypename.m4
new file mode 100644 (file)
index 0000000..20d2f05
--- /dev/null
@@ -0,0 +1,23 @@
+#serial 6
+
+dnl From Jim Meyering.
+dnl
+dnl See if struct statfs has the f_fstypename member.
+dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME.
+dnl
+
+# Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2011 Free Software
+# Foundation, Inc.
+# This file 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.
+
+AC_DEFUN([gl_FSTYPENAME],
+[
+  AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,
+    [
+      #include <sys/types.h>
+      #include <sys/param.h>
+      #include <sys/mount.h>
+    ])
+])
diff --git a/gnulib/m4/ftell.m4 b/gnulib/m4/ftell.m4
new file mode 100644 (file)
index 0000000..8d88485
--- /dev/null
@@ -0,0 +1,16 @@
+# ftell.m4 serial 1
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FTELL],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_FTELLO])
+  dnl When ftello needs fixes, ftell needs them too.
+  if test $REPLACE_FTELLO != 0; then
+    AC_LIBOBJ([ftell])
+    REPLACE_FTELL=1
+  fi
+])
diff --git a/gnulib/m4/ftello.m4 b/gnulib/m4/ftello.m4
new file mode 100644 (file)
index 0000000..599f8f2
--- /dev/null
@@ -0,0 +1,135 @@
+# ftello.m4 serial 9
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FTELLO],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+
+  dnl Persuade glibc <stdio.h> to declare ftello().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_CHECK_DECLS_ONCE([ftello])
+  if test $ac_cv_have_decl_ftello = no; then
+    HAVE_DECL_FTELLO=0
+  fi
+
+  AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello],
+    [
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <stdio.h>]],
+           [[ftello (stdin);]])],
+        [gl_cv_func_ftello=yes],
+        [gl_cv_func_ftello=no])
+    ])
+  if test $gl_cv_func_ftello = no; then
+    HAVE_FTELLO=0
+  else
+    if test $gl_cv_var_stdin_large_offset = no; then
+      REPLACE_FTELLO=1
+    else
+      dnl Detect bug on Solaris.
+      dnl ftell and ftello produce incorrect results after putc that followed a
+      dnl getc call that reached EOF on Solaris. This is because the _IOREAD
+      dnl flag does not get cleared in this case, even though _IOWRT gets set,
+      dnl and ftell and ftello look whether the _IOREAD flag is set.
+      AC_REQUIRE([AC_CANONICAL_HOST])
+      AC_CACHE_CHECK([whether ftello works],
+        [gl_cv_func_ftello_works],
+        [
+          dnl Initial guess, used when cross-compiling or when /dev/tty cannot
+          dnl be opened.
+changequote(,)dnl
+          case "$host_os" in
+                      # Guess no on Solaris.
+            solaris*) gl_cv_func_ftello_works="guessing no" ;;
+                      # Guess yes otherwise.
+            *)        gl_cv_func_ftello_works="guessing yes" ;;
+          esac
+changequote([,])dnl
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define TESTFILE "conftest.tmp"
+int
+main (void)
+{
+  FILE *fp;
+
+  /* Create a file with some contents.  */
+  fp = fopen (TESTFILE, "w");
+  if (fp == NULL)
+    return 70;
+  if (fwrite ("foogarsh", 1, 8, fp) < 8)
+    return 71;
+  if (fclose (fp))
+    return 72;
+
+  /* The file's contents is now "foogarsh".  */
+
+  /* Try writing after reading to EOF.  */
+  fp = fopen (TESTFILE, "r+");
+  if (fp == NULL)
+    return 73;
+  if (fseek (fp, -1, SEEK_END))
+    return 74;
+  if (!(getc (fp) == 'h'))
+    return 1;
+  if (!(getc (fp) == EOF))
+    return 2;
+  if (!(ftell (fp) == 8))
+    return 3;
+  if (!(ftell (fp) == 8))
+    return 4;
+  if (!(putc ('!', fp) == '!'))
+    return 5;
+  if (!(ftell (fp) == 9))
+    return 6;
+  if (!(fclose (fp) == 0))
+    return 7;
+  fp = fopen (TESTFILE, "r");
+  if (fp == NULL)
+    return 75;
+  {
+    char buf[10];
+    if (!(fread (buf, 1, 10, fp) == 9))
+      return 10;
+    if (!(memcmp (buf, "foogarsh!", 9) == 0))
+      return 11;
+  }
+  if (!(fclose (fp) == 0))
+    return 12;
+
+  /* The file's contents is now "foogarsh!".  */
+
+  return 0;
+}]])],
+            [gl_cv_func_ftello_works=yes],
+            [gl_cv_func_ftello_works=no], [:])
+        ])
+      case "$gl_cv_func_ftello_works" in
+        *yes) ;;
+        *)
+          REPLACE_FTELLO=1
+          AC_DEFINE([FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE], [1],
+            [Define to 1 if the system's ftello function has the Solaris bug.])
+          ;;
+      esac
+    fi
+  fi
+  if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+    gl_REPLACE_FTELLO
+  fi
+])
+
+AC_DEFUN([gl_REPLACE_FTELLO],
+[
+  AC_LIBOBJ([ftello])
+])
diff --git a/gnulib/m4/fts.m4 b/gnulib/m4/fts.m4
new file mode 100644 (file)
index 0000000..f69b5d9
--- /dev/null
@@ -0,0 +1,27 @@
+#serial 18
+dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FTS],
+[
+  gl_FUNC_FTS_CORE
+])
+
+AC_DEFUN([gl_FUNC_FTS_CORE],
+[
+  dnl Use this version of fts unconditionally, since the GNU libc and
+  dnl NetBSD versions have bugs and/or unnecessary limitations.
+  AC_LIBOBJ([fts])
+
+  dnl Prerequisites of lib/fts.c.
+  AC_REQUIRE([AC_C_INLINE])
+  gl_FUNC_OPENAT
+
+  AC_CHECK_FUNCS_ONCE([fstatfs])
+  AC_CHECK_HEADERS_ONCE([sys/param.h sys/vfs.h])dnl
+  AC_CHECK_MEMBERS([struct statfs.f_type],,,
+    [$ac_includes_default
+     #include <sys/vfs.h>])
+])
diff --git a/gnulib/m4/getcwd-abort-bug.m4 b/gnulib/m4/getcwd-abort-bug.m4
new file mode 100644 (file)
index 0000000..21be828
--- /dev/null
@@ -0,0 +1,106 @@
+# serial 2
+# Determine whether getcwd aborts when the length of the working directory
+# name is unusually large.  Any length between 4k and 16k trigger the bug
+# when using glibc-2.4.90-9 or older.
+
+# Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# From Jim Meyering
+
+# gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG],
+[
+  AC_CHECK_DECLS_ONCE([getcwd])
+  AC_CHECK_FUNCS([getpagesize])
+  AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k],
+    gl_cv_func_getcwd_abort_bug,
+    [# Remove any remnants of a previous test.
+     rm -rf confdir-14B---
+     # Arrange for deletion of the temporary directory this test creates.
+     ac_clean_files="$ac_clean_files confdir-14B---"
+     AC_RUN_IFELSE(
+       [AC_LANG_SOURCE(
+          [[
+#include <stdlib.h>
+#include <unistd.h>
+#include <limits.h>
+#include <string.h>
+#include <sys/stat.h>
+
+/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
+#undef mkdir
+
+#ifndef S_IRWXU
+# define S_IRWXU 0700
+#endif
+
+/* FIXME: skip the run-test altogether on systems without getpagesize.  */
+#if ! HAVE_GETPAGESIZE
+# define getpagesize() 0
+#endif
+
+/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
+   the 16kB pagesize on ia64 linux.  Those conditions make the code below
+   trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
+#define TARGET_LEN (5 * 1024)
+
+int
+main ()
+{
+  char const *dir_name = "confdir-14B---";
+  char *cwd;
+  size_t initial_cwd_len;
+  int fail = 0;
+  size_t desired_depth;
+  size_t d;
+
+  /* The bug is triggered when PATH_MAX < getpagesize (), so skip
+     this relative expensive and invasive test if that's not true.  */
+  if (getpagesize () <= PATH_MAX)
+    return 0;
+
+  cwd = getcwd (NULL, 0);
+  if (cwd == NULL)
+    return 0;
+
+  initial_cwd_len = strlen (cwd);
+  free (cwd);
+  desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
+                   / (1 + strlen (dir_name)));
+  for (d = 0; d < desired_depth; d++)
+    {
+      if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
+        {
+          fail = 3; /* Unable to construct deep hierarchy.  */
+          break;
+        }
+    }
+
+  /* If libc has the bug in question, this invocation of getcwd
+     results in a failed assertion.  */
+  cwd = getcwd (NULL, 0);
+  if (cwd == NULL)
+    fail = 4; /* getcwd failed.  This is ok, and expected.  */
+  free (cwd);
+
+  /* Call rmdir first, in case the above chdir failed.  */
+  rmdir (dir_name);
+  while (0 < d--)
+    {
+      if (chdir ("..") < 0)
+        break;
+      rmdir (dir_name);
+    }
+
+  return 0;
+}
+          ]])],
+    [gl_cv_func_getcwd_abort_bug=no],
+    [gl_cv_func_getcwd_abort_bug=yes],
+    [gl_cv_func_getcwd_abort_bug=yes])
+  ])
+  AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2])
+])
diff --git a/gnulib/m4/getcwd-path-max.m4 b/gnulib/m4/getcwd-path-max.m4
new file mode 100644 (file)
index 0000000..2ab2645
--- /dev/null
@@ -0,0 +1,188 @@
+# serial 15
+# Check for several getcwd bugs with long file names.
+# If so, arrange to compile the wrapper function.
+
+# This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20.
+# I've heard that this is due to a Linux kernel bug, and that it has
+# been fixed between 2.4.21-pre3 and 2.4.21-pre4.  */
+
+# Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# From Jim Meyering
+
+AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX],
+[
+  AC_CHECK_DECLS_ONCE([getcwd])
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CACHE_CHECK([whether getcwd handles long file names properly],
+    gl_cv_func_getcwd_path_max,
+    [# Arrange for deletion of the temporary directory this test creates.
+     ac_clean_files="$ac_clean_files confdir3"
+     AC_RUN_IFELSE(
+       [AC_LANG_SOURCE(
+          [[
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+
+#ifndef AT_FDCWD
+# define AT_FDCWD 0
+#endif
+#ifdef ENAMETOOLONG
+# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
+#else
+# define is_ENAMETOOLONG(x) 0
+#endif
+
+/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
+#undef mkdir
+
+#ifndef S_IRWXU
+# define S_IRWXU 0700
+#endif
+
+/* The length of this name must be 8.  */
+#define DIR_NAME "confdir3"
+#define DIR_NAME_LEN 8
+#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
+
+/* The length of "../".  */
+#define DOTDOTSLASH_LEN 3
+
+/* Leftover bytes in the buffer, to work around library or OS bugs.  */
+#define BUF_SLOP 20
+
+int
+main ()
+{
+#ifndef PATH_MAX
+  /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
+     at least not on a local file system.  And if we were to start worrying
+     about remote file systems, we'd have to enable the wrapper function
+     all of the time, just to be safe.  That's not worth the cost.  */
+  exit (0);
+#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
+        - DIR_NAME_SIZE - BUF_SLOP) \
+       <= PATH_MAX)
+  /* FIXME: Assuming there's a system for which this is true,
+     this should be done in a compile test.  */
+  exit (0);
+#else
+  char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
+           + DIR_NAME_SIZE + BUF_SLOP];
+  char *cwd = getcwd (buf, PATH_MAX);
+  size_t initial_cwd_len;
+  size_t cwd_len;
+  int fail = 0;
+  size_t n_chdirs = 0;
+
+  if (cwd == NULL)
+    exit (10);
+
+  cwd_len = initial_cwd_len = strlen (cwd);
+
+  while (1)
+    {
+      size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
+      char *c = NULL;
+
+      cwd_len += DIR_NAME_SIZE;
+      /* If mkdir or chdir fails, it could be that this system cannot create
+         any file with an absolute name longer than PATH_MAX, such as cygwin.
+         If so, leave fail as 0, because the current working directory can't
+         be too long for getcwd if it can't even be created.  For other
+         errors, be pessimistic and consider that as a failure, too.  */
+      if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
+        {
+          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
+            fail = 20;
+          break;
+        }
+
+      if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
+        {
+          c = getcwd (buf, PATH_MAX);
+          if (!c && errno == ENOENT)
+            {
+              fail = 11;
+              break;
+            }
+          if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno)))
+            {
+              fail = 21;
+              break;
+            }
+        }
+
+      if (dotdot_max <= cwd_len - initial_cwd_len)
+        {
+          if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
+            break;
+          c = getcwd (buf, cwd_len + 1);
+          if (!c)
+            {
+              if (! (errno == ERANGE || errno == ENOENT
+                     || is_ENAMETOOLONG (errno)))
+                {
+                  fail = 22;
+                  break;
+                }
+              if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
+                {
+                  fail = 12;
+                  break;
+                }
+            }
+        }
+
+      if (c && strlen (c) != cwd_len)
+        {
+          fail = 23;
+          break;
+        }
+      ++n_chdirs;
+    }
+
+  /* Leaving behind such a deep directory is not polite.
+     So clean up here, right away, even though the driving
+     shell script would also clean up.  */
+  {
+    size_t i;
+
+    /* Try rmdir first, in case the chdir failed.  */
+    rmdir (DIR_NAME);
+    for (i = 0; i <= n_chdirs; i++)
+      {
+        if (chdir ("..") < 0)
+          break;
+        if (rmdir (DIR_NAME) != 0)
+          break;
+      }
+  }
+
+  exit (fail);
+#endif
+}
+          ]])],
+    [gl_cv_func_getcwd_path_max=yes],
+    [case $? in
+     10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
+     *) gl_cv_func_getcwd_path_max=no;;
+     esac],
+    [gl_cv_func_getcwd_path_max=no])
+  ])
+  case $gl_cv_func_getcwd_path_max in
+  no,*)
+    AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1],
+      [Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
+       setting errno to ERANGE, ENAMETOOLONG, or ENOENT.]);;
+  esac
+])
diff --git a/gnulib/m4/getcwd.m4 b/gnulib/m4/getcwd.m4
new file mode 100644 (file)
index 0000000..7098056
--- /dev/null
@@ -0,0 +1,85 @@
+# getcwd.m4 - check for working getcwd that is compatible with glibc
+
+# Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# Written by Paul Eggert.
+# serial 3
+
+AC_DEFUN([gl_FUNC_GETCWD_NULL],
+  [
+   AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
+     [gl_cv_func_getcwd_null],
+     [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#        include <unistd.h>
+#        ifndef getcwd
+         char *getcwd ();
+#        endif
+]], [[
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* mingw cwd does not start with '/', but getcwd does allocate.  */
+#else
+           if (chdir ("/") != 0)
+             return 1;
+           else
+             {
+               char *f = getcwd (NULL, 0);
+               if (! f)
+                 return 2;
+               if (f[0] != '/')
+                 return 3;
+               if (f[1] != '\0')
+                 return 4;
+               return 0;
+             }
+#endif
+         ]])],
+        [gl_cv_func_getcwd_null=yes],
+        [gl_cv_func_getcwd_null=no],
+        [[
+       case "$host_os" in
+                               # Guess yes on glibc systems.
+         *-gnu*)               gl_cv_func_getcwd_null="guessing yes";;
+                               # Guess yes on Cygwin.
+         cygwin*)              gl_cv_func_getcwd_null="guessing yes";;
+                               # Guess yes on mingw.
+         mingw*)               gl_cv_func_getcwd_null="guessing yes";;
+                               # If we don't know, assume the worst.
+         *)                    gl_cv_func_getcwd_null="guessing no";;
+       esac
+        ]])])
+])
+
+AC_DEFUN([gl_FUNC_GETCWD],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_GETCWD_NULL])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  gl_abort_bug=no
+  case $gl_cv_func_getcwd_null,$host_os in
+  *,mingw*)
+    gl_cv_func_getcwd_path_max=yes;;
+  yes,*)
+    gl_FUNC_GETCWD_PATH_MAX
+    gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]);;
+  esac
+
+  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in
+  *yes,yes,no) ;;
+  *)
+    REPLACE_GETCWD=1
+    AC_LIBOBJ([getcwd])
+    gl_PREREQ_GETCWD;;
+  esac
+])
+
+# Prerequisites of lib/getcwd.c.
+AC_DEFUN([gl_PREREQ_GETCWD],
+[
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
+  :
+])
diff --git a/gnulib/m4/getdelim.m4 b/gnulib/m4/getdelim.m4
new file mode 100644 (file)
index 0000000..ef12736
--- /dev/null
@@ -0,0 +1,90 @@
+# getdelim.m4 serial 8
+
+dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+dnl
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_PREREQ([2.59])
+
+AC_DEFUN([gl_FUNC_GETDELIM],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+
+  dnl Persuade glibc <stdio.h> to declare getdelim().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_CHECK_DECLS_ONCE([getdelim])
+
+  AC_CHECK_FUNCS_ONCE([getdelim])
+  if test $ac_cv_func_getdelim = yes; then
+    dnl Found it in some library.  Verify that it works.
+    AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim],
+    [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#    include <stdio.h>
+#    include <stdlib.h>
+#    include <string.h>
+    int main ()
+    {
+      FILE *in = fopen ("./conftest.data", "r");
+      if (!in)
+        return 1;
+      {
+        /* Test result for a NULL buffer and a zero size.
+           Based on a test program from Karl Heuer.  */
+        char *line = NULL;
+        size_t siz = 0;
+        int len = getdelim (&line, &siz, '\n', in);
+        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
+          return 2;
+      }
+      {
+        /* Test result for a NULL buffer and a non-zero size.
+           This crashes on FreeBSD 8.0.  */
+        char *line = NULL;
+        size_t siz = (size_t)(~0) / 4;
+        if (getdelim (&line, &siz, '\n', in) == -1)
+          return 3;
+      }
+      return 0;
+    }
+    ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works.
+    , [gl_cv_func_working_getdelim=no] dnl The library version does NOT work.
+    , dnl We're cross compiling. Assume it works on glibc2 systems.
+      [AC_EGREP_CPP([Lucky GNU user],
+         [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
+  Lucky GNU user
+ #endif
+#endif
+         ],
+         [gl_cv_func_working_getdelim=yes],
+         [gl_cv_func_working_getdelim=no])]
+    )])
+  else
+    gl_cv_func_working_getdelim=no
+  fi
+
+  if test $ac_cv_have_decl_getdelim = no; then
+    HAVE_DECL_GETDELIM=0
+  fi
+
+  if test $gl_cv_func_working_getdelim = no; then
+    if test $ac_cv_func_getdelim = yes; then
+      REPLACE_GETDELIM=1
+    fi
+    AC_LIBOBJ([getdelim])
+    gl_PREREQ_GETDELIM
+  fi
+])
+
+# Prerequisites of lib/getdelim.c.
+AC_DEFUN([gl_PREREQ_GETDELIM],
+[
+  AC_CHECK_FUNCS([flockfile funlockfile])
+  AC_CHECK_DECLS([getc_unlocked])
+])
diff --git a/gnulib/m4/getdtablesize.m4 b/gnulib/m4/getdtablesize.m4
new file mode 100644 (file)
index 0000000..55bda5a
--- /dev/null
@@ -0,0 +1,15 @@
+# getdtablesize.m4 serial 1
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_GETDTABLESIZE],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([getdtablesize])
+  if test $ac_cv_func_getdtablesize != yes; then
+    HAVE_GETDTABLESIZE=0
+    AC_LIBOBJ([getdtablesize])
+  fi
+])
diff --git a/gnulib/m4/getgroups.m4 b/gnulib/m4/getgroups.m4
new file mode 100644 (file)
index 0000000..8a5547f
--- /dev/null
@@ -0,0 +1,43 @@
+# serial 15
+
+dnl From Jim Meyering.
+dnl A wrapper around AC_FUNC_GETGROUPS.
+
+# Copyright (C) 1996-1997, 1999-2004, 2008-2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+AC_DEFUN([gl_FUNC_GETGROUPS],
+[
+  AC_REQUIRE([AC_FUNC_GETGROUPS])
+  AC_REQUIRE([AC_TYPE_GETGROUPS])
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  if test "$ac_cv_func_getgroups" != yes; then
+    AC_LIBOBJ([getgroups])
+    HAVE_GETGROUPS=0
+  elif test "$ac_cv_func_getgroups_works.$ac_cv_type_getgroups" != yes.gid_t
+  then
+    AC_LIBOBJ([getgroups])
+    REPLACE_GETGROUPS=1
+    AC_DEFINE([GETGROUPS_ZERO_BUG], [1], [Define this to 1 if
+      getgroups(0,NULL) does not return the number of groups.])
+  else
+    dnl Detect FreeBSD bug; POSIX requires getgroups(-1,ptr) to fail.
+    AC_CACHE_CHECK([whether getgroups handles negative values],
+      [gl_cv_func_getgroups_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+        [[int size = getgroups (0, 0);
+          gid_t *list = malloc (size * sizeof *list);
+          return getgroups (-1, list) != -1;]])],
+        [gl_cv_func_getgroups_works=yes],
+        [gl_cv_func_getgroups_works=no],
+        [gl_cv_func_getgroups_works="guessing no"])])
+    if test "$gl_cv_func_getgroups_works" != yes; then
+      AC_LIBOBJ([getgroups])
+      REPLACE_GETGROUPS=1
+    fi
+  fi
+  test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
+])
diff --git a/gnulib/m4/getline.m4 b/gnulib/m4/getline.m4
new file mode 100644 (file)
index 0000000..ec001b9
--- /dev/null
@@ -0,0 +1,97 @@
+# getline.m4 serial 23
+
+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_PREREQ([2.59])
+
+dnl See if there's a working, system-supplied version of the getline function.
+dnl We can't just do AC_REPLACE_FUNCS([getline]) because some systems
+dnl have a function by that name in -linet that doesn't have anything
+dnl to do with the function we need.
+AC_DEFUN([gl_FUNC_GETLINE],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+
+  dnl Persuade glibc <stdio.h> to declare getline().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_CHECK_DECLS_ONCE([getline])
+
+  gl_getline_needs_run_time_check=no
+  AC_CHECK_FUNC([getline],
+                [dnl Found it in some library.  Verify that it works.
+                 gl_getline_needs_run_time_check=yes],
+                [am_cv_func_working_getline=no])
+  if test $gl_getline_needs_run_time_check = yes; then
+    AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline],
+    [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#    include <stdio.h>
+#    include <stdlib.h>
+#    include <string.h>
+    int main ()
+    {
+      FILE *in = fopen ("./conftest.data", "r");
+      if (!in)
+        return 1;
+      {
+        /* Test result for a NULL buffer and a zero size.
+           Based on a test program from Karl Heuer.  */
+        char *line = NULL;
+        size_t siz = 0;
+        int len = getline (&line, &siz, in);
+        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
+          return 2;
+      }
+      {
+        /* Test result for a NULL buffer and a non-zero size.
+           This crashes on FreeBSD 8.0.  */
+        char *line = NULL;
+        size_t siz = (size_t)(~0) / 4;
+        if (getline (&line, &siz, in) == -1)
+          return 3;
+      }
+      return 0;
+    }
+    ]])], [am_cv_func_working_getline=yes] dnl The library version works.
+    , [am_cv_func_working_getline=no] dnl The library version does NOT work.
+    , dnl We're cross compiling. Assume it works on glibc2 systems.
+      [AC_EGREP_CPP([Lucky GNU user],
+         [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
+  Lucky GNU user
+ #endif
+#endif
+         ],
+         [am_cv_func_working_getline=yes],
+         [am_cv_func_working_getline=no])]
+    )])
+  fi
+
+  if test $ac_cv_have_decl_getline = no; then
+    HAVE_DECL_GETLINE=0
+  fi
+
+  if test $am_cv_func_working_getline = no; then
+    dnl Set REPLACE_GETLINE always: Even if we have not found the broken
+    dnl getline function among $LIBS, it may exist in libinet and the
+    dnl executable may be linked with -linet.
+    REPLACE_GETLINE=1
+    AC_LIBOBJ([getline])
+
+    gl_PREREQ_GETLINE
+  fi
+])
+
+# Prerequisites of lib/getline.c.
+AC_DEFUN([gl_PREREQ_GETLINE],
+[
+  gl_FUNC_GETDELIM
+])
diff --git a/gnulib/m4/getopt.m4 b/gnulib/m4/getopt.m4
new file mode 100644 (file)
index 0000000..035a530
--- /dev/null
@@ -0,0 +1,321 @@
+# getopt.m4 serial 34
+dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Request a POSIX compliant getopt function.
+AC_DEFUN([gl_FUNC_GETOPT_POSIX],
+[
+  m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  gl_GETOPT_IFELSE([
+    gl_REPLACE_GETOPT
+  ],
+  [])
+])
+
+# Request a POSIX compliant getopt function with GNU extensions (such as
+# options with optional arguments) and the functions getopt_long,
+# getopt_long_only.
+AC_DEFUN([gl_FUNC_GETOPT_GNU],
+[
+  m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU])
+
+  AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
+])
+
+# Request the gnulib implementation of the getopt functions unconditionally.
+# argp.m4 uses this.
+AC_DEFUN([gl_REPLACE_GETOPT],
+[
+  dnl Arrange for getopt.h to be created.
+  gl_GETOPT_SUBSTITUTE_HEADER
+  dnl Arrange for unistd.h to include getopt.h.
+  GNULIB_UNISTD_H_GETOPT=1
+  dnl Arrange to compile the getopt implementation.
+  AC_LIBOBJ([getopt])
+  AC_LIBOBJ([getopt1])
+  gl_PREREQ_GETOPT
+])
+
+# emacs' configure.in uses this.
+AC_DEFUN([gl_GETOPT_IFELSE],
+[
+  AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
+  AS_IF([test -n "$gl_replace_getopt"], [$1], [$2])
+])
+
+# Determine whether to replace the entire getopt facility.
+AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON
+
+  dnl Persuade Solaris <unistd.h> to declare optarg, optind, opterr, optopt.
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  gl_CHECK_NEXT_HEADERS([getopt.h])
+  if test $ac_cv_header_getopt_h = yes; then
+    HAVE_GETOPT_H=1
+  else
+    HAVE_GETOPT_H=0
+  fi
+  AC_SUBST([HAVE_GETOPT_H])
+
+  gl_replace_getopt=
+
+  dnl Test whether <getopt.h> is available.
+  if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+    AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes])
+  fi
+
+  dnl Test whether the function getopt_long is available.
+  if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+    AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes])
+  fi
+
+  dnl mingw's getopt (in libmingwex.a) does weird things when the options
+  dnl strings starts with '+' and it's not the first call.  Some internal state
+  dnl is left over from earlier calls, and neither setting optind = 0 nor
+  dnl setting optreset = 1 get rid of this internal state.
+  dnl POSIX is silent on optind vs. optreset, so we allow either behavior.
+  dnl POSIX 2008 does not specify leading '+' behavior, but see
+  dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on
+  dnl the next version of POSIX.  For now, we only guarantee leading '+'
+  dnl behavior with getopt-gnu.
+  if test -z "$gl_replace_getopt"; then
+    AC_CACHE_CHECK([whether getopt is POSIX compatible],
+      [gl_cv_func_getopt_posix],
+      [
+        dnl BSD getopt_long uses an incompatible method to reset
+        dnl option processing.  Existence of the variable, in and of
+        dnl itself, is not a reason to replace getopt, but knowledge
+        dnl of the variable is needed to determine how to reset and
+        dnl whether a reset reparses the environment.  Solaris
+        dnl supports neither optreset nor optind=0, but keeps no state
+        dnl that needs a reset beyond setting optind=1; detect Solaris
+        dnl by getopt_clip.
+        AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#include <unistd.h>]],
+             [[int *p = &optreset; return optreset;]])],
+          [gl_optind_min=1],
+          [AC_COMPILE_IFELSE(
+             [AC_LANG_PROGRAM(
+                [[#include <getopt.h>]],
+                [[return !getopt_clip;]])],
+             [gl_optind_min=1],
+             [gl_optind_min=0])])
+
+        dnl This test fails on mingw and succeeds on many other platforms.
+        gl_save_CPPFLAGS=$CPPFLAGS
+        CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+main ()
+{
+  {
+    int argc = 0;
+    char *argv[10];
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-a";
+    argv[argc++] = "foo";
+    argv[argc++] = "bar";
+    argv[argc] = NULL;
+    optind = OPTIND_MIN;
+    opterr = 0;
+
+    c = getopt (argc, argv, "ab");
+    if (!(c == 'a'))
+      return 1;
+    c = getopt (argc, argv, "ab");
+    if (!(c == -1))
+      return 2;
+    if (!(optind == 2))
+      return 3;
+  }
+  /* Some internal state exists at this point.  */
+  {
+    int argc = 0;
+    char *argv[10];
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "donald";
+    argv[argc++] = "-p";
+    argv[argc++] = "billy";
+    argv[argc++] = "duck";
+    argv[argc++] = "-a";
+    argv[argc++] = "bar";
+    argv[argc] = NULL;
+    optind = OPTIND_MIN;
+    opterr = 0;
+
+    c = getopt (argc, argv, "+abp:q:");
+    if (!(c == -1))
+      return 4;
+    if (!(strcmp (argv[0], "program") == 0))
+      return 5;
+    if (!(strcmp (argv[1], "donald") == 0))
+      return 6;
+    if (!(strcmp (argv[2], "-p") == 0))
+      return 7;
+    if (!(strcmp (argv[3], "billy") == 0))
+      return 8;
+    if (!(strcmp (argv[4], "duck") == 0))
+      return 9;
+    if (!(strcmp (argv[5], "-a") == 0))
+      return 10;
+    if (!(strcmp (argv[6], "bar") == 0))
+      return 11;
+    if (!(optind == 1))
+      return 12;
+  }
+  /* Detect MacOS 10.5, AIX 7.1 bug.  */
+  {
+    char *argv[3] = { "program", "-ab", NULL };
+    optind = OPTIND_MIN;
+    opterr = 0;
+    if (getopt (2, argv, "ab:") != 'a')
+      return 13;
+    if (getopt (2, argv, "ab:") != '?')
+      return 14;
+    if (optopt != 'b')
+      return 15;
+    if (optind != 2)
+      return 16;
+  }
+
+  return 0;
+}
+]])],
+          [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no],
+          [case "$host_os" in
+             mingw*)         gl_cv_func_getopt_posix="guessing no";;
+             darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
+             *)              gl_cv_func_getopt_posix="guessing yes";;
+           esac
+          ])
+        CPPFLAGS=$gl_save_CPPFLAGS
+      ])
+    case "$gl_cv_func_getopt_posix" in
+      *no) gl_replace_getopt=yes ;;
+    esac
+  fi
+
+  if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+    AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu],
+      [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
+       # optstring is necessary for programs like m4 that have POSIX-mandated
+       # semantics for supporting options interspersed with files.
+       # Also, since getopt_long is a GNU extension, we require optind=0.
+       # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
+       # so take care to revert to the correct (non-)export state.
+dnl GNU Coding Standards currently allow awk but not env; besides, env
+dnl is ambiguous with environment values that contain newlines.
+       gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
+       case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
+         xx) gl_had_POSIXLY_CORRECT=exported ;;
+         x)  gl_had_POSIXLY_CORRECT=yes      ;;
+         *)  gl_had_POSIXLY_CORRECT=         ;;
+       esac
+       POSIXLY_CORRECT=1
+       export POSIXLY_CORRECT
+       AC_RUN_IFELSE(
+        [AC_LANG_PROGRAM([[#include <getopt.h>
+                           #include <stddef.h>
+                           #include <string.h>
+           ]], [[
+             int result = 0;
+             /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
+                and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+                OSF/1 5.1, Solaris 10.  */
+             {
+               char *myargv[3];
+               myargv[0] = "conftest";
+               myargv[1] = "-+";
+               myargv[2] = 0;
+               opterr = 0;
+               if (getopt (2, myargv, "+a") != '?')
+                 result |= 1;
+             }
+             /* This code succeeds on glibc 2.8, mingw,
+                and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+                IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
+             {
+               char *argv[] = { "program", "-p", "foo", "bar", NULL };
+
+               optind = 1;
+               if (getopt (4, argv, "p::") != 'p')
+                 result |= 2;
+               else if (optarg != NULL)
+                 result |= 4;
+               else if (getopt (4, argv, "p::") != -1)
+                 result |= 6;
+               else if (optind != 2)
+                 result |= 8;
+             }
+             /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
+             {
+               char *argv[] = { "program", "foo", "-p", NULL };
+               optind = 0;
+               if (getopt (3, argv, "-p") != 1)
+                 result |= 16;
+               else if (getopt (3, argv, "-p") != 'p')
+                 result |= 32;
+             }
+             /* This code fails on glibc 2.11.  */
+             {
+               char *argv[] = { "program", "-b", "-a", NULL };
+               optind = opterr = 0;
+               if (getopt (3, argv, "+:a:b") != 'b')
+                 result |= 64;
+               else if (getopt (3, argv, "+:a:b") != ':')
+                 result |= 64;
+             }
+             return result;
+           ]])],
+        [gl_cv_func_getopt_gnu=yes],
+        [gl_cv_func_getopt_gnu=no],
+        [dnl Cross compiling. Guess based on host and declarations.
+         case $host_os:$ac_cv_have_decl_optreset in
+           *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
+           *:yes)               gl_cv_func_getopt_gnu=no;;
+           *)                   gl_cv_func_getopt_gnu=yes;;
+         esac
+        ])
+       case $gl_had_POSIXLY_CORRECT in
+         exported) ;;
+         yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;;
+         *) AS_UNSET([POSIXLY_CORRECT]) ;;
+       esac
+      ])
+    if test "$gl_cv_func_getopt_gnu" = "no"; then
+      gl_replace_getopt=yes
+    fi
+  fi
+])
+
+# emacs' configure.in uses this.
+AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
+[
+  GETOPT_H=getopt.h
+  AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
+    [Define to rpl_ if the getopt replacement functions and variables
+     should be used.])
+  AC_SUBST([GETOPT_H])
+])
+
+# Prerequisites of lib/getopt*.
+# emacs' configure.in uses this.
+AC_DEFUN([gl_PREREQ_GETOPT],
+[
+  AC_CHECK_DECLS_ONCE([getenv])
+])
diff --git a/gnulib/m4/getpagesize.m4 b/gnulib/m4/getpagesize.m4
new file mode 100644 (file)
index 0000000..79dfbbe
--- /dev/null
@@ -0,0 +1,33 @@
+# getpagesize.m4 serial 8
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_GETPAGESIZE],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CHECK_FUNCS([getpagesize])
+  if test $ac_cv_func_getpagesize = no; then
+    HAVE_GETPAGESIZE=0
+    AC_CHECK_HEADERS([OS.h])
+    if test $ac_cv_header_OS_h = yes; then
+      HAVE_OS_H=1
+    fi
+    AC_CHECK_HEADERS([sys/param.h])
+    if test $ac_cv_header_sys_param_h = yes; then
+      HAVE_SYS_PARAM_H=1
+    fi
+  fi
+  case "$host_os" in
+    mingw*)
+      REPLACE_GETPAGESIZE=1
+      AC_LIBOBJ([getpagesize])
+      ;;
+  esac
+  dnl Also check whether it's declared.
+  dnl mingw has getpagesize() in libgcc.a but doesn't declare it.
+  AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0])
+])
diff --git a/gnulib/m4/gettext.m4 b/gnulib/m4/gettext.m4
new file mode 100644 (file)
index 0000000..cab4dfc
--- /dev/null
@@ -0,0 +1,401 @@
+# gettext.m4 serial 64 (gettext-0.18.2)
+dnl Copyright (C) 1995-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl    default (if it is not specified or empty) is 'no-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.  If NEEDSYMBOL is specified and is
+dnl    'need-formatstring-macros', then GNU gettext implementations that don't
+dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries.  If empty,
+dnl    the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+  dnl Argument checking.
+  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+  ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
+    [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
+  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+  define([gt_included_intl],
+    ifelse([$1], [external],
+      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+      [yes]))
+  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+  gt_NEEDS_INIT
+  AM_GNU_GETTEXT_NEED([$2])
+
+  AC_REQUIRE([AM_PO_SUBDIRS])dnl
+  ifelse(gt_included_intl, yes, [
+    AC_REQUIRE([AM_INTL_SUBDIR])dnl
+  ])
+
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Sometimes libintl requires libiconv, so first search for libiconv.
+  dnl Ideally we would do this search only after the
+  dnl      if test "$USE_NLS" = "yes"; then
+  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl the configure script would need to contain the same shell code
+  dnl again, outside any 'if'. There are two solutions:
+  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+  dnl documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+  gt_INTL_MACOSX
+
+  dnl Set USE_NLS.
+  AC_REQUIRE([AM_NLS])
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  dnl Add a version number to the cache macros.
+  case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+  dnl If we use NLS figure out what method
+  if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+    ifelse(gt_included_intl, yes, [
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH([included-gettext],
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+    ])
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+         [AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+               ]],
+               [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+               ]])],
+            [eval "$gt_func_gnugettext_libc=yes"],
+            [eval "$gt_func_gnugettext_libc=no"])])
+
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+          dnl Sometimes libintl requires libiconv, so first search for libiconv.
+          ifelse(gt_included_intl, yes, , [
+            AM_ICONV_LINK
+          ])
+          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+          dnl even if libiconv doesn't exist.
+          AC_LIB_LINKFLAGS_BODY([intl])
+          AC_CACHE_CHECK([for GNU gettext in libintl],
+            [$gt_func_gnugettext_libintl],
+           [gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+            dnl Now see whether libintl exists and does not depend on libiconv.
+            AC_LINK_IFELSE(
+              [AC_LANG_PROGRAM(
+                 [[
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+                 ]],
+                 [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+                 ]])],
+              [eval "$gt_func_gnugettext_libintl=yes"],
+              [eval "$gt_func_gnugettext_libintl=no"])
+            dnl Now see whether libintl exists and depends on libiconv.
+            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              AC_LINK_IFELSE(
+                [AC_LANG_PROGRAM(
+                   [[
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+                   ]],
+                   [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+                   ]])],
+                [LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 eval "$gt_func_gnugettext_libintl=yes"
+                ])
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"])
+        fi
+
+        dnl If an already present or preinstalled GNU gettext() is found,
+        dnl use it.  But if this macro is used in GNU gettext, and GNU
+        dnl gettext is already preinstalled in libintl, we update this
+        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+          dnl Reset the values set by searching for libintl.
+          LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+    ifelse(gt_included_intl, yes, [
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+          dnl GNU gettext is not found in the C library.
+          dnl Fall back on included GNU gettext library.
+          nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions to use GNU gettext tools.
+        CATOBJEXT=.gmo
+      fi
+    ])
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Some extra flags are needed during linking.
+        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+      AC_DEFINE([ENABLE_NLS], [1],
+        [Define to 1 if translation of program messages to the user's native language
+   is requested.])
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  AC_MSG_CHECKING([whether to use NLS])
+  AC_MSG_RESULT([$USE_NLS])
+  if test "$USE_NLS" = "yes"; then
+    AC_MSG_CHECKING([where the gettext function comes from])
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    AC_MSG_RESULT([$gt_source])
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        AC_MSG_CHECKING([how to link with libintl])
+        AC_MSG_RESULT([$LIBINTL])
+        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+      fi
+
+      dnl For backward compatibility. Some packages may be using this.
+      AC_DEFINE([HAVE_GETTEXT], [1],
+       [Define if the GNU gettext() function is already present or preinstalled.])
+      AC_DEFINE([HAVE_DCGETTEXT], [1],
+       [Define if the GNU dcgettext() function is already present or preinstalled.])
+    fi
+
+    dnl We need to process the po/ directory.
+    POSUB=po
+  fi
+
+  ifelse(gt_included_intl, yes, [
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST([BUILD_INCLUDED_LIBINTL])
+    AC_SUBST([USE_INCLUDED_LIBINTL])
+    AC_SUBST([CATOBJEXT])
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST([DATADIRNAME])
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST([INSTOBJEXT])
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST([GENCAT])
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+    AC_SUBST([INTLOBJS])
+
+    dnl Enable libtool support if the surrounding package wishes it.
+    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+    AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
+  ])
+
+  dnl For backward compatibility. Some Makefiles may be using this.
+  INTLLIBS="$LIBINTL"
+  AC_SUBST([INTLLIBS])
+
+  dnl Make all documented variables known to autoconf.
+  AC_SUBST([LIBINTL])
+  AC_SUBST([LTLIBINTL])
+  AC_SUBST([POSUB])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+  m4_divert_text([DEFAULTS], [gt_needs=])
+  m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/gnulib/m4/gettime.m4 b/gnulib/m4/gettime.m4
new file mode 100644 (file)
index 0000000..2b148ab
--- /dev/null
@@ -0,0 +1,15 @@
+# gettime.m4 serial 7
+dnl Copyright (C) 2002, 2004-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_GETTIME],
+[
+  AC_LIBOBJ([gettime])
+
+  dnl Prerequisites of lib/gettime.c.
+  AC_REQUIRE([gl_CLOCK_TIME])
+  AC_REQUIRE([gl_TIMESPEC])
+  AC_CHECK_FUNCS_ONCE([gettimeofday nanotime])
+])
diff --git a/gnulib/m4/gettimeofday.m4 b/gnulib/m4/gettimeofday.m4
new file mode 100644 (file)
index 0000000..84acadf
--- /dev/null
@@ -0,0 +1,120 @@
+# serial 15
+
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+dnl From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([gettimeofday])
+
+  gl_gettimeofday_timezone=void
+  if test $ac_cv_func_gettimeofday != yes; then
+    HAVE_GETTIMEOFDAY=0
+    AC_LIBOBJ([gettimeofday])
+    gl_PREREQ_GETTIMEOFDAY
+  else
+    gl_FUNC_GETTIMEOFDAY_CLOBBER
+    AC_CACHE_CHECK([for gettimeofday with POSIX signature],
+      [gl_cv_func_gettimeofday_posix_signature],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <sys/time.h>
+              struct timeval c;
+              int gettimeofday (struct timeval *restrict, void *restrict);
+            ]],
+            [[/* glibc uses struct timezone * rather than the POSIX void *
+                 if _GNU_SOURCE is defined.  However, since the only portable
+                 use of gettimeofday uses NULL as the second parameter, and
+                 since the glibc definition is actually more typesafe, it is
+                 not worth wrapping this to get a compliant signature.  */
+              int (*f) (struct timeval *restrict, void *restrict)
+                = gettimeofday;
+              int x = f (&c, 0);
+              return !(x | c.tv_sec | c.tv_usec);
+            ]])],
+          [gl_cv_func_gettimeofday_posix_signature=yes],
+          [AC_COMPILE_IFELSE(
+            [AC_LANG_PROGRAM(
+              [[#include <sys/time.h>
+int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+              ]])],
+            [gl_cv_func_gettimeofday_posix_signature=almost],
+            [gl_cv_func_gettimeofday_posix_signature=no])])])
+    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
+      gl_gettimeofday_timezone='struct timezone'
+    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
+      REPLACE_GETTIMEOFDAY=1
+      AC_LIBOBJ([gettimeofday])
+      gl_PREREQ_GETTIMEOFDAY
+    fi
+  fi
+  AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
+    [Define this to 'void' or 'struct timezone' to match the system's
+     declaration of the second argument to gettimeofday.])
+])
+
+
+dnl See if gettimeofday clobbers the static buffer that localtime uses
+dnl for its return value.  The gettimeofday function from Mac OS X 10.0.4
+dnl (i.e., Darwin 1.3.7) has this problem.
+dnl
+dnl If it does, then arrange to use gettimeofday and localtime only via
+dnl the wrapper functions that work around the problem.
+
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
+[
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+
+ AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
+  [gl_cv_func_gettimeofday_clobber],
+  [AC_RUN_IFELSE(
+     [AC_LANG_PROGRAM(
+        [[#include <string.h>
+          #include <sys/time.h>
+          #include <time.h>
+          #include <stdlib.h>
+        ]],
+        [[
+          time_t t = 0;
+          struct tm *lt;
+          struct tm saved_lt;
+          struct timeval tv;
+          lt = localtime (&t);
+          saved_lt = *lt;
+          gettimeofday (&tv, NULL);
+          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+        ]])],
+     [gl_cv_func_gettimeofday_clobber=no],
+     [gl_cv_func_gettimeofday_clobber=yes],
+     dnl When crosscompiling, assume it is broken.
+     [gl_cv_func_gettimeofday_clobber=yes])])
+
+ if test $gl_cv_func_gettimeofday_clobber = yes; then
+   REPLACE_GETTIMEOFDAY=1
+   gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+   AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
+     [Define if gettimeofday clobbers the localtime buffer.])
+ fi
+])
+
+AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
+  AC_LIBOBJ([gettimeofday])
+  gl_PREREQ_GETTIMEOFDAY
+  AC_DEFINE([gmtime], [rpl_gmtime],
+    [Define to rpl_gmtime if the replacement function should be used.])
+  AC_DEFINE([localtime], [rpl_localtime],
+    [Define to rpl_localtime if the replacement function should be used.])
+])
+
+# Prerequisites of lib/gettimeofday.c.
+AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [
+  AC_CHECK_HEADERS([sys/timeb.h])
+  AC_CHECK_FUNCS([_ftime])
+])
diff --git a/gnulib/m4/getugroups.m4 b/gnulib/m4/getugroups.m4
new file mode 100644 (file)
index 0000000..2483db6
--- /dev/null
@@ -0,0 +1,12 @@
+# getugroups.m4 serial 8
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_GETUGROUPS],
+[
+  AC_LIBOBJ([getugroups])
+  AC_CHECK_HEADERS_ONCE([grp.h])
+])
diff --git a/gnulib/m4/glibc21.m4 b/gnulib/m4/glibc21.m4
new file mode 100644 (file)
index 0000000..bc81c11
--- /dev/null
@@ -0,0 +1,34 @@
+# glibc21.m4 serial 5
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.1 or newer, or uClibc.
+# From Bruno Haible.
+
+AC_DEFUN([gl_GLIBC21],
+  [
+    AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc],
+      [ac_cv_gnu_library_2_1],
+      [AC_EGREP_CPP([Lucky],
+        [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+#ifdef __UCLIBC__
+ Lucky user
+#endif
+        ],
+        [ac_cv_gnu_library_2_1=yes],
+        [ac_cv_gnu_library_2_1=no])
+      ]
+    )
+    AC_SUBST([GLIBC21])
+    GLIBC21="$ac_cv_gnu_library_2_1"
+  ]
+)
diff --git a/gnulib/m4/gnulib-cache.m4 b/gnulib/m4/gnulib-cache.m4
new file mode 100644 (file)
index 0000000..c47e233
--- /dev/null
@@ -0,0 +1,135 @@
+# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+#
+# This file represents the specification of how gnulib-tool is used.
+# It acts as a cache: It is written and read by gnulib-tool.
+# In projects that use version control, this file is meant to be put under
+# version control, like the configure.ac and various Makefile.am files.
+
+
+# Specification in the form of a command-line invocation:
+#   gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-libtool --macro-prefix=gl alloca areadlinkat argmatch assert c-strcasestr c-strstr canonicalize cloexec closein closeout ctype d-type dirent-safer dirname errno error faccessat fchdir fcntl fdl fdopendir fflush fileblocks filemode fnmatch-gnu fopen-safer fts getdelim getline getopt-gnu gettext gettimeofday gpl-3.0 hash human idcache inline inttypes isblank locale lstat maintainer-makefile malloc math mbrtowc mbscasestr mbsstr mktime modechange modf mountlist open parse-datetime pathmax perror progname quotearg readlink realloc regex rpmatch save-cwd savedir selinux-at snprintf stat stat-macros stat-time stdarg stdbool stddef stdint stdio stdlib stpcpy strcasestr strdup-posix strftime string strtol strtoul strtoull strtoumax sys_stat sys_time sys_wait timespec update-copyright verify version-etc version-etc-fsf warnings wchar wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno
+
+# Specification in the form of a few gnulib-tool.m4 macro invocations:
+gl_LOCAL_DIR([gnulib-local])
+gl_MODULES([
+  alloca
+  areadlinkat
+  argmatch
+  assert
+  c-strcasestr
+  c-strstr
+  canonicalize
+  cloexec
+  closein
+  closeout
+  ctype
+  d-type
+  dirent-safer
+  dirname
+  errno
+  error
+  faccessat
+  fchdir
+  fcntl
+  fdl
+  fdopendir
+  fflush
+  fileblocks
+  filemode
+  fnmatch-gnu
+  fopen-safer
+  fts
+  getdelim
+  getline
+  getopt-gnu
+  gettext
+  gettimeofday
+  gpl-3.0
+  hash
+  human
+  idcache
+  inline
+  inttypes
+  isblank
+  locale
+  lstat
+  maintainer-makefile
+  malloc
+  math
+  mbrtowc
+  mbscasestr
+  mbsstr
+  mktime
+  modechange
+  modf
+  mountlist
+  open
+  parse-datetime
+  pathmax
+  perror
+  progname
+  quotearg
+  readlink
+  realloc
+  regex
+  rpmatch
+  save-cwd
+  savedir
+  selinux-at
+  snprintf
+  stat
+  stat-macros
+  stat-time
+  stdarg
+  stdbool
+  stddef
+  stdint
+  stdio
+  stdlib
+  stpcpy
+  strcasestr
+  strdup-posix
+  strftime
+  string
+  strtol
+  strtoul
+  strtoull
+  strtoumax
+  sys_stat
+  sys_time
+  sys_wait
+  timespec
+  update-copyright
+  verify
+  version-etc
+  version-etc-fsf
+  warnings
+  wchar
+  wcwidth
+  xalloc
+  xalloc-die
+  xgetcwd
+  xstrtod
+  xstrtol
+  xstrtoumax
+  yesno
+])
+gl_AVOID([])
+gl_SOURCE_BASE([gnulib/lib])
+gl_M4_BASE([gnulib/m4])
+gl_PO_BASE([])
+gl_DOC_BASE([doc])
+gl_TESTS_BASE([tests])
+gl_WITH_TESTS
+gl_LIB([libgnulib])
+gl_MAKEFILE_NAME([])
+gl_MACRO_PREFIX([gl])
+gl_PO_DOMAIN([])
diff --git a/gnulib/m4/gnulib-common.m4 b/gnulib/m4/gnulib-common.m4
new file mode 100644 (file)
index 0000000..c4d7a20
--- /dev/null
@@ -0,0 +1,235 @@
+# gnulib-common.m4 serial 24
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_COMMON
+# is expanded unconditionally through gnulib-tool magic.
+AC_DEFUN([gl_COMMON], [
+  dnl Use AC_REQUIRE here, so that the code is expanded once only.
+  AC_REQUIRE([gl_00GNULIB])
+  AC_REQUIRE([gl_COMMON_BODY])
+])
+AC_DEFUN([gl_COMMON_BODY], [
+  AH_VERBATIM([isoc99_inline],
+[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+   the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+   earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+   __APPLE__ && __MACH__ test for MacOS X.
+   __APPLE_CC__ tests for the Apple compiler and its version.
+   __STDC_VERSION__ tests for the C99 mode.  */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif])
+  AH_VERBATIM([unused_parameter],
+[/* Define as a marker that can be attached to declarations that might not
+    be used.  This helps to reduce warnings, such as from
+    GCC -Wunused-parameter.  */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_UNUSED
+#endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+   is a misnomer outside of parameter lists.  */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
+])
+  dnl Preparation for running test programs:
+  dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
+  dnl to /dev/tty, so they can be redirected to log files.  Such diagnostics
+  dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N.
+  LIBC_FATAL_STDERR_=1
+  export LIBC_FATAL_STDERR_
+])
+
+# gl_MODULE_INDICATOR_CONDITION
+# expands to a C preprocessor expression that evaluates to 1 or 0, depending
+# whether a gnulib module that has been requested shall be considered present
+# or not.
+AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
+# sets the shell variable that indicates the presence of the given module to
+# a C preprocessor expression that will evaluate to 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
+[
+  GNULIB_[]m4_translit([[$1]],
+    [abcdefghijklmnopqrstuvwxyz./-],
+    [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION
+])
+
+# gl_MODULE_INDICATOR([modulename])
+# defines a C macro indicating the presence of the given module
+# in a location where it can be used.
+#                                             |  Value  |   Value   |
+#                                             | in lib/ | in tests/ |
+# --------------------------------------------+---------+-----------+
+# Module present among main modules:          |    1    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module present among tests-related modules: |    0    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module not present at all:                  |    0    |     0     |
+# --------------------------------------------+---------+-----------+
+AC_DEFUN([gl_MODULE_INDICATOR],
+[
+  AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]],
+      [abcdefghijklmnopqrstuvwxyz./-],
+      [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]),
+    [gl_MODULE_INDICATOR_CONDITION],
+    [Define to a C preprocessor expression that evaluates to 1 or 0,
+     depending whether the gnulib module $1 shall be considered present.])
+])
+
+# gl_MODULE_INDICATOR_FOR_TESTS([modulename])
+# defines a C macro indicating the presence of the given module
+# in lib or tests. This is useful to determine whether the module
+# should be tested.
+#                                             |  Value  |   Value   |
+#                                             | in lib/ | in tests/ |
+# --------------------------------------------+---------+-----------+
+# Module present among main modules:          |    1    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module present among tests-related modules: |    1    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module not present at all:                  |    0    |     0     |
+# --------------------------------------------+---------+-----------+
+AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
+[
+  AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]],
+      [abcdefghijklmnopqrstuvwxyz./-],
+      [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
+    [Define to 1 when the gnulib module $1 should be tested.])
+])
+
+# gl_ASSERT_NO_GNULIB_POSIXCHECK
+# asserts that there will never be a need to #define GNULIB_POSIXCHECK.
+# and thereby enables an optimization of configure and config.h.
+# Used by Emacs.
+AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK],
+[
+  dnl Override gl_WARN_ON_USE_PREPARE.
+  dnl But hide this definition from 'aclocal'.
+  AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], [])
+])
+
+# gl_ASSERT_NO_GNULIB_TESTS
+# asserts that there will be no gnulib tests in the scope of the configure.ac
+# and thereby enables an optimization of config.h.
+# Used by Emacs.
+AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS],
+[
+  dnl Override gl_MODULE_INDICATOR_FOR_TESTS.
+  AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [])
+])
+
+# Test whether <features.h> exists.
+# Set HAVE_FEATURES_H.
+AC_DEFUN([gl_FEATURES_H],
+[
+  AC_CHECK_HEADERS_ONCE([features.h])
+  if test $ac_cv_header_features_h = yes; then
+    HAVE_FEATURES_H=1
+  else
+    HAVE_FEATURES_H=0
+  fi
+  AC_SUBST([HAVE_FEATURES_H])
+])
+
+# m4_foreach_w
+# is a backport of autoconf-2.59c's m4_foreach_w.
+# Remove this macro when we can assume autoconf >= 2.60.
+m4_ifndef([m4_foreach_w],
+  [m4_define([m4_foreach_w],
+    [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
+
+# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
+# ----------------------------------------------------
+# Backport of autoconf-2.63b's macro.
+# Remove this macro when we can assume autoconf >= 2.64.
+m4_ifndef([AS_VAR_IF],
+[m4_define([AS_VAR_IF],
+[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
+
+# AC_PROG_MKDIR_P
+# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
+# for interoperability with automake-1.9.6 from autoconf-2.62.
+# Remove this macro when we can assume autoconf >= 2.62 or
+# autoconf >= 2.60 && automake >= 1.10.
+m4_ifdef([AC_PROG_MKDIR_P], [
+  dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
+  m4_define([AC_PROG_MKDIR_P],
+    m4_defn([AC_PROG_MKDIR_P])[
+    AC_SUBST([MKDIR_P])])], [
+  dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P.
+  AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
+    [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+     MKDIR_P='$(mkdir_p)'
+     AC_SUBST([MKDIR_P])])])
+
+# AC_C_RESTRICT
+# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
+# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
+# works.
+# This definition can be removed once autoconf >= 2.62 can be assumed.
+m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[
+AC_DEFUN([AC_C_RESTRICT],
+[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
+  [ac_cv_c_restrict=no
+   # The order here caters to the fact that C++ does not require restrict.
+   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+     AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+      [[typedef int * int_ptr;
+        int foo (int_ptr $ac_kw ip) {
+        return ip[0];
+       }]],
+      [[int s[1];
+        int * $ac_kw t = s;
+        t[0] = 0;
+        return foo(t)]])],
+      [ac_cv_c_restrict=$ac_kw])
+     test "$ac_cv_c_restrict" != no && break
+   done
+  ])
+ AH_VERBATIM([restrict],
+[/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict, even
+   though the corresponding Sun C compiler does, which causes
+   "#define restrict _Restrict" in the previous line.  Perhaps some future
+   version of Sun C++ will work with _Restrict; if so, it'll probably
+   define __RESTRICT, just as Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+#endif])
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) AC_DEFINE([restrict], []) ;;
+   *)  AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
+ esac
+])
+])
+
+# gl_BIGENDIAN
+# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
+# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some
+# macros invoke AC_C_BIGENDIAN with arguments.
+AC_DEFUN([gl_BIGENDIAN],
+[
+  AC_C_BIGENDIAN
+])
+
+# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
+# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
+# output a spurious "(cached)" mark in the midst of other configure output.
+# This macro should be used instead of AC_CACHE_VAL when it is not surrounded
+# by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
+AC_DEFUN([gl_CACHE_VAL_SILENT],
+[
+  saved_as_echo_n="$as_echo_n"
+  as_echo_n=':'
+  AC_CACHE_VAL([$1], [$2])
+  as_echo_n="$saved_as_echo_n"
+])
diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4
new file mode 100644 (file)
index 0000000..2886193
--- /dev/null
@@ -0,0 +1,1978 @@
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+#
+# This file represents the compiled summary of the specification in
+# gnulib-cache.m4. It lists the computed macro invocations that need
+# to be invoked from configure.ac.
+# In projects that use version control, this file can be treated like
+# other built files.
+
+
+# This macro should be invoked from ./configure.ac, in the section
+# "Checks for programs", right after AC_PROG_CC, and certainly before
+# any checks for libraries, header files, types and library functions.
+AC_DEFUN([gl_EARLY],
+[
+  m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
+  m4_pattern_allow([^gl_ES$])dnl a valid locale name
+  m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
+  m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
+  AC_REQUIRE([AC_PROG_RANLIB])
+  AC_REQUIRE([AM_PROG_CC_C_O])
+  # Code from module alloca:
+  # Code from module alloca-opt:
+  # Code from module alloca-opt-tests:
+  # Code from module areadlink:
+  # Code from module areadlink-tests:
+  # Code from module areadlink-with-size:
+  # Code from module areadlink-with-size-tests:
+  # Code from module areadlinkat:
+  # Code from module areadlinkat-tests:
+  # Code from module arg-nonnull:
+  # Code from module argmatch:
+  # Code from module argmatch-tests:
+  # Code from module assert:
+  # Code from module binary-io:
+  # Code from module binary-io-tests:
+  # Code from module bitrotate:
+  # Code from module bitrotate-tests:
+  # Code from module btowc:
+  # Code from module btowc-tests:
+  # Code from module c++defs:
+  # Code from module c-ctype:
+  # Code from module c-ctype-tests:
+  # Code from module c-strcase:
+  # Code from module c-strcase-tests:
+  # Code from module c-strcasestr:
+  # Code from module c-strcasestr-tests:
+  # Code from module c-strstr:
+  # Code from module c-strstr-tests:
+  # Code from module canonicalize:
+  # Code from module canonicalize-tests:
+  # Code from module chdir-long:
+  # Code from module chown:
+  # Code from module chown-tests:
+  # Code from module clock-time:
+  # Code from module cloexec:
+  # Code from module cloexec-tests:
+  # Code from module close:
+  # Code from module close-hook:
+  # Code from module close-stream:
+  # Code from module closein:
+  # Code from module closein-tests:
+  # Code from module closeout:
+  # Code from module configmake:
+  # Code from module ctype:
+  # Code from module ctype-tests:
+  # Code from module cycle-check:
+  # Code from module d-ino:
+  # Code from module d-type:
+  # Code from module dev-ino:
+  # Code from module dirent:
+  # Code from module dirent-safer:
+  # Code from module dirent-safer-tests:
+  # Code from module dirent-tests:
+  # Code from module dirfd:
+  # Code from module dirname:
+  # Code from module dirname-lgpl:
+  # Code from module dirname-tests:
+  # Code from module dosname:
+  # Code from module double-slash-root:
+  # Code from module dup2:
+  # Code from module dup2-tests:
+  # Code from module environ:
+  # Code from module environ-tests:
+  # Code from module errno:
+  # Code from module errno-tests:
+  # Code from module error:
+  # Code from module euidaccess:
+  # Code from module exitfail:
+  # Code from module extensions:
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  # Code from module faccessat:
+  # Code from module fchdir:
+  # Code from module fchdir-tests:
+  # Code from module fclose:
+  # Code from module fcntl:
+  # Code from module fcntl-h:
+  # Code from module fcntl-h-tests:
+  # Code from module fcntl-safer:
+  # Code from module fcntl-safer-tests:
+  # Code from module fcntl-tests:
+  # Code from module fd-safer-flag:
+  # Code from module fdl:
+  # Code from module fdopendir:
+  # Code from module fdopendir-tests:
+  # Code from module fflush:
+  AC_REQUIRE([AC_FUNC_FSEEKO])
+  # Code from module fflush-tests:
+  # Code from module file-set:
+  # Code from module fileblocks:
+  # Code from module filemode:
+  # Code from module flexmember:
+  # Code from module float:
+  # Code from module fnmatch:
+  # Code from module fnmatch-gnu:
+  # Code from module fnmatch-tests:
+  # Code from module fopen:
+  # Code from module fopen-safer:
+  # Code from module fopen-safer-tests:
+  # Code from module fopen-tests:
+  # Code from module fpending:
+  # Code from module fpending-tests:
+  # Code from module fpurge:
+  # Code from module fpurge-tests:
+  # Code from module freadahead:
+  # Code from module freadahead-tests:
+  # Code from module freading:
+  # Code from module freading-tests:
+  # Code from module fseeko:
+  AC_REQUIRE([AC_FUNC_FSEEKO])
+  # Code from module fseeko-tests:
+  # Code from module ftell:
+  # Code from module ftell-tests:
+  # Code from module ftello:
+  AC_REQUIRE([AC_FUNC_FSEEKO])
+  # Code from module ftello-tests:
+  # Code from module fts:
+  # Code from module getcwd:
+  # Code from module getcwd-tests:
+  # Code from module getdelim:
+  # Code from module getdelim-tests:
+  # Code from module getdtablesize:
+  # Code from module getdtablesize-tests:
+  # Code from module getgroups:
+  # Code from module getgroups-tests:
+  # Code from module getline:
+  # Code from module getline-tests:
+  # Code from module getopt-gnu:
+  # Code from module getopt-posix:
+  # Code from module getopt-posix-tests:
+  # Code from module getpagesize:
+  # Code from module gettext:
+  # Code from module gettext-h:
+  # Code from module gettime:
+  # Code from module gettimeofday:
+  # Code from module gettimeofday-tests:
+  # Code from module getugroups:
+  # Code from module gnumakefile:
+  # Code from module gpl-3.0:
+  # Code from module group-member:
+  # Code from module hash:
+  # Code from module hash-pjw:
+  # Code from module hash-tests:
+  # Code from module hash-triple:
+  # Code from module havelib:
+  # Code from module human:
+  # Code from module i-ring:
+  # Code from module i-ring-tests:
+  # Code from module idcache:
+  # Code from module ignore-value:
+  # Code from module ignore-value-tests:
+  # Code from module include_next:
+  # Code from module inline:
+  # Code from module intprops:
+  # Code from module inttostr:
+  # Code from module inttostr-tests:
+  # Code from module inttypes:
+  # Code from module inttypes-tests:
+  # Code from module isblank:
+  # Code from module isblank-tests:
+  # Code from module iswblank:
+  # Code from module iswblank-tests:
+  # Code from module langinfo:
+  # Code from module langinfo-tests:
+  # Code from module lchown:
+  # Code from module lchown-tests:
+  # Code from module localcharset:
+  # Code from module locale:
+  # Code from module locale-tests:
+  # Code from module localename:
+  # Code from module localename-tests:
+  # Code from module lock:
+  # Code from module lock-tests:
+  # Code from module lseek:
+  # Code from module lseek-tests:
+  # Code from module lstat:
+  # Code from module lstat-tests:
+  # Code from module maintainer-makefile:
+  # Code from module malloc:
+  # Code from module malloc-gnu:
+  # Code from module malloc-gnu-tests:
+  # Code from module malloc-posix:
+  # Code from module malloca:
+  # Code from module malloca-tests:
+  # Code from module math:
+  # Code from module math-tests:
+  # Code from module mbchar:
+  # Code from module mbrtowc:
+  # Code from module mbrtowc-tests:
+  # Code from module mbscasestr:
+  # Code from module mbscasestr-tests:
+  # Code from module mbsinit:
+  # Code from module mbsinit-tests:
+  # Code from module mbslen:
+  # Code from module mbsrtowcs:
+  # Code from module mbsrtowcs-tests:
+  # Code from module mbsstr:
+  # Code from module mbsstr-tests:
+  # Code from module mbtowc:
+  # Code from module mbuiter:
+  # Code from module memchr:
+  # Code from module memchr-tests:
+  # Code from module mempcpy:
+  # Code from module memrchr:
+  # Code from module memrchr-tests:
+  # Code from module mgetgroups:
+  # Code from module mkdir:
+  # Code from module mkdir-tests:
+  # Code from module mktime:
+  # Code from module modechange:
+  # Code from module modf:
+  # Code from module modf-tests:
+  # Code from module mountlist:
+  # Code from module multiarch:
+  # Code from module nl_langinfo:
+  # Code from module nl_langinfo-tests:
+  # Code from module open:
+  # Code from module open-tests:
+  # Code from module openat:
+  # Code from module openat-die:
+  # Code from module openat-safer:
+  # Code from module openat-safer-tests:
+  # Code from module openat-tests:
+  # Code from module parse-datetime:
+  # Code from module parse-datetime-tests:
+  # Code from module pathmax:
+  # Code from module perror:
+  # Code from module perror-tests:
+  # Code from module priv-set:
+  # Code from module priv-set-tests:
+  # Code from module progname:
+  # Code from module putenv:
+  # Code from module quote:
+  # Code from module quotearg:
+  # Code from module quotearg-simple:
+  # Code from module quotearg-simple-tests:
+  # Code from module readlink:
+  # Code from module readlink-tests:
+  # Code from module readlinkat:
+  # Code from module readlinkat-tests:
+  # Code from module realloc:
+  # Code from module realloc-gnu:
+  # Code from module realloc-gnu-tests:
+  # Code from module realloc-posix:
+  # Code from module regex:
+  # Code from module rmdir:
+  # Code from module rmdir-tests:
+  # Code from module rpmatch:
+  # Code from module same:
+  # Code from module same-inode:
+  # Code from module save-cwd:
+  # Code from module savedir:
+  # Code from module selinux-at:
+  # Code from module selinux-h:
+  # Code from module setenv:
+  # Code from module setenv-tests:
+  # Code from module setlocale:
+  # Code from module setlocale-tests:
+  # Code from module size_max:
+  # Code from module sleep:
+  # Code from module sleep-tests:
+  # Code from module snprintf:
+  # Code from module snprintf-tests:
+  # Code from module ssize_t:
+  # Code from module stat:
+  # Code from module stat-macros:
+  # Code from module stat-tests:
+  # Code from module stat-time:
+  # Code from module stat-time-tests:
+  # Code from module stdarg:
+  dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
+  dnl for the builtin va_copy to work.  With Autoconf 2.60 or later,
+  dnl AC_PROG_CC_STDC arranges for this.  With older Autoconf AC_PROG_CC_STDC
+  dnl shouldn't hurt, though installers are on their own to set c99 mode.
+  AC_REQUIRE([AC_PROG_CC_STDC])
+  # Code from module stdbool:
+  # Code from module stdbool-tests:
+  # Code from module stddef:
+  # Code from module stddef-tests:
+  # Code from module stdint:
+  # Code from module stdint-tests:
+  # Code from module stdio:
+  # Code from module stdio-tests:
+  # Code from module stdlib:
+  # Code from module stdlib-tests:
+  # Code from module stpcpy:
+  # Code from module strcase:
+  # Code from module strcasestr:
+  # Code from module strcasestr-simple:
+  # Code from module strcasestr-tests:
+  # Code from module strdup-posix:
+  # Code from module streq:
+  # Code from module strerror:
+  # Code from module strerror-tests:
+  # Code from module strftime:
+  # Code from module strftime-tests:
+  # Code from module string:
+  # Code from module string-tests:
+  # Code from module strings:
+  # Code from module strings-tests:
+  # Code from module strndup:
+  # Code from module strnlen:
+  # Code from module strnlen-tests:
+  # Code from module strnlen1:
+  # Code from module strstr:
+  # Code from module strstr-simple:
+  # Code from module strstr-tests:
+  # Code from module strtoimax:
+  # Code from module strtol:
+  # Code from module strtoll:
+  # Code from module strtoul:
+  # Code from module strtoull:
+  # Code from module strtoumax:
+  # Code from module symlink:
+  # Code from module symlink-tests:
+  # Code from module symlinkat:
+  # Code from module symlinkat-tests:
+  # Code from module sys_stat:
+  # Code from module sys_stat-tests:
+  # Code from module sys_time:
+  # Code from module sys_time-tests:
+  # Code from module sys_wait:
+  # Code from module sys_wait-tests:
+  # Code from module thread:
+  # Code from module threadlib:
+  gl_THREADLIB_EARLY
+  # Code from module time:
+  # Code from module time-tests:
+  # Code from module time_r:
+  # Code from module timespec:
+  # Code from module unistd:
+  # Code from module unistd-safer:
+  # Code from module unistd-safer-tests:
+  # Code from module unistd-tests:
+  # Code from module unitypes:
+  # Code from module uniwidth/base:
+  # Code from module uniwidth/width:
+  # Code from module uniwidth/width-tests:
+  # Code from module unlink:
+  # Code from module unlink-tests:
+  # Code from module unlinkdir:
+  # Code from module unsetenv:
+  # Code from module unsetenv-tests:
+  # Code from module unused-parameter:
+  # Code from module update-copyright:
+  # Code from module update-copyright-tests:
+  # Code from module useless-if-before-free:
+  # Code from module usleep:
+  # Code from module usleep-tests:
+  # Code from module vasnprintf:
+  # Code from module vasnprintf-tests:
+  # Code from module vc-list-files:
+  # Code from module vc-list-files-tests:
+  # Code from module verify:
+  # Code from module verify-tests:
+  # Code from module version-etc:
+  # Code from module version-etc-fsf:
+  # Code from module version-etc-tests:
+  # Code from module warn-on-use:
+  # Code from module warnings:
+  # Code from module wchar:
+  # Code from module wchar-tests:
+  # Code from module wcrtomb:
+  # Code from module wcrtomb-tests:
+  # Code from module wctob:
+  # Code from module wctomb:
+  # Code from module wctype-h:
+  # Code from module wctype-h-tests:
+  # Code from module wcwidth:
+  # Code from module wcwidth-tests:
+  # Code from module xalloc:
+  # Code from module xalloc-die:
+  # Code from module xalloc-die-tests:
+  # Code from module xgetcwd:
+  # Code from module xsize:
+  # Code from module xstrndup:
+  # Code from module xstrtod:
+  # Code from module xstrtol:
+  # Code from module xstrtol-tests:
+  # Code from module xstrtoumax:
+  # Code from module xstrtoumax-tests:
+  # Code from module yesno:
+  # Code from module yesno-tests:
+  # Code from module yield:
+])
+
+# This macro should be invoked from ./configure.ac, in the section
+# "Check for header files, types and library functions".
+AC_DEFUN([gl_INIT],
+[
+  AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
+  gl_cond_libtool=false
+  gl_libdeps=
+  gl_ltlibdeps=
+  gl_m4_base='gnulib/m4'
+  m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
+  m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
+  m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
+  m4_pushdef([gl_LIBSOURCES_LIST], [])
+  m4_pushdef([gl_LIBSOURCES_DIR], [])
+  gl_COMMON
+  gl_source_base='gnulib/lib'
+  # Code from module alloca:
+  # Code from module alloca-opt:
+  gl_FUNC_ALLOCA
+  # Code from module areadlink:
+  # Code from module areadlink-with-size:
+  # Code from module areadlinkat:
+  gl_MODULE_INDICATOR([areadlinkat])
+  # Code from module arg-nonnull:
+  # Code from module argmatch:
+  gl_ARGMATCH
+  # Code from module assert:
+  gl_ASSERT
+  # Code from module bitrotate:
+  AC_REQUIRE([AC_C_INLINE])
+  # Code from module btowc:
+  gl_FUNC_BTOWC
+  gl_WCHAR_MODULE_INDICATOR([btowc])
+  # Code from module c++defs:
+  # Code from module c-ctype:
+  # Code from module c-strcase:
+  # Code from module c-strcasestr:
+  # Code from module c-strstr:
+  # Code from module canonicalize:
+  gl_FUNC_CANONICALIZE_FILENAME_MODE
+  gl_MODULE_INDICATOR([canonicalize])
+  gl_MODULE_INDICATOR_FOR_TESTS([canonicalize])
+  gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
+  # Code from module chdir-long:
+  gl_FUNC_CHDIR_LONG
+  # Code from module chown:
+  gl_FUNC_CHOWN
+  gl_UNISTD_MODULE_INDICATOR([chown])
+  # Code from module clock-time:
+  gl_CLOCK_TIME
+  # Code from module cloexec:
+  gl_CLOEXEC
+  gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
+  # Code from module close:
+  gl_FUNC_CLOSE
+  gl_UNISTD_MODULE_INDICATOR([close])
+  # Code from module close-hook:
+  # Code from module close-stream:
+  gl_CLOSE_STREAM
+  gl_MODULE_INDICATOR([close-stream])
+  # Code from module closein:
+  gl_CLOSEIN
+  # Code from module closeout:
+  gl_CLOSEOUT
+  # Code from module configmake:
+  gl_CONFIGMAKE_PREP
+  # Code from module ctype:
+  gl_CTYPE_H
+  # Code from module cycle-check:
+  gl_CYCLE_CHECK
+  # Code from module d-ino:
+  gl_CHECK_TYPE_STRUCT_DIRENT_D_INO
+  # Code from module d-type:
+  gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
+  # Code from module dev-ino:
+  # Code from module dirent:
+  gl_DIRENT_H
+  # Code from module dirent-safer:
+  gl_DIRENT_SAFER
+  gl_MODULE_INDICATOR([dirent-safer])
+  # Code from module dirfd:
+  gl_FUNC_DIRFD
+  gl_DIRENT_MODULE_INDICATOR([dirfd])
+  # Code from module dirname:
+  gl_DIRNAME
+  gl_MODULE_INDICATOR([dirname])
+  # Code from module dirname-lgpl:
+  gl_DIRNAME_LGPL
+  # Code from module dosname:
+  # Code from module double-slash-root:
+  gl_DOUBLE_SLASH_ROOT
+  # Code from module dup2:
+  gl_FUNC_DUP2
+  gl_UNISTD_MODULE_INDICATOR([dup2])
+  # Code from module environ:
+  gl_ENVIRON
+  gl_UNISTD_MODULE_INDICATOR([environ])
+  # Code from module errno:
+  gl_HEADER_ERRNO_H
+  # Code from module error:
+  gl_ERROR
+  m4_ifdef([AM_XGETTEXT_OPTION],
+    [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
+     AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+  # Code from module euidaccess:
+  gl_FUNC_EUIDACCESS
+  gl_UNISTD_MODULE_INDICATOR([euidaccess])
+  # Code from module exitfail:
+  # Code from module extensions:
+  # Code from module faccessat:
+  gl_FUNC_FACCESSAT
+  gl_MODULE_INDICATOR([faccessat])
+  gl_UNISTD_MODULE_INDICATOR([faccessat])
+  # Code from module fchdir:
+  gl_FUNC_FCHDIR
+  gl_UNISTD_MODULE_INDICATOR([fchdir])
+  # Code from module fclose:
+  gl_FUNC_FCLOSE
+  gl_STDIO_MODULE_INDICATOR([fclose])
+  # Code from module fcntl:
+  gl_FUNC_FCNTL
+  gl_FCNTL_MODULE_INDICATOR([fcntl])
+  # Code from module fcntl-h:
+  gl_FCNTL_H
+  # Code from module fcntl-safer:
+  gl_FCNTL_SAFER
+  gl_MODULE_INDICATOR([fcntl-safer])
+  # Code from module fdl:
+  # Code from module fdopendir:
+  gl_FUNC_FDOPENDIR
+  gl_DIRENT_MODULE_INDICATOR([fdopendir])
+  gl_MODULE_INDICATOR([fdopendir])
+  # Code from module fflush:
+  gl_FUNC_FFLUSH
+  gl_STDIO_MODULE_INDICATOR([fflush])
+  # Code from module file-set:
+  # Code from module fileblocks:
+  gl_FILEBLOCKS
+  # Code from module filemode:
+  gl_FILEMODE
+  # Code from module flexmember:
+  AC_C_FLEXIBLE_ARRAY_MEMBER
+  # Code from module float:
+  gl_FLOAT_H
+  # Code from module fnmatch:
+  gl_FUNC_FNMATCH_POSIX
+  # Code from module fnmatch-gnu:
+  gl_FUNC_FNMATCH_GNU
+  # Code from module fopen:
+  gl_FUNC_FOPEN
+  gl_STDIO_MODULE_INDICATOR([fopen])
+  # Code from module fopen-safer:
+  gl_FOPEN_SAFER
+  gl_MODULE_INDICATOR([fopen-safer])
+  # Code from module fpending:
+  gl_FUNC_FPENDING
+  # Code from module fpurge:
+  gl_FUNC_FPURGE
+  gl_STDIO_MODULE_INDICATOR([fpurge])
+  # Code from module freadahead:
+  # Code from module freading:
+  gl_FUNC_FREADING
+  # Code from module fseeko:
+  gl_FUNC_FSEEKO
+  gl_STDIO_MODULE_INDICATOR([fseeko])
+  # Code from module ftello:
+  gl_FUNC_FTELLO
+  gl_STDIO_MODULE_INDICATOR([ftello])
+  # Code from module fts:
+  gl_FUNC_FTS
+  # Code from module getcwd:
+  gl_FUNC_GETCWD
+  gl_UNISTD_MODULE_INDICATOR([getcwd])
+  # Code from module getdelim:
+  gl_FUNC_GETDELIM
+  gl_STDIO_MODULE_INDICATOR([getdelim])
+  # Code from module getdtablesize:
+  gl_FUNC_GETDTABLESIZE
+  gl_UNISTD_MODULE_INDICATOR([getdtablesize])
+  # Code from module getgroups:
+  gl_FUNC_GETGROUPS
+  gl_UNISTD_MODULE_INDICATOR([getgroups])
+  # Code from module getline:
+  gl_FUNC_GETLINE
+  gl_STDIO_MODULE_INDICATOR([getline])
+  # Code from module getopt-gnu:
+  gl_FUNC_GETOPT_GNU
+  gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
+  # Code from module getopt-posix:
+  gl_FUNC_GETOPT_POSIX
+  # Code from module gettext:
+  dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
+  AM_GNU_GETTEXT_VERSION([0.18.1])
+  # Code from module gettext-h:
+  AC_SUBST([LIBINTL])
+  AC_SUBST([LTLIBINTL])
+  # Code from module gettime:
+  gl_GETTIME
+  # Code from module gettimeofday:
+  gl_FUNC_GETTIMEOFDAY
+  gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+  # Code from module gnumakefile:
+  # Autoconf 2.61a.99 and earlier don't support linking a file only
+  # in VPATH builds.  But since GNUmakefile is for maintainer use
+  # only, it does not matter if we skip the link with older autoconf.
+  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+  # builds, so use a shell variable to bypass this.
+  GNUmakefile=GNUmakefile
+  m4_if(m4_version_compare([2.61a.100],
+       m4_defn([m4_PACKAGE_VERSION])), [1], [],
+        [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
+       [GNUmakefile=$GNUmakefile])])
+  # Code from module gpl-3.0:
+  # Code from module group-member:
+  gl_FUNC_GROUP_MEMBER
+  # Code from module hash:
+  gl_HASH
+  # Code from module hash-pjw:
+  # Code from module hash-triple:
+  # Code from module havelib:
+  # Code from module human:
+  gl_HUMAN
+  # Code from module i-ring:
+  gl_I_RING
+  # Code from module idcache:
+  gl_IDCACHE
+  # Code from module include_next:
+  # Code from module inline:
+  gl_INLINE
+  # Code from module intprops:
+  # Code from module inttypes:
+  gl_INTTYPES_H
+  # Code from module isblank:
+  gl_FUNC_ISBLANK
+  gl_CTYPE_MODULE_INDICATOR([isblank])
+  # Code from module iswblank:
+  gl_FUNC_ISWBLANK
+  gl_WCTYPE_MODULE_INDICATOR([iswblank])
+  # Code from module langinfo:
+  gl_LANGINFO_H
+  # Code from module lchown:
+  gl_FUNC_LCHOWN
+  gl_UNISTD_MODULE_INDICATOR([lchown])
+  # Code from module localcharset:
+  gl_LOCALCHARSET
+  LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+  AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
+  # Code from module locale:
+  gl_LOCALE_H
+  # Code from module lseek:
+  gl_FUNC_LSEEK
+  gl_UNISTD_MODULE_INDICATOR([lseek])
+  # Code from module lstat:
+  gl_FUNC_LSTAT
+  gl_SYS_STAT_MODULE_INDICATOR([lstat])
+  # Code from module maintainer-makefile:
+  AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
+    [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
+  # Code from module malloc:
+  # Code from module malloc-gnu:
+  gl_FUNC_MALLOC_GNU
+  gl_MODULE_INDICATOR([malloc-gnu])
+  # Code from module malloc-posix:
+  gl_FUNC_MALLOC_POSIX
+  gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+  # Code from module malloca:
+  gl_MALLOCA
+  # Code from module math:
+  gl_MATH_H
+  # Code from module mbchar:
+  gl_MBCHAR
+  # Code from module mbrtowc:
+  gl_FUNC_MBRTOWC
+  gl_WCHAR_MODULE_INDICATOR([mbrtowc])
+  # Code from module mbscasestr:
+  gl_STRING_MODULE_INDICATOR([mbscasestr])
+  # Code from module mbsinit:
+  gl_FUNC_MBSINIT
+  gl_WCHAR_MODULE_INDICATOR([mbsinit])
+  # Code from module mbslen:
+  gl_FUNC_MBSLEN
+  gl_STRING_MODULE_INDICATOR([mbslen])
+  # Code from module mbsrtowcs:
+  gl_FUNC_MBSRTOWCS
+  gl_WCHAR_MODULE_INDICATOR([mbsrtowcs])
+  # Code from module mbsstr:
+  gl_STRING_MODULE_INDICATOR([mbsstr])
+  # Code from module mbtowc:
+  gl_FUNC_MBTOWC
+  gl_STDLIB_MODULE_INDICATOR([mbtowc])
+  # Code from module mbuiter:
+  gl_MBITER
+  # Code from module memchr:
+  gl_FUNC_MEMCHR
+  gl_STRING_MODULE_INDICATOR([memchr])
+  # Code from module mempcpy:
+  gl_FUNC_MEMPCPY
+  gl_STRING_MODULE_INDICATOR([mempcpy])
+  # Code from module memrchr:
+  gl_FUNC_MEMRCHR
+  gl_STRING_MODULE_INDICATOR([memrchr])
+  # Code from module mkdir:
+  gl_FUNC_MKDIR
+  # Code from module mktime:
+  gl_FUNC_MKTIME
+  gl_TIME_MODULE_INDICATOR([mktime])
+  # Code from module modechange:
+  gl_MODECHANGE
+  # Code from module modf:
+  gl_MATHFUNC([modf], [double], [(double, double *)])
+  # Code from module mountlist:
+  gl_MOUNTLIST
+  # Code from module multiarch:
+  gl_MULTIARCH
+  # Code from module nl_langinfo:
+  gl_FUNC_NL_LANGINFO
+  gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
+  # Code from module open:
+  gl_FUNC_OPEN
+  gl_FCNTL_MODULE_INDICATOR([open])
+  # Code from module openat:
+  gl_FUNC_OPENAT
+  # Code from module openat-die:
+  # Code from module openat-safer:
+  gl_OPENAT_SAFER
+  gl_MODULE_INDICATOR([openat-safer])
+  # Code from module parse-datetime:
+  gl_PARSE_DATETIME
+  # Code from module pathmax:
+  gl_PATHMAX
+  # Code from module perror:
+  gl_FUNC_PERROR
+  gl_STRING_MODULE_INDICATOR([perror])
+  # Code from module progname:
+  AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+  AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
+  # Code from module quote:
+  gl_QUOTE
+  # Code from module quotearg:
+  gl_QUOTEARG
+  # Code from module quotearg-simple:
+  # Code from module readlink:
+  gl_FUNC_READLINK
+  gl_UNISTD_MODULE_INDICATOR([readlink])
+  # Code from module readlinkat:
+  gl_FUNC_READLINKAT
+  gl_UNISTD_MODULE_INDICATOR([readlinkat])
+  # Code from module realloc:
+  # Code from module realloc-gnu:
+  gl_FUNC_REALLOC_GNU
+  gl_MODULE_INDICATOR([realloc-gnu])
+  # Code from module realloc-posix:
+  gl_FUNC_REALLOC_POSIX
+  gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+  # Code from module regex:
+  gl_REGEX
+  # Code from module rmdir:
+  gl_FUNC_RMDIR
+  gl_UNISTD_MODULE_INDICATOR([rmdir])
+  # Code from module rpmatch:
+  gl_FUNC_RPMATCH
+  gl_STDLIB_MODULE_INDICATOR([rpmatch])
+  # Code from module same:
+  gl_SAME
+  # Code from module same-inode:
+  # Code from module save-cwd:
+  gl_SAVE_CWD
+  # Code from module savedir:
+  gl_SAVEDIR
+  # Code from module selinux-at:
+  AC_CHECK_HEADERS([selinux/flask.h])
+  AC_LIBOBJ([selinux-at])
+  # Code from module selinux-h:
+  gl_HEADERS_SELINUX_SELINUX_H
+  gl_HEADERS_SELINUX_CONTEXT_H
+  AC_REQUIRE([AC_C_INLINE])
+  # Code from module setenv:
+  gl_FUNC_SETENV
+  gl_STDLIB_MODULE_INDICATOR([setenv])
+  # Code from module size_max:
+  gl_SIZE_MAX
+  # Code from module snprintf:
+  gl_FUNC_SNPRINTF
+  gl_STDIO_MODULE_INDICATOR([snprintf])
+  gl_MODULE_INDICATOR([snprintf])
+  # Code from module ssize_t:
+  gt_TYPE_SSIZE_T
+  # Code from module stat:
+  gl_FUNC_STAT
+  gl_SYS_STAT_MODULE_INDICATOR([stat])
+  # Code from module stat-macros:
+  # Code from module stat-time:
+  gl_STAT_TIME
+  gl_STAT_BIRTHTIME
+  # Code from module stdarg:
+  gl_STDARG_H
+  # Code from module stdbool:
+  AM_STDBOOL_H
+  # Code from module stddef:
+  gl_STDDEF_H
+  # Code from module stdint:
+  gl_STDINT_H
+  # Code from module stdio:
+  gl_STDIO_H
+  # Code from module stdlib:
+  gl_STDLIB_H
+  # Code from module stpcpy:
+  gl_FUNC_STPCPY
+  gl_STRING_MODULE_INDICATOR([stpcpy])
+  # Code from module strcase:
+  gl_STRCASE
+  # Code from module strcasestr:
+  gl_FUNC_STRCASESTR
+  # Code from module strcasestr-simple:
+  gl_FUNC_STRCASESTR_SIMPLE
+  gl_STRING_MODULE_INDICATOR([strcasestr])
+  # Code from module strdup-posix:
+  gl_FUNC_STRDUP_POSIX
+  gl_STRING_MODULE_INDICATOR([strdup])
+  # Code from module streq:
+  # Code from module strerror:
+  gl_FUNC_STRERROR
+  gl_STRING_MODULE_INDICATOR([strerror])
+  # Code from module strftime:
+  gl_FUNC_GNU_STRFTIME
+  # Code from module string:
+  gl_HEADER_STRING_H
+  # Code from module strings:
+  gl_HEADER_STRINGS_H
+  # Code from module strndup:
+  gl_FUNC_STRNDUP
+  gl_STRING_MODULE_INDICATOR([strndup])
+  # Code from module strnlen:
+  gl_FUNC_STRNLEN
+  gl_STRING_MODULE_INDICATOR([strnlen])
+  # Code from module strnlen1:
+  # Code from module strstr:
+  gl_FUNC_STRSTR
+  # Code from module strstr-simple:
+  gl_FUNC_STRSTR_SIMPLE
+  gl_STRING_MODULE_INDICATOR([strstr])
+  # Code from module strtoimax:
+  gl_FUNC_STRTOIMAX
+  gl_INTTYPES_MODULE_INDICATOR([strtoimax])
+  # Code from module strtol:
+  gl_FUNC_STRTOL
+  # Code from module strtoll:
+  gl_FUNC_STRTOLL
+  gl_STDLIB_MODULE_INDICATOR([strtoll])
+  # Code from module strtoul:
+  gl_FUNC_STRTOUL
+  # Code from module strtoull:
+  gl_FUNC_STRTOULL
+  gl_STDLIB_MODULE_INDICATOR([strtoull])
+  # Code from module strtoumax:
+  gl_FUNC_STRTOUMAX
+  gl_INTTYPES_MODULE_INDICATOR([strtoumax])
+  # Code from module sys_stat:
+  gl_HEADER_SYS_STAT_H
+  AC_PROG_MKDIR_P
+  # Code from module sys_time:
+  gl_HEADER_SYS_TIME_H
+  AC_PROG_MKDIR_P
+  # Code from module sys_wait:
+  gl_SYS_WAIT_H
+  AC_PROG_MKDIR_P
+  # Code from module time:
+  gl_HEADER_TIME_H
+  # Code from module time_r:
+  gl_TIME_R
+  gl_TIME_MODULE_INDICATOR([time_r])
+  # Code from module timespec:
+  gl_TIMESPEC
+  # Code from module unistd:
+  gl_UNISTD_H
+  # Code from module unistd-safer:
+  gl_UNISTD_SAFER
+  # Code from module unitypes:
+  gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h])
+  # Code from module uniwidth/base:
+  gl_LIBUNISTRING_LIBHEADER([0.9], [uniwidth.h])
+  # Code from module uniwidth/width:
+  gl_LIBUNISTRING_MODULE([0.9.4], [uniwidth/width])
+  # Code from module unlink:
+  gl_FUNC_UNLINK
+  gl_UNISTD_MODULE_INDICATOR([unlink])
+  # Code from module unsetenv:
+  gl_FUNC_UNSETENV
+  gl_STDLIB_MODULE_INDICATOR([unsetenv])
+  # Code from module unused-parameter:
+  # Code from module update-copyright:
+  # Code from module useless-if-before-free:
+  # Code from module vasnprintf:
+  gl_FUNC_VASNPRINTF
+  # Code from module vc-list-files:
+  # Code from module verify:
+  # Code from module version-etc:
+  gl_VERSION_ETC
+  # Code from module version-etc-fsf:
+  # Code from module warn-on-use:
+  # Code from module warnings:
+  AC_SUBST([WARN_CFLAGS])
+  # Code from module wchar:
+  gl_WCHAR_H
+  # Code from module wcrtomb:
+  gl_FUNC_WCRTOMB
+  gl_WCHAR_MODULE_INDICATOR([wcrtomb])
+  # Code from module wctype-h:
+  gl_WCTYPE_H
+  # Code from module wcwidth:
+  gl_FUNC_WCWIDTH
+  gl_WCHAR_MODULE_INDICATOR([wcwidth])
+  # Code from module xalloc:
+  gl_XALLOC
+  # Code from module xalloc-die:
+  # Code from module xgetcwd:
+  gl_XGETCWD
+  # Code from module xsize:
+  gl_XSIZE
+  # Code from module xstrndup:
+  gl_XSTRNDUP
+  # Code from module xstrtod:
+  gl_XSTRTOD
+  # Code from module xstrtol:
+  gl_XSTRTOL
+  # Code from module xstrtoumax:
+  # Code from module yesno:
+  gl_YESNO
+  # End of code from modules
+  m4_ifval(gl_LIBSOURCES_LIST, [
+    m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
+      for gl_file in ]gl_LIBSOURCES_LIST[ ; do
+        if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
+          echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
+          exit 1
+        fi
+      done])dnl
+      m4_if(m4_sysval, [0], [],
+        [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
+  ])
+  m4_popdef([gl_LIBSOURCES_DIR])
+  m4_popdef([gl_LIBSOURCES_LIST])
+  m4_popdef([AC_LIBSOURCES])
+  m4_popdef([AC_REPLACE_FUNCS])
+  m4_popdef([AC_LIBOBJ])
+  AC_CONFIG_COMMANDS_PRE([
+    gl_libobjs=
+    gl_ltlibobjs=
+    if test -n "$gl_LIBOBJS"; then
+      # Remove the extension.
+      sed_drop_objext='s/\.o$//;s/\.obj$//'
+      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+        gl_libobjs="$gl_libobjs $i.$ac_objext"
+        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
+      done
+    fi
+    AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
+    AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
+  ])
+  gltests_libdeps=
+  gltests_ltlibdeps=
+  m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
+  m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
+  m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
+  m4_pushdef([gltests_LIBSOURCES_LIST], [])
+  m4_pushdef([gltests_LIBSOURCES_DIR], [])
+  gl_COMMON
+  gl_source_base='tests'
+changequote(,)dnl
+  gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
+changequote([, ])dnl
+  AC_SUBST([gltests_WITNESS])
+  gl_module_indicator_condition=$gltests_WITNESS
+  m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
+  gt_LOCALE_FR
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_FR
+  gt_LOCALE_TR_UTF8
+  AC_CHECK_FUNCS_ONCE([getegid])
+  gl_MODULE_INDICATOR([fd-safer-flag])
+  gl_FUNC_UNGETC_WORKS
+  gl_FUNC_FTELL
+  gl_STDIO_MODULE_INDICATOR([ftell])
+  gl_FUNC_UNGETC_WORKS
+  gl_FUNC_UNGETC_WORKS
+  gl_FUNC_GETPAGESIZE
+  gl_UNISTD_MODULE_INDICATOR([getpagesize])
+  gl_GETUGROUPS
+  AC_REQUIRE([AC_C_INLINE])
+  gl_INTTOSTR
+  AC_CHECK_FUNCS_ONCE([getegid])
+  AC_CHECK_FUNCS_ONCE([newlocale])
+  gl_LOCALENAME
+  AC_CHECK_FUNCS_ONCE([newlocale])
+  gl_LOCK
+  gt_LOCALE_FR
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_JA
+  gt_LOCALE_ZH_CN
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_TR_UTF8
+  gt_LOCALE_ZH_CN
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_FR
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_JA
+  gt_LOCALE_ZH_CN
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_ZH_CN
+  dnl Check for prerequisites for memory fence checks.
+  gl_FUNC_MMAP_ANON
+  AC_CHECK_HEADERS_ONCE([sys/mman.h])
+  AC_CHECK_FUNCS_ONCE([mprotect])
+  gl_FUNC_MMAP_ANON
+  AC_CHECK_HEADERS_ONCE([sys/mman.h])
+  AC_CHECK_FUNCS_ONCE([mprotect])
+  gl_MGETGROUPS
+  gt_LOCALE_FR
+  gt_LOCALE_FR_UTF8
+  AC_CHECK_FUNCS_ONCE([getegid])
+  gl_PRIV_SET
+  gl_FUNC_PUTENV
+  gl_STDLIB_MODULE_INDICATOR([putenv])
+  gl_FUNC_SETLOCALE
+  gl_LOCALE_MODULE_INDICATOR([setlocale])
+  gt_LOCALE_FR
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_JA
+  gt_LOCALE_ZH_CN
+  gl_FUNC_SLEEP
+  gl_UNISTD_MODULE_INDICATOR([sleep])
+  AC_CHECK_DECLS_ONCE([alarm])
+  gt_TYPE_WCHAR_T
+  gt_TYPE_WINT_T
+  AC_CHECK_DECLS_ONCE([alarm])
+  dnl Check for prerequisites for memory fence checks.
+  gl_FUNC_MMAP_ANON
+  AC_CHECK_HEADERS_ONCE([sys/mman.h])
+  AC_CHECK_FUNCS_ONCE([mprotect])
+  AC_CHECK_DECLS_ONCE([alarm])
+  gl_FUNC_MMAP_ANON
+  AC_CHECK_HEADERS_ONCE([sys/mman.h])
+  AC_CHECK_FUNCS_ONCE([mprotect])
+  gl_FUNC_SYMLINK
+  gl_UNISTD_MODULE_INDICATOR([symlink])
+  gl_FUNC_SYMLINKAT
+  gl_UNISTD_MODULE_INDICATOR([symlinkat])
+  gl_THREAD
+  gl_THREADLIB
+  gl_UNLINKDIR
+  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+  AC_SUBST([abs_aux_dir])
+  gl_FUNC_USLEEP
+  gl_UNISTD_MODULE_INDICATOR([usleep])
+  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+  AC_SUBST([abs_aux_dir])
+  gt_LOCALE_FR
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_JA
+  gt_LOCALE_ZH_CN
+  gl_FUNC_WCTOB
+  gl_WCHAR_MODULE_INDICATOR([wctob])
+  gl_FUNC_WCTOMB
+  gl_STDLIB_MODULE_INDICATOR([wctomb])
+  gl_YIELD
+  m4_popdef([gl_MODULE_INDICATOR_CONDITION])
+  m4_ifval(gltests_LIBSOURCES_LIST, [
+    m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
+      for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
+        if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
+          echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
+          exit 1
+        fi
+      done])dnl
+      m4_if(m4_sysval, [0], [],
+        [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
+  ])
+  m4_popdef([gltests_LIBSOURCES_DIR])
+  m4_popdef([gltests_LIBSOURCES_LIST])
+  m4_popdef([AC_LIBSOURCES])
+  m4_popdef([AC_REPLACE_FUNCS])
+  m4_popdef([AC_LIBOBJ])
+  AC_CONFIG_COMMANDS_PRE([
+    gltests_libobjs=
+    gltests_ltlibobjs=
+    if test -n "$gltests_LIBOBJS"; then
+      # Remove the extension.
+      sed_drop_objext='s/\.o$//;s/\.obj$//'
+      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
+        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
+      done
+    fi
+    AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
+    AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
+  ])
+  LIBGNULIB_LIBDEPS="$gl_libdeps"
+  AC_SUBST([LIBGNULIB_LIBDEPS])
+  LIBGNULIB_LTLIBDEPS="$gl_ltlibdeps"
+  AC_SUBST([LIBGNULIB_LTLIBDEPS])
+  LIBTESTS_LIBDEPS="$gltests_libdeps"
+  AC_SUBST([LIBTESTS_LIBDEPS])
+])
+
+# Like AC_LIBOBJ, except that the module name goes
+# into gl_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gl_LIBOBJ], [
+  AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
+  gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
+])
+
+# Like AC_REPLACE_FUNCS, except that the module name goes
+# into gl_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gl_REPLACE_FUNCS], [
+  m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+  AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
+])
+
+# Like AC_LIBSOURCES, except the directory where the source file is
+# expected is derived from the gnulib-tool parameterization,
+# and alloca is special cased (for the alloca-opt module).
+# We could also entirely rely on EXTRA_lib..._SOURCES.
+AC_DEFUN([gl_LIBSOURCES], [
+  m4_foreach([_gl_NAME], [$1], [
+    m4_if(_gl_NAME, [alloca.c], [], [
+      m4_define([gl_LIBSOURCES_DIR], [gnulib/lib])
+      m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
+    ])
+  ])
+])
+
+# Like AC_LIBOBJ, except that the module name goes
+# into gltests_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gltests_LIBOBJ], [
+  AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
+  gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
+])
+
+# Like AC_REPLACE_FUNCS, except that the module name goes
+# into gltests_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gltests_REPLACE_FUNCS], [
+  m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+  AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
+])
+
+# Like AC_LIBSOURCES, except the directory where the source file is
+# expected is derived from the gnulib-tool parameterization,
+# and alloca is special cased (for the alloca-opt module).
+# We could also entirely rely on EXTRA_lib..._SOURCES.
+AC_DEFUN([gltests_LIBSOURCES], [
+  m4_foreach([_gl_NAME], [$1], [
+    m4_if(_gl_NAME, [alloca.c], [], [
+      m4_define([gltests_LIBSOURCES_DIR], [tests])
+      m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
+    ])
+  ])
+])
+
+# This macro records the list of files which have been installed by
+# gnulib-tool and may be removed by future gnulib-tool invocations.
+AC_DEFUN([gl_FILE_LIST], [
+  build-aux/arg-nonnull.h
+  build-aux/c++defs.h
+  build-aux/config.rpath
+  build-aux/unused-parameter.h
+  build-aux/update-copyright
+  build-aux/useless-if-before-free
+  build-aux/vc-list-files
+  build-aux/warn-on-use.h
+  doc/fdl.texi
+  doc/gpl-3.0.texi
+  doc/parse-datetime.texi
+  lib/alloca.c
+  lib/alloca.in.h
+  lib/areadlink-with-size.c
+  lib/areadlink.c
+  lib/areadlink.h
+  lib/areadlinkat.c
+  lib/argmatch.c
+  lib/argmatch.h
+  lib/asnprintf.c
+  lib/at-func.c
+  lib/basename-lgpl.c
+  lib/basename.c
+  lib/bitrotate.h
+  lib/btowc.c
+  lib/c-ctype.c
+  lib/c-ctype.h
+  lib/c-strcase.h
+  lib/c-strcasecmp.c
+  lib/c-strcasestr.c
+  lib/c-strcasestr.h
+  lib/c-strncasecmp.c
+  lib/c-strstr.c
+  lib/c-strstr.h
+  lib/canonicalize.c
+  lib/canonicalize.h
+  lib/chdir-long.c
+  lib/chdir-long.h
+  lib/chown.c
+  lib/cloexec.c
+  lib/cloexec.h
+  lib/close-hook.c
+  lib/close-hook.h
+  lib/close-stream.c
+  lib/close-stream.h
+  lib/close.c
+  lib/closein.c
+  lib/closein.h
+  lib/closeout.c
+  lib/closeout.h
+  lib/config.charset
+  lib/creat-safer.c
+  lib/ctype.in.h
+  lib/cycle-check.c
+  lib/cycle-check.h
+  lib/dev-ino.h
+  lib/dirent--.h
+  lib/dirent-safer.h
+  lib/dirent.in.h
+  lib/dirfd.c
+  lib/dirname-lgpl.c
+  lib/dirname.c
+  lib/dirname.h
+  lib/dosname.h
+  lib/dup-safer.c
+  lib/dup2.c
+  lib/errno.in.h
+  lib/error.c
+  lib/error.h
+  lib/euidaccess.c
+  lib/exitfail.c
+  lib/exitfail.h
+  lib/faccessat.c
+  lib/fchdir.c
+  lib/fchmodat.c
+  lib/fchown-stub.c
+  lib/fchownat.c
+  lib/fclose.c
+  lib/fcntl--.h
+  lib/fcntl-safer.h
+  lib/fcntl.c
+  lib/fcntl.in.h
+  lib/fd-safer.c
+  lib/fdopendir.c
+  lib/fflush.c
+  lib/file-set.c
+  lib/file-set.h
+  lib/fileblocks.c
+  lib/filemode.c
+  lib/filemode.h
+  lib/float+.h
+  lib/float.in.h
+  lib/fnmatch.c
+  lib/fnmatch.in.h
+  lib/fnmatch_loop.c
+  lib/fopen-safer.c
+  lib/fopen.c
+  lib/fpending.c
+  lib/fpending.h
+  lib/fpurge.c
+  lib/freadahead.c
+  lib/freadahead.h
+  lib/freading.c
+  lib/freading.h
+  lib/fseeko.c
+  lib/fstatat.c
+  lib/ftello.c
+  lib/fts-cycle.c
+  lib/fts.c
+  lib/fts_.h
+  lib/getcwd.c
+  lib/getdelim.c
+  lib/getdtablesize.c
+  lib/getfilecon.c
+  lib/getgroups.c
+  lib/getline.c
+  lib/getopt.c
+  lib/getopt.in.h
+  lib/getopt1.c
+  lib/getopt_int.h
+  lib/gettext.h
+  lib/gettime.c
+  lib/gettimeofday.c
+  lib/group-member.c
+  lib/group-member.h
+  lib/hash-pjw.c
+  lib/hash-pjw.h
+  lib/hash-triple.c
+  lib/hash-triple.h
+  lib/hash.c
+  lib/hash.h
+  lib/human.c
+  lib/human.h
+  lib/i-ring.c
+  lib/i-ring.h
+  lib/idcache.c
+  lib/idcache.h
+  lib/intprops.h
+  lib/inttypes.in.h
+  lib/isblank.c
+  lib/iswblank.c
+  lib/langinfo.in.h
+  lib/lchown.c
+  lib/localcharset.c
+  lib/localcharset.h
+  lib/locale.in.h
+  lib/lseek.c
+  lib/lstat.c
+  lib/malloc.c
+  lib/malloca.c
+  lib/malloca.h
+  lib/malloca.valgrind
+  lib/math.in.h
+  lib/mbchar.c
+  lib/mbchar.h
+  lib/mbrtowc.c
+  lib/mbscasestr.c
+  lib/mbsinit.c
+  lib/mbslen.c
+  lib/mbsrtowcs-impl.h
+  lib/mbsrtowcs-state.c
+  lib/mbsrtowcs.c
+  lib/mbsstr.c
+  lib/mbtowc-impl.h
+  lib/mbtowc.c
+  lib/mbuiter.h
+  lib/memchr.c
+  lib/memchr.valgrind
+  lib/mempcpy.c
+  lib/memrchr.c
+  lib/mkdir.c
+  lib/mkdirat.c
+  lib/mktime-internal.h
+  lib/mktime.c
+  lib/modechange.c
+  lib/modechange.h
+  lib/mountlist.c
+  lib/mountlist.h
+  lib/nl_langinfo.c
+  lib/open-safer.c
+  lib/open.c
+  lib/openat-die.c
+  lib/openat-priv.h
+  lib/openat-proc.c
+  lib/openat-safer.c
+  lib/openat.c
+  lib/openat.h
+  lib/opendir-safer.c
+  lib/parse-datetime.h
+  lib/parse-datetime.y
+  lib/pathmax.h
+  lib/perror.c
+  lib/pipe-safer.c
+  lib/printf-args.c
+  lib/printf-args.h
+  lib/printf-parse.c
+  lib/printf-parse.h
+  lib/progname.c
+  lib/progname.h
+  lib/quote.c
+  lib/quote.h
+  lib/quotearg.c
+  lib/quotearg.h
+  lib/readlink.c
+  lib/readlinkat.c
+  lib/realloc.c
+  lib/ref-add.sin
+  lib/ref-del.sin
+  lib/regcomp.c
+  lib/regex.c
+  lib/regex.h
+  lib/regex_internal.c
+  lib/regex_internal.h
+  lib/regexec.c
+  lib/rmdir.c
+  lib/rpmatch.c
+  lib/same-inode.h
+  lib/same.c
+  lib/same.h
+  lib/save-cwd.c
+  lib/save-cwd.h
+  lib/savedir.c
+  lib/savedir.h
+  lib/se-context.in.h
+  lib/se-selinux.in.h
+  lib/selinux-at.c
+  lib/selinux-at.h
+  lib/setenv.c
+  lib/size_max.h
+  lib/snprintf.c
+  lib/stat-macros.h
+  lib/stat-time.h
+  lib/stat.c
+  lib/stdarg.in.h
+  lib/stdbool.in.h
+  lib/stddef.in.h
+  lib/stdint.in.h
+  lib/stdio--.h
+  lib/stdio-impl.h
+  lib/stdio-safer.h
+  lib/stdio.in.h
+  lib/stdlib.in.h
+  lib/stpcpy.c
+  lib/str-kmp.h
+  lib/str-two-way.h
+  lib/strcasecmp.c
+  lib/strcasestr.c
+  lib/strdup.c
+  lib/streq.h
+  lib/strerror.c
+  lib/strftime.c
+  lib/strftime.h
+  lib/string.in.h
+  lib/strings.in.h
+  lib/stripslash.c
+  lib/strncasecmp.c
+  lib/strndup.c
+  lib/strnlen.c
+  lib/strnlen1.c
+  lib/strnlen1.h
+  lib/strstr.c
+  lib/strtoimax.c
+  lib/strtol.c
+  lib/strtoll.c
+  lib/strtoul.c
+  lib/strtoull.c
+  lib/strtoumax.c
+  lib/sys_stat.in.h
+  lib/sys_time.in.h
+  lib/sys_wait.in.h
+  lib/time.in.h
+  lib/time_r.c
+  lib/timespec.h
+  lib/unistd--.h
+  lib/unistd-safer.h
+  lib/unistd.in.h
+  lib/unitypes.in.h
+  lib/uniwidth.in.h
+  lib/uniwidth/cjk.h
+  lib/uniwidth/width.c
+  lib/unlink.c
+  lib/unlinkat.c
+  lib/unsetenv.c
+  lib/vasnprintf.c
+  lib/vasnprintf.h
+  lib/verify.h
+  lib/version-etc-fsf.c
+  lib/version-etc.c
+  lib/version-etc.h
+  lib/wchar.in.h
+  lib/wcrtomb.c
+  lib/wctype.in.h
+  lib/wcwidth.c
+  lib/xalloc-die.c
+  lib/xalloc.h
+  lib/xgetcwd.c
+  lib/xgetcwd.h
+  lib/xmalloc.c
+  lib/xsize.h
+  lib/xstrndup.c
+  lib/xstrndup.h
+  lib/xstrtod.c
+  lib/xstrtod.h
+  lib/xstrtol-error.c
+  lib/xstrtol.c
+  lib/xstrtol.h
+  lib/xstrtoul.c
+  lib/xstrtoumax.c
+  lib/yesno.c
+  lib/yesno.h
+  m4/00gnulib.m4
+  m4/alloca.m4
+  m4/argmatch.m4
+  m4/assert.m4
+  m4/bison.m4
+  m4/btowc.m4
+  m4/canonicalize.m4
+  m4/chdir-long.m4
+  m4/chown.m4
+  m4/clock_time.m4
+  m4/cloexec.m4
+  m4/close-stream.m4
+  m4/close.m4
+  m4/closein.m4
+  m4/closeout.m4
+  m4/codeset.m4
+  m4/configmake.m4
+  m4/ctype.m4
+  m4/cycle-check.m4
+  m4/d-ino.m4
+  m4/d-type.m4
+  m4/dirent-safer.m4
+  m4/dirent_h.m4
+  m4/dirfd.m4
+  m4/dirname.m4
+  m4/double-slash-root.m4
+  m4/dup2.m4
+  m4/eealloc.m4
+  m4/environ.m4
+  m4/errno_h.m4
+  m4/error.m4
+  m4/euidaccess.m4
+  m4/extensions.m4
+  m4/faccessat.m4
+  m4/fchdir.m4
+  m4/fclose.m4
+  m4/fcntl-o.m4
+  m4/fcntl-safer.m4
+  m4/fcntl.m4
+  m4/fcntl_h.m4
+  m4/fdopendir.m4
+  m4/fflush.m4
+  m4/fileblocks.m4
+  m4/filemode.m4
+  m4/flexmember.m4
+  m4/float_h.m4
+  m4/fnmatch.m4
+  m4/fopen.m4
+  m4/fpending.m4
+  m4/fpurge.m4
+  m4/freading.m4
+  m4/fseeko.m4
+  m4/fstypename.m4
+  m4/ftell.m4
+  m4/ftello.m4
+  m4/fts.m4
+  m4/getcwd-abort-bug.m4
+  m4/getcwd-path-max.m4
+  m4/getcwd.m4
+  m4/getdelim.m4
+  m4/getdtablesize.m4
+  m4/getgroups.m4
+  m4/getline.m4
+  m4/getopt.m4
+  m4/getpagesize.m4
+  m4/gettext.m4
+  m4/gettime.m4
+  m4/gettimeofday.m4
+  m4/getugroups.m4
+  m4/glibc2.m4
+  m4/glibc21.m4
+  m4/gnulib-common.m4
+  m4/group-member.m4
+  m4/hash.m4
+  m4/human.m4
+  m4/i-ring.m4
+  m4/iconv.m4
+  m4/idcache.m4
+  m4/include_next.m4
+  m4/inline.m4
+  m4/intdiv0.m4
+  m4/intl.m4
+  m4/intldir.m4
+  m4/intlmacosx.m4
+  m4/intmax.m4
+  m4/intmax_t.m4
+  m4/inttostr.m4
+  m4/inttypes-pri.m4
+  m4/inttypes.m4
+  m4/inttypes_h.m4
+  m4/isblank.m4
+  m4/iswblank.m4
+  m4/langinfo_h.m4
+  m4/lchown.m4
+  m4/lcmessage.m4
+  m4/lib-ld.m4
+  m4/lib-link.m4
+  m4/lib-prefix.m4
+  m4/libunistring-base.m4
+  m4/localcharset.m4
+  m4/locale-fr.m4
+  m4/locale-ja.m4
+  m4/locale-tr.m4
+  m4/locale-zh.m4
+  m4/locale_h.m4
+  m4/localename.m4
+  m4/lock.m4
+  m4/longlong.m4
+  m4/ls-mntd-fs.m4
+  m4/lseek.m4
+  m4/lstat.m4
+  m4/malloc.m4
+  m4/malloca.m4
+  m4/math_h.m4
+  m4/mathfunc.m4
+  m4/mbchar.m4
+  m4/mbiter.m4
+  m4/mbrtowc.m4
+  m4/mbsinit.m4
+  m4/mbslen.m4
+  m4/mbsrtowcs.m4
+  m4/mbstate_t.m4
+  m4/mbtowc.m4
+  m4/memchr.m4
+  m4/mempcpy.m4
+  m4/memrchr.m4
+  m4/mgetgroups.m4
+  m4/mkdir.m4
+  m4/mktime.m4
+  m4/mmap-anon.m4
+  m4/mode_t.m4
+  m4/modechange.m4
+  m4/mountlist.m4
+  m4/multiarch.m4
+  m4/nl_langinfo.m4
+  m4/nls.m4
+  m4/onceonly.m4
+  m4/open.m4
+  m4/openat.m4
+  m4/parse-datetime.m4
+  m4/pathmax.m4
+  m4/perror.m4
+  m4/po.m4
+  m4/printf-posix.m4
+  m4/printf.m4
+  m4/priv-set.m4
+  m4/progtest.m4
+  m4/putenv.m4
+  m4/quote.m4
+  m4/quotearg.m4
+  m4/readlink.m4
+  m4/readlinkat.m4
+  m4/realloc.m4
+  m4/regex.m4
+  m4/rmdir.m4
+  m4/rpmatch.m4
+  m4/same.m4
+  m4/save-cwd.m4
+  m4/savedir.m4
+  m4/selinux-context-h.m4
+  m4/selinux-selinux-h.m4
+  m4/setenv.m4
+  m4/setlocale.m4
+  m4/size_max.m4
+  m4/sleep.m4
+  m4/snprintf.m4
+  m4/ssize_t.m4
+  m4/st_dm_mode.m4
+  m4/stat-time.m4
+  m4/stat.m4
+  m4/stdarg.m4
+  m4/stdbool.m4
+  m4/stddef_h.m4
+  m4/stdint.m4
+  m4/stdint_h.m4
+  m4/stdio-safer.m4
+  m4/stdio_h.m4
+  m4/stdlib_h.m4
+  m4/stpcpy.m4
+  m4/strcase.m4
+  m4/strcasestr.m4
+  m4/strdup.m4
+  m4/strerror.m4
+  m4/strftime.m4
+  m4/string_h.m4
+  m4/strings_h.m4
+  m4/strndup.m4
+  m4/strnlen.m4
+  m4/strstr.m4
+  m4/strtoimax.m4
+  m4/strtol.m4
+  m4/strtoll.m4
+  m4/strtoul.m4
+  m4/strtoull.m4
+  m4/strtoumax.m4
+  m4/symlink.m4
+  m4/symlinkat.m4
+  m4/sys_stat_h.m4
+  m4/sys_time_h.m4
+  m4/sys_wait_h.m4
+  m4/thread.m4
+  m4/threadlib.m4
+  m4/time_h.m4
+  m4/time_r.m4
+  m4/timespec.m4
+  m4/tm_gmtoff.m4
+  m4/uintmax_t.m4
+  m4/ungetc.m4
+  m4/unistd-safer.m4
+  m4/unistd_h.m4
+  m4/unlink.m4
+  m4/unlinkdir.m4
+  m4/usleep.m4
+  m4/vasnprintf.m4
+  m4/version-etc.m4
+  m4/visibility.m4
+  m4/warn-on-use.m4
+  m4/warnings.m4
+  m4/wchar_h.m4
+  m4/wchar_t.m4
+  m4/wcrtomb.m4
+  m4/wctob.m4
+  m4/wctomb.m4
+  m4/wctype_h.m4
+  m4/wcwidth.m4
+  m4/wint_t.m4
+  m4/xalloc.m4
+  m4/xgetcwd.m4
+  m4/xsize.m4
+  m4/xstrndup.m4
+  m4/xstrtod.m4
+  m4/xstrtol.m4
+  m4/yesno.m4
+  m4/yield.m4
+  tests/init.sh
+  tests/macros.h
+  tests/nap.h
+  tests/signature.h
+  tests/test-alloca-opt.c
+  tests/test-areadlink-with-size.c
+  tests/test-areadlink.c
+  tests/test-areadlink.h
+  tests/test-areadlinkat.c
+  tests/test-argmatch.c
+  tests/test-binary-io.c
+  tests/test-binary-io.sh
+  tests/test-bitrotate.c
+  tests/test-btowc.c
+  tests/test-btowc1.sh
+  tests/test-btowc2.sh
+  tests/test-c-ctype.c
+  tests/test-c-strcase.sh
+  tests/test-c-strcasecmp.c
+  tests/test-c-strcasestr.c
+  tests/test-c-strncasecmp.c
+  tests/test-c-strstr.c
+  tests/test-canonicalize.c
+  tests/test-chown.c
+  tests/test-chown.h
+  tests/test-cloexec.c
+  tests/test-closein.c
+  tests/test-closein.sh
+  tests/test-ctype.c
+  tests/test-dirent-safer.c
+  tests/test-dirent.c
+  tests/test-dirname.c
+  tests/test-dup-safer.c
+  tests/test-dup2.c
+  tests/test-environ.c
+  tests/test-errno.c
+  tests/test-fchdir.c
+  tests/test-fchownat.c
+  tests/test-fcntl-h.c
+  tests/test-fcntl-safer.c
+  tests/test-fcntl.c
+  tests/test-fdopendir.c
+  tests/test-fflush.c
+  tests/test-fflush2.c
+  tests/test-fflush2.sh
+  tests/test-fnmatch.c
+  tests/test-fopen-safer.c
+  tests/test-fopen.c
+  tests/test-fopen.h
+  tests/test-fpending.c
+  tests/test-fpending.sh
+  tests/test-fpurge.c
+  tests/test-freadahead.c
+  tests/test-freadahead.sh
+  tests/test-freading.c
+  tests/test-fseeko.c
+  tests/test-fseeko.sh
+  tests/test-fseeko2.sh
+  tests/test-fstatat.c
+  tests/test-ftell.c
+  tests/test-ftell.sh
+  tests/test-ftell2.sh
+  tests/test-ftell3.c
+  tests/test-ftello.c
+  tests/test-ftello.sh
+  tests/test-ftello2.sh
+  tests/test-ftello3.c
+  tests/test-getcwd.c
+  tests/test-getdelim.c
+  tests/test-getdtablesize.c
+  tests/test-getgroups.c
+  tests/test-getline.c
+  tests/test-getopt.c
+  tests/test-getopt.h
+  tests/test-getopt_long.h
+  tests/test-gettimeofday.c
+  tests/test-hash.c
+  tests/test-i-ring.c
+  tests/test-ignore-value.c
+  tests/test-inttostr.c
+  tests/test-inttypes.c
+  tests/test-isblank.c
+  tests/test-iswblank.c
+  tests/test-langinfo.c
+  tests/test-lchown.c
+  tests/test-lchown.h
+  tests/test-locale.c
+  tests/test-localename.c
+  tests/test-lock.c
+  tests/test-lseek.c
+  tests/test-lseek.sh
+  tests/test-lstat.c
+  tests/test-lstat.h
+  tests/test-malloc-gnu.c
+  tests/test-malloca.c
+  tests/test-math.c
+  tests/test-mbrtowc-w32-1.sh
+  tests/test-mbrtowc-w32-2.sh
+  tests/test-mbrtowc-w32-3.sh
+  tests/test-mbrtowc-w32-4.sh
+  tests/test-mbrtowc-w32-5.sh
+  tests/test-mbrtowc-w32.c
+  tests/test-mbrtowc.c
+  tests/test-mbrtowc1.sh
+  tests/test-mbrtowc2.sh
+  tests/test-mbrtowc3.sh
+  tests/test-mbrtowc4.sh
+  tests/test-mbscasestr1.c
+  tests/test-mbscasestr2.c
+  tests/test-mbscasestr2.sh
+  tests/test-mbscasestr3.c
+  tests/test-mbscasestr3.sh
+  tests/test-mbscasestr4.c
+  tests/test-mbscasestr4.sh
+  tests/test-mbsinit.c
+  tests/test-mbsinit.sh
+  tests/test-mbsrtowcs.c
+  tests/test-mbsrtowcs1.sh
+  tests/test-mbsrtowcs2.sh
+  tests/test-mbsrtowcs3.sh
+  tests/test-mbsrtowcs4.sh
+  tests/test-mbsstr1.c
+  tests/test-mbsstr2.c
+  tests/test-mbsstr2.sh
+  tests/test-mbsstr3.c
+  tests/test-mbsstr3.sh
+  tests/test-memchr.c
+  tests/test-memrchr.c
+  tests/test-mkdir.c
+  tests/test-mkdir.h
+  tests/test-mkdirat.c
+  tests/test-modf.c
+  tests/test-nl_langinfo.c
+  tests/test-nl_langinfo.sh
+  tests/test-open.c
+  tests/test-open.h
+  tests/test-openat-safer.c
+  tests/test-openat.c
+  tests/test-parse-datetime.c
+  tests/test-perror.c
+  tests/test-perror.sh
+  tests/test-priv-set.c
+  tests/test-quotearg-simple.c
+  tests/test-quotearg.h
+  tests/test-readlink.c
+  tests/test-readlink.h
+  tests/test-readlinkat.c
+  tests/test-realloc-gnu.c
+  tests/test-rmdir.c
+  tests/test-rmdir.h
+  tests/test-setenv.c
+  tests/test-setlocale1.c
+  tests/test-setlocale1.sh
+  tests/test-setlocale2.c
+  tests/test-setlocale2.sh
+  tests/test-sleep.c
+  tests/test-snprintf.c
+  tests/test-stat-time.c
+  tests/test-stat.c
+  tests/test-stat.h
+  tests/test-stdbool.c
+  tests/test-stddef.c
+  tests/test-stdint.c
+  tests/test-stdio.c
+  tests/test-stdlib.c
+  tests/test-strcasestr.c
+  tests/test-strerror.c
+  tests/test-strftime.c
+  tests/test-string.c
+  tests/test-strings.c
+  tests/test-strnlen.c
+  tests/test-strstr.c
+  tests/test-symlink.c
+  tests/test-symlink.h
+  tests/test-symlinkat.c
+  tests/test-sys_stat.c
+  tests/test-sys_time.c
+  tests/test-sys_wait.c
+  tests/test-sys_wait.h
+  tests/test-time.c
+  tests/test-unistd.c
+  tests/test-unlink.c
+  tests/test-unlink.h
+  tests/test-unlinkat.c
+  tests/test-unsetenv.c
+  tests/test-update-copyright.sh
+  tests/test-usleep.c
+  tests/test-vasnprintf.c
+  tests/test-vc-list-files-cvs.sh
+  tests/test-vc-list-files-git.sh
+  tests/test-verify.c
+  tests/test-verify.sh
+  tests/test-version-etc.c
+  tests/test-version-etc.sh
+  tests/test-wchar.c
+  tests/test-wcrtomb-w32-1.sh
+  tests/test-wcrtomb-w32-2.sh
+  tests/test-wcrtomb-w32-3.sh
+  tests/test-wcrtomb-w32-4.sh
+  tests/test-wcrtomb-w32-5.sh
+  tests/test-wcrtomb-w32.c
+  tests/test-wcrtomb.c
+  tests/test-wcrtomb.sh
+  tests/test-wctype-h.c
+  tests/test-wcwidth.c
+  tests/test-xalloc-die.c
+  tests/test-xalloc-die.sh
+  tests/test-xstrtol.c
+  tests/test-xstrtol.sh
+  tests/test-xstrtoul.c
+  tests/test-xstrtoumax.c
+  tests/test-xstrtoumax.sh
+  tests/test-yesno.c
+  tests/test-yesno.sh
+  tests/uniwidth/test-uc_width.c
+  tests/uniwidth/test-uc_width2.c
+  tests/uniwidth/test-uc_width2.sh
+  tests/zerosize-ptr.h
+  tests=lib/anytostr.c
+  tests=lib/binary-io.h
+  tests=lib/dup-safer-flag.c
+  tests=lib/fd-safer-flag.c
+  tests=lib/ftell.c
+  tests=lib/getpagesize.c
+  tests=lib/getugroups.c
+  tests=lib/getugroups.h
+  tests=lib/glthread/lock.c
+  tests=lib/glthread/lock.h
+  tests=lib/glthread/thread.c
+  tests=lib/glthread/thread.h
+  tests=lib/glthread/threadlib.c
+  tests=lib/glthread/yield.h
+  tests=lib/ignore-value.h
+  tests=lib/imaxtostr.c
+  tests=lib/inttostr.c
+  tests=lib/inttostr.h
+  tests=lib/localename.c
+  tests=lib/localename.h
+  tests=lib/mgetgroups.c
+  tests=lib/mgetgroups.h
+  tests=lib/offtostr.c
+  tests=lib/priv-set.c
+  tests=lib/priv-set.h
+  tests=lib/putenv.c
+  tests=lib/setlocale.c
+  tests=lib/sleep.c
+  tests=lib/symlink.c
+  tests=lib/symlinkat.c
+  tests=lib/uinttostr.c
+  tests=lib/umaxtostr.c
+  tests=lib/unlinkdir.c
+  tests=lib/unlinkdir.h
+  tests=lib/usleep.c
+  tests=lib/wctob.c
+  tests=lib/wctomb-impl.h
+  tests=lib/wctomb.c
+  top/GNUmakefile
+  top/maint.mk
+])
diff --git a/gnulib/m4/group-member.m4 b/gnulib/m4/group-member.m4
new file mode 100644 (file)
index 0000000..5f7aa8a
--- /dev/null
@@ -0,0 +1,28 @@
+# serial 12
+
+# Copyright (C) 1999-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+
+# This file 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.
+
+dnl Written by Jim Meyering
+
+AC_DEFUN([gl_FUNC_GROUP_MEMBER],
+[
+  dnl Persuade glibc <unistd.h> to declare group_member().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  dnl Do this replacement check manually because I want the hyphen
+  dnl (not the underscore) in the filename.
+  AC_CHECK_FUNC([group_member], , [
+    AC_LIBOBJ([group-member])
+    gl_PREREQ_GROUP_MEMBER
+  ])
+])
+
+# Prerequisites of lib/group-member.c.
+AC_DEFUN([gl_PREREQ_GROUP_MEMBER],
+[
+  AC_REQUIRE([AC_FUNC_GETGROUPS])
+])
diff --git a/gnulib/m4/hash.m4 b/gnulib/m4/hash.m4
new file mode 100644 (file)
index 0000000..167c083
--- /dev/null
@@ -0,0 +1,14 @@
+# hash.m4 serial 6
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HASH],
+[
+  AC_LIBOBJ([hash])
+
+  dnl Prerequisites of lib/hash.c.
+  AC_REQUIRE([AM_STDBOOL_H])
+])
diff --git a/gnulib/m4/human.m4 b/gnulib/m4/human.m4
new file mode 100644 (file)
index 0000000..21c12f5
--- /dev/null
@@ -0,0 +1,13 @@
+#serial 10
+dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HUMAN],
+[
+  AC_LIBOBJ([human])
+
+  dnl Prerequisites of lib/human.c.
+  :
+])
diff --git a/gnulib/m4/i-ring.m4 b/gnulib/m4/i-ring.m4
new file mode 100644 (file)
index 0000000..838ccbb
--- /dev/null
@@ -0,0 +1,10 @@
+# serial 1
+dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_I_RING],
+[
+  AC_LIBOBJ([i-ring])
+])
diff --git a/gnulib/m4/iconv.m4 b/gnulib/m4/iconv.m4
new file mode 100644 (file)
index 0000000..e2041b9
--- /dev/null
@@ -0,0 +1,214 @@
+# iconv.m4 serial 11 (gettext-0.18.1)
+dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libiconv and not disabled its use
+  dnl via --without-libiconv-prefix, he wants to use it. The first
+  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+  AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+      [iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);],
+      [am_cv_func_iconv=yes])
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+        [iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);],
+        [am_cv_lib_iconv=yes]
+        [am_cv_func_iconv=yes])
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+      dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
+      am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          return 1;
+      }
+  }
+  /* Test against Solaris 10 bug: Failures are not distinguishable from
+     successful returns.  */
+  {
+    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+    if (cd_ascii_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\263";
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_ascii_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          return 1;
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+        char buf[50];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          return 1;
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  if (/* Try standardized names.  */
+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+      /* Try IRIX, OSF/1 names.  */
+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+      /* Try AIX names.  */
+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+      /* Try HP-UX names.  */
+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+    return 1;
+  return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+        [case "$host_os" in
+           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+           *)            am_cv_func_iconv_works="guessing yes" ;;
+         esac])
+      LIBS="$am_save_LIBS"
+    ])
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
+    AC_DEFINE([HAVE_ICONV], [1],
+      [Define if you have the iconv() function and it works.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+  AC_SUBST([LIBICONV])
+  AC_SUBST([LTLIBICONV])
+])
+
+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
+dnl avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl   warnings.
+m4_define([gl_iconv_AC_DEFUN],
+  m4_version_prereq([2.64],
+    [[AC_DEFUN_ONCE(
+        [$1], [$2])]],
+    [[AC_DEFUN(
+        [$1], [$2])]]))
+gl_iconv_AC_DEFUN([AM_ICONV],
+[
+  AM_ICONV_LINK
+  if test "$am_cv_func_iconv" = yes; then
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL([am_cv_proto_iconv], [
+      AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    AC_MSG_RESULT([
+         $am_cv_proto_iconv])
+    AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+])
diff --git a/gnulib/m4/idcache.m4 b/gnulib/m4/idcache.m4
new file mode 100644 (file)
index 0000000..0650f50
--- /dev/null
@@ -0,0 +1,11 @@
+# idcache.m4 serial 6
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_IDCACHE],
+[
+  AC_LIBOBJ([idcache])
+])
diff --git a/gnulib/m4/include_next.m4 b/gnulib/m4/include_next.m4
new file mode 100644 (file)
index 0000000..b3c7849
--- /dev/null
@@ -0,0 +1,244 @@
+# include_next.m4 serial 18
+dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert and Derek Price.
+
+dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
+dnl
+dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
+dnl 'include' otherwise.
+dnl
+dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler
+dnl supports it in the special case that it is the first include directive in
+dnl the given file, or to 'include' otherwise.
+dnl
+dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next,
+dnl so as to avoid GCC warnings when the gcc option -pedantic is used.
+dnl '#pragma GCC system_header' has the same effect as if the file was found
+dnl through the include search path specified with '-isystem' options (as
+dnl opposed to the search path specified with '-I' options). Namely, gcc
+dnl does not warn about some things, and on some systems (Solaris and Interix)
+dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side
+dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead
+dnl of plain '__STDC__'.
+dnl
+dnl PRAGMA_COLUMNS can be used in files that override system header files, so
+dnl as to avoid compilation errors on HP NonStop systems when the gnulib file
+dnl is included by a system header file that does a "#pragma COLUMNS 80" (which
+dnl has the effect of truncating the lines of that file and all files that it
+dnl includes to 80 columns) and the gnulib file has lines longer than 80
+dnl columns.
+
+AC_DEFUN([gl_INCLUDE_NEXT],
+[
+  AC_LANG_PREPROC_REQUIRE()
+  AC_CACHE_CHECK([whether the preprocessor supports include_next],
+    [gl_cv_have_include_next],
+    [rm -rf conftestd1a conftestd1b conftestd2
+     mkdir conftestd1a conftestd1b conftestd2
+     dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on
+     dnl AIX 6.1 support include_next when used as first preprocessor directive
+     dnl in a file, but not when preceded by another include directive. Check
+     dnl for this bug by including <stdio.h>.
+     dnl Additionally, with this same compiler, include_next is a no-op when
+     dnl used in a header file that was included by specifying its absolute
+     dnl file name. Despite these two bugs, include_next is used in the
+     dnl compiler's <math.h>. By virtue of the second bug, we need to use
+     dnl include_next as well in this case.
+     cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+     cat <<EOF > conftestd1b/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+     cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+     gl_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+dnl We intentionally avoid using AC_LANG_SOURCE here.
+     AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
+       [gl_cv_have_include_next=yes],
+       [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+        AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
+          [gl_cv_have_include_next=buggy],
+          [gl_cv_have_include_next=no])
+       ])
+     CPPFLAGS="$gl_save_CPPFLAGS"
+     rm -rf conftestd1a conftestd1b conftestd2
+    ])
+  PRAGMA_SYSTEM_HEADER=
+  if test $gl_cv_have_include_next = yes; then
+    INCLUDE_NEXT=include_next
+    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+    if test -n "$GCC"; then
+      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+    fi
+  else
+    if test $gl_cv_have_include_next = buggy; then
+      INCLUDE_NEXT=include
+      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+    else
+      INCLUDE_NEXT=include
+      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+    fi
+  fi
+  AC_SUBST([INCLUDE_NEXT])
+  AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
+  AC_SUBST([PRAGMA_SYSTEM_HEADER])
+  AC_CACHE_CHECK([whether system header files limit the line length],
+    [gl_cv_pragma_columns],
+    [dnl HP NonStop systems, which define __TANDEM, have this misfeature.
+     AC_EGREP_CPP([choke me],
+       [
+#ifdef __TANDEM
+choke me
+#endif
+       ],
+       [gl_cv_pragma_columns=yes],
+       [gl_cv_pragma_columns=no])
+    ])
+  if test $gl_cv_pragma_columns = yes; then
+    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
+  else
+    PRAGMA_COLUMNS=
+  fi
+  AC_SUBST([PRAGMA_COLUMNS])
+])
+
+# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
+# ------------------------------------------
+# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be
+# '<foo.h>'; otherwise define it to be
+# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
+# Also, if #include_next works as first preprocessing directive in a file,
+# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be '<foo.h>'; otherwise define it to
+# be
+# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
+# That way, a header file with the following line:
+#       #@INCLUDE_NEXT@ @NEXT_FOO_H@
+# or
+#       #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@
+# behaves (after sed substitution) as if it contained
+#       #include_next <foo.h>
+# even if the compiler does not support include_next.
+# The three "///" are to pacify Sun C 5.8, which otherwise would say
+# "warning: #include of /usr/include/... may be non-portable".
+# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
+# Note: This macro assumes that the header file is not empty after
+# preprocessing, i.e. it does not only define preprocessor macros but also
+# provides some type/enum definitions or function/variable declarations.
+#
+# This macro also checks whether each header exists, by invoking
+# AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument.
+AC_DEFUN([gl_CHECK_NEXT_HEADERS],
+[
+  gl_NEXT_HEADERS_INTERNAL([$1], [check])
+])
+
+# gl_NEXT_HEADERS(HEADER1 HEADER2 ...)
+# ------------------------------------
+# Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist.
+# This is suitable for headers like <stddef.h> that are standardized by C89
+# and therefore can be assumed to exist.
+AC_DEFUN([gl_NEXT_HEADERS],
+[
+  gl_NEXT_HEADERS_INTERNAL([$1], [assume])
+])
+
+# The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS.
+AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
+[
+  AC_REQUIRE([gl_INCLUDE_NEXT])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+
+  m4_if([$2], [check],
+    [AC_CHECK_HEADERS_ONCE([$1])
+    ])
+
+  m4_foreach_w([gl_HEADER_NAME], [$1],
+    [AS_VAR_PUSHDEF([gl_next_header],
+                    [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
+     if test $gl_cv_have_include_next = yes; then
+       AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+     else
+       AC_CACHE_CHECK(
+         [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
+         m4_defn([gl_next_header]),
+         [m4_if([$2], [check],
+            [AS_VAR_PUSHDEF([gl_header_exists],
+                            [ac_cv_header_]m4_defn([gl_HEADER_NAME]))
+             if test AS_VAR_GET(gl_header_exists) = yes; then
+             AS_VAR_POPDEF([gl_header_exists])
+            ])
+               AC_LANG_CONFTEST(
+                 [AC_LANG_SOURCE(
+                    [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
+                  )])
+               dnl AIX "xlc -E" and "cc -E" omit #line directives for header
+               dnl files that contain only a #include of other header files and
+               dnl no non-comment tokens of their own. This leads to a failure
+               dnl to detect the absolute name of <dirent.h>, <signal.h>,
+               dnl <poll.h> and others. The workaround is to force preservation
+               dnl of comments through option -C. This ensures all necessary
+               dnl #line directives are present. GCC supports option -C as well.
+               case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+               dnl eval is necessary to expand gl_absname_cpp.
+               dnl Ultrix and Pyramid sh refuse to redirect output of eval,
+               dnl so use subshell.
+               AS_VAR_SET([gl_next_header],
+                 ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+                  sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
+                    s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
+                    s#^/[^/]#//&#
+                    p
+                    q
+                  }'`'"'])
+          m4_if([$2], [check],
+            [else
+               AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+             fi
+            ])
+         ])
+     fi
+     AC_SUBST(
+       AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
+       [AS_VAR_GET([gl_next_header])])
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'gl_HEADER_NAME'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
+     fi
+     AC_SUBST(
+       AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
+       [$gl_next_as_first_directive])
+     AS_VAR_POPDEF([gl_next_header])])
+])
+
+# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE;
+# this fallback is safe for all earlier autoconf versions.
+m4_define_default([AC_LANG_DEFINES_PROVIDED])
diff --git a/gnulib/m4/inline.m4 b/gnulib/m4/inline.m4
new file mode 100644 (file)
index 0000000..a459080
--- /dev/null
@@ -0,0 +1,40 @@
+# inline.m4 serial 4
+dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Test for the 'inline' keyword or equivalent.
+dnl Define 'inline' to a supported equivalent, or to nothing if not supported,
+dnl like AC_C_INLINE does.  Also, define HAVE_INLINE if 'inline' or an
+dnl equivalent is effectively supported, i.e. if the compiler is likely to
+dnl drop unused 'static inline' functions.
+AC_DEFUN([gl_INLINE],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AC_CACHE_CHECK([whether the compiler generally respects inline],
+    [gl_cv_c_inline_effective],
+    [if test $ac_cv_c_inline = no; then
+       gl_cv_c_inline_effective=no
+     else
+       dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is
+       dnl specified.
+       dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result
+       dnl depends on optimization flags, which can be in CFLAGS.
+       dnl (AC_EGREP_CPP looks only at the CPPFLAGS.)
+       AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM([[]],
+           [[#ifdef __NO_INLINE__
+               #error "inline is not effective"
+             #endif]])],
+         [gl_cv_c_inline_effective=yes],
+         [gl_cv_c_inline_effective=no])
+     fi
+    ])
+  if test $gl_cv_c_inline_effective = yes; then
+    AC_DEFINE([HAVE_INLINE], [1],
+      [Define to 1 if the compiler supports one of the keywords
+       'inline', '__inline__', '__inline' and effectively inlines
+       functions marked as such.])
+  fi
+])
diff --git a/gnulib/m4/intlmacosx.m4 b/gnulib/m4/intlmacosx.m4
new file mode 100644 (file)
index 0000000..51f8547
--- /dev/null
@@ -0,0 +1,56 @@
+# intlmacosx.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2004-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+  dnl Check for API introduced in MacOS X 10.2.
+  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+    [gt_cv_func_CFPreferencesCopyAppValue],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFPreferences.h>]],
+          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
+       [gt_cv_func_CFPreferencesCopyAppValue=yes],
+       [gt_cv_func_CFPreferencesCopyAppValue=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+  fi
+  dnl Check for API introduced in MacOS X 10.3.
+  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFLocale.h>]],
+          [[CFLocaleCopyCurrent();]])],
+       [gt_cv_func_CFLocaleCopyCurrent=yes],
+       [gt_cv_func_CFLocaleCopyCurrent=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
+      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+  AC_SUBST([INTL_MACOSX_LIBS])
+])
diff --git a/gnulib/m4/intmax_t.m4 b/gnulib/m4/intmax_t.m4
new file mode 100644 (file)
index 0000000..7341054
--- /dev/null
@@ -0,0 +1,67 @@
+# intmax_t.m4 serial 8
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_PREREQ([2.53])
+
+# Define intmax_t to 'long' or 'long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([gl_AC_TYPE_INTMAX_T],
+[
+  dnl For simplicity, we assume that a header file defines 'intmax_t' if and
+  dnl only if it defines 'uintmax_t'.
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+    AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+    test $ac_cv_type_long_long_int = yes \
+      && ac_type='long long' \
+      || ac_type='long'
+    AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
+     [Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
+  else
+    AC_DEFINE([HAVE_INTMAX_T], [1],
+      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
+
+dnl An alternative would be to explicitly test for 'intmax_t'.
+
+AC_DEFUN([gt_AC_TYPE_INTMAX_T],
+[
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+          ]],
+          [[intmax_t x = -1; return !x;]])],
+       [gt_cv_c_intmax_t=yes],
+       [gt_cv_c_intmax_t=no])])
+  if test $gt_cv_c_intmax_t = yes; then
+    AC_DEFINE([HAVE_INTMAX_T], [1],
+      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+  else
+    AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+    test $ac_cv_type_long_long_int = yes \
+      && ac_type='long long' \
+      || ac_type='long'
+    AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
+     [Define to long or long long if <stdint.h> and <inttypes.h> don't define.])
+  fi
+])
diff --git a/gnulib/m4/inttostr.m4 b/gnulib/m4/inttostr.m4
new file mode 100644 (file)
index 0000000..b9875c9
--- /dev/null
@@ -0,0 +1,32 @@
+#serial 8
+dnl Copyright (C) 2004-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_INTTOSTR],
+[
+  gl_PREREQ_INTTOSTR
+  gl_PREREQ_IMAXTOSTR
+  gl_PREREQ_OFFTOSTR
+  gl_PREREQ_UMAXTOSTR
+  gl_PREREQ_UINTTOSTR
+])
+
+# Prerequisites of lib/inttostr.h.
+AC_DEFUN([gl_PREREQ_INTTOSTR], [
+  AC_REQUIRE([AC_TYPE_OFF_T])
+  :
+])
+
+# Prerequisites of lib/imaxtostr.c.
+AC_DEFUN([gl_PREREQ_IMAXTOSTR], [:])
+
+# Prerequisites of lib/offtostr.c.
+AC_DEFUN([gl_PREREQ_OFFTOSTR], [:])
+
+# Prerequisites of lib/umaxtostr.c.
+AC_DEFUN([gl_PREREQ_UMAXTOSTR], [:])
+
+# Prerequisites of lib/uinttostr.c.
+AC_DEFUN([gl_PREREQ_UINTTOSTR], [:])
diff --git a/gnulib/m4/inttypes-pri.m4 b/gnulib/m4/inttypes-pri.m4
new file mode 100644 (file)
index 0000000..e252b27
--- /dev/null
@@ -0,0 +1,42 @@
+# inttypes-pri.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1997-2002, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.53])
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values.  This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+  AC_CHECK_HEADERS([inttypes.h])
+  if test $ac_cv_header_inttypes_h = yes; then
+    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+      [gt_cv_inttypes_pri_broken],
+      [
+        AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+             ]],
+             [[]])],
+          [gt_cv_inttypes_pri_broken=no],
+          [gt_cv_inttypes_pri_broken=yes])
+      ])
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+    AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
+      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+    PRI_MACROS_BROKEN=1
+  else
+    PRI_MACROS_BROKEN=0
+  fi
+  AC_SUBST([PRI_MACROS_BROKEN])
+])
diff --git a/gnulib/m4/inttypes.m4 b/gnulib/m4/inttypes.m4
new file mode 100644 (file)
index 0000000..92a4ac0
--- /dev/null
@@ -0,0 +1,302 @@
+# inttypes.m4 serial 18
+dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price, Bruno Haible.
+dnl Test whether <inttypes.h> is supported or must be substituted.
+
+AC_DEFUN([gl_INTTYPES_H],
+[
+  AC_REQUIRE([gl_STDINT_H])
+  AC_REQUIRE([gt_INTTYPES_PRI])
+  AC_CHECK_HEADERS_ONCE([inttypes.h])
+  AC_CHECK_DECLS_ONCE([imaxabs])
+  AC_CHECK_DECLS_ONCE([imaxdiv])
+  AC_CHECK_DECLS_ONCE([strtoimax])
+  AC_CHECK_DECLS_ONCE([strtoumax])
+
+  dnl Now see if we need a substitute <inttypes.h>.
+  dnl A complete <inttypes.h> requires
+  dnl   - a complete <stdint.h>,
+  dnl   - the existence of an <inttypes.h>,
+  dnl   - that imaxabs, imaxdiv, strtoimax, strtoumax are declared,
+  dnl   - some additional tests.
+  AC_CACHE_CHECK([whether inttypes.h conforms to C99],
+    [gl_cv_header_working_inttypes_h],
+    [gl_cv_header_working_inttypes_h=no
+     if test "$gl_cv_header_working_stdint_h" = yes \
+        && test $ac_cv_header_inttypes_h = yes \
+        && test "$ac_cv_have_decl_imaxabs" = yes \
+        && test "$ac_cv_have_decl_imaxdiv" = yes \
+        && test "$ac_cv_have_decl_strtoimax" = yes \
+        && test "$ac_cv_have_decl_strtoumax" = yes; then
+       AC_COMPILE_IFELSE([
+         AC_LANG_PROGRAM([[
+#include <stddef.h>
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */
+#include <inttypes.h>
+
+/* No need to duplicate the tests of stdint.m4; they are subsumed by
+   $gl_cv_header_working_stdint_h = yes.  */
+
+/* Tests for macros supposed to be defined in inttypes.h.  */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+  PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+  PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+  PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+  PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+  PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+  PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+  PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+  PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+  PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+  PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+  PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+  PRIdLEAST64 PRIiLEAST64
+  PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+  PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+  PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+  PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+  PRIdFAST64 PRIiFAST64
+  PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+  PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+  PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+  PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+  ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+  SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+  SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+  SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+  SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+  SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+  SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+  SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+  SCNo64 SCNu64 SCNx64
+#endif
+  SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+  SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+  SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+  SCNdLEAST64 SCNiLEAST64
+  SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+  SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+  SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+  SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+  SCNdFAST64 SCNiFAST64
+  SCNoFAST64 SCNuFAST64 SCNxFAST64
+  SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+  SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+  SCNoPTR SCNuPTR SCNxPTR
+#endif
+  ;
+         ]])],
+         [gl_cv_header_working_inttypes_h=yes])
+     fi])
+
+  dnl Override <inttypes.h> always, so that the portability warnings work.
+  AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+  gl_CHECK_NEXT_HEADERS([inttypes.h])
+
+  AC_REQUIRE([gl_MULTIARCH])
+
+  dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
+  dnl <inttypes.h> relies on them.  This macro is only needed when a
+  dnl C++ compiler is in use; it has no effect for a C compiler.
+  dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's
+  dnl <inttypes.h> is going to be created, and to avoid redefinition warnings
+  dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS.
+  AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1],
+    [Define to make the limit macros in <stdint.h> visible.])
+  AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
+[/* Ensure that <stdint.h> defines the limit macros, since gnulib's
+   <inttypes.h> relies on them.  */
+#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+])
+
+  PRIPTR_PREFIX=
+  if test -n "$STDINT_H"; then
+    dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
+    PRIPTR_PREFIX='"l"'
+  else
+    dnl Using the system's <stdint.h>.
+    for glpfx in '' l ll I64; do
+      case $glpfx in
+        '')  gltype1='int';;
+        l)   gltype1='long int';;
+        ll)  gltype1='long long int';;
+        I64) gltype1='__int64';;
+      esac
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[#include <stdint.h>
+           extern intptr_t foo;
+           extern $gltype1 foo;]])],
+        [PRIPTR_PREFIX='"'$glpfx'"'])
+      test -n "$PRIPTR_PREFIX" && break
+    done
+  fi
+  AC_SUBST([PRIPTR_PREFIX])
+
+  if test "$ac_cv_have_decl_imaxabs" = yes; then
+    HAVE_DECL_IMAXABS=1
+  else
+    HAVE_DECL_IMAXABS=0
+  fi
+
+  if test "$ac_cv_have_decl_imaxdiv" = yes; then
+    HAVE_DECL_IMAXDIV=1
+  else
+    HAVE_DECL_IMAXDIV=0
+  fi
+
+  if test "$ac_cv_have_decl_strtoimax" = yes; then
+    HAVE_DECL_STRTOIMAX=1
+  else
+    HAVE_DECL_STRTOIMAX=0
+  fi
+
+  if test "$ac_cv_have_decl_strtoumax" = yes; then
+    HAVE_DECL_STRTOUMAX=1
+  else
+    HAVE_DECL_STRTOUMAX=0
+  fi
+
+  gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+    [INT32_MAX_LT_INTMAX_MAX],
+    [defined INT32_MAX && defined INTMAX_MAX],
+    [INT32_MAX < INTMAX_MAX],
+    [sizeof (int) < sizeof (long long int)])
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+    gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+      [INT64_MAX_EQ_LONG_MAX],
+      [defined INT64_MAX],
+      [INT64_MAX == LONG_MAX],
+      [sizeof (long long int) == sizeof (long int)])
+  else
+    INT64_MAX_EQ_LONG_MAX=-1
+  fi
+  gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+    [UINT32_MAX_LT_UINTMAX_MAX],
+    [defined UINT32_MAX && defined UINTMAX_MAX],
+    [UINT32_MAX < UINTMAX_MAX],
+    [sizeof (unsigned int) < sizeof (unsigned long long int)])
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+    gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+      [UINT64_MAX_EQ_ULONG_MAX],
+      [defined UINT64_MAX],
+      [UINT64_MAX == ULONG_MAX],
+      [sizeof (unsigned long long int) == sizeof (unsigned long int)])
+  else
+    UINT64_MAX_EQ_ULONG_MAX=-1
+  fi
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
+    ]], [imaxabs imaxdiv strtoimax strtoumax])
+])
+
+# Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
+# If $2 is true, the condition is $3; otherwise if long long int is supported
+# approximate the condition with $4; otherwise, assume the condition is false.
+# The condition should work on all C99 platforms; the approximations should be
+# good enough to work on all practical pre-C99 platforms.
+# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants.
+AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
+[
+  AC_CACHE_CHECK([whether $3],
+    [gl_cv_test_$1],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
+
+            #if $2
+             #define CONDITION ($3)
+            #elif HAVE_LONG_LONG_INT
+             #define CONDITION ($4)
+            #else
+             #define CONDITION 0
+            #endif
+            int test[CONDITION ? 1 : -1];]])],
+       [gl_cv_test_$1=yes],
+       [gl_cv_test_$1=no])])
+  if test $gl_cv_test_$1 = yes; then
+    $1=1;
+  else
+    $1=0;
+  fi
+  AC_SUBST([$1])
+])
+
+AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
+[
+  GNULIB_IMAXABS=0;      AC_SUBST([GNULIB_IMAXABS])
+  GNULIB_IMAXDIV=0;      AC_SUBST([GNULIB_IMAXDIV])
+  GNULIB_STRTOIMAX=0;    AC_SUBST([GNULIB_STRTOIMAX])
+  GNULIB_STRTOUMAX=0;    AC_SUBST([GNULIB_STRTOUMAX])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_IMAXABS=1;   AC_SUBST([HAVE_DECL_IMAXABS])
+  HAVE_DECL_IMAXDIV=1;   AC_SUBST([HAVE_DECL_IMAXDIV])
+  HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
+  HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
+])
diff --git a/gnulib/m4/inttypes_h.m4 b/gnulib/m4/inttypes_h.m4
new file mode 100644 (file)
index 0000000..f10fd54
--- /dev/null
@@ -0,0 +1,29 @@
+# inttypes_h.m4 serial 10
+dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[
+#include <sys/types.h>
+#include <inttypes.h>
+          ]],
+          [[uintmax_t i = (uintmax_t) -1; return !i;]])],
+       [gl_cv_header_inttypes_h=yes],
+       [gl_cv_header_inttypes_h=no])])
+  if test $gl_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
+      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff --git a/gnulib/m4/isblank.m4 b/gnulib/m4/isblank.m4
new file mode 100644 (file)
index 0000000..771deef
--- /dev/null
@@ -0,0 +1,18 @@
+# isblank.m4 serial 2
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ISBLANK],
+[
+  dnl Persuade glibc <ctype.h> to declare isblank().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([isblank])
+  if test $ac_cv_func_isblank = no; then
+    HAVE_ISBLANK=0
+    AC_LIBOBJ([isblank])
+  fi
+])
diff --git a/gnulib/m4/iswblank.m4 b/gnulib/m4/iswblank.m4
new file mode 100644 (file)
index 0000000..38641ff
--- /dev/null
@@ -0,0 +1,31 @@
+# iswblank.m4 serial 2
+dnl Copyright (C) 2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ISWBLANK],
+[
+  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+  AC_REQUIRE([gl_WCTYPE_H])
+  dnl Persuade glibc <wctype.h> to declare iswblank().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_FUNCS_ONCE([iswblank])
+  AC_CHECK_DECLS_ONCE([iswblank])
+  if test $ac_cv_func_iswblank = no; then
+    HAVE_ISWBLANK=0
+    if test $ac_cv_have_decl_iswblank = yes; then
+      REPLACE_ISWBLANK=1
+    fi
+  fi
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+    dnl Redefine all of iswcntrl, ..., towupper in <wctype.h>.
+    :
+  else
+    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
+      dnl Redefine only iswblank.
+      AC_LIBOBJ([iswblank])
+    fi
+  fi
+
+])
diff --git a/gnulib/m4/langinfo_h.m4 b/gnulib/m4/langinfo_h.m4
new file mode 100644 (file)
index 0000000..4cced8a
--- /dev/null
@@ -0,0 +1,105 @@
+# langinfo_h.m4 serial 7
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LANGINFO_H],
+[
+  AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+
+  dnl Persuade glibc-2.0.6 <langinfo.h> to define CODESET.
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  dnl <langinfo.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_CHECK_NEXT_HEADERS([langinfo.h])
+
+  dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS.
+  HAVE_LANGINFO_CODESET=0
+  HAVE_LANGINFO_T_FMT_AMPM=0
+  HAVE_LANGINFO_ERA=0
+  HAVE_LANGINFO_YESEXPR=0
+  AC_CHECK_HEADERS_ONCE([langinfo.h])
+  if test $ac_cv_header_langinfo_h = yes; then
+    HAVE_LANGINFO_H=1
+    dnl Determine what <langinfo.h> defines. CODESET and ERA etc. are missing
+    dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
+    AC_CACHE_CHECK([whether langinfo.h defines CODESET],
+      [gl_cv_header_langinfo_codeset],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = CODESET;
+]])],
+         [gl_cv_header_langinfo_codeset=yes],
+         [gl_cv_header_langinfo_codeset=no])
+      ])
+    if test $gl_cv_header_langinfo_codeset = yes; then
+      HAVE_LANGINFO_CODESET=1
+    fi
+    AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM],
+      [gl_cv_header_langinfo_t_fmt_ampm],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = T_FMT_AMPM;
+]])],
+         [gl_cv_header_langinfo_t_fmt_ampm=yes],
+         [gl_cv_header_langinfo_t_fmt_ampm=no])
+      ])
+    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
+      HAVE_LANGINFO_T_FMT_AMPM=1
+    fi
+    AC_CACHE_CHECK([whether langinfo.h defines ERA],
+      [gl_cv_header_langinfo_era],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = ERA;
+]])],
+         [gl_cv_header_langinfo_era=yes],
+         [gl_cv_header_langinfo_era=no])
+      ])
+    if test $gl_cv_header_langinfo_era = yes; then
+      HAVE_LANGINFO_ERA=1
+    fi
+    AC_CACHE_CHECK([whether langinfo.h defines YESEXPR],
+      [gl_cv_header_langinfo_yesexpr],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = YESEXPR;
+]])],
+         [gl_cv_header_langinfo_yesexpr=yes],
+         [gl_cv_header_langinfo_yesexpr=no])
+      ])
+    if test $gl_cv_header_langinfo_yesexpr = yes; then
+      HAVE_LANGINFO_YESEXPR=1
+    fi
+  else
+    HAVE_LANGINFO_H=0
+  fi
+  AC_SUBST([HAVE_LANGINFO_H])
+  AC_SUBST([HAVE_LANGINFO_CODESET])
+  AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM])
+  AC_SUBST([HAVE_LANGINFO_ERA])
+  AC_SUBST([HAVE_LANGINFO_YESEXPR])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <langinfo.h>
+    ]], [nl_langinfo])
+])
+
+AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_LANGINFO_H_DEFAULTS],
+[
+  GNULIB_NL_LANGINFO=0;  AC_SUBST([GNULIB_NL_LANGINFO])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_NL_LANGINFO=1;    AC_SUBST([HAVE_NL_LANGINFO])
+  REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO])
+])
diff --git a/gnulib/m4/lchown.m4 b/gnulib/m4/lchown.m4
new file mode 100644 (file)
index 0000000..b567d81
--- /dev/null
@@ -0,0 +1,29 @@
+# serial 15
+# Determine whether we need the lchown wrapper.
+
+dnl Copyright (C) 1998, 2001, 2003-2007, 2009-2011 Free Software Foundation,
+dnl Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+dnl Provide lchown on systems that lack it, and work around bugs
+dnl on systems that have it.
+
+AC_DEFUN([gl_FUNC_LCHOWN],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_CHOWN])
+  AC_CHECK_FUNCS_ONCE([lchmod])
+  AC_REPLACE_FUNCS([lchown])
+  if test $ac_cv_func_lchown = no; then
+    HAVE_LCHOWN=0
+  elif test "$gl_cv_func_chown_slash_works" != yes \
+      || test "$gl_cv_func_chown_ctime_works" != yes; then
+    dnl Trailing slash and ctime bugs in chown also occur in lchown.
+    AC_LIBOBJ([lchown])
+    REPLACE_LCHOWN=1
+  fi
+])
diff --git a/gnulib/m4/lcmessage.m4 b/gnulib/m4/lcmessage.m4
new file mode 100644 (file)
index 0000000..baf41c5
--- /dev/null
@@ -0,0 +1,35 @@
+# lcmessage.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([gt_LC_MESSAGES],
+[
+  AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <locale.h>]],
+          [[return LC_MESSAGES]])],
+       [gt_cv_val_LC_MESSAGES=yes],
+       [gt_cv_val_LC_MESSAGES=no])])
+  if test $gt_cv_val_LC_MESSAGES = yes; then
+    AC_DEFINE([HAVE_LC_MESSAGES], [1],
+      [Define if your <locale.h> file defines LC_MESSAGES.])
+  fi
+])
diff --git a/gnulib/m4/lib-ld.m4 b/gnulib/m4/lib-ld.m4
new file mode 100644 (file)
index 0000000..ae003f7
--- /dev/null
@@ -0,0 +1,109 @@
+# lib-ld.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 1996-2003, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]* | [A-Za-z]:[\\/]*)]
+      [re_direlt='/[^/][^/]*/\.\./']
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL([acl_cv_path_LD],
+[if test -z "$LD"; then
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+        test "$with_gnu_ld" != no && break ;;
+      *)
+        test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT([$LD])
+else
+  AC_MSG_RESULT([no])
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/gnulib/m4/lib-link.m4 b/gnulib/m4/lib-link.m4
new file mode 100644 (file)
index 0000000..e7c9ba9
--- /dev/null
@@ -0,0 +1,777 @@
+# lib-link.m4 serial 26 (gettext-0.18.2)
+dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.54])
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  pushdef([Name],[m4_translit([$1],[./+-], [____])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  popdef([NAME])
+  popdef([Name])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  pushdef([Name],[m4_translit([$1],[./+-], [____])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+    dnl because these -l options might require -L options that are present in
+    dnl LIBS. -l options benefit only from the -L options listed before it.
+    dnl Otherwise, add it to the front of LIBS, because it may be a static
+    dnl library that depends on another static library that is present in LIBS.
+    dnl Static libraries benefit only from the static libraries listed after
+    dnl it.
+    case " $LIB[]NAME" in
+      *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+      *)       LIBS="$LIB[]NAME $LIBS" ;;
+    esac
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM([[$3]], [[$4]])],
+      [ac_cv_lib[]Name=yes],
+      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+    LIB[]NAME[]_PREFIX=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  popdef([NAME])
+  popdef([Name])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl   acl_libext,
+dnl   acl_shlibext,
+dnl   acl_libname_spec,
+dnl   acl_library_names_spec,
+dnl   acl_hardcode_libdir_flag_spec,
+dnl   acl_hardcode_libdir_separator,
+dnl   acl_hardcode_direct,
+dnl   acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE([rpath],
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  define([acl_frompackage_]NAME, [$2])
+  popdef([NAME])
+  pushdef([PACK],[$2])
+  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  define([acl_libsinpackage_]PACKUP,
+    m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
+  popdef([PACKUP])
+  popdef([PACK])
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
+  dnl Autoconf >= 2.61 supports dots in --with options.
+  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_ARG_WITH(P_A_C_K[-prefix],
+[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
+  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]NAME=
+  LIB[]NAME[]_PREFIX=
+  dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+  dnl computed. So it has to be reset here.
+  HAVE_LIB[]NAME=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='$1 $2'
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+        dnl or AC_LIB_HAVE_LINKFLAGS call.
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+          else
+            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+            dnl that this library doesn't exist. So just drop it.
+            :
+          fi
+        else
+          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+          dnl and the already constructed $LIBNAME/$LTLIBNAME.
+          found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+            dnl The same code as in the loop below:
+            dnl First look for a shared library.
+            if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+            dnl Then look for a static library.
+            if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIB[]NAME; do
+              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  dnl First look for a shared library.
+                  if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                  dnl Then look for a static library.
+                  if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+            dnl Found the library.
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+              dnl Linking with a shared library. We attempt to hardcode its
+              dnl directory into the executable's runpath, unless it's the
+              dnl standard /usr/lib.
+              if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                dnl No hardcoding is needed.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+              else
+                dnl Use an explicit option to hardcode DIR into the resulting
+                dnl binary.
+                dnl Potentially add DIR to ltrpathdirs.
+                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                dnl The hardcoding into $LIBNAME is system dependent.
+                if test "$acl_hardcode_direct" = yes; then
+                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+                  dnl resulting binary.
+                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                    dnl Use an explicit option to hardcode DIR into the resulting
+                    dnl binary.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    dnl Potentially add DIR to rpathdirs.
+                    dnl The rpathdirs will be appended to $LIBNAME at the end.
+                    haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                    dnl Rely on "-L$found_dir".
+                    dnl But don't add it if it's already contained in the LDFLAGS
+                    dnl or the already constructed $LIBNAME
+                    haveit=
+                    for x in $LDFLAGS $LIB[]NAME; do
+                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    else
+                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+                      dnl here, because this doesn't fit in flags passed to the
+                      dnl compiler. So give up. No hardcoding. This affects only
+                      dnl very old systems.
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                dnl Linking with a static library.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+              else
+                dnl We shouldn't come here, but anyway it's good to have a
+                dnl fallback.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+              fi
+            fi
+            dnl Assume the include files are nearby.
+            additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+              dnl Potentially add $additional_includedir to $INCNAME.
+              dnl But don't add it
+              dnl   1. if it's the standard /usr/include,
+              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
+              dnl   3. if it's already present in $CPPFLAGS or the already
+              dnl      constructed $INCNAME,
+              dnl   4. if it doesn't exist as a directory.
+              if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INC[]NAME; do
+                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                      dnl Really add $additional_includedir to $INCNAME.
+                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+            dnl Look for dependencies.
+            if test -n "$found_la"; then
+              dnl Read the .la file. It defines the variables
+              dnl dlname, library_names, old_library, dependency_libs, current,
+              dnl age, revision, installed, dlopen, dlpreopen, libdir.
+              save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+              dnl We use only dependency_libs.
+              for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+                    dnl But don't add it
+                    dnl   1. if it's the standard /usr/lib,
+                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
+                    dnl   3. if it's already present in $LDFLAGS or the already
+                    dnl      constructed $LIBNAME,
+                    dnl   4. if it doesn't exist as a directory.
+                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                      dnl Potentially add DIR to rpathdirs.
+                      dnl The rpathdirs will be appended to $LIBNAME at the end.
+                      haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                      dnl Potentially add DIR to ltrpathdirs.
+                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                      haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                    dnl Handle this in the next round.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                    dnl Handle this in the next round. Throw away the .la's
+                    dnl directory; it is already contained in a preceding -L
+                    dnl option.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                    dnl Most likely an immediate library name.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+            dnl Didn't find the library; assume it is in the system directories
+            dnl known to the linker and runtime loader. (All the system
+            dnl directories known to the linker should also be known to the
+            dnl runtime loader, otherwise the system is severely misconfigured.)
+            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+      dnl Weird platform: only the last -rpath option counts, the user must
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+  popdef([P_A_C_K])
+  popdef([PACKLIBS])
+  popdef([PACKUP])
+  popdef([PACK])
+  popdef([NAME])
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+  AC_REQUIRE([AC_LIB_RPATH])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  $1=
+  if test "$enable_rpath" != no; then
+    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+      dnl Use an explicit option to hardcode directories into the resulting
+      dnl binary.
+      rpathdirs=
+      next=
+      for opt in $2; do
+        if test -n "$next"; then
+          dir="$next"
+          dnl No need to hardcode the standard /usr/lib.
+          if test "X$dir" != "X/usr/$acl_libdirstem" \
+             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+            rpathdirs="$rpathdirs $dir"
+          fi
+          next=
+        else
+          case $opt in
+            -L) next=yes ;;
+            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+                 dnl No need to hardcode the standard /usr/lib.
+                 if test "X$dir" != "X/usr/$acl_libdirstem" \
+                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+                   rpathdirs="$rpathdirs $dir"
+                 fi
+                 next= ;;
+            *) next= ;;
+          esac
+        fi
+      done
+      if test "X$rpathdirs" != "X"; then
+        if test -n ""$3""; then
+          dnl libtool is used for linking. Use -R options.
+          for dir in $rpathdirs; do
+            $1="${$1}${$1:+ }-R$dir"
+          done
+        else
+          dnl The linker is used for linking directly.
+          if test -n "$acl_hardcode_libdir_separator"; then
+            dnl Weird platform: only the last -rpath option counts, the user
+            dnl must pass all path elements in one option.
+            alldirs=
+            for dir in $rpathdirs; do
+              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+            done
+            acl_save_libdir="$libdir"
+            libdir="$alldirs"
+            eval flag=\"$acl_hardcode_libdir_flag_spec\"
+            libdir="$acl_save_libdir"
+            $1="$flag"
+          else
+            dnl The -rpath options are cumulative.
+            for dir in $rpathdirs; do
+              acl_save_libdir="$libdir"
+              libdir="$dir"
+              eval flag=\"$acl_hardcode_libdir_flag_spec\"
+              libdir="$acl_save_libdir"
+              $1="${$1}${$1:+ }$flag"
+            done
+          fi
+        fi
+      fi
+    fi
+  fi
+  AC_SUBST([$1])
+])
diff --git a/gnulib/m4/lib-prefix.m4 b/gnulib/m4/lib-prefix.m4
new file mode 100644 (file)
index 0000000..7e5f0bd
--- /dev/null
@@ -0,0 +1,224 @@
+# lib-prefix.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib-prefix],
+[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl   "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl   "lib/amd64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+  dnl There is no formal standard regarding lib and lib64.
+  dnl On glibc systems, the current practice is that on a system supporting
+  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+  dnl the compiler's default mode by looking at the compiler's library search
+  dnl path. If at least one of its elements ends in /lib64 or points to a
+  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+  dnl Otherwise we use the default, namely "lib".
+  dnl On Solaris systems, the current practice is that on a system supporting
+  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+  dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+  dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  acl_libdirstem=lib
+  acl_libdirstem2=
+  case "$host_os" in
+    solaris*)
+      dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+      dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+      dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+      dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+      dnl symlink is missing, so we set acl_libdirstem2 too.
+      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+        [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+           ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+        ])
+      if test $gl_cv_solaris_64bit = yes; then
+        acl_libdirstem=lib/64
+        case "$host_cpu" in
+          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
+          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+        esac
+      fi
+      ;;
+    *)
+      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+      if test -n "$searchpath"; then
+        acl_save_IFS="${IFS=   }"; IFS=":"
+        for searchdir in $searchpath; do
+          if test -d "$searchdir"; then
+            case "$searchdir" in
+              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+              */../ | */.. )
+                # Better ignore directories of this form. They are misleading.
+                ;;
+              *) searchdir=`cd "$searchdir" && pwd`
+                 case "$searchdir" in
+                   */lib64 ) acl_libdirstem=lib64 ;;
+                 esac ;;
+            esac
+          fi
+        done
+        IFS="$acl_save_IFS"
+      fi
+      ;;
+  esac
+  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+])
diff --git a/gnulib/m4/libunistring-base.m4 b/gnulib/m4/libunistring-base.m4
new file mode 100644 (file)
index 0000000..9831448
--- /dev/null
@@ -0,0 +1,141 @@
+# libunistring-base.m4 serial 5
+dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paolo Bonzini and Bruno Haible.
+
+dnl gl_LIBUNISTRING_MODULE([VERSION], [Module])
+dnl Declares that the source files of Module should be compiled, unless we
+dnl are linking with libunistring and its version is >= the given VERSION.
+dnl Defines an automake conditional LIBUNISTRING_COMPILE_$MODULE that is
+dnl true if the source files of Module should be compiled.
+dnl This macro is to be used for public libunistring API, not for
+dnl undocumented API.
+dnl
+dnl You have to bump the VERSION argument to the next projected version
+dnl number each time you make a change that affects the behaviour of the
+dnl functions defined in Module (even if the sources of Module itself do not
+dnl change).
+
+AC_DEFUN([gl_LIBUNISTRING_MODULE],
+[
+  AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE])
+  dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from
+  dnl gl_LIBUNISTRING_CORE if that macro has been run.
+  AM_CONDITIONAL(AS_TR_CPP([LIBUNISTRING_COMPILE_$2]),
+    [gl_LIBUNISTRING_VERSION_CMP([$1])])
+])
+
+dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile])
+dnl Declares that HeaderFile should be created, unless we are linking
+dnl with libunistring and its version is >= the given VERSION.
+dnl HeaderFile should be relative to the lib directory and end in '.h'.
+dnl Prepares for substituting LIBUNISTRING_HEADERFILE (to HeaderFile or empty).
+dnl
+dnl When we are linking with the already installed libunistring and its version
+dnl is < VERSION, we create HeaderFile here, because we may compile functions
+dnl (via gl_LIBUNISTRING_MODULE above) that are not contained in the installed
+dnl version.
+dnl When we are linking with the already installed libunistring and its version
+dnl is > VERSION, we don't create HeaderFile here: it could cause compilation
+dnl errors in other libunistring header files if some types are missing.
+dnl
+dnl You have to bump the VERSION argument to the next projected version
+dnl number each time you make a non-comment change to the HeaderFile.
+
+AC_DEFUN([gl_LIBUNISTRING_LIBHEADER],
+[
+  AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE])
+  dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from
+  dnl gl_LIBUNISTRING_CORE if that macro has been run.
+  if gl_LIBUNISTRING_VERSION_CMP([$1]); then
+    LIBUNISTRING_[]AS_TR_CPP([$2])='$2'
+  else
+    LIBUNISTRING_[]AS_TR_CPP([$2])=
+  fi
+  AC_SUBST([LIBUNISTRING_]AS_TR_CPP([$2]))
+])
+
+dnl Miscellaneous preparations/initializations.
+
+AC_DEFUN([gl_LIBUNISTRING_LIB_PREPARE],
+[
+  dnl Ensure that HAVE_LIBUNISTRING is fully determined at this point.
+  m4_ifdef([gl_LIBUNISTRING], [AC_REQUIRE([gl_LIBUNISTRING])])
+
+  AC_REQUIRE([AC_PROG_AWK])
+
+dnl Sed expressions to extract the parts of a version number.
+changequote(,)
+gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+changequote([,])
+
+  if test "$HAVE_LIBUNISTRING" = yes; then
+    LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
+    LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
+    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
+  fi
+])
+
+dnl gl_LIBUNISTRING_VERSION_CMP([VERSION])
+dnl Expands to a shell statement that evaluates to true if LIBUNISTRING_VERSION
+dnl is less than the VERSION argument.
+AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP],
+[ { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+         dnl AS_LITERAL_IF exists and works fine since autoconf-2.59 at least.
+         AS_LITERAL_IF([$1],
+           [dnl This is the optimized variant, that assumes the argument is a literal:
+            m4_pushdef([requested_version_major],
+              [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^\([0-9]*\).*], [\1]), [])])
+            m4_pushdef([requested_version_minor],
+              [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.]\([0-9]*\).*], [\1]), [$1])])
+            m4_pushdef([requested_version_subminor],
+              [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.][0-9]*[.]\([0-9]*\).*], [\1]), [$1])])
+            test $LIBUNISTRING_VERSION_MAJOR -lt requested_version_major \
+            || { test $LIBUNISTRING_VERSION_MAJOR -eq requested_version_major \
+                 && { test $LIBUNISTRING_VERSION_MINOR -lt requested_version_minor \
+                      || { test $LIBUNISTRING_VERSION_MINOR -eq requested_version_minor \
+                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt requested_version_subminor
+                         }
+                    }
+               }
+            m4_popdef([requested_version_subminor])
+            m4_popdef([requested_version_minor])
+            m4_popdef([requested_version_major])
+           ],
+           [dnl This is the unoptimized variant:
+            requested_version_major=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_major"`
+            requested_version_minor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_minor"`
+            requested_version_subminor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_subminor"`
+            test $LIBUNISTRING_VERSION_MAJOR -lt $requested_version_major \
+            || { test $LIBUNISTRING_VERSION_MAJOR -eq $requested_version_major \
+                 && { test $LIBUNISTRING_VERSION_MINOR -lt $requested_version_minor \
+                      || { test $LIBUNISTRING_VERSION_MINOR -eq $requested_version_minor \
+                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt $requested_version_subminor
+                         }
+                    }
+               }
+           ])
+       }
+  }])
+
+dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the
+dnl same as ORIG, otherwise to 0.
+m4_define([gl_LIBUNISTRING_ARG_OR_ZERO], [m4_if([$1], [$2], [0], [$1])])
diff --git a/gnulib/m4/localcharset.m4 b/gnulib/m4/localcharset.m4
new file mode 100644 (file)
index 0000000..6801ca9
--- /dev/null
@@ -0,0 +1,17 @@
+# localcharset.m4 serial 7
+dnl Copyright (C) 2002, 2004, 2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LOCALCHARSET],
+[
+  dnl Prerequisites of lib/localcharset.c.
+  AC_REQUIRE([AM_LANGINFO_CODESET])
+  AC_REQUIRE([gl_FCNTL_O_FLAGS])
+  AC_CHECK_DECLS_ONCE([getc_unlocked])
+
+  dnl Prerequisites of the lib/Makefile.am snippet.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gl_GLIBC21])
+])
diff --git a/gnulib/m4/locale-fr.m4 b/gnulib/m4/locale-fr.m4
new file mode 100644 (file)
index 0000000..3f4f954
--- /dev/null
@@ -0,0 +1,246 @@
+# locale-fr.m4 serial 13
+dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a french locale with traditional encoding.
+AC_DEFUN([gt_LOCALE_FR],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AM_LANGINFO_CODESET])
+  AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+     one byte long. This excludes the UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+changequote([,])dnl
+      ])])
+    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Win32 locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
+            else
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
+              else
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+  ])
+  LOCALE_FR=$gt_cv_locale_fr
+  AC_SUBST([LOCALE_FR])
+])
+
+dnl Determine the name of a french locale with UTF-8 encoding.
+AC_DEFUN([gt_LOCALE_FR_UTF8],
+[
+  AC_REQUIRE([AM_LANGINFO_CODESET])
+  AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+  return 0;
+}
+changequote([,])dnl
+      ])])
+    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+  ])
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+  AC_SUBST([LOCALE_FR_UTF8])
+])
diff --git a/gnulib/m4/locale-ja.m4 b/gnulib/m4/locale-ja.m4
new file mode 100644 (file)
index 0000000..d44c2c8
--- /dev/null
@@ -0,0 +1,135 @@
+# locale-ja.m4 serial 9
+dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a japanese locale with EUC-JP encoding.
+AC_DEFUN([gt_LOCALE_JA],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AM_LANGINFO_CODESET])
+  AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
+     on Cygwin 1.5.x.  */
+  if (MB_CUR_MAX == 1)
+    return 1;
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  return 0;
+}
+changequote([,])dnl
+      ])])
+    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
+          # and CP932 is very different from EUC-JP, so we cannot use it here.
+          gt_cv_locale_ja=none
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the AIX locale name.
+          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_ja=ja_JP
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_ja=ja_JP.EUC-JP
+            else
+              # Test for the HP-UX, OSF/1, NetBSD locale name.
+              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_ja=ja_JP.eucJP
+              else
+                # Test for the IRIX, FreeBSD locale name.
+                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_ja=ja_JP.EUC
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_ja=ja
+                  else
+                    # Special test for NetBSD 1.6.
+                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+                      gt_cv_locale_ja=ja_JP.eucJP
+                    else
+                      # None found.
+                      gt_cv_locale_ja=none
+                    fi
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
+  ])
+  LOCALE_JA=$gt_cv_locale_ja
+  AC_SUBST([LOCALE_JA])
+])
diff --git a/gnulib/m4/locale-tr.m4 b/gnulib/m4/locale-tr.m4
new file mode 100644 (file)
index 0000000..19ded1b
--- /dev/null
@@ -0,0 +1,127 @@
+# locale-tr.m4 serial 7
+dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a turkish locale with UTF-8 encoding.
+AC_DEFUN([gt_LOCALE_TR_UTF8],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AM_LANGINFO_CODESET])
+  AC_CACHE_CHECK([for a turkish Unicode locale], [gt_cv_locale_tr_utf8], [
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  But BeOS does not
+     implement the Turkish upper-/lowercase mappings.  Therefore, let this
+     program return 1 on BeOS.  */
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the eighth month, the second
+     character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+    return 1;
+  /* Check whether the upper-/lowercase mappings are as expected for
+     Turkish.  */
+  if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+      || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+    return 1;
+  return 0;
+}
+changequote([,])dnl
+      ])])
+    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_tr_utf8=Turkish_Turkey.65001
+          else
+            # None found.
+            gt_cv_locale_tr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_tr_utf8=tr_TR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_tr_utf8=tr_TR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_tr_utf8=tr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_tr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    else
+      gt_cv_locale_tr_utf8=none
+    fi
+    rm -fr conftest*
+  ])
+  LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+  AC_SUBST([LOCALE_TR_UTF8])
+])
diff --git a/gnulib/m4/locale-zh.m4 b/gnulib/m4/locale-zh.m4
new file mode 100644 (file)
index 0000000..e03f91f
--- /dev/null
@@ -0,0 +1,124 @@
+# locale-zh.m4 serial 8
+dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a chinese locale with GB18030 encoding.
+AC_DEFUN([gt_LOCALE_ZH_CN],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AM_LANGINFO_CODESET])
+  AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  const char *p;
+  /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Win32, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+  for (p = buf; *p != '\0'; p++)
+    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+      return 1;
+  /* Check whether a typical GB18030 multibyte sequence is recognized as a
+     single wide character.  This excludes the GB2312 and GBK encodings.  */
+  if (mblen ("\203\062\332\066", 5) != 4)
+    return 1;
+  return 0;
+}
+changequote([,])dnl
+      ])])
+    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Win32 locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
+    else
+      # If there was a link error, due to mblen(), the system is so old that
+      # it certainly doesn't have a chinese locale.
+      gt_cv_locale_zh_CN=none
+    fi
+    rm -fr conftest*
+  ])
+  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+  AC_SUBST([LOCALE_ZH_CN])
+])
diff --git a/gnulib/m4/locale_h.m4 b/gnulib/m4/locale_h.m4
new file mode 100644 (file)
index 0000000..4d0f894
--- /dev/null
@@ -0,0 +1,101 @@
+# locale_h.m4 serial 13
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LOCALE_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+
+  dnl Persuade glibc <locale.h> to define locale_t.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl If <stddef.h> is replaced, then <locale.h> must also be replaced.
+  AC_REQUIRE([gl_STDDEF_H])
+
+  AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001],
+    [gl_cv_header_locale_h_posix2001],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <locale.h>
+            int x = LC_MESSAGES;]],
+          [[]])],
+       [gl_cv_header_locale_h_posix2001=yes],
+       [gl_cv_header_locale_h_posix2001=no])])
+
+  dnl Check for <xlocale.h>.
+  AC_CHECK_HEADERS_ONCE([xlocale.h])
+  if test $ac_cv_header_xlocale_h = yes; then
+    HAVE_XLOCALE_H=1
+    dnl Check whether use of locale_t requires inclusion of <xlocale.h>,
+    dnl e.g. on MacOS X 10.5. If <locale.h> does not define locale_t by
+    dnl itself, we assume that <xlocale.h> will do so.
+    AC_CACHE_CHECK([whether locale.h defines locale_t],
+      [gl_cv_header_locale_has_locale_t],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <locale.h>
+              locale_t x;]],
+            [[]])],
+         [gl_cv_header_locale_has_locale_t=yes],
+         [gl_cv_header_locale_has_locale_t=no])
+      ])
+    if test $gl_cv_header_locale_has_locale_t = yes; then
+      gl_cv_header_locale_h_needs_xlocale_h=no
+    else
+      gl_cv_header_locale_h_needs_xlocale_h=yes
+    fi
+  else
+    HAVE_XLOCALE_H=0
+    gl_cv_header_locale_h_needs_xlocale_h=no
+  fi
+  AC_SUBST([HAVE_XLOCALE_H])
+
+  dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_NEXT_HEADERS([locale.h])
+
+  if test -n "$STDDEF_H" \
+     || test $gl_cv_header_locale_h_posix2001 = no \
+     || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then
+    gl_REPLACE_LOCALE_H
+  fi
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <locale.h>
+/* Some systems provide declarations in a non-standard header.  */
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
+    ]],
+    [setlocale duplocale])
+])
+
+dnl Unconditionally enables the replacement of <locale.h>.
+AC_DEFUN([gl_REPLACE_LOCALE_H],
+[
+  dnl This is a no-op, because <locale.h> is always overridden.
+  :
+])
+
+AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_LOCALE_H_DEFAULTS],
+[
+  GNULIB_SETLOCALE=0;  AC_SUBST([GNULIB_SETLOCALE])
+  GNULIB_DUPLOCALE=0;  AC_SUBST([GNULIB_DUPLOCALE])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DUPLOCALE=1;    AC_SUBST([HAVE_DUPLOCALE])
+  REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
+  REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
+])
diff --git a/gnulib/m4/localename.m4 b/gnulib/m4/localename.m4
new file mode 100644 (file)
index 0000000..926ada6
--- /dev/null
@@ -0,0 +1,12 @@
+# localename.m4 serial 2
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LOCALENAME],
+[
+  AC_REQUIRE([gt_LC_MESSAGES])
+  AC_REQUIRE([gt_INTL_MACOSX])
+  AC_CHECK_FUNCS([setlocale uselocale])
+])
diff --git a/gnulib/m4/lock.m4 b/gnulib/m4/lock.m4
new file mode 100644 (file)
index 0000000..9686945
--- /dev/null
@@ -0,0 +1,41 @@
+# lock.m4 serial 11 (gettext-0.18.2)
+dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_LOCK],
+[
+  AC_REQUIRE([gl_THREADLIB])
+  if test "$gl_threads_api" = posix; then
+    # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+    # pthread_rwlock_* functions.
+    AC_CHECK_TYPE([pthread_rwlock_t],
+      [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
+         [Define if the POSIX multithreading library has read/write locks.])],
+      [],
+      [#include <pthread.h>])
+    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM(
+        [[#include <pthread.h>]],
+        [[
+#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif
+        ]])],
+      [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
+         [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
+  fi
+  gl_PREREQ_LOCK
+])
+
+# Prerequisites of lib/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [
+  AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/gnulib/m4/longlong.m4 b/gnulib/m4/longlong.m4
new file mode 100644 (file)
index 0000000..aed816c
--- /dev/null
@@ -0,0 +1,113 @@
+# longlong.m4 serial 16
+dnl Copyright (C) 1999-2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
+
+# Note: If the type 'long long int' exists but is only 32 bits large
+# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+     [ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+          dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+          dnl If cross compiling, assume the bug is not important, since
+          dnl nobody cross compiles for this platform as far as we know.
+          AC_RUN_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[@%:@include <limits.h>
+                 @%:@ifndef LLONG_MAX
+                 @%:@ define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 @%:@ define LLONG_MAX (HALF - 1 + HALF)
+                 @%:@endif]],
+               [[long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;]])],
+            [],
+            [ac_cv_type_long_long_int=no],
+            [:])
+        fi
+      fi])
+  if test $ac_cv_type_long_long_int = yes; then
+    AC_DEFINE([HAVE_LONG_LONG_INT], [1],
+      [Define to 1 if the system has the type `long long int'.])
+  fi
+])
+
+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
+
+# Note: If the type 'unsigned long long int' exists but is only 32 bits
+# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
+# will not be defined. In this case you can treat 'unsigned long long int'
+# like 'unsigned long int'.
+
+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
+[
+  AC_CACHE_CHECK([for unsigned long long int],
+    [ac_cv_type_unsigned_long_long_int],
+    [ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       AC_LINK_IFELSE(
+         [_AC_TYPE_LONG_LONG_SNIPPET],
+         [],
+         [ac_cv_type_unsigned_long_long_int=no])
+     fi])
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
+      [Define to 1 if the system has the type `unsigned long long int'.])
+  fi
+])
+
+# Expands to a C program that can be used to test for simultaneous support
+# of 'long long' and 'unsigned long long'. We don't want to say that
+# 'long long' is available if 'unsigned long long' is not, or vice versa,
+# because too many programs rely on the symmetry between signed and unsigned
+# integer types (excluding 'bool').
+AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
+[
+  AC_LANG_PROGRAM(
+    [[/* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;]],
+    [[/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));]])
+])
diff --git a/gnulib/m4/ls-mntd-fs.m4 b/gnulib/m4/ls-mntd-fs.m4
new file mode 100644 (file)
index 0000000..72beaed
--- /dev/null
@@ -0,0 +1,353 @@
+# serial 28
+# How to list mounted file systems.
+
+# Copyright (C) 1998-2004, 2006, 2009-2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+dnl From Jim Meyering.
+dnl
+dnl This is not pretty.  I've just taken the autoconf code and wrapped
+dnl it in an AC_DEFUN and made some other fixes.
+dnl
+
+# Replace Autoconf's AC_FUNC_GETMNTENT to work around a bug in Autoconf
+# through Autoconf 2.59.  We can remove this once we assume Autoconf 2.60
+# or later.
+AC_DEFUN([AC_FUNC_GETMNTENT],
+[# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
+# -lseq on Dynix/PTX, -lgen on Unixware.
+AC_SEARCH_LIBS([getmntent], [sun seq gen])
+AC_CHECK_FUNCS([getmntent])
+])
+
+# gl_LIST_MOUNTED_FILE_SYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS],
+  [
+AC_CHECK_FUNCS([listmntent getmntinfo])
+AC_CHECK_HEADERS_ONCE([sys/param.h sys/statvfs.h])
+
+# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses
+# NGROUPS (as the array dimension for a struct member) without a definition.
+AC_CHECK_HEADERS([sys/ucred.h], [], [], [#include <grp.h>])
+
+AC_CHECK_HEADERS([sys/mount.h], [], [],
+  [AC_INCLUDES_DEFAULT
+   [#if HAVE_SYS_PARAM_H
+     #include <sys/param.h>
+    #endif]])
+
+AC_CHECK_HEADERS([mntent.h sys/fs_types.h])
+    getfsstat_includes="\
+$ac_includes_default
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */
+#endif
+#if HAVE_SYS_UCRED_H
+# include <grp.h> /* needed for definition of NGROUPS */
+# include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
+#endif
+#if HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#if HAVE_SYS_FS_TYPES_H
+# include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */
+#endif
+"
+AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes])
+
+# Determine how to get the list of mounted file systems.
+ac_list_mounted_fs=
+
+# If the getmntent function is available but not in the standard library,
+# make sure LIBS contains the appropriate -l option.
+AC_FUNC_GETMNTENT
+
+# This test must precede the ones for getmntent because Unicos-9 is
+# reported to have the getmntent function, but its support is incompatible
+# with other getmntent implementations.
+
+# NOTE: Normally, I wouldn't use a check for system type as I've done for
+# `CRAY' below since that goes against the whole autoconf philosophy.  But
+# I think there is too great a chance that some non-Cray system has a
+# function named listmntent to risk the false positive.
+
+if test -z "$ac_list_mounted_fs"; then
+  # Cray UNICOS 9
+  AC_MSG_CHECKING([for listmntent of Cray/Unicos-9])
+  AC_CACHE_VAL([fu_cv_sys_mounted_cray_listmntent],
+    [fu_cv_sys_mounted_cray_listmntent=no
+      AC_EGREP_CPP([yes],
+        [#ifdef _CRAY
+yes
+#endif
+        ], [test $ac_cv_func_listmntent = yes \
+            && fu_cv_sys_mounted_cray_listmntent=yes]
+      )
+    ]
+  )
+  AC_MSG_RESULT([$fu_cv_sys_mounted_cray_listmntent])
+  if test $fu_cv_sys_mounted_cray_listmntent = yes; then
+    ac_list_mounted_fs=found
+    AC_DEFINE([MOUNTED_LISTMNTENT], [1],
+      [Define if there is a function named listmntent that can be used to
+       list all mounted file systems.  (UNICOS)])
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # AIX.
+  AC_MSG_CHECKING([for mntctl function and struct vmount])
+  AC_CACHE_VAL([fu_cv_sys_mounted_vmount],
+  [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <fshelp.h>]])],
+    [fu_cv_sys_mounted_vmount=yes],
+    [fu_cv_sys_mounted_vmount=no])])
+  AC_MSG_RESULT([$fu_cv_sys_mounted_vmount])
+  if test $fu_cv_sys_mounted_vmount = yes; then
+    ac_list_mounted_fs=found
+    AC_DEFINE([MOUNTED_VMOUNT], [1],
+        [Define if there is a function named mntctl that can be used to read
+         the list of mounted file systems, and there is a system header file
+         that declares `struct vmount.'  (AIX)])
+  fi
+fi
+
+if test $ac_cv_func_getmntent = yes; then
+
+  # This system has the getmntent function.
+  # Determine whether it's the one-argument variant or the two-argument one.
+
+  if test -z "$ac_list_mounted_fs"; then
+    # 4.3BSD, SunOS, HP-UX, Dynix, Irix
+    AC_MSG_CHECKING([for one-argument getmntent function])
+    AC_CACHE_VAL([fu_cv_sys_mounted_getmntent1],
+                 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */
+#include <stdio.h>
+
+#include <mntent.h>
+#if !defined MOUNTED
+# if defined _PATH_MOUNTED      /* GNU libc  */
+#  define MOUNTED _PATH_MOUNTED
+# endif
+# if defined MNT_MNTTAB /* HP-UX.  */
+#  define MOUNTED MNT_MNTTAB
+# endif
+# if defined MNTTABNAME /* Dynix.  */
+#  define MOUNTED MNTTABNAME
+# endif
+#endif
+]],
+                      [[ struct mntent *mnt = 0; char *table = MOUNTED;
+                         if (sizeof mnt && sizeof table) return 0;]])],
+                    [fu_cv_sys_mounted_getmntent1=yes],
+                    [fu_cv_sys_mounted_getmntent1=no])])
+    AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent1])
+    if test $fu_cv_sys_mounted_getmntent1 = yes; then
+      ac_list_mounted_fs=found
+      AC_DEFINE([MOUNTED_GETMNTENT1], [1],
+        [Define if there is a function named getmntent for reading the list
+         of mounted file systems, and that function takes a single argument.
+         (4.3BSD, SunOS, HP-UX, Dynix, Irix)])
+    fi
+  fi
+
+  if test -z "$ac_list_mounted_fs"; then
+    # SVR4
+    AC_MSG_CHECKING([for two-argument getmntent function])
+    AC_CACHE_VAL([fu_cv_sys_mounted_getmntent2],
+    [AC_EGREP_HEADER([getmntent], [sys/mnttab.h],
+      fu_cv_sys_mounted_getmntent2=yes,
+      fu_cv_sys_mounted_getmntent2=no)])
+    AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent2])
+    if test $fu_cv_sys_mounted_getmntent2 = yes; then
+      ac_list_mounted_fs=found
+      AC_DEFINE([MOUNTED_GETMNTENT2], [1],
+        [Define if there is a function named getmntent for reading the list of
+         mounted file systems, and that function takes two arguments.  (SVR4)])
+      AC_CHECK_FUNCS([hasmntopt])
+    fi
+  fi
+
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # DEC Alpha running OSF/1, and Apple Darwin 1.3.
+  # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h
+
+  AC_MSG_CHECKING([for getfsstat function])
+  AC_CACHE_VAL([fu_cv_sys_mounted_getfsstat],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
+# define FS_TYPE(Ent) ((Ent).f_fstypename)
+#else
+# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
+#endif
+$getfsstat_includes]]
+,
+      [[struct statfs *stats;
+        int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT);
+        char *t = FS_TYPE (*stats); ]])],
+    [fu_cv_sys_mounted_getfsstat=yes],
+    [fu_cv_sys_mounted_getfsstat=no])])
+  AC_MSG_RESULT([$fu_cv_sys_mounted_getfsstat])
+  if test $fu_cv_sys_mounted_getfsstat = yes; then
+    ac_list_mounted_fs=found
+    AC_DEFINE([MOUNTED_GETFSSTAT], [1],
+              [Define if there is a function named getfsstat for reading the
+               list of mounted file systems.  (DEC Alpha running OSF/1)])
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # SVR3
+  AC_MSG_CHECKING([for FIXME existence of three headers])
+  AC_CACHE_VAL([fu_cv_sys_mounted_fread_fstyp],
+    [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
+#include <sys/statfs.h>
+#include <sys/fstyp.h>
+#include <mnttab.h>]])],
+                       [fu_cv_sys_mounted_fread_fstyp=yes],
+                       [fu_cv_sys_mounted_fread_fstyp=no])])
+  AC_MSG_RESULT([$fu_cv_sys_mounted_fread_fstyp])
+  if test $fu_cv_sys_mounted_fread_fstyp = yes; then
+    ac_list_mounted_fs=found
+    AC_DEFINE([MOUNTED_FREAD_FSTYP], [1],
+      [Define if (like SVR2) there is no specific function for reading the
+       list of mounted file systems, and your system has these header files:
+       <sys/fstyp.h> and <sys/statfs.h>.  (SVR3)])
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # 4.4BSD and DEC OSF/1.
+  AC_MSG_CHECKING([for getmntinfo function])
+  AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo],
+    [
+      test "$ac_cv_func_getmntinfo" = yes \
+          && fu_cv_sys_mounted_getmntinfo=yes \
+          || fu_cv_sys_mounted_getmntinfo=no
+    ])
+  AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo])
+  if test $fu_cv_sys_mounted_getmntinfo = yes; then
+    AC_MSG_CHECKING([whether getmntinfo returns statvfs structures])
+    AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo2],
+      [
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#include <sys/types.h>
+#if HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#if HAVE_SYS_STATVFS_H
+# include <sys/statvfs.h>
+#endif
+extern int getmntinfo (struct statfs **, int);
+            ]], [])],
+          [fu_cv_sys_mounted_getmntinfo2=no],
+          [fu_cv_sys_mounted_getmntinfo2=yes])
+      ])
+    AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo2])
+    if test $fu_cv_sys_mounted_getmntinfo2 = no; then
+      ac_list_mounted_fs=found
+      AC_DEFINE([MOUNTED_GETMNTINFO], [1],
+                [Define if there is a function named getmntinfo for reading the
+                 list of mounted file systems and it returns an array of
+                 'struct statfs'.  (4.4BSD, Darwin)])
+    else
+      ac_list_mounted_fs=found
+      AC_DEFINE([MOUNTED_GETMNTINFO2], [1],
+                [Define if there is a function named getmntinfo for reading the
+                 list of mounted file systems and it returns an array of
+                 'struct statvfs'.  (NetBSD 3.0)])
+    fi
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # Ultrix
+  AC_MSG_CHECKING([for getmnt function])
+  AC_CACHE_VAL([fu_cv_sys_mounted_getmnt],
+    [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
+#include <sys/fs_types.h>
+#include <sys/mount.h>]])],
+                       [fu_cv_sys_mounted_getmnt=yes],
+                       [fu_cv_sys_mounted_getmnt=no])])
+  AC_MSG_RESULT([$fu_cv_sys_mounted_getmnt])
+  if test $fu_cv_sys_mounted_getmnt = yes; then
+    ac_list_mounted_fs=found
+    AC_DEFINE([MOUNTED_GETMNT], [1],
+      [Define if there is a function named getmnt for reading the list of
+       mounted file systems.  (Ultrix)])
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # BeOS
+  AC_CHECK_FUNCS([next_dev fs_stat_dev])
+  AC_CHECK_HEADERS([fs_info.h])
+  AC_MSG_CHECKING([for BEOS mounted file system support functions])
+  if test $ac_cv_header_fs_info_h = yes \
+      && test $ac_cv_func_next_dev = yes \
+        && test $ac_cv_func_fs_stat_dev = yes; then
+    fu_result=yes
+  else
+    fu_result=no
+  fi
+  AC_MSG_RESULT([$fu_result])
+  if test $fu_result = yes; then
+    ac_list_mounted_fs=found
+    AC_DEFINE([MOUNTED_FS_STAT_DEV], [1],
+      [Define if there are functions named next_dev and fs_stat_dev for
+       reading the list of mounted file systems.  (BeOS)])
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # SVR2
+  AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab])
+  AC_CACHE_VAL([fu_cv_sys_mounted_fread],
+    [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <mnttab.h>]])],
+                       [fu_cv_sys_mounted_fread=yes],
+                       [fu_cv_sys_mounted_fread=no])])
+  AC_MSG_RESULT([$fu_cv_sys_mounted_fread])
+  if test $fu_cv_sys_mounted_fread = yes; then
+    ac_list_mounted_fs=found
+    AC_DEFINE([MOUNTED_FREAD], [1],
+              [Define if there is no specific function for reading the list of
+               mounted file systems.  fread will be used to read /etc/mnttab.
+               (SVR2) ])
+  fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  # Interix / BSD alike statvfs
+  # the code is really interix specific, so make sure, we're on it.
+  case "$host" in
+  *-interix*)
+    AC_CHECK_FUNCS([statvfs])
+    if test $ac_cv_func_statvfs = yes; then
+      ac_list_mounted_fs=found
+      AC_DEFINE([MOUNTED_INTERIX_STATVFS], [1],
+                [Define if we are on interix, and ought to use statvfs plus
+                 some special knowledge on where mounted filesystems can be
+                 found. (Interix)])
+    fi
+    ;;
+  esac
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+  AC_MSG_ERROR([could not determine how to read list of mounted file systems])
+  # FIXME -- no need to abort building the whole package
+  # Can't build mountlist.c or anything that needs its functions
+fi
+
+AS_IF([test $ac_list_mounted_fs = found], [$1], [$2])
+
+  ])
diff --git a/gnulib/m4/lseek.m4 b/gnulib/m4/lseek.m4
new file mode 100644 (file)
index 0000000..f6452f6
--- /dev/null
@@ -0,0 +1,49 @@
+# lseek.m4 serial 6
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LSEEK],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe],
+    [if test $cross_compiling = no; then
+       AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h> /* for off_t */
+#include <stdio.h> /* for SEEK_CUR */
+#include <unistd.h>]], [[
+  /* Exit with success only if stdin is seekable.  */
+  return lseek (0, (off_t)0, SEEK_CUR) < 0;
+]])],
+         [if test -s conftest$ac_exeext \
+             && ./conftest$ac_exeext < conftest.$ac_ext \
+             && test 1 = "`echo hi \
+               | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+            gl_cv_func_lseek_pipe=yes
+          else
+            gl_cv_func_lseek_pipe=no
+          fi],
+         [gl_cv_func_lseek_pipe=no])
+     else
+       AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
+/* mingw and BeOS mistakenly return 0 when trying to seek on pipes.  */
+  Choke me.
+#endif]])],
+         [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
+     fi])
+  if test $gl_cv_func_lseek_pipe = no; then
+    gl_REPLACE_LSEEK
+  fi
+])
+
+AC_DEFUN([gl_REPLACE_LSEEK],
+[
+  AC_LIBOBJ([lseek])
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  REPLACE_LSEEK=1
+  AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
+            [Define to 1 if lseek does not detect pipes.])
+])
diff --git a/gnulib/m4/lstat.m4 b/gnulib/m4/lstat.m4
new file mode 100644 (file)
index 0000000..b9b22a6
--- /dev/null
@@ -0,0 +1,69 @@
+# serial 21
+
+# Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+dnl From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_LSTAT],
+[
+  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+  dnl If lstat does not exist, the replacement <sys/stat.h> does
+  dnl "#define lstat stat", and lstat.c is a no-op.
+  AC_CHECK_FUNCS_ONCE([lstat])
+  if test $ac_cv_func_lstat = yes; then
+    AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+    if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+      dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
+      REPLACE_LSTAT=1
+    fi
+    # Prerequisites of lib/lstat.c.
+    AC_REQUIRE([AC_C_INLINE])
+  else
+    HAVE_LSTAT=0
+  fi
+])
+
+# Redefine AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, because it is no longer
+# maintained in Autoconf.
+AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
+[
+  AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
+    [ac_cv_func_lstat_dereferences_slashed_symlink],
+    [rm -f conftest.sym conftest.file
+     echo >conftest.file
+     if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
+       AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+            [AC_INCLUDES_DEFAULT],
+            [[struct stat sbuf;
+              /* Linux will dereference the symlink and fail, as required by
+                 POSIX.  That is better in the sense that it means we will not
+                 have to compile and use the lstat wrapper.  */
+              return lstat ("conftest.sym/", &sbuf) == 0;
+            ]])],
+         [ac_cv_func_lstat_dereferences_slashed_symlink=yes],
+         [ac_cv_func_lstat_dereferences_slashed_symlink=no],
+         [# When cross-compiling, be pessimistic so we will end up using the
+          # replacement version of lstat that checks for trailing slashes and
+          # calls lstat a second time when necessary.
+          ac_cv_func_lstat_dereferences_slashed_symlink=no
+         ])
+     else
+       # If the 'ln -s' command failed, then we probably don't even
+       # have an lstat function.
+       ac_cv_func_lstat_dereferences_slashed_symlink=no
+     fi
+     rm -f conftest.sym conftest.file
+    ])
+  test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
+    AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
+      [Define to 1 if `lstat' dereferences a symlink specified
+       with a trailing slash.])
+  if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
+    AC_LIBOBJ([lstat])
+  fi
+])
diff --git a/gnulib/m4/malloc.m4 b/gnulib/m4/malloc.m4
new file mode 100644 (file)
index 0000000..8094444
--- /dev/null
@@ -0,0 +1,66 @@
+# malloc.m4 serial 12
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_FUNC_MALLOC_GNU
+# ------------------
+# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
+# it is not.
+AC_DEFUN([gl_FUNC_MALLOC_GNU],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  dnl _AC_FUNC_MALLOC_IF is defined in Autoconf.
+  _AC_FUNC_MALLOC_IF(
+    [AC_DEFINE([HAVE_MALLOC_GNU], [1],
+               [Define to 1 if your system has a GNU libc compatible 'malloc'
+                function, and to 0 otherwise.])],
+    [AC_DEFINE([HAVE_MALLOC_GNU], [0])
+     gl_REPLACE_MALLOC
+    ])
+])
+
+# gl_FUNC_MALLOC_POSIX
+# --------------------
+# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
+# fails), and replace malloc if it is not.
+AC_DEFUN([gl_FUNC_MALLOC_POSIX],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+  if test $gl_cv_func_malloc_posix = yes; then
+    AC_DEFINE([HAVE_MALLOC_POSIX], [1],
+      [Define if the 'malloc' function is POSIX compliant.])
+  else
+    gl_REPLACE_MALLOC
+  fi
+])
+
+# Test whether malloc, realloc, calloc are POSIX compliant,
+# Set gl_cv_func_malloc_posix to yes or no accordingly.
+AC_DEFUN([gl_CHECK_MALLOC_POSIX],
+[
+  AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant],
+    [gl_cv_func_malloc_posix],
+    [
+      dnl It is too dangerous to try to allocate a large amount of memory:
+      dnl some systems go to their knees when you do that. So assume that
+      dnl all Unix implementations of the function are POSIX compliant.
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[]],
+           [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+             choke me
+             #endif
+            ]])],
+        [gl_cv_func_malloc_posix=yes],
+        [gl_cv_func_malloc_posix=no])
+    ])
+])
+
+AC_DEFUN([gl_REPLACE_MALLOC],
+[
+  AC_LIBOBJ([malloc])
+  REPLACE_MALLOC=1
+])
diff --git a/gnulib/m4/malloca.m4 b/gnulib/m4/malloca.m4
new file mode 100644 (file)
index 0000000..aec43f5
--- /dev/null
@@ -0,0 +1,15 @@
+# malloca.m4 serial 1
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MALLOCA],
+[
+  dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables
+  dnl @ALLOCA@ and @LTALLOCA@.
+  dnl gl_FUNC_ALLOCA   dnl Already brought in by the module dependencies.
+  AC_REQUIRE([gl_EEMALLOC])
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+])
diff --git a/gnulib/m4/math_h.m4 b/gnulib/m4/math_h.m4
new file mode 100644 (file)
index 0000000..7b46aee
--- /dev/null
@@ -0,0 +1,146 @@
+# math_h.m4 serial 25
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MATH_H],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  gl_CHECK_NEXT_HEADERS([math.h])
+  AC_REQUIRE([AC_C_INLINE])
+
+  AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works],
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
+      [[/* Solaris 10 has a broken definition of NAN.  Other platforms
+        fail to provide NAN, or provide it only in C99 mode; this
+        test only needs to fail when NAN is provided but wrong.  */
+         float f = 1.0f;
+#ifdef NAN
+         f = NAN;
+#endif
+         return f == 0;]])],
+      [gl_cv_header_math_nan_works=yes],
+      [gl_cv_header_math_nan_works=no])])
+  if test $gl_cv_header_math_nan_works = no; then
+    REPLACE_NAN=1
+  fi
+  AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works],
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
+      [[/* Solaris 10 has a broken definition of HUGE_VAL.  */
+         double d = HUGE_VAL;
+         return d == 0;]])],
+      [gl_cv_header_math_huge_val_works=yes],
+      [gl_cv_header_math_huge_val_works=no])])
+  if test $gl_cv_header_math_huge_val_works = no; then
+    REPLACE_HUGE_VAL=1
+  fi
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <math.h>
+    ]], [acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl
+    ldexpl logb logl round roundf roundl sinl sqrtl tanl trunc truncf truncl])
+])
+
+AC_DEFUN([gl_MATH_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_MATH_H_DEFAULTS],
+[
+  GNULIB_ACOSL=0;    AC_SUBST([GNULIB_ACOSL])
+  GNULIB_ASINL=0;    AC_SUBST([GNULIB_ASINL])
+  GNULIB_ATANL=0;    AC_SUBST([GNULIB_ATANL])
+  GNULIB_CEIL=0;     AC_SUBST([GNULIB_CEIL])
+  GNULIB_CEILF=0;    AC_SUBST([GNULIB_CEILF])
+  GNULIB_CEILL=0;    AC_SUBST([GNULIB_CEILL])
+  GNULIB_COSL=0;     AC_SUBST([GNULIB_COSL])
+  GNULIB_EXPL=0;     AC_SUBST([GNULIB_EXPL])
+  GNULIB_FLOOR=0;    AC_SUBST([GNULIB_FLOOR])
+  GNULIB_FLOORF=0;   AC_SUBST([GNULIB_FLOORF])
+  GNULIB_FLOORL=0;   AC_SUBST([GNULIB_FLOORL])
+  GNULIB_FREXP=0;    AC_SUBST([GNULIB_FREXP])
+  GNULIB_FREXPL=0;   AC_SUBST([GNULIB_FREXPL])
+  GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE])
+  GNULIB_ISINF=0;    AC_SUBST([GNULIB_ISINF])
+  GNULIB_ISNAN=0;    AC_SUBST([GNULIB_ISNAN])
+  GNULIB_ISNANF=0;   AC_SUBST([GNULIB_ISNANF])
+  GNULIB_ISNAND=0;   AC_SUBST([GNULIB_ISNAND])
+  GNULIB_ISNANL=0;   AC_SUBST([GNULIB_ISNANL])
+  GNULIB_LDEXPL=0;   AC_SUBST([GNULIB_LDEXPL])
+  GNULIB_LOGB=0;     AC_SUBST([GNULIB_LOGB])
+  GNULIB_LOGL=0;     AC_SUBST([GNULIB_LOGL])
+  GNULIB_ROUND=0;    AC_SUBST([GNULIB_ROUND])
+  GNULIB_ROUNDF=0;   AC_SUBST([GNULIB_ROUNDF])
+  GNULIB_ROUNDL=0;   AC_SUBST([GNULIB_ROUNDL])
+  GNULIB_SIGNBIT=0;  AC_SUBST([GNULIB_SIGNBIT])
+  GNULIB_SINL=0;     AC_SUBST([GNULIB_SINL])
+  GNULIB_SQRTL=0;    AC_SUBST([GNULIB_SQRTL])
+  GNULIB_TANL=0;     AC_SUBST([GNULIB_TANL])
+  GNULIB_TRUNC=0;    AC_SUBST([GNULIB_TRUNC])
+  GNULIB_TRUNCF=0;   AC_SUBST([GNULIB_TRUNCF])
+  GNULIB_TRUNCL=0;   AC_SUBST([GNULIB_TRUNCL])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_ACOSL=1;                AC_SUBST([HAVE_ACOSL])
+  HAVE_ASINL=1;                AC_SUBST([HAVE_ASINL])
+  HAVE_ATANL=1;                AC_SUBST([HAVE_ATANL])
+  HAVE_COSL=1;                 AC_SUBST([HAVE_COSL])
+  HAVE_EXPL=1;                 AC_SUBST([HAVE_EXPL])
+  HAVE_ISNANF=1;               AC_SUBST([HAVE_ISNANF])
+  HAVE_ISNAND=1;               AC_SUBST([HAVE_ISNAND])
+  HAVE_ISNANL=1;               AC_SUBST([HAVE_ISNANL])
+  HAVE_LOGL=1;                 AC_SUBST([HAVE_LOGL])
+  HAVE_SINL=1;                 AC_SUBST([HAVE_SINL])
+  HAVE_SQRTL=1;                AC_SUBST([HAVE_SQRTL])
+  HAVE_TANL=1;                 AC_SUBST([HAVE_TANL])
+  HAVE_DECL_ACOSL=1;           AC_SUBST([HAVE_DECL_ACOSL])
+  HAVE_DECL_ASINL=1;           AC_SUBST([HAVE_DECL_ASINL])
+  HAVE_DECL_ATANL=1;           AC_SUBST([HAVE_DECL_ATANL])
+  HAVE_DECL_CEILF=1;           AC_SUBST([HAVE_DECL_CEILF])
+  HAVE_DECL_CEILL=1;           AC_SUBST([HAVE_DECL_CEILL])
+  HAVE_DECL_COSL=1;            AC_SUBST([HAVE_DECL_COSL])
+  HAVE_DECL_EXPL=1;            AC_SUBST([HAVE_DECL_EXPL])
+  HAVE_DECL_FLOORF=1;          AC_SUBST([HAVE_DECL_FLOORF])
+  HAVE_DECL_FLOORL=1;          AC_SUBST([HAVE_DECL_FLOORL])
+  HAVE_DECL_FREXPL=1;          AC_SUBST([HAVE_DECL_FREXPL])
+  HAVE_DECL_LDEXPL=1;          AC_SUBST([HAVE_DECL_LDEXPL])
+  HAVE_DECL_LOGB=1;            AC_SUBST([HAVE_DECL_LOGB])
+  HAVE_DECL_LOGL=1;            AC_SUBST([HAVE_DECL_LOGL])
+  HAVE_DECL_ROUND=1;           AC_SUBST([HAVE_DECL_ROUND])
+  HAVE_DECL_ROUNDF=1;          AC_SUBST([HAVE_DECL_ROUNDF])
+  HAVE_DECL_ROUNDL=1;          AC_SUBST([HAVE_DECL_ROUNDL])
+  HAVE_DECL_SINL=1;            AC_SUBST([HAVE_DECL_SINL])
+  HAVE_DECL_SQRTL=1;           AC_SUBST([HAVE_DECL_SQRTL])
+  HAVE_DECL_TANL=1;            AC_SUBST([HAVE_DECL_TANL])
+  HAVE_DECL_TRUNC=1;           AC_SUBST([HAVE_DECL_TRUNC])
+  HAVE_DECL_TRUNCF=1;          AC_SUBST([HAVE_DECL_TRUNCF])
+  HAVE_DECL_TRUNCL=1;          AC_SUBST([HAVE_DECL_TRUNCL])
+  REPLACE_CEIL=0;              AC_SUBST([REPLACE_CEIL])
+  REPLACE_CEILF=0;             AC_SUBST([REPLACE_CEILF])
+  REPLACE_CEILL=0;             AC_SUBST([REPLACE_CEILL])
+  REPLACE_FLOOR=0;             AC_SUBST([REPLACE_FLOOR])
+  REPLACE_FLOORF=0;            AC_SUBST([REPLACE_FLOORF])
+  REPLACE_FLOORL=0;            AC_SUBST([REPLACE_FLOORL])
+  REPLACE_FREXP=0;             AC_SUBST([REPLACE_FREXP])
+  REPLACE_FREXPL=0;            AC_SUBST([REPLACE_FREXPL])
+  REPLACE_HUGE_VAL=0;          AC_SUBST([REPLACE_HUGE_VAL])
+  REPLACE_ISFINITE=0;          AC_SUBST([REPLACE_ISFINITE])
+  REPLACE_ISINF=0;             AC_SUBST([REPLACE_ISINF])
+  REPLACE_ISNAN=0;             AC_SUBST([REPLACE_ISNAN])
+  REPLACE_LDEXPL=0;            AC_SUBST([REPLACE_LDEXPL])
+  REPLACE_NAN=0;               AC_SUBST([REPLACE_NAN])
+  REPLACE_ROUND=0;             AC_SUBST([REPLACE_ROUND])
+  REPLACE_ROUNDF=0;            AC_SUBST([REPLACE_ROUNDF])
+  REPLACE_ROUNDL=0;            AC_SUBST([REPLACE_ROUNDL])
+  REPLACE_SIGNBIT=0;           AC_SUBST([REPLACE_SIGNBIT])
+  REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC])
+  REPLACE_TRUNC=0;             AC_SUBST([REPLACE_TRUNC])
+  REPLACE_TRUNCF=0;            AC_SUBST([REPLACE_TRUNCF])
+  REPLACE_TRUNCL=0;            AC_SUBST([REPLACE_TRUNCL])
+])
diff --git a/gnulib/m4/mathfunc.m4 b/gnulib/m4/mathfunc.m4
new file mode 100644 (file)
index 0000000..40a27b4
--- /dev/null
@@ -0,0 +1,122 @@
+# mathfunc.m4 serial 6
+dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_MATHFUNC(FUNC, RETTYPE, PARAMTYPES)
+# --------------------------------------------------
+# tests whether the function FUNC is available in libc or libm.
+# RETTYPE is the return type. PARAMTYPES is a parameter list, with parentheses.
+# It sets FUNC_LIBM to empty or "-lm" accordingly.
+
+AC_DEFUN([gl_MATHFUNC],
+[
+  dnl We need the RETTYPE and PARAMTYPES in order to force linking with the
+  dnl function. With gcc >= 4.3 on glibc/x86_64, calls to the 'fabs' function
+  dnl are inlined by the compiler, therefore linking of these calls does not
+  dnl require -lm, but taking the function pointer of 'fabs' does.
+  m4_pushdef([func], [$1])
+  m4_pushdef([FUNC], [m4_translit([$1],[abcdefghijklmnopqrstuvwxyz],
+                                       [ABCDEFGHIJKLMNOPQRSTUVWXYZ])])
+  FUNC[]_LIBM=
+  AC_CACHE_CHECK([whether func() can be used without linking with libm],
+    [gl_cv_func_]func[_no_libm],
+    [
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             $2 (*funcptr) $3 = ]func[;
+             double d_ret;]],
+           [[$2 y = funcptr ]m4_bpatsubst([m4_bpatsubst([m4_bpatsubst([$3], [int], [2])], [double \*], [&d_ret])], [double], [1.6180339887])[;
+             return y < 0.3 || y > 1.7;
+           ]])],
+        [gl_cv_func_]func[_no_libm=yes],
+        [gl_cv_func_]func[_no_libm=no])
+    ])
+  if test $gl_cv_func_[]func[]_no_libm = no; then
+    AC_CACHE_CHECK([whether func() can be used with libm],
+      [gl_cv_func_]func[_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               $2 (*funcptr) $3 = ]func[;
+               double d_ret;]],
+             [[$2 y = funcptr ]m4_bpatsubst([m4_bpatsubst([m4_bpatsubst([$3], [int], [2])], [double \*], [&d_ret])], [double], [1.6180339887])[;
+               return y < 0.3 || y > 1.7;
+             ]])],
+          [gl_cv_func_]func[_in_libm=yes],
+          [gl_cv_func_]func[_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_[]func[]_in_libm = yes; then
+      FUNC[]_LIBM=-lm
+    fi
+  fi
+  AC_SUBST(FUNC[_LIBM])
+  m4_popdef([FUNC])
+  m4_popdef([func])
+])
+
+# gl_COMMON_DOUBLE_MATHFUNC(FUNC)
+# -------------------------------
+# tests whether the function FUNC is available in libc or libm.
+# It sets FUNC_LIBM to empty or "-lm" accordingly.
+# FUNC must be one of the following functions, that are present on all systems
+# and provided by libm on all systems except MacOS X, BeOS, Haiku:
+#   acos asin atan atan2 cbrt cos cosh erf erfc exp fmod hypot j0 j1 jn lgamma
+#   log log10 log1p pow remainder sin sinh sqrt tan tanh y0 y1 yn
+
+AC_DEFUN([gl_COMMON_DOUBLE_MATHFUNC],
+[
+  AC_REQUIRE([gl_COMMON_DOUBLE_MATHFUNC_TEST])
+  m4_pushdef([FUNC], [m4_translit([$1],[abcdefghijklmnopqrstuvwxyz],
+                                       [ABCDEFGHIJKLMNOPQRSTUVWXYZ])])
+  FUNC[]_LIBM="$POW_LIBM"
+  AC_SUBST(FUNC[_LIBM])
+  m4_popdef([FUNC])
+])
+
+AC_DEFUN([gl_COMMON_DOUBLE_MATHFUNC_TEST],
+[
+  dnl We could use any of the following:
+  dnl gl_MATHFUNC([acos], [double], [(double)])
+  dnl gl_MATHFUNC([asin], [double], [(double)])
+  dnl gl_MATHFUNC([atan], [double], [(double)])
+  dnl gl_MATHFUNC([atan2], [double], [(double, double)])
+  dnl gl_MATHFUNC([cbrt], [double], [(double)])
+  dnl gl_MATHFUNC([cos], [double], [(double)])
+  dnl gl_MATHFUNC([cosh], [double], [(double)])
+  dnl gl_MATHFUNC([erf], [double], [(double)])
+  dnl gl_MATHFUNC([erfc], [double], [(double)])
+  dnl gl_MATHFUNC([exp], [double], [(double)])
+  dnl gl_MATHFUNC([fmod], [double], [(double, double)])
+  dnl gl_MATHFUNC([hypot], [double], [(double, double)])
+  dnl gl_MATHFUNC([j0], [double], [(double)])
+  dnl gl_MATHFUNC([j1], [double], [(double)])
+  dnl gl_MATHFUNC([jn], [double], [(int, double)])
+  dnl gl_MATHFUNC([lgamma], [double], [(double)])
+  dnl gl_MATHFUNC([log], [double], [(double)])
+  dnl gl_MATHFUNC([log10], [double], [(double)])
+  dnl gl_MATHFUNC([log1p], [double], [(double)])
+  dnl gl_MATHFUNC([pow], [double], [(double, double)])
+  dnl gl_MATHFUNC([remainder], [double], [(double, double)])
+  dnl gl_MATHFUNC([sin], [double], [(double)])
+  dnl gl_MATHFUNC([sinh], [double], [(double)])
+  dnl gl_MATHFUNC([sqrt], [double], [(double)])
+  dnl gl_MATHFUNC([tan], [double], [(double)])
+  dnl gl_MATHFUNC([tanh], [double], [(double)])
+  dnl gl_MATHFUNC([y0], [double], [(double)])
+  dnl gl_MATHFUNC([y1], [double], [(double)])
+  dnl gl_MATHFUNC([yn], [double], [(int, double)])
+  gl_MATHFUNC([pow], [double], [(double, double)])
+])
diff --git a/gnulib/m4/mbchar.m4 b/gnulib/m4/mbchar.m4
new file mode 100644 (file)
index 0000000..763dd81
--- /dev/null
@@ -0,0 +1,14 @@
+# mbchar.m4 serial 8
+dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl autoconf tests required for use of mbchar.m4
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_MBCHAR],
+[
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+  AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/gnulib/m4/mbiter.m4 b/gnulib/m4/mbiter.m4
new file mode 100644 (file)
index 0000000..8582b30
--- /dev/null
@@ -0,0 +1,15 @@
+# mbiter.m4 serial 6
+dnl Copyright (C) 2005, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl autoconf tests required for use of mbiter.h
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_MBITER],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AC_REQUIRE([AC_TYPE_MBSTATE_T])
+  :
+])
diff --git a/gnulib/m4/mbrtowc.m4 b/gnulib/m4/mbrtowc.m4
new file mode 100644 (file)
index 0000000..c353862
--- /dev/null
@@ -0,0 +1,564 @@
+# mbrtowc.m4 serial 22
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBRTOWC],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+  AC_REQUIRE([AC_TYPE_MBSTATE_T])
+  gl_MBSTATE_T_BROKEN
+
+  AC_CHECK_FUNCS_ONCE([mbrtowc])
+  if test $ac_cv_func_mbrtowc = no; then
+    HAVE_MBRTOWC=0
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBRTOWC=1
+    else
+      gl_MBRTOWC_NULL_ARG1
+      gl_MBRTOWC_NULL_ARG2
+      gl_MBRTOWC_RETVAL
+      gl_MBRTOWC_NUL_RETVAL
+      case "$gl_cv_func_mbrtowc_null_arg1" in
+        *yes) ;;
+        *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1],
+             [Define if the mbrtowc function has the NULL pwc argument bug.])
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_null_arg2" in
+        *yes) ;;
+        *) AC_DEFINE([MBRTOWC_NULL_ARG2_BUG], [1],
+             [Define if the mbrtowc function has the NULL string argument bug.])
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_retval" in
+        *yes) ;;
+        *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1],
+             [Define if the mbrtowc function returns a wrong return value.])
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_nul_retval" in
+        *yes) ;;
+        *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1],
+             [Define if the mbrtowc function does not return 0 for a NUL character.])
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+    fi
+  fi
+  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+    gl_REPLACE_WCHAR_H
+    AC_LIBOBJ([mbrtowc])
+    gl_PREREQ_MBRTOWC
+  fi
+])
+
+dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that
+dnl redefines the semantics of the given mbstate_t type.
+dnl Result is REPLACE_MBSTATE_T.
+dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to
+dnl avoid inconsistencies.
+
+AC_DEFUN([gl_MBSTATE_T_BROKEN],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+  AC_REQUIRE([AC_TYPE_MBSTATE_T])
+  AC_CHECK_FUNCS_ONCE([mbsinit])
+  AC_CHECK_FUNCS_ONCE([mbrtowc])
+  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+    gl_MBRTOWC_INCOMPLETE_STATE
+    gl_MBRTOWC_SANITYCHECK
+    REPLACE_MBSTATE_T=0
+    case "$gl_cv_func_mbrtowc_incomplete_state" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+    case "$gl_cv_func_mbrtowc_sanitycheck" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+  else
+    REPLACE_MBSTATE_T=1
+  fi
+  if test $REPLACE_MBSTATE_T = 1; then
+    gl_REPLACE_WCHAR_H
+  fi
+])
+
+dnl Test whether mbrtowc puts the state into non-initial state when parsing an
+dnl incomplete multibyte character.
+dnl Result is gl_cv_func_mbrtowc_incomplete_state.
+
+AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gt_LOCALE_JA])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether mbrtowc handles incomplete characters],
+    [gl_cv_func_mbrtowc_incomplete_state],
+    [
+      dnl Initial guess, used when cross-compiling or when no suitable locale
+      dnl is present.
+changequote(,)dnl
+      case "$host_os" in
+                     # Guess no on AIX and OSF/1.
+        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+                     # Guess yes otherwise.
+        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+      esac
+changequote([,])dnl
+      if test $LOCALE_JA != none; then
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        if (mbsinit (&state))
+          return 1;
+    }
+  return 0;
+}]])],
+          [gl_cv_func_mbrtowc_incomplete_state=yes],
+          [gl_cv_func_mbrtowc_incomplete_state=no],
+          [:])
+      fi
+    ])
+])
+
+dnl Test whether mbrtowc works not worse than mbtowc.
+dnl Result is gl_cv_func_mbrtowc_sanitycheck.
+
+AC_DEFUN([gl_MBRTOWC_SANITYCHECK],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gt_LOCALE_ZH_CN])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc],
+    [gl_cv_func_mbrtowc_sanitycheck],
+    [
+      dnl Initial guess, used when cross-compiling or when no suitable locale
+      dnl is present.
+changequote(,)dnl
+      case "$host_os" in
+                    # Guess no on Solaris 8.
+        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+                    # Guess yes otherwise.
+        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+      esac
+changequote([,])dnl
+      if test $LOCALE_ZH_CN != none; then
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8:
+     mbrtowc returns 2, and sets wc to 0x00F0.
+     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 6, &state) != 4
+          && mbtowc (&wc, input + 3, 6) == 4)
+        return 1;
+    }
+  return 0;
+}]])],
+          [gl_cv_func_mbrtowc_sanitycheck=yes],
+          [gl_cv_func_mbrtowc_sanitycheck=no],
+          [:])
+      fi
+    ])
+])
+
+dnl Test whether mbrtowc supports a NULL pwc argument correctly.
+dnl Result is gl_cv_func_mbrtowc_null_arg1.
+
+AC_DEFUN([gl_MBRTOWC_NULL_ARG1],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gt_LOCALE_FR_UTF8])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether mbrtowc handles a NULL pwc argument],
+    [gl_cv_func_mbrtowc_null_arg1],
+    [
+      dnl Initial guess, used when cross-compiling or when no suitable locale
+      dnl is present.
+changequote(,)dnl
+      case "$host_os" in
+                  # Guess no on Solaris.
+        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
+                  # Guess yes otherwise.
+        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
+      esac
+changequote([,])dnl
+      if test $LOCALE_FR_UTF8 != none; then
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      char input[] = "\303\237er";
+      mbstate_t state;
+      wchar_t wc;
+      size_t ret;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      wc = (wchar_t) 0xBADFACE;
+      ret = mbrtowc (&wc, input, 5, &state);
+      if (ret != 2)
+        result |= 1;
+      if (!mbsinit (&state))
+        result |= 2;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      ret = mbrtowc (NULL, input, 5, &state);
+      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
+        result |= 4;
+      if (!mbsinit (&state))
+        result |= 8;
+    }
+  return result;
+}]])],
+          [gl_cv_func_mbrtowc_null_arg1=yes],
+          [gl_cv_func_mbrtowc_null_arg1=no],
+          [:])
+      fi
+    ])
+])
+
+dnl Test whether mbrtowc supports a NULL string argument correctly.
+dnl Result is gl_cv_func_mbrtowc_null_arg2.
+
+AC_DEFUN([gl_MBRTOWC_NULL_ARG2],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gt_LOCALE_FR_UTF8])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument],
+    [gl_cv_func_mbrtowc_null_arg2],
+    [
+      dnl Initial guess, used when cross-compiling or when no suitable locale
+      dnl is present.
+changequote(,)dnl
+      case "$host_os" in
+              # Guess no on OSF/1.
+        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
+              # Guess yes otherwise.
+        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
+      esac
+changequote([,])dnl
+      if test $LOCALE_FR_UTF8 != none; then
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      mbstate_t state;
+      wchar_t wc;
+      int ret;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      wc = (wchar_t) 0xBADFACE;
+      mbrtowc (&wc, NULL, 5, &state);
+      /* Check that wc was not modified.  */
+      if (wc != (wchar_t) 0xBADFACE)
+        return 1;
+    }
+  return 0;
+}]])],
+          [gl_cv_func_mbrtowc_null_arg2=yes],
+          [gl_cv_func_mbrtowc_null_arg2=no],
+          [:])
+      fi
+    ])
+])
+
+dnl Test whether mbrtowc, when parsing the end of a multibyte character,
+dnl correctly returns the number of bytes that were needed to complete the
+dnl character (not the total number of bytes of the multibyte character).
+dnl Result is gl_cv_func_mbrtowc_retval.
+
+AC_DEFUN([gl_MBRTOWC_RETVAL],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gt_LOCALE_FR_UTF8])
+  AC_REQUIRE([gt_LOCALE_JA])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CACHE_CHECK([whether mbrtowc has a correct return value],
+    [gl_cv_func_mbrtowc_retval],
+    [
+      dnl Initial guess, used when cross-compiling or when no suitable locale
+      dnl is present.
+changequote(,)dnl
+      case "$host_os" in
+                                   # Guess no on HP-UX, Solaris, native Windows.
+        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+                                   # Guess yes otherwise.
+        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
+      esac
+changequote([,])dnl
+      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
+         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  int found_some_locale = 0;
+  /* This fails on Solaris.  */
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      char input[] = "B\303\274\303\237er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        {
+          input[1] = '\0';
+          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+            result |= 1;
+        }
+      found_some_locale = 1;
+    }
+  /* This fails on HP-UX 11.11.  */
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        {
+          input[1] = '\0';
+          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+            result |= 2;
+        }
+      found_some_locale = 1;
+    }
+  /* This fails on native Windows.  */
+  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
+    {
+      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 4;
+        }
+      found_some_locale = 1;
+    }
+  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
+    {
+      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 8;
+        }
+      found_some_locale = 1;
+    }
+  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
+    {
+      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 16;
+        }
+      found_some_locale = 1;
+    }
+  return (found_some_locale ? result : 77);
+}]])],
+          [gl_cv_func_mbrtowc_retval=yes],
+          [if test $? != 77; then
+             gl_cv_func_mbrtowc_retval=no
+           fi
+          ],
+          [:])
+      fi
+    ])
+])
+
+dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0.
+dnl Result is gl_cv_func_mbrtowc_nul_retval.
+
+AC_DEFUN([gl_MBRTOWC_NUL_RETVAL],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gt_LOCALE_ZH_CN])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character],
+    [gl_cv_func_mbrtowc_nul_retval],
+    [
+      dnl Initial guess, used when cross-compiling or when no suitable locale
+      dnl is present.
+changequote(,)dnl
+      case "$host_os" in
+                       # Guess no on Solaris 8 and 9.
+        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+                       # Guess yes otherwise.
+        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+      esac
+changequote([,])dnl
+      if test $LOCALE_ZH_CN != none; then
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8 and 9.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "", 1, &state) != 0)
+        return 1;
+    }
+  return 0;
+}]])],
+          [gl_cv_func_mbrtowc_nul_retval=yes],
+          [gl_cv_func_mbrtowc_nul_retval=no],
+          [:])
+      fi
+    ])
+])
+
+# Prerequisites of lib/mbrtowc.c.
+AC_DEFUN([gl_PREREQ_MBRTOWC], [
+  :
+])
+
+
+dnl From Paul Eggert
+
+dnl This is an override of an autoconf macro.
+
+AC_DEFUN([AC_FUNC_MBRTOWC],
+[
+  dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60.
+  AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
+    gl_cv_func_mbrtowc,
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+            [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+                 included before <wchar.h>.
+                 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+                 must be included before <wchar.h>.  */
+              #include <stddef.h>
+              #include <stdio.h>
+              #include <time.h>
+              #include <wchar.h>]],
+            [[wchar_t wc;
+              char const s[] = "";
+              size_t n = 1;
+              mbstate_t state;
+              return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])],
+       gl_cv_func_mbrtowc=yes,
+       gl_cv_func_mbrtowc=no)])
+  if test $gl_cv_func_mbrtowc = yes; then
+    AC_DEFINE([HAVE_MBRTOWC], [1],
+      [Define to 1 if mbrtowc and mbstate_t are properly declared.])
+  fi
+])
diff --git a/gnulib/m4/mbsinit.m4 b/gnulib/m4/mbsinit.m4
new file mode 100644 (file)
index 0000000..47e2d14
--- /dev/null
@@ -0,0 +1,40 @@
+# mbsinit.m4 serial 5
+dnl Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBSINIT],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+
+  AC_REQUIRE([AC_TYPE_MBSTATE_T])
+  gl_MBSTATE_T_BROKEN
+
+  AC_CHECK_FUNCS_ONCE([mbsinit])
+  if test $ac_cv_func_mbsinit = no; then
+    HAVE_MBSINIT=0
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBSINIT=1
+    else
+      dnl On mingw, mbsinit() always returns 1, which is inappropriate for
+      dnl states produced by mbrtowc() for an incomplete multibyte character
+      dnl in multibyte locales.
+      case "$host_os" in
+        mingw*) REPLACE_MBSINIT=1 ;;
+      esac
+    fi
+  fi
+  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+    gl_REPLACE_WCHAR_H
+    AC_LIBOBJ([mbsinit])
+    gl_PREREQ_MBSINIT
+  fi
+])
+
+# Prerequisites of lib/mbsinit.c.
+AC_DEFUN([gl_PREREQ_MBSINIT], [
+  :
+])
diff --git a/gnulib/m4/mbslen.m4 b/gnulib/m4/mbslen.m4
new file mode 100644 (file)
index 0000000..1936050
--- /dev/null
@@ -0,0 +1,16 @@
+# mbslen.m4 serial 2
+dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBSLEN],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([mbslen])
+  if test $ac_cv_func_mbslen = yes; then
+    HAVE_MBSLEN=1
+  else
+    HAVE_MBSLEN=0
+  fi
+])
diff --git a/gnulib/m4/mbsrtowcs.m4 b/gnulib/m4/mbsrtowcs.m4
new file mode 100644 (file)
index 0000000..1fe8dcf
--- /dev/null
@@ -0,0 +1,145 @@
+# mbsrtowcs.m4 serial 10
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBSRTOWCS],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+  AC_REQUIRE([AC_TYPE_MBSTATE_T])
+  gl_MBSTATE_T_BROKEN
+
+  AC_CHECK_FUNCS_ONCE([mbsrtowcs])
+  if test $ac_cv_func_mbsrtowcs = no; then
+    HAVE_MBSRTOWCS=0
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBSRTOWCS=1
+    else
+      gl_MBSRTOWCS_WORKS
+      case "$gl_cv_func_mbsrtowcs_works" in
+        *yes) ;;
+        *) REPLACE_MBSRTOWCS=1 ;;
+      esac
+    fi
+  fi
+  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
+    gl_REPLACE_WCHAR_H
+    AC_LIBOBJ([mbsrtowcs])
+    AC_LIBOBJ([mbsrtowcs-state])
+    gl_PREREQ_MBSRTOWCS
+  fi
+])
+
+dnl Test whether mbsrtowcs works.
+dnl Result is gl_cv_func_mbsrtowcs_works.
+
+AC_DEFUN([gl_MBSRTOWCS_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gt_LOCALE_FR])
+  AC_REQUIRE([gt_LOCALE_FR_UTF8])
+  AC_REQUIRE([gt_LOCALE_JA])
+  AC_REQUIRE([gt_LOCALE_ZH_CN])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether mbsrtowcs works],
+    [gl_cv_func_mbsrtowcs_works],
+    [
+      dnl Initial guess, used when cross-compiling or when no suitable locale
+      dnl is present.
+changequote(,)dnl
+      case "$host_os" in
+                                   # Guess no on HP-UX, Solaris, mingw.
+        hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
+                                   # Guess yes otherwise.
+        *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
+      esac
+changequote([,])dnl
+      if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  /* Test whether the function supports a NULL destination argument.
+     This fails on native Windows.  */
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      const char input[] = "\337er";
+      const char *src = input;
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbsrtowcs (NULL, &src, 1, &state) != 3
+          || src != input)
+        result |= 1;
+    }
+  /* Test whether the function works when started with a conversion state
+     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      const char input[] = "B\303\274\303\237er";
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
+        if (!mbsinit (&state))
+          {
+            const char *src = input + 2;
+            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
+              result |= 2;
+          }
+    }
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      const char input[] = "<\306\374\313\334\270\354>";
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
+        if (!mbsinit (&state))
+          {
+            const char *src = input + 4;
+            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
+              result |= 4;
+          }
+    }
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      const char input[] = "B\250\271\201\060\211\070er";
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
+        if (!mbsinit (&state))
+          {
+            const char *src = input + 2;
+            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
+              result |= 8;
+          }
+    }
+  return result;
+}]])],
+          [gl_cv_func_mbsrtowcs_works=yes],
+          [gl_cv_func_mbsrtowcs_works=no],
+          [:])
+      fi
+    ])
+])
+
+# Prerequisites of lib/mbsrtowcs.c.
+AC_DEFUN([gl_PREREQ_MBSRTOWCS], [
+  :
+])
diff --git a/gnulib/m4/mbstate_t.m4 b/gnulib/m4/mbstate_t.m4
new file mode 100644 (file)
index 0000000..f7c46b8
--- /dev/null
@@ -0,0 +1,41 @@
+# mbstate_t.m4 serial 13
+dnl Copyright (C) 2000-2002, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# From Paul Eggert.
+
+# BeOS 5 has <wchar.h> but does not define mbstate_t,
+# so you can't declare an object of that type.
+# Check for this incompatibility with Standard C.
+
+# AC_TYPE_MBSTATE_T
+# -----------------
+AC_DEFUN([AC_TYPE_MBSTATE_T],
+[
+   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11
+
+   AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t],
+     [AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+           [AC_INCLUDES_DEFAULT[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>]],
+           [[mbstate_t x; return sizeof x;]])],
+        [ac_cv_type_mbstate_t=yes],
+        [ac_cv_type_mbstate_t=no])])
+   if test $ac_cv_type_mbstate_t = yes; then
+     AC_DEFINE([HAVE_MBSTATE_T], [1],
+               [Define to 1 if <wchar.h> declares mbstate_t.])
+   else
+     AC_DEFINE([mbstate_t], [int],
+               [Define to a type if <wchar.h> does not define.])
+   fi
+])
diff --git a/gnulib/m4/mbtowc.m4 b/gnulib/m4/mbtowc.m4
new file mode 100644 (file)
index 0000000..9215892
--- /dev/null
@@ -0,0 +1,23 @@
+# mbtowc.m4 serial 1
+dnl Copyright (C) 2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBTOWC],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+
+  if false; then
+    REPLACE_MBTOWC=1
+  fi
+  if test $REPLACE_MBTOWC = 1; then
+    AC_LIBOBJ([mbtowc])
+    gl_PREREQ_MBTOWC
+  fi
+])
+
+# Prerequisites of lib/mbtowc.c.
+AC_DEFUN([gl_PREREQ_MBTOWC], [
+  :
+])
diff --git a/gnulib/m4/memchr.m4 b/gnulib/m4/memchr.m4
new file mode 100644 (file)
index 0000000..3c2b313
--- /dev/null
@@ -0,0 +1,88 @@
+# memchr.m4 serial 10
+dnl Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
+[
+  dnl Check for prerequisites for memory fence checks.
+  gl_FUNC_MMAP_ANON
+  AC_CHECK_HEADERS_ONCE([sys/mman.h])
+  AC_CHECK_FUNCS_ONCE([mprotect])
+
+  dnl These days, we assume memchr is present.  But just in case...
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([memchr])
+  if test $ac_cv_func_memchr = yes; then
+    # Detect platform-specific bugs in some versions of glibc:
+    # memchr should not dereference anything with length 0
+    #   http://bugzilla.redhat.com/499689
+    # memchr should not dereference overestimated length after a match
+    #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+    #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
+    # Assume that memchr works on platforms that lack mprotect.
+    AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <string.h>
+#if HAVE_SYS_MMAN_H
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+# ifndef MAP_FILE
+#  define MAP_FILE 0
+# endif
+#endif
+]], [[
+  int result = 0;
+  char *fence = NULL;
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+  const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+  const int flags = MAP_FILE | MAP_PRIVATE;
+  int fd = open ("/dev/zero", O_RDONLY, 0666);
+  if (fd >= 0)
+# endif
+    {
+      int pagesize = getpagesize ();
+      char *two_pages =
+        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+                       flags, fd, 0);
+      if (two_pages != (char *)(-1)
+          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+        fence = two_pages + pagesize;
+    }
+#endif
+  if (fence)
+    {
+      if (memchr (fence, 0, 0))
+        result |= 1;
+      strcpy (fence - 9, "12345678");
+      if (memchr (fence - 9, 0, 79) != fence - 1)
+        result |= 2;
+      if (memchr (fence - 1, 0, 3) != fence - 1)
+        result |= 4;
+    }
+  return result;
+]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no],
+      [dnl Be pessimistic for now.
+       gl_cv_func_memchr_works="guessing no"])])
+    if test "$gl_cv_func_memchr_works" != yes; then
+      REPLACE_MEMCHR=1
+    fi
+  else
+    HAVE_MEMCHR=0
+  fi
+  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+    AC_LIBOBJ([memchr])
+    gl_PREREQ_MEMCHR
+  fi
+])
+
+# Prerequisites of lib/memchr.c.
+AC_DEFUN([gl_PREREQ_MEMCHR], [
+  AC_CHECK_HEADERS([bp-sym.h])
+])
diff --git a/gnulib/m4/mempcpy.m4 b/gnulib/m4/mempcpy.m4
new file mode 100644 (file)
index 0000000..cc36900
--- /dev/null
@@ -0,0 +1,27 @@
+# mempcpy.m4 serial 10
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMPCPY],
+[
+  dnl Persuade glibc <string.h> to declare mempcpy().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'.
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REPLACE_FUNCS([mempcpy])
+  if test $ac_cv_func_mempcpy = no; then
+    HAVE_MEMPCPY=0
+    gl_PREREQ_MEMPCPY
+  fi
+])
+
+# Prerequisites of lib/mempcpy.c.
+AC_DEFUN([gl_PREREQ_MEMPCPY], [
+  :
+])
diff --git a/gnulib/m4/memrchr.m4 b/gnulib/m4/memrchr.m4
new file mode 100644 (file)
index 0000000..90a8944
--- /dev/null
@@ -0,0 +1,26 @@
+# memrchr.m4 serial 9
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMRCHR],
+[
+  dnl Persuade glibc <string.h> to declare memrchr().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_CHECK_DECLS_ONCE([memrchr])
+  if test $ac_cv_have_decl_memrchr = no; then
+    HAVE_DECL_MEMRCHR=0
+  fi
+
+  AC_REPLACE_FUNCS([memrchr])
+  if test $ac_cv_func_memrchr = no; then
+    gl_PREREQ_MEMRCHR
+  fi
+])
+
+# Prerequisites of lib/memrchr.c.
+AC_DEFUN([gl_PREREQ_MEMRCHR], [:])
diff --git a/gnulib/m4/mgetgroups.m4 b/gnulib/m4/mgetgroups.m4
new file mode 100644 (file)
index 0000000..fa8e9c2
--- /dev/null
@@ -0,0 +1,11 @@
+#serial 4
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MGETGROUPS],
+[
+  AC_CHECK_FUNCS_ONCE([getgrouplist])
+  AC_LIBOBJ([mgetgroups])
+])
diff --git a/gnulib/m4/mkdir.m4 b/gnulib/m4/mkdir.m4
new file mode 100644 (file)
index 0000000..b6fd09d
--- /dev/null
@@ -0,0 +1,52 @@
+# serial 9
+
+# Copyright (C) 2001, 2003-2004, 2006, 2008-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# On some systems, mkdir ("foo/", 0700) fails because of the trailing slash.
+# On others, mkdir ("foo/./", 0700) mistakenly succeeds.
+# On such systems, arrange to use a wrapper function.
+AC_DEFUN([gl_FUNC_MKDIR],
+[dnl
+  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+  AC_CHECK_HEADERS_ONCE([unistd.h])
+  AC_CACHE_CHECK([whether mkdir handles trailing slash],
+    [gl_cv_func_mkdir_trailing_slash_works],
+    [rm -rf conftest.dir
+      AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#       include <sys/types.h>
+#       include <sys/stat.h>
+]], [return mkdir ("conftest.dir/", 0700);])],
+      [gl_cv_func_mkdir_trailing_slash_works=yes],
+      [gl_cv_func_mkdir_trailing_slash_works=no],
+      [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
+    rm -rf conftest.dir
+    ]
+  )
+  if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then
+    REPLACE_MKDIR=1
+    AC_LIBOBJ([mkdir])
+  fi
+
+  AC_CACHE_CHECK([whether mkdir handles trailing dot],
+    [gl_cv_func_mkdir_trailing_dot_works],
+    [rm -rf conftest.dir
+      AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#       include <sys/types.h>
+#       include <sys/stat.h>
+]], [return !mkdir ("conftest.dir/./", 0700);])],
+      [gl_cv_func_mkdir_trailing_dot_works=yes],
+      [gl_cv_func_mkdir_trailing_dot_works=no],
+      [gl_cv_func_mkdir_trailing_dot_works="guessing no"])
+    rm -rf conftest.dir
+    ]
+  )
+  if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then
+    REPLACE_MKDIR=1
+    AC_LIBOBJ([mkdir])
+    AC_DEFINE([FUNC_MKDIR_DOT_BUG], [1], [Define to 1 if mkdir mistakenly
+      creates a directory given with a trailing dot component.])
+  fi
+])
diff --git a/gnulib/m4/mktime.m4 b/gnulib/m4/mktime.m4
new file mode 100644 (file)
index 0000000..56b2416
--- /dev/null
@@ -0,0 +1,241 @@
+# serial 19
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+
+# Redefine AC_FUNC_MKTIME, because it is no longer maintained in Autoconf.
+# AC_FUNC_MKTIME
+# --------------
+AC_DEFUN([AC_FUNC_MKTIME],
+[AC_CHECK_HEADERS_ONCE([unistd.h])
+AC_CHECK_FUNCS_ONCE([alarm])
+AC_REQUIRE([gl_MULTIARCH])
+if test $APPLE_UNIVERSAL_BUILD = 1; then
+  # A universal build on Apple MacOS X platforms.
+  # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
+  # But we need a configuration result that is valid in both modes.
+  ac_cv_func_working_mktime=no
+fi
+AC_CACHE_CHECK([for working mktime], [ac_cv_func_working_mktime],
+[AC_RUN_IFELSE([AC_LANG_SOURCE(
+[[/* Test program from Paul Eggert and Tony Leneis.  */
+#include <limits.h>
+#include <stdlib.h>
+#include <time.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifndef HAVE_ALARM
+# define alarm(X) /* empty */
+#endif
+
+/* Work around redefinition to rpl_putenv by other config tests.  */
+#undef putenv
+
+static time_t time_t_max;
+static time_t time_t_min;
+
+/* Values we'll use to set the TZ environment variable.  */
+static char *tz_strings[] = {
+  (char *) 0, "TZ=GMT0", "TZ=JST-9",
+  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
+};
+#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
+
+/* Return 0 if mktime fails to convert a date in the spring-forward gap.
+   Based on a problem report from Andreas Jaeger.  */
+static int
+spring_forward_gap ()
+{
+  /* glibc (up to about 1998-10-07) failed this test. */
+  struct tm tm;
+
+  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+     instead of "TZ=America/Vancouver" in order to detect the bug even
+     on systems that don't support the Olson extension, or don't have the
+     full zoneinfo tables installed.  */
+  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+
+  tm.tm_year = 98;
+  tm.tm_mon = 3;
+  tm.tm_mday = 5;
+  tm.tm_hour = 2;
+  tm.tm_min = 0;
+  tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+  return mktime (&tm) != (time_t) -1;
+}
+
+static int
+mktime_test1 (time_t now)
+{
+  struct tm *lt;
+  return ! (lt = localtime (&now)) || mktime (lt) == now;
+}
+
+static int
+mktime_test (time_t now)
+{
+  return (mktime_test1 (now)
+          && mktime_test1 ((time_t) (time_t_max - now))
+          && mktime_test1 ((time_t) (time_t_min + now)));
+}
+
+static int
+irix_6_4_bug ()
+{
+  /* Based on code from Ariel Faigon.  */
+  struct tm tm;
+  tm.tm_year = 96;
+  tm.tm_mon = 3;
+  tm.tm_mday = 0;
+  tm.tm_hour = 0;
+  tm.tm_min = 0;
+  tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+  mktime (&tm);
+  return tm.tm_mon == 2 && tm.tm_mday == 31;
+}
+
+static int
+bigtime_test (int j)
+{
+  struct tm tm;
+  time_t now;
+  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
+  now = mktime (&tm);
+  if (now != (time_t) -1)
+    {
+      struct tm *lt = localtime (&now);
+      if (! (lt
+             && lt->tm_year == tm.tm_year
+             && lt->tm_mon == tm.tm_mon
+             && lt->tm_mday == tm.tm_mday
+             && lt->tm_hour == tm.tm_hour
+             && lt->tm_min == tm.tm_min
+             && lt->tm_sec == tm.tm_sec
+             && lt->tm_yday == tm.tm_yday
+             && lt->tm_wday == tm.tm_wday
+             && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+                  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+        return 0;
+    }
+  return 1;
+}
+
+static int
+year_2050_test ()
+{
+  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
+     ignoring leap seconds.  */
+  unsigned long int answer = 2527315200UL;
+
+  struct tm tm;
+  time_t t;
+  tm.tm_year = 2050 - 1900;
+  tm.tm_mon = 2 - 1;
+  tm.tm_mday = 1;
+  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+
+  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+     instead of "TZ=America/Vancouver" in order to detect the bug even
+     on systems that don't support the Olson extension, or don't have the
+     full zoneinfo tables installed.  */
+  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+
+  t = mktime (&tm);
+
+  /* Check that the result is either a failure, or close enough
+     to the correct answer that we can assume the discrepancy is
+     due to leap seconds.  */
+  return (t == (time_t) -1
+          || (0 < t && answer - 120 <= t && t <= answer + 120));
+}
+
+int
+main ()
+{
+  int result = 0;
+  time_t t, delta;
+  int i, j;
+  int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
+  int time_t_signed = ! ((time_t) 0 < (time_t) -1);
+
+  /* This test makes some buggy mktime implementations loop.
+     Give up after 60 seconds; a mktime slower than that
+     isn't worth using anyway.  */
+  alarm (60);
+
+  time_t_max = (! time_t_signed
+                ? (time_t) -1
+                : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
+                   * 2 + 1));
+  time_t_min = (! time_t_signed
+                ? (time_t) 0
+                : time_t_signed_magnitude
+                ? ~ (time_t) 0
+                : ~ time_t_max);
+
+  delta = time_t_max / 997; /* a suitable prime number */
+  for (i = 0; i < N_STRINGS; i++)
+    {
+      if (tz_strings[i])
+        putenv (tz_strings[i]);
+
+      for (t = 0; t <= time_t_max - delta; t += delta)
+        if (! mktime_test (t))
+          result |= 1;
+      if (! (mktime_test ((time_t) 1)
+             && mktime_test ((time_t) (60 * 60))
+             && mktime_test ((time_t) (60 * 60 * 24))))
+        result |= 2;
+
+      for (j = 1; ; j <<= 1)
+        if (! bigtime_test (j))
+          result |= 4;
+        else if (INT_MAX / 2 < j)
+          break;
+      if (! bigtime_test (INT_MAX))
+        result |= 8;
+    }
+  if (! irix_6_4_bug ())
+    result |= 16;
+  if (! spring_forward_gap ())
+    result |= 32;
+  if (! year_2050_test ())
+    result |= 64;
+  return result;
+}]])],
+               [ac_cv_func_working_mktime=yes],
+               [ac_cv_func_working_mktime=no],
+               [ac_cv_func_working_mktime=no])])
+if test $ac_cv_func_working_mktime = no; then
+  AC_LIBOBJ([mktime])
+fi
+])# AC_FUNC_MKTIME
+
+AC_DEFUN([gl_FUNC_MKTIME],
+[
+  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  AC_FUNC_MKTIME
+  dnl Note: AC_FUNC_MKTIME does AC_LIBOBJ([mktime]).
+  if test $ac_cv_func_working_mktime = no; then
+    REPLACE_MKTIME=1
+    gl_PREREQ_MKTIME
+  else
+    REPLACE_MKTIME=0
+  fi
+])
+
+# Prerequisites of lib/mktime.c.
+AC_DEFUN([gl_PREREQ_MKTIME],
+[
+  AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/gnulib/m4/mmap-anon.m4 b/gnulib/m4/mmap-anon.m4
new file mode 100644 (file)
index 0000000..7ba7fd2
--- /dev/null
@@ -0,0 +1,55 @@
+# mmap-anon.m4 serial 9
+dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Detect how mmap can be used to create anonymous (not file-backed) memory
+# mappings.
+# - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS
+#   and MAP_ANON exist and have the same value.
+# - On HP-UX, only MAP_ANONYMOUS exists.
+# - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
+# - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
+#   used.
+
+AC_DEFUN([gl_FUNC_MMAP_ANON],
+[
+  dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+  # irrelevant for anonymous mappings.
+  AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no])
+
+  # Try to allow MAP_ANONYMOUS.
+  gl_have_mmap_anonymous=no
+  if test $gl_have_mmap = yes; then
+    AC_MSG_CHECKING([for MAP_ANONYMOUS])
+    AC_EGREP_CPP([I cant identify this map.], [
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+    I cant identify this map.
+#endif
+],
+      [gl_have_mmap_anonymous=yes])
+    if test $gl_have_mmap_anonymous != yes; then
+      AC_EGREP_CPP([I cant identify this map.], [
+#include <sys/mman.h>
+#ifdef MAP_ANON
+    I cant identify this map.
+#endif
+],
+        [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON],
+          [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.])
+         gl_have_mmap_anonymous=yes])
+    fi
+    AC_MSG_RESULT([$gl_have_mmap_anonymous])
+    if test $gl_have_mmap_anonymous = yes; then
+      AC_DEFINE([HAVE_MAP_ANONYMOUS], [1],
+        [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
+         config.h and <sys/mman.h>.])
+    fi
+  fi
+])
diff --git a/gnulib/m4/mode_t.m4 b/gnulib/m4/mode_t.m4
new file mode 100644 (file)
index 0000000..f9cf704
--- /dev/null
@@ -0,0 +1,26 @@
+# mode_t.m4 serial 2
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# For using mode_t, it's sufficient to use AC_TYPE_MODE_T and
+# include <sys/types.h>.
+
+# Define PROMOTED_MODE_T to the type that is the result of "default argument
+# promotion" (ISO C 6.5.2.2.(6)) of the type mode_t.
+AC_DEFUN([gl_PROMOTED_TYPE_MODE_T],
+[
+  AC_REQUIRE([AC_TYPE_MODE_T])
+  AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [
+    dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int',
+    dnl and to itself otherwise. This assumption is not guaranteed by the ISO C
+    dnl standard, but we don't know of any real-world counterexamples.
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]],
+      [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])],
+      [gl_cv_promoted_mode_t='int'],
+      [gl_cv_promoted_mode_t='mode_t'])
+  ])
+  AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t],
+    [Define to the type that is the result of default argument promotions of type mode_t.])
+])
diff --git a/gnulib/m4/modechange.m4 b/gnulib/m4/modechange.m4
new file mode 100644 (file)
index 0000000..8661ade
--- /dev/null
@@ -0,0 +1,11 @@
+# modechange.m4 serial 6
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MODECHANGE],
+[
+  AC_LIBOBJ([modechange])
+])
diff --git a/gnulib/m4/mountlist.m4 b/gnulib/m4/mountlist.m4
new file mode 100644 (file)
index 0000000..12c9d0e
--- /dev/null
@@ -0,0 +1,23 @@
+# serial 10
+dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MOUNTLIST],
+[
+  gl_LIST_MOUNTED_FILE_SYSTEMS([gl_cv_list_mounted_fs=yes],
+                               [gl_cv_list_mounted_fs=no])
+  if test $gl_cv_list_mounted_fs = yes; then
+    AC_LIBOBJ([mountlist])
+    gl_PREREQ_MOUNTLIST_EXTRA
+  fi
+])
+
+# Prerequisites of lib/mountlist.c not done by gl_LIST_MOUNTED_FILE_SYSTEMS.
+AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA],
+[
+  dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h.
+  AC_CHECK_HEADERS([sys/mntent.h])
+  gl_FSTYPENAME
+])
diff --git a/gnulib/m4/multiarch.m4 b/gnulib/m4/multiarch.m4
new file mode 100644 (file)
index 0000000..691d892
--- /dev/null
@@ -0,0 +1,62 @@
+# multiarch.m4 serial 6
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Determine whether the compiler is or may be producing universal binaries.
+#
+# On MacOS X 10.5 and later systems, the user can create libraries and
+# executables that work on multiple system types--known as "fat" or
+# "universal" binaries--by specifying multiple '-arch' options to the
+# compiler but only a single '-arch' option to the preprocessor.  Like
+# this:
+#
+#     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+#                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+#                 CPP="gcc -E" CXXCPP="g++ -E"
+#
+# Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly.
+
+AC_DEFUN_ONCE([gl_MULTIARCH],
+[
+  dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
+  gl_cv_c_multiarch=no
+  AC_COMPILE_IFELSE(
+    [AC_LANG_SOURCE(
+      [[#ifndef __APPLE_CC__
+         not a universal capable compiler
+        #endif
+        typedef int dummy;
+      ]])],
+    [
+     dnl Check for potential -arch flags.  It is not universal unless
+     dnl there are at least two -arch flags with different values.
+     arch=
+     prev=
+     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+       if test -n "$prev"; then
+         case $word in
+           i?86 | x86_64 | ppc | ppc64)
+             if test -z "$arch" || test "$arch" = "$word"; then
+               arch="$word"
+             else
+               gl_cv_c_multiarch=yes
+             fi
+             ;;
+         esac
+         prev=
+       else
+         if test "x$word" = "x-arch"; then
+           prev=arch
+         fi
+       fi
+     done
+    ])
+  if test $gl_cv_c_multiarch = yes; then
+    APPLE_UNIVERSAL_BUILD=1
+  else
+    APPLE_UNIVERSAL_BUILD=0
+  fi
+  AC_SUBST([APPLE_UNIVERSAL_BUILD])
+])
diff --git a/gnulib/m4/nl_langinfo.m4 b/gnulib/m4/nl_langinfo.m4
new file mode 100644 (file)
index 0000000..ca9d28d
--- /dev/null
@@ -0,0 +1,52 @@
+# nl_langinfo.m4 serial 4
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_NL_LANGINFO],
+[
+  AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+  AC_REQUIRE([gl_LANGINFO_H])
+  AC_CHECK_FUNCS_ONCE([nl_langinfo])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  if test $ac_cv_func_nl_langinfo = yes; then
+    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
+    AC_CACHE_CHECK([whether YESEXPR works],
+      [gl_cv_func_nl_langinfo_yesexpr_works],
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM([[#include <langinfo.h>
+]], [[return !*nl_langinfo(YESEXPR);
+]])],
+         [gl_cv_func_nl_langinfo_yesexpr_works=yes],
+         [gl_cv_func_nl_langinfo_yesexpr_works=no],
+         [
+         case "$host_os" in
+                   # Guess no on irix systems.
+           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
+                   # Guess yes elsewhere.
+           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
+         esac
+         ])
+      ])
+    case $gl_cv_func_nl_langinfo_yesexpr_works in
+      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
+      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
+    esac
+    AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS],
+      [$FUNC_NL_LANGINFO_YESEXPR_WORKS],
+      [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.])
+    if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
+        && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
+      :
+    else
+      REPLACE_NL_LANGINFO=1
+      AC_DEFINE([REPLACE_NL_LANGINFO], [1],
+        [Define if nl_langinfo exists but is overridden by gnulib.])
+      AC_LIBOBJ([nl_langinfo])
+    fi
+  else
+    HAVE_NL_LANGINFO=0
+    AC_LIBOBJ([nl_langinfo])
+  fi
+])
diff --git a/gnulib/m4/nls.m4 b/gnulib/m4/nls.m4
new file mode 100644 (file)
index 0000000..6a21216
--- /dev/null
@@ -0,0 +1,32 @@
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_NLS],
+[
+  AC_MSG_CHECKING([whether NLS is requested])
+  dnl Default is enabled NLS
+  AC_ARG_ENABLE([nls],
+    [  --disable-nls           do not use Native Language Support],
+    USE_NLS=$enableval, USE_NLS=yes)
+  AC_MSG_RESULT([$USE_NLS])
+  AC_SUBST([USE_NLS])
+])
diff --git a/gnulib/m4/onceonly.m4 b/gnulib/m4/onceonly.m4
new file mode 100644 (file)
index 0000000..223071a
--- /dev/null
@@ -0,0 +1,91 @@
+# onceonly.m4 serial 7
+dnl Copyright (C) 2002-2003, 2005-2006, 2008-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl This file defines some "once only" variants of standard autoconf macros.
+dnl   AC_CHECK_HEADERS_ONCE          like  AC_CHECK_HEADERS
+dnl   AC_CHECK_FUNCS_ONCE            like  AC_CHECK_FUNCS
+dnl   AC_CHECK_DECLS_ONCE            like  AC_CHECK_DECLS
+dnl   AC_REQUIRE([AC_FUNC_STRCOLL])  like  AC_FUNC_STRCOLL
+dnl The advantage is that the check for each of the headers/functions/decls
+dnl will be put only once into the 'configure' file. It keeps the size of
+dnl the 'configure' file down, and avoids redundant output when 'configure'
+dnl is run.
+dnl The drawback is that the checks cannot be conditionalized. If you write
+dnl   if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
+dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
+dnl empty, and the check will be inserted before the body of the AC_DEFUNed
+dnl function.
+
+dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE
+dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to
+dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested
+dnl headers at once, thus reducing the size of 'configure'. It is known to work
+dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%.
+
+dnl Autoconf version 2.59 plus gnulib is required; this file is not needed
+dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of
+dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first
+dnl argument!
+AC_PREREQ([2.59])
+
+# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
+# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
+AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
+  :
+  m4_foreach_w([gl_HEADER_NAME], [$1], [
+    AC_DEFUN([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME,
+                                                    [./-], [___])), [
+      m4_divert_text([INIT_PREPARE],
+        [gl_header_list="$gl_header_list gl_HEADER_NAME"])
+      gl_HEADERS_EXPANSION
+      AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])),
+        [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.])
+    ])
+    AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME,
+                                                      [./-], [___])))
+  ])
+])
+m4_define([gl_HEADERS_EXPANSION], [
+  m4_divert_text([DEFAULTS], [gl_header_list=])
+  AC_CHECK_HEADERS([$gl_header_list])
+  m4_define([gl_HEADERS_EXPANSION], [])
+])
+
+# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
+# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
+AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
+  :
+  m4_foreach_w([gl_FUNC_NAME], [$1], [
+    AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
+      m4_divert_text([INIT_PREPARE],
+        [gl_func_list="$gl_func_list gl_FUNC_NAME"])
+      gl_FUNCS_EXPANSION
+      AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])),
+        [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.])
+    ])
+    AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
+  ])
+])
+m4_define([gl_FUNCS_EXPANSION], [
+  m4_divert_text([DEFAULTS], [gl_func_list=])
+  AC_CHECK_FUNCS([$gl_func_list])
+  m4_define([gl_FUNCS_EXPANSION], [])
+])
+
+# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
+# AC_CHECK_DECLS(DECL1, DECL2, ...).
+AC_DEFUN([AC_CHECK_DECLS_ONCE], [
+  :
+  m4_foreach_w([gl_DECL_NAME], [$1], [
+    AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
+      AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
+    ])
+    AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
+  ])
+])
diff --git a/gnulib/m4/open.m4 b/gnulib/m4/open.m4
new file mode 100644 (file)
index 0000000..bfebdab
--- /dev/null
@@ -0,0 +1,81 @@
+# open.m4 serial 11
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_OPEN],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw* | pw*)
+      gl_REPLACE_OPEN
+      ;;
+    *)
+      dnl open("foo/") should not create a file when the file name has a
+      dnl trailing slash.  FreeBSD only has the problem on symlinks.
+      AC_CHECK_FUNCS_ONCE([lstat])
+      AC_CACHE_CHECK([whether open recognizes a trailing slash],
+        [gl_cv_func_open_slash],
+        [# Assume that if we have lstat, we can also check symlinks.
+          if test $ac_cv_func_lstat = yes; then
+            touch conftest.tmp
+            ln -s conftest.tmp conftest.lnk
+          fi
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+  int result = 0;
+#if HAVE_LSTAT
+  if (open ("conftest.lnk/", O_RDONLY) != -1)
+    result |= 1;
+#endif
+  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
+    result |= 2;
+  return result;
+}]])],
+            [gl_cv_func_open_slash=yes],
+            [gl_cv_func_open_slash=no],
+            [
+changequote(,)dnl
+             case "$host_os" in
+               freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
+                 gl_cv_func_open_slash="guessing no" ;;
+               *)
+                 gl_cv_func_open_slash="guessing yes" ;;
+             esac
+changequote([,])dnl
+            ])
+          rm -f conftest.sl conftest.tmp conftest.lnk
+        ])
+      case "$gl_cv_func_open_slash" in
+        *no)
+          AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
+            [Define to 1 if open() fails to recognize a trailing slash.])
+          gl_REPLACE_OPEN
+          ;;
+      esac
+      ;;
+  esac
+])
+
+AC_DEFUN([gl_REPLACE_OPEN],
+[
+  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+  REPLACE_OPEN=1
+  AC_LIBOBJ([open])
+  gl_PREREQ_OPEN
+])
+
+# Prerequisites of lib/open.c.
+AC_DEFUN([gl_PREREQ_OPEN],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
+  :
+])
diff --git a/gnulib/m4/openat.m4 b/gnulib/m4/openat.m4
new file mode 100644 (file)
index 0000000..28c0e1d
--- /dev/null
@@ -0,0 +1,171 @@
+# serial 31
+# See if we need to use our replacement for Solaris' openat et al functions.
+
+dnl Copyright (C) 2004-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Jim Meyering.
+
+AC_DEFUN([gl_FUNC_OPENAT],
+[
+  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+  GNULIB_OPENAT=1
+
+  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+  GNULIB_FCHMODAT=1
+  GNULIB_FSTATAT=1
+  GNULIB_MKDIRAT=1
+
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  GNULIB_FCHOWNAT=1
+  GNULIB_UNLINKAT=1
+
+  AC_LIBOBJ([openat-proc])
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_FUNCS_ONCE([lchmod])
+  AC_REPLACE_FUNCS([fchmodat fstatat mkdirat openat unlinkat])
+  AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+  AC_REQUIRE([gl_FUNC_UNLINK])
+  case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
+  yes+yes)
+    # GNU/Hurd has unlinkat, but it has the same bug as unlink.
+    if test $REPLACE_UNLINK = 1; then
+      AC_LIBOBJ([unlinkat])
+      REPLACE_UNLINKAT=1
+    fi ;;
+  yes+*)
+    # Solaris 9 has *at functions, but uniformly mishandles trailing
+    # slash in all of them.
+    AC_LIBOBJ([openat])
+    REPLACE_OPENAT=1
+    AC_LIBOBJ([fstatat])
+    REPLACE_FSTATAT=1
+    AC_LIBOBJ([unlinkat])
+    REPLACE_UNLINKAT=1
+    ;;
+  *)
+    HAVE_OPENAT=0
+    HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
+    HAVE_FSTATAT=0 # No known system with fstatat but not openat
+    gl_PREREQ_OPENAT;;
+  esac
+  if test $ac_cv_func_fchmodat != yes; then
+    HAVE_FCHMODAT=0
+  fi
+  if test $ac_cv_func_mkdirat != yes; then
+    HAVE_MKDIRAT=0
+  fi
+  gl_FUNC_FCHOWNAT
+])
+
+# gl_FUNC_FCHOWNAT_DEREF_BUG([ACTION-IF-BUGGY[, ACTION-IF-NOT_BUGGY]])
+AC_DEFUN([gl_FUNC_FCHOWNAT_DEREF_BUG],
+[
+  dnl Persuade glibc's <unistd.h> to declare fchownat().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  AC_CACHE_CHECK([whether fchownat works with AT_SYMLINK_NOFOLLOW],
+    gl_cv_func_fchownat_nofollow_works,
+    [
+     gl_dangle=conftest.dangle
+     # Remove any remnants of a previous test.
+     rm -f $gl_dangle
+     # Arrange for deletion of the temporary file this test creates.
+     ac_clean_files="$ac_clean_files $gl_dangle"
+     ln -s conftest.no-such $gl_dangle
+     AC_RUN_IFELSE(
+       [AC_LANG_SOURCE(
+          [[
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+int
+main ()
+{
+  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
+                    AT_SYMLINK_NOFOLLOW) != 0
+          && errno == ENOENT);
+}
+          ]])],
+    [gl_cv_func_fchownat_nofollow_works=yes],
+    [gl_cv_func_fchownat_nofollow_works=no],
+    [gl_cv_func_fchownat_nofollow_works=no],
+    )
+  ])
+  AS_IF([test $gl_cv_func_fchownat_nofollow_works = no], [$1], [$2])
+])
+
+# gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG([ACTION-IF-BUGGY[, ACTION-IF-NOT_BUGGY]])
+AC_DEFUN([gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG],
+[
+  dnl Persuade glibc's <unistd.h> to declare fchownat().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  AC_CACHE_CHECK([whether fchownat works with an empty file name],
+    [gl_cv_func_fchownat_empty_filename_works],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <unistd.h>
+            #include <fcntl.h>
+          ]],
+          [[int fd;
+            int ret;
+            if (mkdir ("conftestdir", 0700) < 0)
+              return 2;
+            fd = open ("conftestdir", O_RDONLY);
+            if (fd < 0)
+              return 3;
+            ret = fchownat (fd, "", -1, -1, 0);
+            close (fd);
+            rmdir ("conftestdir");
+            return ret == 0;
+          ]])],
+       [gl_cv_func_fchownat_empty_filename_works=yes],
+       [gl_cv_func_fchownat_empty_filename_works=no],
+       [gl_cv_func_fchownat_empty_filename_works="guessing no"])
+    ])
+  AS_IF([test "$gl_cv_func_fchownat_empty_filename_works" != yes], [$1], [$2])
+])
+
+# If we have the fchownat function, and it has the bug (in glibc-2.4)
+# that it dereferences symlinks even with AT_SYMLINK_NOFOLLOW, then
+# use the replacement function.
+# Also if the fchownat function, like chown, has the trailing slash bug,
+# use the replacement function.
+# Also use the replacement function if fchownat is simply not available.
+AC_DEFUN([gl_FUNC_FCHOWNAT],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_CHOWN])
+  AC_CHECK_FUNC([fchownat],
+    [gl_FUNC_FCHOWNAT_DEREF_BUG(
+       [REPLACE_FCHOWNAT=1
+        AC_DEFINE([FCHOWNAT_NOFOLLOW_BUG], [1],
+                  [Define to 1 if your platform has fchownat, but it cannot
+                   perform lchown tasks.])
+       ])
+     gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG(
+       [REPLACE_FCHOWNAT=1
+        AC_DEFINE([FCHOWNAT_EMPTY_FILENAME_BUG], [1],
+                  [Define to 1 if your platform has fchownat, but it does
+                   not reject an empty file name.])
+       ])
+     if test $REPLACE_CHOWN = 1; then
+       REPLACE_FCHOWNAT=1
+     fi],
+    [HAVE_FCHOWNAT=0])
+  if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
+    AC_LIBOBJ([fchownat])
+  fi
+])
+
+AC_DEFUN([gl_PREREQ_OPENAT],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
+  :
+])
diff --git a/gnulib/m4/parse-datetime.m4 b/gnulib/m4/parse-datetime.m4
new file mode 100644 (file)
index 0000000..e665ef3
--- /dev/null
@@ -0,0 +1,55 @@
+# parse-datetime.m4 serial 19
+dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Define HAVE_COMPOUND_LITERALS if the C compiler supports compound literals
+dnl as in ISO C99.
+dnl Note that compound literals such as (struct s) { 3, 4 } can be used for
+dnl initialization of stack-allocated variables, but are not constant
+dnl expressions and therefore cannot be used as initializer for global or
+dnl static variables (even though gcc supports this in pre-C99 mode).
+AC_DEFUN([gl_C_COMPOUND_LITERALS],
+[
+  AC_CACHE_CHECK([for compound literals], [gl_cv_compound_literals],
+  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[struct s { int i, j; };]],
+      [[struct s t = (struct s) { 3, 4 };
+        if (t.i != 0) return 0;]])],
+    gl_cv_compound_literals=yes,
+    gl_cv_compound_literals=no)])
+  if test $gl_cv_compound_literals = yes; then
+    AC_DEFINE([HAVE_COMPOUND_LITERALS], [1],
+      [Define if you have compound literals.])
+  fi
+])
+
+AC_DEFUN([gl_PARSE_DATETIME],
+[
+  dnl Prerequisites of lib/parse-datetime.h.
+  AC_REQUIRE([AM_STDBOOL_H])
+  AC_REQUIRE([gl_TIMESPEC])
+
+  dnl Prerequisites of lib/parse-datetime.y.
+  AC_REQUIRE([gl_BISON])
+  AC_REQUIRE([gl_C_COMPOUND_LITERALS])
+  AC_STRUCT_TIMEZONE
+  AC_REQUIRE([gl_CLOCK_TIME])
+  AC_REQUIRE([gl_TM_GMTOFF])
+  AC_COMPILE_IFELSE(
+    [AC_LANG_SOURCE([[
+#include <time.h> /* for time_t */
+#include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
+#define TYPE_MINIMUM(t) \
+  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t) \
+  ((t) ((t) 0 < (t) -1 \
+        ? (t) -1 \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
+typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
+       ]])],
+    [AC_DEFINE([TIME_T_FITS_IN_LONG_INT], [1],
+       [Define to 1 if all 'time_t' values fit in a 'long int'.])
+    ])
+])
diff --git a/gnulib/m4/pathmax.m4 b/gnulib/m4/pathmax.m4
new file mode 100644 (file)
index 0000000..17b3d64
--- /dev/null
@@ -0,0 +1,13 @@
+# pathmax.m4 serial 8
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_PATHMAX],
+[
+  dnl Prerequisites of lib/pathmax.h.
+  AC_CHECK_FUNCS_ONCE([pathconf])
+  AC_CHECK_HEADERS_ONCE([sys/param.h])
+])
diff --git a/gnulib/m4/perror.m4 b/gnulib/m4/perror.m4
new file mode 100644 (file)
index 0000000..2a03e08
--- /dev/null
@@ -0,0 +1,17 @@
+# perror.m4 serial 1
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_PERROR],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_REQUIRE([gl_HEADER_ERRNO_H])
+  if test -n "$ERRNO_H"; then
+    dnl The system's perror() cannot know about the new errno values we add
+    dnl to <errno.h>. Replace it.
+    REPLACE_PERROR=1
+    AC_LIBOBJ([perror])
+  fi
+])
diff --git a/gnulib/m4/po.m4 b/gnulib/m4/po.m4
new file mode 100644 (file)
index 0000000..a3e99d6
--- /dev/null
@@ -0,0 +1,449 @@
+# po.m4 serial 17 (gettext-0.18)
+dnl Copyright (C) 1995-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Release version of the gettext macros. This is used to ensure that
+  dnl the gettext macros and po/Makefile.in.in are in sync.
+  AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+  dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([GMSGFMT_015])
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([XGETTEXT_015])
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+  dnl Installation directories.
+  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+  dnl have to define it here, so that it can be used in po/Makefile.
+  test -n "$localedir" || localedir='${datadir}/locale'
+  AC_SUBST([localedir])
+
+  dnl Support for AM_XGETTEXT_OPTION.
+  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+  AC_CONFIG_COMMANDS([po-directories], [[
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done]],
+   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake < 1.5.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+   ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+  # When this code is run, in config.status, two variables have already been
+  # set:
+  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+  # - LINGUAS is the value of the environment variable LINGUAS at configure
+  #   time.
+
+changequote(,)dnl
+  # Adjust a relative srcdir.
+  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+  # In autoconf-2.13 it is called $ac_given_srcdir.
+  # In autoconf-2.50 it is called $srcdir.
+  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+  case "$ac_given_srcdir" in
+    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+    /*) top_srcdir="$ac_given_srcdir" ;;
+    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
+  # A sed script that extracts the value of VARIABLE from a Makefile.
+  sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[     ]*VARIABLE[     ]*=/{
+  # Seen the first line of the variable definition.
+  s/^[  ]*VARIABLE[     ]*=//
+  ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+  # Set POTFILES to the value of the Makefile variable POTFILES.
+  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+  # Compute POTFILES_DEPS as
+  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+  POTFILES_DEPS=
+  for file in $POTFILES; do
+    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+  done
+  POMAKEFILEDEPS=""
+
+  if test -n "$OBSOLETE_ALL_LINGUAS"; then
+    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+  fi
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+  else
+    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Hide the ALL_LINGUAS assigment from automake < 1.5.
+  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; then
+        desiredlanguages="$LINGUAS"
+      else
+        desiredlanguages="$ALL_LINGUAS"
+      fi
+      for desiredlang in $desiredlanguages; do
+        # Use the presentlang catalog if desiredlang is
+        #   a. equal to presentlang, or
+        #   b. a variant of presentlang (because in this case,
+        #      presentlang can be used as a fallback for messages
+        #      which are not translated in the desiredlang catalog).
+        case "$desiredlang" in
+          "$presentlang"*) useit=yes;;
+        esac
+      done
+      if test $useit = yes; then
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+       @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+       \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+       @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+       \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+  XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
diff --git a/gnulib/m4/printf.m4 b/gnulib/m4/printf.m4
new file mode 100644 (file)
index 0000000..9c2ed1e
--- /dev/null
@@ -0,0 +1,1481 @@
+# printf.m4 serial 42
+dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Test whether the *printf family of functions supports the 'j', 'z', 't',
+dnl 'L' size specifiers. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_sizes_c99.
+
+AC_DEFUN([gl_PRINTF_SIZES_C99],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports size specifiers as in C99],
+    [gl_cv_func_printf_sizes_c99],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+static char buf[100];
+int main ()
+{
+  int result = 0;
+#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
+  buf[0] = '\0';
+  if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
+      || strcmp (buf, "12345671 33") != 0)
+    result |= 1;
+#endif
+  buf[0] = '\0';
+  if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
+      || strcmp (buf, "12345672 33") != 0)
+    result |= 2;
+  buf[0] = '\0';
+  if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
+      || strcmp (buf, "12345673 33") != 0)
+    result |= 4;
+  buf[0] = '\0';
+  if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
+      || strcmp (buf, "1.5 33") != 0)
+    result |= 8;
+  return result;
+}]])],
+        [gl_cv_func_printf_sizes_c99=yes],
+        [gl_cv_func_printf_sizes_c99=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
+           darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on OpenBSD >= 3.9.
+           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+                                 gl_cv_func_printf_sizes_c99="guessing no";;
+           openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.10.
+           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
+           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_printf_sizes_c99="guessing no";;
+           netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_printf_sizes_c99="guessing no";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports 'long double'
+dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_long_double.
+
+AC_DEFUN([gl_PRINTF_LONG_DOUBLE],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports 'long double' arguments],
+    [gl_cv_func_printf_long_double],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[10000];
+int main ()
+{
+  int result = 0;
+  buf[0] = '\0';
+  if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
+      || strcmp (buf, "1.750000 33") != 0)
+    result |= 1;
+  buf[0] = '\0';
+  if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
+      || strcmp (buf, "1.750000e+00 33") != 0)
+    result |= 2;
+  buf[0] = '\0';
+  if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
+      || strcmp (buf, "1.75 33") != 0)
+    result |= 4;
+  return result;
+}]])],
+        [gl_cv_func_printf_long_double=yes],
+        [gl_cv_func_printf_long_double=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+           beos*)        gl_cv_func_printf_long_double="guessing no";;
+           mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
+           *)            gl_cv_func_printf_long_double="guessing yes";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports infinite and NaN
+dnl 'double' arguments and negative zero arguments in the %f, %e, %g
+dnl directives. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_infinite.
+
+AC_DEFUN([gl_PRINTF_INFINITE],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports infinite 'double' arguments],
+    [gl_cv_func_printf_infinite],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+  if (start_index < end_index)
+    {
+      if (string[start_index] == '-')
+        start_index++;
+      if (start_index + 3 <= end_index
+          && memcmp (string + start_index, "nan", 3) == 0)
+        {
+          start_index += 3;
+          if (start_index == end_index
+              || (string[start_index] == '(' && string[end_index - 1] == ')'))
+            return 1;
+        }
+    }
+  return 0;
+}
+static int
+have_minus_zero ()
+{
+  static double plus_zero = 0.0;
+  double minus_zero = - plus_zero;
+  return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+static char buf[10000];
+static double zero = 0.0;
+int main ()
+{
+  int result = 0;
+  if (sprintf (buf, "%f", 1.0 / 0.0) < 0
+      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+    result |= 1;
+  if (sprintf (buf, "%f", -1.0 / 0.0) < 0
+      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+    result |= 1;
+  if (sprintf (buf, "%f", zero / zero) < 0
+      || !strisnan (buf, 0, strlen (buf)))
+    result |= 2;
+  if (sprintf (buf, "%e", 1.0 / 0.0) < 0
+      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+    result |= 4;
+  if (sprintf (buf, "%e", -1.0 / 0.0) < 0
+      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+    result |= 4;
+  if (sprintf (buf, "%e", zero / zero) < 0
+      || !strisnan (buf, 0, strlen (buf)))
+    result |= 8;
+  if (sprintf (buf, "%g", 1.0 / 0.0) < 0
+      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+    result |= 16;
+  if (sprintf (buf, "%g", -1.0 / 0.0) < 0
+      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+    result |= 16;
+  if (sprintf (buf, "%g", zero / zero) < 0
+      || !strisnan (buf, 0, strlen (buf)))
+    result |= 32;
+  /* This test fails on HP-UX 10.20.  */
+  if (have_minus_zero ())
+    if (sprintf (buf, "%g", - zero) < 0
+        || strcmp (buf, "-0") != 0)
+    result |= 64;
+  return result;
+}]])],
+        [gl_cv_func_printf_infinite=yes],
+        [gl_cv_func_printf_infinite=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on FreeBSD >= 6.
+           freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
+           darwin*)              gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on HP-UX >= 11.
+           hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
+           hpux*)                gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_printf_infinite="guessing no";;
+           netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_printf_infinite="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_printf_infinite="guessing no";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports infinite and NaN
+dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_infinite_long_double.
+
+AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE],
+[
+  AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gl_BIGENDIAN])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  dnl The user can set or unset the variable gl_printf_safe to indicate
+  dnl that he wishes a safe handling of non-IEEE-754 'long double' values.
+  if test -n "$gl_printf_safe"; then
+    AC_DEFINE([CHECK_PRINTF_SAFE], [1],
+      [Define if you wish *printf() functions that have a safe handling of
+       non-IEEE-754 'long double' values.])
+  fi
+  case "$gl_cv_func_printf_long_double" in
+    *yes)
+      AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments],
+        [gl_cv_func_printf_infinite_long_double],
+        [
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+]GL_NOCRASH[
+#include <float.h>
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+  if (start_index < end_index)
+    {
+      if (string[start_index] == '-')
+        start_index++;
+      if (start_index + 3 <= end_index
+          && memcmp (string + start_index, "nan", 3) == 0)
+        {
+          start_index += 3;
+          if (start_index == end_index
+              || (string[start_index] == '(' && string[end_index - 1] == ')'))
+            return 1;
+        }
+    }
+  return 0;
+}
+static char buf[10000];
+static long double zeroL = 0.0L;
+int main ()
+{
+  int result = 0;
+  nocrash_init();
+  if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
+      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+    result |= 1;
+  if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
+      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+    result |= 1;
+  if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
+      || !strisnan (buf, 0, strlen (buf)))
+    result |= 1;
+  if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
+      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+    result |= 1;
+  if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
+      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+    result |= 1;
+  if (sprintf (buf, "%Le", zeroL / zeroL) < 0
+      || !strisnan (buf, 0, strlen (buf)))
+    result |= 1;
+  if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
+      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+    result |= 1;
+  if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
+      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+    result |= 1;
+  if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
+      || !strisnan (buf, 0, strlen (buf)))
+    result |= 1;
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+   of 'unsigned int' words.  */
+# ifdef WORDS_BIGENDIAN
+#  define LDBL80_WORDS(exponent,manthi,mantlo) \
+     { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+       ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
+       (unsigned int) (mantlo) << 16                                        \
+     }
+# else
+#  define LDBL80_WORDS(exponent,manthi,mantlo) \
+     { mantlo, manthi, exponent }
+# endif
+  { /* Quiet NaN.  */
+    static union { unsigned int word[4]; long double value; } x =
+      { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+    if (sprintf (buf, "%Lf", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 2;
+    if (sprintf (buf, "%Le", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 2;
+    if (sprintf (buf, "%Lg", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 2;
+  }
+  {
+    /* Signalling NaN.  */
+    static union { unsigned int word[4]; long double value; } x =
+      { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+    if (sprintf (buf, "%Lf", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 2;
+    if (sprintf (buf, "%Le", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 2;
+    if (sprintf (buf, "%Lg", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 2;
+  }
+  { /* Pseudo-NaN.  */
+    static union { unsigned int word[4]; long double value; } x =
+      { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+    if (sprintf (buf, "%Lf", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 4;
+    if (sprintf (buf, "%Le", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 4;
+    if (sprintf (buf, "%Lg", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 4;
+  }
+  { /* Pseudo-Infinity.  */
+    static union { unsigned int word[4]; long double value; } x =
+      { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+    if (sprintf (buf, "%Lf", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 8;
+    if (sprintf (buf, "%Le", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 8;
+    if (sprintf (buf, "%Lg", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 8;
+  }
+  { /* Pseudo-Zero.  */
+    static union { unsigned int word[4]; long double value; } x =
+      { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+    if (sprintf (buf, "%Lf", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 16;
+    if (sprintf (buf, "%Le", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 16;
+    if (sprintf (buf, "%Lg", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 16;
+  }
+  { /* Unnormalized number.  */
+    static union { unsigned int word[4]; long double value; } x =
+      { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+    if (sprintf (buf, "%Lf", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 32;
+    if (sprintf (buf, "%Le", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 32;
+    if (sprintf (buf, "%Lg", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 32;
+  }
+  { /* Pseudo-Denormal.  */
+    static union { unsigned int word[4]; long double value; } x =
+      { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+    if (sprintf (buf, "%Lf", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 64;
+    if (sprintf (buf, "%Le", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 64;
+    if (sprintf (buf, "%Lg", x.value) < 0
+        || !strisnan (buf, 0, strlen (buf)))
+      result |= 64;
+  }
+#endif
+  return result;
+}]])],
+            [gl_cv_func_printf_infinite_long_double=yes],
+            [gl_cv_func_printf_infinite_long_double=no],
+            [
+changequote(,)dnl
+             case "$host_cpu" in
+                                     # Guess no on ia64, x86_64, i386.
+               ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
+               *)
+                 case "$host_os" in
+                                         # Guess yes on glibc systems.
+                   *-gnu*)               gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # Guess yes on FreeBSD >= 6.
+                   freebsd[1-5]*)        gl_cv_func_printf_infinite_long_double="guessing no";;
+                   freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # Guess yes on HP-UX >= 11.
+                   hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
+                   hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # If we don't know, assume the worst.
+                   *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
+                 esac
+                 ;;
+             esac
+changequote([,])dnl
+            ])
+        ])
+      ;;
+    *)
+      gl_cv_func_printf_infinite_long_double="irrelevant"
+      ;;
+  esac
+])
+
+dnl Test whether the *printf family of functions supports the 'a' and 'A'
+dnl conversion specifier for hexadecimal output of floating-point numbers.
+dnl (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_directive_a.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_A],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives],
+    [gl_cv_func_printf_directive_a],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+  int result = 0;
+  if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
+      || (strcmp (buf, "0x1.922p+1 33") != 0
+          && strcmp (buf, "0x3.244p+0 33") != 0
+          && strcmp (buf, "0x6.488p-1 33") != 0
+          && strcmp (buf, "0xc.91p-2 33") != 0))
+    result |= 1;
+  if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
+      || (strcmp (buf, "-0X1.922P+1 33") != 0
+          && strcmp (buf, "-0X3.244P+0 33") != 0
+          && strcmp (buf, "-0X6.488P-1 33") != 0
+          && strcmp (buf, "-0XC.91P-2 33") != 0))
+    result |= 2;
+  /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
+  if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
+      || (strcmp (buf, "0x1.83p+0 33") != 0
+          && strcmp (buf, "0x3.05p-1 33") != 0
+          && strcmp (buf, "0x6.0ap-2 33") != 0
+          && strcmp (buf, "0xc.14p-3 33") != 0))
+    result |= 4;
+  /* This catches a FreeBSD 6.1 bug.  See
+     <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+  if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
+      || buf[0] == '0')
+    result |= 8;
+  /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug.  */
+  if (sprintf (buf, "%.1a", 1.999) < 0
+      || (strcmp (buf, "0x1.0p+1") != 0
+          && strcmp (buf, "0x2.0p+0") != 0
+          && strcmp (buf, "0x4.0p-1") != 0
+          && strcmp (buf, "0x8.0p-2") != 0))
+    result |= 16;
+  /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+     glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
+  if (sprintf (buf, "%.1La", 1.999L) < 0
+      || (strcmp (buf, "0x1.0p+1") != 0
+          && strcmp (buf, "0x2.0p+0") != 0
+          && strcmp (buf, "0x4.0p-1") != 0
+          && strcmp (buf, "0x8.0p-2") != 0))
+    result |= 32;
+  return result;
+}]])],
+        [gl_cv_func_printf_directive_a=yes],
+        [gl_cv_func_printf_directive_a=no],
+        [
+         case "$host_os" in
+                                 # Guess yes on glibc >= 2.5 systems.
+           *-gnu*)
+             AC_EGREP_CPP([BZ2908], [
+               #include <features.h>
+               #ifdef __GNU_LIBRARY__
+                #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
+                 BZ2908
+                #endif
+               #endif
+               ],
+               [gl_cv_func_printf_directive_a="guessing yes"],
+               [gl_cv_func_printf_directive_a="guessing no"])
+             ;;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_printf_directive_a="guessing no";;
+         esac
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports the %F format
+dnl directive. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_directive_f.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_F],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the 'F' directive],
+    [gl_cv_func_printf_directive_f],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+  int result = 0;
+  if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
+      || strcmp (buf, "1234567.000000 33") != 0)
+    result |= 1;
+  if (sprintf (buf, "%F", 1.0 / 0.0) < 0
+      || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
+    result |= 2;
+  /* This catches a Cygwin 1.5.x bug.  */
+  if (sprintf (buf, "%.F", 1234.0) < 0
+      || strcmp (buf, "1234") != 0)
+    result |= 4;
+  return result;
+}]])],
+        [gl_cv_func_printf_directive_f=yes],
+        [gl_cv_func_printf_directive_f=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_printf_directive_f="guessing yes";;
+                                 # Guess yes on FreeBSD >= 6.
+           freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
+           darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
+                                 # Guess yes on Solaris >= 2.10.
+           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
+           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_printf_directive_f="guessing no";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports the %n format
+dnl directive. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_directive_n.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the 'n' directive],
+    [gl_cv_func_printf_directive_n],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+  int count = -1;
+  /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
+     support %n in format strings in read-only memory but not in writable
+     memory.  */
+  strcpy (fmtstring, "%d %n");
+  if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
+      || strcmp (buf, "123 ") != 0
+      || count != 4)
+    return 1;
+  return 0;
+}]])],
+        [gl_cv_func_printf_directive_n=yes],
+        [gl_cv_func_printf_directive_n=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+           *)     gl_cv_func_printf_directive_n="guessing yes";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports the %ls format
+dnl directive and in particular, when a precision is specified, whether
+dnl the functions stop converting the wide string argument when the number
+dnl of bytes that have been produced by this conversion equals or exceeds
+dnl the precision.
+dnl Result is gl_cv_func_printf_directive_ls.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_LS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the 'ls' directive],
+    [gl_cv_func_printf_directive_ls],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+  int result = 0;
+  char buf[100];
+  /* Test whether %ls works at all.
+     This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
+     Cygwin 1.5.  */
+  {
+    static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
+    buf[0] = '\0';
+    if (sprintf (buf, "%ls", wstring) < 0
+        || strcmp (buf, "abc") != 0)
+      result |= 1;
+  }
+  /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
+     assertion failure inside libc), but not on OpenBSD 4.0.  */
+  {
+    static const wchar_t wstring[] = { 'a', 0 };
+    buf[0] = '\0';
+    if (sprintf (buf, "%ls", wstring) < 0
+        || strcmp (buf, "a") != 0)
+      result |= 2;
+  }
+  /* Test whether precisions in %ls are supported as specified in ISO C 99
+     section 7.19.6.1:
+       "If a precision is specified, no more than that many bytes are written
+        (including shift sequences, if any), and the array shall contain a
+        null wide character if, to equal the multibyte character sequence
+        length given by the precision, the function would need to access a
+        wide character one past the end of the array."
+     This test fails on Solaris 10.  */
+  {
+    static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
+    buf[0] = '\0';
+    if (sprintf (buf, "%.2ls", wstring) < 0
+        || strcmp (buf, "ab") != 0)
+      result |= 8;
+  }
+  return result;
+}]])],
+        [gl_cv_func_printf_directive_ls=yes],
+        [gl_cv_func_printf_directive_ls=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+           openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
+           irix*)           gl_cv_func_printf_directive_ls="guessing no";;
+           solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
+           cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
+           beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
+           *)               gl_cv_func_printf_directive_ls="guessing yes";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports POSIX/XSI format
+dnl strings with positions. (POSIX:2001)
+dnl Result is gl_cv_func_printf_positions.
+
+AC_DEFUN([gl_PRINTF_POSITIONS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions],
+    [gl_cv_func_printf_positions],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
+}]])],
+        [gl_cv_func_printf_positions=yes],
+        [gl_cv_func_printf_positions=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
+                         gl_cv_func_printf_positions="guessing no";;
+           beos*)        gl_cv_func_printf_positions="guessing no";;
+           mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
+           *)            gl_cv_func_printf_positions="guessing yes";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports POSIX/XSI format
+dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001)
+dnl Result is gl_cv_func_printf_flag_grouping.
+
+AC_DEFUN([gl_PRINTF_FLAG_GROUPING],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the grouping flag],
+    [gl_cv_func_printf_flag_grouping],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+  if (sprintf (buf, "%'d %d", 1234567, 99) < 0
+      || buf[strlen (buf) - 1] != '9')
+    return 1;
+  return 0;
+}]])],
+        [gl_cv_func_printf_flag_grouping=yes],
+        [gl_cv_func_printf_flag_grouping=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+           cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
+           netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
+           mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
+           *)            gl_cv_func_printf_flag_grouping="guessing yes";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports the - flag correctly.
+dnl (ISO C99.) See
+dnl <http://lists.gnu.org/archive/html/bug-coreutils/2008-02/msg00035.html>
+dnl Result is gl_cv_func_printf_flag_leftadjust.
+
+AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly],
+    [gl_cv_func_printf_flag_leftadjust],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+  /* Check that a '-' flag is not annihilated by a negative width.  */
+  if (sprintf (buf, "a%-*sc", -3, "b") < 0
+      || strcmp (buf, "ab  c") != 0)
+    return 1;
+  return 0;
+}]])],
+        [gl_cv_func_printf_flag_leftadjust=yes],
+        [gl_cv_func_printf_flag_leftadjust=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+                    # Guess yes on HP-UX 11.
+           hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+                    # Guess no on HP-UX 10 and older.
+           hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
+                    # Guess yes otherwise.
+           *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports padding of non-finite
+dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See
+dnl <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html>
+dnl Result is gl_cv_func_printf_flag_zero.
+
+AC_DEFUN([gl_PRINTF_FLAG_ZERO],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the zero flag correctly],
+    [gl_cv_func_printf_flag_zero],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+  if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
+      || (strcmp (buf, "       inf") != 0
+          && strcmp (buf, "  infinity") != 0))
+    return 1;
+  return 0;
+}]])],
+        [gl_cv_func_printf_flag_zero=yes],
+        [gl_cv_func_printf_flag_zero=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+                   # Guess yes on BeOS.
+           beos*)  gl_cv_func_printf_flag_zero="guessing yes";;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_printf_flag_zero="guessing no";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports large precisions.
+dnl On mingw, precisions larger than 512 are treated like 512, in integer,
+dnl floating-point or pointer output. On Solaris 10/x86, precisions larger
+dnl than 510 in floating-point output crash the program. On Solaris 10/SPARC,
+dnl precisions larger than 510 in floating-point output yield wrong results.
+dnl On BeOS, precisions larger than 1044 crash the program.
+dnl Result is gl_cv_func_printf_precision.
+
+AC_DEFUN([gl_PRINTF_PRECISION],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports large precisions],
+    [gl_cv_func_printf_precision],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[5000];
+int main ()
+{
+  int result = 0;
+#ifdef __BEOS__
+  /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
+  return 1;
+#endif
+  if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
+    result |= 1;
+  if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
+    result |= 2;
+  if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
+      || buf[0] != '1')
+    result |= 4;
+  return result;
+}]])],
+        [gl_cv_func_printf_precision=yes],
+        [gl_cv_func_printf_precision=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+           # Guess no only on Solaris, native Win32, and BeOS systems.
+           solaris*)     gl_cv_func_printf_precision="guessing no" ;;
+           mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
+           beos*)        gl_cv_func_printf_precision="guessing no" ;;
+           *)            gl_cv_func_printf_precision="guessing yes" ;;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions recovers gracefully in case
+dnl of an out-of-memory condition, or whether it crashes the entire program.
+dnl Result is gl_cv_func_printf_enomem.
+
+AC_DEFUN([gl_PRINTF_ENOMEM],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gl_MULTIARCH])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf survives out-of-memory conditions],
+    [gl_cv_func_printf_enomem],
+    [
+      gl_cv_func_printf_enomem="guessing no"
+      if test "$cross_compiling" = no; then
+        if test $APPLE_UNIVERSAL_BUILD = 0; then
+          AC_LANG_CONFTEST([AC_LANG_SOURCE([
+]GL_NOCRASH[
+changequote(,)dnl
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <errno.h>
+int main()
+{
+  struct rlimit limit;
+  int ret;
+  nocrash_init ();
+  /* Some printf implementations allocate temporary space with malloc.  */
+  /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
+#ifdef RLIMIT_DATA
+  if (getrlimit (RLIMIT_DATA, &limit) < 0)
+    return 77;
+  if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+    limit.rlim_max = 5000000;
+  limit.rlim_cur = limit.rlim_max;
+  if (setrlimit (RLIMIT_DATA, &limit) < 0)
+    return 77;
+#endif
+  /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
+#ifdef RLIMIT_AS
+  if (getrlimit (RLIMIT_AS, &limit) < 0)
+    return 77;
+  if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+    limit.rlim_max = 5000000;
+  limit.rlim_cur = limit.rlim_max;
+  if (setrlimit (RLIMIT_AS, &limit) < 0)
+    return 77;
+#endif
+  /* Some printf implementations allocate temporary space on the stack.  */
+#ifdef RLIMIT_STACK
+  if (getrlimit (RLIMIT_STACK, &limit) < 0)
+    return 77;
+  if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+    limit.rlim_max = 5000000;
+  limit.rlim_cur = limit.rlim_max;
+  if (setrlimit (RLIMIT_STACK, &limit) < 0)
+    return 77;
+#endif
+  ret = printf ("%.5000000f", 1.0);
+  return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
+}
+changequote([,])dnl
+          ])])
+          if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+            (./conftest
+             result=$?
+             if test $result != 0 && test $result != 77; then result=1; fi
+             exit $result
+            ) >/dev/null 2>/dev/null
+            case $? in
+              0) gl_cv_func_printf_enomem="yes" ;;
+              77) gl_cv_func_printf_enomem="guessing no" ;;
+              *) gl_cv_func_printf_enomem="no" ;;
+            esac
+          else
+            gl_cv_func_printf_enomem="guessing no"
+          fi
+          rm -fr conftest*
+        else
+          dnl A universal build on Apple MacOS X platforms.
+          dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode.
+          dnl But we need a configuration result that is valid in both modes.
+          gl_cv_func_printf_enomem="guessing no"
+        fi
+      fi
+      if test "$gl_cv_func_printf_enomem" = "guessing no"; then
+changequote(,)dnl
+        case "$host_os" in
+                    # Guess yes on glibc systems.
+          *-gnu*)   gl_cv_func_printf_enomem="guessing yes";;
+                    # Guess yes on Solaris.
+          solaris*) gl_cv_func_printf_enomem="guessing yes";;
+                    # Guess yes on AIX.
+          aix*)     gl_cv_func_printf_enomem="guessing yes";;
+                    # Guess yes on HP-UX/hppa.
+          hpux*)    case "$host_cpu" in
+                      hppa*) gl_cv_func_printf_enomem="guessing yes";;
+                      *)     gl_cv_func_printf_enomem="guessing no";;
+                    esac
+                    ;;
+                    # Guess yes on IRIX.
+          irix*)    gl_cv_func_printf_enomem="guessing yes";;
+                    # Guess yes on OSF/1.
+          osf*)     gl_cv_func_printf_enomem="guessing yes";;
+                    # Guess yes on BeOS.
+          beos*)    gl_cv_func_printf_enomem="guessing yes";;
+                    # Guess yes on Haiku.
+          haiku*)   gl_cv_func_printf_enomem="guessing yes";;
+                    # If we don't know, assume the worst.
+          *)        gl_cv_func_printf_enomem="guessing no";;
+        esac
+changequote([,])dnl
+      fi
+    ])
+])
+
+dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001)
+dnl Result is ac_cv_func_snprintf.
+
+AC_DEFUN([gl_SNPRINTF_PRESENCE],
+[
+  AC_CHECK_FUNCS_ONCE([snprintf])
+])
+
+dnl Test whether the string produced by the snprintf function is always NUL
+dnl terminated. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_snprintf_truncation_c99.
+
+AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether snprintf truncates the result as in C99],
+    [gl_cv_func_snprintf_truncation_c99],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+  strcpy (buf, "ABCDEF");
+  snprintf (buf, 3, "%d %d", 4567, 89);
+  if (memcmp (buf, "45\0DEF", 6) != 0)
+    return 1;
+  return 0;
+}]])],
+        [gl_cv_func_snprintf_truncation_c99=yes],
+        [gl_cv_func_snprintf_truncation_c99=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
+           darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on OpenBSD >= 3.9.
+           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
+           openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.6.
+           solaris2.[0-5] | solaris2.[0-5].*)
+                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
+           solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
+           aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on HP-UX >= 11.
+           hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+           hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on IRIX >= 6.5.
+           irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on OSF/1 >= 5.
+           osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
+           osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
+           netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_snprintf_truncation_c99="guessing no";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the return value of the snprintf function is the number
+dnl of bytes (excluding the terminating NUL) that would have been produced
+dnl if the buffer had been large enough. (ISO C99, POSIX:2001)
+dnl For example, this test program fails on IRIX 6.5:
+dnl     ---------------------------------------------------------------------
+dnl     #include <stdio.h>
+dnl     int main()
+dnl     {
+dnl       static char buf[8];
+dnl       int retval = snprintf (buf, 3, "%d", 12345);
+dnl       return retval >= 0 && retval < 3;
+dnl     }
+dnl     ---------------------------------------------------------------------
+dnl Result is gl_cv_func_snprintf_retval_c99.
+
+AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether snprintf returns a byte count as in C99],
+    [gl_cv_func_snprintf_retval_c99],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+  strcpy (buf, "ABCDEF");
+  if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+    return 1;
+  if (snprintf (buf, 0, "%d %d", 4567, 89) != 7)
+    return 2;
+  if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
+    return 3;
+  return 0;
+}]])],
+        [gl_cv_func_snprintf_retval_c99=yes],
+        [gl_cv_func_snprintf_retval_c99=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
+           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on OpenBSD >= 3.9.
+           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+                                 gl_cv_func_snprintf_retval_c99="guessing no";;
+           openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.10.
+           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
+           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
+           aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_snprintf_retval_c99="guessing no";;
+           netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the snprintf function supports the %n format directive
+dnl also in truncated portions of the format string. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_snprintf_directive_n.
+
+AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive],
+    [gl_cv_func_snprintf_directive_n],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+  int count = -1;
+  /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
+     support %n in format strings in read-only memory but not in writable
+     memory.  */
+  strcpy (fmtstring, "%d %n");
+  snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
+  if (count != 6)
+    return 1;
+  return 0;
+}]])],
+        [gl_cv_func_snprintf_directive_n=yes],
+        [gl_cv_func_snprintf_directive_n=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_snprintf_directive_n="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_snprintf_directive_n="guessing no";;
+           darwin*)              gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on Solaris >= 2.6.
+           solaris2.[0-5] | solaris2.[0-5].*)
+                                 gl_cv_func_snprintf_directive_n="guessing no";;
+           solaris*)             gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_snprintf_directive_n="guessing no";;
+           aix*)                 gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on IRIX >= 6.5.
+           irix6.5)              gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on OSF/1 >= 5.
+           osf[3-4]*)            gl_cv_func_snprintf_directive_n="guessing no";;
+           osf*)                 gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_snprintf_directive_n="guessing no";;
+           netbsd*)              gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_snprintf_directive_n="guessing no";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl Test whether the snprintf function, when passed a size = 1, writes any
+dnl output without bounds in this case, behaving like sprintf. This is the
+dnl case on Linux libc5.
+dnl Result is gl_cv_func_snprintf_size1.
+
+AC_DEFUN([gl_SNPRINTF_SIZE1],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([whether snprintf respects a size of 1],
+    [gl_cv_func_snprintf_size1],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+int main()
+{
+  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+  snprintf (buf, 1, "%d", 12345);
+  return buf[1] != 'E';
+}]])],
+        [gl_cv_func_snprintf_size1=yes],
+        [gl_cv_func_snprintf_size1=no],
+        [gl_cv_func_snprintf_size1="guessing yes"])
+    ])
+])
+
+dnl Test whether the vsnprintf function, when passed a zero size, produces no
+dnl output. (ISO C99, POSIX:2001)
+dnl For example, snprintf nevertheless writes a NUL byte in this case
+dnl on OSF/1 5.1:
+dnl     ---------------------------------------------------------------------
+dnl     #include <stdio.h>
+dnl     int main()
+dnl     {
+dnl       static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+dnl       snprintf (buf, 0, "%d", 12345);
+dnl       return buf[0] != 'D';
+dnl     }
+dnl     ---------------------------------------------------------------------
+dnl And vsnprintf writes any output without bounds in this case, behaving like
+dnl vsprintf, on HP-UX 11 and OSF/1 5.1:
+dnl     ---------------------------------------------------------------------
+dnl     #include <stdarg.h>
+dnl     #include <stdio.h>
+dnl     static int my_snprintf (char *buf, int size, const char *format, ...)
+dnl     {
+dnl       va_list args;
+dnl       int ret;
+dnl       va_start (args, format);
+dnl       ret = vsnprintf (buf, size, format, args);
+dnl       va_end (args);
+dnl       return ret;
+dnl     }
+dnl     int main()
+dnl     {
+dnl       static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+dnl       my_snprintf (buf, 0, "%d", 12345);
+dnl       return buf[0] != 'D';
+dnl     }
+dnl     ---------------------------------------------------------------------
+dnl Result is gl_cv_func_vsnprintf_zerosize_c99.
+
+AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99],
+    [gl_cv_func_vsnprintf_zerosize_c99],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdarg.h>
+#include <stdio.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+  va_list args;
+  int ret;
+  va_start (args, format);
+  ret = vsnprintf (buf, size, format, args);
+  va_end (args);
+  return ret;
+}
+int main()
+{
+  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+  my_snprintf (buf, 0, "%d", 12345);
+  return buf[0] != 'D';
+}]])],
+        [gl_cv_func_vsnprintf_zerosize_c99=yes],
+        [gl_cv_func_vsnprintf_zerosize_c99=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+           darwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on Cygwin.
+           cygwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.6.
+           solaris2.[0-5] | solaris2.[0-5].*)
+                                 gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+           solaris*)             gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+           aix*)                 gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on IRIX >= 6.5.
+           irix6.5)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+           netbsd*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on mingw.
+           mingw* | pw*)         gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
+dnl The results of these tests on various platforms are:
+dnl
+dnl 1 = gl_PRINTF_SIZES_C99
+dnl 2 = gl_PRINTF_LONG_DOUBLE
+dnl 3 = gl_PRINTF_INFINITE
+dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE
+dnl 5 = gl_PRINTF_DIRECTIVE_A
+dnl 6 = gl_PRINTF_DIRECTIVE_F
+dnl 7 = gl_PRINTF_DIRECTIVE_N
+dnl 8 = gl_PRINTF_DIRECTIVE_LS
+dnl 9 = gl_PRINTF_POSITIONS
+dnl 10 = gl_PRINTF_FLAG_GROUPING
+dnl 11 = gl_PRINTF_FLAG_LEFTADJUST
+dnl 12 = gl_PRINTF_FLAG_ZERO
+dnl 13 = gl_PRINTF_PRECISION
+dnl 14 = gl_PRINTF_ENOMEM
+dnl 15 = gl_SNPRINTF_PRESENCE
+dnl 16 = gl_SNPRINTF_TRUNCATION_C99
+dnl 17 = gl_SNPRINTF_RETVAL_C99
+dnl 18 = gl_SNPRINTF_DIRECTIVE_N
+dnl 19 = gl_SNPRINTF_SIZE1
+dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl
+dnl 1 = checking whether printf supports size specifiers as in C99...
+dnl 2 = checking whether printf supports 'long double' arguments...
+dnl 3 = checking whether printf supports infinite 'double' arguments...
+dnl 4 = checking whether printf supports infinite 'long double' arguments...
+dnl 5 = checking whether printf supports the 'a' and 'A' directives...
+dnl 6 = checking whether printf supports the 'F' directive...
+dnl 7 = checking whether printf supports the 'n' directive...
+dnl 8 = checking whether printf supports the 'ls' directive...
+dnl 9 = checking whether printf supports POSIX/XSI format strings with positions...
+dnl 10 = checking whether printf supports the grouping flag...
+dnl 11 = checking whether printf supports the left-adjust flag correctly...
+dnl 12 = checking whether printf supports the zero flag correctly...
+dnl 13 = checking whether printf supports large precisions...
+dnl 14 = checking whether printf survives out-of-memory conditions...
+dnl 15 = checking for snprintf...
+dnl 16 = checking whether snprintf truncates the result as in C99...
+dnl 17 = checking whether snprintf returns a byte count as in C99...
+dnl 18 = checking whether snprintf fully supports the 'n' directive...
+dnl 19 = checking whether snprintf respects a size of 1...
+dnl 20 = checking whether vsnprintf respects a zero size as in C99...
+dnl
+dnl . = yes, # = no.
+dnl
+dnl                                  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
+dnl   glibc 2.5                      .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
+dnl   glibc 2.3.6                    .  .  .  .  #  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
+dnl   FreeBSD 5.4, 6.1               .  .  .  .  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
+dnl   MacOS X 10.5.8                 .  .  .  #  #  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .
+dnl   MacOS X 10.3.9                 .  .  .  .  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
+dnl   OpenBSD 3.9, 4.0               .  .  #  #  #  #  .  #  .  #  .  #  .  #  .  .  .  .  .  .
+dnl   Cygwin 1.7.0 (2009)            .  .  .  #  .  .  .  ?  .  .  .  .  .  ?  .  .  .  .  .  .
+dnl   Cygwin 1.5.25 (2008)           .  .  .  #  #  .  .  #  .  .  .  .  .  #  .  .  .  .  .  .
+dnl   Cygwin 1.5.19 (2006)           #  .  .  #  #  #  .  #  .  #  .  #  #  #  .  .  .  .  .  .
+dnl   Solaris 11 2010-11             .  .  #  #  #  .  .  #  .  .  .  #  .  .  .  .  .  .  .  .
+dnl   Solaris 10                     .  .  #  #  #  .  .  #  .  .  .  #  #  .  .  .  .  .  .  .
+dnl   Solaris 2.6 ... 9              #  .  #  #  #  #  .  #  .  .  .  #  #  .  .  .  #  .  .  .
+dnl   Solaris 2.5.1                  #  .  #  #  #  #  .  #  .  .  .  #  .  .  #  #  #  #  #  #
+dnl   AIX 5.2, 7.1                   .  .  #  #  #  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .
+dnl   AIX 4.3.2, 5.1                 #  .  #  #  #  #  .  .  .  .  .  #  .  .  .  .  #  .  .  .
+dnl   HP-UX 11.31                    .  .  .  .  #  .  .  .  .  .  .  #  .  .  .  .  #  #  .  .
+dnl   HP-UX 11.{00,11,23}            #  .  .  .  #  #  .  .  .  .  .  #  .  .  .  .  #  #  .  #
+dnl   HP-UX 10.20                    #  .  #  .  #  #  .  ?  .  .  #  #  .  .  .  .  #  #  ?  #
+dnl   IRIX 6.5                       #  .  #  #  #  #  .  #  .  .  .  #  .  .  .  .  #  .  .  .
+dnl   OSF/1 5.1                      #  .  #  #  #  #  .  .  .  .  .  #  .  .  .  .  #  .  .  #
+dnl   OSF/1 4.0d                     #  .  #  #  #  #  .  .  .  .  .  #  .  .  #  #  #  #  #  #
+dnl   NetBSD 5.0                     .  .  .  #  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
+dnl   NetBSD 4.0                     .  ?  ?  ?  ?  ?  .  ?  .  ?  ?  ?  ?  ?  .  .  .  ?  ?  ?
+dnl   NetBSD 3.0                     .  .  .  .  #  #  .  ?  #  #  ?  #  .  #  .  .  .  .  .  .
+dnl   Haiku                          .  .  .  #  #  #  .  #  .  .  .  .  .  ?  .  .  ?  .  .  .
+dnl   BeOS                           #  #  .  #  #  #  .  ?  #  .  ?  .  #  ?  .  .  ?  .  .  .
+dnl   mingw                          #  #  #  #  #  #  .  .  #  #  .  #  #  ?  .  #  #  #  .  .
diff --git a/gnulib/m4/priv-set.m4 b/gnulib/m4/priv-set.m4
new file mode 100644 (file)
index 0000000..1509ba6
--- /dev/null
@@ -0,0 +1,16 @@
+# serial 7
+
+# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# Written by David Bartley.
+
+AC_DEFUN([gl_PRIV_SET],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AC_CHECK_FUNCS([getppriv])
+  AC_CHECK_HEADERS_ONCE([priv.h])
+])
diff --git a/gnulib/m4/progtest.m4 b/gnulib/m4/progtest.m4
new file mode 100644 (file)
index 0000000..5130d56
--- /dev/null
@@ -0,0 +1,91 @@
+# progtest.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1996-2003, 2005, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ([2.50])
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL([ac_cv_path_$1],
+[case "[$]$1" in
+  [[\\/]]* | ?:[[\\/]]*)
+    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+          if [$3]; then
+            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+    ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$][$1])
+else
+  AC_MSG_RESULT([no])
+fi
+AC_SUBST([$1])dnl
+])
diff --git a/gnulib/m4/putenv.m4 b/gnulib/m4/putenv.m4
new file mode 100644 (file)
index 0000000..de3900b
--- /dev/null
@@ -0,0 +1,41 @@
+# putenv.m4 serial 17
+dnl Copyright (C) 2002-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+dnl
+dnl Check whether putenv ("FOO") removes FOO from the environment.
+dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that.
+
+AC_DEFUN([gl_FUNC_PUTENV],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
+   [gl_cv_func_svid_putenv],
+   [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
+    /* Put it in env.  */
+    if (putenv ("CONFTEST_putenv=val"))
+      return 1;
+
+    /* Try to remove it.  */
+    if (putenv ("CONFTEST_putenv"))
+      return 2;
+
+    /* Make sure it was deleted.  */
+    if (getenv ("CONFTEST_putenv") != 0)
+      return 3;
+
+    return 0;
+              ]])],
+             gl_cv_func_svid_putenv=yes,
+             gl_cv_func_svid_putenv=no,
+             dnl When crosscompiling, assume putenv is broken.
+             gl_cv_func_svid_putenv=no)
+   ])
+  if test $gl_cv_func_svid_putenv = no; then
+    REPLACE_PUTENV=1
+    AC_LIBOBJ([putenv])
+  fi
+])
diff --git a/gnulib/m4/quote.m4 b/gnulib/m4/quote.m4
new file mode 100644 (file)
index 0000000..2328684
--- /dev/null
@@ -0,0 +1,14 @@
+# quote.m4 serial 5
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_QUOTE],
+[
+  AC_LIBOBJ([quote])
+
+  dnl Prerequisites of lib/quote.c.
+  dnl (none)
+])
diff --git a/gnulib/m4/quotearg.m4 b/gnulib/m4/quotearg.m4
new file mode 100644 (file)
index 0000000..ff4a2fa
--- /dev/null
@@ -0,0 +1,10 @@
+# quotearg.m4 serial 8
+dnl Copyright (C) 2002, 2004-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_QUOTEARG],
+[
+  AC_LIBOBJ([quotearg])
+])
diff --git a/gnulib/m4/readlink.m4 b/gnulib/m4/readlink.m4
new file mode 100644 (file)
index 0000000..a502ca5
--- /dev/null
@@ -0,0 +1,62 @@
+# readlink.m4 serial 9
+dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_READLINK],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([readlink])
+  if test $ac_cv_func_readlink = no; then
+    HAVE_READLINK=0
+    AC_LIBOBJ([readlink])
+    gl_PREREQ_READLINK
+  else
+    AC_CACHE_CHECK([whether readlink signature is correct],
+      [gl_cv_decl_readlink_works],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+           [[#include <unistd.h>
+      /* Cause compilation failure if original declaration has wrong type.  */
+      ssize_t readlink (const char *, char *, size_t);]])],
+         [gl_cv_decl_readlink_works=yes], [gl_cv_decl_readlink_works=no])])
+    dnl Solaris 9 ignores trailing slash.
+    dnl FreeBSD 7.2 dereferences only one level of links with trailing slash.
+    AC_CACHE_CHECK([whether readlink handles trailing slash correctly],
+      [gl_cv_func_readlink_works],
+      [# We have readlink, so assume ln -s works.
+       ln -s conftest.no-such conftest.link
+       ln -s conftest.link conftest.lnk2
+       AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+           [[#include <unistd.h>
+]], [[char buf[20];
+      return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
+         [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
+         [gl_cv_func_readlink_works="guessing no"])
+      rm -f conftest.link conftest.lnk2])
+    if test "$gl_cv_func_readlink_works" != yes; then
+      AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
+        fails to recognize a trailing slash.])
+      REPLACE_READLINK=1
+      AC_LIBOBJ([readlink])
+    elif test "$gl_cv_decl_readlink_works" != yes; then
+      REPLACE_READLINK=1
+      AC_LIBOBJ([readlink])
+    fi
+  fi
+])
+
+# Like gl_FUNC_READLINK, except prepare for separate compilation (no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_READLINK_SEPARATE],
+[
+  AC_CHECK_FUNCS_ONCE([readlink])
+  gl_PREREQ_READLINK
+])
+
+# Prerequisites of lib/readlink.c.
+AC_DEFUN([gl_PREREQ_READLINK],
+[
+  :
+])
diff --git a/gnulib/m4/readlinkat.m4 b/gnulib/m4/readlinkat.m4
new file mode 100644 (file)
index 0000000..8dc7d19
--- /dev/null
@@ -0,0 +1,21 @@
+# serial 1
+# See if we need to provide readlinkat replacement.
+
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Eric Blake.
+
+AC_DEFUN([gl_FUNC_READLINKAT],
+[
+  AC_REQUIRE([gl_FUNC_OPENAT])
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_FUNCS_ONCE([readlinkat])
+  if test $ac_cv_func_readlinkat = no; then
+    HAVE_READLINKAT=0
+    AC_LIBOBJ([readlinkat])
+  fi
+])
diff --git a/gnulib/m4/realloc.m4 b/gnulib/m4/realloc.m4
new file mode 100644 (file)
index 0000000..a403d9f
--- /dev/null
@@ -0,0 +1,44 @@
+# realloc.m4 serial 11
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_FUNC_REALLOC_GNU
+# -------------------
+# Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace
+# realloc if it is not.
+AC_DEFUN([gl_FUNC_REALLOC_GNU],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  dnl _AC_FUNC_REALLOC_IF is defined in Autoconf.
+  _AC_FUNC_REALLOC_IF(
+    [AC_DEFINE([HAVE_REALLOC_GNU], [1],
+               [Define to 1 if your system has a GNU libc compatible 'realloc'
+                function, and to 0 otherwise.])],
+    [AC_DEFINE([HAVE_REALLOC_GNU], [0])
+     gl_REPLACE_REALLOC
+    ])
+])# gl_FUNC_REALLOC_GNU
+
+# gl_FUNC_REALLOC_POSIX
+# ---------------------
+# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it
+# fails), and replace realloc if it is not.
+AC_DEFUN([gl_FUNC_REALLOC_POSIX],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+  if test $gl_cv_func_malloc_posix = yes; then
+    AC_DEFINE([HAVE_REALLOC_POSIX], [1],
+      [Define if the 'realloc' function is POSIX compliant.])
+  else
+    gl_REPLACE_REALLOC
+  fi
+])
+
+AC_DEFUN([gl_REPLACE_REALLOC],
+[
+  AC_LIBOBJ([realloc])
+  REPLACE_REALLOC=1
+])
diff --git a/gnulib/m4/regex.m4 b/gnulib/m4/regex.m4
new file mode 100644 (file)
index 0000000..24198b5
--- /dev/null
@@ -0,0 +1,225 @@
+# serial 58
+
+# Copyright (C) 1996-2001, 2003-2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+dnl Initially derived from code in GNU grep.
+dnl Mostly written by Jim Meyering.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([gl_REGEX],
+[
+  AC_ARG_WITH([included-regex],
+    [AS_HELP_STRING([--without-included-regex],
+                    [don't compile regex; this is the default on systems
+                     with recent-enough versions of the GNU C Library
+                     (use with caution on other systems).])])
+
+  case $with_included_regex in #(
+  yes|no) ac_use_included_regex=$with_included_regex
+        ;;
+  '')
+    # If the system regex support is good enough that it passes the
+    # following run test, then default to *not* using the included regex.c.
+    # If cross compiling, assume the test would fail and use the included
+    # regex.c.
+    AC_CACHE_CHECK([for working re_compile_pattern],
+                   [gl_cv_func_re_compile_pattern_working],
+      [AC_RUN_IFELSE(
+        [AC_LANG_PROGRAM(
+          [AC_INCLUDES_DEFAULT[
+           #include <locale.h>
+           #include <limits.h>
+           #include <regex.h>
+           ]],
+          [[int result = 0;
+            static struct re_pattern_buffer regex;
+            unsigned char folded_chars[UCHAR_MAX + 1];
+            int i;
+            const char *s;
+            struct re_registers regs;
+
+            /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+               This test needs valgrind to catch the bug on Debian
+               GNU/Linux 3.1 x86, but it might catch the bug better
+               on other platforms and it shouldn't hurt to try the
+               test here.  */
+            if (setlocale (LC_ALL, "en_US.UTF-8"))
+              {
+                static char const pat[] = "insert into";
+                static char const data[] =
+                  "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+                re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+                               | RE_ICASE);
+                memset (&regex, 0, sizeof regex);
+                s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+                if (s)
+                  result |= 1;
+                else if (re_search (&regex, data, sizeof data - 1,
+                                    0, sizeof data - 1, &regs)
+                         != -1)
+                  result |= 1;
+                if (! setlocale (LC_ALL, "C"))
+                  return 1;
+              }
+
+            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
+            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("a[^x]b", 6, &regex);
+            if (s)
+              result |= 2;
+            /* This should fail, but succeeds for glibc-2.5.  */
+            else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+              result |= 2;
+
+            /* This regular expression is from Spencer ere test number 75
+               in grep-2.3.  */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+            memset (&regex, 0, sizeof regex);
+            for (i = 0; i <= UCHAR_MAX; i++)
+              folded_chars[i] = i;
+            regex.translate = folded_chars;
+            s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
+            /* This should fail with _Invalid character class name_ error.  */
+            if (!s)
+              result |= 4;
+
+            /* Ensure that [b-a] is diagnosed as invalid, when
+               using RE_NO_EMPTY_RANGES. */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("a[b-a]", 6, &regex);
+            if (s == 0)
+              result |= 8;
+
+            /* This should succeed, but does not for glibc-2.1.3.  */
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("{1", 2, &regex);
+            if (s)
+              result |= 8;
+
+            /* The following example is derived from a problem report
+               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("[an\371]*n", 7, &regex);
+            if (s)
+              result |= 8;
+            /* This should match, but does not for glibc-2.2.1.  */
+            else if (re_match (&regex, "an", 2, 0, &regs) != 2)
+              result |= 8;
+
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("x", 1, &regex);
+            if (s)
+              result |= 8;
+            /* glibc-2.2.93 does not work with a negative RANGE argument.  */
+            else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+              result |= 8;
+
+            /* The version of regex.c in older versions of gnulib
+               ignored RE_ICASE.  Detect that problem too.  */
+            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("x", 1, &regex);
+            if (s)
+              result |= 16;
+            else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+              result |= 16;
+
+            /* Catch a bug reported by Vin Shelton in
+               http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+               */
+            re_set_syntax (RE_SYNTAX_POSIX_BASIC
+                           & ~RE_CONTEXT_INVALID_DUP
+                           & ~RE_NO_EMPTY_RANGES);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+            if (s)
+              result |= 32;
+
+            /* REG_STARTEND was added to glibc on 2004-01-15.
+               Reject older versions.  */
+            if (! REG_STARTEND)
+              result |= 64;
+
+#if 0
+            /* It would be nice to reject hosts whose regoff_t values are too
+               narrow (including glibc on hosts with 64-bit ptrdiff_t and
+               32-bit int), but we should wait until glibc implements this
+               feature.  Otherwise, support for equivalence classes and
+               multibyte collation symbols would always be broken except
+               when compiling --without-included-regex.   */
+            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+                || sizeof (regoff_t) < sizeof (ssize_t))
+              result |= 64;
+#endif
+
+            return result;
+          ]])],
+       [gl_cv_func_re_compile_pattern_working=yes],
+       [gl_cv_func_re_compile_pattern_working=no],
+       dnl When crosscompiling, assume it is not working.
+       [gl_cv_func_re_compile_pattern_working=no])])
+    case $gl_cv_func_re_compile_pattern_working in #(
+    yes) ac_use_included_regex=no;; #(
+    no) ac_use_included_regex=yes;;
+    esac
+    ;;
+  *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex])
+    ;;
+  esac
+
+  if test $ac_use_included_regex = yes; then
+    AC_DEFINE([_REGEX_LARGE_OFFSETS], [1],
+      [Define if you want regoff_t to be at least as wide POSIX requires.])
+    AC_DEFINE([re_syntax_options], [rpl_re_syntax_options],
+      [Define to rpl_re_syntax_options if the replacement should be used.])
+    AC_DEFINE([re_set_syntax], [rpl_re_set_syntax],
+      [Define to rpl_re_set_syntax if the replacement should be used.])
+    AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern],
+      [Define to rpl_re_compile_pattern if the replacement should be used.])
+    AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap],
+      [Define to rpl_re_compile_fastmap if the replacement should be used.])
+    AC_DEFINE([re_search], [rpl_re_search],
+      [Define to rpl_re_search if the replacement should be used.])
+    AC_DEFINE([re_search_2], [rpl_re_search_2],
+      [Define to rpl_re_search_2 if the replacement should be used.])
+    AC_DEFINE([re_match], [rpl_re_match],
+      [Define to rpl_re_match if the replacement should be used.])
+    AC_DEFINE([re_match_2], [rpl_re_match_2],
+      [Define to rpl_re_match_2 if the replacement should be used.])
+    AC_DEFINE([re_set_registers], [rpl_re_set_registers],
+      [Define to rpl_re_set_registers if the replacement should be used.])
+    AC_DEFINE([re_comp], [rpl_re_comp],
+      [Define to rpl_re_comp if the replacement should be used.])
+    AC_DEFINE([re_exec], [rpl_re_exec],
+      [Define to rpl_re_exec if the replacement should be used.])
+    AC_DEFINE([regcomp], [rpl_regcomp],
+      [Define to rpl_regcomp if the replacement should be used.])
+    AC_DEFINE([regexec], [rpl_regexec],
+      [Define to rpl_regexec if the replacement should be used.])
+    AC_DEFINE([regerror], [rpl_regerror],
+      [Define to rpl_regerror if the replacement should be used.])
+    AC_DEFINE([regfree], [rpl_regfree],
+      [Define to rpl_regfree if the replacement should be used.])
+    AC_LIBOBJ([regex])
+    gl_PREREQ_REGEX
+  fi
+])
+
+# Prerequisites of lib/regex.c and lib/regex_internal.c.
+AC_DEFUN([gl_PREREQ_REGEX],
+[
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+  AC_REQUIRE([AC_C_INLINE])
+  AC_REQUIRE([AC_C_RESTRICT])
+  AC_REQUIRE([AC_TYPE_MBSTATE_T])
+  AC_CHECK_HEADERS([libintl.h])
+  AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll])
+  AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
+])
diff --git a/gnulib/m4/rmdir.m4 b/gnulib/m4/rmdir.m4
new file mode 100644 (file)
index 0000000..41705a1
--- /dev/null
@@ -0,0 +1,35 @@
+# rmdir.m4 serial 10
+dnl Copyright (C) 2002, 2005, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RMDIR],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  dnl Detect cygwin 1.5.x bug.
+  AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works],
+    [mkdir conftest.dir
+     touch conftest.file
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+         [[#include <stdio.h>
+           #include <errno.h>
+           #include <unistd.h>
+]], [[int result = 0;
+      if (!rmdir ("conftest.file/"))
+        result |= 1;
+      else if (errno != ENOTDIR)
+        result |= 2;
+      if (!rmdir ("conftest.dir/./"))
+        result |= 4;
+      return result;
+    ]])],
+       [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
+       [gl_cv_func_rmdir_works="guessing no"])
+     rm -rf conftest.dir conftest.file])
+  if test x"$gl_cv_func_rmdir_works" != xyes; then
+    REPLACE_RMDIR=1
+    AC_LIBOBJ([rmdir])
+  fi
+])
diff --git a/gnulib/m4/rpmatch.m4 b/gnulib/m4/rpmatch.m4
new file mode 100644 (file)
index 0000000..a8d0f10
--- /dev/null
@@ -0,0 +1,32 @@
+# rpmatch.m4 serial 9
+dnl Copyright (C) 2002-2003, 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RPMATCH],
+[
+  dnl Persuade glibc <stdlib.h> to declare rpmatch().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REPLACE_FUNCS([rpmatch])
+  if test $ac_cv_func_rpmatch = no; then
+    HAVE_RPMATCH=0
+    gl_PREREQ_RPMATCH
+  fi
+])
+
+# Prerequisites of lib/rpmatch.c.
+AC_DEFUN([gl_PREREQ_RPMATCH], [
+  AC_CACHE_CHECK([for nl_langinfo and YESEXPR], [gl_cv_langinfo_yesexpr],
+    [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
+       [[char* cs = nl_langinfo(YESEXPR); return !cs;]])],
+       [gl_cv_langinfo_yesexpr=yes],
+       [gl_cv_langinfo_yesexpr=no])
+    ])
+  if test $gl_cv_langinfo_yesexpr = yes; then
+    AC_DEFINE([HAVE_LANGINFO_YESEXPR], [1],
+      [Define if you have <langinfo.h> and nl_langinfo(YESEXPR).])
+  fi
+])
diff --git a/gnulib/m4/same.m4 b/gnulib/m4/same.m4
new file mode 100644 (file)
index 0000000..063dc65
--- /dev/null
@@ -0,0 +1,15 @@
+#serial 8
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SAME],
+[
+  AC_LIBOBJ([same])
+
+  dnl Prerequisites of lib/same.c.
+  AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
+  AC_CHECK_FUNCS_ONCE([pathconf])
+])
diff --git a/gnulib/m4/save-cwd.m4 b/gnulib/m4/save-cwd.m4
new file mode 100644 (file)
index 0000000..7437e05
--- /dev/null
@@ -0,0 +1,12 @@
+# serial 9
+dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SAVE_CWD],
+[
+  AC_LIBOBJ([save-cwd])
+  dnl Prerequisites for lib/save-cwd.c.
+  AC_CHECK_FUNCS_ONCE([fchdir])
+])
diff --git a/gnulib/m4/savedir.m4 b/gnulib/m4/savedir.m4
new file mode 100644 (file)
index 0000000..94f3e89
--- /dev/null
@@ -0,0 +1,11 @@
+# savedir.m4 serial 9
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SAVEDIR],
+[
+  AC_LIBOBJ([savedir])
+])
diff --git a/gnulib/m4/selinux-context-h.m4 b/gnulib/m4/selinux-context-h.m4
new file mode 100644 (file)
index 0000000..227ab6b
--- /dev/null
@@ -0,0 +1,21 @@
+# serial 2   -*- Autoconf -*-
+# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# From Jim Meyering
+# Provide <selinux/context.h>, if necessary.
+
+AC_DEFUN([gl_HEADERS_SELINUX_CONTEXT_H],
+[
+  AC_REQUIRE([gl_LIBSELINUX])
+  if test "$with_selinux" != no; then
+    AC_CHECK_HEADERS([selinux/context.h],
+                     [SELINUX_CONTEXT_H=],
+                     [SELINUX_CONTEXT_H=selinux/context.h])
+  else
+    SELINUX_CONTEXT_H=selinux/context.h
+  fi
+  AC_SUBST([SELINUX_CONTEXT_H])
+])
diff --git a/gnulib/m4/selinux-selinux-h.m4 b/gnulib/m4/selinux-selinux-h.m4
new file mode 100644 (file)
index 0000000..7afd416
--- /dev/null
@@ -0,0 +1,70 @@
+# serial 4   -*- Autoconf -*-
+# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# From Jim Meyering
+# Provide <selinux/selinux.h>, if necessary.
+# If it is already present, provide wrapper functions to guard against
+# misbehavior from getfilecon, lgetfilecon, and fgetfilecon.
+
+AC_DEFUN([gl_HEADERS_SELINUX_SELINUX_H],
+[
+  AC_REQUIRE([gl_LIBSELINUX])
+  if test "$with_selinux" != no; then
+    AC_CHECK_HEADERS([selinux/selinux.h])
+
+    if test "$ac_cv_header_selinux_selinux_h" = yes; then
+      # We do have <selinux/selinux.h>, so do compile getfilecon.c
+      # and arrange to use its wrappers.
+      AC_LIBOBJ([getfilecon])
+      gl_CHECK_NEXT_HEADERS([selinux/selinux.h])
+      AC_DEFINE([getfilecon], [rpl_getfilecon],
+                [Always use our getfilecon wrapper.])
+      AC_DEFINE([lgetfilecon], [rpl_lgetfilecon],
+                [Always use our lgetfilecon wrapper.])
+      AC_DEFINE([fgetfilecon], [rpl_fgetfilecon],
+                [Always use our fgetfilecon wrapper.])
+    fi
+
+    case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
+      no:*) # already warned
+        ;;
+      *:no)
+        AC_MSG_WARN([libselinux was found but selinux/selinux.h is missing.])
+        AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.])
+    esac
+  else
+    # Do as if <selinux/selinux.h> does not exist, even if
+    # AC_CHECK_HEADERS_ONCE has already determined that it exists.
+    AC_DEFINE([HAVE_SELINUX_SELINUX_H], [0])
+  fi
+])
+
+AC_DEFUN([gl_LIBSELINUX],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_CANONICAL_BUILD])
+
+  AC_ARG_WITH([selinux],
+    AS_HELP_STRING([--without-selinux], [do not use SELinux, even on systems with SELinux]),
+    [], [with_selinux=maybe])
+
+  LIB_SELINUX=
+  if test "$with_selinux" != no; then
+    gl_save_LIBS=$LIBS
+    AC_SEARCH_LIBS([setfilecon], [selinux],
+                   [test "$ac_cv_search_setfilecon" = "none required" ||
+                    LIB_SELINUX=$ac_cv_search_setfilecon])
+    LIBS=$gl_save_LIBS
+  fi
+  AC_SUBST([LIB_SELINUX])
+
+  # Warn if SELinux is found but libselinux is absent;
+  if test "$ac_cv_search_setfilecon" = no &&
+     test "$host" = "$build" && test -d /selinux; then
+    AC_MSG_WARN([This system supports SELinux but libselinux is missing.])
+    AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.])
+  fi
+])
diff --git a/gnulib/m4/setenv.m4 b/gnulib/m4/setenv.m4
new file mode 100644 (file)
index 0000000..ba619b0
--- /dev/null
@@ -0,0 +1,149 @@
+# setenv.m4 serial 21
+dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SETENV],
+[
+  AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
+  if test $HAVE_SETENV$REPLACE_SETENV != 10; then
+    AC_LIBOBJ([setenv])
+  fi
+])
+
+# Like gl_FUNC_SETENV, except prepare for separate compilation (no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_CHECK_DECLS_ONCE([setenv])
+  if test $ac_cv_have_decl_setenv = no; then
+    HAVE_DECL_SETENV=0
+  fi
+  AC_CHECK_FUNCS_ONCE([setenv])
+  if test $ac_cv_func_setenv = no; then
+    HAVE_SETENV=0
+  else
+    AC_CACHE_CHECK([whether setenv validates arguments],
+      [gl_cv_func_setenv_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+       #include <stdlib.h>
+       #include <errno.h>
+       #include <string.h>
+      ]], [[
+       int result = 0;
+       {
+         if (setenv ("", "", 0) != -1)
+           result |= 1;
+         else if (errno != EINVAL)
+           result |= 2;
+       }
+       {
+         if (setenv ("a", "=", 1) != 0)
+           result |= 4;
+         else if (strcmp (getenv ("a"), "=") != 0)
+           result |= 8;
+       }
+       return result;
+      ]])],
+      [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
+      [gl_cv_func_setenv_works="guessing no"])])
+    if test "$gl_cv_func_setenv_works" != yes; then
+      REPLACE_SETENV=1
+      AC_LIBOBJ([setenv])
+    fi
+  fi
+  gl_PREREQ_SETENV
+])
+
+AC_DEFUN([gl_FUNC_UNSETENV],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_CHECK_DECLS_ONCE([unsetenv])
+  if test $ac_cv_have_decl_unsetenv = no; then
+    HAVE_DECL_UNSETENV=0
+  fi
+  AC_CHECK_FUNCS([unsetenv])
+  if test $ac_cv_func_unsetenv = no; then
+    AC_LIBOBJ([unsetenv])
+    gl_PREREQ_UNSETENV
+  else
+    dnl Some BSDs return void, failing to do error checking.
+    AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[
+#undef _BSD
+#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
+#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+int unsetenv (const char *name);
+#else
+int unsetenv();
+#endif
+            ]],
+            [[]])],
+         [gt_cv_func_unsetenv_ret='int'],
+         [gt_cv_func_unsetenv_ret='void'])])
+    if test $gt_cv_func_unsetenv_ret = 'void'; then
+      AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
+       instead of int.])
+      REPLACE_UNSETENV=1
+      AC_LIBOBJ([unsetenv])
+    fi
+
+    dnl Solaris 10 unsetenv does not remove all copies of a name.
+    dnl Haiku alpha 2 unsetenv gets confused by assignment to environ.
+    dnl OpenBSD 4.7 unsetenv("") does not fail.
+    AC_CACHE_CHECK([whether unsetenv obeys POSIX],
+      [gl_cv_func_unsetenv_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+       #include <stdlib.h>
+       #include <errno.h>
+       extern char **environ;
+      ]], [[
+       char entry1[] = "a=1";
+       char entry2[] = "b=2";
+       char *env[] = { entry1, entry2, NULL };
+       if (putenv ((char *) "a=1")) return 1;
+       if (putenv (entry2)) return 2;
+       entry2[0] = 'a';
+       unsetenv ("a");
+       if (getenv ("a")) return 3;
+       if (!unsetenv ("") || errno != EINVAL) return 4;
+       entry2[0] = 'b';
+       environ = env;
+       if (!getenv ("a")) return 5;
+       entry2[0] = 'a';
+       unsetenv ("a");
+       if (getenv ("a")) return 6;
+      ]])],
+      [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
+      [gl_cv_func_unsetenv_works="guessing no"])])
+    if test "$gl_cv_func_unsetenv_works" != yes; then
+      REPLACE_UNSETENV=1
+      AC_LIBOBJ([unsetenv])
+    fi
+  fi
+])
+
+# Prerequisites of lib/setenv.c.
+AC_DEFUN([gl_PREREQ_SETENV],
+[
+  AC_REQUIRE([AC_FUNC_ALLOCA])
+  AC_REQUIRE([gl_ENVIRON])
+  AC_CHECK_HEADERS_ONCE([unistd.h])
+  AC_CHECK_HEADERS([search.h])
+  AC_CHECK_FUNCS([tsearch])
+])
+
+# Prerequisites of lib/unsetenv.c.
+AC_DEFUN([gl_PREREQ_UNSETENV],
+[
+  AC_REQUIRE([gl_ENVIRON])
+  AC_CHECK_HEADERS_ONCE([unistd.h])
+])
diff --git a/gnulib/m4/setlocale.m4 b/gnulib/m4/setlocale.m4
new file mode 100644 (file)
index 0000000..6672c34
--- /dev/null
@@ -0,0 +1,27 @@
+# setlocale.m4 serial 1
+dnl Copyright (C) 2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SETLOCALE],
+[
+  AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    dnl On native Windows systems, setlocale(category,NULL) does not look at
+    dnl the environment variables LC_ALL, category, and LANG.
+    mingw*) REPLACE_SETLOCALE=1 ;;
+  esac
+  if test $REPLACE_SETLOCALE = 1; then
+    gl_REPLACE_LOCALE_H
+    AC_LIBOBJ([setlocale])
+    gl_PREREQ_SETLOCALE
+  fi
+])
+
+# Prerequisites of lib/setlocale.c.
+AC_DEFUN([gl_PREREQ_SETLOCALE],
+[
+  :
+])
diff --git a/gnulib/m4/size_max.m4 b/gnulib/m4/size_max.m4
new file mode 100644 (file)
index 0000000..e807098
--- /dev/null
@@ -0,0 +1,79 @@
+# size_max.m4 serial 10
+dnl Copyright (C) 2003, 2005-2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_SIZE_MAX],
+[
+  AC_CHECK_HEADERS([stdint.h])
+  dnl First test whether the system already has SIZE_MAX.
+  AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [
+    gl_cv_size_max=
+    AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], [gl_cv_size_max=yes])
+    if test -z "$gl_cv_size_max"; then
+      dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+      dnl than the type 'unsigned long'. Try hard to find a definition that can
+      dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
+      AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1],
+        [#include <stddef.h>
+#include <limits.h>], [size_t_bits_minus_1=])
+      AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)],
+        [#include <stddef.h>], [fits_in_uint=])
+      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+        if test $fits_in_uint = 1; then
+          dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+          dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+          AC_COMPILE_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[#include <stddef.h>
+                 extern size_t foo;
+                 extern unsigned long foo;
+               ]],
+               [[]])],
+            [fits_in_uint=0])
+        fi
+        dnl We cannot use 'expr' to simplify this expression, because 'expr'
+        dnl works only with 'long' integers in the host environment, while we
+        dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
+        if test $fits_in_uint = 1; then
+          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        else
+          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        fi
+      else
+        dnl Shouldn't happen, but who knows...
+        gl_cv_size_max='((size_t)~(size_t)0)'
+      fi
+    fi
+  ])
+  if test "$gl_cv_size_max" != yes; then
+    AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
+      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
+  fi
+  dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after
+  dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with
+  dnl #define by AC_DEFINE_UNQUOTED.
+  AH_VERBATIM([SIZE_MAX],
+[/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#ifndef SIZE_MAX
+# undef SIZE_MAX
+#endif])
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+  AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
diff --git a/gnulib/m4/sleep.m4 b/gnulib/m4/sleep.m4
new file mode 100644 (file)
index 0000000..4a251da
--- /dev/null
@@ -0,0 +1,54 @@
+# sleep.m4 serial 4
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SLEEP],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  dnl We expect to see the declaration of sleep() in a header file.
+  dnl Older versions of mingw have a sleep() function that is an alias to
+  dnl _sleep() in MSVCRT. It has a different signature than POSIX sleep():
+  dnl it takes the number of milliseconds as argument and returns void.
+  dnl mingw does not declare this function.
+  AC_CHECK_DECLS([sleep], , , [#include <unistd.h>])
+  AC_CHECK_FUNCS_ONCE([sleep])
+  if test $ac_cv_have_decl_sleep != yes; then
+    HAVE_SLEEP=0
+    AC_LIBOBJ([sleep])
+  else
+    dnl Cygwin 1.5.x has a bug where sleep can't exceed 49.7 days.
+    AC_CACHE_CHECK([for working sleep], [gl_cv_func_sleep_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+static void
+handle_alarm (int sig)
+{
+  if (sig != SIGALRM)
+    _exit (2);
+}
+]], [[
+    /* Failure to compile this test due to missing alarm is okay,
+       since all such platforms (mingw) also lack sleep.  */
+    unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
+    unsigned int remaining;
+    signal (SIGALRM, handle_alarm);
+    alarm (1);
+    remaining = sleep (pentecost);
+    if (remaining > pentecost)
+      return 3;
+    if (remaining <= pentecost - 10)
+      return 4;
+    return 0;
+    ]])],
+      [gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no],
+      [gl_cv_func_sleep_works="guessing no"])])
+    if test "$gl_cv_func_sleep_works" != yes; then
+      REPLACE_SLEEP=1
+      AC_LIBOBJ([sleep])
+    fi
+  fi
+])
diff --git a/gnulib/m4/snprintf.m4 b/gnulib/m4/snprintf.m4
new file mode 100644 (file)
index 0000000..8aa5dbe
--- /dev/null
@@ -0,0 +1,45 @@
+# snprintf.m4 serial 5
+dnl Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SNPRINTF],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  gl_cv_func_snprintf_usable=no
+  AC_CHECK_FUNCS([snprintf])
+  if test $ac_cv_func_snprintf = yes; then
+    gl_SNPRINTF_SIZE1
+    case "$gl_cv_func_snprintf_size1" in
+      *yes)
+        gl_SNPRINTF_RETVAL_C99
+        case "$gl_cv_func_snprintf_retval_c99" in
+          *yes)
+            gl_cv_func_snprintf_usable=yes
+            ;;
+        esac
+        ;;
+    esac
+  fi
+  if test $gl_cv_func_snprintf_usable = no; then
+    gl_REPLACE_SNPRINTF
+  fi
+  AC_CHECK_DECLS_ONCE([snprintf])
+  if test $ac_cv_have_decl_snprintf = no; then
+    HAVE_DECL_SNPRINTF=0
+  fi
+])
+
+AC_DEFUN([gl_REPLACE_SNPRINTF],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_LIBOBJ([snprintf])
+  if test $ac_cv_func_snprintf = yes; then
+    REPLACE_SNPRINTF=1
+  fi
+  gl_PREREQ_SNPRINTF
+])
+
+# Prerequisites of lib/snprintf.c.
+AC_DEFUN([gl_PREREQ_SNPRINTF], [:])
diff --git a/gnulib/m4/ssize_t.m4 b/gnulib/m4/ssize_t.m4
new file mode 100644 (file)
index 0000000..d712752
--- /dev/null
@@ -0,0 +1,23 @@
+# ssize_t.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2001-2003, 2006, 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether ssize_t is defined.
+
+AC_DEFUN([gt_TYPE_SSIZE_T],
+[
+  AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <sys/types.h>]],
+          [[int x = sizeof (ssize_t *) + sizeof (ssize_t);
+            return !x;]])],
+       [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
+  if test $gt_cv_ssize_t = no; then
+    AC_DEFINE([ssize_t], [int],
+              [Define as a signed type of the same size as size_t.])
+  fi
+])
diff --git a/gnulib/m4/st_dm_mode.m4 b/gnulib/m4/st_dm_mode.m4
new file mode 100644 (file)
index 0000000..84f7463
--- /dev/null
@@ -0,0 +1,23 @@
+# serial 6
+
+# Copyright (C) 1998-1999, 2001, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# Define HAVE_ST_DM_MODE if struct stat has an st_dm_mode member.
+
+AC_DEFUN([AC_STRUCT_ST_DM_MODE],
+ [AC_CACHE_CHECK([for st_dm_mode in struct stat], [ac_cv_struct_st_dm_mode],
+   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/stat.h>]], [[struct stat s; s.st_dm_mode;]])],
+     [ac_cv_struct_st_dm_mode=yes],
+     [ac_cv_struct_st_dm_mode=no])])
+
+  if test $ac_cv_struct_st_dm_mode = yes; then
+    AC_DEFINE([HAVE_ST_DM_MODE], [1],
+              [Define if struct stat has an st_dm_mode member. ])
+  fi
+ ]
+)
diff --git a/gnulib/m4/stat-time.m4 b/gnulib/m4/stat-time.m4
new file mode 100644 (file)
index 0000000..75ddbee
--- /dev/null
@@ -0,0 +1,85 @@
+# Checks for stat-related time functions.
+
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2011 Free Software
+# Foundation, Inc.
+
+# This file 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.
+
+dnl From Paul Eggert.
+
+# st_atim.tv_nsec - Linux, Solaris, Cygwin
+# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
+# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
+# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
+
+# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
+# st_birthtim - Cygwin 1.7.0+
+
+AC_DEFUN([gl_STAT_TIME],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_HEADERS_ONCE([sys/time.h])
+
+  AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
+    [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
+       [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec],
+       [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+          [[
+            #include <sys/types.h>
+            #include <sys/stat.h>
+            #if HAVE_SYS_TIME_H
+            # include <sys/time.h>
+            #endif
+            #include <time.h>
+            struct timespec ts;
+            struct stat st;
+          ]],
+          [[
+            st.st_atim = ts;
+          ]])],
+          [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes],
+          [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])])
+     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
+       AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1],
+         [Define to 1 if the type of the st_atim member of a struct stat is
+          struct timespec.])
+     fi],
+    [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [],
+       [AC_CHECK_MEMBERS([struct stat.st_atimensec], [],
+          [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [],
+             [#include <sys/types.h>
+              #include <sys/stat.h>])],
+          [#include <sys/types.h>
+           #include <sys/stat.h>])],
+       [#include <sys/types.h>
+        #include <sys/stat.h>])],
+    [#include <sys/types.h>
+     #include <sys/stat.h>])
+])
+
+# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.)
+# and NTFS (Cygwin).
+# There was a time when this field was named st_createtime (21 June
+# 2002 to 16 July 2002) But that window is very small and applied only
+# to development code, so systems still using that configuration are
+# not supported.  See revisions 1.10 and 1.11 of FreeBSD's
+# src/sys/ufs/ufs/dinode.h.
+#
+AC_DEFUN([gl_STAT_BIRTHTIME],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_HEADERS_ONCE([sys/time.h])
+  AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [],
+    [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [],
+      [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [],
+         [#include <sys/types.h>
+          #include <sys/stat.h>])],
+       [#include <sys/types.h>
+        #include <sys/stat.h>])],
+    [#include <sys/types.h>
+     #include <sys/stat.h>])
+])
diff --git a/gnulib/m4/stat.m4 b/gnulib/m4/stat.m4
new file mode 100644 (file)
index 0000000..27f82d5
--- /dev/null
@@ -0,0 +1,66 @@
+# serial 7
+
+# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+AC_DEFUN([gl_FUNC_STAT],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([lstat])
+  dnl mingw is the only known platform where stat(".") and stat("./") differ
+  AC_CACHE_CHECK([whether stat handles trailing slashes on directories],
+      [gl_cv_func_stat_dir_slash],
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+           [[#include <sys/stat.h>
+]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])],
+         [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no],
+         [case $host_os in
+            mingw*) gl_cv_func_stat_dir_slash="guessing no";;
+            *) gl_cv_func_stat_dir_slash="guessing yes";;
+          esac])])
+  dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/")
+  dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
+  AC_CACHE_CHECK([whether stat handles trailing slashes on files],
+      [gl_cv_func_stat_file_slash],
+      [touch conftest.tmp
+       # Assume that if we have lstat, we can also check symlinks.
+       if test $ac_cv_func_lstat = yes; then
+         ln -s conftest.tmp conftest.lnk
+       fi
+       AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+           [[#include <sys/stat.h>
+]], [[int result = 0;
+      struct stat st;
+      if (!stat ("conftest.tmp/", &st))
+        result |= 1;
+#if HAVE_LSTAT
+      if (!stat ("conftest.lnk/", &st))
+        result |= 2;
+#endif
+      return result;
+           ]])],
+         [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
+         [gl_cv_func_stat_file_slash="guessing no"])
+       rm -f conftest.tmp conftest.lnk])
+  case $gl_cv_func_stat_dir_slash in
+    *no) REPLACE_STAT=1
+      AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs
+        help when passed a directory name with a trailing slash]);;
+  esac
+  case $gl_cv_func_stat_file_slash in
+    *no) REPLACE_STAT=1
+      AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
+        help when passed a file name with a trailing slash]);;
+  esac
+  if test $REPLACE_STAT = 1; then
+    AC_LIBOBJ([stat])
+    dnl Prerequisites of lib/stat.c.
+    AC_REQUIRE([AC_C_INLINE])
+  fi
+])
diff --git a/gnulib/m4/stdarg.m4 b/gnulib/m4/stdarg.m4
new file mode 100644 (file)
index 0000000..a1ef178
--- /dev/null
@@ -0,0 +1,75 @@
+# stdarg.m4 serial 5
+dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Provide a working va_copy in combination with <stdarg.h>.
+
+AC_DEFUN([gl_STDARG_H],
+[
+  STDARG_H='';                AC_SUBST([STDARG_H])
+  NEXT_STDARG_H='<stdarg.h>'; AC_SUBST([NEXT_STDARG_H])
+  AC_MSG_CHECKING([for va_copy])
+  AC_CACHE_VAL([gl_cv_func_va_copy], [
+    AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#include <stdarg.h>]],
+         [[
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+         ]])],
+      [gl_cv_func_va_copy=yes],
+      [gl_cv_func_va_copy=no])])
+  AC_MSG_RESULT([$gl_cv_func_va_copy])
+  if test $gl_cv_func_va_copy = no; then
+    dnl Provide a substitute.
+    dnl Usually a simple definition in <config.h> is enough. Not so on AIX 5
+    dnl with some versions of the /usr/vac/bin/cc compiler. It has an <stdarg.h>
+    dnl which does '#undef va_copy', leading to a missing va_copy symbol. For
+    dnl this platform, we use an <stdarg.h> substitute. But we cannot use this
+    dnl approach on other platforms, because <stdarg.h> often defines only
+    dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do
+    dnl not work in this situation.
+    AC_EGREP_CPP([vaccine],
+      [#if defined _AIX && !defined __GNUC__
+        AIX vaccine
+       #endif
+      ], [gl_aixcc=yes], [gl_aixcc=no])
+    if test $gl_aixcc = yes; then
+      dnl Provide a substitute <stdarg.h> file.
+      STDARG_H=stdarg.h
+      gl_NEXT_HEADERS([stdarg.h])
+      dnl Fallback for the case when <stdarg.h> contains only macro definitions.
+      if test "$gl_cv_next_stdarg_h" = '""'; then
+        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
+        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
+      fi
+    else
+      dnl Provide a substitute in <config.h>, either __va_copy or as a simple
+      dnl assignment.
+      gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [
+        AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#include <stdarg.h>]],
+             [[
+#ifndef __va_copy
+error, bail out
+#endif
+             ]])],
+          [gl_cv_func___va_copy=yes],
+          [gl_cv_func___va_copy=no])])
+      if test $gl_cv_func___va_copy = yes; then
+        AC_DEFINE([va_copy], [__va_copy],
+          [Define as a macro for copying va_list variables.])
+      else
+        AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed.  */
+#define gl_va_copy(a,b) ((a) = (b))])
+        AC_DEFINE([va_copy], [gl_va_copy],
+          [Define as a macro for copying va_list variables.])
+      fi
+    fi
+  fi
+])
diff --git a/gnulib/m4/stdbool.m4 b/gnulib/m4/stdbool.m4
new file mode 100644 (file)
index 0000000..838cf0f
--- /dev/null
@@ -0,0 +1,99 @@
+# Check for stdbool.h that conforms to C99.
+
+dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+#serial 4
+
+# Prepare for substituting <stdbool.h> if it is not supported.
+
+AC_DEFUN([AM_STDBOOL_H],
+[
+  AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
+
+  # Define two additional variables used in the Makefile substitution.
+
+  if test "$ac_cv_header_stdbool_h" = yes; then
+    STDBOOL_H=''
+  else
+    STDBOOL_H='stdbool.h'
+  fi
+  AC_SUBST([STDBOOL_H])
+
+  if test "$ac_cv_type__Bool" = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
+  fi
+  AC_SUBST([HAVE__BOOL])
+])
+
+# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
+AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
+
+# This version of the macro is needed in autoconf <= 2.68.
+
+AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
+  [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
+     [ac_cv_header_stdbool_h],
+     [AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[
+             #include <stdbool.h>
+             #ifndef bool
+              "error: bool is not defined"
+             #endif
+             #ifndef false
+              "error: false is not defined"
+             #endif
+             #if false
+              "error: false is not 0"
+             #endif
+             #ifndef true
+              "error: true is not defined"
+             #endif
+             #if true != 1
+              "error: true is not 1"
+             #endif
+             #ifndef __bool_true_false_are_defined
+              "error: __bool_true_false_are_defined is not defined"
+             #endif
+
+             struct s { _Bool s: 1; _Bool t; } s;
+
+             char a[true == 1 ? 1 : -1];
+             char b[false == 0 ? 1 : -1];
+             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+             char d[(bool) 0.5 == true ? 1 : -1];
+             /* See body of main program for 'e'.  */
+             char f[(_Bool) 0.0 == false ? 1 : -1];
+             char g[true];
+             char h[sizeof (_Bool)];
+             char i[sizeof s.t];
+             enum { j = false, k = true, l = false * true, m = true * 256 };
+             /* The following fails for
+                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+             _Bool n[m];
+             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+             /* Catch a bug in an HP-UX C compiler.  See
+                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+              */
+             _Bool q = true;
+             _Bool *pq = &q;
+           ]],
+           [[
+             bool e = &s;
+             *pq |= q;
+             *pq |= ! q;
+             /* Refer to every declared value, to avoid compiler optimizations.  */
+             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+                     + !m + !n + !o + !p + !q + !pq);
+           ]])],
+        [ac_cv_header_stdbool_h=yes],
+        [ac_cv_header_stdbool_h=no])])
+   AC_CHECK_TYPES([_Bool])
+])
diff --git a/gnulib/m4/stddef_h.m4 b/gnulib/m4/stddef_h.m4
new file mode 100644 (file)
index 0000000..1942b6a
--- /dev/null
@@ -0,0 +1,45 @@
+dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
+# stddef_h.m4 serial 3
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDDEF_H],
+[
+  AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
+  AC_REQUIRE([gt_TYPE_WCHAR_T])
+  if test $gt_cv_c_wchar_t = no; then
+    HAVE_WCHAR_T=0
+    STDDEF_H=stddef.h
+  fi
+  AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
+    [gl_cv_decl_null_works],
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
+      int test[2 * (sizeof NULL == sizeof (void *)) -1];
+]])],
+      [gl_cv_decl_null_works=yes],
+      [gl_cv_decl_null_works=no])])
+  if test $gl_cv_decl_null_works = no; then
+    REPLACE_NULL=1
+    STDDEF_H=stddef.h
+  fi
+  if test -n "$STDDEF_H"; then
+    gl_NEXT_HEADERS([stddef.h])
+  fi
+])
+
+AC_DEFUN([gl_STDDEF_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_STDDEF_H_DEFAULTS],
+[
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  REPLACE_NULL=0;                AC_SUBST([REPLACE_NULL])
+  HAVE_WCHAR_T=1;                AC_SUBST([HAVE_WCHAR_T])
+  STDDEF_H='';                   AC_SUBST([STDDEF_H])
+])
diff --git a/gnulib/m4/stdint.m4 b/gnulib/m4/stdint.m4
new file mode 100644 (file)
index 0000000..e7d0d07
--- /dev/null
@@ -0,0 +1,479 @@
+# stdint.m4 serial 39
+dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert and Bruno Haible.
+dnl Test whether <stdint.h> is supported or must be substituted.
+
+AC_DEFUN([gl_STDINT_H],
+[
+  AC_PREREQ([2.59])dnl
+
+  dnl Check for long long int and unsigned long long int.
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+  if test $ac_cv_type_long_long_int = yes; then
+    HAVE_LONG_LONG_INT=1
+  else
+    HAVE_LONG_LONG_INT=0
+  fi
+  AC_SUBST([HAVE_LONG_LONG_INT])
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    HAVE_UNSIGNED_LONG_LONG_INT=1
+  else
+    HAVE_UNSIGNED_LONG_LONG_INT=0
+  fi
+  AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
+
+  dnl Check for <wchar.h>, in the same way as gl_WCHAR_H does.
+  AC_CHECK_HEADERS_ONCE([wchar.h])
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
+  AC_SUBST([HAVE_WCHAR_H])
+
+  dnl Check for <inttypes.h>.
+  dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
+  if test $ac_cv_header_inttypes_h = yes; then
+    HAVE_INTTYPES_H=1
+  else
+    HAVE_INTTYPES_H=0
+  fi
+  AC_SUBST([HAVE_INTTYPES_H])
+
+  dnl Check for <sys/types.h>.
+  dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h.
+  if test $ac_cv_header_sys_types_h = yes; then
+    HAVE_SYS_TYPES_H=1
+  else
+    HAVE_SYS_TYPES_H=0
+  fi
+  AC_SUBST([HAVE_SYS_TYPES_H])
+
+  gl_CHECK_NEXT_HEADERS([stdint.h])
+  if test $ac_cv_header_stdint_h = yes; then
+    HAVE_STDINT_H=1
+  else
+    HAVE_STDINT_H=0
+  fi
+  AC_SUBST([HAVE_STDINT_H])
+
+  dnl Now see whether we need a substitute <stdint.h>.
+  if test $ac_cv_header_stdint_h = yes; then
+    AC_CACHE_CHECK([whether stdint.h conforms to C99],
+      [gl_cv_header_working_stdint_h],
+      [gl_cv_header_working_stdint_h=no
+       AC_COMPILE_IFELSE([
+         AC_LANG_PROGRAM([[
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+]
+gl_STDINT_INCLUDES
+[
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t) \
+  ((t) ((t) 0 < (t) -1 \
+        ? (t) -1 \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+struct s {
+  int check_PTRDIFF:
+      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+      ? 1 : -1;
+  /* Detect bug in FreeBSD 6.0 / ia64.  */
+  int check_SIG_ATOMIC:
+      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+      ? 1 : -1;
+  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+  int check_WCHAR:
+      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+      ? 1 : -1;
+  /* Detect bug in mingw.  */
+  int check_WINT:
+      WINT_MIN == TYPE_MINIMUM (wint_t)
+      && WINT_MAX == TYPE_MAXIMUM (wint_t)
+      ? 1 : -1;
+
+  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
+  int check_UINT8_C:
+        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+  int check_UINT16_C:
+        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
+#ifdef UINT8_MAX
+  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+         ]])],
+         [dnl Determine whether the various *_MIN, *_MAX macros are usable
+          dnl in preprocessor expression. We could do it by compiling a test
+          dnl program for each of these macros. It is faster to run a program
+          dnl that inspects the macro expansion.
+          dnl This detects a bug on HP-UX 11.23/ia64.
+          AC_RUN_IFELSE([
+            AC_LANG_PROGRAM([[
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+]
+gl_STDINT_INCLUDES
+[
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+  {
+#ifdef INT8_MAX
+    MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+    MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+    MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+    MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+    MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+    MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+    MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+    MVAL (UINT64_MAX),
+#endif
+    NULL
+  };
+]], [[
+  const char **mv;
+  for (mv = macro_values; *mv != NULL; mv++)
+    {
+      const char *value = *mv;
+      /* Test whether it looks like a cast expression.  */
+      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+          || strncmp (value, "((int)"/*)*/, 6) == 0
+          || strncmp (value, "((signed short)"/*)*/, 15) == 0
+          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+        return mv - macro_values + 1;
+    }
+  return 0;
+]])],
+              [gl_cv_header_working_stdint_h=yes],
+              [],
+              [dnl When cross-compiling, assume it works.
+               gl_cv_header_working_stdint_h=yes
+              ])
+         ])
+      ])
+  fi
+  if test "$gl_cv_header_working_stdint_h" = yes; then
+    STDINT_H=
+  else
+    dnl Check for <sys/inttypes.h>, and for
+    dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
+    AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
+    if test $ac_cv_header_sys_inttypes_h = yes; then
+      HAVE_SYS_INTTYPES_H=1
+    else
+      HAVE_SYS_INTTYPES_H=0
+    fi
+    AC_SUBST([HAVE_SYS_INTTYPES_H])
+    if test $ac_cv_header_sys_bitypes_h = yes; then
+      HAVE_SYS_BITYPES_H=1
+    else
+      HAVE_SYS_BITYPES_H=0
+    fi
+    AC_SUBST([HAVE_SYS_BITYPES_H])
+
+    gl_STDINT_TYPE_PROPERTIES
+    STDINT_H=stdint.h
+  fi
+  AC_SUBST([STDINT_H])
+])
+
+dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
+dnl Determine the size of each of the given types in bits.
+AC_DEFUN([gl_STDINT_BITSIZEOF],
+[
+  dnl Use a shell loop, to avoid bloating configure, and
+  dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+  dnl   config.h.in,
+  dnl - extra AC_SUBST calls, so that the right substitutions are made.
+  m4_foreach_w([gltype], [$1],
+    [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+       [Define to the number of bits in type ']gltype['.])])
+  for gltype in $1 ; do
+    AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}],
+      [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT],
+         [$2
+#include <limits.h>], [result=unknown])
+       eval gl_cv_bitsizeof_${gltype}=\$result
+      ])
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+      dnl Use a nonempty default, because some compilers, such as IRIX 5 cc,
+      dnl do a syntax check even on unused #if conditions and give an error
+      dnl on valid C code like this:
+      dnl   #if 0
+      dnl   # if  > 32
+      dnl   # endif
+      dnl   #endif
+      result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result])
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
+  m4_foreach_w([gltype], [$1],
+    [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+])
+
+dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES)
+dnl Determine the signedness of each of the given types.
+dnl Define HAVE_SIGNED_TYPE if type is signed.
+AC_DEFUN([gl_CHECK_TYPES_SIGNED],
+[
+  dnl Use a shell loop, to avoid bloating configure, and
+  dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+  dnl   config.h.in,
+  dnl - extra AC_SUBST calls, so that the right substitutions are made.
+  m4_foreach_w([gltype], [$1],
+    [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+       [Define to 1 if ']gltype[' is a signed integer type.])])
+  for gltype in $1 ; do
+    AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM([$2[
+            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])],
+         result=yes, result=no)
+       eval gl_cv_type_${gltype}_signed=\$result
+      ])
+    eval result=\$gl_cv_type_${gltype}_signed
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    if test "$result" = yes; then
+      AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1])
+      eval HAVE_SIGNED_${GLTYPE}=1
+    else
+      eval HAVE_SIGNED_${GLTYPE}=0
+    fi
+  done
+  m4_foreach_w([gltype], [$1],
+    [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+])
+
+dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES)
+dnl Determine the suffix to use for integer constants of the given types.
+dnl Define t_SUFFIX for each such type.
+AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
+[
+  dnl Use a shell loop, to avoid bloating configure, and
+  dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+  dnl   config.h.in,
+  dnl - extra AC_SUBST calls, so that the right substitutions are made.
+  m4_foreach_w([gltype], [$1],
+    [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
+       [Define to l, ll, u, ul, ull, etc., as suitable for
+        constants of type ']gltype['.])])
+  for gltype in $1 ; do
+    AC_CACHE_CHECK([for $gltype integer literal suffix],
+      [gl_cv_type_${gltype}_suffix],
+      [eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
+         esac
+         AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM([$2[
+              extern $gltype foo;
+              extern $gltype1 foo;]])],
+           [eval gl_cv_type_${gltype}_suffix=\$glsuf])
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done])
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result])
+  done
+  m4_foreach_w([gltype], [$1],
+    [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
+])
+
+dnl gl_STDINT_INCLUDES
+AC_DEFUN([gl_STDINT_INCLUDES],
+[[
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+]])
+
+dnl gl_STDINT_TYPE_PROPERTIES
+dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t
+dnl of interest to stdint.in.h.
+AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
+[
+  AC_REQUIRE([gl_MULTIARCH])
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+    gl_STDINT_BITSIZEOF([ptrdiff_t size_t],
+      [gl_STDINT_INCLUDES])
+  fi
+  gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t],
+    [gl_STDINT_INCLUDES])
+  gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t],
+    [gl_STDINT_INCLUDES])
+  gl_cv_type_ptrdiff_t_signed=yes
+  gl_cv_type_size_t_signed=no
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+    gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t],
+      [gl_STDINT_INCLUDES])
+  fi
+  gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t],
+    [gl_STDINT_INCLUDES])
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+  AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
+
+# Hey Emacs!
+# Local Variables:
+# indent-tabs-mode: nil
+# End:
diff --git a/gnulib/m4/stdint_h.m4 b/gnulib/m4/stdint_h.m4
new file mode 100644 (file)
index 0000000..356b14e
--- /dev/null
@@ -0,0 +1,27 @@
+# stdint_h.m4 serial 9
+dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_STDINT_H],
+[
+  AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <sys/types.h>
+            #include <stdint.h>]],
+          [[uintmax_t i = (uintmax_t) -1; return !i;]])],
+       [gl_cv_header_stdint_h=yes],
+       [gl_cv_header_stdint_h=no])])
+  if test $gl_cv_header_stdint_h = yes; then
+    AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
+      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff --git a/gnulib/m4/stdio-safer.m4 b/gnulib/m4/stdio-safer.m4
new file mode 100644 (file)
index 0000000..0cf08c2
--- /dev/null
@@ -0,0 +1,25 @@
+#serial 12
+dnl Copyright (C) 2002, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FOPEN_SAFER],
+[
+  AC_LIBOBJ([fopen-safer])
+])
+
+AC_DEFUN([gl_FREOPEN_SAFER],
+[
+  AC_LIBOBJ([freopen-safer])
+])
+
+AC_DEFUN([gl_POPEN_SAFER],
+[
+  AC_LIBOBJ([popen-safer])
+])
+
+AC_DEFUN([gl_TMPFILE_SAFER],
+[
+  AC_LIBOBJ([tmpfile-safer])
+])
diff --git a/gnulib/m4/stdio_h.m4 b/gnulib/m4/stdio_h.m4
new file mode 100644 (file)
index 0000000..7f3ae56
--- /dev/null
@@ -0,0 +1,140 @@
+# stdio_h.m4 serial 33
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDIO_H],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_REQUIRE([AC_C_INLINE])
+  gl_NEXT_HEADERS([stdio.h])
+  dnl No need to create extra modules for these functions. Everyone who uses
+  dnl <stdio.h> likely needs them.
+  GNULIB_FPRINTF=1
+  GNULIB_PRINTF=1
+  GNULIB_VFPRINTF=1
+  GNULIB_VPRINTF=1
+  GNULIB_FPUTC=1
+  GNULIB_PUTC=1
+  GNULIB_PUTCHAR=1
+  GNULIB_FPUTS=1
+  GNULIB_PUTS=1
+  GNULIB_FWRITE=1
+  dnl This ifdef is just an optimization, to avoid performing a configure
+  dnl check whose result is not used. It does not make the test of
+  dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant.
+  m4_ifdef([gl_SIGNAL_SIGPIPE], [
+    gl_SIGNAL_SIGPIPE
+    if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+      REPLACE_STDIO_WRITE_FUNCS=1
+      AC_LIBOBJ([stdio-write])
+    fi
+  ])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use, and which is not
+  dnl guaranteed by C89.
+  gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
+    ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
+    snprintf tmpfile vdprintf vsnprintf])
+])
+
+AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_STDIO_H_DEFAULTS],
+[
+  GNULIB_DPRINTF=0;              AC_SUBST([GNULIB_DPRINTF])
+  GNULIB_FCLOSE=0;               AC_SUBST([GNULIB_FCLOSE])
+  GNULIB_FFLUSH=0;               AC_SUBST([GNULIB_FFLUSH])
+  GNULIB_FOPEN=0;                AC_SUBST([GNULIB_FOPEN])
+  GNULIB_FPRINTF=0;              AC_SUBST([GNULIB_FPRINTF])
+  GNULIB_FPRINTF_POSIX=0;        AC_SUBST([GNULIB_FPRINTF_POSIX])
+  GNULIB_FPURGE=0;               AC_SUBST([GNULIB_FPURGE])
+  GNULIB_FPUTC=0;                AC_SUBST([GNULIB_FPUTC])
+  GNULIB_FPUTS=0;                AC_SUBST([GNULIB_FPUTS])
+  GNULIB_FREOPEN=0;              AC_SUBST([GNULIB_FREOPEN])
+  GNULIB_FSEEK=0;                AC_SUBST([GNULIB_FSEEK])
+  GNULIB_FSEEKO=0;               AC_SUBST([GNULIB_FSEEKO])
+  GNULIB_FTELL=0;                AC_SUBST([GNULIB_FTELL])
+  GNULIB_FTELLO=0;               AC_SUBST([GNULIB_FTELLO])
+  GNULIB_FWRITE=0;               AC_SUBST([GNULIB_FWRITE])
+  GNULIB_GETDELIM=0;             AC_SUBST([GNULIB_GETDELIM])
+  GNULIB_GETLINE=0;              AC_SUBST([GNULIB_GETLINE])
+  GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
+  GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+  GNULIB_PERROR=0;               AC_SUBST([GNULIB_PERROR])
+  GNULIB_POPEN=0;                AC_SUBST([GNULIB_POPEN])
+  GNULIB_PRINTF=0;               AC_SUBST([GNULIB_PRINTF])
+  GNULIB_PRINTF_POSIX=0;         AC_SUBST([GNULIB_PRINTF_POSIX])
+  GNULIB_PUTC=0;                 AC_SUBST([GNULIB_PUTC])
+  GNULIB_PUTCHAR=0;              AC_SUBST([GNULIB_PUTCHAR])
+  GNULIB_PUTS=0;                 AC_SUBST([GNULIB_PUTS])
+  GNULIB_REMOVE=0;               AC_SUBST([GNULIB_REMOVE])
+  GNULIB_RENAME=0;               AC_SUBST([GNULIB_RENAME])
+  GNULIB_RENAMEAT=0;             AC_SUBST([GNULIB_RENAMEAT])
+  GNULIB_SNPRINTF=0;             AC_SUBST([GNULIB_SNPRINTF])
+  GNULIB_SPRINTF_POSIX=0;        AC_SUBST([GNULIB_SPRINTF_POSIX])
+  GNULIB_STDIO_H_SIGPIPE=0;      AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
+  GNULIB_TMPFILE=0;              AC_SUBST([GNULIB_TMPFILE])
+  GNULIB_VASPRINTF=0;            AC_SUBST([GNULIB_VASPRINTF])
+  GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])
+  GNULIB_VFPRINTF=0;             AC_SUBST([GNULIB_VFPRINTF])
+  GNULIB_VFPRINTF_POSIX=0;       AC_SUBST([GNULIB_VFPRINTF_POSIX])
+  GNULIB_VPRINTF=0;              AC_SUBST([GNULIB_VPRINTF])
+  GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
+  GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
+  GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_FPURGE=1;            AC_SUBST([HAVE_DECL_FPURGE])
+  HAVE_DECL_FSEEKO=1;            AC_SUBST([HAVE_DECL_FSEEKO])
+  HAVE_DECL_FTELLO=1;            AC_SUBST([HAVE_DECL_FTELLO])
+  HAVE_DECL_GETDELIM=1;          AC_SUBST([HAVE_DECL_GETDELIM])
+  HAVE_DECL_GETLINE=1;           AC_SUBST([HAVE_DECL_GETLINE])
+  HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
+  HAVE_DECL_SNPRINTF=1;          AC_SUBST([HAVE_DECL_SNPRINTF])
+  HAVE_DECL_VSNPRINTF=1;         AC_SUBST([HAVE_DECL_VSNPRINTF])
+  HAVE_DPRINTF=1;                AC_SUBST([HAVE_DPRINTF])
+  HAVE_FSEEKO=1;                 AC_SUBST([HAVE_FSEEKO])
+  HAVE_FTELLO=1;                 AC_SUBST([HAVE_FTELLO])
+  HAVE_RENAMEAT=1;               AC_SUBST([HAVE_RENAMEAT])
+  HAVE_VASPRINTF=1;              AC_SUBST([HAVE_VASPRINTF])
+  HAVE_VDPRINTF=1;               AC_SUBST([HAVE_VDPRINTF])
+  REPLACE_DPRINTF=0;             AC_SUBST([REPLACE_DPRINTF])
+  REPLACE_FCLOSE=0;              AC_SUBST([REPLACE_FCLOSE])
+  REPLACE_FFLUSH=0;              AC_SUBST([REPLACE_FFLUSH])
+  REPLACE_FOPEN=0;               AC_SUBST([REPLACE_FOPEN])
+  REPLACE_FPRINTF=0;             AC_SUBST([REPLACE_FPRINTF])
+  REPLACE_FPURGE=0;              AC_SUBST([REPLACE_FPURGE])
+  REPLACE_FREOPEN=0;             AC_SUBST([REPLACE_FREOPEN])
+  REPLACE_FSEEK=0;               AC_SUBST([REPLACE_FSEEK])
+  REPLACE_FSEEKO=0;              AC_SUBST([REPLACE_FSEEKO])
+  REPLACE_FTELL=0;               AC_SUBST([REPLACE_FTELL])
+  REPLACE_FTELLO=0;              AC_SUBST([REPLACE_FTELLO])
+  REPLACE_GETDELIM=0;            AC_SUBST([REPLACE_GETDELIM])
+  REPLACE_GETLINE=0;             AC_SUBST([REPLACE_GETLINE])
+  REPLACE_OBSTACK_PRINTF=0;      AC_SUBST([REPLACE_OBSTACK_PRINTF])
+  REPLACE_PERROR=0;              AC_SUBST([REPLACE_PERROR])
+  REPLACE_POPEN=0;               AC_SUBST([REPLACE_POPEN])
+  REPLACE_PRINTF=0;              AC_SUBST([REPLACE_PRINTF])
+  REPLACE_REMOVE=0;              AC_SUBST([REPLACE_REMOVE])
+  REPLACE_RENAME=0;              AC_SUBST([REPLACE_RENAME])
+  REPLACE_RENAMEAT=0;            AC_SUBST([REPLACE_RENAMEAT])
+  REPLACE_SNPRINTF=0;            AC_SUBST([REPLACE_SNPRINTF])
+  REPLACE_SPRINTF=0;             AC_SUBST([REPLACE_SPRINTF])
+  REPLACE_STDIO_WRITE_FUNCS=0;   AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
+  REPLACE_TMPFILE=0;             AC_SUBST([REPLACE_TMPFILE])
+  REPLACE_VASPRINTF=0;           AC_SUBST([REPLACE_VASPRINTF])
+  REPLACE_VDPRINTF=0;            AC_SUBST([REPLACE_VDPRINTF])
+  REPLACE_VFPRINTF=0;            AC_SUBST([REPLACE_VFPRINTF])
+  REPLACE_VPRINTF=0;             AC_SUBST([REPLACE_VPRINTF])
+  REPLACE_VSNPRINTF=0;           AC_SUBST([REPLACE_VSNPRINTF])
+  REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])
+])
diff --git a/gnulib/m4/stdlib_h.m4 b/gnulib/m4/stdlib_h.m4
new file mode 100644 (file)
index 0000000..25fdada
--- /dev/null
@@ -0,0 +1,105 @@
+# stdlib_h.m4 serial 37
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDLIB_H],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  gl_NEXT_HEADERS([stdlib.h])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use, and which is not
+  dnl guaranteed by C89.
+  gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
+#if HAVE_SYS_LOADAVG_H
+# include <sys/loadavg.h>
+#endif
+#if HAVE_RANDOM_H
+# include <random.h>
+#endif
+    ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp
+    mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r
+    setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt
+    unsetenv])
+])
+
+AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_STDLIB_H_DEFAULTS],
+[
+  GNULIB__EXIT=0;         AC_SUBST([GNULIB__EXIT])
+  GNULIB_ATOLL=0;         AC_SUBST([GNULIB_ATOLL])
+  GNULIB_CALLOC_POSIX=0;  AC_SUBST([GNULIB_CALLOC_POSIX])
+  GNULIB_CANONICALIZE_FILE_NAME=0;  AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
+  GNULIB_GETLOADAVG=0;    AC_SUBST([GNULIB_GETLOADAVG])
+  GNULIB_GETSUBOPT=0;     AC_SUBST([GNULIB_GETSUBOPT])
+  GNULIB_GRANTPT=0;       AC_SUBST([GNULIB_GRANTPT])
+  GNULIB_MALLOC_POSIX=0;  AC_SUBST([GNULIB_MALLOC_POSIX])
+  GNULIB_MBTOWC=0;        AC_SUBST([GNULIB_MBTOWC])
+  GNULIB_MKDTEMP=0;       AC_SUBST([GNULIB_MKDTEMP])
+  GNULIB_MKOSTEMP=0;      AC_SUBST([GNULIB_MKOSTEMP])
+  GNULIB_MKOSTEMPS=0;     AC_SUBST([GNULIB_MKOSTEMPS])
+  GNULIB_MKSTEMP=0;       AC_SUBST([GNULIB_MKSTEMP])
+  GNULIB_MKSTEMPS=0;      AC_SUBST([GNULIB_MKSTEMPS])
+  GNULIB_PTSNAME=0;       AC_SUBST([GNULIB_PTSNAME])
+  GNULIB_PUTENV=0;        AC_SUBST([GNULIB_PUTENV])
+  GNULIB_RANDOM_R=0;      AC_SUBST([GNULIB_RANDOM_R])
+  GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
+  GNULIB_REALPATH=0;      AC_SUBST([GNULIB_REALPATH])
+  GNULIB_RPMATCH=0;       AC_SUBST([GNULIB_RPMATCH])
+  GNULIB_SETENV=0;        AC_SUBST([GNULIB_SETENV])
+  GNULIB_STRTOD=0;        AC_SUBST([GNULIB_STRTOD])
+  GNULIB_STRTOLL=0;       AC_SUBST([GNULIB_STRTOLL])
+  GNULIB_STRTOULL=0;      AC_SUBST([GNULIB_STRTOULL])
+  GNULIB_SYSTEM_POSIX=0;  AC_SUBST([GNULIB_SYSTEM_POSIX])
+  GNULIB_UNLOCKPT=0;      AC_SUBST([GNULIB_UNLOCKPT])
+  GNULIB_UNSETENV=0;      AC_SUBST([GNULIB_UNSETENV])
+  GNULIB_WCTOMB=0;        AC_SUBST([GNULIB_WCTOMB])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE__EXIT=1;              AC_SUBST([HAVE__EXIT])
+  HAVE_ATOLL=1;              AC_SUBST([HAVE_ATOLL])
+  HAVE_CANONICALIZE_FILE_NAME=1;  AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
+  HAVE_DECL_GETLOADAVG=1;    AC_SUBST([HAVE_DECL_GETLOADAVG])
+  HAVE_GETSUBOPT=1;          AC_SUBST([HAVE_GETSUBOPT])
+  HAVE_GRANTPT=1;            AC_SUBST([HAVE_GRANTPT])
+  HAVE_MKDTEMP=1;            AC_SUBST([HAVE_MKDTEMP])
+  HAVE_MKOSTEMP=1;           AC_SUBST([HAVE_MKOSTEMP])
+  HAVE_MKOSTEMPS=1;          AC_SUBST([HAVE_MKOSTEMPS])
+  HAVE_MKSTEMP=1;            AC_SUBST([HAVE_MKSTEMP])
+  HAVE_MKSTEMPS=1;           AC_SUBST([HAVE_MKSTEMPS])
+  HAVE_PTSNAME=1;            AC_SUBST([HAVE_PTSNAME])
+  HAVE_RANDOM_H=1;           AC_SUBST([HAVE_RANDOM_H])
+  HAVE_RANDOM_R=1;           AC_SUBST([HAVE_RANDOM_R])
+  HAVE_REALPATH=1;           AC_SUBST([HAVE_REALPATH])
+  HAVE_RPMATCH=1;            AC_SUBST([HAVE_RPMATCH])
+  HAVE_SETENV=1;             AC_SUBST([HAVE_SETENV])
+  HAVE_DECL_SETENV=1;        AC_SUBST([HAVE_DECL_SETENV])
+  HAVE_STRTOD=1;             AC_SUBST([HAVE_STRTOD])
+  HAVE_STRTOLL=1;            AC_SUBST([HAVE_STRTOLL])
+  HAVE_STRTOULL=1;           AC_SUBST([HAVE_STRTOULL])
+  HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
+  HAVE_SYS_LOADAVG_H=0;      AC_SUBST([HAVE_SYS_LOADAVG_H])
+  HAVE_UNLOCKPT=1;           AC_SUBST([HAVE_UNLOCKPT])
+  HAVE_DECL_UNSETENV=1;      AC_SUBST([HAVE_DECL_UNSETENV])
+  REPLACE_CALLOC=0;          AC_SUBST([REPLACE_CALLOC])
+  REPLACE_CANONICALIZE_FILE_NAME=0;  AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
+  REPLACE_MALLOC=0;          AC_SUBST([REPLACE_MALLOC])
+  REPLACE_MBTOWC=0;          AC_SUBST([REPLACE_MBTOWC])
+  REPLACE_MKSTEMP=0;         AC_SUBST([REPLACE_MKSTEMP])
+  REPLACE_PUTENV=0;          AC_SUBST([REPLACE_PUTENV])
+  REPLACE_REALLOC=0;         AC_SUBST([REPLACE_REALLOC])
+  REPLACE_REALPATH=0;        AC_SUBST([REPLACE_REALPATH])
+  REPLACE_SETENV=0;          AC_SUBST([REPLACE_SETENV])
+  REPLACE_STRTOD=0;          AC_SUBST([REPLACE_STRTOD])
+  REPLACE_UNSETENV=0;        AC_SUBST([REPLACE_UNSETENV])
+  REPLACE_WCTOMB=0;          AC_SUBST([REPLACE_WCTOMB])
+])
diff --git a/gnulib/m4/stpcpy.m4 b/gnulib/m4/stpcpy.m4
new file mode 100644 (file)
index 0000000..c321d49
--- /dev/null
@@ -0,0 +1,26 @@
+# stpcpy.m4 serial 7
+dnl Copyright (C) 2002, 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STPCPY],
+[
+  dnl Persuade glibc <string.h> to declare stpcpy().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'.
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REPLACE_FUNCS([stpcpy])
+  if test $ac_cv_func_stpcpy = no; then
+    HAVE_STPCPY=0
+    gl_PREREQ_STPCPY
+  fi
+])
+
+# Prerequisites of lib/stpcpy.c.
+AC_DEFUN([gl_PREREQ_STPCPY], [
+  :
+])
diff --git a/gnulib/m4/strcase.m4 b/gnulib/m4/strcase.m4
new file mode 100644 (file)
index 0000000..1c553ff
--- /dev/null
@@ -0,0 +1,44 @@
+# strcase.m4 serial 10
+dnl Copyright (C) 2002, 2005-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STRCASE],
+[
+  gl_FUNC_STRCASECMP
+  gl_FUNC_STRNCASECMP
+])
+
+AC_DEFUN([gl_FUNC_STRCASECMP],
+[
+  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  AC_REPLACE_FUNCS([strcasecmp])
+  if test $ac_cv_func_strcasecmp = no; then
+    HAVE_STRCASECMP=0
+    gl_PREREQ_STRCASECMP
+  fi
+])
+
+AC_DEFUN([gl_FUNC_STRNCASECMP],
+[
+  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  AC_REPLACE_FUNCS([strncasecmp])
+  if test $ac_cv_func_strncasecmp = no; then
+    gl_PREREQ_STRNCASECMP
+  fi
+  AC_CHECK_DECLS([strncasecmp])
+  if test $ac_cv_have_decl_strncasecmp = no; then
+    HAVE_DECL_STRNCASECMP=0
+  fi
+])
+
+# Prerequisites of lib/strcasecmp.c.
+AC_DEFUN([gl_PREREQ_STRCASECMP], [
+  :
+])
+
+# Prerequisites of lib/strncasecmp.c.
+AC_DEFUN([gl_PREREQ_STRNCASECMP], [
+  :
+])
diff --git a/gnulib/m4/strcasestr.m4 b/gnulib/m4/strcasestr.m4
new file mode 100644 (file)
index 0000000..2ab7cf7
--- /dev/null
@@ -0,0 +1,143 @@
+# strcasestr.m4 serial 19
+dnl Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Check that strcasestr is present and works.
+AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+
+  dnl Persuade glibc <string.h> to declare strcasestr().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gl_FUNC_MEMCHR])
+  AC_CHECK_FUNCS([strcasestr])
+  if test $ac_cv_func_strcasestr = no; then
+    HAVE_STRCASESTR=0
+  else
+    if test "$gl_cv_func_memchr_works" != yes; then
+      REPLACE_STRCASESTR=1
+    else
+      dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092.
+      AC_CACHE_CHECK([whether strcasestr works],
+        [gl_cv_func_strcasestr_works_always],
+        [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <string.h> /* for strcasestr */
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
+]], [[return !!strcasestr (HAYSTACK, NEEDLE);
+      ]])],
+          [gl_cv_func_strcasestr_works_always=yes],
+          [gl_cv_func_strcasestr_works_always=no],
+          [dnl glibc 2.12 and cygwin 1.7.7 have a known bug.  uClibc is not
+           dnl affected, since it uses different source code for strcasestr
+           dnl than glibc.
+           dnl Assume that it works on all other platforms, even if it is not
+           dnl linear.
+           AC_EGREP_CPP([Lucky user],
+             [
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+             ],
+             [gl_cv_func_strcasestr_works_always=yes],
+             [gl_cv_func_strcasestr_works_always="guessing no"])
+          ])
+        ])
+      if test "$gl_cv_func_strcasestr_works_always" != yes; then
+        REPLACE_STRCASESTR=1
+        AC_LIBOBJ([strcasestr])
+      fi
+    fi
+  fi
+  if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
+    AC_LIBOBJ([strcasestr])
+    gl_PREREQ_STRCASESTR
+  fi
+]) # gl_FUNC_STRCASESTR_SIMPLE
+
+dnl Additionally, check that strcasestr is efficient.
+AC_DEFUN([gl_FUNC_STRCASESTR],
+[
+  AC_REQUIRE([gl_FUNC_STRCASESTR_SIMPLE])
+  if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then
+    AC_CACHE_CHECK([whether strcasestr works in linear time],
+      [gl_cv_func_strcasestr_linear],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h> /* for signal */
+#include <string.h> /* for strcasestr */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+static void quit (int sig) { exit (sig + 128); }
+]], [[
+    int result = 0;
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    /* Failure to compile this test due to missing alarm is okay,
+       since all such platforms (mingw) also lack strcasestr.  */
+    signal (SIGALRM, quit);
+    alarm (5);
+    /* Check for quadratic performance.  */
+    if (haystack && needle)
+      {
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = 0;
+        memset (needle, 'A', m);
+        needle[m] = 'B';
+        needle[m + 1] = 0;
+        if (!strcasestr (haystack, needle))
+          result |= 1;
+      }
+    return result;
+    ]])],
+        [gl_cv_func_strcasestr_linear=yes], [gl_cv_func_strcasestr_linear=no],
+        [dnl Only glibc > 2.12 and cygwin > 1.7.7 are known to have a
+         dnl strcasestr that works in linear time.
+         AC_EGREP_CPP([Lucky user],
+           [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     && !defined __UCLIBC__
+  Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#endif
+           ],
+           [gl_cv_func_strcasestr_linear=yes],
+           [gl_cv_func_strcasestr_linear="guessing no"])
+        ])
+      ])
+    if test "$gl_cv_func_strcasestr_linear" != yes; then
+      REPLACE_STRCASESTR=1
+      AC_LIBOBJ([strcasestr])
+      gl_PREREQ_STRCASESTR
+    fi
+  fi
+]) # gl_FUNC_STRCASESTR
+
+# Prerequisites of lib/strcasestr.c.
+AC_DEFUN([gl_PREREQ_STRCASESTR], [
+  :
+])
diff --git a/gnulib/m4/strdup.m4 b/gnulib/m4/strdup.m4
new file mode 100644 (file)
index 0000000..3fb36dd
--- /dev/null
@@ -0,0 +1,45 @@
+# strdup.m4 serial 12
+
+dnl Copyright (C) 2002-2011 Free Software Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRDUP],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([strdup])
+  if test $ac_cv_func_strdup != yes; then
+    AC_LIBOBJ([strdup])
+    gl_PREREQ_STRDUP
+  fi
+  AC_CHECK_DECLS_ONCE([strdup])
+  if test $ac_cv_have_decl_strdup = no; then
+    HAVE_DECL_STRDUP=0
+  fi
+])
+
+AC_DEFUN([gl_FUNC_STRDUP_POSIX],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+  AC_CHECK_FUNCS_ONCE([strdup])
+  if test $ac_cv_func_strdup = yes; then
+    if test $gl_cv_func_malloc_posix != yes; then
+      REPLACE_STRDUP=1
+      AC_LIBOBJ([strdup])
+      gl_PREREQ_STRDUP
+    fi
+  else
+    AC_LIBOBJ([strdup])
+    gl_PREREQ_STRDUP
+  fi
+  AC_CHECK_DECLS_ONCE([strdup])
+  if test $ac_cv_have_decl_strdup = no; then
+    HAVE_DECL_STRDUP=0
+  fi
+])
+
+# Prerequisites of lib/strdup.c.
+AC_DEFUN([gl_PREREQ_STRDUP], [:])
diff --git a/gnulib/m4/strerror.m4 b/gnulib/m4/strerror.m4
new file mode 100644 (file)
index 0000000..73d1d54
--- /dev/null
@@ -0,0 +1,68 @@
+# strerror.m4 serial 9
+dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRERROR],
+[
+  AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
+  if test $REPLACE_STRERROR = 1; then
+    AC_LIBOBJ([strerror])
+    AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
+      [Define this to 1 if strerror is broken.])
+  fi
+])
+
+# Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_HEADER_ERRNO_H])
+  if test -z "$ERRNO_H"; then
+    AC_CACHE_CHECK([for working strerror function],
+     [gl_cv_func_working_strerror],
+     [AC_RUN_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <string.h>
+           ]],
+           [[return !*strerror (-2);]])],
+        [gl_cv_func_working_strerror=yes],
+        [gl_cv_func_working_strerror=no],
+        [dnl Assume crossbuild works if it compiles.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <string.h>
+              ]],
+              [[return !*strerror (-2);]])],
+           [gl_cv_func_working_strerror=yes],
+           [gl_cv_func_working_strerror=no])
+      ])
+    ])
+    if test $gl_cv_func_working_strerror = no; then
+      dnl The system's strerror() fails to return a string for out-of-range
+      dnl integers. Replace it.
+      REPLACE_STRERROR=1
+    fi
+  else
+    dnl The system's strerror() cannot know about the new errno values we add
+    dnl to <errno.h>. Replace it.
+    REPLACE_STRERROR=1
+  fi
+  if test $REPLACE_STRERROR = 1; then
+    gl_PREREQ_STRERROR
+  fi
+])
+
+# Prerequisites of lib/strerror.c.
+AC_DEFUN([gl_PREREQ_STRERROR], [
+  AC_CHECK_DECLS([strerror])
+  AC_CHECK_HEADERS_ONCE([sys/socket.h])
+  if test $ac_cv_header_sys_socket_h != yes; then
+    dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+    dnl the check for those headers unconditional; yet cygwin reports
+    dnl that the headers are present but cannot be compiled (since on
+    dnl cygwin, all socket information should come from sys/socket.h).
+    AC_CHECK_HEADERS([winsock2.h])
+  fi
+])
diff --git a/gnulib/m4/strftime.m4 b/gnulib/m4/strftime.m4
new file mode 100644 (file)
index 0000000..d9de341
--- /dev/null
@@ -0,0 +1,30 @@
+# serial 32
+
+# Copyright (C) 1996-1997, 1999-2007, 2009-2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# Written by Jim Meyering and Paul Eggert.
+
+AC_DEFUN([gl_FUNC_GNU_STRFTIME],
+[
+  gl_FUNC_STRFTIME
+])
+
+# These are the prerequisite macros for GNU's strftime.c replacement.
+AC_DEFUN([gl_FUNC_STRFTIME],
+[
+ AC_LIBOBJ([strftime])
+
+ # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
+ AC_REQUIRE([AC_STRUCT_TIMEZONE])
+
+ AC_REQUIRE([gl_TM_GMTOFF])
+
+ AC_CHECK_FUNCS_ONCE([tzset])
+
+ AC_DEFINE([my_strftime], [nstrftime],
+   [Define to the name of the strftime replacement function.])
+])
diff --git a/gnulib/m4/string_h.m4 b/gnulib/m4/string_h.m4
new file mode 100644 (file)
index 0000000..30ddfbc
--- /dev/null
@@ -0,0 +1,115 @@
+# Configure a GNU-like replacement for <string.h>.
+
+# Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# serial 19
+
+# Written by Paul Eggert.
+
+AC_DEFUN([gl_HEADER_STRING_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_STRING_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_STRING_H_BODY],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  gl_NEXT_HEADERS([string.h])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use, and which is not
+  dnl guaranteed by C89.
+  gl_WARN_ON_USE_PREPARE([[#include <string.h>
+    ]],
+    [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
+     strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r
+     strsignal strverscmp])
+])
+
+AC_DEFUN([gl_STRING_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
+[
+  GNULIB_MEMCHR=0;      AC_SUBST([GNULIB_MEMCHR])
+  GNULIB_MEMMEM=0;      AC_SUBST([GNULIB_MEMMEM])
+  GNULIB_MEMPCPY=0;     AC_SUBST([GNULIB_MEMPCPY])
+  GNULIB_MEMRCHR=0;     AC_SUBST([GNULIB_MEMRCHR])
+  GNULIB_RAWMEMCHR=0;   AC_SUBST([GNULIB_RAWMEMCHR])
+  GNULIB_STPCPY=0;      AC_SUBST([GNULIB_STPCPY])
+  GNULIB_STPNCPY=0;     AC_SUBST([GNULIB_STPNCPY])
+  GNULIB_STRCHRNUL=0;   AC_SUBST([GNULIB_STRCHRNUL])
+  GNULIB_STRDUP=0;      AC_SUBST([GNULIB_STRDUP])
+  GNULIB_STRNCAT=0;     AC_SUBST([GNULIB_STRNCAT])
+  GNULIB_STRNDUP=0;     AC_SUBST([GNULIB_STRNDUP])
+  GNULIB_STRNLEN=0;     AC_SUBST([GNULIB_STRNLEN])
+  GNULIB_STRPBRK=0;     AC_SUBST([GNULIB_STRPBRK])
+  GNULIB_STRSEP=0;      AC_SUBST([GNULIB_STRSEP])
+  GNULIB_STRSTR=0;      AC_SUBST([GNULIB_STRSTR])
+  GNULIB_STRCASESTR=0;  AC_SUBST([GNULIB_STRCASESTR])
+  GNULIB_STRTOK_R=0;    AC_SUBST([GNULIB_STRTOK_R])
+  GNULIB_MBSLEN=0;      AC_SUBST([GNULIB_MBSLEN])
+  GNULIB_MBSNLEN=0;     AC_SUBST([GNULIB_MBSNLEN])
+  GNULIB_MBSCHR=0;      AC_SUBST([GNULIB_MBSCHR])
+  GNULIB_MBSRCHR=0;     AC_SUBST([GNULIB_MBSRCHR])
+  GNULIB_MBSSTR=0;      AC_SUBST([GNULIB_MBSSTR])
+  GNULIB_MBSCASECMP=0;  AC_SUBST([GNULIB_MBSCASECMP])
+  GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
+  GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
+  GNULIB_MBSCASESTR=0;  AC_SUBST([GNULIB_MBSCASESTR])
+  GNULIB_MBSCSPN=0;     AC_SUBST([GNULIB_MBSCSPN])
+  GNULIB_MBSPBRK=0;     AC_SUBST([GNULIB_MBSPBRK])
+  GNULIB_MBSSPN=0;      AC_SUBST([GNULIB_MBSSPN])
+  GNULIB_MBSSEP=0;      AC_SUBST([GNULIB_MBSSEP])
+  GNULIB_MBSTOK_R=0;    AC_SUBST([GNULIB_MBSTOK_R])
+  GNULIB_STRERROR=0;    AC_SUBST([GNULIB_STRERROR])
+  GNULIB_STRERROR_R=0;  AC_SUBST([GNULIB_STRERROR_R])
+  GNULIB_STRSIGNAL=0;   AC_SUBST([GNULIB_STRSIGNAL])
+  GNULIB_STRVERSCMP=0;  AC_SUBST([GNULIB_STRVERSCMP])
+  HAVE_MBSLEN=0;        AC_SUBST([HAVE_MBSLEN])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_MEMCHR=1;                AC_SUBST([HAVE_MEMCHR])
+  HAVE_DECL_MEMMEM=1;           AC_SUBST([HAVE_DECL_MEMMEM])
+  HAVE_MEMPCPY=1;               AC_SUBST([HAVE_MEMPCPY])
+  HAVE_DECL_MEMRCHR=1;          AC_SUBST([HAVE_DECL_MEMRCHR])
+  HAVE_RAWMEMCHR=1;             AC_SUBST([HAVE_RAWMEMCHR])
+  HAVE_STPCPY=1;                AC_SUBST([HAVE_STPCPY])
+  HAVE_STPNCPY=1;               AC_SUBST([HAVE_STPNCPY])
+  HAVE_STRCHRNUL=1;             AC_SUBST([HAVE_STRCHRNUL])
+  HAVE_DECL_STRDUP=1;           AC_SUBST([HAVE_DECL_STRDUP])
+  HAVE_DECL_STRNDUP=1;          AC_SUBST([HAVE_DECL_STRNDUP])
+  HAVE_DECL_STRNLEN=1;          AC_SUBST([HAVE_DECL_STRNLEN])
+  HAVE_STRPBRK=1;               AC_SUBST([HAVE_STRPBRK])
+  HAVE_STRSEP=1;                AC_SUBST([HAVE_STRSEP])
+  HAVE_STRCASESTR=1;            AC_SUBST([HAVE_STRCASESTR])
+  HAVE_DECL_STRTOK_R=1;         AC_SUBST([HAVE_DECL_STRTOK_R])
+  HAVE_DECL_STRERROR_R=1;       AC_SUBST([HAVE_DECL_STRERROR_R])
+  HAVE_DECL_STRSIGNAL=1;        AC_SUBST([HAVE_DECL_STRSIGNAL])
+  HAVE_STRVERSCMP=1;            AC_SUBST([HAVE_STRVERSCMP])
+  REPLACE_MEMCHR=0;             AC_SUBST([REPLACE_MEMCHR])
+  REPLACE_MEMMEM=0;             AC_SUBST([REPLACE_MEMMEM])
+  REPLACE_STPNCPY=0;            AC_SUBST([REPLACE_STPNCPY])
+  REPLACE_STRDUP=0;             AC_SUBST([REPLACE_STRDUP])
+  REPLACE_STRSTR=0;             AC_SUBST([REPLACE_STRSTR])
+  REPLACE_STRCASESTR=0;         AC_SUBST([REPLACE_STRCASESTR])
+  REPLACE_STRERROR=0;           AC_SUBST([REPLACE_STRERROR])
+  REPLACE_STRERROR_R=0;         AC_SUBST([REPLACE_STRERROR_R])
+  REPLACE_STRNCAT=0;            AC_SUBST([REPLACE_STRNCAT])
+  REPLACE_STRNDUP=0;            AC_SUBST([REPLACE_STRNDUP])
+  REPLACE_STRNLEN=0;            AC_SUBST([REPLACE_STRNLEN])
+  REPLACE_STRSIGNAL=0;          AC_SUBST([REPLACE_STRSIGNAL])
+  REPLACE_STRTOK_R=0;           AC_SUBST([REPLACE_STRTOK_R])
+  UNDEFINE_STRTOK_R=0;          AC_SUBST([UNDEFINE_STRTOK_R])
+])
diff --git a/gnulib/m4/strings_h.m4 b/gnulib/m4/strings_h.m4
new file mode 100644 (file)
index 0000000..71d284b
--- /dev/null
@@ -0,0 +1,39 @@
+# Configure a replacement for <string.h>.
+# serial 3
+
+# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+AC_DEFUN([gl_HEADER_STRINGS_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_STRINGS_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
+[
+  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  gl_CHECK_NEXT_HEADERS([strings.h])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <strings.h>
+    ]], [strcasecmp strncasecmp])
+])
+
+AC_DEFUN([gl_STRINGS_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS],
+[
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_STRCASECMP=1;       AC_SUBST([HAVE_STRCASECMP])
+  HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
+])
diff --git a/gnulib/m4/strndup.m4 b/gnulib/m4/strndup.m4
new file mode 100644 (file)
index 0000000..d8f00ca
--- /dev/null
@@ -0,0 +1,53 @@
+# strndup.m4 serial 18
+dnl Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRNDUP],
+[
+  dnl Persuade glibc <string.h> to declare strndup().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_CHECK_DECLS_ONCE([strndup])
+  AC_CHECK_FUNCS_ONCE([strndup])
+  if test $ac_cv_have_decl_strndup = no; then
+    HAVE_DECL_STRNDUP=0
+  fi
+
+  if test $ac_cv_func_strndup = yes; then
+    # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
+    AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works],
+      [AC_RUN_IFELSE([
+         AC_LANG_PROGRAM([[#include <string.h>
+                           #include <stdlib.h>]], [[
+#ifndef HAVE_DECL_STRNDUP
+  extern char *strndup (const char *, size_t);
+#endif
+  char *s;
+  s = strndup ("some longer string", 15);
+  free (s);
+  s = strndup ("shorter string", 13);
+  return s[13] != '\0';]])],
+         [gl_cv_func_strndup_works=yes],
+         [gl_cv_func_strndup_works=no],
+         [
+changequote(,)dnl
+          case $host_os in
+            aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
+            *)               gl_cv_func_strndup_works="guessing yes";;
+          esac
+changequote([,])dnl
+         ])])
+    case $gl_cv_func_strndup_works in
+      *no)
+        REPLACE_STRNDUP=1
+        AC_LIBOBJ([strndup])
+        ;;
+    esac
+  else
+    AC_LIBOBJ([strndup])
+  fi
+])
diff --git a/gnulib/m4/strnlen.m4 b/gnulib/m4/strnlen.m4
new file mode 100644 (file)
index 0000000..a1c59ac
--- /dev/null
@@ -0,0 +1,32 @@
+# strnlen.m4 serial 12
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRNLEN],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+
+  dnl Persuade glibc <string.h> to declare strnlen().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_CHECK_DECLS_ONCE([strnlen])
+  if test $ac_cv_have_decl_strnlen = no; then
+    HAVE_DECL_STRNLEN=0
+  else
+    AC_FUNC_STRNLEN
+    dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]).
+    if test $ac_cv_func_strnlen_working = no; then
+      REPLACE_STRNLEN=1
+    fi
+  fi
+  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
+    AC_LIBOBJ([strnlen])
+    gl_PREREQ_STRNLEN
+  fi
+])
+
+# Prerequisites of lib/strnlen.c.
+AC_DEFUN([gl_PREREQ_STRNLEN], [:])
diff --git a/gnulib/m4/strstr.m4 b/gnulib/m4/strstr.m4
new file mode 100644 (file)
index 0000000..a42a1db
--- /dev/null
@@ -0,0 +1,127 @@
+# strstr.m4 serial 13
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Check that strstr works.
+AC_DEFUN([gl_FUNC_STRSTR_SIMPLE],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_MEMCHR])
+  if test "$gl_cv_func_memchr_works" != yes; then
+    REPLACE_STRSTR=1
+    AC_LIBOBJ([strstr])
+  else
+    dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092.
+    AC_CACHE_CHECK([whether strstr works],
+      [gl_cv_func_strstr_works_always],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <string.h> /* for strstr */
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
+]], [[return !!strstr (HAYSTACK, NEEDLE);
+    ]])],
+        [gl_cv_func_strstr_works_always=yes],
+        [gl_cv_func_strstr_works_always=no],
+        [dnl glibc 2.12 and cygwin 1.7.7 have a known bug.  uClibc is not
+         dnl affected, since it uses different source code for strstr than
+         dnl glibc.
+         dnl Assume that it works on all other platforms, even if it is not
+         dnl linear.
+         AC_EGREP_CPP([Lucky user],
+           [
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+           ],
+           [gl_cv_func_strstr_works_always=yes],
+           [gl_cv_func_strstr_works_always="guessing no"])
+        ])
+      ])
+    if test "$gl_cv_func_strstr_works_always" != yes; then
+      REPLACE_STRSTR=1
+      AC_LIBOBJ([strstr])
+    fi
+  fi
+]) # gl_FUNC_STRSTR_SIMPLE
+
+dnl Additionally, check that strstr is efficient.
+AC_DEFUN([gl_FUNC_STRSTR],
+[
+  AC_REQUIRE([gl_FUNC_STRSTR_SIMPLE])
+  if test $REPLACE_STRSTR = 0; then
+    AC_CACHE_CHECK([whether strstr works in linear time],
+      [gl_cv_func_strstr_linear],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h> /* for signal */
+#include <string.h> /* for strstr */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+static void quit (int sig) { exit (sig + 128); }
+]], [[
+    int result = 0;
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    /* Failure to compile this test due to missing alarm is okay,
+       since all such platforms (mingw) also have quadratic strstr.  */
+    signal (SIGALRM, quit);
+    alarm (5);
+    /* Check for quadratic performance.  */
+    if (haystack && needle)
+      {
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = 0;
+        memset (needle, 'A', m);
+        needle[m] = 'B';
+        needle[m + 1] = 0;
+        if (!strstr (haystack, needle))
+          result |= 1;
+      }
+    return result;
+    ]])],
+        [gl_cv_func_strstr_linear=yes], [gl_cv_func_strstr_linear=no],
+        [dnl Only glibc > 2.12 and cygwin > 1.7.7 are known to have a
+         dnl bug-free strstr that works in linear time.
+         AC_EGREP_CPP([Lucky user],
+           [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     && !defined __UCLIBC__
+  Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#endif
+           ],
+           [gl_cv_func_strstr_linear=yes],
+           [gl_cv_func_strstr_linear="guessing no"])
+        ])
+      ])
+    if test "$gl_cv_func_strstr_linear" != yes; then
+      REPLACE_STRSTR=1
+    fi
+  fi
+  if test $REPLACE_STRSTR = 1; then
+    AC_LIBOBJ([strstr])
+  fi
+]) # gl_FUNC_STRSTR
diff --git a/gnulib/m4/strtoimax.m4 b/gnulib/m4/strtoimax.m4
new file mode 100644 (file)
index 0000000..e82e7cd
--- /dev/null
@@ -0,0 +1,30 @@
+# strtoimax.m4 serial 8
+dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOIMAX],
+[
+  AC_CACHE_CHECK([whether <inttypes.h> defines strtoimax as a macro],
+    gl_cv_func_strtoimax_macro,
+    [AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include <inttypes.h>
+#ifdef strtoimax
+ inttypes_h_defines_strtoimax
+#endif],
+       gl_cv_func_strtoimax_macro=yes,
+       gl_cv_func_strtoimax_macro=no)])
+
+  if test "$gl_cv_func_strtoimax_macro" != yes; then
+    AC_REPLACE_FUNCS([strtoimax])
+    if test $ac_cv_func_strtoimax = no; then
+      gl_PREREQ_STRTOIMAX
+    fi
+  fi
+])
+
+# Prerequisites of lib/strtoimax.c.
+AC_DEFUN([gl_PREREQ_STRTOIMAX], [
+  AC_CHECK_DECLS([strtoll])
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+])
diff --git a/gnulib/m4/strtol.m4 b/gnulib/m4/strtol.m4
new file mode 100644 (file)
index 0000000..10f0284
--- /dev/null
@@ -0,0 +1,10 @@
+# strtol.m4 serial 5
+dnl Copyright (C) 2002-2003, 2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOL],
+[
+  AC_REPLACE_FUNCS([strtol])
+])
diff --git a/gnulib/m4/strtoll.m4 b/gnulib/m4/strtoll.m4
new file mode 100644 (file)
index 0000000..fd0a13d
--- /dev/null
@@ -0,0 +1,25 @@
+# strtoll.m4 serial 6
+dnl Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOLL],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  dnl We don't need (and can't compile) the replacement strtoll
+  dnl unless the type 'long long int' exists.
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+  if test "$ac_cv_type_long_long_int" = yes; then
+    AC_REPLACE_FUNCS([strtoll])
+    if test $ac_cv_func_strtoll = no; then
+      HAVE_STRTOLL=0
+      gl_PREREQ_STRTOLL
+    fi
+  fi
+])
+
+# Prerequisites of lib/strtoll.c.
+AC_DEFUN([gl_PREREQ_STRTOLL], [
+  :
+])
diff --git a/gnulib/m4/strtoul.m4 b/gnulib/m4/strtoul.m4
new file mode 100644 (file)
index 0000000..06979d1
--- /dev/null
@@ -0,0 +1,10 @@
+# strtoul.m4 serial 4
+dnl Copyright (C) 2002, 2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOUL],
+[
+  AC_REPLACE_FUNCS([strtoul])
+])
diff --git a/gnulib/m4/strtoull.m4 b/gnulib/m4/strtoull.m4
new file mode 100644 (file)
index 0000000..abf607f
--- /dev/null
@@ -0,0 +1,25 @@
+# strtoull.m4 serial 6
+dnl Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOULL],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  dnl We don't need (and can't compile) the replacement strtoull
+  dnl unless the type 'unsigned long long int' exists.
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+  if test "$ac_cv_type_unsigned_long_long_int" = yes; then
+    AC_REPLACE_FUNCS([strtoull])
+    if test $ac_cv_func_strtoull = no; then
+      HAVE_STRTOULL=0
+      gl_PREREQ_STRTOULL
+    fi
+  fi
+])
+
+# Prerequisites of lib/strtoull.c.
+AC_DEFUN([gl_PREREQ_STRTOULL], [
+  :
+])
diff --git a/gnulib/m4/strtoumax.m4 b/gnulib/m4/strtoumax.m4
new file mode 100644 (file)
index 0000000..448c4d9
--- /dev/null
@@ -0,0 +1,30 @@
+# strtoumax.m4 serial 8
+dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOUMAX],
+[
+  AC_CACHE_CHECK([whether <inttypes.h> defines strtoumax as a macro],
+    gl_cv_func_strtoumax_macro,
+    [AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include <inttypes.h>
+#ifdef strtoumax
+ inttypes_h_defines_strtoumax
+#endif],
+       gl_cv_func_strtoumax_macro=yes,
+       gl_cv_func_strtoumax_macro=no)])
+
+  if test "$gl_cv_func_strtoumax_macro" != yes; then
+    AC_REPLACE_FUNCS([strtoumax])
+    if test $ac_cv_func_strtoumax = no; then
+      gl_PREREQ_STRTOUMAX
+    fi
+  fi
+])
+
+# Prerequisites of lib/strtoumax.c.
+AC_DEFUN([gl_PREREQ_STRTOUMAX], [
+  AC_CHECK_DECLS([strtoull])
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+])
diff --git a/gnulib/m4/symlink.m4 b/gnulib/m4/symlink.m4
new file mode 100644 (file)
index 0000000..917d5f0
--- /dev/null
@@ -0,0 +1,45 @@
+# serial 4
+# See if we need to provide symlink replacement.
+
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Eric Blake.
+
+AC_DEFUN([gl_FUNC_SYMLINK],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([symlink])
+  dnl The best we can do on mingw is provide a dummy that always fails, so
+  dnl that compilation can proceed with fewer ifdefs.  On FreeBSD 7.2, AIX 7.1,
+  dnl and Solaris 9, we want to fix a bug with trailing slash handling.
+  if test $ac_cv_func_symlink = no; then
+    HAVE_SYMLINK=0
+    AC_LIBOBJ([symlink])
+  else
+    AC_CACHE_CHECK([whether symlink handles trailing slash correctly],
+      [gl_cv_func_symlink_works],
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+           [[#include <unistd.h>
+           ]],
+           [[int result = 0;
+             if (!symlink ("a", "conftest.link/"))
+               result |= 1;
+             if (symlink ("conftest.f", "conftest.lnk2"))
+               result |= 2;
+             else if (!symlink ("a", "conftest.lnk2/"))
+               result |= 4;
+             return result;
+           ]])],
+         [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no],
+         [gl_cv_func_symlink_works="guessing no"])
+      rm -f conftest.f conftest.link conftest.lnk2])
+    if test "$gl_cv_func_symlink_works" != yes; then
+      REPLACE_SYMLINK=1
+      AC_LIBOBJ([symlink])
+    fi
+  fi
+])
diff --git a/gnulib/m4/symlinkat.m4 b/gnulib/m4/symlinkat.m4
new file mode 100644 (file)
index 0000000..4839568
--- /dev/null
@@ -0,0 +1,21 @@
+# serial 4
+# See if we need to provide symlinkat replacement.
+
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Eric Blake.
+
+AC_DEFUN([gl_FUNC_SYMLINKAT],
+[
+  AC_REQUIRE([gl_FUNC_OPENAT])
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_FUNCS_ONCE([symlinkat])
+  if test $ac_cv_func_symlinkat = no; then
+    HAVE_SYMLINKAT=0
+    AC_LIBOBJ([symlinkat])
+  fi
+])
diff --git a/gnulib/m4/sys_stat_h.m4 b/gnulib/m4/sys_stat_h.m4
new file mode 100644 (file)
index 0000000..fc41912
--- /dev/null
@@ -0,0 +1,82 @@
+# sys_stat_h.m4 serial 24   -*- Autoconf -*-
+dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Eric Blake.
+dnl Provide a GNU-like <sys/stat.h>.
+
+AC_DEFUN([gl_HEADER_SYS_STAT_H],
+[
+  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
+  dnl For the mkdir substitute.
+  AC_REQUIRE([AC_C_INLINE])
+
+  dnl Check for broken stat macros.
+  AC_REQUIRE([AC_HEADER_STAT])
+
+  gl_CHECK_NEXT_HEADERS([sys/stat.h])
+
+  dnl Define types that are supposed to be defined in <sys/types.h> or
+  dnl <sys/stat.h>.
+  AC_CHECK_TYPE([nlink_t], [],
+    [AC_DEFINE([nlink_t], [int],
+       [Define to the type of st_nlink in struct stat, or a supertype.])],
+    [#include <sys/types.h>
+     #include <sys/stat.h>])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
+    ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
+    mknod mknodat stat utimensat])
+]) # gl_HEADER_SYS_STAT_H
+
+AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
+  GNULIB_FCHMODAT=0;    AC_SUBST([GNULIB_FCHMODAT])
+  GNULIB_FSTATAT=0;     AC_SUBST([GNULIB_FSTATAT])
+  GNULIB_FUTIMENS=0;    AC_SUBST([GNULIB_FUTIMENS])
+  GNULIB_LCHMOD=0;      AC_SUBST([GNULIB_LCHMOD])
+  GNULIB_LSTAT=0;       AC_SUBST([GNULIB_LSTAT])
+  GNULIB_MKDIRAT=0;     AC_SUBST([GNULIB_MKDIRAT])
+  GNULIB_MKFIFO=0;      AC_SUBST([GNULIB_MKFIFO])
+  GNULIB_MKFIFOAT=0;    AC_SUBST([GNULIB_MKFIFOAT])
+  GNULIB_MKNOD=0;       AC_SUBST([GNULIB_MKNOD])
+  GNULIB_MKNODAT=0;     AC_SUBST([GNULIB_MKNODAT])
+  GNULIB_STAT=0;        AC_SUBST([GNULIB_STAT])
+  GNULIB_UTIMENSAT=0;   AC_SUBST([GNULIB_UTIMENSAT])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_FCHMODAT=1;      AC_SUBST([HAVE_FCHMODAT])
+  HAVE_FSTATAT=1;       AC_SUBST([HAVE_FSTATAT])
+  HAVE_FUTIMENS=1;      AC_SUBST([HAVE_FUTIMENS])
+  HAVE_LCHMOD=1;        AC_SUBST([HAVE_LCHMOD])
+  HAVE_LSTAT=1;         AC_SUBST([HAVE_LSTAT])
+  HAVE_MKDIRAT=1;       AC_SUBST([HAVE_MKDIRAT])
+  HAVE_MKFIFO=1;        AC_SUBST([HAVE_MKFIFO])
+  HAVE_MKFIFOAT=1;      AC_SUBST([HAVE_MKFIFOAT])
+  HAVE_MKNOD=1;         AC_SUBST([HAVE_MKNOD])
+  HAVE_MKNODAT=1;       AC_SUBST([HAVE_MKNODAT])
+  HAVE_UTIMENSAT=1;     AC_SUBST([HAVE_UTIMENSAT])
+  REPLACE_FSTAT=0;      AC_SUBST([REPLACE_FSTAT])
+  REPLACE_FSTATAT=0;    AC_SUBST([REPLACE_FSTATAT])
+  REPLACE_FUTIMENS=0;   AC_SUBST([REPLACE_FUTIMENS])
+  REPLACE_LSTAT=0;      AC_SUBST([REPLACE_LSTAT])
+  REPLACE_MKDIR=0;      AC_SUBST([REPLACE_MKDIR])
+  REPLACE_MKFIFO=0;     AC_SUBST([REPLACE_MKFIFO])
+  REPLACE_MKNOD=0;      AC_SUBST([REPLACE_MKNOD])
+  REPLACE_STAT=0;       AC_SUBST([REPLACE_STAT])
+  REPLACE_UTIMENSAT=0;  AC_SUBST([REPLACE_UTIMENSAT])
+])
diff --git a/gnulib/m4/sys_time_h.m4 b/gnulib/m4/sys_time_h.m4
new file mode 100644 (file)
index 0000000..3a3adc8
--- /dev/null
@@ -0,0 +1,72 @@
+# Configure a replacement for <sys/time.h>.
+# serial 6
+
+# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+# Written by Paul Eggert and Martin Lambers.
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H],
+[
+  dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
+  dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
+  dnl statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+  AC_CHECK_HEADERS_ONCE([sys/time.h])
+  gl_CHECK_NEXT_HEADERS([sys/time.h])
+
+  if test $ac_cv_header_sys_time_h != yes; then
+    HAVE_SYS_TIME_H=0
+  fi
+
+  AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#if HAVE_SYS_TIME_H
+             #include <sys/time.h>
+            #endif
+            #include <time.h>
+          ]],
+          [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
+       [gl_cv_sys_struct_timeval=yes],
+       [gl_cv_sys_struct_timeval=no])])
+  if test $gl_cv_sys_struct_timeval != yes; then
+    HAVE_STRUCT_TIMEVAL=0
+  fi
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+    ]], [gettimeofday])
+])
+
+AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
+[
+  GNULIB_GETTIMEOFDAY=0;     AC_SUBST([GNULIB_GETTIMEOFDAY])
+  dnl Assume POSIX behavior unless another module says otherwise.
+  HAVE_GETTIMEOFDAY=1;       AC_SUBST([HAVE_GETTIMEOFDAY])
+  HAVE_STRUCT_TIMEVAL=1;     AC_SUBST([HAVE_STRUCT_TIMEVAL])
+  HAVE_SYS_TIME_H=1;         AC_SUBST([HAVE_SYS_TIME_H])
+  REPLACE_GETTIMEOFDAY=0;    AC_SUBST([REPLACE_GETTIMEOFDAY])
+])
diff --git a/gnulib/m4/sys_wait_h.m4 b/gnulib/m4/sys_wait_h.m4
new file mode 100644 (file)
index 0000000..e3b147c
--- /dev/null
@@ -0,0 +1,33 @@
+# sys_wait_h.m4 serial 5
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SYS_WAIT_H],
+[
+  AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
+
+  dnl <sys/wait.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_CHECK_NEXT_HEADERS([sys/wait.h])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <sys/wait.h>]],
+    [waitpid])
+])
+
+AC_DEFUN([gl_SYS_WAIT_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_WAIT_H_DEFAULTS],
+[
+  GNULIB_WAITPID=0; AC_SUBST([GNULIB_WAITPID])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+])
diff --git a/gnulib/m4/thread.m4 b/gnulib/m4/thread.m4
new file mode 100644 (file)
index 0000000..49a4bc7
--- /dev/null
@@ -0,0 +1,18 @@
+# thread.m4 serial 2
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_THREAD],
+[
+  AC_REQUIRE([gl_THREADLIB])
+  AC_REQUIRE([AC_C_INLINE])
+
+  if test $gl_threads_api = posix; then
+    gl_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIBMULTITHREAD"
+    AC_CHECK_FUNCS([pthread_atfork])
+    LIBS="$gl_save_LIBS"
+  fi
+])
diff --git a/gnulib/m4/threadlib.m4 b/gnulib/m4/threadlib.m4
new file mode 100644 (file)
index 0000000..8a621fd
--- /dev/null
@@ -0,0 +1,369 @@
+# threadlib.m4 serial 8 (gettext-0.18.2)
+dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl gl_THREADLIB
+dnl ------------
+dnl Tests for a multithreading library to be used.
+dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
+dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
+dnl default is 'no', otherwise it is system dependent. In both cases, the user
+dnl can change the choice through the options --enable-threads=choice or
+dnl --disable-threads.
+dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
+dnl USE_PTH_THREADS, USE_WIN32_THREADS
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+
+AC_DEFUN([gl_THREADLIB_EARLY],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+])
+
+dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_EARLY_BODY],
+[
+  dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+  dnl influences the result of the autoconf tests that test for *_unlocked
+  dnl declarations, on AIX 5 at least. Therefore it must come early.
+  AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+  AC_BEFORE([$0], [gl_ARGP])dnl
+
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
+  dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+  dnl AC_GNU_SOURCE.
+  m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+    [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+    [AC_REQUIRE([AC_GNU_SOURCE])])
+  dnl Check for multithreading.
+  m4_ifdef([gl_THREADLIB_DEFAULT_NO],
+    [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
+    [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
+  AC_ARG_ENABLE([threads],
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
+    [gl_use_threads=$enableval],
+    [if test -n "$gl_use_threads_default"; then
+       gl_use_threads="$gl_use_threads_default"
+     else
+changequote(,)dnl
+       case "$host_os" in
+         dnl Disable multithreading by default on OSF/1, because it interferes
+         dnl with fork()/exec(): When msgexec is linked with -lpthread, its
+         dnl child process gets an endless segmentation fault inside execvp().
+         dnl Disable multithreading by default on Cygwin 1.5.x, because it has
+         dnl bugs that lead to endless loops or crashes. See
+         dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
+         osf*) gl_use_threads=no ;;
+         cygwin*)
+               case `uname -r` in
+                 1.[0-5].*) gl_use_threads=no ;;
+                 *)         gl_use_threads=yes ;;
+               esac
+               ;;
+         *)    gl_use_threads=yes ;;
+       esac
+changequote([,])dnl
+     fi
+    ])
+  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+    # For using <pthread.h>:
+    case "$host_os" in
+      osf*)
+        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+        # groks <pthread.h>. cc also understands the flag -pthread, but
+        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+        # 2. putting a flag into CPPFLAGS that has an effect on the linker
+        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
+        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+        ;;
+    esac
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in <errno.h>.
+    case "$host_os" in
+      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+    esac
+  fi
+])
+
+dnl The guts of gl_THREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_BODY],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+  gl_threads_api=none
+  LIBTHREAD=
+  LTLIBTHREAD=
+  LIBMULTITHREAD=
+  LTLIBMULTITHREAD=
+  if test "$gl_use_threads" != no; then
+    dnl Check whether the compiler and linker support weak declarations.
+    AC_CACHE_CHECK([whether imported symbols can be declared weak],
+      [gl_cv_have_weak],
+      [gl_cv_have_weak=no
+       dnl First, test whether the compiler accepts it syntactically.
+       AC_LINK_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[extern void xyzzy ();
+#pragma weak xyzzy]],
+            [[xyzzy();]])],
+         [gl_cv_have_weak=maybe])
+       if test $gl_cv_have_weak = maybe; then
+         dnl Second, test whether it actually works. On Cygwin 1.7.2, with
+         dnl gcc 4.3, symbols declared weak always evaluate to the address 0.
+         AC_RUN_IFELSE(
+           [AC_LANG_SOURCE([[
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+  return (fputs == NULL);
+}]])],
+           [gl_cv_have_weak=yes],
+           [gl_cv_have_weak=no],
+           [dnl When cross-compiling, assume that only ELF platforms support
+            dnl weak symbols.
+            AC_EGREP_CPP([Extensible Linking Format],
+              [#ifdef __ELF__
+               Extensible Linking Format
+               #endif
+              ],
+              [gl_cv_have_weak="guessing yes"],
+              [gl_cv_have_weak="guessing no"])
+           ])
+       fi
+      ])
+    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+      # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+      # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
+      AC_CHECK_HEADER([pthread.h],
+        [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
+      if test "$gl_have_pthread_h" = yes; then
+        # Other possible tests:
+        #   -lpthreads (FSU threads, PCthreads)
+        #   -lgthreads
+        gl_have_pthread=
+        # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+        # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+        # the second one only in libpthread, and lock.c needs it.
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#include <pthread.h>]],
+             [[pthread_mutex_lock((pthread_mutex_t*)0);
+               pthread_mutexattr_init((pthread_mutexattr_t*)0);]])],
+          [gl_have_pthread=yes])
+        # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+        # since it is defined as a macro on OSF/1.)
+        if test -n "$gl_have_pthread"; then
+          # The program links fine without libpthread. But it may actually
+          # need to link with libpthread in order to create multiple threads.
+          AC_CHECK_LIB([pthread], [pthread_kill],
+            [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             case "$host_os" in
+               solaris* | hpux*)
+                 AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+                   [Define if the pthread_in_use() detection is hard.])
+             esac
+            ])
+        else
+          # Some library is needed. Try libpthread and libc_r.
+          AC_CHECK_LIB([pthread], [pthread_kill],
+            [gl_have_pthread=yes
+             LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+             LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
+          if test -z "$gl_have_pthread"; then
+            # For FreeBSD 4.
+            AC_CHECK_LIB([c_r], [pthread_kill],
+              [gl_have_pthread=yes
+               LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+               LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
+          fi
+        fi
+        if test -n "$gl_have_pthread"; then
+          gl_threads_api=posix
+          AC_DEFINE([USE_POSIX_THREADS], [1],
+            [Define if the POSIX multithreading library can be used.])
+          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+              AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
+                [Define if references to the POSIX multithreading library should be made weak.])
+              LIBTHREAD=
+              LTLIBTHREAD=
+            fi
+          fi
+        fi
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+        gl_have_solaristhread=
+        gl_save_LIBS="$LIBS"
+        LIBS="$LIBS -lthread"
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[
+#include <thread.h>
+#include <synch.h>
+             ]],
+             [[thr_self();]])],
+          [gl_have_solaristhread=yes])
+        LIBS="$gl_save_LIBS"
+        if test -n "$gl_have_solaristhread"; then
+          gl_threads_api=solaris
+          LIBTHREAD=-lthread
+          LTLIBTHREAD=-lthread
+          LIBMULTITHREAD="$LIBTHREAD"
+          LTLIBMULTITHREAD="$LTLIBTHREAD"
+          AC_DEFINE([USE_SOLARIS_THREADS], [1],
+            [Define if the old Solaris multithreading library can be used.])
+          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+            AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1],
+              [Define if references to the old Solaris multithreading library should be made weak.])
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      fi
+    fi
+    if test "$gl_use_threads" = pth; then
+      gl_save_CPPFLAGS="$CPPFLAGS"
+      AC_LIB_LINKFLAGS([pth])
+      gl_have_pth=
+      gl_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBPTH"
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM([[#include <pth.h>]], [[pth_self();]])],
+        [gl_have_pth=yes])
+      LIBS="$gl_save_LIBS"
+      if test -n "$gl_have_pth"; then
+        gl_threads_api=pth
+        LIBTHREAD="$LIBPTH"
+        LTLIBTHREAD="$LTLIBPTH"
+        LIBMULTITHREAD="$LIBTHREAD"
+        LTLIBMULTITHREAD="$LTLIBTHREAD"
+        AC_DEFINE([USE_PTH_THREADS], [1],
+          [Define if the GNU Pth multithreading library can be used.])
+        if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+            AC_DEFINE([USE_PTH_THREADS_WEAK], [1],
+              [Define if references to the GNU Pth multithreading library should be made weak.])
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      else
+        CPPFLAGS="$gl_save_CPPFLAGS"
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
+        if { case "$host_os" in
+               mingw*) true;;
+               *) false;;
+             esac
+           }; then
+          gl_threads_api=win32
+          AC_DEFINE([USE_WIN32_THREADS], [1],
+            [Define if the Win32 multithreading API can be used.])
+        fi
+      fi
+    fi
+  fi
+  AC_MSG_CHECKING([for multithread API to use])
+  AC_MSG_RESULT([$gl_threads_api])
+  AC_SUBST([LIBTHREAD])
+  AC_SUBST([LTLIBTHREAD])
+  AC_SUBST([LIBMULTITHREAD])
+  AC_SUBST([LTLIBMULTITHREAD])
+])
+
+AC_DEFUN([gl_THREADLIB],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY])
+  AC_REQUIRE([gl_THREADLIB_BODY])
+])
+
+
+dnl gl_DISABLE_THREADS
+dnl ------------------
+dnl Sets the gl_THREADLIB default so that threads are not used by default.
+dnl The user can still override it at installation time, by using the
+dnl configure option '--enable-threads'.
+
+AC_DEFUN([gl_DISABLE_THREADS], [
+  m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
+])
+
+
+dnl Survey of platforms:
+dnl
+dnl Platform          Available   Compiler    Supports   test-lock
+dnl                   flavours    option      weak       result
+dnl ---------------   ---------   ---------   --------   ---------
+dnl Linux 2.4/glibc   posix       -lpthread       Y      OK
+dnl
+dnl GNU Hurd/glibc    posix
+dnl
+dnl FreeBSD 5.3       posix       -lc_r           Y
+dnl                   posix       -lkse ?         Y
+dnl                   posix       -lpthread ?     Y
+dnl                   posix       -lthr           Y
+dnl
+dnl FreeBSD 5.2       posix       -lc_r           Y
+dnl                   posix       -lkse           Y
+dnl                   posix       -lthr           Y
+dnl
+dnl FreeBSD 4.0,4.10  posix       -lc_r           Y      OK
+dnl
+dnl NetBSD 1.6        --
+dnl
+dnl OpenBSD 3.4       posix       -lpthread       Y      OK
+dnl
+dnl MacOS X 10.[123]  posix       -lpthread       Y      OK
+dnl
+dnl Solaris 7,8,9     posix       -lpthread       Y      Sol 7,8: 0.0; Sol 9: OK
+dnl                   solaris     -lthread        Y      Sol 7,8: 0.0; Sol 9: OK
+dnl
+dnl HP-UX 11          posix       -lpthread       N (cc) OK
+dnl                                               Y (gcc)
+dnl
+dnl IRIX 6.5          posix       -lpthread       Y      0.5
+dnl
+dnl AIX 4.3,5.1       posix       -lpthread       N      AIX 4: 0.5; AIX 5: OK
+dnl
+dnl OSF/1 4.0,5.1     posix       -pthread (cc)   N      OK
+dnl                               -lpthread (gcc) Y
+dnl
+dnl Cygwin            posix       -lpthread       Y      OK
+dnl
+dnl Any of the above  pth         -lpth                  0.0
+dnl
+dnl Mingw             win32                       N      OK
+dnl
+dnl BeOS 5            --
+dnl
+dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
+dnl turned off:
+dnl   OK if all three tests terminate OK,
+dnl   0.5 if the first test terminates OK but the second one loops endlessly,
+dnl   0.0 if the first test already loops endlessly.
diff --git a/gnulib/m4/time_h.m4 b/gnulib/m4/time_h.m4
new file mode 100644 (file)
index 0000000..615da1c
--- /dev/null
@@ -0,0 +1,109 @@
+# Configure a more-standard replacement for <time.h>.
+
+# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+
+# serial 4
+
+# This file 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.
+
+# Written by Paul Eggert and Jim Meyering.
+
+AC_DEFUN([gl_HEADER_TIME_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_BODY],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  gl_NEXT_HEADERS([time.h])
+  AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+])
+
+dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
+dnl in time.h, sys/time.h, or pthread.h.
+
+AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
+[
+  AC_CHECK_HEADERS_ONCE([sys/time.h])
+  AC_CACHE_CHECK([for struct timespec in <time.h>],
+    [gl_cv_sys_struct_timespec_in_time_h],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <time.h>
+          ]],
+          [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+       [gl_cv_sys_struct_timespec_in_time_h=yes],
+       [gl_cv_sys_struct_timespec_in_time_h=no])])
+
+  TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+    TIME_H_DEFINES_STRUCT_TIMESPEC=1
+  else
+    AC_CACHE_CHECK([for struct timespec in <sys/time.h>],
+      [gl_cv_sys_struct_timespec_in_sys_time_h],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <sys/time.h>
+            ]],
+            [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+         [gl_cv_sys_struct_timespec_in_sys_time_h=yes],
+         [gl_cv_sys_struct_timespec_in_sys_time_h=no])])
+    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+    else
+      AC_CACHE_CHECK([for struct timespec in <pthread.h>],
+        [gl_cv_sys_struct_timespec_in_pthread_h],
+        [AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <pthread.h>
+              ]],
+              [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+           [gl_cv_sys_struct_timespec_in_pthread_h=yes],
+           [gl_cv_sys_struct_timespec_in_pthread_h=no])])
+      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
+        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+      fi
+    fi
+  fi
+  AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
+  AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
+  AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC])
+])
+
+AC_DEFUN([gl_TIME_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
+[
+  GNULIB_MKTIME=0;                       AC_SUBST([GNULIB_MKTIME])
+  GNULIB_NANOSLEEP=0;                    AC_SUBST([GNULIB_NANOSLEEP])
+  GNULIB_STRPTIME=0;                     AC_SUBST([GNULIB_STRPTIME])
+  GNULIB_TIMEGM=0;                       AC_SUBST([GNULIB_TIMEGM])
+  GNULIB_TIME_R=0;                       AC_SUBST([GNULIB_TIME_R])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_LOCALTIME_R=1;               AC_SUBST([HAVE_DECL_LOCALTIME_R])
+  HAVE_NANOSLEEP=1;                      AC_SUBST([HAVE_NANOSLEEP])
+  HAVE_STRPTIME=1;                       AC_SUBST([HAVE_STRPTIME])
+  HAVE_TIMEGM=1;                         AC_SUBST([HAVE_TIMEGM])
+  dnl If another module says to replace or to not replace, do that.
+  dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
+  dnl this lets maintainers check for portability.
+  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;  AC_SUBST([REPLACE_LOCALTIME_R])
+  REPLACE_MKTIME=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_MKTIME])
+  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;    AC_SUBST([REPLACE_NANOSLEEP])
+  REPLACE_TIMEGM=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_TIMEGM])
+])
diff --git a/gnulib/m4/time_r.m4 b/gnulib/m4/time_r.m4
new file mode 100644 (file)
index 0000000..9bb2800
--- /dev/null
@@ -0,0 +1,62 @@
+dnl Reentrant time functions: localtime_r, gmtime_r.
+
+dnl Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_TIME_R],
+[
+  dnl Persuade glibc and Solaris <time.h> to declare localtime_r.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is
+  dnl not defined.
+  AC_CHECK_DECLS_ONCE([localtime_r])
+  if test $ac_cv_have_decl_localtime_r = no; then
+    HAVE_DECL_LOCALTIME_R=0
+  fi
+
+  AC_CHECK_FUNCS_ONCE([localtime_r])
+  if test $ac_cv_func_localtime_r = yes; then
+    HAVE_LOCALTIME_R=1
+    AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature],
+      [gl_cv_time_r_posix],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <time.h>]],
+            [[/* We don't need to append 'restrict's to the argument types,
+                 even though the POSIX signature has the 'restrict's,
+                 since C99 says they can't affect type compatibility.  */
+              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
+              if (ptr) return 0;
+              /* Check the return type is a pointer.
+                 On HP-UX 10 it is 'int'.  */
+              *localtime_r (0, 0);]])
+         ],
+         [gl_cv_time_r_posix=yes],
+         [gl_cv_time_r_posix=no])
+      ])
+    if test $gl_cv_time_r_posix = yes; then
+      REPLACE_LOCALTIME_R=0
+    else
+      REPLACE_LOCALTIME_R=1
+    fi
+  else
+    HAVE_LOCALTIME_R=0
+  fi
+  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
+    AC_LIBOBJ([time_r])
+    gl_PREREQ_TIME_R
+  fi
+])
+
+# Prerequisites of lib/time_r.c.
+AC_DEFUN([gl_PREREQ_TIME_R], [
+  :
+])
diff --git a/gnulib/m4/timespec.m4 b/gnulib/m4/timespec.m4
new file mode 100644 (file)
index 0000000..4a1c7ad
--- /dev/null
@@ -0,0 +1,15 @@
+#serial 14
+
+# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+
+# This file 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.
+
+dnl From Jim Meyering
+
+AC_DEFUN([gl_TIMESPEC],
+[
+  dnl Prerequisites of lib/timespec.h.
+  AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/gnulib/m4/tm_gmtoff.m4 b/gnulib/m4/tm_gmtoff.m4
new file mode 100644 (file)
index 0000000..d65ddc0
--- /dev/null
@@ -0,0 +1,14 @@
+# tm_gmtoff.m4 serial 3
+dnl Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_TM_GMTOFF],
+[
+ AC_CHECK_MEMBER([struct tm.tm_gmtoff],
+                 [AC_DEFINE([HAVE_TM_GMTOFF], [1],
+                            [Define if struct tm has the tm_gmtoff member.])],
+                 ,
+                 [#include <time.h>])
+])
diff --git a/gnulib/m4/ungetc.m4 b/gnulib/m4/ungetc.m4
new file mode 100644 (file)
index 0000000..749f6bd
--- /dev/null
@@ -0,0 +1,36 @@
+# ungetc.m4 serial 2
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+
+  AC_CACHE_CHECK([whether ungetc works on arbitrary bytes],
+    [gl_cv_func_ungetc_works],
+    [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+      ]], [FILE *f;
+           if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
+           if (fputs ("abc", f) < 0) return 2;
+           rewind (f);
+           if (fgetc (f) != 'a') return 3;
+           if (fgetc (f) != 'b') return 4;
+           if (ungetc ('d', f) != 'd') return 5;
+           if (ftell (f) != 1) return 6;
+           if (fgetc (f) != 'd') return 7;
+           if (ftell (f) != 2) return 8;
+           if (fseek (f, 0, SEEK_CUR) != 0) return 9;
+           if (ftell (f) != 2) return 10;
+           if (fgetc (f) != 'c') return 11;
+           fclose (f); remove ("conftest.tmp");])],
+        [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
+        [gl_cv_func_ungetc_works='guessing no'])
+    ])
+  if test "$gl_cv_func_ungetc_works" != yes; then
+    AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
+      [Define to 1 if ungetc is broken when used on arbitrary bytes.])
+  fi
+])
diff --git a/gnulib/m4/unistd-safer.m4 b/gnulib/m4/unistd-safer.m4
new file mode 100644 (file)
index 0000000..00ff1bd
--- /dev/null
@@ -0,0 +1,13 @@
+#serial 8
+dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_UNISTD_SAFER],
+[
+  AC_CHECK_FUNCS_ONCE([pipe])
+  AC_LIBOBJ([dup-safer])
+  AC_LIBOBJ([fd-safer])
+  AC_LIBOBJ([pipe-safer])
+])
diff --git a/gnulib/m4/unistd_h.m4 b/gnulib/m4/unistd_h.m4
new file mode 100644 (file)
index 0000000..c81a113
--- /dev/null
@@ -0,0 +1,162 @@
+# unistd_h.m4 serial 53
+dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Simon Josefsson, Bruno Haible.
+
+AC_DEFUN([gl_UNISTD_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_C_INLINE])
+
+  gl_CHECK_NEXT_HEADERS([unistd.h])
+  if test $ac_cv_header_unistd_h = yes; then
+    HAVE_UNISTD_H=1
+  else
+    HAVE_UNISTD_H=0
+  fi
+  AC_SUBST([HAVE_UNISTD_H])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
+/* Some systems declare various items in the wrong headers.  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#  include <io.h>
+# endif
+#endif
+    ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
+    fsync ftruncate getcwd getdomainname getdtablesize getgroups
+    gethostname getlogin getlogin_r getpagesize getusershell setusershell
+    endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink
+    readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat
+    usleep])
+])
+
+AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_UNISTD_H_DEFAULTS],
+[
+  GNULIB_CHOWN=0;            AC_SUBST([GNULIB_CHOWN])
+  GNULIB_CLOSE=0;            AC_SUBST([GNULIB_CLOSE])
+  GNULIB_DUP2=0;             AC_SUBST([GNULIB_DUP2])
+  GNULIB_DUP3=0;             AC_SUBST([GNULIB_DUP3])
+  GNULIB_ENVIRON=0;          AC_SUBST([GNULIB_ENVIRON])
+  GNULIB_EUIDACCESS=0;       AC_SUBST([GNULIB_EUIDACCESS])
+  GNULIB_FACCESSAT=0;        AC_SUBST([GNULIB_FACCESSAT])
+  GNULIB_FCHDIR=0;           AC_SUBST([GNULIB_FCHDIR])
+  GNULIB_FCHOWNAT=0;         AC_SUBST([GNULIB_FCHOWNAT])
+  GNULIB_FSYNC=0;            AC_SUBST([GNULIB_FSYNC])
+  GNULIB_FTRUNCATE=0;        AC_SUBST([GNULIB_FTRUNCATE])
+  GNULIB_GETCWD=0;           AC_SUBST([GNULIB_GETCWD])
+  GNULIB_GETDOMAINNAME=0;    AC_SUBST([GNULIB_GETDOMAINNAME])
+  GNULIB_GETDTABLESIZE=0;    AC_SUBST([GNULIB_GETDTABLESIZE])
+  GNULIB_GETGROUPS=0;        AC_SUBST([GNULIB_GETGROUPS])
+  GNULIB_GETHOSTNAME=0;      AC_SUBST([GNULIB_GETHOSTNAME])
+  GNULIB_GETLOGIN=0;         AC_SUBST([GNULIB_GETLOGIN])
+  GNULIB_GETLOGIN_R=0;       AC_SUBST([GNULIB_GETLOGIN_R])
+  GNULIB_GETPAGESIZE=0;      AC_SUBST([GNULIB_GETPAGESIZE])
+  GNULIB_GETUSERSHELL=0;     AC_SUBST([GNULIB_GETUSERSHELL])
+  GNULIB_LCHOWN=0;           AC_SUBST([GNULIB_LCHOWN])
+  GNULIB_LINK=0;             AC_SUBST([GNULIB_LINK])
+  GNULIB_LINKAT=0;           AC_SUBST([GNULIB_LINKAT])
+  GNULIB_LSEEK=0;            AC_SUBST([GNULIB_LSEEK])
+  GNULIB_PIPE=0;             AC_SUBST([GNULIB_PIPE])
+  GNULIB_PIPE2=0;            AC_SUBST([GNULIB_PIPE2])
+  GNULIB_PREAD=0;            AC_SUBST([GNULIB_PREAD])
+  GNULIB_PWRITE=0;           AC_SUBST([GNULIB_PWRITE])
+  GNULIB_READLINK=0;         AC_SUBST([GNULIB_READLINK])
+  GNULIB_READLINKAT=0;       AC_SUBST([GNULIB_READLINKAT])
+  GNULIB_RMDIR=0;            AC_SUBST([GNULIB_RMDIR])
+  GNULIB_SLEEP=0;            AC_SUBST([GNULIB_SLEEP])
+  GNULIB_SYMLINK=0;          AC_SUBST([GNULIB_SYMLINK])
+  GNULIB_SYMLINKAT=0;        AC_SUBST([GNULIB_SYMLINKAT])
+  GNULIB_TTYNAME_R=0;        AC_SUBST([GNULIB_TTYNAME_R])
+  GNULIB_UNISTD_H_GETOPT=0;  AC_SUBST([GNULIB_UNISTD_H_GETOPT])
+  GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
+  GNULIB_UNLINK=0;           AC_SUBST([GNULIB_UNLINK])
+  GNULIB_UNLINKAT=0;         AC_SUBST([GNULIB_UNLINKAT])
+  GNULIB_USLEEP=0;           AC_SUBST([GNULIB_USLEEP])
+  GNULIB_WRITE=0;            AC_SUBST([GNULIB_WRITE])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_CHOWN=1;           AC_SUBST([HAVE_CHOWN])
+  HAVE_DUP2=1;            AC_SUBST([HAVE_DUP2])
+  HAVE_DUP3=1;            AC_SUBST([HAVE_DUP3])
+  HAVE_EUIDACCESS=1;      AC_SUBST([HAVE_EUIDACCESS])
+  HAVE_FACCESSAT=1;       AC_SUBST([HAVE_FACCESSAT])
+  HAVE_FCHDIR=1;          AC_SUBST([HAVE_FCHDIR])
+  HAVE_FCHOWNAT=1;        AC_SUBST([HAVE_FCHOWNAT])
+  HAVE_FSYNC=1;           AC_SUBST([HAVE_FSYNC])
+  HAVE_FTRUNCATE=1;       AC_SUBST([HAVE_FTRUNCATE])
+  HAVE_GETDTABLESIZE=1;   AC_SUBST([HAVE_GETDTABLESIZE])
+  HAVE_GETGROUPS=1;       AC_SUBST([HAVE_GETGROUPS])
+  HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
+  HAVE_GETLOGIN=1;        AC_SUBST([HAVE_GETLOGIN])
+  HAVE_GETPAGESIZE=1;     AC_SUBST([HAVE_GETPAGESIZE])
+  HAVE_LCHOWN=1;          AC_SUBST([HAVE_LCHOWN])
+  HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
+  HAVE_LINKAT=1;          AC_SUBST([HAVE_LINKAT])
+  HAVE_PIPE=1;            AC_SUBST([HAVE_PIPE])
+  HAVE_PIPE2=1;           AC_SUBST([HAVE_PIPE2])
+  HAVE_PREAD=1;           AC_SUBST([HAVE_PREAD])
+  HAVE_PWRITE=1;          AC_SUBST([HAVE_PWRITE])
+  HAVE_READLINK=1;        AC_SUBST([HAVE_READLINK])
+  HAVE_READLINKAT=1;      AC_SUBST([HAVE_READLINKAT])
+  HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
+  HAVE_SYMLINK=1;         AC_SUBST([HAVE_SYMLINK])
+  HAVE_SYMLINKAT=1;       AC_SUBST([HAVE_SYMLINKAT])
+  HAVE_UNLINKAT=1;        AC_SUBST([HAVE_UNLINKAT])
+  HAVE_USLEEP=1;          AC_SUBST([HAVE_USLEEP])
+  HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
+  HAVE_DECL_FCHDIR=1;     AC_SUBST([HAVE_DECL_FCHDIR])
+  HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
+  HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
+  HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
+  HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
+  HAVE_DECL_TTYNAME_R=1;  AC_SUBST([HAVE_DECL_TTYNAME_R])
+  HAVE_OS_H=0;            AC_SUBST([HAVE_OS_H])
+  HAVE_SYS_PARAM_H=0;     AC_SUBST([HAVE_SYS_PARAM_H])
+  REPLACE_CHOWN=0;        AC_SUBST([REPLACE_CHOWN])
+  REPLACE_CLOSE=0;        AC_SUBST([REPLACE_CLOSE])
+  REPLACE_DUP=0;          AC_SUBST([REPLACE_DUP])
+  REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
+  REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
+  REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
+  REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
+  REPLACE_GETLOGIN_R=0;   AC_SUBST([REPLACE_GETLOGIN_R])
+  REPLACE_GETGROUPS=0;    AC_SUBST([REPLACE_GETGROUPS])
+  REPLACE_GETPAGESIZE=0;  AC_SUBST([REPLACE_GETPAGESIZE])
+  REPLACE_LCHOWN=0;       AC_SUBST([REPLACE_LCHOWN])
+  REPLACE_LINK=0;         AC_SUBST([REPLACE_LINK])
+  REPLACE_LINKAT=0;       AC_SUBST([REPLACE_LINKAT])
+  REPLACE_LSEEK=0;        AC_SUBST([REPLACE_LSEEK])
+  REPLACE_PREAD=0;        AC_SUBST([REPLACE_PREAD])
+  REPLACE_PWRITE=0;       AC_SUBST([REPLACE_PWRITE])
+  REPLACE_READLINK=0;     AC_SUBST([REPLACE_READLINK])
+  REPLACE_RMDIR=0;        AC_SUBST([REPLACE_RMDIR])
+  REPLACE_SLEEP=0;        AC_SUBST([REPLACE_SLEEP])
+  REPLACE_SYMLINK=0;      AC_SUBST([REPLACE_SYMLINK])
+  REPLACE_TTYNAME_R=0;    AC_SUBST([REPLACE_TTYNAME_R])
+  REPLACE_UNLINK=0;       AC_SUBST([REPLACE_UNLINK])
+  REPLACE_UNLINKAT=0;     AC_SUBST([REPLACE_UNLINKAT])
+  REPLACE_USLEEP=0;       AC_SUBST([REPLACE_USLEEP])
+  REPLACE_WRITE=0;        AC_SUBST([REPLACE_WRITE])
+  UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
+  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+                           AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
+])
diff --git a/gnulib/m4/unlink.m4 b/gnulib/m4/unlink.m4
new file mode 100644 (file)
index 0000000..a49a692
--- /dev/null
@@ -0,0 +1,113 @@
+# unlink.m4 serial 7
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_UNLINK],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  dnl Detect FreeBSD 7.2, AIX 7.1, Solaris 9 bug.
+  AC_CACHE_CHECK([whether unlink honors trailing slashes],
+    [gl_cv_func_unlink_honors_slashes],
+    [touch conftest.file
+     # Assume that if we have lstat, we can also check symlinks.
+     if test $ac_cv_func_lstat = yes; then
+       ln -s conftest.file conftest.lnk
+     fi
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+         [[#include <unistd.h>
+           #include <errno.h>
+         ]],
+         [[int result = 0;
+           if (!unlink ("conftest.file/"))
+             result |= 1;
+           else if (errno != ENOTDIR)
+             result |= 2;
+#if HAVE_LSTAT
+           if (!unlink ("conftest.lnk/"))
+             result |= 4;
+           else if (errno != ENOTDIR)
+             result |= 8;
+#endif
+           return result;
+         ]])],
+      [gl_cv_func_unlink_honors_slashes=yes],
+      [gl_cv_func_unlink_honors_slashes=no],
+      [gl_cv_func_unlink_honors_slashes="guessing no"])
+     rm -f conftest.file conftest.lnk])
+  dnl Detect MacOS X 10.5.6 bug: On read-write HFS mounts, unlink("..") or
+  dnl unlink("../..") succeeds without doing anything.
+  AC_CACHE_CHECK([whether unlink of a parent directory fails as it should],
+    [gl_cv_func_unlink_parent_fails],
+    [case "$host_os" in
+       darwin*)
+         dnl Try to unlink a subdirectory of /tmp, because /tmp is usually on a
+         dnl HFS mount on MacOS X. Use a subdirectory, owned by the current
+         dnl user, because otherwise unlink() may fail due to permissions
+         dnl reasons, and because when running as root we don't want to risk
+         dnl destroying the entire /tmp.
+         if {
+              # Use the mktemp program if available. If not available, hide the error
+              # message.
+              tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
+              test -n "$tmp" && test -d "$tmp"
+            } ||
+            {
+              # Use a simple mkdir command. It is guaranteed to fail if the directory
+              # already exists.  $RANDOM is bash specific and expands to empty in shells
+              # other than bash, ksh and zsh.  Its use does not increase security;
+              # rather, it minimizes the probability of failure in a very cluttered /tmp
+              # directory.
+              tmp=/tmp/gt$$-$RANDOM
+              (umask 077 && mkdir "$tmp")
+            }; then
+           mkdir "$tmp/subdir"
+           GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
+           export GL_SUBDIR_FOR_UNLINK
+           AC_RUN_IFELSE(
+             [AC_LANG_SOURCE([[
+                #include <stdlib.h>
+                #include <unistd.h>
+                int main ()
+                {
+                  int result = 0;
+                  if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
+                    result |= 1;
+                  else if (unlink ("..") == 0)
+                    result |= 2;
+                  return result;
+                }
+              ]])],
+             [gl_cv_func_unlink_parent_fails=yes],
+             [gl_cv_func_unlink_parent_fails=no],
+             [gl_cv_func_unlink_parent_fails="guessing no"])
+           unset GL_SUBDIR_FOR_UNLINK
+           rm -rf "$tmp"
+         else
+           gl_cv_func_unlink_parent_fails="guessing no"
+         fi
+         ;;
+       *)
+         gl_cv_func_unlink_parent_fails="guessing yes"
+         ;;
+     esac
+    ])
+  case "$gl_cv_func_unlink_parent_fails" in
+    *no)
+      AC_DEFINE([UNLINK_PARENT_BUG], [1],
+        [Define to 1 if unlink() on a parent directory may succeed])
+      ;;
+  esac
+  if test "$gl_cv_func_unlink_honors_slashes" != yes \
+     || { case "$gl_cv_func_unlink_parent_fails" in
+            *yes) false;;
+            *no) true;;
+          esac
+        }; then
+    REPLACE_UNLINK=1
+    AC_LIBOBJ([unlink])
+  fi
+])
diff --git a/gnulib/m4/unlinkdir.m4 b/gnulib/m4/unlinkdir.m4
new file mode 100644 (file)
index 0000000..dabe5f4
--- /dev/null
@@ -0,0 +1,34 @@
+# serial 6
+
+# Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([gl_UNLINKDIR],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CHECK_HEADERS_ONCE([priv.h])
+
+  AC_LIBOBJ([unlinkdir])
+
+  # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
+  # Cygwin, and mingw never let anyone (even root) unlink directories.
+  # If anyone knows of another system for which unlink can never
+  # remove a directory, please report it to <bug-coreutils@gnu.org>.
+  # Unfortunately this is difficult to test for, since it requires root access
+  # and might create garbage in the file system,
+  # so the code below simply relies on the kernel name and version number.
+  case $host_os in
+  gnu[[0-9]]* | \
+  linux-* | linux | \
+  freebsd2.2* | freebsd[[3-9]]* | freebsd[[1-9]][[0-9]]* | \
+  cygwin | \
+  mingw*)
+    AC_DEFINE([UNLINK_CANNOT_UNLINK_DIR], [1],
+      [Define to 1 if unlink (dir) cannot possibly succeed.]);;
+  esac
+])
diff --git a/gnulib/m4/usleep.m4 b/gnulib/m4/usleep.m4
new file mode 100644 (file)
index 0000000..a41cbb1
--- /dev/null
@@ -0,0 +1,37 @@
+# usleep.m4 serial 1
+dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro intentionally does not check for select or nanosleep;
+dnl both of those modules can require external libraries.
+AC_DEFUN([gl_FUNC_USLEEP],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  dnl usleep was required in POSIX 2001, but dropped as obsolete in
+  dnl POSIX 2008; therefore, it is not always exposed in headers.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_FUNCS_ONCE([usleep])
+  AC_CHECK_TYPE([useconds_t], [],
+    [AC_DEFINE([useconds_t], [unsigned int], [Define to an unsigned 32-bit
+      type if <sys/types.h> lacks this type.])])
+  if test $ac_cv_func_usleep = no; then
+    HAVE_USLEEP=0
+    AC_LIBOBJ([usleep])
+  else
+    dnl POSIX allows implementations to reject arguments larger than
+    dnl 999999, but GNU guarantees it will work.
+    AC_CACHE_CHECK([whether usleep allows large arguments],
+      [gl_cv_func_usleep_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <unistd.h>
+]], [[return !!usleep (1000000);]])],
+        [gl_cv_func_usleep_works=yes], [gl_cv_func_usleep_works=no],
+        [gl_cv_func_usleep_works="guessing no"])])
+    if test "$gl_cv_func_usleep_works" != yes; then
+      REPLACE_USLEEP=1
+      AC_LIBOBJ([usleep])
+    fi
+  fi
+])
diff --git a/gnulib/m4/vasnprintf.m4 b/gnulib/m4/vasnprintf.m4
new file mode 100644 (file)
index 0000000..32ea985
--- /dev/null
@@ -0,0 +1,289 @@
+# vasnprintf.m4 serial 32
+dnl Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_VASNPRINTF],
+[
+  AC_CHECK_FUNCS_ONCE([vasnprintf])
+  if test $ac_cv_func_vasnprintf = no; then
+    gl_REPLACE_VASNPRINTF
+  fi
+])
+
+AC_DEFUN([gl_REPLACE_VASNPRINTF],
+[
+  AC_CHECK_FUNCS_ONCE([vasnprintf])
+  AC_LIBOBJ([vasnprintf])
+  AC_LIBOBJ([printf-args])
+  AC_LIBOBJ([printf-parse])
+  AC_LIBOBJ([asnprintf])
+  if test $ac_cv_func_vasnprintf = yes; then
+    AC_DEFINE([REPLACE_VASNPRINTF], [1],
+      [Define if vasnprintf exists but is overridden by gnulib.])
+  fi
+  gl_PREREQ_PRINTF_ARGS
+  gl_PREREQ_PRINTF_PARSE
+  gl_PREREQ_VASNPRINTF
+  gl_PREREQ_ASNPRINTF
+])
+
+# Prequisites of lib/printf-args.h, lib/printf-args.c.
+AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
+[
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+  AC_REQUIRE([gt_TYPE_WCHAR_T])
+  AC_REQUIRE([gt_TYPE_WINT_T])
+])
+
+# Prequisites of lib/printf-parse.h, lib/printf-parse.c.
+AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
+[
+  AC_REQUIRE([gl_FEATURES_H])
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+  AC_REQUIRE([gt_TYPE_WCHAR_T])
+  AC_REQUIRE([gt_TYPE_WINT_T])
+  AC_REQUIRE([AC_TYPE_SIZE_T])
+  AC_CHECK_TYPE([ptrdiff_t], ,
+    [AC_DEFINE([ptrdiff_t], [long],
+       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+    ])
+  AC_REQUIRE([gt_AC_TYPE_INTMAX_T])
+])
+
+# Prerequisites of lib/vasnprintf.c.
+AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AC_REQUIRE([AC_FUNC_ALLOCA])
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+  AC_REQUIRE([gt_TYPE_WCHAR_T])
+  AC_REQUIRE([gt_TYPE_WINT_T])
+  AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
+  dnl Use the _snprintf function only if it is declared (because on NetBSD it
+  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+  AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
+  dnl We can avoid a lot of code by assuming that snprintf's return value
+  dnl conforms to ISO C99. So check that.
+  AC_REQUIRE([gl_SNPRINTF_RETVAL_C99])
+  case "$gl_cv_func_snprintf_retval_c99" in
+    *yes)
+      AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1],
+        [Define if the return value of the snprintf function is the number of
+         of bytes (excluding the terminating NUL) that would have been produced
+         if the buffer had been large enough.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting 'long double'
+# arguments.
+AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE],
+[
+  AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+  case "$gl_cv_func_printf_long_double" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
+        [Define if the vasnprintf implementation needs special code for
+         'long double' arguments.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double'
+# arguments.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE],
+[
+  AC_REQUIRE([gl_PRINTF_INFINITE])
+  case "$gl_cv_func_printf_infinite" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1],
+        [Define if the vasnprintf implementation needs special code for
+         infinite 'double' arguments.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double'
+# arguments.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE],
+[
+  AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+  dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if
+  dnl NEED_PRINTF_LONG_DOUBLE is already set.
+  AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE])
+  case "$gl_cv_func_printf_long_double" in
+    *yes)
+      case "$gl_cv_func_printf_infinite_long_double" in
+        *yes)
+          ;;
+        *)
+          AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1],
+            [Define if the vasnprintf implementation needs special code for
+             infinite 'long double' arguments.])
+          ;;
+      esac
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A],
+[
+  AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+  case "$gl_cv_func_printf_directive_a" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1],
+        [Define if the vasnprintf implementation needs special code for
+         the 'a' and 'A' directives.])
+      AC_CHECK_FUNCS([nl_langinfo])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F],
+[
+  AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+  case "$gl_cv_func_printf_directive_f" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1],
+        [Define if the vasnprintf implementation needs special code for
+         the 'F' directive.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS],
+[
+  AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+  case "$gl_cv_func_printf_directive_ls" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1],
+        [Define if the vasnprintf implementation needs special code for
+         the 'ls' directive.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
+[
+  AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+  case "$gl_cv_func_printf_flag_grouping" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1],
+        [Define if the vasnprintf implementation needs special code for the
+         ' flag.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST],
+[
+  AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+  case "$gl_cv_func_printf_flag_leftadjust" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1],
+        [Define if the vasnprintf implementation needs special code for the
+         '-' flag.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO],
+[
+  AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+  case "$gl_cv_func_printf_flag_zero" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1],
+        [Define if the vasnprintf implementation needs special code for the
+         0 flag.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting large precisions.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION],
+[
+  AC_REQUIRE([gl_PRINTF_PRECISION])
+  case "$gl_cv_func_printf_precision" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1],
+        [Define if the vasnprintf implementation needs special code for
+         supporting large precisions without arbitrary bounds.])
+      AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
+        [Define if the vasnprintf implementation needs special code for
+         'double' arguments.])
+      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
+        [Define if the vasnprintf implementation needs special code for
+         'long double' arguments.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory
+# conditions.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM],
+[
+  AC_REQUIRE([gl_PRINTF_ENOMEM])
+  case "$gl_cv_func_printf_enomem" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_ENOMEM], [1],
+        [Define if the vasnprintf implementation needs special code for
+         surviving out-of-memory conditions.])
+      AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
+        [Define if the vasnprintf implementation needs special code for
+         'double' arguments.])
+      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
+        [Define if the vasnprintf implementation needs special code for
+         'long double' arguments.])
+      ;;
+  esac
+])
+
+# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS],
+[
+  AC_REQUIRE([gl_PREREQ_VASNPRINTF])
+  gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+  gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+  gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+  gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+  gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+  gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+  gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+  gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+  gl_PREREQ_VASNPRINTF_FLAG_ZERO
+  gl_PREREQ_VASNPRINTF_PRECISION
+  gl_PREREQ_VASNPRINTF_ENOMEM
+])
+
+# Prerequisites of lib/asnprintf.c.
+AC_DEFUN([gl_PREREQ_ASNPRINTF],
+[
+])
diff --git a/gnulib/m4/version-etc.m4 b/gnulib/m4/version-etc.m4
new file mode 100644 (file)
index 0000000..5032bf8
--- /dev/null
@@ -0,0 +1,33 @@
+# version-etc.m4 serial 1
+# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# This file 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.
+
+dnl $1 - configure flag and define name
+dnl $2 - human readable description
+m4_define([gl_VERSION_ETC_FLAG],
+[dnl
+  AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])],
+    [dnl
+      case $withval in
+        yes|no) ;;
+        *) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;;
+      esac
+    ])
+])
+
+AC_DEFUN([gl_VERSION_ETC],
+[dnl
+  gl_VERSION_ETC_FLAG([packager],
+                      [String identifying the packager of this software])
+  gl_VERSION_ETC_FLAG([packager-version],
+                      [Packager-specific version information])
+  gl_VERSION_ETC_FLAG([packager-bug-reports],
+                      [Packager info for bug reports (URL/e-mail/...)])
+  if test "X$with_packager" = "X" && \
+     test "X$with_packager_version$with_packager_bug_reports" != "X"
+  then
+    AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager])
+  fi
+])
diff --git a/gnulib/m4/warn-on-use.m4 b/gnulib/m4/warn-on-use.m4
new file mode 100644 (file)
index 0000000..e0d0f27
--- /dev/null
@@ -0,0 +1,45 @@
+# warn-on-use.m4 serial 2
+dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES)
+# ---------------------------------------
+# For each whitespace-separated element in the list of NAMES, define
+# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES
+# even after being undefined as a macro.
+#
+# See warn-on-use.h for some hints on how to poison function names, as
+# well as ideas on poisoning global variables and macros.  NAMES may
+# include global variables, but remember that only functions work with
+# _GL_WARN_ON_USE.  Typically, INCLUDES only needs to list a single
+# header, but if the replacement header pulls in other headers because
+# some systems declare functions in the wrong header, then INCLUDES
+# should do likewise.
+#
+# If you assume C89, then it is generally safe to assume declarations
+# for functions declared in that standard (such as gets) without
+# needing gl_WARN_ON_USE_PREPARE.
+AC_DEFUN([gl_WARN_ON_USE_PREPARE],
+[
+  m4_foreach_w([gl_decl], [$2],
+    [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
+      [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
+       undefining macros.])])dnl
+  for gl_func in m4_flatten([$2]); do
+    AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
+    AC_CACHE_CHECK([whether $gl_func is declared without a macro],
+      gl_Symbol,
+      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
+[@%:@undef $gl_func
+  (void) $gl_func;])],
+        [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
+     AS_VAR_IF(gl_Symbol, [yes],
+       [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
+       dnl shortcut - if the raw declaration exists, then set a cache
+       dnl variable to allow skipping any later AC_CHECK_DECL efforts
+       eval ac_cv_have_decl_$gl_func=yes])
+    AS_VAR_POPDEF([gl_Symbol])dnl
+  done
+])
diff --git a/gnulib/m4/warnings.m4 b/gnulib/m4/warnings.m4
new file mode 100644 (file)
index 0000000..a8f3466
--- /dev/null
@@ -0,0 +1,36 @@
+# warnings.m4 serial 2
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson
+
+# gl_AS_VAR_APPEND(VAR, VALUE)
+# ----------------------------
+# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it.
+m4_ifdef([AS_VAR_APPEND],
+[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])],
+[m4_define([gl_AS_VAR_APPEND],
+[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
+
+# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS])
+# ------------------------------------------------
+# Adds parameter to WARN_CFLAGS if the compiler supports it.  For example,
+# gl_WARN_ADD([-Wparentheses]).
+AC_DEFUN([gl_WARN_ADD],
+[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl
+AC_CACHE_CHECK([whether compiler handles $1], [gl_Warn], [
+  save_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS="${CPPFLAGS} $1"
+  AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
+                    [AS_VAR_SET([gl_Warn], [yes])],
+                    [AS_VAR_SET([gl_Warn], [no])])
+  CPPFLAGS="$save_CPPFLAGS"
+])
+AS_VAR_PUSHDEF([gl_Flags], m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]))dnl
+AS_VAR_IF([gl_Warn], [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])])
+AS_VAR_POPDEF([gl_Flags])dnl
+AS_VAR_POPDEF([gl_Warn])dnl
+m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
+])
diff --git a/gnulib/m4/wchar_h.m4 b/gnulib/m4/wchar_h.m4
new file mode 100644 (file)
index 0000000..6255ff3
--- /dev/null
@@ -0,0 +1,232 @@
+dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
+
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Eric Blake.
+
+# wchar_h.m4 serial 38
+
+AC_DEFUN([gl_WCHAR_H],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
+  dnl Prepare for creating substitute <wchar.h>.
+  dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+  dnl character support).
+  dnl <wchar.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_CHECK_NEXT_HEADERS([wchar.h])
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
+  AC_SUBST([HAVE_WCHAR_H])
+
+  AC_REQUIRE([gl_FEATURES_H])
+
+  AC_REQUIRE([gt_TYPE_WINT_T])
+  if test $gt_cv_c_wint_t = yes; then
+    HAVE_WINT_T=1
+  else
+    HAVE_WINT_T=0
+  fi
+  AC_SUBST([HAVE_WINT_T])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+    ]],
+    [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
+     wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset
+     wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp
+     wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr
+     wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth
+    ])
+])
+
+dnl Check whether <wchar.h> is usable at all.
+AC_DEFUN([gl_WCHAR_H_INLINE_OK],
+[
+  dnl Test whether <wchar.h> suffers due to the transition from '__inline' to
+  dnl 'gnu_inline'. See <http://sourceware.org/bugzilla/show_bug.cgi?id=4022>
+  dnl and <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
+  dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
+  dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
+  AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly],
+    [gl_cv_header_wchar_h_correct_inline],
+    [gl_cv_header_wchar_h_correct_inline=yes
+     AC_LANG_CONFTEST([
+       AC_LANG_SOURCE([[#define wcstod renamed_wcstod
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+extern int zero (void);
+int main () { return zero(); }
+]])])
+     if AC_TRY_EVAL([ac_compile]); then
+       mv conftest.$ac_objext conftest1.$ac_objext
+       AC_LANG_CONFTEST([
+         AC_LANG_SOURCE([[#define wcstod renamed_wcstod
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int zero (void) { return 0; }
+]])])
+       if AC_TRY_EVAL([ac_compile]); then
+         mv conftest.$ac_objext conftest2.$ac_objext
+         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
+           :
+         else
+           gl_cv_header_wchar_h_correct_inline=no
+         fi
+       fi
+     fi
+     rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+    ])
+  if test $gl_cv_header_wchar_h_correct_inline = no; then
+    AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
+This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
+C99 mode. You have four options:
+  - Add the flag -fgnu89-inline to CC and reconfigure, or
+  - Fix your include files, using parts of
+    <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+  - Use a gcc version older than 4.3, or
+  - Don't use the flags -std=c99 or -std=gnu99.
+Configuration aborted.])
+  fi
+])
+
+dnl Unconditionally enables the replacement of <wchar.h>.
+AC_DEFUN([gl_REPLACE_WCHAR_H],
+[
+  dnl This is a no-op, because <wchar.h> is always overridden.
+  :
+])
+
+AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_WCHAR_H_DEFAULTS],
+[
+  GNULIB_BTOWC=0;       AC_SUBST([GNULIB_BTOWC])
+  GNULIB_WCTOB=0;       AC_SUBST([GNULIB_WCTOB])
+  GNULIB_MBSINIT=0;     AC_SUBST([GNULIB_MBSINIT])
+  GNULIB_MBRTOWC=0;     AC_SUBST([GNULIB_MBRTOWC])
+  GNULIB_MBRLEN=0;      AC_SUBST([GNULIB_MBRLEN])
+  GNULIB_MBSRTOWCS=0;   AC_SUBST([GNULIB_MBSRTOWCS])
+  GNULIB_MBSNRTOWCS=0;  AC_SUBST([GNULIB_MBSNRTOWCS])
+  GNULIB_WCRTOMB=0;     AC_SUBST([GNULIB_WCRTOMB])
+  GNULIB_WCSRTOMBS=0;   AC_SUBST([GNULIB_WCSRTOMBS])
+  GNULIB_WCSNRTOMBS=0;  AC_SUBST([GNULIB_WCSNRTOMBS])
+  GNULIB_WCWIDTH=0;     AC_SUBST([GNULIB_WCWIDTH])
+  GNULIB_WMEMCHR=0;     AC_SUBST([GNULIB_WMEMCHR])
+  GNULIB_WMEMCMP=0;     AC_SUBST([GNULIB_WMEMCMP])
+  GNULIB_WMEMCPY=0;     AC_SUBST([GNULIB_WMEMCPY])
+  GNULIB_WMEMMOVE=0;    AC_SUBST([GNULIB_WMEMMOVE])
+  GNULIB_WMEMSET=0;     AC_SUBST([GNULIB_WMEMSET])
+  GNULIB_WCSLEN=0;      AC_SUBST([GNULIB_WCSLEN])
+  GNULIB_WCSNLEN=0;     AC_SUBST([GNULIB_WCSNLEN])
+  GNULIB_WCSCPY=0;      AC_SUBST([GNULIB_WCSCPY])
+  GNULIB_WCPCPY=0;      AC_SUBST([GNULIB_WCPCPY])
+  GNULIB_WCSNCPY=0;     AC_SUBST([GNULIB_WCSNCPY])
+  GNULIB_WCPNCPY=0;     AC_SUBST([GNULIB_WCPNCPY])
+  GNULIB_WCSCAT=0;      AC_SUBST([GNULIB_WCSCAT])
+  GNULIB_WCSNCAT=0;     AC_SUBST([GNULIB_WCSNCAT])
+  GNULIB_WCSCMP=0;      AC_SUBST([GNULIB_WCSCMP])
+  GNULIB_WCSNCMP=0;     AC_SUBST([GNULIB_WCSNCMP])
+  GNULIB_WCSCASECMP=0;  AC_SUBST([GNULIB_WCSCASECMP])
+  GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP])
+  GNULIB_WCSCOLL=0;     AC_SUBST([GNULIB_WCSCOLL])
+  GNULIB_WCSXFRM=0;     AC_SUBST([GNULIB_WCSXFRM])
+  GNULIB_WCSDUP=0;      AC_SUBST([GNULIB_WCSDUP])
+  GNULIB_WCSCHR=0;      AC_SUBST([GNULIB_WCSCHR])
+  GNULIB_WCSRCHR=0;     AC_SUBST([GNULIB_WCSRCHR])
+  GNULIB_WCSCSPN=0;     AC_SUBST([GNULIB_WCSCSPN])
+  GNULIB_WCSSPN=0;      AC_SUBST([GNULIB_WCSSPN])
+  GNULIB_WCSPBRK=0;     AC_SUBST([GNULIB_WCSPBRK])
+  GNULIB_WCSSTR=0;      AC_SUBST([GNULIB_WCSSTR])
+  GNULIB_WCSTOK=0;      AC_SUBST([GNULIB_WCSTOK])
+  GNULIB_WCSWIDTH=0;    AC_SUBST([GNULIB_WCSWIDTH])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_BTOWC=1;         AC_SUBST([HAVE_BTOWC])
+  HAVE_MBSINIT=1;       AC_SUBST([HAVE_MBSINIT])
+  HAVE_MBRTOWC=1;       AC_SUBST([HAVE_MBRTOWC])
+  HAVE_MBRLEN=1;        AC_SUBST([HAVE_MBRLEN])
+  HAVE_MBSRTOWCS=1;     AC_SUBST([HAVE_MBSRTOWCS])
+  HAVE_MBSNRTOWCS=1;    AC_SUBST([HAVE_MBSNRTOWCS])
+  HAVE_WCRTOMB=1;       AC_SUBST([HAVE_WCRTOMB])
+  HAVE_WCSRTOMBS=1;     AC_SUBST([HAVE_WCSRTOMBS])
+  HAVE_WCSNRTOMBS=1;    AC_SUBST([HAVE_WCSNRTOMBS])
+  HAVE_WMEMCHR=1;       AC_SUBST([HAVE_WMEMCHR])
+  HAVE_WMEMCMP=1;       AC_SUBST([HAVE_WMEMCMP])
+  HAVE_WMEMCPY=1;       AC_SUBST([HAVE_WMEMCPY])
+  HAVE_WMEMMOVE=1;      AC_SUBST([HAVE_WMEMMOVE])
+  HAVE_WMEMSET=1;       AC_SUBST([HAVE_WMEMSET])
+  HAVE_WCSLEN=1;        AC_SUBST([HAVE_WCSLEN])
+  HAVE_WCSNLEN=1;       AC_SUBST([HAVE_WCSNLEN])
+  HAVE_WCSCPY=1;        AC_SUBST([HAVE_WCSCPY])
+  HAVE_WCPCPY=1;        AC_SUBST([HAVE_WCPCPY])
+  HAVE_WCSNCPY=1;       AC_SUBST([HAVE_WCSNCPY])
+  HAVE_WCPNCPY=1;       AC_SUBST([HAVE_WCPNCPY])
+  HAVE_WCSCAT=1;        AC_SUBST([HAVE_WCSCAT])
+  HAVE_WCSNCAT=1;       AC_SUBST([HAVE_WCSNCAT])
+  HAVE_WCSCMP=1;        AC_SUBST([HAVE_WCSCMP])
+  HAVE_WCSNCMP=1;       AC_SUBST([HAVE_WCSNCMP])
+  HAVE_WCSCASECMP=1;    AC_SUBST([HAVE_WCSCASECMP])
+  HAVE_WCSNCASECMP=1;   AC_SUBST([HAVE_WCSNCASECMP])
+  HAVE_WCSCOLL=1;       AC_SUBST([HAVE_WCSCOLL])
+  HAVE_WCSXFRM=1;       AC_SUBST([HAVE_WCSXFRM])
+  HAVE_WCSDUP=1;        AC_SUBST([HAVE_WCSDUP])
+  HAVE_WCSCHR=1;        AC_SUBST([HAVE_WCSCHR])
+  HAVE_WCSRCHR=1;       AC_SUBST([HAVE_WCSRCHR])
+  HAVE_WCSCSPN=1;       AC_SUBST([HAVE_WCSCSPN])
+  HAVE_WCSSPN=1;        AC_SUBST([HAVE_WCSSPN])
+  HAVE_WCSPBRK=1;       AC_SUBST([HAVE_WCSPBRK])
+  HAVE_WCSSTR=1;        AC_SUBST([HAVE_WCSSTR])
+  HAVE_WCSTOK=1;        AC_SUBST([HAVE_WCSTOK])
+  HAVE_WCSWIDTH=1;      AC_SUBST([HAVE_WCSWIDTH])
+  HAVE_DECL_WCTOB=1;    AC_SUBST([HAVE_DECL_WCTOB])
+  HAVE_DECL_WCWIDTH=1;  AC_SUBST([HAVE_DECL_WCWIDTH])
+  REPLACE_MBSTATE_T=0;  AC_SUBST([REPLACE_MBSTATE_T])
+  REPLACE_BTOWC=0;      AC_SUBST([REPLACE_BTOWC])
+  REPLACE_WCTOB=0;      AC_SUBST([REPLACE_WCTOB])
+  REPLACE_MBSINIT=0;    AC_SUBST([REPLACE_MBSINIT])
+  REPLACE_MBRTOWC=0;    AC_SUBST([REPLACE_MBRTOWC])
+  REPLACE_MBRLEN=0;     AC_SUBST([REPLACE_MBRLEN])
+  REPLACE_MBSRTOWCS=0;  AC_SUBST([REPLACE_MBSRTOWCS])
+  REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS])
+  REPLACE_WCRTOMB=0;    AC_SUBST([REPLACE_WCRTOMB])
+  REPLACE_WCSRTOMBS=0;  AC_SUBST([REPLACE_WCSRTOMBS])
+  REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
+  REPLACE_WCWIDTH=0;    AC_SUBST([REPLACE_WCWIDTH])
+  REPLACE_WCSWIDTH=0;   AC_SUBST([REPLACE_WCSWIDTH])
+])
diff --git a/gnulib/m4/wchar_t.m4 b/gnulib/m4/wchar_t.m4
new file mode 100644 (file)
index 0000000..d2c03c4
--- /dev/null
@@ -0,0 +1,24 @@
+# wchar_t.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+  AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stddef.h>
+            wchar_t foo = (wchar_t)'\0';]],
+          [[]])],
+       [gt_cv_c_wchar_t=yes],
+       [gt_cv_c_wchar_t=no])])
+  if test $gt_cv_c_wchar_t = yes; then
+    AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
+  fi
+])
diff --git a/gnulib/m4/wcrtomb.m4 b/gnulib/m4/wcrtomb.m4
new file mode 100644 (file)
index 0000000..2905d9b
--- /dev/null
@@ -0,0 +1,101 @@
+# wcrtomb.m4 serial 8
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WCRTOMB],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+  AC_REQUIRE([AC_TYPE_MBSTATE_T])
+  gl_MBSTATE_T_BROKEN
+
+  AC_CHECK_FUNCS_ONCE([wcrtomb])
+  if test $ac_cv_func_wcrtomb = no; then
+    HAVE_WCRTOMB=0
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_WCRTOMB=1
+    else
+      dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes
+      dnl returns 0 instead of 1.
+      AC_REQUIRE([AC_PROG_CC])
+      AC_REQUIRE([gt_LOCALE_FR])
+      AC_REQUIRE([gt_LOCALE_FR_UTF8])
+      AC_REQUIRE([gt_LOCALE_JA])
+      AC_REQUIRE([gt_LOCALE_ZH_CN])
+      AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+      AC_CACHE_CHECK([whether wcrtomb return value is correct],
+        [gl_cv_func_wcrtomb_retval],
+        [
+          dnl Initial guess, used when cross-compiling or when no suitable locale
+          dnl is present.
+changequote(,)dnl
+          case "$host_os" in
+                                     # Guess no on AIX 4, OSF/1 and Solaris.
+            aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+                                     # Guess yes otherwise.
+            *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
+          esac
+changequote([,])dnl
+          if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 1;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 2;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 4;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 8;
+    }
+  return result;
+}]])],
+              [gl_cv_func_wcrtomb_retval=yes],
+              [gl_cv_func_wcrtomb_retval=no],
+              [:])
+          fi
+        ])
+      case "$gl_cv_func_wcrtomb_retval" in
+        *yes) ;;
+        *) REPLACE_WCRTOMB=1 ;;
+      esac
+    fi
+  fi
+  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+    gl_REPLACE_WCHAR_H
+    AC_LIBOBJ([wcrtomb])
+    gl_PREREQ_WCRTOMB
+  fi
+])
+
+# Prerequisites of lib/wcrtomb.c.
+AC_DEFUN([gl_PREREQ_WCRTOMB], [
+  :
+])
diff --git a/gnulib/m4/wctob.m4 b/gnulib/m4/wctob.m4
new file mode 100644 (file)
index 0000000..3b4633c
--- /dev/null
@@ -0,0 +1,133 @@
+# wctob.m4 serial 7
+dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WCTOB],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+  AC_CHECK_FUNCS_ONCE([wctob])
+  if test $ac_cv_func_wctob = no; then
+    HAVE_DECL_WCTOB=0
+    gl_REPLACE_WCHAR_H
+    AC_LIBOBJ([wctob])
+    gl_PREREQ_WCTOB
+  else
+
+    dnl Solaris 9 has the wctob() function but it does not work.
+    dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned
+    dnl registers, see <http://cygwin.com/ml/cygwin/2010-05/msg00015.html>.
+    AC_REQUIRE([AC_PROG_CC])
+    AC_REQUIRE([gt_LOCALE_FR])
+    AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+    AC_CACHE_CHECK([whether wctob works],
+      [gl_cv_func_wctob_works],
+      [
+        dnl Initial guess, used when cross-compiling or when no suitable locale
+        dnl is present.
+changequote(,)dnl
+        case "$host_os" in
+            # Guess no on Solaris <= 9 and Cygwin.
+          solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
+            gl_cv_func_wctob_works="guessing no" ;;
+            # Guess yes otherwise.
+          *) gl_cv_func_wctob_works="guessing yes" ;;
+        esac
+changequote([,])dnl
+        case "$host_os" in
+          cygwin*)
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#include <locale.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+register long global __asm__ ("%ebx");
+
+int main ()
+{
+  setlocale (LC_ALL, "en_US.UTF-8");
+
+  global = 0x12345678;
+  if (wctob (0x00FC) != -1)
+    return 1;
+  if (global != 0x12345678)
+    return 2;
+  return 0;
+}]])],
+              [:],
+              [gl_cv_func_wctob_works=no],
+              [:])
+            ;;
+        esac
+        if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      wchar_t wc;
+
+      if (mbtowc (&wc, "\374", 1) == 1)
+        if (wctob (wc) != (unsigned char) '\374')
+          return 1;
+    }
+  return 0;
+}]])],
+            [gl_cv_func_wctob_works=yes],
+            [gl_cv_func_wctob_works=no],
+            [:])
+        fi
+      ])
+    case "$gl_cv_func_wctob_works" in
+      *yes) ;;
+      *) REPLACE_WCTOB=1 ;;
+    esac
+    if test $REPLACE_WCTOB = 1; then
+      gl_REPLACE_WCHAR_H
+      AC_LIBOBJ([wctob])
+      gl_PREREQ_WCTOB
+    else
+
+      dnl IRIX 6.5 has the wctob() function but does not declare it.
+      AC_CHECK_DECLS([wctob], [], [], [
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+])
+      if test $ac_cv_have_decl_wctob != yes; then
+        HAVE_DECL_WCTOB=0
+        gl_REPLACE_WCHAR_H
+      fi
+    fi
+  fi
+])
+
+# Prerequisites of lib/wctob.c.
+AC_DEFUN([gl_PREREQ_WCTOB], [
+  :
+])
diff --git a/gnulib/m4/wctomb.m4 b/gnulib/m4/wctomb.m4
new file mode 100644 (file)
index 0000000..bc21b5b
--- /dev/null
@@ -0,0 +1,23 @@
+# wctomb.m4 serial 1
+dnl Copyright (C) 2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WCTOMB],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+
+  if false; then
+    REPLACE_WCTOMB=1
+  fi
+  if test $REPLACE_WCTOMB = 1; then
+    AC_LIBOBJ([wctomb])
+    gl_PREREQ_WCTOMB
+  fi
+])
+
+# Prerequisites of lib/wctomb.c.
+AC_DEFUN([gl_PREREQ_WCTOMB], [
+  :
+])
diff --git a/gnulib/m4/wctype_h.m4 b/gnulib/m4/wctype_h.m4
new file mode 100644 (file)
index 0000000..ef9fb04
--- /dev/null
@@ -0,0 +1,174 @@
+# wctype_h.m4 serial 14
+
+dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
+
+dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_WCTYPE_H],
+[
+  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CHECK_FUNCS_ONCE([iswcntrl])
+  if test $ac_cv_func_iswcntrl = yes; then
+    HAVE_ISWCNTRL=1
+  else
+    HAVE_ISWCNTRL=0
+  fi
+  AC_SUBST([HAVE_ISWCNTRL])
+
+  AC_REQUIRE([AC_C_INLINE])
+
+  AC_REQUIRE([gt_TYPE_WINT_T])
+  if test $gt_cv_c_wint_t = yes; then
+    HAVE_WINT_T=1
+  else
+    HAVE_WINT_T=0
+  fi
+  AC_SUBST([HAVE_WINT_T])
+
+  gl_CHECK_NEXT_HEADERS([wctype.h])
+  if test $ac_cv_header_wctype_h = yes; then
+    if test $ac_cv_func_iswcntrl = yes; then
+      dnl Linux libc5 has an iswprint function that returns 0 for all arguments.
+      dnl The other functions are likely broken in the same way.
+      AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works],
+        [
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+                  included before <wchar.h>.
+                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+                  must be included before <wchar.h>.  */
+               #include <stddef.h>
+               #include <stdio.h>
+               #include <time.h>
+               #include <wchar.h>
+               #include <wctype.h>
+               int main () { return iswprint ('x') == 0; }
+            ]])],
+            [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no],
+            [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+                          #if __GNU_LIBRARY__ == 1
+                          Linux libc5 i18n is broken.
+                          #endif]], [])],
+              [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
+            ])
+        ])
+    fi
+    HAVE_WCTYPE_H=1
+  else
+    HAVE_WCTYPE_H=0
+  fi
+  AC_SUBST([HAVE_WCTYPE_H])
+
+  if test "$gl_cv_func_iswcntrl_works" = no; then
+    REPLACE_ISWCNTRL=1
+  else
+    REPLACE_ISWCNTRL=0
+  fi
+  AC_SUBST([REPLACE_ISWCNTRL])
+
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+    dnl Redefine all of iswcntrl, ..., towupper in <wctype.h>.
+    :
+  fi
+
+  dnl We assume that the wctype() and iswctype() functions exist if and only
+  dnl if the type wctype_t is defined in <wchar.h> or in <wctype.h> if that
+  dnl exists.
+  dnl HP-UX 11.00 declares all these in <wchar.h> and lacks <wctype.h>.
+  AC_CACHE_CHECK([for wctype_t], [gl_cv_type_wctype_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+               included before <wchar.h>.
+               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+               must be included before <wchar.h>.  */
+            #include <stddef.h>
+            #include <stdio.h>
+            #include <time.h>
+            #include <wchar.h>
+            #if HAVE_WCTYPE_H
+            # include <wctype.h>
+            #endif
+            wctype_t a;
+          ]],
+          [[]])],
+       [gl_cv_type_wctype_t=yes],
+       [gl_cv_type_wctype_t=no])
+    ])
+  if test $gl_cv_type_wctype_t = no; then
+    HAVE_WCTYPE_T=0
+  fi
+
+  dnl We assume that the wctrans() and towctrans() functions exist if and only
+  dnl if the type wctrans_t is defined in <wctype.h>.
+  AC_CACHE_CHECK([for wctrans_t], [gl_cv_type_wctrans_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+               included before <wchar.h>.
+               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+               must be included before <wchar.h>.  */
+            #include <stddef.h>
+            #include <stdio.h>
+            #include <time.h>
+            #include <wchar.h>
+            #include <wctype.h>
+            wctrans_t a;
+          ]],
+          [[]])],
+       [gl_cv_type_wctrans_t=yes],
+       [gl_cv_type_wctrans_t=no])
+    ])
+  if test $gl_cv_type_wctrans_t = no; then
+    HAVE_WCTRANS_T=0
+  fi
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# include <wchar.h>
+#endif
+#include <wctype.h>
+    ]],
+    [wctype iswctype wctrans towctrans
+    ])
+])
+
+AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_WCTYPE_H_DEFAULTS],
+[
+  GNULIB_ISWBLANK=0;    AC_SUBST([GNULIB_ISWBLANK])
+  GNULIB_WCTYPE=0;      AC_SUBST([GNULIB_WCTYPE])
+  GNULIB_ISWCTYPE=0;    AC_SUBST([GNULIB_ISWCTYPE])
+  GNULIB_WCTRANS=0;     AC_SUBST([GNULIB_WCTRANS])
+  GNULIB_TOWCTRANS=0;   AC_SUBST([GNULIB_TOWCTRANS])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_ISWBLANK=1;      AC_SUBST([HAVE_ISWBLANK])
+  HAVE_WCTYPE_T=1;      AC_SUBST([HAVE_WCTYPE_T])
+  HAVE_WCTRANS_T=1;     AC_SUBST([HAVE_WCTRANS_T])
+  REPLACE_ISWBLANK=0;   AC_SUBST([REPLACE_ISWBLANK])
+])
diff --git a/gnulib/m4/wcwidth.m4 b/gnulib/m4/wcwidth.m4
new file mode 100644 (file)
index 0000000..bf39d1d
--- /dev/null
@@ -0,0 +1,102 @@
+# wcwidth.m4 serial 18
+dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WCWIDTH],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  dnl Persuade glibc <wchar.h> to declare wcwidth().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gt_TYPE_WCHAR_T])
+  AC_REQUIRE([gt_TYPE_WINT_T])
+
+  AC_CHECK_HEADERS_ONCE([wchar.h])
+  AC_CHECK_FUNCS_ONCE([wcwidth])
+
+  AC_CHECK_DECLS([wcwidth], [], [], [
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+])
+  if test $ac_cv_have_decl_wcwidth != yes; then
+    HAVE_DECL_WCWIDTH=0
+  fi
+
+  if test $ac_cv_func_wcwidth = yes; then
+    dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
+    dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
+    dnl This leads to bugs in 'ls' (coreutils).
+    AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales],
+      [gl_cv_func_wcwidth_works],
+      [
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <locale.h>
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#if !HAVE_DECL_WCWIDTH
+extern
+# ifdef __cplusplus
+"C"
+# endif
+int wcwidth (int);
+#endif
+int main ()
+{
+  int result = 0;
+  if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
+    {
+      if (wcwidth (0x0301) > 0)
+        result |= 1;
+      if (wcwidth (0x200B) > 0)
+        result |= 2;
+    }
+  return result;
+}]])],
+          [gl_cv_func_wcwidth_works=yes],
+          [gl_cv_func_wcwidth_works=no],
+          [
+changequote(,)dnl
+           case "$host_os" in
+                     # Guess yes on glibc and AIX 7 systems.
+             *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
+             *)                  gl_cv_func_wcwidth_works="guessing no";;
+           esac
+changequote([,])dnl
+          ])
+      ])
+    case "$gl_cv_func_wcwidth_works" in
+      *yes) ;;
+      *no) REPLACE_WCWIDTH=1 ;;
+    esac
+  fi
+  if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1; then
+    AC_LIBOBJ([wcwidth])
+  fi
+  if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1 \
+     || test $HAVE_DECL_WCWIDTH = 0; then
+    gl_REPLACE_WCHAR_H
+  fi
+  dnl We don't substitute HAVE_WCWIDTH. We assume that if the system does not
+  dnl have the wcwidth function, then it does not declare it.
+])
diff --git a/gnulib/m4/wint_t.m4 b/gnulib/m4/wint_t.m4
new file mode 100644 (file)
index 0000000..da1ce3d
--- /dev/null
@@ -0,0 +1,32 @@
+# wint_t.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+  AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+            wint_t foo = (wchar_t)'\0';]],
+          [[]])],
+       [gt_cv_c_wint_t=yes],
+       [gt_cv_c_wint_t=no])])
+  if test $gt_cv_c_wint_t = yes; then
+    AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
+  fi
+])
diff --git a/gnulib/m4/xalloc.m4 b/gnulib/m4/xalloc.m4
new file mode 100644 (file)
index 0000000..4900820
--- /dev/null
@@ -0,0 +1,24 @@
+# xalloc.m4 serial 16
+dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XALLOC],
+[
+  AC_LIBOBJ([xmalloc])
+
+  gl_PREREQ_XALLOC
+  gl_PREREQ_XMALLOC
+])
+
+# Prerequisites of lib/xalloc.h.
+AC_DEFUN([gl_PREREQ_XALLOC], [
+  AC_REQUIRE([gl_INLINE])
+  :
+])
+
+# Prerequisites of lib/xmalloc.c.
+AC_DEFUN([gl_PREREQ_XMALLOC], [
+  :
+])
diff --git a/gnulib/m4/xgetcwd.m4 b/gnulib/m4/xgetcwd.m4
new file mode 100644 (file)
index 0000000..4ad788b
--- /dev/null
@@ -0,0 +1,12 @@
+#serial 6
+dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XGETCWD],
+[
+  AC_LIBOBJ([xgetcwd])
+
+  AC_REQUIRE([gl_FUNC_GETCWD])
+])
diff --git a/gnulib/m4/xsize.m4 b/gnulib/m4/xsize.m4
new file mode 100644 (file)
index 0000000..8c693bc
--- /dev/null
@@ -0,0 +1,13 @@
+# xsize.m4 serial 4
+dnl Copyright (C) 2003-2004, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSIZE],
+[
+  dnl Prerequisites of lib/xsize.h.
+  AC_REQUIRE([gl_SIZE_MAX])
+  AC_REQUIRE([AC_C_INLINE])
+  AC_CHECK_HEADERS([stdint.h])
+])
diff --git a/gnulib/m4/xstrndup.m4 b/gnulib/m4/xstrndup.m4
new file mode 100644 (file)
index 0000000..1400b0f
--- /dev/null
@@ -0,0 +1,15 @@
+# xstrndup.m4 serial 2
+dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSTRNDUP],
+[
+  gl_PREREQ_XSTRNDUP
+])
+
+# Prerequisites of lib/xstrndup.c.
+AC_DEFUN([gl_PREREQ_XSTRNDUP], [
+  :
+])
diff --git a/gnulib/m4/xstrtod.m4 b/gnulib/m4/xstrtod.m4
new file mode 100644 (file)
index 0000000..6062179
--- /dev/null
@@ -0,0 +1,18 @@
+#serial 6
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Prerequisites of lib/xstrtod.c.
+AC_DEFUN([gl_XSTRTOD],
+[
+  AC_LIBOBJ([xstrtod])
+])
+
+# Prerequisites of lib/xstrtold.c.
+AC_DEFUN([gl_XSTRTOLD],
+[
+  AC_LIBOBJ([xstrtold])
+])
diff --git a/gnulib/m4/xstrtol.m4 b/gnulib/m4/xstrtol.m4
new file mode 100644 (file)
index 0000000..99b7db4
--- /dev/null
@@ -0,0 +1,12 @@
+#serial 10
+dnl Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSTRTOL],
+[
+  AC_LIBOBJ([xstrtol])
+  AC_LIBOBJ([xstrtoul])
+  AC_LIBOBJ([xstrtol-error])
+])
diff --git a/gnulib/m4/yesno.m4 b/gnulib/m4/yesno.m4
new file mode 100644 (file)
index 0000000..2cf0a77
--- /dev/null
@@ -0,0 +1,14 @@
+# yesno.m4 serial 5
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_YESNO],
+[
+  AC_LIBOBJ([yesno])
+
+  dnl No prerequisites of lib/yesno.c.
+  :
+])
diff --git a/gnulib/m4/yield.m4 b/gnulib/m4/yield.m4
new file mode 100644 (file)
index 0000000..15d5ac2
--- /dev/null
@@ -0,0 +1,19 @@
+# yield.m4 serial 2
+dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_YIELD],
+[
+  AC_REQUIRE([gl_THREADLIB])
+  dnl On some systems, sched_yield is in librt, rather than in libpthread.
+  YIELD_LIB=
+  if test $gl_threads_api = posix; then
+    dnl Solaris has sched_yield in librt, not in libpthread or libc.
+    AC_CHECK_LIB([rt], [sched_yield], [YIELD_LIB=-lrt],
+      [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
+       AC_CHECK_LIB([posix4], [sched_yield], [YIELD_LIB=-lposix4])])
+  fi
+  AC_SUBST([YIELD_LIB])
+])
diff --git a/import-gnulib.config b/import-gnulib.config
new file mode 100644 (file)
index 0000000..45d89fa
--- /dev/null
@@ -0,0 +1,161 @@
+# findutils gnulib.config -*- sh -*-
+
+# What version of gnulib to use?
+gnulib_version="25d7f3a59bfdc7aaca4a016f687826883a55bef3"
+destdir="gnulib"
+
+# Random extra gnulib files needed for findutils.
+extra_files='
+build-aux/config.guess
+build-aux/config.sub
+build-aux/depcomp
+build-aux/install-sh
+build-aux/mdate-sh
+build-aux/mkinstalldirs
+build-aux/missing
+build-aux/texinfo.tex
+'
+
+gpl3_update_files=''
+
+# gnulib modules needed only for maintainer things.
+maintainer_modules='
+maintainer-makefile
+update-copyright
+'
+
+# consider using do-release-commit-and-tag
+# consider using gendocs
+# consider using getdelim
+# consider using gethrxtime
+# consider using getsubopt (for -D)
+# consider using gnu-web-doc-update
+# consider using idprov-drop and privset for locate
+# consider using long-options
+# consider using manywarnings
+# consider using nproc in xargs
+# consider using pmccabe2html
+# consider using selinux-h
+# consider using gendocs
+# consider using sig2str in xargs
+# consider using signal (why not: maybe we don't need those features)
+# consider using the dev-ino moduile to support -samefile.
+
+# consider removing stpcpy
+# We have rpmatch, either use it for -ok and xargs or remove the dependency
+# use fileblocks, filemode properly.
+
+# Things for later perhaps:
+# consider using d-ino (we currently don't use dirent.d_ino)
+
+# Considered, but no:
+# consider using autobuild (the information is not usually interesting for us)
+# consider using same-inode (we don't keep a full struct stat for the ref file)
+
+# Modules needed for findutils.
+# We need regex to ensure that we can build on platforms like
+# Solaris which lack those functions.
+modules='
+alloca
+areadlinkat
+argmatch
+assert
+c-strcasestr
+c-strstr
+canonicalize
+cloexec
+closein
+closeout
+ctype
+d-type
+dirent-safer
+dirname
+errno
+error
+faccessat
+fchdir
+fcntl
+fdl
+fdopendir
+fflush
+fileblocks
+filemode
+fnmatch-gnu
+fopen-safer
+fts
+getdelim
+getline
+getopt-gnu
+gettext
+gettimeofday
+gpl-3.0
+hash
+human
+idcache
+inline
+inttypes
+isblank
+locale
+lstat
+malloc
+math
+mbrtowc
+mbscasestr
+mbsstr
+mktime
+modechange
+modf
+mountlist
+open
+parse-datetime
+pathmax
+perror
+progname
+quotearg
+readlink
+realloc
+regex
+rpmatch
+save-cwd
+savedir
+selinux-at
+snprintf
+stat
+stat-macros
+stat-time
+stdarg
+stdbool
+stddef
+stdio
+stdint
+stdlib
+stpcpy
+strcasestr
+strdup-posix
+strftime
+string
+strtol
+strtoul
+strtoull
+strtoumax
+sys_stat
+sys_time
+sys_wait
+timespec
+verify
+version-etc
+version-etc-fsf
+warnings
+wchar
+wcwidth
+xalloc
+xalloc-die
+xgetcwd
+xstrtod
+xstrtol
+xstrtoumax
+yesno
+'"${maintainer_modules}"
+
+# Obsolete modules we've removed.
+# memcmp memset
diff --git a/import-gnulib.sh b/import-gnulib.sh
new file mode 100755 (executable)
index 0000000..8bf9a10
--- /dev/null
@@ -0,0 +1,423 @@
+#! /bin/sh
+#
+# import-gnulib.sh -- imports a copy of gnulib into findutils
+# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010 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 script is intended to populate the "gnulib" directory
+# with a subset of the gnulib code, as provided by "gnulib-tool".
+#
+# To use it, just run this script with the top-level sourec directory
+# as your working directory.
+
+# If CDPATH is set, it will sometimes print the name of the directory
+# to which you have moved.  Unsetting CDPATH prevents this, as does
+# prefixing it with ".".
+unset CDPATH
+
+## Defaults
+# cvsdir=/doesnotexist
+git_repo="git://git.savannah.gnu.org/gnulib.git"
+configfile="./import-gnulib.config"
+need_checkout=yes
+gnulib_changed=false
+
+# If $GIT_CLONE_DEPTH is not set, apply a default.
+: ${GIT_CLONE_DEPTH:=4}
+
+
+# Remember arguments for comments we inject into output files
+original_cmd_line_args="$@"
+
+usage() {
+    cat >&2 <<EOF
+usage: $0 [-d gnulib-directory]
+
+The default behaviour is to check out the Gnulib code via anonymous
+CVS (or update it if there is a version already checked out).  The
+checkout or update is performed to the gnulib version indicated in
+the configuration file $configfile.
+
+If you wish to work with a different version of gnulib, use the -d option
+to specify the directory containing the gnulib code.
+EOF
+}
+
+
+do_checkout () {
+    local gitdir="$1"
+    echo checking out gnulib from GIT in $gitdir
+
+    if [ -z "$gnulib_version" ] ; then
+       echo "Error: There should be a gnulib_version setting in $configfile, but there is not." >&2
+       exit 1
+    fi
+
+
+    if ! [ -d "$gitdir" ] ; then
+       if mkdir "$gitdir" ; then
+       echo "Created $gitdir"
+       else
+       echo "Failed to create $gitdir" >&2
+       exit 1
+       fi
+    fi
+
+    # Change directory unconditionally before issuing git commands, because
+    # we're dealing with two git repositories; the gnulib one and the
+    # findutils one.
+
+    if ( cd $gitdir && test -d gnulib/.git ; ) ; then
+      echo "Git repository was already initialised."
+    else
+      echo "Cloning the git repository..."
+      ( cd $gitdir && git clone --depth="${GIT_CLONE_DEPTH}" "$git_repo" ; )
+    fi
+
+    if ( cd $gitdir/gnulib &&
+           git diff --name-only --exit-code "$gnulib_version" ; ) ; then
+        # We are already at the correct version.
+        # Nothing to do
+        gnulib_changed=false
+        echo "Already at gnulib version $gnulib_version; no change"
+    else
+        gnulib_changed=true
+        set -x
+        ( cd $gitdir/gnulib &&
+           git fetch origin &&
+           git checkout "$gnulib_version" ; )
+        set +x
+    fi
+}
+
+run_gnulib_tool() {
+    local tool="$1"
+    if test -f "$tool"
+    then
+       true
+    else
+       echo "$tool does not exist, did you specify the right directory?" >&2
+       exit 1
+    fi
+
+    if test -x "$tool"
+    then
+       true
+    else
+       echo "$tool is not executable" >&2
+       exit 1
+    fi
+
+
+    if [ -d gnulib ]
+    then
+       echo "Warning: directory gnulib already exists." >&2
+    else
+       mkdir gnulib
+    fi
+
+    set -x
+    if "$tool" --import --symlink --with-tests --dir=. --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 --local-dir=gnulib-local $modules
+    then
+       set +x
+    else
+       set +x
+       echo "$tool failed, exiting." >&2
+       exit 1
+    fi
+
+    # gnulib-tool does not remove broken symlinks leftover from previous runs;
+    # this assumes GNU find, but should be a safe no-op if it is not
+    find -L gnulib -lname '*' -delete 2>/dev/null || :
+}
+
+rehack() {
+    printf "Updating the license of $1... "
+    # Use cp to get the permissions right first
+    cp -fp "$1" "$1".new
+    sed -e  \
+'s/Free Software Foundation\([;,]\) either ''version [2]/Free Software Foundation\1 either version 3/' < "$1" > "$1".new
+    if cmp "$1" "$1".new >/dev/null
+    then
+       echo "no change needed."
+       rm -f "$1".new
+    else
+       rm -f "$1" && mv "$1".new "$1"
+       echo "done."
+    fi
+}
+
+
+
+copyhack() {
+    src="$1"
+    dst="$2"
+    shift 2
+    if test -d "$dst"
+    then
+       dst="$dst"/"$(basename $src)"
+    fi
+    cp -fp "$src" "$dst" && rehack "$dst"
+}
+
+
+update_licenses() {
+    for f in $gpl3_update_files
+    do
+      rehack "$f" || exit
+    done
+}
+
+
+
+hack_gnulib_tool_output() {
+    local gnulibdir="${1}"
+    for file in $extra_files; do
+      case $file in
+       */mdate-sh | */texinfo.tex) dest=doc;;
+       *) dest=build-aux;;
+      esac
+      copyhack "${gnulibdir}"/"$file" "$dest" || exit
+    done
+
+    cat > gnulib/Makefile.am <<EOF
+# Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Automake, under
+# the same distribution terms as the rest of that program.
+#
+# This file was generated by $0 $original_cmd_line_args.
+#
+SUBDIRS = lib
+EXTRA_DIST = m4/gnulib-cache.m4
+EOF
+}
+
+
+refresh_output_files() {
+    autopoint -f &&
+    aclocal -I m4 -I gnulib/m4     &&
+    autoheader                     &&
+    autoconf                       &&
+    automake --add-missing --copy
+}
+
+
+update_version_file() {
+    local ver
+    outfile="lib/gnulib-version.c"
+    if [ -z "$gnulib_version" ] ; then
+       ver="unknown (locally modified code; no version number available)"
+    else
+       ver="$gnulib_version"
+    fi
+
+
+    cat > "${outfile}".new <<EOF
+/* This file is automatically generated by $0 and simply records which version of gnulib we used. */
+const char * const gnulib_version = "$ver";
+EOF
+    if test -f "$outfile" ; then
+       if diff "${outfile}".new "${outfile}" > /dev/null ; then
+           rm "${outfile}".new
+           return 0
+       fi
+    fi
+    mv "${outfile}".new "${outfile}"
+}
+
+
+check_merge_driver() {
+    local config_file=".git/config"
+    fixmsg="
+
+We recommend that you use a git merge driver for the ChangeLog file.
+This simplifies the task of merging branches.
+Please see the README section in gnulib-git/gnulib/lib/git-merge-changelog.c
+
+If you've read that and don't want to use it, just set the environment variable
+DO_NOT_WANT_CHANGELOG_DRIVER.
+
+Example:
+  git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
+  git config merge.merge-changelog.driver /usr/local/bin/git-merge-changelog  %O %A %B
+  echo 'ChangeLog    merge=merge-changelog' >> .gitattributes
+"
+    if [ -z "$DO_NOT_WANT_CHANGELOG_DRIVER" ] ; then
+       if git branch | egrep -q '\* *(master|rel-)'; then
+       # We are on the master branch or a release branch.
+       # Perhaps the user is simply building from git sources.
+       # Issue our message as a warning rather than an error.
+           fatal=false
+           label="Warning"
+       else
+           fatal=true
+           label="ERROR"
+       fi
+    else
+       fatal=false
+       label="Warning"
+    fi
+    if git config --get  merge.merge-changelog.name >/dev/null ; then
+        driver="$(git config --get merge.merge-changelog.driver |
+                  sed -e 's/[   ].*//')"
+       if [ $? -eq 0 ]; then
+           if ! [ -x "$driver" ]; then
+               echo "ERROR: Merge driver $driver is not executable." >&2
+               echo "ERROR: Please fix $config_file or install $driver" >&2
+               # Always fatal - if configured, the merge driver should work.
+               exit 1
+           else
+               if [ -f .gitattributes ] ; then
+                   echo "The ChangeLog merge driver configuration seems OK."
+               else
+                   echo "$label"': you have no .gitattributes file' >&2
+                   echo "$fixmsg" >&2
+                   if $fatal; then
+                       exit 1
+                   fi
+               fi
+           fi
+       else
+           echo "$label"': There is no driver specified in [merge "merge-changelog"] in' "$config_file" >&2
+           echo "$fixmsg" >&2
+           if $fatal; then
+               exit 1
+           fi
+       fi
+    else
+       echo "$label"': There is no name specified in [merge "merge-changelog"] in' "$config_file" >&2
+       echo "$fixmsg" >&2
+       if $fatal; then
+           exit 1
+       fi
+    fi
+}
+
+
+move_cvsdir() {
+    local cvs_git_root=":pserver:anonymous@pserver.git.sv.gnu.org:/gnulib.git"
+
+    if test -d gnulib-cvs/gnulib/CVS
+    then
+      if test x"$(cat gnulib-cvs/gnulib/CVS/Root)" == x"$cvs_git_root"; then
+          # We cannot use the git-cvspserver interface because
+          # "update -D" doesn't work.
+          echo "WARNING: Migrating from git-cvs-pserver to native git..." >&2
+          savedir=gnulib-cvs.before-nativegit-migration
+      else
+          # The old CVS repository is not updated any more.
+          echo "WARNING: Migrating from old CVS repository to native git" >&2
+          savedir=gnulib-cvs.before-git-migration
+      fi
+      mv gnulib-cvs $savedir || exit 1
+      echo "Please delete $savedir eventually"
+    fi
+}
+
+
+record_config_change() {
+    # $1: name of the import-gnulib.config file
+    # $2: name of the last.config file
+    echo "Recording current config from $1 in $2"
+    if ! cp  "$1" "$2"; then
+       rm -f "$2"
+       false
+    fi
+}
+
+
+main() {
+    ## Option parsing
+    local gnulibdir=/doesnotexist
+    while getopts "d:a" opt
+    do
+      case "$opt" in
+         d)  gnulibdir="$OPTARG" ; need_checkout=no ;;
+         a)  refresh_output_files && update_licenses ; exit $? ;;
+         **) usage; exit 1;;
+      esac
+    done
+
+    # We need the config file to tell us which modules
+    # to use, even if we don't want to know the CVS version.
+    . $configfile || exit 1
+
+    ## If -d was not given, do update
+    if [ $need_checkout = yes ] ; then
+       if ! git version > /dev/null; then
+           cat >&2 <<EOF
+You now need the tool 'git' in order to check out the correct version
+of the gnulib code.  See http://git.or.cz/ for more information about git.
+EOF
+           exit 1
+       fi
+       move_cvsdir
+       do_checkout gnulib-git
+       check_merge_driver
+       gnulibdir=gnulib-git/gnulib
+    else
+       echo "Warning: using gnulib code which already exists in $gnulibdir" >&2
+    fi
+
+    ## If the config file changed since we last imported, or the gnulib
+    ## code itself changed, we will need to re-run gnulib-tool.
+    lastconfig="./gnulib/last.config"
+    config_changed=false
+    if "$gnulib_changed" ; then
+       echo "The gnulib code changed, we need to re-import it."
+    else
+       if test -e "$lastconfig" ; then
+           if cmp "$lastconfig" "$configfile" ; then
+               echo "Both gnulib and the import config are unchanged."
+           else
+               echo "The gnulib import config was changed."
+               echo "We need to re-run gnulib-tool."
+               config_changed=true
+           fi
+       else
+           echo "$lastconfig does not exist, we need to run gnulib-tool."
+           config_changed=true
+       fi
+    fi
+
+    ## Invoke gnulib-tool to import the code.
+    local tool="${gnulibdir}"/gnulib-tool
+    if $gnulib_changed || $config_changed ; then
+       if run_gnulib_tool "${tool}" &&
+           hack_gnulib_tool_output "${gnulibdir}" &&
+           refresh_output_files &&
+           update_licenses &&
+           update_version_file &&
+           record_config_change "$configfile" "$lastconfig"
+       then
+           echo Done.
+       else
+           echo FAILED >&2
+           exit 1
+       fi
+    else
+       echo "No change to the gnulib code or configuration."
+       echo "Therefore, no need to run gnulib-tool."
+    fi
+}
+
+main "$@"
diff --git a/lib/Makefile.am b/lib/Makefile.am
new file mode 100644 (file)
index 0000000..79c431a
--- /dev/null
@@ -0,0 +1,53 @@
+## 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
+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
+endif
+
+libfind_a_SOURCES = gnulib-version.c findutils-version.c
+EXTRA_DIST = extendbuf.h savedirinfo.h buildcmd.h \
+       gnulib-version.h gnulib-version.c findutils-version.h \
+       fdleak.h unused-result.h check-regexprops.sh
+BUILT_SOURCES = gnulib-version.c
+SUFFIXES =
+MOSTLYCLEANFILES =
+CLEANFILES = check-regexprops
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+
+INCLUDES = -I../gnulib/lib -I$(top_srcdir)/gnulib/lib
+LDADD = ../gnulib/lib/libgnulib.a $(LIBINTL)
+
+libfind_a_SOURCES += nextelem.h printquoted.h listfile.h \
+       regextype.h dircallback.h safe-atoi.h arg-max.h
+libfind_a_SOURCES += listfile.c nextelem.c extendbuf.c buildcmd.c savedirinfo.c \
+       forcefindlib.c qmark.c printquoted.c regextype.c dircallback.c fdleak.c \
+       safe-atoi.c
+
+EXTRA_DIST += waitpid.c forcefindlib.c
+TESTS_ENVIRONMENT = REGEXPROPS=regexprops$(EXEEXT)
+libfind_a_LIBADD = @FINDLIBOBJS@
+libfind_a_DEPENDENCIES = @FINDLIBOBJS@
+# libfind_la_LIBADD = @LTFINDLIBOBJS@
+
+# libfind_a_OBJECTS  += @FINDLIBOBJS@
+# libfind_la_OBJECTS += @LTFINDLIBOBJS@
+
+check-regexprops: check-regexprops.sh
+       cp  $(srcdir)/check-regexprops.sh check-regexprops
+       chmod +x check-regexprops
diff --git a/lib/Makefile.in b/lib/Makefile.in
new file mode 100644 (file)
index 0000000..e08474f
--- /dev/null
@@ -0,0 +1,1608 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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)
+# 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
+subdir = lib
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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)
+AR = ar
+ARFLAGS = cru
+libfind_a_AR = $(AR) $(ARFLAGS)
+am_libfind_a_OBJECTS = gnulib-version.$(OBJEXT) \
+       findutils-version.$(OBJEXT) listfile.$(OBJEXT) \
+       nextelem.$(OBJEXT) extendbuf.$(OBJEXT) buildcmd.$(OBJEXT) \
+       savedirinfo.$(OBJEXT) forcefindlib.$(OBJEXT) qmark.$(OBJEXT) \
+       printquoted.$(OBJEXT) regextype.$(OBJEXT) \
+       dircallback.$(OBJEXT) fdleak.$(OBJEXT) safe-atoi.$(OBJEXT)
+libfind_a_OBJECTS = $(am_libfind_a_OBJECTS)
+am_regexprops_OBJECTS = regexprops.$(OBJEXT) regextype.$(OBJEXT)
+regexprops_OBJECTS = $(am_regexprops_OBJECTS)
+regexprops_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+regexprops_DEPENDENCIES = ../gnulib/lib/libgnulib.a \
+       $(am__DEPENDENCIES_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)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libfind_a_SOURCES) $(regexprops_SOURCES)
+DIST_SOURCES = $(libfind_a_SOURCES) $(regexprops_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = -I../gnulib/lib -I$(top_srcdir)/gnulib/lib
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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
+TESTS = $(am__append_1)
+libfind_a_SOURCES = gnulib-version.c findutils-version.c nextelem.h \
+       printquoted.h listfile.h regextype.h dircallback.h safe-atoi.h \
+       arg-max.h listfile.c nextelem.c extendbuf.c buildcmd.c \
+       savedirinfo.c forcefindlib.c qmark.c printquoted.c regextype.c \
+       dircallback.c fdleak.c safe-atoi.c
+EXTRA_DIST = extendbuf.h savedirinfo.h buildcmd.h gnulib-version.h \
+       gnulib-version.c findutils-version.h fdleak.h unused-result.h \
+       check-regexprops.sh waitpid.c forcefindlib.c
+BUILT_SOURCES = gnulib-version.c
+SUFFIXES = 
+MOSTLYCLEANFILES = 
+CLEANFILES = check-regexprops
+DISTCLEANFILES = 
+MAINTAINERCLEANFILES = 
+LDADD = ../gnulib/lib/libgnulib.a $(LIBINTL)
+TESTS_ENVIRONMENT = REGEXPROPS=regexprops$(EXEEXT)
+libfind_a_LIBADD = @FINDLIBOBJS@
+libfind_a_DEPENDENCIES = @FINDLIBOBJS@
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(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) 
+       -rm -f libfind.a
+       $(libfind_a_AR) libfind.a $(libfind_a_OBJECTS) $(libfind_a_LIBADD)
+       $(RANLIB) libfind.a
+
+clean-checkPROGRAMS:
+       -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+regexprops$(EXEEXT): $(regexprops_OBJECTS) $(regexprops_DEPENDENCIES) 
+       @rm -f regexprops$(EXEEXT)
+       $(LINK) $(regexprops_OBJECTS) $(regexprops_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)/gnulib-version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listfile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nextelem.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)/savedirinfo.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+       srcdir=$(srcdir); export srcdir; \
+       list=' $(TESTS) '; \
+       $(am__tty_colors); \
+       if test -n "$$list"; then \
+         for tst in $$list; do \
+           if test -f ./$$tst; then dir=./; \
+           elif test -f $$tst; then dir=; \
+           else dir="$(srcdir)/"; fi; \
+           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *[\ \     ]$$tst[\ \      ]*) \
+               xpass=`expr $$xpass + 1`; \
+               failed=`expr $$failed + 1`; \
+               col=$$red; res=XPASS; \
+             ;; \
+             *) \
+               col=$$grn; res=PASS; \
+             ;; \
+             esac; \
+           elif test $$? -ne 77; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *[\ \     ]$$tst[\ \      ]*) \
+               xfail=`expr $$xfail + 1`; \
+               col=$$lgn; res=XFAIL; \
+             ;; \
+             *) \
+               failed=`expr $$failed + 1`; \
+               col=$$red; res=FAIL; \
+             ;; \
+             esac; \
+           else \
+             skip=`expr $$skip + 1`; \
+             col=$$blu; res=SKIP; \
+           fi; \
+           echo "$${col}$$res$${std}: $$tst"; \
+         done; \
+         if test "$$all" -eq 1; then \
+           tests="test"; \
+           All=""; \
+         else \
+           tests="tests"; \
+           All="All "; \
+         fi; \
+         if test "$$failed" -eq 0; then \
+           if test "$$xfail" -eq 0; then \
+             banner="$$All$$all $$tests passed"; \
+           else \
+             if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+             banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+           fi; \
+         else \
+           if test "$$xpass" -eq 0; then \
+             banner="$$failed of $$all $$tests failed"; \
+           else \
+             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+             banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+           fi; \
+         fi; \
+         dashes="$$banner"; \
+         skipped=""; \
+         if test "$$skip" -ne 0; then \
+           if test "$$skip" -eq 1; then \
+             skipped="($$skip test was not run)"; \
+           else \
+             skipped="($$skip tests were not run)"; \
+           fi; \
+           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$skipped"; \
+         fi; \
+         report=""; \
+         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+           report="Please report to $(PACKAGE_BUGREPORT)"; \
+           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$report"; \
+         fi; \
+         dashes=`echo "$$dashes" | sed s/./=/g`; \
+         if test "$$failed" -eq 0; then \
+           echo "$$grn$$dashes"; \
+         else \
+           echo "$$red$$dashes"; \
+         fi; \
+         echo "$$banner"; \
+         test -z "$$skipped" || echo "$$skipped"; \
+         test -z "$$report" || echo "$$report"; \
+         echo "$$dashes$$std"; \
+         test "$$failed" -eq 0; \
+       else :; fi
+
+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: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) 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:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+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 "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic 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: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+       clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES ctags \
+       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 \
+       tags uninstall uninstall-am
+
+# libfind_la_LIBADD = @LTFINDLIBOBJS@
+
+# libfind_a_OBJECTS  += @FINDLIBOBJS@
+# libfind_la_OBJECTS += @LTFINDLIBOBJS@
+
+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/arg-max.h b/lib/arg-max.h
new file mode 100644 (file)
index 0000000..1d4d412
--- /dev/null
@@ -0,0 +1,49 @@
+/* arg-max.h -- ARG_MAX and _SC_ARG_MAX checks and manipulations
+
+   Copyright (C) 2010 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_ARG_MAX_H
+#define INC_ARG_MAX_H 1
+
+#include <unistd.h>            /* for sysconf() */
+
+#ifdef __INTERIX
+/* On Interix, _SC_ARG_MAX yields a value that (according to
+ * http://lists.gnu.org/archive/html/bug-findutils/2010-10/msg00047.html)
+ * actually does not work (i.e. it is larger than the real limit).
+ * The value of ARG_MAX is reportedly smaller than the real limit.
+ *
+ * I considered a configure test for this which allocates an argument
+ * list longer than ARG_MAX but shorter than _SC_ARG_MAX and then
+ * tries to exec something, but this will not work for us when
+ * cross-compiling if the target is Interix.
+ *
+ * Although buildcmd has heuristics for dealing with the possibility
+ * that execve fails due to length limits in the implementation, it
+ * assumed that changes are only necessary if execve fails with errno
+ * set to E2BIG.  On Interix, this failure mode of execve appears to
+ * set errno to ENOMEM.
+ *
+ * Since we may undefine _SC_ARG_MAX, we must include this header after
+ * unistd.h.
+ */
+# undef _SC_ARG_MAX
+# define BC_SC_ARG_MAX_IS_UNRELIABLE 1
+#endif
+
+#endif
diff --git a/lib/buildcmd.c b/lib/buildcmd.c
new file mode 100644 (file)
index 0000000..44adb41
--- /dev/null
@@ -0,0 +1,663 @@
+/* buildcmd.c -- build command lines from a list of arguments.
+   Copyright (C) 1990, 91, 92, 93, 94, 2000, 2003, 2005, 2006,
+                 2007, 2008, 2010 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/>.
+*/
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <locale.h>
+#include <stdbool.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
+
+#ifndef _POSIX_SOURCE
+#include <sys/param.h>
+#endif
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+/* The presence of unistd.h is assumed by gnulib these days, so we
+ * might as well assume it too.
+ */
+/* for sysconf() */
+#include <unistd.h>
+
+#include <assert.h>
+
+/* 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(ARG_MAX) && defined(NCARGS)
+#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"
+#define ARG_MAX NCARGS
+#endif
+
+
+
+#include <xalloc.h>
+#include <errno.h>
+#include <error.h>
+#include <openat.h>
+
+#include "xstrtol.h"
+#include "buildcmd.h"
+#include "arg-max.h"           /* must include after unistd.h. */
+
+
+extern char **environ;
+
+static 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 > 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;
+#endif
+
+  if (val > 0)
+    return val;
+
+  /* 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. */
+bool
+bc_args_exceed_testing_limit (const 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 (file)
index 0000000..95dcd71
--- /dev/null
@@ -0,0 +1,144 @@
+/* buildcmd.[ch] -- build command lines from a stream of arguments
+   Copyright (C) 2005, 2008, 2010 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.  */
+  int cmd_argc;                        /* 0 */
+
+  /* The list of args being built.  */
+  char **cmd_argv; /* NULL */
+
+  /* Number of elements allocated for `cmd_argv'.  */
+  int 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. */
+  int largest_successful_arg_count;
+  int 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!
+   */
+  long 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.  */
+  char *replace_pat;
+
+  /* Number of initial arguments given on the command line.  */
+  int 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.  */
+  long lines_per_exec;         /* 0 */
+
+  /* The maximum number of arguments to use per command line.  */
+  long 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(const char **argv);
+
+
+#endif
diff --git a/lib/check-regexprops.sh b/lib/check-regexprops.sh
new file mode 100755 (executable)
index 0000000..c245759
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+#
+# Generate regexprops.texi and compare it against the checked-in version.
+#
+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 (file)
index 0000000..c1e4088
--- /dev/null
@@ -0,0 +1,106 @@
+/* listfile.c -- run a function in a specific directory
+   Copyright (C) 2007, 2008, 2009, 2010 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.
+ */
+
+
+#include <config.h>
+
+
+#include "openat.h"
+#include <stdarg.h>
+#include <stddef.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <locale.h>
+
+#include "fcntl--.h"
+#include "save-cwd.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 (file)
index 0000000..d2f74c4
--- /dev/null
@@ -0,0 +1,27 @@
+/* listfile.h -- display a long listing of a file
+   Copyright (C) 2007, 2008, 2010 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 (struct saved_cwd*, int (*callback)(void*), void *usercontext);
+
+#endif
diff --git a/lib/extendbuf.c b/lib/extendbuf.c
new file mode 100644 (file)
index 0000000..40ac8a5
--- /dev/null
@@ -0,0 +1,119 @@
+/* extendbuf.c -- manage a dynamically-allocated buffer
+
+   Copyright 2004, 2010 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>. */
+
+#include <config.h>
+
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <errno.h>
+
+#include "xalloc.h"
+#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 uninitialised 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 (file)
index 0000000..8d495a6
--- /dev/null
@@ -0,0 +1,26 @@
+/* extendbuf.h -- Manage a dynamically-alloicated buffer
+
+   Copyright (C) 2004, 2010 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 (file)
index 0000000..ac8d8b0
--- /dev/null
@@ -0,0 +1,381 @@
+/* fdleak.c -- detect file descriptor leaks
+   Copyright (C) 2010 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/>.
+*/
+
+#include <config.h>
+#include <unistd.h>
+#include <poll.h>
+#include <fcntl.h>
+#if defined (HAVE_SYS_RESOURCE_H)
+#include <sys/resource.h>
+#endif
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <stdbool.h>
+
+#include "fcntl--.h"
+#include "dirent-safer.h"
+#include "extendbuf.h"
+#include "cloexec.h"
+#include "safe-atoi.h"
+#include "fdleak.h"
+#include "error.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;
+
+
+#if !defined(O_CLOEXEC)
+#define O_CLOEXEC 0
+#endif
+
+/* Determine the value of the largest open fd, on systems that
+ * offer /proc/self/fd. */
+static int
+get_proc_max_fd ()
+{
+  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_GETRUSAGE) && 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 i;
+         for (i=0; i<limit; i++)
+           {
+             if (pf[i].revents != POLLNVAL)
+               {
+                 if (0 != (rv = callback (pf[i].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 (file)
index 0000000..1ea8c8d
--- /dev/null
@@ -0,0 +1,22 @@
+/* fdleak.h -- detect file descriptor leaks
+   Copyright (C) 2010 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 (file)
index 0000000..f3ada25
--- /dev/null
@@ -0,0 +1,65 @@
+/* findutils-version.c -- show version information for findutils
+   Copyright (C) 2007, 2010 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/>.
+*/
+
+#include <config.h>
+#include "stdio-safer.h"
+#include "version-etc.h"
+#include "gnulib-version.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
+
+
+
+#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;
+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);
+  printf (_("Built using GNU gnulib version %s\n"), gnulib_version);
+}
diff --git a/lib/findutils-version.h b/lib/findutils-version.h
new file mode 100644 (file)
index 0000000..65006c2
--- /dev/null
@@ -0,0 +1,27 @@
+/* findutils-version.h -- show version information for findutils
+   Copyright (C) 2007, 2010 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 (file)
index 0000000..63199c8
--- /dev/null
@@ -0,0 +1,47 @@
+/* Ensures that the FINDLIB_REPLACE_FUNCS macro in configure.in works
+   Copyright (C) 2004, 2010 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/gnulib-version.c b/lib/gnulib-version.c
new file mode 100644 (file)
index 0000000..7be8c28
--- /dev/null
@@ -0,0 +1,2 @@
+/* This file is automatically generated by import-gnulib.sh and simply records which version of gnulib we used. */
+const char * const gnulib_version = "25d7f3a59bfdc7aaca4a016f687826883a55bef3";
diff --git a/lib/gnulib-version.h b/lib/gnulib-version.h
new file mode 100644 (file)
index 0000000..73466c3
--- /dev/null
@@ -0,0 +1,18 @@
+/* gnulib-version.h
+   Copyright (C) 2007, 2010 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/>.
+*/
+
+extern const char * const gnulib_version;
diff --git a/lib/listfile.c b/lib/listfile.c
new file mode 100644 (file)
index 0000000..2e18aae
--- /dev/null
@@ -0,0 +1,348 @@
+/* listfile.c -- display a long listing of a file
+   Copyright (C) 1991, 1993, 2000, 2004, 2005, 2007,
+                 2008, 2010 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/>.
+*/
+
+#include <config.h>
+
+#include <alloca.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <pwd.h>
+#include <grp.h>
+#include <time.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <unistd.h> /* for readlink() */
+#include <openat.h>
+#include <locale.h>
+
+#include "human.h"
+#include "pathmax.h"
+#include "error.h"
+#include "filemode.h"
+#include "idcache.h"
+#include "areadlink.h"
+
+#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
+
+
+
+/* Get or fake the disk device blocksize.
+   Usually defined by sys/param.h (if at all).  */
+#ifndef DEV_BSIZE
+# ifdef BSIZE
+#  define DEV_BSIZE BSIZE
+# else /* !BSIZE */
+#  define DEV_BSIZE 4096
+# endif /* !BSIZE */
+#endif /* !DEV_BSIZE */
+
+/* Extract or fake data from a `struct stat'.
+   ST_BLKSIZE: Preferred I/O blocksize for the file, in bytes.
+   ST_NBLOCKS: Number of blocks in the file, including indirect blocks.
+   ST_NBLOCKSIZE: Size of blocks used when calculating ST_NBLOCKS.  */
+#ifndef HAVE_STRUCT_STAT_ST_BLOCKS
+# define ST_BLKSIZE(statbuf) DEV_BSIZE
+# if defined _POSIX_SOURCE || !defined BSIZE /* fileblocks.c uses BSIZE.  */
+#  define ST_NBLOCKS(statbuf) \
+  (S_ISREG ((statbuf).st_mode) \
+   || S_ISDIR ((statbuf).st_mode) \
+   ? (statbuf).st_size / ST_NBLOCKSIZE + ((statbuf).st_size % ST_NBLOCKSIZE != 0) : 0)
+# else /* !_POSIX_SOURCE && BSIZE */
+#  define ST_NBLOCKS(statbuf) \
+  (S_ISREG ((statbuf).st_mode) \
+   || S_ISDIR ((statbuf).st_mode) \
+   ? st_blocks ((statbuf).st_size) : 0)
+# endif /* !_POSIX_SOURCE && BSIZE */
+#else /* HAVE_STRUCT_STAT_ST_BLOCKS */
+/* Some systems, like Sequents, return st_blksize of 0 on pipes. */
+# define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \
+                              ? (statbuf).st_blksize : DEV_BSIZE)
+# if defined hpux || defined __hpux__ || defined __hpux
+/* HP-UX counts st_blocks in 1024-byte units.
+   This loses when mixing HP-UX and BSD filesystems with NFS.  */
+#  define ST_NBLOCKSIZE 1024
+# else /* !hpux */
+#  if defined _AIX && defined _I386
+/* AIX PS/2 counts st_blocks in 4K units.  */
+#   define ST_NBLOCKSIZE (4 * 1024)
+#  else /* not AIX PS/2 */
+#   if defined _CRAY
+#    define ST_NBLOCKS(statbuf) \
+  (S_ISREG ((statbuf).st_mode) \
+   || S_ISDIR ((statbuf).st_mode) \
+   ? (statbuf).st_blocks * ST_BLKSIZE(statbuf)/ST_NBLOCKSIZE : 0)
+#   endif /* _CRAY */
+#  endif /* not AIX PS/2 */
+# endif /* !hpux */
+#endif /* HAVE_STRUCT_STAT_ST_BLOCKS */
+
+#ifndef ST_NBLOCKS
+# define ST_NBLOCKS(statbuf) \
+  (S_ISREG ((statbuf).st_mode) \
+   || S_ISDIR ((statbuf).st_mode) \
+   ? (statbuf).st_blocks : 0)
+#endif
+
+#ifndef ST_NBLOCKSIZE
+# define ST_NBLOCKSIZE 512
+#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
+
+
+static void print_name (register const char *p, FILE *stream, int literal_control_chars);
+
+
+size_t
+file_blocksize (const struct stat *p)
+{
+  return ST_NBLOCKSIZE;
+}
+
+
+
+/* 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];
+
+#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
+
+  fprintf (stream, "%6s ",
+          human_readable ((uintmax_t) statp->st_ino, hbuf,
+                          human_ceiling,
+                          1, 1));
+
+  fprintf (stream, "%4s ",
+          human_readable ((uintmax_t) ST_NBLOCKS (*statp), hbuf,
+                          human_ceiling,
+                          ST_NBLOCKSIZE, output_block_size));
+
+
+  /* modebuf includes the space between the mode and the number of links,
+     as the POSIX "optional alternate access method flag".  */
+  fprintf (stream, "%s%3lu ", modebuf, (unsigned long) statp->st_nlink);
+
+  user_name = getuser (statp->st_uid);
+  if (user_name)
+    fprintf (stream, "%-8s ", user_name);
+  else
+    fprintf (stream, "%-8lu ", (unsigned long) statp->st_uid);
+
+  group_name = getgroup (statp->st_gid);
+  if (group_name)
+    fprintf (stream, "%-8s ", group_name);
+  else
+    fprintf (stream, "%-8lu ", (unsigned long) statp->st_gid);
+
+  if (S_ISCHR (statp->st_mode) || S_ISBLK (statp->st_mode))
+#ifdef HAVE_ST_RDEV
+    fprintf (stream, "%3lu, %3lu ",
+            (unsigned long) major (statp->st_rdev),
+            (unsigned long) minor (statp->st_rdev));
+#else
+    fprintf (stream, "         ");
+#endif
+  else
+    fprintf (stream, "%8s ",
+            human_readable ((uintmax_t) statp->st_size, hbuf,
+                            human_ceiling,
+                            1,
+                            output_block_size < 0 ? output_block_size : 1));
+
+  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);
+
+      fprintf (stream, "%s ", buf);
+    }
+  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);
+         fprintf (stream, "%*s%s ",
+                  sign_width < 0 ? 0 : sign_width, "-", num);
+       }
+      else
+       fprintf (stream, "%*s ", width,
+                human_readable ((uintmax_t) statp->st_mtime, hbuf,
+                                human_ceiling,
+                                1, 1));
+    }
+
+  print_name (name, stream, literal_control_chars);
+
+  if (S_ISLNK (statp->st_mode))
+    {
+      char *linkname = areadlinkat (dir_fd, relname);
+      if (linkname)
+       {
+         fputs (" -> ", stream);
+         print_name (linkname, stream, literal_control_chars);
+       }
+      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);
+    }
+  putc ('\n', stream);
+}
+
+
+static void
+print_name_without_quoting (const char *p, FILE *stream)
+{
+  fprintf (stream, "%s", p);
+}
+
+
+static void
+print_name_with_quoting (register const char *p, FILE *stream)
+{
+  register unsigned char c;
+
+  while ((c = *p++) != '\0')
+    {
+      switch (c)
+       {
+       case '\\':
+         fprintf (stream, "\\\\");
+         break;
+
+       case '\n':
+         fprintf (stream, "\\n");
+         break;
+
+       case '\b':
+         fprintf (stream, "\\b");
+         break;
+
+       case '\r':
+         fprintf (stream, "\\r");
+         break;
+
+       case '\t':
+         fprintf (stream, "\\t");
+         break;
+
+       case '\f':
+         fprintf (stream, "\\f");
+         break;
+
+       case ' ':
+         fprintf (stream, "\\ ");
+         break;
+
+       case '"':
+         fprintf (stream, "\\\"");
+         break;
+
+       default:
+         if (c > 040 && c < 0177)
+           putc (c, stream);
+         else
+           fprintf (stream, "\\%03o", (unsigned int) c);
+       }
+    }
+}
+
+static void print_name (register const char *p, FILE *stream, int literal_control_chars)
+{
+  if (literal_control_chars)
+    print_name_without_quoting (p, stream);
+  else
+    print_name_with_quoting (p, stream);
+}
diff --git a/lib/listfile.h b/lib/listfile.h
new file mode 100644 (file)
index 0000000..4861930
--- /dev/null
@@ -0,0 +1,27 @@
+/* listfile.h -- display a long listing of a file
+   Copyright (C) 1991, 1993, 2000, 2008, 2010 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);
+
+size_t file_blocksize(const struct stat *p);
+
+#endif
diff --git a/lib/nextelem.c b/lib/nextelem.c
new file mode 100644 (file)
index 0000000..0840c28
--- /dev/null
@@ -0,0 +1,85 @@
+/* Return the next element of a path.
+   Copyright (C) 1992, 2005, 2010 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 David MacKenzie <djm@gnu.org>,
+   inspired by John P. Rouillard <rouilj@cs.umb.edu>.  */
+
+#include <config.h>
+
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+
+#include "nextelem.h"
+
+
+/* Return the next element of a colon-separated path.
+   A null entry in the path is equivalent to "." (the current directory).
+
+   If NEW_PATH is non-NULL, set the path and return NULL.
+   If NEW_PATH is NULL, return the next item in the string, or
+   return NULL if there are no more elements.  */
+
+char *
+next_element (const char *new_path, int curdir_ok)
+{
+  static char *path = NULL;    /* Freshly allocated copy of NEW_PATH.  */
+  static char *end;            /* Start of next element to return.  */
+  static int final_colon;      /* If zero, path didn't end with a colon.  */
+  char *start;                 /* Start of path element to return.  */
+
+  if (new_path)
+    {
+      free (path);
+      end = path = strdup (new_path);
+      final_colon = 0;
+      return NULL;
+    }
+
+  if (*end == '\0')
+    {
+      if (final_colon)
+       {
+         final_colon = 0;
+         return curdir_ok ? "." : "";
+       }
+      return NULL;
+    }
+
+  start = end;
+  final_colon = 1;             /* Maybe there will be one.  */
+
+  end = strchr (start, ':');
+  if (end == start)
+    {
+      /* An empty path element.  */
+      *end++ = '\0';
+      return curdir_ok ? "." : "";
+    }
+  else if (end == NULL)
+    {
+      /* The last path element.  */
+      end = strchr (start, '\0');
+      final_colon = 0;
+    }
+  else
+    *end++ = '\0';
+
+  return start;
+}
diff --git a/lib/nextelem.h b/lib/nextelem.h
new file mode 100644 (file)
index 0000000..a7aeb14
--- /dev/null
@@ -0,0 +1,26 @@
+/* Return the next element of a path.
+   Copyright (C) 1992, 2010 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 David MacKenzie <djm@gnu.org>,
+   inspired by John P. Rouillard <rouilj@cs.umb.edu>.  */
+
+#ifndef INC_NEXTELEM_H
+#define INC_NEXTELEM_H 1
+
+char *next_element (const char *path, int curdir_ok);
+
+#endif
diff --git a/lib/printquoted.c b/lib/printquoted.c
new file mode 100644 (file)
index 0000000..f2f11a4
--- /dev/null
@@ -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 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/>.
+*/
+
+#include <config.h>
+
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+
+#include "xalloc.h"
+#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 (file)
index 0000000..d3c16b6
--- /dev/null
@@ -0,0 +1,35 @@
+/* Print a string, appropriately quoted.
+
+   Copyright 1997, 1999, 2001, 2003, 2005, 2010 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 "quote.h"
+#include "quotearg.h"
+
+
+#include <stdbool.h>
+#include <stdio.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 (file)
index 0000000..1ffd1d7
--- /dev/null
@@ -0,0 +1,216 @@
+/* qmark.c -- quote 'dangerous' filenames
+
+   Copyright (C) 2005, 2007, 2009, 2010 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/>.
+*/
+
+#include <config.h>
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <wchar.h>
+
+#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."  */
+
+
+
+
+/* ISPRINT is defined in <sys/euc.h> on at least Solaris2.6 systems.  */
+#undef ISPRINT
+#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))
+
+#if STDC_HEADERS || (!defined (isascii) && !HAVE_ISASCII)
+# define IN_CTYPE_DOMAIN(c) 1
+#else
+# define IN_CTYPE_DOMAIN(c) isascii(c)
+#endif
+
+
+
+
+
+/* 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 (file)
index 0000000..efef3ec
--- /dev/null
@@ -0,0 +1,611 @@
+/* regexprops.c -- document the properties of the regular expressions
+   understood by gnulib.
+
+   Copyright 2005, 2007, 2010 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>. */
+
+#include <config.h>
+
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "regex.h"
+#include "regextype.h"
+#include "progname.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 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, with no Front-Cover Texts, and with 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 (file)
index 0000000..cc16b6e
--- /dev/null
@@ -0,0 +1,159 @@
+
+/* regextype.c -- Decode the name of a regular expression syntax into am
+                  option name.
+
+   Copyright 2005, 2010 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>. */
+
+# include <config.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "regextype.h"
+#include "regex.h"
+#include "quote.h"
+#include "xalloc.h"
+#include "error.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
+{
+  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 (file)
index 0000000..6ea101c
--- /dev/null
@@ -0,0 +1,35 @@
+/* regextype.h -- Decode the name of a regular expression syntax into am
+                  option name.
+
+   Copyright 2005, 2010 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>.
+ */
+
+int get_regex_type(const char *s);
+
+enum {
+  CONTEXT_FINDUTILS = 1u,
+  CONTEXT_GENERIC   = 2u,
+  CONTEXT_ALL = CONTEXT_GENERIC|CONTEXT_FINDUTILS,
+};
+
+
+
+const char * get_regex_type_name(unsigned int ix);
+int get_regex_type_flags(unsigned int ix);
+int get_regex_type_synonym(unsigned int ix);
+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 (file)
index 0000000..70350f7
--- /dev/null
@@ -0,0 +1,86 @@
+/* safe-atoi.c -- checked string-to-int conversion.
+   Copyright (C) 2007, 2010 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/>.
+*/
+
+#include <config.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#include "safe-atoi.h"
+#include "quotearg.h"
+#include "error.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 (file)
index 0000000..d4c6ab6
--- /dev/null
@@ -0,0 +1,25 @@
+/* safe-atoi.h -- checked string-to-int conversion.
+   Copyright (C) 2010 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/savedirinfo.c b/lib/savedirinfo.c
new file mode 100644 (file)
index 0000000..d9b6000
--- /dev/null
@@ -0,0 +1,281 @@
+/* savedirinfo.c -- Save the list of files in a directory, with additional information.
+
+   Copyright 1990, 1997, 1998, 1999, 2000, 2001, 2003, 2004,
+             2005, 2010 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>. */
+/* Derived from savedir.c, written by David MacKenzie <djm@gnu.org>. */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+/* The presence of unistd.h is assumed by gnulib these days, so we
+ * might as well assume it too.
+ */
+#include <unistd.h>
+
+#include <errno.h>
+
+#if HAVE_DIRENT_H
+# include <dirent.h>
+#else
+# define dirent direct
+# if HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+#  include <ndir.h>
+# endif
+#endif
+
+#ifdef CLOSEDIR_VOID
+/* Fake a return value. */
+# define CLOSEDIR(d) (closedir (d), 0)
+#else
+# define CLOSEDIR(d) closedir (d)
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "xalloc.h"
+#include "extendbuf.h"
+#include "dirent-safer.h"
+#include "savedirinfo.h"
+
+#if defined HAVE_STRUCT_DIRENT_D_TYPE
+/* Convert the value of struct dirent.d_type into a value for
+ * struct stat.st_mode (at least the file type bits), or zero
+ * if the type is DT_UNKNOWN or is a value we don't know about.
+ */
+static mode_t
+type_to_mode (unsigned type)
+{
+  switch (type)
+    {
+#ifdef DT_FIFO
+    case DT_FIFO: return S_IFIFO;
+#endif
+#ifdef DT_CHR
+    case DT_CHR:  return S_IFCHR;
+#endif
+#ifdef DT_DIR
+    case DT_DIR:  return S_IFDIR;
+#endif
+#ifdef DT_BLK
+    case DT_BLK:  return S_IFBLK;
+#endif
+#ifdef DT_REG
+    case DT_REG:  return S_IFREG;
+#endif
+#ifdef DT_LNK
+    case DT_LNK:  return S_IFLNK;
+#endif
+#ifdef DT_SOCK
+    case DT_SOCK: return S_IFSOCK;
+#endif
+    default:
+      return 0;                        /* Unknown. */
+    }
+}
+#endif
+
+struct new_savedir_direntry_internal
+{
+  int    flags;                        /* from SaveDirDataFlags */
+  mode_t type_info;
+  size_t buffer_offset;
+};
+
+
+
+static int
+savedir_cmp (const void *p1, const void *p2)
+{
+  const struct savedir_direntry *de1, *de2;
+  de1 = p1;
+  de2 = p2;
+  return strcmp (de1->name, de2->name); /* POSIX order, not locale order. */
+}
+
+
+static struct savedir_direntry*
+convertentries (const struct savedir_dirinfo *info,
+               struct new_savedir_direntry_internal *internal)
+{
+  char *p = info->buffer;
+  struct savedir_direntry *result;
+  int n =info->size;
+  int i;
+
+
+  result = xmalloc (sizeof (*result) * info->size);
+
+  for (i=0; i<n; ++i)
+    {
+      result[i].flags = internal[i].flags;
+      result[i].type_info = internal[i].type_info;
+      result[i].name = &p[internal[i].buffer_offset];
+    }
+  return result;
+}
+
+
+struct savedir_dirinfo *
+xsavedir (const char *dir, int flags)
+{
+  DIR *dirp;
+  struct dirent *dp;
+  struct savedir_dirinfo *result = NULL;
+  struct new_savedir_direntry_internal *internal;
+
+  size_t namebuf_allocated = 0u, namebuf_used = 0u;
+  size_t entrybuf_allocated = 0u;
+  int save_errno;
+
+  dirp = opendir_safer (dir);
+  if (dirp == NULL)
+    return NULL;
+
+  errno = 0;
+  result = xmalloc (sizeof (*result));
+  result->buffer = NULL;
+  result->size = 0u;
+  result->entries = NULL;
+  internal = NULL;
+
+  while ((dp = readdir (dirp)) != NULL)
+    {
+      /* Skip "", ".", and "..".  "" is returned by at least one buggy
+         implementation: Solaris 2.4 readdir on NFS file systems.  */
+      char const *entry = dp->d_name;
+      if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0')
+       {
+         /* Remember the name. */
+         size_t entry_size = strlen (entry) + 1;
+         result->buffer = xextendbuf (result->buffer, namebuf_used+entry_size, &namebuf_allocated);
+         memcpy ((result->buffer) + namebuf_used, entry, entry_size);
+
+         /* Remember the other stuff. */
+         internal = xextendbuf (internal, (1+result->size)*sizeof (*internal), &entrybuf_allocated);
+         internal[result->size].flags = 0;
+
+         internal[result->size].type_info = 0;
+#if defined HAVE_STRUCT_DIRENT_D_TYPE
+         internal[result->size].type_info = type_to_mode (dp->d_type);
+         if (dp->d_type != DT_UNKNOWN)
+           internal[result->size].flags |= SavedirHaveFileType;
+#endif
+         internal[result->size].buffer_offset = namebuf_used;
+
+         /* Prepare for the next iteration */
+         ++(result->size);
+         namebuf_used += entry_size;
+       }
+    }
+
+  result->buffer = xextendbuf (result->buffer, namebuf_used+1, &namebuf_allocated);
+  result->buffer[namebuf_used] = '\0';
+
+  /* convert the result to its externally-usable form. */
+  result->entries = convertentries (result, internal);
+  free (internal);
+  internal = NULL;
+
+
+  if (flags & SavedirSort)
+    {
+      qsort (result->entries,
+            result->size, sizeof (*result->entries),
+            savedir_cmp);
+    }
+
+
+  save_errno = errno;
+  if (CLOSEDIR (dirp) != 0)
+    save_errno = errno;
+  if (save_errno != 0)
+    {
+      free (result->buffer);
+      free (result);
+      errno = save_errno;
+      return NULL;
+    }
+
+  return result;
+}
+
+void free_dirinfo (struct savedir_dirinfo *p)
+{
+  free (p->entries);
+  p->entries = NULL;
+  free (p->buffer);
+  p->buffer = NULL;
+  free (p);
+}
+
+
+
+char *
+savedirinfo (const char *dir, struct savedir_extrainfo **extra)
+{
+  struct savedir_dirinfo *p = xsavedir (dir, SavedirSort);
+  char *buf, *s;
+  size_t bufbytes = 0;
+  unsigned int i;
+
+  if (p)
+    {
+      struct savedir_extrainfo *pex = xmalloc (p->size * sizeof (*extra));
+      for (i=0; i<p->size; ++i)
+       {
+         bufbytes += strlen (p->entries[i].name);
+         ++bufbytes;           /* the \0 */
+
+         pex[i].type_info = p->entries[i].type_info;
+       }
+
+      s = buf = xmalloc (bufbytes+1);
+      for (i=0; i<p->size; ++i)
+       {
+         size_t len = strlen (p->entries[i].name);
+         memcpy (s, p->entries[i].name, len);
+         s += len;
+         *s = 0;               /* Place a NUL */
+         ++s;                  /* Skip the NUL. */
+       }
+      *s = 0;                  /* final (doubled) terminating NUL */
+
+      if (extra)
+       *extra = pex;
+      else
+       free (pex);
+      return buf;
+    }
+  else
+    {
+      return NULL;
+    }
+}
diff --git a/lib/savedirinfo.h b/lib/savedirinfo.h
new file mode 100644 (file)
index 0000000..8e6c17d
--- /dev/null
@@ -0,0 +1,73 @@
+/* Save the list of files in a directory, with additional information.
+
+   Copyright 1997, 1999, 2001, 2003, 2005, 2010 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>.
+ * Based on savedir.h by David MacKenzie <djm@gnu.org>.
+ */
+
+#if !defined SAVEDIRINFO_H_
+# define SAVEDIRINFO_H_
+
+
+typedef enum tagSaveDirControlFlags
+  {
+    SavedirSort = 1
+  }
+SaveDirControlFlags;
+
+
+typedef enum tagSaveDirDataFlags
+  {
+    SavedirHaveFileType = 1
+  }
+SaveDirDataFlags;
+
+
+/* We keep the name and the type in a structure together
+ * to allow us to sort them together.
+ */
+struct savedir_direntry
+{
+  int      flags;              /* from SaveDirDataFlags */
+  char     *name;              /* the name of the directory entry */
+  mode_t   type_info;          /* the type (or zero if unknown) */
+};
+
+struct savedir_dirinfo
+{
+  char *buffer;                        /* The names are stored here. */
+  size_t size;                 /* The total number of results. */
+  struct savedir_direntry *entries;    /* The results themselves */
+};
+
+
+struct savedir_extrainfo
+{
+  mode_t type_info;
+};
+
+/* savedirinfo() is the old interface. */
+char *savedirinfo (const char *dir, struct savedir_extrainfo **extra);
+
+/* savedir() is the 'new' interface, but the function has the same name
+ * as the function from findutils 4.1.7 and 4.1.20.
+ */
+struct savedir_dirinfo * xsavedir(const char *dir, int flags);
+void free_dirinfo(struct savedir_dirinfo *p);
+
+#endif
diff --git a/lib/unused-result.h b/lib/unused-result.h
new file mode 100644 (file)
index 0000000..0aa05af
--- /dev/null
@@ -0,0 +1,39 @@
+/* unused-result.h -- macros for ensuring callers don't ignore return values
+   Copyright (C) 2010, 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 _UNUSED_RESULT_H
+# define _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 (file)
index 0000000..1645812
--- /dev/null
@@ -0,0 +1,78 @@
+/* Emulate waitpid on systems that just have wait.
+   Copyright 1994, 1995, 1998, 1999, 2010 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/>.
+*/
+#include <config.h>
+
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
+
+#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;
+}
diff --git a/locate/Makefile.am b/locate/Makefile.am
new file mode 100644 (file)
index 0000000..e3bb824
--- /dev/null
@@ -0,0 +1,71 @@
+# The default database to build and search.
+AUTOMAKE_OPTIONS = std-options
+AM_CFLAGS = $(WARN_CFLAGS)
+LOCATE_DB = $(localstatedir)/locatedb
+localedir = $(datadir)/locale
+
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = \
+       frcode$(EXEEXT) \
+       code$(EXEEXT) \
+       bigram$(EXEEXT)
+bin_PROGRAMS = locate
+libexec_PROGRAMS = frcode code bigram
+bin_SCRIPTS = updatedb
+man_MANS = locate.1 updatedb.1 locatedb.5
+BUILT_SOURCES = dblocation.texi
+EXTRA_DIST = dblocation.texi locatedb.h updatedb.sh $(man_MANS)
+CLEANFILES = updatedb
+DISTCLEANFILES = dblocation.texi
+locate_SOURCES = locate.c word_io.c
+code_SOURCES = code.c word_io.c
+locate_TEXINFOS = dblocation.texi
+
+INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\"
+
+LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL)
+
+$(PROGRAMS) $(LIBPROGRAMS): ../lib/libfind.a ../gnulib/lib/libgnulib.a
+
+# We generate updatedb from the Makefile rather than with AC_OUTPUT in
+# configure.ac in order to allow the user better control of what goes
+# into it by setting Makefile variables.
+updatedb: updatedb.sh Makefile
+       rm -f $@
+       find=`echo find|sed '$(transform)'`; \
+       frcode=`echo frcode|sed '$(transform)'`; \
+       bigram=`echo bigram|sed '$(transform)'`; \
+       code=`echo code|sed '$(transform)'`; \
+       sed \
+       -e "s,@""bindir""@,$(bindir)," \
+       -e "s,@""libexecdir""@,$(libexecdir)," \
+       -e "s,@""LOCATE_DB""@,$(LOCATE_DB)," \
+       -e "s,@""VERSION""@,@VERSION@," \
+       -e "s,@""PACKAGE_NAME""@,@PACKAGE_NAME@," \
+       -e "s,@""find""@,$${find}," \
+       -e "s,@""frcode""@,$${frcode}," \
+       -e "s,@""bigram""@,$${bigram}," \
+       -e "s,@""code""@,$${code}," \
+       -e "s,@""SORT""@,$(SORT)," \
+       -e "s,@""SORT_SUPPORTS_Z""@,$(SORT_SUPPORTS_Z)," \
+       $(srcdir)/updatedb.sh > $@
+       chmod +x $@
+
+install-data-hook:
+       $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
+
+dblocation.texi:
+       echo '@set LOCATE_DB $(LOCATE_DB)' > $@.tmp
+       if test -f $@ && cmp $@.tmp $@ >/dev/null ; then \
+               rm $@.tmp ;             \
+       else                            \
+               mv $@.tmp $@ ;          \
+       fi
+.PHONY: dblocation.texi
+
+SUBDIRS = . testsuite
+
+dist-hook: findutils-check-manpages
+
+findutils-check-manpages:
+       $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)
+
diff --git a/locate/Makefile.in b/locate/Makefile.in
new file mode 100644 (file)
index 0000000..1c8dd7c
--- /dev/null
@@ -0,0 +1,1979 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+bin_PROGRAMS = locate$(EXEEXT)
+libexec_PROGRAMS = frcode$(EXEEXT) code$(EXEEXT) bigram$(EXEEXT)
+subdir = locate
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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 =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+       "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
+       "$(DESTDIR)$(man5dir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS)
+bigram_SOURCES = bigram.c
+bigram_OBJECTS = bigram.$(OBJEXT)
+bigram_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+bigram_DEPENDENCIES = ../lib/libfind.a ../gnulib/lib/libgnulib.a \
+       $(am__DEPENDENCIES_1)
+am_code_OBJECTS = code.$(OBJEXT) word_io.$(OBJEXT)
+code_OBJECTS = $(am_code_OBJECTS)
+code_LDADD = $(LDADD)
+code_DEPENDENCIES = ../lib/libfind.a ../gnulib/lib/libgnulib.a \
+       $(am__DEPENDENCIES_1)
+frcode_SOURCES = frcode.c
+frcode_OBJECTS = frcode.$(OBJEXT)
+frcode_LDADD = $(LDADD)
+frcode_DEPENDENCIES = ../lib/libfind.a ../gnulib/lib/libgnulib.a \
+       $(am__DEPENDENCIES_1)
+am_locate_OBJECTS = locate.$(OBJEXT) word_io.$(OBJEXT)
+locate_OBJECTS = $(am_locate_OBJECTS)
+locate_LDADD = $(LDADD)
+locate_DEPENDENCIES = ../lib/libfind.a ../gnulib/lib/libgnulib.a \
+       $(am__DEPENDENCIES_1)
+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'
+SCRIPTS = $(bin_SCRIPTS)
+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)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = bigram.c $(code_SOURCES) frcode.c $(locate_SOURCES)
+DIST_SOURCES = bigram.c $(code_SOURCES) frcode.c $(locate_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+man1dir = $(mandir)/man1
+man5dir = $(mandir)/man5
+NROFF = nroff
+MANS = $(man_MANS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\"
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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 = $(datadir)/locale
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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@
+
+# The default database to build and search.
+AUTOMAKE_OPTIONS = std-options
+AM_CFLAGS = $(WARN_CFLAGS)
+LOCATE_DB = $(localstatedir)/locatedb
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = \
+       frcode$(EXEEXT) \
+       code$(EXEEXT) \
+       bigram$(EXEEXT)
+
+bin_SCRIPTS = updatedb
+man_MANS = locate.1 updatedb.1 locatedb.5
+BUILT_SOURCES = dblocation.texi
+EXTRA_DIST = dblocation.texi locatedb.h updatedb.sh $(man_MANS)
+CLEANFILES = updatedb
+DISTCLEANFILES = dblocation.texi
+locate_SOURCES = locate.c word_io.c
+code_SOURCES = code.c word_io.c
+locate_TEXINFOS = dblocation.texi
+LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL)
+SUBDIRS = . testsuite
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(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 locate/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits locate/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):
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+installcheck-binPROGRAMS: $(bin_PROGRAMS)
+       bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
+         case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+          *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+         esac; \
+         f=`echo "$$p" | \
+            sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         for opt in --help --version; do \
+           if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+                2>c$${pid}_.err </dev/null \
+                && test -n "`cat c$${pid}_.out`" \
+                && test -z "`cat c$${pid}_.err`"; then :; \
+           else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+         done; \
+       done; rm -f c$${pid}_.???; exit $$bad
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+       @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+           } \
+       ; done
+
+uninstall-libexecPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+       -test -z "$(libexec_PROGRAMS)" || rm -f $(libexec_PROGRAMS)
+
+installcheck-libexecPROGRAMS: $(libexec_PROGRAMS)
+       bad=0; pid=$$$$; list="$(libexec_PROGRAMS)"; for p in $$list; do \
+         case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+          *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+         esac; \
+         f=`echo "$$p" | \
+            sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         for opt in --help --version; do \
+           if "$(DESTDIR)$(libexecdir)/$$f" $$opt >c$${pid}_.out \
+                2>c$${pid}_.err </dev/null \
+                && test -n "`cat c$${pid}_.out`" \
+                && test -z "`cat c$${pid}_.err`"; then :; \
+           else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+         done; \
+       done; rm -f c$${pid}_.???; exit $$bad
+bigram$(EXEEXT): $(bigram_OBJECTS) $(bigram_DEPENDENCIES) 
+       @rm -f bigram$(EXEEXT)
+       $(LINK) $(bigram_OBJECTS) $(bigram_LDADD) $(LIBS)
+code$(EXEEXT): $(code_OBJECTS) $(code_DEPENDENCIES) 
+       @rm -f code$(EXEEXT)
+       $(LINK) $(code_OBJECTS) $(code_LDADD) $(LIBS)
+frcode$(EXEEXT): $(frcode_OBJECTS) $(frcode_DEPENDENCIES) 
+       @rm -f frcode$(EXEEXT)
+       $(LINK) $(frcode_OBJECTS) $(frcode_LDADD) $(LIBS)
+locate$(EXEEXT): $(locate_OBJECTS) $(locate_DEPENDENCIES) 
+       @rm -f locate$(EXEEXT)
+       $(LINK) $(locate_OBJECTS) $(locate_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+            } \
+       ; done
+
+uninstall-binSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+installcheck-binSCRIPTS: $(bin_SCRIPTS)
+       bad=0; pid=$$$$; list="$(bin_SCRIPTS)"; for p in $$list; do \
+         case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+          *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+         esac; \
+         f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
+         for opt in --help --version; do \
+           if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+                2>c$${pid}_.err </dev/null \
+                && test -n "`cat c$${pid}_.out`" \
+                && test -z "`cat c$${pid}_.err`"; then :; \
+           else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+         done; \
+       done; rm -f c$${pid}_.???; exit $$bad
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bigram.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/code.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frcode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/word_io.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man1: $(man_MANS)
+       @$(NORMAL_INSTALL)
+       test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       { for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+         fi; \
+       done; \
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+       done; }
+
+uninstall-man1:
+       @$(NORMAL_UNINSTALL)
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       test -z "$$files" || { \
+         echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+         cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man5: $(man_MANS)
+       @$(NORMAL_INSTALL)
+       test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
+       @list=''; test -n "$(man5dir)" || exit 0; \
+       { for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.5[a-z]*$$/p'; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
+         fi; \
+       done; \
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
+       done; }
+
+uninstall-man5:
+       @$(NORMAL_UNINSTALL)
+       @list=''; test -n "$(man5dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.5[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       test -z "$$files" || { \
+         echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
+         cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @list='$(MANS)'; if test -n "$$list"; then \
+         list=`for p in $$list; do \
+           if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+           if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+         if test -n "$$list" && \
+           grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+           echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+           grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+           echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+           echo "       typically \`make maintainer-clean' will remove them" >&2; \
+           exit 1; \
+         else :; fi; \
+       else :; fi
+       @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
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
+check-am: all-am
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS)
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+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 "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
+       mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-man
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-binSCRIPTS \
+       install-libexecPROGRAMS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man: install-man1 install-man5
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am: installcheck-binPROGRAMS installcheck-binSCRIPTS \
+       installcheck-libexecPROGRAMS
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+       uninstall-libexecPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1 uninstall-man5
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+       ctags-recursive install install-am install-data-am \
+       install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-binPROGRAMS \
+       clean-generic clean-libexecPROGRAMS ctags ctags-recursive \
+       dist-hook distclean distclean-compile distclean-generic \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-binPROGRAMS install-binSCRIPTS \
+       install-data install-data-am install-data-hook install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am \
+       install-libexecPROGRAMS install-man install-man1 install-man5 \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am \
+       installcheck-binPROGRAMS installcheck-binSCRIPTS \
+       installcheck-libexecPROGRAMS installdirs installdirs-am \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+       tags tags-recursive uninstall uninstall-am \
+       uninstall-binPROGRAMS uninstall-binSCRIPTS \
+       uninstall-libexecPROGRAMS uninstall-man uninstall-man1 \
+       uninstall-man5
+
+
+$(PROGRAMS) $(LIBPROGRAMS): ../lib/libfind.a ../gnulib/lib/libgnulib.a
+
+# We generate updatedb from the Makefile rather than with AC_OUTPUT in
+# configure.ac in order to allow the user better control of what goes
+# into it by setting Makefile variables.
+updatedb: updatedb.sh Makefile
+       rm -f $@
+       find=`echo find|sed '$(transform)'`; \
+       frcode=`echo frcode|sed '$(transform)'`; \
+       bigram=`echo bigram|sed '$(transform)'`; \
+       code=`echo code|sed '$(transform)'`; \
+       sed \
+       -e "s,@""bindir""@,$(bindir)," \
+       -e "s,@""libexecdir""@,$(libexecdir)," \
+       -e "s,@""LOCATE_DB""@,$(LOCATE_DB)," \
+       -e "s,@""VERSION""@,@VERSION@," \
+       -e "s,@""PACKAGE_NAME""@,@PACKAGE_NAME@," \
+       -e "s,@""find""@,$${find}," \
+       -e "s,@""frcode""@,$${frcode}," \
+       -e "s,@""bigram""@,$${bigram}," \
+       -e "s,@""code""@,$${code}," \
+       -e "s,@""SORT""@,$(SORT)," \
+       -e "s,@""SORT_SUPPORTS_Z""@,$(SORT_SUPPORTS_Z)," \
+       $(srcdir)/updatedb.sh > $@
+       chmod +x $@
+
+install-data-hook:
+       $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
+
+dblocation.texi:
+       echo '@set LOCATE_DB $(LOCATE_DB)' > $@.tmp
+       if test -f $@ && cmp $@.tmp $@ >/dev/null ; then \
+               rm $@.tmp ;             \
+       else                            \
+               mv $@.tmp $@ ;          \
+       fi
+.PHONY: dblocation.texi
+
+dist-hook: findutils-check-manpages
+
+findutils-check-manpages:
+       $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)
+
+# 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/locate/bigram.c b/locate/bigram.c
new file mode 100644 (file)
index 0000000..7aca021
--- /dev/null
@@ -0,0 +1,110 @@
+/* bigram -- list bigrams for locate
+   Copyright (C) 1994, 2007, 2009, 2010 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/>.
+*/
+
+/* Usage: bigram < text > bigrams
+   Use `code' to encode a file using this output.
+
+   Read a file from stdin and write out the bigrams (pairs of
+   adjacent characters), one bigram per line, to stdout.  To reduce
+   needless duplication in the output, it starts finding the
+   bigrams on each input line at the character where that line
+   first differs from the previous line (i.e., in the ASCII
+   remainder).  Therefore, the input should be sorted in order to
+   get the least redundant output.
+
+   Written by James A. Woods <jwoods@adobe.com>.
+   Modified by David MacKenzie <djm@gnu.ai.mit.edu>.  */
+
+#include <config.h>
+#include <stdio.h>
+
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <xalloc.h>
+#include "progname.h"
+#include "closeout.h"
+
+/* Return the length of the longest common prefix of strings S1 and S2. */
+
+static int
+prefix_length (char *s1, char *s2)
+{
+  register char *start;
+
+  for (start = s1; *s1 == *s2 && *s1 != '\0'; s1++, s2++)
+    ;
+  return s1 - start;
+}
+
+int
+main (int argc, char **argv)
+{
+  char *path;                  /* The current input entry.  */
+  char *oldpath;               /* The previous input entry.  */
+  size_t pathsize, oldpathsize;        /* Amounts allocated for them.  */
+  int line_len;                        /* Length of input line.  */
+
+  if (argv[0])
+    set_program_name (argv[0]);
+  else
+    set_program_name ("bigram");
+
+  (void) argc;
+  atexit (close_stdout);
+
+  pathsize = oldpathsize = 1026; /* Increased as necessary by getline.  */
+  path = xmalloc (pathsize);
+  oldpath = xmalloc (oldpathsize);
+
+  /* Set to empty string, to force the first prefix count to 0.  */
+  oldpath[0] = '\0';
+
+  while ((line_len = getline (&path, &pathsize, stdin)) > 0)
+    {
+      register int count;      /* The prefix length.  */
+      register int j;          /* Index into input line.  */
+
+      path[line_len - 1] = '\0'; /* Remove the newline. */
+
+      /* Output bigrams in the remainder only. */
+      count = prefix_length (oldpath, path);
+      for (j = count; path[j] != '\0' && path[j + 1] != '\0'; j += 2)
+       {
+         putchar (path[j]);
+         putchar (path[j + 1]);
+         putchar ('\n');
+       }
+
+      {
+       /* Swap path and oldpath and their sizes.  */
+       char *tmppath = oldpath;
+       size_t tmppathsize = oldpathsize;
+       oldpath = path;
+       oldpathsize = pathsize;
+       path = tmppath;
+       pathsize = tmppathsize;
+      }
+    }
+
+  free (path);
+  free (oldpath);
+
+  return 0;
+}
diff --git a/locate/code.c b/locate/code.c
new file mode 100644 (file)
index 0000000..7d06a66
--- /dev/null
@@ -0,0 +1,284 @@
+/* code -- bigram- and front-encode filenames for locate
+   Copyright (C) 1994, 2005, 2007, 2008, 2010 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/>.
+*/
+
+/* Compress a sorted list.
+   Works with `find' to encode a filename database to save space
+   and search time.
+
+   Usage:
+
+   bigram < file_list > bigrams
+   process-bigrams > most_common_bigrams
+   code most_common_bigrams < file_list > squeezed_list
+
+   Uses `front compression' (see ";login:", March 1983, p. 8).
+   The output begins with the 128 most common bigrams.
+   After that, the output format is, for each line,
+   an offset (from the previous line) differential count byte
+   followed by a (partially bigram-encoded) ASCII remainder.
+   The output lines have no terminating byte; the start of the next line
+   is indicated by its first byte having a value <= 30.
+
+   The encoding of the output bytes is:
+
+   0-28                likeliest differential counts + offset (14) to make nonnegative
+   30          escape code for out-of-range count to follow in next halfword
+   128-255      bigram codes (the 128 most common, as determined by `updatedb')
+   32-127       single character (printable) ASCII remainder
+
+   Written by James A. Woods <jwoods@adobe.com>.
+   Modified by David MacKenzie <djm@gnu.org>.  */
+
+#include <config.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <string.h>
+#include <errno.h>
+#include <stdbool.h>
+
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
+#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
+
+#include "locatedb.h"
+#include "closeout.h"
+#include "xalloc.h"
+#include "gnulib-version.h"
+#include "progname.h"
+#include "error.h"
+#include "findutils-version.h"
+
+#ifndef ATTRIBUTE_NORETURN
+# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#endif
+
+
+/* The 128 most common bigrams in the file list, padded with NULs
+   if there are fewer.  */
+static char bigrams[257] = {0};
+
+/* Return the offset of PATTERN in STRING, or -1 if not found. */
+
+static int
+strindex (char *string, char *pattern)
+{
+  register char *s;
+
+  for (s = string; *s != '\0'; s++)
+    /* Fast first char check. */
+    if (*s == *pattern)
+      {
+       register char *p2 = pattern + 1, *s2 = s + 1;
+       while (*p2 != '\0' && *p2 == *s2)
+         p2++, s2++;
+       if (*p2 == '\0')
+         return s2 - strlen (pattern) - string;
+      }
+  return -1;
+}
+
+/* Return the length of the longest common prefix of strings S1 and S2. */
+
+static int
+prefix_length (char *s1, char *s2)
+{
+  register char *start;
+
+  for (start = s1; *s1 == *s2 && *s1 != '\0'; s1++, s2++)
+    ;
+  return s1 - start;
+}
+
+extern char *version_string;
+
+static void
+usage (FILE *stream)
+{
+  fprintf (stream, _("\
+Usage: %s [--version | --help]\n\
+or     %s most_common_bigrams < file-list > locate-database\n"),
+          program_name, program_name);
+  fputs (_("\nReport bugs to <bug-findutils@gnu.org>.\n"), stream);
+}
+
+
+static void inerr (const char *filename) ATTRIBUTE_NORETURN;
+static void outerr (void)                 ATTRIBUTE_NORETURN;
+
+static void
+inerr (const char *filename)
+{
+  error (EXIT_FAILURE, errno, "%s", filename);
+  /*NOTREACHED*/
+  abort ();
+}
+
+static void
+outerr (void)
+{
+  error (EXIT_FAILURE, errno, _("write error"));
+  /*NOTREACHED*/
+  abort ();
+}
+
+
+int
+main (int argc, char **argv)
+{
+  char *path;                  /* The current input entry.  */
+  char *oldpath;               /* The previous input entry.  */
+  size_t pathsize, oldpathsize;        /* Amounts allocated for them.  */
+  int count, oldcount, diffcount; /* Their prefix lengths & the difference. */
+  char bigram[3];              /* Bigram to search for in table.  */
+  int code;                    /* Index of `bigram' in bigrams table.  */
+  FILE *fp;                    /* Most common bigrams file.  */
+  int line_len;                        /* Length of input line.  */
+
+  set_program_name (argv[0]);
+  atexit (close_stdout);
+
+  bigram[2] = '\0';
+
+  if (argc != 2)
+    {
+      usage (stderr);
+      return 2;
+    }
+
+  if (0 == strcmp (argv[1], "--help"))
+    {
+      usage (stdout);
+      return 0;
+    }
+  else if (0 == strcmp (argv[1], "--version"))
+    {
+      display_findutils_version ("code");
+      return 0;
+    }
+
+  fp = fopen (argv[1], "r");
+  if (fp == NULL)
+    {
+      fprintf (stderr, "%s: ", argv[0]);
+      perror (argv[1]);
+      return 1;
+    }
+
+  pathsize = oldpathsize = 1026; /* Increased as necessary by getline.  */
+  path = xmalloc (pathsize);
+  oldpath = xmalloc (oldpathsize);
+
+  /* Set to empty string, to force the first prefix count to 0.  */
+  oldpath[0] = '\0';
+  oldcount = 0;
+
+  /* Copy the list of most common bigrams to the output,
+     padding with NULs if there are <128 of them.  */
+  if (NULL == fgets (bigrams, 257, fp))
+    inerr (argv[1]);
+
+  if (256 != fwrite (bigrams, 1, 256, stdout))
+     outerr ();
+
+  if (EOF == fclose (fp))
+     inerr (argv[1]);
+
+  while ((line_len = getline (&path, &pathsize, stdin)) > 0)
+    {
+      char *pp;
+
+      path[line_len - 1] = '\0'; /* Remove newline. */
+
+      /* Squelch unprintable chars in path so as not to botch decoding.  */
+      for (pp = path; *pp != '\0'; pp++)
+       {
+         if (!(*pp >= 040 && *pp < 0177))
+           *pp = '?';
+       }
+
+      count = prefix_length (oldpath, path);
+      diffcount = count - oldcount;
+      oldcount = count;
+      /* If the difference is small, it fits in one byte;
+        otherwise, two bytes plus a marker noting that fact.  */
+      if (diffcount < -LOCATEDB_OLD_OFFSET || diffcount > LOCATEDB_OLD_OFFSET)
+       {
+         if (EOF ==- putc (LOCATEDB_OLD_ESCAPE, stdout))
+           outerr ();
+
+         if (!putword (stdout,
+                       diffcount+LOCATEDB_OLD_OFFSET,
+                       GetwordEndianStateNative))
+           outerr ();
+       }
+      else
+       {
+         if (EOF == putc (diffcount + LOCATEDB_OLD_OFFSET, stdout))
+           outerr ();
+       }
+
+      /* Look for bigrams in the remainder of the path.  */
+      for (pp = path + count; *pp != '\0'; pp += 2)
+       {
+         if (pp[1] == '\0')
+           {
+             /* No bigram is possible; only one char is left.  */
+             putchar (*pp);
+             break;
+           }
+         bigram[0] = *pp;
+         bigram[1] = pp[1];
+         /* Linear search for specific bigram in string table. */
+         code = strindex (bigrams, bigram);
+         if (code % 2 == 0)
+           putchar ((code / 2) | 0200); /* It's a common bigram.  */
+         else
+           fputs (bigram, stdout); /* Write the text as printable ASCII.  */
+       }
+
+      {
+       /* Swap path and oldpath and their sizes.  */
+       char *tmppath = oldpath;
+       size_t tmppathsize = oldpathsize;
+       oldpath = path;
+       oldpathsize = pathsize;
+       path = tmppath;
+       pathsize = tmppathsize;
+      }
+    }
+
+  free (path);
+  free (oldpath);
+
+  return 0;
+}
diff --git a/locate/dblocation.texi b/locate/dblocation.texi
new file mode 100644 (file)
index 0000000..d75a1d7
--- /dev/null
@@ -0,0 +1 @@
+@set LOCATE_DB /usr/local/var/locatedb
diff --git a/locate/frcode.c b/locate/frcode.c
new file mode 100644 (file)
index 0000000..54fa8c5
--- /dev/null
@@ -0,0 +1,356 @@
+/* frcode -- front-compress a sorted list
+   Copyright (C) 1994, 2005, 2006, 2007, 2010 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/>.
+*/
+
+/* Usage: frcode < sorted-list > compressed-list
+
+   Uses front compression (also known as incremental encoding);
+   see ";login:", March 1983, p. 8.
+
+   The input is a sorted list of NUL-terminated strings (or
+   newline-terminated if the -0 option is not given).
+
+   The output entries are in the same order as the input; each entry
+   consists of a signed offset-differential count byte (the additional
+   number of characters of prefix of the preceding entry to use beyond
+   the number that the preceding entry is using of its predecessor),
+   followed by a null-terminated ASCII remainder.
+
+   If the offset-differential count is larger than can be stored
+   in a byte (+/-127), the byte has the value LOCATEDB_ESCAPE
+   and the count follows in a 2-byte word, with the high byte first
+   (network byte order).
+
+   Example:
+
+   Input, with NULs changed to newlines:
+   /usr/src
+   /usr/src/cmd/aardvark.c
+   /usr/src/cmd/armadillo.c
+   /usr/tmp/zoo
+
+   Length of the longest prefix of the preceding entry to share:
+   0 /usr/src
+   8 /cmd/aardvark.c
+   14 rmadillo.c
+   5 tmp/zoo
+
+   Output, with NULs changed to newlines and count bytes made printable:
+   0 LOCATE02
+   0 /usr/src
+   8 /cmd/aardvark.c
+   6 rmadillo.c
+   -9 tmp/zoo
+
+   (6 = 14 - 8, and -9 = 5 - 14)
+
+   Written by James A. Woods <jwoods@adobe.com>.
+   Modified by David MacKenzie <djm@gnu.org>.
+   Modified by James Youngman <jay@gnu.org>.
+*/
+
+#include <config.h>
+
+
+#include <stdio.h>
+#include <limits.h>
+#include <assert.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <stdbool.h>
+#include <string.h>
+#include <stdlib.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
+/* We used to use (String) instead of just String, but apparently ISO C
+ * doesn't allow this (at least, that's what HP said when someone reported
+ * this as a compiler bug).  This is HP case number 1205608192.  See
+ * also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11250 (which references
+ * ANSI 3.5.7p14-15).  The Intel icc compiler also rejects constructs
+ * like: static const char buf[] = ("string");
+ */
+# define N_(String) String
+#endif
+
+
+#include "locatedb.h"
+#include <getopt.h>
+#include "error.h"
+#include "closeout.h"
+#include "findutils-version.h"
+#include "xalloc.h"
+#include "progname.h"
+
+
+
+/* Write out a 16-bit int, high byte first (network byte order).
+ * Return true iff all went well.
+ */
+static int
+put_short (int c, FILE *fp)
+{
+  /* XXX: The value of c may be negative.  ANSI C 1989 (section 6.3.7)
+   * indicates that the result of shifting a negative value right is
+   * implementation defined.
+   */
+  assert (c <= SHRT_MAX);
+  assert (c >= SHRT_MIN);
+  return (putc (c >> 8, fp) != EOF) && (putc (c, fp) != EOF);
+}
+
+/* Return the length of the longest common prefix of strings S1 and S2. */
+
+static int
+prefix_length (char *s1, char *s2)
+{
+  register char *start;
+  int limit = INT_MAX;
+  for (start = s1; *s1 == *s2 && *s1 != '\0'; s1++, s2++)
+    {
+      /* Don't emit a prefix length that will not fit into
+       * our return type.
+       */
+      if (0 == --limit)
+       break;
+    }
+  return s1 - start;
+}
+
+static struct option const longopts[] =
+{
+  {"help", no_argument, NULL, 'h'},
+  {"version", no_argument, NULL, 'v'},
+  {"null", no_argument, NULL, '0'},
+  {NULL, no_argument, NULL, 0}
+};
+
+extern char *version_string;
+
+static void
+usage (FILE *stream)
+{
+  fprintf (stream,
+          _("Usage: %s [-0 | --null] [--version] [--help]\n"),
+          program_name);
+  fputs (_("\nReport bugs to <bug-findutils@gnu.org>.\n"), stream);
+}
+
+static long
+get_seclevel (char *s)
+{
+  long result;
+  char *p;
+
+  /* Reset errno in oreder to be able to distinguish LONG_MAX/LONG_MIN
+   * from values whichare actually out of range
+   */
+  errno = 0;
+
+  result = strtol (s, &p, 10);
+  if ((0==result) && (p == optarg))
+    {
+      error (EXIT_FAILURE, 0,
+            _("You need to specify a security level as a decimal integer."));
+      /*NOTREACHED*/
+      return -1;
+    }
+  else if ((LONG_MIN==result || LONG_MAX==result) && errno)
+
+    {
+      error (EXIT_FAILURE, 0,
+            _("Security level %s is outside the convertible range."), s);
+      /*NOTREACHED*/
+      return -1;
+    }
+  else if (*p)
+    {
+      /* Some suffix exists */
+      error (EXIT_FAILURE, 0,
+            _("Security level %s has unexpected suffix %s."), s, p);
+      /*NOTREACHED*/
+      return -1;
+    }
+  else
+    {
+      return result;
+    }
+}
+
+static void
+outerr (void)
+{
+  /* Issue the same error message as closeout () would. */
+  error (EXIT_FAILURE, errno, _("write error"));
+}
+
+int
+main (int argc, char **argv)
+{
+  char *path;                  /* The current input entry.  */
+  char *oldpath;               /* The previous input entry.  */
+  size_t pathsize, oldpathsize;        /* Amounts allocated for them.  */
+  int count, oldcount, diffcount; /* Their prefix lengths & the difference. */
+  int line_len;                        /* Length of input line.  */
+  int delimiter = '\n';
+  int optc;
+  int slocate_compat = 0;
+  long slocate_seclevel = 0L;
+
+  if (argv[0])
+    set_program_name (argv[0]);
+  else
+    set_program_name ("frcode");
+
+  atexit (close_stdout);
+
+  pathsize = oldpathsize = 1026; /* Increased as necessary by getline.  */
+  path = xmalloc (pathsize);
+  oldpath = xmalloc (oldpathsize);
+
+  oldpath[0] = 0;
+  oldcount = 0;
+
+
+  while ((optc = getopt_long (argc, argv, "hv0S:", longopts, (int *) 0)) != -1)
+    switch (optc)
+      {
+      case '0':
+       delimiter = 0;
+       break;
+
+      case 'S':
+       slocate_compat = 1;
+       slocate_seclevel = get_seclevel (optarg);
+       if (slocate_seclevel < 0 || slocate_seclevel > 1)
+         {
+           error (EXIT_FAILURE, 0,
+                  _("slocate security level %ld is unsupported."),
+                  slocate_seclevel);
+         }
+       break;
+
+      case 'h':
+       usage (stdout);
+       return 0;
+
+      case 'v':
+       display_findutils_version ("frcode");
+       return 0;
+
+      default:
+       usage (stderr);
+       return 1;
+      }
+
+  /* We expect to have no arguments. */
+  if (optind != argc)
+    {
+      usage (stderr);
+      return 1;
+    }
+
+
+  if (slocate_compat)
+    {
+      fputc (slocate_seclevel ? '1' : '0', stdout);
+      fputc (0, stdout);
+
+    }
+  else
+    {
+      /* GNU LOCATE02 format */
+      if (fwrite (LOCATEDB_MAGIC, 1, sizeof (LOCATEDB_MAGIC), stdout)
+         != sizeof (LOCATEDB_MAGIC))
+       {
+         error (EXIT_FAILURE, errno, _("Failed to write to standard output"));
+       }
+    }
+
+
+  while ((line_len = getdelim (&path, &pathsize, delimiter, stdin)) > 0)
+    {
+      path[line_len - 1] = '\0'; /* FIXME temporary: nuke the newline.  */
+
+      count = prefix_length (oldpath, path);
+      diffcount = count - oldcount;
+      if ( (diffcount > SHRT_MAX) || (diffcount < SHRT_MIN) )
+       {
+         /* We do this to prevent overflow of the value we
+          * write with put_short ()
+          */
+         count = 0;
+         diffcount = (-oldcount);
+       }
+      oldcount = count;
+
+      if (slocate_compat)
+       {
+         /* Emit no count for the first pathname. */
+         slocate_compat = 0;
+       }
+      else
+       {
+         /* If the difference is small, it fits in one byte;
+            otherwise, two bytes plus a marker noting that fact.  */
+         if (diffcount < LOCATEDB_ONEBYTE_MIN
+             || diffcount > LOCATEDB_ONEBYTE_MAX)
+           {
+             if (EOF == putc (LOCATEDB_ESCAPE, stdout))
+               outerr ();
+             if (!put_short (diffcount, stdout))
+               outerr ();
+           }
+         else
+           {
+             if (EOF == putc (diffcount, stdout))
+               outerr ();
+           }
+       }
+
+      if ( (EOF == fputs (path + count, stdout))
+          || (EOF == putc ('\0', stdout)))
+       {
+         outerr ();
+       }
+
+      if (1)
+       {
+         /* Swap path and oldpath and their sizes.  */
+         char *tmppath = oldpath;
+         size_t tmppathsize = oldpathsize;
+         oldpath = path;
+         oldpathsize = pathsize;
+         path = tmppath;
+         pathsize = tmppathsize;
+       }
+    }
+
+  free (path);
+  free (oldpath);
+
+  return 0;
+}
diff --git a/locate/locate.1 b/locate/locate.1
new file mode 100644 (file)
index 0000000..cf0c52a
--- /dev/null
@@ -0,0 +1,259 @@
+.TH LOCATE 1 \" -*- nroff -*-
+.SH NAME
+locate \- list files in databases that match a pattern
+.SH SYNOPSIS
+.B locate
+[\-d path | \-\-database=path] [\-e | \-E | \-\-[non\-]existing] [\-i
+| \-\-ignore-case] [\-0 | \-\-null] [\-c | \-\-count] [\-w | \-\-wholename]
+|\-b | \-\-basename] [\-l N | \-\-limit=N] [\-S | \-\-statistics] [\-r
+| \-\-regex ] [\-\-max-database-age D] [\-P | \-H | \-\-nofollow] [\-L
+| \-\-follow] [\-\-version] [\-A | \-\-all] [\-p | \-\-print] [\-\-help] pattern...
+.SH DESCRIPTION
+This manual page
+documents the GNU version of
+.BR locate .
+For each given pattern,
+.B locate
+searches one or more databases of file names and displays the
+file names that contain the pattern.  Patterns can contain shell-style
+metacharacters: `*', `?', and `[]'.  The metacharacters do not treat
+`/' or `.'  specially.  Therefore, a pattern `foo*bar' can match a
+file name that contains `foo3/bar', and a pattern `*duck*' can match a
+file name that contains `lake/.ducky'.  Patterns that contain
+metacharacters should be quoted to protect them from expansion by the
+shell.
+.P
+If a pattern is a plain string \(em it contains no metacharacters \(em
+.B locate
+displays all file names in the database that contain that string
+anywhere.  If a pattern does contain metacharacters,
+.B locate
+only displays file names that match the pattern exactly.  As a result,
+patterns that contain metacharacters should usually begin with a `*',
+and will most often end with one as well.  The exceptions are patterns
+that are intended to explicitly match the beginning or end of a file
+name.
+.P
+The file name databases contain lists of files that were on the system
+when the databases were last updated.  The system administrator can
+choose the file name of the default database, the frequency with which
+the databases are updated, and the directories for which they contain
+entries; see \fBupdatedb\fP(1).
+.P
+If
+.BR locate 's
+output is going to a terminal, unusual characters in the output are
+escaped in the same way as for the \-print action of the
+.B find
+command.  If the output is not going to a terminal, file names are
+printed exactly as-is.
+
+.SH OPTIONS
+.TP
+.I "\-0, \-\-null"
+Use ASCII NUL as a separator, instead of newline.
+.TP
+.I "\-A, \-\-all"
+Print only names which match all non-option arguments, not those matching
+one or more non-option arguments.
+.TP
+.I "\-b, \-\-basename"
+Results are considered to match if the pattern specified matches the
+final component of the name of a file as listed in the database.
+This final component is usually referred to as the `base name'.
+.TP
+.I "\-c, \-\-count"
+Instead of printing the matched filenames, just print the total
+number of matches we found, unless \-\-\fIprint\fP (\-p) is also present.
+.TP
+.I "\-d \fIpath\fP, \-\-database=\fIpath\fP"
+Instead of searching the default file name database, search the file
+name databases in \fIpath\fP, which is a colon-separated list of
+database file names.  You can also use the environment variable
+.B LOCATE_PATH
+to set the list of database files to search.
+The option overrides the environment variable if both are used.  Empty
+elements in the path are taken to be synonyms for the file name of the
+default database.
+A database can be supplied on stdin, using `\-' as an element
+of \fIpath\fP. If more than one element of \fIpath\fP is `\-',
+later instances are ignored (and a warning message is printed).
+.IP
+The file name database format changed starting with GNU
+.B find
+and
+.B locate
+version 4.0 to allow machines with different byte orderings to share
+the databases.  This version of
+.B locate
+can automatically recognize and read databases produced for older
+versions of GNU
+.B locate
+or Unix versions of
+.B locate
+or
+.BR find .
+Support for the old locate database format will be discontinued in a
+future release.
+.TP
+.I "\-e, \-\-existing"
+Only print out such names that currently exist (instead of such names
+that existed when the database was created).
+Note that this may slow down the program a lot, if there are many matches
+in the database.  If you are using this option within a program,
+please note that it is possible for the file to be deleted after
+.B locate
+has checked that it exists, but before you use it.
+.TP
+.I "\-E, \-\-non\-existing"
+Only print out such names that currently do not exist (instead of such names
+that existed when the database was created).
+Note that this may slow down the program a lot, if there are many matches
+in the database.
+.TP
+.I "\-\-help"
+Print a summary of the options to
+.B locate
+and exit.
+.TP
+.I "\-i, \-\-ignore-case"
+Ignore case distinctions in both the pattern and the file names.
+.TP
+.I "\-l N, \-\-limit=N"
+Limit the number of matches to N.  If a limit is set via this option,
+the number of results printed for the \-c option will never be larger
+than this number.
+.TP
+.I "\-L, \-\-follow"
+If testing for the existence of files (with the \-e or \-E options),
+consider broken symbolic links to be non-existing.   This is the default.
+.TP
+.I "\-\-max-database-age D"
+Normally,
+.B locate
+will issue a warning message when it searches a database which is more
+than 8 days old.  This option changes that value to something other
+than 8.  The effect of specifying a negative value is undefined.
+.TP
+.I "\-m, \-\-mmap"
+Accepted but does nothing, for compatibility with BSD
+.BR locate .
+.TP
+.I "\-P, \-H, \-\-nofollow"
+If testing for the existence of files (with the \-e or \-E options), treat
+broken symbolic links as if they were existing files.  The \-H
+form of this option is provided purely for similarity with
+.BR find ;
+the use of \-P is recommended over \-H.
+.TP
+.I "\-p, \-\-print"
+Print search results when they normally would not, because of the presence
+of \-\-statistics (\-S) or \-\-count (\-c).
+.TP
+.I "\-r, \-\-regex "
+The pattern specified on the command line is understood to be a
+regular expression, as opposed to a glob pattern.  The Regular
+expressions work in the same was as in
+.B emacs
+and
+.BR find ,
+except for the fact that "." will match a newline.
+Filenames whose full paths match the specified regular expression are
+printed (or, in the case of the \-c option, counted).  If you wish to
+anchor your regular expression at the ends of the full path name, then
+as is usual with regular expressions, you should use the characters ^
+and $ to signify this.
+.TP
+.I "\-s, \-\-stdio"
+Accepted but does nothing, for compatibility with BSD
+.BR locate .
+.TP
+.I "\-S, \-\-statistics"
+Print various statistics about each locate database and then exit
+without performing a search, unless non-option arguments are given.
+For compatibility with BSD, \-S is accepted as a synonym
+for \-\-statistics.  However, the ouptut of
+.B locate \-S
+is different for the GNU and BSD implementations of
+.BR locate .
+.TP
+.I "\-\-version"
+Print the version number of
+.B locate
+and exit.
+.TP
+.I "\-w, \-\-wholename"
+Match against the whole name of the file as listed in the database.
+This is the default.
+.SH ENVIRONMENT
+.TP
+.B LOCATE_PATH
+Colon-separated list of databases to search.  If the value has a
+leading or trailing colon, or has two colons in a row, you may get
+results that vary between different versions of
+.BR locate .
+
+.SH "SEE ALSO"
+\fBfind\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1), \fBxargs\fP(1),
+\fBglob\fP(3),
+\fBFinding Files\fP (on-line in Info, or printed)
+.SH "HISTORY"
+The
+.B locate
+program started life as the BSD fast find program, contributed to BSD
+by James A. Woods.  This was described by his paper
+.I Finding Files Fast
+which was published in Usenix
+.IR ;login: ,
+Vol 8, No 1, February/March, 1983, pp. 8-10.   When the
+.B find
+program began to assume a default
+.B -print
+action if no action was specified, this changed the interpretation of
+.B find
+.BR pattern .
+The BSD developers therefore moved the fast find functionality into
+.BR locate .
+The GNU implementation of
+.B locate
+appears to be derived from the same code.
+.P
+Significant changes to
+.B locate
+in reverse order:
+.TS
+tab(|);
+LL.
+4.3.7 | Byte-order independent support for old database format
+4.3.3 | locate \fI\-i\fR supports multi-byte characters correctly
+      | Introduced \fI\-\-max_db_age\fR
+4.3.2 | Support for the slocate database format
+4.2.22| Introduced the \fI\-\-all\fR option
+4.2.15| Introduced the \fI\-\-regex\fR option
+4.2.14| Introduced options \fI\-L, \-P, \-H\fR
+4.2.12| Empty items in \fBLOCATE_PATH\fR now indicate the default database
+4.2.11| Introduced the \fI\-\-statistics\fR option
+4.2.4 | Introduced \fI\-\-count\fR and \fI\-\-limit\fR
+4.2.0 | Glob characters cause matching against the whole file name
+4.0   | Introduced the LOCATE02 database format
+3.7   | Locate can search multiple databases
+.TE
+.SH "BUGS"
+.P
+The locate database correctly handles filenames containing newlines,
+but only if the system's sort command has a working
+\-z
+option.  If you suspect that
+.B locate
+may need to return filenames containing newlines, consider using its
+.I \-\-null
+option.
+.P
+The best way to report a bug is to use the form at
+http://savannah.gnu.org/bugs/?group=findutils.
+The reason for this is that you will then be able to track progress in
+fixing the problem.   Other comments about \fBlocate\fP(1) and about
+the findutils package in general can be sent to the
+.I bug-findutils
+mailing list.  To join the list, send email to
+.IR bug-findutils-request@gnu.org .
diff --git a/locate/locate.c b/locate/locate.c
new file mode 100644 (file)
index 0000000..ffcbc2b
--- /dev/null
@@ -0,0 +1,1930 @@
+/* locate -- search databases for filenames that match patterns
+   Copyright (C) 1994, 1996, 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2010 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/>.
+*/
+
+/* Usage: locate [options] pattern...
+
+   Scan a pathname list for the full pathname of a file, given only
+   a piece of the name (possibly containing shell globbing metacharacters).
+   The list has been processed with front-compression, which reduces
+   the list size by a factor of 4-5.
+   Recognizes two database formats, old and new.  The old format is
+   bigram coded, which reduces space by a further 20-25% and uses the
+   following encoding of the database bytes:
+
+   0-28                likeliest differential counts + offset (14) to make nonnegative
+   30          escape code for out-of-range count to follow in next halfword
+   128-255      bigram codes (the 128 most common, as determined by `updatedb')
+   32-127       single character (printable) ASCII remainder
+
+   Earlier versions of GNU locate used to use a novel two-tiered
+   string search technique, which was described in Usenix ;login:, Vol
+   8, No 1, February/March, 1983, p. 8.
+
+   However, latterly code changes to provide additional functionality
+   became dificult to make with the existing reading scheme, and so
+   we no longer perform the matching as efficiently as we used to (that is,
+   we no longer use the same algorithm).
+
+   The old algorithm was:
+
+      First, match a metacharacter-free subpattern and a partial
+      pathname BACKWARDS to avoid full expansion of the pathname list.
+      The time savings is 40-50% over forward matching, which cannot
+      efficiently handle overlapped search patterns and compressed
+      path remainders.
+
+      Then, match the actual shell glob pattern (if in this form)
+      against the candidate pathnames using the slower shell filename
+      matching routines.
+
+
+   Written by James A. Woods <jwoods@adobe.com>.
+   Modified by David MacKenzie <djm@gnu.org>.
+   Additional work by James Youngman and Bas van Gompel.
+*/
+
+#include <config.h>
+
+#include <stdio.h>
+#include <signal.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <grp.h>               /* for setgroups() */
+#include <sys/stat.h>
+#include <time.h>
+#include <fnmatch.h>
+#include <getopt.h>
+#include <xstrtol.h>
+
+#include <stdbool.h>
+
+/* The presence of unistd.h is assumed by gnulib these days, so we
+ * might as well assume it too.
+ */
+/* We need <unistd.h> for isatty(). */
+#include <unistd.h>
+
+#include <fcntl.h>
+
+#define NDEBUG
+#include <assert.h>
+#include <string.h>
+
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
+#include <errno.h>
+#include <locale.h>
+
+
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define _(Text) Text
+#define textdomain(Domain)
+#define bindtextdomain(Package, Directory)
+#define ngettext(singular,plural,n) ((1==n) ? singular : plural)
+#endif
+#ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+#else
+/* We used to use (String) instead of just String, but apparently ISO C
+ * doesn't allow this (at least, that's what HP said when someone reported
+ * this as a compiler bug).  This is HP case number 1205608192.  See
+ * also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11250 (which references
+ * ANSI 3.5.7p14-15).  The Intel icc compiler also rejects constructs
+ * like: static const char buf[] = ("string");
+ */
+# define N_(String) String
+#endif
+
+#include "locatedb.h"
+#include "progname.h"
+#include "xalloc.h"
+#include "error.h"
+#include "human.h"
+#include "dirname.h"
+#include "closeout.h"
+#include "nextelem.h"
+#include "regex.h"
+#include "quotearg.h"
+#include "printquoted.h"
+#include "regextype.h"
+#include "findutils-version.h"
+
+/* Note that this evaluates Ch many times.  */
+#ifdef _LIBC
+# define TOUPPER(Ch) toupper (Ch)
+# define TOLOWER(Ch) tolower (Ch)
+#else
+# define TOUPPER(Ch) (islower (Ch) ? toupper (Ch) : (Ch))
+# define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
+#endif
+
+/* Warn if a database is older than this.  8 days allows for a weekly
+   update that takes up to a day to perform.  */
+static unsigned int warn_number_units = 8;
+
+/* Printable name of units used in WARN_SECONDS */
+static const char warn_name_units[] = N_("days");
+#define SECONDS_PER_UNIT (60 * 60 * 24)
+
+enum visit_result
+  {
+    VISIT_CONTINUE = 1,  /* please call the next visitor */
+    VISIT_ACCEPTED = 2,  /* accepted, call no futher callbacks for this file */
+    VISIT_REJECTED = 4,  /* rejected, process next file. */
+    VISIT_ABORT    = 8   /* rejected, process no more files. */
+  };
+
+enum ExistenceCheckType
+  {
+    ACCEPT_EITHER,             /* Corresponds to lack of -E/-e option */
+    ACCEPT_EXISTING,           /* Corresponds to option -e */
+    ACCEPT_NON_EXISTING                /* Corresponds to option -E */
+  };
+
+/* Check for existence of files before printing them out? */
+enum ExistenceCheckType check_existence = ACCEPT_EITHER;
+
+static int follow_symlinks = 1;
+
+/* What to separate the results with. */
+static int separator = '\n';
+
+static struct quoting_options * quote_opts = NULL;
+static bool stdout_is_a_tty;
+static bool print_quoted_filename;
+static bool results_were_filtered;
+
+static const char *selected_secure_db = NULL;
+
+
+/* Change the number of days old the database can be
+ * before we complain about it.
+ */
+static void
+set_max_db_age (const char *s)
+{
+  char *end;
+  unsigned long int val;
+  /* XXX: we ignore the case where the input is negative, which is allowed(!). */
+
+  if (0 == *s)
+    {
+      error (EXIT_FAILURE, 0,
+            _("The argument for option --max-database-age must not be empty"));
+    }
+
+
+  /* We have to set errno here, otherwise when the function returns ULONG_MAX,
+   * we would not be able to tell if that is the correct answer, or whether it
+   * signifies an error.
+   */
+  errno = 0;
+  val = strtoul (s, &end, 10);
+
+  /* Diagnose number too large, non-numbes and trailing junk. */
+  if ((ULONG_MAX == val && ERANGE == errno) ||
+      (0 == val && EINVAL == errno))
+    {
+      error (EXIT_FAILURE, errno,
+            _("Invalid argument %s for option --max-database-age"),
+            quotearg_n_style (0, locale_quoting_style, s));
+    }
+  else if (*end)
+    {
+      /* errno wasn't set, don't print its message */
+      error (EXIT_FAILURE, 0,
+            _("Invalid argument %s for option --max-database-age"),
+            quotearg_n_style (0, locale_quoting_style, s));
+    }
+  else
+    {
+      warn_number_units = val;
+    }
+}
+
+
+
+/* Read in a 16-bit int, high byte first (network byte order).  */
+
+static short
+get_short (FILE *fp)
+{
+
+  register short x;
+
+  x = (signed char) fgetc (fp) << 8;
+  x |= (fgetc (fp) & 0xff);
+  return x;
+}
+
+const char * const metacharacters = "*?[]\\";
+
+/* Return nonzero if S contains any shell glob characters.
+ */
+static int
+contains_metacharacter (const char *s)
+{
+  if (NULL == strpbrk (s, metacharacters))
+    return 0;
+  else
+    return 1;
+}
+
+/* locate_read_str()
+ *
+ * Read bytes from FP into the buffer at offset OFFSET in (*BUF),
+ * until we reach DELIMITER or end-of-file.   We reallocate the buffer
+ * as necessary, altering (*BUF) and (*SIZ) as appropriate.  No assumption
+ * is made regarding the content of the data (i.e. the implementation is
+ * 8-bit clean, the only delimiter is DELIMITER).
+ *
+ * Written Fri May 23 18:41:16 2003 by James Youngman, because getstr()
+ * has been removed from gnulib.
+ *
+ * We call the function locate_read_str() to avoid a name clash with the curses
+ * function getstr().
+ */
+static int
+locate_read_str (char **buf, size_t *siz, FILE *fp, int delimiter, int offs)
+{
+  char * p = NULL;
+  size_t sz = 0;
+  int nread;
+  size_t needed;
+
+  nread = getdelim (&p, &sz, delimiter, fp);
+  if (nread >= 0)
+    {
+      assert (p != NULL);
+
+      needed = offs + nread + 1u;
+      if (needed > (*siz))
+       {
+         char *pnew = realloc (*buf, needed);
+         if (NULL == pnew)
+           {
+             return -1;        /* FAIL */
+           }
+         else
+           {
+             *siz = needed;
+             *buf = pnew;
+           }
+       }
+      memcpy ((*buf)+offs, p, nread);
+      free (p);
+    }
+  return nread;
+}
+
+
+struct locate_limits
+{
+  uintmax_t limit;
+  uintmax_t items_accepted;
+};
+static struct locate_limits limits;
+
+
+struct locate_stats
+{
+  uintmax_t compressed_bytes;
+  uintmax_t total_filename_count;
+  uintmax_t total_filename_length;
+  uintmax_t whitespace_count;
+  uintmax_t newline_count;
+  uintmax_t highbit_filename_count;
+};
+static struct locate_stats statistics;
+
+
+struct regular_expression
+{
+  struct re_pattern_buffer regex; /* for --regex */
+};
+
+
+struct process_data
+{
+  int c;                       /* An input byte.  */
+  char itemcount;              /* Indicates we're at the beginning of an slocate db. */
+  int count; /* The length of the prefix shared with the previous database entry.  */
+  int len;
+  char *original_filename;     /* The current input database entry. */
+  size_t pathsize;             /* Amount allocated for it.  */
+  char *munged_filename;       /* path or basename(path) */
+  FILE *fp;                    /* The pathname database.  */
+  const char *dbfile;          /* Its name, or "<stdin>" */
+  int  slocatedb_format;       /* Allows us to cope with slocate's format variant */
+  GetwordEndianState endian_state;
+  /* for the old database format,
+     the first and second characters of the most common bigrams.  */
+  char bigram1[128];
+  char bigram2[128];
+};
+
+
+typedef int (*visitfunc)(struct process_data *procdata,
+                        void *context);
+
+struct visitor
+{
+  visitfunc      inspector;
+  void *         context;
+  struct visitor *next;
+};
+
+
+static struct visitor *inspectors = NULL;
+static struct visitor *lastinspector = NULL;
+static struct visitor *past_pat_inspector = NULL;
+
+static inline int visit (const struct visitor *p,
+                        int accept_flags,
+                        struct process_data *procdata,
+                        const struct visitor * const stop)
+{
+  register int result = accept_flags;
+  while ( (accept_flags & result) && (stop != p) )
+    {
+      result = (p->inspector)(procdata, p->context);
+      p = p->next;
+    }
+  return result;
+}
+
+/* 0 or 1 pattern(s) */
+static int
+process_simple (struct process_data *procdata)
+{
+  return visit (inspectors, (VISIT_CONTINUE|VISIT_ACCEPTED), procdata, NULL);
+}
+
+/* Accept if any pattern matches. */
+static int
+process_or (struct process_data *procdata)
+{
+  int result;
+
+  result = visit (inspectors, (VISIT_CONTINUE|VISIT_REJECTED), procdata, past_pat_inspector);
+  if (result == VISIT_CONTINUE)
+    result = VISIT_REJECTED;
+  if (result & (VISIT_ABORT | VISIT_REJECTED))
+    return result;
+
+  result = visit (past_pat_inspector, VISIT_CONTINUE, procdata, NULL);
+  if (VISIT_CONTINUE == result)
+    return VISIT_ACCEPTED;
+  else
+    return result;
+}
+
+/* Accept if all pattern match. */
+static int
+process_and (struct process_data *procdata)
+{
+  int result;
+
+  result = visit (inspectors, (VISIT_CONTINUE|VISIT_ACCEPTED), procdata, past_pat_inspector);
+  if (result == VISIT_CONTINUE)
+    result = VISIT_REJECTED;
+  if (result & (VISIT_ABORT | VISIT_REJECTED))
+    return result;
+
+  result = visit (past_pat_inspector, VISIT_CONTINUE, procdata, NULL);
+  if (VISIT_CONTINUE == result)
+    return VISIT_ACCEPTED;
+  else
+    return result;
+}
+
+typedef int (*processfunc)(struct process_data *procdata);
+
+static processfunc mainprocessor = NULL;
+
+static void
+add_visitor (visitfunc fn, void *context)
+{
+  struct visitor *p = xmalloc (sizeof (struct visitor));
+  p->inspector = fn;
+  p->context   = context;
+  p->next = NULL;
+
+  if (NULL == lastinspector)
+    {
+      lastinspector = inspectors = p;
+    }
+  else
+    {
+      lastinspector->next = p;
+      lastinspector = p;
+    }
+}
+
+static int
+visit_justprint_quoted (struct process_data *procdata, void *context)
+{
+  (void) context;
+  print_quoted (stdout, quote_opts, stdout_is_a_tty,
+               "%s",
+               procdata->original_filename);
+  putchar (separator);
+  return VISIT_CONTINUE;
+}
+
+static int
+visit_justprint_unquoted (struct process_data *procdata, void *context)
+{
+  (void) context;
+  fputs (procdata->original_filename, stdout);
+  putchar (separator);
+  return VISIT_CONTINUE;
+}
+
+static void
+toolong (struct process_data *procdata)
+{
+  error (EXIT_FAILURE, 0,
+        _("locate database %s contains a "
+          "filename longer than locate can handle"),
+        procdata->dbfile);
+}
+
+static void
+extend (struct process_data *procdata, size_t siz1, size_t siz2)
+{
+  /* Figure out if the addition operation is safe before performing it. */
+  if (SIZE_MAX - siz1 < siz2)
+    {
+      toolong (procdata);
+    }
+  else if (procdata->pathsize < (siz1+siz2))
+    {
+      procdata->pathsize = siz1+siz2;
+      procdata->original_filename = x2nrealloc (procdata->original_filename,
+                                               &procdata->pathsize,
+                                               1);
+    }
+}
+
+static int
+visit_old_format (struct process_data *procdata, void *context)
+{
+  register size_t i;
+  (void) context;
+
+  if (EOF == procdata->c)
+    return VISIT_ABORT;
+
+  /* Get the offset in the path where this path info starts.  */
+  if (procdata->c == LOCATEDB_OLD_ESCAPE)
+    {
+      int minval, maxval;
+      int word;
+
+      procdata->count -= LOCATEDB_OLD_OFFSET;
+      minval = (0       - procdata->count);
+      if (procdata->count >= 0)
+       maxval = (procdata->len - procdata->count);
+      else
+       maxval = (procdata->len - 0);
+      word = getword (procdata->fp, procdata->dbfile,
+                     minval, maxval, &procdata->endian_state);
+      procdata->count += word;
+      assert (procdata->count >= 0);
+    }
+  else
+    {
+      procdata->count += (procdata->c - LOCATEDB_OLD_OFFSET);
+      assert (procdata->count >= 0);
+    }
+
+  /* Overlay the old path with the remainder of the new.  Read
+   * more data until we get to the next filename.
+   */
+  for (i=procdata->count;
+       (procdata->c = getc (procdata->fp)) > LOCATEDB_OLD_ESCAPE;)
+    {
+      if (EOF == procdata->c)
+       break;
+
+      if (procdata->c < 0200)
+       {
+         /* An ordinary character. */
+         extend (procdata, i, 1u);
+         procdata->original_filename[i++] = procdata->c;
+       }
+      else
+       {
+         /* Bigram markers have the high bit set. */
+         extend (procdata, i, 2u);
+         procdata->c &= 0177;
+         procdata->original_filename[i++] = procdata->bigram1[procdata->c];
+         procdata->original_filename[i++] = procdata->bigram2[procdata->c];
+       }
+    }
+
+  /* Consider the case where we executed the loop body zero times; we
+   * still need space for the terminating null byte.
+   */
+  extend (procdata, i, 1u);
+  procdata->original_filename[i] = 0;
+  procdata->len = i;
+  procdata->munged_filename = procdata->original_filename;
+
+  return VISIT_CONTINUE;
+}
+
+static int
+visit_locate02_format (struct process_data *procdata, void *context)
+{
+  register char *s;
+  int nread;
+  (void) context;
+
+  if (procdata->slocatedb_format)
+    {
+      if (procdata->itemcount == 0)
+       {
+         ungetc (procdata->c, procdata->fp);
+         procdata->count = 0;
+         procdata->len = 0;
+       }
+      else if (procdata->itemcount == 1)
+       {
+         procdata->count = procdata->len-1;
+       }
+      else
+       {
+         if (procdata->c == LOCATEDB_ESCAPE)
+           procdata->count += (short)get_short (procdata->fp);
+         else if (procdata->c > 127)
+           procdata->count += procdata->c - 256;
+         else
+           procdata->count += procdata->c;
+       }
+    }
+  else
+    {
+      if (procdata->c == LOCATEDB_ESCAPE)
+       procdata->count += (short)get_short (procdata->fp);
+      else if (procdata->c > 127)
+       procdata->count += procdata->c - 256;
+      else
+       procdata->count += procdata->c;
+    }
+
+  if (procdata->count > procdata->len || procdata->count < 0)
+    {
+      /* This should not happen generally , but since we're
+       * reading in data which is outside our control, we
+       * cannot prevent it.
+       */
+      error (EXIT_FAILURE, 0, _("locate database %s is corrupt or invalid"),
+            quotearg_n_style (0, locale_quoting_style, procdata->dbfile));
+    }
+
+  /* Overlay the old path with the remainder of the new.  */
+  nread = locate_read_str (&procdata->original_filename,
+                          &procdata->pathsize,
+                          procdata->fp, 0, procdata->count);
+  if (nread < 0)
+    return VISIT_ABORT;
+  procdata->c = getc (procdata->fp);
+  procdata->len = procdata->count + nread;
+  s = procdata->original_filename + procdata->len - 1; /* Move to the last char in path.  */
+  assert (s[0] != '\0');
+  assert (s[1] == '\0'); /* Our terminator.  */
+  assert (s[2] == '\0'); /* Added by locate_read_str.  */
+
+  procdata->munged_filename = procdata->original_filename;
+
+  if (procdata->slocatedb_format)
+    {
+      /* Don't increment indefinitely, it might overflow. */
+      if (procdata->itemcount < 6)
+       {
+         ++(procdata->itemcount);
+       }
+    }
+
+
+  return VISIT_CONTINUE;
+}
+
+static int
+visit_basename (struct process_data *procdata, void *context)
+{
+  (void) context;
+  procdata->munged_filename = last_component (procdata->original_filename);
+
+  return VISIT_CONTINUE;
+}
+
+
+/* visit_existing_follow implements -L -e */
+static int
+visit_existing_follow (struct process_data *procdata, void *context)
+{
+  struct stat st;
+  (void) context;
+
+  /* munged_filename has been converted in some way (to lower case,
+   * or is just the base name of the file), and original_filename has not.
+   * Hence only original_filename is still actually the name of the file
+   * whose existence we would need to check.
+   */
+  if (stat (procdata->original_filename, &st) != 0)
+    {
+      return VISIT_REJECTED;
+    }
+  else
+    {
+      return VISIT_CONTINUE;
+    }
+}
+
+/* visit_non_existing_follow implements -L -E */
+static int
+visit_non_existing_follow (struct process_data *procdata, void *context)
+{
+  struct stat st;
+  (void) context;
+
+  /* munged_filename has been converted in some way (to lower case,
+   * or is just the base name of the file), and original_filename has not.
+   * Hence only original_filename is still actually the name of the file
+   * whose existence we would need to check.
+   */
+  if (stat (procdata->original_filename, &st) == 0)
+    {
+      return VISIT_REJECTED;
+    }
+  else
+    {
+      return VISIT_CONTINUE;
+    }
+}
+
+/* visit_existing_nofollow implements -P -e */
+static int
+visit_existing_nofollow (struct process_data *procdata, void *context)
+{
+  struct stat st;
+  (void) context;
+
+  /* munged_filename has been converted in some way (to lower case,
+   * or is just the base name of the file), and original_filename has not.
+   * Hence only original_filename is still actually the name of the file
+   * whose existence we would need to check.
+   */
+  if (lstat (procdata->original_filename, &st) != 0)
+    {
+      return VISIT_REJECTED;
+    }
+  else
+    {
+      return VISIT_CONTINUE;
+    }
+}
+
+/* visit_non_existing_nofollow implements -P -E */
+static int
+visit_non_existing_nofollow (struct process_data *procdata, void *context)
+{
+  struct stat st;
+  (void) context;
+
+  /* munged_filename has been converted in some way (to lower case,
+   * or is just the base name of the file), and original_filename has not.
+   * Hence only original_filename is still actually the name of the file
+   * whose existence we would need to check.
+   */
+  if (lstat (procdata->original_filename, &st) == 0)
+    {
+      return VISIT_REJECTED;
+    }
+  else
+    {
+      return VISIT_CONTINUE;
+    }
+}
+
+static int
+visit_substring_match_nocasefold_wide (struct process_data *procdata, void *context)
+{
+  const char *pattern = context;
+
+  if (NULL != mbsstr (procdata->munged_filename, pattern))
+    return VISIT_ACCEPTED;
+  else
+    return VISIT_REJECTED;
+}
+
+static int
+visit_substring_match_nocasefold_narrow (struct process_data *procdata, void *context)
+{
+  const char *pattern = context;
+  assert (MB_CUR_MAX == 1);
+  if (NULL != strstr (procdata->munged_filename, pattern))
+    return VISIT_ACCEPTED;
+  else
+    return VISIT_REJECTED;
+}
+
+static int
+visit_substring_match_casefold_wide (struct process_data *procdata, void *context)
+{
+  const char *pattern = context;
+
+  if (NULL != mbscasestr (procdata->munged_filename, pattern))
+    return VISIT_ACCEPTED;
+  else
+    return VISIT_REJECTED;
+}
+
+
+static int
+visit_substring_match_casefold_narrow (struct process_data *procdata, void *context)
+{
+  const char *pattern = context;
+
+  assert (MB_CUR_MAX == 1);
+  if (NULL != strcasestr (procdata->munged_filename, pattern))
+    return VISIT_ACCEPTED;
+  else
+    return VISIT_REJECTED;
+}
+
+
+static int
+visit_globmatch_nofold (struct process_data *procdata, void *context)
+{
+  const char *glob = context;
+  if (fnmatch (glob, procdata->munged_filename, 0) != 0)
+    return VISIT_REJECTED;
+  else
+    return VISIT_ACCEPTED;
+}
+
+
+static int
+visit_globmatch_casefold (struct process_data *procdata, void *context)
+{
+  const char *glob = context;
+  if (fnmatch (glob, procdata->munged_filename, FNM_CASEFOLD) != 0)
+    return VISIT_REJECTED;
+  else
+    return VISIT_ACCEPTED;
+}
+
+
+static int
+visit_regex (struct process_data *procdata, void *context)
+{
+  struct regular_expression *p = context;
+  const size_t len = strlen (procdata->munged_filename);
+
+  int rv = re_search (&p->regex, procdata->munged_filename,
+                     len, 0, len,
+                     (struct re_registers *) NULL);
+  if (rv < 0)
+    {
+      return VISIT_REJECTED;   /* no match (-1), or internal error (-2) */
+    }
+  else
+    {
+      return VISIT_ACCEPTED;   /* match */
+    }
+}
+
+
+static int
+visit_stats (struct process_data *procdata, void *context)
+{
+  struct locate_stats *p = context;
+  size_t len = strlen (procdata->original_filename);
+  const char *s;
+  int highbit, whitespace, newline;
+
+  ++(p->total_filename_count);
+  p->total_filename_length += len;
+
+  highbit = whitespace = newline = 0;
+  for (s=procdata->original_filename; *s; ++s)
+    {
+      if ( (int)(*s) & 128 )
+       highbit = 1;
+      if ('\n' == *s)
+       {
+         newline = whitespace = 1;
+       }
+      else if (isspace ((unsigned char)*s))
+       {
+         whitespace = 1;
+       }
+    }
+
+  if (highbit)
+    ++(p->highbit_filename_count);
+  if (whitespace)
+    ++(p->whitespace_count);
+  if (newline)
+    ++(p->newline_count);
+
+  return VISIT_CONTINUE;
+}
+
+
+static int
+visit_limit (struct process_data *procdata, void *context)
+{
+  struct locate_limits *p = context;
+
+  (void) procdata;
+
+  if (++p->items_accepted >= p->limit)
+    return VISIT_ABORT;
+  else
+    return VISIT_CONTINUE;
+}
+
+static int
+visit_count (struct process_data *procdata, void *context)
+{
+  struct locate_limits *p = context;
+
+  (void) procdata;
+
+  ++p->items_accepted;
+  return VISIT_CONTINUE;
+}
+
+/* Emit the statistics.
+ */
+static void
+print_stats (int argc, size_t database_file_size)
+{
+  char hbuf1[LONGEST_HUMAN_READABLE + 1];
+  char hbuf2[LONGEST_HUMAN_READABLE + 1];
+  char hbuf3[LONGEST_HUMAN_READABLE + 1];
+  char hbuf4[LONGEST_HUMAN_READABLE + 1];
+
+  printf (ngettext ("Locate database size: %s byte\n",
+                 "Locate database size: %s bytes\n",
+                 database_file_size),
+        human_readable ((uintmax_t) database_file_size,
+                        hbuf1, human_ceiling, 1, 1));
+
+  printf ( (results_were_filtered ?
+          _("Matching Filenames: %s\n") :
+          _("All Filenames: %s\n")),
+         human_readable (statistics.total_filename_count,
+                        hbuf1, human_ceiling, 1, 1));
+  /* XXX: We would ideally use ngettext () here, but I don't know
+   *      how to use it to handle more than one possibly-plural thing/
+   */
+  printf (_("File names have a cumulative length of %s bytes.\n"
+          "Of those file names,\n"
+          "\n\t%s contain whitespace, "
+          "\n\t%s contain newline characters, "
+          "\n\tand %s contain characters with the high bit set.\n"),
+        human_readable (statistics.total_filename_length,  hbuf1, human_ceiling, 1, 1),
+        human_readable (statistics.whitespace_count,       hbuf2, human_ceiling, 1, 1),
+        human_readable (statistics.newline_count,          hbuf3, human_ceiling, 1, 1),
+        human_readable (statistics.highbit_filename_count, hbuf4, human_ceiling, 1, 1));
+
+  if (!argc)
+    {
+      if (results_were_filtered)
+       {
+         printf (_("Some filenames may have been filtered out, "
+                  "so we cannot compute the compression ratio.\n"));
+       }
+      else
+       {
+         if (statistics.total_filename_length)
+           {
+             /* A negative compression ratio just means that the
+              * compressed database is larger than the list of
+              * filenames.  This can happen for example for
+              * old-format databases containing a small list of short
+              * filenames, because the bigram list is 256 bytes.
+              */
+             printf (_("Compression ratio %4.2f%% (higher is better)\n"),
+                    100.0 * ((double)statistics.total_filename_length
+                             - (double) database_file_size)
+                    / (double) statistics.total_filename_length);
+           }
+         else
+           {
+             printf (_("Compression ratio is undefined\n"));
+           }
+       }
+    }
+  printf ("\n");
+}
+
+/*
+ * Return nonzero if the data we read in indicates that we are
+ * looking at a LOCATE02 locate database.
+ */
+static int
+looking_at_gnu_locatedb (const char *data, size_t len)
+{
+  if (len < sizeof (LOCATEDB_MAGIC))
+    return 0;
+  else if (0 == memcmp (data, LOCATEDB_MAGIC, sizeof (LOCATEDB_MAGIC)))
+    return 1;                  /* We saw the magic byte sequence */
+  else
+    return 0;
+}
+
+/*
+ * Return nonzero if the data we read in indicates that we are
+ * looking at an slocate database.
+ */
+static int
+looking_at_slocate_locatedb (const char *filename,
+                            const char *data,
+                            size_t len,
+                            int *seclevel)
+{
+  assert (len <= 2);
+
+  if (len < 2)
+    {
+      return 0;
+    }
+  else
+    {
+      /* Check that the magic number is a one-byte string */
+      if (0 == data[1])
+       {
+         if (isdigit ((unsigned char)data[0]))
+           {
+             /* looks promising. */
+             *seclevel = (data[0] - '0');
+
+             if (*seclevel > 1)
+               {
+                 /* Hmm, well it's probably an slocate database
+                  * of some awsomely huge security level, like 2.
+                  * We don't know how to handle those.
+                  */
+                 error (0, 0,
+                        _("locate database %s looks like an slocate "
+                          "database but it seems to have security level %c, "
+                          "which GNU findutils does not currently support"),
+                        quotearg_n_style (0, locale_quoting_style, filename),
+                        data[1]);
+                 return 1;
+               }
+             else
+               {
+                 return 1;
+               }
+           }
+         else
+           {
+             /* Not a digit. */
+             return 0;
+           }
+       }
+      else
+       {
+         /* Definitely not slocate. */
+         return 0;
+       }
+    }
+}
+
+
+static int
+i_am_little_endian (void)
+{
+  union
+  {
+    unsigned char uch[4];
+    unsigned int ui;
+  } u;
+  u.ui = 0u;
+  u.uch[0] = 1;
+  u.uch[1] = u.uch[2] = u.uch[3] = 0;
+  return u.ui == 1;
+}
+
+
+
+
+/* Print or count the entries in DBFILE that match shell globbing patterns in
+   ARGV. Return the number of entries matched. */
+
+static unsigned long
+search_one_database (int argc,
+                    char **argv,
+                    const char *dbfile,
+                    FILE *fp,
+                    off_t filesize,
+                    int ignore_case,
+                    int enable_print,
+                    int basename_only,
+                    int use_limit,
+                    struct locate_limits *plimit,
+                    int stats,
+                    int op_and,
+                    int regex,
+                    int regex_options)
+{
+  char *pathpart;              /* A pattern to consider. */
+  int argn;                    /* Index to current pattern in argv. */
+  int nread;                /* number of bytes read from an entry. */
+  struct process_data procdata;        /* Storage for data shared with visitors. */
+  int slocate_seclevel;
+  int oldformat;
+  struct visitor* pvis; /* temp for determining past_pat_inspector. */
+  const char *format_name;
+  enum ExistenceCheckType do_check_existence;
+
+
+  /* We may turn on existence checking for a given database.
+   * We ensure that we can return to the previous behaviour
+   * by using two variables, do_check_existence (which we act on)
+   * and check_existence (whcih indicates the default before we
+   * adjust it on the bassis of what kind of database we;re using
+   */
+  do_check_existence = check_existence;
+
+
+  if (ignore_case)
+    regex_options |= RE_ICASE;
+
+  oldformat = 0;
+  procdata.endian_state = GetwordEndianStateInitial;
+  procdata.len = procdata.count = 0;
+  procdata.slocatedb_format = 0;
+  procdata.itemcount = 0;
+
+  procdata.dbfile = dbfile;
+  procdata.fp = fp;
+
+  /* Set up the inspection regime */
+  inspectors = NULL;
+  lastinspector = NULL;
+  past_pat_inspector = NULL;
+  results_were_filtered = false;
+  procdata.pathsize = 128;     /* Increased as necessary by locate_read_str.  */
+  procdata.original_filename = xmalloc (procdata.pathsize);
+
+
+  nread = fread (procdata.original_filename, 1, SLOCATE_DB_MAGIC_LEN,
+                procdata.fp);
+  slocate_seclevel = 0;
+  if (looking_at_slocate_locatedb (procdata.dbfile,
+                                  procdata.original_filename,
+                                  nread,
+                                  &slocate_seclevel))
+    {
+      error (0, 0,
+            _("%s is an slocate database.  "
+              "Support for these is new, expect problems for now."),
+            quotearg_n_style (0, locale_quoting_style, procdata.dbfile));
+
+      /* slocate also uses frcode, but with a different header.
+       * We handle the header here and then work with the data
+       * in the normal way.
+       */
+      if (slocate_seclevel > 1)
+       {
+         /* We don't know what those security levels mean,
+          * so do nothing further
+          */
+         error (0, 0,
+                _("%s is an slocate database of unsupported security level %d; skipping it."),
+                quotearg_n_style (0, locale_quoting_style, procdata.dbfile),
+                slocate_seclevel);
+         return 0;
+       }
+      else if (slocate_seclevel > 0)
+       {
+         /* Don't show the filenames to the user if they don't exist.
+          * Showing stats is safe since filenames are only counted
+          * after the existence check
+          */
+         if (ACCEPT_NON_EXISTING == check_existence)
+           {
+             /* Do not allow the user to see a list of filenames that they
+              * cannot stat().
+              */
+             error (0, 0,
+                    _("You specified the -E option, but that option "
+                      "cannot be used with slocate-format databases "
+                      "with a non-zero security level.  No results will be "
+                      "generated for this database.\n"));
+             return 0;
+           }
+         if (ACCEPT_EXISTING != do_check_existence)
+           {
+             if (enable_print || stats)
+               {
+                 error (0, 0,
+                        _("%s is an slocate database.  "
+                          "Turning on the '-e' option."),
+                        quotearg_n_style (0, locale_quoting_style, procdata.dbfile));
+               }
+             do_check_existence = ACCEPT_EXISTING;
+           }
+       }
+      add_visitor (visit_locate02_format, NULL);
+      format_name = "slocate";
+      procdata.slocatedb_format = 1;
+    }
+  else
+    {
+      int nread2;
+
+      procdata.slocatedb_format = 0;
+      extend (&procdata, sizeof (LOCATEDB_MAGIC), 0u);
+      nread2 = fread (procdata.original_filename+nread, 1, sizeof (LOCATEDB_MAGIC)-nread,
+                     procdata.fp);
+      if (looking_at_gnu_locatedb (procdata.original_filename, nread+nread2))
+       {
+         add_visitor (visit_locate02_format, NULL);
+         format_name = "GNU LOCATE02";
+       }
+      else                             /* Use the old format */
+       {
+         int i;
+
+         nread += nread2;
+         extend (&procdata, 256u, 0u);
+         /* Read the list of the most common bigrams in the database.  */
+         if (nread < 256)
+           {
+             int more_read = fread (procdata.original_filename + nread, 1,
+                                    256 - nread, procdata.fp);
+             if ( (more_read + nread) != 256 )
+               {
+                 error (EXIT_FAILURE, 0,
+                        _("Old-format locate database %s is "
+                          "too short to be valid"),
+                        quotearg_n_style (0, locale_quoting_style, dbfile));
+
+               }
+           }
+
+         for (i = 0; i < 128; i++)
+           {
+             procdata.bigram1[i] = procdata.original_filename[i << 1];
+             procdata.bigram2[i] = procdata.original_filename[(i << 1) + 1];
+           }
+         format_name = "old";
+         oldformat = 1;
+         add_visitor (visit_old_format, NULL);
+       }
+    }
+
+  if (basename_only)
+    add_visitor (visit_basename, NULL);
+
+  /* Add an inspector for each pattern we're looking for. */
+  for ( argn = 0; argn < argc; argn++ )
+    {
+      results_were_filtered = true;
+      pathpart = argv[argn];
+      if (regex)
+       {
+         struct regular_expression *p = xmalloc (sizeof (*p));
+         const char *error_message = NULL;
+
+         memset (&p->regex, 0, sizeof (p->regex));
+
+         re_set_syntax (regex_options);
+         p->regex.allocated = 100;
+         p->regex.buffer = xmalloc (p->regex.allocated);
+         p->regex.fastmap = NULL;
+         p->regex.syntax = regex_options;
+         p->regex.translate = NULL;
+
+         error_message = re_compile_pattern (pathpart, strlen (pathpart),
+                                             &p->regex);
+         if (error_message)
+           {
+             error (EXIT_FAILURE, 0, "%s", error_message);
+           }
+         else
+           {
+             add_visitor (visit_regex, p);
+           }
+       }
+      else if (contains_metacharacter (pathpart))
+       {
+         if (ignore_case)
+           add_visitor (visit_globmatch_casefold, pathpart);
+         else
+           add_visitor (visit_globmatch_nofold, pathpart);
+       }
+      else
+       {
+         /* No glob characters used.  Hence we match on
+          * _any part_ of the filename, not just the
+          * basename.  This seems odd to me, but it is the
+          * traditional behaviour.
+          * James Youngman <jay@gnu.org>
+          */
+         visitfunc matcher;
+         if (1 == MB_CUR_MAX)
+           {
+             /* As an optimisation, use a strstr () matcher if we are
+              * in a unibyte locale.  This can give a x2 speedup in
+              * the C locale.  Some light testing reveals that
+              * glibc's strstr () is somewhere around 40% faster than
+              * gnulib's, so we just use strstr ().
+              */
+             matcher = ignore_case ?
+               visit_substring_match_casefold_narrow  :
+               visit_substring_match_nocasefold_narrow;
+           }
+         else
+           {
+             matcher = ignore_case ?
+               visit_substring_match_casefold_wide  :
+               visit_substring_match_nocasefold_wide;
+           }
+         add_visitor (matcher, pathpart);
+       }
+    }
+
+  pvis = lastinspector;
+
+  /* We add visit_existing_*() as late as possible to reduce the
+   * number of stat() calls.
+   */
+  switch (do_check_existence)
+    {
+      case ACCEPT_EXISTING:
+       results_were_filtered = true;
+       if (follow_symlinks)    /* -L, default */
+         add_visitor (visit_existing_follow, NULL);
+       else                    /* -P */
+         add_visitor (visit_existing_nofollow, NULL);
+       break;
+
+      case ACCEPT_NON_EXISTING:
+       results_were_filtered = true;
+       if (follow_symlinks)    /* -L, default */
+         add_visitor (visit_non_existing_follow, NULL);
+       else                    /* -P */
+         add_visitor (visit_non_existing_nofollow, NULL);
+       break;
+
+      case ACCEPT_EITHER:      /* Default, neither -E nor -e */
+       /* do nothing; no extra processing. */
+       break;
+    }
+
+  /* Security issue: The stats visitor must be added immediately
+   * before the print visitor, because otherwise the -S option would
+   * leak information about files that the caller cannot see.
+   */
+  if (stats)
+    add_visitor (visit_stats, &statistics);
+
+  if (enable_print)
+    {
+      if (print_quoted_filename)
+       add_visitor (visit_justprint_quoted,   NULL);
+      else
+       add_visitor (visit_justprint_unquoted, NULL);
+    }
+
+
+  if (use_limit)
+    add_visitor (visit_limit, plimit);
+  else
+    add_visitor (visit_count, plimit);
+
+
+  if (argc > 1)
+    {
+      past_pat_inspector = pvis->next;
+      if (op_and)
+        mainprocessor = process_and;
+      else
+        mainprocessor = process_or;
+    }
+  else
+    mainprocessor = process_simple;
+
+  if (stats)
+    {
+      printf (_("Database %s is in the %s format.\n"),
+             procdata.dbfile,
+             format_name);
+    }
+
+
+  procdata.c = getc (procdata.fp);
+  /* If we are searching for filename patterns, the inspector list
+   * will contain an entry for each pattern for which we are searching.
+   */
+  while ( (procdata.c != EOF) &&
+          (VISIT_ABORT != (mainprocessor)(&procdata)) )
+    {
+      /* Do nothing; all the work is done in the visitor functions. */
+    }
+
+  if (stats)
+    {
+      if (oldformat)
+       {
+         int host_little_endian = i_am_little_endian ();
+         const char *little = _("The database has little-endian "
+                                "machine-word encoding.\n");
+         const char *big    = _("The database has big-endian "
+                                "machine-word encoding.\n");
+
+         if (GetwordEndianStateNative == procdata.endian_state)
+           {
+             printf ("%s", (host_little_endian ? little : big));
+           }
+         else if (GetwordEndianStateSwab == procdata.endian_state)
+           {
+             printf ("%s", (host_little_endian ? big : little));
+           }
+         else
+           {
+             printf (_("The database machine-word encoding order "
+                      "is not obvious.\n"));
+           }
+       }
+      if (filesize)
+       print_stats (argc, filesize);
+    }
+
+  if (ferror (procdata.fp))
+    {
+      error (0, errno, "%s",
+            quotearg_n_style (0, locale_quoting_style, procdata.dbfile));
+      return 0;
+    }
+  return plimit->items_accepted;
+}
+
+
+extern char *version_string;
+
+static void
+usage (FILE *stream)
+{
+  fprintf (stream, _("\
+Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n\
+      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n\
+      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n\
+      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n\
+      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n\
+      [--max-database-age D] [--version] [--help]\n\
+      pattern...\n"),
+          program_name);
+  fputs (_("\nReport bugs to <bug-findutils@gnu.org>.\n"), stream);
+}
+enum
+  {
+    REGEXTYPE_OPTION = CHAR_MAX + 1,
+    MAX_DB_AGE
+  };
+
+
+static struct option const longopts[] =
+{
+  {"database", required_argument, NULL, 'd'},
+  {"existing", no_argument, NULL, 'e'},
+  {"non-existing", no_argument, NULL, 'E'},
+  {"ignore-case", no_argument, NULL, 'i'},
+  {"all", no_argument, NULL, 'A'},
+  {"help", no_argument, NULL, 'h'},
+  {"version", no_argument, NULL, 'v'},
+  {"null", no_argument, NULL, '0'},
+  {"count", no_argument, NULL, 'c'},
+  {"wholename", no_argument, NULL, 'w'},
+  {"wholepath", no_argument, NULL, 'w'}, /* Synonym. */
+  {"basename", no_argument, NULL, 'b'},
+  {"print", no_argument, NULL, 'p'},
+  {"stdio", no_argument, NULL, 's'},
+  {"mmap",  no_argument, NULL, 'm'},
+  {"limit",  required_argument, NULL, 'l'},
+  {"regex",  no_argument, NULL, 'r'},
+  {"regextype",  required_argument, NULL, REGEXTYPE_OPTION},
+  {"statistics",  no_argument, NULL, 'S'},
+  {"follow",      no_argument, NULL, 'L'},
+  {"nofollow",    no_argument, NULL, 'P'},
+  {"max-database-age",    required_argument, NULL, MAX_DB_AGE},
+  {NULL, no_argument, NULL, 0}
+};
+
+
+static int
+drop_privs (void)
+{
+  const char * what = "failed";
+  const uid_t orig_euid = geteuid ();
+  const uid_t uid       = getuid ();
+  const gid_t gid       = getgid ();
+
+#if HAVE_SETGROUPS
+  /* Use of setgroups () is restricted to root only. */
+  if (0 == orig_euid)
+    {
+      /* We're either root or running setuid-root. */
+      gid_t groups[1];
+      groups[0] = gid;
+      if (0 != setgroups (1u, groups))
+       {
+         what = _("failed to drop group privileges");
+         goto fail;
+       }
+    }
+#endif
+
+  /* Drop any setuid privileges */
+  if (uid != orig_euid)
+    {
+      if (0 == uid)
+       {
+         /* We're really root anyway, but are setuid to something else. Leave it. */
+       }
+      else
+       {
+         errno = 0;
+         if (0 != setuid (getuid ()))
+           {
+             what = _("failed to drop setuid privileges");
+             goto fail;
+           }
+
+         /* Defend against the case where the attacker runs us with the
+          * capability to call setuid () turned off, which on some systems
+          * will cause the above attempt to drop privileges fail (leaving us
+          * privileged).
+          */
+         else
+           {
+             /* Check that we can no longer switch bask to root */
+             if (0 == setuid (0))
+               {
+                 what = _("Failed to fully drop privileges");
+                 /* The errno value here is not interesting (since
+                  * the system call we are complaining about
+                  * succeeded when we wanted it to fail).  Arrange
+                  * for the call to error () not to print the errno
+                  * value by setting errno=0.
+                  */
+                 errno = 0;
+                 goto fail;
+               }
+           }
+       }
+    }
+
+  /* Drop any setgid privileges */
+  errno = 0;
+  if (0 != setgid (gid))
+    {
+      what = _("failed to drop setgid privileges");
+      goto fail;
+    }
+
+  /* success. */
+  return 0;
+
+ fail:
+  error (EXIT_FAILURE, errno, "%s",
+        quotearg_n_style (0, locale_quoting_style, what));
+  abort ();
+  kill (0, SIGKILL);
+  _exit (1);
+  /*NOTREACHED*/
+  /* ... we hope. */
+  for (;;)
+    {
+      /* deliberate infinite loop */
+    }
+}
+
+static int
+opendb (const char *name)
+{
+  int fd = open (name, O_RDONLY
+#if defined O_LARGEFILE
+               |O_LARGEFILE
+#endif
+               );
+  if (fd >= 0)
+    {
+      /* Make sure it won't survive an exec */
+      if (0 != fcntl (fd, F_SETFD, FD_CLOEXEC))
+       {
+         close (fd);
+         fd = -1;
+       }
+    }
+  return fd;
+}
+
+int
+dolocate (int argc, char **argv, int secure_db_fd)
+{
+  char *dbpath;
+  unsigned long int found = 0uL;
+  int ignore_case = 0;
+  int print = 0;
+  int just_count = 0;
+  int basename_only = 0;
+  int use_limit = 0;
+  int regex = 0;
+  int regex_options = RE_SYNTAX_EMACS;
+  int stats = 0;
+  int op_and = 0;
+  const char *e;
+  FILE *fp;
+  int they_chose_db = 0;
+  bool did_stdin = false;      /* Set to prevent rereading stdin. */
+
+  if (argv[0])
+    set_program_name (argv[0]);
+  else
+    set_program_name ("locate");
+
+#ifdef HAVE_SETLOCALE
+  setlocale (LC_ALL, "");
+#endif
+  bindtextdomain (PACKAGE, LOCALEDIR);
+  textdomain (PACKAGE);
+  atexit (close_stdout);
+
+  limits.limit = 0;
+  limits.items_accepted = 0;
+
+  quote_opts = clone_quoting_options (NULL);
+  print_quoted_filename = true;
+
+  /* We cannot simultaneously trust $LOCATE_PATH and use the
+   * setuid-access-controlled database,, since that could cause a leak
+   * of private data.
+   */
+  dbpath = getenv ("LOCATE_PATH");
+  if (dbpath)
+    {
+      they_chose_db = 1;
+    }
+
+  check_existence = ACCEPT_EITHER;
+
+  for (;;)
+    {
+      int opti = -1;
+      int optc = getopt_long (argc, argv, "Abcd:eEil:prsm0SwHPL", longopts,
+                             &opti);
+      if (optc == -1)
+       break;
+
+      switch (optc)
+       {
+       case '0':
+         separator = 0;
+         print_quoted_filename = false; /* print filename 'raw'. */
+         break;
+
+       case 'A':
+         op_and = 1;
+         break;
+
+       case 'b':
+         basename_only = 1;
+         break;
+
+       case 'c':
+         just_count = 1;
+         break;
+
+       case 'd':
+         dbpath = optarg;
+         they_chose_db = 1;
+         break;
+
+       case 'e':
+         check_existence = ACCEPT_EXISTING;
+         break;
+
+       case 'E':
+         check_existence = ACCEPT_NON_EXISTING;
+         break;
+
+       case 'i':
+         ignore_case = 1;
+         break;
+
+       case 'h':
+         usage (stdout);
+         return 0;
+
+       case MAX_DB_AGE:
+         /* XXX: nothing in the test suite for this option. */
+         set_max_db_age (optarg);
+         break;
+
+       case 'p':
+         print = 1;
+         break;
+
+       case 'v':
+         display_findutils_version ("locate");
+         return 0;
+
+       case 'w':
+         basename_only = 0;
+         break;
+
+       case 'r':
+         regex = 1;
+         break;
+
+       case REGEXTYPE_OPTION:
+         regex_options = get_regex_type (optarg);
+         break;
+
+       case 'S':
+         stats = 1;
+         break;
+
+       case 'L':
+         follow_symlinks = 1;
+         break;
+
+         /* In find, -P and -H differ in the way they handle paths
+          * given on the command line.  This is not relevant for
+          * locate, but the -H option is supported because it is
+          * probably more intuitive to do so.
+          */
+       case 'P':
+       case 'H':
+         follow_symlinks = 0;
+         break;
+
+       case 'l':
+         {
+           char *end = optarg;
+           strtol_error err = xstrtoumax (optarg, &end, 10, &limits.limit,
+                                          NULL);
+           if (LONGINT_OK != err)
+             xstrtol_fatal (err, opti, optc, longopts, optarg);
+           use_limit = 1;
+         }
+         break;
+
+       case 's':                       /* use stdio */
+       case 'm':                       /* use mmap  */
+         /* These options are implemented simply for
+          * compatibility with FreeBSD
+          */
+         break;
+
+       default:
+         usage (stderr);
+         return 1;
+       }
+    }
+
+
+  /* If the user gave the -d option or set LOCATE_PATH,
+   * relinquish access to the secure database.
+   */
+  if (they_chose_db)
+    {
+      if (secure_db_fd >= 0)
+       {
+         close (secure_db_fd);
+         secure_db_fd = -1;
+       }
+    }
+
+  if (!just_count && !stats)
+    print = 1;
+
+  if (stats)
+    {
+      if (optind == argc)
+       use_limit = 0;
+    }
+  else
+    {
+      if (!just_count && optind == argc)
+       {
+         usage (stderr);
+         return 1;
+       }
+    }
+
+
+  if (1 == isatty (STDOUT_FILENO))
+    stdout_is_a_tty = true;
+  else
+    stdout_is_a_tty = false;
+
+  if (they_chose_db)
+    next_element (dbpath, 0);  /* Initialize.  */
+
+  /* Bail out early if limit already reached. */
+  while (!use_limit || limits.limit > limits.items_accepted)
+    {
+      struct stat st;
+      int fd;
+      off_t filesize;
+
+      statistics.compressed_bytes =
+      statistics.total_filename_count =
+      statistics.total_filename_length =
+      statistics.whitespace_count =
+      statistics.newline_count =
+      statistics.highbit_filename_count = 0u;
+
+      if (they_chose_db)
+       {
+         /* Take the next element from the list of databases */
+         e = next_element ((char *) NULL, 0);
+         if (NULL == e)
+           break;
+
+         if (0 == strcmp (e, "-"))
+           {
+             if (did_stdin)
+               {
+                 error (0, 0,
+                        _("warning: the locate database can only be read from stdin once."));
+                 return 0;
+               }
+             else
+               {
+                 e = "<stdin>";
+                 fd = 0;
+                 did_stdin = true;
+               }
+           }
+         else
+           {
+             if (0 == strlen (e) || 0 == strcmp (e, "."))
+               {
+                 e = LOCATE_DB;
+               }
+
+             /* open the database */
+             fd = opendb (e);
+             if (fd < 0)
+               {
+                 error (0, errno, "%s",
+                        quotearg_n_style (0, locale_quoting_style, e));
+                 return 0;
+               }
+           }
+       }
+      else
+       {
+         if (-1 == secure_db_fd)
+           {
+             /* Already searched the database, it's time to exit the loop */
+             break;
+           }
+         else
+           {
+             e = selected_secure_db;
+             fd = secure_db_fd;
+             secure_db_fd = -1;
+           }
+       }
+
+      /* Check the database to see if it is old. */
+      if (fstat (fd, &st))
+       {
+         error (0, errno, "%s",
+                quotearg_n_style (0, locale_quoting_style, e));
+         /* continue anyway */
+         filesize = (off_t)0;
+       }
+      else
+       {
+         time_t now;
+
+         filesize = st.st_size;
+
+         if ((time_t)-1 == time (&now))
+           {
+             /* If we can't tell the time, we don't know how old the
+              * database is.  But since the message is just advisory,
+              * we continue anyway.
+              */
+             error (0, errno, _("time system call failed"));
+           }
+         else
+           {
+             double age          = difftime (now, st.st_mtime);
+             double warn_seconds = SECONDS_PER_UNIT * warn_number_units;
+             if (age > warn_seconds)
+               {
+                 /* For example:
+                    warning: database `fred' is more than 8 days old (actual age is 10 days)*/
+                 error (0, 0,
+                        _("warning: database %s is more than %d %s old (actual age is %.1f %s)"),
+                        quotearg_n_style (0,  locale_quoting_style, e),
+                        warn_number_units,              _(warn_name_units),
+                        (age/(double)SECONDS_PER_UNIT), _(warn_name_units));
+               }
+           }
+       }
+
+      fp = fdopen (fd, "r");
+      if (NULL == fp)
+       {
+         error (0, errno, "%s",
+                quotearg_n_style (0, locale_quoting_style, e));
+         return 0;
+       }
+
+      /* Search this database for all patterns simultaneously */
+      found = search_one_database (argc - optind, &argv[optind],
+                                  e, fp, filesize,
+                                  ignore_case, print, basename_only,
+                                  use_limit, &limits, stats,
+                                  op_and, regex, regex_options);
+
+      /* Close the databsase (even if it is stdin) */
+      if (fclose (fp) == EOF)
+       {
+         error (0, errno, "%s",
+                quotearg_n_style (0, locale_quoting_style, e));
+         return 0;
+       }
+    }
+
+  if (just_count)
+    {
+      printf ("%ld\n", found);
+    }
+
+  if (found || (use_limit && (limits.limit==0)) || stats )
+    return 0;
+  else
+    return 1;
+}
+
+#define ARRAYSIZE(a) (sizeof (a)/sizeof (a[0]))
+static int
+open_secure_db (void)
+{
+  int fd, i;
+
+  const char * secure_db_list[] =
+    {
+      LOCATE_DB,
+      "/var/lib/slocate/slocate.db",
+      NULL
+    };
+  for (i=0; secure_db_list[i]; ++i)
+    {
+      fd = opendb (secure_db_list[i]);
+      if (fd >= 0)
+       {
+         selected_secure_db = secure_db_list[i];
+         return fd;
+       }
+    }
+  return -1;
+}
+
+int
+main (int argc, char **argv)
+{
+  int dbfd = open_secure_db ();
+  drop_privs ();
+
+  return dolocate (argc, argv, dbfd);
+}
diff --git a/locate/locatedb.5 b/locate/locatedb.5
new file mode 100644 (file)
index 0000000..65a8351
--- /dev/null
@@ -0,0 +1,153 @@
+.TH LOCATEDB 5 \" -*- nroff -*-
+.SH NAME
+locatedb \- front-compressed file name database
+.SH DESCRIPTION
+This manual page documents the format of file name databases for the
+GNU version of
+.BR locate .
+The file name databases contain lists of files that were in
+particular directory trees when the databases were last updated.
+.P
+There can be multiple databases.  Users can select which databases
+\fBlocate\fP searches using an environment variable or command line
+option; see \fBlocate\fP(1).  The system administrator can choose the
+file name of the default database, the frequency with which the
+databases are updated, and the directories for which they contain
+entries.  Normally, file name databases are updated by running the
+\fBupdatedb\fP program periodically, typically nightly; see
+\fBupdatedb\fP(1).
+
+.SH GNU LOCATE02 database format
+This is the default format of databases produced by
+.BR updatedb .
+The
+.B updatedb
+program runs
+.B frcode
+to compress the list of file names using front-compression, which
+reduces the database size by a factor of 4 to 5.  Front-compression
+(also known as incremental encoding) works as follows.
+.P
+The database entries are a sorted list (case-insensitively, for users'
+convenience).  Since the list is sorted, each entry is likely to share
+a prefix (initial string) with the previous entry.  Each database
+entry begins with an signed offset-differential count byte, which is
+the additional number of characters of prefix of the preceding entry
+to use beyond the number that the preceding entry is using of its
+predecessor.  (The counts can be negative.)  Following the count is a
+null-terminated ASCII remainder \(em the part of the name that follows
+the shared prefix.
+.P
+If the offset-differential count is larger than can be stored in a
+signed byte (+/\-127), the byte has the value 0x80 (binary 10000000)
+and the actual count follows in a 2-byte word, with the high byte
+first (network byte order).  This count can also be negative (the sign
+bit being in the first of the two bytes).
+.P
+Every database begins with a dummy entry for a file called `LOCATE02',
+which \fBlocate\fP checks for to ensure that the database file has the
+correct format; it ignores the entry in doing the search.
+.P
+Databases can not be concatenated together, even if the first
+(dummy) entry is trimmed from all but the first database.  This
+is because the offset-differential count in the first entry of the
+second and following databases will be wrong.
+.P
+In the future, the data within the locate database may not be sorted
+in any particular order.  To obtain sorted results, pipe the output of
+.B locate
+through
+.BR "sort -f" .
+.SH slocate database format
+The
+.B slocate
+program uses a database format similar to, but not quite the same as,
+GNU
+.BR locate .
+The first byte of the database specifies its
+.I security
+.IR level .
+If the security level is 0,
+.B slocate
+will read, match and print filenames on the basis of the information
+in the database only.  However, if the security level byte is 1,
+.B slocate
+omits entries from its output if the invoking user is unable to access
+them.  The second byte of the database is zero.  The second byte is
+followed by the first database entry.  The first entry in the database
+is not preceded by any differential count or dummy entry.  Instead
+the differential count for the first item is assumed to be zero.
+.P
+Starting with the second entry (if any) in the database, data is
+interpreted as for the GNU LOCATE02 format.
+
+.SH Old Locate Database format
+There is also an old database format, used by Unix
+.B locate
+and
+.B find
+programs and earlier releases of the GNU ones.  \fBupdatedb\fP runs
+programs called \fBbigram\fP and \fBcode\fP to produce old-format
+databases.  The old format differs from the above description in the
+following ways.  Instead of each entry starting with an
+offset-differential count byte and ending with a null, byte values
+from 0 through 28 indicate offset-differential counts from \-14 through
+14.  The byte value indicating that a long offset-differential count
+follows is 0x1e (30), not 0x80.  The long counts are stored in host
+byte order, which is not necessarily network byte order, and host
+integer word size, which is usually 4 bytes.  They also represent a
+count 14 less than their value.  The database lines have no
+termination byte; the start of the next line is indicated by its first
+byte having a value <= 30.
+.P
+In addition, instead of starting with a dummy entry, the old database
+format starts with a 256 byte table containing the 128 most common
+bigrams in the file list.  A bigram is a pair of adjacent bytes.
+Bytes in the database that have the high bit set are indexes (with the
+high bit cleared) into the bigram table.  The bigram and
+offset-differential count coding makes these databases 20-25% smaller
+than the new format, but makes them not 8-bit clean.  Any byte in a
+file name that is in the ranges used for the special codes is replaced
+in the database by a question mark, which not coincidentally is the
+shell wildcard to match a single character.
+.SH EXAMPLE
+.nf
+
+Input to \fBfrcode\fP:
+.\" with nulls changed to newlines:
+/usr/src
+/usr/src/cmd/aardvark.c
+/usr/src/cmd/armadillo.c
+/usr/tmp/zoo
+
+Length of the longest prefix of the preceding entry to share:
+0 /usr/src
+8 /cmd/aardvark.c
+14 rmadillo.c
+5 tmp/zoo
+
+.fi
+Output from \fBfrcode\fP, with trailing nulls changed to newlines
+and count bytes made printable:
+.nf
+0 LOCATE02
+0 /usr/src
+8 /cmd/aardvark.c
+6 rmadillo.c
+\-9 tmp/zoo
+
+(6 = 14 \- 8, and \-9 = 5 \- 14)
+.fi
+.SH "SEE ALSO"
+\fBfind\fP(1), \fBlocate\fP(1), \fBlocatedb\fP(5), \fBxargs\fP(1),
+\fBFinding Files\fP (on-line in Info, or printed)
+.SH "BUGS"
+.P
+The best way to report a bug is to use the form at
+http://savannah.gnu.org/bugs/?group=findutils.
+The reason for this is that you will then be able to track progress in
+fixing the problem.   Other comments about \fBlocate\fP(1) and about
+the findutils package in general can be sent to the
+.I bug-findutils
+mailing list.  To join the list, send email to
+.IR bug-findutils-request@gnu.org .
diff --git a/locate/locatedb.h b/locate/locatedb.h
new file mode 100644 (file)
index 0000000..a2d6644
--- /dev/null
@@ -0,0 +1,72 @@
+/* locatedb.h -- declarations for the locate database
+   Copyright (C) 1994, 2010 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 _LOCATEDB_H
+#define _LOCATEDB_H 1
+
+/* The magic string at the start of a locate database, to make sure
+   it's in the right format.  The 02 is the database format version number.
+   This string has the same format as a database entry, but you can't
+   concatenate databases even if you remove it, since the differential count
+   in the first entry of the second database will be wrong.  */
+#define LOCATEDB_MAGIC "\0LOCATE02"
+
+/* Common-prefix length differences in the ranges
+   0..127, -127..-1 (0x00..0x7f, 0x81..0xff) fit into one byte.
+   This value (which is -128) indicates that the difference is
+   too large to fit into one byte, and a two-byte integer follows.  */
+#define        LOCATEDB_ESCAPE 0x80
+#define LOCATEDB_ONEBYTE_MAX (127)
+#define LOCATEDB_ONEBYTE_MIN (-127)
+
+
+/* If it is ever possible to try to encode LOCATEDB_MAGIC as a
+ * single-byte offset, then an unfortunate length of common prefix
+ * will produce a spurious escape character, desynchronising the data
+ * stream.  We use a compile-time check in the preprocessor to prevent
+ * this.
+ */
+#if LOCATEDB_ESCAPE <= LOCATEDB_ONEBYTE_MAX
+#error "You have a bad combination of LOCATEDB_ESCAPE and LOCATEDB_ONEBYTE_MAX, see above"
+#endif
+
+/* These are used for old, bigram-encoded databases:  */
+
+/* Means the differential count follows in a 2-byte int instead. */
+#define        LOCATEDB_OLD_ESCAPE     30
+
+/* Offset added to differential counts to encode them as positive numbers.  */
+#define        LOCATEDB_OLD_OFFSET     14
+
+typedef enum
+  {
+    GetwordEndianStateInitial = 0,
+    GetwordEndianStateNative  = 1,
+    GetwordEndianStateSwab    = 2
+  } GetwordEndianState;
+
+int getword (FILE *fp, const char *filename,
+            size_t minvalue, size_t maxvalue,
+            GetwordEndianState *endian_state_flag);
+
+bool putword (FILE *fp, int word,
+             GetwordEndianState endian_state_flag);
+
+
+#define SLOCATE_DB_MAGIC_LEN 2
+
+#endif /* !_LOCATEDB_H */
diff --git a/locate/testsuite/Makefile.am b/locate/testsuite/Makefile.am
new file mode 100644 (file)
index 0000000..75623bc
--- /dev/null
@@ -0,0 +1,50 @@
+AUTOMAKE_OPTIONS=dejagnu
+LOCATE = ../locate
+UPDATEDB = ../updatedb
+LOCATEFLAGS =
+UPDATEDBFLAGS =
+DEJATOOL = locate
+
+EXTRA_DIST_EXP = \
+config/unix.exp \
+locate.gnu/bigendian.exp \
+locate.gnu/littleendian.exp \
+locate.gnu/ignore_case1.exp \
+locate.gnu/ignore_case2.exp \
+locate.gnu/ignore_case3.exp \
+locate.gnu/bigprefix1.exp \
+locate.gnu/regex1.exp \
+locate.gnu/exists1.exp \
+locate.gnu/exists2.exp \
+locate.gnu/exists3.exp \
+locate.gnu/notexists1.exp \
+locate.gnu/notexists2.exp \
+locate.gnu/notexists3.exp \
+locate.gnu/old_prefix.exp \
+locate.gnu/space1st.exp \
+locate.gnu/sv-bug-14535.exp \
+locate.gnu/exceedshort.exp
+
+EXTRA_DIST_XI = \
+locate.gnu/locateddb.old.powerpc.xi \
+locate.gnu/locateddb.old.x86.xi
+
+EXTRA_DIST_XO = \
+locate.gnu/bigendian.xo \
+locate.gnu/littleendian.xo \
+locate.gnu/ignore_case1.xo \
+locate.gnu/ignore_case2.xo \
+locate.gnu/ignore_case3.xo \
+locate.gnu/exists1.xo \
+locate.gnu/exists2.xo \
+locate.gnu/exists3.xo \
+locate.gnu/notexists1.xo \
+locate.gnu/notexists2.xo \
+locate.gnu/notexists3.xo \
+locate.gnu/old_prefix.xo
+
+EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_XI)
+
+# DIST_SUBDIRS = config locate.gnu
+
+CLEANFILES = *.log *.sum site.exp site.bak
diff --git a/locate/testsuite/Makefile.in b/locate/testsuite/Makefile.in
new file mode 100644 (file)
index 0000000..c7ad128
--- /dev/null
@@ -0,0 +1,1426 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+subdir = locate/testsuite
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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 =
+SOURCES =
+DIST_SOURCES =
+RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+EXPECT = expect
+RUNTEST = runtest
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = @INCLUDES@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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 = dejagnu
+LOCATE = ../locate
+UPDATEDB = ../updatedb
+LOCATEFLAGS = 
+UPDATEDBFLAGS = 
+DEJATOOL = locate
+EXTRA_DIST_EXP = \
+config/unix.exp \
+locate.gnu/bigendian.exp \
+locate.gnu/littleendian.exp \
+locate.gnu/ignore_case1.exp \
+locate.gnu/ignore_case2.exp \
+locate.gnu/ignore_case3.exp \
+locate.gnu/bigprefix1.exp \
+locate.gnu/regex1.exp \
+locate.gnu/exists1.exp \
+locate.gnu/exists2.exp \
+locate.gnu/exists3.exp \
+locate.gnu/notexists1.exp \
+locate.gnu/notexists2.exp \
+locate.gnu/notexists3.exp \
+locate.gnu/old_prefix.exp \
+locate.gnu/space1st.exp \
+locate.gnu/sv-bug-14535.exp \
+locate.gnu/exceedshort.exp
+
+EXTRA_DIST_XI = \
+locate.gnu/locateddb.old.powerpc.xi \
+locate.gnu/locateddb.old.x86.xi
+
+EXTRA_DIST_XO = \
+locate.gnu/bigendian.xo \
+locate.gnu/littleendian.xo \
+locate.gnu/ignore_case1.xo \
+locate.gnu/ignore_case2.xo \
+locate.gnu/ignore_case3.xo \
+locate.gnu/exists1.xo \
+locate.gnu/exists2.xo \
+locate.gnu/exists3.xo \
+locate.gnu/notexists1.xo \
+locate.gnu/notexists2.xo \
+locate.gnu/notexists3.xo \
+locate.gnu/old_prefix.xo
+
+EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_XI)
+
+# DIST_SUBDIRS = config locate.gnu
+CLEANFILES = *.log *.sum site.exp site.bak
+all: all-am
+
+.SUFFIXES:
+$(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 locate/testsuite/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits locate/testsuite/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):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+check-DEJAGNU: site.exp
+       srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
+       EXPECT=$(EXPECT); export EXPECT; \
+       runtest=$(RUNTEST); \
+       if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+         exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
+           if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+           then :; else exit_status=1; fi; \
+         done; \
+       else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+       fi; \
+       exit $$exit_status
+site.exp: Makefile
+       @echo 'Making a new site.exp file...'
+       @echo '## these variables are automatically generated by make ##' >site.tmp
+       @echo '# Do not edit here.  If you wish to override these values' >>site.tmp
+       @echo '# edit the last section' >>site.tmp
+       @echo 'set srcdir $(srcdir)' >>site.tmp
+       @echo "set objdir `pwd`" >>site.tmp
+       @echo 'set build_alias "$(build_alias)"' >>site.tmp
+       @echo 'set build_triplet $(build_triplet)' >>site.tmp
+       @echo 'set host_alias "$(host_alias)"' >>site.tmp
+       @echo 'set host_triplet $(host_triplet)' >>site.tmp
+       @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+       @test ! -f site.exp || \
+         sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+       @-rm -f site.bak
+       @test ! -f site.exp || mv site.exp site.bak
+       @mv site.tmp site.exp
+
+distclean-DEJAGNU:
+       -rm -f site.exp site.bak
+       -l='$(DEJATOOL)'; for tool in $$l; do \
+         rm -f $$tool.sum $$tool.log; \
+       done
+
+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-DEJAGNU
+check: check-am
+all-am: Makefile
+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:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+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)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-DEJAGNU distclean-generic
+
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
+       distclean distclean-DEJAGNU distclean-generic 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-generic pdf \
+       pdf-am ps ps-am uninstall uninstall-am
+
+
+# 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/locate/testsuite/config/unix.exp b/locate/testsuite/config/unix.exp
new file mode 100644 (file)
index 0000000..dccffd1
--- /dev/null
@@ -0,0 +1,341 @@
+# -*- TCL -*-
+# Test-specific TCL procedures required by DejaGNU.
+# Copyright (C) 1994, 2003, 2004, 2005, 2006, 2007, 2010 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/>.
+
+
+# Modified by David MacKenzie <djm@gnu.org> from the gcc files
+# written by Rob Savoye <rob@cygnus.com>.
+\f
+
+# use the local version of find for updatedb
+#
+# We normalise (normalize for those over the water) pathnames 
+# because the updatedb shell script uses "cd", which means that 
+# any relative paths no longer point where we thought they did.
+# Because "file normalize" requires tcl 8.4, we have a plan B
+# for normalising the name of a directory, but it is slower.
+
+proc normalize_dir { dir } {
+    if [ catch { file normalize $dir } result ] then {
+       return [ exec /bin/sh -c "cd $dir && /bin/pwd" ]
+    } else {
+       return $result;
+    }
+}
+
+set fulldir [ normalize_dir "../../find" ]
+set env{find} "$fulldir/find"
+
+# use the local help commands for updatedb
+set env(LIBEXECDIR) [ normalize_dir .. ] 
+# use our local version of find, too.
+
+# do not ignore any file systems for this test
+set env(PRUNEFS) ""
+global UPDATEDB
+global FRCODE
+global LOCATE
+global FIND
+
+# look for binaries
+set UPDATEDB [findfile $base_dir/../updatedb     $base_dir/../updatedb     [transform updatedb]]
+set FRCODE   [findfile $base_dir/../frcode       $base_dir/../frcode       [transform frcode  ]]
+set LOCATE   [findfile $base_dir/../locate       $base_dir/../locate       [transform locate  ]]
+set FIND     [findfile $base_dir/../../find/find $base_dir/../../find/find [transform find    ]]
+verbose "UPDATEDB is $UPDATEDB" 1
+verbose "FRCODE   is $FRCODE" 1
+verbose "LOCATE   is $LOCATE" 1
+verbose "FIND     is $FIND" 1
+
+
+foreach exe "$UPDATEDB $FRCODE $LOCATE $FIND" {
+    if ![ string match "/*" $exe ] {
+       error "Failed to find a binary to test for $exe"
+    }
+}
+
+global UPDATEDBFLAGS
+if ![info exists UPDATEDBFLAGS] then {
+    set UPDATEDBFLAGS ""
+}
+
+set env(find) "$FIND"
+
+global LOCATEFLAGS
+if ![info exists LOCATEFLAGS] then {
+    set LOCATEFLAGS ""
+}
+
+# Called by runtest.
+# Extract and print the version number of locate.
+proc locate_version {} {
+    global UPDATEDB
+    global UPDATEDBFLAGS
+    global LOCATE
+    global LOCATEFLAGS
+
+    if {[which $LOCATE] != 0} then {
+       set tmp [ eval exec $LOCATE $LOCATEFLAGS --version </dev/null | sed 1q]
+       clone_output $tmp
+    } else {
+       warning "$LOCATE, program does not exist"
+    }
+}
+
+
+# Run locate and leave the output in $comp_output.
+# Called by individual test scripts.
+proc locate_textonly { passfail id intext locateoptions outtext } {
+    global LOCATE
+    global FRCODE
+
+    set fail_good [string match "f*" $passfail]
+
+    set scriptname [uplevel {info script}]
+    set testbase [file rootname $scriptname]
+    set testname [file tail $testbase]
+    set listfile "updatedb-paths.txt"
+    set dbfile   "locate.db"
+    set outfile  "locate.out"
+
+    # Generate the "frcode" input.
+    catch { file delete -force $listfle }
+    set f [open $listfile w]
+    puts $f "$intext"
+    close $f
+
+    # Run frcode
+    exec $FRCODE < $listfile > $dbfile
+
+    # Now run locate.
+    set locatecmd "$LOCATE -d $dbfile $locateoptions"
+    send_log "Running $locatecmd \n"
+    catch "exec $locatecmd > $outfile"
+
+    set result ""
+    set f [open "$outfile" r]
+    while { [ gets $f line ]  >= 0 } {
+       # send_log "Output fragment is $line\n"
+       append result "$line\n"
+    }
+    close $f
+
+    # send_log "Output is $result\n"
+
+    if {[string equal $result $outtext]} {
+       if $fail_good then {
+           fail "$testname-$id"
+       } else {
+           pass "$testname-$id"
+       }
+    } else {
+       send_log "Output mismatch.\n"
+       send_log "Expected: $outtext\n"
+       send_log "Got     : $result\n"
+       fail "$testname-$id"
+    }
+}
+
+
+# Do a test in which we expect an input text file to be preserved unchanged.
+proc locate_roundtrip { id intext } {
+    if ![regexp "\n$" $intext] {
+       # We like the items to be terminated by newlines.
+       error "The input text is not terminated by newline"
+    }
+
+    locate_textonly p $id $intext "-r ." $intext
+}
+
+
+
+# Run locate and leave the output in $comp_output.
+# Called by individual test scripts.
+proc locate_start { passfail updatedb_options locate_options
+                   {updatedb_infile ""} {locate_infile ""}
+                   { between_hook "" }
+               } {
+    global verbose
+    global LOCATE
+    global LOCATEFLAGS
+    global UPDATEDB
+    global UPDATEDBFLAGS
+    global comp_output
+
+    set fail_good [string match "f*" $passfail]
+
+    set scriptname [uplevel {info script}]
+    set testbase [file rootname $scriptname]
+    set testname [file tail $testbase]
+
+    set outfile "$testbase.xo"
+    if {"$updatedb_infile" != ""} then {
+       set updatedb_infile "[file dirname [file dirname $testbase]]/inputs/$updatedb_infile"
+    } else {
+       set updatedb_infile /dev/null
+    }
+    if {"$locate_infile" != ""} then {
+       set locate_infile "[file dirname [file dirname $testbase]]/inputs/$locate_infile"
+    } else {
+       set locate_infile /dev/null
+    }
+
+    catch "exec rm -f locate.out"
+
+    set updatedb_cmd "$UPDATEDB $UPDATEDBFLAGS $updatedb_options < $updatedb_infile"
+    send_log "$updatedb_cmd\n"
+    if $verbose>1 then {
+       send_user "Spawning \"$updatedb_cmd\"\n"
+    }
+    catch "exec $updatedb_cmd" comp_output
+
+    if {$comp_output != ""} then {
+       send_log "$comp_output\n"
+       if $verbose>1 then {
+           send_user "$comp_output\n"
+       }
+       # If fail_good is set, that refers to the exit 
+       # status of locate, not updatedb...
+       fail "$testname: updatedb is supposed to be silent, $comp_output"
+       return
+    } else {
+       send_log "updatedb: OK.\n"
+    }
+
+
+    eval $between_hook
+    
+    set locate_cmd "$LOCATE $LOCATEFLAGS $locate_options < $locate_infile > locate.out"
+    send_log "$locate_cmd\n"
+    if $verbose>1 then {
+       send_user "Spawning \"$locate_cmd\"\n"
+    }
+
+    catch "exec $locate_cmd" comp_output
+    if {$comp_output != ""} then {
+       send_log "$comp_output\n"
+       if $verbose>1 then {
+           send_user "$comp_output\n"
+       }
+       if $fail_good then {
+           pass "$testname"
+       } else {
+           fail "$testname: locate failed, $comp_output"
+       }
+       return
+    }
+
+    if [file exists $outfile] then {
+       set cmp_cmd "cmp locate.out $outfile"
+       send_log "$cmp_cmd\n"
+       catch "exec $cmp_cmd" cmpout
+       if {$cmpout != ""} then {
+           #catch "exec diff locate.out $outfile" diffout
+           #puts $diffout
+           fail "$testname, $cmpout"
+           return
+       }
+    } else {
+       if {[file size locate.out] != 0} then {
+           fail "$testname, output should be empty"
+           return
+       }
+    }
+    pass "$testname"
+    catch "exec rm -rf tmp"
+}
+
+
+
+proc locate_from_db { passfail locate_options locate_database } {
+    global LOCATE
+    global LOCATEFLAGS
+    global verbose
+
+    set fail_good [string match "f*" $passfail]
+    set scriptname [uplevel {info script}]
+    set testbase [file rootname $scriptname]
+    set testname [file tail $testbase]
+    set testdir  [file dirname $scriptname]
+
+    set dbpath "$testdir/$locate_database"
+    set outfile "$testbase.xo"
+
+    set locate_cmd "$LOCATE $LOCATEFLAGS -d $dbpath $locate_options > locate.out"
+    send_log "$locate_cmd\n"
+    if $verbose>1 then {
+       send_user "Spawning \"$locate_cmd\"\n"
+    }
+
+    catch "exec $locate_cmd 2>/dev/null" comp_output
+    if {$comp_output != ""} then {
+       send_log "$comp_output\n"
+       if $verbose>1 then {
+           send_user "$comp_output\n"
+       }
+       if $fail_good then {
+           # XXX: in general may want to compare output, too.
+           pass "$testname"
+       } else {
+           fail "$testname: locate unfortunately failed, $comp_output"
+       }
+       return
+    }
+
+
+    if [file exists $outfile] then {
+       set cmp_cmd "cmp locate.out $outfile"
+       send_log "$cmp_cmd\n"
+       catch "exec $cmp_cmd" cmpout
+       if {$cmpout != ""} then {
+           #catch "exec diff locate.out $outfile" diffout
+           #puts $diffout
+           fail "$testname, $cmpout"
+           return
+       }
+    } else {
+       if {[file size locate.out] != 0} then {
+           fail "$testname, output should be empty"
+           return
+       }
+    }
+    pass "$testname"
+}
+
+
+
+
+
+# Called by runtest.
+# Clean up (remove temporary files) before runtest exits.
+proc locate_exit {} {
+    catch "exec rm -f locate.out updatedb-paths.txt locate.db"
+}
+
+# Called by runtest.
+# Extract and print the version number of updatedb.
+proc updatedb_version {} {
+    global UPDATEDB
+    global UPDATEDBFLAGS
+
+    if {[which $UPDATEDB] != 0} then {
+       set tmp [eval exec $UPDATEDB $UPDATEDBFLAGS --version </dev/null|sed 1q]
+       clone_output $tmp
+    } else {
+       warning "$UPDATEDB, program does not exist"
+    }
+}
diff --git a/locate/testsuite/locate.gnu/bigendian.exp b/locate/testsuite/locate.gnu/bigendian.exp
new file mode 100644 (file)
index 0000000..08a3cae
--- /dev/null
@@ -0,0 +1,2 @@
+# Make sure we can read a big-endian old-format database.
+locate_from_db p "-r ." "locateddb.old.powerpc.xi" 
diff --git a/locate/testsuite/locate.gnu/bigendian.xo b/locate/testsuite/locate.gnu/bigendian.xo
new file mode 100644 (file)
index 0000000..484cd8a
--- /dev/null
@@ -0,0 +1,8 @@
+/tmp/findtest
+/tmp/findtest/tmp
+/tmp/findtest/tmp/subdir
+/tmp/findtest/tmp/subdir/foo
+/tmp/findtest/tmp/subdir/________________________________________________________________________________fred1
+/tmp/findtest/tmp/subdir/________________________________________________________________________________fred2
+/tmp/findtest/tmp/subdir/________________________________________________________________________________fred3
+/tmp/findtest/tmp/subdir/________________________________________________________________________________fred4
diff --git a/locate/testsuite/locate.gnu/bigprefix1.exp b/locate/testsuite/locate.gnu/bigprefix1.exp
new file mode 100644 (file)
index 0000000..f9df434
--- /dev/null
@@ -0,0 +1,12 @@
+
+locate_roundtrip 0 "/foo\n"
+
+set text "________________________________________________________________________________________________________________________________________________________________________________________________________abcd
+________________________________________________________________________________________________________________________________________________________________________________________________________abcx
+________________________________________________________________________________________________________________________________________________________________________________________________________abcd
+abcd
+________________________________________________________________________________________________________________________________________________________________________________________________________abcdF
+________________________________________________________________________________________________________________________________________________________________________________________________________abcF\n"
+
+
+locate_roundtrip 1 $text 
diff --git a/locate/testsuite/locate.gnu/exceedshort.exp b/locate/testsuite/locate.gnu/exceedshort.exp
new file mode 100644 (file)
index 0000000..5a14e8e
--- /dev/null
@@ -0,0 +1,4 @@
+# check frcode correctly encodes paths that have more than 2^16 characters in common
+set fmt "%0*d\n%0*d\n"
+set match [format $fmt 32768 0 32769 0]
+locate_textonly p 0 "$match" "-i 00" "$match"
diff --git a/locate/testsuite/locate.gnu/exists1.exp b/locate/testsuite/locate.gnu/exists1.exp
new file mode 100644 (file)
index 0000000..a3185c4
--- /dev/null
@@ -0,0 +1,7 @@
+# tests for -e: make sure we print a file if it exists.
+set tmp "tmp"
+exec rm -rf $tmp
+exec mkdir $tmp
+exec mkdir $tmp/subdir
+exec touch $tmp/subdir/fred
+locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -e fred" {}
diff --git a/locate/testsuite/locate.gnu/exists1.xo b/locate/testsuite/locate.gnu/exists1.xo
new file mode 100644 (file)
index 0000000..fdda926
--- /dev/null
@@ -0,0 +1 @@
+tmp/subdir/fred
diff --git a/locate/testsuite/locate.gnu/exists2.exp b/locate/testsuite/locate.gnu/exists2.exp
new file mode 100644 (file)
index 0000000..ca02f17
--- /dev/null
@@ -0,0 +1,8 @@
+# tests for -e: make sure we do not print a file if it does not exist.
+set tmp "tmp"
+exec rm -rf $tmp
+exec mkdir $tmp
+exec mkdir $tmp/subdir
+exec touch $tmp/subdir/fred1
+exec touch $tmp/subdir/fred2
+locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -e fred" {} {} { exec rm "tmp/subdir/fred2" } 
diff --git a/locate/testsuite/locate.gnu/exists2.xo b/locate/testsuite/locate.gnu/exists2.xo
new file mode 100644 (file)
index 0000000..95fec6e
--- /dev/null
@@ -0,0 +1 @@
+tmp/subdir/fred1
diff --git a/locate/testsuite/locate.gnu/exists3.exp b/locate/testsuite/locate.gnu/exists3.exp
new file mode 100644 (file)
index 0000000..022ad07
--- /dev/null
@@ -0,0 +1,8 @@
+# tests for -e: make sure we do not print a file if it does not exist.
+set tmp "tmp"
+exec rm -rf $tmp
+exec mkdir $tmp
+exec mkdir $tmp/subdir
+exec touch $tmp/subdir/fred1
+exec touch $tmp/subdir/fred2
+locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -e fred" {} {} { exec rm "tmp/subdir/fred1" } 
diff --git a/locate/testsuite/locate.gnu/exists3.xo b/locate/testsuite/locate.gnu/exists3.xo
new file mode 100644 (file)
index 0000000..091224f
--- /dev/null
@@ -0,0 +1 @@
+tmp/subdir/fred2
diff --git a/locate/testsuite/locate.gnu/ignore_case1.exp b/locate/testsuite/locate.gnu/ignore_case1.exp
new file mode 100644 (file)
index 0000000..ee7abb2
--- /dev/null
@@ -0,0 +1,7 @@
+# tests to determine if "-i" causes the match to ignore the case
+set tmp "tmp"
+exec rm -rf $tmp
+exec mkdir $tmp
+exec mkdir $tmp/subdir
+exec touch $tmp/subdir/fred
+locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -i FRed" {}
diff --git a/locate/testsuite/locate.gnu/ignore_case1.xo b/locate/testsuite/locate.gnu/ignore_case1.xo
new file mode 100644 (file)
index 0000000..fdda926
--- /dev/null
@@ -0,0 +1 @@
+tmp/subdir/fred
diff --git a/locate/testsuite/locate.gnu/ignore_case2.exp b/locate/testsuite/locate.gnu/ignore_case2.exp
new file mode 100644 (file)
index 0000000..1fd0628
--- /dev/null
@@ -0,0 +1,7 @@
+# tests to determine if "-i" causes the match to ignore the case
+# make sure that match fails when "-i" is skipped
+exec rm -rf tmp
+exec mkdir tmp
+exec mkdir tmp/subdir
+exec touch tmp/subdir/fred
+locate_start f {--changecwd=. --output=tmp/locatedb --localpaths=tmp/subdir/} {--database=tmp/locatedb FRed} {}
diff --git a/locate/testsuite/locate.gnu/ignore_case2.xo b/locate/testsuite/locate.gnu/ignore_case2.xo
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/locate/testsuite/locate.gnu/ignore_case3.exp b/locate/testsuite/locate.gnu/ignore_case3.exp
new file mode 100644 (file)
index 0000000..b4c0a9e
--- /dev/null
@@ -0,0 +1,10 @@
+# tests to determine if "-i" causes the match to ignore the case
+set tmp "tmp"
+exec rm -rf $tmp
+exec mkdir $tmp
+exec mkdir $tmp/subdir
+exec touch $tmp/subdir/fred
+locate_start p {--changecwd=. --output=tmp/locatedb --localpaths=tmp/subdir/} {--database=tmp/locatedb fred} {}
+#updatedb --output=locatedb
+#locate --database=locatedb FRed
+#locate --database=locatedb -i FRed
diff --git a/locate/testsuite/locate.gnu/ignore_case3.xo b/locate/testsuite/locate.gnu/ignore_case3.xo
new file mode 100644 (file)
index 0000000..fdda926
--- /dev/null
@@ -0,0 +1 @@
+tmp/subdir/fred
diff --git a/locate/testsuite/locate.gnu/littleendian.exp b/locate/testsuite/locate.gnu/littleendian.exp
new file mode 100644 (file)
index 0000000..96f5055
--- /dev/null
@@ -0,0 +1,2 @@
+# Make sure we can read a little-endian old-format database.
+locate_from_db p "-r ." "locateddb.old.x86.xi" 
diff --git a/locate/testsuite/locate.gnu/littleendian.xo b/locate/testsuite/locate.gnu/littleendian.xo
new file mode 100644 (file)
index 0000000..484cd8a
--- /dev/null
@@ -0,0 +1,8 @@
+/tmp/findtest
+/tmp/findtest/tmp
+/tmp/findtest/tmp/subdir
+/tmp/findtest/tmp/subdir/foo
+/tmp/findtest/tmp/subdir/________________________________________________________________________________fred1
+/tmp/findtest/tmp/subdir/________________________________________________________________________________fred2
+/tmp/findtest/tmp/subdir/________________________________________________________________________________fred3
+/tmp/findtest/tmp/subdir/________________________________________________________________________________fred4
diff --git a/locate/testsuite/locate.gnu/locateddb.old.powerpc.xi b/locate/testsuite/locate.gnu/locateddb.old.powerpc.xi
new file mode 100644 (file)
index 0000000..88988cb
Binary files /dev/null and b/locate/testsuite/locate.gnu/locateddb.old.powerpc.xi differ
diff --git a/locate/testsuite/locate.gnu/locateddb.old.x86.xi b/locate/testsuite/locate.gnu/locateddb.old.x86.xi
new file mode 100644 (file)
index 0000000..943e902
Binary files /dev/null and b/locate/testsuite/locate.gnu/locateddb.old.x86.xi differ
diff --git a/locate/testsuite/locate.gnu/notexists1.exp b/locate/testsuite/locate.gnu/notexists1.exp
new file mode 100644 (file)
index 0000000..0b07a31
--- /dev/null
@@ -0,0 +1,9 @@
+# tests for -E: make sure we don't print a file if it exists.
+# Since there are no matches in this case, we expect a nonzero
+# return value as well.
+set tmp "tmp"
+exec rm -rf $tmp
+exec mkdir $tmp
+exec mkdir $tmp/subdir
+exec touch $tmp/subdir/fred
+locate_start f "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -E fred" {}
diff --git a/locate/testsuite/locate.gnu/notexists1.xo b/locate/testsuite/locate.gnu/notexists1.xo
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/locate/testsuite/locate.gnu/notexists2.exp b/locate/testsuite/locate.gnu/notexists2.exp
new file mode 100644 (file)
index 0000000..79d3c7c
--- /dev/null
@@ -0,0 +1,8 @@
+# tests for -E: make sure we do print a file if it does not exist.
+set tmp "tmp"
+exec rm -rf $tmp
+exec mkdir $tmp
+exec mkdir $tmp/subdir
+exec touch $tmp/subdir/fred1
+exec touch $tmp/subdir/fred2
+locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -E fred" {} {} { exec rm "tmp/subdir/fred2" } 
diff --git a/locate/testsuite/locate.gnu/notexists2.xo b/locate/testsuite/locate.gnu/notexists2.xo
new file mode 100644 (file)
index 0000000..091224f
--- /dev/null
@@ -0,0 +1 @@
+tmp/subdir/fred2
diff --git a/locate/testsuite/locate.gnu/notexists3.exp b/locate/testsuite/locate.gnu/notexists3.exp
new file mode 100644 (file)
index 0000000..a391e02
--- /dev/null
@@ -0,0 +1,8 @@
+# tests for -E: make sure we do not print a file if it does not exist.
+set tmp "tmp"
+exec rm -rf $tmp
+exec mkdir $tmp
+exec mkdir $tmp/subdir
+exec touch $tmp/subdir/fred1
+exec touch $tmp/subdir/fred2
+locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -E fred" {} {} { exec rm "tmp/subdir/fred1" } 
diff --git a/locate/testsuite/locate.gnu/notexists3.xo b/locate/testsuite/locate.gnu/notexists3.xo
new file mode 100644 (file)
index 0000000..95fec6e
--- /dev/null
@@ -0,0 +1 @@
+tmp/subdir/fred1
diff --git a/locate/testsuite/locate.gnu/old_prefix.exp b/locate/testsuite/locate.gnu/old_prefix.exp
new file mode 100644 (file)
index 0000000..e21cc61
--- /dev/null
@@ -0,0 +1,13 @@
+set tmp "tmp"
+exec rm -rf $tmp
+exec mkdir $tmp
+exec mkdir $tmp/subdir
+exec touch $tmp/subdir/________________________________________________________________________________fred1
+exec touch $tmp/subdir/________________________________________________________________________________fred2
+exec touch $tmp/subdir/________________________________________________________________________________fred3
+exec touch $tmp/subdir/________________________________________________________________________________fred4
+
+locate_start p "--changecwd=. --output=$tmp/locatedb --old-format  --localpaths=tmp/subdir 2>/dev/null" "--database=$tmp/locatedb tmp" {}
+
+
+exec rm -rf $tmp
diff --git a/locate/testsuite/locate.gnu/old_prefix.xo b/locate/testsuite/locate.gnu/old_prefix.xo
new file mode 100644 (file)
index 0000000..909b8e7
--- /dev/null
@@ -0,0 +1,5 @@
+tmp/subdir
+tmp/subdir/________________________________________________________________________________fred1
+tmp/subdir/________________________________________________________________________________fred2
+tmp/subdir/________________________________________________________________________________fred3
+tmp/subdir/________________________________________________________________________________fred4
diff --git a/locate/testsuite/locate.gnu/regex1.exp b/locate/testsuite/locate.gnu/regex1.exp
new file mode 100644 (file)
index 0000000..8989210
--- /dev/null
@@ -0,0 +1,9 @@
+# regular expression tests
+locate_textonly p  0 "/\n" "?" "/\n"
+locate_textonly p  1 "/\n" "-r ." "/\n"
+locate_textonly p  2 "/" "-r X" ""
+locate_textonly p  3 "/\n/bin" "-r n" "/bin\n"
+locate_textonly p  4 "/\n/bin" "-i -r BIN" "/bin\n"
+locate_textonly p  5 "/\n/bin\n/binary" "-r bin\$" "/bin\n"
+locate_textonly p  6 "/\n/bin\n/binary" {-r ^\[^/\]} ""
+locate_textonly p  7 "/\n/bin\n/binary" {-r ^\[^X\]} "/\n/bin\n/binary\n"
diff --git a/locate/testsuite/locate.gnu/space1st.exp b/locate/testsuite/locate.gnu/space1st.exp
new file mode 100644 (file)
index 0000000..dc070da
--- /dev/null
@@ -0,0 +1,2 @@
+# check frcode handles space as first character
+locate_textonly p  0 " fred\n" "-i fred" " fred\n"
diff --git a/locate/testsuite/locate.gnu/sv-bug-14535.exp b/locate/testsuite/locate.gnu/sv-bug-14535.exp
new file mode 100644 (file)
index 0000000..3d5d697
--- /dev/null
@@ -0,0 +1,60 @@
+# NOTE: this file contains UTF8 characters.
+
+
+proc selectlocale { pattern } {
+    if [ catch { set locale_list [ split [ eval exec locale -a ] "\n" ] } ] {
+       # Failed to figure out which tests are supported.
+       return ""
+    }
+    foreach locale $locale_list {
+       if { [string match $pattern $locale] } {
+           global env
+           set env(LC_ALL) $locale
+           return $locale
+       }
+    }
+    return ""
+}
+
+proc select_any_locale { patternlist } {
+    foreach pattern $patternlist {
+       set locale [ selectlocale $pattern ]
+       if { [ string length $locale ] } {
+           return $locale
+       }
+    }
+    return ""
+}
+
+# localeoptions contains a list (in order of preference) of the
+# locales in which we want to perform part of this test.  If we can
+# use any locale matching any of the patterns, we run an extra four
+# tests.  Otherwise, we skip them and issue a warning message.
+set localeoptions { 
+    "hu_HU.UTF-8"
+    "hu_*.UTF-8" 
+    "en_IE.utf8"
+    "en_GB.utf8"
+    "en_US.utf8"
+    "en_*.utf8"
+    "*.utf8"
+} 
+
+
+
+# Do the regular case-fold tests which only need ASCII support.
+locate_textonly p  a "teste\n" "-i teste" "teste\n"
+locate_textonly p  b "testE\n" "-i testE" "testE\n"
+locate_textonly p  c "testE\n" "-i teste" "testE\n"
+locate_textonly p  d "teste\n" "-i testE" "teste\n"
+
+set locale [ select_any_locale $localeoptions ]
+if { [ string length $locale ] } {
+    # We have a UTF-8 locale.  Do the extra tests.
+    locate_textonly p  0 "testé\n" "-i testé" "testé\n"
+    locate_textonly p  1 "testÉ\n" "-i testé" "testÉ\n"
+    locate_textonly p  2 "testé\n" "-i testÉ" "testé\n"
+    locate_textonly p  3 "testÉ\n" "-i testÉ" "testÉ\n"
+} else {
+    warning "Four tests have been skipped because I cannot find a UTF-8 locale configured on your system"
+}
diff --git a/locate/updatedb.1 b/locate/updatedb.1
new file mode 100644 (file)
index 0000000..df33aa4
--- /dev/null
@@ -0,0 +1,144 @@
+.TH UPDATEDB 1 \" -*- nroff -*-
+.SH NAME
+updatedb \- update a file name database
+.SH SYNOPSIS
+.B updatedb [\fIoptions\fP]
+.SH DESCRIPTION
+This manual page
+documents the GNU version of
+.BR updatedb ,
+which updates file name databases used by GNU
+.BR locate .
+The file name databases contain lists of files that were in
+particular directory trees when the databases were last updated.
+The file name of the default database is determined when \fBlocate\fP
+and \fBupdatedb\fP are configured and installed.  The frequency with
+which the databases are updated and the directories for which they
+contain entries depend on how often \fBupdatedb\fP is run, and with
+which arguments.
+.P
+In networked environments, it often makes sense to build a database at
+the root of each filesystem, containing the entries for that filesystem.
+.B updatedb
+is then run for each filesystem on the fileserver where that
+filesystem is on a local disk, to prevent thrashing the network.
+Users can select which databases \fBlocate\fP searches using an
+environment variable or command line option; see \fBlocate\fP(1).
+Databases can not be concatenated together.
+.P
+The file name database format changed starting with GNU
+.B find
+and
+.B locate
+version 4.0 to allow machines with different byte orderings to share
+the databases.  The new GNU
+.B locate
+can read both the old and new database formats.
+However, old versions of
+.B locate
+and
+.B find
+produce incorrect results if given a new-format database.
+.SH OPTIONS
+.TP
+.B \-\-findoptions='\fI\-option1 \-option2...\fP'
+Global options to pass on to \fBfind\fP.
+The environment variable \fBFINDOPTIONS\fP also sets this value.
+Default is none.
+.TP
+.B \-\-localpaths='\fIpath1 path2...\fP'
+Non-network directories to put in the database.
+Default is /.
+.TP
+.B \-\-netpaths='\fIpath1 path2...\fP'
+Network (NFS, AFS, RFS, etc.) directories to put in the database.
+The environment variable \fBNETPATHS\fP also sets this value.
+Default is none.
+.TP
+.B \-\-prunepaths='\fIpath1 path2...\fP'
+Directories to not put in the database, which would otherwise be.
+Remove any trailing slashes from the path names, otherwise
+.B updatedb
+won\'t recognise the paths you want to omit (because it uses them as
+regular expression patterns).
+The environment variable \fBPRUNEPATHS\fP also sets this value.
+Default is /tmp /usr/tmp /var/tmp /afs.
+.TP
+.B \-\-prunefs='\fIpath...\fP'
+File systems to not put in the database, which would otherwise be.
+Note that files are pruned when a file system is reached;
+any file system mounted under an undesired file system will be
+ignored.
+The environment variable
+\fBPRUNEFS\fP also sets this value.
+Default is \fInfs NFS proc\fP.
+.TP
+.B \-\-output=\fIdbfile\fP
+The database file to build.
+Default is system-dependent.  In Debian GNU/Linux, the default
+is /var/cache/locate/locatedb.
+.TP
+.B \-\-localuser=\fIuser\fP
+The user to search non-network directories as, using \fBsu\fP(1).
+Default is to search the non-network directories as the current user.
+You can also use the environment variable \fBLOCALUSER\fP to set this user.
+.TP
+.B \-\-netuser=\fIuser\fP
+The user to search network directories as, using \fBsu\fP(1).
+Default is \fBdaemon\fP.
+You can also use the environment variable \fBNETUSER\fP to set this user.
+.TP
+.B \-\-old\-format
+Create the database in the old format.  This is a synonym for
+.BR \-\-dbformat=old .
+.TP
+.B \-\-dbformat=F
+Create the database in format F.  The default format is called LOCATE02.
+F can be
+.B old
+to select the old database format (this is the same as specifying
+.BR \-\-old\-format ).
+Alternatively the
+.B slocate
+format is also supported.  When the
+.B slocate
+format is in use, the database produced is marked as having security
+level 1.  If you want to build a system-wide
+.B slocate
+database, you may want to run
+.B updatedb
+as root.
+.TP
+.B \-\-version
+Print the version number of
+.B updatedb
+and exit.
+.TP
+.B "\-\-help"
+Print a summary of the options to
+.B updatedb
+and exit.
+.SH "SEE ALSO"
+\fBfind\fP(1), \fBlocate\fP(1), \fBlocatedb\fP(5), \fBxargs\fP(1)
+\fBFinding Files\fP (on-line in Info, or printed)
+.SH "BUGS"
+.P
+The
+.B updatedb
+program correctly handles filenames containing newlines,
+but only if the system's sort command has a working
+.I \-z
+option.  If you suspect that
+.B locate
+may need to return filenames containing newlines, consider using its
+.I \-\-null
+option.
+.P
+The best way to report a bug is to use the form at
+http://savannah.gnu.org/bugs/?group=findutils.
+The reason for this is that you will then be able to track progress in
+fixing the problem.   Other comments about \fBupdatedb\fP(1) and about
+the findutils package in general can be sent to the
+.I bug-findutils
+mailing list.  To join the list, send email to
+.IR bug-findutils-request@gnu.org .
diff --git a/locate/updatedb.sh b/locate/updatedb.sh
new file mode 100644 (file)
index 0000000..ce88a61
--- /dev/null
@@ -0,0 +1,370 @@
+#! /bin/sh
+# updatedb -- build a locate pathname database
+# Copyright (C) 1994, 1996, 1997, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2010 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/>.
+
+# csh original by James Woods; sh conversion by David MacKenzie.
+
+#exec 2> /tmp/updatedb-trace.txt
+#set -x
+
+version='
+updatedb (@PACKAGE_NAME@) @VERSION@
+Copyright (C) 2007 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by Eric B. Decker, James Youngman, and Kevin Dalley.
+'
+
+
+usage="\
+Usage: $0 [--findoptions='-option1 -option2...']
+       [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...']
+       [--prunepaths='dir1 dir2...'] [--prunefs='fs1 fs2...']
+       [--output=dbfile] [--netuser=user] [--localuser=user]
+       [--old-format] [--dbformat] [--version] [--help]
+
+Report bugs to <bug-findutils@gnu.org>."
+changeto=/
+old=no
+for arg
+do
+  # If we are unable to fork, the back-tick operator will
+  # fail (and the shell will emit an error message).  When
+  # this happens, we exit with error value 71 (EX_OSERR).
+  # Alternative candidate - 75, EX_TEMPFAIL.
+  opt=`echo $arg|sed 's/^\([^=]*\).*/\1/'`  || exit 71
+  val=`echo $arg|sed 's/^[^=]*=\(.*\)/\1/'` || exit 71
+  case "$opt" in
+    --findoptions) FINDOPTIONS="$val" ;;
+    --localpaths) SEARCHPATHS="$val" ;;
+    --netpaths) NETPATHS="$val" ;;
+    --prunepaths) PRUNEPATHS="$val" ;;
+    --prunefs) PRUNEFS="$val" ;;
+    --output) LOCATE_DB="$val" ;;
+    --netuser) NETUSER="$val" ;;
+    --localuser) LOCALUSER="$val" ;;
+    --old-format) old=yes ;;
+    --changecwd)  changeto="$val" ;;
+    --dbformat)   dbformat="$val" ;;
+    --version) fail=0; echo "$version" || fail=1; exit $fail ;;
+    --help)    fail=0; echo "$usage"   || fail=1; exit $fail ;;
+    *) echo "updatedb: invalid option $opt
+$usage" >&2
+       exit 1 ;;
+  esac
+done
+
+
+
+
+case "${dbformat:+yes}_${old}" in
+    yes_yes)
+       echo "The --dbformat and --old cannot both be specified." >&2
+       exit 1
+       ;;
+       *)
+       ;;
+esac
+
+if test "$old" = yes || test "$dbformat" = "old" ; then
+    echo "Warning: future versions of findutils will shortly discontinue support for the old locate database format." >&2
+    old=yes
+    sort="@SORT@"
+    print_option="-print"
+    frcode_options=""
+else
+    frcode_options=""
+    case "$dbformat" in
+       "")
+               # Default, use LOCATE02
+           ;;
+       LOCATE02)
+           ;;
+       slocate)
+           frcode_options="$frcode_options -S 1"
+           ;;
+       *)
+           echo "Unsupported locate database format ${dbformat}: Supported formats are:" >&2
+           echo "LOCATE02, slocate, old" >&2
+           exit 1
+    esac
+
+
+    if @SORT_SUPPORTS_Z@
+    then
+        sort="@SORT@ -z"
+        print_option="-print0"
+        frcode_options="$frcode_options -0"
+    else
+        sort="@SORT@"
+        print_option="-print"
+    fi
+fi
+
+getuid() {
+    # format of "id" output is ...
+    # uid=1(daemon) gid=1(other)
+    # for `id's that don't understand -u
+    id | cut -d'(' -f 1 | cut -d'=' -f2
+}
+
+# figure out if su supports the -s option
+select_shell() {
+    if su "$1" -s $SHELL -c false < /dev/null  ; then
+       # No.
+       echo ""
+    else
+       if su "$1" -s $SHELL -c true < /dev/null  ; then
+           # Yes.
+           echo "-s $SHELL"
+        else
+           # su is unconditionally failing.  We won't be able to
+           # figure out what is wrong, so be conservative.
+           echo ""
+       fi
+    fi
+}
+
+
+# You can set these in the environment, or use command-line options,
+# to override their defaults:
+
+# Any global options for find?
+: ${FINDOPTIONS=}
+
+# What shell shoud we use?  We should use a POSIX-ish sh.
+: ${SHELL="/bin/sh"}
+
+# Non-network directories to put in the database.
+: ${SEARCHPATHS="/"}
+
+# Network (NFS, AFS, RFS, etc.) directories to put in the database.
+: ${NETPATHS=}
+
+# Directories to not put in the database, which would otherwise be.
+: ${PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /amd /sfs /proc"}
+
+# Trailing slashes result in regex items that are never matched, which
+# is not what the user will expect.   Therefore we now reject such
+# constructs.
+for p in $PRUNEPATHS; do
+    case "$p" in
+       /*/)   echo "$0: $p: pruned paths should not contain trailing slashes" >&2
+              exit 1
+    esac
+done
+
+# The same, in the form of a regex that find can use.
+test -z "$PRUNEREGEX" &&
+  PRUNEREGEX=`echo $PRUNEPATHS|sed -e 's,^,\\\(^,' -e 's, ,$\\\)\\\|\\\(^,g' -e 's,$,$\\\),'`
+
+# The database file to build.
+: ${LOCATE_DB=@LOCATE_DB@}
+
+# Directory to hold intermediate files.
+if test -d /var/tmp; then
+  : ${TMPDIR=/var/tmp}
+elif test -d /usr/tmp; then
+  : ${TMPDIR=/usr/tmp}
+else
+  : ${TMPDIR=/tmp}
+fi
+export TMPDIR
+
+# The user to search network directories as.
+: ${NETUSER=daemon}
+
+# The directory containing the subprograms.
+if test -n "$LIBEXECDIR" ; then
+    : LIBEXECDIR already set, do nothing
+else
+    : ${LIBEXECDIR=@libexecdir@}
+fi
+
+# The directory containing find.
+if test -n "$BINDIR" ; then
+    : BINDIR already set, do nothing
+else
+    : ${BINDIR=@bindir@}
+fi
+
+# The names of the utilities to run to build the database.
+: ${find:=${BINDIR}/@find@}
+: ${frcode:=${LIBEXECDIR}/@frcode@}
+: ${bigram:=${LIBEXECDIR}/@bigram@}
+: ${code:=${LIBEXECDIR}/@code@}
+
+
+checkbinary () {
+    if test -x "$1" ; then
+       : ok
+    else
+      eval echo "updatedb needs to be able to execute $1, but cannot." >&2
+      exit 1
+    fi
+}
+
+for binary in $find $frcode $bigram $code
+do
+  checkbinary $binary
+done
+
+
+PATH=/bin:/usr/bin:${BINDIR}; export PATH
+
+: ${PRUNEFS="nfs NFS proc afs smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs sysfs shfs"}
+
+if test -n "$PRUNEFS"; then
+prunefs_exp=`echo $PRUNEFS |sed -e 's/\([^ ][^ ]*\)/-o -fstype \1/g' \
+ -e 's/-o //' -e 's/$/ -o/'`
+else
+  prunefs_exp=''
+fi
+
+# Make and code the file list.
+# Sort case insensitively for users' convenience.
+
+rm -f $LOCATE_DB.n
+trap 'rm -f $LOCATE_DB.n; exit' HUP TERM
+
+if test $old = no; then
+# LOCATE02 or slocate format
+if {
+cd "$changeto"
+if test -n "$SEARCHPATHS"; then
+  if [ "$LOCALUSER" != "" ]; then
+    # : A1
+    su $LOCALUSER `select_shell $LOCALUSER` -c \
+    "$find $SEARCHPATHS $FINDOPTIONS \
+     \\( $prunefs_exp \
+     -type d -regex '$PRUNEREGEX' \\) -prune -o $print_option"
+  else
+    # : A2
+    $find $SEARCHPATHS $FINDOPTIONS \
+     \( $prunefs_exp \
+     -type d -regex "$PRUNEREGEX" \) -prune -o $print_option
+  fi
+fi
+
+if test -n "$NETPATHS"; then
+myuid=`getuid`
+if [ "$myuid" = 0 ]; then
+    # : A3
+    su $NETUSER `select_shell $NETUSER` -c \
+     "$find $NETPATHS $FINDOPTIONS \\( -type d -regex '$PRUNEREGEX' -prune \\) -o $print_option" ||
+    exit $?
+  else
+    # : A4
+    $find $NETPATHS $FINDOPTIONS \( -type d -regex "$PRUNEREGEX" -prune \) -o $print_option ||
+    exit $?
+  fi
+fi
+} | $sort -f | $frcode $frcode_options > $LOCATE_DB.n
+then
+    : OK so far
+    true
+else
+    rv=$?
+    echo "Failed to generate $LOCATE_DB.n" >&2
+    rm -f $LOCATE_DB.n
+    exit $rv
+fi
+
+# To avoid breaking locate while this script is running, put the
+# results in a temp file, then rename it atomically.
+if test -s $LOCATE_DB.n; then
+  chmod 644 ${LOCATE_DB}.n
+  mv ${LOCATE_DB}.n $LOCATE_DB
+else
+  echo "updatedb: new database would be empty" >&2
+  rm -f $LOCATE_DB.n
+fi
+
+else # old
+
+if ! bigrams=`mktemp -t updatedbXXXXXXXXX`; then
+    echo mktemp failed >&2
+    exit 1
+fi
+
+if ! filelist=`mktemp -t updatedbXXXXXXXXX`; then
+    echo mktemp failed >&2
+    exit 1
+fi
+
+rm -f $LOCATE_DB.n
+trap 'rm -f $bigrams $filelist $LOCATE_DB.n; exit' HUP TERM
+
+# Alphabetize subdirectories before file entries using tr.  James Woods says:
+# "to get everything in monotonic collating sequence, to avoid some
+# breakage i'll have to think about."
+{
+cd "$changeto"
+if test -n "$SEARCHPATHS"; then
+  if [ "$LOCALUSER" != "" ]; then
+    # : A5
+    su $LOCALUSER `select_shell $LOCALUSER` -c \
+    "$find $SEARCHPATHS $FINDOPTIONS \
+     \( $prunefs_exp \
+     -type d -regex '$PRUNEREGEX' \) -prune -o $print_option" || exit $?
+  else
+    # : A6
+    $find $SEARCHPATHS $FINDOPTIONS \
+     \( $prunefs_exp \
+     -type d -regex "$PRUNEREGEX" \) -prune -o $print_option || exit $?
+  fi
+fi
+
+if test -n "$NETPATHS"; then
+  myuid=`getuid`
+  if [ "$myuid" = 0 ]; then
+    # : A7
+    su $NETUSER `select_shell $NETUSER` -c \
+     "$find $NETPATHS $FINDOPTIONS \\( -type d -regex '$PRUNEREGEX' -prune \\) -o $print_option" ||
+    exit $?
+  else
+    # : A8
+    $find $NETPATHS $FINDOPTIONS \( -type d -regex "$PRUNEREGEX" -prune \) -o $print_option ||
+    exit $?
+  fi
+fi
+} | tr / '\001' | $sort -f | tr '\001' / > $filelist
+
+# Compute the (at most 128) most common bigrams in the file list.
+$bigram $bigram_opts < $filelist | sort | uniq -c | sort -nr |
+  awk '{ if (NR <= 128) print $2 }' | tr -d '\012' > $bigrams
+
+# Code the file list.
+$code $bigrams < $filelist > $LOCATE_DB.n
+
+rm -f $bigrams $filelist
+
+# To reduce the chances of breaking locate while this script is running,
+# put the results in a temp file, then rename it atomically.
+if test -s $LOCATE_DB.n; then
+  chmod 644 ${LOCATE_DB}.n
+  mv ${LOCATE_DB}.n $LOCATE_DB
+else
+  echo "updatedb: new database would be empty" >&2
+  rm -f $LOCATE_DB.n
+fi
+
+fi
+
+exit 0
diff --git a/locate/word_io.c b/locate/word_io.c
new file mode 100644 (file)
index 0000000..575f26f
--- /dev/null
@@ -0,0 +1,176 @@
+/* word_io.c -- word oriented I/O
+   Copyright (C) 2007, 2010 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/>.
+*/
+
+#include <config.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <errno.h>
+#include <stdbool.h>           /* for bool */
+#include <assert.h>
+#include <stdlib.h>
+
+#include "error.h"
+#include "quotearg.h"
+#include "locatedb.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
+/* We used to use (String) instead of just String, but apparently ISO C
+ * doesn't allow this (at least, that's what HP said when someone reported
+ * this as a compiler bug).  This is HP case number 1205608192.  See
+ * also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11250 (which references
+ * ANSI 3.5.7p14-15).  The Intel icc compiler also rejects constructs
+ * like: static const char buf[] = ("string");
+ */
+# define N_(String) String
+#endif
+
+
+/* Swap bytes in 32 bit value.  This code is taken from glibc-2.3.3. */
+#define bswap_32(x) \
+     ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) | \
+      (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))
+
+enum { WORDBYTES=4 };
+
+static int
+decode_value (const unsigned char data[],
+             int limit,
+             GetwordEndianState *endian_state_flag,
+             const char *filename)
+{
+  int swapped;
+  union
+  {
+    int ival;                  /* native representation */
+    unsigned char data[WORDBYTES];
+  } u;
+  u.ival = 0;
+  memcpy (&u.data, data, WORDBYTES);
+  swapped = bswap_32(u.ival);  /* byteswapped */
+
+  if (*endian_state_flag == GetwordEndianStateInitial)
+    {
+      if (u.ival <= limit)
+       {
+         if (swapped > limit)
+           {
+             /* the native value is inside the limit and the
+              * swapped value is not.  We take this as proof
+              * that we should be using the ative byte order.
+              */
+             *endian_state_flag = GetwordEndianStateNative;
+           }
+         return u.ival;
+       }
+      else
+       {
+         if (swapped <= limit)
+           {
+             /* Aha, now we know we have to byte-swap. */
+             error (0, 0,
+                    _("WARNING: locate database %s was "
+                      "built with a different byte order"),
+                    quotearg_n_style (0, locale_quoting_style, filename));
+             *endian_state_flag = GetwordEndianStateSwab;
+             return swapped;
+           }
+         else
+           {
+             /* u.ival > limit and swapped > limit.  For the moment, assume
+              * native ordering.
+              */
+             return u.ival;
+           }
+       }
+    }
+  else
+    {
+      /* We already know the byte order. */
+      if (*endian_state_flag == GetwordEndianStateSwab)
+       return swapped;
+      else
+       return u.ival;
+    }
+}
+
+
+
+int
+getword (FILE *fp,
+        const char *filename,
+        size_t minvalue,
+        size_t maxvalue,
+        GetwordEndianState *endian_state_flag)
+{
+  unsigned char data[4];
+  size_t bytes_read;
+
+  clearerr (fp);
+  bytes_read = fread (data, WORDBYTES, 1, fp);
+  if (bytes_read != 1)
+    {
+      const char * quoted_name = quotearg_n_style (0, locale_quoting_style,
+                                                  filename);
+      /* Distinguish between a truncated database and an I/O error.
+       * Either condition is fatal.
+       */
+      if (feof (fp))
+       error (EXIT_FAILURE, 0, _("unexpected EOF in %s"), quoted_name);
+      else
+       error (EXIT_FAILURE, errno,
+              _("error reading a word from %s"), quoted_name);
+      abort ();
+    }
+  else
+    {
+      return decode_value (data, maxvalue, endian_state_flag, filename);
+    }
+}
+
+
+bool
+putword (FILE *fp, int word,
+        GetwordEndianState endian_state_flag)
+{
+  size_t items_written;
+
+  /* You must decide before calling this function which
+   * endianness you want to use.
+   */
+  assert (endian_state_flag != GetwordEndianStateInitial);
+  if (GetwordEndianStateSwab == endian_state_flag)
+    {
+      word = bswap_32(word);
+    }
+
+  items_written = fwrite (&word, sizeof (word), 1, fp);
+  if (1 == items_written)
+    return true;
+  else
+    return false;
+}
diff --git a/m4/Makefile.am b/m4/Makefile.am
new file mode 100644 (file)
index 0000000..0e513fd
--- /dev/null
@@ -0,0 +1 @@
+EXTRA_DIST = findlib.m4 nullsort.m4 order-bad.bin order-good.bin withfts.m4
diff --git a/m4/Makefile.in b/m4/Makefile.in
new file mode 100644 (file)
index 0000000..c0dfaf2
--- /dev/null
@@ -0,0 +1,1337 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+subdir = m4
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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 =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = @INCLUDES@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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@
+EXTRA_DIST = findlib.m4 nullsort.m4 order-bad.bin order-good.bin withfts.m4
+all: all-am
+
+.SUFFIXES:
+$(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 m4/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits m4/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):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+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
+check: check-am
+all-am: Makefile
+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:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+       distclean-generic 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-generic pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# 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/m4/findlib.m4 b/m4/findlib.m4
new file mode 100644 (file)
index 0000000..5a58afc
--- /dev/null
@@ -0,0 +1,69 @@
+# FINDLIB_REPLACE_FUNCS(FUNCTION...)
+# -----------------------------
+AC_DEFUN([FINDLIB_REPLACE_FUNCS],
+[AC_FOREACH([AC_Func], [$1], [jy_FINDLIBSOURCE(AC_Func.c)])dnl
+AC_CHECK_FUNCS([$1], , [_jy_FINDLIBOBJ($ac_func)])
+])
+
+
+
+# jy_FINDLIBSOURCE(FILENAME)
+# ----------------------
+# Announce we might need the file `FILENAME'.
+m4_define([jy_FINDLIBSOURCE], [])
+
+
+
+# jy_FINDLIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR)
+# -------------------------------------------
+# We need `FILENAME-NOEXT.o', save this into `FINDLIBOBJS'.
+# We don't use AC_SUBST/2 because it forces an unnecessary eol.
+m4_define([_jy_FINDLIBOBJ],
+[AS_LITERAL_IF([$1],
+               [jy_FINDLIBSOURCE([$1.c])],
+               [$2])dnl
+AC_SUBST([FINDLIB@&t@OBJS])dnl
+case $FINDLIB@&t@OBJS in
+    "$1.$ac_objext"   | \
+  *" $1.$ac_objext"   | \
+    "$1.$ac_objext "* | \
+  *" $1.$ac_objext "* ) ;;
+  *) FINDLIB@&t@OBJS="$FINDLIB@&t@OBJS $1.$ac_objext" ;;
+esac
+])
+
+
+
+# jy_FINDLIBOBJ(FILENAME-NOEXT)
+# -------------------------
+# We need `FILENAME-NOEXT.o', save this into `FINDLIBOBJS'.
+# We don't use AC_SUBST/2 because it forces an unnecessary eol.
+m4_define([jy_FINDLIBOBJ],
+[_jy_FINDLIBOBJ([$1],
+            [AC_DIAGNOSE(syntax,
+                         [$0($1): you should use literals])])dnl
+])
+
+
+# _jy_FINDLIBOBJS_NORMALIZE
+# ---------------------
+# Adapted from autoconf's general.m4.
+# Clean up FINDLIBOBJS abd LTFINDLIBOBJS
+# Used with AC_CONFIG_COMMANDS_PRE.
+AC_DEFUN([_jy_FINDLIBOBJS_NORMALIZE],
+[ac_findlibobjs=
+ac_ltfindlibobjs=
+for ac_i in : $FINDLIB@&t@OBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_findlibobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltfindlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+AC_SUBST([FINDLIB@&t@OBJS], [$ac_findlibobjs])
+AC_SUBST([LTFINDLIBOBJS], [$ac_ltfindlibobjs])
+])
+
+
+dnl AC_CONFIG_COMMANDS_PRE(_jy_FINDLIBOBJS_NORMALIZE)
diff --git a/m4/mkinstalldirs.m4 b/m4/mkinstalldirs.m4
new file mode 100644 (file)
index 0000000..2badcbe
--- /dev/null
@@ -0,0 +1,41 @@
+dnl Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+dnl 2005, 2006, 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+# Originally taken from nls.m4 serial 2 (gettext-0.14.3)
+
+AC_PREREQ(2.50)
+
+AC_DEFUN([AM_MKINSTALLDIRS],
+[
+  dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
+  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+  dnl Try to locate it.
+  MKINSTALLDIRS=
+  if test -n "$ac_aux_dir"; then
+    case "$ac_aux_dir" in
+      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+    esac
+  fi
+  if test -z "$MKINSTALLDIRS"; then
+    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+  fi
+  AC_SUBST(MKINSTALLDIRS)
+])
diff --git a/m4/noreturn.m4 b/m4/noreturn.m4
new file mode 100644 (file)
index 0000000..3344ec0
--- /dev/null
@@ -0,0 +1,33 @@
+dnl Copyright (C) 2007, 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   James Youngman <jay@gnu.org>, 2007.
+
+AC_DEFUN([jy_AC_ATTRIBUTE_NORETURN],
+[AC_CACHE_CHECK([for __attribute__ ((__noreturn__)) support],
+       [jy_cv_cc_attribute_noreturn],
+       [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+               [void report_fatal_error(void) __attribute__ ((__noreturn__));])],
+               [jy_cv_cc_attribute_noreturn=yes],
+               [jy_cv_cc_attribute_noreturn=no])])
+if test $jy_cv_cc_attribute_noreturn = yes; then
+  HAVE_ATTRIBUTE_NORETURN=1
+else
+  HAVE_ATTRIBUTE_NORETURN=0
+fi
+AC_SUBST([HAVE_ATTRIBUTE_NORETURN])
+AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_NORETURN],[$HAVE_ATTRIBUTE_NORETURN],
+  [Define to 1 if the compiler supports __attribute__ ((__noreturn__))])
+])
diff --git a/m4/nullsort.m4 b/m4/nullsort.m4
new file mode 100644 (file)
index 0000000..5f592f7
--- /dev/null
@@ -0,0 +1,44 @@
+AC_DEFUN([jy_SORTZ],
+  [AC_PATH_PROG([SORT], [sort], [sort])
+  AC_MSG_CHECKING([if $SORT supports the -z option])
+if test "x$cross_compiling" = xyes
+then
+        # We are cross-compiling, so cannot test the target's "sort".
+        ac_sort_has_z=false
+else
+    # find out if the sort command has a working -z option.
+    if $SORT -z -c < "${srcdir:-.}/m4/order-good.bin" 2>/dev/null  >/dev/null
+    then
+        # sort has a -z option, but we have not yet established that
+        # sort thinks there is more than one input line there.   We have
+        # to make sort -c do its thing with the input lines in the wrong
+        # order to determine that (we can't do it in one shot because
+        # if sort returns nonzero we cant tell that it wasn't just
+        # complaining about this unknown -z option.
+        if $SORT -z -c < "${srcdir:-.}/m4/order-bad.bin" 2>/dev/null >/dev/null
+        then
+                # sort likes -z but it doesn't seem to make \0
+                # a delimiter.
+                ac_sort_has_z=false
+        else
+                ac_sort_has_z=true
+        fi
+    else
+        # Doesn't like the z option.
+        ac_sort_has_z=false
+    fi
+fi
+
+if test "x$cross_compiling" = xyes
+then
+        AC_MSG_RESULT([assume no, since we are cross compiling])
+        AC_SUBST(SORT_SUPPORTS_Z,[false])
+elif $ac_sort_has_z
+then
+        AC_MSG_RESULT([yes])
+        AC_SUBST(SORT_SUPPORTS_Z,[true])
+else
+        AC_MSG_RESULT([no])
+        AC_SUBST(SORT_SUPPORTS_Z,[false])
+fi
+])
diff --git a/m4/order-bad.bin b/m4/order-bad.bin
new file mode 100644 (file)
index 0000000..f264547
Binary files /dev/null and b/m4/order-bad.bin differ
diff --git a/m4/order-good.bin b/m4/order-good.bin
new file mode 100644 (file)
index 0000000..7773a76
Binary files /dev/null and b/m4/order-good.bin differ
diff --git a/m4/withfts.m4 b/m4/withfts.m4
new file mode 100644 (file)
index 0000000..173ccf1
--- /dev/null
@@ -0,0 +1,13 @@
+AC_DEFUN([FIND_WITH_FTS],
+[AC_ARG_WITH([fts],
+[  --without-fts           Use an older mechanism for searching the filesystem, instead of using fts()],[with_fts=$withval],[])
+  case $with_fts in
+        yes|no) ;;
+        '')     with_fts=yes ;;
+        *) AC_MSG_ERROR([Invalid value for --with-fts: $with_fts])
+  esac
+  AM_CONDITIONAL(WITH_FTS, [[test x"${with_fts-no}" != xno]])
+  if test x"${with_fts-no}" != xno ; then
+        AC_DEFINE([WITH_FTS], 1, [Define if you want to use fts() to do the filesystem search.])
+  fi
+])
diff --git a/maint.mk b/maint.mk
new file mode 100644 (file)
index 0000000..524b69f
--- /dev/null
+++ b/maint.mk
@@ -0,0 +1,1286 @@
+# -*-Makefile-*-
+# This Makefile fragment tries to be general-purpose enough to be
+# used by many projects via the gnulib maintainer-makefile module.
+
+## Copyright (C) 2001-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 is reported not to work with make-3.79.1
+# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+ME := maint.mk
+
+# Override this in cfg.mk if you use a non-standard build-aux directory.
+build_aux ?= $(srcdir)/build-aux
+
+# Do not save the original name or timestamp in the .tar.gz file.
+# Use --rsyncable if available.
+gzip_rsyncable := \
+  $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \
+    && printf %s --rsyncable)
+GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
+
+GIT = git
+VC = $(GIT)
+VC-tag = git tag -s -m '$(VERSION)' 'v$(VERSION)' -u '$(gpg_key_ID)'
+
+VC_LIST = $(build_aux)/vc-list-files -C $(srcdir)
+
+# You can override this variable in cfg.mk to set your own regexp
+# matching files to ignore.
+VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$
+
+# This is to preprocess robustly the output of $(VC_LIST), so that even
+# when $(srcdir) is a pathological name like "....", the leading sed command
+# removes only the intended prefix.
+_dot_escaped_srcdir = $(subst .,\.,$(srcdir))
+
+# Post-process $(VC_LIST) output, prepending $(srcdir)/, but only
+# when $(srcdir) is not ".".
+ifeq ($(srcdir),.)
+_prepend_srcdir_prefix =
+else
+_prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
+endif
+
+# In order to be able to consistently filter "."-relative names,
+# (i.e., with no $(srcdir) prefix), this definition is careful to
+# remove any $(srcdir) prefix, and to restore what it removes.
+_sc_excl = \
+  $(if $(exclude_file_name_regexp--$@),$(exclude_file_name_regexp--$@),^$$)
+VC_LIST_EXCEPT = \
+  $(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \
+       | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
+         else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
+       | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
+       $(_prepend_srcdir_prefix)
+
+ifeq ($(origin prev_version_file), undefined)
+  prev_version_file = $(srcdir)/.prev-version
+endif
+
+PREV_VERSION := $(shell cat $(prev_version_file) 2>/dev/null)
+VERSION_REGEXP = $(subst .,\.,$(VERSION))
+PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
+
+ifeq ($(VC),$(GIT))
+this-vc-tag = v$(VERSION)
+this-vc-tag-regexp = v$(VERSION_REGEXP)
+else
+tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
+tag-this-version = $(subst .,_,$(VERSION))
+this-vc-tag = $(tag-package)-$(tag-this-version)
+this-vc-tag-regexp = $(this-vc-tag)
+endif
+my_distdir = $(PACKAGE)-$(VERSION)
+
+# Old releases are stored here.
+release_archive_dir ?= ../release
+
+# Override gnu_rel_host and url_dir_list in cfg.mk if these are not right.
+# Use alpha.gnu.org for alpha and beta releases.
+# Use ftp.gnu.org for stable releases.
+gnu_ftp_host-alpha = alpha.gnu.org
+gnu_ftp_host-beta = alpha.gnu.org
+gnu_ftp_host-stable = ftp.gnu.org
+gnu_rel_host ?= $(gnu_ftp_host-$(RELEASE_TYPE))
+
+ifeq ($(gnu_rel_host),ftp.gnu.org)
+url_dir_list ?= http://ftpmirror.gnu.org/$(PACKAGE)
+else
+url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
+endif
+
+# Override this in cfg.mk if you are using a different format in your
+# NEWS file.
+today = $(shell date +%Y-%m-%d)
+
+# Select which lines of NEWS are searched for $(news-check-regexp).
+# This is a sed line number spec.  The default says that we search
+# lines 1..10 of NEWS for $(news-check-regexp).
+# If you want to search only line 3 or only lines 20-22, use "3" or "20,22".
+news-check-lines-spec ?= 1,10
+news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)'
+
+# Prevent programs like 'sort' from considering distinct strings to be equal.
+# Doing it here saves us from having to set LC_ALL elsewhere in this file.
+export LC_ALL = C
+
+## --------------- ##
+## Sanity checks.  ##
+## --------------- ##
+
+_cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
+
+# Collect the names of rules starting with `sc_'.
+syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
+                       $(srcdir)/$(ME) $(_cfg_mk)))
+.PHONY: $(syntax-check-rules)
+
+ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0)
+local-checks-available += $(syntax-check-rules)
+else
+local-checks-available += no-vc-detected
+no-vc-detected:
+       @echo "No version control files detected; skipping syntax check"
+endif
+.PHONY: $(local-checks-available)
+
+# Arrange to print the name of each syntax-checking rule just before running it.
+$(syntax-check-rules): %: %.m
+sc_m_rules_ = $(patsubst %, %.m, $(syntax-check-rules))
+.PHONY: $(sc_m_rules_)
+$(sc_m_rules_):
+       @echo $(patsubst sc_%.m, %, $@)
+       @date +%s.%N > .sc-start-$(basename $@)
+
+# Compute and print the elapsed time for each syntax-check rule.
+sc_z_rules_ = $(patsubst %, %.z, $(syntax-check-rules))
+.PHONY: $(sc_z_rules_)
+$(sc_z_rules_): %.z: %
+       @end=$$(date +%s.%N);                                           \
+       start=$$(cat .sc-start-$*);                                     \
+       rm -f .sc-start-$*;                                             \
+       awk -v s=$$start -v e=$$end                                     \
+         'END {printf "%.2f $(patsubst sc_%,%,$*)\n", e - s}' < /dev/null
+
+# The patsubst here is to replace each sc_% rule with its sc_%.z wrapper
+# that computes and prints elapsed time.
+local-check :=                                                         \
+  $(patsubst sc_%, sc_%.z,                                             \
+    $(filter-out $(local-checks-to-skip), $(local-checks-available)))
+
+syntax-check: $(local-check)
+
+# _sc_search_regexp
+#
+# This macro searches for a given construct in the selected files and
+# then takes some action.
+#
+# Parameters (shell variables):
+#
+#  prohibit | require
+#
+#     Regular expression (ERE) denoting either a forbidden construct
+#     or a required construct.  Those arguments are exclusive.
+#
+#  in_vc_files | in_files
+#
+#     grep-E-style regexp denoting the files to check.  If no files
+#     are specified the default are all the files that are under
+#     version control.
+#
+#  containing | non_containing
+#
+#     Select the files (non) containing strings matching this regexp.
+#     If both arguments are specified then CONTAINING takes
+#     precedence.
+#
+#  with_grep_options
+#
+#     Extra options for grep.
+#
+#  ignore_case
+#
+#     Ignore case.
+#
+#  halt
+#
+#     Message to display before to halting execution.
+#
+# Finally, you may exempt files based on an ERE matching file names.
+# For example, to exempt from the sc_space_tab check all files with the
+# .diff suffix, set this Make variable:
+#
+# exclude_file_name_regexp--sc_space_tab = \.diff$
+#
+# Note that while this functionality is mostly inherited via VC_LIST_EXCEPT,
+# when filtering by name via in_files, we explicitly filter out matching
+# names here as well.
+
+# By default, _sc_search_regexp does not ignore case.
+export ignore_case =
+_ignore_case = $$(test -n "$$ignore_case" && printf %s -i || :)
+
+define _sc_say_and_exit
+   dummy=; : so we do not need a semicolon before each use;            \
+   { printf '%s\n' "$(ME): $$msg" 1>&2; exit 1; };
+endef
+
+# _sc_search_regexp used to be named _prohibit_regexp.  However,
+# upgrading to the new definition and leaving the old name undefined
+# would usually convert each custom rule using $(_prohibit_regexp)
+# (usually defined in cfg.mk) into a no-op.  This definition ensures
+# that people know right away if they're still using the old name.
+# FIXME: remove in 2012.
+_prohibit_regexp = \
+  $(error '*** you need to s/_prohibit_regexp/_sc_search_regexp/, and adapt')
+
+define _sc_search_regexp
+   dummy=; : so we do not need a semicolon before each use;            \
+                                                                       \
+   : Check arguments;                                                  \
+   test -n "$$prohibit" && test -n "$$require"                         \
+     && { msg='Cannot specify both prohibit and require'               \
+          $(_sc_say_and_exit) } || :;                                  \
+   test -z "$$prohibit" && test -z "$$require"                         \
+     && { msg='Should specify either prohibit or require'              \
+          $(_sc_say_and_exit) } || :;                                  \
+   test -n "$$in_vc_files" && test -n "$$in_files"                     \
+     && { msg='Cannot specify both in_vc_files and in_files'           \
+          $(_sc_say_and_exit) } || :;                                  \
+   test "x$$halt" != x                                                 \
+     || { msg='halt not defined' $(_sc_say_and_exit) };                        \
+                                                                       \
+   : Filter by file name;                                              \
+   if test -n "$$in_files"; then                                       \
+     files=$$(find $(srcdir) | grep -E "$$in_files"                    \
+              | grep -Ev '$(exclude_file_name_regexp--$@)');           \
+   else                                                                        \
+     files=$$($(VC_LIST_EXCEPT));                                      \
+     if test -n "$$in_vc_files"; then                                  \
+       files=$$(echo "$$files" | grep -E "$$in_vc_files");             \
+     fi;                                                               \
+   fi;                                                                 \
+                                                                       \
+   : Filter by content;                                                        \
+   test -n "$$files" && test -n "$$containing"                         \
+     && { files=$$(grep -l "$$containing" $$files); } || :;            \
+   test -n "$$files" && test -n "$$non_containing"                     \
+     && { files=$$(grep -vl "$$non_containing" $$files); } || :;       \
+                                                                       \
+   : Check for the construct;                                          \
+   if test -n "$$files"; then                                          \
+     if test -n "$$prohibit"; then                                     \
+       grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
+         && { msg="$$halt" $(_sc_say_and_exit) } || :;                 \
+     else                                                              \
+       grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
+           | grep .                                                    \
+         && { msg="$$halt" $(_sc_say_and_exit) } || :;                 \
+     fi                                                                        \
+   else :;                                                             \
+   fi || :;
+endef
+
+sc_avoid_if_before_free:
+       @$(build_aux)/useless-if-before-free                            \
+               $(useless_free_options)                                 \
+           $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) &&   \
+         { echo '$(ME): found useless "if" before "free" above' 1>&2;  \
+           exit 1; } || :
+
+sc_cast_of_argument_to_free:
+       @prohibit='\<free *\( *\(' halt='don'\''t cast free argument'   \
+         $(_sc_search_regexp)
+
+sc_cast_of_x_alloc_return_value:
+       @prohibit='\*\) *x(m|c|re)alloc\>'                              \
+       halt='don'\''t cast x*alloc return value'                       \
+         $(_sc_search_regexp)
+
+sc_cast_of_alloca_return_value:
+       @prohibit='\*\) *alloca\>'                                      \
+       halt='don'\''t cast alloca return value'                        \
+         $(_sc_search_regexp)
+
+sc_space_tab:
+       @prohibit='[ ]  '                                               \
+       halt='found SPACE-TAB sequence; remove the SPACE'               \
+         $(_sc_search_regexp)
+
+# Don't use *scanf or the old ato* functions in `real' code.
+# They provide no error checking mechanism.
+# Instead, use strto* functions.
+sc_prohibit_atoi_atof:
+       @prohibit='\<([fs]?scanf|ato([filq]|ll)) *\('                           \
+       halt='do not use *scan''f, ato''f, ato''i, ato''l, ato''ll or ato''q'   \
+         $(_sc_search_regexp)
+
+# Use STREQ rather than comparing strcmp == 0, or != 0.
+sc_prohibit_strcmp:
+       @grep -nE '! *str''cmp *\(|\<str''cmp *\(.+\) *[!=]='   \
+           $$($(VC_LIST_EXCEPT))                                       \
+         | grep -vE ':# *define STRN?EQ\(' &&                          \
+         { echo '$(ME): replace str''cmp calls above with STREQ/STRNEQ' \
+               1>&2; exit 1; } || :
+
+# Pass EXIT_*, not number, to usage, exit, and error (when exiting)
+# Convert all uses automatically, via these two commands:
+# git grep -l '\<exit *(1)' \
+#  | grep -vEf .x-sc_prohibit_magic_number_exit \
+#  | xargs --no-run-if-empty \
+#      perl -pi -e 's/(^|[^.])\b(exit ?)\(1\)/$1$2(EXIT_FAILURE)/'
+# git grep -l '\<exit *(0)' \
+#  | grep -vEf .x-sc_prohibit_magic_number_exit \
+#  | xargs --no-run-if-empty \
+#      perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/'
+sc_prohibit_magic_number_exit:
+       @prohibit='(^|[^.])\<(usage|exit) ?\([0-9]|\<error ?\([1-9][0-9]*,'     \
+       halt='use EXIT_* values rather than magic number'                       \
+         $(_sc_search_regexp)
+
+# Using EXIT_SUCCESS as the first argument to error is misleading,
+# since when that parameter is 0, error does not exit.  Use `0' instead.
+sc_error_exit_success:
+       @prohibit='error *\(EXIT_SUCCESS,'                              \
+       in_vc_files='\.[chly]$$'                                        \
+       halt='found error (EXIT_SUCCESS'                                \
+        $(_sc_search_regexp)
+
+# `FATAL:' should be fully upper-cased in error messages
+# `WARNING:' should be fully upper-cased, or fully lower-cased
+sc_error_message_warn_fatal:
+       @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT))              \
+           | grep -E '"Warning|"Fatal|"fatal' &&                       \
+         { echo '$(ME): use FATAL, WARNING or warning' 1>&2;           \
+           exit 1; } || :
+
+# Error messages should not start with a capital letter
+sc_error_message_uppercase:
+       @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT))              \
+           | grep -E '"[A-Z]'                                          \
+           | grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' &&           \
+         { echo '$(ME): found capitalized error message' 1>&2;         \
+           exit 1; } || :
+
+# Error messages should not end with a period
+sc_error_message_period:
+       @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT))              \
+           | grep -E '[^."]\."' &&                                     \
+         { echo '$(ME): found error message ending in period' 1>&2;    \
+           exit 1; } || :
+
+sc_file_system:
+       @prohibit=file''system                                          \
+       ignore_case=1                                                   \
+       halt='found use of "file''system"; spell it "file system"'      \
+         $(_sc_search_regexp)
+
+# Don't use cpp tests of this symbol.  All code assumes config.h is included.
+sc_prohibit_have_config_h:
+       @prohibit='^# *if.*HAVE''_CONFIG_H'                             \
+       halt='found use of HAVE''_CONFIG_H; remove'                     \
+         $(_sc_search_regexp)
+
+# Nearly all .c files must include <config.h>.  However, we also permit this
+# via inclusion of a package-specific header, if cfg.mk specified one.
+# config_h_header must be suitable for grep -E.
+config_h_header ?= <config\.h>
+sc_require_config_h:
+       @require='^# *include $(config_h_header)'                       \
+       in_vc_files='\.c$$'                                             \
+       halt='the above files do not include <config.h>'                \
+         $(_sc_search_regexp)
+
+# You must include <config.h> before including any other header file.
+# This can possibly be via a package-specific header, if given by cfg.mk.
+sc_require_config_h_first:
+       @if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then       \
+         fail=0;                                                       \
+         for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do             \
+           grep '^# *include\>' $$i | sed 1q                           \
+               | grep -E '^# *include $(config_h_header)' > /dev/null  \
+             || { echo $$i; fail=1; };                                 \
+         done;                                                         \
+         test $$fail = 1 &&                                            \
+           { echo '$(ME): the above files include some other header'   \
+               'before <config.h>' 1>&2; exit 1; } || :;               \
+       else :;                                                         \
+       fi
+
+sc_prohibit_HAVE_MBRTOWC:
+       @prohibit='\bHAVE_MBRTOWC\b'                                    \
+       halt="do not use $$prohibit; it is always defined"              \
+         $(_sc_search_regexp)
+
+# To use this "command" macro, you must first define two shell variables:
+# h: the header, enclosed in <> or ""
+# re: a regular expression that matches IFF something provided by $h is used.
+define _sc_header_without_use
+  dummy=; : so we do not need a semicolon before each use;             \
+  h_esc=`echo "$$h"|sed 's/\./\\\\./g'`;                               \
+  if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then             \
+    files=$$(grep -l '^# *include '"$$h_esc"                           \
+            $$($(VC_LIST_EXCEPT) | grep '\.c$$')) &&                   \
+    grep -LE "$$re" $$files | grep . &&                                        \
+      { echo "$(ME): the above files include $$h but don't use it"     \
+       1>&2; exit 1; } || :;                                           \
+  else :;                                                              \
+  fi
+endef
+
+# Prohibit the inclusion of assert.h without an actual use of assert.
+sc_prohibit_assert_without_use:
+       @h='<assert.h>' re='\<assert *\(' $(_sc_header_without_use)
+
+# Prohibit the inclusion of close-stream.h without an actual use.
+sc_prohibit_close_stream_without_use:
+       @h='"close-stream.h"' re='\<close_stream *\(' $(_sc_header_without_use)
+
+# Prohibit the inclusion of getopt.h without an actual use.
+sc_prohibit_getopt_without_use:
+       @h='<getopt.h>' re='\<getopt(_long)? *\(' $(_sc_header_without_use)
+
+# Don't include quotearg.h unless you use one of its functions.
+sc_prohibit_quotearg_without_use:
+       @h='"quotearg.h"' re='\<quotearg(_[^ ]+)? *\(' $(_sc_header_without_use)
+
+# Don't include quote.h unless you use one of its functions.
+sc_prohibit_quote_without_use:
+       @h='"quote.h"' re='\<quote(_n)? *\(' $(_sc_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_long_options_without_use:
+       @h='"long-options.h"' re='\<parse_long_options *\(' \
+         $(_sc_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_inttostr_without_use:
+       @h='"inttostr.h"' re='\<(off|[iu]max|uint)tostr *\(' \
+         $(_sc_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_ignore_value_without_use:
+       @h='"ignore-value.h"' re='\<ignore_(value|ptr) *\(' \
+         $(_sc_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_error_without_use:
+       @h='"error.h"' \
+       re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? *\('\
+         $(_sc_header_without_use)
+
+# Don't include xalloc.h unless you use one of its functions.
+# Consider these symbols:
+# perl -lne '/^# *define (\w+)\(/ and print $1' lib/xalloc.h|grep -v '^__';
+# perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) *\(/ and print $1' lib/xalloc.h
+# Divide into two sets on case, and filter each through this:
+# | sort | perl -MRegexp::Assemble -le \
+#  'print Regexp::Assemble->new(file => "/dev/stdin")->as_string'|sed 's/\?://g'
+# Note this was produced by the above:
+# _xa1 = \
+#x(((2n?)?re|c(har)?|n(re|m)|z)alloc|alloc_(oversized|die)|m(alloc|emdup)|strdup)
+# But we can do better, in at least two ways:
+# 1) take advantage of two "dup"-suffixed strings:
+# x(((2n?)?re|c(har)?|n(re|m)|[mz])alloc|alloc_(oversized|die)|(mem|str)dup)
+# 2) notice that "c(har)?|[mz]" is equivalent to the shorter and more readable
+# "char|[cmz]"
+# x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
+_xa1 = x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
+_xa2 = X([CZ]|N?M)ALLOC
+sc_prohibit_xalloc_without_use:
+       @h='"xalloc.h"' \
+       re='\<($(_xa1)|$(_xa2)) *\('\
+         $(_sc_header_without_use)
+
+# Extract function names:
+# perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) *\(/ and print $1' lib/hash.h
+_hash_re = \
+clear|delete|free|get_(first|next)|insert|lookup|print_statistics|reset_tuning
+_hash_fn = \<($(_hash_re)) *\(
+_hash_struct = (struct )?\<[Hh]ash_(table|tuning)\>
+sc_prohibit_hash_without_use:
+       @h='"hash.h"' \
+       re='$(_hash_fn)|$(_hash_struct)'\
+         $(_sc_header_without_use)
+
+sc_prohibit_hash_pjw_without_use:
+       @h='"hash-pjw.h"' \
+       re='\<hash_pjw *\(' \
+         $(_sc_header_without_use)
+
+sc_prohibit_safe_read_without_use:
+       @h='"safe-read.h"' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
+         $(_sc_header_without_use)
+
+sc_prohibit_argmatch_without_use:
+       @h='"argmatch.h"' \
+       re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<argmatch(_exit_fn|_(in)?valid) *\()' \
+         $(_sc_header_without_use)
+
+sc_prohibit_canonicalize_without_use:
+       @h='"canonicalize.h"' \
+       re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode)' \
+         $(_sc_header_without_use)
+
+sc_prohibit_root_dev_ino_without_use:
+       @h='"root-dev-ino.h"' \
+       re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
+         $(_sc_header_without_use)
+
+sc_prohibit_openat_without_use:
+       @h='"openat.h"' \
+       re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>' \
+         $(_sc_header_without_use)
+
+# Prohibit the inclusion of c-ctype.h without an actual use.
+ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
+|isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
+sc_prohibit_c_ctype_without_use:
+       @h='[<"]c-ctype.h[">]' re='\<c_($(ctype_re)) *\(' \
+         $(_sc_header_without_use)
+
+_empty =
+_sp = $(_empty) $(_empty)
+# The following list was generated by running:
+# man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
+#   | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
+_sig_functions = \
+  bsd_signal kill killpg pthread_kill pthread_sigmask raise sigaction \
+  sigaddset sigaltstack sigdelset sigemptyset sigfillset sighold sigignore \
+  siginterrupt sigismember signal sigpause sigpending sigprocmask sigqueue \
+  sigrelse sigset sigsuspend sigtimedwait sigwait sigwaitinfo
+_sig_function_re = $(subst $(_sp),|,$(strip $(_sig_functions)))
+# The following were extracted from "man signal.h" manually.
+_sig_types_and_consts =                                                        \
+  MINSIGSTKSZ SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK          \
+  SA_RESETHAND SA_RESTART SA_SIGINFO SIGEV_NONE SIGEV_SIGNAL           \
+  SIGEV_THREAD SIGSTKSZ SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SS_DISABLE   \
+  SS_ONSTACK mcontext_t pid_t sig_atomic_t sigevent siginfo_t sigset_t \
+  sigstack sigval stack_t ucontext_t
+# generated via this:
+# perl -lne '/^#ifdef (SIG\w+)/ and print $1' lib/sig2str.c|sort -u|fmt -70
+_sig_names =                                                           \
+  SIGABRT SIGALRM SIGALRM1 SIGBUS SIGCANCEL SIGCHLD SIGCLD SIGCONT     \
+  SIGDANGER SIGDIL SIGEMT SIGFPE SIGFREEZE SIGGRANT SIGHUP SIGILL      \
+  SIGINFO SIGINT SIGIO SIGIOT SIGKAP SIGKILL SIGKILLTHR SIGLOST SIGLWP \
+  SIGMIGRATE SIGMSG SIGPHONE SIGPIPE SIGPOLL SIGPRE SIGPROF SIGPWR     \
+  SIGQUIT SIGRETRACT SIGSAK SIGSEGV SIGSOUND SIGSTKFLT SIGSTOP SIGSYS  \
+  SIGTERM SIGTHAW SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGURG SIGUSR1       \
+  SIGUSR2 SIGVIRT SIGVTALRM SIGWAITING SIGWINCH SIGWIND SIGWINDOW      \
+  SIGXCPU SIGXFSZ
+_sig_syms_re = $(subst $(_sp),|,$(strip $(_sig_names) $(_sig_types_and_consts)))
+
+# Prohibit the inclusion of signal.h without an actual use.
+sc_prohibit_signal_without_use:
+       @h='<signal.h>'                                                 \
+       re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>'          \
+         $(_sc_header_without_use)
+
+# Prohibit the inclusion of strings.h without a sensible use.
+# Using the likes of bcmp, bcopy, bzero, index or rindex is not sensible.
+sc_prohibit_strings_without_use:
+       @h='<strings.h>'                                                \
+       re='\<(strn?casecmp|ffs(ll)?)\>'                                \
+         $(_sc_header_without_use)
+
+# Get the list of symbol names with this:
+# perl -lne '/^# *define (\w+)\(/ and print $1' lib/intprops.h|grep -v '^s'|fmt
+_intprops_names =                                                      \
+  TYPE_IS_INTEGER TYPE_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT            \
+  TYPE_SIGNED_MAGNITUDE TYPE_SIGNED TYPE_MINIMUM TYPE_MAXIMUM          \
+  INT_STRLEN_BOUND INT_BUFSIZE_BOUND
+_intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names)))
+# Prohibit the inclusion of intprops.h without an actual use.
+sc_prohibit_intprops_without_use:
+       @h='"intprops.h"'                                               \
+       re='\<($(_intprops_syms_re)) *\('                               \
+         $(_sc_header_without_use)
+
+_stddef_syms_re = NULL|offsetof|ptrdiff_t|size_t|wchar_t
+# Prohibit the inclusion of stddef.h without an actual use.
+sc_prohibit_stddef_without_use:
+       @h='<stddef.h>'                                                 \
+       re='\<($(_stddef_syms_re)) *\('                                 \
+         $(_sc_header_without_use)
+
+sc_obsolete_symbols:
+       @prohibit='\<(HAVE''_FCNTL_H|O''_NDELAY)\>'                     \
+       halt='do not use HAVE''_FCNTL_H or O'_NDELAY                    \
+         $(_sc_search_regexp)
+
+# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
+
+# Each nonempty ChangeLog line must start with a year number, or a TAB.
+sc_changelog:
+       @prohibit='^[^12        ]'                                      \
+       in_vc_files='^ChangeLog$$'                                      \
+       halt='found unexpected prefix in a ChangeLog'                   \
+         $(_sc_search_regexp)
+
+# Ensure that each .c file containing a "main" function also
+# calls set_program_name.
+sc_program_name:
+       @require='set_program_name *\(m?argv\[0\]\);'                   \
+       in_vc_files='\.c$$'                                             \
+       containing='\<main *('                                          \
+       halt='the above files do not call set_program_name'             \
+         $(_sc_search_regexp)
+
+# Ensure that each .c file containing a "main" function also
+# calls bindtextdomain.
+sc_bindtextdomain:
+       @require='bindtextdomain *\('                                   \
+       in_vc_files='\.c$$'                                             \
+       containing='\<main *('                                          \
+       halt='the above files do not call bindtextdomain'               \
+         $(_sc_search_regexp)
+
+# Require that the final line of each test-lib.sh-using test be this one:
+# Exit $fail
+# Note: this test requires GNU grep's --label= option.
+Exit_witness_file ?= tests/test-lib.sh
+Exit_base := $(notdir $(Exit_witness_file))
+sc_require_test_exit_idiom:
+       @if test -f $(srcdir)/$(Exit_witness_file); then                \
+         die=0;                                                        \
+         for i in $$(grep -l -F 'srcdir/$(Exit_base)'                  \
+               $$($(VC_LIST) tests)); do                               \
+           tail -n1 $$i | grep '^Exit .' > /dev/null                   \
+             && : || { die=1; echo $$i; }                              \
+         done;                                                         \
+         test $$die = 1 &&                                             \
+           { echo 1>&2 '$(ME): the final line in each of the above is not:'; \
+             echo 1>&2 'Exit something';                               \
+             exit 1; } || :;                                           \
+       fi
+
+sc_the_the:
+       @prohibit='\<the ''the\>'                                       \
+       ignore_case=1                                                   \
+       halt='found use of "the ''the";'                                \
+         $(_sc_search_regexp)
+
+sc_trailing_blank:
+       @prohibit='[     ]$$'                                           \
+       halt='found trailing blank(s)'                                  \
+         $(_sc_search_regexp)
+
+# Match lines like the following, but where there is only one space
+# between the options and the description:
+#   -D, --all-repeated[=delimit-method]  print all duplicate lines\n
+longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)?
+sc_two_space_separator_in_usage:
+       @prohibit='^   *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$'         \
+       halt='help2man requires at least two spaces between an option and its description'\
+         $(_sc_search_regexp)
+
+# Look for diagnostics that aren't marked for translation.
+# This won't find any for which error's format string is on a separate line.
+sc_unmarked_diagnostics:
+       @grep -nE                                                       \
+           '\<error *\([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT))      \
+         | grep -Ev '(_|ngettext ?)\(' &&                              \
+         { echo '$(ME): found unmarked diagnostic(s)' 1>&2;            \
+           exit 1; } || :
+
+# Avoid useless parentheses like those in this example:
+# #if defined (SYMBOL) || defined (SYM2)
+sc_useless_cpp_parens:
+       @prohibit='^# *if .*defined *\('                                \
+       halt='found useless parentheses in cpp directive'               \
+         $(_sc_search_regexp)
+
+# List headers for which HAVE_HEADER_H is always true, assuming you are
+# using the appropriate gnulib module.  CAUTION: for each "unnecessary"
+# #if HAVE_HEADER_H that you remove, be sure that your project explicitly
+# requires the gnulib module that guarantees the usability of that header.
+gl_assured_headers_ = \
+  cd $(gnulib_dir)/lib && echo *.in.h|sed 's/\.in\.h//g'
+
+# Convert the list of names to upper case, and replace each space with "|".
+az_ = abcdefghijklmnopqrstuvwxyz
+AZ_ = ABCDEFGHIJKLMNOPQRSTUVWXYZ
+gl_header_upper_case_or_ =                                             \
+  $$($(gl_assured_headers_)                                            \
+    | tr $(az_)/.- $(AZ_)___                                           \
+    | tr -s ' ' '|'                                                    \
+    )
+sc_prohibit_always_true_header_tests:
+       @or=$(gl_header_upper_case_or_);                                \
+       re="HAVE_($$or)_H";                                             \
+       prohibit='\<'"$$re"'\>'                                         \
+       halt=$$(printf '%s\n'                                           \
+       'do not test the above HAVE_<header>_H symbol(s);'              \
+       '  with the corresponding gnulib module, they are always true') \
+         $(_sc_search_regexp)
+
+# ==================================================================
+gl_other_headers_ ?= \
+  intprops.h   \
+  openat.h     \
+  stat-macros.h
+
+# Perl -lne code to extract "significant" cpp-defined symbols from a
+# gnulib header file, eliminating a few common false-positives.
+gl_extract_significant_defines_ = \
+  /^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\
+    && $$2 !~ /(?:rpl_|_used_without_)/\
+    && $$1 !~ /^(?:NSIG|ATTRIBUTE_NORETURN)$$/\
+    and print $$1
+
+# Create a list of regular expressions matching the names
+# of macros that are guaranteed to be defined by parts of gnulib.
+define def_sym_regex
+       gen_h=$(gl_generated_headers_);                                 \
+       (cd $(gnulib_dir)/lib;                                          \
+         for f in *.in.h $(gl_other_headers_); do                      \
+           perl -lne '$(gl_extract_significant_defines_)' $$f;         \
+         done;                                                         \
+       ) | sort -u                                                     \
+         | grep -Ev '^ATTRIBUTE_NORETURN'                              \
+         | sed 's/^/^ *# *(define|undef)  */;s/$$/\\>/'
+endef
+
+# Don't define macros that we already get from gnulib header files.
+sc_prohibit_always-defined_macros:
+       @if test -d $(gnulib_dir); then                                 \
+         case $$(echo all: | grep -l -f - Makefile) in Makefile);; *)  \
+           echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \
+         esac;                                                         \
+         $(def_sym_regex) | grep -E -f - $$($(VC_LIST_EXCEPT))         \
+           && { echo '$(ME): define the above via some gnulib .h file' \
+                 1>&2;  exit 1; } || :;                                \
+       fi
+# ==================================================================
+
+# Prohibit checked in backup files.
+sc_prohibit_backup_files:
+       @$(VC_LIST) | grep '~$$' &&                             \
+         { echo '$(ME): found version controlled backup file' 1>&2;    \
+           exit 1; } || :
+
+# Require the latest GPL.
+sc_GPL_version:
+       @prohibit='either ''version [^3]'                               \
+       halt='GPL vN, N!=3'                                             \
+         $(_sc_search_regexp)
+
+# Require the latest GFDL.  Two regexp, since some .texi files end up
+# line wrapping between 'Free Documentation License,' and 'Version'.
+_GFDL_regexp = (Free ''Documentation.*Version 1\.[^3]|Version 1\.[^3] or any)
+sc_GFDL_version:
+       @prohibit='$(_GFDL_regexp)'                                     \
+       halt='GFDL vN, N!=3'                                            \
+         $(_sc_search_regexp)
+
+# Don't use Texinfo's @acronym{}.
+# http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html
+texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$
+sc_texinfo_acronym:
+       @prohibit='@acronym\{'                                          \
+       in_vc_files='$(texinfo_suffix_re_)'                             \
+       halt='found use of Texinfo @acronym{}'                          \
+         $(_sc_search_regexp)
+
+cvs_keywords = \
+  Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State
+
+sc_prohibit_cvs_keyword:
+       @prohibit='\$$($(cvs_keywords))\$$'                             \
+       halt='do not use CVS keyword expansion'                         \
+         $(_sc_search_regexp)
+
+# This Perl code is slightly obfuscated.  Not only is each "$" doubled
+# because it's in a Makefile, but the $$c's are comments;  we cannot
+# use "#" due to the way the script ends up concatenated onto one line.
+# It would be much more concise, and would produce better output (including
+# counts) if written as:
+#   perl -ln -0777 -e '/\n(\n+)$/ and print "$ARGV: ".length $1' ...
+# but that would be far less efficient, reading the entire contents
+# of each file, rather than just the last two bytes of each.
+# In addition, while the code below detects both blank lines and a missing
+# newline at EOF, the above detects only the former.
+#
+# This is a perl script that is expected to be the single-quoted argument
+# to a command-line "-le".  The remaining arguments are file names.
+# Print the name of each file that ends in exactly one newline byte.
+# I.e., warn if there are blank lines (2 or more newlines), or if the
+# last byte is not a newline.  However, currently we don't complain
+# about any file that contains exactly one byte.
+# Exit nonzero if at least one such file is found, otherwise, exit 0.
+# Warn about, but otherwise ignore open failure.  Ignore seek/read failure.
+#
+# Use this if you want to remove trailing empty lines from selected files:
+#   perl -pi -0777 -e 's/\n\n+$/\n/' files...
+#
+require_exactly_one_NL_at_EOF_ =                                       \
+  foreach my $$f (@ARGV)                                               \
+    {                                                                  \
+      open F, "<", $$f or (warn "failed to open $$f: $$!\n"), next;    \
+      my $$p = sysseek (F, -2, 2);                                     \
+      my $$c = "seek failure probably means file has < 2 bytes; ignore"; \
+      my $$last_two_bytes;                                             \
+      defined $$p and $$p = sysread F, $$last_two_bytes, 2;            \
+      close F;                                                         \
+      $$c = "ignore read failure";                                     \
+      $$p && ($$last_two_bytes eq "\n\n"                               \
+              || substr ($$last_two_bytes,1) ne "\n")                  \
+          and (print $$f), $$fail=1;                                   \
+    }                                                                  \
+  END { exit defined $$fail }
+sc_prohibit_empty_lines_at_EOF:
+       @perl -le '$(require_exactly_one_NL_at_EOF_)' $$($(VC_LIST_EXCEPT)) \
+          || { echo '$(ME): empty line(s) or no newline at EOF'        \
+               1>&2; exit 1; } || :;                                   \
+
+# Make sure we don't use st_blocks.  Use ST_NBLOCKS instead.
+# This is a bit of a kludge, since it prevents use of the string
+# even in comments, but for now it does the job with no false positives.
+sc_prohibit_stat_st_blocks:
+       @prohibit='[.>]st_blocks'                                       \
+       halt='do not use st_blocks; use ST_NBLOCKS'                     \
+         $(_sc_search_regexp)
+
+# Make sure we don't define any S_IS* macros in src/*.c files.
+# They're already defined via gnulib's sys/stat.h replacement.
+sc_prohibit_S_IS_definition:
+       @prohibit='^ *# *define  *S_IS'                                 \
+       halt='do not define S_IS* macros; include <sys/stat.h>'         \
+         $(_sc_search_regexp)
+
+_ptm1 = use "test C1 && test C2", not "test C1 -''a C2"
+_ptm2 = use "test C1 || test C2", not "test C1 -''o C2"
+# Using test's -a and -o operators is not portable.
+# We prefer test over [, since the latter is spelled [[ in configure.ac.
+sc_prohibit_test_minus_ao:
+       @prohibit='(\<test| \[+) .+ -[ao] '                             \
+       halt='$(_ptm1); $(_ptm2)'                                       \
+         $(_sc_search_regexp)
+
+# Avoid a test bashism.
+sc_prohibit_test_double_equal:
+       @prohibit='(\<test| \[+) .+ == '                                \
+       containing='#! */bin/[a-z]*sh'                                  \
+       halt='use "test x = x", not "test x =''= x"'                    \
+         $(_sc_search_regexp)
+
+# Each program that uses proper_name_utf8 must link with one of the
+# ICONV libraries.  Otherwise, some ICONV library must appear in LDADD.
+# The perl -0777 invocation below extracts the possibly-multi-line
+# definition of LDADD from the appropriate Makefile.am and exits 0
+# when it contains "ICONV".
+sc_proper_name_utf8_requires_ICONV:
+       @progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\
+       if test "x$$progs" != x; then                                   \
+         fail=0;                                                       \
+         for p in $$progs; do                                          \
+           dir=$$(dirname "$$p");                                      \
+           perl -0777                                                  \
+             -ne 'exit !(/^LDADD =(.+?[^\\]\n)/ms && $$1 =~ /ICONV/)'  \
+             $$dir/Makefile.am && continue;                            \
+           base=$$(basename "$$p" .c);                                 \
+           grep "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \
+             || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \
+         done;                                                         \
+         test $$fail = 1 &&                                            \
+           { echo 1>&2 '$(ME): the above do not link with any ICONV library'; \
+             exit 1; } || :;                                           \
+       fi
+
+# Warn about "c0nst struct Foo const foo[]",
+# but not about "char const *const foo" or "#define const const".
+sc_redundant_const:
+       @prohibit='\bconst\b[[:space:][:alnum:]]{2,}\bconst\b'          \
+       halt='redundant "const" in declarations'                        \
+         $(_sc_search_regexp)
+
+sc_const_long_option:
+       @grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT))         \
+         | grep -Ev 'const struct option|struct option const' && {     \
+             echo 1>&2 '$(ME): add "const" to the above declarations'; \
+             exit 1; } || :
+
+NEWS_hash =                                                            \
+  $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p'             \
+       $(srcdir)/NEWS                                                  \
+     | perl -0777 -pe                                                  \
+       's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms'       \
+     | md5sum -                                                                \
+     | sed 's/ .*//')
+
+# Ensure that we don't accidentally insert an entry into an old NEWS block.
+sc_immutable_NEWS:
+       @if test -f $(srcdir)/NEWS; then                                \
+         test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : ||              \
+           { echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \
+       fi
+
+# Update the hash stored above.  Do this after each release and
+# for any corrections to old entries.
+update-NEWS-hash: NEWS
+       perl -pi -e 's/^(old_NEWS_hash[ \t]+:?=[ \t]+).*/$${1}'"$(NEWS_hash)/" \
+         $(srcdir)/cfg.mk
+
+# Ensure that we use only the standard $(VAR) notation,
+# not @...@ in Makefile.am, now that we can rely on automake
+# to emit a definition for each substituted variable.
+# We use perl rather than "grep -nE ..." to exempt a single
+# use of an @...@-delimited variable name in src/Makefile.am.
+# Allow the package to add exceptions via a hook in cfg.mk;
+# for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by
+# setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
+_makefile_at_at_check_exceptions ?=
+sc_makefile_at_at_check:
+       @perl -ne '/\@[A-Z_0-9]+\@/'$(_makefile_at_at_check_exceptions) \
+         -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}'    \
+           $$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$')       \
+         && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
+
+news-check: NEWS
+       if sed -n $(news-check-lines-spec)p $(srcdir)/NEWS              \
+           | grep -E $(news-check-regexp) >/dev/null; then             \
+         :;                                                            \
+       else                                                            \
+         echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2;      \
+         exit 1;                                                       \
+       fi
+
+sc_makefile_TAB_only_indentation:
+       @prohibit='^    [ ]{8}'                                         \
+       in_vc_files='akefile|\.mk$$'                                    \
+       halt='found TAB-8-space indentation'                            \
+         $(_sc_search_regexp)
+
+sc_m4_quote_check:
+       @prohibit='(AC_DEFINE(_UNQUOTED)?|AC_DEFUN)\([^[]'              \
+       in_vc_files='(^configure\.ac|\.m4)$$'                           \
+       halt='quote the first arg to AC_DEF*'                           \
+         $(_sc_search_regexp)
+
+fix_po_file_diag = \
+'you have changed the set of files with translatable diagnostics;\n\
+apply the above patch\n'
+
+# Verify that all source files using _() are listed in po/POTFILES.in.
+po_file ?= $(srcdir)/po/POTFILES.in
+sc_po_check:
+       @if test -f $(po_file); then                                    \
+         grep -E -v '^(#|$$)' $(po_file)                               \
+           | grep -v '^src/false\.c$$' | sort > $@-1;                  \
+         files=;                                                       \
+         for file in $$($(VC_LIST_EXCEPT)) $(srcdir)/lib/*.[ch]; do    \
+           test -r $$file || continue;                                 \
+           case $$file in                                              \
+             *.m4|*.mk) continue ;;                                    \
+             *.?|*.??) ;;                                              \
+             *) continue;;                                             \
+           esac;                                                       \
+           case $$file in                                              \
+           *.[ch])                                                     \
+             base=`expr " $$file" : ' \(.*\)\..'`;                     \
+             { test -f $$base.l || test -f $$base.y; } && continue;;   \
+           esac;                                                       \
+           files="$$files $$file";                                     \
+         done;                                                         \
+         grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files          \
+           | sed 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2;      \
+         diff -u -L $(po_file) -L $(po_file) $@-1 $@-2                 \
+           || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; };   \
+         rm -f $@-1 $@-2;                                              \
+       fi
+
+# Sometimes it is useful to change the PATH environment variable
+# in Makefiles.  When doing so, it's better not to use the Unix-centric
+# path separator of `:', but rather the automake-provided `$(PATH_SEPARATOR)'.
+msg = '$(ME): Do not use `:'\'' above; use $$(PATH_SEPARATOR) instead'
+sc_makefile_path_separator_check:
+       @prohibit='PATH[=].*:'                                          \
+       in_vc_files='akefile|\.mk$$'                                    \
+       halt=$(msg)                                                     \
+         $(_sc_search_regexp)
+
+# Check that `make alpha' will not fail at the end of the process.
+writable-files:
+       if test -d $(release_archive_dir); then :; else                 \
+         for file in $(distdir).tar.gz                                 \
+                     $(release_archive_dir)/$(distdir).tar.gz; do      \
+           test -e $$file || continue;                                 \
+           test -w $$file                                              \
+             || { echo ERROR: $$file is not writable; fail=1; };       \
+         done;                                                         \
+         test "$$fail" && exit 1 || : ;                                \
+       fi
+
+v_etc_file = $(gnulib_dir)/lib/version-etc.c
+sample-test = tests/sample-test
+texi = doc/$(PACKAGE).texi
+# Make sure that the copyright date in $(v_etc_file) is up to date.
+# Do the same for the $(sample-test) and the main doc/.texi file.
+sc_copyright_check:
+       @require='enum { COPYRIGHT_YEAR = '$$(date +%Y)' };'            \
+       in_files=$(v_etc_file)                                          \
+       halt='out of date copyright in $(v_etc_file); update it'        \
+         $(_sc_search_regexp)
+       @require='# Copyright \(C\) '$$(date +%Y)' Free'                \
+       in_vc_files=$(sample-test)                                      \
+       halt='out of date copyright in $(sample-test); update it'       \
+         $(_sc_search_regexp)
+       @require='Copyright @copyright\{\} .*'$$(date +%Y)' Free'       \
+       in_vc_files=$(texi)                                             \
+       halt='out of date copyright in $(texi); update it'              \
+         $(_sc_search_regexp)
+
+# If tests/help-version exists and seems to be new enough, assume that its
+# use of init.sh and path_prepend_ is correct, and ensure that every other
+# use of init.sh is identical.
+# This is useful because help-version cross-checks prog --version
+# with $(VERSION), which verifies that its path_prepend_ invocation
+# sets PATH correctly.  This is an inexpensive way to ensure that
+# the other init.sh-using tests also get it right.
+_hv_file ?= $(srcdir)/tests/help-version
+_hv_regex_weak ?= ^ *\. .*/init\.sh"
+_hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh"
+sc_cross_check_PATH_usage_in_tests:
+       @if test -f $(_hv_file); then                                   \
+         grep -l 'VERSION mismatch' $(_hv_file) >/dev/null             \
+           || { echo "$@: skipped: no such file: $(_hv_file)" 1>&2;    \
+                exit 0; };                                             \
+         grep -lE '$(_hv_regex_strong)' $(_hv_file) >/dev/null         \
+           || { echo "$@: $(_hv_file) lacks conforming use of init.sh" 1>&2; \
+                exit 1; };                                             \
+         good=$$(grep -E '$(_hv_regex_strong)' $(_hv_file));           \
+         grep -LFx "$$good"                                            \
+               $$(grep -lE '$(_hv_regex_weak)' $$($(VC_LIST_EXCEPT)))  \
+             | grep . &&                                               \
+           { echo "$(ME): the above files use path_prepend_ inconsistently" \
+               1>&2; exit 1; } || :;                                   \
+       fi
+
+# #if HAVE_... will evaluate to false for any non numeric string.
+# That would be flagged by using -Wundef, however gnulib currently
+# tests many undefined macros, and so we can't enable that option.
+# So at least preclude common boolean strings as macro values.
+sc_Wundef_boolean:
+       @prohibit='^#define.*(yes|no|true|false)$$'                     \
+       in_files='$(CONFIG_INCLUDE)'                                    \
+       halt='Use 0 or 1 for macro values'                              \
+         $(_sc_search_regexp)
+
+sc_vulnerable_makefile_CVE-2009-4029:
+       @prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
+       in_files=$$(find $(srcdir) -name Makefile.in)                   \
+       halt=$$(printf '%s\n'                                           \
+         'the above files are vulnerable; beware of running'           \
+         '  "make dist*" rules, and upgrade to fixed automake'         \
+         '  see http://bugzilla.redhat.com/542609 for details')        \
+         $(_sc_search_regexp)
+
+vc-diff-check:
+       (unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
+       if test -s vc-diffs; then                               \
+         cat vc-diffs;                                         \
+         echo "Some files are locally modified:" 1>&2;         \
+         exit 1;                                               \
+       else                                                    \
+         rm vc-diffs;                                          \
+       fi
+
+rel-files = $(DIST_ARCHIVES)
+
+gnulib_dir ?= $(srcdir)/gnulib
+gnulib-version = $$(cd $(gnulib_dir) && git describe)
+bootstrap-tools ?= autoconf,automake,gnulib
+
+# If it's not already specified, derive the GPG key ID from
+# the signed tag we've just applied to mark this release.
+gpg_key_ID ?= \
+  $$(git cat-file tag v$(VERSION) > .ann-sig \
+     && gpgv .ann-sig - < /dev/null 2>&1 \
+         | sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig)
+
+translation_project_ ?= coordinator@translationproject.org
+announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
+announcement_mail_headers_ ?=                                          \
+To: info-gnu@gnu.org                                                   \
+Cc: $(announcement_Cc_)                                                        \
+Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
+announcement: NEWS ChangeLog $(rel-files)
+       @$(build_aux)/announce-gen                                      \
+           --mail-headers='$(announcement_mail_headers_)'              \
+           --release-type=$(RELEASE_TYPE)                              \
+           --package=$(PACKAGE)                                        \
+           --prev=$(PREV_VERSION)                                      \
+           --curr=$(VERSION)                                           \
+           --gpg-key-id=$(gpg_key_ID)                                  \
+           --news=$(srcdir)/NEWS                                       \
+           --bootstrap-tools=$(bootstrap-tools)                        \
+           --gnulib-version=$(gnulib-version)                          \
+           --no-print-checksums                                        \
+           $(addprefix --url-dir=, $(url_dir_list))
+
+## ---------------- ##
+## Updating files.  ##
+## ---------------- ##
+
+ftp-gnu = ftp://ftp.gnu.org/gnu
+www-gnu = http://www.gnu.org
+
+upload_dest_dir_ ?= $(PACKAGE)
+emit_upload_commands:
+       @echo =====================================
+       @echo =====================================
+       @echo "$(build_aux)/gnupload $(GNUPLOADFLAGS) \\"
+       @echo "    --to $(gnu_rel_host):$(upload_dest_dir_) \\"
+       @echo "  $(rel-files)"
+       @echo '# send the ~/announce-$(my_distdir) e-mail'
+       @echo =====================================
+       @echo =====================================
+
+define emit-commit-log
+  printf '%s\n' 'post-release administrivia' '' \
+    '* NEWS: Add header line for next release.' \
+    '* .prev-version: Record previous version.' \
+    '* cfg.mk (old_NEWS_hash): Auto-update.'
+endef
+
+.PHONY: no-submodule-changes
+no-submodule-changes:
+       if test -d $(srcdir)/.git; then                                 \
+         diff=$$(cd $(srcdir) && git submodule -q foreach              \
+                 git diff-index --name-only HEAD)                      \
+           || exit 1;                                                  \
+         case $$diff in '') ;;                                         \
+           *) echo '$(ME): submodule files are locally modified:';     \
+               echo "$$diff"; exit 1;; esac;                           \
+       else                                                            \
+         : ;                                                           \
+       fi
+
+submodule-checks ?= no-submodule-changes public-submodule-commit
+
+# Ensure that each sub-module commit we're using is public.
+# Without this, it is too easy to tag and release code that
+# cannot be built from a fresh clone.
+.PHONY: public-submodule-commit
+public-submodule-commit:
+       $(AM_V_GEN)if test -d $(srcdir)/.git; then                      \
+         cd $(srcdir) &&                                               \
+         git submodule --quiet foreach test '$$(git rev-parse $$sha1)' \
+             = '$$(git merge-base origin $$sha1)'                      \
+           || { echo '$(ME): found non-public submodule commit' >&2;   \
+                exit 1; };                                             \
+       else                                                            \
+         : ;                                                           \
+       fi
+# This rule has a high enough utility/cost ratio that it should be a
+# dependent of "check" by default.  However, some of us do occasionally
+# commit a temporary change that deliberately points to a non-public
+# submodule commit, and want to be able to use rules like "make check".
+# In that case, run e.g., "make check gl_public_submodule_commit="
+# to disable this test.
+gl_public_submodule_commit ?= public-submodule-commit
+check: $(gl_public_submodule_commit)
+
+.PHONY: alpha beta stable
+ALL_RECURSIVE_TARGETS += alpha beta stable
+alpha beta stable: $(local-check) writable-files $(submodule-checks)
+       test $@ = stable                                                \
+         && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$'         \
+              || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
+         || :
+       $(MAKE) vc-diff-check
+       $(MAKE) news-check
+       $(MAKE) distcheck
+       $(MAKE) dist XZ_OPT=-9ev
+       $(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
+       $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+
+# Override this in cfg.mk if you follow different procedures.
+release-prep-hook ?= release-prep
+
+gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?]
+.PHONY: release-prep
+release-prep:
+       case $$RELEASE_TYPE in alpha|beta|stable) ;; \
+         *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
+       $(MAKE) -s announcement > ~/announce-$(my_distdir)
+       if test -d $(release_archive_dir); then                 \
+         ln $(rel-files) $(release_archive_dir);               \
+         chmod a-w $(rel-files);                               \
+       fi
+       echo $(VERSION) > $(prev_version_file)
+       $(MAKE) update-NEWS-hash
+       perl -pi -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' NEWS
+       $(emit-commit-log) > .ci-msg
+       $(VC) commit -F .ci-msg -a
+       rm .ci-msg
+
+# Override this with e.g., -s $(srcdir)/some_other_name.texi
+# if the default $(PACKAGE)-derived name doesn't apply.
+gendocs_options_ ?=
+
+.PHONY: web-manual
+web-manual:
+       @test -z "$(manual_title)" \
+         && { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
+       @cd '$(srcdir)/doc'; \
+         $(SHELL) ../build-aux/gendocs.sh $(gendocs_options_) \
+            -o '$(abs_builddir)/doc/manual' \
+            --email $(PACKAGE_BUGREPORT) $(PACKAGE) \
+           "$(PACKAGE_NAME) - $(manual_title)"
+       @echo " *** Upload the doc/manual directory to web-cvs."
+
+# Code Coverage
+
+init-coverage:
+       $(MAKE) $(AM_MAKEFLAGS) clean
+       lcov --directory . --zerocounters
+
+COVERAGE_CCOPTS ?= "-g --coverage"
+COVERAGE_OUT ?= doc/coverage
+
+build-coverage:
+       $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS)
+       $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check
+       mkdir -p $(COVERAGE_OUT)
+       lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \
+               --capture
+
+gen-coverage:
+       genhtml --output-directory $(COVERAGE_OUT) \
+               $(COVERAGE_OUT)/$(PACKAGE).info \
+               --highlight --frames --legend \
+               --title "$(PACKAGE_NAME)"
+
+coverage: init-coverage build-coverage gen-coverage
+
+# Update gettext files.
+PACKAGE ?= $(shell basename $(PWD))
+PO_DOMAIN ?= $(PACKAGE)
+POURL = http://translationproject.org/latest/$(PO_DOMAIN)/
+PODIR ?= po
+refresh-po:
+       rm -f $(PODIR)/*.po && \
+       echo "$(ME): getting translations into po (please ignore the robots.txt ERROR 404)..." && \
+       wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \
+       echo 'en@boldquot' > $(PODIR)/LINGUAS && \
+       echo 'en@quot' >> $(PODIR)/LINGUAS && \
+       ls $(PODIR)/*.po | sed 's/\.po//' | sed 's,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS
+
+ # Running indent once is not idempotent, but running it twice is.
+INDENT_SOURCES ?= $(C_SOURCES)
+.PHONY: indent
+indent:
+       indent $(INDENT_SOURCES)
+       indent $(INDENT_SOURCES)
+
+# If you want to set UPDATE_COPYRIGHT_* environment variables,
+# put the assignments in this variable.
+update-copyright-env ?=
+
+# Run this rule once per year (usually early in January)
+# to update all FSF copyright year lists in your project.
+# If you have an additional project-specific rule,
+# add it in cfg.mk along with a line 'update-copyright: prereq'.
+# By default, exclude all variants of COPYING; you can also
+# add exemptions (such as ChangeLog..* for rotated change logs)
+# in the file .x-update-copyright.
+.PHONY: update-copyright
+update-copyright:
+       grep -l -w Copyright                                             \
+         $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
+         | $(update-copyright-env) xargs $(build_aux)/$@
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644 (file)
index 0000000..83d8838
--- /dev/null
@@ -0,0 +1,444 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+#
+# Origin: gettext-0.18
+GETTEXT_MACRO_VERSION = 0.18
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = @localedir@
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
+
+.po.mo:
+       @echo "$(MSGFMT) -c -o $@ $<"; \
+       $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+       @lang=`echo $* | sed -e 's,.*/,,'`; \
+       test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+       echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
+       cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+       sed -e '/^#/d' $< > t-$@
+       mv t-$@ $@
+
+
+all: check-macro-version all-@USE_NLS@
+
+all-yes: stamp-po
+all-no:
+
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
+check-macro-version:
+       @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
+         || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
+              exit 1; \
+            }
+
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+       test ! -f $(srcdir)/$(DOMAIN).pot || \
+         test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+       @test ! -f $(srcdir)/$(DOMAIN).pot || { \
+         echo "touch stamp-po" && \
+         echo timestamp > stamp-poT && \
+         mv stamp-poT stamp-po; \
+       }
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+       if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
+         package_gnu='GNU '; \
+       else \
+         package_gnu=''; \
+       fi; \
+       if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+         msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+       else \
+         msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+       fi; \
+       case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+         '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
+           $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+             --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+             --files-from=$(srcdir)/POTFILES.in \
+             --copyright-holder='$(COPYRIGHT_HOLDER)' \
+             --msgid-bugs-address="$$msgid_bugs_address" \
+           ;; \
+         *) \
+           $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+             --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+             --files-from=$(srcdir)/POTFILES.in \
+             --copyright-holder='$(COPYRIGHT_HOLDER)' \
+             --package-name="$${package_gnu}@PACKAGE@" \
+             --package-version='@VERSION@' \
+             --msgid-bugs-address="$$msgid_bugs_address" \
+           ;; \
+       esac
+       test ! -f $(DOMAIN).po || { \
+         if test -f $(srcdir)/$(DOMAIN).pot; then \
+           sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+           sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+           if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+             rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+           else \
+             rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+             mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+           fi; \
+         else \
+           mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+         fi; \
+       }
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+       $(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+       @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+       if test -f "$(srcdir)/$${lang}.po"; then \
+         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+         echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
+         cd $(srcdir) \
+           && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+                  '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+                    $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
+                  *) \
+                    $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
+                esac; \
+              }; \
+       else \
+         $(MAKE) $${lang}.po-create; \
+       fi
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+         for file in $(DISTFILES.common) Makevars.template; do \
+           $(INSTALL_DATA) $(srcdir)/$$file \
+                           $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+         for file in Makevars; do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
+install-data-no: all
+install-data-yes: all
+       @catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         dir=$(localedir)/$$lang/LC_MESSAGES; \
+         $(mkdir_p) $(DESTDIR)$$dir; \
+         if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+         $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+         echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+         for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+           if test -n "$$lc"; then \
+             if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+               link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+               mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+               mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+                for file in *; do \
+                  if test -f $$file; then \
+                    ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+                  fi; \
+                done); \
+               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+             else \
+               if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+                 :; \
+               else \
+                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               fi; \
+             fi; \
+             rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+             ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+             ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+             cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+             echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+           fi; \
+         done; \
+       done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-@USE_NLS@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+       else \
+         : ; \
+       fi
+installdirs-data-no:
+installdirs-data-yes:
+       @catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         dir=$(localedir)/$$lang/LC_MESSAGES; \
+         $(mkdir_p) $(DESTDIR)$$dir; \
+         for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+           if test -n "$$lc"; then \
+             if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+               link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+               mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+               mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+                for file in *; do \
+                  if test -f $$file; then \
+                    ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+                  fi; \
+                done); \
+               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+             else \
+               if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+                 :; \
+               else \
+                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               fi; \
+             fi; \
+           fi; \
+         done; \
+       done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-@USE_NLS@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         for file in $(DISTFILES.common) Makevars.template; do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
+uninstall-data-no:
+uninstall-data-yes:
+       catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+           rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+         done; \
+       done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+mostlyclean:
+       rm -f remove-potcdate.sed
+       rm -f stamp-poT
+       rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+       rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+       rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+       rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+       $(MAKE) update-po
+       @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: stamp-po $(DISTFILES)
+       dists="$(DISTFILES)"; \
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         dists="$$dists Makevars.template"; \
+       fi; \
+       if test -f $(srcdir)/$(DOMAIN).pot; then \
+         dists="$$dists $(DOMAIN).pot stamp-po"; \
+       fi; \
+       if test -f $(srcdir)/ChangeLog; then \
+         dists="$$dists ChangeLog"; \
+       fi; \
+       for i in 0 1 2 3 4 5 6 7 8 9; do \
+         if test -f $(srcdir)/ChangeLog.$$i; then \
+           dists="$$dists ChangeLog.$$i"; \
+         fi; \
+       done; \
+       if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+       for file in $$dists; do \
+         if test -f $$file; then \
+           cp -p $$file $(distdir) || exit 1; \
+         else \
+           cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+         fi; \
+       done
+
+update-po: Makefile
+       $(MAKE) $(DOMAIN).pot-update
+       test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+       $(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+       @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+       echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+       exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+       @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+       if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
+       tmpdir=`pwd`; \
+       echo "$$lang:"; \
+       test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+       echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+       cd $(srcdir); \
+       if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+              '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+                $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+              *) \
+                $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+            esac; \
+          }; then \
+         if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+           rm -f $$tmpdir/$$lang.new.po; \
+         else \
+           if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+             :; \
+           else \
+             echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+             exit 1; \
+           fi; \
+         fi; \
+       else \
+         echo "msgmerge for $$lang.po failed!" 1>&2; \
+         rm -f $$tmpdir/$$lang.new.po; \
+       fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+       @:
+
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
+# because execution permission bits may not work on the current file system.
+# Use @SHELL@, which is the shell determined by autoconf for the use by its
+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
+       cd $(top_builddir) \
+         && @SHELL@ ./config.status $(subdir)/$@.in po-directories
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644 (file)
index 0000000..8ac3f44
--- /dev/null
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = bug-findutils@gnu.org
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES = 
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644 (file)
index 0000000..db624e0
--- /dev/null
@@ -0,0 +1,24 @@
+# List of source files containing translatable strings.
+# Copyright (C) 2000, 2007, 2010 Free Software Foundation, Inc.
+
+# Copying and distribution of this file, with or without
+# modification, are permitted provided the copyright notice
+# and this notice are preserved.
+
+#Package source files
+find/find.c
+find/fstype.c
+find/ftsfind.c
+find/parser.c
+find/pred.c
+find/tree.c
+find/util.c
+lib/buildcmd.c
+lib/findutils-version.c
+lib/safe-atoi.c
+lib/regextype.c
+locate/code.c
+locate/frcode.c
+locate/locate.c
+locate/word_io.c
+xargs/xargs.c
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644 (file)
index 0000000..af52487
--- /dev/null
@@ -0,0 +1,47 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en@quot.po-create:
+       $(MAKE) en@quot.po-update
+en@boldquot.po-create:
+       $(MAKE) en@boldquot.po-update
+
+en@quot.po-update: en@quot.po-update-en
+en@boldquot.po-update: en@boldquot.po-update-en
+
+.insert-header.po-update-en:
+       @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+       if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+       tmpdir=`pwd`; \
+       echo "$$lang:"; \
+       ll=`echo $$lang | sed -e 's/@.*//'`; \
+       LC_ALL=C; export LC_ALL; \
+       cd $(srcdir); \
+       if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
+         if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+           rm -f $$tmpdir/$$lang.new.po; \
+         else \
+           if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+             :; \
+           else \
+             echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+             exit 1; \
+           fi; \
+         fi; \
+       else \
+         echo "creation of $$lang.po failed!" 1>&2; \
+         rm -f $$tmpdir/$$lang.new.po; \
+       fi
+
+en@quot.insert-header: insert-header.sin
+       sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
+
+en@boldquot.insert-header: insert-header.sin
+       sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+       rm -f *.insert-header
diff --git a/po/be.gmo b/po/be.gmo
new file mode 100644 (file)
index 0000000..0da0c9f
Binary files /dev/null and b/po/be.gmo differ
diff --git a/po/be.po b/po/be.po
new file mode 100644 (file)
index 0000000..0587a34
--- /dev/null
+++ b/po/be.po
@@ -0,0 +1,1354 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Ales Nyakhaychyk <nab@mail.by>, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.1.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2003-11-04 05:21+0200\n"
+"Last-Translator: Ales Nyakhaychyk <nab@mail.by>\n"
+"Language-Team: Belarusian <i18n@mova.org>\n"
+"Language: be\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.0.2\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "немагчыма атрымаць бягучую тэчку"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "немагчыма атрымаць бягучую тэчку"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "невядома"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "немагчыма атрымаць бягучую тэчку"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"бягучая тэчка зьяўляецца дапомным шляхам; дапомным выразам ёсьць -print\n"
+"выраз можа складацца з:\n"
+"дзейнікаў (у парадку памяншэньня; -and маецца на ўвазе, калі іншыя "
+"незаданыя):\n"
+"      ( ВЫРАЗ ) ! ВЫРАЗ -not ВЫРАЗ ВЫРАЗ1 -a ВЫРАЗ2 ВЫРАЗ1 -and ВЫРАЗ2\n"
+
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"бягучая тэчка зьяўляецца дапомным шляхам; дапомным выразам ёсьць -print\n"
+"выраз можа складацца з:\n"
+"дзейнікаў (у парадку памяншэньня; -and маецца на ўвазе, калі іншыя "
+"незаданыя):\n"
+"      ( ВЫРАЗ ) ! ВЫРАЗ -not ВЫРАЗ ВЫРАЗ1 -a ВЫРАЗ2 ВЫРАЗ1 -and ВЫРАЗ2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+
+#: find/parser.c:1239
+#, fuzzy
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"      -cnewer ФАЙЛ -ctime N -empty -false -fstype ВІД -gid N -group НАЗВА\n"
+"      -ilname УЗОР -iname УЗОР -inum N -ipath УЗОР -iregex УЗОР\n"
+"      -links N -lname УЗОР -mmin N -mtime N -name УЗОР -newer ФАЙЛ\n"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path УЗОР -perm [+-]РЭЖЫМ -regex УЗОР\n"
+"      -size N[bckw] -true -type [bcdpfls] -uid N -used N -user НАЗВА\n"
+"      -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: выбар \"%s\" патрабуе довад\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "нерэчаісны рэжым \"%s\""
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "нерэчаісны null-довад да -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "нерэчаісны від -size \"%c\""
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "нерэчаісны довад \"%s\" да \"%s\""
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "нерэчаісны довад \"%s\" да \"%s\""
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "увага: нераспазнаная службовая пасьлядоўнасьць \"\\%c\""
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "увага: нераспазнанае прадпісаньне фармату \"%%%c\""
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "асяродзьдзе занадта вялікае для exec"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "немагчыма атрымаць бягучую тэчку"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "немагчыма нарадзіць працэс"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "памылка чаканьня %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s завершаны сыгналам %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "нерэчаісны выраз"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr ""
+
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "нерэчаісны выраз"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr ""
+
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "нерэчаісны выраз"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "шлях мусіць папярэднічаць выразу"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "нерэчаісны выказьнік \"%s\""
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "нерэчаісны выказьнік \"%s\""
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "нерэчаісны довад \"%s\" да \"%s\""
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "прапушчаны довад да \"%s\""
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "нерэчаісны выказьнік \"%s\""
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr ""
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr ""
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Выкарыстаньне: %s [шлях...] [выраз]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "немагчыма атрымаць бягучую тэчку"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "немагчыма атрымаць бягучую тэчку"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "увага: нераспазнаная службовая пасьлядоўнасьць \"\\%c\""
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "загад занадта доўгі"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "сьпіс довадаў занадта вялікі"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU find вэрсыі %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr ""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr "Выкарыстаньне: %s most_common_bigrams < list > coded_list\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+#, fuzzy
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Паведамляйце пра памылкі на <bug-findutils@gnu.org>."
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "дзён"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "нерэчаісны довад %s для \"%s\" "
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr ""
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "увага: база даньняў \"%s\" большая за %d %s"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "памылка чаканьня %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "асяродзьдзе занадта вялікае для exec"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr ""
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "двайныя"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "адзінарныя"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "сьпіс довадаў занадта доўгі"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr ""
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr ""
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: спынена сыгналам %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: пярэрвана сыгналам %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: нерэчаіснае значэньне для выбара -%c\n"
+
+#: xargs/xargs.c:1476
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: значэньне для выбара -%c мусіць быць >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: значэньне для выбара -%c мусіць быць < %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Выкарыстаньне: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-lines]]\n"
+"       [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-"
+"str]]\n"
+"       [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n"
+"       [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n"
+"       [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n"
+"       [загад [пачатковыя довады]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "немагчыма атрымаць бягучую тэчку"
+
+#, fuzzy
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "нерэчаісны довад %s для \"%s\" "
+
+#, fuzzy
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "неадназначны довад %s для \"%s\""
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Рэчаісныя довады:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Невядомая сыстэмная памылка"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: выбар \"%s\" ёсьць неадназначны\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: выбар \"--%s\" не дазваляе довад\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: выбар \"%c%s\" не дазваляе довад\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: выбар \"%s\" патрабуе довад\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: нераспазнаны выбар \"--%s\"\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: нераспазнаны выбар \"%c%s\"\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: нерэчаісны выбар -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: выбар патрабуе довад -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: выбар \"-W %s\" зьяўляецца неадназначным\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: выбар \"-W %s\" не дазваляе довад\n"
+
+#~ msgid "`"
+#~ msgstr "\""
+
+#~ msgid "'"
+#~ msgstr "\""
+
+#~ msgid "Success"
+#~ msgstr "Пасьпяхова"
+
+#~ msgid "No match"
+#~ msgstr "Няма супадзеньняў"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Нерэчаісны сталы выраз"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "нерэчаісны знак параўнаньня"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "нерэчаісная назва клясы знака"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ ці [^ несупадаюць"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( ці \\( несупадаюць"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "нерэчаісны зьмест \\{\\}"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "памяць вычарпаная"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "сталы выраз занадта вялікі"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "адсутнічае папярэдні сталы выраз"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[тТ]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[нН]"
+
+#, fuzzy
+#~ msgid "memory exhausted"
+#~ msgstr "памяць вычарпаная"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "нерэчаісны довад %s для \"%s\" "
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "нерэчаісны довад %s для \"%s\" "
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "сьпіс довадаў занадта вялікі"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: недапушчальны выбар -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "памер блёку"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Сьпіс выказьнікаў:\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s зьменены цягам часу выкананьня %s"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "віртуальная памяць вычарпаная"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. зьменены цягам часу выкананьня %s"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "памылка ў %s: %s"
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "      ВЫРАЗ1 -o ВЫРАЗ2 ВЫРАЗ1 -or ВЫРАЗ2 ВЫРАЗ1 , ВЫРАЗ2\n"
+#~ "выбараў (заўсёды ісьціна): -daystart -depth -follow --help\n"
+#~ "      -maxdepth УЗРОЎНІ -mindepth УЗРОЎНІ -mount -noleaf --version -xdev\n"
+#~ "праверак (N можа быць +N ці -N альбо N): -amin N -anewer ФАЙЛ -atime N -"
+#~ "cmin N\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "дзеяньняў: -exec ЗАГАД ; -fprint ФАЙЛ -fprint0 ФАЙЛ -fprintf ФАЙЛ ФАРМАТ\n"
+#~ "      -ok ЗАГАД ; -print -print0 -printf ФАРМАТ -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "устаўка %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    від: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "левы:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "правы:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Выкарыстаньне: %s [-d шлях | --database=шлях] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] узор...\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate вэрсыі %s\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs вэрсыі %s\n"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "несупадаюць %s двукосьсі"
diff --git a/po/bg.gmo b/po/bg.gmo
new file mode 100644 (file)
index 0000000..6b27f01
Binary files /dev/null and b/po/bg.gmo differ
diff --git a/po/bg.po b/po/bg.po
new file mode 100644 (file)
index 0000000..1c73f8e
--- /dev/null
+++ b/po/bg.po
@@ -0,0 +1,1467 @@
+# Translation of findutils to Bulgarian
+# Copyright (C) 2006, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Anton Zinoviev <zinoviev@debian.org>, 2006.
+#
+# Look at the CHECK string.
+#
+# This file should be sent to translation@iro.umontreal.ca with the
+# following subject line: TP-Robot findutils-VERSION.bg.po 
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.3.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2007-06-25 14:40+0300\n"
+"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
+"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
+"Language: bg\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "не може да се прочетат атрибутите на текущия каталог"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Внимание: файловата система %s бе размонтирана неотдавна."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Внимание: файловата система %s бе монтирана неотдавна."
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s е изменен по време на изпълнението на %s (стар номер на устройство %ld, "
+"нов номер на устройство %ld, типът на файловата система е %s) [ref %ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s е изменен по време на изпълнението на %s (стар номер на i-възел %ld, "
+"нов номер на i-възел %ld, типът на файловата система е %s) [ref %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "Неуспешна смяна на текущия каталог"
+
+#: find/find.c:980
+#, fuzzy, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Неуспешна смяна на текущия каталог"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Символната връзка „%s“ е част от цикъл в йерархията на каталозите; соченият "
+"каталог вече е бил посещаван."
+
+#: find/find.c:1097
+#, fuzzy, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Открит бе цикъл във файловата система; „%s“ има същия номер на устройство и "
+"i-възел като каталога, който е %d %s."
+msgstr[1] ""
+"Открит бе цикъл във файловата система; „%s“ има същия номер на устройство и "
+"i-възел като каталога, който е %d %s."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "внимание: символната връзка %s не се следва"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"ВНИМАНИЕ: Броят твърди връзки за %s е погрешен (прочетен е st_nlink=%d, но "
+"вече има повече от %d подкаталози). Това може да се дължи на програмен "
+"дефект в драйвера на използваната файлова система. Автоматично се включва "
+"опцията „-noleaf“ на find. В предходните резултати може и да са били "
+"пропуснати по погрешка някои каталози."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "непознат"
+
+#: find/ftsfind.c:259
+#, fuzzy, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Открит бе цикъл във файловата система; „%s“ има същия номер на устройство и "
+"i-възел като каталога, който е %d %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, fuzzy, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "Внимание: изглежда, че файлът %s има режим 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "Неуспешна смяна на текущия каталог"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"внимание: задали сте опцията „%s“ след неопционния аргумент %s, макар че не "
+"е позиционна (опцията %s влияе както на тестовете, описани преди нея, така и "
+"на тестовете след нея).  Моля, задавайте опциите преди всички други "
+"аргументи.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"внимание: опцията „-d“ е остаряла; моля, вместо нея използвайте „-depth“ тъй "
+"като тази опция е според стандарта POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s не е име на съществуваща група и не изглежда като номер на група, защото "
+"има неочакван суфикс %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s не е име на съществуваща група"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "аргументът на -group е празен, а трябва да бъде име на група"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"по подразбиране пътят е текущият каталог; изразът по подразбиране е „-"
+"print“\n"
+"изразът се състои от оператори, опции, тестове и действия:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"оператори (в намаляващ приоритет; при липса на оператор се подразбира -"
+"and):\n"
+"      ( ИЗРАЗ )   ! ИЗРАЗ   -not ИЗРАЗ   ИЗРАЗ1 -a ИЗРАЗ2   ИЗРАЗ1 -and "
+"ИЗРАЗ2\n"
+"      ИЗРАЗ1 -o ИЗРАЗ2   ИЗРАЗ1 -or ИЗРАЗ2   ИЗРАЗ1 , ИЗРАЗ2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"позиционни опции (винаги са истина): -daystart -follow -regextype\n"
+"\n"
+"нормални опции (винаги са истина, задават се преди другите изрази):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"тестове (N може да бъде +N, -N или N): -amin N -anewer ФАЙЛ -atime N -cmin "
+"N\n"
+"      -cnewer ФАЙЛ -ctime N -empty -false -fstype ТИП -gid N -group ИМЕ\n"
+"      -ilname ОБРАЗЕЦ -iname ОБРАЗЕЦ -inum N -iwholename ОБРАЗЕЦ -iregex "
+"ОБРАЗЕЦ\n"
+"      -links N -lname ОБРАЗЕЦ -mmin N -mtime N -name ОБРАЗЕЦ -newer ФАЙЛ"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path ОБРАЗЕЦ -perm [+-]РЕЖИМ -regex ОБРАЗЕЦ\n"
+"      -readable -writable -executable\n"
+"      -wholename ОБРАЗЕЦ -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user ИМЕ -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"actions: -delete -print0 -printf ФОРМАТ -fprintf ФАЙЛ ФОРМАТ -print \n"
+"      -fprint0 ФАЙЛ -fprint ФАЙЛ -ls -fls ФАЙЛ -prune -quit\n"
+"      -exec КОМАНДА ; -exec КОМАНДА {} + -ok КОМАНДА ;\n"
+"      -execdir КОМАНДА ; -execdir КОМАНДА {} + -okdir КОМАНДА ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Докладвайте при откриване на програмни дефекти и следете напредъка на\n"
+"поправянето им чрез страницата за докладване на програмни дефекти на\n"
+"findutils на http://savannah.gnu.org/ или (ако нямате достъп до уеб)\n"
+"чрез електронно писмо до <bug-findutils@gnu.org>.  За грешки в\n"
+"българския превод съобщавайте на <dict@fsa-bg.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "проверката на библиотечната функция fnmatch() за правилност пропадна. "
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"внимание: Файловите имена на Юникс обикновено не съдържат наклонени черти "
+"(макар че файловите пътеки обикновено съдържат такива).  Това означава, че "
+"при вашата операционна система „%s %s“ по всяка вероятност винаги ще се "
+"изчислява като лъжа.  Тестът „-wholename“ би могъл да ви се стори по-полезен "
+"или може би тестът „-samefile“.  Или пък ако е инсталирана версията на grep "
+"на ГНУ, може да използвате „find ... -print0 | grep -FzZ %s“."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+"Очаква се положително цяло десетично число като аргумент на %s, а не %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "Тази система не дава начин да се намери времето на раждане на файл."
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: опцията „%s“ изисква аргумент\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Не е ясно как %s може да се интерпретира като дата или време"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Не може да се получи времето на раждане на файла %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "неправилен режим %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"внимание: посочили сте образец за режим за достъп %s, който е еквивалентен "
+"на /000.  Смисълът на -perm /000 бе променен да бъде съгласуван с -perm "
+"-000, т.е. докато в миналото на него не пасваше нито един файл, в момента му "
+"пасват всички файлове."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "недопустим празен аргумент на -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "неправилен тип „%c“ на -size"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "неправилен аргумент „%s%c“ за -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Опцията -show-control-chars приема единствен аргумент, който трябва да бъде "
+"„literal“ или „safe“"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Недопустим аргумент %s за -used"
+
+#: find/parser.c:2671
+#, fuzzy, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s не е име на съществуваща група"
+
+#: find/parser.c:2678
+#, fuzzy, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Аргументите на -type трябва да съдържат само една буква"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Разрешени свойства:"
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Аргументите на -type трябва да съдържат само една буква"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Непознат аргумент на -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "внимание: непозната обратно наклонена черта „\\%c“"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "грешка: %s в края на форматен низ"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "внимание: непозната форматна директива „%%%c“"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "грешка: форматната директива „%%%c“ е запазена за бъдеща употреба"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Текущият каталог е включен в променливата от обкръжението PATH, което е "
+"несигурно при използване на действието %s на find.  Моля, премахнете текущия "
+"каталог от $PATH (т.е. премахнете „.“ или началните или крайни двоеточия)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Относителната пътека %s е включна в променливата от обкръжението PATH, което "
+"е несигурно при използване на действието %s на find.  Моля, премахнете този "
+"елемент от $PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Не може да използвате {} при името на команда за -execdir и -okdir, тъй като "
+"това създава проблем със сигурността."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "С -exec%s ... + е позволено само едно използване на {}"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Обкръжението е твърде голямо за exec()."
+
+#: find/parser.c:3603
+#, fuzzy, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "аритметично препълване при опит да се пресметне краят на днес"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "аритметично препълване при опит да се пресметне краят на днес"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "стандартна грешка"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "стандартен изход"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "Неуспешна смяна на текущия каталог"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Внимание: не може да се намери времето на раждане на файла %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Не може да се затвори стандартният вход"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Неуспешна смяна на текущия каталог"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "не може да се създаде нов процес с fork"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "изчакване на грешка за %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s бе прекратен със сигнал %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "неправилен израз"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"неправилен израз; използвали сте двуместният оператор „%s“ с нищо преди него."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "между „%s“ и „)“ се очакваше израз"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "след „%s“ се очаква израз"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "неправилен израз; има твърде много „)“"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"неправилен израз; очакваше се някъде да се срещне затваряща скоба „)“, но "
+"такава не бе открита.  Вероятно след „%s“ има нужда от допълнителен предикат."
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "неправилен израз; не се позволяват празни скоби."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"неправилен израз; очакваше се някъде да се срещне затваряща скоба „)“, но "
+"такава не бе открита."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "Опа! Неправилен тип на израза!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "Опа! Неправилен тип на израза (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "пътищата трябва да предхождат израза: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "непознат предикат „%s“"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "неправилен предикат „%s“"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "неправилен аргумент „%s“ за „%s“"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "липсващ аргумент за „%s“"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "има твърде много „)“"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "неочакван допълнителен предикат „%s“"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "неочакван допълнителен предикат"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "Опа! Неправилно вмъкване по подразбиране на оператор „И“!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Използване: %s [-H] [-L] [-P] [-Oниво] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [път...] [израз]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "не може да се установи текущият каталог"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "не може да се установи текущият каталог"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Пренебрегва се непознатият флаг за програмно тестване %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Празен аргумент за опцията -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Опцията -O трябва непосредствено да се следва от десетично цяло число."
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Моля, задайте десетично цяло число непосредствено след -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Нреправилно ниво за оптимизация %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Нивото за оптимизация %lu е твърде високо.  Ако желаете да намирате "
+"файловете много бързо, обмислете да използвате locate на ГНУ."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Променливата от обкръжението FIND_BLOCK_SIZE не се поддържа.  Единственото "
+"нещо, което влияе на размера на блока, е променливата POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr ""
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+
+#: lib/buildcmd.c:387
+#, fuzzy, c-format
+msgid "argument list too long"
+msgstr "реда с аргументи е твърде дълъг"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Компилиран с използването на gnulib на ГНУ, версия %s\n"
+
+#: lib/safe-atoi.c:76
+#, fuzzy, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "неочакван допълнителен предикат „%s“"
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "след „%s“ се очаква израз"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Използване: %s [--version | --help]\n"
+"или         %s най-чести_биграми < файлов-списък > база-данни-на-locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Докладвайте за грешки на <bug-findutils@gnu.org>.\n"
+"За грешки в българския превод на <dict@fsa-bg.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "грешка при запис"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, fuzzy, c-format
+msgid "Failed to write to standard output"
+msgstr "стандартен изход"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "дена"
+
+#: locate/locate.c:193
+#, fuzzy, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Аргументът на опцията --max-database-age не трябва да бъде празен"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "недопустим аргумент %s за опцията --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"базата данни на locate (%s) съдържа файлово име, по-дълго от това, с което "
+"locate може да работи"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "базата данни %s на locate е повредена или грешна"
+
+#: locate/locate.c:893
+#, fuzzy, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Размер на базата данни на locate: %s байта\n"
+msgstr[1] "Размер на базата данни на locate: %s байта\n"
+
+#: locate/locate.c:900
+#, fuzzy, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Пасващи файлови имена: %s "
+
+#: locate/locate.c:901
+#, fuzzy, c-format
+msgid "All Filenames: %s\n"
+msgstr "Всички файлови имена: %s "
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Някои файлови имена може да са били филтрирани, поради което не може да се "
+"пресметне степента на компресия.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Степен на компресия %4.2f%% (по-голямото число е по-добре)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Степен на компресия: неопределена\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"базата данни на locate (%s) изглежда от тип slocate, но има ниво на "
+"сигурност %c, което в момента не се поддържа от GNU findutils"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s е база данни от тип slocate.  Поддръжката за такъв тип е от скоро и е "
+"възможно да има проблеми."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s е база данни от тип slocate с неподдържано ниво на сигурност %d; пропуска "
+"се."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Посочили сте опцията -E, но тя не може да се използва при база данни тип "
+"slocate с ненулево ниво на сигурност.  Няма да бъдат генерирани резултати от "
+"тази база данни.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s е база данни тип slocate.  Включва се опцията „-e“."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"Старият формат на базата данни %s на locate е твърде къс, за да бъде валиден"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Форматът на базата данни %s е %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Базата данни е с кодиране на машинните думи тип little-endian.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Базата данни е с кодиране на машинните думи тип big-endian.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Типа на кодиране на машинните думи в базата данни не е ясен.\n"
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Използване: %s [-d път | --database=път] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=ТИП]\n"
+"      [--max-database-age D] [-version] [--help]\n"
+"      образец...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "не може да се анулират груповите привилегии"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "не може да се анулират привилегиите на потребител (seguid)"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Привилегиите не може да се анулират напълно"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "не може да се анулират привилегиите за група (setgid)"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"внимание: базата данни на locate може да се чете от стандартния вход само "
+"веднъж."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"внимание: базата данни %s е по-стара от %d %s (точната възраст е %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, fuzzy, c-format
+msgid "unexpected EOF in %s"
+msgstr "неочакван допълнителен предикат „%s“"
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "изчакване на грешка за %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+"Неправилна поредица с обратно наклонена черта %s в описанието на входния "
+"разделител."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Неправилна поредица с обратно наклонена черта %s в описанието на входния "
+"разделител; стойностите на знаците не може да превишават %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Неправилна поредица с обратно наклонена черта %s в описанието на входния "
+"разделител; стойностите на знаците не може да превишават %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Неправилна поредица с обратно наклонена черта %s в описанието на входния "
+"разделител; крайните знаци %s не са познати."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Неправилно описание на входния разделител %s: разделителят трябва да бъде "
+"или единичен знак, или поредица с обратно наклонена черта „\\“."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "обкръжението е твърде голямо за exec"
+
+#: xargs/xargs.c:561
+#, fuzzy, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"внимание: стойността %ld за опцията -s е твърде голяма, вместо нея се "
+"използва %ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Не може да се отвори входният файл %s"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Променливите на обкръжението заемат %lu байта\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+"Горна граница на дължината на аргументите според POSIX при тази система: "
+"%lu\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Най-малка долна граница на дължината на ргументите при всички системи според "
+"POSIX: %lu\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Максимална дължина на командата, която може да се използва: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Размер на командния буфер, който действително се използва: %lu\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Сега изпълнението на xargs ще продължи, като ще бъде направен опит да се "
+"четат командите.  Ако това не е каквото искате да се случи, моля въведете "
+"управляващия код за край на файл (Control-D).\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Внимание: %s ще се изпълни поне веднъж.  Ако не искате това да се случва, "
+"натиснете управляващия символ за прекъсване (Control-C).\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"%s кавичка без съответна втора кавичка; по подразбиране кавичките са "
+"специални за xargs, освен ако използвате опцията -0"
+
+# CHECK: да се провери използва ли се другаде, освен в xargs/xargs.c
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "Двойна"
+
+# CHECK: да се провери използва ли се другаде, освен в xargs/xargs.c
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "Единична"
+
+#: xargs/xargs.c:936
+#, fuzzy, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"внимание: от входа бе прочетен нулев символ (NUL).  Той не може да бъде "
+"предаден в списъка на аргументите.  Може би ще искате да използвате опцията "
+"--null option."
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "реда с аргументи е твърде дълъг"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "грешка при очакване на дъщерен процес"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: завърши с код 255; прекратяване"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: спрян със сигнал %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: прекратен със сигнал %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: неправилно число за опцията -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: стойността на опцията -%c трябва да бъде не по-малка от %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: стойността на опцията -%c трябва да бъде по-малка от < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Използване: %s [-0prtx] [--interactive] [--null] [-d|--"
+"delimiter=разделител]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=низ-за-край-на-файла]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=брой-редове]]\n"
+"       [-I replace-str] [-i[низ-за-замяна]] [--replace[=низ-за-замяна]]\n"
+"       [-n макс-брой-аргументи] [--max-args=макс-брой-аргументи]\n"
+"       [-s макс-брой-знаци] [--max-chars=макс-брой-знаци]\n"
+"       [-P макс-брой-процеси]  [--max-procs=макс-брой-процеси] [--show-"
+"limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=файл]\n"
+"       [--version] [--help] [команда [начални-аргументи]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "не може да се установи текущият каталог"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "недопустим аргумент %s за %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "двусмислен аргумент %s за %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Допустими аргументи са:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Непозната системна грешка"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: опцията „%s“ е двусмислена\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: опцията „--%s“ не допуска аргумент\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: опцията „%c%s“ не допуска аргумент\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: опцията „%s“ изисква аргумент\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: непозната опция „--%s“\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: непозната опция „%c%s“\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: неправилна опция -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: опцията изисква аргумент -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: опцията „-W %s“ е двусмислена\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: опцията „-W %s“ не допуска аргумент\n"
+
+#~ msgid "`"
+#~ msgstr "„"
+
+#~ msgid "'"
+#~ msgstr "“"
+
+#, fuzzy
+#~ msgid "Invalid regular expression"
+#~ msgstr "неправилен израз"
+
+#, fuzzy
+#~ msgid "Invalid range end"
+#~ msgstr "Недопустим аргумент %s за -used"
+
+#, fuzzy
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "неправилен израз"
+
+# Клавишът О (латинско) генерира "Д" според подредбата по БДС
+#~ msgid "^[yY]"
+#~ msgstr "^[дДoOyY]"
+
+# Клавишът K (латинско) генерира "Н" според подредбата по БДС
+#~ msgid "^[nN]"
+#~ msgstr "^[нНkKnN]"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "неправилен аргумент „%s“ за „%s“"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "неправилен аргумент „%s“ за „%s“"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "реда с аргументи е твърде дълъг"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: неправилна опция -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "блоковият размер"
+
+#~ msgid "level higher in the filesystem hierarchy"
+#~ msgstr "ниво по-високо във йерархията на файловата система"
+
+#~ msgid "levels higher in the filesystem hierarchy"
+#~ msgstr "нива по-високо в йерархията на файловата система"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "внимание: предикатът -ipath е остарял; моля, вместо него използвайте -"
+#~ "iwholename."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "find на ГНУ, версия %s\n"
+
+#~ msgid "GNU findutils version %s\n"
+#~ msgstr "findutils на ГНУ, версия %s\n"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "със съвкупна дължина %s байта"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\tот които %s съдържат интервали и/или табулации, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s съдържат знаци за нов ред, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\tи %s съдържат знаци и вдигнат старши бит.\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "locate на ГНУ, версия %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "аргумент на --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "xargs на ГНУ, версия %s\n"
+
+#~ msgid "oops -- invalid expression type in mark_stat!"
+#~ msgstr "Опа! Неправилен тип на израза в mark_stat!"
+
+#~ msgid "oops -- invalid expression type in mark_type!"
+#~ msgstr "Опа! Неправилен тип на израза в mark_type!"
+
+#~ msgid "old"
+#~ msgstr "стар"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Стойността на arg_max (%ld) се намалява до arg_size (%ld)\n"
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644 (file)
index 0000000..4b937aa
--- /dev/null
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
+s/“/“\e[1m/g
+s/”/\e[0m”/g
+s/‘/‘\e[1m/g
+s/’/\e[0m’/g
diff --git a/po/ca.gmo b/po/ca.gmo
new file mode 100644 (file)
index 0000000..9b8894f
Binary files /dev/null and b/po/ca.gmo differ
diff --git a/po/ca.po b/po/ca.po
new file mode 100644 (file)
index 0000000..2c11ac7
--- /dev/null
+++ b/po/ca.po
@@ -0,0 +1,1542 @@
+# Catalan translation of GNU fileutils.
+# Copyright (C) 2002, 2003, 2004, 2005, 2010 Free Software Foundation,
+# Inc.
+# Jordi Mallach <jordi@gnu.org>, 2002, 2003, 2004, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.2.27\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2006-05-20 14:54+0200\n"
+"Last-Translator: Jordi Mallach <jordi@gnu.org>\n"
+"Language-Team: Catalan <ca@dodds.net>\n"
+"Language: ca\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "no es pot obtenir el directori actual"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Avís: el sistema de fitxers %s ha estat desmuntat fa poc."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Avís: el sistema de fitxers %s ha estat muntat fa poc."
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s ha canviat durant l'execució de %s (el número de dispositiu vell era "
+"%ld, el número del nou dispositiu és %ld, el tipus de sistema de fitxers és "
+"%s) [ref %ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s ha canviat durant l'execució de %s (el número del node-i vell era %ld, "
+"el número del node-i nou és %ld, el tipus de sistema de fitxers és %s) [ref "
+"%ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "no es pot obtenir el directori actual"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, fuzzy, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"L'enllaç simbòlic «%s» és part d'un bucle a la jerarquia del directori. Ja "
+"hem visitat el directori al qual apunta."
+
+#: find/find.c:1097
+#, fuzzy, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"S'ha detectat un bucle al sistema de fitxers; «%s» té el mateix número de "
+"dispositiu i node d'idenficació que un directori que és %d %s."
+msgstr[1] ""
+"S'ha detectat un bucle al sistema de fitxers; «%s» té el mateix número de "
+"dispositiu i node d'idenficació que un directori que és %d %s."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "avís: no es seguirà l'enllaç simbòlic %s"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"AVÍS: el compte d'enllaços durs és incorrecte per a %s: això pot ser un "
+"error al vostre controlador del sistema de fitxers. S'està habilitant "
+"automàticament l'opció -noleaf. Els resultats anteriors poden no haver "
+"inclós directoris que s'haurien d'haver cercat."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "desconegut"
+
+#: find/ftsfind.c:259
+#, fuzzy, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"S'ha detectat un bucle al sistema de fitxers; «%s» té el mateix número de "
+"dispositiu i node d'idenficació que un directori que és %d %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "no es pot obtenir el directori actual"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"avís: he especificat l'opció %s després d'un argument no-opció %s, però les "
+"opcions no són posicionals (%s afecta a les comprovacions especificades "
+"abans d'ella com també aquelles especificades després d'ella). Si us plau, "
+"especifiqueu les opcions abans d'altres arguments.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"avís: l'opció -d està desaconsellada; si us plau, utilitzeu -depth en el seu "
+"lloc, ja que aquesta és una funcionalitat que compleix amb POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"el camí per defecte és el directori actual; l'expressió per defecte és -"
+"print\n"
+"l'expressió pot consistir d'operadors, opcions, avaluacions i accions:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operadors (prioritat decreixent; -and és implícit quan no es donen altres):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"opcions posicionals (sempre vertaderes): -daystart -follow -regextype\n"
+"opcions normals (sempre vertaderes, especificades abans d'altres "
+"expressions):\n"
+"      -depth -help -maxdepth NIVELLS -mindepth NIVELLS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"avaluacions (N pot ser +N o -N o N): -amin N -anewer FITXER -atime N -cmin "
+"N\n"
+"      -cnewer FITXER -ctime N -empty -false -fstype TIPUS -gid N -group NOM\n"
+"      -ilname PATRÓ -iname PATRÓ -inum N -iwholename PATRÓ -iregex PATRÓ\n"
+"      -links N -lname PATRÓ -mmin N -mtime N -name PATRÓ -newer FITXER"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path PATRÓ -perm [+-]MODE -regex PATRÓ\n"
+"      -wholename PATRÓ -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NOM -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"accions: -delete -print0 -printf FORMAT -fprintf FORMAT FITXER -print \n"
+"      -fprint0 FITXER -fprint FITXER -ls -fls FITXER -prune -quit\n"
+"      -exec ORDRE ; -exec ORDRE {} + -ok ORDRE ;\n"
+"      -execdir ORDRE ; -execdir ORDRE {} + -okdir ORDRE ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Informeu (i feu un seguiment del procés de solució) dels errors a través de "
+"la\n"
+"pàgina d'informes d'error de findutils en http://savannah.gnu.org/ o, si no\n"
+"teniu accés a la web, enviant correu a <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+"la comprovació de sanitat de la funció fnmatch() de la biblioteca ha fallat."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"avís: els noms de fitxers de Unix no contenen barres (però sí els camins). "
+"Això vol dir que «%s %s» probablement sempre avaluarà com a fals en aquest "
+"sistema. És possible que la comprovació «-wholename» siga més útil, o potser "
+"«-samefile». Alternativament, si esteu utilitzant GNU grep, podeu utilitzar "
+"«find ... -print0 | grep -FzZ %s»."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: l'opció «%s» requereix un argument\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, fuzzy, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "No s'ha pogut obrir el fitxer d'entrada «%s»"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "el mode «%s» no és vàlid"
+
+#: find/parser.c:2058
+#, fuzzy, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"avís: heu especificat un patró de mode %s que és equivalent a 000. El "
+"significat de -perm /000 canviarà prompte per a que siga consistent amb -"
+"perm -000; això vol dir, de moment no concorda amb cap fitxer, però prompte "
+"canviarà per a que concorde amb tots."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "l'argument nul no és vàlid per a -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "el tipus de -size «%c» no vàlid"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "l'argument «%s» no és vàlid per a «%s»"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "l'argument %s no és vàlid per a %s"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Funcionalitats habilitades: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "avís: seqüència d'escapament «\\%c» no reconegut"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "avís: directiva de format «%%%c» no reconeguda"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"El directori actual està inclós a la variable d'entorn PATH, el qual és "
+"insegur en combinació amb l'acció %s de find. Elimineu el directori actual "
+"del vostre $PATH (és a dir, elimineu «.» o els dos punts del principi o "
+"final)"
+
+#: find/parser.c:3272
+#, fuzzy, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"El directori actual està inclós a la variable d'entorn PATH, el qual és "
+"insegur en combinació amb l'acció %s de find. Elimineu el directori actual "
+"del vostre $PATH (és a dir, elimineu «.» o els dos punts del principi o "
+"final)"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"No pdeu utilitzar {} dins del nom de la utilitat per a -execdir i -okdir, ja "
+"que això és un problema de seguretat potencial."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Només es suporta una instància de {} amb -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "l'entorn és massa gran per a l'execució"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "no es pot obtenir el directori actual"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "No s'ha pogut obrir el fitxer d'entrada «%s»"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ?"
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "no es pot fer «fork»"
+
+# Suggerències? jm
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "error a l'esperar al procés %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s finalitzat pel senyal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "expressió no vàlida"
+
+#: find/tree.c:135
+#, fuzzy, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"l'expressió no és vàlida; heu utilitzat un operador binari sense res davant "
+"d'ell."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, fuzzy, c-format
+msgid "expected an expression after '%s'"
+msgstr "s'ha trobat un predicat extra no esperat"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "l'expressió no és vàlida; teniu massa «)»"
+
+#: find/tree.c:184
+#, fuzzy, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"l'expressió no és vàlida; s'esperava un «)» en algun lloc però no s'ha "
+"trobat cap."
+
+#: find/tree.c:192
+#, fuzzy, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "l'expressió no és vàlida; teniu massa «)»"
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"l'expressió no és vàlida; s'esperava un «)» en algun lloc però no s'ha "
+"trobat cap."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "ep -- el tipus d'expressió no és vàlid!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "ep -- el tipus d'expressió (%d) no és vàlid!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "els camins han de precedir la expressió"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "el predicat «%s» no és vàlid"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "el predicat «%s» no és vàlid"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "l'argument «%s» no és vàlid per a «%s»"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "manca un argument per a «%s»"
+
+#: find/tree.c:1406
+#, fuzzy, c-format
+msgid "you have too many ')'"
+msgstr "l'expressió no és vàlida; teniu massa «)»"
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "s'ha trobat un predicat extra no esperat"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "s'ha trobat un predicat extra no esperat"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "oops -- inserció per defecte d'«and» no vàlida!"
+
+#: find/util.c:171
+#, fuzzy, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Forma d'ús: %s [-H] [-L] [-P] [camí...] [expressió]\n"
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Forma d'ús: %s [camí...] [expressió]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "no es pot obtenir el directori actual"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "no es pot obtenir el directori actual"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "avís: seqüència d'escapament «\\%c» no reconegut"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"La variable d'entorn FIND_BLOCK_SIZE no està suportada, l'única cosa que "
+"afecta a la mida dels blocs és la variable d'entorn POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "ordre massa llarga"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+# Açò vol dir que de tots els arguments, només un no cap, no? jm
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "un argument no cap en el límit de mida de la  llista d'arguments"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "llista d'arguments massa llarga"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU findutils versió %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "s'ha trobat un predicat extra no esperat"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Forma d'ús: %s [--version | --help]\n"
+"            %s biagrames_més_comuns < llista-fitxers > base-de-dades-locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Informeu dels errors a <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dies"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "l'argument %s no és vàlid per a %s"
+
+#: locate/locate.c:468
+#, fuzzy, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"avís: el camí de la base de dades de locate «%s» té dos punts al principi, i "
+"això no és un nom de base de dades vàlid"
+
+#: locate/locate.c:603
+#, fuzzy, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "la base de dades de locate «%s» és corrupta o invàlida"
+
+#: locate/locate.c:893
+#, fuzzy, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Mida de la base de dades de locate: %s octets\n"
+msgstr[1] "Mida de la base de dades de locate: %s octets\n"
+
+#: locate/locate.c:900
+#, fuzzy, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Noms de fitxers: %s"
+
+#: locate/locate.c:901
+#, fuzzy, c-format
+msgid "All Filenames: %s\n"
+msgstr "Noms de fitxers: %s"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, fuzzy, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "El ràtio de compressió és %4.2f%%\n"
+
+#: locate/locate.c:941
+#, fuzzy, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "El ràtio de compressió és %4.2f%%\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, fuzzy, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "la base de dades de locate «%s» és corrupta o invàlida"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "La base de dades %s és en el format %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Forma d'ús: %s [-d camí | --database=camí] [-e | -E | --[non-]existing]\n"
+"            [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n"
+"            [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --"
+"count]\n"
+"            [-P | -H | --nofollow] [-L |--follow] [-m | --mmap] [-s | --"
+"stdio]\n"
+"            [-A | --all] [-p | --print] [-r | --regex] [--regextype=TIPUS]\n"
+"            [--version] [--help]\n"
+"            patró...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"avís: la base de dades de locate només es pot llegir una vegada des de "
+"l'entrada estàndard."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "avís: la base de dades «%s» té més de %d %s"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+# Suggerències? jm
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "error a l'esperar al procés %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+"La seqüència d'escapament %s és il·legal en una especificació de delimitació "
+"d'entrada."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"La seqüència d'escapament %s és il·legal en una especificació de delimitació "
+"d'entrada; els valors dels caràcters no han d'excedir %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"La seqüència d'escapament %s és il·legal en una especificació de delimitació "
+"d'entrada; els valors dels caràcters no han d'excedir %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"La seqüència d'escapament %s és il·legal en una especificació de delimitació "
+"d'entrada; no es reconeixen el caràcters finals %s."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"La seqüència d'escapament %s és il·legal en una especificació de delimitació "
+"d'entrada: el delimitador ha de ser un únic caràcter o una seqüència "
+"d'escapament que comence amb \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "l'entorn és massa gran per a l'execució"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, fuzzy, c-format
+msgid "Cannot open input file %s"
+msgstr "No s'ha pogut obrir el fitxer d'entrada «%s»"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Les vostres variables d'entorn utilitzen %ld octets\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+"límits inferior i superior POSIX per a la mida dels arguments: %ld, %ld\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"límits inferior i superior POSIX per a la mida dels arguments: %ld, %ld\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "La mida màxima de l'ordre que podem utilitzar: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "La mida de la memòria intermèdia que s'està utilitzant: %ld\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"s'ha trobat una cometa %s no emparellada. Per defecte, les cometes són "
+"especials per a xargs a no ser que s'utilitze l'opció -O"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "doble"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "simple"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "línia d'arguments massa llarga"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "error a l'esperar al procés fill"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: ha acabat amb estat 255; avortant"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: interromput pel senyal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: terminat pel senyal %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: número no vàlid per a l'opció -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: el valor per a l'opció -%c ha de ser >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: el valor per a l'opció -%c ha de ser < %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Forma d'ús: %s [-0prtx] [--interactive] [--null] [-d|--deliminter=delim]\n"
+"       [-E cadena-eof] [-e[cadena-eof]] [--eof=[cadena-eof]]\n"
+"       [-L màx-línies] [-l[màx-línies] [--max-lines[=màx-línies]]\n"
+"       [-I cadena-de-reemplaçament] [-i[cadena-de-reemplaçament]]\n"
+"       [--replace=[cadena-de-reemplaçament]]\n"
+"       [-n màx-arguments] [--max-args=màx-arguments]\n"
+"       [-s màx-caràcters] [--max-chars=màx-caràcters]\n"
+"       [-P màx-processos] [--max-procs=màx-processos]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fitxer]\n"
+"       [--version] [--help] [ordre [arguments-inicials]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "no es pot obtenir el directori actual"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "l'argument %s no és vàlid per a %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "l'argument %s és ambigu per a %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Els arguments vàlids són:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "S'ha produït un error desconegut del sistema"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: l'opció «%s» és ambigu\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: l'opció «--%s» no accepta cap argument\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: l'opció «%c%s» no accepta cap argument\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: l'opció «%s» requereix un argument\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr ""
+#~ "%s: opció «--%s» no reconeguda\n"
+#~ "\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: opció «%c%s» no reconeguda\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: opció no vàlida -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: l'opció requereix un argument -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: l'opció «-W %s» és ambigua\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: l'opció «-W %s» no accepta cap argument\n"
+
+#~ msgid "`"
+#~ msgstr "«"
+
+#~ msgid "'"
+#~ msgstr "»"
+
+#~ msgid "Success"
+#~ msgstr "Èxit"
+
+#~ msgid "No match"
+#~ msgstr "No hi ha cap coincidència"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Expressió regular no vàlida"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Caràcter de seqüència invàlid"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Caràcter de nom de clase no vàlid"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Barra invertida final"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Referència cap enrere no vàlida"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ o [^ no emparellat"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( o \\( no emparellat"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "\\{ no emparellat"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Contingut no vàlid de \\{\\}"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Final de rang no vàlid"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Memòria exhaurida"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Expressió regular precedent no vàlida"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Final prematur de la expressió regular"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Expressió regular massa gran"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") o \\) no emparellat"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "No hi ha cap expressió regular prèvia"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[sS]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "memòria exhaurida"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "l'argument «%s» no és vàlid per a «%s»"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "l'argument «%s» no és vàlid per a «%s»"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "llista d'arguments massa llarga"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opció il·legal -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "mida del bloc"
+
+#~ msgid "level higher in the filesystem hierarchy"
+#~ msgstr "nivell més alt a la jerarquia del sistema de fitxers"
+
+#~ msgid "levels higher in the filesystem hierarchy"
+#~ msgstr "nivells més alt a la jerarquia del sistema de fitxers"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "avís: el predicat -ipath està desaconsellat; utilitzeu -iwholename en el "
+#~ "seu lloc."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find versió %s\n"
+
+#~ msgid "oops -- invalid expression type in mark_stat!"
+#~ msgstr "ep -- el tipus d'expressió no és vàlid!"
+
+#~ msgid "oops -- invalid expression type in mark_type!"
+#~ msgstr "ep -- el tipus d'expressió no és vàlid!"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "amb una longitud acumulada de %s octets"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\tdels quals %s contenen espais, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s contenen caràcters de retorn de carro, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\ti %s contenen caràcters amb el bit alt establert.\n"
+
+#~ msgid "old"
+#~ msgstr "vella"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate versió %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "argument per a --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs versió %s\n"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "S'està reduint arg_max (%ld) a arg_size (%ld)\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+#~ msgstr ""
+#~ "accions: -exec ORDRE ; -fprint FITXER -fprint0 FITXER -fprintf FITXER "
+#~ "FORMAT\n"
+#~ "      -fls FITXER -ok ORDRE ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+
+# "Llista de predicats?" jm
+#~ msgid "Predicate List:\n"
+#~ msgstr "Llista de predicats:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Arbre d'avaluació\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Arbre d'avaluació optimitzat:\n"
+
+#~ msgid "Optimized command line:\n"
+#~ msgstr "Línia d'ordres optimitzada:\n"
+
+# Igual que la gent d'es@li.org, ací està el dubte de si ficar
+# "memòria exhaurida", llevant el "virtual", ja que en UNIX no
+# hi ha diferència de cara a l'usuari. De moment ho deixe com
+# està en l'original, però tenen raó. jm
+#~ msgid "virtual memory exhausted"
+#~ msgstr "memòria virtual exhaurida"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "s'està inserint %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "   tipus: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "esquerra:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "dereta:\n"
+
+#~ msgid "[stat called here] "
+#~ msgstr "[s'ha cridat a stat aquí] "
+
+#~ msgid "[type needed here] "
+#~ msgstr "[es necessita el tipus aquí] "
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Arbre d'avaluació normalitzat:\n"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "error en %s: %s"
+
+#~ msgid ""
+#~ "warning: locate database path `%s' contains a trailing colon, which is "
+#~ "not a valid database name"
+#~ msgstr ""
+#~ "avís: el camí de la base de dades de locate «%s» conté dos punts al "
+#~ "final, i això no és un nom de base de dades vàlid"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s ha canviat durant l'execució de %s"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. ha canviat durant l'execució de %s"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "cometa %s no emparellada"
diff --git a/po/cs.gmo b/po/cs.gmo
new file mode 100644 (file)
index 0000000..e096160
Binary files /dev/null and b/po/cs.gmo differ
diff --git a/po/cs.po b/po/cs.po
new file mode 100644 (file)
index 0000000..a087301
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,1432 @@
+# Czech translation for findutils.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Petr Pisar <petr.pisar@atlas.cz>, 2008, 2009, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-04-06 22:28+0200\n"
+"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
+"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Inicializace hash tabulky sdílených souborů selhala"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "na současný adresář nelze provést stat(2)"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Nelze načíst seznam připojených zařízení."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "POZOR: systém souborů %s byl nedávno odpojen."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "POZOR: systém souborů %s byl nedávno připojen."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"během provádění %3$s změněn %1$s%2$s (staré číslo zařízení %4$ld, nové číslo "
+"zařízení %5$ld, druh souborového systému je %6$s) [odkaz %7$ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"během provádění %3$s změněn %1$s%2$s (staré číslo i-uzlu %4$<PRIuMAX>, nové "
+"číslo i-uzlu %5$<PRIuMAX>, druh souborového systému je %6$s) [odkaz %7$ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "návrat do nadřazeného adresáře selhal"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Bezpečný přechod do adresáře %s se nezdařil"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Symbolický odkaz %s je součástí smyčky v hierarchii adresářů. Adresář, na "
+"který ukazuje, jsme již navštívili."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Odhalena smyčka souborových systémů: %s má stejné číslo zařízení a i-uzlu "
+"jako adresář, který se nachází o %d úrovni výše v hierarchii souborového "
+"systému"
+msgstr[1] ""
+"Odhalena smyčka souborových systémů: %s má stejné číslo zařízení a i-uzlu "
+"jako adresář, který se nachází o %d úrovně výše v hierarchii souborového "
+"systému"
+msgstr[2] ""
+"Odhalena smyčka souborových systémů: %s má stejné číslo zařízení a i-uzlu "
+"jako adresář, který se nachází o %d úrovní výše v hierarchii souborového "
+"systému"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "varování: nenásleduji symbolický odkaz %s"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"POZOR: Počet pevných odkazů na %s je chybný (viděno pouze st_nlink="
+"%<PRIuMAX>, avšak již objeveno %<PRIuMAX> podadresářů): toto může být chyba "
+"v ovladači vašeho systému souborů. Automaticky zapínán přepínač findu -"
+"noleaf. Dřívější výsledky mohou být ovlivněny chybou spočívající "
+"v nezahrnutí adresářů, které by měly být prohledány."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Seznam připojených souborových systémů nemohl být načten"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "neznámý"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Odhalena smyčka souborových systémů: %s je součástí stejné smyčky "
+"souborových systémů jako %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "POZOR: zdá se, že soubor %s má mód 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "%s nelze prohledat"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "návrat do prvotního pracovního adresáře po prohledání %s selhal"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"Akce -delete automaticky zapíná -depth, ale -prune nic nedělá, je-li -depth "
+"zapnut. Chcete-li přesto pokračovat, prostě explicitně použijte přepínač -"
+"depth."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"varování: zadali jste přepínač %s po nepřepínačovém argumentu %s, avšak "
+"přepínače nejsou poziční (%s ovlivňuje testy uvedené před ním zrovna tak "
+"jako ty po něm). Prosím, přepínače uvádějte před ostatními argumenty.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"varování: přepínač -d se nedoporučuje, prosím, místo něj použijte -depth, "
+"protože tato druhá forma je podle POSIXU."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s není jméno existující skupiny, a ani nevypadá jako číselný identifikátor "
+"skupiny, protože obsahuje neočekávanou příponu %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s není jméno existující skupiny"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "argument u -group je prázdný, měl by představovat jméno skupiny"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"Implicitní cesta je současný adresář, implicitní výraz je -print\n"
+"Výraz se smí sestávat z: operátorů, přepínačů, testů a akcí:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operátory (v sestupné prioritě; implicitní je -and, není-li jiný uveden):\n"
+"      ( VÝRAZ )   ! VÝRAZ   -not VÝRAZ   VÝRAZ1 -a VÝRAZ2   VÝRAZ1 -and "
+"VÝRAZ2\n"
+"      VÝRAZ1 -o VÝRAZ2   VÝRAZ1 -or VÝRAZ2   VÝRAZ1 , VÝRAZ2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"poziční přepínače (vždy pravdivé): -daystart -follow -regextype\n"
+"\n"
+"normální přepínače (vždy pravdivé, uvádí se před dalšími výrazy):\n"
+"      -depth --help -maxdepth ÚROVNĚ -mindepth ÚROVNĚ -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"testy (N může být +N nebo -N nebo N): -amin N -anewer SOUBOR -atime N -cmin "
+"N\n"
+"      -cnewer SOUBOR -ctime N -empty -false -fstype DRUH -gid N -group "
+"JMÉNO\n"
+"      -ilname VZOR -iname VZOR -inum N -iwholename VZOR -iregex VZOR\n"
+"      -links N -lname VZOR -mmin N -mtime N -name VZOR -newer SOUBOR"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path VZOR -perm [+-]MÓD -regex VZOR\n"
+"      -readable -writable -executable\n"
+"      -wholename VZOR -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user JMÉNO -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context KONTEXT\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"akce: -delete -print0 -printf FORMÁT -fprintf SOUBOR FORMÁT -print \n"
+"      -fprint0 SOUBOR -fprint SOUBOR -ls -fls SOUBOR -prune -quit\n"
+"      -exec PŘÍKAZ ; -exec PŘÍKAZ {} + -ok PŘÍKAZ ;\n"
+"      -execdir PŘÍKAZ ; -execdir PŘÍKAZ {} + -okdir PŘÍKAZ ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Chyby hlaste (a postup jejich opravy sledujte) přes stránku určenou na\n"
+"hlášení chyb ve findutils na http://savannah.gnu.org/ nebo, nemáte-li "
+"přístup\n"
+"k webu, odesláním e-mailu na <bug-findutils@gnu.org> (jen anglicky). "
+"Připomínky\n"
+"k překladu zasílejte na <translation-team-cs@lists.sourceforge.net> (česky)."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "kontrola nezávadnosti knihovní funkce fnmatch() selhala."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"varování: Unixové názvy souborů obvykle neobsahují lomítka (ačkoliv názvy "
+"cest ano). To znamená, že na tomto systému bude „%s %s“ pravděpodobně "
+"pokaždé vyhodnoceno jako nepravda. Možná by se vám více hodil test „-"
+"wholename“ nebo spíše „-samefile“. Náhradní řešení. pokud používáte GNU "
+"grep, spočívá v použití „find … -print0 | grep -FzZ %s“."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "U %s očekáván kladný desítkový celočíselný argument, avšak obdrženo %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "Tento systém neposkytuje způsob, jak zjistit čas vytvoření souboru."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Test %s vyžaduje argument"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Nevím, jak mám vyčíst datum nebo čas z %s"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Čas vytvoření souboru %s nelze získat."
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr "pozor: -%s %s nic nenajde, protože končí na /."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Mód %s není platný, je-li zapnuto POSIXLY_CORRECT."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "neplatný mód %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"varování: zadali jste vzor módu %s (což je ekvivalentní /000). Význam -"
+"perm /000 byl nyní pozměněn tak, aby byl jednotný s -perm -000. To jest, "
+"dříve se neshodoval s žádnými soubory, nyní se shoduje se všemi."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "neplatný prázdný argument u -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "neplatný druh „%c“ u -size"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Neplatný argument „%s%c“ u -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Přepínač -show-control-chars bere jediný argument, který musí být "
+"„literal“ (doslovný) nebo „safe“ (bezpečný)."
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Neplatný argument %s u -used"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s není jméno známého uživatele"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Argument přepínače -user by neměl být prázdný"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Povolené vlastnosti: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "neplatný predikát -context: SELinux není zapnut."
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Argumenty u -type by měly obsahovat pouze jedno písmeno."
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Neznámý argument u -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "varování: nerozpoznaný řídicí znak „\\%c“"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "chyba: na konci formátovací řetězce je %s"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "varování: nerozpoznaná formátovací direktiva „%%%c“"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "chyba: formátovací direktiva „%%%c“ je vyhrazena pro budoucí použití"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Současný adresář je obsažen v proměnné prostředí PATH, což je nebezpečné ve "
+"spojení s akcí findu %s. Prosím, odstraňte současný adresář z vaší $PATH (to "
+"jest, odeberte „.“ nebo úvodní nebo závěrečné dvojtečky)."
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Relativní cesta %s je obsažena v proměnné prostředí PATH, což je nebezpečné "
+"ve spojení s akcí findu %s. Prosím, odstraňte tuto položku z $PATH."
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Neměli byste používat {} uvnitř názvu nástroje u -execdir a -okdir, protože "
+"to představuje možný bezpečnostní problém."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "U -exec%s … + je podporována jen jedna instance {}."
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Prostředí je příliš veliké na exec()."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "aritmetické přetečení při pokusu převést %s dnů na počet sekund"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "aritmetické přetečení při pokusu vypočítat konec dnešního dne"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standardní chybový výstup"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standardní výstup"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "%s není možné smazat"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "návrat do prvotního pracovního adresáře po prohledání %s selhal"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon selhala: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "POZOR: čas vytvoření souboru %s není možné určit"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s … %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Standardní vstup nelze uzavřít"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Změna adresáře se nezdařila"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "nelze vykonat fork()"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "chyba při čekání na %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s ukončen signálem %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "neplatný výraz"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"neplatný výraz: použili jste binární operátor „%s“, aniž by mu cokoliv "
+"předcházelo."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "mezi „%s“ a „)“ očekáván výraz"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "po „%s“ očekáván výraz"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "neplatný výraz: máte moc „)“"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"neplatný výraz: očekávána „)“, ale nenalezena ani jedna. Za „%s“ asi "
+"potřebujete další predikát"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "neplatný výraz: prázdné závorky nejsou povoleny."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"neplatný výraz: Čekal jsem, že někde naleznu „)“, ale nenašel jsem ani jednu."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "ajaj – neplatný typ výrazu!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "ajaj – neplatný typ výrazu (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "cesty musí předcházet výraz: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "neznámý predikát „%s“"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "neplatný predikát „%s“"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "neplatný argument „%s“ u „%s“"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "u „%s“ chybí argument"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "máte moc „)“"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "neočekávaný nadbytečný predikát „%s“"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "neočekávaný nadbytečný predikát"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "ajaj – neplatné implicitní vložení operátoru and!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Užití: %s [-H] [-L] [-P] [-Oúroveň] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [cesta…] [výraz]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "současný pracovní adresář nelze zaznamenat"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "současný pracovní adresář nelze zaznamenat"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Ignoruji nerozpoznaný ladicí příznak %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Prázdný argument přepínače -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Přepínač -D musí být bezprostředně následován desítkovým celým číslem."
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Prosím, zadejte desítkové číslo okamžitě po -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Neplatná úroveň optimalizace %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Úroveň optimalizace %lu je příliš vysoká. Potřebujte-li hledat soubory velmi "
+"rychle, zvažte použití GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Proměnná prostředí FIND_BLOCK_SIZE není podporována. Jediná věc, která "
+"ovlivňuje velikost bloku je proměnná prostředí POSIXLY_CORRECT."
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "příkaz je příliš dlouhý"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr "kvůli omezením velikosti argumentů není možné zavolat exec()"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"s jediným argumentem se nemůžu vejít do limitu velikosti seznamu argumentů"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "seznam argumentů je příliš dlouhý"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr "Proměnná prostředí %s není nastavena na platné desítkové číslo"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Sestaveno za použití GNU gnulib verze %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Neočekávaná přípona %s u %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Očekáváno celé číslo: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Neznámý typ regulárního výrazu %s, platné typy jsou %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Užití: %s [--version | --help]\n"
+"nebo   %s nejčastější_dvojhlásky < soubor_se_seznamem > databáze_locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Chyby hlaste na <bug-findutils@gnu.org> (jen anglicky). Připomínky\n"
+"k překladu zasílejte na <translation-team-cs@lists.sourceforge.net> "
+"(česky).\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "chyba zápisu"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Užití: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Úroveň zabezpečení je třeba zadat jako desítkové celé číslo."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Úroveň zabezpečení %s je mimo převoditelný rozsah."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "úroveň zabezpečení %s má neočekávanou příponu %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "Úroveň zabezpečení slocate %ld není podporována."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Zápis na standardní výstup selhal"
+
+# TODO: plural
+#: locate/locate.c:146
+msgid "days"
+msgstr "dnů"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Argument přepínače --max-database-age nesmí být prázdný"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Neplatný argument %s přepínače -max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"locate databáze %s obsahuje delší název souboru, než s jakým může locate "
+"zacházet"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate databáze %s je poškozena nebo není platná"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Velikost locate databáze: %s bajt\n"
+msgstr[1] "Velikost locate databáze: %s bajty\n"
+msgstr[2] "Velikost locate databáze: %s bajtů\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Odpovídající názvy souborů: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Všechny názvy souborů: %s\n"
+
+# TODO: plural
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Názvy souborů mají celkovou délku %s bajtů.\n"
+"Z těchto názvů,\n"
+"\n"
+"\t%s obsahuje bílé místo, \n"
+"\t%s obsahuje znak nového řádku, \n"
+"\ta %s obsahuje znaky s nastaveným horním bitem.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Některé názvy souborů mohly být vynechány, takže nemůžeme spočítat kompresní "
+"poměr.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Kompresní poměr %4.2f %% (vyšší je lepší)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Kompresní poměr není definován\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"locate databáze %s vypadá jako slocate databáze, akorát má úroveň "
+"zabezpečení %c, což GNU findutils zatím nepodporuje."
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s je databáze slocate. Jejich podpora je nová, zatím očekávejte problémy."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s je slocate databáze s nepodporovanou úrovní zabezpečení %d, vynechávám ji."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Zadali jste přepínač -E, ale tento přepínač nemůže být použit s databází "
+"v slocate formátu a nenulovou úrovní zabezpečení. Pro tuto databázi nebudou "
+"vytvořeny žádné výsledky.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s je slocate databáze. Zapínám přepínač „-e“."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"Locate databáze %s ve starém formátu je příliš krátká na to, aby byla platná."
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Databáze %s je ve formátu %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Databáze má strojová slova kódována v malé endianitě.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Databáze má strojová slova kódována ve velké endianitě.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Kódování strojových slov databáze není zřejmé.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Užití: %s [-d CESTA | --database=CESTA] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYP]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      VZOR…\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "zbavení se práv skupiny selhalo"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "zbavení se setuid práv selhalo"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Zbavení se všech práv selhalo"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "zbavení se setgid práv selhalo"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr "varování: locate databázi lze ze standardního vstupu číst jen jednou."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "služba systému time selhala"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"varování: databáze %s je více jak %d %s stará (současný věk je %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr "POZOR: locate databáze %s byla sestaveno v jiném pořadí bajtů"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "neočekávaný EOF v %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "chyba při čtení slova z %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Neplatná escape posloupnost %s v zadání oddělovače vstupu."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Neplatná escape posloupnost %s v zadání oddělovače vstupu, hodnoty znaků "
+"nesmí přesáhnout %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Neplatná escape posloupnost %s v zadání oddělovače vstupu, hodnoty znaků "
+"nesmí přesáhnout %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Neplatná escape posloupnost %s v zadání oddělovače vstupu, závěrečné znaky "
+"%s nebyly rozeznány."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Neplatné určení oddělovače vstupu %s: oddělovač musí být buď jediný znak, "
+"nebo escape posloupnost začínající \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "prostředí je na exec() příliš velké"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"pozor: hodnota %ld přepínače -s je příliš velká, místo toho se použije %ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Vstupní soubor %s nelze otevřít."
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Vaše proměnné prostředí zabírají %'<PRIuMAX> bajtů\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Horní mez délky argumentů dle POSIXU (tento sytém): %'<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Nejmenší možná horní mez délky argumentů dle POSIXU (všechny systémy): "
+"%'<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Maximální délka příkazu, který tedy můžeme použít: %'<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Velikost bufferu příkazu, který tedy používáme: %'<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Vykonávání xargs bude nyní pokračovat. Bude se pokoušet číst svůj vstup a "
+"spouštět příkazy. Pokud to není to, co chcete, aby se dělo, prosím, "
+"stiskněte klávesy konce souboru.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Varování: %s bude spuštěn alespoň jednou. Pokud nechcete, aby se stalo, pak "
+"stiskněte klávesy přerušení.\n"
+
+# XXX: unmatched {single|double} quote
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"neodpovídající %s uvozovka; implicitně jsou pro xargs uvozovky zvláštními "
+"znaky, dokud nepoužijete přepínač -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dvojitá"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "jednoduchá"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"POZOR: Na vstupu se objevil znak NULL. Není možné jej předat do seznamu "
+"argumentů. Nezamýšleli jste použít přepínač --null?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "řádka s argumenty je příliš dlouhá"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "/dev/tty nebylo možné otevřít pro čtení"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "před fork() nebylo možné vyrobit rouru"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"čtení bufferu errna selhalo v xargs_do_exec (pravděpodobně se jedná o chybu, "
+"prosím, ohlašte to)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"read vrátilo neočekávanou hodnotu %d; pravděpodobně se jedná o chybu, "
+"prosím, ohlašte to"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "chyba při čekání na proces potomka"
+
+# TODO: plural
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "POZOR: Ztracena stopa %d potomků"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: ukončen s kódem 255, končím"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: pozastaven signálem %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: ukončen signálem %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: neplatné číslo u přepínače -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: hodnota přepínače -%c by měla být >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: hodnota přepínače -%c by měla být < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=oddělovač]\n"
+"       [-E řet-eof] [-e[řet-eof]]  [--eof[=řet-eof]]\n"
+"       [-L max-řádků] [-l[max-řádků]] [--max-lines[=max-řádků]]\n"
+"       [-I řet-nahrazení] [-i[řet-nahrazení]] [--replace[=řet-nahrazení]]\n"
+"       [-n max-argumentů] [--max-args=max-argumentů]\n"
+"       [-s max-znaků] [--max-chars=max-znaků]\n"
+"       [-P max-procesů]  [--max-procs=max-procesů] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=soubor]\n"
+"       [--version] [--help] [příkaz [zahajující-argumenty]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "současný adresář nelze zjistit"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "neplatný argument %s u %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "nejednoznačný argument %s u %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Platné argumenty jsou:"
+
+#~ msgid "error closing file"
+#~ msgstr "chyba při zavírání souboru"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Neznámá chyba systému"
+
+#~ msgid "%s: option `%s' is ambiguous\n"
+#~ msgstr "%s: přepínač „%s“ není jednoznačný\n"
+
+#~ msgid "%s: option `--%s' doesn't allow an argument\n"
+#~ msgstr "%s: přepínač „--%s“ nepovoluje argument\n"
+
+#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: přepínač „%c%s“ nepovoluje argument\n"
+
+#~ msgid "%s: option `%s' requires an argument\n"
+#~ msgstr "%s: přepínač „%s“ vyžaduje argument\n"
+
+#~ msgid "%s: unrecognized option `--%s'\n"
+#~ msgstr "%s: nerozpoznaný přepínač „--%s“\n"
+
+#~ msgid "%s: unrecognized option `%c%s'\n"
+#~ msgstr "%s: nerozpoznaný přepínač „%c%s“\n"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: nedovolený přepínač – %c\n"
+
+#~ msgid "%s: invalid option -- %c\n"
+#~ msgstr "%s: neplatný přepínač – %c\n"
+
+#~ msgid "%s: option requires an argument -- %c\n"
+#~ msgstr "%s: přepínač vyžaduje argument – %c\n"
+
+#~ msgid "%s: option `-W %s' is ambiguous\n"
+#~ msgstr "%s: přepínač „-W %s“ není jednoznačný\n"
+
+#~ msgid "%s: option `-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: přepínač „-W %s“ nepovoluje argument\n"
+
+#~ msgid "`"
+#~ msgstr "„"
+
+#~ msgid "'"
+#~ msgstr "“"
+
+#~ msgid "Success"
+#~ msgstr "Úspěch"
+
+#~ msgid "No match"
+#~ msgstr "Žádná shoda"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Neplatný regulární výraz"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Neplatný třídící znak"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Neúplatný název třídy znaků"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Závěrečné zpětné lomítko"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Neplatný zpětný odkaz"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Nepárová [ nebo [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Nepárová ( nebo \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Nepárová \\{"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Neplatný obsah \\{\\}"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Neplatný konec rozsahu"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Paměť vyčerpána"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Neplatný předchozí regulární výraz"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Předčasný konec regulárního výrazu"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Příliš velký regulární výraz"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Nepárová ) nebo \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Žádný předchozí regulární výraz"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[aA]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "paměť vyčerpána"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "neplatný argument „%3$s“ u %1$s%2$s"
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "neplatná přípona argument „%3$s“ u %1$s%2$s"
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "příliš dlouhý argument „%3$s“ u %1$s%2$s"
diff --git a/po/da.gmo b/po/da.gmo
new file mode 100644 (file)
index 0000000..cf1094e
Binary files /dev/null and b/po/da.gmo differ
diff --git a/po/da.po b/po/da.po
new file mode 100644 (file)
index 0000000..0197d8f
--- /dev/null
+++ b/po/da.po
@@ -0,0 +1,1567 @@
+# Danish translation of GNU findutils.
+# Copyright (C) 2000, 03, 04, 05, 09 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+#
+# Ole Laursen <olau@hardworking.dk>, 2000, 03, 04, 05.
+# Ask Hjorth Larsen <asklarsen@gmail.com>, 2009, 2010.
+#
+# Konventioner:
+#
+#   positional -> positionsafhængig
+#   option -> tilvalg
+#   argument -> parameter
+#   decimal integer -> heltal (ingen grund til at diskutere titalssystem her)
+#   predicate -> udsagn
+#     
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-07-17 21:51+0200\n"
+"Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>\n"
+"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
+"Language: da\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Kunne ikke klargøre hashtabel som delt fil"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "kan ikke køre stat() på aktuelle katalog"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Kan ikke læse listen af monterede enheder."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "ADVARSEL: Filsystemet %s er blevet afmonteret for nylig."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "ADVARSEL: Filsystemet %s er blevet monteret for nylig."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s ændrede sig under kørsel af %s (tidligere enhedsnummer %ld, nyt "
+"enhedsnummer %ld, filsystemtype er %s) [ref %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s ændrede sig under kørsel af %s (tidligere inode-nummer %<PRIuMAX>, nyt "
+"inode-nummer %<PRIuMAX>, filsystemtype er %s) [ref %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "kunne ikke vende tilbage til ophavskatalog"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Kunne ikke på sikker vis skifte til kataloget %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Den symbolske lænke %s er del af en løkke i kataloghierarkiet; kataloget, "
+"den peger på, er allerede blevet besøgt."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Filsystemsløkke fundet; %s har det samme enhedsnummer og indekseringsknude "
+"(inode) som et katalog, der er %d niveau højere oppe i filsystemhierarkiet"
+msgstr[1] ""
+"Filsystemsløkke fundet; %s har det samme enhedsnummer og indekseringsknude "
+"(inode) som et katalog, der er %d niveauer højere oppe i filsystemhierarkiet"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "advarsel: kunne ikke følge det symbolske link %s"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"ADVARSEL: Antallet af hårde lænker for %s er forkert (så kun st_nlink="
+"%<PRIuMAX>, men vi har allerede set %<PRIuMAX> underkataloger): dette kan "
+"være en fejl i driveren til filsystemet. Slår automatisk find's tilvalg -"
+"noleaf til.  Tidligere resultater kan fejlagtigt have udeladt kataloger som "
+"skulle have været gennemsøgt."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Kan ikke læse listen af monterede filsystemer"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "ukendt"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr "Filsystemsløkke fundet; %s er del af samme filsystemsløkke som %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "ADVARSEL: Filen %s synes at have tilstand 0000"
+
+# Det ville jo være smart hvis programmørerne skrev hvad %s var for noget.  Det er sandsynligvis et katalog
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "kan ikke søge i %s"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr ""
+"kunne ikke vende tilbage til oprindeligt arbejdskatalog efter søgning i %s"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"Handlingen -delete slår automatisk -depth til, men -prune gør intet når -"
+"depth er givet.  Hvis du alligevel vil fortsætte, så giv tilvalget -depth "
+"eksplicit."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"advarsel: du har angivet tilvalget %s efter parameteren %s som ikke er et "
+"tilvalg, men tilvalg er ikke positionsafhængige (tilvalget %s påvirker både "
+"test angivet før og efter det); angiv venligst tilvalg før andre parametre.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"advarsel: tilvalget -d er forældet; benyt -depth i stedet som er i "
+"overenstemmelse med POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s er ikke navnet på en eksisterende gruppe, og ligner heller ikke en "
+"numerisk gruppe-id på grund af det uventede suffiks %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s er ikke navnet på en eksisterende gruppe"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "parameteren til -group er tom, men bør være et gruppenavn"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"hvis ikke andet angivet er stien det aktuelle katalog og udtrykket -print\n"
+"udtryk kan bestå af: operatorer, tilvalg, test og handlinger:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operatorer (i aftagende prioritet, udeladelse medfører -and):\n"
+"      ( UDTR )  ! UDTR  -not UDTR  UDTR1 -a UDTR2  UDTR1 -and UDTR2\n"
+"      UDTR1 -o UDTR2  UDTR1 -or UDTR2  UDTR1 , UDTR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"positionsafhængige tilvalg (altid sande): -daystart -follow -regextype\n"
+"\n"
+"normale tilvalg (altid sande, angives før andre udtryk): -depth\n"
+"      -depth --help -maxdepth NIVEAUER -mindepth NIVEAUER -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"test (N kan være +N eller -N eller N): -amin N -anewer FIL -atime N -cmin N\n"
+"      -cnewer FIL -ctime N -empty -false -fstype TYPE -gid N -group NAVN\n"
+"      -ilname MØNSTER -iname MØNSTER -inum N -iwholename MØNSTER -iregex "
+"MØNSTER\n"
+"      -links N -lname MØNSTER -mmin N -mtime N -name MØNSTER -newer FIL"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path MØNSTER -perm [+-]TILSTAND -regex MØNSTER\n"
+"      -readable -writable -executable\n"
+"      -wholename MØNSTER -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAVN -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context KONTEKST\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"handlinger: -delete -print0 -printf FORMAT -fprint FIL FORMAT -print \n"
+"      -fprint0 FIL -fprint FIL -ls -fls FIL -prune -quit\n"
+"      -exec KOMMANDO ; -exec KOMMANDO {} + -ok KOMMANDO ;\n"
+"      -execdir KOMMANDO ; -execdir KOMMANDO {} + -okdir KOMMANDO ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Rapportér (og følg fremgangen på) fejl via findutils' fejlrapporteringsside\n"
+"på http://savannah.gnu.org/ eller, hvis du ikke kan tilgå denne, ved\n"
+"at sende et brev til <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "fornuftighedstjek af biblioteksfunktionen fnmatch() mislykkedes."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"advarsel: Unix-filnavne indeholder som regel ikke skråstreger (selvom stier "
+"gør). Det betyder at '%s %s' sandsynligvis vil være falsk altid på dette "
+"system. Muligvis vil testen '-wholename' eller måske '-samefile' være mere "
+"brugbar. Alternativt kan du hvis du bruger GNU grep, benytte 'find ... -"
+"print0 | grep -FzZ %s'."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "Forventede et positivt heltal som parameter til %s, men fik %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+"Dette system giver ikke mulighed for at finde en fils oprettelsestidspunkt."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Testen %s kræver en parameter"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+"Jeg kan ikke finde ud af hvordan %s skal fortolkes som dato eller tidspunkt"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Kan ikke hente oprettelsestidspunkt for filen %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr "advarsel: -%s %s vil ikke matche noget, da det slutter med /."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Tilstanden %s er ikke gyldig når POSIXLY_CORRECT er slået til."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "ugyldig tilstand %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"advarsel: du har angivet tilstandsmønsteret %s (som er ækvivalent med /000). "
+"Betydningen af -perm /000 er nu blevet ændret, så den er konsistent med -"
+"perm -000; dette vil sige, at mens det før ikke matchede nogen filer, "
+"matcher det nu alle filer."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "ugyldig tom parameter til -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "ugyldig -size type '%c'"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Ugyldig parameter '%s%c' til -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Tilvalget -show-control-chars kræver en enkelt parameter som skal være "
+"'literal' eller 'safe'"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Ugyldig parameter %s til -used"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s er ikke navnet på en kendt bruger"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Parameteren til -user bør ikke være tom"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Faciliteter aktiveret: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "ugyldigt prædikat -context: SELinix er ikke aktiveret."
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Parameteren til -type bør indeholde kun ét tegn"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Ukendt parameter til -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "advarsel: ukendt undvigetegn '\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "fejl: formatstreng slutter med %s"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "advarsel: ukendt formatteringsdirektiv '%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "fejl: formatdirektivet '%%%c' er reserveret til fremtidig brug"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Det aktuelle katalog er medtaget i miljøvariablen PATH hvilket er usikkert "
+"når det kombineres med handlingen %s til find. Fjern venligst det aktuelle "
+"katalog fra din $PATH (dvs. fjern \".\" eller begyndende og afsluttende "
+"koloner)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Den relative sti %s er medtaget i miljøvariablen PATH, hvilket er usikkert "
+"når det kombineres med handlingen %s til find.  Fjern venligst det aktuelle "
+"katalog fra din $PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Det kan ikke bruge {} i programnavnet for -execdir og -okdir fordi der er et "
+"potentielt sikkerhedsproblem."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Kun en forekomst af {} er understøttet med -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Miljøet er for stort til exec()."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "aritmetisk overløb ved konvertering af %s dage til et antal sekunder"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "aritmetisk overløb ved forsøg på at udregne denne dags sluttidspunkt"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standardfejl"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standard-uddata"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "kan ikke slette %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr ""
+"kunne ikke vende tilbage til oprindeligt arbejdskatalog efter søgning i %s"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon mislykkedes: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "ADVARSEL: Kan ikke bestemme oprettelsestidspunkt for filen %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Kan ikke lukke standard-inddata"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Kunne ikke ændre katalog"
+
+# der er plads nok at tage af
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "kan ikke fraspalte en ny proces"
+
+# ditto, ingen grund til kryptiskhed
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "fejl i forbindelse med at vente på %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s afsluttet af signal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "ugyldigt udtryk"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"ugyldigt udtryk; du har brugt den binære operator '%s' uden noget foran."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "forventede et udtryk mellem '%s' og ')'"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "forventede et udtryk efter '%s'"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "ugyldigt udtryk; for mange ')'"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"ugyldigt udtryk; forventede en ')', men fandt ingen.  Måske skal du bruge et "
+"ekstra udsagn efter '%s'"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "ugyldigt udtryk; tomme parenteser tillades ikke."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"ugyldigt udtryk; jeg forventede at finde en ')' et eller andet sted, men "
+"fandt ingen."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "ups - ugyldig udtrykstype!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "ups - ugyldig udtrykstype (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "stier skal stå før udtrykket: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "ukendt udsagn '%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "ugyldigt udsagn '%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "ugyldig parameter '%s' til '%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "manglende parameter til '%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "du har for mange ')'"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "uventet ekstra udsagn '%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "uventet ekstra udsagn"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "ups - ugyldig automatisk indsættelse af 'and'!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Brug: %s [-H] [-L] [-P] [-Oniveau] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [sti...] [udtryk]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "kan ikke hente det aktuelle arbejdskatalog"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "kan ikke hente det aktuelle arbejdskatalog"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Ignorerer ukendt fejlsøgningsflag %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Tom parameter til -D-tilvalget."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Tilvalget -O skal følges umiddelbart af et heltal"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Angiv venligst et heltal umiddelbart efter -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Ugyldigt optimeringsniveau %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Optimeringsniveauet %lu er for højt.  Hvis du vil finde filer meget hurtigt, "
+"så overvej at bruge GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Miljøvariablen FIND_BLOCK_SIZE er ikke understøttet, det eneste der påvirker "
+"blokstørrelsen er miljøvariablen POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "kommando for lang"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr "kan ikke kalde exec() på grund af begrænsninger på argumentstørrelser"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "kan ikke indpasse enkelt parameter inden for parameterlistestørrelsen"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "parameterliste for lang"
+
+# decimal -- titalssystemet eller decimaltal?  Lidt uklart, vælger den 'sikre', mindre informative formulering
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr "Miljøvariablen %s er ikke sat til et gyldigt tal"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Kompileret med GNU gnulib version %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Uventet suffiks %s på %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Forventede et heltal: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Ukendt type af regulært udtryk %s; gyldige typer er %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Brug: %s [--version | --help]\n"
+"eller %s mest-brugte-bigrammer < fil-liste > locate-database\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Rapportér programfejl til <bug-findutils@gnu.org>\n"
+"Rapportér oversættelsesfejl til <dansk@dansk-gruppen.dk>\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "skrivefejl"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Brug: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Du skal angive et sikkerhedsniveau i form af et heltal."
+
+# convertible?  Dette må være o.k.
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Sikkerhedsniveauet %s er uden for det meningsfulde interval."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Sikkerhedsniveauet %s har uventet suffiks %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "Sikkerhedsniveauet %ld for slocate understøttes ikke."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Kunne ikke skrive til standard-uddata"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dage"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Parameteren for tilvalget --max-database-age må ikke være tom"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Ugyldig parameter %s til tilvalget --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"locate-databasen %s indeholder et filnavn, der er længere end locate kan "
+"håndtere"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate-databasen %s er ødelagt eller ugyldig"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Locate-databasestørrelse: %s byte\n"
+msgstr[1] "Locate-databasestørrelse: %s byte\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Matchende filnavne: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Alle filnavne: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Filnavnene har en kumulativ længde på %s byte.\n"
+"For disse filnavne gælder:\n"
+"\n"
+"\t%s indeholder blanke tegn,\n"
+"\t%s indeholder linjeskiftstegn, \n"
+"\tog %s indeholder tegn med den høje bit givet.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Visse filnavne kan være filtreret ud, så vi kan ikke beregne "
+"komprimeringsforholdet.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Komprimeringsforhold %4.2f%% (større er bedre)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Komprimeringsforholdet er udefineret\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"locate-databasen %s ser ud som en slocate-database, men synes at have "
+"sikkerhedsniveau %c, hvilket GNU findutils ikke understøtter på nuværende "
+"tidspunkt"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s er en slocate-database.  Understøttelse for disse er ny, så forvent "
+"problemer indtil videre."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s er en slocate-database med sikkerhedsniveauet %d, som ikke understøttes; "
+"springer over."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Du gav tilvalget -E, men dette tilvalg kan ikke bruges sammen med slocate-"
+"formaterede databaser med sikkerhedsniveau forskelligt fra nul.  Ingen "
+"resultater vil blive genereret for denne database.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s er en slocate-database.  Slår '-e'-tilvaget til."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "Locate-databasen %s med gammelt format er for kort til at være gyldig"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Database %s er i formatet %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Databasen bruger lille-endian kodning af maskinord.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Databasen bruger stor-endian kodning af maskinord.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Databasens kodning af maskinord er ikke åbenlys.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Brug: %s [-d sti | --database=sti] [-e | -E | --[non-]existing]\n"
+"     [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"     [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"     [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"     [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"     [--max-database-age D] [--version] [--help]\n"
+"     mønster...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "kunne ikke afgive gruppeprivilegier"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "kunne ikke afgive setuid-privilegier"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Kunne ikke fuldt afgive privilegier"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "kunne ikke afgive setgid-privilegier"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr "advarsel: locate-databasen kan kun læses fra standard-ind en gang."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "systemkaldet time() mislykkedes"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"advarsel: databasen %s er mere end %d %s gammel (faktisk alder er %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr "ADVARSEL: locate-databasen %s blev bygget med en anden byte-orden"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "uventet EOF i %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "fejl ved læsning af ord fra %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Ugyldig undvigesekvens %s i angivelse af skilletegn for inddata."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Ugyldig undvigesekvens %s i angivelse af skilletegn for inddata; tegnværdier "
+"må ikke overstige %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Ugyldig undvigesekvens %s i angivelse af skilletegn for inddata; tegnværdier "
+"må ikke overstige %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Ugyldig undvigesekvens %s i angivelse af skilletegn for inddata; afsluttende "
+"tegn %s genkendes ikke."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Ugyldig angivelse af skilletegn %s for inddata: skilletegnet skal være enten "
+"et enkelt tegn eller en undvigesekvens, der begynder med \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "miljø for stort til at eksekvere"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"advarsel: værdien %ld for tilvalget -s er for stor - bruger %ld i stedet"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Kan ikke åbne inddatafilen %s"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Dine miljøvariable fylder %<PRIuMAX> byte\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+"Øvre grænse på parameterlængde ifølge POSIX (dette system): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Mindste øvre grænse for parameterlængde tilladt af POSIX (alle systemer): "
+"%<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Maksimal længde af kommando der faktisk kunne bruges: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Størrelsen af kommandobufferen, som faktisk bruges: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Kørslen af xargs vil nu fortsætte, og denne vil forsøge at læse dens inddata "
+"og køre kommandoer; hvis dette ikke er hvad du ønsker, så skriv et "
+"filsluttegn (end-of-file).\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Advarsel: %s vil blive kørt mindst én gang.  Hvis du ikke ønsker at dette "
+"skal ske, så skriv afbrydelsestegnet (interrupt).\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"uafbalanceret citationstegn %s; som standard er citationstegn specielle for "
+"xargs medmindre du bruger tilvalget -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dobbelt"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "enkelt"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"ADVARSEL: Der var et NUL-tegn i inddata.  Dette kan ikke videregives gennem "
+"parameterlisten.  Ønskede du at bruge tilvalget --null?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "parameterlinje for lang"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "kunne ikke åbne /dev/tty til læsning"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "kunne ikke oprette dataledning (pipe) før fork"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"læsning af errno-buffer mislykkedes i xargs_do_exec (dette er sandsynligvis "
+"en programfejl, indrapportér den venligst)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"read returnerede den uventede værdi %d; dette er sandsynligvis en "
+"programfejl, indrapportér den venligst"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "fejl i forbindelse med at vente på afkomproces"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "ADVARSEL: Kunne ikke holde rede på %d underprocesser"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: stoppede med status 255; afbryder"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: standset af signal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: afsluttet af signal %d"
+
+# omvendt ordstilling for at undgå sammensætningsproblem
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: ugyldig værdi til tilvalget -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: Værdien for tilvalget -%c skal være >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: Værdien for tilvalget -%c skal være < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Brug: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=skilletegn]\n"
+"      [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n"
+"      [-L makslinjer] [-l[makslinjer]] [--max-lines[=makslinjer]]\n"
+"      [-I erstatnings-str] [-i[erstatnings-str]] [--replace[=erstatnings-"
+"str]]\n"
+"      [-n maks-param] [--max-args=maks-param]\n"
+"      [-s maks-tegn] [--max-chars=maks-tegn]\n"
+"      [-P maks-proc] [--max-procs=maks-proc] [--show-limits]\n"
+"      [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fil]\n"
+"      [--version] [--help] [kommando [startparametre]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "kan ikke hente det aktuelle katalog"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "ugyldig parameter %s til %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "tvetydig parameter %s til %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Gyldige parametre er:"
+
+#~ msgid "error closing file"
+#~ msgstr "fejl ved lukning af fil"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Ukendt systemfejl"
+
+#~ msgid "%s: option `%s' is ambiguous\n"
+#~ msgstr "%s: tilvalget '%s' er tvetydigt\n"
+
+#~ msgid "%s: option `--%s' doesn't allow an argument\n"
+#~ msgstr "%s: tilvalget '--%s' må ikke have en parameter\n"
+
+#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: tilvalget '%c%s' må ikke have en parameter\n"
+
+#~ msgid "%s: option `%s' requires an argument\n"
+#~ msgstr "%s: tilvalget '%s' skal have en parameter\n"
+
+#~ msgid "%s: unrecognized option `--%s'\n"
+#~ msgstr "%s: ukendt tilvalg '--%s'\n"
+
+#~ msgid "%s: unrecognized option `%c%s'\n"
+#~ msgstr "%s: ukendt tilvalg '%c%s'\n"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: ugyldigt tilvalg - %c\n"
+
+#~ msgid "%s: invalid option -- %c\n"
+#~ msgstr "%s: ugyldigt tilvalg - %c\n"
+
+#~ msgid "%s: option requires an argument -- %c\n"
+#~ msgstr "%s: tilvalget skal have en parameter - %c\n"
+
+#~ msgid "%s: option `-W %s' is ambiguous\n"
+#~ msgstr "%s: tilvalget '-W %s' er tvetydigt\n"
+
+#~ msgid "%s: option `-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: tilvalget '-W %s' skal ikke have en parameter\n"
+
+#~ msgid "`"
+#~ msgstr "'"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "Succes"
+
+#~ msgid "No match"
+#~ msgstr "Intet passende fundet"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Ugyldigt regulært udtryk"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Ugyldigt sammenligningstegn"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Ugyldigt tegnklassenavn"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Afsluttende omvendt skråstreg"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Ugyldig tilbagereference"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Uafbalanceret [ eller [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Uafbalanceret ( eller \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Uafbalanceret \\{"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Indholdet af \\{\\} er ugyldigt"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Ugyldig intervalafslutning"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Løbet tør for hukommelse"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Forudgående regulært udtryk er ugyldigt"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "For tidlig afslutning på det regulære udtryk"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Det regulære udtryk er for stort"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Uafbalanceret ) eller \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Intet foregående regulært udtryk"
+
+# tillad både 'j' eller 'J' såvel som 'y' eller 'Y' til ja/nej-spørgsmål
+#~ msgid "^[yY]"
+#~ msgstr "^[yYjJ]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "løbet tør for hukommelse"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "ugyldig %s%s-parameter '%s'"
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "ugyldigt suffiks i %s%s-parameteren '%s'"
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "%s%s-parameteren '%s' er for stor"
+
+#~ msgid "block size"
+#~ msgstr "blokstørrelse"
+
+#~ msgid "level higher in the filesystem hierarchy"
+#~ msgstr "niveau højere i filsystemshierarkiet"
+
+#~ msgid "levels higher in the filesystem hierarchy"
+#~ msgstr "niveauer højere i filsystemshierarkiet"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "advarsel: udsagnet -ipath er forældet; brug venligst -iwholename i stedet."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find version %s\n"
+
+#~ msgid "oops -- invalid expression type in mark_stat!"
+#~ msgstr "ups - ugyldig udtrykstype i mark_stat!"
+
+#~ msgid "oops -- invalid expression type in mark_type!"
+#~ msgstr "ups - ugyldig udtrykstype i mark_type!"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "men en kumulativ længde på %s byte"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\taf hvilke %s indeholder mellemrum, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s indeholder linjeskift, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\tog %s indeholder tegn med den højeste bit sat.\n"
+
+#~ msgid "old"
+#~ msgstr "gammel"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate version %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "parameter til --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs version %s\n"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Reducerer arg_max (%ld) til arg_size (%ld)\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+#~ msgstr ""
+#~ "handlinger: -exec KOMMANDO ; -fprint FIL -fprint0 FIL -fprintf FIL "
+#~ "FORMAT\n"
+#~ "      -fls FIL -ok KOMMANDO ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Liste over udsagn:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Evalueringstræ:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Optimeret evalueringstræ:\n"
+
+#~ msgid "Optimized command line:\n"
+#~ msgstr "Optimeret kommandolinje:\n"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "løbet tør for virtuel hukommelse"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "indsætter %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    type: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "venstre:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "højre:\n"
+
+#~ msgid "[stat called here] "
+#~ msgstr "[stat kaldt her]"
+
+#~ msgid "[type needed here] "
+#~ msgstr "[type påkrævet her]"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Normaliseret evalueringstræ\n"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "fejl i %s: %s"
+
+#~ msgid ""
+#~ "warning: locate database path `%s' contains a trailing colon, which is "
+#~ "not a valid database name"
+#~ msgstr ""
+#~ "advarsel: locate-databasestien '%s' slutter med et kolon hvilket ikke er "
+#~ "et gyldigt databasenavn"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s ændret under kørsel af %s"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. ændret under kørsel af %s"
diff --git a/po/de.gmo b/po/de.gmo
new file mode 100644 (file)
index 0000000..48e5322
Binary files /dev/null and b/po/de.gmo differ
diff --git a/po/de.po b/po/de.po
new file mode 100644 (file)
index 0000000..3babe92
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,1474 @@
+# German language file for the GNU findutils.
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Nils Naumann <nnau@gmx.net>, 1996-2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2011-02-08 21:07+0100\n"
+"Last-Translator: Nils Naumann <nnau@gmx.net>\n"
+"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Poedit-Language: German\n"
+"X-Poedit-Country: GERMANY\n"
+"X-Poedit-SourceCharset: iso-8859-1\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "Kann nicht den Status des aktuellen Verzeichnis ermitteln."
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Kann nicht die Liste der eingehängten Geräte lesen."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Warnung:  Das Dateisystem %s wurde gerade ausgehangen."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Warnung:  Das Deteisystem %s wurde grade eingehangen."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s wurde während des Ausführens von %s geändert (Die alte Gerätenummer ist "
+"%ld, die neue Gerätenummer ist %ld, der Dateisystemtyp ist %s) [ref %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s wurde während des Ausführens von %s geändert (Die alte Inode Nummer ist "
+"%<PRIuMAX>, die neue Inode Nummer ist %<PRIuMAX>, der Dateisystem Typ ist "
+"%s) [ref %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "Konnte nicht zum übergeordneten Verzeichnis wechseln."
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Konnte nicht sicher in das Verzeichnis %s wechseln."
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Der symbolische Verweis %s bildet eine Schleife in der "
+"Verzeichnishirarchie.  Das bezeichnete Verzeicnis wurde bereits durchsucht."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Dateisystemsleife erkannt; %s hat die gleiche Gerätenummer und inode wie ein "
+"%d Ebenen höheres Verzeichnis in der Hierarchie."
+msgstr[1] ""
+"Dateisystemschleife erkannt; %s hat die gleiche Gerätenummer und Inode wie "
+"ein %d Ebenen höheres Verzeichnis in der Hierarchie."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "Warnung: Dem symbolischen Verweis %s wird nicht gefolgt."
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"Warnung: Die Anzahl der harten Links ist für %s falsch (Erkannte nur "
+"st_nlink=%<PRIuMAX> aber es wurden bereits %<PRIuMAX> Unterverzeichnisse "
+"erkannt):  Das könnte durch ein Fehler im Dateisystemtreiber hervorgerufen "
+"worden sein.  Die -noleaf Option wurde automatisch aktiviert.  Vorhergehende "
+"Ergebnisse könnten Unterverzeinisse übergangen haben."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "unbekannt"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr "Dateisystemschleife erkannt; %s ist ein Teil der Schleife %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "Warnung: Die Datei %s scheint die Zugriffsrechte 0000 zu haben."
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr ""
+"Das Rückkehren zum Arbeitsverzeichnis war nach dem Suchen nach %s nicht mehr "
+"möglich."
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"Die -delete und -prune Option schließen sich aus, da die -delete Option -"
+"depth aktiviert und -prune dann keinen Effekt hat.  In diesem Fall muß -"
+"depth zusätzlich angegeben werden."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"Warnung:  Die -d Option soll nicht mehr verwendet werden.  Statt dessen "
+"steht das POSIX kompatibele -depth zur Verfügung."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s ist kein exis<ierender Gruppenname und scheint auch keine numerische "
+"Gruppenbezeichnung zu sein, da sie die unerwartete Endung %s aufweist."
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s ist kein existierender Gruppenname."
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "Das Argument zu -group fehlt. Es muss ein Gruppenname sein."
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"Der Standardpfad ist das aktuelle Verzeichnis; Der Standardausdruck ist -"
+"print.\n"
+"Ausdrücke können aus Operatoren, Optionen, Vergleichen und Aktionen "
+"bestehen:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"Operatoren in absteigendem Vorrang (-and wird automatisch ergänzt):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"Positions Optionen (immer wahr): -daystart -follow -regextype\n"
+"\n"
+"Normale Optionen (immer wahr, vor anderen Optionen angegeben):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"Tests (N kann +N oddr -N oder N sein): -amin N -anewer DATEI -atime N -cmin "
+"N\n"
+"      -cnewer DATEI -ctime N -empty -false -fstype TYP -gid N -group NAME\n"
+"      -ilname MUSTER -iname MUSTER -inum N -iwholename MUSTER -iregex "
+"MUSTER\n"
+"      -links N -lname MUSTER -mmin N -mtime N -name MUSTER -newer DATEI"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path MUSTER -perm [+-]MODUS -regex MUSTER\n"
+"      -readable -writable -executable\n"
+"      -wholename MUSTER -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context KONTEXT\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"Aktionen: -delete -print0 -printf FORMAT -fprintf DATEI FORMAT -print \n"
+"      -fprint0 DATEI -fprint DATEI -ls -fls DATEI -prune -quit\n"
+"      -exec KOMMANDO ; -exec KOMMANDO {} + -ok KOMMANDO ;\n"
+"      -execdir KOMMANDO ; -execdir KOMMANDO {} + -okdir KOMMANDO ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Fehler (und Informationen über deren deren Abarbeitungsstand) können\n"
+"auf der findutils Fehlerberichtseite auf http://savannah.gnu.org/\n"
+"eingegeben oder per Email an <bug-findutils@gnu.org> gesendet werden."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+"Die Plausibilitätsprüfung der fnmatch() Bibiliotheksfunktion ist gescheitert."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"Warnung:  Unix Dateinamen enthalten gewöhnlich keine Schrägstriche (anders "
+"als Pfadbezeichnungen).  Deshalb wird '%s %s' wahrscheinlich immer \"Falsch"
+"\" auf diesem System ergeben.  Möglicherweise sind '-wholename' oder '-"
+"samefile' bessere Tests.  Alternativ kann auch GNU grep verwendet werden:  "
+"'find ... -print0 | grep -FzZ %s'."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+"Eine positive dezimale Ganzzahl wird als Argument von %s erwartet, aber %s "
+"erhalten."
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+"Dieses System stellt keine Funktion zum Ermitteln der Erzeugungszeit der "
+"Datei bereit."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Der %s Test erfordert ein Argument."
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Konnte %s nicht als Datum oder Zeit interpretieren."
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Kann die Erzeugungszeit der Datei %s nicht ermitteln."
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr "Warnung: -%s %s wird keine Übereinstimmung finden, da es auf /. endet."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Der Modus %s ist ungültig wenn POSIXLY_CORRECT gesetzt ist."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "Ungültiger Modus %s."
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"Warnung: Eine Bezeichnung für Zugriffsrechte %s wurde angegeben, die "
+"mit /000 äquivalent ist.  Die Bedeutung von -perm /000 wurde jetzt geändert, "
+"um mit der Verwendung von -perm -000 konsistent zu sein.  Deshalb trifft es "
+"jetzt auf alle Dateien zu, vorher auf keine."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "\"-size\" erfordert ein Argument."
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "Ungültige Einheit \"%c\" für \"-size\"."
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Ungültiges Argument `%s%c' für -size."
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Die -show-control-chars Option erfordert entweder 'literal' oder 'safe' als "
+"Argument."
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Ungültiges Argument %s für -used."
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s ist ein unbekannter Nutzername."
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Die Option -user erfordert ein Argument."
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Aktivierte Eigenschaften:"
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "Ungültige Eigenschaft -context: SELinux isn nicht aktiviert."
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Das Argument von -type muss ein einzelner Buchstabe sein."
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Unbekanntes Argument von -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "Warnung: Unerkanntes Fluchtsymbol \"\\%c\"."
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "Fehler: %s am Ende der Formatzeichenkette."
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "Warnung: Unerkannte Formatanweisung \"%%%c\"."
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+"Fehler:  Die Formatanweisung `%%%c' ist für zukünftige Anwendungen "
+"reserviert."
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Das aktuelle Verzeichnis ist in der PATH Umgebungsvariable enthalten.  Dies "
+"ist bei der Verwendung des %s Kommandos von find unsicher. Entfernen Sie "
+"bitte das aktuelle Verzeichnis aus der $PATH Variable, indem \".\" oder "
+"führende oder abschließende Doppelpunkte gelöscht werden."
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Der relative Pfad %s ist in der PATH Umbebungsvariable enthalten.  Dies isr "
+"bei Verwendung der %s Aktion von find unsicher.  Entfernen Sie bitte diesen "
+"Eintrag aus $PATH."
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Innerhalb eines Kommandonames für -execdir und -okdir sollte {} nicht "
+"verwendet werden, da es ein mögliches Sicherheitsrisiko ist."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Es wird nur eine Verwendung von {} unterstützt mit -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Der benötigte Umgebungsspeicher ist für exec() zu groß."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "Überlauf beim Konvertieren von %s Tagen in deren Sekundenanzahl."
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "Überlauf beim Berechnen des Tagesendes."
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standard error"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standard output"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "Kann %s nicht löschen."
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr ""
+"Das Rückkehren zum Arbeitsverzeichnis war nach dem Suchen nach %s nicht mehr "
+"möglich."
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Warnung: Die Entstehungszeit der Datei %s ist nicht zu ermitteln."
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Kann die Standardausgabe nicht schließen."
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Konnte das Verzeichnis nicht wechseln."
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "Konnte keinen neuen Prozess starten."
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "Fehler beim Warten auf das Prozeßende von %s."
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "Prozeß %s wurde durch das Signal %d abgebrochen."
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "Ungültiger Ausdruck."
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"Ungültiger Ausdruck:  Ein binärer Operator '%s' wurde ohne Argument davor "
+"benutzt."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "Erwarte eine Ausdruck zwischen '%s' und ')'."
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "Erwarte eine Ausdruck nach '%s'."
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "Ungültiger Ausdruck; zu viele ')'."
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"Ungültiger Ausdruck:  Konnte ')' nicht finden.  Möglicherweise wird für '%s' "
+"ein zusätzliches Argument benötigt."
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "ungültiger Ausdruck; leere Klammern sind nicht erlaubt."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "ungültiger Ausdruck; ')' wird erwartet, aber nicht gefunden."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "Oops -- ungültiger Ausdruckstyp!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "Oops -- ungültiger Ausdruckstyp (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "Der Pfad muß vor dem Suchkriterium stehen: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "unbekannte Option `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "ungültige Option `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "Ungültiges Argument %s für \"%s\"."
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "Fehlendes Argument für \"%s\"."
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "zu viele ')'"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "ungültige zusätzliche Option `%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "Ungültige zusätzliche Option."
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "Oops -- Das automatische Einfügen von \"-and\" ist ungültig!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Aufruf: %s [-H] [-L] [-P] [-Olevel] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [Pfad...] [Suchkriterium]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "Konnte nicht zum übergeordneten Verzeichnis wechseln."
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "Konnte nicht zum übergeordneten Verzeichnis wechseln."
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Ignoriere unerkanntes Debugsymbol %s."
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Fehlendes Argument zur -D Option."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Auf die -O Option muss eine Ganzzahl folgen."
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Bitte eine Dezimalzahl unmittelbar nach -O angeben."
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Ungültige Optimierungsstufe %s."
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Die Optimierungsstufe %lu ist zu hoch.  Um schnell Dateien zu finden, ist "
+"GNU locate das bessere Werkzeug."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Die Umgebungsvariable FIND_BLOCK_SIZE wird nicht unterstützt.  Die einzige "
+"Variante die Blockgröße zu beeinflussen, ist die POSIXLY_CORRECT "
+"Umgebungsvariable."
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "Das Kommando ist zu lang."
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "Kann ein Argument nicht innerhalb der Argumentliste einfügen."
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "Die Argumentliste ist zu lang."
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Erzeugt mit der GNU gnulib Version %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Unerwartete Endung %s an %s."
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Erwartete eine Ganzzahl: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Unbekannter Typ %s für den regulären Ausdruck.  Gültige Typen sind %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Aufruf: %s [--version | --help]\n"
+"oder    %s most_common_bigrams < Dateiliste > Locate-Datenbank\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Fehler bitte an <bug-findutils@gnu.org> melden.\n"
+"Für die deutsche Übersetzung ist die Mailingliste <de@li.org> zuständig.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "Schreibfehler."
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Aufruf: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Schreiben auf die Standardausgabe gescheitert."
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "Tage"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Das Argument der Option --max-database-age darf nicht leer sein."
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Ungültiges Argument %s für --max-database-age."
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr "Die locate Datenbank %s enthält einen zu langen Dateinamen."
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "Die locate Datenbank %s ist beschädigt oder ungültig."
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Locate Datenbankgröße: %s byte\n"
+msgstr[1] "Locate Datenbankgröße: %s byte\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Zutreffende Dateinamen: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Alle Dateinamen: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Die Dateinamen haben eine gesamte Länge von %s Byte.\n"
+"Von diesen Dateinamen enthalten,\n"
+"\n"
+"\t%s Leerzeichen, \n"
+"\t%s Zeilenumbrüche, \n"
+"\tund %s enthalten Zeichen mit gesetztem hohen Bit.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Da einige Dateinamen ausgefiltert sein können, ist es nicht möglich, das "
+"Kompressionsverhältnis zu berechnen.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Kompressionsverhältnis %4.2f%% (höher ist besser)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Das Kompressionsverhältnis ist undefiniert.\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Die Datenbank %s liegt im %s Format vor.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Aufruf: %s [-d Pfad | --database=Pfad] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYP]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      Muster...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "Verzichten auf Gruppenprivilegien gescheitert."
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "Verzichten auf Setuidprivilegien gescheitert."
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Verzichten auf alle Privilegien gescheitert."
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "Verzichten auf Setgid Privilegien gescheitert."
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"Warnung: Die Locate Datenbank kann nur einmalig von stdin gelesen werden."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "Warnung: Die Datenbank %s ist älter als %d %s (Das Alter ist %.1f %s)."
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+"Warnung:  Die locate Datenbank %s wurde mit einer unterschiedlichen "
+"Bytefolge erzeugt."
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "Unerwartetes EOF in %s."
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "Fehler beim Lesen eines Worts von %s."
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "Der Umgebungsspeicher ist für \"exec\" nicht ausreichend."
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr "Warnung: Der Wert %ld für -s ist zu groß, verwende statt dessen %ld."
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Kann die Eingabedatei %s nicht öffnen."
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Die Umgebungsvariablen beanspruchen %<PRIuMAX> byte.\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "doppelte"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "einfache"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "Die Argumentzeile ist zu lang."
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "Fehler beim Warten auf das Ende des Kindsprozesses."
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "Prozeß %s mit Rückgabewert 255 beendet. Abbruch!"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "Prozeß %s wurde durch das Signal %d angehalten."
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "Prozeß %s wurde durch das Signal %d abgebrochen."
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: Ungültiger Wert für die \"-%c\" Option.\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: Der Wert für die \"-%c\" Option muß >= %ld sein.\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: Der Wert für die \"-%c\" Option muß kleiner als %ld sein.\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Aufruf: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=Begrenzer]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-Zeilen]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [Kommando [Argumente]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "Kann nicht in das aktuelle Verzeichnis wechseln."
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "Ungültiges Argument %s für \"%s\"."
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "Mehrdeutiges Argument %s für \"%s\"."
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Gültige Argumente sind:"
+
+#~ msgid "error closing file"
+#~ msgstr "Fehler beim Datei schließen."
+
+#~ msgid "Unknown system error"
+#~ msgstr "Unbekannter Systemfehler."
+
+#~ msgid "%s: option `%s' is ambiguous\n"
+#~ msgstr "%s: Die Option \"%s\" ist mehrdeutig.\n"
+
+#~ msgid "%s: option `--%s' doesn't allow an argument\n"
+#~ msgstr "%s: Die Option \"--%s\" erlaubt kein Argument.\n"
+
+#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: Die Option \"%c%s\" erlaubt kein Argument.\n"
+
+#~ msgid "%s: option `%s' requires an argument\n"
+#~ msgstr "%s: Die Option \"%s\" erfordert ein Argument.\n"
+
+#~ msgid "%s: unrecognized option `--%s'\n"
+#~ msgstr "%s: Unerkannte Option \"--%s\".\n"
+
+#~ msgid "%s: unrecognized option `%c%s'\n"
+#~ msgstr "%s: Unerkannte Option \"%c%s\".\n"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: Unerlaubte Option -- %c\n"
+
+#~ msgid "%s: invalid option -- %c\n"
+#~ msgstr "%s: Ungültige Option -- %c.\n"
+
+#~ msgid "%s: option requires an argument -- %c\n"
+#~ msgstr "%s: Die Option erfordert ein Argument -- %c.\n"
+
+#~ msgid "%s: option `-W %s' is ambiguous\n"
+#~ msgstr "%s: Die Option \"-W %s\" ist mehrdeutig.\n"
+
+#~ msgid "%s: option `-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: Die Option \"-W %s\" gestattet kein Argument.\n"
+
+#~ msgid "`"
+#~ msgstr "\""
+
+#~ msgid "'"
+#~ msgstr "\""
+
+#~ msgid "Success"
+#~ msgstr "Erfolg"
+
+#~ msgid "No match"
+#~ msgstr "Kein Treffer"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Ungültiger regulärer Ausdruck."
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Ungültiges Vergleichszeichen."
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Ungültiger Zeichenklassenname."
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Angehängter umgekehrter Schrägstrich."
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Ungültiger Rückbezug."
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Nicht korrespondierende [ oder [^."
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Nicht korrespondierende ( oder \\(."
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Nicht korrespondierende \\{."
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Ungültiger Inhalt von \\{\\}"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Ungültiges Bereichsende."
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Der Arbeitsspeicher ist erschöpft."
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Der vorhergehende reguläre Ausdruck ist ungültig."
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Der reguläre Ausdruck ist unfertig."
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Der reguläre Ausdruck ist zu lang."
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Fehlendes korrespondierendes ) oder \\)."
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Es fehlt ein vorhergehender regulärer Ausdruck."
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "Der Arbeitsspeicher ist erschöpft."
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "Ungültiges %s%s Argument `%s'."
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "Ungültiger Suffix im %s%s Argument `%s'."
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "%s%s Argument `%s' ist zu groß."
+
+#~ msgid "%1$s terminated by signal %2$d"
+#~ msgstr "Der Prozeß %1$s wurde durch das Signal %2$d abgebrochen."
+
+#~ msgid "block size"
+#~ msgstr "Blockgröße"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Optionsliste:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Auswertbaum:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Optimierter Auswertbaum:\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s wurde während des Ausführens von %s geändert."
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "Der virtuelle Arbeitsspeicher ist erschöpft."
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. wurde während des Ausführens von %s geändert."
+
+#~ msgid "error in %s: %s"
+#~ msgstr "Fehler in %s: %s."
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "  AUSDR1 -o AUSDR2   AUSDR1 -or AUSDR2   AUSDR1 , AUSDR2\n"
+#~ "Optionen (immer wahr): -daystart -depth -follow --help\n"
+#~ "      -maxdepth EBENEN -mindepth EBENEN -mount -noleaf --version -xdev\n"
+#~ "Tests (N kann +N, -N oder N sein): -amin N -anewer File -atime N -cmin N\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "Aktionen: -exec KOMMANDO ; -fprint DATEI -fprint0 DATEI -fprintf DATEI "
+#~ "FORMAT\n"
+#~ "          -ok KOMMANDO ; -print -print0 -printf FORMAT -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "Füge %s ein.\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "     Typ: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "links:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "rechts:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Normalisierter Auswertbaum:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Aufruf: %s [-d Pfad | --database=Pfad] [-e | --existing]\n"
+#~ "       [-i | --ignore-case] [--version] [--help] Suchmuster...\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate Version %s\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs Version %s\n"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "Fehlendes korrespondierendes %s Anführungszeichen."
diff --git a/po/el.gmo b/po/el.gmo
new file mode 100644 (file)
index 0000000..d618d9a
Binary files /dev/null and b/po/el.gmo differ
diff --git a/po/el.po b/po/el.po
new file mode 100644 (file)
index 0000000..d6b1b32
--- /dev/null
+++ b/po/el.po
@@ -0,0 +1,1428 @@
+# translation of findutils-4.2.6.po to Greek
+# This file is distributed under the same license as the findutils-4.2.6  package.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
+# Lefteris Dimitroulakis <edimitro@tee.gr>, 2004, 2005.
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils-4.2.6\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2005-01-02 13:54+0200\n"
+"Last-Translator: Lefteris Dimitroulakis <edimitro@tee.gr>\n"
+"Language-Team: Greek <nls@tux.hellug.gr>\n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.3.1\n"
+"Plural-Forms:  nplurals=2; plural=(n != 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Το σύστημα αρχείων %s αποπροσαρτήθηκε πρόσφατα."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Το σύστημα αρχείων %s έχει προσφάτως προσαρτηθεί."
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s άλλαξε κατά την εκτέλεση του %s (old device number %ld, new device "
+"number %ld, filesystem type is %s) [ref %ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s άλλαξε κατά την εκτέλεση του %s (παλαιός αριθμός inode %ld, νέος "
+"αριθμός inode %ld, ο τύπος συστήματος αρχείων είναι %s) [ref %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "άγνωστο"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"προειδοποίηση: έχεις ορίσει την επιλογή %s μετά το non-option όρισμα %s, "
+"αλλά η θέση έχει σημασία στις επιλογές (%s επιρρεάζει τα τεστ που ορίζονται  "
+"τόσο πριν όσο και μετά).  Παρακαλώ καθόρισε επιλογές πριν από άλλα "
+"ορίσματα.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"προειδοποίηση: η επιλογή -d έχει καταργηθεί, στη θέση της δώσε -depth που "
+"συμφωνεί με το POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"προεπιλεγμένη διαδρομή είναι ο τρέχων κατάλογος,\n"
+"προεπιλεγμένη έκφραση είναι η -print\n"
+"η έκφραση μπορεί ν' αποτελείται από:\n"
+"τελεστές (μειούμενης προτεραιότητας,\n"
+"ο -and υπονοείται όταν δεν δείνονται άλλοι):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2"
+
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"προεπιλεγμένη διαδρομή είναι ο τρέχων κατάλογος,\n"
+"προεπιλεγμένη έκφραση είναι η -print\n"
+"η έκφραση μπορεί ν' αποτελείται από:\n"
+"τελεστές (μειούμενης προτεραιότητας,\n"
+"ο -and υπονοείται όταν δεν δείνονται άλλοι):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2"
+
+#: find/parser.c:1234
+#, fuzzy
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"      EXPR1 -o EXPR2 EXPR1 -ή EXPR2 EXPR1 , EXPR2\n"
+"επιλογές θέσεως (πάντοτε αληθής): -daystart -follow\n"
+"κανονικές επιλογές (πάντοτε αληθής, οριζόμενη πριν από άλλες εκφράσεις): -"
+"depth\n"
+"      --help -maxdepth ΕΠΙΠΕΔΑ -mindepth ΕΠΙΠΕΔΑ -mount -noleaf --version -"
+"xdev\n"
+"      -ignore_readdir_race -noignore_readdir_race\n"
+"tests (N μπορεί νάναι +N ή -N ή N): -amin N -anewer ΑΡΧΕΙΟ -atime N -cmin N"
+
+#: find/parser.c:1239
+#, fuzzy
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"      -cnewer ΑΡΧΕΙΟ -ctime N -empty -false -fstype ΤΥΠΟΣ -gid N -group "
+"ΟΝΟΜΑ\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer ΑΡΧΕΙΟ"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user ΟΝΟΜΑ -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Αναφορές για σφάλματα (and track progress on fixing)\n"
+"μέσω της σελίδας findutils bug-reporting\n"
+"στο http://savannah.gnu.org/ ή, αν δεν έχεις πρόσβαση στο web,\n"
+"αποστέλοντας μήνυμα στη διεύθυνση <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "η συνάρτηση βιβλιοθήκης fnmatch(), δεν πέρασε τον έλεγχο ακεραιότητος."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: η επιλογή «%s» απαιτεί όρισμα\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "άκυρη κατάσταση «%s»"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "το όρισμα null είναι άκυρο για την επιλογή -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "Ο τύπος «%c» για την επιλογή -size είναι άκυρος"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Το όρισμα %s δεν είναι έγκυρο για την %s"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "προειδοποίηση: μη αναγνωριζόμενη ακολουθία διαφυγής «\\%c»"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "προειδοποίηση: άγνωστη οδηγία μορφοποίησης «%%%c»"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "το περιβάλλον είναι πολύ μεγάλο γιά την εκτέλεση"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "Δεν μπορώ να κλωνοποιήσω"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "σφάλμα περιμένοντας γιά %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s τερματίστηκε από το σήμα %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "άκυρη έκφραση"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, fuzzy, c-format
+msgid "expected an expression after '%s'"
+msgstr "μη αναμενόμενο extra κατηγόρημα"
+
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "άκυρη έκφραση"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "oops -- άκυρος τύπος έκφρασης!"
+
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "oops -- άκυρος τύπος έκφρασης!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "οι διαδρομές πρέπει να προηγούνται των εκφράσεων"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "το κατηγόρημα «%s» είναι άκυρο"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "το κατηγόρημα «%s» είναι άκυρο"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "Το όρισμα για την «%s» απουσιάζει"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "μη αναμενόμενο extra κατηγόρημα"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "μη αναμενόμενο extra κατηγόρημα"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "oops -- η παρεμβολή της προεπιλεγμένης παραμέτρου «and» είναι άκυρη!"
+
+#: find/util.c:171
+#, fuzzy, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Χρήση: %s [-H] [-L] [-P] [διαδρομή...] έκφραση]\n"
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Χρήση: %s [διαδρομή...] [έκφραση]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "προειδοποίηση: μη αναγνωριζόμενη ακολουθία διαφυγής «\\%c»"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Η μεταβλητή περιβάλλοντος FIND_BLOCK_SIZE δεν υποστηρίζεται, αυτό που "
+"επιρρεάζει το μέγεθος μπλοκ είναι η μεταβλητή περιβάλλοντος POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "διαταγή πολύ μεγάλη"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"δεν μπορώ να περιλάβω μοναδικό όρισμα μέσα\n"
+"στο περιορισμένο μέγεθος της λίστας ορισμάτων"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "λίστα ορισμάτων πολύ μεγάλη"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU findutils έκδοση %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "μη αναμενόμενο extra κατηγόρημα"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Χρήση: %s [--version | --help]\n"
+"ή     %s most_common_bigrams < file-list > locate-database\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Αναφορά σφαλμάτων στην <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "μέρες"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Το όρισμα %s δεν είναι έγκυρο για την %s"
+
+#: locate/locate.c:468
+#, fuzzy, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"προειδοποίη: η διαδρομή «%s» της βάσεως δεδομένων locate περιέχει στην αρχή "
+"της της ένα δίστιγμο που δεν αποτελεί έγκυρο όνομα της βάσεως"
+
+#: locate/locate.c:603
+#, fuzzy, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "η βάση δεδομένων locate  «%s» δεν είναι έγκυρη ή έχει υποστεί αλλοίωση"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, fuzzy, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "η βάση δεδομένων locate  «%s» δεν είναι έγκυρη ή έχει υποστεί αλλοίωση"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "προειδοποίηση: η βάση δεδομένων «%s» είναι περισσότερο από %d %s παλιά"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "σφάλμα περιμένοντας γιά %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "το περιβάλλον είναι πολύ μεγάλο γιά την εκτέλεση"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Οι μεταβλητές περιβάλλοντος καταλαμβάνουν %ld bytes\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Άνω και κάτω όριο κατά POSIX για μήκος ορίσματος: %ld, %ld\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr "Άνω και κάτω όριο κατά POSIX για μήκος ορίσματος: %ld, %ld\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Μέγιστο μήκος εντολής που θα μπορούσαμε να χρησιμοποιήσουμε: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Μέγεθος του buffer εντολών που χρησιμοποιούμε: %ld\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"unmatched %s quote; εκ προεπιλογής τα εισαγωγικά έχουν ειδική σημασία για το "
+"xargs εκτός κι αν χρησιμοπείτε την επιλογή -0."
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "διπλά"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "μονά"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "γραμμή ορισμάτων πολύ μεγάλη"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "σφάλμα αναμένοντας τη θυγατρική διεργασία"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: τερματίστηκε με ένδειξη 255, απότομο σταμάτημα"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: σταμάτησε από το σήμα %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: τερματίστηκε από το σήμα  %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: άκυρος αριθμός γιά την επιλογή -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s:η τιμή για την επιλογή -%c πρέπει να είναι >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: η τιμή για την επιλογή -%c πρέπει να είναι < %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Χρήση: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-lines]]\n"
+"       [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-"
+"str]]\n"
+"       [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n"
+"       [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n"
+"       [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n"
+"       [command [initial-arguments]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "Το όρισμα %s δεν είναι έγκυρο για την %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "Το όρισμα %s είναι ασαφές για την %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Έγκυρα ορίσματα είναι:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Αγνωστο σφάλμα συστήματος"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: η επιλογή «%s» είναι ασαφής\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: η επιλογή «--%s» δεν επιτρέπει όρισμα\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: η επιλογή «%c%s» δεν επιτρέπει όρισμα\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: η επιλογή «%s» απαιτεί όρισμα\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: μη αναγνωριζόμενη επιλογή «--%s»\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: μη αναγνωριζόμενη επιλογή «%c%s»\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: άκυρη επιλογή -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: η επιλογή απαιτεί όρισμα -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: η επιλογή «-W %s» είναι ασαφής\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: η επιλογή «-W %s» δεν επιτρέπει όρισμα\n"
+
+#~ msgid "`"
+#~ msgstr "«"
+
+#~ msgid "'"
+#~ msgstr "»"
+
+#~ msgid "Success"
+#~ msgstr "Επιτυχία"
+
+#~ msgid "No match"
+#~ msgstr "Δεν υπάρχει ταίριασμα"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Άκυρη κανονική έκφραση"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Άκυρος χαρακτήρας διαταξινόμησης"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Άκυρο όνομα κλάσεως χαρακτήρα"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Αντιπλαγία στο τέλος"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Άκυρη παραπομπή προς τα πίσω"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Δε βρέθηκε [ ή [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Δε βρέθηκε ( ή \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Δε βρέθηκε \\{"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Το περιεχόμενο του \\{\\} είναι άκυρο"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Ακυρο τέλος περιοχής"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Μνήμη εξαντλημένη"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Η προηγούμενη κανονική έκφραση είναι άκυρη"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Πρόωρο τέλος κανονικής έκφρασης"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Πολύ μεγάλη κανονική έκφραση"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Δε βρέθηκε ) ή \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Δεν προηγήθηκε κανονική έκφραση"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#, fuzzy
+#~ msgid "memory exhausted"
+#~ msgstr "Μνήμη εξαντλημένη"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "λίστα ορισμάτων πολύ μεγάλη"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: παράτυπη επιλογή -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "μέγεθος μπλόκ"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Λίστα κατηγορημάτων:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Δέντρο αξιολόγησης:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Βελτιστοποιημένο δέντρο αξιολόγησης:\n"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "η εικονική μνήμη εξαντλήθηκε"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "σφάλμα στο %s: %s"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+#~ msgstr ""
+#~ "ενέργειες: -exec ΕΝΤΟΛΗ ; -fprint ΑΡΧΕΙΟ -fprint0 ΑΡΧΕΙΟ -fprintf ΑΡΧΕΙΟ "
+#~ "ΜΟΡΦΗ\n"
+#~ "      -fls ΑΡΧΕΙΟ -ok ΕΝΤΟΛΗ ; -print -print0 -printf ΜΟΡΦΗ -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "προειδοποίηση: το κατηγόρημα -ipath είναι υπό κατάργηση· παρακαλώ "
+#~ "χρησιμοποείστε στη θέση του το -iwholename."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find έκδοση %s\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "παρεμβολή του %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    τύπος: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "αριστερό:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "δεξιό:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Κανονικοποιημένο δέντρο αξιολόγησης:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n"
+#~ "      [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Χρήση: %s [-d διαδρομή | --database=διαδρομή] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n"
+#~ "      [--version] [--help] pattern...\n"
+
+#~ msgid ""
+#~ "warning: locate database path `%s' contains a trailing colon, which is "
+#~ "not a valid database name"
+#~ msgstr ""
+#~ "προειδοποίη: η διαδρομή «%s» της βάσεως δεδομένων locate περιέχει στο "
+#~ "τέλος της ένα δίστιγμο που δεν αποτελεί έγκυρο όνομα της βάσεως"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate έκδοση %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "όρισμα επιλογής --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs έκδοση %s\n"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Μείωση του arg_max (%ld) σε arg_size (%ld)\n"
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
new file mode 100644 (file)
index 0000000..fedb6a0
--- /dev/null
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/po/en@quot.header b/po/en@quot.header
new file mode 100644 (file)
index 0000000..a9647fc
--- /dev/null
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/po/eo.gmo b/po/eo.gmo
new file mode 100644 (file)
index 0000000..8574ce3
Binary files /dev/null and b/po/eo.gmo differ
diff --git a/po/eo.po b/po/eo.po
new file mode 100644 (file)
index 0000000..5989eaa
--- /dev/null
+++ b/po/eo.po
@@ -0,0 +1,1387 @@
+# Esperanto translations for findutils messages
+# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc.
+# D. Dale Gulledge <dsplat@rochester.rr.com>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.1.20\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2004-01-04 15:27-0500\n"
+"Last-Translator: D. Dale Gulledge <dsplat@rochester.rr.com>\n"
+"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
+"Language: eo\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-3\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "ne povas preni aktualan dosierujon"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "ne povas preni aktualan dosierujon"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "nekonata"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "ne povas preni aktualan dosierujon"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"defaýlta pado estas la aktuala dosierujo; defaýlta esprimo estas -print\n"
+"esprimo povas konsisti de:\n"
+"operatoroj (en ordo de malpliiøanta antaýeco; -and estas implicita kie "
+"neniuj\n"
+"aliaj estas donitaj):\n"
+"      ( ESPR ) ! ESPR -not ESPR ESPR1 -a ESPR2 ESPR1 -and ESPR2\n"
+
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"defaýlta pado estas la aktuala dosierujo; defaýlta esprimo estas -print\n"
+"esprimo povas konsisti de:\n"
+"operatoroj (en ordo de malpliiøanta antaýeco; -and estas implicita kie "
+"neniuj\n"
+"aliaj estas donitaj):\n"
+"      ( ESPR ) ! ESPR -not ESPR ESPR1 -a ESPR2 ESPR1 -and ESPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+
+#: find/parser.c:1239
+#, fuzzy
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"      -cnewer DOSIERO -ctime N -empty -false -fstype SPECO -gid N -group "
+"NOMO\n"
+"      -ilname ÞABLONO -iname ÞABLONO -inum N -ipath ÞABLONO -iregex ÞABLONO\n"
+"      -links N -lname ÞABLONO -mmin N -mtime N -name ÞABLONO -newer DOSIERO\n"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path ÞABLONO -perm [+-]REØIMO -regex ÞABLONO\n"
+"      -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NOMO\n"
+"      -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: opcio `%s' postulas argumenton\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "malvalida reøimo `%s'"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "malvalida senvalora argumento por -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "malvalida -size speco `%c'"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "malvalida argumento `%s'por `%s'"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "malvalida argumento %s por %s"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "averto: nerekonata eskapsigno `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "averto: nerekonata formatdirektivo `%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "medio estas tro granda por exec"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "ne povas preni aktualan dosierujon"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "ne povas forki"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "eraro atendante por %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s æesigita per signalo %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "malvalida esprimo"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr ""
+
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "malvalida esprimo"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "up -- malvalida esprimospeco!"
+
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "up -- malvalida esprimospeco!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "padoj devas esti antaý ol esprimo"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "malvalida predikato `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "malvalida predikato `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "malvalida argumento `%s'por `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "mankas argumento por `%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "malvalida predikato `%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "up -- malvalida defaýlta enþovado de ``and'' (kaj)!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr ""
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Uzado: %s [pado...] [esprimo]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "ne povas preni aktualan dosierujon"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "ne povas preni aktualan dosierujon"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "averto: nerekonata eskapsigno `\\%c'"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "ordono tro longa"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "argumentlista grandecolimo estas tro malgranda por eæ sola argumento"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "argumentlisto tro longa"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU find versio %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr ""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr "Uzado: %s plej_oftaj_dusigna¼oj < listo > kodita_listo\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+#, fuzzy
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Raportu cimoj al <bug-findutils@gnu.org> (bonvolu angle)."
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "tagoj"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "malvalida argumento %s por %s"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr ""
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "averto: datumbazo `%s'estas pli aøa ol %d %s"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "eraro atendante por %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "medio estas tro granda por exec"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr ""
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "duobla"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "unuobla"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "argumentlinio tro longa"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "eraro atendante ida proceso"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: finis kun stato 255; æesanta"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: haltigita per signalo %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: æesigita per signalo %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: malvalida nombro por -%c opcio\n"
+
+#: xargs/xargs.c:1476
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: valoro de -%c opcio devas esti >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: valoro de -%c opcio devas esti < %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Uzado: %s [-0prtx] [-e[dosierfina-æeno]] [-i[anstataýa-æeno]]\n"
+"       [-l[maksimumo-da-linioj]] [-n maksimumo-da-argumentoj]\n"
+"       [-s maksimumo-da-signoj] [-P maksimumo-da-procesoj] [--null]\n"
+"       [--eof[=dosierfina-æeno]] [--replace[=anstataýa-æeno]]\n"
+"       [--max-lines[=maksimumo-da-linioj]] [--interactive]\n"
+"       [--max-chars=maksimumo-da-signoj] [--verbose] [--exit]\n"
+"       [--max-procs=maksimumo-da-procesoj] [--max-args=maksimumo-da-"
+"argumentoj]\n"
+"       [--no-run-if-empty] [--version] [--help] [ordono [komencaj-"
+"argumentoj]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "ne povas preni aktualan dosierujon"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "malvalida argumento %s por %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "plursenca argumento %s por %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Validaj argumentoj estas:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Nekonata sistemeraro"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: opcio `%s' estas plursenca\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: opcio `--%s' ne permesas argumenton\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: opcio `%c%s' ne permesas argumenton\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: opcio `%s' postulas argumenton\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: nerekonata opcio `--%s'\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: nerekonata opcio `%c%s'\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: malvalida opcio -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: opcio postulas argumenton -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: opcio `-W %s' estas plursenca\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: opcio `-W %s' malpermesas argumenton\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "Sukceso"
+
+#~ msgid "No match"
+#~ msgstr "Neniu kongrua¼o"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Malvalida regula esprimo"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Malvalida ordiza signo"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Malvalida signoklasnomo"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Sekvanta retroklino"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Malvalida retroreferenco"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Senpara [ aý [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Senpara ( aý \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Senpara \\{"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Malvalida enhava¼o de \\{\\}"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Malvalida intervalofino"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Memoro elæerpita"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Malvalida antaýa regulesprimo"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Tro frua fino de regulesprimo"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Regulesprimo tro granda"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Senpara ) aý \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Neniu antaýa regulesprimo"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[jJ]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "memoro elæerpita"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "malvalida argumento `%s'por `%s'"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "malvalida argumento `%s'por `%s'"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "argumentlisto tro longa"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: malpermesata opcio -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "blokgrandeco"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Predikatolisto:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Arbo de Elvalorado:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Optimumigita Arbo de Elvalorado:\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s þanøis dum plumumado de %s"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "virtuala memoro elæerpita"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. þanøis dum plumumado de %s"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "eraro en %s: %s"
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "      ESPR1 -o ESPR2 ESPR1 -or ESPR2 ESPR1 , ESPR2\n"
+#~ "opcioj (æiam vera): -daystart -depth -follow --help\n"
+#~ "      -maxdepth NIVELOJ -mindepth NIVELOJ -mount -noleaf --version -xdev\n"
+#~ "provoj (N povas esti +N aý -N aý N): -amin N -anewer DOSIERO -atime N -"
+#~ "cmin N\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "agoj: -exec ORDONO ; -fprint DOSIERO -fprint0 DOSIERO -fprintf DOSIERO "
+#~ "FORMATO\n"
+#~ "      -ok ORDONO ; -print -print0 -printf FORMATO -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "enþovas %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    speco: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "maldekstre:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "dekstre:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Nomigita Arbo de Elvalorado:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Uzado: %s [-d pado | --database=pado] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] þablono...\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate versio %s\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs versio %s\n"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "senpara %s citilo"
diff --git a/po/es.gmo b/po/es.gmo
new file mode 100644 (file)
index 0000000..a80ea45
Binary files /dev/null and b/po/es.gmo differ
diff --git a/po/es.po b/po/es.po
new file mode 100644 (file)
index 0000000..8c422e8
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,1678 @@
+# Mensajes en español para GNU findutils.
+# Copyright (C) 1996, 2001, 2004, 2010 Free Software Foundation, Inc.
+# Iñaky Pérez González <inaky@peloncho.fis.ucm.es>, 1996.
+# Santiago Vila Doncel <sanvila@unex.es>, 2001, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU findutils 4.2.6\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2004-12-23 16:57+0100\n"
+"Last-Translator: Santiago Vila Doncel <sanvila@unex.es>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "no se puede obtener el directorio actual"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "El sistema de ficheros %s ha sido desmontado recientemente."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "El sistema de ficheros %s ha sido montado recientemente."
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s ha cambiado durante la ejecución de %s (número de dispositivo antiguo "
+"%ld,\n"
+"número de dispositivo nuevo %ld, el tipo de sistema de ficheros es %s [ref "
+"%ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s ha cambiado durante la ejecución de %s (número de nodo-i antiguo %ld,\n"
+"número de nodo-i nuevo %ld, tipo de sistema de ficheros %s) [ref %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "no se puede volver al directorio de partida"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "desconocido"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "no se puede volver al directorio de partida"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"atención: ha especificado la opción %s después de un argumento %s que no\n"
+"es una opción, pero las opciones no son de posición (%s afecta tanto a\n"
+"las evaluaciones especificadas antes de él como a las especificadas\n"
+"después). Por favor especifique las opciones antes de otros argumentos.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"atención: la opción -d está obsoleta; por favor utilice -depth en su lugar,\n"
+"ya que se trata de una característica que cumple con POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+# sugerencia: si no se dan -> si no hay otros. sv
+#
+# No, aquí creo que no vale, ya que es "si no das operadores", esto
+# es, si no das ninguno, no que no haya otros. Se refiere al caso
+# de que no se dé un operador entre dos `sentencias' (además claro
+# de que sólo se puede dar uno).
+#
+# Bueno, el plural ("others") del original tiene un sentido "respectivo",
+# Quiere decir que si en cada sitio donde puedes poner un operador o no
+# ponerlo, no pones uno que sea distinto de -and, se supone -and.
+# Obviamente para poner otro que no sea -and tienes que poner alguno...
+# La única diferencia, yo creo, es que según el original, si pones -and,
+# no le hace caso, y toma el operador por defecto, que vuelve a ser -and
+# ¡Mira que son retorcidos! :-) sv
+#
+# Bueno, déjalo así si quieres, pero fíjate en lo soso que queda el "dan",
+# queda a mil kilómetros de la palabra "operadores" (me refiero a lo lejos
+# que están el verbo y el objeto directo, me suena un poco rarillo).
+# Parece que es "si no se dan de tortas". sv
+#
+# Sugerencia: "se supone -and si no se da ningún operador"
+# o mejor "si no se da ninguno". sv
+#
+# Lo dejo así. ipg
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"la ruta de acceso por defecto es el directorio actual; la expresión por\n"
+"defecto es -print\n"
+"la expresión puede ser:\n"
+"operadores (prioridad decreciente; se supone -and si no se dan):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2"
+
+# sugerencia: si no se dan -> si no hay otros. sv
+#
+# No, aquí creo que no vale, ya que es "si no das operadores", esto
+# es, si no das ninguno, no que no haya otros. Se refiere al caso
+# de que no se dé un operador entre dos `sentencias' (además claro
+# de que sólo se puede dar uno).
+#
+# Bueno, el plural ("others") del original tiene un sentido "respectivo",
+# Quiere decir que si en cada sitio donde puedes poner un operador o no
+# ponerlo, no pones uno que sea distinto de -and, se supone -and.
+# Obviamente para poner otro que no sea -and tienes que poner alguno...
+# La única diferencia, yo creo, es que según el original, si pones -and,
+# no le hace caso, y toma el operador por defecto, que vuelve a ser -and
+# ¡Mira que son retorcidos! :-) sv
+#
+# Bueno, déjalo así si quieres, pero fíjate en lo soso que queda el "dan",
+# queda a mil kilómetros de la palabra "operadores" (me refiero a lo lejos
+# que están el verbo y el objeto directo, me suena un poco rarillo).
+# Parece que es "si no se dan de tortas". sv
+#
+# Sugerencia: "se supone -and si no se da ningún operador"
+# o mejor "si no se da ninguno". sv
+#
+# Lo dejo así. ipg
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"la ruta de acceso por defecto es el directorio actual; la expresión por\n"
+"defecto es -print\n"
+"la expresión puede ser:\n"
+"operadores (prioridad decreciente; se supone -and si no se dan):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2"
+
+#: find/parser.c:1234
+#, fuzzy
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+"opciones de posición (siempre verdaderas): -daystart -follow\n"
+"opciones normales (siempre verdaderas, se ponen después de otras "
+"expresiones):\n"
+"        -depth --help -maxdepth NIVELES -mindepth NIVELES -mount -noleaf\n"
+"        --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+"evaluaciones (N puede ser +N, -N o N): -amin N -anewer FICHERO -atime N\n"
+"                                       -cmin N"
+
+# FIXME: ¿Cómo traducir pattern? Plantilla queda de pena; he dejado EXPR-REG,
+#        a ver si cuela. IPG
+#        Consulto mi "Libro gordo de Petete metido a hacker" (uséase, mi madre)
+#        y dice que ella en todos los libros de UNIX ha visto que se le llama
+#        expresión regular, y que le parece el término más adecuado (cosa
+#        que a mí también). Me inclino por su experiencia (que para algo es
+#        una telekita que lleva desarrollando en UN*X desde que lo inventaron)
+#        y usaré esta traducción, hasta que salga una que parezca mejor. IPG
+#
+#        También me han sugerido `patrón', pero prefiero EXPR-REG. IPG
+#
+#: find/parser.c:1239
+#, fuzzy
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"      -cnewer FICHERO -ctime N -empty -false -fstype TIPO -gid N\n"
+"      -group NOMBRE -ilname EXPR-REG -iname EXPR-REG -inum N\n"
+"      -iwholename EXPR-REG -iregex EXPR-REG -links N -lname EXPR-REG\n"
+"      -mmin N -mtime N -name EXPR-REG -newer FICHERO"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path EXPR-REG -perm [+-]MODO -regex EXPR-REG\n"
+"      -wholename EXPR-REG -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NOMBRE -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Informe sobre bichos (y siga el progreso de su corrección) a través de la\n"
+"página de comunicación de bichos en http://savannah.gnu.org/ o bien, si no\n"
+"tiene acceso a web, enviando un mensaje a <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+"la comprobación de adecuación de la función de biblioteca fnmatch() falló."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: la opción `%s' necesita un argumento\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "modo inválido `%s'"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+# Nota: No es que no se haya dado el argumento requerido a la opción -size,
+# sino que se ha dado un argumento nulo, que es distinto.
+# Para ver la sutil diferencia, poner LANG=C y comparar esto:
+#
+# find . -size
+#
+# con esto otro:
+#
+# find . -size ""
+#
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "argumento nulo inválido para la opción -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "tipo dado a -size inválido `%c'"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "argumento `%s' inválido para la opción `%s'"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "argumento %s inválido para %s"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "atención: secuencia de escape `\\%c' no reconocida"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "atención: directiva de formato `%%%c' no reconocida"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "el entorno es demasiado grande para exec"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "no se puede volver al directorio de partida"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, fuzzy, c-format
+msgid "Failed to change directory"
+msgstr "no se puede volver al directorio de partida"
+
+# FIXME: ¿¿¿??? ¡¡¿¿Y cómo leches traduzco yo esto??!!  IPG
+#        Después de que me hayan llamado de todo por intentar traducir
+#        una llamada al sistema ;) sigo pensando que este mensaje es
+#        más claro e informativo que el original (de hecho, es un
+#        pelín más largo y no exige saber tanto UNIX ...) IPG
+#
+# Esto me parece muy muy muy largo.
+# Sugerencia: "No se puede ejecutar fork". sv
+# E insisto: Si no eres experto en programación Unix lo mismo te da
+# "duplicar un proceso" que "fork".
+# De hecho, yo todavía no sé lo que es (ninguna de las dos cosas). sv
+#
+# ¡¡Otia!! Eso es grave ... fork() es la llamada al sistema que se usa
+# para duplicar un programa en dos idénticos, pero con distinto PID.
+# Una vez que vuelve, en el padre devuelve el PID del hijo, y en el
+# hijo, cero. El hijo entonces lo detecta y una de dos, o sigue, o
+# ejecuta otro programa con exec() (que solapa todo el espacio del
+# proceso con el del nuevo programa). Prefiero dejar la explicación
+# larga, en beneficio de gente como tú :) ipg
+#
+# Vale, pues ahora te digo:
+#
+# 1. Nada de lo anterior es evidente con la simple vista de
+#    la frase "se duplica el proceso".
+# 2. Ahora que ya me lo has explicado, lo mismo me da que me pongas
+# exclusivamente lo de fork() a que me pongas la larga parrafada que
+# tienes en este momento. sv
+#
+# ¿Ves por qué no me acaba de gustar? sv
+#
+# Nota: Jim Meyering tenía en fileutils un mensaje parecido a este, que al
+# final conseguimos (Ulises y yo) que lo cambiara por
+# msgid "fork system call failed"
+#  que yo traduje así:
+# msgstr "falló la llamada al sistema `fork'"
+# ¿Qué te parece?
+#
+# Al fin y al cabo es la coletilla que tengo yo al final de mi
+# comentario, ¿no? Me parece lo mismo, má o meno, pero por no meternos
+# en darle caña y acabar ya esto de una vez :) ...
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "falló la llamada al sistema `fork()'"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "error esperando al proceso %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s terminado por la señal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "expresión inválida"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, fuzzy, c-format
+msgid "expected an expression after '%s'"
+msgstr "predicado extra inesperado"
+
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "expresión inválida"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+# Creo que la traducción ideal de oops sería ¡huy! sv
+# Y si no: ¿A algún español le has visto que diga "oops"?
+#
+# Si :) Todas las mañanas en el espejo. De todas maneras,
+# `¡huy!' creo que no expresa exactamente el `indicar que
+# parece que hay un problema' ... yo creo que quedaría
+# mejor `oh, oh' (Rainman ... :). ipg
+#
+# Pero si después del huy te dicen que la expresión no es válida, está
+# claro que había un problema...
+# Ya, pero puestos, casi podríamos buscar una expresión común para
+# los `oops'
+# Pon `oh, oh', si crees que es lo apropiado.
+# Lo decía más que nada por no dejarlo en inglés siendo el español
+# tan rico y variado para las interjecciones.
+# (Y me consta que tú sabes bastante de esto :-)
+# ¡¡Carajo!! ¿yo?. Voy a dejar `oh, oh', y si a la gente le gusta
+# (a mí me parece coñero), lo dejamos, y si no, ponemos `huy'. ipg
+# Vale. sv
+#
+# Aquí también tengo pensado hacer publicidad ;-) sv
+#
+# Aparte de lo anterior. Si vas a dejar "oh, oh", ¿no sería mejor
+# ponerlo sin tantas exclamaciones? (no me pegan)
+#
+# Ok. ipg
+#
+# Pero yo decía al revés... (como en el original).
+# Lo cambio. sv
+# E incluso si te parece, no ponemos ninguna exclamación en ninguno
+# de los dos sitios.
+# (Donde menos me pegan es en el "oh, oh", parece cosa de Papá Noel...). sv
+#
+# Será por las fechas ... ;) ok, claudico. ipg
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "oh, oh -- ¡tipo de expresión inválido!"
+
+# Creo que la traducción ideal de oops sería ¡huy! sv
+# Y si no: ¿A algún español le has visto que diga "oops"?
+#
+# Si :) Todas las mañanas en el espejo. De todas maneras,
+# `¡huy!' creo que no expresa exactamente el `indicar que
+# parece que hay un problema' ... yo creo que quedaría
+# mejor `oh, oh' (Rainman ... :). ipg
+#
+# Pero si después del huy te dicen que la expresión no es válida, está
+# claro que había un problema...
+# Ya, pero puestos, casi podríamos buscar una expresión común para
+# los `oops'
+# Pon `oh, oh', si crees que es lo apropiado.
+# Lo decía más que nada por no dejarlo en inglés siendo el español
+# tan rico y variado para las interjecciones.
+# (Y me consta que tú sabes bastante de esto :-)
+# ¡¡Carajo!! ¿yo?. Voy a dejar `oh, oh', y si a la gente le gusta
+# (a mí me parece coñero), lo dejamos, y si no, ponemos `huy'. ipg
+# Vale. sv
+#
+# Aquí también tengo pensado hacer publicidad ;-) sv
+#
+# Aparte de lo anterior. Si vas a dejar "oh, oh", ¿no sería mejor
+# ponerlo sin tantas exclamaciones? (no me pegan)
+#
+# Ok. ipg
+#
+# Pero yo decía al revés... (como en el original).
+# Lo cambio. sv
+# E incluso si te parece, no ponemos ninguna exclamación en ninguno
+# de los dos sitios.
+# (Donde menos me pegan es en el "oh, oh", parece cosa de Papá Noel...). sv
+#
+# Será por las fechas ... ;) ok, claudico. ipg
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "oh, oh -- ¡tipo de expresión inválido!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "Las rutas-de-acceso deben preceder la expresión"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "predicado inválido `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "predicado inválido `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "argumento `%s' inválido para la opción `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "falta el argumento de `%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "predicado extra inesperado"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "predicado extra inesperado"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "oh, oh -- ¡inserción por defecto de `and' inválida!"
+
+#  ¿Cómo traducir "path"? Me inclino por ahora por camino, pero quizá sería
+#  más mejor que bueno poner directorio o algo así. IPG
+#  ¡Olé! Gracias a tos los de es@li.org que me habeis dado "ruta de acceso".
+#  No se qué significado tendría mi vida sin vuestra ayuda ;), snif ... :~)
+#  IPG
+#: find/util.c:171
+#, fuzzy, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Modo de empleo: %s [-H] [-L] [-P] [ruta-de-acceso...] [expresión]\n"
+
+#  ¿Cómo traducir "path"? Me inclino por ahora por camino, pero quizá sería
+#  más mejor que bueno poner directorio o algo así. IPG
+#  ¡Olé! Gracias a tos los de es@li.org que me habeis dado "ruta de acceso".
+#  No se qué significado tendría mi vida sin vuestra ayuda ;), snif ... :~)
+#  IPG
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Modo de empleo: %s [ruta-de-acceso...] [expresión]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "no se puede obtener el directorio actual"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "no se puede obtener el directorio actual"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "atención: secuencia de escape `\\%c' no reconocida"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"La variable de entorno FIND_BLOCK_SIZE no está soportada, lo único que\n"
+"afecta al tamaño del bloque es la variable de entorno POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "orden demasiado larga"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"Un argumento no cabe dentro del tamaño límite de la lista de argumentos"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "lista de argumentos demasiado larga"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU findutils versión %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "predicado extra inesperado"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Modo de empleo: %s [--version | --help]\n"
+"o bien  %s bigramas_más_comunes < lista-de-ficheros > base-de-datos-de-"
+"locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Comunicar bichos a <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "días"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "argumento %s inválido para %s"
+
+#: locate/locate.c:468
+#, fuzzy, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"atención: la ruta de acceso de la base de datos de locate `%s' comienza\n"
+"por dos puntos, no es un nombre válido de base de datos"
+
+#: locate/locate.c:603
+#, fuzzy, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "la base de datos de locate `%s' está corrupta o es inválida"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, fuzzy, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "la base de datos de locate `%s' está corrupta o es inválida"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "atención: la base de datos `%s' tiene una antigüedad de más de %d %s"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "error esperando al proceso %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "el entorno es demasiado grande para exec"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Las variables de entorno ocupan %ld bytes\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+"Límites POSIX inferior y superior sobre la longitud del argumento: %ld, %ld\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Límites POSIX inferior y superior sobre la longitud del argumento: %ld, %ld\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Máxima longitud de orden que se podría usar realmente: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Tamaño del búfer de órdenes que se está usando realmente: %ld\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"comilla %s desemparejada; por omisión las comillas son especiales para "
+"xargs\n"
+"a menos que utilice la opción -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "doble"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "simple"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "línea de argumentos demasiado larga"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "error esperando al proceso hijo"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+# Pregunta (no es por crear polémica): ¿"status" o "estado"? sv
+#
+# "Estado", aunque también existe "status". ¿Dejamos "status"? ipg
+#
+# No sé, si se refiere a lo que en MS-DOG se llama ERRORLEVEL,
+# y al resultado numérico que devuelve el main() del proceso, la
+# pregunta sería: ¿cómo se le llama a eso en español? sv
+#
+# Creo que podríamos dejar `status', ya que existe en castellano,
+#  (Nota: Ver http://www.anaya.es/dict por ejemplo).
+# y expresa un estado de actividad, siendo más preciso que `estado'
+# (¡ahora, que el/la que lo confunda con el Estado Español, es pa
+# matal-le! :). ipg
+#
+# Me quedo con la duda de cómo se llama eso en español.
+# Esperemos que lo vea otro. sv
+#
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: acabó con status 255; abortando"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: interrumpido por la señal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: terminado por la señal %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: número inválido para la opción -%c\n"
+
+# Me he tomado la libertad de poner mayor o igual que en lugar de >= ...
+# queda mucho mejor. Si a alguien no le gusta, que me lo diga ;). IPG
+# Me parece acertado y lo digo :-) sv
+# falen ... :) ... ipg
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: el valor para la opción -%c debería ser mayor o igual que %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: el valor para la opción -%c debería ser menor que %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Modo de empleo: %s [-0prtx] [-e[cadena-eof]] [-i[cadena-de-reemplazo]]\n"
+"       [-l[máx-líneas]] [-n máx-argumentos] [-s máx-caracteres]\n"
+"       [-P máx-procesos] [--null] [--eof[=cadena-eof]]\n"
+"       [--replace[=cadena-de-reemplazo]] [--max-lines[=máx-líneas]]\n"
+"       [--interactive] [--max-chars=máx-caracteres] [--verbose] [--exit]\n"
+"       [--max-procs=máx-procesos] [--max-args=máx-argumentos]\n"
+"       [--no-run-if-empty] [--version] [--help]\n"
+"       [orden [argumentos-iniciales]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "no se puede obtener el directorio actual"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "argumento %s inválido para %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "argumento %s ambiguo para %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Los argumentos válidos son:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Error del sistema desconocido"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: la opción `%s' es ambigua\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: la opción `--%s' no admite ningún argumento\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: la opción `%c%s' no admite ningún argumento\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: la opción `%s' necesita un argumento\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: opción no reconocida `--%s'\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: opción no reconocida `%c%s'\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: opción inválida -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: la opción necesita un argumento -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: la opción `-W %s' es ambigua\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: la opción `-W %s' no admite ningún argumento\n"
+
+# No ha habido ninguna queja en coreutils, pongamos aquí también los
+# símbolos de cita tradicionales en español.
+#~ msgid "`"
+#~ msgstr "«"
+
+#~ msgid "'"
+#~ msgstr "»"
+
+#~ msgid "Success"
+#~ msgstr "Éxito"
+
+#~ msgid "No match"
+#~ msgstr "No hay ninguna coincidencia"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Expresión regular inválida"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Carácter de secuencia inválido"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Nombre de clase de caracteres inválido"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Barra invertida final"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Referencia hacia atrás inválida"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ o [^ desemparejado"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( o \\( desemparejado"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "\\{ desemparejada"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Contenido de \\{\\} inválido"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Final de rango inválido"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Memoria agotada"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Expresión regular precedente inválida"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Fin prematuro de la expresión regular"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Expresión regular demasiado grande"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") o \\) desemparejado"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "No hay ninguna expresión regular anterior"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[sS]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#, fuzzy
+#~ msgid "memory exhausted"
+#~ msgstr "Memoria agotada"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "argumento `%s' inválido para la opción `%s'"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "argumento `%s' inválido para la opción `%s'"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "lista de argumentos demasiado larga"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opción ilegal -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "tamaño del bloque"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Lista Predicado:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Árbol de Evaluación:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Árbol de Evaluación Optimizado:\n"
+
+# Propongo eliminar la palabra virtual. En un sistema GNU, la memoria virtual
+# y la otra son la misma cosa, desde el punto de vista de las aplicaciones
+# no se distinguen una de otra. Quedaría más corto, más sencillo y más bonito.
+# Y además Javier Romañach (hello) está de acuerdo conmigo. sv
+# Y a mí me apoya Richard Stallman };) (qui malo soy :)
+# Fuera coñas ... sí, estoy de acuerdo ipg
+#
+# En cualquier caso, me gustaría saber por qué en GNU se empeñan en poner
+# siempre "virtual". Parece como si hacerlo así estuviera el mensaje
+# más orientado al usuario final [ quitando el virtual el mensaje estaría
+# escrito desde el punto de vista de la aplicación (para la cual, todos
+# los malloc()'s son iguales ante la ley...) ]
+#
+# No estoy completamente convencido de qué deberíamos hacer.
+# De hecho, esto contradice mis principios (la fidelidad ante todo).
+# (Creo que tendré que revisar mis principios...). sv
+#
+# Sí ... a fondo :) ipg
+#
+# FIXME: Preguntar a Richard Stallman por qué se empeña en usar la
+# palabra virtual. sv
+#~ msgid "virtual memory exhausted"
+#~ msgstr "memoria agotada"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "error en %s: %s"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+#~ msgstr ""
+#~ "acciones: -exec ORDEN ; -fprint FICHERO -fprint0 FICHERO\n"
+#~ "      -fprintf FICHERO FORMATO -fls FICHERO -ok ORDEN ;\n"
+#~ "      -print -print0 -printf FORMATO -prune -ls -delete -quit\n"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "atención: el predicado -ipath está obsoleto; por favor use -iwholename "
+#~ "en\n"
+#~ "su lugar"
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find versión %s\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "insertando %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    tipo: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "izquierda:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "derecha:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Árbol de Evaluación Normalizado:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n"
+#~ "      [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Modo de empleo: %s [-d ruta-de-acceso | --database=ruta-de-acceso]\n"
+#~ "   [-e | --existing] [-i | --ignore-case] [--wholepath] [--basename]\n"
+#~ "   [--limit=N | -l N] [--version] [--help] expr-reg...\n"
+
+#~ msgid ""
+#~ "warning: locate database path `%s' contains a trailing colon, which is "
+#~ "not a valid database name"
+#~ msgstr ""
+#~ "atención: la ruta de acceso de la base de datos de locate `%s'\n"
+#~ "contiene dos puntos al final, no es un nombre válido de base de datos"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate versión %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "argumento para --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs versión %s\n"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Se reduce arg_max (%ld) a arg_size (%ld)\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s cambió durante la ejecución de %s"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. cambió durante la ejecución de %s"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "comilla %s desemparejada"
+
+#~ msgid "cannot open current directory"
+#~ msgstr "no se puede abrir el directorio actual"
+
+#~ msgid "wait got pid %d, expected pid %d"
+#~ msgstr "wait obtuvo el pid %d, y se esperaba un pid %d"
+
+#~ msgid "%s stopped by signal %d"
+#~ msgstr "%s interrumpido por la señal %d"
diff --git a/po/et.gmo b/po/et.gmo
new file mode 100644 (file)
index 0000000..92ba712
Binary files /dev/null and b/po/et.gmo differ
diff --git a/po/et.po b/po/et.po
new file mode 100644 (file)
index 0000000..6befa7d
--- /dev/null
+++ b/po/et.po
@@ -0,0 +1,1272 @@
+# This file is distributed under the same license as the findutils package.
+# Estonian translations for findutils
+# Copyright (C) 2000 Free Software Foundation, Inc.
+# Toomas Soome <Toomas.Soome@microlink.ee>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2011-05-05 16:28+0300\n"
+"Last-Translator: Toomas Soome <Toomas.Soome@microlink.ee>\n"
+"Language-Team: Estonian <linux-ee@lists.eenet.ee>\n"
+"Language: et\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-15\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Jagatud failide paisktabeli initisaliseerimine ebaõnnestus"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "stat jooksval kataloogil ebaõnnestus"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Haagitud seadmete nimekirja lugemine ebaõnnestus."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "HOIATUS: failisüsteem %s on just lahti haagitud."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "HOIATUS: failisüsteem %s on just haagitud."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s muutus %s töö ajal (vana seadme number %ld, uus seadme number %ld, "
+"failisüsteemi tüüp on %s) [viit %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s muutus %s töö ajal (vana i-kirje number %<PRIuMAX>, uus i-kirje number "
+"%<PRIuMAX>, failisüsteemi tüüp on %s) [viit %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "vanemkataloogi ei õnnestu tagasi minna"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Turvaline kataloogi %s sisenemine ebaõnnestus"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Nimeviide %s on osa tsüklist kataloogipuus; me oleme juba külastanad "
+"kataloogi, millele see viitab."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Failisüsteemis on tuvastatud tsükkel; %s omab sama seadme ja i-kirje "
+"numbreid kui kataloog, mis on %d taset failisüsteemi hierarhias kõrgemal."
+msgstr[1] ""
+"Failisüsteemis on tuvastatud tsükkel; %s omab sama seadme ja i-kirje "
+"numbreid kui kataloog, mis on %d taset failisüsteemi hierarhias kõrgemal."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "hoiatus: ei järgi nimeviidet %s"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"HOIATUS: %s viidete arv on vale (nägin ainult st_nlink=%<PRIuMAX>, aga "
+"leidsin juba %<PRIuMAX> alamkataloogi): see võib olla viga teie "
+"failisüsteemi draiveris. Kasutan automaatselt find'i -noleaf võtit.  "
+"Varasemad tulemused ei pruugi sisaldada kõiki katalooge."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Haagitud failisüsteemide loetelu lugemine ebaõnnestus"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "tundmatu"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr "Failisüsteemis on tsükkel; %s on sama failisüsteemi tsükli osa kui %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "HOIATUS: failil %s on õigused 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "%s ei saa otsida"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "%s otsingu lõppedes ei õnnestu taastada töökataloogi"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"-delete tegevus lülitab automaatselt sisse -depth, aga -prune ei toimi "
+"sellega. Kui te soovite jätkata, kasutage ilmutatult -depth."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"hoiatus: te olete kasutanud võtit %s peale mitte-võtit %s, aga võtmed ei ole "
+"positsioonilised (%s mõjutab eelnevalt ja järgnevalt määratud teste).  Palun "
+"andke võtmed enne muid argumente.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"hoiatus: võti -d on aegunud; kasutage palun võtit -depth, viimane on POSIX-"
+"ühilduv."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s ei ole defineeritud grupi nimi ega ole grupi numbriline identifikaator, "
+"kuna omab ootamatut sufiksit %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "gruppi nimega %s ei ole"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "-group vajab argumendiks grupi nime"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"vaikimisi tee on jooksev kataloog; vaikimisi avaldis on -print\n"
+"avaldis võib koosneda: operaatorid, võtmed, testid ja tegevused:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operaatorid (kahanevas eelistusjärjekorras; kui muid pole, on operaator -"
+"and):\n"
+"      ( AVALD ) ! AVALD -not AVALD   AVALD1 -a AVALD2   AVALD1 -and AVALD2\n"
+"      AVALD1 -o AVALD2   AVALD1 -or AVALD2   AVALD1 , AVALD2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"positsioonilised võtmed (alati tõesed): -daystart -follow -regextype\n"
+"tavalised võtmed (alati tõesed, kasutatakse muude avaldiste ees):\n"
+"      -depth --help -maxdepth TASE -mindepth TASE -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"testid (N võib olla +N või -N või N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FAIL -ctime N -empty -false -fstype TÜÜP -gid N -group NIMI\n"
+"      -ilname MUSTER -iname MUSTER -inum N -iwholename MUSTER -iregex "
+"MUSTER\n"
+"      -links N -lname MUSTER -mmin N -mtime N -name MUSTER -newer FAIL"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path MUSTER -perm [+-]MOOD -regex MUSTER\n"
+"      -readable -writable -executable\n"
+"      -wholename MUSTER -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NIMI -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context KONTEKST\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"tegevused: -delete -print0 -printf VORMING -fprintf FAILI VORMING -print \n"
+"      -fprint0 FAIL -fprint FAIL -ls -fls FAIL -prune -quit\n"
+"      -exec KÄSKLUS ; -exec KÄSKLUS {} + -ok KÄSKLUS ;\n"
+"      -execdir KÄSKLUS ; -execdir KÄSKLUS {} + -okdir KÄSKLUS ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Vigadest teatage (ja protsessi saab jälgida) findutils vea raporti lehel\n"
+"http://savannah.gnu.org/ vï kui teil puudub juurdepääs veebile, saates\n"
+"emaili aadressil <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "funktsiooni fnmatch() korrektsuse kontroll ebaõnnestus."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"hoiatus: failinimed Unixis ei sisalda tavaliselt kaldkriipse (kuigi teed "
+"sisaldavad). See tähendab et '%s %s' saab ilmselt selles süsteemis kogu aeg "
+"väärtuse 'false'.  Tõenäoliselt on '-wholename' või siis '-samefile' test "
+"märksa kasulikum.  Alternatiivina, kui te kasutate GNU grep, võiks proovida "
+"'find ... -print0 | grep -FzZ %s'."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "%s eeldab argumendiks positiivset kümnendnumbrit, sai %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "See süsteem ei võimalda faili loomise aega tuvastada."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "test %s nõuab argumenti"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Ma ei tea kuidas intepreteerida %s kuupäeva või kellaajana"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Ei õnnestu lugeda faili %s loomise aega"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr "hoiatus: -%s %s ei leia midagi, kuna lõpus on /."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Kui on määratud POSIXLY_CORRECT, ei ole mood %s lubatud."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "vigane mood %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"hoiatus: te määrasite moodi mustri %s (mis on sama, kui /000). -perm /000 "
+"tähendus on nüüd muudetud kooskõlla võtmega -perm -000; see tähendab, kui "
+"enne seda kasutati mitte ühegi faili otsimise määramiseks, aga nüüd leiab "
+"kõik failid. "
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "vigane tühi argument -size predikaadile"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "vigane tüüp `%c' -size predikaadile"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "vigane argument `%s%c' predikaadil -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr "Võti -show-control-chars vajab argumenti 'literal' või 'safe'"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "vigane argument %s predikaadil -used"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "Kasutajat %s ei ole"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "-user vajab argumendiks kasutajanime"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Lubatud omadused: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "vigane predikaat -context: SELinux ei ole toetatud."
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "-type argumendid saavad sisaldada ainult ühte tähte"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Tundmatu -type argument: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "hoiatus: tundmatu paojada `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "viga: %s vormingu sõne lõpus"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "hoiatus: tundmatu formaadidirektiiv `%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+"viga: vormingu direktiiv `%%%c' on reserveeritud tulevikus kasutamiseks"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Keskkonnamuutuja PATH sisaldab jooksvat kataloogi, mis on find tegevuse %s "
+"korral ebaturvaline.  Palun eemaldage jooksev kataloog PATH muutujast "
+"(eemaldage \".\" või algavad või lõpetavad koolonid)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Keskkonnamuutuja PATH sisaldab suhtelist kataloogi %s, mis on find tegevuse "
+"%s korral ebaturvaline.  Palun eemaldage see kataloog PATH muutujast."
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Võtmetega -execdir ja -okdir ei ole lubatud programmi nimes kasutada {}, "
+"kuna see võib olla turvarisk."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Predikaadiga -exec%s ... + on lubatud kasutada ainult ühte {} paari"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "exec() funktsioonile antud keskkond on liiga suur."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "aritmeetiline ületäitumine %s päevade sekunditeks teisendamisel"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "aritmeetiline ületäitumine tänase päeva lõpu arvutuses"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standard veavoog"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standard väljundvoog"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "%s ei saa kustutada"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "%s otsingu lõppedes ei õnnestu taastada töökataloogi"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon ebaõnnestus: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "HOIATUS: faili %s loomise aega ei õnnestu lugeda"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Standardsisendit ei saa sulgeda"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Kataloogi vahetamine ei õnnestu"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "fork ebaõnnestus"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "viga %s oodates"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s katkestati signaaliga %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "vigane avaldis"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"vigane avaldis; te olete kasutanud binaarset operaatorit '%s', aga tema ees "
+"ei ole midagi."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "'%s' ja ')' vahel peab olema avaldis"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "'%s' järel oodati avaldist"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "vigane avaldis; liiga palju ')'"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"vigane avaldis; eeldasin leida sümbolit ')', aga see puudub. Võibolla tuleb "
+"lisada '%s' järele predikaat"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "vigane avaldis; tühjad sulud pole lubatud."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "vigane avaldis: eeldasin leida sümbolit ')', aga see puudub."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "oops -- vigane avaldise tüüp!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "oops -- vigane avaldise tüüp (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "teed peavad olema enne avaldist: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "tundmatu predikaat `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "vigane predikaat `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "vigane argument `%s' predikaadil `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "`%s' nõuab argumenti"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "liiga palju ')'"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "ootamatu täiendav predikaat '%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "ootamatu täiendav predikaat"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "oops -- vigane konjunktsioonioperaatori lisamine!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Kasuta: %s [-H] [-L] [-P] [-Otase] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [tee...] [avaldis]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "vanemkataloogi ei õnnestu tagasi minna"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "vanemkataloogi ei õnnestu tagasi minna"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Ignoreerin tundmatut silumise võtit %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Võtmel -D puudub argument."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Võtme -O järel peab olema numbriline argument"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Palun kirjutage võtme -O järel number"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Vigane optimeerimise tase %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Optimiseerimise tase %lu on liiga kõrge. Kui soovite leida faile väga "
+"kiiresti, kasutage GNU locate programmi."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Keskkonnamuutujat FIND_BLOCK_SIZE ei toetata, bloki suurust mõjutab ainult "
+"keskkonna muutuja POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "käsklus on liiga pikk"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr "argumentide suuruse piirang ei lase exec() kasutada"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "argumenti ei õnnestu mahutada argumentide loendi mahu piirangusse"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "argumentide loend on liiga pikk"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr "Keskkonnamuutuja %s väärtus ei ole lubatud kümnendnumber"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Ehitamisel kasutati GNU gnulib versiooni %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Ootamatu sufiks %s kohal %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Ootasin täisarvu: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Tundmatu regulaaravaldise tüüp %s; lubatud tüübid on %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Kasuta: %s [--version | --help]\n"
+"või     %s enamus_bigram_koode < faili-loend > locate-andmebaas\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Vigadest teatage aadressil <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "viga kirjutamisel"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Kasutamine: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Turvatase määratakase kümnendnumbrina."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Turvatase %s on väljaspool teisendamise piire."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Turvatase %s omab ootamatut sufiksit %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "slocate turvatase %ld ei ole toetatud."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Standardväljundisse kirjutamine ebaõnnestus"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "päeva"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Argument võtmele --max-database-age ei tohi olla tühi"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Võtme --max-database-age argument %s on vigane"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr "locate andmebaas %s sisaldab liiga pikka failinime"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate andmebaas %s on katki"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Locate andmebaasi maht: %s bait\n"
+msgstr[1] "Locate andmebaasi maht: %s baiti\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Sobivad failinimed: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Kõik failinimed: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Failide nimed kasutavad kokku %s baiti.\n"
+"Nendest nimedest,\n"
+"\n"
+"\t%s sisaldavad tühemikke,\n"
+"\t%s sisaldavad reavahetus sümbolit\n"
+"\tja %s sisaldavad sümboleid, millel on kõrgeim bitt seatud.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr "Osad failinimed filtreeriti välja, tihenduse suhet ei saa arvutada.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Tihenduse suhe %4.2f%% (suurem on parem)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Tihenduse suhe ei ole defineeritud\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"locate andmebaas %s tundub olema slocate andmebaas, aga sel on turvatase %c, "
+"mida GNU findutils praegu ei toeta"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr "%s on slocate andmebaas. Selle tugi on uus, võib esineda probleeme."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr "%s on slocate andmebaas mittetoetatud turvatasemega %d; jätan vahele."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Te kasutasite võtit -E, aga seda võtit ei saa slocate vormingus nullist "
+"erineva turvatasemega andmebaasiga kasutada. Selle andmebaasi jaoks tulemusi "
+"ei väljastata.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s on slocate andmebaas.  Lülitan sisse võtme '-e'."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "Vanas vormingus locate andmebaas %s on liiga lühike et olla korrektne"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Andmebaas %s kasutab %s vormingut.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Andmebaas kasutab \"little-endian\" masina sõnade baidijärjekorda.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Andmebaas kasutab \\\"big-endian\\\" masina sõnade baidijärjekorda.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Andmebaasi masina sõnade baidijärjekord ei ole selge.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Kasuta: %s [-d tee | --database=tee] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TÜÜP]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      muster...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "grupi privileegide eemaldamine ebaõnnestus"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "setuid privileegide eemaldamine ebaõnnestus"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Kõikide privileegide eemaldamine ebaõnnestus"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "setgid privileegide eemaldamine ebaõnnestus"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr "hoiatus: locate andmebaasi saab standardsisendist ainult korra lugeda."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "süsteemifunktsioon time sai vea"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "hoiatus: andmebaas %s on rohkem kui %d %s vana (vanus on %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr "HOIATUS: locate andmebaas %s loodi kasutades erinevat baidijärjekorda"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "ootamatu faililõpp failil %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "viga failist %s sõna lugemisel"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Sisendi eraldaja määrangus on vigane paojada %s."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Sisendi eraldaja määrangus on vigane paojada %s; sümboli väärtus ei või "
+"ületada %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Sisendi eraldaja määrangus on vigane paojada %s; sümboli väärtus ei või "
+"ületada %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Sisendi eraldaja määrangus on vigane paojada %s; lõpetavad sümbolid %s on "
+"tundmatud."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Vigane sisendi eraldaja määrang %s: eraldaja peab olema kas üks sümbol või "
+"sümboliga \\ algav paojada."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "exec funktsioonile antud keskkond on liiga suur"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr "hoiatus: võtme -s väärtus %ld on liiga suur, kasutan %ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Ei õnnestu avada sisendfaili %s"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Teie keskkonnamuutujad kasutavad %<PRIuMAX> baiti\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+"POSIX ülemine piirang argumendi pikkusele (selles süsteemis): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"POSIX vähim lubatud ülemine piirang argumendi pikkusele (kõikides "
+"süsteemides): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Tegelikult kasutatava käsu maksimum pikkus on: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Tegelikult kasutatava käsupuhvri suurus on: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"xargs käivitamine jätkub nüüd ja see loeb sisendist info ja käivitab käsud; "
+"kui te ei soovi seda, vajutage faililõppu tähistavat klahvikombinatsiooni.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Hoiatus: %s käivitatakse vähemalt korra. Kui te ei soovi seda, vajutage "
+"katkestamise klahvikombinatsiooni.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"puudub kvoot %s; vaikimisi kasutatab xargs omi kvoote, kui just pole "
+"kasutatud võtit -O"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dubleeritud"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "ühekordne"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"HOIATUS: sisendis on sümbol NUL. Seda ei saa argumentide loendis kasutada. "
+"Kas te soovite kasutada võtit --null?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "argumendi rida on liiga pikk"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "/dev/tty ei õnnestunud lugemiseks avada"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "enne fork kasutamist ei õnnestunud toru luua"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"xargs_do_exec funktsioonis ebaõnnestus errno-buffer lugemine (see on ilmselt "
+"tarkvaraline viga, palun raporteerige)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr "read sai ootamatu väärtuse %d; see on ilmselt viga, palun raporteerige"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "viga alamprotsessi ootamisel"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "HOIATUS: Ei tea enam palju %d omab alamprotsesse"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: lõpetas olekuga 255; katkestan"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: peatatud signaaliga %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: katkestatud signaaliga %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: vigane number võtmele -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: võtme -%c väärtus peab olema suurem või võrdne kui %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: võtme -%c väärtus peab olema väiksem kui %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Kasuta: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=eraldaja]\n"
+"       [-E eof-sõne] [-e[eof-sõne]] [--eof[=eof-sõne]]\n"
+"       [-L maks-ridu] [-l[maks-ridu]] [--max-lines[=maks-ridu]]\n"
+"       [-I asendus-sõne] [-i[asendus-sõne]] [--replace[=asendus-sõne]]\n"
+"       [-n maks-argumente] [--max-args=maks-argumente]\n"
+"       [-s maks-sümboleid] [--max-chars=maks-sümboleid]\n"
+"       [-P maks-protsesse] [--max-procs=maks-protsesse] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fail]\n"
+"       [--version] [--help] [käsk [argumendid]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "ei õnnestu leida jooksvat kataloogi"
diff --git a/po/fi.gmo b/po/fi.gmo
new file mode 100644 (file)
index 0000000..9d0232a
Binary files /dev/null and b/po/fi.gmo differ
diff --git a/po/fi.po b/po/fi.po
new file mode 100644 (file)
index 0000000..650b8fc
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,1431 @@
+# Finnish translation of findutils.
+# Copyright © 2002, 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Matti Koskimies <matti@apulanta.fi>, 2002.
+# Jorma Karvonen <karvonen.jorma@gmail.com>, 2009, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-04-25 15:49+0200\n"
+"Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com>\n"
+"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
+"Language: fi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Jaetun tiedoston hash-taulun alustus epäonnistui"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "komentoa ”stat” ei voi suorittaa nykyisessä hakemistossa"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Ei voida lukea liitettyjen laitteiden luetteloa."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+"VAROITUS: tiedostojärjestelmälle %s on äskettäin suoritettu unmount-komento."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+"VAROITUS: tiedostojärjestelmälle %s on äskettäin suoritettu mount-komento."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s vaihtunut ohjelman %s suorituksen aikana (vanha laitenumero %ld, uusi "
+"laitenumero %ld, tiedostojärjestelmän tyyppi on %s) [viite %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s vaihtunut ohjelman %s suorituksen aikana (vanha inode-numero "
+"%<PRIuMAX>, uusi inode-numero %<PRIuMAX>, tiedostojärjestelmän tyyppi on %s) "
+"[viite %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "paluu ylähakemistoon epäonnistui"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Hakemiston turvallinen vaihtaminen päähakemistoon %s epäonnistui"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Symbolinen linkki %s on silmukkaosa hakemistohierarkiassa; olemme jo "
+"vierailleet hakemistossa, johon se osoittaa."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Tiedostojärjestelmäsilmukka havaittu; kohteella %s on sama laitenumero ja "
+"inode hakemistona kuin on %d-taso korkeammalla "
+"tiedostojärjestelmähierarkiassa"
+msgstr[1] ""
+"Tiedostojärjestelmäsilmukka havaittu; kohteella %s on sama laitenumero ja "
+"inode hakemistona kuin on %d-tasoa korkeammalla "
+"tiedostojärjestelmähierarkiassa"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "varoitus: ei seurata symbolista linkkiä %s"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"VAROITUS: Kovalinkkilaskuri on virheellinen kohteelle %s (näki vain st_nlink="
+"%<PRIuMAX> mutta me näimme jo %<PRIuMAX> alihakemistoa): tämä saattaa olla "
+"ohjelmointivirhe tiedostojärjestelmäajurissasi. Käännetään automaattisesti "
+"päälle find-ohjelman valitsin -noleaf. Aikaisemmat tulokset ovat saattaneet "
+"epäonnistua sisällyttää hakemistoja, joista olisi pitänyt etsiä."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Ei voida lukea liitetyn tiedostojärjestelmän luetteloa"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "tuntematon"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Tiedostojärjestelmäsilmukka havaittu; kohde %s on osa samaa "
+"tiedostojärjestelmäsilmukkaa kuin %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "VAROITUS: tiedosto %s näyttää olevan tilassa 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "ei voida etsiä kohdetta %s"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "työhakemiston palauttaminen haun %s jälkeen epäonnistui"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"Toiminto -delete kääntää automaattisesti päälle valitsimen -depth, mutta "
+"valitsin -prune ei tee mitään, kun valitsin -depth on päällä. Jos haluat "
+"kuitenkin jatkaa, käytä vain eksplisiittisesti valitsinta -depth."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"varoitus: olet määritellyt valitsimen %s jälkeen ei-valitsin-argumentin %s, "
+"mutta valitsimet eivät ole oikealla paikalla (%s vaikuttaa testeihin, jotka "
+"on määritelty ennen sitä aivan kuin myös sen jälkeen määriteltyihin). "
+"Määrittele valitsimet ennen muita argumentteja.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"varoitus: valitsin -d on vanhentunut; käytä sen sijaan valitsinta -depth, "
+"koska jälkimmäinen on POSIX-yhteensopiva ominaisuus."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s ei ole olemassa olevan ryhmän nimi ja se ei näytä ryhmän numeeriselta "
+"tunnisteelta, koska siinä on odottamaton jälkiliite %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s ei ole olemassaolevan ryhmän nimi"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+"argumentti valitsimelle -group on tyhjä, mutta sen pitäisi olla ryhmän nimi"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"oletuspolku on nykyinen hakemisto; oletuslauseke on ”-print”\n"
+"lauseke saattaa koostua: operaattoreista, valitsimista, testeistä ja "
+"toiminnoista:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operaattorit (laskeva arvojärjestys; ”-and” on oletuksena kun muuta ei\n"
+"ole annettuna):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"sijainnista riippuvat valitsimet (aina tosia): -daystart -follow -regextype\n"
+"\n"
+"normaalit valitsimet (aina tosia, määritelty ennen muita lausekkeita):\n"
+"      -depth --help -maxdepth TASOT -mindepth TASOT -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"testit (N voi olla +N tai -N tai N): -amin N -anewer TIEDOSTO -atime N -cmin "
+"N\n"
+"      -cnewer TIEDOSTO -ctime N -empty -false -fstype TYYPPI -gid N -group "
+"NIMI\n"
+"      -ilname MALLI -iname MALLI -inum N -ipath MALLI -iregex MALLI\n"
+"      -links N -lname MALLI -mmin N -mtime N -name MALLI -newer TIEDOSTO"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path MALLI -perm [+-]TILA -regex MALLI\n"
+"      -readable -writable -executable\n"
+"      -wholename MALLI -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NIMI -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context KONTEKSTI\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"toiminnot: -delete -print0 -printf MUOTO -fprintf TIEDOSTO MUOTO -print \n"
+"      -fprint0 TIEDOSTO -fprint TIEDOSTO -ls -fls TIEDOSTO -prune -quit\n"
+"      -exec KOMENTO ; -exec KOMENTO {} + -ok KOMENTO ;\n"
+"      -execdir KOMENTO ; -execdir KOMENTO {} + -okdir KOMENTO ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Ilmoita (ja jäljitä korjauksen edistymistä) ohjelmointivirheet findutils-"
+"ohjelman\n"
+"virheenilmoitussivun http://savannah.gnu.org/ kautta tai, jos sinulla on "
+"pääsy webbiin,\n"
+"lähettämällä sähköpostiviesti osoitteeseen <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "kirjastofunktion fnmatch() järkevyystarkistus epäonnistui."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"varoitus: Unix-tiedostonimet eivät tavallisesti sisällä kauttaviivoja "
+"(vaikka niitä on polkunimissä).  Se tarkoittaa, että ”%s %s” luultavasti "
+"arvioidaan epätodeksi koko ajan tässä järjestelmässä.  Saatat huomata ”-"
+"wholename”-testin hyödyllisemmäksi, tai ehkä ”-samefile”.  Vaihtoehtoisesti "
+"jos käytät GNU grep-ohjelmaa, voisit käyttää komentoa ”find ... -print0 | "
+"grep -FzZ %s”."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+"Odotettiin positiivinen desimaalikokonaislukuargumentti predikaattiin %s, "
+"mutta saatiin %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "Tämä järjestelmä ei tarjoa mitään tapaa löytää tiedoston syntymäaika."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Testi %s vaatii argumentin"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Ei voi kuvitella, kuinka tulkita %s päivämääränä tai kellonaikana"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Ei voi saada tiedoston %s syntymäaikaa"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr "varoitus: -%s %s ei täsmää minkään kanssa, koska se loppuu merkkiin /."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Tila %s ei ole kelvollinen kun POSIXLY_CORRECT on päällä."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "epäkelpo tila %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"varoitus: olet määritellyt tilamallin %s (joka on sama kuin /000). "
+"Valitsimen -perm /000 tarkoitus on nyt muuttunut yhteensopivaksi valitsimen -"
+"perm -000 kanssa; toisin sanoen, samalla kun sitä käytetään täsmäämään ”ei "
+"tiedostoja” kanssa, se nyt täsmää kaikkien tiedostojen kanssa."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "epäkelpo null-argumentti valitsimelle ”-size”"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "eläkelpo ”-size”-tyyppi ”%c”"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Virheellinen argumentti ”%s%c” valitsimelle -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Valitsin -show-control-chars ottaa yhden argumentin, jonka täytyy olla "
+"”literal” tai ”safe”"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Virheellinen argumentti %s valitsimelle -used"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s ei ole tunnetun käyttäjän nimi"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Argumentin valitsimelle -user ei pitäisi olla tyhjä"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Käytössä olevat ominaisuudet: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "virheellinen predikaatti -context: SELinux ei ole käytössä."
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Argumentit valitsimelle -type pitäisi sisältää vain yhden kirjaimen"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Tuntematon argumentti valitsimelle -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "varoitus: tunnistamaton koodinvaihtomerkki ”\\%c”"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "virhe: %s muotomerkkijonon lopussa"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "varoitus: tunnistamaton muotoilumäärite ”%%%c”"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "virhe: muotoilumäärite ”%%%c” on varattu tulevaa käyttöä varten"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Nykyinen hakemisto on sisällytetty PATH-ympäristömuuttujaan, mikä on "
+"turvaton yhdessä find-ohjelman %s-toiminnon kanssa. Poista nykyinen "
+"hakemisto $PATH-ympäristömuuttujastasi (toisin sanoen, poista ”.” tai "
+"edeltävät ja jäljessä olevat kaksoispisteet)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Suhteellinen polku %s on sisällytetty PATH-ympäristömuuttujaan, mikä on "
+"turvaton yhdessä find-ohjelman %s-toiminnon kanssa. Poista tämä merkintä "
+"ympäristömuuttujasta $PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Ei saa käyttää {} työkalun nimen sisällä valitsimille -execdir ja -okdir, "
+"koska tämä on potentiaalinen turvapulma."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Vain yksi {}-ilmentymä on tuettu valitsimella -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Ympäristö on liian iso funktiolle exec()."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "aritmeettinen ylivuoto kun muunnetaan %s päivää sekuntimääräksi"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "aritmeettinen ylivuoto kun yritetään laskea tämän päivän loppua"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "vakiovirhe"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "vakiotuloste"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "ei voida poistaa kohdetta %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "työhakemiston palauttaminen haun %s jälkeen epäonnistui"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon epäonnistui: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "VAROITUS: ei voida määritellä tiedoston %s syntymäaikaa"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Ei voi sulkea vakiosyötettä"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Hakemiston vaihtaminen epäonnistui"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "ei voi luoda lapsiprosessia"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "virhe odotettaessa kohdetta %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s keskeytettiin signaalilla %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "epäkelpo lauseke"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"virheellinen lauseke; olet käyttänyt binäärioperaattoria ”%s” ilman että "
+"sitä ennen on mitään."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "odotettiin lauseke kohteiden ”%s” ja ”)” välissä"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "odotettiin lauseke kohteen ”%s” jälkeen"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "epäkelpo lauseke; sinulla on liian monia ”)”-merkkejä"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"virheellinen lauseke; odotettin löytyvän ”)”, mutta yhtään ei näy. Ehkä "
+"tarvitset lisäpredikaatin kohteen ”%s” jälkeen"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "virheellinen lauseke; tyhjät sulkeet eivät ole sallittu."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"virheellinen lauseke; Odotin löytäväni kohteen ”)” jostain, mutta en näe "
+"yhtään."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "hupsista -- epäkelpo lauseketyyppi!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "hupsista -- epäkelpo lauseketyyppi (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "polkujen täytyy olla ennen lauseketta: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "tuntematon predikaatti ”%s”"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "epäkelpo predikaatti ”%s”"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "virheellinen argumentti ”%s” kohteelle ”%s”"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "puuttuva argumentti kohteelle ”%s”"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "sinulla on liian monta ”)”-merkkiä"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "odottamaton lisäpredikaatti ”%s”"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "odottamaton lisäpredikaatti"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "hupsista -- epäkelpo ”and”-operaattorin oletuslisäys"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Käyttö: %s [-H] [-L] [-P] [-Olevel] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [polku...] [lauseke]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "ei kyetä tallentamaan nykyistä työhakemistoa"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "ei kyetä tallentamaan nykyistä työhakemistoa"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Ei välitetä tunnistamattomasta virheenjäljityslipusta %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Tyhjä argumentti valitsimelle -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Valitsinta -O täytyy välittömästi seurata desimaalikokonaisluku"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Määrittele desimaaliluku heti valitsimen -O jälkeen"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Virheellinen optimointitaso %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Optimointitaso %lu on liian korkea. Jos haluat löytää tiedostoja nopeasti, "
+"harkitse GNU locate-ohjelman käyttämistä."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Ympäristömuuttujaa FIND_BLOCK_SIZE ei tueta, ainoa asia, joka vaikuttaa "
+"lohkokokoon on POSIXLY_CORRECT-ympäristömuuttuja"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "liian pitkä komento"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr "ei voi kutsua exec()-toimintoa argumenttikokorajoitteiden vuoksi"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "yksi argumentti ei sovi argumenttiluettelon kokorajoihin"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "liian pitkä argumenttiluettelo"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+"Ympäristömuuttuja %s ei ole asetettu kelvolliseen desimaalinumeroarvoon"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Rakennettu käyttäen GNU gnulib-versiota %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Odottamaton loppuliite %s kohteessa %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Odotettiin kokonaislukua: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Tuntematon säännöllinen lauseketyyppi %s; oikeat tyypit ovat %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Käyttö: %s [--version | --help]\n"
+"tai    %s most_common_bigrams < tiedostoluettelo > locate-tietokanta\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Ilmoita virheistä (englanniksi) osoitteeseen <bug-findutils@gnu.org>.\n"
+"Ilmoita käännösvirheistä osoitteeseen <translation-team-fi@lists.sourceforge."
+"net>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "kirjoitusvirhe"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Käyttö: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Sinun on määriteltävä turvataso desimaalilukuna."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Turvataso %s on muunneltavan alueen ulkopuolella."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Turvatasolla %s on odottamaton jälkiliite %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "slocate-turvatasoa %ld ei tueta."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Vakiotulosteeseen kirjoittaminen epäonnistui"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "päivää"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Argumentin valitsimelle --max-database-age on oltava tyhjä"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Virheellinen argumentti %s valitsimelle -max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"locate-tietokanta %s sisältää pitempiä tiedostonimiä kuin mitä locate-"
+"ohjelma voi käsitellä"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate-tietokanta %s on rikkoutunut tai virheellinen"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Locate-tietokantakoko: %s tavu\n"
+msgstr[1] "Locate-tietokantakoko: %s tavua\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Täsmäävät tiedostonimet: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Kaikki tiedostonimet: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Tiedostonimien kumulatiivinen pituus on %s tavua.\n"
+"Noista tiedostonimistä,\n"
+"\n"
+"\t%s sisältää tyhjemerkkejä, \n"
+"\t%s sisältää rivinvaihtomerkkejä, \n"
+"\tja %s sisältää merkkejä, joiden ylimmäinen bitti on asetettu.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Jotkut tiedostonimet saattavat olla poissuodatettuja, joten emme voi laskea "
+"tiivistyssuhdetta.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Tiivistyssuhde %4.2f%% (mitä korkeampi, sitä parempi)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Tiivistyssuhde on määrittelemätön\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"locate-tietokanta %s näyttää kuin slocate-tietokanta, mutta se tuntuu olevan "
+"turvatasolla %c, mitä GNU findutils ei nykyisin tue"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s on slocate-tietokanta.  Tuki niille on uusi, odota tästä lähtien pulmia."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr "%s on slocate-tietokannan tukematon turvataso %d; hypätään yli."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Olet määritellyt valitsimen -E, mutta tuota valitsinta ei voida käyttää "
+"slocate-muotoisten tietokantojen kanssa silloin kun niillä on nollasta "
+"poikkeava turvataso. Tähän tietokantaan ei generoida tuloksia.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s on slocate-tietokanta.  Käännetään päälle valitsin ”-e”."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"Vanhanmuotoinen locate-tietokanta %s on liian lyhyt ollakseen kelvollinen"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Tietokanta %s on %s-muotoinen.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Tietokannassa on ”little-endian”-konesanakoodaus.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Tietokannassa on ”big-endian”-konesanakoodaus.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Tietokannan konesanakoodausjärjestys ei ole itsestään selvä.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Käyttö: %s [-d polku | --database=polku] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYYPPI]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      malli...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "drop-käsky tietokannan ryhmäoikeuksille epäonnistui"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "drop setuid-käsky tietokannan oikeuksille epäonnistui"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Täysi drop-käsky tietokannan oikeuksille epäonnistui"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "drop setgid-käsky tietokannan oikeuksille epäonnistui"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr "varoitus: locate-tietokanta voidaan lukea vakiosyötteestä vain kerran."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "järjestelmän aikakutsu epäonnistui"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"varoitus: tietokanta %s on vanhempi kuin %d %s (todellinen ikä on %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr "VAROITUS: locate-tietokanta %s rakennettiin eri tavujärjestyksellä"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "odottamaton tiedoston loppumerkki EOF kohteessa %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "virhe luettaessa sanaa kohteesta %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Virheellinen koodinvaihtosekvenssi %s syöterajoitinmäärittelyssä"
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Virheellinen koodinvaihtosekvenssi %s syöterajoitinmäärittelyssä; "
+"merkkiarvot eivät saa ylittää arvoa %lx"
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Virheellinen koodinvaihtosekvenssi %s syöterajoitinmäärittelyssä; "
+"merkkiarvot eivät saa ylittää arvoa %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Virheellinen koodinvaihtosekvenssi %s syöterajoitinmäärittelyssä; "
+"jälkimerkkejä %s ei tunnistettu."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Virheellinen syöterajoitinmäärittely %s: rajoittimen pitää olla joko "
+"yksittäismerkki tai koodinvaihtosekvenssi, joka alkaa merkeillä \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "ympäristö on liian iso komennolle ”exec”"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"Varoitus: arvo %ld valitsimelle -s on liian suuri, käytetään sen sijaan "
+"arvoa %ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Ei voida avata syötetiedostoa %s"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Ympäristömuuttujasi vievät tilaa %<PRIuMAX> tavua\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "POSIX-argumenttipituuden yläraja (tässä järjestelmässä): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Pienin sallittu POSIX-argumenttipituuden yläraja (kaikissa järjestelmissä): "
+"%<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Komennon maksimipituus, jota voisimme todella käyttää on: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Meidän todella käyttämämme komentopuskurin koko on: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Ohjelman xargs suoritus jatkuu heti ja se yrittää lukea syötteensä ja "
+"suorituskomennot; jos tämä on jotain, mitä et halua, kirjoita tiedoston "
+"loppumerkki.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Varoitus: %s suoritetaan vähintään kerran. Jos et halua sen tapahtuvan, "
+"paina keskeytyspainiketta.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"pariton %s lainaus; oletuksen lainaukset ovat erityisiä xargs:lle, ellet "
+"käytä valitsinta -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "kaksinkertainen"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "yksinkertainen"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"VAROITUS: syötteessä oli NUL-merkki. Sitä ei voi välittää "
+"argumenttiluettelon lävitse. Oliko tarkoituksesi käyttää valitsinta --null ?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "liian pitkä argumenttirivi"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "kohteen /dev/tty avaaminen lukemista varten epäonnistui"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "ei voitu luoda putkea ennen fork-kutsua"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"errno-puskurin luku epäonnistui kohteessa xargs_do_exec (tämä on luultavasti "
+"ohjelmointivirhe, ilmoita siitä)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"read-kutsu palautti odottamattoman arvon %d; tämä on luultavasti "
+"ohjelmointivirhe, ilmoita siitä"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "lapsiprosessin odotuksenaikainen virhe"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "VAROITUS: Kadotettiin %d lapsiprosessin jälki"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: poistumistilakoodi 255; keskeytetään"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: pysäytetty signaalilla %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: keskeytetty signaalilla %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: epäkelpo numero -%c -valitsimelle\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: valitsimen -%c arvon pitäisi olla >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: valitsimen -%c arvon pitäisi olla < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Käyttö: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=erotin]\n"
+"       [-E tiedostonloppumerkkijono] [-e[tiedostonloppumerkkijono]]  [--eof"
+"[=tiedostonloppumerkkijono]]\n"
+"       [-L maksimirivimäärä] [-l[maksimirivimäärä]] [--max-lines"
+"[=maksimirivimäärä]]\n"
+"       [-I korvausmerkkijono] [-i[korvausmerkkijono]] [--replace"
+"[=korvausmerkkijono]]\n"
+"       [-n maksimiargumenttimäärä] [--max-args=maksimiargumenttimäärä]\n"
+"       [-s maksimimerkkimäärä] [--max-chars=maksimimerkkimäärä]\n"
+"       [-P maksimiprosessimäärä]  [--max-procs=maksimiprosessimäärä] [--show-"
+"limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=tiedosto]\n"
+"       [--version] [--help] [komento [alkuargumentit]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "työhakemiston nouto ei onnistu"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "virheellinen argumentti %s kontekstille %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "argumentti %s kontekstille %s ei ole yksiselitteinen"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Tarjolla olevat argumentit:"
+
+#~ msgid "error closing file"
+#~ msgstr "virhe suljettaessa tiedostoa"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Tuntematon järjestelmävirhe"
+
+#~ msgid "%s: option `%s' is ambiguous\n"
+#~ msgstr "%s: valitsin ”%s” ei ole yksiselitteinen\n"
+
+#~ msgid "%s: option `--%s' doesn't allow an argument\n"
+#~ msgstr "%s: valitsin ”--%s” ei salli argumenttia\n"
+
+#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: valitsin ”%c%s” ei salli argumenttia\n"
+
+#~ msgid "%s: option `%s' requires an argument\n"
+#~ msgstr "%s: valitsin ”%s” vaatii argumentin\n"
+
+#~ msgid "%s: unrecognized option `--%s'\n"
+#~ msgstr "%s: tunnistamaton valitsin ”--%s”\n"
+
+#~ msgid "%s: unrecognized option `%c%s'\n"
+#~ msgstr "%s: tunnistamaton valitsin ”%c%s”\n"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: kielletty valitsin -- %c\n"
+
+#~ msgid "%s: invalid option -- %c\n"
+#~ msgstr "%s: epäkelpo valitsin -- %c\n"
+
+#~ msgid "%s: option requires an argument -- %c\n"
+#~ msgstr "%s: valitsin vaatii argumentin -- %c\n"
+
+#~ msgid "%s: option `-W %s' is ambiguous\n"
+#~ msgstr "%s: valitsin ”-W %s” ei ole yksiselitteinen\n"
+
+#~ msgid "%s: option `-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: valitsin ”-W %s” ei salli argumenttia\n"
+
+#~ msgid "`"
+#~ msgstr "”"
+
+#~ msgid "'"
+#~ msgstr "”"
+
+#~ msgid "Success"
+#~ msgstr "Onnistui"
+
+#~ msgid "No match"
+#~ msgstr "Ei täsmännyt"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Epäkelpo säännöllinen lauseke"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Epäkelpo vertailumerkki"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Epäkelpo merkkiluokan nimi"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Kenoviiva viimeisenä"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Epäkelpo takaisinviittaus"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Pariton [ tai [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Pariton ( tai \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Pariton \\{"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Virheellinen \\{\\}-sisältö"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Epäkelpo arvoalueen loppupää"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Muisti loppui"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Epäkelpo edeltävä säännöllinen lauseke"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Säännöllisen lausekkeen ennenaikainen loppu"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Liian iso säännöllinen lauseke"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Pariton ) tai \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Ei edeltävää säännöllistä lauseketta"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[kKyY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[eEnN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "muisti loppui"
diff --git a/po/findutils.pot b/po/findutils.pot
new file mode 100644 (file)
index 0000000..c5b2c25
--- /dev/null
@@ -0,0 +1,1140 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU findutils 4.5.10\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr ""
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr ""
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr ""
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr ""
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr ""
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr ""
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr ""
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr ""
+
+#: find/parser.c:2334
+#, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr ""
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr ""
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr ""
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr ""
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr ""
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr ""
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr ""
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr ""
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr ""
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr ""
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr ""
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr ""
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr ""
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr ""
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr ""
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr ""
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr ""
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr ""
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr ""
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr ""
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr ""
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr ""
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr ""
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr ""
+
+#: find/util.c:451
+#, c-format
+msgid "failed to save initial working directory"
+msgstr ""
+
+#: find/util.c:468
+#, c-format
+msgid "failed to restore initial working directory"
+msgstr ""
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr ""
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr ""
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr ""
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr ""
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr ""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr ""
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr ""
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr ""
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr ""
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr ""
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr ""
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr ""
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr ""
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr ""
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr ""
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr ""
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr ""
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr ""
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr ""
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr ""
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
diff --git a/po/fr.gmo b/po/fr.gmo
new file mode 100644 (file)
index 0000000..1a9e15f
Binary files /dev/null and b/po/fr.gmo differ
diff --git a/po/fr.po b/po/fr.po
new file mode 100644 (file)
index 0000000..ea491ec
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,1592 @@
+# Messages français pour GNU concernant findutils.
+# Copyright (C) 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
+# Nicolas Provost <nprovost@quadriv.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-12-20 17:42+0100\n"
+"Last-Translator: Nicolas Provost <nprovost@quadriv.com>\n"
+"Language-Team: French <traduc@traduc.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Echec d'initialisation de la table de hâchage des fichiers partagés"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "impossible d'atteindre le répertoire courant"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Impossible de lister les périphériques montés."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "AVERTISSEMENT : le système de fichier %s a été récemment démonté."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "AVERTISSEMENT : le système de fichiers %s a été récemment monté."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"modification de %s%s l'exécution de %s (ancien n° de périphérique %ld, "
+"nouveau n° de périphérique %ld, type du système de fichiers est %s) [ref %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"modification de %s%s durant l'exécution de %s (ancien n° d'inode %<PRIuMAX>, "
+"nouveau n° d'inode %<PRIuMAX>, type du système de fichiers %s) [ref %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "impossible de revenir au répertoire parent"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Echec de changement du répertoire vers %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Le lien symbolique \"%s\" fait partie d'une boucle dans la hiérarchie du "
+"répertoire ; le répertoire sur lequel il pointe a déjà été visité."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Boucle détectée dans le système de fichiers ; \"%s\" a le même n° de "
+"périphérique et d'inode que le répertoire qui est %d niveau plus haut dans "
+"l'arborescence"
+msgstr[1] ""
+"Boucle détectée dans le système de fichiers ; \"%s\" a le même n° de "
+"périphérique et d'inode que le répertoire qui est %d niveaux plus haut dans "
+"l'arborescence"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "Attention : lien symbolique non suivi %s"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"AVERTISSEMENT : lien direct (hard link) erroné pour %s (vus seulement "
+"st_nlink=%<PRIuMAX>, mais déjà vus %<PRIuMAX> sous-répertoires). C'est peut-"
+"être dû à une anomalie dans le pilote du système de fichiers. Option de "
+"recherche -noleaf automatiquement activée. Les résultats antérieurs peuvent "
+"ne pas inclure des répertoires qui auraient dû être recherchés."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Impossible de lister les systèmes de fichiers montés"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "inconnu(e)"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Boucle détectée dans le système de fichiers ; \"%s\" est dans la même boucle "
+"que %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "ATTENTION : le fichier %s semble avoir comme permissions 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "impossible de chercher %s"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr ""
+"échec de rétablissement du répertoire de travail initial après recherche de "
+"%s"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"L'action -delete active automatiquement -depth, mais -prune ne fait rien si -"
+"depth est présente. Pour continuer, utilisez plutôt explicitement l'option -"
+"depth."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"AVERTISSEMENT : vous avez spécifié l'option %s après un argument qui n'est "
+"pas une option %s mais les options sont positionnelles (%s affecte les tests "
+"spécifiés avant aussi bien qu'après). SVP spécifiez des options avant les "
+"autres arguments. \n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"AVERTISSEMENT : l'option -d est obsolète ; svp utilisez -depth à la place, "
+"parce celle-ci est est une option conforme à POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s n'est pas le nom d'un groupe existant et ne semble pas être un n° de "
+"groupe à cause du suffixe inattendu %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s n'est pas le nom d'un groupe existant"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "l'argument de -group est vide, et devrait être un nom de groupe"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"Le répertoire utilisé par défaut est le répertoire courant ; l'\n"
+"option par défaut est -print. Une expression peut être\n"
+"constituée: d'opérateurs, d'options, de tests et d'actions :\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"les opérateurs (par précédence décroissante; -and est implicite\n"
+"lorsqu'aucun autre paramètre n'est fourni):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"les options positionnelles (toujours vraies i.e. « true ») :\n"
+"      -daystart -follow -regextype\n"
+"les options normales (toujours vraies i.e. « true » et devant être "
+"spécifiées\n"
+"avant les autres expressions):\n"
+"      -depth --help -maxdepth NIVEAUX -mindepth NIVEAUX -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"les options de tests (N peut être +N ou -N ou N) :\n"
+"      -amin N -anewer FICHIER -atime N -cmin N\n"
+"      -cnewer FICHIER -ctime N -empty -false -fstype TYPE -gid N -group NOM\n"
+"      -ilname MOTIF -iname MOTIF -inum N -iwholename MOTIF -iregex MOTIF\n"
+"      -links N -lname MOTIF -mmin N -mtime N -name MOTIF -newer FICHIER"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path MOTIF -perm [+-]MODE -regex MOTIF\n"
+"      -readable -writable -executable\n"
+"      -wholename MOTIF -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NOM -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context CONTEXTE\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"actions : -delete -print0 -printf FORMAT -fprintf FICHIER FORMAT -print \n"
+"      -fprint0 FICHIER -fprint FICHIER -ls -fls FICHIER -prune -quit\n"
+"      -exec COMMANDE ; -exec COMMANDE {} + -ok COMMANDE ;\n"
+"      -execdir COMMANDE ; -execdir COMMANDE {} + -okdir COMMANDE ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Rapporter (et faire le suivi du progrès de correctifs) toutes anomalies\n"
+"en suivant les instructions se situant sur la page http://savannah.gnu.org\n"
+"ou si vous n'avez pas d'accès web en adressant un courriel à\n"
+"<bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "Fonction de librairie fnmatch() : échec de vérification d'intégrité."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"AVERTISSEMENT : les noms de fichiers Unix usuels ne contiennent pas de barre "
+"obliques (sauf pour les chemins).  Cela signifie que '%s %s' sera toujours "
+"évalué comme étant faux sur ce système.  Vous pouvez trouver que le test '-"
+"wholename' est plus utile, ou encore celui-ci : '-samefile'.  "
+"Alternativement, si vous utilisez GNU grep, vous pourriez utiliser 'find ... "
+"-print0 | grep -FzZ %s'."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "Un décimal positif est attendu comme argument à %s, mais %s trouvé"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+"Le système ne permet pas de retrouver la date de création d'un fichier."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Le test « %s » requiert un paramètre"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Impossible d'interpréter %s comme une date ou une heure"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Impossible d'obtenir la date de création du fichier %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+"attention : -%s %s ne donnera pas de correspondance car finissant par /."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Le mode %s n'est pas valide lorsque POSIXLY_CORRECT est actif."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "mode non valide « %s »"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"AVERTISSEMENT : vous avez spécifié un type de motif %s (équivalent à /000). "
+"Le sens de -perm /000 a été modifié pour être consistant avec -perm -000 ; "
+"c'est-à-dire qu'au lieu de n'avoir aucun fichier correspondant, tous les "
+"fichiers correspondent dorénavant."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "Paramètre nul non valide pour l'option -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "type non valide pour l'option -size « %c »"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Argument non valide \"%s%c\" pour -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"L'option -show-control-chars prend un unique argument, \"literal\" ou \"safe"
+"\""
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Argument non valide %s pour -used"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s n'est pas le nom d'un utilisateur connu"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "L'argument de l'option -user ne devrait pas être vide"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Fonctions activées : "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "prédicat non valide -context : SELinux n'est pas activé."
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Les arguments pour -type devraient contenir seulement une lettre"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Argument inconnu pour -type : %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "AVERTISSEMENT : séquence d'échappement « \\%c » inconnue"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "erreur : %s à la fin de la chaîne de format"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "AVERTISSEMENT : directive de formatage « %%%c » inconnue"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+"erreur : la directive de format \"%%%c\" est réservée pour un usage futur"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Le répertoire courant est inclus dans la variable d'environnement de chemin "
+"$PATH, ce qui n'est pas sécurisé en combinaison avec l'action %s de find. "
+"SVP enlever le répertoire courant de $PATH (i.e enlever \".\" ou les \":\" "
+"en préfixe et suffixe)."
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Le chemin relatif %s est inclus dans la variable d'environnement de chemin "
+"$PATH ; ce n'est pas sécurisé sous l'action %s de find. SVP enlever cette "
+"entrée dans  $PATH."
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Vous ne pouvez utiliser {} à l'intérieur du nom de l'utilitaire pour --"
+"execdir et -okdir, parce que cela pose un problème potentiel de sécurité."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Une seule instance de {} est supportée avec -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "L'environnement est trop lourd pour exec()."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "dépassement arithmétique durant la conversion de %s jours en secondes"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "dépassement arithmétique durant le calcul de la fin de ce jour"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "sortie \"erreurs\" standard"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "sortie standard"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "impossible de supprimer %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr ""
+"échec de rétablissement du répertoire de travail initial après recherche de "
+"%s"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon  a échoué : %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "ATTENTION : impossible de trouver la date de création du fichier %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Impossible de fermer l'entrée standard"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Impossible de changer de répertoire"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "Impossible de cloner le processus (fork)."
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "Erreur en attendant %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s a terminé son exécution par le signal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "expression non valide"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"expression non valide ; vous avez utilisé un opérateur binaire \"%s\" non "
+"précédé d'une expression."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "expression attendue entre \"%s\" et \")\""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "expression attendue après \"%s\""
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "expression non valide ; il y a trop de ')'"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"expression non valide. ')' était attendue mais n'a pas été détectée. Peut-"
+"être faut-il un autre prédicat après \"%s\"."
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "expression non valide ; parenthèses vides non autorisées."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "expression non valide ; ')' attendue mais non détectée."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "Oups ! type d'expression non valide."
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "Oups ! type (%d) de l'expression non valide !"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "les chemins doivent précéder l'expression : %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "prédicat inconnu « %s »"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "prédicat non valide « %s »"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "Paramètre non valide « %s » pour « %s »"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "Paramètre manquant pour « %s »"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "il y a trop de ')'"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "prédicat supplémentaire inattendu \"%s\""
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "prédicat superflu inattendu"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "Oups ! instertion par défaut de \"and\" non valide."
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Utilisation : %s [-H] [-L] [-P] [-Olevel] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [chemin...] [expression]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "impossible d'enregistrer le répertoire de travail courant"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "impossible d'enregistrer le répertoire de travail courant"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Option de débogage non reconnue %s, ignorée."
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Argument vide pour l'option -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "L'option -O doit être immédiatement suivie d'un décimal"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "SVP spécifiez un nombre décimal juste après -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Niveau d'optimisation non valide %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Niveau d'optimisation %lu trop élevé. Si vous voulez trouver les fichiers "
+"très rapidement, considérez d'utiliser GNU \"locate\"."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"La variable d'environnement FIND_BLOCK_SIZE n'est pas supportée, la seule "
+"chose qui peut affecter la taille de bloc est la variable d'environnement "
+"POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "commande trop longue"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+"impossible d'invoquer exec() à cause de restrictions sur la taille des "
+"arguments"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"impossible d'inclure un argument simple compte tenu de la limite de taille "
+"de la liste d'arguments"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "liste d'arguments trop longue"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+"La variable d'environnement %s ne contient pas un nombre décimal valide"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Construit avec GNU gnulib version %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Suffixe %s non attendu dans %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Entier attendu : %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Type d'expression régulière %s inconnu ; les types valides sont %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Utilisation : %s [--version | --help]\n"
+"ou     %s bigrammes_les_plus_communs < liste_de_fichiers > base-de-données-"
+"locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Rapporter toute anomalie à <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "erreur d'écriture"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Utilisation : %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Vous devez spécifier un niveau de sécurité avec un nombre décimal."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Le niveau de sécurité %s est hors de la plage convertible."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Le niveau de sécurité %s a un suffixe inattendu %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "niveau de sécurité pour \"slocate\" %ld non supporté."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Echec d'écriture sur la sortie standard"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "jours"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "L'argument pour l'option --max-database-age ne doit pas être vide"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "le paramètre %s pour l'option --max-database-age n'est pas valide"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"la base de localisation %s contient un nom de fichier plus long que ce que "
+"\"locate\" peut gérer"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "base de localisation %s corrompue ou non valide"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Taille de la base de données de localisation : %s octets\n"
+msgstr[1] "Taille de la base de données de localisation : %s octets\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Noms de fichiers correspondants : %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Tous les noms de fichiers : %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Les noms de fichiers ont une longueur cumulée de\n"
+"%s octets. Parmi ces noms de fichiers,\n"
+"\n"
+"\t%s contiennent des espaces,\n"
+"\t%s contiennent des sauts de ligne,\n"
+"\tet %s contiennent des caractères étendus.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Certains noms de fichiers ont été filtrés et retirés, il devient impossible "
+"de calculer le taux de compression.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Taux de compression %4.2f%% (le plus grand est le mieux)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Taux de compression indéfini\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"La base de localisation %s semble une base \"slocate\" mais avec un niveau "
+"de sécurité %c, que \"GNU findutils\" ne supporte pas actuellement."
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s est une base \"slocate\".  Son support est récent, attendez-vous à des "
+"problèmes."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s est une base \"slocate\" avec un niveau de sécurité non supporté %d ; "
+"ignorée."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Option -E spécifiée, mais elle ne peut être utilisée avec les bases au "
+"format \"slocate\" ayant un niveau de sécurité non nul. Aucun résultat "
+"produit avec cette base.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s est une base \"slocate\". Activation de l'option \"-e\"."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "Vieux format de base \"locate\" %s trop court pour être valide"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "La base de données %s est au format %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "La base de données est encodée au format \"little-endian\".\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "La base de données est encodée au format \"big-endian\".\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "L'encodage (ordre des octets) de la base n'est pas évident.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Usage : %s [-d CHEMIN | --database=CHEMIN] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      MOTIF...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "échec de suppression des privilèges de groupe"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "échec de suppression des privilèges setuid"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Echec de suppression de tous les privilèges"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "échec de suppression des privilèges setgid"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"AVERTISSEMENT : la base de données des localisations peut être lue une seule "
+"fois à partir de stdin."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "échec d'obtention de l'heure système"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"AVERTISSEMENT : la base de données \"%s\" est plus vieille de %d %s (âge "
+"actuel %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+"ATTENTION : la base de localisation %s a été construite avec un ordre des "
+"octets différent"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "fin de fichier inattendue dans %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "erreur de lecture d'un mot de %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+"Séquence d'échappement non valide %s dans la spécification de délimiteur en "
+"entrée."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Séquence d'échappement non valide %s dans la spécification de délimiteur en "
+"entrée ; les valeurs de caractères ne doivent pas excéder %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Séquence d'échappement non valide %s dans la spécification de délimiteur en "
+"entrée ; les valeurs de caractères ne doivent pas excéder %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Séquence d'échappement non valide %s dans la spécification de délimiteur en "
+"entrée ; caractères en suffixe %s non reconnus."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Spécification de délimiteur en entrée non valide %s : le délimiteur doit "
+"être un caractère simple ou une séquence d'échappement débutant par \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "environnement trop grand pour exec"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"attention : la valeur %ld pour l'option -s est trop grande, %ld sera "
+"utilisée à la place"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Impossible d'ouvrir le fichier en entrée \"%s\""
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Vos variables d'environnement occupent %<PRIuMAX> octets\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+"Limite supérieure POSIX de longueur d'argument (sur ce système) : "
+"%<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Plus petite limite haute POSIX de longueur d'argument (tous systèmes) "
+"autorisée : %<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+"Longueur maximale de la commande qui pourrait être utilisée : %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Taille du tampon de commande actuellement utilisé : %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"L'exécution de \"xargs\" va maintenant continuer, et tenter de lire les "
+"données en entrée et exécuter les commandes ; si vous ne voulez pas, pressez "
+"<Ctrl-D> (EOF).\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Attention : %s va s'exécuter au moins une fois. Si vous ne voulez pas, "
+"pressez les touches d'interruption.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"guillemets %s non appairés ; par défaut les guillemets sont particuliers à "
+"xargs à moins d'utiliser l'option -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "double"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "simple"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"ATTENTION : un caractère nul est arrivé en entrée. Il ne peut être ajouté à "
+"la liste d'arguments. Vouliez-vous en fait spécifier l'option --null ?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "Ligne de paramètres trop longue"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "échec d'ouverture de /dev/tty en lecture"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "impossible d'ouvrir un tube (pipe) avant le clônage (fork)"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"échec de lecture de errno-buffer dans xargs_do_exec (probablement un bug, "
+"svp signalez-le)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"la lecture a retourné la valeur inattendue %d ; probablement un bug, svp "
+"signalez-le"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "erreur en attendant la fin du processus fils"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "ATTENTION : %d processus fils ne sont plus traçables"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s : a terminé son exécution avec le statut 255 ; arrêt abrupt."
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s : stoppé par le signal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s a terminé son exécution par le signal %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s : l'option -%c contient un nombre non valide\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s : la valeur de l'option -%c devrait être >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s : la valeur de l'option -%c devrait être < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max_lignes] [-l[max_lignes]] [--max-lines[=max_lignes]]\n"
+"       [-I chaîne_rempl] [-i[chaîne_rempl.]] [--replace[=chaîne_rempl.]]\n"
+"       [-n max_args] [--max-args=max_args]\n"
+"       [-s max_chars] [--max-chars=max_caractères]\n"
+"       [-P max_procs]  [--max-procs=max_procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fichier]\n"
+"       [--version] [--help] [command [arguments_initiaux]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "impossible de trouver le répertoire courant"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "argument %s non valide pour %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "argument %s ambigu pour %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Les paramètres valides sont :"
+
+#~ msgid "error closing file"
+#~ msgstr "erreur de fermeture du fichier"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Erreur système inconnue"
+
+#~ msgid "%s: option `%s' is ambiguous\n"
+#~ msgstr "%s: l'option « %s » est ambiguë\n"
+
+#~ msgid "%s: option `--%s' doesn't allow an argument\n"
+#~ msgstr "%s: l'option « --%s » ne requiert pas de paramètre\n"
+
+#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: l'option « %c%s » ne requiert pas de paramètre\n"
+
+#~ msgid "%s: option `%s' requires an argument\n"
+#~ msgstr "%s: l'option « %s » requiert un paramètre\n"
+
+#~ msgid "%s: unrecognized option `--%s'\n"
+#~ msgstr "%s: option non reconnue « --%s »\n"
+
+#~ msgid "%s: unrecognized option `%c%s'\n"
+#~ msgstr "%s: option non reconnue « %c%s »\n"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: option illégale -- %c\n"
+
+#~ msgid "%s: invalid option -- %c\n"
+#~ msgstr "%s: option non valide --%c\n"
+
+#~ msgid "%s: option requires an argument -- %c\n"
+#~ msgstr "%s: l'option requiert un paramètre -- %c\n"
+
+#~ msgid "%s: option `-W %s' is ambiguous\n"
+#~ msgstr "%s: l'option « -W %s » est ambiguë\n"
+
+#~ msgid "%s: option `-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: l'option « -W %s » ne requiert pas de paramètre\n"
+
+#~ msgid "`"
+#~ msgstr "\""
+
+#~ msgid "'"
+#~ msgstr "\""
+
+#~ msgid "Success"
+#~ msgstr "Succès"
+
+#~ msgid "No match"
+#~ msgstr "Pas de concordance"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Expression régulière non valide"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Caractère de fusion non valide"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Nom de classe de caractères non valide"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Barre oblique inverse en suffixe"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Référence arrière non valide"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ ou [^ non appairée"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( ou \\( non appairée"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "\\{ non appairée"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Contenu de \\{\\} non valide"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Fin de l'intervalle non valide"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Mémoire épuisée"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "expression précédant l'expression régulière non valide"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Fin prématurée de l'expression régulière"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Expression régulière trop grande"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") ou \\) non appairée"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Pas d'expression régulière précédente"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[oO]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "mémoire épuisée"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "argument %s%s non valide \"%s\""
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "suffixe non valide dans l'argument %s%s \"%s\""
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "%s%s argument \"%s\" trop grand"
+
+#~ msgid "block size"
+#~ msgstr "taille des blocs"
+
+#~ msgid "level higher in the filesystem hierarchy"
+#~ msgstr "plus haut niveau dans la hiérarchie du système de fichiers"
+
+#~ msgid "levels higher in the filesystem hierarchy"
+#~ msgstr "plus haust niveaux dans la hiérarchie du système de fichiers"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "AVERTISSEMENT: le prédicat -ipath est obsolète; svp utilisez -iwholename "
+#~ "à la place."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "« find » de GNU version %s\n"
+
+#~ msgid "oops -- invalid expression type in mark_stat!"
+#~ msgstr "oups -- type de l'expression est invalide dans mark_stat!"
+
+#~ msgid "oops -- invalid expression type in mark_type!"
+#~ msgstr "oups -- type de l'expression est invalide dans mark_type!"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "avec une longueur cumulaive de %s octets"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\tduquel %s contient des espaces blancs, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s contient des caractères de chariot (newline), "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\tet %s contient des caractères avec le bit du haut mis à un.\n"
+
+#~ msgid "old"
+#~ msgstr "ancien"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate version %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "argument à --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs version %s\n"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Réduction de arg_max (%ld) à arg_size (%ld)\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+#~ msgstr ""
+#~ "actions: -exec COMMANDE ; -fprint FICHIER -fprint0 FICHIER -fprintf "
+#~ "FICHIER FORMAT\n"
+#~ "      -fls FICHIER -ok COMMANDE ; -print -print0 -printf FORMAT -prune -"
+#~ "ls -delete\n"
+#~ "      -quit\n"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Liste des prédicats:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Arbre de l'évaluation:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Arbre optimisé de l'évalution:\n"
+
+#~ msgid "Optimized command line:\n"
+#~ msgstr "Ligne de commande optimisé:\n"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "Mémoire virtuelle épuisée."
+
+#~ msgid "inserting %s\n"
+#~ msgstr "Insertion de %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    type: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "laissé:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "droit:\n"
+
+#~ msgid "[stat called here] "
+#~ msgstr "[stat appelé ici]"
+
+#~ msgid "[type needed here] "
+#~ msgstr "[type est attendu ici]"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Évalution normalisée de l'arborescence:\n"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "Erreur rencontrée dans %s: %s"
+
+#~ msgid ""
+#~ "warning: locate database path `%s' contains a trailing colon, which is "
+#~ "not a valid database name"
+#~ msgstr ""
+#~ "AVERTISSEMENT: le chemin de localisation de la base de données `%s' "
+#~ "contient un ; de queue qui n'est valide dans un nom de base de données"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s a été modifié durant l'exécution de %s"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. a été modifié durant l'exécution de %s"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "Le paramètre %s n'est pas repérable par apostrophe."
+
+#~ msgid "cannot open current directory"
+#~ msgstr "Ne peut ouvrir le répertoire courant."
+
+#~ msgid "wait got pid %d, expected pid %d"
+#~ msgstr "obtenu le pid %d, s'attendait au pid %d"
+
+#~ msgid "%s stopped by signal %d"
+#~ msgstr "%s stoppé par le signal %d"
diff --git a/po/ga.gmo b/po/ga.gmo
new file mode 100644 (file)
index 0000000..7d0f71b
Binary files /dev/null and b/po/ga.gmo differ
diff --git a/po/ga.po b/po/ga.po
new file mode 100644 (file)
index 0000000..e001eba
--- /dev/null
+++ b/po/ga.po
@@ -0,0 +1,1579 @@
+# Irish translations for findutils.
+# This file is distributed under the same license as the findutils package.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Kevin Patrick Scannell <scannell@SLU.EDU>, 2003, 2004, 2005, 2006, 2007,
+# 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.4.0\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2008-03-20 05:47-0500\n"
+"Last-Translator: Kevin Scannell <kscanne@gmail.com>\n"
+"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
+"Language: ga\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : (n>2 && n<7) ? 2 :"
+"(n>6 && n<11) ? 3 : 4;\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "níl an chomhadlann reatha ar fáil"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Rabhadh: bhí córas comhaid %s dífheistithe le gairid."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Rabhadh: bhí córas comhaid %s feistithe le gairid."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"Athraíodh %s%s le linn rith %s (seanuimhir ghléis %ld, uimhir nua gléis %ld, "
+"cineál córas comhad %s) [tag %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"Athraíodh %s%s le linn rith %s (seanuimhir inode %<PRIuMAX>, uimhir nua "
+"inode %<PRIuMAX>, cineál córas comhad %s) [tag %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "níorbh fhéidir dul ar ais go dtí an bunchomhadlann oibre"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Theip ar an gcomhadlann oibre a athrú go %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Tá an nasc siombalach %s cuid de lúb sa chóras chomhadlainne; thugamar "
+"cuairt cheana ar an gcomhadlann lena bhfuil sé nasctha."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Braitheadh lúb sa chóras comhaid; tá an uimhir ghléis agus inode céanna ag "
+"%s agus comhadlann eile atá %d leibhéal níos airde sa chóras comhaid"
+msgstr[1] ""
+"Braitheadh lúb sa chóras comhaid; tá an uimhir ghléis agus inode céanna ag "
+"%s agus comhadlann eile atá %d leibhéal níos airde sa chóras comhaid"
+msgstr[2] ""
+"Braitheadh lúb sa chóras comhaid; tá an uimhir ghléis agus inode céanna ag "
+"%s agus comhadlann eile atá %d leibhéal níos airde sa chóras comhaid"
+msgstr[3] ""
+"Braitheadh lúb sa chóras comhaid; tá an uimhir ghléis agus inode céanna ag "
+"%s agus comhadlann eile atá %d leibhéal níos airde sa chóras comhaid"
+msgstr[4] ""
+"Braitheadh lúb sa chóras comhaid; tá an uimhir ghléis agus inode céanna ag "
+"%s agus comhadlann eile atá %d leibhéal níos airde sa chóras comhaid"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "rabhadh: ní leanfar nasc siombalach %s"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"RABHADH: tá líon na nasc crua mícheart le haghaidh %s (ní fhacthas ach "
+"st_nlink=%d ach chonacthas %d fochomhadlann cheana): seans go bhfuil fabht "
+"le tiománaí do chórais comhaid.  Gníomhachtófar an rogha -noleaf go "
+"huathoibríoch.  Is féidir gur fágadh roinnt comhadlanna ar lár sna torthaí "
+"roimhe seo."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "anaithnid"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Braitheadh lúb sa chóras comhaid; is cuid den lúb chéanna sa chóras comhaid "
+"iad %s agus %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, fuzzy, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "Rabhadh: dealraíonn sé go bhfuil mód 0000 ag comhad %s"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "ní féidir %s a chuardach"
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "níorbh fhéidir dul ar ais go dtí an bunchomhadlann oibre"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"Gníomhachtaíonn an gníomh -delete an rogha -depth, ach ní dhéanann -prune "
+"dada nuair atá -depth i bhfeidhm. Más mian leat dul ar aghaidh mar sin féin, "
+"cuir an rogha -depth san áireamh."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"rabhadh: thug tú an rogha %s i ndiaidh na hargóinte %s nach bhfuil ina "
+"rogha, ach ní bhacann roghanna lena suímh in aon chor (.i. téann %s i "
+"bhfeidhm ar thrialacha ar gach taobh de).  Tabhair na roghanna roimh na "
+"hargóintí eile.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"rabhadh: tá an rogha -d as feidhm; bain úsáid as -depth ina ionad, ós rud é "
+"go bhfuil -depth oiriúnach leis an chaighdeán POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"Níl grúpa ann darb ainm %s, agus ní cosúil le haitheantas uimhriúil grúpa é "
+"toisc go bhfuil an iarmhír ait %s air"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "Níl grúpa ann darb ainm %s"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "argóint fholamh i ndiaidh -group, ba chóir ainm grúpa a thabhairt"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"is an chomhadlann reatha an chonair réamhshocraithe;\n"
+"is `-print' an slonn réamhshocraithe\n"
+"is éard is féidir a bheith sa slonn:\n"
+"oibreoirí, roghanna, trialacha, agus gníomhartha:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"oibreoirí (ord de réir tosaíochta; tá `-and' intuigthe mura bhfuil eile "
+"ann):\n"
+"      ( SLONN )   ! SLONN   -not SLONN   SLONN1 -a SLONN2   SLONN1 -and "
+"SLONN2\n"
+"      SLONN1 -o SLONN2   SLONN1 -or SLONN2   SLONN1 , SLONN2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"roghanna ionaid (fíor i gcónaí): -daystart -follow -regextype\n"
+"\n"
+"gnáthroghanna (fíor i gcónaí, tugtha roimh na sloinn eile):\n"
+"      -depth --help -maxdepth LEIBHÉIL -mindepth LEIBHÉIL -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"trialacha (N = +N, -N, nó N): -amin N -anewer COMHAD -atime N -cmin N\n"
+"      -cnewer COMHAD -ctime N -empty -false -fstype CINEÁL -gid N -group "
+"AINM\n"
+"      -ilname PATRÚN -iname PATRÚN -inum N -iwholename PATRÚN -iregex "
+"PATRÚN\n"
+"      -links N -lname PATRÚN -mmin N -mtime N -name PATRÚN -newer COMHAD"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path PATRÚN -perm [+-]MÓD -regex PATRÚN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATRÚN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user AINM -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"gníomhartha: -delete -print0 -printf FORMÁID -fprintf COMHAD FORMÁID -"
+"print \n"
+"      -fprint0 COMHAD -fprint COMHAD -ls -fls COMHAD -prune -quit\n"
+"      -exec ORDÚ ; -exec ORDÚ {} + -ok ORDÚ ;\n"
+"      -execdir ORDÚ ; -execdir ORDÚ {} + -okdir ORDÚ ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Tabhair tuairisc ar fhabhtanna (agus breathnaigh agus iad á gcur i gceart) "
+"via\n"
+" an leathanach fabhtanna findutils ag http://savannah.gnu.org/ nó, mura "
+"bhfuil\n"
+" rochtain ar an nGréasán agat, seol r-phost chuig <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "theip ar sheiceáil slánchéille don fheidhm leabharlainne fnmatch()."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"rabhadh: níl slaiseanna in ainmneacha comhaid Unix de ghnáth (cé go bhfuil "
+"slaiseanna i gconairí).  Dá bhrí sin, is dócha go luachálfar '%s %s' mar "
+"`falsa' gan teip ar an gcóras seo.  Is féidir go mbeidh an tástáil '-"
+"wholename' níos áisiúla, nó b'fhéidir '-samefile'.  Nó, má tá GNU grep agat, "
+"is féidir 'find ... -print0 | grep -FzZ %s' a úsáid mar mhalairt."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+"Bhíothas ag súil le slánuimhir dheimhneach dheachúlach i ndiaidh %s, ach "
+"fuarthas %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "Ní thugann an córas seo slí ar bith chun breith-am comhaid a aimsiú."
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: tá argóint de dhíth i ndiaidh na rogha `%s'\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Ní féidir ciall a bhaint as %s mar dháta nó mar am"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Níl aon fháil ar bhreith-am comhaid %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Níl mód %s bailí nuair atá POSIXLY_CORRECT ann."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "mód neamhbhailí %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"rabhadh: shonraigh tú patrún móid %s (atá ar comhbhrí le /000).  Athraíodh "
+"an bhrí a bhaineann le `-perm /000' d'fhonn go mbeidh sé i gcomhréir le `-"
+"perm -000'; .i., níor chomhoiriúnaigh sé do chomhad ar bith roimhe seo, ach "
+"comhoiriúnaíonn sé gach uile chomhad anois."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "argóint nialasach neamhbhailí i ndiaidh -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "argóint neamhbhailí `%c' i ndiaidh -size"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Argóint neamhbhailí `%s%c' tar éis -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Glacann rogha -show-control-chars le hargóint aonair, ceann de 'literal' nó "
+"'safe'"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Argóint neamhbhailí %s tar éis -used"
+
+#: find/parser.c:2671
+#, fuzzy, c-format
+msgid "%s is not the name of a known user"
+msgstr "Níl grúpa ann darb ainm %s"
+
+#: find/parser.c:2678
+#, fuzzy, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Ní cheadaítear argóint fholamh i ndiaidh rogha --max-database-age"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Gnéithe arna gcumasú: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Ní cheadaítear ach litir amháin in argóint i ndiaidh -type"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Argóint anaithnid i ndiaidh -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "rabhadh: seicheamh éalúcháin anaithnid `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "earráid: %s ag deireadh an teaghráin fhormáidithe"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "rabhadh: treoir fhormáide anaithnid `%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "earráid: tá treoir fhormáidithe `%%%c' in áirithe don am le teacht"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Tá an chomhadlann reatha san áireamh san athróg thimpeallachta PATH, agus is "
+"neamhdhaingean é seo in éineacht leis an ghníomh %s.  Bain an chomhadlann "
+"reatha as $PATH (.i., bain \".\", nó idirstad ar dtús/i ndeireadh, amach)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Tá conair choibhneasta %s san áireamh san athróg thimpeallachta PATH, agus "
+"is neamhdhaingean é seo in éineacht leis an ghníomh %s.  Bain an chonair sin "
+"as $PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Ní cheadaítear {} mar chuid d'ainm uirlise le -execdir nó -okdir, de bharr "
+"gur neamhdhaingean é seo."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Ní thacaítear ach aon phéire amháin {} le -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Tá an timpeallacht rómhór le haghaidh exec()."
+
+#: find/parser.c:3603
+#, fuzzy, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "róshreabhadh uimhríochta agus deireadh an lae á áireamh"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "róshreabhadh uimhríochta agus deireadh an lae á áireamh"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "gnáth-aschur earráide"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "gnáth-aschur"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "ní féidir %s a scriosadh"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "níorbh fhéidir dul ar ais go dtí an bunchomhadlann oibre"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Rabhadh: ní féidir breith-am an chomhaid %s a aimsiú"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Ní féidir an gnáth-ionchur a dhúnadh"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Theip ar an chomhadlann oibre a athrú"
+
+# "fork" not in standard refs/corpus.  Maybe want a "gabhl*" word instead? -KPS
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "ní féidir forc a dhéanamh"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "earráid ag feitheamh le %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s: stopadh leis an chomhartha %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "slonn neamhbhailí"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"slonn neamhbhailí; tá oibreoir dénártha '%s' in úsáid agat agus níl aon rud "
+"roimhe."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "bhíothas ag súil le slonn idir '%s' agus ')'"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "bhíothas ag súil le slonn tar éis '%s'"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "slonn neamhbhailí; an iomarca ')'"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"slonn neamhbhailí; bhíothas ag súil le ')' ach ní fhaca mé é. B'fhéidir go "
+"bhfuil preideacáid bhreise de dhíth ort tar éis '%s'"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "slonn neamhbhailí; ní cheadaítear lúibíní folmha."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "slonn neamhbhailí; bhíothas ag súil le ')' áit éigin."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "úps! -- is neamhbhailí an cineál sloinn seo!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "úps! -- cineál neamhbhailí sloinn (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "caithfidh conairí a theacht roimh an slonn: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "preideacáid anaithnid `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "preideacáid neamhbhailí `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "argóint neamhbhailí `%s' chun `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "tá argóint de dhíth i ndiaidh na rogha `%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "an iomarca ')' agat"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "preideacáid bhreise gan choinne '%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "preideacáid bhreise gan choinne"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "úps! -- ionsá neamhbhailí de `and'!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Úsáid: %s [-H] [-L] [-P] [-Oleibhéal] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [conair...] [slonn]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "ní féidir an chomhadlann reatha a thaifeadadh"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "ní féidir an chomhadlann reatha a thaifeadadh"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Ag déanamh neamhshuim ar bhratach anaithnid dífhabhtaithe %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Argóint fholamh tar éis rogha -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Ní mór slánuimhir dheachúlach a bheith go díreach tar éis rogha -O"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Sonraigh slánuimhir dheachúlach go díreach tar éis -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Leibhéal neamhbhailí optamaithe %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Leibhéal optamaithe %lu ró-ard. Más mian leat comhaid a aimsiú go tapa, déan "
+"breithniú ar \"GNU locate\"."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Níl an athróg thimpeallachta FIND_BLOCK_SIZE le fáil, níl aon rud ag dul i "
+"bhfeidhm ar an méid bloic ach an athróg thimpeallachta POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "ordú rófhada"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "ní féidir argóint amháin a oiriúnú d'uasmhéid liosta na n-argóintí"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "tá liosta na n-argóintí rófhada"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Tógtha le GNU gnulib, leagan %s\n"
+
+#: lib/safe-atoi.c:76
+#, fuzzy, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "comhadchríoch gan choinne i %s"
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "bhíothas ag súil le slonn tar éis '%s'"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+"Cineál anaithnid sloinn ionadaíochta %s; is iad seo na cineálacha bailí: %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Úsáid: %s [--version | --help]\n"
+"nó     %s bigramanna_níos_coitianta < liosta > locate-bunachar-sonraí\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Seol tuairiscí fabhtanna chuig <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "earráid sa scríobh"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Úsáid: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+"Caithfidh tú an leibhéal slándála a shonrú mar shlánuimhir dheachúlach."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Leibhéal slándála %s lasmuigh den raon intiontaithe."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Iarmhír %s gan choinne ag leibhéal slándála %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "ní thacaítear le leibhéal slándála slocate %ld."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Níorbh fhéidir scríobh ar ghnáth-aschur"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "lá"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Ní cheadaítear argóint fholamh i ndiaidh rogha --max-database-age"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Argóint neamhbhailí %s tar éis --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr "tá ainm comhaid i mbunachar sonraí %s atá rófhada le láimhseáil"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "bunachar sonraí locate %s truaillithe nó neamhbhailí"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Méid an bhunachair sonraí `Locate': %s beart\n"
+msgstr[1] "Méid an bhunachair sonraí `Locate': %s bheart\n"
+msgstr[2] "Méid an bhunachair sonraí `Locate': %s bheart\n"
+msgstr[3] "Méid an bhunachair sonraí `Locate': %s mbeart\n"
+msgstr[4] "Méid an bhunachair sonraí `Locate': %s beart\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Ainmneacha Comhaid Comhoiriúnacha: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Gach Ainm Comhaid: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Is é %s beart fad iomlán na n-ainmneacha comhaid.\n"
+"As na hainmneacha sin,\n"
+"\n"
+"\ttá spás bán i %s acu, \n"
+"\ttá línte nua i %s acu, \n"
+"\tagus carachtair leis an ngiotán is airde socraithe i %s acu.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Seans go ndearnadh scagadh ar roinnt ainmneacha comhaid, agus dá bhrí sin ní "
+"féidir an cóimheas comhbhrúite a aimsiú.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Cóimheas comhbhrúite %4.2f%% (tá cóimheas níos airde níos fearr)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Cóimheas comhbhrúite gan socrú\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"Tá cuma bhunachar sonraí slocate ar %s, ach dealraíonn sé go bhfuil leibhéal "
+"slándála %c air, agus ní thacaíonn GNU findutils leis an leibhéal sin faoi "
+"láthair"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"Is bunachar sonraí \"slocate\" é %s.  Is formáid nua é seo, agus is dócha go "
+"mbeidh fadhbanna leis de thuras na huaire."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"Bunachar sonraí \"slocate\" é %s le leibhéal slándála %d nach dtacaítear "
+"leis; á ligean thart."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Thug tú rogha -E, ach ní cheadaítear an rogha sin le bunachar sonraí slocate "
+"a bhfuil leibhéal deimhneach slándála aige.  Ní ghinfear aon torthaí le "
+"haghaidh an bhunachair sonraí seo.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "Is bunachar sonraí \"slocate\" é %s.  Cuirfear rogha '-e' i ngníomh."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"Neamhbhailí é bunachar sonraí locate %s den seandéanamh; tá sé roghearr"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Bunachar sonraí %s san fhormáid %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Baineann an bunachar sonraí úsáid as ionchódú caolcheannach.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Baineann an bunachar sonraí úsáid as ionchódú mórcheannach.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+"Nílim cinnte an bhfuil an bunachar sonraí mórcheannach nó caolcheannach.\n"
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Úsáid: %s [-d conair | --database=conair] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=CINEÁL]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      patrún...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "theip ar phribhléidí grúpa a ligean síos"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "theip ar phribhléidí setuid a ligean síos"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Theip ar phribhléidí a ligean síos go hiomlán"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "theip ar phribhléidí setgid a ligean síos"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"rabhadh: ní féidir an bunachar sonraí `locale' a léamh ó stdin ach aon uair "
+"amháin."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "theip ar ghlao córais 'time'"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "rabhadh: tá bunachar sonraí %s thar %d %s d'aois (fíoraois: %.1f %s)"
+
+#: locate/word_io.c:96
+#, fuzzy, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr "Rabhadh: tógadh bunachar sonraí locate %s le hord difriúil beart"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "comhadchríoch gan choinne i %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "earráid agus focal á léamh ó %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha; ní "
+"cheadaítear carachtair le luach níos mó ná %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha; ní "
+"cheadaítear carachtair le luach níos mó ná %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha; "
+"carachtair anaithnid %s ag an gcríoch."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Sonrúchán neamhcheadaithe %s ar theormharcóir ionchurtha; caithfidh an "
+"teormharcóir a bheith ina charachtar aonair nó seicheamh éalúcháin le \\ ar "
+"tosach."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "Tá an timpeallacht rómhór á rith"
+
+#: xargs/xargs.c:561
+#, fuzzy, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr "Rabhadh: luach %ld tar éis rogha -s rómhór, úsáidfear %ld ina ionad"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Ní féidir inchomhad %s a oscailt"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Líonann do chuid athróga timpeallachta %lu beart\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Uasluach d'fhad na n-argóintí de réir POSIX (an córas seo): %lu\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Uasluach níos lú d'fhad na n-argóintí a cheadaíonn POSIX (gach córas): %lu\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Uasfhad d'ordú gur féidir linn a úsáid: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Méid an mhaoláin ordaithe atá in úsáid i ndáiríre: %lu\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Rachaidh xargs ar aghaidh anois, agus déanfaidh sé iarracht ar a ionchur a "
+"léamh agus orduithe a rith; mura bhfuil sé seo an rud atá uait, iontráil "
+"carachtar comhadchríche.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Rabhadh: rithfear %s uair amháin ar a laghad.  Mura mian leat é seo, déan "
+"idirbhriseadh anois.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"comhartha athfhriotail %s corr; caitheann xargs le comharthaí athfhriotail "
+"go speisialta mura bhfuil an rogha -0 tugtha agat"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dúbailte"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "singil"
+
+#: xargs/xargs.c:936
+#, fuzzy, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"Rabhadh: chonacthas carachtar NUL san ionchur.  Ní féidir é a chur ar "
+"aghaidh trí liosta na n-argóintí.  An raibh sé ar intinn agat an rogha --"
+"null a úsáid?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "tá líne na n-argóintí rófhada"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "earráid ag feitheamh le próiseas sleachta"
+
+#: xargs/xargs.c:1362
+#, fuzzy, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "Rabhadh: Cailleadh %d próiseas sleachta"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: stádas scortha 255; á thobscor"
+
+# does "stopped" have the implication of "temporarily"?  
+# might then want to distinguish from following msgid... --KPS
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: stopadh leis an chomhartha %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: stopadh leis an chomhartha %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: uimhir neamhbhailí i ndiaidh na rogha -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: caithfidh an luach i ndiaidh na rogha -%c a bheith >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: caithfidh an luach i ndiaidh na rogha -%c a bheith < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Úsáid: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=tm]\n"
+"       [-E teaghrán-eof] [-e[teaghrán-eof]]  [--eof[=teaghrán-eof]]\n"
+"       [-L uas-línte] [-l[uas-línte]] [--max-lines[=uas-línte]]\n"
+"       [-I ionadaí] [-i[ionadaí]] [--replace[=ionadaí]]\n"
+"       [-n uas-args] [--max-args=uas-args]\n"
+"       [-s uas-char] [--max-chars=uas-char]\n"
+"       [-P uas-próis] [--max-procs=uas-próis] [[--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=comhad]\n"
+"       [--version] [--help] [ordú [argóintí-tosaigh]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "níl an chomhadlann reatha ar fáil"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "argóint neamhbhailí %s chun %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "argóint dhébhríoch %s chun %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Na hargóintí bailí:"
+
+#~ msgid "error closing file"
+#~ msgstr "earráid agus comhad á dhúnadh"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Earráid anaithnid an chórais"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: Tá an rogha `%s' débhríoch\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `--%s'\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `%c%s'\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: tá argóint de dhíth i ndiaidh na rogha `%s'\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: rogha anaithnid `--%s'\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: rogha anaithnid `%c%s'\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: rogha neamhbhailí -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: tá argóint de dhíth i ndiaidh na rogha -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: Tá an rogha `-W %s' débhríoch\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `-W %s'\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "D'éirigh leis"
+
+# ugh.  Not clear what kind of things we're matching -- KPS
+#~ msgid "No match"
+#~ msgstr "Níl a leithéid ann"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Slonn ionadaíochta neamhbhailí"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Carachtar neamhbhailí comhordaithe"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Ainm neamhbhailí ar aicme charachtar"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Cúlslais ag deireadh"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Cúltagairt neamhbhailí"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ nó [^ corr"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( nó \\( corr"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "\\{ corr"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Ábhar neamhbhailí idir \\{\\}"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Deireadh raoin neamhbhailí"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Cuimhne ídithe"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Is neamhbhailí an slonn ionadaíochta roimhe seo"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Deireadh le slonn ionadaíochta gan choinne"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Slonn ionadaíochta rómhór"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") nó \\) corr"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Níl aon slonn ionadaíochta roimhe seo"
+
+# allow yes, but also 'i' as in 'is sea' or 's' for 'sea' -- KPS
+# neither of these letters is near the 'N' on standard keyboard...
+#~ msgid "^[yY]"
+#~ msgstr "^[yYiIsS]"
+
+# fortunately, 'n' for 'no' or 'ní hea' - KPS
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "cuimhne ídithe"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "argóint %s%s neamhbhailí `%s'"
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "iarmhír neamhbhailí tar éis argóint %s%s `%s'"
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "argóint %s%s `%s' rómhór"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: rogha neamhcheadaithe -- %c\n"
+
+#~ msgid "%1$s terminated by signal %2$d"
+#~ msgstr "Stopadh %1$s leis an chomhartha %2$d"
+
+#~ msgid ""
+#~ "unmatched double quote; by default quotes are special to xargs unless you "
+#~ "use the -0 option"
+#~ msgstr ""
+#~ "comhartha athfhriotail \" corr; caitheann xargs le comharthaí "
+#~ "athfhriotail go speisialta mura bhfuil an rogha -0 tugtha agat"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "le fad iomlán = %s beart"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\ttá %s beart ina spás bán, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s beart ina línte nua, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\tagus %s beart lena ngiotán níos airde socraithe.\n"
+
+#~ msgid "block size"
+#~ msgstr "méid bloc"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "rabhadh: tá an phreideacáid -ipath as feidhm; bain úsáid as -iwholename "
+#~ "ina hionad, le do thoil."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find, leagan %s\n"
+
+#~ msgid "GNU findutils version %s\n"
+#~ msgstr "GNU findutils, leagan %s\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate, leagan %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "argóint i ndiaidh --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs, leagan %s\n"
+
+#~ msgid "oops -- invalid expression type in mark_stat!"
+#~ msgstr "úps! -- cineál neamhbhailí sloinn i mark_stat!"
+
+#~ msgid "oops -- invalid expression type in mark_type!"
+#~ msgstr "úps! -- cineál neamhbhailí sloinn i mark_type!"
+
+#~ msgid "old"
+#~ msgstr "sean"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Ag laghdú arg_max (%ld) go arg_size (%ld)\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+#~ msgstr ""
+#~ "gníomhartha: -exec ORDÚ; -fprint COMHAD -fprint0 COMHAD -fprintf COMHAD "
+#~ "FORMÁID\n"
+#~ "      -fls COMHAD -ok ORDÚ ; -print -print0 -printf FORMÁID -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Liosta Preideacáidí:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Géagchórais `Eval':\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Géagchóras `Eval' Optamaithe:\n"
+
+#~ msgid "Optimized command line:\n"
+#~ msgstr "Líne na n-orduithe optamaithe:\n"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "cuimhne fhíorúil ídithe"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "ag ionsá %s\n"
+
+# don't know if alignment matters here, so use 4-letter 'sórt' vs. 'cineál'-KPS
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    sórt: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "taobh clé:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "taobh deas:\n"
+
+#~ msgid "[stat called here] "
+#~ msgstr "[glaodh stat anseo] "
+
+#~ msgid "[type needed here] "
+#~ msgstr "[tá gá le cineál anseo] "
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Géagchóras `Eval' Normalaithe:\n"
diff --git a/po/gl.gmo b/po/gl.gmo
new file mode 100644 (file)
index 0000000..19bcd91
Binary files /dev/null and b/po/gl.gmo differ
diff --git a/po/gl.po b/po/gl.po
new file mode 100644 (file)
index 0000000..6260e4d
--- /dev/null
+++ b/po/gl.po
@@ -0,0 +1,1382 @@
+# Galician translation of findutils.
+# Copyright (C) 2000, 2010 Free Software Foundation, Inc.
+# Jesús Bravo Álvarez <jba@pobox.com>, 2000.
+#
+# Se desexas colaborar connosco na traducción de programas libres ó galego,
+# vai mira-la páxina do noso grupo:  http://www.ctv.es/USERS/jtarrio/trans
+#
+# First Version: 2000-02-16 23:49+0100
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.1.5\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2000-05-30 10:11+0200\n"
+"Last-Translator: Jesús Bravo Álvarez <jba@pobox.com>\n"
+"Language-Team: Galician <gpul-traduccion@ceu.fi.udc.es>\n"
+"Language: gl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "non se pode obte-lo directorio actual"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "non se pode voltar ó directorio inicial"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "descoñecido"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "non se pode voltar ó directorio inicial"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"a rota por defecto é o directorio actual; a expresión por defecto é -print\n"
+"expresión pode consistir en:\n"
+"operadores (precedencia decrecente; -and está implícito cando non se "
+"indican\n"
+"outros):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n"
+
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"a rota por defecto é o directorio actual; a expresión por defecto é -print\n"
+"expresión pode consistir en:\n"
+"operadores (precedencia decrecente; -and está implícito cando non se "
+"indican\n"
+"outros):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+
+#: find/parser.c:1239
+#, fuzzy
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"      -cnewer FICHEIRO -ctime N -empty -false -fstype TIPO -gid N -group "
+"NOME\n"
+"      -ilname PATRÓN -iname PATRÓN -inum N -ipath PATRÓN -iregex PATRÓN\n"
+"      -links N -lname PATRÓN -mmin N -mtime N -name PATRÓN -newer FICHEIRO\n"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path PATRÓN -perm [+-]MODO -regex PATRÓN\n"
+"      -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NOME\n"
+"      -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: a opción `%s' require un argumento\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "modo `%s' non válido"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "argumento nulo de -size non válido"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "tipo `%c' de -size non válido"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "argumento `%s' de `%s' non válido"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "argumento `%s' de `%s' non válido"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "aviso: secuencia de escape `\\%c' descoñecida"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "aviso: directiva de formato `%%%c' descoñecida"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "o ambiente é grande de máis para exec"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "non se pode voltar ó directorio inicial"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, fuzzy, c-format
+msgid "Failed to change directory"
+msgstr "non se pode voltar ó directorio inicial"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "non se pode facer fork"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "erro agardando a %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s terminado por sinal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "expresión non válida"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr ""
+
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "expresión non válida"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "ups -- tipo de expresión no válida"
+
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "ups -- tipo de expresión no válida"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "os camiños teñen que preceder á expresión"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "predicado `%s' non válido"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "predicado `%s' non válido"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "argumento `%s' de `%s' non válido"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "non atopado argumento de `%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "predicado `%s' non válido"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "ups -- inserción dun and por defecto non válida"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr ""
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Uso: %s [camiño...] [expresión]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "non se pode obte-lo directorio actual"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "non se pode obte-lo directorio actual"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "aviso: secuencia de escape `\\%c' descoñecida"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "comando longo de máis"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"non se pode encaixar o argumento no límite de tamaño da lista de argumentos"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "lista de argumentos longa de máis"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU find versión %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr ""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr "Uso: %s bigramas_máis_comúns < lista > lista_codificada\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "días"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "argumento %s de `%s' non válido"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr ""
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "aviso: a base de datos `%s' ten máis de %d %s"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "erro agardando a %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "o ambiente é grande de máis para exec"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr ""
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dobre"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "simple"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "liña de argumentos longa de máis"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "erro agardando polo proceso fillo"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: saíu con estado 255; abortando"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: parado por sinal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: terminado por sinal %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: número para a opción -%c non válido\n"
+
+#: xargs/xargs.c:1476
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: o valor para a opción -%c ten que ser >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: o valor para a opción -%c ten que ser < %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Uso: %s [-0prtx] [-e[cadea-eof]] [-i[remprazar-cadea]] [-l[máx-liñas]]\n"
+"     [-n máx-args] [-s máx-cars] [-P máx-procs] [--null] [--eof[=cadea-"
+"eof]]\n"
+"     [--replace[=remprazar-cadea]] [--max-lines[=máx-liñas]] [--"
+"interactive]\n"
+"     [--max-chars=máx-cars] [--verbose] [--exit] [--max-procs=máx-procs]\n"
+"     [--max-args=máx-args] [--no-run-if-empty] [--version] [--help]\n"
+"     [comando [argumentos-iniciais]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "non se pode obte-lo directorio actual"
+
+#, fuzzy
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "argumento %s de `%s' non válido"
+
+#, fuzzy
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "argumento %s de `%s' non válido"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Os argumentos válidos son:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Erro de sistema descoñecido"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: a opción `%s' é ambigua\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: a opción `--%s' non permite ningún argumento\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: a opción `%c%s' non permite ningún argumento\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: a opción `%s' require un argumento\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: opción `--%s' descoñecida\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: opción `%c%s' descoñecida\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: opción non válida -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: a opción require un argumento -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: a opción `-W %s' é ambigua\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: a opción `-W %s' non permite ningún argumento\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "Éxito"
+
+#~ msgid "No match"
+#~ msgstr "O patrón non encaixa"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Expresión regular non válida"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Carácter de ordenación non válido"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Nome de clase de caracteres non válido"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Barra invertida final"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Referencia anterior non válida"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ ou [^ desemparellado"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( ou \\( desemparellado"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "\\{ desemparellado"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Contido de \\{\\} non válido"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Final de rango non válido"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Memoria esgotada"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Expresión regular precedente non válida"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Fin prematura da expresión regular"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Expresión regular longa de máis"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") ou \\) desemparellado"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Non hai unha expresión regular anterior"
+
+#, fuzzy
+#~ msgid "memory exhausted"
+#~ msgstr "Memoria esgotada"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "argumento %s de `%s' non válido"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "argumento %s de `%s' non válido"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "lista de argumentos longa de máis"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opción ilegal -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "tamaño do bloque"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Lista de Predicados:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Árbore de Evaluación:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Árbore de Evaluación Optimizado:\n"
+
+#~ msgid "cannot open current directory"
+#~ msgstr "non se pode abri-lo directorio actual"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "memoria virtual esgotada"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "erro en %s: %s"
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "opcións (sempre certas): -daystart -depth -follow --help\n"
+#~ "      -maxdepth NIVEIS -mindepth NIVEIS -mount -noleaf --version -xdev\n"
+#~ "tests (N pode ser +N ou -N ou N): -amin N -anewer FICHEIRO -atime N -cmin "
+#~ "N\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "accións: -exec COMANDO ; -fprint FICHEIRO -fprint0 FICHEIRO\n"
+#~ "      -fprint FICHEIRO FORMATO ; -ok COMANDO ; -print -print0\n"
+#~ "      -printf FORMATO -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "inserindo %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    tipo: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "esquerda:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "dereita:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Árbore de Evaluación Normalizado:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [--version] [--help]\n"
+#~ "      [-e | --existing] pattern...\n"
+#~ msgstr ""
+#~ "Uso: %s [-d camiño | --database=camiño] [--version] [--help]\n"
+#~ "     [-e | --existing] patrón...\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate versión %s\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs versión %s\n"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "comiña %s desemparellada"
diff --git a/po/hr.gmo b/po/hr.gmo
new file mode 100644 (file)
index 0000000..6baa1b7
Binary files /dev/null and b/po/hr.gmo differ
diff --git a/po/hr.po b/po/hr.po
new file mode 100644 (file)
index 0000000..b8603a0
--- /dev/null
+++ b/po/hr.po
@@ -0,0 +1,1387 @@
+# Translation of GNU findutils.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
+# Hrvoje Niksic <hniksic@xemacs.org>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.1.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2002-04-22 02:04+02:00\n"
+"Last-Translator: Hrvoje Niksic <hniksic@xemacs.org>\n"
+"Language-Team: Croatian <lokalizacija@linux.hr>\n"
+"Language: hr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-2\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "ne mogu saznati trenutni direktorij"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "ne mogu saznati trenutni direktorij"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "nepoznat"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "ne mogu saznati trenutni direktorij"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"podrazumijevana staza je trenutni direktorij; podrazumijevan izraz je -"
+"print\n"
+"izrazi se mogu sastojati od:\n"
+"operatora (po opadajuæem prioritetu; -and je implicitan gdje drugi\n"
+"nisu navedeni):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n"
+
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"podrazumijevana staza je trenutni direktorij; podrazumijevan izraz je -"
+"print\n"
+"izrazi se mogu sastojati od:\n"
+"operatora (po opadajuæem prioritetu; -and je implicitan gdje drugi\n"
+"nisu navedeni):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+
+#: find/parser.c:1239
+#, fuzzy
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"      -cnewer SPIS -ctime N -empty -false -fstype TIP -gid N -group IME\n"
+"      -ilname UZORAK -iname UZORAK -inum N -ipath UZORAK -iregex UZORAK\n"
+"      -links N -lname UZORAK -mmin N -mtime N -name UZORAK -newer SPIS\n"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path UZORAK -perm [+-]MOD -regex UZORAK\n"
+"      -size N[bckw] -true -type [bcdpfls] -uid N -used N -user IME\n"
+"      -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: opcija `%s' tra~i argument\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "neispravan mod `%s'"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "neispravan prazan argument -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "neispravan -size tip `%c'"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "neispravan argument `%s' `%s'-u"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "neispravan argument `%s' `%s'-u"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "upozorenje: nepoznati escape `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "upozorenje: nepoznata format direktiva `%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "okoli¹ je prevelik za exec"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "ne mogu saznati trenutni direktorij"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "ne mogu se forkati"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "gre¹ka pri èekanju na %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s terminiran signalom %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "neispravan izraz"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr ""
+
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "neispravan izraz"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "oops -- neispravan tip izraza!"
+
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "oops -- neispravan tip izraza!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "staze moraju biti navedene prije izraza"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "neispravan predikat `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "neispravan predikat `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "neispravan argument `%s' `%s'-u"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "nedostaje argument `%s'-u"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "neispravan predikat `%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "oops -- neispravno podrazumijevano ubacivanje and-a!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr ""
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Uporaba: %s [staza...] [izraz]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "ne mogu saznati trenutni direktorij"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "ne mogu saznati trenutni direktorij"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "upozorenje: nepoznati escape `\\%c'"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "naredba predugaèka"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"ne mo¾e stati u jedan argument unutar ogranièenja na duljinu liste argumenata"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "popis argumenata predugaèak"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU find verzija %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr ""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr "Uporaba: %s most_common_bigrams < lista > kodirana_lista\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+#, fuzzy
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Prijavljujte gre¹ke na adresu <bug-findutils@gnu.org>."
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dana"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "neispravan argument %s za `%s'"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr ""
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "upozorenje: baza `%s' starija je od %d %s"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "gre¹ka pri èekanju na %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "okoli¹ je prevelik za exec"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr ""
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dvostruki"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "jednostruki"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "linija s argumentima predugaèka"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "gre¹ka za vrijeme èekanja na djeèji proces"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: iza¹ao sa statusom 255; poni¹tavam"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: zaustavljen signalom %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: terminiran signalom %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: neispravan broj za opciju -%c\n"
+
+#: xargs/xargs.c:1476
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: vrijednost opcije -%c mora biti >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: vrijednost opcije -%c mora biti < %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Uporaba: %s [-0prtx] [-e[eof-niz]] [-i[zamjenski-niz]] [-l[maks-redaka]]\n"
+"       [-n maks-argumenata] [-s maks-znakova] [-P maks-procesa] [--null]\n"
+"       [--eof[=eof-niz]] [--replace[=zamjenski-niz]] [--max-lines[=maks-"
+"redaka]]\n"
+"       [--interactive] [--max-chars=maks-znakova] [--verbose] [--exit]\n"
+"       [--max-procs=maks-procesa] [--max-args=maks-argumenata]\n"
+"       [--no-run-if-empty] [--version] [--help]\n"
+"       [naredba [poèetni-argumenti]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "ne mogu saznati trenutni direktorij"
+
+#, fuzzy
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "neispravan argument %s za `%s'"
+
+#, fuzzy
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "dvosmislen argument %s za `%s'"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Valjani argumenti su:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Nepoznata sistemska gre~ka"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: opcija `%s' je dvosmislena\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: uz opciju `--%s' ne ide argument\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: uz opciju `%c%s' ne ide argument\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: opcija `%s' tra~i argument\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: nepoznata opcija `--%s'\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: nepoznata opcija `%c%s'\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: neispravna opcija -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: opcija tra~i argument -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: opcija `-W %s' je dvosmislena\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: opcija `-W %s' ne dopu~ta argument\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "Uspjeh"
+
+#~ msgid "No match"
+#~ msgstr "Nema poklapanja"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Neispravan regularni izraz"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Neispravan kolacijski znak"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Neispravan naziv znakovne klase"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Obrnuta kosa crta na kraju"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Neispravna povratna referenca"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Nesparen [ ili [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Nesparena ( ili \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Nesparena \\{"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Neispravan sadr¾aj \\{\\}"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Neispravan kraj raspona"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Memorija iscrpljena"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Neispravan prethodni regularni izraz"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Prerani kraj regularnog izraza"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Regularni izraz prevelik"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Nesparena ) ili \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Nedostaje prethodni regularni izraz"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[dDyY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#, fuzzy
+#~ msgid "memory exhausted"
+#~ msgstr "Memorija iscrpljena"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "neispravan argument %s za `%s'"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "neispravan argument %s za `%s'"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "popis argumenata predugaèak"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: nedopu~tena opcija -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "veli~ina bloka"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Popis Predikata:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Stablo Evaluacije:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Optimirano Stablo Evaluacije:\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s se promijenio dok se izvr¹avao %s"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "virtualna memorija iscrpljena"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. se promijenio dok se izvr¹avao %s"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "gre¹ka u %s: %s"
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "opcije (uvijek istinite): -daystart -depth -follow --help\n"
+#~ "      -maxdepth NIVOA -mindepth NIVOA -mount -noleaf --version -xdev\n"
+#~ "testovi (N mo¾e biti +N ili -N ili N): -amin N -anewer SPIS -atime N -"
+#~ "cmin N\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "radnje: -exec NAREDBA ; -fprint SPIS -fprint0 SPIS -fprintf FOMAT SPISA\n"
+#~ "      -ok NAREDBA ; -print -print0 -printf FORMAT -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "umeæem %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "     tip: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "lijevo:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "desno:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Normalizirano Stablo Evaluacije:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Usage: %s [-d staza | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] uzorak...\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate verzija %s\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs verzija %s\n"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "nesparen %s navodnik"
diff --git a/po/hu.gmo b/po/hu.gmo
new file mode 100644 (file)
index 0000000..7746bc3
Binary files /dev/null and b/po/hu.gmo differ
diff --git a/po/hu.po b/po/hu.po
new file mode 100644 (file)
index 0000000..c48a603
--- /dev/null
+++ b/po/hu.po
@@ -0,0 +1,1448 @@
+# Hungarian translation of findutils.
+# Copyright (C) 2002, 2006, 2007, 2009, 2010 Free Software Foundation,
+# Inc.
+# This file is distributed under the same license as the findutils package.
+#
+# Emese Kovács <emese@gnome.hu>, 2002.
+# Gabor Kelemen <kelemeng@gnome.hu>, 2006, 2007, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.4.2\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2009-08-02 01:28+0200\n"
+"Last-Translator: Gabor Kelemen <kelemeng@gnome.hu>\n"
+"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
+"Language: hu\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms:  nplurals=2; plural=(n != 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "az aktuális könyvtár elérése sikertelen"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Figyelmeztetés: a fájlrendszer (%s) nemrég le lett választva."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Figyelmeztetés: a fájlrendszer (%s) nemrég csatlakoztatva lett."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"A(z) %s%s megváltozott a(z) %s végrehajtása során (régi eszközszám: %ld, új "
+"eszközszám: %ld, a fájlrendszer típusa: %s) [ref %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"A(z) %s%s megváltozott a(z) %s végrehajtása során (régi inode szám: "
+"%<PRIuMAX>, új inode szám: %<PRIuMAX>, fájlrendszer típusa: %s) [ref %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "a visszatérés meghiúsult a kiinduló munkakönyvtárba"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "A könyvtárváltás meghiúsult ide: %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"A(z) %s szimbolikus link egy hurok része a könyvtárhierarchiában; a program "
+"már bejárta azt a pontot, ahová mutat."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"A rendszer fájlrendszerhurkot észlelt; a(z) %s azonos eszközszámmal és inode-"
+"dal rendelkezik, mint egy, a fájlrendszer-hierarchiában %d szinttel feljebb "
+"lévő könyvtár."
+msgstr[1] ""
+"A rendszer fájlrendszerhurkot észlelt; a(z) %s azonos eszközszámmal és inode-"
+"dal rendelkezik, mint egy, a fájlrendszer-hierarchiában %d szinttel feljebb "
+"lévő könyvtár."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "figyelmeztetés: a(z) %s szimbolikus linket a rendszer nem követi"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"FIGYELMEZTETÉS: A hard linkek száma hibás a következőhöz: %s; (csak st_nlink="
+"%d volt látható, de már %d alkönyvtár be lett járva) ez hibát jelezhet a "
+"fájlrendszer illesztőprogramjában. A find -noleaf kapcsolója automatikusan "
+"bekapcsolva. A korábbi próbálkozások meghiúsulhattak a keresendő könyvtárak "
+"felvételére."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "ismeretlen"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"A rendszer fájlrendszerhurkot észlelt; a(z) %s ugyanannak a "
+"fájlrendszerhuroknak része, mint %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, fuzzy, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "Figyelmeztetés: úgy tűnik, a(z) %s fájl módja 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "%s nem kereshető"
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "a visszatérés meghiúsult a kiinduló munkakönyvtárba"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"A -delete művelet automatikusan engedélyezi a -depth kapcsolót, de a -prune "
+"nem csinál semmit, ha a -depth be van kapcsolva. Ha mindenképp folytatni "
+"akarja, használja a -depth kapcsolót."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"figyelmeztetés: a(z) %s kapcsolót a(z) %s nem kapcsoló argumentum után adtad "
+"meg, de a kapcsolók nem helyzetérzékenyek (a(z) %s hatással van mind az "
+"előtte, mind az utána található tesztekre). A kapcsolókat az egyéb "
+"argumentumok előtt kell megadni.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"figyelmeztetés: a -d kapcsoló elavult; helyette a -depth kapcsoló "
+"használandó, mivel az utóbbi felel meg a POSIX-nak."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s nem egy meglévő csoport neve és nem tűnik numerikus csoportazonosítónak, "
+"mivel a nem várt %s kiterjesztéssel rendelkezik."
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s nem egy meglévő csoport neve"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "a -group argumentuma üres, de egy csoportnévnek kellene lennie"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"az alapértelmezett útvonal az aktuális könyvtár; az alapértelmezett "
+"kifejezés -print, kifejezés lehet:\n"
+"operátorok, kapcsolók, tesztek és tevékenységek:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operátorok (csökkenő precedencia; alapértelmezett -and, ha nincs más "
+"megadva):\n"
+"      ( KIF ) ! KIF -not KIF KIF1 -a KIF2 KIF1 -and KIF2\n"
+"      KIF1 -o KIF2 KIF1 -or KIF2 KIF1 , KIF2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"helyzetérzékeny kapcsolók: (mindig igaz) -daystart -follow -regextype\n"
+"\n"
+"normál kapcsolók (mindig igaz, más kifejezések előtt adandó meg):\n"
+"      -depth --help -maxdepth SZINTEK -mindepth SZINTEK -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"Tesztek (Az N +N, -N vagy N lehet): -amin N -anewer FILE -atime N -cmin N\n"
+"-cnewer FÁJL -ctime N -empty -false -fstype TÍPUS -gid N -group NÉV\n"
+"      -ilname MINTA -iname MINTA -inum N -ipath MINTA -iregex MINTA\n"
+"      -links N -lname MINTA -mmin N -mtime N -name MINTA -newer FÁJL"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path MINTA -perm [+-]MÓD -regex MINTA\n"
+"      -readable -writable -executable\n"
+"      -wholename MINTA -size N[bcwkMG] -true -type [bcdpflsD]\n"
+"      -uid N -used N -user NÉV -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"tevékenységek: -delete -print0 -printf FORMÁTUM -fprintf FÁJL FORMÁTUM -"
+"print\n"
+"      -fprint0 FÁJL -fprint FÁJL -ls -fls FÁJL -prune -quit\n"
+"      -exec PARANCS; -exec PARANCS {} + -ok PARANCS ;\n"
+"      -execdir PARANCS ; -execdir PARANCS {} + -okdir PARANCS ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"A hibákat a findutils hibajelentő oldalán jelentheted be a\n"
+"http://savannah.gnu.org/ címen, vagy e-mailben a <bug-findutils@gnu.org> "
+"címen."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "az fnmatch() könyvtári függvény vizsgálata sikertelen."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"figyelmeztetés: a Unix fájlnevek általában nem tartalmaznak / jeleket (noha "
+"az útvonalnevek igen). Ez azt jelenti, hogy a(z) „%s %s” értéke valószínűleg "
+"mindig hamis lesz ezen a rendszeren. Lehet, hogy a „-wholename” vagy a „-"
+"samefile” tesztet sokkal hasznosabbnak találná. Ennek alternatívájaként, ha "
+"a GNU grep-et használja, akkor használható a következő parancs: „find ... -"
+"print0 | grep -FzZ %s”."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "%s várt pozitív egész argumentuma helyett %s érkezett."
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+"A rendszer nem ad lehetőséget a fájl létrehozási idejének megállapítására."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "A teszthez (%s) argumentum szükséges"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "%s nem értelmezhető dátumként vagy időként"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "A(z) „%s” fájl létrehozási ideje nem kérhető le"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+"A mód (%s) nem érvényes, ha a POSIXLY_CORRECT környezeti változó "
+"engedélyezett."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "érvénytelen mód: %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"figyelmeztetés: a(z) %s módmintát adta meg, amely azonos a /000-val. A -"
+"perm /000 jelentése módosult, így összhangba került a -perm -000-val, azaz "
+"míg korábban nem illeszkedett egyetlen fájlra sem, most az összes fájlra "
+"illeszkedik."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "érvénytelen null argumentum a -size kapcsolónál"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "a -size típusa („%c”) érvénytelen"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "A(z) „%s%c” argumentum érvénytelen a -size kapcsolóhoz"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"A -show-control-chars kapcsoló egyetlen paramétert vár, amely a „literal” "
+"vagy „safe” egyike lehet"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "a(z) „%s” argumentum érvénytelen a -used kapcsolóhoz"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s nem egy ismert felhasználó neve"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "A -user argumentuma nem lehet üres"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Engedélyezett szolgáltatások: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "A -type argumentumai csak egy betűt tartalmazhatnak"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "A -type argumentuma ismeretlen: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "figyelmeztetés: ismeretlen escape: „\\%c”"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "hiba: %s a formátum-karaktersorozat végén"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "figyelmeztetés: ismeretlen formátum-előírás: „%%%c”"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+"hiba: a „%%%c” formátumdirektíva fenn van tartva a jövőbeli használatra"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Az aktuális könyvtárat tartalmazza a PATH környezeti változó, amely nem "
+"biztonságos kombináció a find %s műveletével. Távolítsa el az aktuális "
+"könyvtárat a $PATH változóból (azaz a pontot vagy a kezdő/záró "
+"pontosvesszőt)."
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"A(z) %s relatív útvonalat tartalmazza a PATH környezeti változó, amely nem "
+"biztonságos a find %s műveletével kombinálva. Távolítsa el ezt a bejegyzést "
+"a $PATH változóból."
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"A {} jel nem használható a -execdir és -okdir segédprogramjának nevében, "
+"mivel ez egy lehetséges biztonsági probléma."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Csak egyetlen {} példány támogatott a -exec%s ... + esetén"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "A környezet túl nagy az exec() híváshoz."
+
+#: find/parser.c:3603
+#, fuzzy, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "túlcsordulás a mai nap végének kiszámítására tett kísérlet közben"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "túlcsordulás a mai nap végének kiszámítására tett kísérlet közben"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "szabványos hibakimenet"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "szabványos kimenet"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "%s nem törölhető"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "a visszatérés meghiúsult a kiinduló munkakönyvtárba"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Figyelmeztetés: a(z) %s fájl létrehozási dátuma nem állapítható meg"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "A szabványos bemenet nem zárható le"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "A könyvtárváltás meghiúsult"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "fork() rendszerhívás sikertelen"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "hiba a következőre várakozás közben: %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s leállítva %d szignállal"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "érvénytelen kifejezés"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"érvénytelen kifejezés; bináris operátort („%s”) használtál úgy, hogy semmi "
+"nem volt előtte."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "a program kifejezést várt a(z) „%s” és „)” között"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "a program kifejezést várt a(z) „%s” után"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "érvénytelen kifejezés; túl sok ) karaktert tartalmaz"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"érvénytelen kifejezés; a program egy „)” jelre számított, de nem találta "
+"meg. Lehet, hogy egy további predikátum szükséges a(z) „%s” után."
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "érvénytelen kifejezés; az üres zárójelek nem engedélyezettek."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"érvénytelen kifejezés; a program egy ) jelre számított, de nem találta meg."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "hoppá -- érvénytelen kifejezéstípus!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "hoppá -- érvénytelen kifejezéstípus (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "az útvonalaknak meg kell előzniük a kifejezést: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "ismeretlen predikátum: „%s”"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "érvénytelen predikátum: „%s”"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "A(z) „%s” argumentum érvénytelen a következőhöz: %s"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "A(z) „%s” argumentuma hiányzik"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "túl sok „)” karaktert tartalmaz"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "váratlan extra predikátum: „%s”"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "váratlan extra predikátum"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "hoppá -- az and alapértelmezett beszúrása érvénytelen!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Használat: %s [-H] [-L] [-P][-Oszint] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [útvonal...] [kifejezés]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "az aktuális munkakönyvtár feljegyzése meghiúsult"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "az aktuális munkakönyvtár feljegyzése meghiúsult"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Az ismeretlen hibakereső jelző figyelmen kívül marad: %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "A -D kapcsoló paramétere üres."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+"A -O kapcsolót azonnal egy tízes számrendszerbeli egésznek kell követnie"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Közvetlenül a -O után adjon meg egy tízes számrendszerbeli egészet"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Érvénytelen optimalizálási szint: %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"A(z) %lu optimalizálási szint túl nagy. Ha nagyon gyorsan akar fájlokat "
+"megtalálni, akkor használja a GNU locate programot."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"A FIND_BLOCK_SIZE környezeti változó nem támogatott, egyedül a "
+"POSIXLY_CORRECT környezeti változó befolyásolja a blokkméretet."
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "a parancs túl hosszú"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "egy argumentum nem fér el az argumentumlista méretkorlátjába"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "az argumentumlista túl hosszú"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Készült a GNU gnulib %s verzió használatával\n"
+
+#: lib/safe-atoi.c:76
+#, fuzzy, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "váratlan fájlvége ebben: %s"
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "a program kifejezést várt a(z) „%s” után"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Ismeretlen reguláriskifejezés-típus: %s; az érvényes típusok: %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Használat: %s [--version | --help]\n"
+"vagy %s most_common_bigrams < fájllista > locate-adatbázis\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"A hibák a <bug-findutils@gnu.org> címen jelenthetők.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "íráshiba"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Használat: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "A biztonsági szintet tízes alapú egészként kell megadni."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "A biztonsági szint (%s) kívül esik az átalakítható tartományon."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "A biztonsági szint (%s) váratlan utótaggal rendelkezik: %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "a megadott slocate biztonsági szint (%ld) nem támogatott."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Az írás meghiúsult a szabványos kimenetre"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "nap"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "a --max-database-age kapcsoló argumentuma nem lehet üres"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "A(z) „%s” argumentum érvénytelen a --max-database-age kapcsolóhoz"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"a(z) %s locate adatbázis a locate által kezelhetőnél hosszabb fájlnevet "
+"tartalmaz"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "a(z) „%s” locate adatbázis sérült vagy érvénytelen"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "A locate adatbázis mérete: %s bájt\n"
+msgstr[1] "A locate adatbázis mérete: %s bájt\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Illeszkedő fájlnevek: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Minden fájlnév: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"A fájlnevek összesített hossza %s bájt.\n"
+"Ezek közül\n"
+"\n"
+"\t%s tartalmaz üres hely karaktert,\n"
+"\t%s tartalmaz új sor karaktert,\n"
+"\tés %s tartalmaz beállított magas bittel rendelkező karaktert.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Egyes fájlnevek lehet, hogy ki lettek szűrve, így nem számítható ki a "
+"tömörítési arány.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Tömörítési arány: %4.2f%% (a nagyobb jobb)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "A tömörítési arány nincs megadva\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"a(z) „%s” locate adatbázis slocate adatbázisnak tűnik, azonban a biztonsági "
+"szintje %c, amit a GNU findutils jelenleg nem támogat"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"a(z) „%s” egy slocate adatbázis. Ezek támogatása új, jelenleg problémák "
+"lehetnek vele."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"a(z) „%s” egy nem támogatott biztonsági szintű (%d) slocate adatbázis; "
+"figyelmen kívül marad"
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"A -E kapcsoló került megadásra, de ez nem használható az slocate formátumú, "
+"nem nulla biztonsági szintű adatbázisokkal. Ebből az adatbázisból nem "
+"lesznek találatok előállítva.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "a(z) „%s” egy slocate adatbázis. A -e kapcsoló engedélyezve lesz."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"A régi formátumú %s locate adatbázis túl rövid ahhoz, hogy érvényes legyen"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "A(z) %s adatbázis %s formátumú.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Az adatbázis gépiszó-kódolása kis endian.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Az adatbázis gépiszó-kódolása nagy endian.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Az adatbázis gépiszó-kódolási sorrendje nem nyilvánvaló.\n"
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Használat: %s [-d útvonal | --database=útvonal] [-e | -E | --[non-]"
+"existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TÍPUS]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      minta...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "a csoport jogosultságainak eldobása meghiúsult"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "a setuid jogosultságok eldobása meghiúsult"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "A jogosultságok teljes eldobása meghiúsult"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "a setgid jogosultságok eldobása meghiúsult"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"figyelmeztetés: a locate adatbázis csak egyszer olvasható a szabvány "
+"bemenetről."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "a time rendszerhívás meghiúsult"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"figyelmeztetés: a(z) „%s” adatbázis régebbi %d %s napnál (a tényleges kor "
+"%.1f %s)"
+
+#: locate/word_io.c:96
+#, fuzzy, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr "Figyelmeztetés: a(z) %s locate adatbázis eltérő bájtsorrenddel készült"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "váratlan fájlvége ebben: %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "hiba szó olvasásakor a következőből: %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+"A(z) „%s” escape sorozat érvénytelen a bemenet elhatárolójának "
+"meghatározásában."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"A(z) „%s” escape sorozat érvénytelen a bemenet elhatárolójának "
+"meghatározásában; a karakterértékek nem léphetik túl a(z) %lx értéket."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"A(z) „%s” escape sorozat érvénytelen a bemenet elhatárolójának "
+"meghatározásában; a karakterértékek nem léphetik túl a(z) %lo értéket."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"A(z) „%s” escape sorozat érvénytelen a bemenet elhatárolójának "
+"meghatározásában ;a(z) %s záró karaktereket a program nem ismerte fel."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"A bemenet elhatárolójának „%s” meghatározása érvénytelen: az elhatároló vagy "
+"egy karakter, vagy egy \\ kezdetű escape sorozat kell legyen."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "a környezet túl nagy az exec-hez"
+
+#: xargs/xargs.c:561
+#, fuzzy, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"Figyelmeztetés: a -s kapcsoló %ld értéke túl nagy, helyette a(z) %ld kerül "
+"felhasználásra"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "A bemeneti fájl (%s) nem nyitható meg"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "A környezeti változói %lu bájtot foglalnak\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+"A POSIX felső korlátja az argumentum hosszára (ezen a rendszeren): %lu\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"A POSIX által megengedhető legkisebb korlát az argumentum hosszára (minden "
+"rendszeren): %lu\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "A ténylegesen használható parancs maximális hossza: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "A ténylegesen használt parancspuffer hossza: %lu\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Az xargs végrehajtása most folytatódik, és megpróbálja beolvasni a bemenetét "
+"és végrehajtani a parancsokat; ha nem ezt akarta, akkor nyomja meg a fájl "
+"vége billentyűkombinációt.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Figyelmeztetés: %s legalább egyszer lefut. Ha nem akarja, hogy ez "
+"megtörténjen, akkor nyomja meg a megszakítás kombinációt.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"pár nélküli %s idézőjel; alapértelmezésben az idézőjelek speciálisak az "
+"xargs számára, hacsak nem használja a -0 kapcsolót"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "kettős"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "egyszeres"
+
+#: xargs/xargs.c:936
+#, fuzzy, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"Figyelmeztetés: NULL karakter fordult elő a bemenetben. Az argumentumlistán "
+"keresztül ez nem adható át. Lehet, hogy a --null kapcsolót akarta használni?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "az argumentumsor túl hosszú"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "hiba a gyermekfolyamatra való várakozás közben"
+
+#: xargs/xargs.c:1362
+#, fuzzy, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "Figyelmeztetés: %d gyermekfolyamatnak nyoma veszett"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: kilépési értéke 255; megszakítás"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: %d szignállal leállítva (stopped)"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: %d szignállal leállítva (terminated)"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: érvénytelen szám a -%c kapcsolóhoz\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: a -%c kapcsoló értéke >= %ld kell legyen\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: a -%c kapcsoló értéke < %ld kell legyen\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Használat: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=elhat]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-sor] [-l[max-sor]] [--max-lines[=max-sor]]\n"
+"       [-I csere-kar] [-i[csere-kar]] [--replace[=csere-kar]]\n"
+"       [-n max-arg] [--max-args=max-arg]\n"
+"       [-s max-kar] [--max-chars=max-kar]\n"
+"       [-P max-proc] [--max-procs=max-proc] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fájl]\n"
+"       [--version] [--help] [parancs [induló-argumentumok]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "az aktuális könyvtár beolvasása sikertelen"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "az argumentum (%s) szabálytalan a következőhöz: %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "a(z) „%s” argumentum nem egyértelmű a következőhöz: „%s”"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Az érvényes argumentumok a következők:"
+
+#~ msgid "error closing file"
+#~ msgstr "hiba a fájl lezárásakor"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Ismeretlen rendszerhiba"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: a(z) „%s” kapcsoló nem egyértelmű\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: a(z) „--%s” kapcsoló nem enged meg argumentumot\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: a(z) „%c%s” kapcsoló nem enged meg argumentumot\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: a(z) „%s” kapcsolóhoz argumentum szükséges\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: a(z) „--%s” kapcsoló ismeretlen\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: a(z) „%c%s” kapcsoló ismeretlen\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: érvénytelen kapcsoló -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: a kapcsoló egy argumentumot igényel -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: a „-W %s” kapcsoló nem egyértelmű\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: a „-W %s” kapcsoló nem enged meg argumentumot\n"
+
+#~ msgid "`"
+#~ msgstr "„"
+
+#~ msgid "'"
+#~ msgstr "”"
+
+#~ msgid "Success"
+#~ msgstr "Sikerült"
+
+#~ msgid "No match"
+#~ msgstr "Nincs találat"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Érvénytelen szabályos kifejezés"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Érvénytelen leválogatási karakter"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "érvénytelen karakterosztálynév"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Záró visszaper"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Érvénytelen visszahivatkozás"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Pár nélküli [ vagy [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Pár nélküli ( vagy \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Pár nélküli \\{"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "A \\{\\} tartalma érvénytelen"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Érvénytelen tartományvég"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Elfogyott a memória"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Érvénytelen megelőző szabályos kifejezés"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "A szabályos kifejezés túl korán véget ért"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "A szabályos kifejezés túl nagy"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Pár nélküli ) vagy \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Nincs megelőző szabályos kifejezés"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[iIyY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "elfogyott a memória"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "érvénytelen %s%s argumentum: „%s”"
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "érvénytelen utótag a(z) %s%s argumentumban: „%s”"
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "%s%s: a(z) „%s” argumentum túl nagy"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: szabálytalan kapcsoló -- %c\n"
diff --git a/po/id.gmo b/po/id.gmo
new file mode 100644 (file)
index 0000000..7ce205c
Binary files /dev/null and b/po/id.gmo differ
diff --git a/po/id.po b/po/id.po
new file mode 100644 (file)
index 0000000..c1063ab
--- /dev/null
+++ b/po/id.po
@@ -0,0 +1,1516 @@
+# Pesan bahasa indonesia untuk findutils
+# Copyright (C) 2001, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Tedi Heriyanto <tedi_h@gmx.net>, 1999, 2002.
+# Arif E. Nugroho <arif_endro@yahoo.com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.4.0\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2008-11-09 12:30+0700\n"
+"Last-Translator: Arif E. Nugroho <arif_endro@yahoo.com>\n"
+"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
+"Language: id\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "tidak dapat memperoleh statistik direktori saat ini"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Peringatan: sistem berkas %s baru saja telah diunmount."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Peringatan: sistem berkas %s barus seja telah dimount."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s berubah selama eksekusi dari %s (nomor perangkat lama %ld, nomor "
+"perangkat baru %ld, tipe sistem berkas adalah %s) [ref %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s berubah selama eksekusi dari %s (nomor inode lama %<PRIuMAX>, nomor "
+"inode baru %<PRIuMAX>, tipe sistem berkas adalah %s) [ref %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "gagal untuk kembali ke direktori kerja inisial"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Gagal untuk secara aman mengubah direktori kedalam %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Link simbolik %s adalah bagian dari sebuah loop dalam hierarki direktori; "
+"kita telah mengunjungi direktori yang telah ditunjuk."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Sistem berkas loop terdeteksi; %s memiliki nomor perangkat sama dan inode "
+"sebagai sebuah direktori yang memiliki %d tingkat lebih tinggi dalam "
+"hierarki sistem berkas"
+msgstr[1] ""
+"Sistem berkas loop terdeteksi; %s memiliki nomor perangkat sama dan inode "
+"sebagai sebuah direktori yang memiliki %d tingkat lebih tinggi dalam "
+"hierarki sistem berkas"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "peringatan: tidak mengikuti link simbolik %s"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"PERINGATAN: Jumlah hard link salah untuk %s (hanya terlihat st_nlink=%d "
+"tetapi kita telah melihaat %d subdirektori): ini mungkin sebuah bug dalam "
+"driver sistem berkas. Secara otomatis mengaktifkan opsi -noleaf. Hasil "
+"sebelumnya mungkin gagal untuk memasukan direktori yang seharusnya telah "
+"dicari."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "tidak diketahui"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Sistem berkas loop terdeteksi; %s adalah bagian dari sistem berkas loop yang "
+"sama seperti %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, fuzzy, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "Peringatan: berkas %s kelihatannya memiliki mode 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "tidak dapat mencari %s"
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "gagal untuk kembali ke direktori kerja inisial"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"aksi -delete secara otomatis mengaktifkan -depth, tetapi -prune tidak "
+"melakukan apapun ketika -depth dalam efek. Jika anda ingin tetap "
+"melanjutkan, hanya secara eksplisit gunakan opsi -depth."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"peringatan: anda telah menspesifikasikan opsi %s seteleh argumen bukan opsi "
+"%s, tetapi opsi bukan posisional (%s mempengaruhi pemeriksaan yang "
+"dispesifikasikan sebelumnya juga untuk yang dispesifikasikan sesudahnya). "
+"Mohon spesifikasikan opsi sebelum argumen yang lain.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"peringatan: opsi -d sudah ditinggalkan; lebih baik gunakan -depth, karena "
+"ini adalah featur dari POSIX-komplian."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s bukan nama dari grup yang sudah ada dan ini tidak seperti sebuah numerik "
+"grup ID karena ini memiliki akhiran %s yang tidak terduga"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s bukan nama dari grup yang sudah ada"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "argumen ke -grup adalah kosong, tetapi seharusnya sebuah nama grup"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"Path default adalah direktori saat ini; ekspresi default adalah -print\n"
+"ekspresi boleh terdiri dari: opertors, options, tests, dan actions:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operator (urutan menurun; -and adalah implisit bila tidak ada yang lain):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"opsi posisi (selalu benar): -daystart -follow -regextype\n"
+"\n"
+"opsi normal (selalu benar, dispesifikasikan sebelum opsi lain):\n"
+"      -depth --help -maxdepth TINGKAT -mindept TINGKAT -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_rage -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"tests (N dapat berupa +N atau -N atau N): -amin N -anewer BERKAS -atime N -"
+"cmin N\n"
+"      -cnewer BERKAS -ctime N -empty -false -fstype TIPE -gid N -group NAMA\n"
+"      -ilname POLA -iname POLA -inum N -iwholename POLA -iregex POLA\n"
+"      -links N -lname POLA -mmin N -mtime N -name POLA -newer BERKAS"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path POLA -perm [+-]MODE -regex POLA\n"
+"      -readable -writeable -executable\n"
+"      -wholename POLA -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"aksi: -delete -print0 -printf FORMAT -fprintf BERKAS FORMAT -print \n"
+"'     -fprint0 BERKAS -fprint BERKAS -ls -fls BERKAS -prune -quit\n"
+"      -exec PERINTAH; -exec PERINTAH {} + -ok PERINTAH ;\n"
+"      -execdir PERINTAH ; -execdir PERINTAH {} + -okdir PERINTAH ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Laporkan (dan telusuri perkembangan dalam perbaikan) bugs melalui findutils\n"
+"halaman pelaporan bugs di http://savannah.gnu.org/ atau, jika anda tidak \n"
+"akses web, dengan mengirimkan email ke <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "pemeriksaan keadaan dari fungsi perpustakaan fnmatch() gagal."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"peringatan: Nama berkas unix biasanya tidak berisi slashes (walaupun nama "
+"jalur biasanya memakai). Itu berarti '%s %s' mungkin akan dievaluasikan ke  "
+"salah untuk setiap saat di sistem ini. Anda mungkin menemukan pemeriksaan '-"
+"wholename' lebih berguna, atau mungkin '-samefile'. Alternatifnya, jika anda "
+"menggunakan GNU grep, anda dapat menggunakan 'find ... -print0 | grep -FzZ "
+"%s'."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+"Diduga sebuah argumen desimal integer positif ke %s, tetapi diperoleh %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+"Sistem ini tidak menyediakan sebuah cara untuk menemukan waktu pembuatan "
+"dari sebuah berkas."
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: opsi `%s' membutuhkan sebuah argumen\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+"Saya tidak dapat menemukan bagaimana menginterprestasikan %s sebagai sebuah "
+"tanggal atau waktu"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Tidak dapat memperoleh waktu pembuatan dari berkas %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Mode %s adalah tidak valid ketika POSIXLY_CORRECT aktif."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "mode %s tidak valid"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"peringatan: anda telah menspesifikasikan sebuah mode pola %s (yang sama "
+"dengan /000). Arti dari -perm /000 sekaran telah berubah untuk konsisten "
+"dengan -perm -000; yang artinya, ketika ini digunakan untuk mencocokan bukan "
+"berkas, sekarang ini cocok kesemua berkas."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "Null argument tidak valid untuk -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "Type `%c' -size tidak valid"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "argumen `%s%c' tidak valid untuk -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Opsi -show-control-chars mengambil sebuah argumen tunggal yang harus berupa "
+"'literal' atau 'safe'"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "argumen %s tidak valid untuk -used"
+
+#: find/parser.c:2671
+#, fuzzy, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s bukan nama dari grup yang sudah ada"
+
+#: find/parser.c:2678
+#, fuzzy, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Argumen untuk opsi --max-database-age tidak boleh kosong"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Featur aktif: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Argumen ke -type seharusnya hanya berisi satu kata"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Argumen ke -type: %c tidak diketahui"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "peringatan: escape `\\%c' tidak dikenal"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "error: %s diakhir dari format string"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "peringatan: format direktif `%%%c' tidak dikenal"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "error: format direktif `%%%c' direserve untuk penggunaan masa datang"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Direktori sekarang dimasukan dalam variabel lingkungan PATH, yang mana tidak "
+"aman dalam kombinasi dengan %s aksi untuk find. Mohon hapus direktori "
+"sekarang dari $PATH anda (hapus \".\" atau diawali atau diakhir kolon)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Jalur relatif %s dimasukan dalam variabel lingkungan PATH, yang mana tidak "
+"aman dalam kombinasi dengan %s aksi dari find. Mohon hapus masukan itu dari "
+"$PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Anda tidak boleh menggunakan {} didalam nama utilitas untuk -execdir dan -"
+"okdir, karena ini ada potensial untuk masalah keamanan."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Hanya satu instance dari {} yang didukung dengan -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Lingkungan terlalu besar untuk exec()."
+
+#: find/parser.c:3603
+#, fuzzy, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+"aritmetik overflow ketika mencoba untuk mengkalkulasi akhir dari hari ini"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+"aritmetik overflow ketika mencoba untuk mengkalkulasi akhir dari hari ini"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standar error"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standar keluaran"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "tidak dapat menghapus %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "gagal untuk kembali ke direktori kerja inisial"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Peringatan: tidak dapat menentukan waktu pembuatan dari berkas %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Tidak dapat menutup standar masukan"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Gagal untuk berpindah direktori"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "tidak dapat mem-fork"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "Kesalahan waiting untuk %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s di-terminate oleh sinyal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "ekspresi tidak valid"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"ekspresi tidak valid; anda telah menggunakan sebuah operator binari '%s' "
+"dengan tidak ada sebelumnya."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "diduga sebuah akspresi diantara '%s' dan ')'"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "diduga sebuah ekspresi setelah '%s'"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "ekspresi tidak valid; anda memiliki terlalu banyak ')'"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"ekspresi tidak valid; diduga untuk menemukan sebuah ')' tetapi tidak melihat "
+"satu. Mungkin anda butuh sebuah predikate lebih setelah '%s'"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "ekspresi tidak valid; tanda kurung kosong tidak diperbolehkan."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"ekspresi tidak valid; Saya menduga untuk menemukan sebuah ')' disuatu tempat "
+"tetapi tidak melihat satu pun."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "oops -- tipe ekspresi tidak valid!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "oops -- tipe ekspresi tidak valid (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "jalur harus mendahului ekspresi: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "predikat `%s' tidak diketahui"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "predikat `%s' tidak valid"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "argumen `%s' tidak valid untuk `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "argumen hilang untuk `%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "anda memiliki terlalu banyak ')'"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "ekstra predikat `%s' tidak diduga"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "ekstra predikat tidak diduga"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "oops -- penyisipan and baku tidak valid!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Penggunaan: %s [-H] [-L] [-P] [-Otingkat] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [jalur...] [ekspresi]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "tidak dapat merekam direktori kerja sekarang"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "tidak dapat merekam direktori kerja sekarang"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Mengabaikan tanda debug %s tidak dikenal"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Argumen kosong ke opsi -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Opsi -D harus secara langsung diikuti oleh sebuah integer desimal"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Mohon spesifikasikan sebuah nomor desimal setelah -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Tingkat optimisasi %s tidak valid"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Tingkat optimisasi %lu terlalu tinggi. Jika anda ingin menemukan berkas "
+"secara cepat, pertimbangkan menggunakan GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Variabel lingkungan FIND_BLOCK_SIZE tidak didukung, sesuatu yang hanya "
+"mempengaruhi ukuran blok adalah variabel lingkungan FIND_BLOCK_SIZE"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "perintah terlalu panjang"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "tidak dapat memuat argumen dalam batasan daftar argumen"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "daftar argumen terlalu panjang"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Dibuat menggunakan GNU gnulib versi %s\n"
+
+#: lib/safe-atoi.c:76
+#, fuzzy, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "tidak terduga EOF dalam %s"
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "diduga sebuah ekspresi setelah '%s'"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Tipe ekspresi regular %s tidak diketahui; tipe yang valid adalah %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Penggunaan: %s [--version | --help]\n"
+"atau        %s most_common_bigrams < daftar-berkas > lokasi-basis-data\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Laporkan bug ke <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "error menulis"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Penggunaan: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+"Anda perlu menspesifikasikan sebuah tingkat keamanan sebagai sebuah desimal "
+"integer."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Tingkat keamanan %s diluar dari jangkauan covertible."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Tingkat keamanan %s memiliki akhiran tidak diduga %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "tingkat keamanan slocate %ld tidak didukung."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Gagal untuk menulis ke standar keluaran"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "hari"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Argumen untuk opsi --max-database-age tidak boleh kosong"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "argumen %s tidak valid untuk opsi --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"basis data locate %s berisi sebuah nama berkas lebih panjang dari yang dapat "
+"ditangani oleh locate"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "basis data locate %s terkorupsi atau tidak valid"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Ukuran basis data locate: %s byte\n"
+msgstr[1] "Ukuran basis data locate: %s byte\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Nama berkas cocok: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Seluruh nama berkas: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Nama berkas yang memiliki panjang kumulatif dari %s bytes.\n"
+"Dari nama berkas tersebut,\n"
+"\n"
+"\t%s berisi spasi, \n"
+"\t%s berisi karakter baris-baru, \n"
+"\tdan %s berisi karakter dengan high bit set.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Beberapa nama berkas mungkin telah difilter keluar, jadi kita tidak dapat "
+"menghitup rasio kompresi.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Rasio kompresi %4.2f%% (lebih tinggi lebih baik)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Rasio kompresi tidak didefinisikan\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"basis data locate %s seperti sebuah basis data slocate tetapi ini sepertinya "
+"memiliki tingkat keamanan %c, yang mana GNU findutils saat ini belum "
+"mendukungnya"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s adalah sebuah basis data slocate. Dukungan untuk ini adalah baru, diduga "
+"akan ada masalah untuk sekarang."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s adalah sebuah basis data slocate yang tidak mendukung tingkat keamanan "
+"%d; melewatkannya."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Anda menspesifikasikan opsi -E, tetapi opsi tersebut tidak dapat digunakan "
+"dengan format basis data slocate dengan sebuah tingkat keamanan yang tidak "
+"nol. Tidak akan ada hasil yang dibuat untuk basis data ini.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s adalah sebuah basis data slocate. Mengaktifkan opsi '-e'."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "Format lama basis data locate %s terlalu pendek untuk menjadi valid"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Basis data %s berada dalam format %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Basis data memiliki pengkodean bahasa mesin little-endian.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "basis data memiliki pengkodean bahasa mesin big-endian.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Pengkodean basis data pengurutan bahasa mesin tidak jelas.\n"
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Penggunaan: %s [-d jalur | --database=jalur] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pola...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "gagal untuk mendrop kewenangan grup"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "gagal untuk mendrop kewenangan setuid"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "gagal untuk secara lengkap mendrop kewenangan"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "gagal untuk mendrop kewenangan setgid"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr "peringatan: basis data locate hanya dapat dibaca dari stdin sekali."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "time pemanggilan sistem gagal"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"peringatan: basis data %s berumur lebih dari %d %s (umur aktual adalah %.1f "
+"%s)"
+
+#: locate/word_io.c:96
+#, fuzzy, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+"Peringatan: basis data locate %s telah dibuat dengan pengurutan byte yang "
+"berbeda"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "tidak terduga EOF dalam %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "error pembacaan sebuah kata dari %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Escape sequence %s tidak valid dalam spesifikasi pembatas masukan."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Escape sequence %s tidak valid dalam spesifikasi pembatas masukan; nilai "
+"karakter tidak boleh melebihi %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Escape sequence %s tidak valid dalam spesifikasi pembatas masukan; nilai "
+"karakter tidak boleh melebihi %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Escape sequence %s tidak valid dalam spesifikasi pembatas masukan; akhira "
+"karakter %s tidak dikenal."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Spesifikasi pembatasi masukan %s tidak valid; pembatas harus baik sebuah "
+"karakter tunggal atau sebuah urutan escape dimulai dengan \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "lingkungan terlalu besar untuk exec"
+
+#: xargs/xargs.c:561
+#, fuzzy, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"Peringatan: nilai %ld untuk opsi -s terlalu besar, lebih baik menggunakan %ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Tidak dapat membuka berkas masukan %s"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Variabel lingkungan anda mengambil %lu byte\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "batas atas POSIX dalam panjang argumen (di sistem ini): %lu\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"batas atas yang paling kecil yang diperbolehkan POSIX dalam panjang argumen "
+"(di semua sistem): %lu\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Panjang maksimal dari perintah yang dapat kita gunakan: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Ukuran dari buffer perintah yang saat ini kita gunakan: %lu\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Eksekusi dari xargs tidak akan dilanjutkan sekarang, dan ini tidak akan "
+"dicoba untuk membaca masukannya dan menjalankan perintah; jika ini bukan "
+"yang anda inginkan untuk terjadi, mohon ketik tombol akhir-dari-berkas.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Peringatan: %s akan dijalankan paling tidak sekali. Jika anda tidak ingin "
+"ini untuk terjadi, tekan tombol interupsi (biasanya CTRL-C).\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"quote %s tidak cocok; secara baku quote adalah spesial ke xargs kecuali anda "
+"menggunakan opsi -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "ganda"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "tunggal"
+
+#: xargs/xargs.c:936
+#, fuzzy, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"Peringatan: sebuah karakter NULL ditemui dalam masukan. Ini tidak dapat "
+"dilewatkan melalui daftar argumen. Apakah yang anda maksu untuk menggunakan "
+"opsi --null?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "baris argumen terlalu panjang"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "kesalahan waiting untuk proses anak"
+
+#: xargs/xargs.c:1362
+#, fuzzy, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "Peringatan: Hilang jejak dari %d proses anak"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: keluar dengan status 255; batal"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: dihentikan oleh sinyal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: di-terminate oleh sinyal %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: kesalahan bilangan untuk pilihan -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: nilai untuk opsi -%c seharusnya >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: nilai untuk opsi -%c seharusnya < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Penggunaan: %s [-Oprtx] [--interactive] [--null] [-d|--delimiter=pembatas]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=berkas]\n"
+"       [--version] [--help] [perintah [argumen-inisial]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "tidak dapat mengetahui direktori saat ini"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "argumen %s untuk %s tidak valid"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "argumen %s untuk %s ambigu"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Argumen yang valid adalah:"
+
+#~ msgid "error closing file"
+#~ msgstr "kesalahan menutup berkas"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Kesalahan sistem tidak dikenal"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: opsi `%s' ambigu\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: opsi `--%s' tidak membolehkan sebuah argumen\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: opsi `--%c%s' tidak membolehkan sebuah argumen\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: opsi `%s' membutuhkan sebuah argumen\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: opsi tidak dikenal `--%s'\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: opsi tidak dikenal `%c%s'\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: opsi tidak valid -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: opsi membutuhkan sebuah argumen -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: opsi `-W %s' ambigu\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: opsi `-W %s' tidak membolehkan sebuah argumen\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "Sukses"
+
+#~ msgid "No match"
+#~ msgstr "Tidak cocok"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "ekspresi reguler tidak valid"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Karakter kolasi tidak valid"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Nama kelas karakter tidak valid"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Trailing backslash"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Referensi balik tidak valid"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ atau [^ tidak sesuai "
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( atau \\( tidak sesuai"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "\\{ tidak cocok"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Isi \\{\\} tidak valid"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Akhir jangkauan tidak valid"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Memori habis"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Ekspresi reguler sebelumnya tidak valid"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Akhir ekspresi reguler prematur"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Ekspresi reguler terlalu besar"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") atau \\) tidak cocok"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Tidak ada ekspresi reguler sebelumnya"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "kehabisan memori"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "tidak valid %s%s argumen `%s'"
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "akhiran tidak valid dalam %s%s argumen `%s'"
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "%s%s argumen `%s'terlalu besar"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opsi ilegal -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "ukuran blok"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Daftar Predikat:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Pohon Eval:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Pohon Eval Teroptimisasi:\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s dirubah selama eksekusi %s"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "Memori virtual habis"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. dirubah selama eksekusi %s"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "Kesalahan dalam %s: %s"
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "       EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "pilihan (selalu benar): -daystart -depth -follow --help\n"
+#~ "       -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tes (N dapat +N atau -N atau N): -amin N -anewer FILE -atime N -cmin N\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "aksi: -exec PERINTAH ; -fprint FILE -fprint0 FILE -fprintf FORMAT FILE\n"
+#~ "      -ok PERINTAH ; -print -print0 -printf FORMAT -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "Menyisipkan %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "   type: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "kiri:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "kanan:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Pohon Eval Ternormalisasi:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Pemakaian: %s [-d path] [--database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate versi %s\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs versi %s\n"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "quote %s tidak cocok"
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644 (file)
index 0000000..b26de01
--- /dev/null
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/it.gmo b/po/it.gmo
new file mode 100644 (file)
index 0000000..34d4a44
Binary files /dev/null and b/po/it.gmo differ
diff --git a/po/it.po b/po/it.po
new file mode 100644 (file)
index 0000000..4e1af02
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,1319 @@
+# Italian messages for GNU findutils.
+# Copyright © 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Marco d'Itri <md@linux.it>, 2001.
+# Giovanni Bortolozzo <borto@pluto.linux.it>, 1997-2000.
+# Giorgio Catanzaro <catanzag@gmail.com>, 2009, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-04-21 22:22+0200\n"
+"Last-Translator: Giorgio Catanzaro <catanzag@gmail.com>\n"
+"Language-Team: Italian <tp@lists.linux.it>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Inizializzazione della tabella hash dei file condivisi fallita"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "impossibile fare stat della directory corrente"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Impossibile leggere l'elenco dei dispositivi montati."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "ATTENZIONE: il file system %s è stato recentemente smontato."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "ATTENZIONE: il file system %s è stato recentemente montato."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s è cambiato durante l'esecuzione di %s (vecchio numero di device %ld, "
+"nuovo numero di device %ld, tipo di file system %s) [ref %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s è cambiato durante l'esecuzione di %s (vecchio numero di inode "
+"%<PRIuMAX>, nuovo numero di inode %<PRIuMAX>, tipo di file system %s) [ref "
+"%ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "ritorno alla directory padre non riuscito"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Cambio di directory sicuro in %s non riuscito"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Il collegamento simbolico %s è parte di un ciclo nella gerarchia delle "
+"directory; la directory a cui punta è già stata visitata."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Rilevato un ciclo nel file system; %s ha lo stesso numero di device e di "
+"inode di una directory che è %d livello più alta nella gerarchia del file "
+"system"
+msgstr[1] ""
+"Rilevato un ciclo nel file system; %s ha lo stesso numero di device e di "
+"inode di una directory che è %d livelli più alta nella gerarchia del file "
+"system"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "attenzione: non segue il link simbolico %s"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"ATTENZIONE: Il conteggio dei collegamenti fisici è errato per %s (rilevato "
+"solo st_nlink=%<PRIuMAX> ma trovate già %<PRIuMAX> sottodirectory): questo "
+"può essere un bug nel driver del file system. Attivazione automatica "
+"dell'opzione -noleaf di find. I risultati precedenti potrebbero non aver "
+"incluso directory che dovevano essere analizzate."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Impossibile leggere l'elenco dei file system"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "sconosciuto"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Rilevato un ciclo nel file system; %s è parte dello stesso ciclo nel file "
+"system come %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "ATTENZIONE: il file %s sembra avere modo 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "impossibile cercare %s"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr ""
+"ripristino della directory di lavoro dopo la ricerca di %s non riuscito"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"L'azione -delete attiva automaticamente -depth, ma -prune non esegue azioni "
+"quando -depth è attivato. Se si vuole proseguire comunque, usare "
+"esplicitamente l'opzione -depth."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"attenzione: l'opzione %s è stata usata dopo l'argomento %s che non è "
+"un'opzione, ma le opzioni non sono posizionali (%s ha effetto sui test "
+"indicati sia prima che dopo di essa). Usare le opzioni prima degli altri "
+"argomenti.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"attenzione: l'opzione -d è deprecata; usare l'opzione -depth che è conforme "
+"a POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s non è il nome di un gruppo esistente e non sembra un id di gruppo "
+"numerico perché ha il suffisso non atteso %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s non è il nome di un gruppo esistente"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "l'argomento di -group è vuoto, ma deve essere un nome di gruppo"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"il percorso predefinito è la directory corrente; l'espressione predefinita è "
+"-print\n"
+"l'espressione può essere formata da: operatori, opzioni, test e azioni:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operatori (precedenza decrescente; -and è implicito se non ne sono indicati "
+"altri):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"opzioni posizionali (sempre vere): -daystart -follow -regextype\n"
+"\n"
+"opzioni normali (sempre vere, indicate prima delle altre espressioni):\n"
+"      -depth --help -maxdepth LIVELLI -mindepth LIVELLI -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"test (N può essere +N o -N o N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TIPO -gid N -group NOME\n"
+"      -ilname MODELLO -iname MODELLO -inum N -iwholename MODELLO -iregex "
+"MODELLO\n"
+"      -links N -lname MODELLO -mmin N -mtime N -name MODELLO -newer FILE"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path MODELLO -perm [+-]MODO -regex MODELLO\n"
+"      -readable -writable -executable\n"
+"      -wholename MODELLO -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NOME -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context CONTESTO\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"azioni: -delete -print0 -printf FORMATO -fprintf FILE FORMATO -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMANDO ; -exec COMANDO {} + -ok COMANDO ;\n"
+"      -execdir COMANDO ; -execdir COMANDO {} + -okdir COMANDO ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"È possibile segnalare i bug (e seguire la loro correzione) tramite la "
+"pagina\n"
+"di segnalazione dei bug di findutils presso http://savannah.gnu.org/, o se "
+"non\n"
+"si ha accesso al web inviando una mail a <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "il controllo interno della funzione di libreria fnmatch() è fallito."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"attenzione: i nomi di file in Unix in genere non contengono la barra obliqua "
+"(i percorsi invece si). Questo significa che «%s %s» probabilmente risulterà "
+"sempre falso su questo sistema. Potrebbe essere più utile il test «-"
+"wholename» o forse «-samefile». In alternativa, se viene usato GNU grep, è "
+"possibile utilizzare «find ... -print0 | grep -FzZ %s»."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+"Atteso un intero decimale positivo come argomento di %s, ma ottenuto %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+"Il sistema non fornisce un modo per trovare la data di creazione di un file."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Il test %s ha bisogno di un argomento"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Impossibile capire se interpretare %s come data o ora"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Impossibile ottenere la data di creazione del file %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr "attenzione: -%s %s non corrisponde a nulla perché termina con /."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Modo %s non valido con l'opzione POSIXLY_CORRECT."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "modo %s non valido"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"Attenzione: è stato specificato uno schema di modi %s (che equivale a /000). "
+"Il significato di -perm /000 è stato cambiato per essere coerente con -perm "
+"-000, cioè mentre precedentemente non corrispondeva ad alcun file, adesso "
+"corrisponde a tutti i file."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "-size non può avere un argomento nullo"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "il tipo di -size \"%c\" non è valido"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Argomento «%s%c» non valido per -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"L'opzione -show-control-chars richiede un argomento singolo che deve essere "
+"\"literal\" o \"safe\""
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Argomento %s non valido per -used"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s non è il nome di un utente conosciuto"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "L'argomento di -user non deve essere vuoto"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Funzionalità abilitate: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "opzione -context non valida: SELinux non è abilitato."
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "L'argomento di -type deve contenere solo una lettera"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Argomento sconosciuto per -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "attenzione: sequenza di escape «\\%c» non riconosciuta"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "errore: %s alla fine della stringa di formato"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "attenzione: direttiva di formato «%%%c» non riconosciuta"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "errore: la direttiva di formato «%%%c» è riservata per uso futuro"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"La directory corrente è inclusa nella variabile di ambiente PATH, il cui "
+"utilizzo è insicuro in combinazione con l'azione %s di find. Rimuovere la "
+"directory corrente da $PATH (cioè rimuovere \".\" o i due punti prima o dopo)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Il percorso relativo %s è incluso nella variabile di ambiente PATH, che è "
+"insicura in combinazione con l'azione %s di ricerca. Rimuovere la voce da "
+"$PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Non è possibile utilizzare {} nel nome dell'utility per -execdir e -okdir a "
+"causa di possibili problemi di sicurezza."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Solo un'occorrenza di {} è supportata con -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "L'ambiente è troppo grande per exec()."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+"overflow aritmetico nella conversione di %s giorni in numero di secondi"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "overflow aritmetico nel calcolo della fine di oggi"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standard error"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standard output"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "impossibile eliminare %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr ""
+"ripristino della directory di lavoro dopo la ricerca di %s non riuscito"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon non riuscito: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "ATTENZIONE: impossibile determinare la data di creazione del file %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Impossibile chiudere lo standard input"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Cambio di directory fallito"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "impossibile fare fork"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "errore aspettando %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s terminato dal segnale %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "espressione non valida"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"espressione non valida; è stato usato un operatore binario «%s» senza "
+"anteporre niente."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "attesa un'espressione tra \"%s\" e \")\""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "attesa un'espressione dopo \"%s\""
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "espressione non valida: troppe \")\""
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"espressione non valida; attesa \")\" ma non trovata. Forse è necessario un "
+"altro predicato dopo \"%s\""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "espressione non valida: parentesi vuote non permesse."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"espressione non valida; attesa una \")\" da qualche parte ma non ne sono "
+"state trovate."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "tipo di espressione non valido."
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "tipo di espressione non valido (%d)."
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "i percorsi devono precedere le espressioni: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "predicato sconosciuto \"%s\""
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "predicato \"%s\" non valido"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "argomento «%s» non valido per «%s»"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "manca l'argomento per «%s»"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "troppe \")\""
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "predicato aggiuntivo \"%s\" non atteso"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "predicato aggiuntivo non atteso"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "inserimento predefinito di and non valido."
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Uso: %s [-H] [-L] [-P] [-Olivello] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [percorso...] [espressione]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "ritorno alla directory padre non riuscito"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "ritorno alla directory padre non riuscito"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Ignorato flag di debug %s non riconosciuto"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Argomento vuoto per l'opzione -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "L'opzione -O deve essere immediatamente seguita da un intero decimale"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Specificare un numero decimale immediatamente dopo -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Livello di ottimizzazione %s non valido"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Livello di ottimizzazione %lu troppo alto. Per trovare i file più "
+"rapidamente, si suggerisce di usare GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"La variabile di ambiente FIND_BLOCK_SIZE non è supportata, la dimensione dei "
+"blocchi è influenzata solo dalla variabile di ambiente POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "comando troppo lungo"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+"impossibile chiamare exec() per restrizioni alla dimensione dell'argomento"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "un unico argomento eccede le dimensioni dell'elenco di argomenti"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "elenco degli argomenti troppo lungo"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+"La variabile di ambiente %s non è impostata a un valore decimale valido"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Compilato usando GNU gnulib versione %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Suffisso %s non atteso su %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Atteso un intero: \"%s\""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Tipo sconosciuto di espressione regolare %s; i tipi validi sono %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Uso: %s [--version | --help]\n"
+"     %s bigrammi_più_comuni < elenco-di-file > database-di-locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Segnalare i bug a <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "errore di scrittura"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Uso: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Specificare un livello di sicurezza come intero decimale."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Il livello di sicurezza %s è fuori dall'intervallo convertibile."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Il livello di sicurezza %s ha il suffisso %s non atteso."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "Il livello di sicurezza %ld di slocate non è supportato."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Scrittura su standard output non riuscita"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "giorni"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "L'argomento per l'opzione --max-database-age non deve essere vuoto"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Argomento %s non valido per l'opzione --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"il database locate %s contiene un nome di file più lungo di quanto locate "
+"possa gestire"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "il database locate %s è corrotto o non valido"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Dimensione del database locate: %s byte\n"
+msgstr[1] "Dimensione del database locate: %s byte\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Nomi dei file corrispondenti: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Tutti i nomi dei file: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"I nomi dei file hanno una lunghezza totale di %s byte.\n"
+"Di questi nomi dei file,\n"
+"\n"
+"\t%s contengono spazi, \n"
+"\t%s contengono ritorni a capo  \n"
+"\te %s contengono caratteri con il bit alto impostato.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Alcuni nomi di file possono essere stati esclusi dal filtro, quindi non è "
+"possibile calcolare il rapporto di compressione.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Rapporto di compressione %4.2f%% (più alto è meglio)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Rapporto di compressione non definito\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"il database locate %s appare come un database slocate ma con livello di "
+"sicurezza %c, non attualmente supportato da GNU findutils"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s è un database slocate. Il supporto per questi è nuovo, è possibile che si "
+"verifichino problemi per il momento."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s è un database slocate con livello di sicurezza %d non supportato e sarà "
+"tralasciato."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"È stata specificata l'opzione -E, ma questa opzione non può essere usata con "
+"i database in formato slocate con livello di sicurezza diverso da zero. Non "
+"sarà generato alcun risultato per questo database.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s è un database slocate. Attivata l'opzione \"-e\"."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"Il database con il vecchio formato locate %s è troppo piccolo per essere "
+"valido"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Il database %s è nel formato %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Il database ha una codifica little-endian per le parole macchina.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Il database ha una codifica big-endian per le parole macchina.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+"Il database ha un ordine di codifica per le parole macchina non ovvio.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Uso: %s [-d percorso | --database=percorso] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TIPO]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      modello...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "rimozione dei privilegi di gruppo non riuscita"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "rimozione dei privilegi di setuid non riuscita"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Rimozione totale dei privilegi non riuscita"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "rimozione dei privilegi di setgid non riuscita"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"attenzione: il database locate può essere letto da stdin una sola volta."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "chiamata di sistema time non riuscita"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"attenzione: il database %s è più vecchio di %d %s (l'età reale è %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+"ATTENZIONE: il database locate %s è stato compilato con un differente ordine "
+"di byte"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "EOF non atteso in %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "errore leggendo una parola da %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+"Sequenza di protezione %s non valida nella specifica del delimitatore "
+"dell'input."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Sequenza di protezione %s non valida nella specifica del delimitatore "
+"dell'input; i valori del carattere non devono superare %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Sequenza di protezione %s non valida nella specifica del delimitatore "
+"dell'input; i valori del carattere non devono superare %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Sequenza di protezione %s non valida nella specifica del delimitatore "
+"dell'input; caratteri finali %s non riconosciuti."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Specifica del delimitatore dell'input %s non valida: il delimitatore deve "
+"essere un singolo carattere o una sequenza di protezione che inizi per \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "l'ambiente è troppo grande per fare exec"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"attenzione: il valore %ld per l'opzione -s è troppo grande, viene usato "
+"invece %ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Impossibile aprire il file di input %s"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Le proprie variabili di ambiente occupano %<PRIuMAX> byte\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+"Limite superiore POSIX sulla lunghezza di un argomento (in questo sistema): "
+"%<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Il più piccolo possibile limite superiore POSIX sulla lunghezza di un "
+"argomento (in tutti i sistemi): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Lunghezza massima di un comando effettivamente usabile: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Dimensione del buffer di comando attualmente in uso: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"L'esecuzione di xargs continuerà adesso, e proverà a leggere il suo input ed "
+"eseguire i comandi; se questo non è ciò che si vuole, digitare la sequenza "
+"di tasti end-of-file.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Attenzione: %s sarà eseguito almeno una volta. Se non è ciò che si vuole, "
+"digitare la sequenza di tasti interrupt.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"virgolette %s non accoppiate; le virgolette hanno un significato speciale "
+"per xargs, a meno che si usi l'opzione -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "doppie"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "singole"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"ATTENZIONE: un carattere NUL è presente nell'input. Non può essere passato "
+"attraverso l'elenco degli argomenti. Si vuole usare l'opzione --null?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "la riga dell'argomento è troppo lunga"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "apertura di /dev/tty in lettura non riuscita"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "impossibile creare una pipe prima di un fork"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"lettura di errno-buffer in xargs_do_exec non riuscita (questo è "
+"probabilmente un bug da riportare)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"read ha restituito il valore non atteso %d; questo è probabilmente un bug da "
+"riportare"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "errore aspettando il processo figlio"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "ATTENZIONE: perso il tracciamento di %d processi figlio"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: uscito con stato 255; termina"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: fermato dal segnale %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: terminato dal segnale %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: il numero per l'opzione -%c non è valido\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: il valore per l'opzione -%c deve essere >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: il valore per l'opzione -%c deve essere < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Uso: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E str-eof] [-e[str-eof]]  [--eof[=str-eof]]\n"
+"       [-L max-righe] [-l[max-righe]] [--max-lines[=max-righe]]\n"
+"       [-I str-sost] [-i[str-sost]] [--replace[=str-sost]]\n"
+"       [-n max-arg] [--max-args=max-arg]\n"
+"       [-s max-car] [--max-chars=max-car]\n"
+"       [-P max-proc]  [--max-procs=max-pro] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [comando [argomenti-iniziali]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "impossibile determinare la directory corrente"
diff --git a/po/ja.gmo b/po/ja.gmo
new file mode 100644 (file)
index 0000000..27b015a
Binary files /dev/null and b/po/ja.gmo differ
diff --git a/po/ja.po b/po/ja.po
new file mode 100644 (file)
index 0000000..79d823f
--- /dev/null
+++ b/po/ja.po
@@ -0,0 +1,1465 @@
+# Japanese Messages for findutils.
+# Copyright (C) 2001, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# GOTO Masanori <gotom@debian.or.jp>, 2001.
+# Yasuaki Taniguchi <yasuakit@gmail.com>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-08-20 21:49+0900\n"
+"Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
+"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "共有ファイルハッシュテーブルの初期化に失敗しました"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "カレントディレクトリの情報を取得 (stat) できません"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "マウントされたデバイスの一覧を読み込めません。"
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "警告: ファイルシステム %s は最近アンマウントされました。"
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "警告: ファイルシステム %s は最近マウントされました。"
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s は %s の実行中に変更されました (古いデバイス番号 %ld、新しいデバイス番"
+"号 %ld、ファイルシステムの種類 %s) [ref %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s は %s の実行中に変更されました (古い iノード番号 %<PRIuMAX>、新しい i"
+"ノード番号 %<PRIuMAX>、ファイルシステムの種類 %s) [ref %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "親ディレクトリに戻ることができませんでした"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "ディレクトリ %s に安全に移動できませんでした"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"シンボリックリンク %s がディレクトリ階層内でループしています。シンボリックリ"
+"ンクが指している先のディレクトリは既に移動したことがあります。"
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"ファイルシステムのループが検出されました。%s はファイルシステム内の %d 階層上"
+"ディレクトリと同じデバイス番号および iノード番号です。"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "警告: シンボリックリンク %s をたどれません"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"警告: %s のハードリンク数が誤っています (st_nlink=%<PRIuMAX> になっています"
+"が %<PRIuMAX> 個の子ディレクトリがあります): ファイルシステムドライバのバグか"
+"もしれません。 find の -noleaf オプションが自動的に有効になります。以前の結果"
+"は探索すべきディレクトリを含んでいないかもしれません。"
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "マウントされているファイルシステム一覧を読み込めません"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "不明"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"ファイルシステムのループが検出されました。 %s は %s のファイルシステムのルー"
+"プの一部になっています。"
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "警告: ファイル %s のモードが 0000 になっています"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "%s を探索できません"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "%s の探索後に作業ディレクトリを復元できませんでした"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"-delete アクションでは -depth が自動的に有効になります。しかし -prune は -"
+"depth が有効なときには何も行いません。それでもこのまま実行したい場合は、明示"
+"的に -depth オプションを使用してください。"
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"警告: オプションでない引数 %2$s の後に %1$s オプションを指定しました。しかし"
+"位置オプションではありません (%3$s は前に指定しても後に指定してもテストに影響"
+"を及ぼします)。オプションは他の引数の前に指定してください。\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"警告: -d オプションは廃止されました。-depth を使用してください。 -depth は"
+"POSIX に適合しています。"
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s は存在しているグループ名ではありません。また予期しない接尾辞 %s があるため"
+"数値で指定したグループ ID でも無いようです。"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s は存在しているグループ名ではありません"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "-group に引数がありません。グループ名を引数として指定してください"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"デフォルトのパスはカレントディレクトリです。デフォルトの評価式 (expression) "
+"は -print です。評価式は演算子、オプション、テストおよびアクションで構成され"
+"ます。\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"演算子 (優先順位は降順です。特に指定がない場合は -and が暗黙的に使用されま"
+"す):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"位置オプション (常に真): -daystart -follow -regextype\n"
+"\n"
+"通常オプション (常に真。他の評価式の前に指定します):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"テスト (N は +N、-N または Nで指定します): -amin N -anewer FILE -atime N -"
+"cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context CONTEXT\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"アクション: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"バグを発見した場合は findutils バグ報告ページ http://savannah.gnu.org/ を\n"
+"使用して報告 (および修正の進捗を追跡) してください。Web を利用できない場合\n"
+"は <bug-findutils@gnu.org> に E-mail を送ってください。"
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "fnmatch() ライブラリ関数による精密な検査に失敗しました。"
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"警告: Unix ファイル名は通常スラッシュ (/) を含みません (パス名としては含みま"
+"す)。これは '%s %s' はこのシステムでは常に偽 (false) っであることを意味しま"
+"す。 '-wholename' または '-samefile' による test がより役に立つかもしれませ"
+"ん。代替の方法として GNU grep woを使用しているなら 'find ... -print0 | grep -"
+"FzZ %s' を使用することもできます。"
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "%s の引数としては正の十進整数が予期されますが、 %s が指定されました"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "このシステムではファイルの生成日時を見つける方法を提供していません。"
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "%s test には引数が必要です"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "%s を日付または時間として解釈することができません"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "ファイル %s の生成日を取得できません"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr "警告: -%s %s は / で終了しているため何に対しても一致しません。"
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "POSIXLY_CORRECT が有効な時には %s は無効です。"
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "無効なモードです: %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"警告: モードのパターンとして %s が指定されました (これは /000 と等価です)。-"
+"perm /000 の意味は -perm -000 との一貫性を保つために変更されています。過去に"
+"はどのファイルにも一致しませんでしたが、今は全てのファイルに一致します。"
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "-size に対する無効な空の引数です"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "無効な -size タイプ `%c' です"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "`%s%c' は -size に対する無効な引数です"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"-show-control-chars オプションは引数を一つだけ指定し、'literal' または "
+"'safe' でなければいけません"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "%s は -used に対する無効な引数です"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s は存在しているユーザ名ではありません"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "-user の引数は空であってはいけません"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "有効になっている機能: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "-context は無効な述語です: SELinux が有効ではありません。"
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "-type の引数は単一の文字のみ含むことができます"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "-type に対する不明な引数です: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "警告: 認識できないエスケープ `\\%c' です"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "エラー: 書式文字列の最後に %s があります"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "警告:  `%%%c' は認識できない書式指定です"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "エラー: 書式指定 `%%%c' は将来使用するために予約されています"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"カレントディレクトリが PATH 環境変数に含まれています。これは %s アクションと"
+"組み合わせて使用すると安全ではありません。カレントディレクトリを $PATH から削"
+"除してください (\".\" または先頭、最後にある \":\" を削除します)。"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"PATH 環境変数に相対パス %s が含まれています。これは %s アクションと組み合わせ"
+"て使用すると安全ではありません。 $PATH から要素を削除してください。"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"-execdir および -okdir のユーティリティ名の中で {} を使用しないでください。潜"
+"在的なセキュリティの問題を引き起こします。"
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "-exec%s ... + ではただ一つの {} インスタンスのみサポートされます"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "exec () を実行するには環境変数が大きすぎます"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "%s日を秒数に変換中に計算オーバーフローが発生しました"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "本日の終了時間を計算中に計算オーバーフローが発生しました"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "標準エラー出力"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "標準出力"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "%s を削除できません"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "%s の探索後に作業ディレクトリを復元できませんでした"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon に失敗しました: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "警告: ファイル %s の生成日時を決定できません"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "標準出力を閉じることができません"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "ディレクトリの変更に失敗しました"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "fork できません"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "%s を待機中にエラーが発生しました"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s はシグナル %d で終了しました"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "無効な評価式です"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr "無効な評価式です。二項演算子 '%s' を使用していますが、前項がありません"
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "'%s' および ')' の間に評価式が予期されます"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "'%s' の後に評価式が予期されます"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "無効な評価式です。')' が多すぎます"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"無効な評価式です。')' が予期されますが、存在しません。多分 '%s' の後に追加の"
+"述語が必要です"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "無効な評価式です。空の小括弧は使用できません。"
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"無効な評価式です。 ')' がどこかにあることが予期されますが、一つも見つかりませ"
+"ん。"
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "おおっと -- 無効な評価式の種類です!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "おおっと -- 無効な評価式の種類 (%d) です!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "パス名は評価式の前に置かなければいけません: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "不明な述語です: `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "無効な述語です: `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "不正な引数 `%s' から `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "`%s' に引数がありません"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "')' が多すぎます"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "予期しない余分な述語です: '%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "予期しない余分な述語です"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "おおっと -- 無効なデフォルトの AND 挿入です!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "使用法: %s [-H] [-L] [-P] [-Olevel] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [path...] [expression]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "親ディレクトリに戻ることができませんでした"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "親ディレクトリに戻ることができませんでした"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "認識できないデバッグフラグ %s を無視しています"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "-D オプションに引数がありません。"
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "-O オプションには直後に十進整数を続けなければいけません"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "-O の後には直後に十進整数を指定してください"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "無効な最適化レベルです: %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"最適化レベル %lu は高すぎます。ファイル等を非常に素早く探したい場合は、GNU "
+"locate の使用を検討してください。"
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"環境変数 FIND_BLOCK_SIZE はサポートされていません。ブロックサイズに影響するの"
+"は POSIXLY_CORRECT 環境変数だけです。"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "コマンドが長すぎます"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr "引数の長さ制限により exec() を呼び出すことができません"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "引数リストのサイズ制限内で単一引数として収まりません"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "引数リストが長すぎます"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr "環境変数 %s が十進整数に設定されていません"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Built using GNU gnulib version %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "%2$s に予期しない接尾辞 %1$s があります"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "整数が予期されます: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "%s は不明な正規表現タイプです。有効なタイプは %sです。"
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"使用法: %s [--version | --help]\n"
+"または  %s most_common_bigrams < file-list > locate-database\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"バグを発見した場合は <bug-findutils@gnu.org> まで報告してください。\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "書き込みエラー"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "使用法: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "セキュリティレベルを十進整数で指定する必要があります。"
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "セキュリティレベル %s は変換できる範囲を超えています。"
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "セキュリティレベル %s に不明な接尾辞 %s があります。"
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "slocate セキュリティレベル %ld はサポートされていません。"
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "標準出力への書き込みに失敗しました"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "日"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "--max-database-age オプションは引数を指定しなければいけません"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "オプション --max-database-age に対する無効な引数です: %s"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"locate データベース %s には locate が取り扱うことができる長さを超えるファイル"
+"名が含まれています"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate データベース %s が壊れているか、無効です"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Locate データベースの大きさ: %s バイト\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "一致したファイル名: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "全てのファイル名: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"ファイル名の累積の長さは %s バイトです。\n"
+"もちろんファイル名\n"
+"\n"
+"\t%s は空白を含み、\n"
+"\t%s は改行文字を含み、\n"
+"\tおよび %s 最上位ビットが立っている文字を含みます。\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"いくつかのファイル名がフィルタによって取り除かれたため、圧縮率を計算すること"
+"ができません。\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "圧縮率 %4.2f%% (高いほど良い)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "圧縮率が定義されていません\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"locate データベース %s は slocate データベースであり、そのセキュリティレベル"
+"は %c です。これは GNU findutils ではサポートされていません。"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s は slocate データベースです。これに対するサポートは新しく、現在は問題があ"
+"るかもしれません。"
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s は slocate データベースでセキュリティレベルは %d です。スキップします。"
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"-E オプションが指定されていますが、slocate 形式のデータベースでセキュリティレ"
+"ベルが 0 でないの場合には使用できません。このデーターベースに対する結果は生成"
+"されません。\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s は slocate データベースです。 '-e' を有効にしてください。"
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "古い形式の locate データベース %s は短すぎるため有効ではありません"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "データベース %s は %s 形式です。\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+"データベースは WORD をリトルエンディアンで扱う計算機用エンコードです。\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+"データベースは WORD をビッグエンディアンで扱う計算機用エンコードです。\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "データベースのエンディアンが明確ではありません。\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"使用法: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "グループ権限を取り除くことに失敗しました"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "setuid 権限を取り除くことに失敗しました"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "権限を完全に取り除くことに失敗しました"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "setgid 権限を取り除くことに失敗しました"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr "警告: locate データベースは標準入力からは1個しか読み込めません。"
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "time システムコールに失敗しました"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "警告: データベース %s は %d %s より古いです (実際の古さは %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+"警告: locate データベース %s は異なったバイト順 (エンディアン) の計算機で作成"
+"されています"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "%s 内で予期しないファイル終端 (EOF) です"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "%s からの単語読み取り中にエラーが発生しました"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "無効なエスケープ文字列 %s が入力区切り文字指定内にあります。"
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"無効なエスケープ文字列 %s が入力区切り文字指定内にあります。文字は %lx を超え"
+"てはいけません。"
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"無効なエスケープ文字列 %s が入力区切り文字指定内にあります。文字は %lo を超え"
+"てはいけません。"
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"無効なエスケープ文字列 %s が入力区切り文字指定内にあります。後に続く文字 %s "
+"が認識できません。"
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"無効なエスケープ文字列 %s が入力区切り文字指定内にあります。区切り文字は単一"
+"の文字か \\ で始まるエスケープ文字列でなければいけません。"
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "実行するには環境が大きすぎます"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"警告: -s  オプションに対する値 %ld が大きすぎます。 %ld を代わりに使用してい"
+"ます"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "入力ファイル %s を開けません"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "環境変数が %<PRIuMAX> バイトを占めます\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "POSIX の引数の長さ上限 (このシステム): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr "POSIX の最小の引数の長さの上限 (すべてのシステム): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "実際に使用できるコマンド長の最大値: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "実際に使用しているコマンドバッファの大きさ: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"xargs の実行は現在継続されています。そしてコマンドを実行するために入力を読み"
+"込もうと試みています。もしこれを望んでいないなら、ファイル終端 (EOF) のキー入"
+"力を行ってください。\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"警告: %s は最低1回は実行されます。もしこれを望んでいないなら、割り込みのキー"
+"入力を行ってください。\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"%sクオートが一致しません。デフォルトでは -O オプションを指定しない限り xargs "
+"でクォートは特別な意味を持ちます"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "ダブル"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "シングル"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"警告: NUL 文字が入力にあります。これは引数のリストとして渡すことができませ"
+"ん。 --null オプションを使おうとしているのですか?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "引数行が長すぎます"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "/dev/tty を読み込むために開けませんでした"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "fork の前にパイプを作成できませんでした"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"xargs_do_exec 内で errno-buffer の読み込みに失敗しました (これは多分バグで"
+"す。報告してください)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"read が予期しない値 %d を返しました。これは多分バグです。報告してください"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "子プロセスを待機中にエラーが発生しました"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "警告: %d 個の子プロセスの追跡が失われました"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: 終了ステータス 255。中止しています"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: シグナル %d によって停止しました"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: シグナル %d によって終了しました"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: -%c オプションに対する不正な番号\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: -%c オプションに対する値は %ld 以上でなければいけません\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: -%c オプションに対する値は %ld 未満でなければいけません\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"使用法: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "カレントディレクトリを取得できません"
+
+#~ msgid "ambiguous argument %s for `%s'"
+#~ msgstr "`%2$s' に対する不明瞭な引数 %1$s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "有効な引数は:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "未知のシステムエラー"
+
+#~ msgid "%s: option `%s' is ambiguous\n"
+#~ msgstr "%s: オプション`%s'は曖昧です\n"
+
+#~ msgid "%s: option `--%s' doesn't allow an argument\n"
+#~ msgstr "%s: オプション`--%s'は引数をとりません\n"
+
+#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: オプション`%c%s'は引数をとりません\n"
+
+#~ msgid "%s: unrecognized option `--%s'\n"
+#~ msgstr "%s: 認識できないオプション`--%s'です\n"
+
+#~ msgid "%s: unrecognized option `%c%s'\n"
+#~ msgstr "%s: 認識できないオプション`%c%s'です\n"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: 不正なオプションです -- %c\n"
+
+#~ msgid "%s: invalid option -- %c\n"
+#~ msgstr "%s: オプションが違います -- %c\n"
+
+#~ msgid "%s: option requires an argument -- %c\n"
+#~ msgstr "%s: オプションには引数が必要です -- %c\n"
+
+#~ msgid "%s: option `-W %s' is ambiguous\n"
+#~ msgstr "%s: オプション `-W %s' が曖昧です\n"
+
+#~ msgid "%s: option `-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: オプション`-W %s'は引数をとりません\n"
+
+#~ msgid "block size"
+#~ msgstr "ブロックサイズ"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "成功です"
+
+#~ msgid "No match"
+#~ msgstr "一致しません"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "無効な正規表現です"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "無効な照合文字です"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "無効なキャラクタクラス名です"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "バックスラッシュが残っています"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "無効な後方参照です"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ もしくは [^ が一致しません"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( もしくは \\( が一致しません"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "\\{ が一致しません"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "無効な \\{\\} の内容です"
+
+#~ msgid "Invalid range end"
+#~ msgstr "無効な終端範囲です"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "メモリを使い尽しました"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "無効な前述の正規表現です"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "正規表現の終端が早すぎます"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "正規表現が長すぎます"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") もしくは \\) が一致しません"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "以前に正規表現が定義されていません"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "述語リスト:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "評価木:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "最適化評価木:\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s は %s の実行中に変更されました"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "メモリを使い果たしました"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. は %s の実行中に変更されました"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "%s 中でエラー: %s"
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "オプション (いつも真): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "判別式 (N は +N または -N または N とできる): -amin N -anewer FILE -atime "
+#~ "N -cmin N\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "アクション: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE "
+#~ "FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "%s を挿入\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    タイプ: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "左:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "右:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "正規化評価木:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "使用法: %s [-d パス | --database=パス] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate version %s\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs version %s\n"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "%sクオーテーションが一致しません"
diff --git a/po/ko.gmo b/po/ko.gmo
new file mode 100644 (file)
index 0000000..752d534
Binary files /dev/null and b/po/ko.gmo differ
diff --git a/po/ko.po b/po/ko.po
new file mode 100644 (file)
index 0000000..14f0973
--- /dev/null
+++ b/po/ko.po
@@ -0,0 +1,1273 @@
+# findutilsÀÇ Çѱ¹¾î ¸Þ½ÃÁö
+# Copyright (C) 1996, 2010 Free Software Foundation, Inc.
+# Bang Jun-Young <bangjy@nownuri.nowcom.co.kr>, 1996.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.1\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 1996-10-07 22:13+0900\n"
+"Last-Translator: Bang Jun-Young <bangjy@nownuri.nowcom.co.kr>\n"
+"Language-Team: Korean <ko@li.org>\n"
+"Language: ko\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=EUC-KR\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "¾Ë ¼ö ¾øÀ½"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"±âº» °æ·Î´Â ÇöÀç µð·ºÅ丮ÀÔ´Ï´Ù; ±âº» ¼ö½ÄÀº -printÀÔ´Ï´Ù\n"
+"¼ö½ÄÀº ´ÙÀ½°ú °°ÀÌ ÀÌ·ç¾îÁú ¼ö ÀÖ½À´Ï´Ù:\n"
+"¿¬»êÀÚ(°¨¼ÒÇϴ ¿ì¼±¼øÀ§; ´Ù¸¥ °ÍÀÌ ÁÖ¾îÁöÁö ¾ÊÀ¸¸é -and°¡ ¹¬½ÃÀûÀ¸·Î »ç¿ë"
+"µÊ)\n"
+"      ( EXPR ) | EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n"
+
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"±âº» °æ·Î´Â ÇöÀç µð·ºÅ丮ÀÔ´Ï´Ù; ±âº» ¼ö½ÄÀº -printÀÔ´Ï´Ù\n"
+"¼ö½ÄÀº ´ÙÀ½°ú °°ÀÌ ÀÌ·ç¾îÁú ¼ö ÀÖ½À´Ï´Ù:\n"
+"¿¬»êÀÚ(°¨¼ÒÇϴ ¿ì¼±¼øÀ§; ´Ù¸¥ °ÍÀÌ ÁÖ¾îÁöÁö ¾ÊÀ¸¸é -and°¡ ¹¬½ÃÀûÀ¸·Î »ç¿ë"
+"µÊ)\n"
+"      ( EXPR ) | EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr ""
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "ºÎÀûÀýÇÑ -size Çü `%c'"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â Çü½Ä Áö½ÃÀÚ `%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "ȯ°æÀÌ ½ÇÇà(exec)Çϱ⿡ ³Ê¹« Å®´Ï´Ù"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr ""
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, fuzzy, c-format
+msgid "Failed to change directory"
+msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr ""
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "%s¸¦ ±â´Ù¸®´Â µµÁß ¿À·ù ¹ß»ý"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s°¡ ½ÅÈ£ %d¿¡ ÀÇÇØ Á¾·áµÊ"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "ºÎÀûÀýÇÑ ¼ö½Ä"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr ""
+
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "ºÎÀûÀýÇÑ ¼ö½Ä"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "À¹ -- ºÎÀûÀýÇÑ ¼ö½Ä ÇüÀÔ´Ï´Ù!"
+
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "À¹ -- ºÎÀûÀýÇÑ ¼ö½Ä ÇüÀÔ´Ï´Ù!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr ""
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr ""
+
+#: find/tree.c:1317
+#, fuzzy, c-format
+msgid "invalid predicate `%s'"
+msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'"
+
+#: find/tree.c:1322
+#, fuzzy, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü"
+
+#: find/tree.c:1330
+#, fuzzy, c-format
+msgid "missing argument to `%s'"
+msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr ""
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "À¹ -- and¸¦ ³»Á¤Ä¡·Î ºÎÀûÀýÇÏ°Ô »ðÀÔÇß½À´Ï´Ù!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr ""
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "»ç¿ë¹ý: %s [°æ·Î...] [¼ö½Ä]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "¸í·ÉÀÌ ³Ê¹« ±é´Ï´Ù"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "Àμö ¸í´Ü ±æÀÌ Á¦ÇÑ¿¡ ´ÜÀÏ Àμö¸¦ ¸ÂÃâ ¼ö ¾ø½À´Ï´Ù"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "Àμö ¸í´ÜÀÌ ³Ê¹« ±é´Ï´Ù"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU find ¹öÀü %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr ""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr "»ç¿ë¹ý: %s most_common_bigrams < list > coded_list\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, fuzzy, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "»ç¿ë¹ý: %s [-d °æ·Î] [--database=°æ·Î] [--version] [--help] ÆÐÅÏ...\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr ""
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr ""
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr ""
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "°æ°í: µ¥ÀÌÅͺ£À̽º `%s'´Â %s ÀÌ»ó ¿À·¡µÇ¾ú½À´Ï´Ù"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "%s¸¦ ±â´Ù¸®´Â µµÁß ¿À·ù ¹ß»ý"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "ȯ°æÀÌ ½ÇÇà(exec)Çϱ⿡ ³Ê¹« Å®´Ï´Ù"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr ""
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "µÎ¹è"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "´ÜÀÏ"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "Àμö ÇàÀÌ ³Ê¹« ±é´Ï´Ù"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "ÀڽĠÇÁ·Î¼¼½º¸¦ ±â´Ù¸®´Â µµÁß ¿À·ù ¹ß»ý"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: »óÅ 255À» °¡Áö°í Á¾·áµÊ; Áß´ÜÇÔ"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: ½ÅÈ£ %d¿¡ ÀÇÇØ ÁßÁöµÊ"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: ½ÅÈ£ %d¿¡ ÀÇÇØ Á¾·áµÊ"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: -%c ¿É¼Ç¿¡ ºÎÀûÀýÇÑ ¼ýÀÚ°¡ ÁÖ¾îÁü\n"
+
+#: xargs/xargs.c:1476
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: -%c ¿É¼ÇÀÇ °ªÀº %ldº¸´Ù Å©°Å³ª °°¾Æ¾ß ÇÕ´Ï´Ù\n"
+
+#: xargs/xargs.c:1490
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: -%c ¿É¼ÇÀÇ °ªÀº %ldº¸´Ù À۾ƾߠÇÕ´Ï´Ù\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"»ç¿ë¹ý: %s [-0prtx] [-e[ÆÄÀϳ¡-¹®ÀÚ¿­]] [-i[´ëü-¹®ÀÚ¿­]] [-l[ÃÖ´ë-Çà]]\n"
+"       [-n ÃÖ´ë-Àμö] [-s ÃÖ´ë-¹®ÀÚ] [-P ÃÖ´ë-ÇÁ·Î¼¼½º] [--null] [--eof[=ÆÄÀÏ"
+"³¡-¹®ÀÚ¿­]]\n"
+"       [--replace[=´ëü-¹®ÀÚ¿­]] [--max-lines[=ÃÖ´ë-Çà]] [--interactive]\n"
+"       [--max-chars=ÃÖ´ë-¹®ÀÚ] [--verbose] [--exit] [--max-procs=ÃÖ´ë-ÇÁ·Î¼¼"
+"½º]\n"
+"       [--max-args=ÃÖ´ë-Àμö] [--no-run-if-empty] [--version] [--help]\n"
+"       [¸í·É [Ãʱâ-Àμö]]\n"
+
+#, fuzzy
+#~ msgid "cannot get current directory"
+#~ msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù"
+
+#, fuzzy
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü"
+
+#, fuzzy
+#~ msgid "Valid arguments are:"
+#~ msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: -%c ¿É¼Ç¿¡ ºÎÀûÀýÇÑ ¼ýÀÚ°¡ ÁÖ¾îÁü\n"
+
+#, fuzzy
+#~ msgid "Invalid regular expression"
+#~ msgstr "ºÎÀûÀýÇÑ ¼ö½Ä"
+
+#, fuzzy
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "ÀÏÄ¡µÇÁö ¾Ê´Â %s µû¿ÈÇ¥"
+
+#, fuzzy
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "ÀÏÄ¡µÇÁö ¾Ê´Â %s µû¿ÈÇ¥"
+
+#, fuzzy
+#~ msgid "Unmatched \\{"
+#~ msgstr "ÀÏÄ¡µÇÁö ¾Ê´Â %s µû¿ÈÇ¥"
+
+#, fuzzy
+#~ msgid "Memory exhausted"
+#~ msgstr "°¡»ó ¸Þ¸ð¸®°¡ ¹Ù´Ú³µÀ½"
+
+#, fuzzy
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "ºÎÀûÀýÇÑ ¼ö½Ä"
+
+#, fuzzy
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "ÀÏÄ¡µÇÁö ¾Ê´Â %s µû¿ÈÇ¥"
+
+#, fuzzy
+#~ msgid "memory exhausted"
+#~ msgstr "°¡»ó ¸Þ¸ð¸®°¡ ¹Ù´Ú³µÀ½"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "Àμö ¸í´ÜÀÌ ³Ê¹« ±é´Ï´Ù"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "%s¿¡ ¿À·ù: %s"
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "¿É¼Ç (Ç×»ó Âü): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "½ÃÇè (NÀº +N, -N, NÀÌ µÉ ¼ö ÀÖÀ½): -amin N -answer FILE -atime N -cmin N\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "Çൿ: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "%s¸¦ »ðÀÔÇÔ\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    Çü: %s    %s  "
+
+#~ msgid "wait got pid %d, expected pid %d"
+#~ msgstr "±â´Ù¸®´Ù pid %d¸¦ ¹Þ¾ÒÀ¸³ª pid %d°¡ ¿ä±¸µÊ"
+
+#~ msgid "%s stopped by signal %d"
+#~ msgstr "%s°¡ ½ÅÈ£ %d¿¡ ÀÇÇØ ÁßÁöµÊ"
+
+#~ msgid "left:\n"
+#~ msgstr "¿ÞÂÊ:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "¿À¸¥ÂÊ:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Á¤±ÔÈ­µÈ Æò°¡ Æ®¸®:\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs ¹öÀü %s\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate ¹öÀü %s\n"
diff --git a/po/lg.gmo b/po/lg.gmo
new file mode 100644 (file)
index 0000000..4c05d13
Binary files /dev/null and b/po/lg.gmo differ
diff --git a/po/lg.po b/po/lg.po
new file mode 100644 (file)
index 0000000..400b08f
--- /dev/null
+++ b/po/lg.po
@@ -0,0 +1,1405 @@
+# translation of findutils-4.1.20.po to Luganda
+# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
+# K.Birabwa <kompyuta@kizito.freeuk.com>, 2004
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.1.20\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2004-04-02 18:57GMT\n"
+"Last-Translator: K.Birabwa <kompyuta@kizito.freeuk.com>\n"
+"Language-Team: Luganda <kompyuta@kizito.freeuk.com>\n"
+"Language: lg\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=EUC-KR\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.0.1\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "tekimanyidwa"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"ekkubo erya bulijjo litandikira mu tterekero ekiragiro mwe kiweeredwa; "
+"emboozi eya\n"
+"bulijjo eri -print\n"
+"emboozi esobola okubeera mu:\n"
+"ebifuula (ebikulembera bye bisooka okukolebwa ko; singa tekuba ebifuula "
+"ebirala\n"
+"pulogulamu ekibala nti ekifuula \"-and\" kyo wekiri):\n"
+"        ( EMBOZ ) ! EMBOZ -not EMBOZ EMBOZ1 -a EMBOZ2 EMBOZ1 -and EMBOZ2\n"
+
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"ekkubo erya bulijjo litandikira mu tterekero ekiragiro mwe kiweeredwa; "
+"emboozi eya\n"
+"bulijjo eri -print\n"
+"emboozi esobola okubeera mu:\n"
+"ebifuula (ebikulembera bye bisooka okukolebwa ko; singa tekuba ebifuula "
+"ebirala\n"
+"pulogulamu ekibala nti ekifuula \"-and\" kyo wekiri):\n"
+"        ( EMBOZ ) ! EMBOZ -not EMBOZ EMBOZ1 -a EMBOZ2 EMBOZ1 -and EMBOZ2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+
+#: find/parser.c:1239
+#, fuzzy
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"      -cnewer FAYIRO -ctime N -empty -false -fstype KIKA -gid N\n"
+"      -group LINNYA -ilname KIGAMBO -iname KIGAMBO -inum N\n"
+"      -ipath KIGAMBO -iregex KIGAMBO -links N -lname KIGAMBO\n"
+"      -mmin N -mtime N -name KIGAMBO -newer FAYIRO\n"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path KIGAMBO -perm [+-]NKOLA -regex KIGAMBO\n"
+"      -size N[bckw] -true -type [bcdpfls] -uid N -used N -user LINNYA\n"
+"      -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: akawayiro `%s' k'etaaga agumenti\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "enkola `%s' tekola wano"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "towadde agumenti eyetaagibwa ku kawayiro -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr " -size eweereddwa ekika, `%c', ekitakola wano "
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "agumenti `%s' tekozesebwa ku` %s'"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "agumenti %s tekozesebwa ku %s"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr ""
+"kulabula: akabonero akufuula enneyisa ya bunnaako, `\\%c', tekategeerekese"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "kulabula: ekiragiro ekifuga entereeza, `%%%c', tekitegeerekese"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "exec esanze nga enviromenti esukkiridde obunene"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "ekilagiro ekya sisitemu ekya`fork()' kigaanye"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "wazzewo kiremya nga nnindirira %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "omulimu %s guyimirizidwa ekiragiro %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "emboozi tekola wano"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr ""
+
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "emboozi tekola wano"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "oops -- ekika eky'emboozi ekyo tekikola wano!"
+
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "oops -- ekika eky'emboozi ekyo tekikola wano!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "sooka okuteekawo amakubo olyoke ozeeko emboozi"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "puledikato `%s' tekola wano"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "puledikato `%s' tekola wano"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "agumenti `%s' tekozesebwa ku` %s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "`%s' ebulako agumenti"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "puledikato `%s' tekola wano"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr ""
+"oops -- esonsesewo and! etakolerawo. Enkola eya bulijjo kwe kusonsekawo "
+"\"and!\""
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr ""
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Nkozesa eri: %s [kubo...] [mboozi]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr ""
+"kulabula: akabonero akufuula enneyisa ya bunnaako, `\\%c', tekategeerekese"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "ekiragiro kiyitiridde obuwanvu"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"agumenti eya sekinnomu tejja mu nkomo eziteekeddwa ku nkalala eza agumenti"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "olukalala olwa agumenti luyitiridde obuwanvu"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU find ey'omutindo %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr ""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Nkozesa eri: %s bigulamu_ezisinga_okusangibwa < lukalala > "
+"lukalala_olutegeke\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+#, fuzzy
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Wereza embuulire ku biwuka by'osanze mu pulogulamu eri ba <bug-findutils@gnu."
+"org>."
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "ennaku"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "agumenti %s tekozesebwa ku %s"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr ""
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "kulabula: olukalala `%s' emaze %d %s nga tezzibwanga buggya"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "wazzewo kiremya nga nnindirira %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "exec esanze nga enviromenti esukkiridde obunene"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr ""
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "nakabirye"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "sekinnomu"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "agumenti eyitiridde obuwanvu"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "wazzewo kiremya nga nnindirira omulimu oguzaalukusiddwa mu gunnaagwo"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: omulimu gumaliddwa nga gulina embeera eya 255, mbivuddeko"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: omulimu guyimiriziddwa ekiragiro %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: omulimu gukomekkerezedwa ekiragiro %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: omuwendo guno tegukola ku kawayiro -%c\n"
+
+#: xargs/xargs.c:1476
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: akawayiro -%c kateekwa okubeera nga >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: akawayiro -%c kateekwa okubeera nga < %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Enkozesa eri: %s [-0prtx] [-e[kigambo-kya-eof]] [-i[kigambo-ekinaddawo]]\n"
+"       [-l[max-mboozi]] [-n max-agumenti] [-s max-nukuta]\n"
+"       [-P max-mirimu] [--null] [--eof[=kigambo-kya-eof]]\n"
+"       [--replace[=kigambo-ekinaddawo]] [--max-mboozi[=max-mboozi]]\n"
+"       [--interactive] [--max-chars=max-nukuta] [--verbose] [--exit]\n"
+"       [--max-procs=max-mirimu] [--max-args=max-agumenti]\n"
+"       [--no-run-if-empty] [--version] [--help]\n"
+"       [orden [agumenti-ezisooka]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "agumenti %s tekozesebwa ku %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "agumenti %s ku %s ebuzabuza"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Augumenti z'oyinza okukozesa ziri:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Kiremya atategeerese mu sisitemu"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: akawayiro '%s' kabuzabuza\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: akawayiro '--%s' tekateekebwa ko agumenti\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: akawayiro `%c%s' tekateekebwa ko agumenti\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: akawayiro `%s' k'etaaga agumenti\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: akawayiro `--%s' tekamanyidwa\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: akawayiro `%c%s' tekamanyidwa\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: akawayiro --%c tekakola\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: akawayiro k'etaaga agumenti --%c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: akawayiro `-W %s' kabuzabuza\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: akawayiro `-W %s' tekateekebwa ko agumenti\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "Omulimu gumalirizidwa bulungi"
+
+#~ msgid "No match"
+#~ msgstr "Tewali kifaanagana"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Emboozi enoonya ebifaanagana etakola"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Nsanze ennukuta etasobola okweyambisibwa mu kusengeka nkalala"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Linnya lya kika eky'ennukuta telikola"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Waliwo akasazze akaddanyuma nga ke kakomekkerezza"
+
+#~ msgid "Invalid back reference"
+#~ msgstr ""
+#~ "Waliwo ekilagiro ekinoonya ebifaanagana n'ennukuta ezikikulembedde "
+#~ "ekitakola wano"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Waliwo [ oba [^ ebula ko ginne wa yo"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Waliwo ( oba \\( ebulako ginne wa yo"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Waliwo \\{ ebulako ginne wa yo"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Ebiri wakati wa \\{\\} tebikola wano"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Rango gy'ekomekkerezedwa tewakkirizibwa"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Ggwanika lijjudde"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Emboozi enoonya ebifaanagana ekulembedde tekola wano"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Emboozi enoonya ebifaanagana ekomekkerezedwa bubi"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Emboozi enoonya ebifaanagana eyitiridde obunene"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Waliwo ) oba \\) ebulako ginne wa yo"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Emabega tewali yo mboozi enoonya ebifaanagana"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "ggwanika lijjudde"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "agumenti `%s' tekozesebwa ku` %s'"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "agumenti `%s' tekozesebwa ku` %s'"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "olukalala olwa agumenti luyitiridde obuwanvu"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: akawayiro --%c tekakkirizibwa\n"
+
+#~ msgid "block size"
+#~ msgstr "bunene obwa buloka"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Olukalala lwa puledikato:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Emitendera egiyunguluddwaamu amakulu:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Emitendera egiyunguluddwaamu amakulu nga gituukanisidwa:\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s ekyuukidde ku muku gwa %s"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "ggwanika elizibizi lijjudde"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. ekyuukidde ku muku gwa %s"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "kiremya mu %s: %s"
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "obuwayiro (bulijjo obubeera butuufu) buli: -daystart -depth -follow --"
+#~ "help\n"
+#~ "                               -maxdepth MITENDERA -mindepth MITENDERA\n"
+#~ "                               -mount -noleaf --version -xdev\n"
+#~ "ebigezo biri : -amin N -anewer FAYIRO -atime N\n"
+#~ "                                       -cmin N (N esobola okubeera +N, -N "
+#~ "o N)\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "ebikolwa biri: -exec KIRAGIRO ; -fprint FAYIRO -fprint0 FAYIRO\n"
+#~ "      -fprintf NTEREEZA YA FAYIRO -ok KIRAGIRO ; -print -print0\n"
+#~ "      -printf NTEREEZA -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "nsonsekawo %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    ekika: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "kkono:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "ddyo:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Emitendera egiyunguluddwaamu amakulu nga ginoromawaziddwa:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Enkozesa eri: %s [-d kubo | --database=kubo]\n"
+#~ "   [-e | --existing] [-i | --ignore-case] [--version] [--help] "
+#~ "kigambo...\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate ey'omutindo %s\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs ey'omutindo %s\n"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "akoogeza %s kabulako kannewaako"
diff --git a/po/lt.gmo b/po/lt.gmo
new file mode 100644 (file)
index 0000000..c6e47b6
Binary files /dev/null and b/po/lt.gmo differ
diff --git a/po/lt.po b/po/lt.po
new file mode 100644 (file)
index 0000000..5f3e371
--- /dev/null
+++ b/po/lt.po
@@ -0,0 +1,1839 @@
+# translation of findutils-4.4.0 to Lithuanian
+# findutils
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+#
+# Gintautas Miliauskas <gintas@akl.lt>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils-4.4.0\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2008-07-09 13:00+0300\n"
+"Last-Translator: Gintautas Miliauskas <gintas@akl.lt>\n"
+"Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n"
+"Language: lt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
+"%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "<nėra esamo aplanko>"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Įspėjimas: failų sistema %s neseniai atjungta."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Įspėjimas: failų sistema %s neseniai prijungta."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "Nepavyko pakeisti aplanko"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+msgstr[2] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "nežinomas"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, fuzzy, c-format
+msgid "cannot search %s"
+msgstr "%s: nepavyko perskaityti: %s"
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "Nepavyko pakeisti aplanko"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"numatytasis kelias yra esamas aplankas; numatytoji išraiška yra -print\n"
+"išraiška gali būti sudaryta iš operatorių, opcijų, testų ir veiksmų:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operatoriai (pagal mažėjantį prioritetą; -and numatytas, jei nėra kitokio):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"pozicinės opcijos (visada teigiamos): -daystart -follow -regextype\n"
+"\n"
+"normalios opcijos (visada teigiamos, nurodytos prieš kitas išraiškas):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"testai (N gali būti +N arba -N arba N): -amin N -anewer FILE -atime N -cmin "
+"N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"veiksmai: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Praneškite apie klaidas (ir sekite jų taisymo eigą) per findutils klaidų\n"
+"pranešimo puslapį http://savannah.gnu.org/ arba, jei neturite prieigos prie\n"
+"žiniatinklio, išsiuntę el. laišką adresu <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "Tikėtasi teigiamo dešimtainio skaičiaus argumento %s, bet gauta %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: argumentas „%s“ reikalauja parametro"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr ""
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, fuzzy, c-format
+msgid "invalid null argument to -size"
+msgstr "netaisyklingas parametras %s argumentui %s"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "netaisyklingas -size tipas „%c“"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Galimi argumentai:"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Galimi argumentai:"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr ""
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, fuzzy, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "%s: neatpažintas argumentas „%c%s“\n"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr ""
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standartinis išvedimas"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "nepavyko ištrinti %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "Nepavyko pakeisti aplanko"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Nepavyko užverti standartinio įvedimo"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Nepavyko pakeisti aplanko"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr ""
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "klaida laukiant %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s nutrauktas signalo %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "netaisyklinga išraiška"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "tikėtasi išraiškos tarp „%s“ ir „)“"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "tikėtasi išraiškos po „%s“"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "netaisyklinga išraiška; per daug „)“"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "netaisyklinga išraiška; tušti skliausteliai neleistini."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "netaisyklinga išraiška; tikėtasi rasti, bet nerasta „)“."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "nežinomas išraiškos tipas!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "nežinomas išraiškos tipas (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "keliai turi būti prieš išraišką: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "nežinomas predikatas „%s“"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "netaisyklingas predikatas „%s“"
+
+#: find/tree.c:1322
+#, fuzzy, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "„%s“ trūksta parametro"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "„%s“ trūksta parametro"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "per daug „)“"
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "netikėta leksema „%s“, tikėtasi „)“"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr ""
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Naudojimas: %s  [-H] [-L] [-P] [-Olygmuo] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [kelias...] [išraiška]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "Nepavyko pakeisti aplanko"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "Nepavyko pakeisti aplanko"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr ""
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Netaisyklingas optimizacijos lygmuo %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Optimizacijos lygmuo %lu per aukštas.  Jei norite rasti failus labai "
+"greitai, išbandykite GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "komanda per ilga"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "argumentų sąrašas per ilgas"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr ""
+
+#: lib/safe-atoi.c:76
+#, fuzzy, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "netikėta failo pabaiga %s"
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "tikėtasi išraiškos po „%s“"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Naudojimas: %s [--version | --help]\n"
+"arba     %s dažniausios_bigramos < failų_sąrašas > locate-db\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Praneškite apie klaidas adresu <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "rašymo klaida"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Naudojimas: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, fuzzy, c-format
+msgid "Failed to write to standard output"
+msgstr "standartinis išvedimas"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dienų"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr ""
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr ""
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Locate duomenų bazės dydis: %s baitas\n"
+msgstr[1] "Locate duomenų bazės dydis: %s baitai\n"
+msgstr[2] "Locate duomenų bazės dydis: %s baitų\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Atitinkantys failų vardai: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Visi failų vardai: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Suspaudimo laipsnis %4.2f%% (didesnis geriau)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Suspaudimo laipsnis neapibrėžtas\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s yra slocate duomenų bazė.  Jų palaikymas atsirado neseniai, galite "
+"tikėtis nesklandumų."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Duomenų bazės %s formatas yra %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "netikėta failo pabaiga %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "klaida skaitant žodį iš %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr ""
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, fuzzy, c-format
+msgid "Cannot open input file %s"
+msgstr "%s: nepavyko atverti laikinojo failo: %s"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr ""
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr ""
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "argumentų eilutė per ilga"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr ""
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: grąžino klaidos kodą 255; nutraukiama"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: sustabdytas signalo %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: nutrauktas signalo %d"
+
+#: xargs/xargs.c:1469
+#, fuzzy, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: netaisyklingas argumentas"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr ""
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr ""
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "netaisyklingas argumentas %s %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "dviprasmis parametras %s argumentui %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Galimi argumentai:"
+
+#~ msgid "error closing file"
+#~ msgstr "klaida užveriant failą"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Nežinoma sistemos klaida"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: argumentas „%s“ dviprasmis\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: argumentas „--%s“ neleidžia parametro\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: argumentas „%c%s“ neleidžia parametro\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: parametrui „%s“ reikia argumento\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: neatpažintas argumentas „--%s“\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: neatpažintas argumentas „%c%s“\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: netaisyklingas argumentas -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: parametrui reikia argumento -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: parametras „-W %s“ dviprasmis\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: parametras „-W %s“ neleidžia argumento\n"
+
+#~ msgid "`"
+#~ msgstr "„"
+
+#~ msgid "'"
+#~ msgstr "“"
+
+#~ msgid "Success"
+#~ msgstr "Sėkmė"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Netaisyklinga reguliarioji išraiška"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Baigėsi atmintis"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Nesuderintas ) arba \\)"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yYtT]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "baigėsi atmintis"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: neleistinas argumentas -- %c\n"
+
+#~ msgid "%s: cannot create: %s"
+#~ msgstr "%s: nepavyko sukurti: %s"
+
+#~ msgid "%s: first non-whitespace character is not `\"'"
+#~ msgstr "%s: pirmas ne tarpo simbolis nėra „\"“"
+
+#~ msgid "no closing `%c' in %s"
+#~ msgstr "nėra uždarančiojo „%c“ %s"
+
+#~ msgid "%s: missing colon separator"
+#~ msgstr "%s: trūksta dvitaškio skirtuko"
+
+#~ msgid "`%s': invalid keymap name"
+#~ msgstr "„%s“: netaisyklingas keymap'o pavadinimas"
+
+#~ msgid "`%s': unknown function name"
+#~ msgstr "„%s“: nežinomas funkcijos pavadinimas"
+
+#~ msgid "%s is not bound to any keys.\n"
+#~ msgstr "%s nėra priskirtas jokiam klavišui.\n"
+
+#~ msgid "%s can be invoked via "
+#~ msgstr "%s gali būti iškviestas su"
+
+#~ msgid "only meaningful in a `for', `while', or `until' loop"
+#~ msgstr "prasminga tik „for“, „while“ arba „until“ cikle"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "HOME not set"
+#~ msgstr "HOME nenustatytas"
+
+#~ msgid "OLDPWD not set"
+#~ msgstr "OLDPWD nenustatytas"
+
+#~ msgid "too many arguments"
+#~ msgstr "per daug argumentų"
+
+#~ msgid "%s: numeric argument required"
+#~ msgstr "%s: reikia skaitinio argumento"
+
+#~ msgid "%s: not found"
+#~ msgstr "%s: nerasta"
+
+#~ msgid "%s: invalid option name"
+#~ msgstr "%s: netaisyklingas argumento pavadinimas"
+
+#~ msgid "`%s': not a valid identifier"
+#~ msgstr "`%s': netaisyklingas identifikatorius"
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: netaisyklingas skaičius"
+
+#, fuzzy
+#~ msgid "%s: invalid signal specification"
+#~ msgstr "%s: netaisyklinga signalo specifikacija"
+
+#~ msgid "`%s': not a pid or valid job spec"
+#~ msgstr "„%s“: ne pid'as ar taisyklinga darbo specifikacija"
+
+#~ msgid "%s: readonly variable"
+#~ msgstr "%s: kintamasis tik skaitymui"
+
+#~ msgid "%s: %s out of range"
+#~ msgstr "%s: %s išėjo už ribų"
+
+#~ msgid "argument"
+#~ msgstr "argumentas"
+
+#~ msgid "%s out of range"
+#~ msgstr "%s už ribų"
+
+#~ msgid "%s: no such job"
+#~ msgstr "%s: nėra tokio darbo"
+
+#~ msgid "%s: no job control"
+#~ msgstr "%s: nėra darbų valdymo"
+
+#~ msgid "no job control"
+#~ msgstr "nėra darbų valdymo"
+
+#~ msgid "%s: restricted"
+#~ msgstr "%s: apribota"
+
+#~ msgid "restricted"
+#~ msgstr "apribota"
+
+#~ msgid "%s: not a shell builtin"
+#~ msgstr "%s: ne vidinė aplinkos komanda"
+
+#~ msgid "write error: %s"
+#~ msgstr "rašymo klaida: %s"
+
+#~ msgid "%s: error retrieving current directory: %s: %s\n"
+#~ msgstr "%s: klaida skaitant esamą aplanką: %s: %s\n"
+
+#~ msgid "%s: ambiguous job spec"
+#~ msgstr "%s: dviprasmis darbo aprašymas"
+
+#, fuzzy
+#~ msgid "%s: invalid action name"
+#~ msgstr "%s: netaisyklingas argumentas -- %c\n"
+
+#~ msgid "%s: no completion specification"
+#~ msgstr "%s: nėra baigimo specifikacijos"
+
+#~ msgid "warning: -F option may not work as you expect"
+#~ msgstr "įspėjimas: parametras -F gali neveikti taip, kaip tikitės"
+
+#~ msgid "warning: -C option may not work as you expect"
+#~ msgstr "įspėjimas: parametras -C gali neveikti taip, kaip tikitės"
+
+#~ msgid "can only be used in a function"
+#~ msgstr "galima naudoti tik funkcijoje"
+
+#~ msgid "cannot use `-f' to make functions"
+#~ msgstr "negalima naudoti „-f“ funkcijoms kurti"
+
+#~ msgid "%s: readonly function"
+#~ msgstr "%s: funkcija tik skaitymui"
+
+#~ msgid "%s: cannot destroy array variables in this way"
+#~ msgstr "%s: negalima tokiu būdu sunaikinti masyvų kintamųjų"
+
+#~ msgid "dynamic loading not available"
+#~ msgstr "dinaminis įkrovimas negalimas"
+
+#~ msgid "cannot open shared object %s: %s"
+#~ msgstr "nepavyko atverti bendrojo objekto %s: %s"
+
+#~ msgid "cannot find %s in shared object %s: %s"
+#~ msgstr "nepavyko rasti %s bendrajame objekte %s: %s"
+
+#~ msgid "%s: not dynamically loaded"
+#~ msgstr "%s: nedinamiškai įkrauta"
+
+#~ msgid "%s: is a directory"
+#~ msgstr "%s: aplankas"
+
+#~ msgid "%s: not a regular file"
+#~ msgstr "%s: ne paprastas failas"
+
+#~ msgid "%s: file is too large"
+#~ msgstr "%s: failas per didelis"
+
+#~ msgid "%s: cannot execute: %s"
+#~ msgstr "%s: nepavyko paleisti: %s"
+
+#~ msgid "There are stopped jobs.\n"
+#~ msgstr "Yra sustabdytų darbų.\n"
+
+#~ msgid "%s: hash table empty\n"
+#~ msgstr "%s: maišos lentelė tuščia\n"
+
+#~ msgid ""
+#~ "no help topics match `%s'.  Try `help help' or `man -k %s' or `info %s'."
+#~ msgstr ""
+#~ "nėra žinyno temų, atitinkančių „%s“. Bandykite „help help“, „man -k %s“ "
+#~ "arba „info %s“."
+
+#~ msgid "%s: cannot open: %s"
+#~ msgstr "%s: nepavyko atverti: %s"
+
+#~ msgid "cannot use more than one of -anrw"
+#~ msgstr "negalima naudoti daugiau negu vieno iš -anrw"
+
+#~ msgid "Unknown error"
+#~ msgstr "Nežinoma klaida"
+
+#~ msgid "expression expected"
+#~ msgstr "tikėtasi išraiškos"
+
+#~ msgid "`%s': missing format character"
+#~ msgstr "„%s“: trūksta formato simbolio"
+
+#~ msgid "`%c': invalid format character"
+#~ msgstr "„%c“: netaisyklingas formato simbolis"
+
+#~ msgid "missing hex digit for \\x"
+#~ msgstr "trūksta šešioliktainio skaitmens išraiškoje \\x"
+
+#, fuzzy
+#~ msgid "%s: invalid timeout specification"
+#~ msgstr "%s: klaidingas skaičius -%c argumentui\n"
+
+#~ msgid "%s: invalid file descriptor specification"
+#~ msgstr "%s: netaisyklinga failo deskriptoriaus specifikacija"
+
+#~ msgid "%d: invalid file descriptor: %s"
+#~ msgstr "%d: netaisyklingas failo deskriptorius: %s"
+
+#~ msgid "read error: %d: %s"
+#~ msgstr "skaitymo klaida: %d: %s"
+
+#~ msgid "can only `return' from a function or sourced script"
+#~ msgstr "galima grįžti (return) tik iš funkcijos ar scenarijaus"
+
+#~ msgid "%s: not an array variable"
+#~ msgstr "%s: ne masyvo kintamasis"
+
+#~ msgid "%s: not a function"
+#~ msgstr "%s: ne funkcija"
+
+#~ msgid "shift count"
+#~ msgstr "postūmių skaičius"
+
+#, fuzzy
+#~ msgid "%s: invalid shell option name"
+#~ msgstr "%s: netaisyklingas argumentas -- %c\n"
+
+#~ msgid "filename argument required"
+#~ msgstr "reikia failo pavadinimo argumento"
+
+#~ msgid "%s: file not found"
+#~ msgstr "%s: failas nerastas"
+
+#~ msgid "cannot suspend"
+#~ msgstr "nepavyko sustabdyti"
+
+#~ msgid "%s is aliased to `%s'\n"
+#~ msgstr "%s yra „%s“ sinonimas\n"
+
+#~ msgid "%s is a shell keyword\n"
+#~ msgstr "%s yra aplinkos raktinis žodis\n"
+
+#~ msgid "%s is a function\n"
+#~ msgstr "%s yra funkcija\n"
+
+#~ msgid "%s is a shell builtin\n"
+#~ msgstr "%s yra aplinkos vidinė komanda\n"
+
+#~ msgid "%s is %s\n"
+#~ msgstr "%s yra %s\n"
+
+#~ msgid "`%c': bad command"
+#~ msgstr "`%c': bloga komanda"
+
+#~ msgid "%s: cannot get limit: %s"
+#~ msgstr "%s: nepavyko gauti limito: %s"
+
+#~ msgid "%s: cannot modify limit: %s"
+#~ msgstr "%s: nepayko pakeisti limito: %s"
+
+#~ msgid "octal number"
+#~ msgstr "aštuntainis skaičius"
+
+#~ msgid "last command: %s\n"
+#~ msgstr "paskutinė komanda: %s\n"
+
+#~ msgid "Aborting..."
+#~ msgstr "Nutraukiama..."
+
+#~ msgid "%s: warning: "
+#~ msgstr "%s: įspėjimas: "
+
+#~ msgid "bad command type"
+#~ msgstr "blogas komandos tipas"
+
+#~ msgid "bad connector"
+#~ msgstr "blogas jungtukas"
+
+#~ msgid "%s: unbound variable"
+#~ msgstr "%s: nepriskirtas kintamasis"
+
+#~ msgid "\atimed out waiting for input: auto-logout\n"
+#~ msgstr "\alaukiant įvedimo baigėsi laikas: automatiškai atsijungta\n"
+
+#~ msgid "TIMEFORMAT: `%c': invalid format character"
+#~ msgstr "TIMEFORMAT: „%c“: netaisyklingas formato simbolis"
+
+#~ msgid "%s: restricted: cannot specify `/' in command names"
+#~ msgstr "%s: apribota: negalima naudoti „/“ komandų pavadinimuose"
+
+#~ msgid "%s: %s: bad interpreter"
+#~ msgstr "%s: %s: blogas interpretatorius"
+
+#~ msgid "%s: cannot execute binary file"
+#~ msgstr "%s: negalima vykdyti dvejetainių failų"
+
+#~ msgid "expression recursion level exceeded"
+#~ msgstr "viršytas išraiškos rekursijos lygis"
+
+#~ msgid "recursion stack underflow"
+#~ msgstr "rekursijos steko atvirkštinis perpildymas"
+
+#~ msgid "syntax error in expression"
+#~ msgstr "sintaksės klaida išraiškoje"
+
+#~ msgid "attempted assignment to non-variable"
+#~ msgstr "bandymas priskirti ne kintamajam"
+
+#~ msgid "division by 0"
+#~ msgstr "dalyba iš 0"
+
+#~ msgid "bug: bad expassign token"
+#~ msgstr "klaida: bloga expassign leksema"
+
+#~ msgid "`:' expected for conditional expression"
+#~ msgstr "sąlygos išraiškoje tikėtasi „:“"
+
+#~ msgid "exponent less than 0"
+#~ msgstr "eksponentas mažesnis už 0"
+
+#~ msgid "missing `)'"
+#~ msgstr "Trūksta „)“"
+
+#~ msgid "syntax error: operand expected"
+#~ msgstr "sintaksės klaida: tikėtasi operando"
+
+#~ msgid "syntax error: invalid arithmetic operator"
+#~ msgstr "sintaksės klaida: netaisyklingas aritmetinis operatorius"
+
+#~ msgid "invalid number"
+#~ msgstr "netaisyklingas skaičius"
+
+#~ msgid "invalid arithmetic base"
+#~ msgstr "netaisyklingas aritmetinis pagrindas"
+
+#~ msgid "value too great for base"
+#~ msgstr "per didelė pagrindo reikšmė"
+
+#~ msgid "getcwd: cannot access parent directories"
+#~ msgstr "getcwd: nepavyko pasiekti aukštesnių aplankų"
+
+#~ msgid "describe_pid: %ld: no such pid"
+#~ msgstr "describe_pid: %ld: tokio pid nėra"
+
+#~ msgid "wait_for: No record of process %ld"
+#~ msgstr "wait_for: nėra proceso %ld įrašo"
+
+#~ msgid "wait_for_job: job %d is stopped"
+#~ msgstr "wait_for_job: darbas %d yra sustabdytas"
+
+#~ msgid "%s: job has terminated"
+#~ msgstr "%s: darbas baigtas"
+
+#~ msgid "%s: job %d already in background"
+#~ msgstr "%s: darbas %d jau fone"
+
+#~ msgid "no job control in this shell"
+#~ msgstr "šioje aplinkoje nėra darbų valdymo"
+
+#~ msgid "malloc: failed assertion: %s\n"
+#~ msgstr "malloc: pažeista prielaida: %s\n"
+
+#~ msgid ""
+#~ "\r\n"
+#~ "malloc: %s:%d: assertion botched\r\n"
+#~ msgstr ""
+#~ "\r\n"
+#~ "malloc: %s:%d: prielaida pažeista\r\n"
+
+#~ msgid "allocated"
+#~ msgstr "išskirta"
+
+#~ msgid "freed"
+#~ msgstr "atlaisvinta"
+
+#~ msgid "requesting resize"
+#~ msgstr "prašoma dydžio keitimo"
+
+#~ msgid "just resized"
+#~ msgstr "tik ką pakeistas dydis"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "klaida: nežinoma operacija"
+
+#, fuzzy
+#~ msgid "%s: invalid service"
+#~ msgstr "%s: netaisyklingas argumentas -- %c\n"
+
+#~ msgid "%s: bad network path specification"
+#~ msgstr "%s: netaisyklingas tinklo kelias"
+
+#~ msgid "network operations not supported"
+#~ msgstr "tinklo operacijos nepalaikomos"
+
+#~ msgid "You have new mail in $_"
+#~ msgstr "Turite naujų laiškų $_"
+
+#~ msgid "The mail in %s has been read\n"
+#~ msgstr "Paštas %s perskaitytas\n"
+
+#~ msgid "syntax error: arithmetic expression required"
+#~ msgstr "sintaksės klaida: reikia aritmetinės išraiškos"
+
+#~ msgid "syntax error: `;' unexpected"
+#~ msgstr "sintaksės klaida: netikėtas „;“"
+
+#~ msgid "syntax error: `((%s))'"
+#~ msgstr "sintaksės klaida: „((%s))“"
+
+#~ msgid "make_here_document: bad instruction type %d"
+#~ msgstr "make_here_document: blogas instrukcijos tipas %d"
+
+#~ msgid "make_redirection: redirection instruction `%d' out of range"
+#~ msgstr "make_redirection: nukreipimo instrukcija „%d“ už ribų"
+
+#~ msgid "unexpected EOF while looking for matching `%c'"
+#~ msgstr "netikėta failo pabaiga ieškant atitinkamo „%c“"
+
+#~ msgid "syntax error in conditional expression: unexpected token `%s'"
+#~ msgstr "sintaksės klaida sąlygos išraiškoje: netikėta leksema „%s“"
+
+#~ msgid "syntax error in conditional expression"
+#~ msgstr "sintaksės klaida sąlygos išraiškoje"
+
+#~ msgid "expected `)'"
+#~ msgstr "tikėtasi „)“"
+
+#~ msgid "unexpected argument `%s' to conditional unary operator"
+#~ msgstr "netikėtas argumentas „%s“ sąlygos unariniam operatoriui"
+
+#~ msgid "unexpected argument to conditional unary operator"
+#~ msgstr "netikėtas argumentas sąlygos unariniam operatoriui"
+
+#~ msgid "unexpected token `%s', conditional binary operator expected"
+#~ msgstr "netikėta leksema „%s“, tikėtasi sąlyginio binarinio operatoriaus"
+
+#~ msgid "conditional binary operator expected"
+#~ msgstr "tikėtasi sąlygos binarinio operatoriaus"
+
+#~ msgid "unexpected argument `%s' to conditional binary operator"
+#~ msgstr "netikėtas argumentas „%s“ sąlygos binariniam operatoriui"
+
+#~ msgid "unexpected argument to conditional binary operator"
+#~ msgstr "netikėtas argumentas sąlygos binariniam operatoriui"
+
+#~ msgid "unexpected token `%c' in conditional command"
+#~ msgstr "netikėta leksema „%c“ sąlygos komandoje"
+
+#~ msgid "unexpected token `%s' in conditional command"
+#~ msgstr "netikėta leksema „%s“ sąlygos komandoje"
+
+#~ msgid "unexpected token %d in conditional command"
+#~ msgstr "netikėta leksema %d sąlygos komandoje"
+
+#~ msgid "syntax error near unexpected token `%s'"
+#~ msgstr "sintaksės klaida prie netikėtos leksemos: „%s“"
+
+#~ msgid "syntax error near `%s'"
+#~ msgstr "sintaksės klaida prie „%s“"
+
+#~ msgid "syntax error: unexpected end of file"
+#~ msgstr "sintaksės klaida: netikėta failo pabaiga"
+
+#~ msgid "syntax error"
+#~ msgstr "sintaksės klaida"
+
+#~ msgid "Use \"%s\" to leave the shell.\n"
+#~ msgstr "Naudokite „%s“, jei norite išeiti iš ap.\n"
+
+#~ msgid "unexpected EOF while looking for matching `)'"
+#~ msgstr "netikėta failo pabaiga ieškant atitinkamo „)“"
+
+#~ msgid "completion: function `%s' not found"
+#~ msgstr "completion: funkcija „%s“ nerasta"
+
+#~ msgid "progcomp_insert: %s: NULL COMPSPEC"
+#~ msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#~ msgid "print_command: bad connector `%d'"
+#~ msgstr "print_command: blogas jungtukas  „%d“"
+
+#~ msgid "cprintf: `%c': invalid format character"
+#~ msgstr "cprintf: „%c“: netaisyklingas formato simbolis"
+
+#~ msgid "file descriptor out of range"
+#~ msgstr "failo deskriptorius už ribų"
+
+#~ msgid "%s: ambiguous redirect"
+#~ msgstr "%s: ambiguous redirect"
+
+#~ msgid "%s: cannot overwrite existing file"
+#~ msgstr "%s: negalima perrašyti egzistuojančio failo"
+
+#~ msgid "%s: restricted: cannot redirect output"
+#~ msgstr "%s: apribota: negalima peradresuoti išvedimo"
+
+#~ msgid "cannot create temp file for here document: %s"
+#~ msgstr "nepavyko sukurti laikino failo „here“ dokumentui: %s"
+
+#~ msgid "/dev/(tcp|udp)/host/port not supported without networking"
+#~ msgstr "/dev/(tcp|udp)/komp/prievadas nepalaikoma be tinklo"
+
+#~ msgid "redirection error: cannot duplicate fd"
+#~ msgstr "nukreipimo klaida: nepavyko dublikuoti fd"
+
+#~ msgid "could not find /tmp, please create!"
+#~ msgstr "nepavyko rasti /tmp, sukurkite šį aplanką!"
+
+#~ msgid "/tmp must be a valid directory name"
+#~ msgstr "/tmp turi būti taisyklingas aplanko pavadinimas"
+
+#~ msgid "%c%c: invalid option"
+#~ msgstr "%c%s: netaisyklingas argumentas"
+
+#~ msgid "I have no name!"
+#~ msgstr "Neturiu vardo!"
+
+#~ msgid "sigprocmask: %d: invalid operation"
+#~ msgstr "sigprocmask: %d: netaisyklinga operacija"
+
+#~ msgid "%s: parameter null or not set"
+#~ msgstr "%s: parametras tuščias arba nenustatytas"
+
+#~ msgid "$%s: cannot assign in this way"
+#~ msgstr "$%s: negalima tokiu būdu priskirti"
+
+#~ msgid "no match: %s"
+#~ msgstr "nėra atitikmenų: %s"
+
+#~ msgid "argument expected"
+#~ msgstr "tikėtasi argumento"
+
+#~ msgid "%s: integer expression expected"
+#~ msgstr "%s: tikėtasi skaitinės išraiškos"
+
+#~ msgid "`)' expected"
+#~ msgstr "tikėtasi „)“"
+
+#~ msgid "`)' expected, found %s"
+#~ msgstr "tikėtasi „)“, rasta %s"
+
+#~ msgid "%s: unary operator expected"
+#~ msgstr "%s: tikėtasi unarinio operatoriaus"
+
+#~ msgid "%s: binary operator expected"
+#~ msgstr "%s: tikėtasi binarinio operatoriaus"
+
+#~ msgid "missing `]'"
+#~ msgstr "trūksta „]“"
+
+#~ msgid "invalid signal number"
+#~ msgstr "netaisyklingas signalo numeris"
+
+#~ msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+#~ msgstr "run_pending_traps: bloga trap_list[%d] reikšmė: %p"
+
+#~ msgid "trap_handler: bad signal %d"
+#~ msgstr "trap_handler: blogas signalas %d"
+
+#~ msgid "error importing function definition for `%s'"
+#~ msgstr "klaida importuojant funkcijos apibrėžimą „%s“"
+
+#, fuzzy
+#~ msgid "make_local_variable: no function context at current scope"
+#~ msgstr "make_local_variable: "
+
+#, fuzzy
+#~ msgid "invalid character %d in exportstr for %s"
+#~ msgstr "netaisyklingas parametras %s argumentui %s"
+
+#~ msgid "Copyright (C) 2006 Free Software Foundation, Inc.\n"
+#~ msgstr "Autorinės teisės (C) 2006 Free Software Foundation, Inc.\n"
+
+#~ msgid "xmalloc: cannot allocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xmalloc: nepavyko išskirti %lu baitų (%lu baitų išskirta)"
+
+#~ msgid "xmalloc: cannot allocate %lu bytes"
+#~ msgstr "xmalloc: nepavyko išskirti %lu baitų"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: nepavyko išskirti %lu baitų"
+
+#~ msgid "xmalloc: %s:%d: cannot allocate %lu bytes"
+#~ msgstr "xmalloc: %s:%d: nepavyko išskirti %lu baitų"
+
+#~ msgid "xrealloc: %s:%d: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: %s:%d: nepavyko išskirti %lu baitų"
diff --git a/po/ms.gmo b/po/ms.gmo
new file mode 100644 (file)
index 0000000..aa028b5
Binary files /dev/null and b/po/ms.gmo differ
diff --git a/po/ms.po b/po/ms.po
new file mode 100644 (file)
index 0000000..d6d238d
--- /dev/null
+++ b/po/ms.po
@@ -0,0 +1,1270 @@
+# THINK DIFFERENT, THINK OPENSOURSE.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Nik Ramadhan Nik Idris <toknik@yahoo.com>, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils-4.1.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2003-01-19 14:42+0800\n"
+"Last-Translator: Nik Ramadhan Nik Idris <toknix@yahoo.com>\n"
+"Language-Team: Malay <translation-team-ms@lists.sourceforge.net>\n"
+"Language: ms\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr ""
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr ""
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "tidak diketahui"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr ""
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: pilihan `%s' memerlukan hujah\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "mod yang salah `%s'"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr ""
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "jenis saiz tidak sah `%c'"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "hujah yang salah `%s' kepada `%s'"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "hujah yang salah `%s' kepada `%s'"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr ""
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr ""
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr ""
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr ""
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr ""
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "ralat menunggu untuk %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr ""
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr ""
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr ""
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr ""
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr ""
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr ""
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr ""
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr ""
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr ""
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "hujah yang salah `%s' kepada `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "kehilangan hujah kepada `%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr ""
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr ""
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr ""
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr ""
+
+#: find/util.c:451
+#, c-format
+msgid "failed to save initial working directory"
+msgstr ""
+
+#: find/util.c:468
+#, c-format
+msgid "failed to restore initial working directory"
+msgstr ""
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr ""
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "arahan terlalu panjang"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "senarai hujag terlalu panjang"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "versi find GNU  %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr ""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+#, fuzzy
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Laporkan pepijat kepada <bug-findutils@gnu.org>."
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "hari"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "hujah %s tidak sah untuk `%s'"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr ""
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "ralat menunggu untuk %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr ""
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr ""
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "berganda"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "tunggal"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "baris hujah terlalu panjang"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "ralat menunggu untuk proses anak"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: keluar dengan status; abaikan"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: di berhentikan oleh signal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: diputuskan oleh signal %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr ""
+
+#: xargs/xargs.c:1476
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: nilai untuk pilihan -%c mesti >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s:nilai untuk pilihan -%c mesti < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+
+#, fuzzy
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "hujah %s tidak sah untuk `%s'"
+
+#, fuzzy
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "hujah %s adalah kabur untuk `%s'"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Hujah yang sah ialah:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "ralat sistem tidak diketahui"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: pilihan `%s' adalah kabur\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: pilihan `--%s' tidak mengizinkan sebarang hujah\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: pilihan `%c%s' tidak mengizinkan sebarang hujah\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: pilihan `%s' memerlukan hujah\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: pilihan tidak dapat dikenal pasti `--%s'\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: pilihan tidak dapat dikenal pasti `%c%s'\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: pilihan yang tidak sah -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: pilihan memerlukan hujah -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: pilihan `-W %s' adalah kabur\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: pilihan `-W %s' tidak mengizinkan sebarang hujah\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "Berjaya"
+
+#~ msgid "No match"
+#~ msgstr "tidak padan"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Tidak padan  [ atau [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( atau \\( tidak sesuai"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr " \\{ Tidak sesuai"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "memori kehabisan"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") atau \\) tidak sesuai"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#, fuzzy
+#~ msgid "memory exhausted"
+#~ msgstr "memori kehabisan"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "hujah %s tidak sah untuk `%s'"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "hujah %s tidak sah untuk `%s'"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "senarai hujag terlalu panjang"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: pilihan tidak dibenarkan -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "saiz blok"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "kehabisan memori maya"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. perubahan semasa perlaksanaan %s"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "ralat dalam %s: %s"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    jenis: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "kiri:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "kanan:\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "versi locate GNU %s\n"
diff --git a/po/nl.gmo b/po/nl.gmo
new file mode 100644 (file)
index 0000000..63bece3
Binary files /dev/null and b/po/nl.gmo differ
diff --git a/po/nl.po b/po/nl.po
new file mode 100644 (file)
index 0000000..5b3d8cf
--- /dev/null
+++ b/po/nl.po
@@ -0,0 +1,1311 @@
+# Dutch translations for findutils.
+# Copyright (C) 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+#
+# Erick Branderhorst <branderh@debian.org>, 1996.
+# Ivo Timmermans <itimmermans@bigfoot.com>, 2000.
+# Taco Witte <tcwitte@cs.uu.nl>, 2004.
+# Erwin Poeze <erwin.poeze@gmail.com>, 2009.
+# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2006, 2007, 2008, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils-4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-04-06 22:00+0200\n"
+"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
+"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
+"Language: nl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Initialisatie van hash-tabel voor gedeelde bestanden is mislukt"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "kan status van huidige map niet opvragen"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Kan lijst van aangekoppelde apparaten niet lezen."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "WAARSCHUWING: bestandssysteem %s is recent ontkoppeld."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "WAARSCHUWING: bestandssysteem %s is recent aangekoppeld."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s is gewijzigd tijdens het uitvoeren van %s\n"
+"(oud apparaatnummer is %ld, nieuw apparaatnummer is %ld,\n"
+"bestandssysteemsoort is %s) [regel %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s is gewijzigd tijdens het uitvoeren van %s\n"
+"(oud inode-nummer is %<PRIuMAX>, nieuw inode-nummer is %<PRIuMAX>,\n"
+"bestandssysteemsoort is %s) [regel %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "kan niet terugkeren naar bovenliggende map"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Het veilig wijzigen van de huidige map naar %s is mislukt"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Symbolische koppeling %s is deel van een oneindige lus in\n"
+"de mappenhiërarchie: de map waarnaar de koppeling wijst is al bezocht."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Oneindige lus in bestandssysteem: %s heeft hetzelfde apparaatnummer\n"
+"en inode-nummer als een map %d niveau hoger in de mappenhiërarchie."
+msgstr[1] ""
+"Oneindige lus in bestandssysteem: %s heeft hetzelfde apparaatnummer\n"
+"en inode-nummer als een map %d niveaus hoger in de mappenhiërarchie."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "waarschuwing: symbolische koppeling %s wordt niet gevolgd"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"WAARSCHUWING: het aantal harde koppelingen voor %s is onjuist;\n"
+"volgens het bestandssysteem zijn er %<PRIuMAX> koppelingen naar deze map,\n"
+"maar er zijn al %<PRIuMAX> submappen gepasseerd.\n"
+"Dit zou een fout in het stuurprogramma van het bestandssysteem kunnen zijn.\n"
+"Optie '-noleaf' wordt nu automatisch aangezet.  In de tot nu toe gegeven\n"
+"resultaten kunnen mappen ontbreken die doorzocht hadden moeten worden."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Kan lijst van aangekoppelde apparaten niet lezen"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "onbekend"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Oneindige lus in bestandssysteem: %s is onderdeel van dezelfde "
+"bestandssysteemlus als %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "WAARSCHUWING: bestand %s lijkt modus 0000 te hebben."
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "kan %s niet doorzoeken"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "kan werkmap niet herstellen na het doorzoeken van %s"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"De actie '-delete' schakelt automatisch '-depth' in,\n"
+"maar '-prune' doet niets als '-depth' ingeschakeld is.\n"
+"Als u toch door wilt gaan, gebruik dan expliciet de optie '-depth'."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"Waarschuwing: optie '%s' werd gegeven na het non-optie-argument '%s',\n"
+"maar opties zijn niet positioneel: '%s' beïnvloedt zowel voorgaande\n"
+"als nakomende testen.  Geef opties op vóór andere argumenten.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"Waarschuwing: de optie '-d' wordt afgeraden;\n"
+"gebruik liever '-depth', want dat is een POSIX-optie."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s is geen bestaande groepsnaam, en het lijkt niet op een numeriek ID\n"
+"vanwege het onverwachte achtervoegsel %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s is geen bestaande groepsnaam"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "het argument van '-group' is leeg, maar zou een groepsnaam moeten zijn"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"Het standaardpad is de huidige map; de standaardexpressie is '-print';\n"
+"de expressie mag bestaan uit: operatoren, opties, testen, en acties:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"Operatoren (in afnemende voorrangsvolgorde;\n"
+"            de operator '-and' is impliciet als er geen andere gegeven is):\n"
+"    ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"    EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"Positionele opties (altijd waar):  -daystart  -follow  -regextype\n"
+"\n"
+"Normale opties (ook altijd waar, maar gegeven vóór andere expressies):\n"
+"    -depth  --help  -maxdepth NIVEAUS  -mindepth NIVEAUS  -mount  -noleaf\n"
+"    --version  -xdev  -ignore_readdir_race  -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"Testen (N mag ook +N of -N zijn):  -amin N  -anewer BESTAND  -atime N\n"
+"    -cmin N  -cnewer BESTAND  -ctime N  -empty  -false  -fstype SOORT\n"
+"    -gid N  -group NAAM  -ilname PATROON  -iname PATROON  -inum N\n"
+"    -iregex PATROON  -iwholename PATROON  -links N  -lname PATROON\n"
+"    -mmin N  -mtime N  -name PATROON  -newer BESTAND  -nouser  -nogroup"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"    -path PATROON  -perm [+-]MODUS  -regex PATROON  -readable\n"
+"    -writable  -executable  -size N[bcwkMG]  -true  -type [bcdpflsD]\n"
+"    -uid N  -used N  -user NAAM  -wholename PATROON  -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context CONTEXT\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"Acties:  -fprint BESTAND  -fprint0 BESTAND  -fprintf BESTAND OPMAAK\n"
+"    -exec COMMANDO ;  -exec COMMANDO {} +  -ok COMMANDO ;  -ls  -fls "
+"BESTAND\n"
+"    -execdir COMMANDO ;  -execdir COMMANDO {} +  -okdir COMMANDO ;\n"
+"    -print  -print0  -printf OPMAAK  -delete  -prune  -quit\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Rapporteer gebreken in 'findutils' via de foutenrapportagepagina op\n"
+"http://savannah.gnu.org/.  Als u geen webtoegang hebt, stuur dan\n"
+"een e-mail naar <bug-findutils@gnu.org>.\n"
+"Meld fouten in de vertaling aan <vertaling@vrijschrift.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "de zinnigheidscontrole van de fnmatch()-systeemfunctie is mislukt"
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"Waarschuwing: bestandsnamen bevatten gewoonlijk geen schuine strepen\n"
+"(padnamen wel); dit betekent dat '%s %s' op dit systeem waarschijnlijk\n"
+"altijd onwaar zal zijn.  De test '-wholename' is vermoedelijk zinvoller,\n"
+"of misschien '-samefile'.  Of anders, als u GNU grep hebt, kunt u\n"
+"'find ... -print0 | grep -FzZ %s' gebruiken."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+"Als argument van %s werd een tientallig positief geheel getal verwacht,\n"
+"maar %s werd gegeven"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+"Dit systeem kent niet de mogelijkheid om de ontstaanstijd van een bestand te "
+"bepalen."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Test '%s' vereist een argument"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Kan %s niet als datum of tijd interpreteren"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Kan ontstaanstijd van bestand %s niet bepalen"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+"Waarschuwing: -%s %s zal met niets overeenkomen omdat het eindigt met /."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Modus %s is ongeldig als POSIXLY_CORRECT aan staat."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "ongeldige modus %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"Waarschuwing: het opgegeven moduspatroon %s is gelijkwaardig aan /000.\n"
+"De betekenis van '-perm /000' is gelijkgemaakt aan die van '-perm -000'; "
+"dus\n"
+"in plaats van met geen enkel bestand komt het nu overeen met alle bestanden."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "ongeldig leeg argument van '-size'"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "ongeldige aanduiding '%c' bij optie '-size'"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Ongeldig argument '%s%c' van '-size'"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"De optie '-show-control-chars' vereist als argument\n"
+"ofwel 'literal' (letterlijk) ofwel 'safe' (veilig)"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Ongeldig argument '%s' van '-used'"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "'%s' is geen bestaande gebruikersnaam"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Het argument van optie '-user' mag niet leeg zijn"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Compilatie-opties: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "ongeldige test '-context': SELinux is niet ingeschakeld"
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Argument van '-type' dient slechts één letter te zijn"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Onbekend argument van '-type': '%c'"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "waarschuwing: onbekende stuurcode '\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "fout: '%s' aan einde van opmaaktekenreeks"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "waarschuwing: onbekende opmaakcode '%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "fout: opmaakcode '%%%c' is gereserveerd voor toekomstig gebruik"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"De huidige map komt voor in de omgevingsvariabele PATH;\n"
+"dit is onveilig in combinatie met de actie '%s' van 'find'.\n"
+"Verwijder de huidige map uit uw PATH-variabele (oftewel:\n"
+"haal de \".\" of dubbele punten aan begin en eind weg)."
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Het relatieve pad %s komt voor in de omgevingsvariabele PATH;\n"
+"dit is onveilig in combinatie met de actie '%s' van 'find'.\n"
+"Verwijder daarom dat relatieve pad uit uw PATH-variabele."
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Om veiligheidsredenen mag {} bij '-execdir' en '-okdir' niet gebruikt\n"
+"worden binnen de naam van het hulpprogramma."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Bij '-exec%s ... +' mag {} slechts één keer voorkomen."
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Omgeving is te groot voor exec()."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+"rekenkundige overloop tijdens omzetting van %s dagen in aantal seconden"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "rekenkundige overloop tijdens berekening van het einde van vandaag"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standaardfoutuitvoer"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standaarduitvoer"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "kan %s niet verwijderen"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "kan werkmap niet herstellen na het doorzoeken van %s"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon() is mislukt: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "WAARSCHUWING: kan ontstaanstijd van bestand %s niet bepalen"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Kan standaardinvoer niet sluiten"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Kan niet van map wijzigen"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "kan geen nieuw proces starten"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "fout tijdens wachten op %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s: afgebroken door signaal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "ongeldige expressie"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"ongeldige expressie: binaire operator '%s' is gebruikt met niets ervoor"
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "expressie werd verwacht tussen '%s' en ')'"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "expressie werd verwacht na '%s'"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "ongeldige expressie: er zijn te veel ')'"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr "ongeldige expressie: ontbrekend ')' -- of er ontbreekt iets na '%s'"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "ongeldige expressie: lege haakjes zijn niet toegestaan"
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "ongeldige expressie: ontbrekend ')'"
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "oeps -- ongeldig expressietype!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "oeps -- ongeldig expressietype (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "padnamen moeten voorafgaan aan expressies (%s)"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "onbekende optie, test of actie: '%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "ongeldige optie, test of actie: '%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "ongeldig argument '%s' van '%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "ontbrekend argument van '%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "er zijn te veel ')'"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "onverwacht extra argument '%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "onverwacht extra argument"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "oeps -- ongeldige standaardtussenvoeging van '-and'!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Gebruik:  %s [-HLP] [-Oniveau] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [pad...] [expressie]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "kan niet terugkeren naar bovenliggende map"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "kan niet terugkeren naar bovenliggende map"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Onbekende debugvlag '%s' wordt genegeerd."
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Argument van optie '-D' is leeg"
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Direct na optie '-O' dient een cijfer te staan"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Geef direct na optie '-O' een cijfer op"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Ongeldig optimalisatieniveau %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Optimalisatieniveau %lu is te hoog.\n"
+"Als u bestanden heel vlug wilt vinden, gebruik dan 'locate'."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"De omgevingsvariabele FIND_BLOCK_SIZE wordt niet ondersteund.\n"
+"Alleen de omgevingsvariabele POSIXLY_CORRECT beïnvloedt de blokgrootte."
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "commando is te lang"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr "kan exec() niet aanroepen wegens beperkingen aan de argumentlengte"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"zelfs één enkel argument past niet binnen beschikbare grootte van "
+"argumentenlijst"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "argumentenlijst is te lang"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr "Omgevingsvariable %s is niet ingesteld op een geldig decimaal getal"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Gecompileerd met GNU gnulib versie %s.\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Onverwacht achtervoegsel %s bij %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Verwachtte een geheel getal: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Onbekend type (%s) van reguliere expressie; geldige types zijn %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Gebruik:  %s meest_gebruikte_bigrams  < bestandenlijst  > locate-"
+"gegevensbank\n"
+"     of:  %s [ --version | --help ]\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Rapporteer gebreken in het programma aan <bug-findutils@gnu.org>;\n"
+"meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "schrijffout"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Gebruik:  %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Een veiligheidsniveau dient een cijfer te zijn."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Veiligheidsniveau %s valt buiten het omzetbare bereik."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Veiligheidsniveau %s heeft een onverwacht achtervoegsel %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "Veiligheidsniveau %ld wordt door 'slocate' niet ondersteund."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Schrijven naar standaarduitvoer is mislukt"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dagen"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Het argument van optie '--max-database-age' mag niet leeg zijn"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Ongeldig argument %s van optie '--max-database-age'"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr "locate-gegevensbank %s bevat een te lange bestandsnaam"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate-gegevensbank %s is beschadigd of ongeldig"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Grootte van locate-gegevensbank: %s byte\n"
+msgstr[1] "Grootte van locate-gegevensbank: %s bytes\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Overeenkomende bestandsnamen: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Alle bestandsnamen: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"De bestandsnamen hebben een totale lengte van %s bytes.\n"
+"Enkele details:\n"
+"    %s bestandsnamen bevatten witruimte,\n"
+"    %s bestandsnamen bevatten regeleindetekens,\n"
+"    %s bestandsnamen bevatten tekens met het hoogste bit gezet.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Er kunnen bestandsnamen uitgefilterd zijn,\n"
+"dus de compressieverhouding kan niet berekend worden.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Compressieverhouding is %4.2f%% (hoger is beter)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Compressieverhouding is ongedefinieerd\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"Gegevensbank %s schijnt een slocate-gegevensbank te zijn,\n"
+"maar lijkt veiligheidsniveau %c te hebben.\n"
+"Dit niveau kan deze 'findutils' nog niet aan."
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"Bestand %s is een slocate-gegevensbank.\n"
+"Ondersteuning hiervoor is nieuw; houd rekening met problemen."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"Bestand %s wordt overgeslagen;\n"
+"het is een slocate-gegevensbank met een onbekend veiligheidsniveau %d."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Optie '-E' werd gegeven, maar die optie kan niet gebruikt worden bij\n"
+"slocate-gegevensbanken met een veiligheidsniveau dat niet nul is.\n"
+"Voor deze gegevensbank zullen geen resultaten gegenereerd worden.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "Bestand %s is een slocate-gegevensbank; optie '-e' wordt ingeschakeld."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"Oude-stijl locate-gegevensbank %s is te klein om geldig te kunnen zijn."
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Gegevensbank '%s' is in de %s-indeling.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "De bytevolgorde van de gegevensbank is little-endian.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "De bytevolgorde van de gegevensbank is big-endian.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "De bytevolgorde van de gegevensbank is onduidelijk.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Gebruik:  %s  [-d PAD | --database=PAD]  [-e | -E | --[non-]existing]\n"
+"          [-i | --ignore-case]  [-w | --wholename]  [-b | --basename]\n"
+"          [--limit=N | -l N]  [-S | --statistics]  [-0 | --null]\n"
+"          [-c | --count]  [-P | -H | --nofollow]  [-L | --follow]\n"
+"          [-m | --mmap]  [-s | --stdio]  [-A | --all]  [-p | --print]\n"
+"          [-r | --regex]  [--regextype=SOORT]  [--max-database-age D]\n"
+"          [--version]  [--help]  PATROON...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "Wegnemen van groepsprivileges is mislukt"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "Wegnemen van SETUID-privileges is mislukt"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Volledig wegnemen van privileges is mislukt"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "Wegnemen van SETGID-privileges is mislukt"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"Waarschuwing: de locate-gegevensbank kan slechts één keer van "
+"standaardinvoer gelezen worden."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "Aanroep van systeemfunctie time() is mislukt"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"Waarschuwing: gegevensbank %s is meer dan %d %s oud: de leeftijd is %.1f %s."
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+"WAARSCHUWING: locate-gegevensbank %s werd met een andere bytevolgorde "
+"samengesteld."
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "onverwacht bestandseinde in %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "fout tijdens het lezen van een woord uit %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Ongeldige stuurcode '%s' in specificatie van scheidingsteken."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Ongeldige stuurcode '%s' in specificatie van scheidingsteken;\n"
+"tekenwaardes mogen niet groter zijn dan %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Ongeldige stuurcode '%s' in specificatie van scheidingsteken;\n"
+"tekenwaardes mogen niet groter zijn dan %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Ongeldige stuurcode '%s' in specificatie van scheidingsteken;\n"
+"onbegrepen nakomende tekens '%s'."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Ongeldige specificatie '%s' van scheidingsteken; het scheidingsteken\n"
+"dient een enkel teken te zijn of een stuurcode beginnend met \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "Omgeving is te groot voor exec()."
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"Waarschuwing: waarde %ld voor optie '-s' is te groot; %ld wordt gebruikt"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Kan invoerbestand %s niet openen"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "De omgevingsvariabelen nemen %<PRIuMAX> bytes in beslag.\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "POSIX-bovengrens aan argumentlengte (op dit systeem): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Minimale POSIX-bovengrens aan argumentlengte (op alle systemen): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Maximum lengte van een verwerkbaar commando: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Grootte van het gebruikte commandobuffer: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"'xargs' zal nu verdergaan; het zal de invoer lezen en opdrachten uitvoeren.\n"
+"Als u dit niet bedoelde, typ dan de onderbrekingstoets (meestal Ctrl-C).\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Waarschuwing: '%s' zal minstens één keer uitgevoerd worden.\n"
+"Als u dit niet wilt, typ dan de onderbrekingstoets (meestal Ctrl-C).\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"Ongepaard %s aanhalingsteken; aanhalingstekens worden door 'xargs'\n"
+"speciaal behandeld tenzij u optie '-0' gebruikt."
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dubbel"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "enkel"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"WAARSCHUWING: een NUL-teken werd gevonden in de invoer.\n"
+"Deze kan niet doorgegeven worden aan de argumentenlijst.\n"
+"Wilde u misschien de optie '--null' gebruiken?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "argumentenregel is te lang"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "kan /dev/tty niet openen om te lezen"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "kan geen pijp aanmaken vóór het starten van een nieuw proces"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"bufferleesopdracht in xargs_do_exec() is mislukt;\n"
+"dit is waarschijnlijk een programmafout, gelieve dit te melden"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"leesopdracht retouneerde onverwachte waarde %d;\n"
+"dit is waarschijnlijk een programmafout, gelieve dit te melden"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "fout tijdens wachten op dochterproces"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "WAARSCHUWING: %d dochterprocessen zijn zoekgeraakt"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: eindigde met afsluitwaarde 255 -- gestopt"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: gestopt door signaal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: afgebroken door signaal %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: ongeldig nummer bij optie '-%c'\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: waarde bij optie '-%c' moet groter of gelijk aan %ld zijn\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: waarde bij optie '-%c' moet kleiner dan %ld zijn\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Gebruik:  %s [-0prtx] [--interactive]  [-d|--delimiter=scheidingsteken]\n"
+"          [--null]  [-E EOF_reeks]  [-e[EOF_reeks]]  [--eof[=EOF_reeks]]\n"
+"          [-I te_vervangen_tekenreeks]  [-i[te_vervangen_tekenreeks]]\n"
+"          [--replace[=te_vervangen_reeks]]  [--max-lines"
+"[=max_aantal_regels]]\n"
+"          [-L max_aantal_regels]  [-l[max_aantal_regels]]  [--show-limits]\n"
+"          [-n max_aantal_argumenten]  [--max-args=max_aantal_argumenten]\n"
+"          [-P max_aantal_processen]  [--max-procs=max_aantal_processen]\n"
+"          [-s max_aantal_tekens]  [--max-chars=max_aantal_tekens]\n"
+"          [--exit]  [--no-run-if-empty]  [--verbose]  [--arg-file=bestand]\n"
+"          [--version]  [--help]  [COMMANDO [eerste_argumenten]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "kan huidige map niet opvragen"
diff --git a/po/pl.gmo b/po/pl.gmo
new file mode 100644 (file)
index 0000000..ec1523e
Binary files /dev/null and b/po/pl.gmo differ
diff --git a/po/pl.po b/po/pl.po
new file mode 100644 (file)
index 0000000..e90d5f7
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,1311 @@
+# Polish translation for GNU findutils.
+# Copyright (C) 1996, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Pawe³ Krawczyk <kravietz@ceti.pl>, 1996.
+# Jakub Bogusz <qboosh@pld-linux.org>, 2003-2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-04-06 19:39+0200\n"
+"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
+"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2;\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Nie uda³o siê zainicjowaæ tablicy haszuj±cej wspó³dzielonych plików"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "nie mo¿na wykonaæ stat na bie¿±cym katalogu"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Nie mo¿na odczytaæ listy podmontowanych urz±dzeñ."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "UWAGA: system plików %s zosta³ niedawno odmontowany."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "UWAGA: system plików %s zosta³ niedawno zamontowany."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s zmieni³ siê podczas wykonywania %s (stary numer urz±dzenia %ld, nowy "
+"numer urz±dzenia %ld, typ systemu plików to %s) [ref %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s zmieni³ siê podczas wykonywania %s (stary numer i-wêz³a %<PRIuMAX>, "
+"nowy numer i-wêz³a %<PRIuMAX>, typ systemu plików %s) [ref %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "nie uda³o siê wróciæ do katalogu nadrzêdnego"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Nie uda³o siê bezpiecznie zmieniæ katalogu na %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Dowi±zanie symboliczne %s jest czê¶ci± pêtli w hierarchii katalogów; katalog "
+"wskazywany przez to dowi±zanie by³ ju¿ odwiedzony."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Wykryto pêtlê w systemie plików; %s ma ten sam numer urz±dzenia i i-wêze³ co "
+"katalog %d poziom wy¿ej w hierarchii systemu plików."
+msgstr[1] ""
+"Wykryto pêtlê w systemie plików; %s ma ten sam numer urz±dzenia i i-wêze³ co "
+"katalog %d poziomy wy¿ej w hierarchii systemu plików."
+msgstr[2] ""
+"Wykryto pêtlê w systemie plików; %s ma ten sam numer urz±dzenia i i-wêze³ co "
+"katalog %d poziomów wy¿ej w hierarchii systemu plików."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "uwaga: nie pod±¿anie za dowi±zaniem symbolicznym %s"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"UWAGA: z³a liczba twardych dowi±zañ dla %s (widziano tylko st_nlink="
+"%<PRIuMAX>, ale ju¿ znaleziono %<PRIuMAX> podkatalogów): to mo¿e byæ b³±d w "
+"sterowniku systemu plików. Automatyczne w³±czenie opcji -noleaf finda. "
+"Wcze¶niejsze wyniki mog³y nie zawieraæ katalogów, które powinny byæ "
+"przeszukane."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Nie mo¿na odczytaæ listy zamontowanych systemów plików"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "nieznany"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Wykryto pêtlê w systemie plików; %s jest czê¶ci± tej samej pêtli w systemie "
+"plików co %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "UWAGA: wygl±da na to, ¿e plik %s ma uprawnienia 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "nie mo¿na szukaæ %s"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "nie uda³o siê przywróciæ katalogu roboczego po przeszukaniu %s"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"Akcja -delete automatycznie w³±cza -depth, ale -prune nic nie wykonuje kiedy "
+"aktywna jest opcja -depth. Aby wykonaæ tê akcjê, nale¿y explicite u¿yæ opcji "
+"-depth."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"uwaga: podano opcjê %s po argumencie %s nie bêd±cym opcj±, ale opcje nie s± "
+"pozycyjne (%s wp³ywa na testy podane przed ni± jak i po niej). Proszê "
+"podawaæ opcje przed innymi argumentami.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"uwaga: opcja -d jest przestarza³a; proszê zamiast niej u¿ywaæ -depth, "
+"poniewa¿ ta jest zgodna z POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s nie jest nazw± ¿adnej istniej±cej grupy i nie wygl±da na liczbowy "
+"identyfikator grupy, poniewa¿ ma nieznany przyrostek %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s nie jest nazw± ¿adnej istniej±cej grupy"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "argument opcji -group jest pusty, a powinien byæ nazw± grupy"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"domy¶lna ¶cie¿ka to aktualny katalog; domy¶lne wyra¿enie to -print\n"
+"wyra¿enie mo¿e sk³adaæ siê z: operatorów, opcji, testów i akcji:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operatory (malej±cy priorytet; je¶li nie ma ¿adnego, przyjmuje siê -and):\n"
+"      ( WYR )    ! WYR    -not WYR    WYR1 -a WYR2     WYR1 -and WYR2\n"
+"      WYR1 -o WYR2     WYR1 -or WYR2     WYR1 , WYR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"opcje pozycyjne (zawsze prawdziwe): -daystart -follow -regextype\n"
+"\n"
+"opcje zwyk³e (zawsze prawdziwe, podawane przed innymi wyra¿eniami):\n"
+"      -depth --help -maxdepth POZIOMY -mindepth POZIOMY -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"testy (N jest postaci +N lub -N lub N): -amin N -anewer PLIK -atime N -cmin "
+"N\n"
+"      -cnewer PLIK -ctime N -empty -false -fstype TYP -gid N -group NAZWA\n"
+"      -ilname WZORZEC -iname WZORZEC -inum N -iwholename WZORZEC -iregex "
+"WZORZEC\n"
+"      -links N -lname WZORZEC -mmin N -mtime N -name WZORZEC -newer PLIK"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path WZORZEC -perm [+-]TRYB -regex WZORZEC\n"
+"      -readable -writable -executable\n"
+"      -wholename WZORZEC -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAZWA -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context KONTEKST\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"akcje: -delete -print0 -printf FORMAT -fprintf PLIK FORMAT -print \n"
+"      -fprint0 PLIK -fprint PLIK -ls -fls PLIK -prune -quit\n"
+"      -exec POLECENIE ; -exec POLECENIE {} + -ok POLECENIE ;\n"
+"      -execdir POLECENIE ; -execdir POLECENIE {} + -okdir POLECENIE ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Proszê zg³aszaæ b³êdy (i ¶ledziæ proces ich naprawiania) poprzez stronê\n"
+"zg³aszania b³êdów w findutils pod adresem http://savannah.gnu.org/ lub,\n"
+"w przypadku braku dostêpu do WWW, wysy³aj±c pocztê elektroniczn± pod\n"
+"adres <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+"sprawdzenie poprawno¶ci funkcji bibliotecznej fnmatch() nie powiod³o siê."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"uwaga: uniksowe nazwy plików zwykle nie zawieraj± uko¶ników (ale ¶cie¿ki "
+"tak). Oznacza to, ¿e '%s %s' bêdzie prawdopodobnie zawsze fa³szywe na tym "
+"systemie. Przydatny mo¿e byæ test '-wholename' albo '-samefile'. "
+"Ewentualnie, maj±c GNU grepa, mo¿na u¿yæ 'find ... -print0 | grep -FzZ %s'."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+"Dla opcji %s oczekiwano argumentu bêd±cego dodatni± liczb± ca³kowit±, a "
+"otrzymano %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "Ten system nie daje mo¿liwo¶ci sprawdzenia czasu narodzin pliku."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Test %s musi mieæ argument"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Nie wiem jak zinterpretowaæ %s jako datê lub czas"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Nie mo¿na uzyskaæ czasu narodzin pliku %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr "uwaga: -%s %s nie pasuje do niczego, poniewa¿ koñczy siê /."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Uprawnienia %s nie s± poprawne kiedy w³±czone jest POSIXLY_CORRECT."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "niew³a¶ciwe uprawnienia %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"uwaga: podano wzorzec uprawnieñ %s (który jest równowa¿ny /000). Znaczenie -"
+"perm /000 zmieni³o siê tak, by by³o spójne z -perm -000; oznacza to, ¿e "
+"wcze¶niej nie pasowa³o do ¿adnych plików, ale teraz pasuje do wszystkich "
+"plików."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "b³êdny zerowy argument opcji -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "b³êdny typ -size `%c'"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "B³êdny argument `%s%c' opcji -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Opcja -show-control-chars przyjmuje jeden argument o warto¶ci 'literal' lub "
+"'safe'"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "B³êdny argument %s opcji -used"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s nie jest nazw± ¿adnego znanego u¿ytkownika"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Argument opcji -user nie mo¿e byæ pusty"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "W³±czone w³a¶ciwo¶ci: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "b³êdne wyra¿enie -context: SELinux nie jest w³±czony."
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Argumenty dla -type powinny zawieraæ tylko jedn± literê"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Nieznany argument opcji -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "uwaga: nierozpoznany znak steruj±cy `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "b³±d: %s na koñcu ³añcucha formatuj±cego"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "uwaga: nierozpoznana dyrektywa formatuj±ca `%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+"b³±d: dyrektywa formatuj±ca `%%%c' jest zarezerwowana do przysz³ego "
+"wykorzystania"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Bie¿±cy katalog jest obecny w zmiennej ¶rodowiskowej PATH, co jest "
+"niebezpieczne w po³±czeniu z akcj± %s polecenia find. Proszê usun±æ bie¿±cy "
+"katalog ze zmiennej $PATH (tzn. usun±æ \".\" albo wiod±ce lub koñcowe "
+"dwukropki)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"W zmiennej ¶rodowiskowej PATH jest obecna ¶cie¿ka wzglêdna %s, co jest "
+"niebezpieczne w po³±czeniu z akcj± %s polecenia find. Proszê usun±æ ten wpis "
+"ze zmiennej $PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Nie mo¿na u¿ywaæ {} wewn±trz nazwy narzêdzia dla opcji -execdir i -okdir, "
+"poniewa¿ jest to potencjalny problem z bezpieczeñstwem."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Obs³ugiwane jest tylko jedno wyst±pienie {} przy -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "¦rodowisko jest zbyt du¿e, aby wykonaæ exec()."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "przepe³nienie arytmetyczne przy przeliczaniu %s z dni na liczbê sekund"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+"przepe³nienie arytmetyczne przy próbie obliczenia koñca dnia dzisiejszego"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standardowe wyj¶cie diagnostyczne"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standardowe wyj¶cie"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "nie mo¿na usun±æ %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "nie uda³o siê przywróciæ katalogu roboczego po przeszukaniu %s"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon nie powiod³o siê: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "UWAGA: nie mo¿na okre¶liæ czasu narodzin pliku %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Nie mo¿na zamkn±æ standardowego wej¶cia"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Nie uda³o siê zmieniæ katalogu"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "nie mo¿na wykonaæ fork"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "b³±d podczas czekania na %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s zakoñczony sygna³em %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "b³êdne wyra¿enie"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr "b³êdne wyra¿enie; podano operator binarny '%s' bez niczego przed nim."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "oczekiwano wyra¿enia pomiêdzy '%s' i ')'"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "oczekiwano wyra¿enia po '%s'"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "b³êdne wyra¿enie; za du¿o ')'"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"b³êdne wyra¿enie; oczekiwano gdzie¶ ')', ale nie znaleziono. Byæ mo¿e "
+"potrzebne jest dodatkowe wyra¿enie po '%s'"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "b³êdne wyra¿enie; puste nawiasy nie s± dozwolone."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "b³êdne wyra¿enie; oczekiwano gdzie¶ ')', ale nie znaleziono."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "ojej -- b³êdny typ wyra¿enia!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "ojej -- b³êdny typ wyra¿enia (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "¶cie¿ki musz± poprzedzaæ wyra¿enie: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "nieznane wyra¿enie `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "b³êdne wyra¿enie `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "b³êdny argument `%s' dla `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "brak argumentu dla `%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "za du¿o ')'"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "nieoczekiwane dodatkowe wyra¿enie '%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "nie obs³ugiwane dodatkowe wyra¿enie"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "ojej -- b³êdne domy¶lne wstawienie and!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Sk³adnia: %s [-H] [-L] [-P] [-Opoziom] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [¶cie¿ka...] [wyra¿enie]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "nie uda³o siê wróciæ do katalogu nadrzêdnego"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "nie uda³o siê wróciæ do katalogu nadrzêdnego"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Zignorowano nierozpoznan± flagê diagnostyczn± %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Pusty argument dla opcji -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Bezpo¶rednio po opcji -O musi wyst±piæ liczba dziesiêtna"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Proszê podaæ liczbê dziesiêtn± bezpo¶rednio po -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "B³êdny poziom optymalizacji %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Poziom optymalizacji %lu jest zbyt du¿y. Aby odnale¼æ pliki bardzo szybko, "
+"mo¿na u¿yæ GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Zmienna ¶rodowiskowa FIND_BLOCK_SIZE nie jest obs³ugiwana; jedyne, co wp³ywa "
+"na rozmiar bloku, to zmienna ¶rodowiskowa POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "polecenie zbyt d³ugie"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+"nie mo¿na wywo³aæ exec() ze wzglêdu na ograniczenia rozmiaru argumentów"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"nie mo¿na zmie¶ciæ pojedynczego argumentu w limicie rozmiaru listy argumentów"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "lista argumentów zbyt d³uga"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+"Zmienna ¶rodowiskowa %s nie jest ustawiona na poprawn± liczbê dziesiêtn±"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Zbudowano przy u¿yciu GNU gnuliba w wersji %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Nieoczekiwana koñcówka %s dla %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Oczekiwano liczby ca³kowitej: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Nieznany rodzaj wyra¿eñ regularnych %s; poprawne rodzaje to %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Sk³adnia: %s [--version | --help]\n"
+"lub       %s najpopularniejsze_bigramy < lista-plików > baza-danych-locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"B³êdy proszê zg³aszaæ na adres <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "b³±d zapisu"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Sk³adnia: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Nale¿y podaæ poziom bezpieczeñstwa jako liczbê ca³kowit±."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Poziom bezpieczeñstwa %s znajduje siê poza zakresem odwracalnym."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Poziom bezpieczeñstwa %s ma nieoczekiwany przyrostek %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "Poziom bezpieczeñstwa slocate %ld nie jest obs³ugiwany."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Nie uda³o siê zapisaæ na standardowe wyj¶cie"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dni"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Argument opcji --max-database-age nie mo¿e byæ pusty"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "B³êdny argument %s opcji --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"Baza danych locate %s zawiera nazwê pliku d³u¿sz± ni¿ locate jest w stanie "
+"obs³u¿yæ"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "Baza danych locate %s jest uszkodzona lub niepoprawna"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Rozmiar bazy danych locate: %s bajt\n"
+msgstr[1] "Rozmiar bazy danych locate: %s bajty\n"
+msgstr[2] "Rozmiar bazy danych locate: %s bajtów\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Pasuj±ce nazwy plików: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Wszystkie nazwy plików: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Nazwy plików maj± ³±czn± d³ugo¶æ %s bajtów.\n"
+"W¶ród tych nazw:\n"
+"\n"
+"\t%s zawiera spacje,\n"
+"\t%s zawiera znaki nowej linii,\n"
+"\ta %s zawiera znaki z ustawionym najstarszym bitem.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Niektóre nazwy plików mog³y zostaæ odfiltrowane, wiêc nie mo¿na obliczyæ "
+"wspó³czynnika kompresji.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Wspó³czynnik kompresji %4.2f%% (im wiêkszy tym lepiej)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Wspó³czynnik kompresji jest nieokre¶lony\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"Baza danych locate %s wygl±da na bazê danych slocate, ale o poziomie "
+"bezpieczeñstwa %c, którego GNU findutils aktualnie nie obs³uguje"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s to baza danych slocate. Jej obs³uga jest nowa, mo¿na siê jeszcze "
+"spodziewaæ problemów."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s to baza danych slocate o nieobs³ugiwanym poziomie bezpieczeñstwa %d; "
+"pominiêto."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Podano opcjê -E, ale ta opcja nie mo¿e byæ u¿yta z bazami danych w formacie "
+"slocate o niezerowym poziomie bezpieczeñstwa. Dla tej bazy danych nie "
+"zostan± wygenerowane ¿adne wyniki.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s to baza danych slocate. W³±czono opcjê '-e'."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"Baza danych locale %s w starym formacie jest zbyt krótka aby by³a poprawna"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Baza danych %s jest w formacie %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Baza danych ma kodowanie ze s³owami maszynowymi little-endian.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Baza danych ma kodowanie ze s³owami maszynowymi big-endian.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+"Baza danych ma kodowanie z nieoczywist± kolejno¶ci± bajtów w s³owie "
+"maszynowym.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Sk³adnia: %s [-d ¶cie¿ka | --database=¶cie¿ka] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=RODZAJ]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      wzorzec...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "nie uda³o siê porzuciæ uprawnieñ grupy"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "nie uda³o siê porzuciæ uprawnieñ setuid"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Nie uda³o siê w pe³ni porzuciæ uprawnieñ"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "nie uda³o siê porzuciæ uprawnieñ setgid"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"uwaga: baza danych locate mo¿e byæ odczytana ze standardowego wej¶cia tylko "
+"raz."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "wywo³anie systemowe nie powiod³o siê"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "uwaga: baza danych %s ma ju¿ ponad %d %s (jej wiek to %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+"UWAGA: baza danych locate %s zosta³a utworzona z inn± kolejno¶ci± bajtów w "
+"s³owie"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "nieoczekiwany koniec pliku w %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "b³±d podczas odczytu s³owa z %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia; "
+"warto¶ci znaków nie mog± przekraczaæ %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia; "
+"warto¶ci znaków nie mog± przekraczaæ %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia; "
+"koñcowe znaki %s nie zosta³y rozpoznane."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Nieprawid³owe okre¶lenie ogranicznika wej¶cia %s: ogranicznik musi byæ "
+"pojedynczym znakiem lub sekwencj± steruj±c± zaczynaj±c± siê od \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "¶rodowisko jest zbyt du¿e, aby wykonaæ exec"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr "uwaga: warto¶æ %ld dla opcji -s jest zbyt du¿a, u¿yto %ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Nie mo¿na otworzyæ pliku wej¶ciowego %s"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Zmienne ¶rodowiskowe zajmuj± %<PRIuMAX> bajtów\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+"POSIX-owy górny limit na d³ugo¶æ argumentów (na tym systemie): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"POSIX-owy najmniejszy dopuszczalny górny limit na d³ugo¶æ argumentów: "
+"%<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Maksymalna d³ugo¶æ polecenia, które mo¿na u¿yæ: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Rozmiar u¿ywanego bufora polecenia: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Wykonywanie xargs bêdzie kontynuowane, i bêdziê próbowaæ czytaæ wej¶cie i "
+"uruchamiaæ polecenia; je¶li nie jest to porz±dane zachowanie, proszê "
+"wprowadziæ znak koñca pliku.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Uwaga: %s bêdzie uruchomione przynajmniej raz. Je¶li nie jest to porz±dane "
+"zachowanie, proszê nacisn±æ klawisz przerwania.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"niedopasowany %s cudzys³ów; domy¶lnie znaki cytowania s± specjalnymi dla "
+"xargs o ile nie u¿yto opcji -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "podwójny"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "pojedynczy"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"UWAGA: na wej¶ciu wyst±pi³ znak NUL. Nie mo¿e byæ przekazany poprzez listê "
+"argumentów. Czy¿by mia³a byæ u¿yta opcja --null?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "za d³uga linia argumentów"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "nie uda³o siê otworzyæ /dev/tty do odczytu"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "nie uda³o siê utworzyæ potoku przed wywo³aniem fork"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"odczyt bufora errno w xargs_do_exec nie powiód³ siê (prawdopodobnie b³±d, "
+"proszê to zg³osiæ)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"read zwróci³o nieoczekiwan± warto¶æ %d; prawdopodobnie b³±d, proszê to "
+"zg³osiæ"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "b³±d podczas oczekiwania na proces potomny"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "UWAGA: utracono ¶lad po %d procesach potomnych"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: wyszed³ ze stanem 255; zaniechanie"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: zatrzymany sygna³em %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: zakoñczony sygna³em %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: b³êdna liczba dla opcji -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: warto¶æ dla opcji -%c powinna byæ >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: warto¶æ dla opcji -%c powinna byæ < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Sk³adnia: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=ogranicznik]\n"
+"       [-E ³añc-eof] [-e[³añc-eof]]  [--eof[=³añc-eof]]\n"
+"       [-L maks-linii] [-l[maks-linii]] [--max-lines[=maks-linii]]\n"
+"       [-I ³añc-zmienn] [-i[³añc-zmienn]] [--replace[=³añc-zmienn]]\n"
+"       [-n maks-arg] [--max-args=maks-arg]\n"
+"       [-s maks-znaków] [--max-chars=maks-znaków]\n"
+"       [-P maks-proc]  [--max-procs=maks-proc] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=plik]\n"
+"       [--version] [--help] [polecenie [pocz±tkowe-argumenty]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "nie mo¿na uzyskaæ bie¿±cego katalogu"
diff --git a/po/pt.gmo b/po/pt.gmo
new file mode 100644 (file)
index 0000000..2d97fcb
Binary files /dev/null and b/po/pt.gmo differ
diff --git a/po/pt.po b/po/pt.po
new file mode 100644 (file)
index 0000000..b7ed578
--- /dev/null
+++ b/po/pt.po
@@ -0,0 +1,1477 @@
+# Portuguese translation of the "findutils" messages
+# Copyright (C) 2005, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Helder Correia <helder.pereira.correia@gmail.com>, 2005-2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.3.12\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2007-12-20 00:18+0100\n"
+"Last-Translator: Helder Correia <helder.pereira.correia@gmail.com>\n"
+"Language-Team: Portuguese <translation-team-pt@lists.sourceforge.net>\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "não é possível analisar a pasta actual"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Aviso: o sistema de ficheiros %s foi desmontado recentemente."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Aviso: o sistema de ficheiros %s foi montado recentemente."
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%1$s%2$s alterado durante execução de %3$s (número do disposito antigo "
+"%4$ld, novo número %5$ld, tipo do sistema de ficheiros é %6$s) [ref %7$ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%1$s%2$s alterado durante execução de %3$s ('inode' antigo %4$ld, novo "
+"%5$ld, tipo do sistema de ficheiros é %5$s) [ref %7$ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "erro ao regressar à pasta de trabalho inicial"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Erro ao entrar de forma segura na pasta %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"A ligação simbólica %s é parte de um ciclo na hierarquia de pastas; a pasta "
+"para a qual aponta já foi visitada."
+
+#: find/find.c:1097
+#, fuzzy, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Detectado um ciclo no sistema de ficheiros; %1$s tem o mesmo número de "
+"dispositivo e 'inode' que uma pasta que é %2$d nível acima na hierarquia."
+msgstr[1] ""
+"Detectado um ciclo no sistema de ficheiros; %1$s tem o mesmo número de "
+"dispositivo e 'inode' que uma pasta que é %2$d níveis acima na hierarquia."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "aviso: a não seguir a ligação simbólica %s"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"AVISO: A contagem de ligações persistentes é errada para %1$s (foi visto "
+"apenas st_nlink=%2$d mas já foram vistas %3$d pastas): isto pode ser uma "
+"falha no 'driver' do sistema de ficheiros. A activar automaticamente a opção "
+"'-noleaf'. Resultados anteriores podem ter falhado a inclusão de pastas que "
+"deveriam ter sido pesquisadas."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "desconhecido"
+
+#: find/ftsfind.c:259
+#, fuzzy, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Detectado um ciclo no sistema de ficheiros; %1$s é parte do mesmo ciclo de "
+"%2$s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, fuzzy, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "Aviso: o ficheiro %s aparenta ter modo 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "impossível pesquisar %s"
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "erro ao regressar à pasta de trabalho inicial"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"A acção -delete activa automaticamente -depth, mas -prune não tem efeito "
+"quando -depth está activa. Se deseja continulr de qualquer forma, utilzie "
+"explicitamente a opção -depth."
+
+#: find/parser.c:618
+#, fuzzy, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"aviso: especificou a opção %1$s após um argumento não opção %2$s, mas as "
+"opções não são posicionais (%3$s afecta os testes especificados antes, assim "
+"como os especificados após). Por favor, especifique as opções antes dos "
+"outros argumentos.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"aviso: a opção -d está obsoleta; por favor, use -depth em substituição, uma "
+"vez que esta é uma funcionalidade em conformidade POSIX."
+
+#: find/parser.c:1184
+#, fuzzy, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%1$s não é nome de um grupo existente e não aparenta ser um identificador "
+"numérico de grupo porque tem o sufixo inesperado %2$s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s não é o nome de um grupo existente"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "o argumento para -group está vazio, mas deve ser o nome de um grupo"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"o caminho padrão é a pasta corrente; a expressão predefinida é -print\n"
+"a expressão deve consistir em: operadores, opções, testes e acções:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operadores (precedência decrescente; -and é implícito onde mais nenhum é "
+"dado):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"opções posicionais (sempre verdadeiras): -daystart -follow -regextype:\n"
+"\n"
+"opções normais (sempre verdadeiras, especificadas antes de outras "
+"expressões):\n"
+"      -depth --help -maxdepth NÍVEIS -mindepth NÍVEIS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"testes (N can be +N or -N or N): -amin N -anewer FICH -atime N -cmin N\n"
+"      -cnewer FICH -ctime N -empty -false -fstype TIPO -gid N -group NOME\n"
+"      -ilname PADRÃO -iname PADRÃO -inum N -iwholename PADRÃO -iregex "
+"PADRÃO\n"
+"      -links N -lname PADRÃO -mmin N -mtime N -name PADRÃO -newer FICH"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path PADRÃO -perm [+-]MODO -regex PADRÃO\n"
+"      -readable -writable -executable\n"
+"      -wholename PADRÃO -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NOME -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"acções: -delete -print0 -printf FORMATO -fprintf FICHEIRO FORMATO -print \n"
+"      -fprint0 FICHEIRO -fprint FICHEIRO -ls -fls FICHEIRO -prune -quit\n"
+"      -exec COMANDO ; -exec COMANDO {} + -ok COMANDO ;\n"
+"      -execdir COMANDO ; -execdir COMANDO {} + -okdir COMANDO ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Relate erros (e acompanhe o progresso de solução) via página situada em\n"
+"http://savannah.gnu.org/ ou, caso não tenha acesso, enviando um\n"
+"correio electrónico para <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "a verificação de sanidade da função de biblioteca fnmatch() falhou."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"aviso: normalmente, os ficheiros Unix não contêm barras. Isso significa que "
+"'%s %s' será sempre avaliado como falso neste sistema.  Poderá achar o teste "
+"'-wholename' mais útil, ou talvez '-samefile'.  Alternativamente, se estiver "
+"a usar o GNU grep, pode usar 'find ... -print0 | grep -FzZ %s'."
+
+#: find/parser.c:1452
+#, fuzzy, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+"Esperava-se um argumento inteiro decimal positivo para %1$s, mas obteve-se "
+"%2$s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+"Este sistema não providencia uma forma de descobrir a data de criação de um "
+"ficheiro."
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: a opção '%s' requere um argumento\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Não se sabe como interpretar %s como uma data ou hora"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Não é possível obter o tempo de criação do ficheiro %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "O modo %s não é válido quando POSIXLY_CORRECT está activo."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "modo %s inválido"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"aviso: especificou um padrão de modo %s (equivalente a /000). O significado "
+"de -perm /000 foi alterado para ser consistente com -perm -000; isto é, "
+"agora combina com todos os ficheiros."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "argumento vazio para -size inválido"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "Tipo -size '%c' inválido"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Argumento '%s%c' inválido para -size'"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"A opção -show-control-chars requere um único parâmetro que deve ser "
+"'literal' ou 'seguro'"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Argumento %s inválido para -used"
+
+#: find/parser.c:2671
+#, fuzzy, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s não é o nome de um grupo existente"
+
+#: find/parser.c:2678
+#, fuzzy, c-format
+msgid "The argument to -user should not be empty"
+msgstr "O argumento para a opção --max-database-age não pode ser vazio"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Funcionalidades activadas: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Argumentos para -type devem conter apenas uma letra"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Argumento desconhecido para -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "aviso: escape '\\%c' não reconhecido"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "erro: %s no fim de expressão de formato"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "aviso: directiva de formatação '%%%c' não reconhecida"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "erro: a directiva de formato '%%%c' está reservada para uso futuro"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"A pasta corrente está incluída na variável de ambiente 'PATH', o que é "
+"inseguro quando combinado com a acção %s do 'find'. Por favor, remova a "
+"pasta corrente do seu '$PATH' (isto é, remova \".\")"
+
+#: find/parser.c:3272
+#, fuzzy, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"O caminho relativo %1$s está incluído na variável de ambiente PATH, o que é "
+"inseguro quando combinado com a acção %2$s do find. Por favor, remova o "
+"caminho da variável $PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Pode não usar {} no nome do utilitário para '-execdir' e '-okdir', uma vez "
+"que se trata de um potencial problema de segurança."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Apenas uma instância de {} é suportada com -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "O ambiente é demasiado grande para exec()."
+
+#: find/parser.c:3603
+#, fuzzy, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "transbordo aritmético ao tentar calcular o fim de hoje"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "transbordo aritmético ao tentar calcular o fim de hoje"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "saída padrão de erro"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "saída padrão"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "impossível remover %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "erro ao regressar à pasta de trabalho inicial"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Aviso: não é possível determinar a data de criação do ficheiro %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Não é possível fechar a entrada padrão"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Erro ao mudar de pasta"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "não é possível bifurcar (fork)"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "erro ao aguardar por %s"
+
+#: find/pred.c:2132
+#, fuzzy, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s: terminado pelo sinal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "expressão inválida"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr "expressão inválida: utilizou um operador binário '%s' sem nada atrás."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "esperava-se uma expressão entre '%s' e ')'"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "esperada uma expressão após '%s'"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "expressão inválida; tem demasiados ')'"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"expressão inválida; esperava-se ')' mas não foi encontrado. Talvez necessite "
+"de um predicado extra após '%s'"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "expressão inválida; parêntesis vazios não são permitidos.'"
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "expressão inválida; ')' esperado algures mas não encontrado."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "ops -- tipo de expressão inválido"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "tipo de expressão inválido (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "caminhos devem preceder a expressão: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "predicado desconhecido '%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "predicado inválido '%s'"
+
+#: find/tree.c:1322
+#, fuzzy, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "argumento '%1$s' inválido para '%2$s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "argumento em falta para '%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "tem demasiados ')'"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "predicado extra '%s' inesperado"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "predicado extra inesperado"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "ops -- inserção por omissão de and inválida!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Utilização: %s [-H] [-L] [-P] [-Olevel] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [caminho...] [expressão]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "não é possível guardar a pasta de trabalho actual"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "não é possível guardar a pasta de trabalho actual"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "A ignorar opção de depuração %s não reconhecida"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Parâmetro vazio para o opção -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "A opção -O deve ser imediatamente seguida por um inteiro decimal"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Por favor especifique um number decimal imediatamente após -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Nível deoptimização %s inválido"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"O nível de optimização %lu é muito elevado. Se deseja encontrar ficheiros "
+"rapidamente, considere a utilização do GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"A variável de ambiente FIND_BLOCK_SIZE não é suportada, a única coisa que "
+"afecta o tamanho de bloco é a variável de ambiente POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "comando demasiado longo"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"impossível aceitar único argumento dentro do limite de tamanho de lista de "
+"argumentos"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "lista de argumentos demasiado longa"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Construído com GNU gnulib versão %s\n"
+
+#: lib/safe-atoi.c:76
+#, fuzzy, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "EOF inesperado em %s"
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "esperada uma expressão após '%s'"
+
+#: lib/regextype.c:107
+#, fuzzy, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Tipo desconhecido de expressão regular %1$s; tipos válidos são %2$s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Utilização: %s [--version | --help]\n"
+"ou          %s bigramas_mais_comuns < lista-ficheiros > base-de-dados-"
+"locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Envie erros para <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "erro de escrita"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Utilização: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Necessita especificar um nível de segurança como um inteiro decimal."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Nível de segurança %s fora do intervalo convertível."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "O nível de segurança %s tem o sufixo inesperado %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "O nível de segurança %ld de slocate não é suportado."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Erro ao escrever para a saída padrão"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dias"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "O argumento para a opção --max-database-age não pode ser vazio"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Argumento %s inválido para opção --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"a base de dados locate %s contém um nome de ficheiro mais longo que o "
+"permitido"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "a base de dados %s do locate está corrompida ou é inválida"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Tamanho da base de dados 'locate': %s byte\n"
+msgstr[1] "Tamanho da base de dados 'locate': %s bytes\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Ficheiros Resultantes: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Todos os Ficheiros: %s\n"
+
+#: locate/locate.c:907
+#, fuzzy, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Nomes de ficheiros têm um comprimento cumulativo de %1$s bytes.\n"
+"Desses nomes de ficheiros,\n"
+"\n"
+"\t%2$s contêm espaços, \n"
+"\t%3$s contêm caracteres de nova linha \n"
+"\te %4$s contêm caracteres com o bit mais significativo activado.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Alguns ficheiros podem ter sido deixados de fora, pelo que não é possível "
+"calcular a taxa de compressão.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Taxa de compressão %4.2f%% (maior é melhor)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Taxa de compressão indefinida\n"
+
+#: locate/locate.c:996
+#, fuzzy, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"a base de dados %1$s do locate parece uma base de dados slocate mas aparenta "
+"ter nível de segurança %2$c, o qual não é actualmente suportado por GNU "
+"findutils"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s é uma base de dados slocate. Suporte para este tipo é recente, espere "
+"problemas por enquanto."
+
+#: locate/locate.c:1123
+#, fuzzy, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%1$s é uma base de dados slocate com nível de segurança %2$d não suportado; "
+"a ignorar."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Especificou a opção -E, mas a mesma não pode ser usada com bases de dados "
+"slocate-format com nível de segurança não zero. Não serão gerados resultados "
+"para esta base de dados.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s é uma base de dados slocate. A activar a opção '-e'."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"Base de dados locate %s de formato antigo é demasiado pequena para ser válida"
+
+#: locate/locate.c:1341
+#, fuzzy, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "A base de dados %1$s está no formato %2$s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "A base de dados tem codificação little-endian.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "A base de dados tem codificação big-endian.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "A ordem de codificação da palavra da máquina não é óbvia.\n"
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Uso:  %s [-d caminho | --database=caminho] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TIPO]\n"
+"      [--max-database-age D] [-version] [--help]\n"
+"      padrão...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "erro ao descartar privilégios de grupo"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "erro ao descartar privileges setuid"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Erro aos descartar privilégios por completo"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "erro ao descartar privileges setgid"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"aviso: a base de dados locate pode ser lida da entrada padrão apenas uma vez."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "erro na chamada de tempo de sistema"
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"aviso: a base de dados %1$s tem mais de %2$d %3$s (idade actual é %4$.1f "
+"%5$s)"
+
+#: locate/word_io.c:96
+#, fuzzy, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+"Aviso: a base de dados %s do locate foi construída com uma ordem de bytes "
+"diferente"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "EOF inesperado em %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "erro ao ler uma palavra de %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+"Sequência de escape %s inválida na especificação de delimitador de entrada."
+
+#: xargs/xargs.c:276
+#, fuzzy, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Sequência de escape %1$s inválida na especificação de delimitador de "
+"entrada; os caracteres não devem exceder %2$lx."
+
+#: xargs/xargs.c:282
+#, fuzzy, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Sequência de escape %1$s inválida na especificação de delimitador de "
+"entrada; os caracteres não devem exceder %2$lo."
+
+#: xargs/xargs.c:291
+#, fuzzy, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Sequência de escape %1$s inválida na especificação de delimitador de "
+"entrada; caracteres finais %2$s não reconhecidos."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Especificação de delimitador de entrada %s inválida: o delimitador deve ser "
+"um carácter simples ou uma sequência de escape iniciada por \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "o ambiente é demasiado grande para o exec"
+
+#: xargs/xargs.c:561
+#, fuzzy, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"aviso: o valor %1$ld para a opção -s é demasiado grande, a usar %2$ld ao "
+"invés"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Não é possível abrir o ficheiro de entrada %s"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "As suas variáveis de ambiente ocupam %lu bytes\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Limite superior POSIX de tamanho de argumento (neste sistema): %lu\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Limite superior POSIX mais pequeno permitido de tamanho de argumento (todos "
+"os sistemas): %lu\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "tamanho máximo do comando possível de usar: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Tamanho da memória de comandos actualmente em uso: %lu\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"A execução de xargs irá continuar agora, e tentará ler a sua entrada e "
+"executar comandos; se isto não é o que desejado, por favor insira a "
+"sequência de fim-de-ficheiro.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Aviso: %s será executado pelo menos uma vez. Se não o desejar, pressione a "
+"sequência de interrupção.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, fuzzy, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"plica não correspondida; por omissão, as citações são especiais para o "
+"xargs, a menos que use a opção -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "duplo"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "simples"
+
+#: xargs/xargs.c:936
+#, fuzzy, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"aviso: ocorreu um carácter NUL na entrada. Não pode ser especificado na "
+"lista de argumentos. Pretendia usar a opção --null?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "linha de argumentos demasiado longa"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "erro ao esperar pelo processo filho"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: saída com estado 255; a abortar"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: parado pelo sinal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: terminado pelo sinal %d"
+
+#: xargs/xargs.c:1469
+#, fuzzy, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%1$s: número inválido para a opção -%2$c\n"
+
+#: xargs/xargs.c:1476
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%1$s: valor para a opção -%2$c deveria ser >= %3%ld\n"
+
+#: xargs/xargs.c:1490
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%1$s: vaor para a opção -%2$c deveria ser < %3$ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Uso:   %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L máx-linhas] [-l[máx-linhas]] [--max-lines[=máx-linhas]]\n"
+"       [-I exp-subst] [-i[exp-subst]] [--replace[=exp-subst]]\n"
+"       [-n máx-args] [--max-args=máx-args]\n"
+"       [-s máx-cars] [--max-chars=máx-cars]\n"
+"       [-P máx-procs] [--max-procs=máx-procs] [[--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=ficheiro]\n"
+"       [--version] [--help] [comando [argumentos-iniciais]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "não é possível obter a pasta corrente"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "argumento inválido %s para %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "argumento %s ambíguo para %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Argumentos válidos são:"
+
+#~ msgid "error closing file"
+#~ msgstr "erro o fechar o ficheiro"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Erro de sistema desconhecido"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: a opção '%s' é ambígua\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: a opção '--%s' não permite um argumento\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: a opção '%c%s' não permite um argumento\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: a opção '%s' requere um argumento\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: opção '--%s' desconhecida\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: opção '%c%s' não reconhecida\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: opção -- %c inválida\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: a opção -- %c requere um argumento\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: a opção '-W %s' é ambígua\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: a opção '-W %s' não permite um argumento\n"
+
+#~ msgid "`"
+#~ msgstr "«"
+
+#~ msgid "'"
+#~ msgstr "»"
+
+#~ msgid "Success"
+#~ msgstr "Sucesso"
+
+#~ msgid "No match"
+#~ msgstr "Sem correspondências"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Expressão regular inválida"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Carácter de alfabetização inválido"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Nome de classe de carácter inválido"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Barra invertida no final"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Referência para trás inválida"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ ou [^ sem correspondência"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( ou \\( sem correspondência"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "\\{ sem correspondência"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Conteúdo de \\{\\} inválido"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Limite superior de alcance inválido"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Memória esgotada"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Expressão regular precedente inválida"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Fim prematuro de expressão regular"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Expressão regular demasiado grande"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") ou \\) não correspondidos"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Nenhuma expressão regular anterior"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "memória esgotada"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "argumento %s%s inválido '%s'"
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "sufixo inválido em %s%s argumento '%s'"
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "%s%s argumento '%s' demasiado grande"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opção -- %c ilegal\n"
+
+#~ msgid "%1$s terminated by signal %2$d"
+#~ msgstr "%1$s terminado pelo sinal %2$d"
+
+#~ msgid ""
+#~ "unmatched double quote; by default quotes are special to xargs unless you "
+#~ "use the -0 option"
+#~ msgstr ""
+#~ "aspas não correspondidas; por omissão, as citações são especiais para o "
+#~ "xargs, a menos que use a opção -0"
+
+#~ msgid "level higher in the file system hierarchy"
+#~ msgstr "nível mais alto na hierarquia do sistema de ficheiros"
+
+#~ msgid "levels higher in the file system hierarchy"
+#~ msgstr "níveis mais altos na hierarquia do sistema de ficheiros"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "com um tamanho acumulado de %s B"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\tdos quais %s contêm espaços em branco, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s contêm caracteres de nova linha, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\te %s contêm caracteres com o bit alto activado.\n"
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
new file mode 100644 (file)
index 0000000..8260bc3
Binary files /dev/null and b/po/pt_BR.gmo differ
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644 (file)
index 0000000..45f9743
--- /dev/null
@@ -0,0 +1,1392 @@
+# Brazilian portuguese messages for findutils.
+# Copyright (C) 1999, 2000, 2002, 2004, 2010 Free Software Foundation,
+# Inc.
+# This file is distributed under the same license as the findutils package.
+# Alexandre Folle de Menezes <afmenez@terra.com.br>, 2002, 2004.
+# based on the previous translation to pt_BR (v4.1.5) by
+# Rodrigo Parra Novo <rodrigo.novo@corp.terralycos.com>, 1999, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.1.20\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2004-02-08 18:00-0200\n"
+"Last-Translator: Alexandre Folle de Menezes <afmenez@terra.com.br>\n"
+"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "não foi possível obter o diretório atual"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "não foi possível obter o diretório atual"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "desconhecido"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "não foi possível obter o diretório atual"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"o caminho padrão é o diretório atual; a expressão padrão é -print\n"
+"expressões poden consistir de:\n"
+"operadores (precedência decrescente; -and é implícito onde nenhum outro é "
+"explícitado):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n"
+
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"o caminho padrão é o diretório atual; a expressão padrão é -print\n"
+"expressões poden consistir de:\n"
+"operadores (precedência decrescente; -and é implícito onde nenhum outro é "
+"explícitado):\n"
+"      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+
+#: find/parser.c:1239
+#, fuzzy
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"      -cnewer ARQUIVO -ctime N -empty -false -fstype TIPO -gid N -group "
+"NOME\n"
+"      -ilname PADRÃO -iname PADRÃO -inum N -ipath PADRÃO -iregex PADRÃO\n"
+"      -links N -lname PADRÃO -mmin N -mtime N -name PADRÃO -newer ARQUIVO\n"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path PADRÃO -perm [+-]MODO -regex PADRÃO\n"
+"      -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NOME\n"
+"      -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr ""
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: opção `%s' requer um argumento\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "modo inválido `%s'"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "argumento nulo inválido para -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "tipo inválido `%c' para -size"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "argumento inválido `%s' para `%s'"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+# c-format
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "argumento %s inválido para %s"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "aviso: controle (escape) não reconhecido `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "aviso: diretiva de formatação desconhecida `%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "ambiente de execução é muito grande"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "não foi possível obter o diretório atual"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "não consigo duplicar o processo (fork())"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "erro esperando por %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s terminado pelo sinal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "expressão inválida"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr ""
+
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "expressão inválida"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "oops -- tipo inválido de expressão!"
+
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "oops -- tipo inválido de expressão!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "os caminhos devem preceder a expressão"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "predicado inválido `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "predicado inválido `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "argumento inválido `%s' para `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "faltando argumento para `%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "predicado inválido `%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "oops -- inserção padrão de and! inválida"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr ""
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Uso: %s [caminho...] [expressão]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "não foi possível obter o diretório atual"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "não foi possível obter o diretório atual"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "aviso: controle (escape) não reconhecido `\\%c'"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "comando muito longo"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"não foi possível incluir argumento simples devido ao limite de tamanho da "
+"lista de argumentos"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "lista de argumentos muito longa"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU find versão %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr ""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr "Uso: %s bigrams_mais_comuns < lista > lista_codificada\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+#, fuzzy
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Reporte erros para <bug-findutils@gnu.org>."
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dias"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+# c-format
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "argumento %s inválido para %s"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr ""
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "aviso: banco de dados `%s' é mais antigo que %d %s"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "erro esperando por %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "ambiente de execução é muito grande"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr ""
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "duplo"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "simples"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "linha com argumentos muito longa"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "erro esperando por processo filho"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: saiu com status 255; abortando"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: desativado pelo sinal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: terminado pelo sinal %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: número inválido para opção -%c\n"
+
+#: xargs/xargs.c:1476
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: valor para opção -%c deve ser >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: valor para opção -%c deve ser < que %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Uso: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-linhas]]\n"
+"       [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-"
+"str]]\n"
+"       [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n"
+"       [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n"
+"       [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n"
+"       [command [argumentos iniciais]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "não foi possível obter o diretório atual"
+
+# c-format
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "argumento %s inválido para %s"
+
+# c-format
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "argumento %s ambíguo para %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Argumentos válidos são:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Erro de sistema desconhecido"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: opção `%s' é ambígua\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: opção `--%s' não permite um argumento\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: opção `%c%s' não permite um argumento\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: opção `%s' requer um argumento\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: a opção `--%s' não é conhecida\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: a opção `%c%s' não é conhecida\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: opção inválida -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: opção requer um argumento -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: opção `-W %s' é ambígua\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: opção `-W %s' não permite um argumento\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "Sucesso"
+
+#~ msgid "No match"
+#~ msgstr "Não há associações"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "expressão regularinválida"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Caractere de colagem inválido"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Nome da classe de caractere inválida"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Contrabarra precedente"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Referência reversa inválida"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ ou ^[ não correspondido"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( ou \\( não correspondido"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "\\{ não correspondido"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Conteúdo de \\{\\} inválido"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Fim do comprimento inválido"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "memória exaurida"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Expressão regular precedente inválida"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Fim prematuro de expressão regular"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Expressão regular muito comprida"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") ou \\) não correspondido"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Não há uma expressão regular prévia"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[sS]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "memória exaurida"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "argumento inválido `%s' para `%s'"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "argumento inválido `%s' para `%s'"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "lista de argumentos muito longa"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opção ilegal -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "tamanho do bloco"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Lista dos predicados:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Árvore de avaliação:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Árvore de avaliação otimizada:\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s alterado durante a execução de %s"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "memória virtual exaurida"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. alterado durante a execução de %s"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "erro em %s: %s"
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "opções (sempre verdadeiras): -daystart -depth -follow --help\n"
+#~ "      -maxdepth NIVEIS -mindepth NIVEIS -mount -noleaf --version --xdev\n"
+#~ "testes (N pode ser +N ou -N ou N): -amin N -anewer ARQUIVO -atime N -cmin "
+#~ "N\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "ações: -exec COMANDO ; -fprint ARQUIVO -fprint0 ARQUIVO -fprintf ARQUIVO "
+#~ "FORMATO\n"
+#~ "      -ok COMANDO ; -print -print0 -printf FORMATO -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "inserindo %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    tipo: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "esquerda:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "direita:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Árvore de avaliação normalizada:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Uso: %s [-d caminho] [--database=caminho] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] padrão...\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate versão %s\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs versão %s\n"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "citação %s não encontrada"
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644 (file)
index 0000000..0122c46
--- /dev/null
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644 (file)
index 0000000..2436c49
--- /dev/null
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/ro.gmo b/po/ro.gmo
new file mode 100644 (file)
index 0000000..13adb4e
Binary files /dev/null and b/po/ro.gmo differ
diff --git a/po/ro.po b/po/ro.po
new file mode 100644 (file)
index 0000000..2a0a272
--- /dev/null
+++ b/po/ro.po
@@ -0,0 +1,1498 @@
+# Mesajele în limba românã pentru findutils.
+# Copyright (C) 2005, 2010 Free Software Foundation, Inc.
+# Acest fiºier este distribuit sub aceeaºi licenþã ca ºi pachetul findutils.
+# Laurentiu Buzdugan <lbuz@rolix.org>, 2003,2004,2005
+#
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.2.24\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2005-08-01 12:00-0500\n"
+"Last-Translator: Laurentiu Buzdugan <lbuz@rolix.org>\n"
+"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
+"Language: ro\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "nu pot obþine directorul curent"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Avertisment: sistemul de fiºiere %s de fost demontat de curând."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Avertisment: sistemul de fiºiere %s de fost montat de curând."
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s s-a schimbat în timpul execuþiei lui %s (vechiul nr. dispozitiv %ld, "
+"noul nr. dispozitiv %ld, tipul sistemului de fiºiere este %s) [ref %ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s s-a schimbat în timpul execuþiei lui %s (vechiul nr. inode %ld, noul "
+"nr. inode %ld, tipul sistemului de fiºiere este %s) [ref %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "nu pot obþine directorul curent"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, fuzzy, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Legãtura simbolicã `%s' este parte a unei bucle în ierarhia de directoare; "
+"am vizitat deja directorul cãtre care þinteºte."
+
+#: find/find.c:1097
+#, fuzzy, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Am detectat o buclã în sistemul de fiºiere; `%s' are acelaºi numãr de "
+"unitate ºi inode ca ºi un director care este %d %s."
+msgstr[1] ""
+"Am detectat o buclã în sistemul de fiºiere; `%s' are acelaºi numãr de "
+"unitate ºi inode ca ºi un director care este %d %s."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "avertisment: nu urmez legãtura simbolicã %s"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"AVERTISMENT: Numãrul de legãturi hard este greºit pentru %s: acesta ar putea "
+"fi un bug în driverul dvs. pentru sistemul de fiºiere.  Pornesc automat "
+"opþiunea -noleaf a lui find.  Rezultatele precedente ar fi putut eºua sã "
+"includã directoare care ar fi trebuit cãutate."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "necunoscut"
+
+#: find/ftsfind.c:259
+#, fuzzy, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Am detectat o buclã în sistemul de fiºiere; `%s' are acelaºi numãr de "
+"unitate ºi inode ca ºi un director care este %d %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "nu pot obþine directorul curent"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"avertisment: aþi specificat opþiunea %s dupã un argument non-opþiune %s, dar "
+"opþiunile nu sunt poziþionale (%s afecteazã testele specificate înainte de "
+"el ca ºi cele specificate dupã el).  Vã rugãm specificaþi opþiunile înainte "
+"de alte argumente.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"avertisment: opþiunea -d nu mai este validã; vã rugãm folosiþi -depth în "
+"locul lui, pentru cã aceasta din urmã respectã standardul POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"calea implicitã este directorul curent; expresia implicitã este -print\n"
+"expresia poate fi compusã din: operatori opþiuni, teste ºi acþiuni:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operatori (precedenþa în scãdere; -and este implicit când alþii nu sunt "
+"precizaþi):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"opþiuni poziþionale (întotdeauna adevãrat): -daystart -follow -regextype\n"
+"\n"
+"opþiuni normale (întotdeauna adevãrat, specificate înaintea altor "
+"expresii):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"teste (N poate fi +N sau -N sau N): -amin N -anewer FIªIER -atime N -cmin N\n"
+"      -cnewer FIªIER -ctime N -empty -false -fstype TIP -gid N -group NUME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FIªIER"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MOD -regex PATTERN\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NUME -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"acþiuni: -delete -print0 -printf FORMAT -fprintf FORMAT FIªIER -print \n"
+"      -fprint0 FIªIER -fprint FIªIER -ls -fls FIªIER -prune -quit\n"
+"      -exec COMANDà; -exec COMANDà{} + -ok COMANDà;\n"
+"      -execdir COMANDà; -execdir COMANDà{} + -okdir COMANDà;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Raportaþi (ºi urmãriþi progresul reparãrii) bug-urilor folosind pagina de\n"
+"raportare a bug-urilor din findutils de la http://savannah.gnu.org/ sau,\n"
+"dacã nu aveþi acces la internet, trimiþând email la <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "verificarea corectitudinii funcþie de bibliotecã fnmatch() a eºuat."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"avertisment: de obicei, numele de fiºiere în Unix nu conþin shash-uri (dar "
+"numele de cãi da).  Aceasta înseamnã cã '%s %s' va fi evaluat ca fals tot "
+"timpul pe acest sistem.  Aþi putea gãsi testul '-wholename' mai folositor, "
+"sau probabil '-samefile'.  Alternativ, dacã folosiþi GNU grep, puteþi folosi "
+"'find ... -print0 | grep -FzZ %s'."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: opþiunea `%s' necesitã un argument\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, fuzzy, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Nu pot deschide fiºierul de intrare `%s'"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "mod invalid `%s'"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "argument null invalid pentru -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "tip -size invalid `%c'"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "argument invalid `%s' pentru `%s'"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "argument invalid %s pentru %s"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Capabilitãþi activate: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "avertisment: escape nerecunoscut `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "avertisment: directivã format nerecunoscutã `%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Directorul curent este inclus în variabila de mediu PATH, ceea ce este "
+"periculos (insecure) în combinaþie cu acþiune %s a lui find.  Vã rugãm "
+"îndepãrtaþi directorul curent din $PATH (adicã îndepãrtaþi \".\" sau primul "
+"sau ultimul \":\")"
+
+#: find/parser.c:3272
+#, fuzzy, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Directorul curent este inclus în variabila de mediu PATH, ceea ce este "
+"periculos (insecure) în combinaþie cu acþiune %s a lui find.  Vã rugãm "
+"îndepãrtaþi directorul curent din $PATH (adicã îndepãrtaþi \".\" sau primul "
+"sau ultimul \":\")"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Nu puteþi folosi {} în cadrul numelui utilitarului pentru -execdir ºi -"
+"okdir, pentru cã aceasta este o potenþialã problemã de securitate."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Numai o singurã instanþã de {} este suportatã cu -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "mediul (environment) este prea larg pentru exec"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "nu pot obþine directorul curent"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Nu pot deschide fiºierul de intrare `%s'"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "nu pot executa fork"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "eroare aºteptând pentru %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s terminat de semnal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "expresie invalidã"
+
+#: find/tree.c:135
+#, fuzzy, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr "expresie invalidã; aþi folosit un operator binar cu nimic înaintea sa."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, fuzzy, c-format
+msgid "expected an expression after '%s'"
+msgstr "predicat adiþional neaºteptat"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "expresie invalidã; aveþi prea multe ')'"
+
+#: find/tree.c:184
+#, fuzzy, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"expresie invalidã; aºteptam sã gãsesc o ')' pe undeva, dar nu am gãsit-o."
+
+#: find/tree.c:192
+#, fuzzy, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "expresie invalidã; aveþi prea multe ')'"
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"expresie invalidã; aºteptam sã gãsesc o ')' pe undeva, dar nu am gãsit-o."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "hopa -- tip expresie invalid!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "hopa -- tip expresie invalid (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "cãile trebuie specificate înaintea expresiei"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "predicat invalid `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "predicat invalid `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "argument invalid `%s' pentru `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "argument lipsã pentru `%s'"
+
+#: find/tree.c:1406
+#, fuzzy, c-format
+msgid "you have too many ')'"
+msgstr "expresie invalidã; aveþi prea multe ')'"
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "predicat adiþional neaºteptat"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "predicat adiþional neaºteptat"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "hopa -- inserare implicitã invalidã de and!"
+
+#: find/util.c:171
+#, fuzzy, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Folosire : %s [-H] [-L] [-P] [cale...] [expresie]\n"
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Folosire : %s [cale...] [expresie]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "nu pot obþine directorul curent"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "nu pot obþine directorul curent"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "avertisment: escape nerecunoscut `\\%c'"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Variabila de mediu FIND_BLOCK_SIZE nu este suportatã, singurul lucru care "
+"afecteazã dimensiunea blocului esre variabila de mediu POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "comandã prea lungã"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"nu pot potrivi un singur argument în limita dimensiunii listei de argumente"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "listã argumente prea lungã"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU findutils versiunea %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "predicat adiþional neaºteptat"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Folosire: %s [--version | --help]\n"
+"sau       %s cele_mai_comune_bigrame < listã-fisiere > baza-de-date-locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Raportaþi bug-uri la <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "zile"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "argument invalid %s pentru %s"
+
+#: locate/locate.c:468
+#, fuzzy, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"avertisment: calea bazei de date locate `%s' conþine în faþa un caracter "
+"`:', care nu este un nume de bazã de date valid"
+
+#: locate/locate.c:603
+#, fuzzy, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "baza de date locate `%s' este coruptã sau invalidã"
+
+#: locate/locate.c:893
+#, fuzzy, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Dimensiune baza de date locate: %s octeþi\n"
+msgstr[1] "Dimensiune baza de date locate: %s octeþi\n"
+
+#: locate/locate.c:900
+#, fuzzy, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Nume fiºiere: %s "
+
+#: locate/locate.c:901
+#, fuzzy, c-format
+msgid "All Filenames: %s\n"
+msgstr "Nume fiºiere: %s "
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, fuzzy, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Raport de compresie %4.2f%%\n"
+
+#: locate/locate.c:941
+#, fuzzy, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Raport de compresie %4.2f%%\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, fuzzy, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "baza de date locate `%s' este coruptã sau invalidã"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Baza de date %s este în formatul %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Folosire: %s [-d cale | --database=cale] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholepath] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n"
+"      [--version] [--help]\n"
+"      pattern...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"avertisment: baza de date locate poate fi doar cititã de la stdin o datã."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "avertisment: baza de date `%s' este mai veche de %d %s"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "eroare aºteptând pentru %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "mediul (environment) este prea larg pentru exec"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, fuzzy, c-format
+msgid "Cannot open input file %s"
+msgstr "Nu pot deschide fiºierul de intrare `%s'"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Variabile dvs. de mediu ocupã %ld octeþi\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "limitele POSIX min ºi max pentru lungimea unui argument: %ld, %ld\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr "limitele POSIX min ºi max pentru lungimea unui argument: %ld, %ld\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Lungimea mazimã a unei comenzi pe care o putem în fapt folosi: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Dimensiune unui bufer pe care o folosim de fapt: %ld\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"ghilimele %s fãrã pereche; în mod implicit ghilimelele sunt speciale pentru "
+"xargs, în afarã de cazul în care folosiþi opþiunea -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dublu"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "singur"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "linie argumente prea lungã"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "eroare aºteptând pentru procese copil"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: a terminat cu starea 255; renunþ"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: oprit de semnalul %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: terminat de semnalul %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: numãr invalid pentru opþiunea -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: valoarea pentru opþiunea -%c ar trebui sã fie >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: valoarea pentru opþiunea -%c ar trebui sã fie < %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Folosire: %s [-0prtx] [-e[ºir-eof]] [-i[ºir-înlocuire]] [-l[max-linii]]\n"
+"     [-n arg-max] [-s max-caractere] [-P max-procese] [--null] [--eof[=ºir-"
+"eof]]\n"
+"     [--replace[=ºir-înlocuire]] [--max-lines[=linii-max]] [--interactive]\n"
+"     [--max-chars=max-caractere] [--verbose] [--exit] [--max-procs=max-"
+"proc]\n"
+"     [--max-args=max-arg] [--no-run-if-empty] [--arg-file=file]\n"
+"     [--version] [--help] [command [argumente-iniþiale]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "nu pot obþine directorul curent"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "argument invalid %s pentru %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "argument ambiguu %s pentru %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Argumente valide sunt:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Eroare de sistem necunoscutã"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: opþiunea `%s' este ambiguã\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: opþiunea `--%s' nu permite un argument\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: opþiunea `%c%s' nu permite un argument\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: opþiunea `%s' necesitã un argument\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: opþiune nerecunoscutã `--%s'\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: opþiune nerecunoscutã `%c%s'\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: opþiune ilegalã -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: opþiunea necesitã un argument -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: opþiunea `-W %s' este ambiguã\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: opþiunea `-W %s' nu permite un argument\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "Succes"
+
+#~ msgid "No match"
+#~ msgstr "Nici o potrivire"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Expresiei regularã invalidã"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Caracter colatare invalid"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Nume clasã caractere invalid"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Trailing backslash"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Referinþã înapoi invalidã"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "[ sau [^ fãrã pereche"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "( sau \\( fãrã pereche"
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "\\{ fãrã pereche"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Conþinut invalid pentru \\{\\}"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Capãt interval invalid"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Memorie epuizatã"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Invalid precedând expresie regularã"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Sfârºit prematur al expresiei regulare"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Expresie regularã prea mare"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr ") sau \\) fãrã pereche"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Nici o expresie regularã anterioarã"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#, fuzzy
+#~ msgid "memory exhausted"
+#~ msgstr "Memorie epuizatã"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "argument invalid `%s' pentru `%s'"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "argument invalid `%s' pentru `%s'"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "listã argumente prea lungã"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opþiune ilegalã -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "dimensiune bloc"
+
+#~ msgid "level higher in the filesystem hierarchy"
+#~ msgstr "nivel mai înalt în ierarhia sistemului de fiºiere"
+
+#~ msgid "levels higher in the filesystem hierarchy"
+#~ msgstr "nivele mai înalte în ierarhia sistemului de fiºiere"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "avertisment: predicatul -ipath nu mai este valid; vã rugã sã folosiþi -"
+#~ "iwholename în locul lui."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find versiunea %s\n"
+
+#~ msgid "oops -- invalid expression type in mark_stat!"
+#~ msgstr "hopa -- tip expresie invalid în mark_stat!"
+
+#~ msgid "oops -- invalid expression type in mark_type!"
+#~ msgstr "hopa -- tip expresie invalid în mark_type!"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "cu o lungime cumulativã de %s octeþi"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\tdin care %s conþin spaþii albe, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s conþin caractele linie-nouã, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\tºi %s conþin caractere cu bitul înalt setat.\n"
+
+#~ msgid "old"
+#~ msgstr "vechi"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate versiunea %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "argument pentru --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs versiunea %s\n"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Reducem arg_max (%ld) la arg_size (%ld)\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+#~ msgstr ""
+#~ "acþiuni: -exec COMANDà; -fprint FIªIER -fprint0 FIªIER\n"
+#~ "      -fprintf FIªIER FORMAT -fls FILE -ok COMANDà; -print -print0\n"
+#~ "      -printf FORMAT -prune -ls -delete -quit\n"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Listã Directive:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Arbore Eval:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Arbore Eval Optimizat:\n"
+
+#~ msgid "Optimized command line:\n"
+#~ msgstr "Linie de comandã optimizatã:\n"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "memorie virtualã epuizatã"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "inserez %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    tip: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "stânga:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "dreapta:\n"
+
+#~ msgid "[stat called here] "
+#~ msgstr "[stat apelat aici] "
+
+#~ msgid "[type needed here] "
+#~ msgstr "[tip necesar aici] "
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Arbore Eval Normalizat:\n"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "eroare în %s: %s"
+
+#~ msgid ""
+#~ "warning: locate database path `%s' contains a trailing colon, which is "
+#~ "not a valid database name"
+#~ msgstr ""
+#~ "avertisment: calea bazei de date locate `%s' conþine în coadã un caracter "
+#~ "`:', care nu este un nume de bazã de date valid"
diff --git a/po/ru.gmo b/po/ru.gmo
new file mode 100644 (file)
index 0000000..860174e
Binary files /dev/null and b/po/ru.gmo differ
diff --git a/po/ru.po b/po/ru.po
new file mode 100644 (file)
index 0000000..6f24153
--- /dev/null
+++ b/po/ru.po
@@ -0,0 +1,1315 @@
+# translation of findutils-4.5.7.ru.po to Russian
+# Локализация findutils 4.1.5
+# This file is distributed under the same license as the findutils package.
+# Copyright (C) 1997, 1998, 1999, 2000, 2009, 2010 Free Software Foundation, Inc.
+#
+# Denis Perchine <dyp@perchine.com>, 1997, 1998, 1999, 2000.
+# Yuri Kozlov <yuray@komyakino.ru>, 2009, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-04-06 20:13+0400\n"
+"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
+"Language-Team: Russian <gnu@mx.ru>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Не удалось выполнить инициализацию хэш-таблицы на основе общего файла"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "не удалось выполнить stat для текущего каталога"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Не удалось прочитать список смонтированных устройств."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "ПРЕДУПРЕЖДЕНИЕ: файловая система %s недавно была отмонтирована."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "ПРЕДУПРЕЖДЕНИЕ: файловая система %s недавно была cмонтирована."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s изменилось во время выполнения %s (старый номер устройства %ld, новый "
+"номер устройства %ld, тип файловой системы %s) [ссылка %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s изменилось во время выполнения %s (старый номер inode %<PRIuMAX>, новый "
+"номер %<PRIuMAX>, тип файловой системы %s) [ссылка %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "не удалось вернуться в родительский каталог"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Не удалось безопасно перейти в каталог %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Символическая ссылка %s зацикливает дерево каталогов; мы уже были в "
+"каталоге, на который она указывает."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Обнаружено зацикливание в файловой системе; %s имеет тот же номер устройства "
+"и inode что и каталог, который на %d уровень выше в дереве каталогов"
+msgstr[1] ""
+"Обнаружено зацикливание в файловой системе; %s имеет тот же номер устройства "
+"и inode что и каталог, который на %d уровня выше в дереве каталогов"
+msgstr[2] ""
+"Обнаружено зацикливание в файловой системе; %s имеет тот же номер устройства "
+"и inode что и каталог, который на %d уровней выше в дереве каталогов"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "предупреждение: нет перехода по символической ссылке %s"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"ПРЕДУПРЕЖДЕНИЕ: Неверное значение счётчика ссылок для %s (st_nlink="
+"%<PRIuMAX>, но мы уже обошли %<PRIuMAX> подкаталогов): это может указывать "
+"на ошибку в драйвере файловой системы. Выполняется автоматическое включение "
+"ключа -noleaf для find. Предыдущие результаты могут не учитывать каталоги, "
+"которые должны быть пройдены при поиске."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Не удалось прочитать список смонтированных файловых систем"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "неизвестный"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Обнаружено зацикливание в файловой системе; %s является частью той же петли "
+"файловой системы что и %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "ПРЕДУПРЕЖДЕНИЕ: файл %s имеет права доступа 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "не удалось найти %s"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "не удалось восстановить рабочий каталог после поиска %s"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"Действие -delete автоматически включает -depth, а -prune ничего не делает "
+"при наличии -depth. Если вы всё равно хотите выполнить это, то явно укажите "
+"ключ -depth."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"предупреждение: вы указали ключ %s после аргумента без ключа %s, а ключи не "
+"являются позиционными (%s влияет на тесты указанные как перед ним, так и "
+"после него). Указывайте ключи перед другими аргументами.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"предупреждение: не рекомендуется использовать ключ -d; вместо него "
+"используйте -depth, так как он есть в составе POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s не является именем существующей группы и не похоже на числовой ID группы, "
+"так как имеет неожидаемый суффикс %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s не является именем существующей группы"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "пустой аргумент у -group, а должно быть имя группы"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"путём по умолчанию является текущий подкаталог; выражение по умолчанию: -"
+"print\n"
+"выражение может состоять из операторов, ключей, тестов и действий:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"операторы (в нисходящем порядке; -and берется по умолчанию, если не дано "
+"других):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"позиционные ключи (всегда): -daystart -follow -regextype\n"
+"\n"
+"обычные ключи (всегда указываются раньше остальных выражений):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"тесты (N может быть +N или -N или N): -amin N -anewer ФАЙЛ -atime N -cmin N\n"
+"      -cnewer ФАЙЛ -ctime N -empty -false -fstype ТИП -gid N -group ИМЯ\n"
+"      -ilname ШАБЛОН -iname ШАБЛОН -inum N -iwholename ШАБЛОН -iregex "
+"ШАБЛОН\n"
+"      -links N -lname ШАБЛОН -mmin N -mtime N -name ШАБЛОН -newer ФАЙЛ"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path ШАБЛОН -perm [+-]РЕЖИМ -regex ШАБЛОН\n"
+"      -readable -writable -executable\n"
+"      -wholename ШАБЛОН -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user ИМЯ -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context КОНТЕКСТ\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"действия: -delete -print0 -printf ФОРМАТ -fprintf ФОРМАТ_ФАЙЛА -print \n"
+"      -fprint0 ФАЙЛ -fprint ФАЙЛ -ls -fls ФАЙЛ -prune -quit\n"
+"      -exec КОМАНДА ; -exec КОМАНДА {} + -ok КОМАНДА ;\n"
+"      -execdir КОМАНДА ; -execdir КОМАНДА {} + -okdir КОМАНДА ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Отправляйте сообщения об ошибках (и следите за ходом исправления) через\n"
+"страницу findutils по адресу http://savannah.gnu.org/ или, если нет доступа "
+"к веб,\n"
+"пишите на адрес <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "не прошла общая проверка на ошибки в библиотечной функции fnmatch()."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"предупреждение: в именах файлов в Unix, обычно, не содержится символ косой "
+"черты (хотя он есть в именах путей). Это означает, что '%s %s', вероятно, "
+"будет равно false всегда на этой системе. Вам может пригодиться тест '-"
+"wholename', или, возможно, '-samefile'. Или же, если вы используете GNU "
+"grep, то можете выполнять так: 'find ... -print0 | grep -FzZ %s'."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "Для %s ожидалось целое положительное значение аргумента, а получен %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "Эта система не позволяет осуществлять поиск по дате создания файла."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Для теста %s требуется аргумент"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Не удалось понять чем считать %s -- датой или временем"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Не удалось получить время создания файла %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+"предупреждение: -%s %s ни с чем не совпадёт, так как заканчивается на /."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Недопустимые права %s при включённом POSIXLY_CORRECT."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "неверные права %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"предупреждение: вы указали шаблон прав %s (что эквивалентно /000). В целях "
+"согласованности это привело к изменению -perm /000 на -perm -000; то есть, "
+"хотя он используется для проверки отсутствия файлов, теперь он совпадает со "
+"всеми файлами."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "отсутствует аргумент у -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "неверный тип '%c' для -size"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "неверный аргумент `%s%c' для -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"У ключа -show-control-chars имеется единственный аргумент, который должен "
+"быть 'literal' или 'safe'"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "неверный аргумент %s для -used"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s не является именем известного пользователя"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Аргумент ключа -user не должен быть пустым"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Включённые возможности: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "неправильный предикат -context: SELinux не включён."
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Аргументы -type должны быть односимвольными"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Неизвестный аргумент у -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "предупреждение: нераспознанная экранирующая последовательность `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "ошибка: указано %s в конце строки формата"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "предупреждение: нераспознанный формат директивы '%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+"ошибка: формат директивы `%%%c' зарезервирован для будущего использования"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Текущий каталог включён в переменную окружения PATH, что является "
+"небезопасным при использовании действия %s у find. Удалите текущий каталог "
+"из $PATH (т.е., удалите \".\" или начальные или конечные двоеточия)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Относительный путь %s включён в переменную окружения PATH, что является "
+"небезопасным при использовании действия %s у find. Удалите эту часть из $PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Нельзя использовать {} при указании имени утилиты в -execdir и -okdir, так "
+"как это вызывает проблемы с безопасностью."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Только один экземпляр {} поддерживается с -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Окружение слишком велико для exec()."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+"арифметическое переполнение при преобразовании %s дней в количество секунд"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "арифметическое переполнение при вычислении конца сегодняшнего дня"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "стандартный поток ошибок"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "стандартный поток вывода"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "не удалось удалить %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "не удалось восстановить рабочий каталог после поиска %s"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon завершилась неудачно: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "ПРЕДУПРЕЖДЕНИЕ: не удалось определить время создания файла %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Не удалось закрыть стандартный поток вывода"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Не удалось изменить каталог"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "не удалось создать процесс"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "ошибка ожидания %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s прерван по сигналу %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "неверное выражение"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"неверное выражение; вы указали бинарный оператор '%s' без операнда перед ним."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "ожидается выражение между '%s' и ')'"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "ожидается выражение после '%s'"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "неверное выражение; слишком много ')'"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"неверное выражение; ожидается ')', но её нет. Возможно нужен дополнительный "
+"предикат после '%s'"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "неверное выражение; пустые круглые скобки запрещены."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "неверное выражение; ожидалось где-то найти ')', но её нет."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "оопс -- неверный тип выражения!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "оопс -- неверный тип выражения (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "пути должны быть перед выражением: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "неизвестный предикат `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "неверный предикат `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "неверный аргумент `%s' у `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "отсутствует аргумент у `%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "слишком много ')'"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "неожидаемый дополнительный предикат `%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "неожидаемый дополнительный предикат"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "оопс -- неверная вставка по умолчанию оператора 'И' (and)"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Использование: %s [-H] [-L] [-P] [-Oуровень] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [путь...] [выражение]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "не удалось вернуться в родительский каталог"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "не удалось вернуться в родительский каталог"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Игнорируется нераспознанный флаг отладки %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Пустой аргумент у ключа -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "За ключом -O должно быть сразу указано десятичное целое число"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Укажите десятичное целое число сразу после -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Неверный уровень оптимизации %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Уровень оптимизации %lu слишком большой. Если вы хотите искать файлы очень "
+"быстро, попробуйте воспользоваться GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Переменная окружения FIND_BLOCK_SIZE не поддерживается, на размер блока "
+"влияет только переменная окружения POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "команда слишком велика"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr "не удалось вызвать exec() из-за ограничений на размер аргументов"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "аргумент по размеру выходит за пределы списка аргументов"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "список аргументов слишком велик"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+"Значение переменной окружения %s не равно допустимому десятичному числу"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Эрик Б. Декер (Eric B. Decker)"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "Джеймс Янгмен (James Youngman)"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Кэвин Дэлли (Kevin Dalley)"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Собрана с использованием GNU gnulib версии %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Неожидаемый суффикс %s в %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Ожидается целое: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Неизвестный тип регулярного выражения %s; допустимые типы: %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Использование: %s [--version | --help]\n"
+"или    %s most_common_bigrams < список > бд-locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Посылайте отчёты об ошибках на <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "ошибка записи"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Использование: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+"Вам нужно указать уровень безопасности в виде десятичного целого числа."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Уровень безопасности %s лежит за пределам допустимых значений."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Уровень безопасности %s содержит неожидаемый суффикс %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "Для slocate уровень безопасности %ld не поддерживается."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Не удалось осуществить запись в стандартный поток вывода"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "дней"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Аргумент ключа --max-database-age не должен быть пустым"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Неверный аргумент %s для ключа --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"База данных locate %s содержит имя файла длиннее, чем locate может "
+"обрабатывать"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "База данных locate %s повреждена или неверна"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Размер базы данных locate: %s байт\n"
+msgstr[1] "Размер базы данных locate: %s байта\n"
+msgstr[2] "Размер базы данных locate: %s байт\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Подходящие имена файлов: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Все имена файлов: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Имена файлов в целом составляют %s байт.\n"
+"Из этих имён файлов,\n"
+"\n"
+"\t%s содержат пробельные символы, \n"
+"\t%s содержат символы новой строки, \n"
+"\tи %s содержат символы с установленным старшим битом.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Некоторые имена файлов были отфильтрованы, поэтому не получилось посчитать "
+"степень сжатия.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Степень сжатия %4.2f%% (больше -- лучше)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Степень сжатия не определена\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"База данных locate %s похожа на базу данных slocate, но, кажется, имеет "
+"уровень безопасности %c, который в данный момент GNU findutils не "
+"поддерживает"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s является базой данных slocate. Поддержка этого типа введена недавно, пока "
+"возникают проблемы."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s является базой данных slocate с неподдерживаемым уровнем безопасности%d; "
+"пропускаем."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Вы указали ключ -E, но он не может быть использован с базами данных в "
+"slocate-формате с ненулевым уровнем безопасности. По этой базе не будут "
+"выданы результаты.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s является базой данных slocate. Используем ключ '-e'."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"База данных %s в старом формате имеет слишком маленький размер, чтобы быть "
+"работоспособной"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "База данных %s имеет формат %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "В базе данных используется прямой порядок байт.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "В базе данных используется обратный порядок байт.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Непонятно какой порядок байт используется в базы данных.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Использование: %s [-d путь | --database=путь] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=ТИП]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      шаблон...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "не удалось понизить групповые права"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "не удалось понизить setuid права"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Не удалось до конца понизить права"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "не удалось понизить setgid права"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"предупреждение: база данных locate может быть прочитана со стандартного "
+"потока ввода только один раз."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "не удалось получить системное время"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"предупреждение: база данных %s устарела более чем на %d %s (сейчас ей %.1f "
+"%s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr "ПРЕДУПРЕЖДЕНИЕ: база данных locate %s создана с другим порядком байт"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "неожидаемый EOF в %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "ошибка чтения слова с %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+"Неверная экранирующая последовательность %s в спецификации входного "
+"разделителя."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Неверная экранирующая последовательность %s в спецификации входного "
+"разделителя; символьные значения не должны превышать %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Неверная экранирующая последовательность %s в спецификации входного "
+"разделителя; символьные значения не должны превышать %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Неверная экранирующая последовательность %s в спецификации входного "
+"разделителя; не распознаны символы %s в конце."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Неверная спецификация входного разделителя %s; разделитель должен быть, или "
+"одиночным символом, или экранирующей последовательностью, начинающейся с \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "окружение слишком велико для исполнения"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"предупреждение: значение %ld для ключа -s слишком большое; вместо него будет "
+"использовано %ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Не удалось открыть входной файл %s"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Ваши переменные окружения занимают %<PRIuMAX> байт\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Верхняя граница аргумента длины по POSIX (эта система): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Самое маленькое разрешённое значение верхней границы аргумента длины по "
+"POSIX (все системы): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr ""
+"Максимальная длина команды, которую мы можем использовать: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Размер буфера команды, который мы используем: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Теперь будет продолжено выполнение xargs, и предпринята попытка прочитать её "
+"входной поток и запустить команды; если это не то, что вы хотите, нажмите "
+"клавиатурную комбинацию, обозначающую конец файла.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Предупреждение: %s будет выполнена, по крайней мере, один раз. Если это не "
+"то, что вы хотите, нажмите клавиатурную комбинацию прерывания.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"непарные кавычки %s; по умолчанию, кавычки являются спецсимволами для xargs, "
+"если вы не указали ключ -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "двойная"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "одинарная"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"ПРЕДУПРЕЖДЕНИЕ: из входного потока получен символ NUL. Его невозможно "
+"передать в списке аргументов. Может стоит указать ключ --null?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "строка аргументов слишком велика"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "не удалось открыть /dev/tty на чтение"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "не удалось создать канал перед fork"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"чтение errno-buffer завершилось неудачно в xargs_do_exec (вероятно ошибка, "
+"сообщите)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"операция чтения вернула неожидаемое значение %d; вероятно ошибка, сообщите"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "ошибка при ожидании дочернего процесса"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "ПРЕДУПРЕЖДЕНИЕ: сбой слежения за %d дочерними процессами"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: завершен со статусом 255; прерываюсь"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: остановлен по сигналу %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: завершен по сигналу %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: неверное число для опции -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: значение для ключа -%c должно быть >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: значение для ключа -%c должно быть < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Использование: %s [-0prtx] [--interactive] [--null] [-d|--"
+"delimiter=разделитель]\n"
+"       [-E строка-eof] [-e[строка-eof]]  [--eof[=строка-eof]]\n"
+"       [-L макс-колво-строк] [-l[макс-колво-строк]] [--max-lines[=макс-колво-"
+"строк]]\n"
+"       [-I строка-замены] [-i[строка-замены]] [--replace[=строка-замены]]\n"
+"       [-n макс-колво-аргументов] [--max-args=макс-колво-аргументов]\n"
+"       [-s макс-колво-символов] [--max-chars=макс-колво-символов]\n"
+"       [-P макс-колво-процессов]  [--max-procs=макс-колво-процессов] [--show-"
+"limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=файл]\n"
+"       [--version] [--help] [команда [начальные-аргументы]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "не удалось получить текущий каталог"
diff --git a/po/rw.gmo b/po/rw.gmo
new file mode 100644 (file)
index 0000000..926e810
Binary files /dev/null and b/po/rw.gmo differ
diff --git a/po/rw.po b/po/rw.po
new file mode 100644 (file)
index 0000000..e08fc10
--- /dev/null
+++ b/po/rw.po
@@ -0,0 +1,1404 @@
+# Kinyarwanda translations for findutils package.
+# Copyright (C) 2005, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Steve Murphy <murf@e-tools.com>, 2005.
+# Steve performed initial rough translation from compendium built from translations provided by the following translators:
+# Philibert Ndandali  <ndandali@yahoo.fr>, 2005.
+# Viateur MUGENZI <muvia1@yahoo.fr>, 2005.
+# Noëlla Mupole <s24211045@tuks.co.za>, 2005.
+# Carole Karema <karemacarole@hotmail.com>, 2005.
+# JEAN BAPTISTE NGENDAHAYO <ngenda_denis@yahoo.co.uk>, 2005.
+# Augustin KIBERWA  <akiberwa@yahoo.co.uk>, 2005.
+# Donatien NSENGIYUMVA <ndonatienuk@yahoo.co.uk>, 2005.
+# Antoine Bigirimana <antoine@e-tools.com>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.2.6\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2005-04-04 10:55-0700\n"
+"Last-Translator: Steven Michael Murphy <murf@e-tools.com>\n"
+"Language-Team: Kinyarwanda <translation-team-rw@lists.sourceforge.net>\n"
+"Language: rw\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "Kubona KIGEZWEHO bushyinguro"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr ""
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr ""
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%sByahinduwe Bya ki/ bishaje APAREYE Umubare Gishya APAREYE Umubare Ubwoko "
+"ni indango"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%sByahinduwe Bya ki/ bishaje Umubare Gishya Umubare Ubwoko ni indango"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "Kubona KIGEZWEHO bushyinguro"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "itazwi"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "Kubona KIGEZWEHO bushyinguro"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, fuzzy, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"Iburira i Ihitamo Nyuma a Ihitamo Amahitamo OYA Mbere Nka Nka Nyuma "
+"Amahitamo Mbere Ikindi ingingo"
+
+#: find/parser.c:914
+#, fuzzy, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr "Iburira i D Ihitamo ni Bitemewe. Gukoresha Ubujyakuzimu i ni a"
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"Mburabuzi Inzira ni i KIGEZWEHO bushyinguro Mburabuzi imvugo ni Gicurasi Bya "
+"Mukoresha Na ni Oya Ibindi OYA a Na"
+
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"Mburabuzi Inzira ni i KIGEZWEHO bushyinguro Mburabuzi imvugo ni Gicurasi Bya "
+"Mukoresha Na ni Oya Ibindi OYA a Na"
+
+#: find/parser.c:1234
+#, fuzzy
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"o Cyangwa Amahitamo Buri gihe NIBYO Amahitamo Buri gihe NIBYO Mbere Ikindi "
+"Ifashayobora Verisiyo Cyangwa Cyangwa"
+
+#: find/parser.c:1239
+#, fuzzy
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr "-ubusa SIBYO Itsinda amahuza Izina:"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr "-Inzira Ingano NIBYO Ubwoko UID Ukoresha:"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+#, fuzzy
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr "org."
+
+#: find/parser.c:1312
+#, fuzzy, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "Kugenzura... Bya i Isomero Umumaro Byanze"
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s:Ihitamo"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "Sibyo Ubwoko"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, fuzzy, c-format
+msgid "invalid null argument to -size"
+msgstr "Sibyo NTAGIHARI Kuri Ingano"
+
+#: find/parser.c:2324
+#, fuzzy, c-format
+msgid "invalid -size type `%c'"
+msgstr "Sibyo Ingano Ubwoko"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Sibyo Kuri"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Sibyo kugirango"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, fuzzy, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "Iburira"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, fuzzy, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "Iburira Imiterere"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "ni Binini kugirango"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "Kubona KIGEZWEHO bushyinguro"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, fuzzy, c-format
+msgid "< %s ... %s > ? "
+msgstr "<%s...%s>CYOSE"
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr ""
+
+#: find/pred.c:2123
+#, fuzzy, c-format
+msgid "error waiting for %s"
+msgstr "Ikosa Tegereza kugirango"
+
+#: find/pred.c:2132
+#, fuzzy, c-format
+msgid "%s terminated by signal %d"
+msgstr "%sku"
+
+# sc/source\ui\src\namedlg.src:RID_SCDLG_NAMES.STR_INVALIDSYMBOL.text
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, fuzzy, c-format
+msgid "invalid expression"
+msgstr "Imvugo itariyo"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, fuzzy, c-format
+msgid "expected an expression after '%s'"
+msgstr "Birenga"
+
+# sc/source\ui\src\namedlg.src:RID_SCDLG_NAMES.STR_INVALIDSYMBOL.text
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "Imvugo itariyo"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, fuzzy, c-format
+msgid "oops -- invalid expression type!"
+msgstr "Sibyo imvugo Ubwoko"
+
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "Sibyo imvugo Ubwoko"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "Inzira imvugo"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "Sibyo"
+
+#: find/tree.c:1317
+#, fuzzy, c-format
+msgid "invalid predicate `%s'"
+msgstr "Sibyo"
+
+#: find/tree.c:1322
+#, fuzzy, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "Sibyo Kuri"
+
+#: find/tree.c:1330
+#, fuzzy, c-format
+msgid "missing argument to `%s'"
+msgstr "Ibuze Kuri"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "Birenga"
+
+#: find/tree.c:1414
+#, fuzzy, c-format
+msgid "unexpected extra predicate"
+msgstr "Birenga"
+
+#: find/tree.c:1547
+#, fuzzy, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "Sibyo Mburabuzi Iyinjizamo Bya Na"
+
+#: find/util.c:171
+#, fuzzy, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "H Inzira imvugo"
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Inzira imvugo"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "Kubona KIGEZWEHO bushyinguro"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "Kubona KIGEZWEHO bushyinguro"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Iburira"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, fuzzy, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr "IMPINDURAGACIRO ni OYA i i Funga Ingano ni i IMPINDURAGACIRO"
+
+#: lib/buildcmd.c:171
+#, fuzzy, c-format
+msgid "command too long"
+msgstr "Komandi:"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "OYA UMWE muri Urutonde Ingano"
+
+#: lib/buildcmd.c:387
+#, fuzzy, c-format
+msgid "argument list too long"
+msgstr "Urutonde"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Verisiyo"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "Birenga"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr "Verisiyo Ifashayobora Cyangwa IDOSIYE Urutonde"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+#, fuzzy
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr "org."
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "iminsi"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Sibyo kugirango"
+
+#: locate/locate.c:468
+#, fuzzy, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"Iburira Ububikoshingiro Inzira Kirimo a Nyobora ni OYA a Byemewe "
+"Ububikoshingiro Izina:"
+
+#: locate/locate.c:603
+#, fuzzy, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "Ububikoshingiro ni Cyangwa Sibyo"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, fuzzy, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "Ububikoshingiro ni Cyangwa Sibyo"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "Iburira Ububikoshingiro ni Birenzeho ki/ bishaje"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "Ikosa Tegereza kugirango"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, fuzzy, c-format
+msgid "environment is too large for exec"
+msgstr "ni Binini kugirango"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Ibihinduka Hejuru"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Ntoya Na Nkuru Imbibi ku Uburebure"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr "Ntoya Na Nkuru Imbibi ku Uburebure"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Uburebure Bya Komandi: Twebwe Gukoresha"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Bya Komandi: Twebwe ikoresha"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, fuzzy, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"Gushyiraho akugarizo ku Mburabuzi Bidasanzwe Kuri Gukoresha i 0 Ihitamo"
+
+# #-#-#-#-#  officecfg.pot (PACKAGE VERSION)  #-#-#-#-#
+# officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.UnderLine..2.text
+# #-#-#-#-#  officecfg.pot (PACKAGE VERSION)  #-#-#-#-#
+# officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.Strikeout..2.text
+#: xargs/xargs.c:824 xargs/xargs.c:917
+#, fuzzy
+msgid "double"
+msgstr "MAHARAKUBIRI"
+
+# #-#-#-#-#  officecfg.pot (PACKAGE VERSION)  #-#-#-#-#
+# officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.UnderLine..1.text
+# #-#-#-#-#  officecfg.pot (PACKAGE VERSION)  #-#-#-#-#
+# officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.Strikeout..1.text
+#: xargs/xargs.c:824 xargs/xargs.c:917
+#, fuzzy
+msgid "single"
+msgstr "UMWE"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, fuzzy, c-format
+msgid "argument line too long"
+msgstr "Umurongo"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, fuzzy, c-format
+msgid "error waiting for child process"
+msgstr "Ikosa Tegereza kugirango"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, fuzzy, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s:Na: Imimerere"
+
+#: xargs/xargs.c:1384
+#, fuzzy, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s:Kyahagariswe ku"
+
+#: xargs/xargs.c:1387
+#, fuzzy, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s:ku"
+
+#: xargs/xargs.c:1469
+#, fuzzy, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s:Sibyo Umubare kugirango"
+
+#: xargs/xargs.c:1476
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s:Agaciro kugirango Ihitamo"
+
+#: xargs/xargs.c:1490
+#, fuzzy, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s:Agaciro kugirango Ihitamo"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"E i Gusimbura L KININI Imirongo N KININI S KININI KININI NTAGIHARI Gusimbura "
+"Gusimbura KININI Imirongo KININI Imirongo Biganira KININI KININI Gusohoka "
+"KININI KININI KININI KININI Oya Gukoresha NIBA ubusa Verisiyo Ifashayobora "
+"Komandi: ingingo"
+
+#, fuzzy
+#~ msgid "cannot get current directory"
+#~ msgstr "Kubona KIGEZWEHO bushyinguro"
+
+#, fuzzy
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "Sibyo kugirango"
+
+#, fuzzy
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "kugirango"
+
+#, fuzzy
+#~ msgid "Valid arguments are:"
+#~ msgstr "ingingo"
+
+#, fuzzy
+#~ msgid "Unknown system error"
+#~ msgstr "Sisitemu Ikosa"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s:Ihitamo ni"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s:Ihitamo Kwemerera"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s:Ihitamo Kwemerera"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s:Ihitamo"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s:Ihitamo"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s:Ihitamo"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s:Sibyo Ihitamo"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s:Ihitamo"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s:Ihitamo ni"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s:Ihitamo Kwemerera"
+
+# basctl/source\basicide\basidesh.src:RID_IMGBTN_REMOVEWATCH.text
+#, fuzzy
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "Success"
+#~ msgstr "Ibyatunganye"
+
+#, fuzzy
+#~ msgid "No match"
+#~ msgstr "BIHUYE"
+
+#, fuzzy
+#~ msgid "Invalid regular expression"
+#~ msgstr "Ibisanzwe imvugo"
+
+#, fuzzy
+#~ msgid "Invalid collation character"
+#~ msgstr "Inyuguti"
+
+#, fuzzy
+#~ msgid "Invalid character class name"
+#~ msgstr "Inyuguti ishuri Izina:"
+
+#, fuzzy
+#~ msgid "Invalid back reference"
+#~ msgstr "Inyuma Indango"
+
+#, fuzzy
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Cyangwa"
+
+#, fuzzy
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Cyangwa"
+
+#, fuzzy
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Ibikubiyemo Bya"
+
+#, fuzzy
+#~ msgid "Invalid range end"
+#~ msgstr "Urutonde Impera"
+
+#, fuzzy
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Ibisanzwe imvugo"
+
+#, fuzzy
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Impera Bya Ibisanzwe imvugo"
+
+#, fuzzy
+#~ msgid "Regular expression too big"
+#~ msgstr "imvugo"
+
+#, fuzzy
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Cyangwa"
+
+#, fuzzy
+#~ msgid "No previous regular expression"
+#~ msgstr "Ibanjirije Ibisanzwe imvugo"
+
+#, fuzzy
+#~ msgid "memory exhausted"
+#~ msgstr "Kitaboneka Ububiko"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "Sibyo Kuri"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "Sibyo Kuri"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "Urutonde"
+
+#, fuzzy
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s:Ihitamo"
+
+#, fuzzy
+#~ msgid "block size"
+#~ msgstr "Funga Ingano"
+
+#, fuzzy
+#~ msgid "error in %s: %s"
+#~ msgstr "Ikosa in"
+
+#, fuzzy
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+#~ msgstr "YEGO Gucapa LS"
+
+#, fuzzy
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr "Iburira i ni Bitemewe. Gukoresha"
+
+#, fuzzy
+#~ msgid "GNU find version %s\n"
+#~ msgstr "Gushaka Verisiyo"
+
+# #-#-#-#-#  dbaccess.pot (PACKAGE VERSION)  #-#-#-#-#
+# #-#-#-#-#  dbaccess.pot (PACKAGE VERSION)  #-#-#-#-#
+#, fuzzy
+#~ msgid "    type: %s    %s  "
+#~ msgstr "Ubwoko"
+
+#, fuzzy
+#~ msgid "left:\n"
+#~ msgstr "Ibumoso:"
+
+#, fuzzy
+#~ msgid "right:\n"
+#~ msgstr "Iburyo:"
+
+#, fuzzy
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n"
+#~ "      [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "D Inzira Ububikoshingiro Inzira E i Kwirengagiza L Verisiyo Ifashayobora "
+#~ "Ishusho"
+
+#, fuzzy
+#~ msgid ""
+#~ "warning: locate database path `%s' contains a trailing colon, which is "
+#~ "not a valid database name"
+#~ msgstr ""
+#~ "Iburira Ububikoshingiro Inzira Kirimo a ni OYA a Byemewe Ububikoshingiro "
+#~ "Izina:"
+
+#, fuzzy
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "Verisiyo"
+
+#, fuzzy
+#~ msgid "argument to --limit"
+#~ msgstr "Kuri"
+
+#, fuzzy
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "Verisiyo"
+
+#, fuzzy
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Kuri"
diff --git a/po/sk.gmo b/po/sk.gmo
new file mode 100644 (file)
index 0000000..2528ec5
Binary files /dev/null and b/po/sk.gmo differ
diff --git a/po/sk.po b/po/sk.po
new file mode 100644 (file)
index 0000000..944aef2
--- /dev/null
+++ b/po/sk.po
@@ -0,0 +1,1388 @@
+# findutils sk.po
+# Copyright (C) 2002, 2003, 2004, 2005, 2010 Free Software Foundation,
+# Inc.
+# Marcel Telka <marcel@telka.sk>, 2002, 2003, 2004, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.2.24\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2005-08-02 05:56+0200\n"
+"Last-Translator: Marcel Telka <marcel@telka.sk>\n"
+"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
+"Language: sk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "nemôžem zistiť aktuálny adresár"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Upozornenie: súborový systém %s bol nedávno odpojený."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Upozornenie: súborový systém %s bol nedávno pripojený."
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s zmenený počas vykonávania %s (staré číslo zariadenia %ld, nové číslo "
+"zariadenia %ld, typ súborového systému je %s) [odk %ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s zmenený počas vykonávania %s (staré číslo i-uzla %ld, nové číslo i-uzla "
+"%ld, typ súborového systému je %s) [odk %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "nemôžem zistiť aktuálny adresár"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, fuzzy, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Symbolický odkaz `%s' je časťou slučky v hierarchii adresárov; už sme "
+"navštívili adresár, na ktorý ukazuje."
+
+#: find/find.c:1097
+#, fuzzy, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Zdetekovaná slučka na súborovom systéme; `%s' má rovnaké číslo zariadenia a "
+"i-uzil ako adresár %d %s."
+msgstr[1] ""
+"Zdetekovaná slučka na súborovom systéme; `%s' má rovnaké číslo zariadenia a "
+"i-uzil ako adresár %d %s."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "upozornenie: nenasledujem symbolický odkaz %s"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"UPOZORNENIE: Počet hardvérových odkazov je zlý pre %s: to môže byť chybou vo "
+"vašom ovládači súborového systému. Automaticky zappnúť voľbu -noleaf pre "
+"find. Predchádzajúce výsledky mohli zlyhať pri vkladaní adresárov, ktoré "
+"mali byť prehľadané."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "neznámy"
+
+#: find/ftsfind.c:259
+#, fuzzy, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Zdetekovaná slučka na súborovom systéme; `%s' má rovnaké číslo zariadenia a "
+"i-uzil ako adresár %d %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "nemôžem zistiť aktuálny adresár"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"upozornenie: zadali ste voľbu %s po parametri %s, ktorý nemá voľby, ale "
+"voľby nie sú pozičné (%s postihuje testy zadané predtým a tiež tie, ktoré sú "
+"zadané potom). Prosím, zadajte voľby pred ostatnými parametrami.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"upozornenie: voľby -d je neodporúčaná; prosím použite namiesto nej -depth, "
+"pretože táto spĺňa požiadavky POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"implicitná cesta je aktuálny adresár; implicitný výraz je -print\n"
+"výraz môže pozostávať z: operátorov, volieb, testov a akcií:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operátory (klesajúca priorita; -and je implicitný, ak nie je zadaný iný):\n"
+"      ( VÝRAZ )  ! VÝRAZ  -not VÝRAZ VÝRAZ1 -a VÝRAZ2  VÝRAZ1 -and VÝRAZ2\n"
+"      VÝRAZ1 -o VÝRAZ2  VÝRAZ1 - or VÝRAZ2   VÝRAZ1 , VÝRAZ2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"pozičné voľby (vždy pravda): -daystart -follow -regextype\n"
+"\n"
+"obyčajné voľby (vždy pravda, zadané pred ostatnými výrazmi):\n"
+"      -depth --help -maxdepth ÚROVNE -mindepth ÚROVNE -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"testy (N môže byt +N alebo -N alebo N): -amin N -anewer SÚBOR -atime N -cmin "
+"N\n"
+"      -cnewer SÚBOR -ctime N -empty -false -fstype TYP -gid N -group NÁZOV\n"
+"      -ilname VZOR -iname VZOR -inum N -iwholename VZOR -iregex VZOR\n"
+"      -links N -lname VZOR -mmin N -mtime N -name VZOR -newer SÚBOR"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path VZOR -perm [+-]MÓD -regex VZOR\n"
+"      -wholename VZOR -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user MENO -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"akcie: -delete -print0 -printf FORMÁT -fprintf SÚBOR FORMÁT -print \n"
+"      -fprint0 SÚBOR -fprint SÚBOR -ls -fls SÚBOR -prune -quit\n"
+"      -exec PRÍKAZ ; -exec PRÍKAZ {} + -ok PRÍKAZ ;\n"
+"      -execdir PRÍKAZ ; - execdir PRÍKAZ {} + -okdir PRÍKAZ ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Chyby môžete oznamovať (a sledovať postup ich odstraňovania) pomocou "
+"stránky\n"
+"oznamovania chýb pre findutils na http://savannah.gnu.org/ (iba anglicky),\n"
+"alebo, ak nemáte prístup k www, odoslaním elektronickej pošty na adresu\n"
+"<bug-findutils@gnu.org> (iba anglicky).\n"
+"Komentáre k slovenskému prekladu zasielajte na adresu <sk-i18n@lists.linux."
+"sk>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "kontrola správnosti knižničnej funkcie fnmatch() zlyhala."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"upozornenie: Unixové názvy súborov väčšinou neobsahujú lomky (hoci názvy "
+"ciest áno). To znamená, že '%s %s' bude pravdepodobne stále vyhodnotené ako "
+"zlyhanie v tomto systéme. Viac použiteľným testom môže byť '-wholename', "
+"alebo možno '-samefile'. Alebo, ak používate GNU grep, môžete použiť "
+"'find ... -print0 | grep -FzZ %s'."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: voľba `%s' vyžaduje parameter\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, fuzzy, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Nepodarilo sa otvoriť vstupný súbor `%s'"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "neplatný mód `%s'"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "neplatný prázdny parameter pre -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "neplatný typ -size `%c'"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "neplatný parameter `%s' pre `%s'"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "neplatný parameter %s pre %s"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Povolené vlastnosti: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "upozornenie: nerozlíšený prepínací znak `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "upozornenie: nerozpoznaná formátovacia direktíva '%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Aktuálny adresár je súčasťou premennej prostredia PATH, čo nie je bezpečné v "
+"kombinácii s akciou %s vyhľadania. Prosím, odstráňte aktuálny adresár z "
+"vašej premennej $PATH (to znamená, že odstráňte \".\" alebo začiatočné alebo "
+"koncové dvojbodky)"
+
+#: find/parser.c:3272
+#, fuzzy, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Aktuálny adresár je súčasťou premennej prostredia PATH, čo nie je bezpečné v "
+"kombinácii s akciou %s vyhľadania. Prosím, odstráňte aktuálny adresár z "
+"vašej premennej $PATH (to znamená, že odstráňte \".\" alebo začiatočné alebo "
+"koncové dvojbodky)"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Nemôžete použiť {} vo vnútri názvu nástroja pre -execdir a -okdir, pretože "
+"toto je potenciálny bezpečnostný problém."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Len jeden výskyt {} je podporovaný s -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "prostredie je príliš veľké na vykonanie"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "nemôžem zistiť aktuálny adresár"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Nepodarilo sa otvoriť vstupný súbor `%s'"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "nemôžem vykonať fork"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "chyba pri čakaní na %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s ukončený signálom %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "neplatný výraz"
+
+#: find/tree.c:135
+#, fuzzy, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr "neplatný výraz; použili ste binárny operátor bez operandu pred ním."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, fuzzy, c-format
+msgid "expected an expression after '%s'"
+msgstr "neočakávaný predikát navyše"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "neplatný výraz; máte príliš veľa ')'"
+
+#: find/tree.c:184
+#, fuzzy, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr "neplatný výraz; očakával som, že niekde nájdem ')', ale nenašiel som."
+
+#: find/tree.c:192
+#, fuzzy, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "neplatný výraz; máte príliš veľa ')'"
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "neplatný výraz; očakával som, že niekde nájdem ')', ale nenašiel som."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "ach -- neplatný typ výrazu!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "ach -- neplatný typ výrazu (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "cesty musia byť pred výrazom"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "neplatný predikát `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "neplatný predikát `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "neplatný parameter `%s' pre `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "chýbajúci parameter pre `%s'"
+
+#: find/tree.c:1406
+#, fuzzy, c-format
+msgid "you have too many ')'"
+msgstr "neplatný výraz; máte príliš veľa ')'"
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "neočakávaný predikát navyše"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "neočakávaný predikát navyše"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "chyba -- neplatné implicitné vloženie logického súčinu (and)!"
+
+#: find/util.c:171
+#, fuzzy, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Použitie: %s [-H] [-L] [-P] [cesta...] [výraz]\n"
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Použitie: %s [cesta...] [výraz]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "nemôžem zistiť aktuálny adresár"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "nemôžem zistiť aktuálny adresár"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "upozornenie: nerozlíšený prepínací znak `\\%c'"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Premenná prostredia FIND_BLOCK_SIZE je nepodporovaná, jediná vec, ktorá "
+"ovplyvňuje veľkosť bloku je premenná prostredia POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr ""
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+
+#: lib/buildcmd.c:387
+#, fuzzy, c-format
+msgid "argument list too long"
+msgstr "riadok s parametrom je príliš dlhý"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU findutils verzia %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "neočakávaný predikát navyše"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Použitie: %s [--version | --help]\n"
+"alebo     %s most_common_bigrams < zoznam-súborov > databáza-umiestnení\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Správy o chybách zasielajte na adresu <bug-findutils@gnu.org> (iba "
+"anglicky).\n"
+"Komentáre k slovenskému prekladu zasielajte na adresu <sk-i18n@lists.linux."
+"sk>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dní"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "neplatný parameter %s pre %s"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, fuzzy, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "databáza pre locate `%s' je poškodená alebo neplatná"
+
+#: locate/locate.c:893
+#, fuzzy, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Veľkosť databázy vyhľadávania: %s bajtov\n"
+msgstr[1] "Veľkosť databázy vyhľadávania: %s bajtov\n"
+
+#: locate/locate.c:900
+#, fuzzy, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Názvy súborov: %s "
+
+#: locate/locate.c:901
+#, fuzzy, c-format
+msgid "All Filenames: %s\n"
+msgstr "Názvy súborov: %s "
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, fuzzy, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Kompresný pomer %4.2f%%\n"
+
+#: locate/locate.c:941
+#, fuzzy, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Kompresný pomer %4.2f%%\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, fuzzy, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "databáza pre locate `%s' je poškodená alebo neplatná"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Databáza %s je vo formáte %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Použitie: %s [-d cesta | --database=cesta] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYP]\n"
+"      [--version] [--help]\n"
+"      vzor...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"upozornenie: databáza umiestnení môže byť načítaná len raz zo štandardného "
+"vstupu."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "upozornenie: databáza `%s' je staršia ako %d %s"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "chyba pri čakaní na %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "prostredie je príliš veľké na vykonanie"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, fuzzy, c-format
+msgid "Cannot open input file %s"
+msgstr "Nepodarilo sa otvoriť vstupný súbor `%s'"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Vaše premenné prostredia zaberajú %ld byjtov\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Dolné a horné POSIX limity pre dĺžku parametrov: %ld, %ld\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr "Dolné a horné POSIX limity pre dĺžku parametrov: %ld, %ld\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Maximálna dĺžka príkazu, ktorú môžeme momentálne používať: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Veľkosť vyrovnávacej pamäte príkazov, ktorú práve používame: %ld\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"nezodpovedajúce úvodzovky %s; štandardne sú úvodzovky špeciálne pre xargs, "
+"pokiaľ nepoužijete voľbu -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dvojitý"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "jednoduchý"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "riadok s parametrom je príliš dlhý"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "chyba pri zápise do procesu potomka"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: ukončený so stavom 255; prerušujem"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: zastavený signálom %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: ukončený signálom %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: neplatné číslo pre voľbu -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: hodnota pre voľbu -%c by mala byť >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: hodnota pre voľbu -%c by mala byť < %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Použitie: %s [-0prtx] [-e[eof-reť]] [-i[nahr-reť]] [-l[max-riadkov]]\n"
+"       [-n max-param] [-s max-znakov] [-P max-proc] [--null] [--eof[=eof-"
+"reť]]\n"
+"       [--replace[=nahr-reť]] [--max-lines[=max-riadkov]] [--interactive]\n"
+"       [--max-chars=max-znakov] [--verbose] [--exit] [--max-procs=max-proc]\n"
+"       [--max-args=max-param] [--no-run-if-empty] [--arg-file=súbor]\n"
+"       [--version] [--help] [príkaz [počiatočné-parametre]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "nemôžem zistiť aktuálny adresár"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "neplatný parameter %s pre %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "nejednoznačný parameter %s pre %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Platné parametre sú:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Neznáma systémova chyba"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: voľba `%s' je nejednoznačná\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: voľba `--%s' neumožňuje parameter\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: voľba `%c%s' neumožňuje parameter\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: voľba `%s' vyžaduje parameter\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: nerozpoznaná voľba `--%s'\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: nerozpoznaná voľba `%c%s'\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: neplatná voľba -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: voľba vyžaduje parameter -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: voľba `-W %s' je nejednoznačná\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: voľba `-W %s' neumožňuje použiť parameter\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#, fuzzy
+#~ msgid "Invalid regular expression"
+#~ msgstr "neplatný výraz"
+
+#, fuzzy
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "neplatný výraz"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yYaAáÁ]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "neplatný parameter `%s' pre `%s'"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "neplatný parameter `%s' pre `%s'"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "riadok s parametrom je príliš dlhý"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: nepovolená voľba -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "veľkosť bloku"
+
+#~ msgid "level higher in the filesystem hierarchy"
+#~ msgstr "vyššia úroveň v hierarchii súborového systému"
+
+#~ msgid "levels higher in the filesystem hierarchy"
+#~ msgstr "úrovne nad hierarchiou súborového systému"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "upozornenie: predikát -ipath neodporúčaný; použite namiesto neho -"
+#~ "iwholename."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find verzia %s\n"
+
+#~ msgid "oops -- invalid expression type in mark_stat!"
+#~ msgstr "ach -- neplatný typ výrazu v mark_stat!"
+
+#~ msgid "oops -- invalid expression type in mark_type!"
+#~ msgstr "ach -- neplatný typ výrazu v mark_type!"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "s celkovou dĺžkou %s bajtov"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\tz ktorých %s obsahuje medzery, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s obsahuje znak konca riadku, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\ta %s obsahujú znaky s nastaveným najvyšším bitom.\n"
+
+#~ msgid "old"
+#~ msgstr "staré"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locale verzia %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "parameter pre --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs verzia %s\n"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Zmenšenie arg_max (%ld) na arg_size (%ld)\n"
diff --git a/po/sl.gmo b/po/sl.gmo
new file mode 100644 (file)
index 0000000..6f488d4
Binary files /dev/null and b/po/sl.gmo differ
diff --git a/po/sl.po b/po/sl.po
new file mode 100644 (file)
index 0000000..7ae0aa0
--- /dev/null
+++ b/po/sl.po
@@ -0,0 +1,1562 @@
+# -*- mode:po; coding:utf-8; -*- Slovenian messages for findutils.
+# Copyright (C) 1996, 2000, 2001, 2005, 2006, 2009, 2011 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Primož Peterlin <primozz.peterlin@gmail.com>, 2000, 2001, 2005, 2006, 2009, 2011.
+# $Id: findutils-4.5.7.sl.po,v 1.2 2011/01/12 13:50:29 peterlin Exp $
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2011-01-12 14:50+0100\n"
+"Last-Translator: Primož Peterlin <primozz.peterlin@gmail.com>\n"
+"Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n"
+"Language: sl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
+"%100==4 ? 3 : 0);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Inicializacija porazdeljene zgoščevalne tabele ni uspela"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "statusa trenutnega imenika ni mogoče ugotoviti"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Seznama priklopljenih naprav ni mogoče prebrati."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "OPOZORILO: datotečni sistem %s je bil nedavno odklopljen."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "OPOZORILO: datotečni sistem %s je bil nedavno priklopljen."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s se je spremenila med izvajanjem %s (stara številka enote %ld, nova "
+"številka enote %ld, vrsta datotečnega sistema %s) [ref %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s se je spremenila med izvajanjem %s (stara številka inoda %<PRIuMAX>, "
+"nova številka inoda %<PRIuMAX>, vrsta datotečnega sistema %s) [ref %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "vrnitev v nadrejeni imenik ni mogoča"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Varna zamenjava imenika v %s ni uspela"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Simbolna povezava »%s« je del zanke v drevesu imenikov; imenik, na katerega "
+"kaže, smo že obiskali."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Odkrita zanka v datotečnem sistemu: %s ima isto številko enote in inoda kot "
+"imenik %d ravni višje."
+msgstr[1] ""
+"Odkrita zanka v datotečnem sistemu: %s ima isto številko enote in inoda kot "
+"imenik %d raven višje."
+msgstr[2] ""
+"Odkrita zanka v datotečnem sistemu: %s ima isto številko enote in inoda kot "
+"imenik %d ravni višje."
+msgstr[3] ""
+"Odkrita zanka v datotečnem sistemu: %s ima isto številko enote in inoda kot "
+"imenik %d ravni višje."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "opozorilo: simbolni povezavi %s ne sledimo"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"OPOZORILO: Število trdih povezav za %s je napačno (vidno je st_nlink="
+"%<PRIuMAX>, vendar smo našteli že %<PRIuMAX> podimenikov): lahko gre za "
+"napako v gonilniku za vaš datotečni sistem. Samodejno vklapljamo izbiro -"
+"noleaf. Prejšnji rezultati so lahko bili napačni, ker v iskanje niso bili "
+"vključeni vsi potrebni imeniki."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Seznama priklopljenih datotečnih sistemov ni mogoče prebrati"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "neznano"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Odkrita zanka v datotečnem sistemu: %s je del iste zanke datotečnega sistema "
+"kot %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "OPOZORILO: videti je, da ima datoteka %s zaščito 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "ni mogoče preiskati %s"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "povrnitev delovnega imenika po preiskovanju %s ni mogoča"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"Dejanje -delete samodejno vklopi izbiro -depth, dejanje -prune pa ob "
+"vklopljeni izbiri -depth ne izvede ničesar. Če želite vseeno nadaljevati, "
+"izrecno uporabite izbiro -depth."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"opozorilo: izbiro %s ste navedli za neizbirnim argumentom %s, vendar izbire "
+"niso pozicijske (%s vpliva na teste, navadene pred njo in za njo). Prosimo, "
+"navedite izbire pred drugimi argumenti.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"opozorilo: raba izbire -d je odsvetovana; zaradi skladnosti s POSIX namesto "
+"nje priporočamo -depth."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s ni niti ime obstoječe skupine, niti ni videti kot številčni GID, saj ima "
+"nepričakovano pripono %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s ni ime obstoječe skupine"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "argument k izbiri -group manjka; navedeno bi moralo biti ime skupine"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"privzeta pot je trenutni imenik; privzeti izraz je -print\n"
+"izraz lahko sestavljajo: operatorji, izbire, testi in dejanja:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operatorji (po padajoči prednosti; če ni podano nič drugega, se privzame -"
+"and):\n"
+"      ( IZRAZ )   ! IZRAZ   -not IZRAZ   IZRAZ1 -a IZRAZ2   IZRAZ1 -and -"
+"IZRAZ2\n"
+"      IZRAZ1 -o IZRAZ2   IZRAZ1 -or IZRAZ2   IZRAZ1 , IZRAZ2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"pozicijske izbire (vedno resnične): -daystart -follow -regextype\n"
+"\n"
+"navadne izbire (vedno resnične, navedene pred drugimi izrazi):  \n"
+"      -depth  --help -maxdepth RAVNI -mindepth RAVNI -mount -noleaf \n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+"testi (N can be +N or -N or N): -amin N -anewer DATOTEKA -atime N -cmin N\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"testi (N je lakko +N, -N ali N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer DATOTEKA -ctime N -empty -false -fstype TIP -gid N -group IME\n"
+"      -ilname VZOREC -iname VZOREC -inum N -iwholename VZOREC -iregex "
+"VZOREC\n"
+"      -links N -lname VZOREC -mmin N -mtime N -name VZOREC -newer DATOTEKA"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path VZOREC -perm [+-]ZAŠČITA -regex VZOREC\n"
+"      -readable -writable -executable\n"
+"      -wholename VZOREC -size N[bcwkMG] -true -type [bcdpflsD] -uid N \n"
+"      -used N -user IME -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context KONTEKST\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"dejanja: -delete -print0 -printf FORMAT -fprintf DATOTEKA FORMAT -print\n"
+"      -fprint0 DATOTEKA -fprint DATOTEKA -ls -fls DATOTEKA -prune -quit\n"
+"      -exec UKAZ ; -exec UKAZ {} + -ok UKAZ ;\n"
+"      -execdir UKAZ ; -execdir UKAZ {} + -okdir UKAZ ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Napake lahko sporočate (in sledite napredek pri popravljanju) na spletni "
+"strani\n"
+"za prijavljanje napak findutils, http://savannah.gnu.org/, ali, če nimate\n"
+"dostopa do spleta, po elektronski pošti na naslov <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "preizkus koherentnosti knjižnične funkcije fnmatch() ni uspel."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"opozorilo: Imena datotek v Unixu navadno ne vsebujejo poševnic (poti pa "
+"jih). To pomeni, da se bo »%s %s« na tem sistemu najverjetneje vedno "
+"ovrednotilo kot neresnično. Testa »-wholename« ali »-samefile« bosta morda "
+"uporabnejša. Če uporabljate GNU grep, lahko uporabite tudi »find ... -print0 "
+"| grep -FzZ %s«."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "Izbira %s pričakuje pozitivni desetiški argument namesto %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "Ta sistem ne omogoča ugotavljanja časa nastanka datoteke"
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Preizkus %s potrebuje argument"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Niza %s ni mogoče tolmačiti kot datum ali čas"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Časa nastanka datoteke %s ni mogoče ugotoviti"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr "opozorilo: -%s %s se zaključi z /., zato se z njim ne bo ujemalo nič"
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Način %s ni veljaven, kadar je v veljavi izbira POSIXLY_CORRECT."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "neveljaven način %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"opozorilo: določili ste vzorec %s, ki je enakovreden /000. Pomen -perm /000 "
+"se je spremenil, tako da je skladen z -perm -000; prej se ni ujemal z nobeno "
+"datoteke, zdaj pa se z vsemi."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "neveljaven prazni argument pri -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "neveljaven tip -size: »%c«"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Neveljaven argument »%s%c« za -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Izbira -show-control-chars zahteva en sam argument, ki je bodisi »literal« "
+"bodisi »safe«"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Neveljaven argument %s za -used"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s ni ime obstoječega uporabnika"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Argument k izbiri -user ne sme biti prazen"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Omogočene možnosti: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "neveljaven predikat -context: SELinux ni omogočen"
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Argument k izbiri -type lahko vsebuje le en znak"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Nepoznan argument k izbiri -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "opozorilo: neprepoznano ubežno zaporedje »\\%c«"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "napaka: %s na koncu oblikovnega niza"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "opozorilo: neprepoznano formatno določilo »%%%c«"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "napaka: formatno določilo »%%%c« je rezervirano za rabo v prihodnosti"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Trenutni imenik je naveden v spremenljivki PATH, kar je nevarno v "
+"kombinaciji z dejanjem %s programa find. Prosim, odstranite trenutni imenik "
+"iz spremenljivke $PATH - odstranite ».« ter uvodna ali zaključna dvopičja."
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Relativna pot %s je vključena v spremenljivki PATH, kar je nevarno v "
+"kombinaciji z dejanjem %s programa find. Prosim, odstranite trenutni imenik "
+"iz spremenljivke $PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Raba {} znotraj imena pomožnega programa za -execdir in -okdir zaradi "
+"mogočih varnostnih problemov ni dovoljena."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Podprta je le enkratna navedba {} v kombinaciji z -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Okolje je preobsežno za klic exec()."
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr " aritmetična prekoračitev obsega pri pretvorbi %s dni v število sekund"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+" aritmetična prekoračitev obsega pri poskusu izračuna konca trenutnega datuma"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standardni izhod za napake"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standardni izhod"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "ni mogoče izbrisati %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "povrnitev delovnega imenika po preiskovanju %s ni mogoča"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "klic getfilecon ni uspel: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "OPOZORILO: ni mogoče ugotoviti časa nastanka datoteke %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Standardnega vhoda ni mogoče zapreti"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Sprememba imenika ni mogoča"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "vejitev ni mogoča"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "napaka pri čakanju na %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s zaključen s signalom %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "neveljaven izraz"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"neveljaven izraz: uporabili ste binarni operator  »%s«, pred katerim ni "
+"argumenta"
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "pričakuje se izraz med »%s« in »)«"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "pričakuje se izraz, ki sledi »%s«"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "neveljaven izraz; preveč zaklepajev »)«"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"neveljaven izraz: pričakovali smo zaklepaj »)«, ki ga ni.  Morda potrebujete "
+"dodatni predikat za »%s«"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "neveljaven izraz; prazni oklepaji niso dovoljeni"
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "neveljaven izraz: manjkajoč zaklepaj »)«."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "opla -- neveljaven tip izraza!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "opla -- neveljaven tip izraza (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "poti morajo biti navedene pred izrazom: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "neznan predikat »%s«"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "neveljaven predikat »%s«"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "neveljaven argument »%s« za »%s«"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "manjkajoč argument k »%s«"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "preveč zaklepajev »)«"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "nepričakovan dodatni predikat »%s«"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "nepričakovan dodatni predikat"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "opla - neveljavno privzeto vstavljanje logičnega ALI!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Uporaba: %s [-H] [-L] [-P] [-Oraven] [-D"
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [POT...] [IZRAZ]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "trenutnega imenika ni mogoče zabeležiti"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "trenutnega imenika ni mogoče zabeležiti"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Ne upoštevamo neprepoznanega stikala za odpravljanje napak %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Manjkajoč argument k izbiri -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Izbiri -O mora neposredno slediti desetiško celo število"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Prosimo, navedite desetiško število neposredno za -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Neveljavna raven optimizacije %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Raven optimizacije %lu je previsoka.  Če želite najti datoteke zares hitro, "
+"razmislite o uporabi GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Spremenljivka FIND_BLOCK_SIZE ni podprta; na velikost bloka vpliva "
+"spremenljivka POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "ukaz je predolg"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr "klic exec() ni mogoč zaradi omejitev glede velikosti argumenta"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "posameznega argumenta ni mogoče umestiti v obseg seznama argumentov"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "seznam argumentov je predolg"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr "Spremenljivka okolja %s ni nastavljena na veljavno decimalno število"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Prevedeno z GNU gnulib, različica %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Nepričakovana pripona %s pri %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Pričakuje se celo število: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Neznan tip regularnega izraza %s; veljavni tipi so %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Uporaba: %s [--version | --help]\n"
+"ali      %s najpogostejši_bigrami < seznam > kodiran_seznam\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Napake v programu sporočite na <bug-findutils@gnu.org>.\n"
+"Napake v prevodu sporočite na <translation-team-sl@lists.sourceforge.net>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "napaka pri pisanju"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Uporaba: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Varnostno raven morate navesti kot desetiško celo število."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Varnostna raven %s je zunaj dovoljenega obsega."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Varnostna raven %s ima nepričakovano pripono %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "raven varnosti %ld pri slocate ni podprta."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Pisanje na standardni izhod ni uspelo"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dni"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Argument k izbiri --max-database-age ne sme biti prazen"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Neveljaven argument %s za izbiro --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"zbirka locate %s vsebuje ime datoteke, ki je daljše, kot ga lahko locate "
+"obdela"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "zbirka locate %s je poškodovana ali neveljavna"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Velikost zbirke locate: %s bajtov\n"
+msgstr[1] "Velikost zbirke locate: %s bajt\n"
+msgstr[2] "Velikost zbirke locate: %s bajta\n"
+msgstr[3] "Velikost zbirke locate: %s bajti\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Ujemajoča se imena datotek: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Vsa imena datotek: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Skupna dolžina imen datotek je %s bajtov.\n"
+"Od teh imen datotek,\n"
+"\n"
+"\t%s vsebuje presledke,\n"
+"\t%s vsebuje znak za novo vrstico,\n"
+"\tin %s vsebuje znake s postavljenim osmim bitom.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Nekatere datoteke so bile pri filtriranju izpuščene, zato ni mogoče "
+"izračunati faktorja kompresije.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Faktor kompresije %4.2f%% (večja vrednost je boljša)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Kompresijski faktor ni določen\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"zbirka locate %s je videti kot zbirka slocate, vendar je videti, da ima "
+"nastavljeno varnostno raven %c, ki je GNU findutils za zdaj ne podpira"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s je zbirka slocate.  Podpora za tovrstne zbirke je nova, mogoče so težave."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr "%s je zbirka slocate z nepodprto varnostno ravnijo %d; preskočimo jo."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Navedli ste izbiro -E, vendar te izbire ni mogoče uporabiti z zbirkami "
+"oblike slocate, ki imajo varnostno raven, višjo od 0.  Za to zbirko ne bo "
+"ustvarjenih rezultatov.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s je zbirka slocate.  Vklapljamo izbiro »-e«."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"Zbirka locate »%s« stare oblike je prekratka, da bi lahko bila veljavna"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Zbirka %s je v %s obliki.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Zbirka uporablja vrstni red zlogov »big-endian«.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Zbirka uporablja vrstni red zlogov »little-endian«.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Vrstni red zlogov v zbirki ni razviden.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Uporaba: %s [-d path | --database=pot] [-e | -E | --[non-]existing]\n"
+"        [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n"
+"        [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"        [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"        [-A | --all] [-p | --print] [-r | --regex] [--regextype=TIP]\n"
+"        [--max-database-age D] [--version] [--help] \n"
+"        vzorec...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "ovržba privilegijev skupine ni uspela"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "ovržba privilegijev setuid ni uspela"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Celotna ovržba privilegijev ni uspela"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "ovržba privilegijev setgid ni uspela"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"opozorilo: zbirko locate lahko preberemo s standardnega vhoda le enkrat."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "sistemski klic time() ni uspel"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"opozorilo: zbirka »%s« je starejša od %d %s (dejanska starost je %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+"OPOZORILO: zbirla locate %s je bila zgrajena z drugačnim vrstnim redom zlogov"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "nepričakovan EOF v %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "napaka pri branju besede z %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika; "
+"vrednost znaka ne sme presegati %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika; "
+"vrednost znaka ne sme presegati %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika; "
+"neprepoznan sledilni znak %s."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Neveljavno specifikacija vhodnega razmejilnika %s: razmejilnim mora biti "
+"bodisi en sam znak, bodisi ubežno zaporedje, ki se začenja z \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "okolje je preobsežno za klic exec"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"opozorilo: vrednost %ld za izbiro -s je previsoka, namesto nje uporabljamo "
+"%ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Vhodne datoteke %s ni mogoče odpreti"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Vaše spremenljivke okolja zasedajo %<PRIuMAX> bajtov\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Zgornja meja POSIX za dolžino argumenta na tem sistemu: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Najmanjša dovoljena zgornja meja POSIX za dolžino argumenta na kateremkoli "
+"sistemu: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Največja dolžina ukaza, ki ga lahko uporabimo: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr ""
+"Velikost ukaznega medpomnilnika, ki ga dejansko uporabljamo: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Izvajanje ukaza xargs se bo zdaj nadaljevalo, in skušal bo prebrati vhod in "
+"izvesti ukaze; če tega ne želite, vtipkajte kodo za konec datoteke.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Opozorilo: %s se bo izvedel najmanj enkrat.  Če tega ne želite, vnesite kodo "
+"za prekinitev.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"%s narekovaj brez para; privzeto so narekovaji za xargs posebni, razen če "
+"vključite izbiro -O"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dvojni"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "enojni"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"OPOZORILO: na vhodu se je pojavil znak NUL.  Ni ga mogoče prenesti v seznamu "
+"argumentov.  Ste nameravali uporabiti izbiro --null?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "vrstica z argumenti je predolga"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "odpiranje /dev/tty za branje ni uspelo"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "ustvarjanje cevovoda pred vejitvijo ni uspelo"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"branje medpomnilnika errno v xargs_do_exec ni uspelo (to je najverjetneje "
+"napaka; prosimo, javite jo)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"branje je vrnilo nepričakovano vrednost %d; to je najverjetneje napaka, "
+"prosimo, javite jo"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "napaka pri čakanju na proces naslednik"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "OPOZORILO: Sled za %d procesi nasledniki se je izgubila"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: izhod s statusom 255; prekinjamo"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: ustavljeno s signalom %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: zaključeno s signalom %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: neveljavno število za izbiro -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: vrednost za izbiro -%c mora biti >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: vrednost za izbiro -%c mora biti < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Uporaba: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=razmejilnik]\n"
+"       [-E eof-str] [-e[niz-eof]]  [--eof[=niz-eof]]\n"
+"       [-L največ-vrstic] [-l[največ-vrstic]] [--max-lines[=največ-vrstic]]\n"
+"       [-I nadomestni-niz] [-i[nadomestni-niz]] [--replace[=nadomestni-"
+"niz]]\n"
+"       [-n največ-argumentov] [--max-args=največ-argumentov]\n"
+"       [-s največ-znakov] [--max-chars=največ-znakov]\n"
+"       [-P največ-procesov]  [--max-procs=največ-procesov]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=datoteka]\n"
+"       [--version] [--help] [ukaz [začetni-argumenti]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "trenutnega imenika ni mogoče ugotoviti"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "neveljaven argument %s za %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "dvoumen argument %s za %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Veljavni argumenti so:"
+
+#~ msgid "error closing file"
+#~ msgstr "napaka pri zapiranju datoteke"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Neznana sistemska napaka"
+
+#~ msgid "%s: option `%s' is ambiguous\n"
+#~ msgstr "%s: izbira »%s« je dvoumna\n"
+
+#~ msgid "%s: option `--%s' doesn't allow an argument\n"
+#~ msgstr "%s: izbira »--%s« ne dovoljuje argumenta\n"
+
+#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: izbira »%c%s« ne dovoljuje argumenta\n"
+
+#~ msgid "%s: unrecognized option `--%s'\n"
+#~ msgstr "%s: neprepoznana izbira »--%s«\n"
+
+#~ msgid "%s: unrecognized option `%c%s'\n"
+#~ msgstr "%s: neprepoznana izbira »%c%s«\n"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: nedovoljena izbira -- %c\n"
+
+#~ msgid "%s: invalid option -- %c\n"
+#~ msgstr "%s: neveljavna izbira -- %c\n"
+
+#~ msgid "%s: option requires an argument -- %c\n"
+#~ msgstr "%s: izbira zahteva argument -- %c\n"
+
+#~ msgid "%s: option `-W %s' is ambiguous\n"
+#~ msgstr "%s: izbira »-W %s« je dvoumna\n"
+
+#~ msgid "%s: option `-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: izbira »-W %s« ne dovoljuje argumenta\n"
+
+#~ msgid "`"
+#~ msgstr "»"
+
+#~ msgid "'"
+#~ msgstr "«"
+
+#~ msgid "Success"
+#~ msgstr "Uspešno"
+
+#~ msgid "No match"
+#~ msgstr "Brez zadetkov"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Neveljavni regularni izraz"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Neveljavni znak za primerjavo"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Neveljavno ime razreda znakov"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Zaključna nagibnica"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Neveljavni povratni sklic"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Nezaključen [ ali [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Nezaključen ( ali \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Nezaključen \\["
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Neveljavna vsebina \\[\\]"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Neveljavni konec obsega"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Pomnilnik porabljen"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Neveljavni predhodni regularni izraz"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Prezgodnji konec regularnega izraza"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Regularni izraz je prevelik"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Odvečni ) ali \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Prejšnji regularni izraz manjka"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[DdJj]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[Nn]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "pomnilnik porabljen"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "neveljaven argument %s%s za »%s«"
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "neveljavna pripona argumenta %s%s za »%s«"
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "%s%s argument »%s« je preobsežen"
+
+#~ msgid "block size"
+#~ msgstr "velikost bloka"
+
+#~ msgid "level higher in the filesystem hierarchy"
+#~ msgstr "raven višje v datotečni hierarhiji"
+
+#~ msgid "levels higher in the filesystem hierarchy"
+#~ msgstr "ravni višje v datotečni hierarhiji"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "opozorilo: predikat -ipath odsvetujemo; priporočamo zamenjavo z -"
+#~ "iwholename."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find, različica %s\n"
+
+#~ msgid "oops -- invalid expression type in mark_stat!"
+#~ msgstr "opla -- neveljaven tip izraza v mark_stat!"
+
+#~ msgid "oops -- invalid expression type in mark_type!"
+#~ msgstr "opla -- neveljaven tip izraza v mark_type!"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "s skupno dolžino %s bajtov"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "        med katerimi %s vsebuje presledke, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "        %s vsebuje znake za novo vrstico, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "        in %s vsebuje znake s postavljenim osmim bitom.\n"
+
+#~ msgid "old"
+#~ msgstr "stari"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate, izdaja %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "argument za --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs, izdaja %s\n"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Zmanjšujemo arg_max (%ld) na vrednost arg_size (%ld)\n"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Seznam predikatov:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Drevo ovrednotenj:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Optimizirano drevo ovrednotenj:\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s spremenjen med izvajanjem %s"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "virtualni pomnilnik porabljen"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. spremenjen med izvajanjem %s"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "napaka v %s: %s"
+
+#~ msgid ""
+#~ "      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n"
+#~ "options (always true): -daystart -depth -follow --help\n"
+#~ "      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n"
+#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+#~ msgstr ""
+#~ "      IZRAZ1 -o IZRAZ2 IZRAZ1 -or IZRAZ2 IZRAZ1 , IZRAZ2\n"
+#~ "izbire (vedno vklapljamo): -daystart -depth  -follow --help\n"
+#~ "      -maxdepth RAVNI -mindepth RAVNI -mount -noleaf --version -xdev\n"
+#~ "testi (N can be +N or -N or N): -amin N -anewer DATOTEKA -atime N -cmin "
+#~ "N\n"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n"
+#~ msgstr ""
+#~ "dejanja: -exec UKAZ ; -fprint DATOTEKA -fprint0 DATOTEKA -fprintf "
+#~ "DATOTEKA FORMAT\n"
+#~ "      -ok UKAZ ; -print -print0 -printf FORMAT -prune -ls\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "vrivamo %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "     tip: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "levo:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "desno:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Normalizirano drevo ovrednotenj:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Uporaba: %s [-d path | --database=pot] [-e | --existing]\n"
+#~ "        [-i | --ignore-case] [--version] [--help] vzorec...\n"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "%s narekovaj brez para"
+
+#~ msgid "cannot open current directory"
+#~ msgstr "trenutnega imenika ni možno odpreti"
diff --git a/po/sr.gmo b/po/sr.gmo
new file mode 100644 (file)
index 0000000..6d73e89
Binary files /dev/null and b/po/sr.gmo differ
diff --git a/po/sr.po b/po/sr.po
new file mode 100644 (file)
index 0000000..68cf728
--- /dev/null
+++ b/po/sr.po
@@ -0,0 +1,1429 @@
+# Serbian translation of findutils
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Danilo Segan <dsegan@gmx.net>, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.2.6\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2004-11-24 14:16+0100\n"
+"Last-Translator: Danilo Segan <dsegan@gmx.net>\n"
+"Language-Team: Serbian <gnu@prevod.org>\n"
+"Language: sr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "не могу да сазнам текући директоријум"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Систем датотека %s је недавно искључен."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Систем датотека %s је недавно прикључен."
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s је измењен при извршавању %s (стари број уређаја %ld, нови број %ld, "
+"врста система датотека је %s) [реф %ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s је измењен при извршавању %s (стари број чвора %ld, нови број %ld, "
+"врста система датотека је %s) [реф %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "не могу да сазнам текући директоријум"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "непознато"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "не могу да сазнам текући директоријум"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"упозорење: навели сте опцију %s након аргумента %s који није опција, а "
+"опције не зависе од положаја (%s утиче на провере наведене пре њега као и "
+"после њега).  Наведите опције пре осталих аргумената.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"упозорење: опција -d је застарела; уместо ње користите -depth, пошто је ова "
+"друга у сагласности са POSIX-ом."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+#, fuzzy
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"подразумевана путања је текући директоријум; подразумевани израз је -print\n"
+"израз се може састојати од:\n"
+"оператора (према опадајућем првенству; -and је имплицитно када није дат неки "
+"други):\n"
+"      ( ИЗРАЗ ) ! ИЗРАЗ -not ИЗРАЗ ИЗРАЗ1 -a ИЗРАЗ2 ИЗРАЗ1 -and ИЗРАЗ2"
+
+#: find/parser.c:1230
+#, fuzzy
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"подразумевана путања је текући директоријум; подразумевани израз је -print\n"
+"израз се може састојати од:\n"
+"оператора (према опадајућем првенству; -and је имплицитно када није дат неки "
+"други):\n"
+"      ( ИЗРАЗ ) ! ИЗРАЗ -not ИЗРАЗ ИЗРАЗ1 -a ИЗРАЗ2 ИЗРАЗ1 -and ИЗРАЗ2"
+
+#: find/parser.c:1234
+#, fuzzy
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"      ИЗРАЗ1 -o ИЗРАЗ2 ИЗРАЗ1 -or ИЗРАЗ2 ИЗРАЗ1 , ИЗРАЗ2\n"
+"опције (увек тачне): -daystart -depth -follow --help\n"
+"      -maxdepth НИВОА -mindepth НИВОА -mount -noleaf --version -xdev\n"
+"провере (N може бити +N, -N или N): -amin N -anewer ДАТОТЕКА -atime N -cmin N"
+
+#: find/parser.c:1239
+#, fuzzy
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"      -cnewer ДАТОТЕКА -ctime N -empty -false -fstype ВРСТА -gid N -group "
+"ИМЕ\n"
+"      -ilname ШАБЛОН -iname ШАБЛОН -inum N -iwholename ШАБЛОН -iregex "
+"ШАБЛОН\n"
+"      -links N -lname ШАБЛОН -mmin N -mtime N -name ШАБЛОН -newer ДАТОТЕКА"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path ШАБЛОН -perm [+-]МОД -regex ШАБЛОН\n"
+"      -wholename ШАБЛОН -size N[bckwMG] -true -type [bcdpfls] -uid N\n"
+"      -used N -user ИМЕ -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Пријавите (и пратите напредак у исправљању) грешке путем стране за пријаву\n"
+"findutils грешака на http://savannah.gnu.org/ или, ако немате приступ вебу,\n"
+"слањем е-писма на <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "провера разумности функције fnmatch() библиотеке неуспешна."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: опција „%s“ захтева аргумент\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr ""
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "неисправан режим „%s“"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "неисправан нула-аргумент за -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "неисправна врста „%c“ за -size"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "неисправан аргумент „%s“ за „%s“"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "неисправан аргумент %s за %s"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr ""
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "упозорење: непознато истицање „\\%c“"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "упозорење: непозната директива форматирања „%%%c“"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr ""
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "окружење је превелико за извршење"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "не могу да сазнам текући директоријум"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr ""
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "не могу да расцепим"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "грешка при чекању %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s окончан сигналом %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "неисправан израз"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, fuzzy, c-format
+msgid "expected an expression after '%s'"
+msgstr "неочекивани допунски предикат"
+
+#: find/tree.c:161
+#, fuzzy, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "неисправан израз"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr ""
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "упс — неисправна врста израза!"
+
+#: find/tree.c:276
+#, fuzzy, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "упс — неисправна врста израза!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "путање морају претходити изразу"
+
+#: find/tree.c:1297
+#, fuzzy, c-format
+msgid "unknown predicate `%s'"
+msgstr "неисправан предикат „%s“"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "неисправан предикат „%s“"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "неисправан аргумент „%s“ за „%s“"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "недостаје аргумент за „%s“"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr ""
+
+#: find/tree.c:1412
+#, fuzzy, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "неочекивани допунски предикат"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "неочекивани допунски предикат"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "упс — неисправно подразумевано уметање „и“!"
+
+#: find/util.c:171
+#, fuzzy, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Употреба: %s [-H] [-L] [-P] [путања...] [израз]\n"
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "Употреба: %s [путања...] [израз]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "не могу да сазнам текући директоријум"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "не могу да сазнам текући директоријум"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "упозорење: непознато истицање „\\%c“"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Променљива окружења FIND_BLOCK_SIZE није подржана, једина ствар која утиче "
+"на величину блока је променљива окружења POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "наредба предугачка"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"не могу да углавим један аргумент у ограничење величине списка аргумената"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "списак аргумената предугачак"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "ГНУ findutils издање %s\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "неочекивани допунски предикат"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Употреба: %s [--version | --help]\n"
+"или       %s најчешћи_биграми < списак-датотека > locate-база\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Пријавите грешке на <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+# bug: plural-forms
+#: locate/locate.c:146
+msgid "days"
+msgstr "дана"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "неисправан аргумент %s за %s"
+
+#: locate/locate.c:468
+#, fuzzy, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"упозорење: путања locate базе „%s“ садржи водећу двотачку, што није исправно "
+"име базе"
+
+#: locate/locate.c:603
+#, fuzzy, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate база „%s“ је покварена или неисправна"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr ""
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr ""
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr ""
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, fuzzy, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "locate база „%s“ је покварена или неисправна"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr ""
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+# bug: plural-forms
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "упозорење: база „%s“ је стара више од %d %s"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "грешка при чекању %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr ""
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "окружење је превелико за извршење"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr ""
+
+# bug: plural-forms
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Ваше променљиве окружења заузимају %ld бајтова\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Горње и доње POSIX границе за дужину аргумента: %ld, %ld\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr "Горње и доње POSIX границе за дужину аргумента: %ld, %ld\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Највећа дужина наредбе коју заправо можемо користити: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Величина бафера наредби који заправо користимо: %ld\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"неупарен наводник %s; уобичајено су наводници нарочити за xargs осим ако "
+"користите опцију -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "двоструки"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "једноструки"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "ред аргумената предугачак"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "грешка при чекању на подређени процес"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: завршио са стањем 255; обустављам"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: заустављен сигналом %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: окончан сигналом %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: неисправан број за опцију -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: вредност за опцију -%c мора бити >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: вредност за опцију -%c мора бити < %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Употреба: %s [-0prtx] [-e[ниска-краја]] [-i[ниска-замене]] [-l[макс-"
+"редова]]\n"
+"       [-n макс-арг] [-s макс-знакова] [-P макс-проц] [--null] \n"
+"       [--eof[=ниска-краја]] [--replace[=ниска-замене]] \n"
+"       [--max-lines[=макс-редова]] [--interactive] [--max-chars=макс-"
+"знакова] \n"
+"       [--verbose] [--exit] [--max-procs=макс-проц] [--max-args=макс-арг] \n"
+"       [--no-run-if-empty] [--version] [--help] [command [почетни-"
+"аргументи]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "не могу да сазнам текући директоријум"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "неисправан аргумент %s за %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "неједнозначан аргумент %s за %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Допуштени аргументи су:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Непозната системска грешка"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: опција „%s“ је неједнозначна\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: опција „--%s“ не дозвољава аргумент\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: опција „%c%s“ не дозвољава аргумент\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: опција „%s“ захтева аргумент\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: непозната опција „--%s“\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: непозната опција „%c%s“\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: недозвољена опција — %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: опција захтева аргумент — %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: опција „-W %s“ је неједнозначна\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: опција „-W %s“ не дозвољава аргумент\n"
+
+#~ msgid "`"
+#~ msgstr "„"
+
+#~ msgid "'"
+#~ msgstr "“"
+
+#~ msgid "Success"
+#~ msgstr "Успех"
+
+#~ msgid "No match"
+#~ msgstr "Нема поклапања"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Неисправан регуларни израз"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Неисправни знак за ређање"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Неисправно име класе знака"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Пратећа обрнута коса црта"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Неисправно позивање"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Неупарени [ или [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Неупарени ( или \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Неупарени \\{"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Неисправан садржај \\{\\}"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Неисправан крај опсега"
+
+# исцрпљена? ;-)
+#~ msgid "Memory exhausted"
+#~ msgstr "Меморија истрошена"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Неисправан претходни регуларни израз"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "Превремен крај регуларног израза"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Регуларни израз превелик"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Неупарени ) или \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Нема претходног регуларног израза"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yYдДdD]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nNнН]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "меморија истрошена"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "неисправан аргумент „%s“ за „%s“"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "неисправан аргумент „%s“ за „%s“"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "списак аргумената предугачак"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: неисправна опција — %c\n"
+
+#~ msgid "block size"
+#~ msgstr "величина блока"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Списак предиката:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Стабло вредновања:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Оптимизовано стабло вредновања:\n"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "виртуелна меморија истрошена"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "грешка у %s: %s"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+#~ msgstr ""
+#~ "акције: -exec НАРЕДБА ; -fprint ДАТОТЕКА -fprint0 ДАТОТЕКА \n"
+#~ "        -fprintf ДАТОТЕКА ФОРМАТ -ok НАРЕДБА ; -print -print0 -printf "
+#~ "ФОРМАТ \n"
+#~ "        -prune -ls -delete -quit\n"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "упозорење: предикат -ipath је застарео; уместо њега користите -iwholename."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "ГНУ find издање %s\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "умећем %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "    врста: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "лево:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "десно:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Нормализовано стабло вредновања:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n"
+#~ "      [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Употреба: %s [-d путања | --database=путања] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n"
+#~ "      [--version] [--help] шаблон...\n"
+
+#~ msgid ""
+#~ "warning: locate database path `%s' contains a trailing colon, which is "
+#~ "not a valid database name"
+#~ msgstr ""
+#~ "упозорење: путања locate базе „%s“ садржи завршну двотачку, што није "
+#~ "исправно име базе"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "ГНУ locate издање %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "аргумент за --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "ГНУ xargs издање %s\n"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Умањујем arg_max (%ld) на arg_size (%ld)\n"
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s измењен приликом извршавања %s"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. измењен приликом извршавања %s"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "неупарени %s наводник"
diff --git a/po/stamp-po b/po/stamp-po
new file mode 100644 (file)
index 0000000..9788f70
--- /dev/null
@@ -0,0 +1 @@
+timestamp
diff --git a/po/sv.gmo b/po/sv.gmo
new file mode 100644 (file)
index 0000000..e58411e
Binary files /dev/null and b/po/sv.gmo differ
diff --git a/po/sv.po b/po/sv.po
new file mode 100644 (file)
index 0000000..4868c33
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,1602 @@
+# Swedish messages for findutils.
+# Copyright (C) 1996, 2001, 2004, 2006, 2007, 2008, 2010 Free Software
+# Foundation, Inc.
+# Johan Linde <jl@theophys.kth.se>, 1996.
+# Christian Rose <menthos@menthos.com>, 2001, 2004.
+# Daniel Nylander <po@danielnylander.se>, 2006, 2007, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.4.0\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2008-03-16 09:55+0100\n"
+"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
+"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "kan inte läsa av aktuell katalog"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Varning: filsystemet %s har nyligen avmonterats."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Varning: filsystemet %s har nyligen monterats."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s ändrades under körning av %s (gammalt enhetsnummer %ld, nytt "
+"enhetsnummer %ld, filsystemstypen är %s) [ref %ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s ändrades under körning av %s (gammalt inodsnummer %<PRIuMAX>, nytt "
+"inodsnummer %<PRIuMAX>, filsystemstyp är %s) [ref %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "misslyckades med att återgå till ursprunglig arbetskatalog"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Misslyckades med att säkert byta katalog till %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Symboliska länken %s är en del av en slinga i kataloghierarkin; vi har redan "
+"besökt katalogen till vilken den pekar."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Filsystemsslinga upptäcktes; %s har samma enhetsnummer och inod som en "
+"katalog vilken är %d nivå högre upp i filsystemshierarkin"
+msgstr[1] ""
+"Filsystemsslinga upptäcktes; %s har samma enhetsnummer och inod som en "
+"katalog vilken är %d nivåer högre upp i filsystemshierarkin"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "varning: följer inte den symboliska länken %s"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"VARNING: Antalet hårda länkar är fel för %s (såg endast st_nlink=%d men vi "
+"har redan sett %d underkataloger): detta kan vara ett fel i din "
+"filsystemdrivrutin.  Slår automatiskt på alternativet -noleaf i find.  "
+"Tidigare resultat kan har misslyckats att inkludera kataloger som skulle ha "
+"sökts igenom."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "okänd"
+
+# Osäker på %d %s
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Filsystemsslinga upptäcktes; %s är en del av samma filsystemsslinga som %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, fuzzy, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "Varning: filen %s verkar ha läget 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "kan inte söka i %s"
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "misslyckades med att återgå till ursprunglig arbetskatalog"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"Åtgärden -delete slår automatiskt på -depth, men -prune gör ingenting när -"
+"depth är aktiverat.  Om du vill fortsätta ändå kan du uttryckligen använda "
+"flaggan -depth."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"varning: du har angivit flaggan %s efter argumentet %s som inte är en "
+"flagga, men flaggor beror inte på position (%s påverkar test som är angivna "
+"före den, liksom de som är angivna efter den). Ange flaggor före andra "
+"argument.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"varning: flaggan -d är föråldrad; använd -depth istället, eftersom den "
+"senare stöds enligt POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s är inte namnet på en befintlig grupp och det ser inte ut som ett "
+"numeriskt grupp-id därför att det har det oväntade ändelsen %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s är inte namnet på en befintlig grupp"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "argumentet till -group är tomt, men bör vara ett gruppnamn"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"standardsökväg är aktuell katalog; standarduttryck är -print\n"
+"uttryck kan bestå av: operatorer, flaggor, tester och åtgärder:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operatorer (avtagande prioritetsordning; -and underförstås när inga andra\n"
+"anges):\n"
+"      ( UTTR )   ! UTTR   -not UTTR   UTTR1 -a UTTR2   UTTR1 -and UTTR2\n"
+"      UTTR1 -o UTTR2   UTTR1 -or UTTR2   UTTR1 , UTTR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"positionsberoende flaggor (alltid sanna): -daystart -follow -regextype\n"
+"\n"
+"normala flaggor (alltid sanna, anges före andra uttryck):\n"
+"      -depth --help -maxdepth NIVÅER -mindepth NIVÅER -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"tests (N kan vara +N, -N eller N): -amin N -anewer FIL -atime N -cmin N\n"
+"      -cnewer FIL -ctime N -empty -false -fstype TYP -gid N -group NAMN\n"
+"      -ilname MÖNSTER -iname MÖNSTER -inum N -iwholename MÖNSTER -iregex "
+"MÖNSTER\n"
+"      -links N -lname MÖNSTER -mmin N -mtime N -name MÖNSTER -newer FIL"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path MÖNSTER -perm [+-]LÄGE -regex MÖNSTER\n"
+"      -readable -writable -executable\n"
+"      -wholename MÖNSTER -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAMN -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"åtgärder: -delete -print0 -printf FORMAT -fprintf FIL FORMAT -print \n"
+"      -fprint0 FIL -fprint FIL -ls -fls FIL -prune -quit\n"
+"      -exec KOMMANDO ; -exec KOMMANDO {} + -ok KOMMANDO ;\n"
+"      -execdir KOMMANDO ; -execdir KOMMANDO {} + -okdir KOMMANDO ;\n"
+
+# Lade till att man bör skriva felrapporten på engelska.
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Rapportera (och följ rättningen av) fel genom felrapporteringssidan för\n"
+"findutils på http://savannah.gnu.org/ eller, om du inte har tillgång till\n"
+"webben, genom att skicka e-post till <bug-findutils@gnu.org>. Skriv\n"
+"felrapporter på engelska om möjligt.\n"
+"Skicka synpunkter på översättningen till tp-sv@listor.tp-sv.se."
+
+# Osäker... hur översätta "sanity check"?
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "funktionskontroll av biblioteksfunktionen fnmatch() misslyckades."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"varning: Unix-filnamn innehåller normalt sett inte snedstreck (även om "
+"sökvägar gör det).  Det betyder att \"%s %s\" antagligen kommer alltid att "
+"bli falsk på detta system.  Du kanske tycker testet \"-wholename\" är "
+"användbart, eller kanske \"-samefile\".  Alternativt, om du använder GNU "
+"grep, kunde du använda \"'find ... -print0 | grep -FzZ %s\"."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "Förväntade ett positivt decimalt heltalsargument till %s, men fick %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+"Det här systemet tillhandahåller inte ett sätt att hitta födelsetiden för en "
+"fil."
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: flaggan \"%s\" kräver ett argument\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+"Jag kan inte lista ut om jag ska tolka %s som ett datum eller klockslag"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Kan inte läsa av födelsetid för filen %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Läget %s är inte giltigt när POSIXLY_CORRECT är påslaget."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "ogiltigt läge %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"varning: du måste ange ett lägesmönster %s (som är likvärdigt med /000). "
+"Betydelsen av -perm /000 kommer har nu ändrats för att överensstämma med -"
+"perm 000; alltså, det brukade inte matcha några fil men nu matchar det alla "
+"filer."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "tomt argument till -size ogiltigt"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "ogiltig typ \"%c\" för -size"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Ogiltigt argument \"%s%c\" till -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Flaggan -show-control-chars tar ett argument som måste vara \"literal\" "
+"eller \"safe\""
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Ogiltigt argument %s till -used"
+
+#: find/parser.c:2671
+#, fuzzy, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s är inte namnet på en befintlig grupp"
+
+#: find/parser.c:2678
+#, fuzzy, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Argumentet för flaggan --max-database-age får inte vara tom"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Aktiverade funktioner: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Argument till -type bör endast innehålla en bokstav"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Okänt argument till -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "varning: okänd kontrollsekvens \"\\%c\""
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "fel: %s på slutet av formatsträng"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "varning: okänt formatdirektiv \"%%%c\""
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "fel: formatdirektivet \"%%%c\" är reserverat för framtida användning"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Den aktuella katalogen är inkluderad i miljövariabeln PATH, vilket är "
+"osäkert i kombination med åtgärden %s för find. Ta bort aktuell katalog från "
+"din $PATH (alltså, ta bort \".\", inledande eller avslutande kolon)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Relativa sökvägen %s är inkluderad i miljövariabeln PATH, vilket är osäkert "
+"i kombination med åtgärden %s för find.  Ta bort den posten från $PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Du kan inte använda {} inom verktygsnamnet för -execdir och -okdir, på grund "
+"av att det innebär en möjlig säkerhetsrisk."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Endast en instans av {} stöds med -exec%s ... +"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Miljön är för stor för exec()."
+
+#: find/parser.c:3603
+#, fuzzy, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "aritmiskt överflöde vid försök att beräkna dagens slut"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "aritmiskt överflöde vid försök att beräkna dagens slut"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standard fel"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standard ut"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "kan inte ta bort %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "misslyckades med att återgå till ursprunglig arbetskatalog"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Varning: kan inte bestämma födelsetiden för filen %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Kan inte stänga standard in"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Misslyckades med att byta katalog"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "kan inte grena"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "fel vid väntande på %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s avslutades av signal %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "ogiltigt uttryck"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"ogiltigt uttryck; du har använt en binäroperator \"%s\" utan någonting före "
+"den."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "förväntade ett uttryck mellan \"%s\" och \")\""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "förväntade ett uttryck efter \"%s\""
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "ogiltigt uttryck; du har för många \")\""
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"ogiltigt uttryck; förväntade att hitta ett \")\"-tecken men kunde inte se "
+"ett.  Kanske behöver du ett extra predikat efter \"%s\""
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "ogiltigt uttryck; tomma paranteser tillåts inte."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr ""
+"ogiltigt uttryck; Jag förväntade mig att hitta ett \")\"-tecken någonstans "
+"men kunde inte se ett."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "hoppsan -- ogiltig uttryckstyp!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "hoppsan -- ogiltig uttryckstyp (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "sökvägar måste komma före uttryck: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "okänt predikat \"%s\""
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "ogiltigt predikat \"%s\""
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "ogiltigt argument \"%s\" till \"%s\""
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "argument till \"%s\" saknas"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "du har för många \")\""
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "oväntat extra predikat \"%s\""
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "oväntat extra predikat"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "hoppsan -- ogiltig standardinsättning av \"and\"!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Användning: %s [-H] [-L] [-P] [-Onivå] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [sökväg...] [uttryck]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "kunde inte spara aktuell arbetskatalog"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "kunde inte spara aktuell arbetskatalog"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Ignorerar okänd felsökningsflagga %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Tomt argument till flaggan -D."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Flaggan -O måste omedelbart efterföljas av ett decimalt heltal"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Ange ett decimaltal omedelbart efter -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Ogiltig optimeringsnivå %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Optimeringsnivån %lu är för hög.  Om du mycket snabbt vill hitta filer bör "
+"du överväga att använda GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Miljövariabeln FIND_BLOCK_SIZE stöds inte, det enda som påverkar "
+"blockstorleken är miljövariabeln POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "kommandot är för långt"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+"får inte plats med ett ensamt argument inom gränsen för argumentlistans "
+"storlek"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "argumentlistan är för lång"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Byggd med GNU gnulib version %s\n"
+
+#: lib/safe-atoi.c:76
+#, fuzzy, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "oväntat filslut i %s"
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "förväntade ett uttryck efter \"%s\""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Okänd reguljärt uttryckstyp %s; giltiga typer är %s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Användning: %s [--version | --help]\n"
+"eller       %s vanligaste_bigram < fillista > locate-databas\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Rapportera fel till <bug-findutils@gnu.org>\n"
+"och synpunkter på översättningen till <tp-sv@listor.tp-sv.se>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "skrivfel"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "Användning: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Du måste ange en säkerhetsnivå som ett decimalt heltal."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Säkerhetsnivån %s är utanför konverteringsintervallet."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Säkerhetsnivån %s har oväntade suffixet %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "slocates säkerhetsnivå %ld stöds inte."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Misslyckades med att skriva till standard ut"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "dagar"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Argumentet för flaggan --max-database-age får inte vara tom"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Ogiltigt argument %s för flaggan --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"locate-databasen %s innehåller ett filnamn som är längre än vad locate kan "
+"hantera"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate-databasen %s är skadad eller ogiltig"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Storlek på locate-databasen: %s byte\n"
+msgstr[1] "Storlek på locate-databasen: %s byte\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Matchande filnamn: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Alla filnamn: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Filnamnen har en kumulativ längd på %s byte.\n"
+"Av dessa filnamn innehåller\n"
+"\n"
+"\t%s tomrum, \n"
+"\t%s nyradstecken och \n"
+"\t%s tecken med den höga biten satt.\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Några filnamn kan har filtrerats bort, så vi kan inte beräkna "
+"komprimeringsförhållandet.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Komprimeringsförhållande %4.2f% % (högre är bättre)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Komprimeringsförhållandet är odefinierat\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"locate-databasen %s ser ut som en slocate-databas men den verkar har "
+"säkerhetsnivån %c, som GNU findutils för närvarande inte har stöd för"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s är en slocate-databas.  Stödet för dessa är nytt så förvänta dig problem "
+"för tillfället."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s är en slocate-databas med säkerhetsnivån %d som inte stöds; hoppar över "
+"den."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Du angav flaggan -E men den flaggan kan inte användas med databaser med "
+"slocate-format med en säkerhetsnivå högre än 0.  Inga resultat kommer att "
+"genereras för den här databasen.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s är en slocate-databas.  Slår på flaggan \"-e\"."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "locate-databasen %s med gammalt format är för kort för att vara giltig"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Databasen %s är i formatet %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Databasen har ordkodning för little-endian-maskiner.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Databasen har ordkodning för big-endian-maskiner.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Ordningen för databasens maskinordskodning är inte självklar.\n"
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Användning: %s [-d path | --database=sökväg] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYP]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      mönster...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "misslyckades med att släppa grupprättigheter"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "misslyckades med att släppa setuid-rättigheter"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Misslyckades med att fullständigt släppa rättigheter"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "misslyckades med att släppa setgid-rättigheter"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr "varning: locate-databasen kan endast läsas en gång från standard in."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "tidsystemsanrop misslyckades"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"varning: databasen %s är mer än %d %s gammal (faktisk ålder är %.1f %s)"
+
+#: locate/word_io.c:96
+#, fuzzy, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr "Varning: locate-databasen %s byggdes med en annan byteordning"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "oväntat filslut i %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "fel vid läsning av ett ord från %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen; teckenvärden "
+"får inte överstiga %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen; teckenvärden "
+"får inte överstiga %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen; "
+"efterföljande tecknen %s är okända."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Ogiltig inmatningsavskiljarspecifikation %s: avskiljaren måste vara antingen "
+"ett enstaka tecken eller en specialsekvens som börjar med \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "miljön är för stor för exec"
+
+#: xargs/xargs.c:561
+#, fuzzy, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr "Varning: värdet %ld för flaggan -s är för stort, använder %ld istället"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Kan inte öppna inmatningsfilen %s"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Dina miljövariabler tar upp %lu byte\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Övre POSIX-gräns för argumentlängd (det här systemet): %lu\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Minsta tillåtna övre POSIX-gräns för argumentlängd (alla system): %lu\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Maximal längd på kommando som vi faktiskt kan använda: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Storlek på kommandobufferten som vi faktiskt använder: %lu\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Körningen av xargs kommer att fortsätta nu och den kommer att försöka läsa "
+"dess inmatning och köra kommandon; om det här inte är vad du ville skulle "
+"hända kan du trycka på tangentkombinationen för filslut.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Varning: %s kommer att köras minst en gång.  Om du inte vill att det här ska "
+"hända kan du trycka på tangentkombinationen för avbrott.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"citattecknet %s är oavslutat; som standard är citattecken speciella för "
+"xargs såvida du inte använder flaggan -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "dubbelt"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "enkelt"
+
+#: xargs/xargs.c:936
+#, fuzzy, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"Varning: ett NUL-tecken förekommer i inmatningen.  Det kan inte skickas "
+"vidare i argumentlistan.  Tänkte du använda flaggan --null?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "argumentraden är för lång"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "fel vid väntande på barnprocess"
+
+#: xargs/xargs.c:1362
+#, fuzzy, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "Varning: Förlorade kontrollen över %d barnprocesser"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: avslutades med status 255; avbryter"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: stoppades av signal %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: avslutades av signal %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: ogiltigt tal för flaggan -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: värdet på flaggan -%c ska vara >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: värdet på flaggan -%c ska vara < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Användning: %s [-0prtx] [--interactive] [--null] [-d|--"
+"delimiter=avgränsare]\n"
+"       [-E filslutssträng] [-e[filslutssträng]]  [--eof[=filslutssträng]]\n"
+"       [-L max-rader] [-l[max-rader]] [--max-lines[=max-rader]]\n"
+"       [-I ersättningsträng] [-i[ersättningsträng]] [--replace"
+"[=ersättningsträng]]\n"
+"       [-n max-argument] [--max-args=max-argument]\n"
+"       [-s max-tecken] [--max-chars=max-tecken]\n"
+"       [-P max-processer]  [--max-procs=max-processer] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fil]\n"
+"       [--version] [--help] [kommando [initiala-argument]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "kan inte få tag i aktuell katalog"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "ogiltigt argument %s för %s"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "tvetydigt argument %s för %s"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Giltiga argument är:"
+
+#~ msgid "error closing file"
+#~ msgstr "fel vid stängning av fil"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Okänt systemfel"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: flaggan \"%s\" är tvetydig\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: flaggan \"--%s\" tar inget argument\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: flaggan \"%c%s\" tar inget argument\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: flaggan \"%s\" kräver ett argument\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: okänd flagga \"--%s\"\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: okänd flagga \"%c%s\"\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: ogiltig flagga -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: flaggan kräver ett argument -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: flaggan \"-W %s\" är tvetydig\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: flaggan \"-W %s\" tillåter inget argument\n"
+
+#~ msgid "`"
+#~ msgstr "\""
+
+#~ msgid "'"
+#~ msgstr "\""
+
+#~ msgid "Success"
+#~ msgstr "Lyckades"
+
+#~ msgid "No match"
+#~ msgstr "Ingen träff"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "Ogiltigt reguljärt uttryck"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "Ogiltigt sorteringstecken"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "Ogiltigt namn på teckenklass"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "Eftersläpande omvänt snedstreck"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "Ogiltig bakåtreferens"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "Omatchat [ eller [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "Omatchat ( eller \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "Omatchat \\{"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "Ogiltigt innehåll i \\{\\}"
+
+#~ msgid "Invalid range end"
+#~ msgstr "Ogiltigt slut på intervall"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "Minnet slut"
+
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "Ogiltigt föregående reguljärt uttryck"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "För tidigt slut på reguljärt uttryck"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "Reguljärt uttryck är för stort"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "Omaka ) eller \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "Inget föregående reguljärt uttryck"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[jJyY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "minnet slut"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "ogiltigt %s%s-argument \"%s\""
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "ogiltigt suffix i %s%s-argument \"%s\""
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "%s%s-argumentet \"%s\" är för stort"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: otillåten flagga -- %c\n"
+
+#~ msgid "level higher in the file system hierarchy"
+#~ msgstr "nivå högre i filsystemshierarkin"
+
+#~ msgid "levels higher in the file system hierarchy"
+#~ msgstr "nivåer högre i filsystemshierarkin"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "med en sammanlagd längd på %s byte"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\tav vilken %s innehåller blanksteg, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s innehåller nyradstecken, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\toch %s innehåller tecken med den höga biten satt.\n"
+
+#~ msgid "block size"
+#~ msgstr "blockstorlek"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "varning: predikatet -ipath är föråldrat; använd -iwholename istället."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find version %s\n"
+
+#~ msgid "GNU findutils version %s\n"
+#~ msgstr "GNU findutils version %s\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate version %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "argument till --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs version %s\n"
+
+#~ msgid "oops -- invalid expression type in mark_stat!"
+#~ msgstr "hoppsan -- ogiltig uttryckstyp i mark_stat!"
+
+#~ msgid "oops -- invalid expression type in mark_type!"
+#~ msgstr "hoppsan -- ogiltig uttryckstyp i mark_type!"
+
+#~ msgid "old"
+#~ msgstr "gammalt"
+
+#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n"
+#~ msgstr "Reducerar arg_max (%ld) till arg_size (%ld)\n"
+
+#~ msgid "Predicate List:\n"
+#~ msgstr "Predikatlista:\n"
+
+#~ msgid "Eval Tree:\n"
+#~ msgstr "Evalueringsträd:\n"
+
+#~ msgid "Optimized Eval Tree:\n"
+#~ msgstr "Optimerat evalueringsträd:\n"
+
+#~ msgid "virtual memory exhausted"
+#~ msgstr "virtuellt minne slut"
+
+#~ msgid "error in %s: %s"
+#~ msgstr "fel i %s: %s"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+#~ msgstr ""
+#~ "Ã¥tgärder: -exec KOMMANDO ; -fprint FIL -fprint0 FIL -fprintf FIL "
+#~ "FORMAT\n"
+#~ "      -fls FIL -ok KOMMANDO ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit\n"
+
+#~ msgid "inserting %s\n"
+#~ msgstr "infogar %s\n"
+
+#~ msgid "    type: %s    %s  "
+#~ msgstr "     typ: %s    %s  "
+
+#~ msgid "left:\n"
+#~ msgstr "vänster:\n"
+
+#~ msgid "right:\n"
+#~ msgstr "höger:\n"
+
+#~ msgid "Normalized Eval Tree:\n"
+#~ msgstr "Normaliserat evalueringsträd:\n"
+
+#~ msgid ""
+#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n"
+#~ "      [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n"
+#~ "      [--version] [--help] pattern...\n"
+#~ msgstr ""
+#~ "Användning: %s [-d sökväg] [--database=sökväg] [-e | --existing]\n"
+#~ "           [-i | --ignore-case] [--wholepath] [--basename]\n"
+#~ "           [--limit=N | -l N] [--version] [--help] mönster...\n"
+
+#~ msgid ""
+#~ "warning: locate database path `%s' contains a trailing colon, which is "
+#~ "not a valid database name"
+#~ msgstr ""
+#~ "varning: sökvägen \"%s\" till locate-databasen innehÃ¥ller ett efterslÃ"
+#~ "¤pande kolon, vilket inte Ã¤r ett giltigt databasnamn"
+
+#~ msgid ""
+#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+#~ "      -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit"
+#~ msgstr ""
+#~ "Ã¥tgärder: -exec KOMMANDO ; -fprint FIL -fprint0 FIL -fprintf FIL "
+#~ "FORMAT\n"
+#~ "      -fls FIL -ok KOMMANDO ; -print -print0 -printf FORMAT -prune -ls -"
+#~ "delete\n"
+#~ "      -quit"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to <bug-findutils@gnu.org>."
+#~ msgstr ""
+#~ "\n"
+#~ "Rapportera fel till <bug-findutils@gnu.org>\n"
+#~ "och synpunkter pÃ¥ Ã¶versättningen till <sv@li.org>."
+
+#~ msgid "Report bugs to <bug-findutils@gnu.org>."
+#~ msgstr ""
+#~ "Rapportera fel till <bug-findutils@gnu.org>\n"
+#~ "och synpunkter pÃ¥ Ã¶versättningen till <sv@li.org>."
+
+#~ msgid "%s changed during execution of %s"
+#~ msgstr "%s Ã¤ndrad under körning av %s"
+
+#~ msgid "%s/.. changed during execution of %s"
+#~ msgstr "%s/.. Ã¤ndrad under körning av %s"
+
+#~ msgid "unmatched %s quote"
+#~ msgstr "omaka %s citattecken"
+
+#~ msgid "invalid argument %s for \"%s\""
+#~ msgstr "ogiltigt argument %s för \"%s\""
+
+#~ msgid "ambiguous argument %s for \"%s\""
+#~ msgstr "tvetydigt argument %s för \"%s\""
diff --git a/po/tr.gmo b/po/tr.gmo
new file mode 100644 (file)
index 0000000..7c6b18b
Binary files /dev/null and b/po/tr.gmo differ
diff --git a/po/tr.po b/po/tr.po
new file mode 100644 (file)
index 0000000..56b87b1
--- /dev/null
+++ b/po/tr.po
@@ -0,0 +1,1430 @@
+# Turkish translations for findutils messages.
+# Copyright (C) 2007, 2010 Free Software Foundation, Inc.
+#
+# Nilgün Belma Bugüner <nilgun@buguner.name.tr>, 2001,...,2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.3.8\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2007-07-09 11:01+0300\n"
+"Last-Translator: Nilgün Belma Bugüner <nilgun@buguner.name.tr>\n"
+"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
+"Language: tr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "çalışılan dizin durumlanamadı"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Uyarı: %s dosya sistemi zaten ayrılmıştı."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Uyarı: %s dosya sistemi zaten bağlanmıştı."
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s, %s yürütülürken değişti (eski aygıt numarası: %ld, yeni aygıt "
+"numarası: %ld, dosya sistemi türü: %s) [ref %ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s, %s yürütülürken değişti (eski dosya indisi: %ld, yeni dosya indisi: "
+"%ld, dosya sistemi türü: %s) [ref %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "Dizin değiştirilemedi"
+
+#: find/find.c:980
+#, fuzzy, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Dizin değiştirilemedi"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"%s sembolik bağı dizin hiyerarşisinde bir döngünün parçası ve gösterdiği "
+"dizini zaten ziyaret etmiştik."
+
+#: find/find.c:1097
+#, fuzzy, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Dosya sisteminde döngü saptandı; %s, bir dizin gibi %d %s olarak aynı aygıt "
+"ve düğüm numarasına sahip."
+msgstr[1] ""
+"Dosya sisteminde döngü saptandı; %s, bir dizin gibi %d %s olarak aynı aygıt "
+"ve düğüm numarasına sahip."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "uyarı: %s sembolik bağı izlenemiyor"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"UYARI: Sabit bağ sayısı %s için hatalı (st_nlink=%d ve biz zaten %d "
+"altdizine baktık): bu dosya sistemi sürücünüzle ilgili bir yazılım hatası "
+"olabilir. Find'in -noleaf seçeneği etkinleştiriliyor. Önceki sonuçlar "
+"evvelce araştırılan dizinleri de içererek başarısız olmuş olabilir."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "bilinmeyen"
+
+#: find/ftsfind.c:259
+#, fuzzy, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Dosya sisteminde döngü saptandı; %s, bir dizin gibi %d %s olarak aynı aygıt "
+"ve düğüm numarasına sahip."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, fuzzy, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "Uyarı: %s dosyasının kipi 0000 olarak görünüyor"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "Dizin değiştirilemedi"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"uyarı: %s seçeneğini bir seçeneğin argümanı olmayan %s argümanından sonra "
+"belirttiniz, ama seçenekler konuma bağlı değil ( %s kendinden önce de sonra "
+"da belirtilse sınamaları etkiler). Lütfen seçenekleri diğer argümanlardan "
+"önce belirtin.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"uyarı: -d seçeneği artık önerilmiyor; lütfen yerine POSIX uyumlu olan -depth "
+"seçeneğini kullanın."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s mevcut bir grubun ismi değil ve bir sayısal grup kimliği gibi de "
+"görünmüyor, çünkü beklenmedik bir %s sonekine sahip"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s mevcut bir grubun ismi değil"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "-group için argüman boş, ama bir grup ismi olmalı"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"öntanımlı dosya yolu çalışılan dizindir; öntanımlı ifade ise -print\n"
+"ifade şundan ibaret olabilir:\n"
+"operatörler, seçenekler, sınamalar ve eylemler:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"operatörler (önceliği azaltan; -and başka bir şey verilmediğinden "
+"örtüktür):\n"
+"      ( İFADE )     ! İFADE     -not İFADE      İFADE1 -a İFADE2\n"
+"      İFADE1 -and İFADE2     İFADE1 -o İFADE2     İFADE1 -or İFADE2\n"
+"      İFADE1 , İFADE2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"konumsal seçenekler (daima `true'):  -daystart -follow -regextype\n"
+"normal  seçenekler (daima `true', diğer ifadelerden önce belirtilirler):\n"
+"      -depth --help -maxdepth DÜZEYLER -mindepth DÜZEYLER -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"sınamalar (N, +N veya -N ya da N olabilir):       -amin N -anewer DOSYA -"
+"atime N -cmin N -cnewer DOSYA -ctime N -empty\n"
+"      -false -fstype TÜR -gid N -group İSİM -ilname KALIP -iname KALIP\n"
+"      -inum N --iwholename KALIP -iregex KALIP -links N -lname KALIP -mmin "
+"N\n"
+"      -mtime N -name KALIP -newer DOSYA"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path KALIP -perm [+-]KİP -regex KALIP\n"
+"      -readable -writable -executable\n"
+"      -wholename KALIP -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user İSİM -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"eylemler: -delete -print0 -printf BİÇİM -fprintf DOSYA BİÇİM -print \n"
+"      -fprint0 DOSYA -fprint DOSYA -ls -fls DOSYA -prune -quit\n"
+"      -exec KOMUT ; -exec KOMUT {} + -ok KOMUT ;\n"
+"      -execdir KOMUT ; -execdir KOMUT {} + -okdir KOMUT ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Yazılım hatalarını http://savannah.gnu.org/ adresindeki hata raporlama\n"
+"sayfasından ya da eğer http erişiminiz yoksa <bug-findutils@gnu.org>\n"
+"adresine raporlayınız.\n"
+"Çeviri hatalarını ise <gnu-tr@belgeler.org> adresine bildiriniz."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "fnmatch() kütüphane işlevinin tutarlılık sınaması başarısız oldu."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"Uyarı: Unix dosya isimleri genellikle / içermezler (dosya yolları içerir).  "
+"Bu, '%s %s' ifadesinin bu sistemde her zaman yanlış olarak sonuçlanacağı "
+"anlamına gelir.  '-wholename' veya '-samefile' sınamalarını daha kullanışlı "
+"bulabilirsiniz.  Ayrıca, eğer GNU grep kullanıyorsanız, 'find ... -print0 | "
+"grep -FzZ %s' kullanabilirdiniz."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "%s için bir pozitif onluk tamsayı argüman umuluyordu, fakat %s alındı"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "Bu sistem dosyanın doğum tarihini bulmak için bir yöntem sağlamıyor."
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: `%s' seçeneği bir argümanla kullanılır\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "%s nasıl tarih ve saat olarak yorumlanacak, bilinmiyor"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "%s için doğum tarihi saptanamadı"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "geçersiz kip %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"uyarı: %s ile /000'a eşdeğer bir kip şablonu belirttiniz. -perm /000 kalıcı "
+"olarak  -perm -000 ile değiştirilmiş olacaktır; yani, hiçbir dosya ile "
+"eşleşmemek üzere kullanılmıştı, artık bütün dosyalarla eşleşecek."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "-size için boş (null) argüman geçersiz"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "-size türü `%c' geçersiz"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "-size için argüman olarak `%s%c' geçersiz"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"-show-control-chars seçeneği ya 'literal' ya da 'safe' olması gereken tek "
+"bir argüman alır"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "-used için argüman olarak %s geçersiz"
+
+#: find/parser.c:2671
+#, fuzzy, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s mevcut bir grubun ismi değil"
+
+#: find/parser.c:2678
+#, fuzzy, c-format
+msgid "The argument to -user should not be empty"
+msgstr "-type için argümanlar tek bir harf içermemeli"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Etkin özellikler:"
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "-type için argümanlar tek bir harf içermemeli"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "-type için bilinmeyen argüman: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "uyarı: tanınmayan öncelem `\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "hata: biçim dizgesi sonunda %s"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "uyarı: tanınmayan biçem yönergesi `%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+"hata: biçem yönergesi `%%%c' gelecekte kullanmak üzere yedeğe ayrılmıştır"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Çalışma dizini PATH ortam değişkeninde bulunuyor ve find'in %s eylemi ile "
+"birlikte güvensiz oluyor. Lütfen bu dizini PATH ortam değişkeninizden "
+"kaldırın (yani, \".\" ile bunun önündeki ve ardındaki iki nokta üstüste "
+"işaretlerini kaldırın)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"%s göreli yolu PATH ortam değişkeninde bulunuyor ve find'in %s eylemi ile "
+"birlikte güvensiz oluyor. Lütfen bu girdiyi $PATH ortam değişkeninizden "
+"kaldırın"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"-execdir ve -okdir seçeneklerinde uygulama ismi içinde {} kullanmamalısınız, "
+"çünkü bu potensiyel bir güvenlik açığıdır."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "-exec%s ... + ile sadece bir {} desteklenmektedir"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "exec() için ortam çok geniş."
+
+#: find/parser.c:3603
+#, fuzzy, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "bugünün sonu bulunmaya çalışılırken aritmetiksel üstten taşma oluştu"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "bugünün sonu bulunmaya çalışılırken aritmetiksel üstten taşma oluştu"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "standart hata"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "standart çıktı"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "Dizin değiştirilemedi"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Uyarı: %s dosyasının doğum günü saptanamadı"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Standart girdi kapatılamıyor"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Dizin değiştirilemedi"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "ayrılamaz"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "%s beklenirken hata oluştu"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s, %d sinyali ile sonlandırıldı"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "ifade geçersiz"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"geçersiz ifade; öncesinde başka hiçbirşey olmaksızın  bir iki terimli '%s' "
+"işleci kullanmalısınız"
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "'%s' ile ')' arasında bir ifade umuluyordu"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "'%s' sonrasında bir ifade umuluyordu"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "geçersiz ifade; çok fazla ')' var"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"geçersiz ifade; bir ')' umuluyordu ama yok. Belki de '%s' sonrasında ek bir "
+"dayanağa ihtiyacınız var"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "geçersiz ifade; boş parantezlere izin yok"
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "geçersiz ifade; bir ')' olmalıydı ama hiç yok."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "hooop -- geçersiz ifade türü!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "hooop -- geçersiz ifade türü (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "dosya yolları ifadeyi öncelemelidir: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "geçersiz yüklem `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "geçersiz dayanak `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "`%s' argümanı `%s'de geçersiz"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "`%s'de argüman eksik"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "çok fazla ')' var"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "umulmayan ek dayanak '%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "umulmayan ek dayanak"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "Hoop -- öntanımlı `and' yerleştirme geçersiz!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Kullanımı: %s [-H] [-L] [-P] [-Oseviye] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [dosyaYolu...] [ifade]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "çalışılan dizin alınamadı"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "çalışılan dizin alınamadı"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Tanınmayan hata ayıklama seçeneği %s yoksayılıyor"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "-D seçeneğine boş argüman."
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "-O seçeneği ile bir ondalık tamsayı verilmelidir"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "-O'nun ardına lütfen bir ondalık sayı yazın"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "En iyileme seviyesi %s geçersiz"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"En iyileme seviyesi %lu çok büyük. Dosyaları çabucak bulmak istiyorsanız, "
+"GNU locate kullanmayı düşünebilirsiniz"
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"FIND_BLOCK_SIZE ortam değişkeni destekenmiyor, blok boyunu etkileyen tek şey "
+"POSIXLY_CORRECT ortam değişkenidir"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr ""
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+
+#: lib/buildcmd.c:387
+#, fuzzy, c-format
+msgid "argument list too long"
+msgstr "argüman satırı çok uzun"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU gnulib sürüm %s kullanarak derlenmiş\n"
+
+#: lib/safe-atoi.c:76
+#, fuzzy, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "umulmayan ek dayanak '%s'"
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "'%s' sonrasında bir ifade umuluyordu"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Kullanımı: %s [--version | --help]\n"
+"veya       %s most_common_bigrams < dosya-listesi > konum-veritabanı\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Yazılım hatalarını <bug-findutils@gnu.org> adresine bildiriniz.\n"
+"Çeviri hatalarını ise <gnu-tr@belgeler.org> adresine bildirin.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "yazma hatası"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, fuzzy, c-format
+msgid "Failed to write to standard output"
+msgstr "standart çıktı"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "gün"
+
+#: locate/locate.c:193
+#, fuzzy, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "--max-database-age seçeneğinin argümanı boş olmamalı"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "--max-database-age seçeneği için %s argümanı geçersiz"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"locate veritabanı %s locate'in artık çalışmadığı bir dosya türünün ismini "
+"içeriyor"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate veritabanı %s ya bozuk ya da geçersiz"
+
+#: locate/locate.c:893
+#, fuzzy, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Locate veritabanı boyu: %s bayt\n"
+msgstr[1] "Locate veritabanı boyu: %s bayt\n"
+
+#: locate/locate.c:900
+#, fuzzy, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Eşleşen Dosya isimleri: %s "
+
+#: locate/locate.c:901
+#, fuzzy, c-format
+msgid "All Filenames: %s\n"
+msgstr "Tüm Dosya isimleri: %s "
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Bazı dosyalar süzülüp atılmış olabilir, bu nedenle sıkıştırma oranını "
+"hesaplayamayız.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Sıkıştırma oranı %%%4.2f (daha yükseği daha iyidir)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Sıkıştırma oranı tanımlanmamış\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"locate veritabanı %s bir slocate veritabanı gibi görünüyor ama GNU findutils "
+"tarafından desteklenmeyen %c güvenlik seviyesine de sahipmiş gibi görünüyor"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s bir slocate veritabanıdır.  Henüz yeni yeni desteklenmektedir, şu an "
+"sorunları olabilir."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s desteklenmeyen %d güvenlik seviyeli bir slocate veritabanıdır; atlanıyor"
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"-E seçeneğini belirttiniz ama bu seçenek sıfırdan farklı güvenlik seviyeli "
+"slocate biçimli veritabanları ile kullanılmamalıdır. Bu veritabanı için "
+"hiçbir sonuç üretilmeyecek.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s bir slocate veritabanıdır.  '-e' seçeneği etkin kılınıyor."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "eski biçim locate veritabanı %s geçerli olmak için çok kısa"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "%s veritabanı %s biçiminde.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Veritabanı kıymetsiz baytın başta olduğu bayt sıralamasına sahip\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Veritabanı kıymetli baytın başta olduğu bayt sıralamasına sahip\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Veritabanın bayt sıralamasının ne olduğu belli değil.\n"
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Kullanımı: %s [-d DosyaYolu | --database=DosyaYolu]\n"
+"       [-e | | -E | --[non-]existing] [-i | --ignore-case] [-w | --"
+"wholename]\n"
+"       [-b | --basename] [--limit=N | -l N] [-S | --statistics] [-0 | --"
+"null]\n"
+"       [-c | --count]  [-P | -H | --nofollow]  [-L | --follow] [-m | --"
+"mmap ]\n"
+"       [ -s | --stdio ] [-A | --all] [-p | --print] [-r | --regex ]\n"
+"       [--regextype=TÜR] [--max-database-age D] [--version] [--help]\n"
+"       KALIP...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "grup izinleri kaldırılamadı"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "setuid izinleri kaldırılamadı"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "İzinler tamamen kaldırılamadı"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "setgid izinleri kaldırılamadı"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr "Uyarı: locate veritabanı standart girdiden sadece bir kere okunabilir"
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "uyarı: %s veritabanı %d den %s daha eski (aslında %.1f %s yaşında)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, fuzzy, c-format
+msgid "unexpected EOF in %s"
+msgstr "umulmayan ek dayanak '%s'"
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "%s beklenirken hata oluştu"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz; karakter "
+"değerleri %lx değerini aşmamalı."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz; karakter "
+"değerleri %lo değerini aşmamalı."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz; ardındaki %s "
+"karakterleri tanınmıyor."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Girdi sınırlayıcı belirtimi %s geçersiz: sınırlanan şey ya tek bir karakter "
+"ya da \\ ile öncelenmiş bir dizge olmalı."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "icra edilebilir olarak ortam çok geniş"
+
+#: xargs/xargs.c:561
+#, fuzzy, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr "uyarı: %ld değeri -s seçeneği için çok büyük, yerine %ld kullanılıyor"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Girdi dosyası %s açılamıyor"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Ortam değişkenleriniz %lu bayt tutuyor\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Argüman uzunluğunun POSIX üst sınırı (bu sistem): %lu\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Argüman uzunluğu için izin verilen en küçük POSIX üst sınırı (tüm sistemler: "
+"%lu\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Kullanabileceğimiz asgari komut uzunluğu: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Kullanmakta olduğumuz komut tamponunun boyu: %lu\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"xargs şimdi çalışmaya devam edecek ve girdisini okumayı ve komutları "
+"çalıştırmayı deneyecek; eğer istediğiniz bu değilse lütfen dosyasonu "
+"tuşlayınız.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Uyarı: %s en azından bir kere çalışacak. İstediğiniz bu değilse kesme "
+"tuşlarına basınız.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"%s karşılığı ile eşleşmiyor; -0 seçeneği ile belirtilmedikçe öntanımlı "
+"olarak sarmalayıcı karakterler xarg'lara özeldir"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "çift"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "tek"
+
+#: xargs/xargs.c:936
+#, fuzzy, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"Uyarı: girdide bir NUL karakter algılandı. Argüman listesi üzerinden "
+"aktarılamaz. --null seçeneğini kullanmayı düşündünüz mü?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "argüman satırı çok uzun"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "ast süreç beklenirken hata oluştu"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: durum 255 ile çıkıldı; bırakılıyor"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: %d sinyali ile durduruldu"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: %d sinyali ile sonlandırıldı"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: -%c seçeneği için geçersiz sayı\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: -%c seçeneği için değer >= %ld olmalı\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: -%c seçeneği için değer < %ld olmalı\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Kullanımı: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=ayraç]\n"
+"       [-E eof-dizgesi] -e[eof-dizgesi]]  [--eof[=eof-dizgesi]]\n"
+"       [-L azami-satır-sayısı] [-l[azami-satır-sayısı]]\n"
+"       [--max-lines[=azami-satır-sayısı]] [-I değiştirme-dizgesi]\n"
+"       [-i[değiştirme-dizgesi]] [--replace[=değiştirme-dizgesi]]\n"
+"       [-n azami-arg-sayısı] [--max-args=azami-arg-sayısı]\n"
+"       [-s azami-karakter-sayısı] [--max-chars=azami-karakter-sayısı]\n"
+"       [-P azami-işlem-sayısı] [--max-procs=azami-işlem-sayısı]\n"
+"       [--show-limits] [--verbose] [--exit] [--no-run-if-empty]\n"
+"       [--arg-file=dosya] [--version] [--help] [komut [ilk-argümanlar]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "çalışılan dizin alınamadı"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "%2$s için %1$s argümanı geçersiz"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "%2$s için %1$s argümanı anlamsız"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Geçerli argümanlar:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Bilinmeyen sistem hatası"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: `%s' seçeneği belirsiz\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: `--%s' seçeneği argümansız kullanılır\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: seçenek `%c%s' argümansız kullanılır\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: `%s' seçeneği bir argümanla kullanılır\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: `--%s' seçeneği bilinmiyor\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: `%c%s' seçeneği tanınmıyor\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: geçersiz seçenek -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: seçenek bir argümanla kullanılır -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: `-W %s' seçeneği belirsiz\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: `-W %s' seçeneği argümansız kullanılır\n"
+
+#~ msgid "`"
+#~ msgstr "“"
+
+#~ msgid "'"
+#~ msgstr "”"
+
+#, fuzzy
+#~ msgid "Invalid regular expression"
+#~ msgstr "ifade geçersiz"
+
+#, fuzzy
+#~ msgid "Invalid range end"
+#~ msgstr "-used için argüman olarak %s geçersiz"
+
+#, fuzzy
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "ifade geçersiz"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[eE]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[hH]"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "`%s' argümanı `%s'de geçersiz"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "`%s' argümanı `%s'de geçersiz"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "argüman satırı çok uzun"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: kuraldışı seçenek -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "blok uzunluğu"
+
+#~ msgid "level higher in the filesystem hierarchy"
+#~ msgstr "seviye, dosya sistemi hiyerarşisinde daha yüksek"
+
+#~ msgid "levels higher in the filesystem hierarchy"
+#~ msgstr "seviyeler, dosya sistemi hiyerarşisinde daha yüksek"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "uyarı: -ipath dayanağının kullanımı önerilmiyor; yerine lütfen -"
+#~ "iwholename kullanın."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find sürüm %s\n"
+
+#~ msgid "GNU findutils version %s\n"
+#~ msgstr "GNU findutils sürüm %s\n"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "%s baytlık bir birikimli uzunluk ile"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s boşluk içeriyor, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s satırsonu karakteri içeriyor, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\tve %s yüksek bitli karakterler içeriyor.\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate sürüm %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "--limit argümanı"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs sürüm %s\n"
diff --git a/po/uk.gmo b/po/uk.gmo
new file mode 100644 (file)
index 0000000..c7d289f
Binary files /dev/null and b/po/uk.gmo differ
diff --git a/po/uk.po b/po/uk.po
new file mode 100644 (file)
index 0000000..250af48
--- /dev/null
+++ b/po/uk.po
@@ -0,0 +1,1433 @@
+# Ukrainian translation to findutils.
+# Copyright (C) 2006, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Maxim V. Dziumanenko <dziumanenko@gmail.com>, 2006,2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.3.8\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2007-07-03 13:55+0300\n"
+"Last-Translator: Maxim V. Dziumanenko <dziumanenko@gmail.com>\n"
+"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
+"Language: uk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "не вдається отримати інформацію про поточний каталог"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "Попередження: файлову систему %s відключено."
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "Попередження: файлову систему %s підключено."
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s змінено під час виконання %s (старий номер пристрою %ld, новий номер "
+"пристрою %ld, файлова система %s) [посилань %ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s змінено під час виконання %s (старий inode %ld, новий inode %ld, "
+"файлова система %s) [посилань %ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "Помилка при зміні каталогу"
+
+#: find/find.c:980
+#, fuzzy, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Помилка при зміні каталогу"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Символічне посилання %s є частиною циклу в ієрархії каталогів; у каталозі на "
+"який воно вказує, пошук вже відбувався."
+
+#: find/find.c:1097
+#, fuzzy, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Зациклення у файловій системі; `%s' має той самий номер пристрою та inode, "
+"що й каталог %d %s."
+msgstr[1] ""
+"Зациклення у файловій системі; `%s' має той самий номер пристрою та inode, "
+"що й каталог %d %s."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "попередження: не відбувся перехід за символічним посиланням %s"
+
+#: find/find.c:1386
+#, fuzzy, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"ПОПЕРЕДЖЕННЯ: Некоректна кількість жорстких посилань %s (видно лише st_nlink="
+"%d але вже було видно %d підкаталогів): можливо, це помилка драйвера "
+"файлової системи.  Автоматично включено параметр -noleaf.  У попередні "
+"результати можуть не бути включені каталоги, у яких мав би бути проведений "
+"пошук."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "невідомо"
+
+#: find/ftsfind.c:259
+#, fuzzy, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Зациклення у файловій системі; `%s' має той самий номер пристрою та inode, "
+"що й каталог %d %s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, fuzzy, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "Попередження: файл %s має режим 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "Помилка при зміні каталогу"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"попередження: ви вказали ключ %s після звичайного аргументу %s, але ключі не "
+"є залежними від позиції (%s впливає на перевірки вказані перед ним, а також "
+"на ті, що вказані після).  Вказуйте ключі перед іншими аргументами.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"попередження: ключ -d застарів; натомість використовуйте -depth, оскільки "
+"він є POSIX-сумісним."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s не є назвою існуючої групи та не схожа на ідентифікатор групи, оскільки "
+"має несподіваний суфікс %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s не є назвою існуючої групи"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "порожній аргумент параметра -group, потрібно вказати назву групи"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"типовий шлях: поточний каталог; типовий вираз: -print\n"
+"вирази можуть складатись з: операторів, ключів, перевірок та дій:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"оператори (у спадному порядку; неявно вважається -and, якщо не вказано "
+"інше):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"залежні від позиції ключі (завжди true): -daystart -follow -regextype\n"
+"\n"
+"звичайні параметри (завжди true, вказані перед іншими виразами):\n"
+"      -depth --help -maxdepth РІВНІВ -mindepth РІВНІВ -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"перевірки (N може бути +N або -N чи N): -amin N -anewer ФАЙЛ -atime N -cmin "
+"N\n"
+"      -cnewer ФАЙЛ -ctime N -empty -false -fstype TYPE -gid N -group НАЗВА\n"
+"      -ilname ШАБЛОН -iname ШАБЛОН -inum N -iwholename ШАБЛОН -iregex "
+"ШАБЛОН\n"
+"      -links N -lname ШАБЛОН -mmin N -mtime N -name ШАБЛОН -newer ФАЙЛ"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path ШАБЛОН -perm [+-]РЕЖИМ -regex ШАБЛОН\n"
+"      -readable -writable -executable\n"
+"      -wholename ШАБЛОН -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user НАЗВА -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"дії: -delete -print0 -printf ФОРМАТ -fprintf ФАЙЛ ФОРМАТ -print \n"
+"      -fprint0 ФАЙЛ -fprint ФАЙЛ -ls -fls ФАЙЛ -prune -quit\n"
+"      -exec КОМАНДА ; -exec КОМАНДА {} + -ok КОМАНДА ;\n"
+"      -execdir КОМАНДА ; -execdir КОМАНДА {} + -okdir КОМАНДА ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Сповіщайте про помилки у findutils (та слідкуйте за виправленням) на "
+"сторінці\n"
+"http://savannah.gnu.org/ або, якщо у вас немає доступу до веб, надсилайте\n"
+"поштою за адресою <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "помилка перевірки бібліотечною функцією fnmatch()."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"попередження: назви файлів Unix зазвичай не містять зворотних косих рисок "
+"(хоча вони містяться у шляхах).  Це означає, що '%s %s' буде вважатись "
+"завжди false на цій системі.Більш корисним буде вказати '-wholename' чи, "
+"можливо, '-samefile'.  Якщо ж ви користуєтесь GNU grep, можете "
+"використовувати 'find ... -print0 | grep -FzZ %s'."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+"У аргументі %s очікувалось додатне десяткове ціле число, але вказано %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "Система не підтримує пошук за часом створення файлу. "
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s: для ключа `%s' потрібно вказати аргумент\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Не вдається визначити, як інтерпретувати дату чи час у формі %s"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Не вдається отримати час створення файлу %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "неправильний режим %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"попередження: ви вказати шаблон прав доступу %s, який еквівалентний /000. "
+"Значення -perm /000 скоро буде змінено, для сумісності з -perm -000; тобто, "
+"зараз вираз не відповідає ніяким файлам, але скоро буде змінений, щоб "
+"відповідав усім файлам."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "відсутній аргумент у -size"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "неправильний тип '%c' для -size"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "Неправильний аргумент `%s%c' для -size"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Параметр -show-control-chars приймає один аргумент, який має бути 'literal' "
+"чи 'safe'"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Некоректний аргумент %s для -used"
+
+#: find/parser.c:2671
+#, fuzzy, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s не є назвою існуючої групи"
+
+#: find/parser.c:2678
+#, fuzzy, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Аргументи до -type мають містити лише одну літеру"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Увімкнені функції: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Аргументи до -type мають містити лише одну літеру"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Невідомий аргумент для -type: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "попередження: невідома послідовність '\\%c'"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "помилка: %s наприкінці рядка формату"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "попередження: невідомий формат директиви '%%%c'"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+"помилка: директива формату `%%%c' зарезервована для майбутнього використання"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Поточний каталог включений в змінну оточення PATH, що у комбінації з дією %s "
+"створює небезпеку. Видаліть поточний каталог із змінної $PATH (тобто, "
+"видаліть \".\", або двокрапку попереду чи позаду)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Відносний шлях %s включений в змінну оточення PATH, що у комбінації з дією "
+"пошуку %s створює небезпеку. Видаліть цей шлях із змінної $PATH"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Не можна використовувати {} у назві утиліти для -execdir та -okdir, оскільки "
+"це - потенційна проблема безпеки."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "У виразі -exec%s ... + підтримується лише один екземпляр {}"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Оточення надто велике для виконання."
+
+#: find/parser.c:3603
+#, fuzzy, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+"арифметичне переповнення при спробі обчислення кінця сьогоднішнього дня"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+"арифметичне переповнення при спробі обчислення кінця сьогоднішнього дня"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "стандартний потік помилок"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "стандартний потів виводу"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "Помилка при зміні каталогу"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "Попередження: не вдається визначити час створення файлу %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Не вдається закрити стандартний потік вводу"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Помилка при зміні каталогу"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "не вдається створити процес"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "помилка очікування %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s перерваний сигналом %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "неправильний вираз"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"неправильний вираз; ви використовувати двійковий оператор '%s', але перед "
+"ним нічого не вказано."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "між '%s' та ')' очікувався вираз"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "після '%s' очікувався вираз"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "неправильний вираз: надто багато символів ')'"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"неправильний вираз; очікувався символ ')' але він не знайдений.  Можливо, "
+"потрібен додатковий ключ після '%s'"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "неправильний вираз: порожні дужки неприпустимі."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "неправильний вираз: очікувався символ ')', але він не знайдений."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "оопс -- неправильний тип виразу!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "оопс -- неправильний тип виразу (%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "шляхи треба вказувати перед виразом: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "невідомий ключ `%s'"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "неправильний ключ `%s'"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "неправильний аргумент `%s' у `%s'"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "відсутній аргумент у `%s'"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "надто багато символів ')'"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "неочікуваний зайвий ключ `%s'"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "неочікуваний зайвий ключ"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "оопс -- помилкова типова вставка оператора 'ТА' (and)"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Використання: %s [-H] [-L] [-P] [-Oрівень] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [шлях...] [вираз]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "не вдається отримати поточний каталог"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "не вдається отримати поточний каталог"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Невідома ознака налагодження %s проігнорована"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Не вказаний аргумент ключа -D"
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "За ключем -O одразу має йти десяткове ціле число"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Вкажіть десяткове ціле число після ключа -O"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Некоректний рівень оптимізації %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Рівень оптимізації %lu надто високий.  Якщо треба дуже швидко шукати файли, "
+"скористайтесь GNU locate."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Змінна оточення FIND_BLOCK_SIZE не підтримується, на розмір блоку впливає "
+"лише змінна оточення POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr ""
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+
+#: lib/buildcmd.c:387
+#, fuzzy, c-format
+msgid "argument list too long"
+msgstr "рядок аргументів надто великий"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Зібрано з використанням GNU gnulib версії %s\n"
+
+#: lib/safe-atoi.c:76
+#, fuzzy, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "неочікуваний зайвий ключ `%s'"
+
+#: lib/safe-atoi.c:82
+#, fuzzy, c-format
+msgid "Expected an integer: %s"
+msgstr "після '%s' очікувався вираз"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Використання: %s [--version | --help]\n"
+"чи     %s most_common_bigrams < список-файлів > база-даних-locate\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Про помилки звітуйте за адресою <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "помилка при записі"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, fuzzy, c-format
+msgid "Failed to write to standard output"
+msgstr "стандартний потів виводу"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "днів"
+
+#: locate/locate.c:193
+#, fuzzy, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Аргумент для ключа --max-database-age не повинен бути порожнім"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "Некоректний аргумент %s для ключа --max-database-age"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+"база даних locate %s містить назву файлу, яка довша, ніж може обробляти "
+"команда locate"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "база даних locate %s пошкоджена або неправильна"
+
+#: locate/locate.c:893
+#, fuzzy, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Розмір бази даних locate: %s байтів\n"
+msgstr[1] "Розмір бази даних locate: %s байтів\n"
+
+#: locate/locate.c:900
+#, fuzzy, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Відповідні назви файлів: %s "
+
+#: locate/locate.c:901
+#, fuzzy, c-format
+msgid "All Filenames: %s\n"
+msgstr "Усі назви файлів: %s "
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+"Деякі назви файлів можуть бути відфільтровані, тож ступінь стиснення "
+"неможливо підрахувати.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Ступінь стиснення %4.2f%% (вищий ступінь - кращий)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Ступінь стиснення невизначений\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"база даних locate %s схожа на базу даних slocate, але має рівень безпеки %c, "
+"який наразі не підтримується GNU findutils"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s - це база даних slocate.  Код підтримки цієї функціональності новий, тож "
+"можливе виникнення проблем."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s - це база даних slocate з непідтримуваним рівнем безпеки %d, її буде "
+"пропущено."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Ви вказали ключ -E, але цей ключ не можна використовувати з базами даних у "
+"форматі slocate які мають не нульовий рівень безпеки.  Пошук у цій базі "
+"даних не дасть результату.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s - це база даних slocate.  Вмикається параметр '-e'."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr ""
+"база даних locate `%s' у старому форматі некоректна, бо є надто короткою"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "База даних %s має формат %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+"База даних у форматі з кодуванням машинного слова типу little-endian.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "База даних у форматі з кодуванням машинного слова типу big-endian.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Тип кодування машинного слова у базі даних не очевидний.\n"
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Використання: %s [-d шлях | --database=шлях] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=ТИП]\n"
+"      [--max-database-age D] [-version] [--help]\n"
+"      шаблон...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "не вдається позбутись групових прав"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "не вдається позбутись прав setuid"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Не вдається повністю позбутись прав"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "не вдається позбутись прав setgid"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"попередження: базу даних locate можна прочитати з стандартного потоку вводу "
+"лише один раз."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr ""
+"попередження: база даних '%s' застаріла більш ніж на %d %s (фактичний її вік "
+"%.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, fuzzy, c-format
+msgid "unexpected EOF in %s"
+msgstr "неочікуваний зайвий ключ `%s'"
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "помилка очікування %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Некоректна escape-послідовність %s у визначенні роздільника для входу."
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Некоректна escape-послідовність %s у визначенні роздільника для входу; "
+"значення символів не можуть перевищувати %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Некоректна escape-послідовність %s у визначенні роздільника для входу; "
+"значення символів не можуть перевищувати %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Некоректна escape-послідовність %s у визначенні роздільника для входу; "
+"невідомі символи %s наприкінці."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Некоректне визначення роздільника входу %s: роздільник має бути або символом "
+"або escape-послідовністю, що починається з \\."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "оточення надто велике для виконання"
+
+#: xargs/xargs.c:561
+#, fuzzy, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"попередження: значення %ld для ключа -s надто велике, натомість "
+"використовується %ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Не вдається відкрити вхідний файл `%s'"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Змінні оточення займають %lu байтів\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Верхня межа POSIX довжини аргументу (на цій системі): %lu\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr "Нижня допустима межа POSIX довжини аргументу (для всіх систем): %lu\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Максимальна довжина команди, яку можна використовувати: %ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Розмір буфера команд, який використовується: %lu\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Виконання xargs буде продовжено, команда спробує прочитати потік вводу та "
+"виконати команди; якщо ви цього не бажаєте, введіть символ кінця файлу.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Попередження: %s запуститься принаймні один раз. Якщо ви цього не бажаєте, "
+"введіть символ кінця файлу.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"непарні лапки %s quote; зазвичай лапки мають спеціальне значення, якщо не "
+"вказано ключ -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "подвійна"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "одинарна"
+
+#: xargs/xargs.c:936
+#, fuzzy, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"попередження: у потоці вводу виявлено символ NUL.  Він не може передаватись "
+"у список аргументів.  Ви забули вказати ключ --null ?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "рядок аргументів надто великий"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "помилка очікування дочірнього процесу"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: завершився зі статусом 255; переривання роботи"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: зупинено сигналом %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: завершений сигналом %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: некоректне число для ключа -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: значення для ключа -%c має бути >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: значення для ключа -%c має бути < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Використання: %s [-0prtx] [--interactive] [--null] [-d|--"
+"delimiter=роздільник]\n"
+"       [-E рядок-кінц-файлу] [-e[рядок-кінц-файлу]] [--eof[=рядок-кінц-"
+"файлу]]\n"
+"       [-L макс-рядків] [-l[макс-рядків]] [--max-lines[=макс-рядків]]\n"
+"       [-I рядок-заміни] [-i[рядок-заміни]] [--replace[=рядок-заміни]]\n"
+"       [-n макс-аргументів] [--max-args=макс-аргументів]\n"
+"       [-s макс-символів] [--max-chars=макс-символів]\n"
+"       [-P макс-процесів]  [--max-procs=макс-процесів] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=файл]\n"
+"       [--version] [--help] [команда [початкові-аргументи]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "не вдається отримати поточний каталог"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "некоректний аргумент %s для `%s'"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "некоректний аргумент %s для `%s'"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "Припустимі аргументи:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "Невідома системна помилка"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s: ключ `%s' неоднозначний\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: ключ `--%s' використовується без аргументів\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s: ключ `%c%s' використовується без аргументів\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s: для ключа `%s' потрібно вказати аргумент\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: невідомий ключ `--%s'\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s: невідомий ключ `%c%s'\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s: некоректний ключ -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s: для ключа потрібно вказати аргумент -- %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: ключ `-W %s' неоднозначний\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: ключ `-W %s' використовується без аргументів\n"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#, fuzzy
+#~ msgid "Invalid regular expression"
+#~ msgstr "неправильний вираз"
+
+#, fuzzy
+#~ msgid "Invalid range end"
+#~ msgstr "Некоректний аргумент %s для -used"
+
+#, fuzzy
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "неправильний вираз"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yYтТ]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nNнН]"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "неправильний аргумент `%s' у `%s'"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "неправильний аргумент `%s' у `%s'"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "рядок аргументів надто великий"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: невідомий ключ -- %c\n"
+
+#~ msgid "block size"
+#~ msgstr "розмір блоку"
+
+#~ msgid "level higher in the filesystem hierarchy"
+#~ msgstr "рівнем вище у ієрархії файлової системи"
+
+#~ msgid "levels higher in the filesystem hierarchy"
+#~ msgstr "рівнями вище у ієрархії файлової системи"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr ""
+#~ "попередження: ключ -ipath застарів; натомість користуйтесь -iwholename."
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find версії %s\n"
+
+#~ msgid "GNU findutils version %s\n"
+#~ msgstr "GNU findutils версії %s\n"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "сукупна довжина: %s байтів"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\tз яких %s - пробіли, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s містять символи нового рядка, "
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\tта %s містять символи з встановленим старшим бітом.\n"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate версії %s\n"
+
+#~ msgid "argument to --limit"
+#~ msgstr "аргумент для --limit"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs версії %s\n"
diff --git a/po/vi.gmo b/po/vi.gmo
new file mode 100644 (file)
index 0000000..504b3b3
Binary files /dev/null and b/po/vi.gmo differ
diff --git a/po/vi.po b/po/vi.po
new file mode 100644 (file)
index 0000000..aa90bd2
--- /dev/null
+++ b/po/vi.po
@@ -0,0 +1,1378 @@
+# Vietnamese translation for FindUtils.
+# Copyright © 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Clytie Siddall <clytie@riverland.net.au>, 2006-2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-04-07 17:31+0930\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: LocFactoryEditor 1.8\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "Lỗi sơ khởi bảng chuỗi duy nhất tập tin dùng chung"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "không thể lấy các thông tin về thư mục hiện thời"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "Không đọc được danh sách các thiết bị đã gắn kết."
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "CẢNH BÁO : hệ thống tập tin %s vừa bị tháo gắn kết."
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "CẢNH BÁO : hệ thống tập tin « %s » vừa được gắn kết."
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%1$s%2$s đã thay đổi trong khi thì hành %3$s (số hiệu thiết bị cũ %4$ld, số "
+"thiết bị mới %5$ld, kiểu hệ thống tập tin là %6$s) [nhắc %7$ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%s%s đã thay đổi trong khi thì hành %s (số hiệu inode cũ %<PRIuMAX>, số "
+"inode mới %<PRIuMAX>, kiểu hệ thống tập tin là %s) [nhắc %ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "lỗi trở về thư mục mẹ"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "Lỗi thay đổi thư mục một cách an toàn thành %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"Liên kết tượng trưng %s là phần của vòng lặp trong phân cấp thư mục; đã thăm "
+"thư mục đến đó nó hướng."
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"Mới phát hiện vòng lặp hệ thống tập tin; %1$s có cùng một số hiệu thiết bị "
+"và inode với thư mục nằm %2$d cấp cao hơn trong phân cấp hệ thống tập tin."
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "cảnh báo : không đi theo liên kết tượng trưng %s."
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"CẢNH BÁO : số đếm liên kết cứng không đúng đối với %s (thấy được chỉ « "
+"st_nlink=%<PRIuMAX> » nhưng đã thấy %<PRIuMAX> thư mục con): có thể là lỗi "
+"trong trình điều khiển hệ thống tập tin. Vì thế chức năng này tự động bật "
+"tùy chọn « -noleaf » của find. Kết quả sớm hơn có thể không bao gồm thư mục "
+"nên được tìm kiếm."
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "Không đọc được danh sách hệ thống tập tin đã gắn kết"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "không rõ"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+"Mới phát hiện vòng lặp hệ thống tập tin; %1$s có thuộc về cùng một vòng lặp "
+"hệ thống tập tin với %2$s."
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "CẢNH BÁO : tập tin %s hình như có chế độ 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "không thể tìm kiếm qua %s"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "đã không phục hồi được thư mục làm việc sau khi tìm kiếm qua %s"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"Hành động xoá thì tự động bật tùy chọn « -depth », nhưng « -prune » không "
+"làm gì khi « -depth » hoạt động. Vẫn muốn tiếp tục thì chỉ dùng tùy chọn « -"
+"depth » một cách dứt khoát."
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"cảnh báo : bạn đã ghi ro tùy chọn %1$s sau đối số khác tùy chọn %2$s, nhưng "
+"mà tùy chọn không phải thuộc vị trí (%3$s làm ảnh hướng đến điều thử được "
+"ghi rõ cả hai trước lẫn sau nó). Hãy ghi rõ tùy chọn _trước_ đối số khác.\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"cảnh báo : tùy chọn « -d » bị phản đối nên hãy sử dụng tùy chọn « -depth "
+"» (độ sâu) thay thế, vì nó là tính năng tuân theo POSIX."
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%1$s không phải là tên của nhóm tồn tại; cũng không hình như mã nhận diện "
+"nhóm thuộc số, vì nó có hậu số bất thường %2$s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s không phải là tên của nhóm tồn tại"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "đối số rỗng tới « -group » (nhóm): nên là tên nhóm"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"đường dẫn mặc định là thư mục hiện có; biểu thức mặc định là « -print "
+"» (in)\n"
+"biểu thức có thể bao gồm: toán tử, tùy chọn, điều thử và hành động:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"toán tử (quyền đi trước giảm; ngụ ý tùy chọn « -and » (và)\n"
+"khi không có điều khác):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+"[EXPR (biểu thức); not (không phải); and (và); or (hoặc)]\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"tùy chọn vị trí \t(đúng luôn):\n"
+"\t-daystart \t\t(ngày bắt đầu)\n"
+"\t-follow \t\t(theo)\n"
+"\t-regextype\t\t(kiểu biểu thức chính quy)\n"
+"\n"
+"tùy chọn thường \t(đúng luôn, hãy ghi rõ trước các biểu thức khác):\n"
+"\t-depth \t\t\t(độ sâu)\n"
+"\t--help \t\t\t(trợ giúp)\n"
+"\t-maxdepth CẤP \t(độ sâu tối đa)\n"
+"\t-mindepth CẤP \t(độ sâu tối thiểu)\n"
+"\t-mount \t\t(gắn kết)\n"
+"\t-noleaf \t\t(không lá)\n"
+"\t--version \t\t(phiên bản)\n"
+"\t-xdev \t\t\t(chỉ thiết bị này)\n"
+"\t-ignore_readdir_race \t\t(bỏ qua thư mục đọc [race])\n"
+"\t-noignore_readdir_race \t(đừng bỏ qua thư mục đọc [race])\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"điều thử (N có thể là +N hay -N hay N: ba kiểu cũng được):\n"
+"\t-amin N \t\t(tối thiểu)\n"
+"\t-anewer TẬP_TIN (mới hơn)\n"
+"\t-atime N \t\t(giờ)\n"
+"\t-cmin N \t\t(tối thiểu)\n"
+"\t-cnewer TẬP_TIN (mới hơn)\n"
+"\t-ctime N \t\t(giờ)\n"
+"\t-empty \t\t(trống)\n"
+"\t-false \t\t\t(sai)\n"
+"\t-fstype KIỂU \t(kiểu hệ thống tập tin)\n"
+"\t-gid N \t\t\t(thông tin nhận biết nhóm)\n"
+"\t-group TÊN \t\t(nhóm)\n"
+"\t-ilname MẪU \t(tên)\n"
+"\t-iname MẤU \t(tên)\n"
+"\t-inum N \t\t(số)\n"
+"\t-iwholename MẤU (tên đầy đủ)\n"
+"\t-iregex MẤU \t(biểu thức chính quy)\n"
+" \t-links N \t\t(liên kết)\n"
+"\t-lname MẤU \t(tên)\n"
+"\t-mmin N \t\t(tối thiểu)\n"
+"\t-mtime N \t\t(giờ)\n"
+"\t-name MẤÚ \t(tên)\n"
+"\t-newer TẬP_TIN \t(mới hơn)"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"-nouser \t\t\t(không có người dùng)\n"
+"-nogroup \t\t(không có nhóm)\n"
+"-path MẪU \t\t(đường dẫn)\n"
+"-perm [+-]CHẾ_ĐỘ (vĩnh cửu)\n"
+"-regex MẪU \t\t(biểu thức chính quy)\n"
+"-readable \t\t(đọc được)\n"
+"-writable \t\t(ghi được)\n"
+"\t-executable\t\t(thực hiện được)\n"
+"\t-wholename MẪU \t(tên đầy đủ)\n"
+"\t-size N[bcwkMG] \t(cỡ)\n"
+"\t-true \t\t\t(đúng)\n"
+"\t-type [bcdpflsD] \t(kiểu)\n"
+"\t-uid N \t\t\t(mã số ngươi dùng)\n"
+"\t-used N \t\t\t(đã dùng)\n"
+"\t-user TÊN \t\t(người dùng)\n"
+"\t-xtype [bcdpfls] \t(kiểu)"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context NGỮ_CẢNH\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"hành vi:\n"
+"\t-delete \t(xoá)\n"
+"\t-print0\n"
+"\t-printf DẠNG\n"
+"\t-fprintf TỆP DẠNG\n"
+"\t-print (in)\n"
+"\t-fprint0 TỆP\n"
+"\t-fprint TỆP\n"
+"\t-ls (liệt kê)\n"
+"\t-fls TỆP\n"
+"\t-prune \t(xén bớt)\n"
+"\t-quit\t\t(thoát)\n"
+"\t-exec LỆNH\t(thực hiện)\n"
+"\t-exec LỆNH {} + -ok LỆNH\n"
+"\t-execdir LỆNH\t(thực hiện thư mục)\n"
+"\t-execdir LỆNH {} + -okdir LỆNH\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"Hãy thông báo (và theo dõi cách sửa chữa) lỗi nào thông qua\n"
+"trang thông báo lỗi findutils tại <http://savannah.gnu.org/>\n"
+"hoặc, nếu không có cách truy cập Mạng,\n"
+"bằng cách gởi thư cho địa chỉ <bug-findutils@gnu.org>."
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "việc kiểm tra sự đúng mực chức năng thư viện « fnmatch() » bị lỗi."
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"cảnh báo: tên tập tin Unix thường không chứa sổ chéo (dù tên đường dẫn có "
+"phải). Có nghĩa là « %s%s » sẽ rất có thể có kết quả « Sai » luôn luôn trên "
+"hệ thống này. Có lẽ việc thử ra « -wholename » (tên đầy đủ) hữu ích hơn cho "
+"bạn, hoặc có lẽ « -samefile » (cùng tập tin). Hoặc, nếu bạn có dùng công cụ "
+"« grep » của GNU, bạn có thể dùng lệnh « find ... -print0 | grep -FzZ %s »."
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "Đợi đối số kiểu số nguyên thập phân dương tới %1$s, chỉ nhận %2$s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "Hệ thống này không cung cấp cách tìm giờ sinh của tập tin."
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "Hàm thử %s yêu cầu một đối số"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "Không thể tìm biết cách giải thích %s dạng ngày hay giờ"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "Không thể lấy giờ sinh của tập tin %s"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+"cảnh báo : -%s %s không tương ứng với gì vì nó kết thúc bằng dấu xuyệc « / »."
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "Chế độ %s không hợp lệ khi POSIXLY_CORRECT hoạt động."
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "chế độ không hợp lệ %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"cảnh báo : bạn đã xác định một mẫu chế độ %s (bằng /000). Lời nghĩa của « -"
+"perm /000 » đã được thay đổi để tương ứng với « -perm -000 »; tức là nó đã "
+"từng không khớp với tập tin nào, bây giờ nó khớp với mọi tập tin."
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "đối số rỗng không hợp lệ đối với tùy chọn « -size » (kích cỡ)"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "kiểu « -size » (kích cỡ) không hợp lệ « %c »"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "đối số không hợp lệ « %s%c » tới kích cỡ"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+"Tùy chọn « -show-control-chars » (hiển thị các ký tự điều khiển) chấp nhận "
+"một đối số riêng lẻ phải là « literal » (nghĩa chữ) hay « safe » (an toàn)."
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "Đối số không hợp lệ %s tới « -used » (đã dùng)"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "%s không phải là tên của một người dùng đã biết"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "Đối số cho tùy chọn «  --user » không thể là trống"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "Các tính năng hoạt động: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "sai đặt ngữ cảnh (-context) vị ngữ : chưa hiệu lực SELinux."
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "Đối số tới « -type » (kiểu) nên chứa chỉ một chữ"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "Đối số không rõ tới « -type » (kiểu): %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "cảnh báo : không nhận diện ký tự thoát « \\%c »"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "lỗi: %s ở kết thúc của chuỗi định dạng"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "cảnh báo : không nhận diện chỉ thị định dạng « %%%c »"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "lỗĩ: chỉ thị định dạng « %%%c » dành để dùng trong tương lai"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"Gồm thư mục hiện thời trong biến môi trường « PATH » (đường dẫn) mà không an "
+"toàn khi được tổ hợp với hành động %s của trình find (tìm). Hãy gỡ bỏ thư "
+"mục hiện thời ra « $PATH » của bạn (tức là hãy gỡ bỏ dấu chấm « . » hay ký "
+"tự hai chấm nào « : » nằm trước hay nằm theo)."
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"Đường dẫn tương đối %1$s được gồm trong biến môi trường đường dẫn PATH, mà "
+"không phải bảo mật cùng với hành động %2$s của find. Hãy gỡ bỏ mục nhập đó "
+"khỏi $PATH."
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"Không cho phép bạn dùng ký tự « {} » bên trong tên tiện ích cho đối số « -"
+"execdir » và « -okdir », vì có thể rủi ro bảo mật."
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "Hỗ trợ chỉ một thể hiện « {} » với đối số « -exec%s ... + »"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "Môi trường quá lớn đối với « exec() » (thì hành)"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "tràn vùng đệm tính toán trong khi chuyển đổi %s ngày sang số các giây"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "tràn cộng khi thử tính kết thúc của hôm nay"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "thiết bị lỗi chuẩn"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "thiết bị xuất chuẩn"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "không thể xoá %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "đã không phục hồi được thư mục làm việc sau khi tìm kiếm qua %s"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon bị lỗi: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "CẢNH BÁO : không thể quyết định giờ sinh của tập tin %s"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "Không thể đóng thiết bị nhập chuẩn"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "Lỗi thay đổi thư mục"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "không thể tạo tiến trình con"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "gặp lỗi khi đời %s"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s: bị chấm dứt bởi tín hiệu %d"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "biểu thức không hợp lệ"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+"biểu thức không hợp lệ; bạn đã dùng toán tử nhị phân « %s » không có gì nằm "
+"trước nó."
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "đợi biểu thức giữa « %s » và « ) »"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "đợi biểu thức sau « %s »"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "biểu thức không hợp lệ; có quá nhiều ký tự « ) »"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr ""
+"biểu thức không hợp lệ; đợi ký tự « ) » nhưng chưa gặp. Có thể bạn cần nhập "
+"vị ngữ thêm sau « %s »"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "biểu thức không hợp lệ; không cho phép dấu ngoặc rỗng."
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "biểu thức không hợp lệ; ngờ ký tự « ) » nhưng chưa gặp."
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "rõ tiếc — kiểu biểu thức không hợp lệ."
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "rõ tiếc — kiểu biểu thức không hợp lệ (%d)."
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "đương dẫn phải nằm trước biểu thức: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "vị ngữ lạ « %s »"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "vị ngữ không hợp lệ « %s »"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "đối số « %1$s » không hợp lệ đối với « %2$s »"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "thiếu đối số đối với « %s »"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "quá nhiều ký tự « ) »"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "gặp vị ngữ thêm bất thường « %s »"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "gặp vị ngữ thêm bất ngờ"
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "rỗ tiếc — việc chèn mặc định điều « and » một cách không hợp lệ."
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "Cách sử dụng: %s [-H] [-L] [-P] [-Ocấp] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [đường dẫn...] [biểu thức]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "lỗi trở về thư mục mẹ"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "lỗi trở về thư mục mẹ"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "Đang bỏ qua cờ gỡ lỗi không nhận diện %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "Đối số rỗng tới tùy chọn « -D »"
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "Tùy chọn « -O » phải có một số nguyên thập phân theo đúng sau"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "Hãy ghi rõ một số thập phân đúng sau « -O »"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "Cấp tối ưu hoá không hợp lệ %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+"Cấp tối ưu hoá %lu quá cao. Để tìm nhanh tập tin, khuyên bạn dùng phần mềm "
+"locate của GNU."
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"Không hỗ trợ biến môi trường « FIND_BLOCK_SIZE » (tim kích cỡ của khối) thì "
+"chỉ một điều làm ảnh hướng đến kích cỡ của khối: biến môi trường « "
+"POSIXLY_CORRECT » (đúng kiểu Posix)"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "lệnh quá dài"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr "không gọi được exec() do giới hạn kích cỡ đối số"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "không thể vừa đối số đơn bên trong giới hạn kích cỡ danh sách đối số"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "danh sách đối số quá dài"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr "Biến môi trường %s không phải được lập thành một số thập phân đúng"
+
+# Name: don't translate/Tên: đừng dịch
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+# Name: don't translate/Tên: đừng dịch
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+# Name: don't translate/Tên: đừng dịch
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "Xây dựng dùng gnulib phiên bản %s của GNU\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "Gặp hậu tố không mong đợi %s trên %s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "Mong đợi một số nguyên: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "Không rõ kiểu biểu thức chính quy %1$s: kiểu hợp lệ là %2$s."
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"Cách sử dụng: %s [--version | --help]\n"
+"\t\t\t\t\t(phiên bản, trợ giúp)\n"
+"hoặc\n"
+"%s gần_hết_chữ_đôi_thường < danh_sách_tập_tin > cơ_sở_dữ_liệu_định_vị\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"Hãy thông báo lỗi nào cho <bug-findutils@gnu.org>.\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "lỗi ghi"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+"Sử dụng: %s [-0 | --null] [--version] [--help]\n"
+"\n"
+"null\t\tvô giá trị\n"
+"version\tphiên bản\n"
+"help\t\ttrợ giúp\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "Bạn cần phải ghi rõ một cấp bảo mật dạng số nguyên thập phân."
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "Cấp bảo mật %s bên ngoài phạm vi có thể chuyển đổi."
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "Cấp bảo mật %s có hậu tố bất thường %s."
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "Cấp bảo mật slocate %ld không được hỗ trợ."
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "Lỗi ghi vào đầu ra tiêu chuẩn"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "ngày"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "Đối số cho tùy chọn «  --max-database-age » không thể là rỗng"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr ""
+"đối số %s không hợp lệ cho tùy chọn « --max-database-age » (tuổi cơ sở dữ "
+"liệu tối đa)"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr "cơ sở dữ liệu locate %s chứa một tên tập tin dài hơn ngưỡng của locate"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "cơ sở dữ liệu locate (định vị) %s bị hỏng hay không hợp lệ"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Kích cỡ cơ sở dữ liệu định vị: %s byte\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "Tên tập tin khớp: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "Mọi tên tập tin: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"Các tên tập tin có chiều dài tích luỹ %s byte.\n"
+"Trong những tên tập tin này:\n"
+"\n"
+"\t%s chứa khoảng trắng, \n"
+"\t%s chứa ký tự dòng mới, \n"
+"\t%s chứa ký tự đặt bit cao\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr "Một số tập tin có thể bị lọc ra thì không thể tính tỷ lệ nén.\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "Tỷ lệ nén %4.2f%% (cao hơn thì tốt hơn)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "Tỷ lệ nén không xác định.\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"cơ sở dữ liệu định vị %s hình như cơ sở dữ liệu slocate, nhưng có vẻ là nó "
+"có cấp bảo mật %c mà GNU findutils không hiện thời hỗ trợ"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s là cơ sở dữ liệu kiểu slocate. Chỉ bắt đầu hỗ trợ kiểu này: có thể gặp "
+"lỗi."
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+"%s là cơ sở dữ liệu kiểu slocate có cấp bảo mật không được hỗ trợ %d nên bỏ "
+"qua nó."
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"Bạn đã ghi rõ tùy chọn « -E », nhưng tùy chọn đó không thể được dùng với cơ "
+"sở dữ liệu định dạng slocate có cấp bảo mật khác số không. Vi thế không tạo "
+"ra kết quả cho cơ sở dữ liệu này.\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s là cơ sở dữ liệu kiểu slocate nên bật tùy chọn « -e »."
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "Cơ sở dữ liệu locate định dạng cũ %s quá ngắn để hợp lệ"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "Cơ sở dư liệu %s có định dạng %s.\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "Cơ sở dữ liệu này có mã hoá từ-máy về cuối nhỏ.\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "Cơ sở dữ liệu này có mã hoá từ-máy về cuối lớn.\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "Thứ tự mã hoá từ-máy của cơ sở dữ liệu này không phải hiển nhiên.\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"Sử dụng: %s [-d đường_dẫn | --database=đường_dẫn] (cơ sở dữ liệu)\n"
+"\t[-e | -E| --[non-] existing] \t\t([không] tồn tại)\n"
+"\t[-i | --ignore-case] \t(không phân biệt chữ hoa/thường)\n"
+"\t[-w | --wholename] \t(tên đầy đủ)\n"
+"\t[-b | --basename] \t\t(tên cơ sở)\n"
+"\t[--limit=N | -l N] \t\t(giới hạn)\n"
+"\t[-S | --statistics] \t\t(thống kê)\n"
+"\t[-0 | --null] \t\t\t(vô giá trị)\n"
+"\t[-c | --count] \t\t\t(đếm)\n"
+"\t[-P | -H | --nofollow] \t(không đi theo)\n"
+"\t[-L | --follow] \t\t(đi theo)\n"
+"\t[-m | --mmap ] \t\t(sơ đồ vùng nhớ)\n"
+"\t[ -s | --stdio ] \t\t(tđầu vào/ra tiêu chuẩn)\n"
+"\t[-A | --all] \t\t\t(tất cả)\n"
+"\t[-p | --print]\t\t\t(in)\n"
+"\t[-r | --regex ] \t\t(biểu thức chính quy)\n"
+"\t[--regextype=KIỂU]\t\tkiểu biểu thức chính quy\n"
+"\t[--max-database-age D]\t\t(tuổi cơ sở dữ liệu tối đa)\n"
+"\t[--version] \t\t\t(phiên bản)\n"
+"\t[--help] mẫu... \t\t(trợ giúp)\n"
+"\tpattern...\t\t\t\t(mẫu)\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "lỗi bỏ quyền hạn nhóm"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "lỗi bỏ quyền hạn setuid"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "Lỗi bỏ hoàn toàn quyền hạn"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "lỗi bỏ quyền hạn setgid"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr ""
+"cảnh báo : cơ sở dữ liệu định vị có thể được đọc từ thiết bị xuất chuẩn chỉ "
+"một lần thôi."
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "cuộc gọi hệ thống thời gian đã không thành công"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "cảnh báo : cơ sở dữ liệu %s cũ hơn %d %s (thật là %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+"CẢNH BÁO : cơ sở dữ liệu locate %s đã được xây dựng với thứ tự byte khác"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "gặp kết thúc tập tin bất thường trong %s"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "gặp lỗi khi đọc một từ trong %s"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "Gặp dãy thoát không hợp lệ « %s » trong đặc tả giới hạn dữ liệu nhập"
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr ""
+"Gặp dãy thoát không hợp lệ %s trong đặc tả giới hạn dữ liệu nhập: không cho "
+"phép giá trị ký tự vượt trội %lx."
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr ""
+"Gặp dãy thoát không hợp lệ %s trong đặc tả giới hạn dữ liệu nhập: không cho "
+"phép giá trị ký tự vượt trội %lo."
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr ""
+"Gặp dãy thoát không hợp lệ %s trong đặc tả giới hạn dữ liệu nhập: không nhận "
+"ra ký tự %s nằm theo."
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"Gặp đặc tả giới hận dữ liệu nhập không hợp lệ « %s »: dấu giới hạn phải là "
+"hoặc một ký tự đơn hoặc một dãy thoát bắt đầu với « \\ »."
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "môi trường quá lớn đối với « exec » (thì hành)"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+"cảnh báo : giá trị %ld cho tùy chọn « -s » quá lớn nên thay thế bằng %ld"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "Không thể mở tập tin nhập %s"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "Các biến môi trường của bạn đều chiếm %<PRIuMAX> byte\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "Giới hạn POSIX trên về chiều dài đối số (hệ thống này): %<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr ""
+"Giới hạn POSIX trên nhỏ nhất cho phép về chiều dài đối số (mọi hệ thống): "
+"%<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "Chiều dài câu lệnh tối đa mà thật có thể dùng: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "Kích cỡ vùng đệm lệnh thực sự đang sử dụng: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"Bây giờ sẽ tiếp tục thực hiện xargs, cũng thử đọc các lệnh nhập/xuất của nó. "
+"Không muốn thì gõ phím kết thúc tập tin.\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+"Cảnh báo : %s sẽ được chạy ít nhất một lần. Không muốn thì bấm phím ngắt.\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"chưa khớp dấu trích dẫn %s; mặc định là mọi dấu trích dẫn đơn là đặc biệt "
+"với xargs nếu không dùng tùy chọn -0"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "đôi"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "đơn"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"CẢNH BÁO : gặp một ký tự NUL (vô giá trị) trong đầu vào. Không thể gửi ký tự "
+"này trong danh sách đối số. Bạn dự định sử dụng tuỳ chọn « --null » (vô giá "
+"trị) không?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "dòng đối số quá dài"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "đã không mở được « /dev/tty » để đọc"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "không tạo được ống dẫn trước khi phân nhánh"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+"Gặp lỗi đọc vùng đệm số thứ tự lỗi (errno-buffer) trong « xargs_do_exec "
+"» (rất có thể là một lỗi phần mềm: thông báo nhé)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+"chức năng đọc trả lại giá trị bất thường %d (rất có thể là một lỗi phần mềm: "
+"thông báo nhé)"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "gặp lỗi khi đời tiến trình con"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "CẢNH BÁO : mất dấu vết của %d tiến trình con"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: đã thoát với trạng thái 255; nên hủy bỏ"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: bị ngừng bởi tín hiệu %d"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: bị chấm dứt bởi tín hiệu %d"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: số không hợp lệ đối với tùy chọn -%c\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: giá trị cho tùy chọn -%c nên ≥ %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: giá trị cho tùy chọn -%c nên < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"Cách sử dụng: %s [-0prtx]\n"
+"[--interactive]\t\ttương tác\n"
+" [--null]\t\t\trỗng\n"
+" [-d|--delimiter=dấu_giới_hạn]\n"
+"[-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]      (chuỗi kết thúc tập tin)\n"
+"[-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"\t(số dòng tối đa)\n"
+"[-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"\t(thay thế chuỗi)\n"
+"[-n max-args] [--max-args=max-args]     (số đối số tối đa)\n"
+"[-s max-chars] [--max-chars=max-chars]    (số ký tự tối đa)\n"
+"[-P max-procs]  [--max-procs=max-procs]    (số tiến trình tối đa)\n"
+"[--verbose]\t\t\t\t\t\t(xuất chi tiết)\n"
+"[--exit] \t\t\t\t\t\t\t(thoát)\n"
+"[--no-run-if-empty] \t\t(đừng chạy nếu trống)\n"
+"[--arg-file=tập_tin]\t\t\t\t(tập tin đối số)\n"
+"[--version]\t\t\t\t\t\t(phiên bản)\n"
+"[--help]\t\t\t\t\t\t\t(trợ giúp)\n"
+"[lệnh [các_đối_số_đầu]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "không thể lấy thư mục hiện có"
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
new file mode 100644 (file)
index 0000000..c8b1723
Binary files /dev/null and b/po/zh_CN.gmo differ
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644 (file)
index 0000000..96e2574
--- /dev/null
@@ -0,0 +1,1361 @@
+# Chinese Simplified translation about findutils
+# Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the findutils package.
+# Wang Li <charles@linux.net.cn>, 2002.
+# Ji ZhengYu <zhengyuji@gmail.com>, 2008, 2009, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils-4.5.7\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2010-04-20 16:12中国标准时间\n"
+"Last-Translator: Ji ZhengYu <zhengyuji@gmail.com>\n"
+"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: Plural-Forms: nplurals=1; plural=0;\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr "无法初始化共享文件哈希表"
+
+#: find/find.c:205
+#, c-format
+msgid "cannot stat current directory"
+msgstr "无法 stat 当前目录"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr "无法读取挂载设备列表。"
+
+#: find/find.c:385
+#, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "警告: 文件系统 %s 最近已被卸载过了。"
+
+#: find/find.c:395
+#, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "警告: 文件系统 %s 最近已被挂载过了。"
+
+#: find/find.c:491
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"%3$s 执行期间 %1$s%2$s 改变了(原来的设备号 %4$ld,新的设备号 %5$ld,文件系统"
+"类型 %6$s) [ref %7$ld]"
+
+#: find/find.c:528
+#, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"%3$s 执行期间 %1$s%2$s 改变了(原来的索引节点号 %4$<PRIuMAX>,新的索引节点号 "
+"%5$<PRIuMAX>,文件系统类型 %6$s) [ref %7$ld]"
+
+#: find/find.c:693
+#, c-format
+msgid "failed to return to parent directory"
+msgstr "无法回到上级目录"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr "无法安全的更改目录至 %s"
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+"符号链接 %s 是目录层级体系中一个循环的一部分;我们已经浏览过它所指向的目录。"
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+"探测到文件系统循环;%s 拥有与文件系统体系中 %d 级深度的目录一样的设备号和索引"
+"节点"
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr "警告: 符号链接 %s 无法检索"
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+"警告: %s 的硬链接数错误(仅查到 st_nlink=%<PRIuMAX> 但我们已经查到 %<PRIuMAX> "
+"个子目录): 这可能是您文件系统驱动中的错误。find 的 -noleaf 选项是自动开启的。"
+"之前的查找结果可能无法包括应该已被找到的目录。"
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr "无法读取挂载文件系统列表"
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr "未知"
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr "探测到文件系统循环;%s 是与 %s 相同的文件系统循环的一部分。"
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr "警告: 文件 %s 的权限看上去为 0000"
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr "无法查找 %s"
+
+#: find/ftsfind.c:599
+#, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "无法在查寻 %s 后还原工作目录"
+
+#: find/parser.c:471
+#, fuzzy, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+"-delete 动作自动开启了 -depth 选项,但当 -depth 起作用时 -prune 就没什么用"
+"了。如果您真想继续运行,就请明确使用 -depth 选项。"
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+"警告: 您在非选项参数 %2$s 后定义了 %1$s 选项,但选项不是位置选项 (%3$s 影响在"
+"它之前或之后的指定的比较测试)。请在其它参数之前指定选项。\n"
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"警告: 不赞成使用 -d 选项;请使用 -depth 代替,因为后者更符合 POSIX 特性。"
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+"%s 不是已存在用户组的名称并且它看起来不像是个数字组 ID,因为它有个非预期的后"
+"缀 %s"
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr "%s 不是已存在用户组的名称"
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr "-group 的参数列表为空,但应该给出一个用户组名"
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"默认路径为当前目录;默认表达式为 -print\n"
+"表达式可能由下列成份组成:操作符、选项、测试表达式以及动作:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"操作符 (优先级递减;未做任何指定时默认使用 -and):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"位置选项 (总是真): -daystart -follow -regextype\n"
+"\n"
+"普通选项 (总是真,在其它表达式前指定):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"比较测试 (N 可以是 +N 或 -N 或 N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer 文件 -ctime N -empty -false -fstype 类型 -gid N -group 名称\n"
+"      -ilname 匹配模式 -iname 匹配模式 -inum N -ipath 匹配模式 -iregex 匹配模"
+"式\n"
+"      -links N -lname 匹配模式 -mmin N -mtime N -name 匹配模式 -newer 文件"
+
+#: find/parser.c:1244
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path 匹配模式 -perm [+-]访问模式 -regex 匹配模式\n"
+"      -readable -writable -executable\n"
+"      -wholename 匹配模式 -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user 用户名 -xtype [bcdpfls]"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr "      -context 文本\n"
+
+#: find/parser.c:1251
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"\n"
+"操作: -delete -print0 -printf 格式 -fprintf 文件 格式 -print \n"
+"      -fprint0 文件 -fprint 文件 -ls -fls 文件 -prune -quit\n"
+"      -exec 命令 ; -exec 命令 {} + -ok 命令 ;\n"
+"      -execdir 命令 ; -execdir 命令 {} + -okdir 命令 ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"通过 findutils 错误报告页 http://savannah.gnu.org/ 报告错误及跟踪修定过程。如"
+"果您无法浏览网页,请发电子邮件至 <bug-findutils@gnu.org>。"
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "fnmatch() 库函数的健全性检测失败了。"
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"警告: Unix 文件名通常不包括 / 符号(但目录名中有这个符号)。这意味着‘%s %s’可能"
+"在此系统中永远等同于错误。您可能会发现‘-wholename’参数更有效,或者也许是‘-"
+"samefile’。又或者,如果您使用 GNU grep,您可使用‘find ... -print0 | grep -"
+"FzZ %s’。"
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr "本应对 %s 使用一个十进制的正整数作为参数,但却使用了 %s"
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr "此系统未提供查找文件生成时间的方法。"
+
+#: find/parser.c:1638
+#, c-format
+msgid "The %s test needs an argument"
+msgstr "%s 测试需要参数"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr "我无法找到将 %s 解释为日期或时间的方法"
+
+#: find/parser.c:1692
+#, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "无法获得文件 %s 的生成时间"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr "警告: -%s 由于 %s 以 / 结尾因此无法匹配任何内容。"
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr "当开启 POSIXLY_CORRECT 时模式 %s 无效。"
+
+#: find/parser.c:2039
+#, c-format
+msgid "invalid mode %s"
+msgstr "非法权限 %s"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+"警告: 您已经指定了一个权限字串 %s(它等同于 /000)。-perm /000 的意思现在已被更"
+"改至与 -perm 000 一致了;那即是说,以前它不匹配任何文件,而现在它匹配所有文"
+"件。"
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "-size 的 null 参数无效"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "无效的 -size 类型“%c”"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "-size 的参数‘%s%c’无效"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr "-show-control-chars 选项仅带一个参数,它必须是‘literal’或‘safe’"
+
+#: find/parser.c:2630
+#, c-format
+msgid "Invalid argument %s to -used"
+msgstr "-used 的参数 %s 无效"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr "用户名 %s 未知"
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr "-user 选项的参数不可以为空"
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "开启的特性: "
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr "-context 中的文本内容非法: SELinux 未开启。"
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr "-type 的参数应当仅包含一个字母"
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr "-type 的参数未知: %c"
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "敬告:无法识别的转义字符“\\%c”"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr "错误: %s 位于格式字符串的末尾"
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr "警告:不可识别的格式指令“%%%c”"
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr "错误: 格式指令‘%%%c’是留给将来使用的。"
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"当前目录包含在了 PATH 环境变量中,与 find 的 %s 动作合用时不安全。请从您的 "
+"$PATH 变量中删除当前目录(即删除“.”或冒号前面或后面的东西)"
+
+#: find/parser.c:3272
+#, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"相对路径 %s 包含在了 PATH 环境变量中,与 find 的 %s 动作合用时不安全。请从 "
+"$PATH 变量中删除那个条目"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr "您不可以在 -execdir 和 -okdir 中使用 {},因为这会带来潜在的安全问题。"
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "-exec%s ... + 仅支持一个 {} 实例"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, c-format
+msgid "The environment is too large for exec()."
+msgstr "对 exec() 操作来说执行环境过大。"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr "将 %s 天换算为秒数时出现算术溢出"
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr "尝试计算本日终止时刻时出现算术溢出"
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr "标准错误"
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr "标准输出"
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr "无法删除 %s"
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "无法在查寻 %s 后还原工作目录"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr "getfilecon 失败: %s"
+
+#: find/pred.c:1507
+#, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "警告: 无法确定文件 %s 的生成时间"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr "无法关闭标准输入"
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr "无法更改目录"
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "无法 fork"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "等待 %s 时出错"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s 由于信号 %d 而终止"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "非法表达式"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr "非法表达式;您在一个二元操作符‘%s’前未带任何东西。"
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr "在‘%s’和‘)’之间需要一个表达式"
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr "在‘%s’后需要一个表达式"
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "非法表达式;您使用了太多的‘)’"
+
+#: find/tree.c:184
+#, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr "非法表达式;需要一个‘)’但未找到。也许您需要在‘%s’后加上额外的判定"
+
+#: find/tree.c:192
+#, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "非法表达式;不允许使用空白的圆括号。"
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "非法表达式;我原来希望能在某处找到‘)’,但未找到。"
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "哎呀 -- 无效的表达式类型!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "哎 -- 无效的表达式类型(%d)!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, c-format
+msgid "paths must precede expression: %s"
+msgstr "路径必须在表达式之前: %s"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr "未知的断言“%s”"
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr "无效断言“%s”"
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "“%2$s”的无效参数“%1$s”"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "遗漏“%s”的参数"
+
+#: find/tree.c:1406
+#, c-format
+msgid "you have too many ')'"
+msgstr "您使用了太多的‘)’"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr "非预期的无效断言“%s”"
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr "非预期的无效断言"
+
+#: find/tree.c:1547
+#, fuzzy, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr "哎 -- 无效的默认插入!"
+
+#: find/util.c:171
+#, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "用法: %s [-H] [-L] [-P] [-Olevel] [-D "
+
+#: find/util.c:173
+#, c-format
+msgid "] [path...] [expression]\n"
+msgstr "] [path...] [expression]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "无法获取当前工作目录"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "无法获取当前工作目录"
+
+#: find/util.c:816
+#, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "忽略不可识别的调试标记 %s"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr "-D 选项的参数列表为空"
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr "-O 选项后面必须立即带上一个十进制整数"
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr "请在 -O 选项后面立即指定一个十进制数"
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr "无效的优化级 %s"
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr "优化级别 %lu 太高了。如果您想很快地找到文件,考虑使用 GNU locate。"
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"不支持环境变量 FIND_BLOCK_SIZE,仅环境变量 POSIXLY_CORRECT 会影响块大小"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr "命令过长"
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr "由于参数数量限制,无法调用 exec()"
+
+#: lib/buildcmd.c:381
+#, fuzzy, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr "无法使用合适的带参数列表大小限制的单一参数"
+
+#: lib/buildcmd.c:387
+#, c-format
+msgid "argument list too long"
+msgstr "参数列表过长"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr "环境变量 %s 未设为一个有效十进制数"
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr "Eric B. Decker"
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr "James Youngman"
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr "Kevin Dalley"
+
+#: lib/findutils-version.c:64
+#, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "以 GNU gnulib 版本 %s 构建\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr "在 %2$s 中有非预期的后缀 %1$s"
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr "需要一个整数: %s"
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr "未知的正则表达式类型 %s;合法的类型是 %s。"
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"用法: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"将错误报告发送到 <bug-findutils@gnu.org>。\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr "写入错误"
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr "用法: %s [-0 | --null] [--version] [--help]\n"
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr "您需要以十进制整数指定一个安全级别"
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr "安全级 %s 超出可转换范围"
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr "安全级 %s 有非预期的后缀 %s。"
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr "不支持 slocate 安全级 %ld。"
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr "无法写入标准输出"
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "天"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr "--max-database-age 选项的参数不允为空"
+
+#: locate/locate.c:209 locate/locate.c:216
+#, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "--max-database-age 选项的参数 %s 无效"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr "locate 数据库 %s 包含一个比 locate 所能处理的文件名更长的文件名`"
+
+#: locate/locate.c:603
+#, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate 数据库 %s 损坏或无效"
+
+#: locate/locate.c:893
+#, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "Locate 数据库大小: %s 字节\n"
+
+#: locate/locate.c:900
+#, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "正在匹配文件名: %s\n"
+
+#: locate/locate.c:901
+#, c-format
+msgid "All Filenames: %s\n"
+msgstr "所有文件名: %s\n"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+"文件名累计长度 %s 字节。\n"
+"在那些文件名中,\n"
+"\n"
+"\t包括空格 %s 个,\n"
+"\t空行 %s 个,\n"
+"\t以及带有高字节位设置的字符 %s 个。\n"
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr "某些文件名可能被过滤掉了,因此我们无法计算压缩率。\n"
+
+#: locate/locate.c:934
+#, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "压缩率 %4.2f%% (越高越好)\n"
+
+#: locate/locate.c:941
+#, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "压缩率未定义\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+"locate 数据库 %s 看上去像是个 slocate 数据库,但它好像有安全级 %c,而目前 "
+"GNU findutils 不支持此安全级"
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+"%s 是一个 slocate 数据库。这些支持都是新开发的,目前希望能提交错误报告。"
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr "%s 是一个不支持的安全级为 %d 的 slocate 数据库;跳过。"
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+"您指定了 -E 选项,但那个选项无法和带非零安全级的 slocate 格式的数据库一同使"
+"用。此数据库不会生成任何结果。\n"
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr "%s 是一个 slocate 数据库。开启‘-e’选项。"
+
+#: locate/locate.c:1189
+#, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "旧格式的 locate 数据库 %s 太短因而无效"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "数据库 %s 的格式为 %s。\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr "数据库是 little-endian 编码的。\n"
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr "数据库是 big-endian 编码的。\n"
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr "数据库编码方式不明显。\n"
+
+#: locate/locate.c:1400
+#, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"用法: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr "无法放弃组特权"
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr "无法放弃 setuid 特权"
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr "无法完全放弃特权"
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr "无法放弃 setgid 特权"
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr "警告: locate 数据库仅能从标准输入读取一次。"
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr "时间系统调用失败"
+
+#: locate/locate.c:1856
+#, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "警告: 数据库“%s”比 %d %s 还陈旧(实际时间 %.1f %s)"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr "警告: locate 数据库 %s 以不同的字节顺序构建"
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr "在 %s 中有非预期的 EOF"
+
+#: locate/word_io.c:146
+#, c-format
+msgid "error reading a word from %s"
+msgstr "从 %s 中读取单词时出错"
+
+#: xargs/xargs.c:258
+#, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "在输入分隔定义中有无效转义序列 %s。"
+
+#: xargs/xargs.c:276
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr "在输入分隔定义中有无效的转义序列 %s;字符值不能超过 %lx。"
+
+#: xargs/xargs.c:282
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr "在输入分隔定义中有无效的转义序列 %s;字符值不能超过 %lo。"
+
+#: xargs/xargs.c:291
+#, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr "在输入分隔定义中有无效的转义序列 %s;不可识别后续字符 %s。"
+
+#: xargs/xargs.c:336
+#, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"无效的输入分隔定义 %s: 分隔符要么是单一字符要么是以 \\ 开始的转义序列。"
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "对 exec 来说环境过大"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr "警告: -s 选项的值 %ld 太大了,用 %ld 代替"
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, c-format
+msgid "Cannot open input file %s"
+msgstr "无法打开输入文件 %s"
+
+#: xargs/xargs.c:669
+#, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "您的环境变量占有 %<PRIuMAX> 个字节\n"
+
+#: xargs/xargs.c:672
+#, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "此系统的参数长度 POSIX 上限: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:675
+#, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr "所有系统中所允许的最小参数长度 POSIX 上限: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:678
+#, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "我们实际能用的最大命令长度: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:681
+#, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "我们实际能用的命令缓冲区的大小: %<PRIuMAX>\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+"\n"
+"xargs 中的命令现在将继续执行,并且它会尝试读取输入并运行命令;如果您不想它发"
+"生,请按下“文件结束”按键(ctrl-D)。\n"
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr "警告: %s 将至少运行一次。如果您不想它发生,请按下中断按键。(ctrl-C)\n"
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"未匹配的 %s 引用;默认情况下,引用是针对 xargs 的,除非您使用了 -0 选项"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "双"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "单"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+"警告: 输入中有个 NUL 字符。它不能在参数列表中传送。您是想用 --null 选项吗?"
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "参数行过长"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr "无法打开 /dev/tty 用于读取"
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr "无法在派生子进程之前创建管道"
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr "xargs_do_exec 中的 errno-buffer 读取失败(这可能是个 bug,请报告给我们)"
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr "读取操作返回的是非预期值 %d;这可能是个 bug,请报告给我们"
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "等待子进程时出错"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr "警告: 失去 %d 子进程的踪迹"
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s:以状态 255 退出;中止"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s:因信号 %d 而停止"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s:因信号 %d 而终止"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s:选项 -%c 的数值无效\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: 选项 -%c 的值必须 >= %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: 选项 -%c 的值必须 < %ld\n"
+
+#: xargs/xargs.c:1508
+#, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"用法: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "无法获取当前目录"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "“%2$s”的参数 %1$s 无效"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "“%2$s”的参数 %1$s 有歧义"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "合法的参数为:"
+
+#~ msgid "error closing file"
+#~ msgstr "文件关闭错误"
+
+#~ msgid "Unknown system error"
+#~ msgstr "未知的系统错误"
+
+#~ msgid "%s: option `%s' is ambiguous\n"
+#~ msgstr "%s:选项“%s”有歧义\n"
+
+#~ msgid "%s: option `--%s' doesn't allow an argument\n"
+#~ msgstr "%s:选项“--%s”不接受参数\n"
+
+#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
+#~ msgstr "%s:选项“%c%s”不接受参数\n"
+
+#~ msgid "%s: option `%s' requires an argument\n"
+#~ msgstr "%s:选项“%s”需要一个参数\n"
+
+#~ msgid "%s: unrecognized option `--%s'\n"
+#~ msgstr "%s:无法识别的选项“--%s”\n"
+
+#~ msgid "%s: unrecognized option `%c%s'\n"
+#~ msgstr "%s:无法识别的选项“%c%s”\n"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s:非法选项 -- %c\n"
+
+#~ msgid "%s: invalid option -- %c\n"
+#~ msgstr "%s:非法选项 -- %c\n"
+
+#~ msgid "%s: option requires an argument -- %c\n"
+#~ msgstr "%s:选项需要一个参数 -- %c\n"
+
+#~ msgid "%s: option `-W %s' is ambiguous\n"
+#~ msgstr "%s:选项“-W %s”有二义性\n"
+
+#~ msgid "%s: option `-W %s' doesn't allow an argument\n"
+#~ msgstr "%s:选项“-W %s”不接受参数\n"
+
+#~ msgid "`"
+#~ msgstr "“"
+
+#~ msgid "'"
+#~ msgstr "”"
+
+#~ msgid "Success"
+#~ msgstr "成功"
+
+#~ msgid "No match"
+#~ msgstr "没有匹配"
+
+#~ msgid "Invalid regular expression"
+#~ msgstr "无效的常规表达式"
+
+#~ msgid "Invalid collation character"
+#~ msgstr "无效的校勘字符"
+
+#~ msgid "Invalid character class name"
+#~ msgstr "无效的字符类名"
+
+#~ msgid "Trailing backslash"
+#~ msgstr "末尾的反斜线"
+
+#~ msgid "Invalid back reference"
+#~ msgstr "无效的向后引用"
+
+#~ msgid "Unmatched [ or [^"
+#~ msgstr "不匹配的 [ 或 [^"
+
+#~ msgid "Unmatched ( or \\("
+#~ msgstr "不匹配的 ( 或 \\("
+
+#~ msgid "Unmatched \\{"
+#~ msgstr "不匹配的 \\{"
+
+#~ msgid "Invalid content of \\{\\}"
+#~ msgstr "无效的 \\{\\} 的内容"
+
+#~ msgid "Invalid range end"
+#~ msgstr "无效的结束范围"
+
+#~ msgid "Memory exhausted"
+#~ msgstr "内存耗尽"
+
+#, fuzzy
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "无效正则表达式前缀"
+
+#~ msgid "Premature end of regular expression"
+#~ msgstr "正则表达式急于结束"
+
+#~ msgid "Regular expression too big"
+#~ msgstr "常规表达式过大"
+
+#~ msgid "Unmatched ) or \\)"
+#~ msgstr "不匹配的 ) 或 \\)"
+
+#~ msgid "No previous regular expression"
+#~ msgstr "没有上一个常规表达式"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "memory exhausted"
+#~ msgstr "内存耗尽"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "无效的 %s%s 的参数“%s”"
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "%s%s 的参数“%s”有无效后缀"
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "%s%s 的参数“%s”过长"
diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo
new file mode 100644 (file)
index 0000000..6a275f3
Binary files /dev/null and b/po/zh_TW.gmo differ
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644 (file)
index 0000000..964a94c
--- /dev/null
@@ -0,0 +1,1348 @@
+# traditional Chinese translation of findutils.
+# Copyright (C) 2005, 2010 Free Software Foundation, Inc.
+# Abel Cheung <abelcheung@gmail.com>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: findutils 4.2.26\n"
+"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n"
+"POT-Creation-Date: 2011-05-11 09:58+0100\n"
+"PO-Revision-Date: 2005-12-06 11:30+0800\n"
+"Last-Translator: Abel Cheung <abelcheung@gmail.com>\n"
+"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
+"Language: zh_TW\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: find/find.c:148 find/ftsfind.c:667
+#, c-format
+msgid "Failed initialise shared-file hash table"
+msgstr ""
+
+#: find/find.c:205
+#, fuzzy, c-format
+msgid "cannot stat current directory"
+msgstr "無法決定當前目錄位置"
+
+#: find/find.c:296
+#, c-format
+msgid "Cannot read list of mounted devices."
+msgstr ""
+
+#: find/find.c:385
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been unmounted."
+msgstr "警告︰檔案系統 %s 剛剛被卸載。"
+
+#: find/find.c:395
+#, fuzzy, c-format
+msgid "WARNING: file system %s has recently been mounted."
+msgstr "警告︰檔案系統 %s 剛剛被掛載。"
+
+#: find/find.c:491
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old device number %ld, new device "
+"number %ld, file system type is %s) [ref %ld]"
+msgstr ""
+"執行 %3$s 時 %1$s%2$s 有所更改 (舊裝置編號為 %4$ld,新裝置編號為 %5$ld,檔案"
+"系統類型為 %6$s) [ref %7$ld]"
+
+#: find/find.c:528
+#, fuzzy, c-format
+msgid ""
+"%s%s changed during execution of %s (old inode number %<PRIuMAX>, new inode "
+"number %<PRIuMAX>, file system type is %s) [ref %ld]"
+msgstr ""
+"執行 %3$s 時 %1$s%2$s 有所更改 (舊 inode 編號為 %4$ld,新 inode 編號為 "
+"%5$ld,檔案系統類型為 %6$s) [ref %7$ld]"
+
+#: find/find.c:693
+#, fuzzy, c-format
+msgid "failed to return to parent directory"
+msgstr "無法決定當前目錄位置"
+
+#: find/find.c:980
+#, c-format
+msgid "Failed to safely change directory into %s"
+msgstr ""
+
+#: find/find.c:1078 find/ftsfind.c:245
+#, c-format
+msgid ""
+"Symbolic link %s is part of a loop in the directory hierarchy; we have "
+"already visited the directory to which it points."
+msgstr ""
+
+#: find/find.c:1097
+#, c-format
+msgid ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d level higher in the file system hierarchy"
+msgid_plural ""
+"Filesystem loop detected; %s has the same device number and inode as a "
+"directory which is %d levels higher in the file system hierarchy"
+msgstr[0] ""
+msgstr[1] ""
+
+#: find/find.c:1343
+#, c-format
+msgid "warning: not following the symbolic link %s"
+msgstr ""
+
+#: find/find.c:1386
+#, c-format
+msgid ""
+"WARNING: Hard link count is wrong for %s (saw only st_nlink=%<PRIuMAX> but "
+"we already saw %<PRIuMAX> subdirectories): this may be a bug in your file "
+"system driver.  Automatically turning on find's -noleaf option.  Earlier "
+"results may have failed to include directories that should have been "
+"searched."
+msgstr ""
+
+#: find/fstype.c:203
+#, c-format
+msgid "Cannot read mounted file system list"
+msgstr ""
+
+#: find/fstype.c:250
+msgid "unknown"
+msgstr ""
+
+#: find/ftsfind.c:259
+#, c-format
+msgid ""
+"File system loop detected; %s is part of the same file system loop as %s."
+msgstr ""
+
+#: find/ftsfind.c:444 find/util.c:214
+#, c-format
+msgid "WARNING: file %s appears to have mode 0000"
+msgstr ""
+
+#: find/ftsfind.c:559
+#, c-format
+msgid "cannot search %s"
+msgstr ""
+
+#: find/ftsfind.c:599
+#, fuzzy, c-format
+msgid "failed to restore working directory after searching %s"
+msgstr "無法決定當前目錄位置"
+
+#: find/parser.c:471
+#, c-format
+msgid ""
+"The -delete action automatically turns on -depth, but -prune does nothing "
+"when -depth is in effect.  If you want to carry on anyway, just explicitly "
+"use the -depth option."
+msgstr ""
+
+#: find/parser.c:618
+#, c-format
+msgid ""
+"warning: you have specified the %s option after a non-option argument %s, "
+"but options are not positional (%s affects tests specified before it as well "
+"as those specified after it).  Please specify options before other "
+"arguments.\n"
+msgstr ""
+
+#: find/parser.c:914
+#, c-format
+msgid ""
+"warning: the -d option is deprecated; please use -depth instead, because the "
+"latter is a POSIX-compliant feature."
+msgstr ""
+"警告:-d 選項已經過時,請改用 -depth,因為後者才是符合 POSIX 標準的選項。"
+
+#: find/parser.c:1184
+#, c-format
+msgid ""
+"%s is not the name of an existing group and it does not look like a numeric "
+"group ID because it has the unexpected suffix %s"
+msgstr ""
+
+#: find/parser.c:1199
+#, c-format
+msgid "%s is not the name of an existing group"
+msgstr ""
+
+#: find/parser.c:1205
+#, c-format
+msgid "argument to -group is empty, but should be a group name"
+msgstr ""
+
+#: find/parser.c:1227
+msgid ""
+"\n"
+"default path is the current directory; default expression is -print\n"
+"expression may consist of: operators, options, tests, and actions:\n"
+msgstr ""
+"\n"
+"預設路徑為目前的目錄,預設的表達式是 -print\n"
+"表達式可以包括運算子、選項、測試和操作模式:\n"
+
+#: find/parser.c:1230
+msgid ""
+"operators (decreasing precedence; -and is implicit where no others are "
+"given):\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+msgstr ""
+"以下的運算子優先次序由高至低排列;如果沒有運算子,則會假設為 -and :\n"
+"      ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2\n"
+"      EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2\n"
+
+#: find/parser.c:1234
+msgid ""
+"positional options (always true): -daystart -follow -regextype\n"
+"\n"
+"normal options (always true, specified before other expressions):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+msgstr ""
+"位置選項 (邏輯值永遠為 true): -daystart -follow -regextype\n"
+"\n"
+"一般選項 (邏輯值永遠為 true,必須加在其它表達式之前):\n"
+"      -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n"
+"      --version -xdev -ignore_readdir_race -noignore_readdir_race\n"
+
+#: find/parser.c:1239
+msgid ""
+"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+msgstr ""
+"測試 (N 可以有或沒有正負號): -amin N -anewer FILE -atime N -cmin N\n"
+"      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n"
+"      -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex "
+"PATTERN\n"
+"      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"
+
+#: find/parser.c:1244
+#, fuzzy
+msgid ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -readable -writable -executable\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]"
+msgstr ""
+"      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n"
+"      -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
+"      -used N -user NAME -xtype [bcdpfls]\n"
+
+#: find/parser.c:1249
+msgid "      -context CONTEXT\n"
+msgstr ""
+
+#: find/parser.c:1251
+#, fuzzy
+msgid ""
+"\n"
+"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+msgstr ""
+"操作模式: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n"
+"      -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n"
+"      -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n"
+"      -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n"
+
+#: find/parser.c:1257
+msgid ""
+"Report (and track progress on fixing) bugs via the findutils bug-reporting\n"
+"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n"
+"email to <bug-findutils@gnu.org>."
+msgstr ""
+"請在 http://savannah.gnu.org/ 有關錯誤報告的網頁中匯報錯誤 (或者跟進\n"
+"問題修正的進度)。又或者如果您無法瀏覽網頁,可以選擇用電子郵件寄至\n"
+"<bug-findutils@gnu.org>。"
+
+#: find/parser.c:1312
+#, c-format
+msgid "sanity check of the fnmatch() library function failed."
+msgstr "測試 fnmatch() 是否可用時出錯。"
+
+#: find/parser.c:1326
+#, c-format
+msgid ""
+"warning: Unix filenames usually don't contain slashes (though pathnames "
+"do).  That means that '%s %s' will probably evaluate to false all the time "
+"on this system.  You might find the '-wholename' test more useful, or "
+"perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could "
+"use 'find ... -print0 | grep -FzZ %s'."
+msgstr ""
+"警告:Unix 檔案名稱中一般上不會出現斜號 (雖然完整路徑會用斜號)。即是說,在本"
+"系統中 ‘%s %s’ 可能永遠是 false。在這情況下 ‘-wholename’ 或 ‘-samefile’可能會"
+"有用。又或者,如果您使用 GNU grep,可以嘗試使用 'find ... -print0 | grep -"
+"FzZ %s'。"
+
+#: find/parser.c:1452
+#, c-format
+msgid "Expected a positive decimal integer argument to %s, but got %s"
+msgstr ""
+
+#: find/parser.c:1617
+#, c-format
+msgid "This system does not provide a way to find the birth time of a file."
+msgstr ""
+
+#: find/parser.c:1638
+#, fuzzy, c-format
+msgid "The %s test needs an argument"
+msgstr "%s:選項 ‘%s’ 需要參數\n"
+
+#: find/parser.c:1675
+#, c-format
+msgid "I cannot figure out how to interpret %s as a date or time"
+msgstr ""
+
+#: find/parser.c:1692
+#, fuzzy, c-format
+msgid "Cannot obtain birth time of file %s"
+msgstr "無法開啟檔案 ‘%s’ 作為輸入資料"
+
+#: find/parser.c:1900
+#, c-format
+msgid "warning: -%s %s will not match anything because it ends with /."
+msgstr ""
+
+#: find/parser.c:1956
+#, c-format
+msgid "Mode %s is not valid when POSIXLY_CORRECT is on."
+msgstr ""
+
+#: find/parser.c:2039
+#, fuzzy, c-format
+msgid "invalid mode %s"
+msgstr "模式 ‘%s’ 無效"
+
+#: find/parser.c:2058
+#, c-format
+msgid ""
+"warning: you have specified a mode pattern %s (which is equivalent to /000). "
+"The meaning of -perm /000 has now been changed to be consistent with -perm "
+"-000; that is, while it used to match no files, it now matches all files."
+msgstr ""
+
+#: find/parser.c:2274
+#, c-format
+msgid "invalid null argument to -size"
+msgstr "-size 後是無效的空白參數"
+
+#: find/parser.c:2324
+#, c-format
+msgid "invalid -size type `%c'"
+msgstr "-size 指定的檔案大小單位 ‘%c’ 無效"
+
+#: find/parser.c:2334
+#, fuzzy, c-format
+msgid "Invalid argument `%s%s' to -size"
+msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效"
+
+#: find/parser.c:2516
+msgid ""
+"The -show-control-chars option takes a single argument which must be "
+"'literal' or 'safe'"
+msgstr ""
+
+#: find/parser.c:2630
+#, fuzzy, c-format
+msgid "Invalid argument %s to -used"
+msgstr "%2$s 的參數 %1$s 無效"
+
+#: find/parser.c:2671
+#, c-format
+msgid "%s is not the name of a known user"
+msgstr ""
+
+#: find/parser.c:2678
+#, c-format
+msgid "The argument to -user should not be empty"
+msgstr ""
+
+#: find/parser.c:2703
+#, c-format
+msgid "Features enabled: "
+msgstr "啟用了的功能:"
+
+#: find/parser.c:2780
+#, c-format
+msgid "invalid predicate -context: SELinux is not enabled."
+msgstr ""
+
+#: find/parser.c:2844
+#, c-format
+msgid "Arguments to -type should contain only one letter"
+msgstr ""
+
+#: find/parser.c:2893
+#, c-format
+msgid "Unknown argument to -type: %c"
+msgstr ""
+
+#: find/parser.c:3015
+#, c-format
+msgid "warning: unrecognized escape `\\%c'"
+msgstr "警告:無效辨認轉義控制序列 (escape sequence) ‘\\%c’"
+
+#: find/parser.c:3032
+#, c-format
+msgid "error: %s at end of format string"
+msgstr ""
+
+#: find/parser.c:3071
+#, c-format
+msgid "warning: unrecognized format directive `%%%c'"
+msgstr ""
+
+#: find/parser.c:3225
+#, c-format
+msgid "error: the format directive `%%%c' is reserved for future use"
+msgstr ""
+
+#: find/parser.c:3260
+#, c-format
+msgid ""
+"The current directory is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove the "
+"current directory from your $PATH (that is, remove \".\" or leading or "
+"trailing colons)"
+msgstr ""
+"PATH 環境變數中包括了當前目錄,當配合 find 的 %s 操作模式時會令系統安全產生漏"
+"洞。請在 $PATH 變數中移除當前目錄 (即是 “.”,或者最前或最後的冒號)"
+
+#: find/parser.c:3272
+#, fuzzy, c-format
+msgid ""
+"The relative path %s is included in the PATH environment variable, which is "
+"insecure in combination with the %s action of find.  Please remove that "
+"entry from $PATH"
+msgstr ""
+"PATH 環境變數中包括了當前目錄,當配合 find 的 %s 操作模式時會令系統安全產生漏"
+"洞。請在 $PATH 變數中移除當前目錄 (即是 “.”,或者最前或最後的冒號)"
+
+#: find/parser.c:3379
+#, c-format
+msgid ""
+"You may not use {} within the utility name for -execdir and -okdir, because "
+"this is a potential security problem."
+msgstr ""
+"您不應該在 -execdir 和 -okdir 中使用 {} 作為程式名稱,因為這樣做可能會造成安"
+"全漏洞。"
+
+#: find/parser.c:3405
+#, c-format
+msgid "Only one instance of {} is supported with -exec%s ... +"
+msgstr "在 -exec%s ... + 裡面只可以使用一次 {}"
+
+#: find/parser.c:3415
+#, c-format
+msgid "In %s the %s must appear by itself, but you specified %s"
+msgstr ""
+
+#: find/parser.c:3435
+#, fuzzy, c-format
+msgid "The environment is too large for exec()."
+msgstr "執行 exec 時的環境變數太大"
+
+#: find/parser.c:3603
+#, c-format
+msgid "arithmetic overflow while converting %s days to a number of seconds"
+msgstr ""
+
+#: find/parser.c:3627
+#, c-format
+msgid "arithmetic overflow when trying to calculate the end of today"
+msgstr ""
+
+#: find/parser.c:3786
+msgid "standard error"
+msgstr ""
+
+#: find/parser.c:3791
+msgid "standard output"
+msgstr ""
+
+#: find/pred.c:432
+#, c-format
+msgid "cannot delete %s"
+msgstr ""
+
+#: find/pred.c:580
+#, fuzzy, c-format
+msgid "Failed to save working directory in order to run a command on %s"
+msgstr "無法決定當前目錄位置"
+
+#: find/pred.c:1183 find/pred.c:1992
+#, c-format
+msgid "getfilecon failed: %s"
+msgstr ""
+
+#: find/pred.c:1507
+#, fuzzy, c-format
+msgid "WARNING: cannot determine birth time of file %s"
+msgstr "無法開啟檔案 ‘%s’ 作為輸入資料"
+
+#: find/pred.c:1571
+#, c-format
+msgid "< %s ... %s > ? "
+msgstr "< %s ... %s > ? "
+
+#: find/pred.c:2032
+#, c-format
+msgid "Cannot close standard input"
+msgstr ""
+
+#: find/pred.c:2061
+#, c-format
+msgid "Failed to change directory"
+msgstr ""
+
+#: find/pred.c:2092 xargs/xargs.c:1126
+#, c-format
+msgid "cannot fork"
+msgstr "fork 失敗"
+
+#: find/pred.c:2123
+#, c-format
+msgid "error waiting for %s"
+msgstr "等待 %s 時出現錯誤"
+
+#: find/pred.c:2132
+#, c-format
+msgid "%s terminated by signal %d"
+msgstr "%s 因訊號 %d 而終止"
+
+#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258
+#, c-format
+msgid "invalid expression"
+msgstr "表達式無效"
+
+#: find/tree.c:135
+#, c-format
+msgid ""
+"invalid expression; you have used a binary operator '%s' with nothing before "
+"it."
+msgstr ""
+
+#: find/tree.c:146
+#, c-format
+msgid "expected an expression between '%s' and ')'"
+msgstr ""
+
+#: find/tree.c:156
+#, c-format
+msgid "expected an expression after '%s'"
+msgstr ""
+
+#: find/tree.c:161
+#, c-format
+msgid "invalid expression; you have too many ')'"
+msgstr "表達式無效;出現太多的 ‘)’"
+
+#: find/tree.c:184
+#, fuzzy, c-format
+msgid ""
+"invalid expression; expected to find a ')' but didn't see one.  Perhaps you "
+"need an extra predicate after '%s'"
+msgstr "表達式無效;‘)’ 本應出現但實際上沒有"
+
+#: find/tree.c:192
+#, fuzzy, c-format
+msgid "invalid expression; empty parentheses are not allowed."
+msgstr "表達式無效;出現太多的 ‘)’"
+
+#: find/tree.c:198
+#, c-format
+msgid ""
+"invalid expression; I was expecting to find a ')' somewhere but did not see "
+"one."
+msgstr "表達式無效;‘)’ 本應出現但實際上沒有"
+
+#: find/tree.c:204 find/tree.c:827
+#, c-format
+msgid "oops -- invalid expression type!"
+msgstr "表達式類型無效!"
+
+#: find/tree.c:276
+#, c-format
+msgid "oops -- invalid expression type (%d)!"
+msgstr "表達式類型 (%d) 無效!"
+
+#: find/tree.c:1114
+#, c-format
+msgid ""
+"warning: there is no entry in the predicate evaluation cost table for "
+"predicate %s; please report this as a bug"
+msgstr ""
+
+#: find/tree.c:1288
+#, fuzzy, c-format
+msgid "paths must precede expression: %s"
+msgstr "路徑必須放在表達式之前"
+
+#: find/tree.c:1297
+#, c-format
+msgid "unknown predicate `%s'"
+msgstr ""
+
+#: find/tree.c:1317
+#, c-format
+msgid "invalid predicate `%s'"
+msgstr ""
+
+#: find/tree.c:1322
+#, c-format
+msgid "invalid argument `%s' to `%s'"
+msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效"
+
+#: find/tree.c:1330
+#, c-format
+msgid "missing argument to `%s'"
+msgstr "‘%s’ 後缺少了參數"
+
+#: find/tree.c:1406
+#, fuzzy, c-format
+msgid "you have too many ')'"
+msgstr "表達式無效;出現太多的 ‘)’"
+
+#: find/tree.c:1412
+#, c-format
+msgid "unexpected extra predicate '%s'"
+msgstr ""
+
+#: find/tree.c:1414
+#, c-format
+msgid "unexpected extra predicate"
+msgstr ""
+
+#: find/tree.c:1547
+#, c-format
+msgid "oops -- invalid default insertion of and!"
+msgstr ""
+
+#: find/util.c:171
+#, fuzzy, c-format
+msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D "
+msgstr "用法: %s [-H] [-L] [-P] [路徑...] [表達式]\n"
+
+#: find/util.c:173
+#, fuzzy, c-format
+msgid "] [path...] [expression]\n"
+msgstr "用法:%s [路徑...] [表達式]\n"
+
+#: find/util.c:451
+#, fuzzy, c-format
+msgid "failed to save initial working directory"
+msgstr "無法決定當前目錄位置"
+
+#: find/util.c:468
+#, fuzzy, c-format
+msgid "failed to restore initial working directory"
+msgstr "無法決定當前目錄位置"
+
+#: find/util.c:816
+#, fuzzy, c-format
+msgid "Ignoring unrecognised debug flag %s"
+msgstr "警告:無效辨認轉義控制序列 (escape sequence) ‘\\%c’"
+
+#: find/util.c:823
+#, c-format
+msgid "Empty argument to the -D option."
+msgstr ""
+
+#: find/util.c:839
+#, c-format
+msgid "The -O option must be immediately followed by a decimal integer"
+msgstr ""
+
+#: find/util.c:849 find/util.c:860
+#, c-format
+msgid "Please specify a decimal number immediately after -O"
+msgstr ""
+
+#: find/util.c:865 find/util.c:870
+#, c-format
+msgid "Invalid optimisation level %s"
+msgstr ""
+
+#: find/util.c:878
+#, c-format
+msgid ""
+"Optimisation level %lu is too high.  If you want to find files very quickly, "
+"consider using GNU locate."
+msgstr ""
+
+#: find/util.c:1022
+#, c-format
+msgid ""
+"The environment variable FIND_BLOCK_SIZE is not supported, the only thing "
+"that affects the block size is the POSIXLY_CORRECT environment variable"
+msgstr ""
+"環境變數 FIND_BLOCK_SIZE 已經不再支援,唯一一個能夠影響檔案區段大小的環境變數"
+"是 POSIXLY_CORRECT"
+
+#: lib/buildcmd.c:171
+#, c-format
+msgid "command too long"
+msgstr ""
+
+#: lib/buildcmd.c:311
+#, c-format
+msgid "can't call exec() due to argument size restrictions"
+msgstr ""
+
+#: lib/buildcmd.c:381
+#, c-format
+msgid "cannot fit single argument within argument list size limit"
+msgstr ""
+
+#: lib/buildcmd.c:387
+#, fuzzy, c-format
+msgid "argument list too long"
+msgstr "參數太長"
+
+#: lib/buildcmd.c:640
+#, c-format
+msgid "Environment variable %s is not set to a valid decimal number"
+msgstr ""
+
+#: lib/findutils-version.c:60
+msgid "Eric B. Decker"
+msgstr ""
+
+#: lib/findutils-version.c:61
+msgid "James Youngman"
+msgstr ""
+
+#: lib/findutils-version.c:62
+msgid "Kevin Dalley"
+msgstr ""
+
+#: lib/findutils-version.c:64
+#, fuzzy, c-format
+msgid "Built using GNU gnulib version %s\n"
+msgstr "GNU findutils %s 版本\n"
+
+#: lib/safe-atoi.c:76
+#, c-format
+msgid "Unexpected suffix %s on %s"
+msgstr ""
+
+#: lib/safe-atoi.c:82
+#, c-format
+msgid "Expected an integer: %s"
+msgstr ""
+
+#: lib/regextype.c:107
+#, c-format
+msgid "Unknown regular expression type %s; valid types are %s."
+msgstr ""
+
+#: locate/code.c:127
+#, c-format
+msgid ""
+"Usage: %s [--version | --help]\n"
+"or     %s most_common_bigrams < file-list > locate-database\n"
+msgstr ""
+"用法: %s [--version | --help]\n"
+"或     %s most_common_bigrams < 檔案清單 > locate資料庫\n"
+
+#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409
+#: xargs/xargs.c:1519
+msgid ""
+"\n"
+"Report bugs to <bug-findutils@gnu.org>.\n"
+msgstr ""
+"\n"
+"請向 <bug-findutils@gnu.org> 報告錯誤。\n"
+
+#: locate/code.c:149 locate/frcode.c:207
+#, c-format
+msgid "write error"
+msgstr ""
+
+#: locate/frcode.c:157
+#, c-format
+msgid "Usage: %s [-0 | --null] [--version] [--help]\n"
+msgstr ""
+
+#: locate/frcode.c:177
+#, c-format
+msgid "You need to specify a security level as a decimal integer."
+msgstr ""
+
+#: locate/frcode.c:185
+#, c-format
+msgid "Security level %s is outside the convertible range."
+msgstr ""
+
+#: locate/frcode.c:193
+#, c-format
+msgid "Security level %s has unexpected suffix %s."
+msgstr ""
+
+#: locate/frcode.c:251
+#, c-format
+msgid "slocate security level %ld is unsupported."
+msgstr ""
+
+#: locate/frcode.c:289
+#, c-format
+msgid "Failed to write to standard output"
+msgstr ""
+
+#: locate/locate.c:146
+msgid "days"
+msgstr "日"
+
+#: locate/locate.c:193
+#, c-format
+msgid "The argument for option --max-database-age must not be empty"
+msgstr ""
+
+#: locate/locate.c:209 locate/locate.c:216
+#, fuzzy, c-format
+msgid "Invalid argument %s for option --max-database-age"
+msgstr "%2$s 的參數 %1$s 無效"
+
+#: locate/locate.c:468
+#, c-format
+msgid "locate database %s contains a filename longer than locate can handle"
+msgstr ""
+
+#: locate/locate.c:603
+#, fuzzy, c-format
+msgid "locate database %s is corrupt or invalid"
+msgstr "locate 資料庫 ‘%s’ 內容已損壞或無效"
+
+#: locate/locate.c:893
+#, fuzzy, c-format
+msgid "Locate database size: %s byte\n"
+msgid_plural "Locate database size: %s bytes\n"
+msgstr[0] "locate 資料庫大小:%s 位元組\n"
+msgstr[1] "locate 資料庫大小:%s 位元組\n"
+
+#: locate/locate.c:900
+#, fuzzy, c-format
+msgid "Matching Filenames: %s\n"
+msgstr "檔案總數: %s,"
+
+#: locate/locate.c:901
+#, fuzzy, c-format
+msgid "All Filenames: %s\n"
+msgstr "檔案總數: %s,"
+
+#: locate/locate.c:907
+#, c-format
+msgid ""
+"File names have a cumulative length of %s bytes.\n"
+"Of those file names,\n"
+"\n"
+"\t%s contain whitespace, \n"
+"\t%s contain newline characters, \n"
+"\tand %s contain characters with the high bit set.\n"
+msgstr ""
+
+#: locate/locate.c:921
+#, c-format
+msgid ""
+"Some filenames may have been filtered out, so we cannot compute the "
+"compression ratio.\n"
+msgstr ""
+
+#: locate/locate.c:934
+#, fuzzy, c-format
+msgid "Compression ratio %4.2f%% (higher is better)\n"
+msgstr "壓縮比率 %4.2f%%\n"
+
+#: locate/locate.c:941
+#, fuzzy, c-format
+msgid "Compression ratio is undefined\n"
+msgstr "壓縮比率 %4.2f%%\n"
+
+#: locate/locate.c:996
+#, c-format
+msgid ""
+"locate database %s looks like an slocate database but it seems to have "
+"security level %c, which GNU findutils does not currently support"
+msgstr ""
+
+#: locate/locate.c:1109
+#, c-format
+msgid ""
+"%s is an slocate database.  Support for these is new, expect problems for "
+"now."
+msgstr ""
+
+#: locate/locate.c:1123
+#, c-format
+msgid ""
+"%s is an slocate database of unsupported security level %d; skipping it."
+msgstr ""
+
+#: locate/locate.c:1140
+#, c-format
+msgid ""
+"You specified the -E option, but that option cannot be used with slocate-"
+"format databases with a non-zero security level.  No results will be "
+"generated for this database.\n"
+msgstr ""
+
+#: locate/locate.c:1151
+#, c-format
+msgid "%s is an slocate database.  Turning on the '-e' option."
+msgstr ""
+
+#: locate/locate.c:1189
+#, fuzzy, c-format
+msgid "Old-format locate database %s is too short to be valid"
+msgstr "locate 資料庫 ‘%s’ 內容已損壞或無效"
+
+#: locate/locate.c:1341
+#, c-format
+msgid "Database %s is in the %s format.\n"
+msgstr "資料庫 %s 使用了%s格式。\n"
+
+#: locate/locate.c:1362
+msgid "The database has little-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1364
+msgid "The database has big-endian machine-word encoding.\n"
+msgstr ""
+
+#: locate/locate.c:1377
+#, c-format
+msgid "The database machine-word encoding order is not obvious.\n"
+msgstr ""
+
+#: locate/locate.c:1400
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n"
+"      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n"
+"      [--max-database-age D] [--version] [--help]\n"
+"      pattern...\n"
+msgstr ""
+"用法: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n"
+"      [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n"
+"      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n"
+"      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --"
+"stdio ]\n"
+"      [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n"
+"      [-version] [--help]\n"
+"      檔案名稱樣式...\n"
+
+#: locate/locate.c:1463
+msgid "failed to drop group privileges"
+msgstr ""
+
+#: locate/locate.c:1481
+msgid "failed to drop setuid privileges"
+msgstr ""
+
+#: locate/locate.c:1495
+msgid "Failed to fully drop privileges"
+msgstr ""
+
+#: locate/locate.c:1513
+msgid "failed to drop setgid privileges"
+msgstr ""
+
+#: locate/locate.c:1783
+#, c-format
+msgid "warning: the locate database can only be read from stdin once."
+msgstr "警告:locate 資料庫只可以由標準輸入讀取一次。"
+
+#: locate/locate.c:1845
+#, c-format
+msgid "time system call failed"
+msgstr ""
+
+# e.g. database `%s' is more than 8 days old
+#: locate/locate.c:1856
+#, fuzzy, c-format
+msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)"
+msgstr "警告:資料庫 ‘%s’ 是超過 %d %s前產生的"
+
+#: locate/word_io.c:96
+#, c-format
+msgid "WARNING: locate database %s was built with a different byte order"
+msgstr ""
+
+#: locate/word_io.c:143
+#, c-format
+msgid "unexpected EOF in %s"
+msgstr ""
+
+#: locate/word_io.c:146
+#, fuzzy, c-format
+msgid "error reading a word from %s"
+msgstr "等待 %s 時出現錯誤"
+
+#: xargs/xargs.c:258
+#, fuzzy, c-format
+msgid "Invalid escape sequence %s in input delimiter specification."
+msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法。"
+
+#: xargs/xargs.c:276
+#, fuzzy, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lx."
+msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法:字元值不可以超過 %lx。"
+
+#: xargs/xargs.c:282
+#, fuzzy, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; character "
+"values must not exceed %lo."
+msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法:字元值不可以超過 %lo。"
+
+#: xargs/xargs.c:291
+#, fuzzy, c-format
+msgid ""
+"Invalid escape sequence %s in input delimiter specification; trailing "
+"characters %s not recognised."
+msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法:無法辨認最後的字元 ‘%s’。"
+
+#: xargs/xargs.c:336
+#, fuzzy, c-format
+msgid ""
+"Invalid input delimiter specification %s: the delimiter must be either a "
+"single character or an escape sequence starting with \\."
+msgstr ""
+"分隔字元 ‘%s’ 不合法:分隔字元必須是一個 ASCII 字元或以反斜號 \\ 開始的轉義控"
+"制序列 (escape sequence)。"
+
+#: xargs/xargs.c:353
+#, c-format
+msgid "environment is too large for exec"
+msgstr "執行 exec 時的環境變數太大"
+
+#: xargs/xargs.c:561
+#, c-format
+msgid "warning: value %ld for -s option is too large, using %ld instead"
+msgstr ""
+
+#: xargs/xargs.c:629
+#, c-format
+msgid "Cannot set SIGUSR1 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:635
+#, c-format
+msgid "Cannot set SIGUSR2 signal handler"
+msgstr ""
+
+#: xargs/xargs.c:651
+#, fuzzy, c-format
+msgid "Cannot open input file %s"
+msgstr "無法開啟檔案 ‘%s’ 作為輸入資料"
+
+#: xargs/xargs.c:669
+#, fuzzy, c-format
+msgid "Your environment variables take up %<PRIuMAX> bytes\n"
+msgstr "環境變數總共用了 %ld 位元組\n"
+
+#: xargs/xargs.c:672
+#, fuzzy, c-format
+msgid "POSIX upper limit on argument length (this system): %<PRIuMAX>\n"
+msgstr "POSIX 標準中參數長度上下限為:%ld, %ld\n"
+
+#: xargs/xargs.c:675
+#, fuzzy, c-format
+msgid ""
+"POSIX smallest allowable upper limit on argument length (all systems): "
+"%<PRIuMAX>\n"
+msgstr "POSIX 標準中參數長度上下限為:%ld, %ld\n"
+
+#: xargs/xargs.c:678
+#, fuzzy, c-format
+msgid "Maximum length of command we could actually use: %<PRIuMAX>\n"
+msgstr "實際上可用的指令列長度上限:%ld\n"
+
+#: xargs/xargs.c:681
+#, fuzzy, c-format
+msgid "Size of command buffer we are actually using: %<PRIuMAX>\n"
+msgstr "實際上使用的指令列緩衝區大小:%ld\n"
+
+#: xargs/xargs.c:687
+#, c-format
+msgid ""
+"\n"
+"Execution of xargs will continue now, and it will try to read its input and "
+"run commands; if this is not what you wanted to happen, please type the end-"
+"of-file keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:695
+#, c-format
+msgid ""
+"Warning: %s will be run at least once.  If you do not want that to happen, "
+"then press the interrupt keystroke.\n"
+msgstr ""
+
+#: xargs/xargs.c:823 xargs/xargs.c:916
+#, c-format
+msgid ""
+"unmatched %s quote; by default quotes are special to xargs unless you use "
+"the -0 option"
+msgstr ""
+"%s引號不配合;除非使用 -0 選項,否則在預設模式下引號對於 xargs 來說是有特別意"
+"義的"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "double"
+msgstr "雙"
+
+#: xargs/xargs.c:824 xargs/xargs.c:917
+msgid "single"
+msgstr "單"
+
+#: xargs/xargs.c:936
+#, c-format
+msgid ""
+"WARNING: a NUL character occurred in the input.  It cannot be passed through "
+"in the argument list.  Did you mean to use the --null option?"
+msgstr ""
+
+#: xargs/xargs.c:946 xargs/xargs.c:1003
+#, c-format
+msgid "argument line too long"
+msgstr "參數太長"
+
+#: xargs/xargs.c:1031
+#, c-format
+msgid "failed to open /dev/tty for reading"
+msgstr ""
+
+#: xargs/xargs.c:1115
+#, c-format
+msgid "could not create pipe before fork"
+msgstr ""
+
+#: xargs/xargs.c:1184
+#, c-format
+msgid ""
+"errno-buffer read failed in xargs_do_exec (this is probably a bug, please "
+"report it)"
+msgstr ""
+
+#: xargs/xargs.c:1237
+#, c-format
+msgid ""
+"read returned unexpected value %d; this is probably a bug, please report it"
+msgstr ""
+
+#: xargs/xargs.c:1329
+#, c-format
+msgid "error waiting for child process"
+msgstr "等待子進程時出現錯誤"
+
+#: xargs/xargs.c:1362
+#, c-format
+msgid "WARNING: Lost track of %d child processes"
+msgstr ""
+
+#: xargs/xargs.c:1381
+#, c-format
+msgid "%s: exited with status 255; aborting"
+msgstr "%s: 回傳碼為 255;中止"
+
+#: xargs/xargs.c:1384
+#, c-format
+msgid "%s: stopped by signal %d"
+msgstr "%s: 因訊號 %d 而停止"
+
+#: xargs/xargs.c:1387
+#, c-format
+msgid "%s: terminated by signal %d"
+msgstr "%s: 因訊號 %d 而中止"
+
+#: xargs/xargs.c:1469
+#, c-format
+msgid "%s: invalid number for -%c option\n"
+msgstr "%s: -%c 選項後的數值無效\n"
+
+#: xargs/xargs.c:1476
+#, c-format
+msgid "%s: value for -%c option should be >= %ld\n"
+msgstr "%s: -%c 選項後的數值必須不小於 %ld\n"
+
+#: xargs/xargs.c:1490
+#, c-format
+msgid "%s: value for -%c option should be < %ld\n"
+msgstr "%s: -%c 選項後的數值必須小於 %ld\n"
+
+#: xargs/xargs.c:1508
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [command [initial-arguments]]\n"
+msgstr ""
+"用法:  %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n"
+"       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n"
+"       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n"
+"       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n"
+"       [-n max-args] [--max-args=max-args]\n"
+"       [-s max-chars] [--max-chars=max-chars]\n"
+"       [-P max-procs]  [--max-procs=max-procs]\n"
+"       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n"
+"       [--version] [--help] [指令 [指令的參數]]\n"
+
+#~ msgid "cannot get current directory"
+#~ msgstr "無法決定當前目錄位置"
+
+#~ msgid "invalid argument %s for %s"
+#~ msgstr "%2$s 的參數 %1$s 無效"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "%2$s 的參數 %1$s 不明確"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "有效的參數為:"
+
+#~ msgid "Unknown system error"
+#~ msgstr "不明的系統錯誤"
+
+#, fuzzy
+#~ msgid "%s: option '%s' is ambiguous\n"
+#~ msgstr "%s:選項 ‘%s’ 不明確\n"
+
+#, fuzzy
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s:選項 ‘--%s’ 不可配合參數使用\n"
+
+#, fuzzy
+#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
+#~ msgstr "%s:選項 ‘%c%s’ 不可配合參數使用\n"
+
+#, fuzzy
+#~ msgid "%s: option '%s' requires an argument\n"
+#~ msgstr "%s:選項 ‘%s’ 需要參數\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s:‘--%s’ 選項無法辨識\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option '%c%s'\n"
+#~ msgstr "%s:‘%c%s’ 選項無法辨識\n"
+
+#, fuzzy
+#~ msgid "%s: invalid option -- '%c'\n"
+#~ msgstr "%s:無效的選項 ─ %c\n"
+
+#, fuzzy
+#~ msgid "%s: option requires an argument -- '%c'\n"
+#~ msgstr "%s:選項需要參數 ─ %c\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s:選項 ‘-W %s’ 不明確\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s:選項 ‘-W %s’ 不可配合參數使用\n"
+
+#~ msgid "`"
+#~ msgstr "‘"
+
+#~ msgid "'"
+#~ msgstr "’"
+
+#, fuzzy
+#~ msgid "Invalid regular expression"
+#~ msgstr "表達式無效"
+
+#, fuzzy
+#~ msgid "Invalid preceding regular expression"
+#~ msgstr "表達式無效"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#, fuzzy
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效"
+
+#, fuzzy
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "參數太長"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s:不合法的選項 ─ %c\n"
+
+#~ msgid "block size"
+#~ msgstr "區段大小"
+
+#~ msgid ""
+#~ "warning: the predicate -ipath is deprecated; please use -iwholename "
+#~ "instead."
+#~ msgstr "警告:-ipath 選項已過時,請改用 -iwholename。"
+
+#~ msgid "GNU find version %s\n"
+#~ msgstr "GNU find %s 版本\n"
+
+#~ msgid "oops -- invalid expression type in mark_stat!"
+#~ msgstr "mark_stat 中的表達式類型無效!"
+
+#~ msgid "oops -- invalid expression type in mark_type!"
+#~ msgstr "mark_type 中的表達式類型無效!"
+
+#~ msgid "with a cumulative length of %s bytes"
+#~ msgstr "總長度共 %s 位元組"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tof which %s contain whitespace, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t其中 %s 個有空白字元,"
+
+#~ msgid ""
+#~ "\n"
+#~ "\t%s contain newline characters, "
+#~ msgstr ""
+#~ "\n"
+#~ "\t%s 個有換行字元,"
+
+#~ msgid ""
+#~ "\n"
+#~ "\tand %s contain characters with the high bit set.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\t和 %s 個含有不是 7 bit 的字元。\n"
+
+#~ msgid "old"
+#~ msgstr "舊的"
+
+#~ msgid "GNU locate version %s\n"
+#~ msgstr "GNU locate %s 版本\n"
+
+#~ msgid "GNU xargs version %s\n"
+#~ msgstr "GNU xargs %s 版本\n"
diff --git a/stamp-h.in b/stamp-h.in
new file mode 100644 (file)
index 0000000..9788f70
--- /dev/null
@@ -0,0 +1 @@
+timestamp
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644 (file)
index 0000000..7931bb3
--- /dev/null
@@ -0,0 +1,1461 @@
+## DO NOT EDIT! GENERATED AUTOMATICALLY!
+## Process this file with automake to produce Makefile.in.
+# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+
+AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects
+
+SUBDIRS = .
+TESTS =
+XFAIL_TESTS =
+TESTS_ENVIRONMENT =
+noinst_PROGRAMS =
+check_PROGRAMS =
+noinst_HEADERS =
+noinst_LIBRARIES =
+check_LIBRARIES = libtests.a
+EXTRA_DIST =
+BUILT_SOURCES =
+SUFFIXES =
+MOSTLYCLEANFILES = core *.stackdump
+MOSTLYCLEANDIRS =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+AM_CPPFLAGS = \
+  -D@gltests_WITNESS@=1 \
+  -I. -I$(srcdir) \
+  -I.. -I$(srcdir)/.. \
+  -I../gnulib/lib -I$(srcdir)/../gnulib/lib
+
+LDADD = libtests.a ../gnulib/lib/libgnulib.a libtests.a $(LIBTESTS_LIBDEPS)
+
+libtests_a_SOURCES =
+libtests_a_LIBADD = $(gltests_LIBOBJS)
+libtests_a_DEPENDENCIES = $(gltests_LIBOBJS)
+EXTRA_libtests_a_SOURCES =
+AM_LIBTOOLFLAGS = --preserve-dup-deps
+
+TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)'
+
+## begin gnulib module alloca-opt-tests
+
+TESTS += test-alloca-opt
+check_PROGRAMS += test-alloca-opt
+
+EXTRA_DIST += test-alloca-opt.c
+
+## end   gnulib module alloca-opt-tests
+
+## begin gnulib module areadlink-tests
+
+TESTS += test-areadlink
+check_PROGRAMS += test-areadlink
+EXTRA_DIST += test-areadlink.h test-areadlink.c macros.h
+
+## end   gnulib module areadlink-tests
+
+## begin gnulib module areadlink-with-size-tests
+
+TESTS += test-areadlink-with-size
+check_PROGRAMS += test-areadlink-with-size
+EXTRA_DIST += test-areadlink.h test-areadlink-with-size.c macros.h
+
+## end   gnulib module areadlink-with-size-tests
+
+## begin gnulib module areadlinkat-tests
+
+TESTS += test-areadlinkat
+check_PROGRAMS += test-areadlinkat
+test_areadlinkat_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-areadlink.h test-areadlinkat.c macros.h
+
+## end   gnulib module areadlinkat-tests
+
+## begin gnulib module arg-nonnull
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += arg-nonnull.h
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/GL_ARG_NONNULL/,$$p' \
+         < $(top_srcdir)/build-aux/arg-nonnull.h \
+         > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+
+ARG_NONNULL_H=arg-nonnull.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
+
+## end   gnulib module arg-nonnull
+
+## begin gnulib module argmatch-tests
+
+TESTS += test-argmatch
+check_PROGRAMS += test-argmatch
+test_argmatch_LDADD = $(LDADD) @LIBINTL@
+
+EXTRA_DIST += test-argmatch.c macros.h
+
+## end   gnulib module argmatch-tests
+
+## begin gnulib module binary-io
+
+libtests_a_SOURCES += binary-io.h
+
+## end   gnulib module binary-io
+
+## begin gnulib module binary-io-tests
+
+TESTS += test-binary-io.sh
+check_PROGRAMS += test-binary-io
+
+EXTRA_DIST += test-binary-io.sh test-binary-io.c macros.h
+
+## end   gnulib module binary-io-tests
+
+## begin gnulib module bitrotate-tests
+
+TESTS += test-bitrotate
+check_PROGRAMS += test-bitrotate
+EXTRA_DIST += test-bitrotate.c macros.h
+
+## end   gnulib module bitrotate-tests
+
+## begin gnulib module btowc-tests
+
+TESTS += test-btowc1.sh test-btowc2.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-btowc
+
+EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h
+
+## end   gnulib module btowc-tests
+
+## begin gnulib module c++defs
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += c++defs.h
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/c++defs.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/_GL_CXXDEFS/,$$p' \
+         < $(top_srcdir)/build-aux/c++defs.h \
+         > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += c++defs.h c++defs.h-t
+
+CXXDEFS_H=c++defs.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h
+
+## end   gnulib module c++defs
+
+## begin gnulib module c-ctype-tests
+
+TESTS += test-c-ctype
+check_PROGRAMS += test-c-ctype
+
+EXTRA_DIST += test-c-ctype.c macros.h
+
+## end   gnulib module c-ctype-tests
+
+## begin gnulib module c-strcase-tests
+
+TESTS += test-c-strcase.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
+check_PROGRAMS += test-c-strcasecmp test-c-strncasecmp
+EXTRA_DIST += test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c macros.h
+
+## end   gnulib module c-strcase-tests
+
+## begin gnulib module c-strcasestr-tests
+
+TESTS += test-c-strcasestr
+check_PROGRAMS += test-c-strcasestr
+
+EXTRA_DIST += test-c-strcasestr.c macros.h
+
+## end   gnulib module c-strcasestr-tests
+
+## begin gnulib module c-strstr-tests
+
+TESTS += test-c-strstr
+check_PROGRAMS += test-c-strstr
+
+EXTRA_DIST += test-c-strstr.c macros.h
+
+## end   gnulib module c-strstr-tests
+
+## begin gnulib module canonicalize-tests
+
+TESTS += test-canonicalize
+check_PROGRAMS += test-canonicalize
+test_canonicalize_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-canonicalize.c macros.h
+
+## end   gnulib module canonicalize-tests
+
+## begin gnulib module chown-tests
+
+TESTS += test-chown
+check_PROGRAMS += test-chown
+test_chown_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += nap.h test-chown.h test-chown.c signature.h macros.h
+
+## end   gnulib module chown-tests
+
+## begin gnulib module cloexec-tests
+
+TESTS += test-cloexec
+check_PROGRAMS += test-cloexec
+EXTRA_DIST += test-cloexec.c macros.h
+
+## end   gnulib module cloexec-tests
+
+## begin gnulib module closein-tests
+
+TESTS += test-closein.sh
+check_PROGRAMS += test-closein
+test_closein_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-closein.sh test-closein.c
+
+## end   gnulib module closein-tests
+
+## begin gnulib module ctype-tests
+
+TESTS += test-ctype
+check_PROGRAMS += test-ctype
+EXTRA_DIST += test-ctype.c
+
+## end   gnulib module ctype-tests
+
+## begin gnulib module dirent-safer-tests
+
+TESTS += test-dirent-safer
+check_PROGRAMS += test-dirent-safer
+# Link with libintl when needed. dirent-safer uses fdopendir if it is present,
+# and fdopendir indirectly depends on xgetcwd -> xalloc-die -> gettext-h.
+test_dirent_safer_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += test-dirent-safer.c macros.h
+
+## end   gnulib module dirent-safer-tests
+
+## begin gnulib module dirent-tests
+
+TESTS += test-dirent
+check_PROGRAMS += test-dirent
+EXTRA_DIST += test-dirent.c
+
+## end   gnulib module dirent-tests
+
+## begin gnulib module dirname-tests
+
+TESTS += test-dirname
+check_PROGRAMS += test-dirname
+test_dirname_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-dirname.c
+
+## end   gnulib module dirname-tests
+
+## begin gnulib module dup2-tests
+
+TESTS += test-dup2
+check_PROGRAMS += test-dup2
+EXTRA_DIST += test-dup2.c signature.h macros.h
+
+## end   gnulib module dup2-tests
+
+## begin gnulib module environ-tests
+
+TESTS += test-environ
+check_PROGRAMS += test-environ
+
+EXTRA_DIST += test-environ.c
+
+## end   gnulib module environ-tests
+
+## begin gnulib module errno-tests
+
+TESTS += test-errno
+check_PROGRAMS += test-errno
+
+EXTRA_DIST += test-errno.c
+
+## end   gnulib module errno-tests
+
+## begin gnulib module fchdir-tests
+
+TESTS += test-fchdir
+check_PROGRAMS += test-fchdir
+EXTRA_DIST += test-fchdir.c signature.h macros.h
+
+## end   gnulib module fchdir-tests
+
+## begin gnulib module fcntl-h-tests
+
+TESTS += test-fcntl-h
+check_PROGRAMS += test-fcntl-h
+EXTRA_DIST += test-fcntl-h.c
+
+## end   gnulib module fcntl-h-tests
+
+## begin gnulib module fcntl-safer-tests
+
+TESTS += test-fcntl-safer
+check_PROGRAMS += test-fcntl-safer
+EXTRA_DIST += test-open.h test-fcntl-safer.c macros.h
+
+## end   gnulib module fcntl-safer-tests
+
+## begin gnulib module fcntl-tests
+
+TESTS += test-fcntl
+check_PROGRAMS += test-fcntl
+EXTRA_DIST += test-fcntl.c signature.h macros.h
+
+## end   gnulib module fcntl-tests
+
+## begin gnulib module fd-safer-flag
+
+libtests_a_SOURCES += fd-safer-flag.c dup-safer-flag.c
+
+## end   gnulib module fd-safer-flag
+
+## begin gnulib module fdopendir-tests
+
+TESTS += test-fdopendir
+check_PROGRAMS += test-fdopendir
+test_fdopendir_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-fdopendir.c signature.h macros.h
+
+## end   gnulib module fdopendir-tests
+
+## begin gnulib module fflush-tests
+
+TESTS += test-fflush test-fflush2.sh
+check_PROGRAMS += test-fflush test-fflush2
+MOSTLYCLEANFILES += test-fflush.txt
+EXTRA_DIST += test-fflush.c test-fflush2.sh test-fflush2.c signature.h macros.h
+
+## end   gnulib module fflush-tests
+
+## begin gnulib module fnmatch-tests
+
+TESTS += test-fnmatch
+check_PROGRAMS += test-fnmatch
+EXTRA_DIST += test-fnmatch.c signature.h macros.h
+
+## end   gnulib module fnmatch-tests
+
+## begin gnulib module fopen-safer-tests
+
+TESTS += test-fopen-safer
+check_PROGRAMS += test-fopen-safer
+EXTRA_DIST += test-fopen.h test-fopen-safer.c macros.h
+
+## end   gnulib module fopen-safer-tests
+
+## begin gnulib module fopen-tests
+
+TESTS += test-fopen
+check_PROGRAMS += test-fopen
+
+EXTRA_DIST += test-fopen.h test-fopen.c signature.h macros.h
+
+## end   gnulib module fopen-tests
+
+## begin gnulib module fpending-tests
+
+TESTS += test-fpending.sh
+check_PROGRAMS += test-fpending
+MOSTLYCLEANFILES += test-fpending.t
+EXTRA_DIST += test-fpending.c test-fpending.sh macros.h
+
+## end   gnulib module fpending-tests
+
+## begin gnulib module fpurge-tests
+
+TESTS += test-fpurge
+check_PROGRAMS += test-fpurge
+MOSTLYCLEANFILES += t-fpurge.tmp
+EXTRA_DIST += test-fpurge.c macros.h
+
+## end   gnulib module fpurge-tests
+
+## begin gnulib module freadahead-tests
+
+TESTS += test-freadahead.sh
+check_PROGRAMS += test-freadahead
+EXTRA_DIST += test-freadahead.c test-freadahead.sh macros.h
+
+## end   gnulib module freadahead-tests
+
+## begin gnulib module freading-tests
+
+TESTS += test-freading
+check_PROGRAMS += test-freading
+MOSTLYCLEANFILES += t-freading.tmp
+EXTRA_DIST += test-freading.c macros.h
+
+## end   gnulib module freading-tests
+
+## begin gnulib module fseeko-tests
+
+TESTS += test-fseeko.sh test-fseeko2.sh
+check_PROGRAMS += test-fseeko
+EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh signature.h macros.h
+
+## end   gnulib module fseeko-tests
+
+## begin gnulib module ftell
+
+
+EXTRA_DIST += ftell.c
+
+EXTRA_libtests_a_SOURCES += ftell.c
+
+## end   gnulib module ftell
+
+## begin gnulib module ftell-tests
+
+TESTS += test-ftell.sh test-ftell2.sh test-ftell3
+check_PROGRAMS += test-ftell test-ftell3
+MOSTLYCLEANFILES += t-ftell3.tmp
+EXTRA_DIST += test-ftell.c test-ftell.sh test-ftell2.sh test-ftell3.c signature.h macros.h
+
+## end   gnulib module ftell-tests
+
+## begin gnulib module ftello-tests
+
+TESTS += test-ftello.sh test-ftello2.sh test-ftello3
+check_PROGRAMS += test-ftello test-ftello3
+MOSTLYCLEANFILES += t-ftello3.tmp
+EXTRA_DIST += test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c signature.h macros.h
+
+## end   gnulib module ftello-tests
+
+## begin gnulib module getcwd-tests
+
+TESTS += test-getcwd
+check_PROGRAMS += test-getcwd
+EXTRA_DIST += test-getcwd.c signature.h macros.h
+
+## end   gnulib module getcwd-tests
+
+## begin gnulib module getdelim-tests
+
+TESTS += test-getdelim
+check_PROGRAMS += test-getdelim
+MOSTLYCLEANFILES += test-getdelim.txt
+EXTRA_DIST += test-getdelim.c signature.h macros.h
+
+## end   gnulib module getdelim-tests
+
+## begin gnulib module getdtablesize-tests
+
+TESTS += test-getdtablesize
+check_PROGRAMS += test-getdtablesize
+EXTRA_DIST += test-getdtablesize.c signature.h macros.h
+
+## end   gnulib module getdtablesize-tests
+
+## begin gnulib module getgroups-tests
+
+TESTS += test-getgroups
+check_PROGRAMS += test-getgroups
+EXTRA_DIST += test-getgroups.c signature.h macros.h
+
+## end   gnulib module getgroups-tests
+
+## begin gnulib module getline-tests
+
+TESTS += test-getline
+check_PROGRAMS += test-getline
+MOSTLYCLEANFILES += test-getline.txt
+EXTRA_DIST += test-getline.c signature.h macros.h
+
+## end   gnulib module getline-tests
+
+## begin gnulib module getopt-posix-tests
+
+TESTS += test-getopt
+check_PROGRAMS += test-getopt
+test_getopt_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += macros.h signature.h test-getopt.c test-getopt.h test-getopt_long.h
+
+## end   gnulib module getopt-posix-tests
+
+## begin gnulib module getpagesize
+
+
+EXTRA_DIST += getpagesize.c
+
+EXTRA_libtests_a_SOURCES += getpagesize.c
+
+## end   gnulib module getpagesize
+
+## begin gnulib module gettimeofday-tests
+
+TESTS += test-gettimeofday
+check_PROGRAMS += test-gettimeofday
+
+EXTRA_DIST += signature.h test-gettimeofday.c
+
+## end   gnulib module gettimeofday-tests
+
+## begin gnulib module getugroups
+
+
+EXTRA_DIST += getugroups.c getugroups.h
+
+EXTRA_libtests_a_SOURCES += getugroups.c
+
+## end   gnulib module getugroups
+
+## begin gnulib module hash-tests
+
+TESTS += test-hash
+check_PROGRAMS += test-hash
+test_hash_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-hash.c macros.h
+
+## end   gnulib module hash-tests
+
+## begin gnulib module i-ring-tests
+
+TESTS += test-i-ring
+check_PROGRAMS += test-i-ring
+EXTRA_DIST += test-i-ring.c macros.h
+
+## end   gnulib module i-ring-tests
+
+## begin gnulib module ignore-value
+
+libtests_a_SOURCES += ignore-value.h
+
+## end   gnulib module ignore-value
+
+## begin gnulib module ignore-value-tests
+
+TESTS += test-ignore-value
+check_PROGRAMS += test-ignore-value
+EXTRA_DIST += test-ignore-value.c
+
+## end   gnulib module ignore-value-tests
+
+## begin gnulib module inttostr
+
+libtests_a_SOURCES += \
+  imaxtostr.c \
+  inttostr.c \
+  offtostr.c \
+  uinttostr.c \
+  umaxtostr.c
+
+EXTRA_DIST += anytostr.c inttostr.h
+
+EXTRA_libtests_a_SOURCES += anytostr.c
+
+## end   gnulib module inttostr
+
+## begin gnulib module inttostr-tests
+
+TESTS += test-inttostr
+check_PROGRAMS += test-inttostr
+EXTRA_DIST += macros.h test-inttostr.c
+
+## end   gnulib module inttostr-tests
+
+## begin gnulib module inttypes-tests
+
+TESTS += test-inttypes
+check_PROGRAMS += test-inttypes
+EXTRA_DIST += test-inttypes.c
+
+## end   gnulib module inttypes-tests
+
+## begin gnulib module isblank-tests
+
+TESTS += test-isblank
+check_PROGRAMS += test-isblank
+EXTRA_DIST += test-isblank.c signature.h macros.h
+
+## end   gnulib module isblank-tests
+
+## begin gnulib module iswblank-tests
+
+TESTS += test-iswblank
+check_PROGRAMS += test-iswblank
+EXTRA_DIST += test-iswblank.c macros.h
+
+## end   gnulib module iswblank-tests
+
+## begin gnulib module langinfo-tests
+
+TESTS += test-langinfo
+check_PROGRAMS += test-langinfo
+EXTRA_DIST += test-langinfo.c
+
+## end   gnulib module langinfo-tests
+
+## begin gnulib module lchown-tests
+
+TESTS += test-lchown
+check_PROGRAMS += test-lchown
+test_lchown_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += nap.h test-lchown.h test-lchown.c signature.h macros.h
+
+## end   gnulib module lchown-tests
+
+## begin gnulib module locale-tests
+
+TESTS += test-locale
+check_PROGRAMS += test-locale
+EXTRA_DIST += test-locale.c
+
+## end   gnulib module locale-tests
+
+## begin gnulib module localename
+
+libtests_a_SOURCES += localename.c
+
+EXTRA_DIST += localename.h
+
+## end   gnulib module localename
+
+## begin gnulib module localename-tests
+
+TESTS += test-localename
+check_PROGRAMS += test-localename
+test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@
+
+EXTRA_DIST += test-localename.c macros.h
+
+## end   gnulib module localename-tests
+
+## begin gnulib module lock
+
+libtests_a_SOURCES += glthread/lock.h glthread/lock.c
+
+## end   gnulib module lock
+
+## begin gnulib module lock-tests
+
+TESTS += test-lock
+check_PROGRAMS += test-lock
+test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@
+EXTRA_DIST += test-lock.c
+
+## end   gnulib module lock-tests
+
+## begin gnulib module lseek-tests
+
+TESTS += test-lseek.sh
+check_PROGRAMS += test-lseek
+EXTRA_DIST += test-lseek.c test-lseek.sh signature.h macros.h
+
+## end   gnulib module lseek-tests
+
+## begin gnulib module lstat-tests
+
+TESTS += test-lstat
+check_PROGRAMS += test-lstat
+EXTRA_DIST += test-lstat.h test-lstat.c signature.h macros.h
+
+## end   gnulib module lstat-tests
+
+## begin gnulib module malloc-gnu-tests
+
+TESTS += test-malloc-gnu
+check_PROGRAMS += test-malloc-gnu
+EXTRA_DIST += test-malloc-gnu.c
+
+## end   gnulib module malloc-gnu-tests
+
+## begin gnulib module malloca-tests
+
+TESTS += test-malloca
+check_PROGRAMS += test-malloca
+
+EXTRA_DIST += test-malloca.c
+
+## end   gnulib module malloca-tests
+
+## begin gnulib module math-tests
+
+TESTS += test-math
+check_PROGRAMS += test-math
+EXTRA_DIST += test-math.c
+
+## end   gnulib module math-tests
+
+## begin gnulib module mbrtowc-tests
+
+TESTS += \
+  test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
+  test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \
+  test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh
+TESTS_ENVIRONMENT += \
+  LOCALE_FR='@LOCALE_FR@' \
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LOCALE_JA='@LOCALE_JA@' \
+  LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-mbrtowc test-mbrtowc-w32
+
+EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h
+
+## end   gnulib module mbrtowc-tests
+
+## begin gnulib module mbscasestr-tests
+
+TESTS += test-mbscasestr1 test-mbscasestr2.sh test-mbscasestr3.sh test-mbscasestr4.sh
+TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-mbscasestr1 test-mbscasestr2 test-mbscasestr3 test-mbscasestr4
+
+EXTRA_DIST += test-mbscasestr1.c test-mbscasestr2.sh test-mbscasestr2.c test-mbscasestr3.sh test-mbscasestr3.c test-mbscasestr4.sh test-mbscasestr4.c macros.h
+
+## end   gnulib module mbscasestr-tests
+
+## begin gnulib module mbsinit-tests
+
+TESTS += test-mbsinit.sh
+TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-mbsinit
+
+EXTRA_DIST += test-mbsinit.sh test-mbsinit.c signature.h macros.h
+
+## end   gnulib module mbsinit-tests
+
+## begin gnulib module mbsrtowcs-tests
+
+TESTS += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh
+TESTS_ENVIRONMENT += \
+  LOCALE_FR='@LOCALE_FR@' \
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LOCALE_JA='@LOCALE_JA@' \
+  LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-mbsrtowcs
+
+EXTRA_DIST += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h
+
+## end   gnulib module mbsrtowcs-tests
+
+## begin gnulib module mbsstr-tests
+
+TESTS += test-mbsstr1 test-mbsstr2.sh test-mbsstr3.sh
+TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-mbsstr1 test-mbsstr2 test-mbsstr3
+
+EXTRA_DIST += test-mbsstr1.c test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c macros.h
+
+## end   gnulib module mbsstr-tests
+
+## begin gnulib module memchr-tests
+
+TESTS += test-memchr
+check_PROGRAMS += test-memchr
+EXTRA_DIST += test-memchr.c zerosize-ptr.h signature.h macros.h
+
+## end   gnulib module memchr-tests
+
+## begin gnulib module memrchr-tests
+
+TESTS += test-memrchr
+check_PROGRAMS += test-memrchr
+EXTRA_DIST += test-memrchr.c zerosize-ptr.h signature.h macros.h
+
+## end   gnulib module memrchr-tests
+
+## begin gnulib module mgetgroups
+
+
+EXTRA_DIST += mgetgroups.c mgetgroups.h
+
+EXTRA_libtests_a_SOURCES += mgetgroups.c
+
+## end   gnulib module mgetgroups
+
+## begin gnulib module mkdir-tests
+
+TESTS += test-mkdir
+check_PROGRAMS += test-mkdir
+EXTRA_DIST += test-mkdir.h test-mkdir.c signature.h macros.h
+
+## end   gnulib module mkdir-tests
+
+## begin gnulib module modf-tests
+
+TESTS += test-modf
+check_PROGRAMS += test-modf
+test_modf_LDADD = $(LDADD) @MODF_LIBM@
+EXTRA_DIST += test-modf.c signature.h macros.h
+
+## end   gnulib module modf-tests
+
+## begin gnulib module nl_langinfo-tests
+
+TESTS += test-nl_langinfo.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-nl_langinfo
+EXTRA_DIST += test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h
+
+## end   gnulib module nl_langinfo-tests
+
+## begin gnulib module open-tests
+
+TESTS += test-open
+check_PROGRAMS += test-open
+EXTRA_DIST += test-open.h test-open.c signature.h macros.h
+
+## end   gnulib module open-tests
+
+## begin gnulib module openat-safer-tests
+
+TESTS += test-openat-safer
+check_PROGRAMS += test-openat-safer
+test_openat_safer_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-openat-safer.c macros.h
+
+## end   gnulib module openat-safer-tests
+
+## begin gnulib module openat-tests
+
+TESTS += test-fchownat test-fstatat test-mkdirat test-openat test-unlinkat
+check_PROGRAMS += test-fchownat test-fstatat test-mkdirat test-openat \
+  test-unlinkat
+test_fchownat_LDADD = $(LDADD) @LIBINTL@
+test_fstatat_LDADD = $(LDADD) @LIBINTL@
+test_mkdirat_LDADD = $(LDADD) @LIBINTL@
+test_openat_LDADD = $(LDADD) @LIBINTL@
+test_unlinkat_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += nap.h test-chown.h test-lchown.h test-lstat.h test-mkdir.h test-rmdir.h test-stat.h test-unlink.h test-fchownat.c test-fstatat.c test-mkdirat.c test-openat.c test-unlinkat.c signature.h macros.h
+
+## end   gnulib module openat-tests
+
+## begin gnulib module parse-datetime-tests
+
+TESTS += test-parse-datetime
+check_PROGRAMS += test-parse-datetime
+test_parse_datetime_LDADD = $(LDADD) @LIBINTL@ $(LIB_CLOCK_GETTIME)
+EXTRA_DIST += test-parse-datetime.c macros.h
+
+## end   gnulib module parse-datetime-tests
+
+## begin gnulib module perror-tests
+
+TESTS += test-perror.sh
+check_PROGRAMS += test-perror
+EXTRA_DIST += signature.h test-perror.c test-perror.sh
+
+## end   gnulib module perror-tests
+
+## begin gnulib module priv-set
+
+libtests_a_SOURCES += priv-set.c
+
+EXTRA_DIST += priv-set.h
+
+## end   gnulib module priv-set
+
+## begin gnulib module priv-set-tests
+
+TESTS += test-priv-set
+check_PROGRAMS += test-priv-set
+EXTRA_DIST += test-priv-set.c macros.h
+
+## end   gnulib module priv-set-tests
+
+## begin gnulib module putenv
+
+
+EXTRA_DIST += putenv.c
+
+EXTRA_libtests_a_SOURCES += putenv.c
+
+## end   gnulib module putenv
+
+## begin gnulib module quotearg-simple-tests
+
+TESTS += test-quotearg-simple
+check_PROGRAMS += test-quotearg-simple
+test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-quotearg-simple.c test-quotearg.h macros.h
+
+## end   gnulib module quotearg-simple-tests
+
+## begin gnulib module readlink-tests
+
+TESTS += test-readlink
+check_PROGRAMS += test-readlink
+EXTRA_DIST += test-readlink.h test-readlink.c signature.h macros.h
+
+## end   gnulib module readlink-tests
+
+## begin gnulib module readlinkat-tests
+
+TESTS += test-readlinkat
+check_PROGRAMS += test-readlinkat
+test_readlinkat_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-readlink.h test-readlinkat.c signature.h macros.h
+
+## end   gnulib module readlinkat-tests
+
+## begin gnulib module realloc-gnu-tests
+
+TESTS += test-realloc-gnu
+check_PROGRAMS += test-realloc-gnu
+EXTRA_DIST += test-realloc-gnu.c
+
+## end   gnulib module realloc-gnu-tests
+
+## begin gnulib module rmdir-tests
+
+TESTS += test-rmdir
+check_PROGRAMS += test-rmdir
+EXTRA_DIST += test-rmdir.h test-rmdir.c signature.h macros.h
+
+## end   gnulib module rmdir-tests
+
+## begin gnulib module setenv-tests
+
+TESTS += test-setenv
+check_PROGRAMS += test-setenv
+EXTRA_DIST += test-setenv.c signature.h macros.h
+
+## end   gnulib module setenv-tests
+
+## begin gnulib module setlocale
+
+
+EXTRA_DIST += setlocale.c
+
+EXTRA_libtests_a_SOURCES += setlocale.c
+
+## end   gnulib module setlocale
+
+## begin gnulib module setlocale-tests
+
+TESTS += test-setlocale1.sh test-setlocale2.sh
+TESTS_ENVIRONMENT += \
+  LOCALE_FR='@LOCALE_FR@' \
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LOCALE_JA='@LOCALE_JA@' \
+  LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-setlocale1 test-setlocale2
+EXTRA_DIST += test-setlocale1.sh test-setlocale1.c test-setlocale2.sh test-setlocale2.c signature.h macros.h
+
+## end   gnulib module setlocale-tests
+
+## begin gnulib module sleep
+
+
+EXTRA_DIST += sleep.c
+
+EXTRA_libtests_a_SOURCES += sleep.c
+
+## end   gnulib module sleep
+
+## begin gnulib module sleep-tests
+
+TESTS += test-sleep
+check_PROGRAMS += test-sleep
+EXTRA_DIST += test-sleep.c signature.h macros.h
+
+## end   gnulib module sleep-tests
+
+## begin gnulib module snprintf-tests
+
+TESTS += test-snprintf
+check_PROGRAMS += test-snprintf
+
+EXTRA_DIST += test-snprintf.c signature.h macros.h
+
+## end   gnulib module snprintf-tests
+
+## begin gnulib module stat-tests
+
+TESTS += test-stat
+check_PROGRAMS += test-stat
+EXTRA_DIST += test-stat.h test-stat.c signature.h macros.h
+
+## end   gnulib module stat-tests
+
+## begin gnulib module stat-time-tests
+
+TESTS += test-stat-time
+check_PROGRAMS += test-stat-time
+EXTRA_DIST += test-stat-time.c macros.h
+
+## end   gnulib module stat-time-tests
+
+## begin gnulib module stdbool-tests
+
+TESTS += test-stdbool
+check_PROGRAMS += test-stdbool
+EXTRA_DIST += test-stdbool.c
+
+## end   gnulib module stdbool-tests
+
+## begin gnulib module stddef-tests
+
+TESTS += test-stddef
+check_PROGRAMS += test-stddef
+EXTRA_DIST += test-stddef.c
+
+## end   gnulib module stddef-tests
+
+## begin gnulib module stdint-tests
+
+TESTS += test-stdint
+check_PROGRAMS += test-stdint
+EXTRA_DIST += test-stdint.c
+
+## end   gnulib module stdint-tests
+
+## begin gnulib module stdio-tests
+
+TESTS += test-stdio
+check_PROGRAMS += test-stdio
+EXTRA_DIST += test-stdio.c
+
+## end   gnulib module stdio-tests
+
+## begin gnulib module stdlib-tests
+
+TESTS += test-stdlib
+check_PROGRAMS += test-stdlib
+EXTRA_DIST += test-stdlib.c test-sys_wait.h
+
+## end   gnulib module stdlib-tests
+
+## begin gnulib module strcasestr-tests
+
+TESTS += test-strcasestr
+check_PROGRAMS += test-strcasestr
+
+EXTRA_DIST += test-strcasestr.c signature.h macros.h
+
+## end   gnulib module strcasestr-tests
+
+## begin gnulib module strerror-tests
+
+TESTS += test-strerror
+check_PROGRAMS += test-strerror
+EXTRA_DIST += test-strerror.c signature.h macros.h
+
+## end   gnulib module strerror-tests
+
+## begin gnulib module strftime-tests
+
+TESTS += test-strftime
+check_PROGRAMS += test-strftime
+EXTRA_DIST += test-strftime.c macros.h
+
+## end   gnulib module strftime-tests
+
+## begin gnulib module string-tests
+
+TESTS += test-string
+check_PROGRAMS += test-string
+EXTRA_DIST += test-string.c
+
+## end   gnulib module string-tests
+
+## begin gnulib module strings-tests
+
+TESTS += test-strings
+check_PROGRAMS += test-strings
+EXTRA_DIST += test-strings.c
+
+## end   gnulib module strings-tests
+
+## begin gnulib module strnlen-tests
+
+TESTS += test-strnlen
+check_PROGRAMS += test-strnlen
+EXTRA_DIST += test-strnlen.c zerosize-ptr.h signature.h macros.h
+
+## end   gnulib module strnlen-tests
+
+## begin gnulib module strstr-tests
+
+TESTS += test-strstr
+check_PROGRAMS += test-strstr
+EXTRA_DIST += test-strstr.c zerosize-ptr.h signature.h macros.h
+
+## end   gnulib module strstr-tests
+
+## begin gnulib module symlink
+
+
+EXTRA_DIST += symlink.c
+
+EXTRA_libtests_a_SOURCES += symlink.c
+
+## end   gnulib module symlink
+
+## begin gnulib module symlink-tests
+
+TESTS += test-symlink
+check_PROGRAMS += test-symlink
+EXTRA_DIST += test-symlink.h test-symlink.c signature.h macros.h
+
+## end   gnulib module symlink-tests
+
+## begin gnulib module symlinkat
+
+
+EXTRA_DIST += symlinkat.c
+
+EXTRA_libtests_a_SOURCES += symlinkat.c
+
+## end   gnulib module symlinkat
+
+## begin gnulib module symlinkat-tests
+
+TESTS += test-symlinkat
+check_PROGRAMS += test-symlinkat
+test_symlinkat_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-symlink.h test-symlinkat.c signature.h macros.h
+
+## end   gnulib module symlinkat-tests
+
+## begin gnulib module sys_stat-tests
+
+TESTS += test-sys_stat
+check_PROGRAMS += test-sys_stat
+EXTRA_DIST += test-sys_stat.c
+
+## end   gnulib module sys_stat-tests
+
+## begin gnulib module sys_time-tests
+
+TESTS += test-sys_time
+check_PROGRAMS += test-sys_time
+EXTRA_DIST += test-sys_time.c
+
+## end   gnulib module sys_time-tests
+
+## begin gnulib module sys_wait-tests
+
+TESTS += test-sys_wait
+check_PROGRAMS += test-sys_wait
+EXTRA_DIST += test-sys_wait.c test-sys_wait.h
+
+## end   gnulib module sys_wait-tests
+
+## begin gnulib module thread
+
+libtests_a_SOURCES += glthread/thread.h glthread/thread.c
+
+## end   gnulib module thread
+
+## begin gnulib module threadlib
+
+libtests_a_SOURCES += glthread/threadlib.c
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end   gnulib module threadlib
+
+## begin gnulib module time-tests
+
+TESTS += test-time
+check_PROGRAMS += test-time
+EXTRA_DIST += test-time.c
+
+## end   gnulib module time-tests
+
+## begin gnulib module unistd-safer-tests
+
+TESTS += test-dup-safer
+check_PROGRAMS += test-dup-safer
+EXTRA_DIST += test-dup-safer.c macros.h
+
+## end   gnulib module unistd-safer-tests
+
+## begin gnulib module unistd-tests
+
+TESTS += test-unistd
+check_PROGRAMS += test-unistd
+EXTRA_DIST += test-unistd.c
+
+## end   gnulib module unistd-tests
+
+## begin gnulib module uniwidth/width-tests
+
+TESTS += test-uc_width uniwidth/test-uc_width2.sh
+check_PROGRAMS += test-uc_width test-uc_width2
+test_uc_width_SOURCES = uniwidth/test-uc_width.c
+test_uc_width_LDADD = $(LDADD) $(LIBUNISTRING)
+test_uc_width2_SOURCES = uniwidth/test-uc_width2.c
+test_uc_width2_LDADD = $(LDADD) $(LIBUNISTRING)
+EXTRA_DIST += uniwidth/test-uc_width.c uniwidth/test-uc_width2.c uniwidth/test-uc_width2.sh macros.h
+
+## end   gnulib module uniwidth/width-tests
+
+## begin gnulib module unlink-tests
+
+TESTS += test-unlink
+check_PROGRAMS += test-unlink
+EXTRA_DIST += test-unlink.h test-unlink.c signature.h macros.h
+
+## end   gnulib module unlink-tests
+
+## begin gnulib module unlinkdir
+
+
+EXTRA_DIST += unlinkdir.c unlinkdir.h
+
+EXTRA_libtests_a_SOURCES += unlinkdir.c
+
+## end   gnulib module unlinkdir
+
+## begin gnulib module unsetenv-tests
+
+TESTS += test-unsetenv
+check_PROGRAMS += test-unsetenv
+EXTRA_DIST += test-unsetenv.c signature.h macros.h
+
+## end   gnulib module unsetenv-tests
+
+## begin gnulib module unused-parameter
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += unused-parameter.h
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/unused-parameter.h, except that it has the copyright header cut
+# off.
+unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+         < $(top_srcdir)/build-aux/unused-parameter.h \
+         > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
+
+UNUSED_PARAMETER_H=unused-parameter.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/unused-parameter.h
+
+## end   gnulib module unused-parameter
+
+## begin gnulib module update-copyright-tests
+
+TESTS += test-update-copyright.sh
+TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)'
+EXTRA_DIST += test-update-copyright.sh
+
+## end   gnulib module update-copyright-tests
+
+## begin gnulib module usleep
+
+
+EXTRA_DIST += usleep.c
+
+EXTRA_libtests_a_SOURCES += usleep.c
+
+## end   gnulib module usleep
+
+## begin gnulib module usleep-tests
+
+TESTS += test-usleep
+check_PROGRAMS += test-usleep
+EXTRA_DIST += test-usleep.c signature.h macros.h
+
+## end   gnulib module usleep-tests
+
+## begin gnulib module vasnprintf-tests
+
+TESTS += test-vasnprintf
+check_PROGRAMS += test-vasnprintf
+
+EXTRA_DIST += test-vasnprintf.c macros.h
+
+## end   gnulib module vasnprintf-tests
+
+## begin gnulib module vc-list-files-tests
+
+TESTS += test-vc-list-files-git.sh
+TESTS += test-vc-list-files-cvs.sh
+TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)'
+EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh init.sh
+
+## end   gnulib module vc-list-files-tests
+
+## begin gnulib module verify-tests
+
+TESTS_ENVIRONMENT += MAKE='$(MAKE)'
+TESTS += test-verify test-verify.sh
+check_PROGRAMS += test-verify
+EXTRA_DIST += test-verify.c test-verify.sh init.sh
+
+## end   gnulib module verify-tests
+
+## begin gnulib module version-etc-tests
+
+TESTS += test-version-etc.sh
+check_PROGRAMS += test-version-etc
+test_version_etc_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-version-etc.c test-version-etc.sh
+
+## end   gnulib module version-etc-tests
+
+## begin gnulib module warn-on-use
+
+BUILT_SOURCES += warn-on-use.h
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/^.ifndef/,$$p' \
+         < $(top_srcdir)/build-aux/warn-on-use.h \
+         > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+
+WARN_ON_USE_H=warn-on-use.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
+
+## end   gnulib module warn-on-use
+
+## begin gnulib module wchar-tests
+
+TESTS += test-wchar
+check_PROGRAMS += test-wchar
+EXTRA_DIST += test-wchar.c
+
+## end   gnulib module wchar-tests
+
+## begin gnulib module wcrtomb-tests
+
+TESTS += \
+  test-wcrtomb.sh \
+  test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh \
+  test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh
+TESTS_ENVIRONMENT += \
+  LOCALE_FR='@LOCALE_FR@' \
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LOCALE_JA='@LOCALE_JA@' \
+  LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-wcrtomb test-wcrtomb-w32
+
+EXTRA_DIST += test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32.c signature.h macros.h
+
+## end   gnulib module wcrtomb-tests
+
+## begin gnulib module wctob
+
+
+EXTRA_DIST += wctob.c
+
+EXTRA_libtests_a_SOURCES += wctob.c
+
+## end   gnulib module wctob
+
+## begin gnulib module wctomb
+
+
+EXTRA_DIST += wctomb-impl.h wctomb.c
+
+EXTRA_libtests_a_SOURCES += wctomb.c
+
+## end   gnulib module wctomb
+
+## begin gnulib module wctype-h-tests
+
+TESTS += test-wctype-h
+check_PROGRAMS += test-wctype-h
+EXTRA_DIST += test-wctype-h.c macros.h
+
+## end   gnulib module wctype-h-tests
+
+## begin gnulib module wcwidth-tests
+
+TESTS += test-wcwidth
+check_PROGRAMS += test-wcwidth
+
+EXTRA_DIST += test-wcwidth.c signature.h macros.h
+
+## end   gnulib module wcwidth-tests
+
+## begin gnulib module xalloc-die-tests
+
+TESTS += test-xalloc-die.sh
+check_PROGRAMS += test-xalloc-die
+test_xalloc_die_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-xalloc-die.c test-xalloc-die.sh init.sh
+
+## end   gnulib module xalloc-die-tests
+
+## begin gnulib module xstrtol-tests
+
+TESTS += test-xstrtol.sh
+check_PROGRAMS += test-xstrtol test-xstrtoul
+test_xstrtol_LDADD = $(LDADD) @LIBINTL@
+test_xstrtoul_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += init.sh test-xstrtol.c test-xstrtoul.c test-xstrtol.sh
+
+## end   gnulib module xstrtol-tests
+
+## begin gnulib module xstrtoumax-tests
+
+TESTS += test-xstrtoumax.sh
+check_PROGRAMS += test-xstrtoumax
+test_xstrtoumax_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += init.sh test-xstrtoumax.c test-xstrtoumax.sh
+
+## end   gnulib module xstrtoumax-tests
+
+## begin gnulib module yesno-tests
+
+TESTS += test-yesno.sh
+check_PROGRAMS += test-yesno
+test_yesno_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-yesno.c test-yesno.sh
+
+## end   gnulib module yesno-tests
+
+## begin gnulib module yield
+
+libtests_a_SOURCES += glthread/yield.h
+
+## end   gnulib module yield
+
+# Clean up after Solaris cc.
+clean-local:
+       rm -rf SunWS_cache
+
+mostlyclean-local: mostlyclean-generic
+       @for dir in '' $(MOSTLYCLEANDIRS); do \
+         if test -n "$$dir" && test -d $$dir; then \
+           echo "rmdir $$dir"; rmdir $$dir; \
+         fi; \
+       done; \
+       :
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644 (file)
index 0000000..fc71438
--- /dev/null
@@ -0,0 +1,3494 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+
+# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+
+
+
+VPATH = @srcdir@
+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@
+TESTS = test-alloca-opt$(EXEEXT) test-areadlink$(EXEEXT) \
+       test-areadlink-with-size$(EXEEXT) test-areadlinkat$(EXEEXT) \
+       test-argmatch$(EXEEXT) test-binary-io.sh \
+       test-bitrotate$(EXEEXT) test-btowc1.sh test-btowc2.sh \
+       test-c-ctype$(EXEEXT) test-c-strcase.sh \
+       test-c-strcasestr$(EXEEXT) test-c-strstr$(EXEEXT) \
+       test-canonicalize$(EXEEXT) test-chown$(EXEEXT) \
+       test-cloexec$(EXEEXT) test-closein.sh test-ctype$(EXEEXT) \
+       test-dirent-safer$(EXEEXT) test-dirent$(EXEEXT) \
+       test-dirname$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \
+       test-errno$(EXEEXT) test-fchdir$(EXEEXT) test-fcntl-h$(EXEEXT) \
+       test-fcntl-safer$(EXEEXT) test-fcntl$(EXEEXT) \
+       test-fdopendir$(EXEEXT) test-fflush$(EXEEXT) test-fflush2.sh \
+       test-fnmatch$(EXEEXT) test-fopen-safer$(EXEEXT) \
+       test-fopen$(EXEEXT) test-fpending.sh test-fpurge$(EXEEXT) \
+       test-freadahead.sh test-freading$(EXEEXT) test-fseeko.sh \
+       test-fseeko2.sh test-ftell.sh test-ftell2.sh \
+       test-ftell3$(EXEEXT) test-ftello.sh test-ftello2.sh \
+       test-ftello3$(EXEEXT) test-getcwd$(EXEEXT) \
+       test-getdelim$(EXEEXT) test-getdtablesize$(EXEEXT) \
+       test-getgroups$(EXEEXT) test-getline$(EXEEXT) \
+       test-getopt$(EXEEXT) test-gettimeofday$(EXEEXT) \
+       test-hash$(EXEEXT) test-i-ring$(EXEEXT) \
+       test-ignore-value$(EXEEXT) test-inttostr$(EXEEXT) \
+       test-inttypes$(EXEEXT) test-isblank$(EXEEXT) \
+       test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \
+       test-lchown$(EXEEXT) test-locale$(EXEEXT) \
+       test-localename$(EXEEXT) test-lock$(EXEEXT) test-lseek.sh \
+       test-lstat$(EXEEXT) test-malloc-gnu$(EXEEXT) \
+       test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc1.sh \
+       test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
+       test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \
+       test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \
+       test-mbrtowc-w32-5.sh test-mbscasestr1$(EXEEXT) \
+       test-mbscasestr2.sh test-mbscasestr3.sh test-mbscasestr4.sh \
+       test-mbsinit.sh test-mbsrtowcs1.sh test-mbsrtowcs2.sh \
+       test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsstr1$(EXEEXT) \
+       test-mbsstr2.sh test-mbsstr3.sh test-memchr$(EXEEXT) \
+       test-memrchr$(EXEEXT) test-mkdir$(EXEEXT) test-modf$(EXEEXT) \
+       test-nl_langinfo.sh test-open$(EXEEXT) \
+       test-openat-safer$(EXEEXT) test-fchownat$(EXEEXT) \
+       test-fstatat$(EXEEXT) test-mkdirat$(EXEEXT) \
+       test-openat$(EXEEXT) test-unlinkat$(EXEEXT) \
+       test-parse-datetime$(EXEEXT) test-perror.sh \
+       test-priv-set$(EXEEXT) test-quotearg-simple$(EXEEXT) \
+       test-readlink$(EXEEXT) test-readlinkat$(EXEEXT) \
+       test-realloc-gnu$(EXEEXT) test-rmdir$(EXEEXT) \
+       test-setenv$(EXEEXT) test-setlocale1.sh test-setlocale2.sh \
+       test-sleep$(EXEEXT) test-snprintf$(EXEEXT) test-stat$(EXEEXT) \
+       test-stat-time$(EXEEXT) test-stdbool$(EXEEXT) \
+       test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \
+       test-stdlib$(EXEEXT) test-strcasestr$(EXEEXT) \
+       test-strerror$(EXEEXT) test-strftime$(EXEEXT) \
+       test-string$(EXEEXT) test-strings$(EXEEXT) \
+       test-strnlen$(EXEEXT) test-strstr$(EXEEXT) \
+       test-symlink$(EXEEXT) test-symlinkat$(EXEEXT) \
+       test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \
+       test-sys_wait$(EXEEXT) test-time$(EXEEXT) \
+       test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \
+       test-uc_width$(EXEEXT) uniwidth/test-uc_width2.sh \
+       test-unlink$(EXEEXT) test-unsetenv$(EXEEXT) \
+       test-update-copyright.sh test-usleep$(EXEEXT) \
+       test-vasnprintf$(EXEEXT) test-vc-list-files-git.sh \
+       test-vc-list-files-cvs.sh test-verify$(EXEEXT) test-verify.sh \
+       test-version-etc.sh test-wchar$(EXEEXT) test-wcrtomb.sh \
+       test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh \
+       test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh \
+       test-wcrtomb-w32-5.sh test-wctype-h$(EXEEXT) \
+       test-wcwidth$(EXEEXT) test-xalloc-die.sh test-xstrtol.sh \
+       test-xstrtoumax.sh test-yesno.sh
+XFAIL_TESTS =
+noinst_PROGRAMS =
+check_PROGRAMS = test-alloca-opt$(EXEEXT) test-areadlink$(EXEEXT) \
+       test-areadlink-with-size$(EXEEXT) test-areadlinkat$(EXEEXT) \
+       test-argmatch$(EXEEXT) test-binary-io$(EXEEXT) \
+       test-bitrotate$(EXEEXT) test-btowc$(EXEEXT) \
+       test-c-ctype$(EXEEXT) test-c-strcasecmp$(EXEEXT) \
+       test-c-strncasecmp$(EXEEXT) test-c-strcasestr$(EXEEXT) \
+       test-c-strstr$(EXEEXT) test-canonicalize$(EXEEXT) \
+       test-chown$(EXEEXT) test-cloexec$(EXEEXT) \
+       test-closein$(EXEEXT) test-ctype$(EXEEXT) \
+       test-dirent-safer$(EXEEXT) test-dirent$(EXEEXT) \
+       test-dirname$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \
+       test-errno$(EXEEXT) test-fchdir$(EXEEXT) test-fcntl-h$(EXEEXT) \
+       test-fcntl-safer$(EXEEXT) test-fcntl$(EXEEXT) \
+       test-fdopendir$(EXEEXT) test-fflush$(EXEEXT) \
+       test-fflush2$(EXEEXT) test-fnmatch$(EXEEXT) \
+       test-fopen-safer$(EXEEXT) test-fopen$(EXEEXT) \
+       test-fpending$(EXEEXT) test-fpurge$(EXEEXT) \
+       test-freadahead$(EXEEXT) test-freading$(EXEEXT) \
+       test-fseeko$(EXEEXT) test-ftell$(EXEEXT) test-ftell3$(EXEEXT) \
+       test-ftello$(EXEEXT) test-ftello3$(EXEEXT) \
+       test-getcwd$(EXEEXT) test-getdelim$(EXEEXT) \
+       test-getdtablesize$(EXEEXT) test-getgroups$(EXEEXT) \
+       test-getline$(EXEEXT) test-getopt$(EXEEXT) \
+       test-gettimeofday$(EXEEXT) test-hash$(EXEEXT) \
+       test-i-ring$(EXEEXT) test-ignore-value$(EXEEXT) \
+       test-inttostr$(EXEEXT) test-inttypes$(EXEEXT) \
+       test-isblank$(EXEEXT) test-iswblank$(EXEEXT) \
+       test-langinfo$(EXEEXT) test-lchown$(EXEEXT) \
+       test-locale$(EXEEXT) test-localename$(EXEEXT) \
+       test-lock$(EXEEXT) test-lseek$(EXEEXT) test-lstat$(EXEEXT) \
+       test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \
+       test-math$(EXEEXT) test-mbrtowc$(EXEEXT) \
+       test-mbrtowc-w32$(EXEEXT) test-mbscasestr1$(EXEEXT) \
+       test-mbscasestr2$(EXEEXT) test-mbscasestr3$(EXEEXT) \
+       test-mbscasestr4$(EXEEXT) test-mbsinit$(EXEEXT) \
+       test-mbsrtowcs$(EXEEXT) test-mbsstr1$(EXEEXT) \
+       test-mbsstr2$(EXEEXT) test-mbsstr3$(EXEEXT) \
+       test-memchr$(EXEEXT) test-memrchr$(EXEEXT) test-mkdir$(EXEEXT) \
+       test-modf$(EXEEXT) test-nl_langinfo$(EXEEXT) \
+       test-open$(EXEEXT) test-openat-safer$(EXEEXT) \
+       test-fchownat$(EXEEXT) test-fstatat$(EXEEXT) \
+       test-mkdirat$(EXEEXT) test-openat$(EXEEXT) \
+       test-unlinkat$(EXEEXT) test-parse-datetime$(EXEEXT) \
+       test-perror$(EXEEXT) test-priv-set$(EXEEXT) \
+       test-quotearg-simple$(EXEEXT) test-readlink$(EXEEXT) \
+       test-readlinkat$(EXEEXT) test-realloc-gnu$(EXEEXT) \
+       test-rmdir$(EXEEXT) test-setenv$(EXEEXT) \
+       test-setlocale1$(EXEEXT) test-setlocale2$(EXEEXT) \
+       test-sleep$(EXEEXT) test-snprintf$(EXEEXT) test-stat$(EXEEXT) \
+       test-stat-time$(EXEEXT) test-stdbool$(EXEEXT) \
+       test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \
+       test-stdlib$(EXEEXT) test-strcasestr$(EXEEXT) \
+       test-strerror$(EXEEXT) test-strftime$(EXEEXT) \
+       test-string$(EXEEXT) test-strings$(EXEEXT) \
+       test-strnlen$(EXEEXT) test-strstr$(EXEEXT) \
+       test-symlink$(EXEEXT) test-symlinkat$(EXEEXT) \
+       test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \
+       test-sys_wait$(EXEEXT) test-time$(EXEEXT) \
+       test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \
+       test-uc_width$(EXEEXT) test-uc_width2$(EXEEXT) \
+       test-unlink$(EXEEXT) test-unsetenv$(EXEEXT) \
+       test-usleep$(EXEEXT) test-vasnprintf$(EXEEXT) \
+       test-verify$(EXEEXT) test-version-etc$(EXEEXT) \
+       test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) \
+       test-wcrtomb-w32$(EXEEXT) test-wctype-h$(EXEEXT) \
+       test-wcwidth$(EXEEXT) test-xalloc-die$(EXEEXT) \
+       test-xstrtol$(EXEEXT) test-xstrtoul$(EXEEXT) \
+       test-xstrtoumax$(EXEEXT) test-yesno$(EXEEXT)
+subdir = tests
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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)
+AR = ar
+ARFLAGS = cru
+libtests_a_AR = $(AR) $(ARFLAGS)
+am__DEPENDENCIES_1 =
+am__dirstamp = $(am__leading_dot)dirstamp
+am_libtests_a_OBJECTS = fd-safer-flag.$(OBJEXT) \
+       dup-safer-flag.$(OBJEXT) imaxtostr.$(OBJEXT) \
+       inttostr.$(OBJEXT) offtostr.$(OBJEXT) uinttostr.$(OBJEXT) \
+       umaxtostr.$(OBJEXT) localename.$(OBJEXT) \
+       glthread/lock.$(OBJEXT) priv-set.$(OBJEXT) \
+       glthread/thread.$(OBJEXT) glthread/threadlib.$(OBJEXT)
+libtests_a_OBJECTS = $(am_libtests_a_OBJECTS)
+PROGRAMS = $(noinst_PROGRAMS)
+test_alloca_opt_SOURCES = test-alloca-opt.c
+test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT)
+test_alloca_opt_LDADD = $(LDADD)
+test_alloca_opt_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_areadlink_SOURCES = test-areadlink.c
+test_areadlink_OBJECTS = test-areadlink.$(OBJEXT)
+test_areadlink_LDADD = $(LDADD)
+test_areadlink_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_areadlink_with_size_SOURCES = test-areadlink-with-size.c
+test_areadlink_with_size_OBJECTS = test-areadlink-with-size.$(OBJEXT)
+test_areadlink_with_size_LDADD = $(LDADD)
+test_areadlink_with_size_DEPENDENCIES = libtests.a \
+       ../gnulib/lib/libgnulib.a libtests.a $(am__DEPENDENCIES_1)
+test_areadlinkat_SOURCES = test-areadlinkat.c
+test_areadlinkat_OBJECTS = test-areadlinkat.$(OBJEXT)
+am__DEPENDENCIES_2 = libtests.a ../gnulib/lib/libgnulib.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_areadlinkat_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_argmatch_SOURCES = test-argmatch.c
+test_argmatch_OBJECTS = test-argmatch.$(OBJEXT)
+test_argmatch_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_binary_io_SOURCES = test-binary-io.c
+test_binary_io_OBJECTS = test-binary-io.$(OBJEXT)
+test_binary_io_LDADD = $(LDADD)
+test_binary_io_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_bitrotate_SOURCES = test-bitrotate.c
+test_bitrotate_OBJECTS = test-bitrotate.$(OBJEXT)
+test_bitrotate_LDADD = $(LDADD)
+test_bitrotate_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_btowc_SOURCES = test-btowc.c
+test_btowc_OBJECTS = test-btowc.$(OBJEXT)
+test_btowc_LDADD = $(LDADD)
+test_btowc_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_c_ctype_SOURCES = test-c-ctype.c
+test_c_ctype_OBJECTS = test-c-ctype.$(OBJEXT)
+test_c_ctype_LDADD = $(LDADD)
+test_c_ctype_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_c_strcasecmp_SOURCES = test-c-strcasecmp.c
+test_c_strcasecmp_OBJECTS = test-c-strcasecmp.$(OBJEXT)
+test_c_strcasecmp_LDADD = $(LDADD)
+test_c_strcasecmp_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_c_strcasestr_SOURCES = test-c-strcasestr.c
+test_c_strcasestr_OBJECTS = test-c-strcasestr.$(OBJEXT)
+test_c_strcasestr_LDADD = $(LDADD)
+test_c_strcasestr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_c_strncasecmp_SOURCES = test-c-strncasecmp.c
+test_c_strncasecmp_OBJECTS = test-c-strncasecmp.$(OBJEXT)
+test_c_strncasecmp_LDADD = $(LDADD)
+test_c_strncasecmp_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_c_strstr_SOURCES = test-c-strstr.c
+test_c_strstr_OBJECTS = test-c-strstr.$(OBJEXT)
+test_c_strstr_LDADD = $(LDADD)
+test_c_strstr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_canonicalize_SOURCES = test-canonicalize.c
+test_canonicalize_OBJECTS = test-canonicalize.$(OBJEXT)
+test_canonicalize_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_chown_SOURCES = test-chown.c
+test_chown_OBJECTS = test-chown.$(OBJEXT)
+test_chown_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_cloexec_SOURCES = test-cloexec.c
+test_cloexec_OBJECTS = test-cloexec.$(OBJEXT)
+test_cloexec_LDADD = $(LDADD)
+test_cloexec_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_closein_SOURCES = test-closein.c
+test_closein_OBJECTS = test-closein.$(OBJEXT)
+test_closein_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_ctype_SOURCES = test-ctype.c
+test_ctype_OBJECTS = test-ctype.$(OBJEXT)
+test_ctype_LDADD = $(LDADD)
+test_ctype_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_dirent_SOURCES = test-dirent.c
+test_dirent_OBJECTS = test-dirent.$(OBJEXT)
+test_dirent_LDADD = $(LDADD)
+test_dirent_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_dirent_safer_SOURCES = test-dirent-safer.c
+test_dirent_safer_OBJECTS = test-dirent-safer.$(OBJEXT)
+test_dirent_safer_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
+test_dirname_SOURCES = test-dirname.c
+test_dirname_OBJECTS = test-dirname.$(OBJEXT)
+test_dirname_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_dup_safer_SOURCES = test-dup-safer.c
+test_dup_safer_OBJECTS = test-dup-safer.$(OBJEXT)
+test_dup_safer_LDADD = $(LDADD)
+test_dup_safer_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_dup2_SOURCES = test-dup2.c
+test_dup2_OBJECTS = test-dup2.$(OBJEXT)
+test_dup2_LDADD = $(LDADD)
+test_dup2_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_environ_SOURCES = test-environ.c
+test_environ_OBJECTS = test-environ.$(OBJEXT)
+test_environ_LDADD = $(LDADD)
+test_environ_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_errno_SOURCES = test-errno.c
+test_errno_OBJECTS = test-errno.$(OBJEXT)
+test_errno_LDADD = $(LDADD)
+test_errno_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fchdir_SOURCES = test-fchdir.c
+test_fchdir_OBJECTS = test-fchdir.$(OBJEXT)
+test_fchdir_LDADD = $(LDADD)
+test_fchdir_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fchownat_SOURCES = test-fchownat.c
+test_fchownat_OBJECTS = test-fchownat.$(OBJEXT)
+test_fchownat_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_fcntl_SOURCES = test-fcntl.c
+test_fcntl_OBJECTS = test-fcntl.$(OBJEXT)
+test_fcntl_LDADD = $(LDADD)
+test_fcntl_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fcntl_h_SOURCES = test-fcntl-h.c
+test_fcntl_h_OBJECTS = test-fcntl-h.$(OBJEXT)
+test_fcntl_h_LDADD = $(LDADD)
+test_fcntl_h_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fcntl_safer_SOURCES = test-fcntl-safer.c
+test_fcntl_safer_OBJECTS = test-fcntl-safer.$(OBJEXT)
+test_fcntl_safer_LDADD = $(LDADD)
+test_fcntl_safer_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fdopendir_SOURCES = test-fdopendir.c
+test_fdopendir_OBJECTS = test-fdopendir.$(OBJEXT)
+test_fdopendir_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_fflush_SOURCES = test-fflush.c
+test_fflush_OBJECTS = test-fflush.$(OBJEXT)
+test_fflush_LDADD = $(LDADD)
+test_fflush_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fflush2_SOURCES = test-fflush2.c
+test_fflush2_OBJECTS = test-fflush2.$(OBJEXT)
+test_fflush2_LDADD = $(LDADD)
+test_fflush2_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fnmatch_SOURCES = test-fnmatch.c
+test_fnmatch_OBJECTS = test-fnmatch.$(OBJEXT)
+test_fnmatch_LDADD = $(LDADD)
+test_fnmatch_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fopen_SOURCES = test-fopen.c
+test_fopen_OBJECTS = test-fopen.$(OBJEXT)
+test_fopen_LDADD = $(LDADD)
+test_fopen_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fopen_safer_SOURCES = test-fopen-safer.c
+test_fopen_safer_OBJECTS = test-fopen-safer.$(OBJEXT)
+test_fopen_safer_LDADD = $(LDADD)
+test_fopen_safer_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fpending_SOURCES = test-fpending.c
+test_fpending_OBJECTS = test-fpending.$(OBJEXT)
+test_fpending_LDADD = $(LDADD)
+test_fpending_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fpurge_SOURCES = test-fpurge.c
+test_fpurge_OBJECTS = test-fpurge.$(OBJEXT)
+test_fpurge_LDADD = $(LDADD)
+test_fpurge_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_freadahead_SOURCES = test-freadahead.c
+test_freadahead_OBJECTS = test-freadahead.$(OBJEXT)
+test_freadahead_LDADD = $(LDADD)
+test_freadahead_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_freading_SOURCES = test-freading.c
+test_freading_OBJECTS = test-freading.$(OBJEXT)
+test_freading_LDADD = $(LDADD)
+test_freading_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fseeko_SOURCES = test-fseeko.c
+test_fseeko_OBJECTS = test-fseeko.$(OBJEXT)
+test_fseeko_LDADD = $(LDADD)
+test_fseeko_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_fstatat_SOURCES = test-fstatat.c
+test_fstatat_OBJECTS = test-fstatat.$(OBJEXT)
+test_fstatat_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_ftell_SOURCES = test-ftell.c
+test_ftell_OBJECTS = test-ftell.$(OBJEXT)
+test_ftell_LDADD = $(LDADD)
+test_ftell_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_ftell3_SOURCES = test-ftell3.c
+test_ftell3_OBJECTS = test-ftell3.$(OBJEXT)
+test_ftell3_LDADD = $(LDADD)
+test_ftell3_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_ftello_SOURCES = test-ftello.c
+test_ftello_OBJECTS = test-ftello.$(OBJEXT)
+test_ftello_LDADD = $(LDADD)
+test_ftello_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_ftello3_SOURCES = test-ftello3.c
+test_ftello3_OBJECTS = test-ftello3.$(OBJEXT)
+test_ftello3_LDADD = $(LDADD)
+test_ftello3_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_getcwd_SOURCES = test-getcwd.c
+test_getcwd_OBJECTS = test-getcwd.$(OBJEXT)
+test_getcwd_LDADD = $(LDADD)
+test_getcwd_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_getdelim_SOURCES = test-getdelim.c
+test_getdelim_OBJECTS = test-getdelim.$(OBJEXT)
+test_getdelim_LDADD = $(LDADD)
+test_getdelim_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_getdtablesize_SOURCES = test-getdtablesize.c
+test_getdtablesize_OBJECTS = test-getdtablesize.$(OBJEXT)
+test_getdtablesize_LDADD = $(LDADD)
+test_getdtablesize_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_getgroups_SOURCES = test-getgroups.c
+test_getgroups_OBJECTS = test-getgroups.$(OBJEXT)
+test_getgroups_LDADD = $(LDADD)
+test_getgroups_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_getline_SOURCES = test-getline.c
+test_getline_OBJECTS = test-getline.$(OBJEXT)
+test_getline_LDADD = $(LDADD)
+test_getline_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_getopt_SOURCES = test-getopt.c
+test_getopt_OBJECTS = test-getopt.$(OBJEXT)
+test_getopt_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+test_gettimeofday_SOURCES = test-gettimeofday.c
+test_gettimeofday_OBJECTS = test-gettimeofday.$(OBJEXT)
+test_gettimeofday_LDADD = $(LDADD)
+test_gettimeofday_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_hash_SOURCES = test-hash.c
+test_hash_OBJECTS = test-hash.$(OBJEXT)
+test_hash_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_i_ring_SOURCES = test-i-ring.c
+test_i_ring_OBJECTS = test-i-ring.$(OBJEXT)
+test_i_ring_LDADD = $(LDADD)
+test_i_ring_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_ignore_value_SOURCES = test-ignore-value.c
+test_ignore_value_OBJECTS = test-ignore-value.$(OBJEXT)
+test_ignore_value_LDADD = $(LDADD)
+test_ignore_value_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_inttostr_SOURCES = test-inttostr.c
+test_inttostr_OBJECTS = test-inttostr.$(OBJEXT)
+test_inttostr_LDADD = $(LDADD)
+test_inttostr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_inttypes_SOURCES = test-inttypes.c
+test_inttypes_OBJECTS = test-inttypes.$(OBJEXT)
+test_inttypes_LDADD = $(LDADD)
+test_inttypes_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_isblank_SOURCES = test-isblank.c
+test_isblank_OBJECTS = test-isblank.$(OBJEXT)
+test_isblank_LDADD = $(LDADD)
+test_isblank_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_iswblank_SOURCES = test-iswblank.c
+test_iswblank_OBJECTS = test-iswblank.$(OBJEXT)
+test_iswblank_LDADD = $(LDADD)
+test_iswblank_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_langinfo_SOURCES = test-langinfo.c
+test_langinfo_OBJECTS = test-langinfo.$(OBJEXT)
+test_langinfo_LDADD = $(LDADD)
+test_langinfo_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_lchown_SOURCES = test-lchown.c
+test_lchown_OBJECTS = test-lchown.$(OBJEXT)
+test_lchown_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_locale_SOURCES = test-locale.c
+test_locale_OBJECTS = test-locale.$(OBJEXT)
+test_locale_LDADD = $(LDADD)
+test_locale_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_localename_SOURCES = test-localename.c
+test_localename_OBJECTS = test-localename.$(OBJEXT)
+test_localename_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_lock_SOURCES = test-lock.c
+test_lock_OBJECTS = test-lock.$(OBJEXT)
+test_lock_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_lseek_SOURCES = test-lseek.c
+test_lseek_OBJECTS = test-lseek.$(OBJEXT)
+test_lseek_LDADD = $(LDADD)
+test_lseek_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_lstat_SOURCES = test-lstat.c
+test_lstat_OBJECTS = test-lstat.$(OBJEXT)
+test_lstat_LDADD = $(LDADD)
+test_lstat_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_malloc_gnu_SOURCES = test-malloc-gnu.c
+test_malloc_gnu_OBJECTS = test-malloc-gnu.$(OBJEXT)
+test_malloc_gnu_LDADD = $(LDADD)
+test_malloc_gnu_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_malloca_SOURCES = test-malloca.c
+test_malloca_OBJECTS = test-malloca.$(OBJEXT)
+test_malloca_LDADD = $(LDADD)
+test_malloca_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_math_SOURCES = test-math.c
+test_math_OBJECTS = test-math.$(OBJEXT)
+test_math_LDADD = $(LDADD)
+test_math_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbrtowc_SOURCES = test-mbrtowc.c
+test_mbrtowc_OBJECTS = test-mbrtowc.$(OBJEXT)
+test_mbrtowc_LDADD = $(LDADD)
+test_mbrtowc_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbrtowc_w32_SOURCES = test-mbrtowc-w32.c
+test_mbrtowc_w32_OBJECTS = test-mbrtowc-w32.$(OBJEXT)
+test_mbrtowc_w32_LDADD = $(LDADD)
+test_mbrtowc_w32_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbscasestr1_SOURCES = test-mbscasestr1.c
+test_mbscasestr1_OBJECTS = test-mbscasestr1.$(OBJEXT)
+test_mbscasestr1_LDADD = $(LDADD)
+test_mbscasestr1_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbscasestr2_SOURCES = test-mbscasestr2.c
+test_mbscasestr2_OBJECTS = test-mbscasestr2.$(OBJEXT)
+test_mbscasestr2_LDADD = $(LDADD)
+test_mbscasestr2_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbscasestr3_SOURCES = test-mbscasestr3.c
+test_mbscasestr3_OBJECTS = test-mbscasestr3.$(OBJEXT)
+test_mbscasestr3_LDADD = $(LDADD)
+test_mbscasestr3_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbscasestr4_SOURCES = test-mbscasestr4.c
+test_mbscasestr4_OBJECTS = test-mbscasestr4.$(OBJEXT)
+test_mbscasestr4_LDADD = $(LDADD)
+test_mbscasestr4_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbsinit_SOURCES = test-mbsinit.c
+test_mbsinit_OBJECTS = test-mbsinit.$(OBJEXT)
+test_mbsinit_LDADD = $(LDADD)
+test_mbsinit_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbsrtowcs_SOURCES = test-mbsrtowcs.c
+test_mbsrtowcs_OBJECTS = test-mbsrtowcs.$(OBJEXT)
+test_mbsrtowcs_LDADD = $(LDADD)
+test_mbsrtowcs_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbsstr1_SOURCES = test-mbsstr1.c
+test_mbsstr1_OBJECTS = test-mbsstr1.$(OBJEXT)
+test_mbsstr1_LDADD = $(LDADD)
+test_mbsstr1_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbsstr2_SOURCES = test-mbsstr2.c
+test_mbsstr2_OBJECTS = test-mbsstr2.$(OBJEXT)
+test_mbsstr2_LDADD = $(LDADD)
+test_mbsstr2_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mbsstr3_SOURCES = test-mbsstr3.c
+test_mbsstr3_OBJECTS = test-mbsstr3.$(OBJEXT)
+test_mbsstr3_LDADD = $(LDADD)
+test_mbsstr3_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_memchr_SOURCES = test-memchr.c
+test_memchr_OBJECTS = test-memchr.$(OBJEXT)
+test_memchr_LDADD = $(LDADD)
+test_memchr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_memrchr_SOURCES = test-memrchr.c
+test_memrchr_OBJECTS = test-memrchr.$(OBJEXT)
+test_memrchr_LDADD = $(LDADD)
+test_memrchr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mkdir_SOURCES = test-mkdir.c
+test_mkdir_OBJECTS = test-mkdir.$(OBJEXT)
+test_mkdir_LDADD = $(LDADD)
+test_mkdir_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_mkdirat_SOURCES = test-mkdirat.c
+test_mkdirat_OBJECTS = test-mkdirat.$(OBJEXT)
+test_mkdirat_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_modf_SOURCES = test-modf.c
+test_modf_OBJECTS = test-modf.$(OBJEXT)
+test_modf_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_nl_langinfo_SOURCES = test-nl_langinfo.c
+test_nl_langinfo_OBJECTS = test-nl_langinfo.$(OBJEXT)
+test_nl_langinfo_LDADD = $(LDADD)
+test_nl_langinfo_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_open_SOURCES = test-open.c
+test_open_OBJECTS = test-open.$(OBJEXT)
+test_open_LDADD = $(LDADD)
+test_open_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_openat_SOURCES = test-openat.c
+test_openat_OBJECTS = test-openat.$(OBJEXT)
+test_openat_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_openat_safer_SOURCES = test-openat-safer.c
+test_openat_safer_OBJECTS = test-openat-safer.$(OBJEXT)
+test_openat_safer_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_parse_datetime_SOURCES = test-parse-datetime.c
+test_parse_datetime_OBJECTS = test-parse-datetime.$(OBJEXT)
+test_parse_datetime_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
+test_perror_SOURCES = test-perror.c
+test_perror_OBJECTS = test-perror.$(OBJEXT)
+test_perror_LDADD = $(LDADD)
+test_perror_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_priv_set_SOURCES = test-priv-set.c
+test_priv_set_OBJECTS = test-priv-set.$(OBJEXT)
+test_priv_set_LDADD = $(LDADD)
+test_priv_set_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_quotearg_simple_SOURCES = test-quotearg-simple.c
+test_quotearg_simple_OBJECTS = test-quotearg-simple.$(OBJEXT)
+test_quotearg_simple_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_readlink_SOURCES = test-readlink.c
+test_readlink_OBJECTS = test-readlink.$(OBJEXT)
+test_readlink_LDADD = $(LDADD)
+test_readlink_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_readlinkat_SOURCES = test-readlinkat.c
+test_readlinkat_OBJECTS = test-readlinkat.$(OBJEXT)
+test_readlinkat_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_realloc_gnu_SOURCES = test-realloc-gnu.c
+test_realloc_gnu_OBJECTS = test-realloc-gnu.$(OBJEXT)
+test_realloc_gnu_LDADD = $(LDADD)
+test_realloc_gnu_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_rmdir_SOURCES = test-rmdir.c
+test_rmdir_OBJECTS = test-rmdir.$(OBJEXT)
+test_rmdir_LDADD = $(LDADD)
+test_rmdir_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_setenv_SOURCES = test-setenv.c
+test_setenv_OBJECTS = test-setenv.$(OBJEXT)
+test_setenv_LDADD = $(LDADD)
+test_setenv_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_setlocale1_SOURCES = test-setlocale1.c
+test_setlocale1_OBJECTS = test-setlocale1.$(OBJEXT)
+test_setlocale1_LDADD = $(LDADD)
+test_setlocale1_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_setlocale2_SOURCES = test-setlocale2.c
+test_setlocale2_OBJECTS = test-setlocale2.$(OBJEXT)
+test_setlocale2_LDADD = $(LDADD)
+test_setlocale2_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_sleep_SOURCES = test-sleep.c
+test_sleep_OBJECTS = test-sleep.$(OBJEXT)
+test_sleep_LDADD = $(LDADD)
+test_sleep_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_snprintf_SOURCES = test-snprintf.c
+test_snprintf_OBJECTS = test-snprintf.$(OBJEXT)
+test_snprintf_LDADD = $(LDADD)
+test_snprintf_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_stat_SOURCES = test-stat.c
+test_stat_OBJECTS = test-stat.$(OBJEXT)
+test_stat_LDADD = $(LDADD)
+test_stat_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_stat_time_SOURCES = test-stat-time.c
+test_stat_time_OBJECTS = test-stat-time.$(OBJEXT)
+test_stat_time_LDADD = $(LDADD)
+test_stat_time_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_stdbool_SOURCES = test-stdbool.c
+test_stdbool_OBJECTS = test-stdbool.$(OBJEXT)
+test_stdbool_LDADD = $(LDADD)
+test_stdbool_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_stddef_SOURCES = test-stddef.c
+test_stddef_OBJECTS = test-stddef.$(OBJEXT)
+test_stddef_LDADD = $(LDADD)
+test_stddef_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_stdint_SOURCES = test-stdint.c
+test_stdint_OBJECTS = test-stdint.$(OBJEXT)
+test_stdint_LDADD = $(LDADD)
+test_stdint_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_stdio_SOURCES = test-stdio.c
+test_stdio_OBJECTS = test-stdio.$(OBJEXT)
+test_stdio_LDADD = $(LDADD)
+test_stdio_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_stdlib_SOURCES = test-stdlib.c
+test_stdlib_OBJECTS = test-stdlib.$(OBJEXT)
+test_stdlib_LDADD = $(LDADD)
+test_stdlib_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_strcasestr_SOURCES = test-strcasestr.c
+test_strcasestr_OBJECTS = test-strcasestr.$(OBJEXT)
+test_strcasestr_LDADD = $(LDADD)
+test_strcasestr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_strerror_SOURCES = test-strerror.c
+test_strerror_OBJECTS = test-strerror.$(OBJEXT)
+test_strerror_LDADD = $(LDADD)
+test_strerror_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_strftime_SOURCES = test-strftime.c
+test_strftime_OBJECTS = test-strftime.$(OBJEXT)
+test_strftime_LDADD = $(LDADD)
+test_strftime_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_string_SOURCES = test-string.c
+test_string_OBJECTS = test-string.$(OBJEXT)
+test_string_LDADD = $(LDADD)
+test_string_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_strings_SOURCES = test-strings.c
+test_strings_OBJECTS = test-strings.$(OBJEXT)
+test_strings_LDADD = $(LDADD)
+test_strings_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_strnlen_SOURCES = test-strnlen.c
+test_strnlen_OBJECTS = test-strnlen.$(OBJEXT)
+test_strnlen_LDADD = $(LDADD)
+test_strnlen_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_strstr_SOURCES = test-strstr.c
+test_strstr_OBJECTS = test-strstr.$(OBJEXT)
+test_strstr_LDADD = $(LDADD)
+test_strstr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_symlink_SOURCES = test-symlink.c
+test_symlink_OBJECTS = test-symlink.$(OBJEXT)
+test_symlink_LDADD = $(LDADD)
+test_symlink_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_symlinkat_SOURCES = test-symlinkat.c
+test_symlinkat_OBJECTS = test-symlinkat.$(OBJEXT)
+test_symlinkat_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_sys_stat_SOURCES = test-sys_stat.c
+test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT)
+test_sys_stat_LDADD = $(LDADD)
+test_sys_stat_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_sys_time_SOURCES = test-sys_time.c
+test_sys_time_OBJECTS = test-sys_time.$(OBJEXT)
+test_sys_time_LDADD = $(LDADD)
+test_sys_time_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_sys_wait_SOURCES = test-sys_wait.c
+test_sys_wait_OBJECTS = test-sys_wait.$(OBJEXT)
+test_sys_wait_LDADD = $(LDADD)
+test_sys_wait_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_time_SOURCES = test-time.c
+test_time_OBJECTS = test-time.$(OBJEXT)
+test_time_LDADD = $(LDADD)
+test_time_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+am_test_uc_width_OBJECTS = uniwidth/test-uc_width.$(OBJEXT)
+test_uc_width_OBJECTS = $(am_test_uc_width_OBJECTS)
+test_uc_width_DEPENDENCIES = $(am__DEPENDENCIES_2)
+am_test_uc_width2_OBJECTS = uniwidth/test-uc_width2.$(OBJEXT)
+test_uc_width2_OBJECTS = $(am_test_uc_width2_OBJECTS)
+test_uc_width2_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_unistd_SOURCES = test-unistd.c
+test_unistd_OBJECTS = test-unistd.$(OBJEXT)
+test_unistd_LDADD = $(LDADD)
+test_unistd_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_unlink_SOURCES = test-unlink.c
+test_unlink_OBJECTS = test-unlink.$(OBJEXT)
+test_unlink_LDADD = $(LDADD)
+test_unlink_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_unlinkat_SOURCES = test-unlinkat.c
+test_unlinkat_OBJECTS = test-unlinkat.$(OBJEXT)
+test_unlinkat_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_unsetenv_SOURCES = test-unsetenv.c
+test_unsetenv_OBJECTS = test-unsetenv.$(OBJEXT)
+test_unsetenv_LDADD = $(LDADD)
+test_unsetenv_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_usleep_SOURCES = test-usleep.c
+test_usleep_OBJECTS = test-usleep.$(OBJEXT)
+test_usleep_LDADD = $(LDADD)
+test_usleep_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_vasnprintf_SOURCES = test-vasnprintf.c
+test_vasnprintf_OBJECTS = test-vasnprintf.$(OBJEXT)
+test_vasnprintf_LDADD = $(LDADD)
+test_vasnprintf_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_verify_SOURCES = test-verify.c
+test_verify_OBJECTS = test-verify.$(OBJEXT)
+test_verify_LDADD = $(LDADD)
+test_verify_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_version_etc_SOURCES = test-version-etc.c
+test_version_etc_OBJECTS = test-version-etc.$(OBJEXT)
+test_version_etc_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_wchar_SOURCES = test-wchar.c
+test_wchar_OBJECTS = test-wchar.$(OBJEXT)
+test_wchar_LDADD = $(LDADD)
+test_wchar_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_wcrtomb_SOURCES = test-wcrtomb.c
+test_wcrtomb_OBJECTS = test-wcrtomb.$(OBJEXT)
+test_wcrtomb_LDADD = $(LDADD)
+test_wcrtomb_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_wcrtomb_w32_SOURCES = test-wcrtomb-w32.c
+test_wcrtomb_w32_OBJECTS = test-wcrtomb-w32.$(OBJEXT)
+test_wcrtomb_w32_LDADD = $(LDADD)
+test_wcrtomb_w32_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_wctype_h_SOURCES = test-wctype-h.c
+test_wctype_h_OBJECTS = test-wctype-h.$(OBJEXT)
+test_wctype_h_LDADD = $(LDADD)
+test_wctype_h_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_wcwidth_SOURCES = test-wcwidth.c
+test_wcwidth_OBJECTS = test-wcwidth.$(OBJEXT)
+test_wcwidth_LDADD = $(LDADD)
+test_wcwidth_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \
+       libtests.a $(am__DEPENDENCIES_1)
+test_xalloc_die_SOURCES = test-xalloc-die.c
+test_xalloc_die_OBJECTS = test-xalloc-die.$(OBJEXT)
+test_xalloc_die_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_xstrtol_SOURCES = test-xstrtol.c
+test_xstrtol_OBJECTS = test-xstrtol.$(OBJEXT)
+test_xstrtol_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_xstrtoul_SOURCES = test-xstrtoul.c
+test_xstrtoul_OBJECTS = test-xstrtoul.$(OBJEXT)
+test_xstrtoul_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_xstrtoumax_SOURCES = test-xstrtoumax.c
+test_xstrtoumax_OBJECTS = test-xstrtoumax.$(OBJEXT)
+test_xstrtoumax_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_yesno_SOURCES = test-yesno.c
+test_yesno_OBJECTS = test-yesno.$(OBJEXT)
+test_yesno_DEPENDENCIES = $(am__DEPENDENCIES_2)
+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)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
+       test-alloca-opt.c test-areadlink.c test-areadlink-with-size.c \
+       test-areadlinkat.c test-argmatch.c test-binary-io.c \
+       test-bitrotate.c test-btowc.c test-c-ctype.c \
+       test-c-strcasecmp.c test-c-strcasestr.c test-c-strncasecmp.c \
+       test-c-strstr.c test-canonicalize.c test-chown.c \
+       test-cloexec.c test-closein.c test-ctype.c test-dirent.c \
+       test-dirent-safer.c test-dirname.c test-dup-safer.c \
+       test-dup2.c test-environ.c test-errno.c test-fchdir.c \
+       test-fchownat.c test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \
+       test-fdopendir.c test-fflush.c test-fflush2.c test-fnmatch.c \
+       test-fopen.c test-fopen-safer.c test-fpending.c test-fpurge.c \
+       test-freadahead.c test-freading.c test-fseeko.c test-fstatat.c \
+       test-ftell.c test-ftell3.c test-ftello.c test-ftello3.c \
+       test-getcwd.c test-getdelim.c test-getdtablesize.c \
+       test-getgroups.c test-getline.c test-getopt.c \
+       test-gettimeofday.c test-hash.c test-i-ring.c \
+       test-ignore-value.c test-inttostr.c test-inttypes.c \
+       test-isblank.c test-iswblank.c test-langinfo.c test-lchown.c \
+       test-locale.c test-localename.c test-lock.c test-lseek.c \
+       test-lstat.c test-malloc-gnu.c test-malloca.c test-math.c \
+       test-mbrtowc.c test-mbrtowc-w32.c test-mbscasestr1.c \
+       test-mbscasestr2.c test-mbscasestr3.c test-mbscasestr4.c \
+       test-mbsinit.c test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c \
+       test-mbsstr3.c test-memchr.c test-memrchr.c test-mkdir.c \
+       test-mkdirat.c test-modf.c test-nl_langinfo.c test-open.c \
+       test-openat.c test-openat-safer.c test-parse-datetime.c \
+       test-perror.c test-priv-set.c test-quotearg-simple.c \
+       test-readlink.c test-readlinkat.c test-realloc-gnu.c \
+       test-rmdir.c test-setenv.c test-setlocale1.c test-setlocale2.c \
+       test-sleep.c test-snprintf.c test-stat.c test-stat-time.c \
+       test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \
+       test-stdlib.c test-strcasestr.c test-strerror.c \
+       test-strftime.c test-string.c test-strings.c test-strnlen.c \
+       test-strstr.c test-symlink.c test-symlinkat.c test-sys_stat.c \
+       test-sys_time.c test-sys_wait.c test-time.c \
+       $(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \
+       test-unistd.c test-unlink.c test-unlinkat.c test-unsetenv.c \
+       test-usleep.c test-vasnprintf.c test-verify.c \
+       test-version-etc.c test-wchar.c test-wcrtomb.c \
+       test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \
+       test-xalloc-die.c test-xstrtol.c test-xstrtoul.c \
+       test-xstrtoumax.c test-yesno.c
+DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
+       test-alloca-opt.c test-areadlink.c test-areadlink-with-size.c \
+       test-areadlinkat.c test-argmatch.c test-binary-io.c \
+       test-bitrotate.c test-btowc.c test-c-ctype.c \
+       test-c-strcasecmp.c test-c-strcasestr.c test-c-strncasecmp.c \
+       test-c-strstr.c test-canonicalize.c test-chown.c \
+       test-cloexec.c test-closein.c test-ctype.c test-dirent.c \
+       test-dirent-safer.c test-dirname.c test-dup-safer.c \
+       test-dup2.c test-environ.c test-errno.c test-fchdir.c \
+       test-fchownat.c test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \
+       test-fdopendir.c test-fflush.c test-fflush2.c test-fnmatch.c \
+       test-fopen.c test-fopen-safer.c test-fpending.c test-fpurge.c \
+       test-freadahead.c test-freading.c test-fseeko.c test-fstatat.c \
+       test-ftell.c test-ftell3.c test-ftello.c test-ftello3.c \
+       test-getcwd.c test-getdelim.c test-getdtablesize.c \
+       test-getgroups.c test-getline.c test-getopt.c \
+       test-gettimeofday.c test-hash.c test-i-ring.c \
+       test-ignore-value.c test-inttostr.c test-inttypes.c \
+       test-isblank.c test-iswblank.c test-langinfo.c test-lchown.c \
+       test-locale.c test-localename.c test-lock.c test-lseek.c \
+       test-lstat.c test-malloc-gnu.c test-malloca.c test-math.c \
+       test-mbrtowc.c test-mbrtowc-w32.c test-mbscasestr1.c \
+       test-mbscasestr2.c test-mbscasestr3.c test-mbscasestr4.c \
+       test-mbsinit.c test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c \
+       test-mbsstr3.c test-memchr.c test-memrchr.c test-mkdir.c \
+       test-mkdirat.c test-modf.c test-nl_langinfo.c test-open.c \
+       test-openat.c test-openat-safer.c test-parse-datetime.c \
+       test-perror.c test-priv-set.c test-quotearg-simple.c \
+       test-readlink.c test-readlinkat.c test-realloc-gnu.c \
+       test-rmdir.c test-setenv.c test-setlocale1.c test-setlocale2.c \
+       test-sleep.c test-snprintf.c test-stat.c test-stat-time.c \
+       test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \
+       test-stdlib.c test-strcasestr.c test-strerror.c \
+       test-strftime.c test-string.c test-strings.c test-strnlen.c \
+       test-strstr.c test-symlink.c test-symlinkat.c test-sys_stat.c \
+       test-sys_time.c test-sys_wait.c test-time.c \
+       $(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \
+       test-unistd.c test-unlink.c test-unlinkat.c test-unsetenv.c \
+       test-usleep.c test-vasnprintf.c test-verify.c \
+       test-version-etc.c test-wchar.c test-wcrtomb.c \
+       test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \
+       test-xalloc-die.c test-xstrtol.c test-xstrtoul.c \
+       test-xstrtoumax.c test-yesno.c
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+HEADERS = $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = @INCLUDES@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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 foreign subdir-objects
+SUBDIRS = .
+TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
+       LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+       LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \
+       LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+       LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' \
+       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+       LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \
+       LOCALE_ZH_CN='@LOCALE_ZH_CN@' \
+       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
+       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
+       LOCALE_ZH_CN='@LOCALE_ZH_CN@' \
+       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+       LOCALE_ZH_CN='@LOCALE_ZH_CN@' LOCALE_FR='@LOCALE_FR@' \
+       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
+       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
+       LOCALE_ZH_CN='@LOCALE_ZH_CN@' abs_aux_dir='$(abs_aux_dir)' \
+       abs_aux_dir='$(abs_aux_dir)' MAKE='$(MAKE)' \
+       LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+       LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+noinst_HEADERS = 
+noinst_LIBRARIES = 
+check_LIBRARIES = libtests.a
+EXTRA_DIST = test-alloca-opt.c test-areadlink.h test-areadlink.c \
+       macros.h test-areadlink.h test-areadlink-with-size.c macros.h \
+       test-areadlink.h test-areadlinkat.c macros.h \
+       $(top_srcdir)/build-aux/arg-nonnull.h test-argmatch.c macros.h \
+       test-binary-io.sh test-binary-io.c macros.h test-bitrotate.c \
+       macros.h test-btowc1.sh test-btowc2.sh test-btowc.c \
+       signature.h macros.h $(top_srcdir)/build-aux/c++defs.h \
+       test-c-ctype.c macros.h test-c-strcase.sh test-c-strcasecmp.c \
+       test-c-strncasecmp.c macros.h test-c-strcasestr.c macros.h \
+       test-c-strstr.c macros.h test-canonicalize.c macros.h nap.h \
+       test-chown.h test-chown.c signature.h macros.h test-cloexec.c \
+       macros.h test-closein.sh test-closein.c test-ctype.c \
+       test-dirent-safer.c macros.h test-dirent.c test-dirname.c \
+       test-dup2.c signature.h macros.h test-environ.c test-errno.c \
+       test-fchdir.c signature.h macros.h test-fcntl-h.c test-open.h \
+       test-fcntl-safer.c macros.h test-fcntl.c signature.h macros.h \
+       test-fdopendir.c signature.h macros.h test-fflush.c \
+       test-fflush2.sh test-fflush2.c signature.h macros.h \
+       test-fnmatch.c signature.h macros.h test-fopen.h \
+       test-fopen-safer.c macros.h test-fopen.h test-fopen.c \
+       signature.h macros.h test-fpending.c test-fpending.sh macros.h \
+       test-fpurge.c macros.h test-freadahead.c test-freadahead.sh \
+       macros.h test-freading.c macros.h test-fseeko.c test-fseeko.sh \
+       test-fseeko2.sh signature.h macros.h ftell.c test-ftell.c \
+       test-ftell.sh test-ftell2.sh test-ftell3.c signature.h \
+       macros.h test-ftello.c test-ftello.sh test-ftello2.sh \
+       test-ftello3.c signature.h macros.h test-getcwd.c signature.h \
+       macros.h test-getdelim.c signature.h macros.h \
+       test-getdtablesize.c signature.h macros.h test-getgroups.c \
+       signature.h macros.h test-getline.c signature.h macros.h \
+       macros.h signature.h test-getopt.c test-getopt.h \
+       test-getopt_long.h getpagesize.c signature.h \
+       test-gettimeofday.c getugroups.c getugroups.h test-hash.c \
+       macros.h test-i-ring.c macros.h test-ignore-value.c anytostr.c \
+       inttostr.h macros.h test-inttostr.c test-inttypes.c \
+       test-isblank.c signature.h macros.h test-iswblank.c macros.h \
+       test-langinfo.c nap.h test-lchown.h test-lchown.c signature.h \
+       macros.h test-locale.c localename.h test-localename.c macros.h \
+       test-lock.c test-lseek.c test-lseek.sh signature.h macros.h \
+       test-lstat.h test-lstat.c signature.h macros.h \
+       test-malloc-gnu.c test-malloca.c test-math.c test-mbrtowc1.sh \
+       test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
+       test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \
+       test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \
+       test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h \
+       test-mbscasestr1.c test-mbscasestr2.sh test-mbscasestr2.c \
+       test-mbscasestr3.sh test-mbscasestr3.c test-mbscasestr4.sh \
+       test-mbscasestr4.c macros.h test-mbsinit.sh test-mbsinit.c \
+       signature.h macros.h test-mbsrtowcs1.sh test-mbsrtowcs2.sh \
+       test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsrtowcs.c \
+       signature.h macros.h test-mbsstr1.c test-mbsstr2.sh \
+       test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c macros.h \
+       test-memchr.c zerosize-ptr.h signature.h macros.h \
+       test-memrchr.c zerosize-ptr.h signature.h macros.h \
+       mgetgroups.c mgetgroups.h test-mkdir.h test-mkdir.c \
+       signature.h macros.h test-modf.c signature.h macros.h \
+       test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h \
+       test-open.h test-open.c signature.h macros.h \
+       test-openat-safer.c macros.h nap.h test-chown.h test-lchown.h \
+       test-lstat.h test-mkdir.h test-rmdir.h test-stat.h \
+       test-unlink.h test-fchownat.c test-fstatat.c test-mkdirat.c \
+       test-openat.c test-unlinkat.c signature.h macros.h \
+       test-parse-datetime.c macros.h signature.h test-perror.c \
+       test-perror.sh priv-set.h test-priv-set.c macros.h putenv.c \
+       test-quotearg-simple.c test-quotearg.h macros.h \
+       test-readlink.h test-readlink.c signature.h macros.h \
+       test-readlink.h test-readlinkat.c signature.h macros.h \
+       test-realloc-gnu.c test-rmdir.h test-rmdir.c signature.h \
+       macros.h test-setenv.c signature.h macros.h setlocale.c \
+       test-setlocale1.sh test-setlocale1.c test-setlocale2.sh \
+       test-setlocale2.c signature.h macros.h sleep.c test-sleep.c \
+       signature.h macros.h test-snprintf.c signature.h macros.h \
+       test-stat.h test-stat.c signature.h macros.h test-stat-time.c \
+       macros.h test-stdbool.c test-stddef.c test-stdint.c \
+       test-stdio.c test-stdlib.c test-sys_wait.h test-strcasestr.c \
+       signature.h macros.h test-strerror.c signature.h macros.h \
+       test-strftime.c macros.h test-string.c test-strings.c \
+       test-strnlen.c zerosize-ptr.h signature.h macros.h \
+       test-strstr.c zerosize-ptr.h signature.h macros.h symlink.c \
+       test-symlink.h test-symlink.c signature.h macros.h symlinkat.c \
+       test-symlink.h test-symlinkat.c signature.h macros.h \
+       test-sys_stat.c test-sys_time.c test-sys_wait.c \
+       test-sys_wait.h $(top_srcdir)/build-aux/config.rpath \
+       test-time.c test-dup-safer.c macros.h test-unistd.c \
+       uniwidth/test-uc_width.c uniwidth/test-uc_width2.c \
+       uniwidth/test-uc_width2.sh macros.h test-unlink.h \
+       test-unlink.c signature.h macros.h unlinkdir.c unlinkdir.h \
+       test-unsetenv.c signature.h macros.h \
+       $(top_srcdir)/build-aux/unused-parameter.h \
+       test-update-copyright.sh usleep.c test-usleep.c signature.h \
+       macros.h test-vasnprintf.c macros.h test-vc-list-files-git.sh \
+       test-vc-list-files-cvs.sh init.sh test-verify.c test-verify.sh \
+       init.sh test-version-etc.c test-version-etc.sh \
+       $(top_srcdir)/build-aux/warn-on-use.h test-wchar.c \
+       test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh \
+       test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh \
+       test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32.c \
+       signature.h macros.h wctob.c wctomb-impl.h wctomb.c \
+       test-wctype-h.c macros.h test-wcwidth.c signature.h macros.h \
+       test-xalloc-die.c test-xalloc-die.sh init.sh init.sh \
+       test-xstrtol.c test-xstrtoul.c test-xstrtol.sh init.sh \
+       test-xstrtoumax.c test-xstrtoumax.sh test-yesno.c \
+       test-yesno.sh
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+BUILT_SOURCES = arg-nonnull.h c++defs.h unused-parameter.h \
+       warn-on-use.h
+SUFFIXES = 
+MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \
+       c++defs.h c++defs.h-t test-fflush.txt test-fpending.t \
+       t-fpurge.tmp t-freading.tmp t-ftell3.tmp t-ftello3.tmp \
+       test-getdelim.txt test-getline.txt unused-parameter.h \
+       unused-parameter.h-t warn-on-use.h warn-on-use.h-t
+MOSTLYCLEANDIRS = 
+CLEANFILES = 
+DISTCLEANFILES = 
+MAINTAINERCLEANFILES = 
+AM_CPPFLAGS = \
+  -D@gltests_WITNESS@=1 \
+  -I. -I$(srcdir) \
+  -I.. -I$(srcdir)/.. \
+  -I../gnulib/lib -I$(srcdir)/../gnulib/lib
+
+LDADD = libtests.a ../gnulib/lib/libgnulib.a libtests.a $(LIBTESTS_LIBDEPS)
+libtests_a_SOURCES = binary-io.h fd-safer-flag.c dup-safer-flag.c \
+       ignore-value.h imaxtostr.c inttostr.c offtostr.c uinttostr.c \
+       umaxtostr.c localename.c glthread/lock.h glthread/lock.c \
+       priv-set.c glthread/thread.h glthread/thread.c \
+       glthread/threadlib.c glthread/yield.h
+libtests_a_LIBADD = $(gltests_LIBOBJS)
+libtests_a_DEPENDENCIES = $(gltests_LIBOBJS)
+EXTRA_libtests_a_SOURCES = ftell.c getpagesize.c getugroups.c \
+       anytostr.c mgetgroups.c putenv.c setlocale.c sleep.c symlink.c \
+       symlinkat.c unlinkdir.c usleep.c wctob.c wctomb.c
+AM_LIBTOOLFLAGS = --preserve-dup-deps
+test_areadlinkat_LDADD = $(LDADD) @LIBINTL@
+ARG_NONNULL_H = arg-nonnull.h
+test_argmatch_LDADD = $(LDADD) @LIBINTL@
+CXXDEFS_H = c++defs.h
+test_canonicalize_LDADD = $(LDADD) @LIBINTL@
+test_chown_LDADD = $(LDADD) @LIBINTL@
+test_closein_LDADD = $(LDADD) @LIBINTL@
+# Link with libintl when needed. dirent-safer uses fdopendir if it is present,
+# and fdopendir indirectly depends on xgetcwd -> xalloc-die -> gettext-h.
+test_dirent_safer_LDADD = $(LDADD) $(LIBINTL)
+test_dirname_LDADD = $(LDADD) @LIBINTL@
+test_fdopendir_LDADD = $(LDADD) @LIBINTL@
+test_getopt_LDADD = $(LDADD) $(LIBINTL)
+test_hash_LDADD = $(LDADD) @LIBINTL@
+test_lchown_LDADD = $(LDADD) @LIBINTL@
+test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@
+test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@
+test_modf_LDADD = $(LDADD) @MODF_LIBM@
+test_openat_safer_LDADD = $(LDADD) @LIBINTL@
+test_fchownat_LDADD = $(LDADD) @LIBINTL@
+test_fstatat_LDADD = $(LDADD) @LIBINTL@
+test_mkdirat_LDADD = $(LDADD) @LIBINTL@
+test_openat_LDADD = $(LDADD) @LIBINTL@
+test_unlinkat_LDADD = $(LDADD) @LIBINTL@
+test_parse_datetime_LDADD = $(LDADD) @LIBINTL@ $(LIB_CLOCK_GETTIME)
+test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@
+test_readlinkat_LDADD = $(LDADD) @LIBINTL@
+test_symlinkat_LDADD = $(LDADD) @LIBINTL@
+test_uc_width_SOURCES = uniwidth/test-uc_width.c
+test_uc_width_LDADD = $(LDADD) $(LIBUNISTRING)
+test_uc_width2_SOURCES = uniwidth/test-uc_width2.c
+test_uc_width2_LDADD = $(LDADD) $(LIBUNISTRING)
+UNUSED_PARAMETER_H = unused-parameter.h
+test_version_etc_LDADD = $(LDADD) @LIBINTL@
+WARN_ON_USE_H = warn-on-use.h
+test_xalloc_die_LDADD = $(LDADD) @LIBINTL@
+test_xstrtol_LDADD = $(LDADD) @LIBINTL@
+test_xstrtoul_LDADD = $(LDADD) @LIBINTL@
+test_xstrtoumax_LDADD = $(LDADD) @LIBINTL@
+test_yesno_LDADD = $(LDADD) @LIBINTL@
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(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) --foreign tests/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/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-checkLIBRARIES:
+       -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES)
+
+clean-noinstLIBRARIES:
+       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+glthread/$(am__dirstamp):
+       @$(MKDIR_P) glthread
+       @: > glthread/$(am__dirstamp)
+glthread/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) glthread/$(DEPDIR)
+       @: > glthread/$(DEPDIR)/$(am__dirstamp)
+glthread/lock.$(OBJEXT): glthread/$(am__dirstamp) \
+       glthread/$(DEPDIR)/$(am__dirstamp)
+glthread/thread.$(OBJEXT): glthread/$(am__dirstamp) \
+       glthread/$(DEPDIR)/$(am__dirstamp)
+glthread/threadlib.$(OBJEXT): glthread/$(am__dirstamp) \
+       glthread/$(DEPDIR)/$(am__dirstamp)
+libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) 
+       -rm -f libtests.a
+       $(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD)
+       $(RANLIB) libtests.a
+
+clean-checkPROGRAMS:
+       -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+clean-noinstPROGRAMS:
+       -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) 
+       @rm -f test-alloca-opt$(EXEEXT)
+       $(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_LDADD) $(LIBS)
+test-areadlink$(EXEEXT): $(test_areadlink_OBJECTS) $(test_areadlink_DEPENDENCIES) 
+       @rm -f test-areadlink$(EXEEXT)
+       $(LINK) $(test_areadlink_OBJECTS) $(test_areadlink_LDADD) $(LIBS)
+test-areadlink-with-size$(EXEEXT): $(test_areadlink_with_size_OBJECTS) $(test_areadlink_with_size_DEPENDENCIES) 
+       @rm -f test-areadlink-with-size$(EXEEXT)
+       $(LINK) $(test_areadlink_with_size_OBJECTS) $(test_areadlink_with_size_LDADD) $(LIBS)
+test-areadlinkat$(EXEEXT): $(test_areadlinkat_OBJECTS) $(test_areadlinkat_DEPENDENCIES) 
+       @rm -f test-areadlinkat$(EXEEXT)
+       $(LINK) $(test_areadlinkat_OBJECTS) $(test_areadlinkat_LDADD) $(LIBS)
+test-argmatch$(EXEEXT): $(test_argmatch_OBJECTS) $(test_argmatch_DEPENDENCIES) 
+       @rm -f test-argmatch$(EXEEXT)
+       $(LINK) $(test_argmatch_OBJECTS) $(test_argmatch_LDADD) $(LIBS)
+test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) 
+       @rm -f test-binary-io$(EXEEXT)
+       $(LINK) $(test_binary_io_OBJECTS) $(test_binary_io_LDADD) $(LIBS)
+test-bitrotate$(EXEEXT): $(test_bitrotate_OBJECTS) $(test_bitrotate_DEPENDENCIES) 
+       @rm -f test-bitrotate$(EXEEXT)
+       $(LINK) $(test_bitrotate_OBJECTS) $(test_bitrotate_LDADD) $(LIBS)
+test-btowc$(EXEEXT): $(test_btowc_OBJECTS) $(test_btowc_DEPENDENCIES) 
+       @rm -f test-btowc$(EXEEXT)
+       $(LINK) $(test_btowc_OBJECTS) $(test_btowc_LDADD) $(LIBS)
+test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES) 
+       @rm -f test-c-ctype$(EXEEXT)
+       $(LINK) $(test_c_ctype_OBJECTS) $(test_c_ctype_LDADD) $(LIBS)
+test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEPENDENCIES) 
+       @rm -f test-c-strcasecmp$(EXEEXT)
+       $(LINK) $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_LDADD) $(LIBS)
+test-c-strcasestr$(EXEEXT): $(test_c_strcasestr_OBJECTS) $(test_c_strcasestr_DEPENDENCIES) 
+       @rm -f test-c-strcasestr$(EXEEXT)
+       $(LINK) $(test_c_strcasestr_OBJECTS) $(test_c_strcasestr_LDADD) $(LIBS)
+test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_DEPENDENCIES) 
+       @rm -f test-c-strncasecmp$(EXEEXT)
+       $(LINK) $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_LDADD) $(LIBS)
+test-c-strstr$(EXEEXT): $(test_c_strstr_OBJECTS) $(test_c_strstr_DEPENDENCIES) 
+       @rm -f test-c-strstr$(EXEEXT)
+       $(LINK) $(test_c_strstr_OBJECTS) $(test_c_strstr_LDADD) $(LIBS)
+test-canonicalize$(EXEEXT): $(test_canonicalize_OBJECTS) $(test_canonicalize_DEPENDENCIES) 
+       @rm -f test-canonicalize$(EXEEXT)
+       $(LINK) $(test_canonicalize_OBJECTS) $(test_canonicalize_LDADD) $(LIBS)
+test-chown$(EXEEXT): $(test_chown_OBJECTS) $(test_chown_DEPENDENCIES) 
+       @rm -f test-chown$(EXEEXT)
+       $(LINK) $(test_chown_OBJECTS) $(test_chown_LDADD) $(LIBS)
+test-cloexec$(EXEEXT): $(test_cloexec_OBJECTS) $(test_cloexec_DEPENDENCIES) 
+       @rm -f test-cloexec$(EXEEXT)
+       $(LINK) $(test_cloexec_OBJECTS) $(test_cloexec_LDADD) $(LIBS)
+test-closein$(EXEEXT): $(test_closein_OBJECTS) $(test_closein_DEPENDENCIES) 
+       @rm -f test-closein$(EXEEXT)
+       $(LINK) $(test_closein_OBJECTS) $(test_closein_LDADD) $(LIBS)
+test-ctype$(EXEEXT): $(test_ctype_OBJECTS) $(test_ctype_DEPENDENCIES) 
+       @rm -f test-ctype$(EXEEXT)
+       $(LINK) $(test_ctype_OBJECTS) $(test_ctype_LDADD) $(LIBS)
+test-dirent$(EXEEXT): $(test_dirent_OBJECTS) $(test_dirent_DEPENDENCIES) 
+       @rm -f test-dirent$(EXEEXT)
+       $(LINK) $(test_dirent_OBJECTS) $(test_dirent_LDADD) $(LIBS)
+test-dirent-safer$(EXEEXT): $(test_dirent_safer_OBJECTS) $(test_dirent_safer_DEPENDENCIES) 
+       @rm -f test-dirent-safer$(EXEEXT)
+       $(LINK) $(test_dirent_safer_OBJECTS) $(test_dirent_safer_LDADD) $(LIBS)
+test-dirname$(EXEEXT): $(test_dirname_OBJECTS) $(test_dirname_DEPENDENCIES) 
+       @rm -f test-dirname$(EXEEXT)
+       $(LINK) $(test_dirname_OBJECTS) $(test_dirname_LDADD) $(LIBS)
+test-dup-safer$(EXEEXT): $(test_dup_safer_OBJECTS) $(test_dup_safer_DEPENDENCIES) 
+       @rm -f test-dup-safer$(EXEEXT)
+       $(LINK) $(test_dup_safer_OBJECTS) $(test_dup_safer_LDADD) $(LIBS)
+test-dup2$(EXEEXT): $(test_dup2_OBJECTS) $(test_dup2_DEPENDENCIES) 
+       @rm -f test-dup2$(EXEEXT)
+       $(LINK) $(test_dup2_OBJECTS) $(test_dup2_LDADD) $(LIBS)
+test-environ$(EXEEXT): $(test_environ_OBJECTS) $(test_environ_DEPENDENCIES) 
+       @rm -f test-environ$(EXEEXT)
+       $(LINK) $(test_environ_OBJECTS) $(test_environ_LDADD) $(LIBS)
+test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES) 
+       @rm -f test-errno$(EXEEXT)
+       $(LINK) $(test_errno_OBJECTS) $(test_errno_LDADD) $(LIBS)
+test-fchdir$(EXEEXT): $(test_fchdir_OBJECTS) $(test_fchdir_DEPENDENCIES) 
+       @rm -f test-fchdir$(EXEEXT)
+       $(LINK) $(test_fchdir_OBJECTS) $(test_fchdir_LDADD) $(LIBS)
+test-fchownat$(EXEEXT): $(test_fchownat_OBJECTS) $(test_fchownat_DEPENDENCIES) 
+       @rm -f test-fchownat$(EXEEXT)
+       $(LINK) $(test_fchownat_OBJECTS) $(test_fchownat_LDADD) $(LIBS)
+test-fcntl$(EXEEXT): $(test_fcntl_OBJECTS) $(test_fcntl_DEPENDENCIES) 
+       @rm -f test-fcntl$(EXEEXT)
+       $(LINK) $(test_fcntl_OBJECTS) $(test_fcntl_LDADD) $(LIBS)
+test-fcntl-h$(EXEEXT): $(test_fcntl_h_OBJECTS) $(test_fcntl_h_DEPENDENCIES) 
+       @rm -f test-fcntl-h$(EXEEXT)
+       $(LINK) $(test_fcntl_h_OBJECTS) $(test_fcntl_h_LDADD) $(LIBS)
+test-fcntl-safer$(EXEEXT): $(test_fcntl_safer_OBJECTS) $(test_fcntl_safer_DEPENDENCIES) 
+       @rm -f test-fcntl-safer$(EXEEXT)
+       $(LINK) $(test_fcntl_safer_OBJECTS) $(test_fcntl_safer_LDADD) $(LIBS)
+test-fdopendir$(EXEEXT): $(test_fdopendir_OBJECTS) $(test_fdopendir_DEPENDENCIES) 
+       @rm -f test-fdopendir$(EXEEXT)
+       $(LINK) $(test_fdopendir_OBJECTS) $(test_fdopendir_LDADD) $(LIBS)
+test-fflush$(EXEEXT): $(test_fflush_OBJECTS) $(test_fflush_DEPENDENCIES) 
+       @rm -f test-fflush$(EXEEXT)
+       $(LINK) $(test_fflush_OBJECTS) $(test_fflush_LDADD) $(LIBS)
+test-fflush2$(EXEEXT): $(test_fflush2_OBJECTS) $(test_fflush2_DEPENDENCIES) 
+       @rm -f test-fflush2$(EXEEXT)
+       $(LINK) $(test_fflush2_OBJECTS) $(test_fflush2_LDADD) $(LIBS)
+test-fnmatch$(EXEEXT): $(test_fnmatch_OBJECTS) $(test_fnmatch_DEPENDENCIES) 
+       @rm -f test-fnmatch$(EXEEXT)
+       $(LINK) $(test_fnmatch_OBJECTS) $(test_fnmatch_LDADD) $(LIBS)
+test-fopen$(EXEEXT): $(test_fopen_OBJECTS) $(test_fopen_DEPENDENCIES) 
+       @rm -f test-fopen$(EXEEXT)
+       $(LINK) $(test_fopen_OBJECTS) $(test_fopen_LDADD) $(LIBS)
+test-fopen-safer$(EXEEXT): $(test_fopen_safer_OBJECTS) $(test_fopen_safer_DEPENDENCIES) 
+       @rm -f test-fopen-safer$(EXEEXT)
+       $(LINK) $(test_fopen_safer_OBJECTS) $(test_fopen_safer_LDADD) $(LIBS)
+test-fpending$(EXEEXT): $(test_fpending_OBJECTS) $(test_fpending_DEPENDENCIES) 
+       @rm -f test-fpending$(EXEEXT)
+       $(LINK) $(test_fpending_OBJECTS) $(test_fpending_LDADD) $(LIBS)
+test-fpurge$(EXEEXT): $(test_fpurge_OBJECTS) $(test_fpurge_DEPENDENCIES) 
+       @rm -f test-fpurge$(EXEEXT)
+       $(LINK) $(test_fpurge_OBJECTS) $(test_fpurge_LDADD) $(LIBS)
+test-freadahead$(EXEEXT): $(test_freadahead_OBJECTS) $(test_freadahead_DEPENDENCIES) 
+       @rm -f test-freadahead$(EXEEXT)
+       $(LINK) $(test_freadahead_OBJECTS) $(test_freadahead_LDADD) $(LIBS)
+test-freading$(EXEEXT): $(test_freading_OBJECTS) $(test_freading_DEPENDENCIES) 
+       @rm -f test-freading$(EXEEXT)
+       $(LINK) $(test_freading_OBJECTS) $(test_freading_LDADD) $(LIBS)
+test-fseeko$(EXEEXT): $(test_fseeko_OBJECTS) $(test_fseeko_DEPENDENCIES) 
+       @rm -f test-fseeko$(EXEEXT)
+       $(LINK) $(test_fseeko_OBJECTS) $(test_fseeko_LDADD) $(LIBS)
+test-fstatat$(EXEEXT): $(test_fstatat_OBJECTS) $(test_fstatat_DEPENDENCIES) 
+       @rm -f test-fstatat$(EXEEXT)
+       $(LINK) $(test_fstatat_OBJECTS) $(test_fstatat_LDADD) $(LIBS)
+test-ftell$(EXEEXT): $(test_ftell_OBJECTS) $(test_ftell_DEPENDENCIES) 
+       @rm -f test-ftell$(EXEEXT)
+       $(LINK) $(test_ftell_OBJECTS) $(test_ftell_LDADD) $(LIBS)
+test-ftell3$(EXEEXT): $(test_ftell3_OBJECTS) $(test_ftell3_DEPENDENCIES) 
+       @rm -f test-ftell3$(EXEEXT)
+       $(LINK) $(test_ftell3_OBJECTS) $(test_ftell3_LDADD) $(LIBS)
+test-ftello$(EXEEXT): $(test_ftello_OBJECTS) $(test_ftello_DEPENDENCIES) 
+       @rm -f test-ftello$(EXEEXT)
+       $(LINK) $(test_ftello_OBJECTS) $(test_ftello_LDADD) $(LIBS)
+test-ftello3$(EXEEXT): $(test_ftello3_OBJECTS) $(test_ftello3_DEPENDENCIES) 
+       @rm -f test-ftello3$(EXEEXT)
+       $(LINK) $(test_ftello3_OBJECTS) $(test_ftello3_LDADD) $(LIBS)
+test-getcwd$(EXEEXT): $(test_getcwd_OBJECTS) $(test_getcwd_DEPENDENCIES) 
+       @rm -f test-getcwd$(EXEEXT)
+       $(LINK) $(test_getcwd_OBJECTS) $(test_getcwd_LDADD) $(LIBS)
+test-getdelim$(EXEEXT): $(test_getdelim_OBJECTS) $(test_getdelim_DEPENDENCIES) 
+       @rm -f test-getdelim$(EXEEXT)
+       $(LINK) $(test_getdelim_OBJECTS) $(test_getdelim_LDADD) $(LIBS)
+test-getdtablesize$(EXEEXT): $(test_getdtablesize_OBJECTS) $(test_getdtablesize_DEPENDENCIES) 
+       @rm -f test-getdtablesize$(EXEEXT)
+       $(LINK) $(test_getdtablesize_OBJECTS) $(test_getdtablesize_LDADD) $(LIBS)
+test-getgroups$(EXEEXT): $(test_getgroups_OBJECTS) $(test_getgroups_DEPENDENCIES) 
+       @rm -f test-getgroups$(EXEEXT)
+       $(LINK) $(test_getgroups_OBJECTS) $(test_getgroups_LDADD) $(LIBS)
+test-getline$(EXEEXT): $(test_getline_OBJECTS) $(test_getline_DEPENDENCIES) 
+       @rm -f test-getline$(EXEEXT)
+       $(LINK) $(test_getline_OBJECTS) $(test_getline_LDADD) $(LIBS)
+test-getopt$(EXEEXT): $(test_getopt_OBJECTS) $(test_getopt_DEPENDENCIES) 
+       @rm -f test-getopt$(EXEEXT)
+       $(LINK) $(test_getopt_OBJECTS) $(test_getopt_LDADD) $(LIBS)
+test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) 
+       @rm -f test-gettimeofday$(EXEEXT)
+       $(LINK) $(test_gettimeofday_OBJECTS) $(test_gettimeofday_LDADD) $(LIBS)
+test-hash$(EXEEXT): $(test_hash_OBJECTS) $(test_hash_DEPENDENCIES) 
+       @rm -f test-hash$(EXEEXT)
+       $(LINK) $(test_hash_OBJECTS) $(test_hash_LDADD) $(LIBS)
+test-i-ring$(EXEEXT): $(test_i_ring_OBJECTS) $(test_i_ring_DEPENDENCIES) 
+       @rm -f test-i-ring$(EXEEXT)
+       $(LINK) $(test_i_ring_OBJECTS) $(test_i_ring_LDADD) $(LIBS)
+test-ignore-value$(EXEEXT): $(test_ignore_value_OBJECTS) $(test_ignore_value_DEPENDENCIES) 
+       @rm -f test-ignore-value$(EXEEXT)
+       $(LINK) $(test_ignore_value_OBJECTS) $(test_ignore_value_LDADD) $(LIBS)
+test-inttostr$(EXEEXT): $(test_inttostr_OBJECTS) $(test_inttostr_DEPENDENCIES) 
+       @rm -f test-inttostr$(EXEEXT)
+       $(LINK) $(test_inttostr_OBJECTS) $(test_inttostr_LDADD) $(LIBS)
+test-inttypes$(EXEEXT): $(test_inttypes_OBJECTS) $(test_inttypes_DEPENDENCIES) 
+       @rm -f test-inttypes$(EXEEXT)
+       $(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_LDADD) $(LIBS)
+test-isblank$(EXEEXT): $(test_isblank_OBJECTS) $(test_isblank_DEPENDENCIES) 
+       @rm -f test-isblank$(EXEEXT)
+       $(LINK) $(test_isblank_OBJECTS) $(test_isblank_LDADD) $(LIBS)
+test-iswblank$(EXEEXT): $(test_iswblank_OBJECTS) $(test_iswblank_DEPENDENCIES) 
+       @rm -f test-iswblank$(EXEEXT)
+       $(LINK) $(test_iswblank_OBJECTS) $(test_iswblank_LDADD) $(LIBS)
+test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) 
+       @rm -f test-langinfo$(EXEEXT)
+       $(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS)
+test-lchown$(EXEEXT): $(test_lchown_OBJECTS) $(test_lchown_DEPENDENCIES) 
+       @rm -f test-lchown$(EXEEXT)
+       $(LINK) $(test_lchown_OBJECTS) $(test_lchown_LDADD) $(LIBS)
+test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES) 
+       @rm -f test-locale$(EXEEXT)
+       $(LINK) $(test_locale_OBJECTS) $(test_locale_LDADD) $(LIBS)
+test-localename$(EXEEXT): $(test_localename_OBJECTS) $(test_localename_DEPENDENCIES) 
+       @rm -f test-localename$(EXEEXT)
+       $(LINK) $(test_localename_OBJECTS) $(test_localename_LDADD) $(LIBS)
+test-lock$(EXEEXT): $(test_lock_OBJECTS) $(test_lock_DEPENDENCIES) 
+       @rm -f test-lock$(EXEEXT)
+       $(LINK) $(test_lock_OBJECTS) $(test_lock_LDADD) $(LIBS)
+test-lseek$(EXEEXT): $(test_lseek_OBJECTS) $(test_lseek_DEPENDENCIES) 
+       @rm -f test-lseek$(EXEEXT)
+       $(LINK) $(test_lseek_OBJECTS) $(test_lseek_LDADD) $(LIBS)
+test-lstat$(EXEEXT): $(test_lstat_OBJECTS) $(test_lstat_DEPENDENCIES) 
+       @rm -f test-lstat$(EXEEXT)
+       $(LINK) $(test_lstat_OBJECTS) $(test_lstat_LDADD) $(LIBS)
+test-malloc-gnu$(EXEEXT): $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_DEPENDENCIES) 
+       @rm -f test-malloc-gnu$(EXEEXT)
+       $(LINK) $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_LDADD) $(LIBS)
+test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES) 
+       @rm -f test-malloca$(EXEEXT)
+       $(LINK) $(test_malloca_OBJECTS) $(test_malloca_LDADD) $(LIBS)
+test-math$(EXEEXT): $(test_math_OBJECTS) $(test_math_DEPENDENCIES) 
+       @rm -f test-math$(EXEEXT)
+       $(LINK) $(test_math_OBJECTS) $(test_math_LDADD) $(LIBS)
+test-mbrtowc$(EXEEXT): $(test_mbrtowc_OBJECTS) $(test_mbrtowc_DEPENDENCIES) 
+       @rm -f test-mbrtowc$(EXEEXT)
+       $(LINK) $(test_mbrtowc_OBJECTS) $(test_mbrtowc_LDADD) $(LIBS)
+test-mbrtowc-w32$(EXEEXT): $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_DEPENDENCIES) 
+       @rm -f test-mbrtowc-w32$(EXEEXT)
+       $(LINK) $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_LDADD) $(LIBS)
+test-mbscasestr1$(EXEEXT): $(test_mbscasestr1_OBJECTS) $(test_mbscasestr1_DEPENDENCIES) 
+       @rm -f test-mbscasestr1$(EXEEXT)
+       $(LINK) $(test_mbscasestr1_OBJECTS) $(test_mbscasestr1_LDADD) $(LIBS)
+test-mbscasestr2$(EXEEXT): $(test_mbscasestr2_OBJECTS) $(test_mbscasestr2_DEPENDENCIES) 
+       @rm -f test-mbscasestr2$(EXEEXT)
+       $(LINK) $(test_mbscasestr2_OBJECTS) $(test_mbscasestr2_LDADD) $(LIBS)
+test-mbscasestr3$(EXEEXT): $(test_mbscasestr3_OBJECTS) $(test_mbscasestr3_DEPENDENCIES) 
+       @rm -f test-mbscasestr3$(EXEEXT)
+       $(LINK) $(test_mbscasestr3_OBJECTS) $(test_mbscasestr3_LDADD) $(LIBS)
+test-mbscasestr4$(EXEEXT): $(test_mbscasestr4_OBJECTS) $(test_mbscasestr4_DEPENDENCIES) 
+       @rm -f test-mbscasestr4$(EXEEXT)
+       $(LINK) $(test_mbscasestr4_OBJECTS) $(test_mbscasestr4_LDADD) $(LIBS)
+test-mbsinit$(EXEEXT): $(test_mbsinit_OBJECTS) $(test_mbsinit_DEPENDENCIES) 
+       @rm -f test-mbsinit$(EXEEXT)
+       $(LINK) $(test_mbsinit_OBJECTS) $(test_mbsinit_LDADD) $(LIBS)
+test-mbsrtowcs$(EXEEXT): $(test_mbsrtowcs_OBJECTS) $(test_mbsrtowcs_DEPENDENCIES) 
+       @rm -f test-mbsrtowcs$(EXEEXT)
+       $(LINK) $(test_mbsrtowcs_OBJECTS) $(test_mbsrtowcs_LDADD) $(LIBS)
+test-mbsstr1$(EXEEXT): $(test_mbsstr1_OBJECTS) $(test_mbsstr1_DEPENDENCIES) 
+       @rm -f test-mbsstr1$(EXEEXT)
+       $(LINK) $(test_mbsstr1_OBJECTS) $(test_mbsstr1_LDADD) $(LIBS)
+test-mbsstr2$(EXEEXT): $(test_mbsstr2_OBJECTS) $(test_mbsstr2_DEPENDENCIES) 
+       @rm -f test-mbsstr2$(EXEEXT)
+       $(LINK) $(test_mbsstr2_OBJECTS) $(test_mbsstr2_LDADD) $(LIBS)
+test-mbsstr3$(EXEEXT): $(test_mbsstr3_OBJECTS) $(test_mbsstr3_DEPENDENCIES) 
+       @rm -f test-mbsstr3$(EXEEXT)
+       $(LINK) $(test_mbsstr3_OBJECTS) $(test_mbsstr3_LDADD) $(LIBS)
+test-memchr$(EXEEXT): $(test_memchr_OBJECTS) $(test_memchr_DEPENDENCIES) 
+       @rm -f test-memchr$(EXEEXT)
+       $(LINK) $(test_memchr_OBJECTS) $(test_memchr_LDADD) $(LIBS)
+test-memrchr$(EXEEXT): $(test_memrchr_OBJECTS) $(test_memrchr_DEPENDENCIES) 
+       @rm -f test-memrchr$(EXEEXT)
+       $(LINK) $(test_memrchr_OBJECTS) $(test_memrchr_LDADD) $(LIBS)
+test-mkdir$(EXEEXT): $(test_mkdir_OBJECTS) $(test_mkdir_DEPENDENCIES) 
+       @rm -f test-mkdir$(EXEEXT)
+       $(LINK) $(test_mkdir_OBJECTS) $(test_mkdir_LDADD) $(LIBS)
+test-mkdirat$(EXEEXT): $(test_mkdirat_OBJECTS) $(test_mkdirat_DEPENDENCIES) 
+       @rm -f test-mkdirat$(EXEEXT)
+       $(LINK) $(test_mkdirat_OBJECTS) $(test_mkdirat_LDADD) $(LIBS)
+test-modf$(EXEEXT): $(test_modf_OBJECTS) $(test_modf_DEPENDENCIES) 
+       @rm -f test-modf$(EXEEXT)
+       $(LINK) $(test_modf_OBJECTS) $(test_modf_LDADD) $(LIBS)
+test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) 
+       @rm -f test-nl_langinfo$(EXEEXT)
+       $(LINK) $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_LDADD) $(LIBS)
+test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES) 
+       @rm -f test-open$(EXEEXT)
+       $(LINK) $(test_open_OBJECTS) $(test_open_LDADD) $(LIBS)
+test-openat$(EXEEXT): $(test_openat_OBJECTS) $(test_openat_DEPENDENCIES) 
+       @rm -f test-openat$(EXEEXT)
+       $(LINK) $(test_openat_OBJECTS) $(test_openat_LDADD) $(LIBS)
+test-openat-safer$(EXEEXT): $(test_openat_safer_OBJECTS) $(test_openat_safer_DEPENDENCIES) 
+       @rm -f test-openat-safer$(EXEEXT)
+       $(LINK) $(test_openat_safer_OBJECTS) $(test_openat_safer_LDADD) $(LIBS)
+test-parse-datetime$(EXEEXT): $(test_parse_datetime_OBJECTS) $(test_parse_datetime_DEPENDENCIES) 
+       @rm -f test-parse-datetime$(EXEEXT)
+       $(LINK) $(test_parse_datetime_OBJECTS) $(test_parse_datetime_LDADD) $(LIBS)
+test-perror$(EXEEXT): $(test_perror_OBJECTS) $(test_perror_DEPENDENCIES) 
+       @rm -f test-perror$(EXEEXT)
+       $(LINK) $(test_perror_OBJECTS) $(test_perror_LDADD) $(LIBS)
+test-priv-set$(EXEEXT): $(test_priv_set_OBJECTS) $(test_priv_set_DEPENDENCIES) 
+       @rm -f test-priv-set$(EXEEXT)
+       $(LINK) $(test_priv_set_OBJECTS) $(test_priv_set_LDADD) $(LIBS)
+test-quotearg-simple$(EXEEXT): $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_DEPENDENCIES) 
+       @rm -f test-quotearg-simple$(EXEEXT)
+       $(LINK) $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_LDADD) $(LIBS)
+test-readlink$(EXEEXT): $(test_readlink_OBJECTS) $(test_readlink_DEPENDENCIES) 
+       @rm -f test-readlink$(EXEEXT)
+       $(LINK) $(test_readlink_OBJECTS) $(test_readlink_LDADD) $(LIBS)
+test-readlinkat$(EXEEXT): $(test_readlinkat_OBJECTS) $(test_readlinkat_DEPENDENCIES) 
+       @rm -f test-readlinkat$(EXEEXT)
+       $(LINK) $(test_readlinkat_OBJECTS) $(test_readlinkat_LDADD) $(LIBS)
+test-realloc-gnu$(EXEEXT): $(test_realloc_gnu_OBJECTS) $(test_realloc_gnu_DEPENDENCIES) 
+       @rm -f test-realloc-gnu$(EXEEXT)
+       $(LINK) $(test_realloc_gnu_OBJECTS) $(test_realloc_gnu_LDADD) $(LIBS)
+test-rmdir$(EXEEXT): $(test_rmdir_OBJECTS) $(test_rmdir_DEPENDENCIES) 
+       @rm -f test-rmdir$(EXEEXT)
+       $(LINK) $(test_rmdir_OBJECTS) $(test_rmdir_LDADD) $(LIBS)
+test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES) 
+       @rm -f test-setenv$(EXEEXT)
+       $(LINK) $(test_setenv_OBJECTS) $(test_setenv_LDADD) $(LIBS)
+test-setlocale1$(EXEEXT): $(test_setlocale1_OBJECTS) $(test_setlocale1_DEPENDENCIES) 
+       @rm -f test-setlocale1$(EXEEXT)
+       $(LINK) $(test_setlocale1_OBJECTS) $(test_setlocale1_LDADD) $(LIBS)
+test-setlocale2$(EXEEXT): $(test_setlocale2_OBJECTS) $(test_setlocale2_DEPENDENCIES) 
+       @rm -f test-setlocale2$(EXEEXT)
+       $(LINK) $(test_setlocale2_OBJECTS) $(test_setlocale2_LDADD) $(LIBS)
+test-sleep$(EXEEXT): $(test_sleep_OBJECTS) $(test_sleep_DEPENDENCIES) 
+       @rm -f test-sleep$(EXEEXT)
+       $(LINK) $(test_sleep_OBJECTS) $(test_sleep_LDADD) $(LIBS)
+test-snprintf$(EXEEXT): $(test_snprintf_OBJECTS) $(test_snprintf_DEPENDENCIES) 
+       @rm -f test-snprintf$(EXEEXT)
+       $(LINK) $(test_snprintf_OBJECTS) $(test_snprintf_LDADD) $(LIBS)
+test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES) 
+       @rm -f test-stat$(EXEEXT)
+       $(LINK) $(test_stat_OBJECTS) $(test_stat_LDADD) $(LIBS)
+test-stat-time$(EXEEXT): $(test_stat_time_OBJECTS) $(test_stat_time_DEPENDENCIES) 
+       @rm -f test-stat-time$(EXEEXT)
+       $(LINK) $(test_stat_time_OBJECTS) $(test_stat_time_LDADD) $(LIBS)
+test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) 
+       @rm -f test-stdbool$(EXEEXT)
+       $(LINK) $(test_stdbool_OBJECTS) $(test_stdbool_LDADD) $(LIBS)
+test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES) 
+       @rm -f test-stddef$(EXEEXT)
+       $(LINK) $(test_stddef_OBJECTS) $(test_stddef_LDADD) $(LIBS)
+test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES) 
+       @rm -f test-stdint$(EXEEXT)
+       $(LINK) $(test_stdint_OBJECTS) $(test_stdint_LDADD) $(LIBS)
+test-stdio$(EXEEXT): $(test_stdio_OBJECTS) $(test_stdio_DEPENDENCIES) 
+       @rm -f test-stdio$(EXEEXT)
+       $(LINK) $(test_stdio_OBJECTS) $(test_stdio_LDADD) $(LIBS)
+test-stdlib$(EXEEXT): $(test_stdlib_OBJECTS) $(test_stdlib_DEPENDENCIES) 
+       @rm -f test-stdlib$(EXEEXT)
+       $(LINK) $(test_stdlib_OBJECTS) $(test_stdlib_LDADD) $(LIBS)
+test-strcasestr$(EXEEXT): $(test_strcasestr_OBJECTS) $(test_strcasestr_DEPENDENCIES) 
+       @rm -f test-strcasestr$(EXEEXT)
+       $(LINK) $(test_strcasestr_OBJECTS) $(test_strcasestr_LDADD) $(LIBS)
+test-strerror$(EXEEXT): $(test_strerror_OBJECTS) $(test_strerror_DEPENDENCIES) 
+       @rm -f test-strerror$(EXEEXT)
+       $(LINK) $(test_strerror_OBJECTS) $(test_strerror_LDADD) $(LIBS)
+test-strftime$(EXEEXT): $(test_strftime_OBJECTS) $(test_strftime_DEPENDENCIES) 
+       @rm -f test-strftime$(EXEEXT)
+       $(LINK) $(test_strftime_OBJECTS) $(test_strftime_LDADD) $(LIBS)
+test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) 
+       @rm -f test-string$(EXEEXT)
+       $(LINK) $(test_string_OBJECTS) $(test_string_LDADD) $(LIBS)
+test-strings$(EXEEXT): $(test_strings_OBJECTS) $(test_strings_DEPENDENCIES) 
+       @rm -f test-strings$(EXEEXT)
+       $(LINK) $(test_strings_OBJECTS) $(test_strings_LDADD) $(LIBS)
+test-strnlen$(EXEEXT): $(test_strnlen_OBJECTS) $(test_strnlen_DEPENDENCIES) 
+       @rm -f test-strnlen$(EXEEXT)
+       $(LINK) $(test_strnlen_OBJECTS) $(test_strnlen_LDADD) $(LIBS)
+test-strstr$(EXEEXT): $(test_strstr_OBJECTS) $(test_strstr_DEPENDENCIES) 
+       @rm -f test-strstr$(EXEEXT)
+       $(LINK) $(test_strstr_OBJECTS) $(test_strstr_LDADD) $(LIBS)
+test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) 
+       @rm -f test-symlink$(EXEEXT)
+       $(LINK) $(test_symlink_OBJECTS) $(test_symlink_LDADD) $(LIBS)
+test-symlinkat$(EXEEXT): $(test_symlinkat_OBJECTS) $(test_symlinkat_DEPENDENCIES) 
+       @rm -f test-symlinkat$(EXEEXT)
+       $(LINK) $(test_symlinkat_OBJECTS) $(test_symlinkat_LDADD) $(LIBS)
+test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) 
+       @rm -f test-sys_stat$(EXEEXT)
+       $(LINK) $(test_sys_stat_OBJECTS) $(test_sys_stat_LDADD) $(LIBS)
+test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES) 
+       @rm -f test-sys_time$(EXEEXT)
+       $(LINK) $(test_sys_time_OBJECTS) $(test_sys_time_LDADD) $(LIBS)
+test-sys_wait$(EXEEXT): $(test_sys_wait_OBJECTS) $(test_sys_wait_DEPENDENCIES) 
+       @rm -f test-sys_wait$(EXEEXT)
+       $(LINK) $(test_sys_wait_OBJECTS) $(test_sys_wait_LDADD) $(LIBS)
+test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) 
+       @rm -f test-time$(EXEEXT)
+       $(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS)
+uniwidth/$(am__dirstamp):
+       @$(MKDIR_P) uniwidth
+       @: > uniwidth/$(am__dirstamp)
+uniwidth/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) uniwidth/$(DEPDIR)
+       @: > uniwidth/$(DEPDIR)/$(am__dirstamp)
+uniwidth/test-uc_width.$(OBJEXT): uniwidth/$(am__dirstamp) \
+       uniwidth/$(DEPDIR)/$(am__dirstamp)
+test-uc_width$(EXEEXT): $(test_uc_width_OBJECTS) $(test_uc_width_DEPENDENCIES) 
+       @rm -f test-uc_width$(EXEEXT)
+       $(LINK) $(test_uc_width_OBJECTS) $(test_uc_width_LDADD) $(LIBS)
+uniwidth/test-uc_width2.$(OBJEXT): uniwidth/$(am__dirstamp) \
+       uniwidth/$(DEPDIR)/$(am__dirstamp)
+test-uc_width2$(EXEEXT): $(test_uc_width2_OBJECTS) $(test_uc_width2_DEPENDENCIES) 
+       @rm -f test-uc_width2$(EXEEXT)
+       $(LINK) $(test_uc_width2_OBJECTS) $(test_uc_width2_LDADD) $(LIBS)
+test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES) 
+       @rm -f test-unistd$(EXEEXT)
+       $(LINK) $(test_unistd_OBJECTS) $(test_unistd_LDADD) $(LIBS)
+test-unlink$(EXEEXT): $(test_unlink_OBJECTS) $(test_unlink_DEPENDENCIES) 
+       @rm -f test-unlink$(EXEEXT)
+       $(LINK) $(test_unlink_OBJECTS) $(test_unlink_LDADD) $(LIBS)
+test-unlinkat$(EXEEXT): $(test_unlinkat_OBJECTS) $(test_unlinkat_DEPENDENCIES) 
+       @rm -f test-unlinkat$(EXEEXT)
+       $(LINK) $(test_unlinkat_OBJECTS) $(test_unlinkat_LDADD) $(LIBS)
+test-unsetenv$(EXEEXT): $(test_unsetenv_OBJECTS) $(test_unsetenv_DEPENDENCIES) 
+       @rm -f test-unsetenv$(EXEEXT)
+       $(LINK) $(test_unsetenv_OBJECTS) $(test_unsetenv_LDADD) $(LIBS)
+test-usleep$(EXEEXT): $(test_usleep_OBJECTS) $(test_usleep_DEPENDENCIES) 
+       @rm -f test-usleep$(EXEEXT)
+       $(LINK) $(test_usleep_OBJECTS) $(test_usleep_LDADD) $(LIBS)
+test-vasnprintf$(EXEEXT): $(test_vasnprintf_OBJECTS) $(test_vasnprintf_DEPENDENCIES) 
+       @rm -f test-vasnprintf$(EXEEXT)
+       $(LINK) $(test_vasnprintf_OBJECTS) $(test_vasnprintf_LDADD) $(LIBS)
+test-verify$(EXEEXT): $(test_verify_OBJECTS) $(test_verify_DEPENDENCIES) 
+       @rm -f test-verify$(EXEEXT)
+       $(LINK) $(test_verify_OBJECTS) $(test_verify_LDADD) $(LIBS)
+test-version-etc$(EXEEXT): $(test_version_etc_OBJECTS) $(test_version_etc_DEPENDENCIES) 
+       @rm -f test-version-etc$(EXEEXT)
+       $(LINK) $(test_version_etc_OBJECTS) $(test_version_etc_LDADD) $(LIBS)
+test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES) 
+       @rm -f test-wchar$(EXEEXT)
+       $(LINK) $(test_wchar_OBJECTS) $(test_wchar_LDADD) $(LIBS)
+test-wcrtomb$(EXEEXT): $(test_wcrtomb_OBJECTS) $(test_wcrtomb_DEPENDENCIES) 
+       @rm -f test-wcrtomb$(EXEEXT)
+       $(LINK) $(test_wcrtomb_OBJECTS) $(test_wcrtomb_LDADD) $(LIBS)
+test-wcrtomb-w32$(EXEEXT): $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_DEPENDENCIES) 
+       @rm -f test-wcrtomb-w32$(EXEEXT)
+       $(LINK) $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_LDADD) $(LIBS)
+test-wctype-h$(EXEEXT): $(test_wctype_h_OBJECTS) $(test_wctype_h_DEPENDENCIES) 
+       @rm -f test-wctype-h$(EXEEXT)
+       $(LINK) $(test_wctype_h_OBJECTS) $(test_wctype_h_LDADD) $(LIBS)
+test-wcwidth$(EXEEXT): $(test_wcwidth_OBJECTS) $(test_wcwidth_DEPENDENCIES) 
+       @rm -f test-wcwidth$(EXEEXT)
+       $(LINK) $(test_wcwidth_OBJECTS) $(test_wcwidth_LDADD) $(LIBS)
+test-xalloc-die$(EXEEXT): $(test_xalloc_die_OBJECTS) $(test_xalloc_die_DEPENDENCIES) 
+       @rm -f test-xalloc-die$(EXEEXT)
+       $(LINK) $(test_xalloc_die_OBJECTS) $(test_xalloc_die_LDADD) $(LIBS)
+test-xstrtol$(EXEEXT): $(test_xstrtol_OBJECTS) $(test_xstrtol_DEPENDENCIES) 
+       @rm -f test-xstrtol$(EXEEXT)
+       $(LINK) $(test_xstrtol_OBJECTS) $(test_xstrtol_LDADD) $(LIBS)
+test-xstrtoul$(EXEEXT): $(test_xstrtoul_OBJECTS) $(test_xstrtoul_DEPENDENCIES) 
+       @rm -f test-xstrtoul$(EXEEXT)
+       $(LINK) $(test_xstrtoul_OBJECTS) $(test_xstrtoul_LDADD) $(LIBS)
+test-xstrtoumax$(EXEEXT): $(test_xstrtoumax_OBJECTS) $(test_xstrtoumax_DEPENDENCIES) 
+       @rm -f test-xstrtoumax$(EXEEXT)
+       $(LINK) $(test_xstrtoumax_OBJECTS) $(test_xstrtoumax_LDADD) $(LIBS)
+test-yesno$(EXEEXT): $(test_yesno_OBJECTS) $(test_yesno_DEPENDENCIES) 
+       @rm -f test-yesno$(EXEEXT)
+       $(LINK) $(test_yesno_OBJECTS) $(test_yesno_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+       -rm -f glthread/lock.$(OBJEXT)
+       -rm -f glthread/thread.$(OBJEXT)
+       -rm -f glthread/threadlib.$(OBJEXT)
+       -rm -f uniwidth/test-uc_width.$(OBJEXT)
+       -rm -f uniwidth/test-uc_width2.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anytostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer-flag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer-flag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftell.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpagesize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getugroups.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imaxtostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inttostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localename.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mgetgroups.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/offtostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/priv-set.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlinkat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-areadlink-with-size.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-areadlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-areadlinkat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-argmatch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-binary-io.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bitrotate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-btowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-ctype.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasestr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strstr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-canonicalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-chown.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cloexec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-closein.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ctype.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirent-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-environ.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fchdir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fchownat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-h.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fdopendir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fnmatch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpending.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpurge.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freadahead.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freading.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstatat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getcwd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdelim.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdtablesize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getgroups.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gettimeofday.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-hash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-i-ring.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ignore-value.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isblank.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswblank.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lchown.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localename.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lseek.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lstat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloc-gnu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloca.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-math.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc-w32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbscasestr1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbscasestr2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbscasestr3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbscasestr4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsinit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsrtowcs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsstr1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsstr2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsstr3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memrchr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mkdir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mkdirat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-modf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-open.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-openat-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-openat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-parse-datetime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-priv-set.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-quotearg-simple.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-readlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-readlinkat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-realloc-gnu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rmdir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat-time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strcasestr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strerror.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strftime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strings.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strnlen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strstr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-symlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-symlinkat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_stat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_wait.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unlinkat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unsetenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-usleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-verify.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-version-etc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wchar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb-w32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wctype-h.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcwidth.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xalloc-die.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstrtol.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstrtoul.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstrtoumax.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-yesno.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uinttostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umaxtostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkdir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctob.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctomb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/thread.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/test-uc_width.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/test-uc_width2.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+       srcdir=$(srcdir); export srcdir; \
+       list=' $(TESTS) '; \
+       $(am__tty_colors); \
+       if test -n "$$list"; then \
+         for tst in $$list; do \
+           if test -f ./$$tst; then dir=./; \
+           elif test -f $$tst; then dir=; \
+           else dir="$(srcdir)/"; fi; \
+           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *[\ \     ]$$tst[\ \      ]*) \
+               xpass=`expr $$xpass + 1`; \
+               failed=`expr $$failed + 1`; \
+               col=$$red; res=XPASS; \
+             ;; \
+             *) \
+               col=$$grn; res=PASS; \
+             ;; \
+             esac; \
+           elif test $$? -ne 77; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *[\ \     ]$$tst[\ \      ]*) \
+               xfail=`expr $$xfail + 1`; \
+               col=$$lgn; res=XFAIL; \
+             ;; \
+             *) \
+               failed=`expr $$failed + 1`; \
+               col=$$red; res=FAIL; \
+             ;; \
+             esac; \
+           else \
+             skip=`expr $$skip + 1`; \
+             col=$$blu; res=SKIP; \
+           fi; \
+           echo "$${col}$$res$${std}: $$tst"; \
+         done; \
+         if test "$$all" -eq 1; then \
+           tests="test"; \
+           All=""; \
+         else \
+           tests="tests"; \
+           All="All "; \
+         fi; \
+         if test "$$failed" -eq 0; then \
+           if test "$$xfail" -eq 0; then \
+             banner="$$All$$all $$tests passed"; \
+           else \
+             if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+             banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+           fi; \
+         else \
+           if test "$$xpass" -eq 0; then \
+             banner="$$failed of $$all $$tests failed"; \
+           else \
+             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+             banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+           fi; \
+         fi; \
+         dashes="$$banner"; \
+         skipped=""; \
+         if test "$$skip" -ne 0; then \
+           if test "$$skip" -eq 1; then \
+             skipped="($$skip test was not run)"; \
+           else \
+             skipped="($$skip tests were not run)"; \
+           fi; \
+           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$skipped"; \
+         fi; \
+         report=""; \
+         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+           report="Please report to $(PACKAGE_BUGREPORT)"; \
+           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$report"; \
+         fi; \
+         dashes=`echo "$$dashes" | sed s/./=/g`; \
+         if test "$$failed" -eq 0; then \
+           echo "$$grn$$dashes"; \
+         else \
+           echo "$$red$$dashes"; \
+         fi; \
+         echo "$$banner"; \
+         test -z "$$skipped" || echo "$$skipped"; \
+         test -z "$$report" || echo "$$report"; \
+         echo "$$dashes$$std"; \
+         test "$$failed" -eq 0; \
+       else :; fi
+
+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
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS)
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+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)
+       -rm -f glthread/$(DEPDIR)/$(am__dirstamp)
+       -rm -f glthread/$(am__dirstamp)
+       -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp)
+       -rm -f uniwidth/$(am__dirstamp)
+       -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 "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
+       clean-local clean-noinstLIBRARIES clean-noinstPROGRAMS \
+       mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -rf ./$(DEPDIR) glthread/$(DEPDIR) uniwidth/$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -rf ./$(DEPDIR) glthread/$(DEPDIR) uniwidth/$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+       check-am ctags-recursive install install-am install-strip \
+       tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-TESTS check-am clean \
+       clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
+       clean-local clean-noinstLIBRARIES clean-noinstPROGRAMS ctags \
+       ctags-recursive 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 \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-compile mostlyclean-generic \
+       mostlyclean-local pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am
+
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/GL_ARG_NONNULL/,$$p' \
+         < $(top_srcdir)/build-aux/arg-nonnull.h \
+         > $@-t && \
+       mv $@-t $@
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/c++defs.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/_GL_CXXDEFS/,$$p' \
+         < $(top_srcdir)/build-aux/c++defs.h \
+         > $@-t && \
+       mv $@-t $@
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/unused-parameter.h, except that it has the copyright header cut
+# off.
+unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+         < $(top_srcdir)/build-aux/unused-parameter.h \
+         > $@-t && \
+       mv $@-t $@
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -n -e '/^.ifndef/,$$p' \
+         < $(top_srcdir)/build-aux/warn-on-use.h \
+         > $@-t && \
+       mv $@-t $@
+
+# Clean up after Solaris cc.
+clean-local:
+       rm -rf SunWS_cache
+
+mostlyclean-local: mostlyclean-generic
+       @for dir in '' $(MOSTLYCLEANDIRS); do \
+         if test -n "$$dir" && test -d $$dir; then \
+           echo "rmdir $$dir"; rmdir $$dir; \
+         fi; \
+       done; \
+       :
+
+# 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/tests/anytostr.c b/tests/anytostr.c
new file mode 100644 (file)
index 0000000..e23746a
--- /dev/null
@@ -0,0 +1,55 @@
+/* anytostr.c -- convert integers to printable strings
+
+   Copyright (C) 2001, 2006, 2008-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 Paul Eggert */
+
+/* Tell gcc not to warn about the (i < 0) test, below.  */
+#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
+
+#include <config.h>
+
+#include "inttostr.h"
+
+/* Convert I to a printable string in BUF, which must be at least
+   INT_BUFSIZE_BOUND (INTTYPE) bytes long.  Return the address of the
+   printable string, which need not start at BUF.  */
+
+char * __attribute_warn_unused_result__
+anytostr (inttype i, char *buf)
+{
+  char *p = buf + INT_STRLEN_BOUND (inttype);
+  *p = 0;
+
+  if (i < 0)
+    {
+      do
+        *--p = '0' - i % 10;
+      while ((i /= 10) != 0);
+
+      *--p = '-';
+    }
+  else
+    {
+      do
+        *--p = '0' + i % 10;
+      while ((i /= 10) != 0);
+    }
+
+  return p;
+}
diff --git a/tests/binary-io.h b/tests/binary-io.h
new file mode 100644 (file)
index 0000000..c09dbf5
--- /dev/null
@@ -0,0 +1,52 @@
+/* Binary mode I/O.
+   Copyright (C) 2001, 2003, 2005, 2008-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 _BINARY_H
+#define _BINARY_H
+
+/* For systems that distinguish between text and binary I/O.
+   O_BINARY is guaranteed by the gnulib <fcntl.h>. */
+#include <fcntl.h>
+
+/* The MSVC7 <stdio.h> doesn't like to be included after '#define fileno ...',
+   so we include it here first.  */
+#include <stdio.h>
+
+/* SET_BINARY (fd);
+   changes the file descriptor fd to perform binary I/O.  */
+#if O_BINARY
+# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
+#  include <io.h> /* declares setmode() */
+# else
+#  define setmode _setmode
+#  undef fileno
+#  define fileno _fileno
+# endif
+# ifdef __DJGPP__
+#  include <unistd.h> /* declares isatty() */
+   /* Avoid putting stdin/stdout in binary mode if it is connected to
+      the console, because that would make it impossible for the user
+      to interrupt the program through Ctrl-C or Ctrl-Break.  */
+#  define SET_BINARY(fd) ((void) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0))
+# else
+#  define SET_BINARY(fd) ((void) setmode (fd, O_BINARY))
+# endif
+#else
+  /* On reasonable systems, binary I/O is the default.  */
+# define SET_BINARY(fd) /* do nothing */ ((void) 0)
+#endif
+
+#endif /* _BINARY_H */
diff --git a/tests/dup-safer-flag.c b/tests/dup-safer-flag.c
new file mode 100644 (file)
index 0000000..e922b91
--- /dev/null
@@ -0,0 +1,40 @@
+/* Duplicate a file descriptor result, avoiding clobbering
+   STD{IN,OUT,ERR}_FILENO, with specific flags.
+
+   Copyright (C) 2001, 2004-2006, 2009-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 Paul Eggert and Eric Blake.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "unistd-safer.h"
+
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "cloexec.h"
+
+/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
+   STDERR_FILENO.  If FLAG contains O_CLOEXEC, behave like
+   fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD).  */
+
+int
+dup_safer_flag (int fd, int flag)
+{
+  return fcntl (fd, (flag & O_CLOEXEC) ? F_DUPFD_CLOEXEC : F_DUPFD,
+                STDERR_FILENO + 1);
+}
diff --git a/tests/fd-safer-flag.c b/tests/fd-safer-flag.c
new file mode 100644 (file)
index 0000000..2305b73
--- /dev/null
@@ -0,0 +1,52 @@
+/* Adjust a file descriptor result so that it avoids clobbering
+   STD{IN,OUT,ERR}_FILENO, with specific flags.
+
+   Copyright (C) 2005-2006, 2009-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 Paul Eggert and Eric Blake.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "unistd-safer.h"
+
+#include <errno.h>
+#include <unistd.h>
+
+/* Return FD, unless FD would be a copy of standard input, output, or
+   error; in that case, return a duplicate of FD, closing FD.  If FLAG
+   contains O_CLOEXEC, the returned FD will have close-on-exec
+   semantics.  On failure to duplicate, close FD, set errno, and
+   return -1.  Preserve errno if FD is negative, so that the caller
+   can always inspect errno when the returned value is negative.
+
+   This function is usefully wrapped around functions that return file
+   descriptors, e.g., fd_safer_flag (open ("file", O_RDONLY | flag), flag).  */
+
+int
+fd_safer_flag (int fd, int flag)
+{
+  if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
+    {
+      int f = dup_safer_flag (fd, flag);
+      int e = errno;
+      close (fd);
+      errno = e;
+      fd = f;
+    }
+
+  return fd;
+}
diff --git a/tests/ftell.c b/tests/ftell.c
new file mode 100644 (file)
index 0000000..79083fb
--- /dev/null
@@ -0,0 +1,38 @@
+/* An ftell() function that works around platform bugs.
+   Copyright (C) 2007-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdio.h>
+
+#include <errno.h>
+/* Get off_t.  */
+#include <unistd.h>
+
+long
+ftell (FILE *fp)
+{
+  /* Use the replacement ftello function with all its workarounds.  */
+  off_t offset = ftello (fp);
+  if (offset == (long)offset)
+    return (long)offset;
+  else
+    {
+      errno = EOVERFLOW;
+      return -1;
+    }
+}
diff --git a/tests/getpagesize.c b/tests/getpagesize.c
new file mode 100644 (file)
index 0000000..d7c1ba8
--- /dev/null
@@ -0,0 +1,39 @@
+/* getpagesize emulation for systems where it cannot be done in a C macro.
+
+   Copyright (C) 2007, 2009-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 Bruno Haible and Martin Lambers.  */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+/* This implementation is only for native Win32 systems.  */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+int
+getpagesize (void)
+{
+  SYSTEM_INFO system_info;
+  GetSystemInfo (&system_info);
+  return system_info.dwPageSize;
+}
+
+#endif
diff --git a/tests/getugroups.c b/tests/getugroups.c
new file mode 100644 (file)
index 0000000..dc8089b
--- /dev/null
@@ -0,0 +1,125 @@
+/* getugroups.c -- return a list of the groups a user is in
+
+   Copyright (C) 1990-1991, 1998-2000, 2003-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 David MacKenzie. */
+
+#include <config.h>
+
+#include "getugroups.h"
+
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h> /* grp.h on alpha OSF1 V2.0 uses "FILE *". */
+#include <string.h>
+#include <unistd.h>
+
+#if !HAVE_GRP_H
+
+/* Mingw lacks all things related to group management.  The best we
+   can do is fail with ENOSYS.  */
+
+int
+getugroups (int maxcount _GL_UNUSED,
+            gid_t *grouplist _GL_UNUSED,
+            char const *username _GL_UNUSED,
+            gid_t gid _GL_UNUSED)
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+#else /* HAVE_GRP_H */
+# include <grp.h>
+
+# define STREQ(a, b) (strcmp (a, b) == 0)
+
+/* Like `getgroups', but for user USERNAME instead of for the current
+   process.  Store at most MAXCOUNT group IDs in the GROUPLIST array.
+   If GID is not -1, store it first (if possible).  GID should be the
+   group ID (pw_gid) obtained from getpwuid, in case USERNAME is not
+   listed in /etc/groups.  Upon failure, set errno and return -1.
+   Otherwise, return the number of IDs we've written into GROUPLIST.  */
+
+int
+getugroups (int maxcount, gid_t *grouplist, char const *username,
+            gid_t gid)
+{
+  int count = 0;
+
+  if (gid != (gid_t) -1)
+    {
+      if (maxcount != 0)
+        grouplist[count] = gid;
+      ++count;
+    }
+
+  setgrent ();
+  while (1)
+    {
+      char **cp;
+      struct group *grp;
+
+      errno = 0;
+      grp = getgrent ();
+      if (grp == NULL)
+        break;
+
+      for (cp = grp->gr_mem; *cp; ++cp)
+        {
+          int n;
+
+          if ( ! STREQ (username, *cp))
+            continue;
+
+          /* See if this group number is already on the list.  */
+          for (n = 0; n < count; ++n)
+            if (grouplist && grouplist[n] == grp->gr_gid)
+              break;
+
+          /* If it's a new group number, then try to add it to the list.  */
+          if (n == count)
+            {
+              if (maxcount != 0)
+                {
+                  if (count >= maxcount)
+                    goto done;
+                  grouplist[count] = grp->gr_gid;
+                }
+              if (count == INT_MAX)
+                {
+                  errno = EOVERFLOW;
+                  goto done;
+                }
+              count++;
+            }
+        }
+    }
+
+  if (errno != 0)
+    count = -1;
+
+ done:
+  {
+    int saved_errno = errno;
+    endgrent ();
+    errno = saved_errno;
+  }
+
+  return count;
+}
+
+#endif /* HAVE_GRP_H */
diff --git a/tests/getugroups.h b/tests/getugroups.h
new file mode 100644 (file)
index 0000000..9df9952
--- /dev/null
@@ -0,0 +1,19 @@
+/* Get a list of group IDs associated with a specified user ID.
+   Copyright (C) 2007, 2009-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/>.  */
+
+#include <sys/types.h>
+int getugroups (int maxcount, gid_t *grouplist, char const *username,
+                gid_t gid);
diff --git a/tests/glthread/lock.c b/tests/glthread/lock.c
new file mode 100644 (file)
index 0000000..64dbd3f
--- /dev/null
@@ -0,0 +1,1058 @@
+/* Locking in multithreaded situations.
+   Copyright (C) 2005-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
+   gthr-win32.h.  */
+
+#include <config.h>
+
+#include "glthread/lock.h"
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+# if HAVE_PTHREAD_RWLOCK
+
+#  if !defined PTHREAD_RWLOCK_INITIALIZER
+
+int
+glthread_rwlock_init_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_rwlock_init (&lock->rwlock, NULL);
+  if (err != 0)
+    return err;
+  lock->initialized = 1;
+  return 0;
+}
+
+int
+glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock)
+{
+  if (!lock->initialized)
+    {
+      int err;
+
+      err = pthread_mutex_lock (&lock->guard);
+      if (err != 0)
+        return err;
+      if (!lock->initialized)
+        {
+          err = glthread_rwlock_init_multithreaded (lock);
+          if (err != 0)
+            {
+              pthread_mutex_unlock (&lock->guard);
+              return err;
+            }
+        }
+      err = pthread_mutex_unlock (&lock->guard);
+      if (err != 0)
+        return err;
+    }
+  return pthread_rwlock_rdlock (&lock->rwlock);
+}
+
+int
+glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock)
+{
+  if (!lock->initialized)
+    {
+      int err;
+
+      err = pthread_mutex_lock (&lock->guard);
+      if (err != 0)
+        return err;
+      if (!lock->initialized)
+        {
+          err = glthread_rwlock_init_multithreaded (lock);
+          if (err != 0)
+            {
+              pthread_mutex_unlock (&lock->guard);
+              return err;
+            }
+        }
+      err = pthread_mutex_unlock (&lock->guard);
+      if (err != 0)
+        return err;
+    }
+  return pthread_rwlock_wrlock (&lock->rwlock);
+}
+
+int
+glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock)
+{
+  if (!lock->initialized)
+    return EINVAL;
+  return pthread_rwlock_unlock (&lock->rwlock);
+}
+
+int
+glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  if (!lock->initialized)
+    return EINVAL;
+  err = pthread_rwlock_destroy (&lock->rwlock);
+  if (err != 0)
+    return err;
+  lock->initialized = 0;
+  return 0;
+}
+
+#  endif
+
+# else
+
+int
+glthread_rwlock_init_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_init (&lock->lock, NULL);
+  if (err != 0)
+    return err;
+  err = pthread_cond_init (&lock->waiting_readers, NULL);
+  if (err != 0)
+    return err;
+  err = pthread_cond_init (&lock->waiting_writers, NULL);
+  if (err != 0)
+    return err;
+  lock->waiting_writers_count = 0;
+  lock->runcount = 0;
+  return 0;
+}
+
+int
+glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_lock (&lock->lock);
+  if (err != 0)
+    return err;
+  /* Test whether only readers are currently running, and whether the runcount
+     field will not overflow.  */
+  /* POSIX says: "It is implementation-defined whether the calling thread
+     acquires the lock when a writer does not hold the lock and there are
+     writers blocked on the lock."  Let's say, no: give the writers a higher
+     priority.  */
+  while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0))
+    {
+      /* This thread has to wait for a while.  Enqueue it among the
+         waiting_readers.  */
+      err = pthread_cond_wait (&lock->waiting_readers, &lock->lock);
+      if (err != 0)
+        {
+          pthread_mutex_unlock (&lock->lock);
+          return err;
+        }
+    }
+  lock->runcount++;
+  return pthread_mutex_unlock (&lock->lock);
+}
+
+int
+glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_lock (&lock->lock);
+  if (err != 0)
+    return err;
+  /* Test whether no readers or writers are currently running.  */
+  while (!(lock->runcount == 0))
+    {
+      /* This thread has to wait for a while.  Enqueue it among the
+         waiting_writers.  */
+      lock->waiting_writers_count++;
+      err = pthread_cond_wait (&lock->waiting_writers, &lock->lock);
+      if (err != 0)
+        {
+          lock->waiting_writers_count--;
+          pthread_mutex_unlock (&lock->lock);
+          return err;
+        }
+      lock->waiting_writers_count--;
+    }
+  lock->runcount--; /* runcount becomes -1 */
+  return pthread_mutex_unlock (&lock->lock);
+}
+
+int
+glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_lock (&lock->lock);
+  if (err != 0)
+    return err;
+  if (lock->runcount < 0)
+    {
+      /* Drop a writer lock.  */
+      if (!(lock->runcount == -1))
+        {
+          pthread_mutex_unlock (&lock->lock);
+          return EINVAL;
+        }
+      lock->runcount = 0;
+    }
+  else
+    {
+      /* Drop a reader lock.  */
+      if (!(lock->runcount > 0))
+        {
+          pthread_mutex_unlock (&lock->lock);
+          return EINVAL;
+        }
+      lock->runcount--;
+    }
+  if (lock->runcount == 0)
+    {
+      /* POSIX recommends that "write locks shall take precedence over read
+         locks", to avoid "writer starvation".  */
+      if (lock->waiting_writers_count > 0)
+        {
+          /* Wake up one of the waiting writers.  */
+          err = pthread_cond_signal (&lock->waiting_writers);
+          if (err != 0)
+            {
+              pthread_mutex_unlock (&lock->lock);
+              return err;
+            }
+        }
+      else
+        {
+          /* Wake up all waiting readers.  */
+          err = pthread_cond_broadcast (&lock->waiting_readers);
+          if (err != 0)
+            {
+              pthread_mutex_unlock (&lock->lock);
+              return err;
+            }
+        }
+    }
+  return pthread_mutex_unlock (&lock->lock);
+}
+
+int
+glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_destroy (&lock->lock);
+  if (err != 0)
+    return err;
+  err = pthread_cond_destroy (&lock->waiting_readers);
+  if (err != 0)
+    return err;
+  err = pthread_cond_destroy (&lock->waiting_writers);
+  if (err != 0)
+    return err;
+  return 0;
+}
+
+# endif
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+# if HAVE_PTHREAD_MUTEX_RECURSIVE
+
+#  if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+  pthread_mutexattr_t attributes;
+  int err;
+
+  err = pthread_mutexattr_init (&attributes);
+  if (err != 0)
+    return err;
+  err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE);
+  if (err != 0)
+    {
+      pthread_mutexattr_destroy (&attributes);
+      return err;
+    }
+  err = pthread_mutex_init (lock, &attributes);
+  if (err != 0)
+    {
+      pthread_mutexattr_destroy (&attributes);
+      return err;
+    }
+  err = pthread_mutexattr_destroy (&attributes);
+  if (err != 0)
+    return err;
+  return 0;
+}
+
+#  else
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+  pthread_mutexattr_t attributes;
+  int err;
+
+  err = pthread_mutexattr_init (&attributes);
+  if (err != 0)
+    return err;
+  err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE);
+  if (err != 0)
+    {
+      pthread_mutexattr_destroy (&attributes);
+      return err;
+    }
+  err = pthread_mutex_init (&lock->recmutex, &attributes);
+  if (err != 0)
+    {
+      pthread_mutexattr_destroy (&attributes);
+      return err;
+    }
+  err = pthread_mutexattr_destroy (&attributes);
+  if (err != 0)
+    return err;
+  lock->initialized = 1;
+  return 0;
+}
+
+int
+glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock)
+{
+  if (!lock->initialized)
+    {
+      int err;
+
+      err = pthread_mutex_lock (&lock->guard);
+      if (err != 0)
+        return err;
+      if (!lock->initialized)
+        {
+          err = glthread_recursive_lock_init_multithreaded (lock);
+          if (err != 0)
+            {
+              pthread_mutex_unlock (&lock->guard);
+              return err;
+            }
+        }
+      err = pthread_mutex_unlock (&lock->guard);
+      if (err != 0)
+        return err;
+    }
+  return pthread_mutex_lock (&lock->recmutex);
+}
+
+int
+glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock)
+{
+  if (!lock->initialized)
+    return EINVAL;
+  return pthread_mutex_unlock (&lock->recmutex);
+}
+
+int
+glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
+{
+  int err;
+
+  if (!lock->initialized)
+    return EINVAL;
+  err = pthread_mutex_destroy (&lock->recmutex);
+  if (err != 0)
+    return err;
+  lock->initialized = 0;
+  return 0;
+}
+
+#  endif
+
+# else
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_init (&lock->mutex, NULL);
+  if (err != 0)
+    return err;
+  lock->owner = (pthread_t) 0;
+  lock->depth = 0;
+  return 0;
+}
+
+int
+glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock)
+{
+  pthread_t self = pthread_self ();
+  if (lock->owner != self)
+    {
+      int err;
+
+      err = pthread_mutex_lock (&lock->mutex);
+      if (err != 0)
+        return err;
+      lock->owner = self;
+    }
+  if (++(lock->depth) == 0) /* wraparound? */
+    {
+      lock->depth--;
+      return EAGAIN;
+    }
+  return 0;
+}
+
+int
+glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock)
+{
+  if (lock->owner != pthread_self ())
+    return EPERM;
+  if (lock->depth == 0)
+    return EINVAL;
+  if (--(lock->depth) == 0)
+    {
+      lock->owner = (pthread_t) 0;
+      return pthread_mutex_unlock (&lock->mutex);
+    }
+  else
+    return 0;
+}
+
+int
+glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
+{
+  if (lock->owner != (pthread_t) 0)
+    return EBUSY;
+  return pthread_mutex_destroy (&lock->mutex);
+}
+
+# endif
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT;
+
+int
+glthread_once_singlethreaded (pthread_once_t *once_control)
+{
+  /* We don't know whether pthread_once_t is an integer type, a floating-point
+     type, a pointer type, or a structure type.  */
+  char *firstbyte = (char *)once_control;
+  if (*firstbyte == *(const char *)&fresh_once)
+    {
+      /* First time use of once_control.  Invert the first byte.  */
+      *firstbyte = ~ *(const char *)&fresh_once;
+      return 1;
+    }
+  else
+    return 0;
+}
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_PTH_THREADS
+
+/* Use the GNU Pth threads library.  */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+static void
+glthread_once_call (void *arg)
+{
+  void (**gl_once_temp_addr) (void) = (void (**) (void)) arg;
+  void (*initfunction) (void) = *gl_once_temp_addr;
+  initfunction ();
+}
+
+int
+glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void))
+{
+  void (*temp) (void) = initfunction;
+  return (!pth_once (once_control, glthread_once_call, &temp) ? errno : 0);
+}
+
+int
+glthread_once_singlethreaded (pth_once_t *once_control)
+{
+  /* We know that pth_once_t is an integer type.  */
+  if (*once_control == PTH_ONCE_INIT)
+    {
+      /* First time use of once_control.  Invert the marker.  */
+      *once_control = ~ PTH_ONCE_INIT;
+      return 1;
+    }
+  else
+    return 0;
+}
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_SOLARIS_THREADS
+
+/* Use the old Solaris threads library.  */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+  int err;
+
+  err = mutex_init (&lock->mutex, USYNC_THREAD, NULL);
+  if (err != 0)
+    return err;
+  lock->owner = (thread_t) 0;
+  lock->depth = 0;
+  return 0;
+}
+
+int
+glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock)
+{
+  thread_t self = thr_self ();
+  if (lock->owner != self)
+    {
+      int err;
+
+      err = mutex_lock (&lock->mutex);
+      if (err != 0)
+        return err;
+      lock->owner = self;
+    }
+  if (++(lock->depth) == 0) /* wraparound? */
+    {
+      lock->depth--;
+      return EAGAIN;
+    }
+  return 0;
+}
+
+int
+glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock)
+{
+  if (lock->owner != thr_self ())
+    return EPERM;
+  if (lock->depth == 0)
+    return EINVAL;
+  if (--(lock->depth) == 0)
+    {
+      lock->owner = (thread_t) 0;
+      return mutex_unlock (&lock->mutex);
+    }
+  else
+    return 0;
+}
+
+int
+glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
+{
+  if (lock->owner != (thread_t) 0)
+    return EBUSY;
+  return mutex_destroy (&lock->mutex);
+}
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+int
+glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void))
+{
+  if (!once_control->inited)
+    {
+      int err;
+
+      /* Use the mutex to guarantee that if another thread is already calling
+         the initfunction, this thread waits until it's finished.  */
+      err = mutex_lock (&once_control->mutex);
+      if (err != 0)
+        return err;
+      if (!once_control->inited)
+        {
+          once_control->inited = 1;
+          initfunction ();
+        }
+      return mutex_unlock (&once_control->mutex);
+    }
+  else
+    return 0;
+}
+
+int
+glthread_once_singlethreaded (gl_once_t *once_control)
+{
+  /* We know that gl_once_t contains an integer type.  */
+  if (!once_control->inited)
+    {
+      /* First time use of once_control.  Invert the marker.  */
+      once_control->inited = ~ 0;
+      return 1;
+    }
+  else
+    return 0;
+}
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_WIN32_THREADS
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+void
+glthread_lock_init_func (gl_lock_t *lock)
+{
+  InitializeCriticalSection (&lock->lock);
+  lock->guard.done = 1;
+}
+
+int
+glthread_lock_lock_func (gl_lock_t *lock)
+{
+  if (!lock->guard.done)
+    {
+      if (InterlockedIncrement (&lock->guard.started) == 0)
+        /* This thread is the first one to need this lock.  Initialize it.  */
+        glthread_lock_init (lock);
+      else
+        /* Yield the CPU while waiting for another thread to finish
+           initializing this lock.  */
+        while (!lock->guard.done)
+          Sleep (0);
+    }
+  EnterCriticalSection (&lock->lock);
+  return 0;
+}
+
+int
+glthread_lock_unlock_func (gl_lock_t *lock)
+{
+  if (!lock->guard.done)
+    return EINVAL;
+  LeaveCriticalSection (&lock->lock);
+  return 0;
+}
+
+int
+glthread_lock_destroy_func (gl_lock_t *lock)
+{
+  if (!lock->guard.done)
+    return EINVAL;
+  DeleteCriticalSection (&lock->lock);
+  lock->guard.done = 0;
+  return 0;
+}
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+/* In this file, the waitqueues are implemented as circular arrays.  */
+#define gl_waitqueue_t gl_carray_waitqueue_t
+
+static inline void
+gl_waitqueue_init (gl_waitqueue_t *wq)
+{
+  wq->array = NULL;
+  wq->count = 0;
+  wq->alloc = 0;
+  wq->offset = 0;
+}
+
+/* Enqueues the current thread, represented by an event, in a wait queue.
+   Returns INVALID_HANDLE_VALUE if an allocation failure occurs.  */
+static HANDLE
+gl_waitqueue_add (gl_waitqueue_t *wq)
+{
+  HANDLE event;
+  unsigned int index;
+
+  if (wq->count == wq->alloc)
+    {
+      unsigned int new_alloc = 2 * wq->alloc + 1;
+      HANDLE *new_array =
+        (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE));
+      if (new_array == NULL)
+        /* No more memory.  */
+        return INVALID_HANDLE_VALUE;
+      /* Now is a good opportunity to rotate the array so that its contents
+         starts at offset 0.  */
+      if (wq->offset > 0)
+        {
+          unsigned int old_count = wq->count;
+          unsigned int old_alloc = wq->alloc;
+          unsigned int old_offset = wq->offset;
+          unsigned int i;
+          if (old_offset + old_count > old_alloc)
+            {
+              unsigned int limit = old_offset + old_count - old_alloc;
+              for (i = 0; i < limit; i++)
+                new_array[old_alloc + i] = new_array[i];
+            }
+          for (i = 0; i < old_count; i++)
+            new_array[i] = new_array[old_offset + i];
+          wq->offset = 0;
+        }
+      wq->array = new_array;
+      wq->alloc = new_alloc;
+    }
+  /* Whether the created event is a manual-reset one or an auto-reset one,
+     does not matter, since we will wait on it only once.  */
+  event = CreateEvent (NULL, TRUE, FALSE, NULL);
+  if (event == INVALID_HANDLE_VALUE)
+    /* No way to allocate an event.  */
+    return INVALID_HANDLE_VALUE;
+  index = wq->offset + wq->count;
+  if (index >= wq->alloc)
+    index -= wq->alloc;
+  wq->array[index] = event;
+  wq->count++;
+  return event;
+}
+
+/* Notifies the first thread from a wait queue and dequeues it.  */
+static inline void
+gl_waitqueue_notify_first (gl_waitqueue_t *wq)
+{
+  SetEvent (wq->array[wq->offset + 0]);
+  wq->offset++;
+  wq->count--;
+  if (wq->count == 0 || wq->offset == wq->alloc)
+    wq->offset = 0;
+}
+
+/* Notifies all threads from a wait queue and dequeues them all.  */
+static inline void
+gl_waitqueue_notify_all (gl_waitqueue_t *wq)
+{
+  unsigned int i;
+
+  for (i = 0; i < wq->count; i++)
+    {
+      unsigned int index = wq->offset + i;
+      if (index >= wq->alloc)
+        index -= wq->alloc;
+      SetEvent (wq->array[index]);
+    }
+  wq->count = 0;
+  wq->offset = 0;
+}
+
+void
+glthread_rwlock_init_func (gl_rwlock_t *lock)
+{
+  InitializeCriticalSection (&lock->lock);
+  gl_waitqueue_init (&lock->waiting_readers);
+  gl_waitqueue_init (&lock->waiting_writers);
+  lock->runcount = 0;
+  lock->guard.done = 1;
+}
+
+int
+glthread_rwlock_rdlock_func (gl_rwlock_t *lock)
+{
+  if (!lock->guard.done)
+    {
+      if (InterlockedIncrement (&lock->guard.started) == 0)
+        /* This thread is the first one to need this lock.  Initialize it.  */
+        glthread_rwlock_init (lock);
+      else
+        /* Yield the CPU while waiting for another thread to finish
+           initializing this lock.  */
+        while (!lock->guard.done)
+          Sleep (0);
+    }
+  EnterCriticalSection (&lock->lock);
+  /* Test whether only readers are currently running, and whether the runcount
+     field will not overflow.  */
+  if (!(lock->runcount + 1 > 0))
+    {
+      /* This thread has to wait for a while.  Enqueue it among the
+         waiting_readers.  */
+      HANDLE event = gl_waitqueue_add (&lock->waiting_readers);
+      if (event != INVALID_HANDLE_VALUE)
+        {
+          DWORD result;
+          LeaveCriticalSection (&lock->lock);
+          /* Wait until another thread signals this event.  */
+          result = WaitForSingleObject (event, INFINITE);
+          if (result == WAIT_FAILED || result == WAIT_TIMEOUT)
+            abort ();
+          CloseHandle (event);
+          /* The thread which signalled the event already did the bookkeeping:
+             removed us from the waiting_readers, incremented lock->runcount.  */
+          if (!(lock->runcount > 0))
+            abort ();
+          return 0;
+        }
+      else
+        {
+          /* Allocation failure.  Weird.  */
+          do
+            {
+              LeaveCriticalSection (&lock->lock);
+              Sleep (1);
+              EnterCriticalSection (&lock->lock);
+            }
+          while (!(lock->runcount + 1 > 0));
+        }
+    }
+  lock->runcount++;
+  LeaveCriticalSection (&lock->lock);
+  return 0;
+}
+
+int
+glthread_rwlock_wrlock_func (gl_rwlock_t *lock)
+{
+  if (!lock->guard.done)
+    {
+      if (InterlockedIncrement (&lock->guard.started) == 0)
+        /* This thread is the first one to need this lock.  Initialize it.  */
+        glthread_rwlock_init (lock);
+      else
+        /* Yield the CPU while waiting for another thread to finish
+           initializing this lock.  */
+        while (!lock->guard.done)
+          Sleep (0);
+    }
+  EnterCriticalSection (&lock->lock);
+  /* Test whether no readers or writers are currently running.  */
+  if (!(lock->runcount == 0))
+    {
+      /* This thread has to wait for a while.  Enqueue it among the
+         waiting_writers.  */
+      HANDLE event = gl_waitqueue_add (&lock->waiting_writers);
+      if (event != INVALID_HANDLE_VALUE)
+        {
+          DWORD result;
+          LeaveCriticalSection (&lock->lock);
+          /* Wait until another thread signals this event.  */
+          result = WaitForSingleObject (event, INFINITE);
+          if (result == WAIT_FAILED || result == WAIT_TIMEOUT)
+            abort ();
+          CloseHandle (event);
+          /* The thread which signalled the event already did the bookkeeping:
+             removed us from the waiting_writers, set lock->runcount = -1.  */
+          if (!(lock->runcount == -1))
+            abort ();
+          return 0;
+        }
+      else
+        {
+          /* Allocation failure.  Weird.  */
+          do
+            {
+              LeaveCriticalSection (&lock->lock);
+              Sleep (1);
+              EnterCriticalSection (&lock->lock);
+            }
+          while (!(lock->runcount == 0));
+        }
+    }
+  lock->runcount--; /* runcount becomes -1 */
+  LeaveCriticalSection (&lock->lock);
+  return 0;
+}
+
+int
+glthread_rwlock_unlock_func (gl_rwlock_t *lock)
+{
+  if (!lock->guard.done)
+    return EINVAL;
+  EnterCriticalSection (&lock->lock);
+  if (lock->runcount < 0)
+    {
+      /* Drop a writer lock.  */
+      if (!(lock->runcount == -1))
+        abort ();
+      lock->runcount = 0;
+    }
+  else
+    {
+      /* Drop a reader lock.  */
+      if (!(lock->runcount > 0))
+        {
+          LeaveCriticalSection (&lock->lock);
+          return EPERM;
+        }
+      lock->runcount--;
+    }
+  if (lock->runcount == 0)
+    {
+      /* POSIX recommends that "write locks shall take precedence over read
+         locks", to avoid "writer starvation".  */
+      if (lock->waiting_writers.count > 0)
+        {
+          /* Wake up one of the waiting writers.  */
+          lock->runcount--;
+          gl_waitqueue_notify_first (&lock->waiting_writers);
+        }
+      else
+        {
+          /* Wake up all waiting readers.  */
+          lock->runcount += lock->waiting_readers.count;
+          gl_waitqueue_notify_all (&lock->waiting_readers);
+        }
+    }
+  LeaveCriticalSection (&lock->lock);
+  return 0;
+}
+
+int
+glthread_rwlock_destroy_func (gl_rwlock_t *lock)
+{
+  if (!lock->guard.done)
+    return EINVAL;
+  if (lock->runcount != 0)
+    return EBUSY;
+  DeleteCriticalSection (&lock->lock);
+  if (lock->waiting_readers.array != NULL)
+    free (lock->waiting_readers.array);
+  if (lock->waiting_writers.array != NULL)
+    free (lock->waiting_writers.array);
+  lock->guard.done = 0;
+  return 0;
+}
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+void
+glthread_recursive_lock_init_func (gl_recursive_lock_t *lock)
+{
+  lock->owner = 0;
+  lock->depth = 0;
+  InitializeCriticalSection (&lock->lock);
+  lock->guard.done = 1;
+}
+
+int
+glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock)
+{
+  if (!lock->guard.done)
+    {
+      if (InterlockedIncrement (&lock->guard.started) == 0)
+        /* This thread is the first one to need this lock.  Initialize it.  */
+        glthread_recursive_lock_init (lock);
+      else
+        /* Yield the CPU while waiting for another thread to finish
+           initializing this lock.  */
+        while (!lock->guard.done)
+          Sleep (0);
+    }
+  {
+    DWORD self = GetCurrentThreadId ();
+    if (lock->owner != self)
+      {
+        EnterCriticalSection (&lock->lock);
+        lock->owner = self;
+      }
+    if (++(lock->depth) == 0) /* wraparound? */
+      {
+        lock->depth--;
+        return EAGAIN;
+      }
+  }
+  return 0;
+}
+
+int
+glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock)
+{
+  if (lock->owner != GetCurrentThreadId ())
+    return EPERM;
+  if (lock->depth == 0)
+    return EINVAL;
+  if (--(lock->depth) == 0)
+    {
+      lock->owner = 0;
+      LeaveCriticalSection (&lock->lock);
+    }
+  return 0;
+}
+
+int
+glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock)
+{
+  if (lock->owner != 0)
+    return EBUSY;
+  DeleteCriticalSection (&lock->lock);
+  lock->guard.done = 0;
+  return 0;
+}
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+void
+glthread_once_func (gl_once_t *once_control, void (*initfunction) (void))
+{
+  if (once_control->inited <= 0)
+    {
+      if (InterlockedIncrement (&once_control->started) == 0)
+        {
+          /* This thread is the first one to come to this once_control.  */
+          InitializeCriticalSection (&once_control->lock);
+          EnterCriticalSection (&once_control->lock);
+          once_control->inited = 0;
+          initfunction ();
+          once_control->inited = 1;
+          LeaveCriticalSection (&once_control->lock);
+        }
+      else
+        {
+          /* Undo last operation.  */
+          InterlockedDecrement (&once_control->started);
+          /* Some other thread has already started the initialization.
+             Yield the CPU while waiting for the other thread to finish
+             initializing and taking the lock.  */
+          while (once_control->inited < 0)
+            Sleep (0);
+          if (once_control->inited <= 0)
+            {
+              /* Take the lock.  This blocks until the other thread has
+                 finished calling the initfunction.  */
+              EnterCriticalSection (&once_control->lock);
+              LeaveCriticalSection (&once_control->lock);
+              if (!(once_control->inited > 0))
+                abort ();
+            }
+        }
+    }
+}
+
+#endif
+
+/* ========================================================================= */
diff --git a/tests/glthread/lock.h b/tests/glthread/lock.h
new file mode 100644 (file)
index 0000000..6267500
--- /dev/null
@@ -0,0 +1,927 @@
+/* Locking in multithreaded situations.
+   Copyright (C) 2005-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
+   gthr-win32.h.  */
+
+/* This file contains locking primitives for use with a given thread library.
+   It does not contain primitives for creating threads or for other
+   synchronization primitives.
+
+   Normal (non-recursive) locks:
+     Type:                gl_lock_t
+     Declaration:         gl_lock_define(extern, name)
+     Initializer:         gl_lock_define_initialized(, name)
+     Initialization:      gl_lock_init (name);
+     Taking the lock:     gl_lock_lock (name);
+     Releasing the lock:  gl_lock_unlock (name);
+     De-initialization:   gl_lock_destroy (name);
+   Equivalent functions with control of error handling:
+     Initialization:      err = glthread_lock_init (&name);
+     Taking the lock:     err = glthread_lock_lock (&name);
+     Releasing the lock:  err = glthread_lock_unlock (&name);
+     De-initialization:   err = glthread_lock_destroy (&name);
+
+   Read-Write (non-recursive) locks:
+     Type:                gl_rwlock_t
+     Declaration:         gl_rwlock_define(extern, name)
+     Initializer:         gl_rwlock_define_initialized(, name)
+     Initialization:      gl_rwlock_init (name);
+     Taking the lock:     gl_rwlock_rdlock (name);
+                          gl_rwlock_wrlock (name);
+     Releasing the lock:  gl_rwlock_unlock (name);
+     De-initialization:   gl_rwlock_destroy (name);
+   Equivalent functions with control of error handling:
+     Initialization:      err = glthread_rwlock_init (&name);
+     Taking the lock:     err = glthread_rwlock_rdlock (&name);
+                          err = glthread_rwlock_wrlock (&name);
+     Releasing the lock:  err = glthread_rwlock_unlock (&name);
+     De-initialization:   err = glthread_rwlock_destroy (&name);
+
+   Recursive locks:
+     Type:                gl_recursive_lock_t
+     Declaration:         gl_recursive_lock_define(extern, name)
+     Initializer:         gl_recursive_lock_define_initialized(, name)
+     Initialization:      gl_recursive_lock_init (name);
+     Taking the lock:     gl_recursive_lock_lock (name);
+     Releasing the lock:  gl_recursive_lock_unlock (name);
+     De-initialization:   gl_recursive_lock_destroy (name);
+   Equivalent functions with control of error handling:
+     Initialization:      err = glthread_recursive_lock_init (&name);
+     Taking the lock:     err = glthread_recursive_lock_lock (&name);
+     Releasing the lock:  err = glthread_recursive_lock_unlock (&name);
+     De-initialization:   err = glthread_recursive_lock_destroy (&name);
+
+  Once-only execution:
+     Type:                gl_once_t
+     Initializer:         gl_once_define(extern, name)
+     Execution:           gl_once (name, initfunction);
+   Equivalent functions with control of error handling:
+     Execution:           err = glthread_once (&name, initfunction);
+*/
+
+
+#ifndef _LOCK_H
+#define _LOCK_H
+
+#include <errno.h>
+#include <stdlib.h>
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS
+
+/* Use the POSIX threads library.  */
+
+# include <pthread.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if PTHREAD_IN_USE_DETECTION_HARD
+
+/* The pthread_in_use() detection needs to be done at runtime.  */
+#  define pthread_in_use() \
+     glthread_in_use ()
+extern int glthread_in_use (void);
+
+# endif
+
+# if USE_POSIX_THREADS_WEAK
+
+/* Use weak references to the POSIX threads library.  */
+
+/* Weak references avoid dragging in external libraries if the other parts
+   of the program don't use them.  Here we use them, because we don't want
+   every program that uses libintl to depend on libpthread.  This assumes
+   that libpthread would not be loaded after libintl; i.e. if libintl is
+   loaded first, by an executable that does not depend on libpthread, and
+   then a module is dynamically loaded that depends on libpthread, libintl
+   will not be multithread-safe.  */
+
+/* The way to test at runtime whether libpthread is present is to test
+   whether a function pointer's value, such as &pthread_mutex_init, is
+   non-NULL.  However, some versions of GCC have a bug through which, in
+   PIC mode, &foo != NULL always evaluates to true if there is a direct
+   call to foo(...) in the same function.  To avoid this, we test the
+   address of a function in libpthread that we don't use.  */
+
+#  pragma weak pthread_mutex_init
+#  pragma weak pthread_mutex_lock
+#  pragma weak pthread_mutex_unlock
+#  pragma weak pthread_mutex_destroy
+#  pragma weak pthread_rwlock_init
+#  pragma weak pthread_rwlock_rdlock
+#  pragma weak pthread_rwlock_wrlock
+#  pragma weak pthread_rwlock_unlock
+#  pragma weak pthread_rwlock_destroy
+#  pragma weak pthread_once
+#  pragma weak pthread_cond_init
+#  pragma weak pthread_cond_wait
+#  pragma weak pthread_cond_signal
+#  pragma weak pthread_cond_broadcast
+#  pragma weak pthread_cond_destroy
+#  pragma weak pthread_mutexattr_init
+#  pragma weak pthread_mutexattr_settype
+#  pragma weak pthread_mutexattr_destroy
+#  ifndef pthread_self
+#   pragma weak pthread_self
+#  endif
+
+#  if !PTHREAD_IN_USE_DETECTION_HARD
+#   pragma weak pthread_cancel
+#   define pthread_in_use() (pthread_cancel != NULL)
+#  endif
+
+# else
+
+#  if !PTHREAD_IN_USE_DETECTION_HARD
+#   define pthread_in_use() 1
+#  endif
+
+# endif
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef pthread_mutex_t gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS pthread_mutex_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer;
+# define gl_lock_initializer \
+    PTHREAD_MUTEX_INITIALIZER
+# define glthread_lock_init(LOCK) \
+    (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0)
+# define glthread_lock_lock(LOCK) \
+    (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0)
+# define glthread_lock_unlock(LOCK) \
+    (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0)
+# define glthread_lock_destroy(LOCK) \
+    (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+# if HAVE_PTHREAD_RWLOCK
+
+#  ifdef PTHREAD_RWLOCK_INITIALIZER
+
+typedef pthread_rwlock_t gl_rwlock_t;
+#   define gl_rwlock_define(STORAGECLASS, NAME) \
+      STORAGECLASS pthread_rwlock_t NAME;
+#   define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+      STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer;
+#   define gl_rwlock_initializer \
+      PTHREAD_RWLOCK_INITIALIZER
+#   define glthread_rwlock_init(LOCK) \
+      (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0)
+#   define glthread_rwlock_rdlock(LOCK) \
+      (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0)
+#   define glthread_rwlock_wrlock(LOCK) \
+      (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0)
+#   define glthread_rwlock_unlock(LOCK) \
+      (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0)
+#   define glthread_rwlock_destroy(LOCK) \
+      (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0)
+
+#  else
+
+typedef struct
+        {
+          int initialized;
+          pthread_mutex_t guard;   /* protects the initialization */
+          pthread_rwlock_t rwlock; /* read-write lock */
+        }
+        gl_rwlock_t;
+#   define gl_rwlock_define(STORAGECLASS, NAME) \
+      STORAGECLASS gl_rwlock_t NAME;
+#   define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+      STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
+#   define gl_rwlock_initializer \
+      { 0, PTHREAD_MUTEX_INITIALIZER }
+#   define glthread_rwlock_init(LOCK) \
+      (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0)
+#   define glthread_rwlock_rdlock(LOCK) \
+      (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0)
+#   define glthread_rwlock_wrlock(LOCK) \
+      (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0)
+#   define glthread_rwlock_unlock(LOCK) \
+      (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0)
+#   define glthread_rwlock_destroy(LOCK) \
+      (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock);
+
+#  endif
+
+# else
+
+typedef struct
+        {
+          pthread_mutex_t lock; /* protects the remaining fields */
+          pthread_cond_t waiting_readers; /* waiting readers */
+          pthread_cond_t waiting_writers; /* waiting writers */
+          unsigned int waiting_writers_count; /* number of waiting writers */
+          int runcount; /* number of readers running, or -1 when a writer runs */
+        }
+        gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+    { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 }
+# define glthread_rwlock_init(LOCK) \
+    (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0)
+# define glthread_rwlock_rdlock(LOCK) \
+    (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_wrlock(LOCK) \
+    (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_unlock(LOCK) \
+    (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_destroy(LOCK) \
+    (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock);
+
+# endif
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+# if HAVE_PTHREAD_MUTEX_RECURSIVE
+
+#  if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+
+typedef pthread_mutex_t gl_recursive_lock_t;
+#   define gl_recursive_lock_define(STORAGECLASS, NAME) \
+      STORAGECLASS pthread_mutex_t NAME;
+#   define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+      STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer;
+#   ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#    define gl_recursive_lock_initializer \
+       PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#   else
+#    define gl_recursive_lock_initializer \
+       PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#   endif
+#   define glthread_recursive_lock_init(LOCK) \
+      (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+#   define glthread_recursive_lock_lock(LOCK) \
+      (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0)
+#   define glthread_recursive_lock_unlock(LOCK) \
+      (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0)
+#   define glthread_recursive_lock_destroy(LOCK) \
+      (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+
+#  else
+
+typedef struct
+        {
+          pthread_mutex_t recmutex; /* recursive mutex */
+          pthread_mutex_t guard;    /* protects the initialization */
+          int initialized;
+        }
+        gl_recursive_lock_t;
+#   define gl_recursive_lock_define(STORAGECLASS, NAME) \
+      STORAGECLASS gl_recursive_lock_t NAME;
+#   define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+      STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+#   define gl_recursive_lock_initializer \
+      { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 }
+#   define glthread_recursive_lock_init(LOCK) \
+      (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+#   define glthread_recursive_lock_lock(LOCK) \
+      (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0)
+#   define glthread_recursive_lock_unlock(LOCK) \
+      (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0)
+#   define glthread_recursive_lock_destroy(LOCK) \
+      (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock);
+
+#  endif
+
+# else
+
+/* Old versions of POSIX threads on Solaris did not have recursive locks.
+   We have to implement them ourselves.  */
+
+typedef struct
+        {
+          pthread_mutex_t mutex;
+          pthread_t owner;
+          unsigned long depth;
+        }
+        gl_recursive_lock_t;
+#  define gl_recursive_lock_define(STORAGECLASS, NAME) \
+     STORAGECLASS gl_recursive_lock_t NAME;
+#  define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+     STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+#  define gl_recursive_lock_initializer \
+     { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 }
+#  define glthread_recursive_lock_init(LOCK) \
+     (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+#  define glthread_recursive_lock_lock(LOCK) \
+     (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0)
+#  define glthread_recursive_lock_unlock(LOCK) \
+     (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0)
+#  define glthread_recursive_lock_destroy(LOCK) \
+     (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock);
+
+# endif
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef pthread_once_t gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+    STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT;
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+    (pthread_in_use ()                                                         \
+     ? pthread_once (ONCE_CONTROL, INITFUNCTION)                               \
+     : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+extern int glthread_once_singlethreaded (pthread_once_t *once_control);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_PTH_THREADS
+
+/* Use the GNU Pth threads library.  */
+
+# include <pth.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if USE_PTH_THREADS_WEAK
+
+/* Use weak references to the GNU Pth threads library.  */
+
+#  pragma weak pth_mutex_init
+#  pragma weak pth_mutex_acquire
+#  pragma weak pth_mutex_release
+#  pragma weak pth_rwlock_init
+#  pragma weak pth_rwlock_acquire
+#  pragma weak pth_rwlock_release
+#  pragma weak pth_once
+
+#  pragma weak pth_cancel
+#  define pth_in_use() (pth_cancel != NULL)
+
+# else
+
+#  define pth_in_use() 1
+
+# endif
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef pth_mutex_t gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS pth_mutex_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS pth_mutex_t NAME = gl_lock_initializer;
+# define gl_lock_initializer \
+    PTH_MUTEX_INIT
+# define glthread_lock_init(LOCK) \
+    (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0)
+# define glthread_lock_lock(LOCK) \
+    (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0)
+# define glthread_lock_unlock(LOCK) \
+    (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0)
+# define glthread_lock_destroy(LOCK) \
+    ((void)(LOCK), 0)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+typedef pth_rwlock_t gl_rwlock_t;
+#  define gl_rwlock_define(STORAGECLASS, NAME) \
+     STORAGECLASS pth_rwlock_t NAME;
+#  define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+     STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer;
+#  define gl_rwlock_initializer \
+     PTH_RWLOCK_INIT
+#  define glthread_rwlock_init(LOCK) \
+     (pth_in_use () && !pth_rwlock_init (LOCK) ? errno : 0)
+#  define glthread_rwlock_rdlock(LOCK) \
+     (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? errno : 0)
+#  define glthread_rwlock_wrlock(LOCK) \
+     (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? errno : 0)
+#  define glthread_rwlock_unlock(LOCK) \
+     (pth_in_use () && !pth_rwlock_release (LOCK) ? errno : 0)
+#  define glthread_rwlock_destroy(LOCK) \
+     ((void)(LOCK), 0)
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+/* In Pth, mutexes are recursive by default.  */
+typedef pth_mutex_t gl_recursive_lock_t;
+#  define gl_recursive_lock_define(STORAGECLASS, NAME) \
+     STORAGECLASS pth_mutex_t NAME;
+#  define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+     STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer;
+#  define gl_recursive_lock_initializer \
+     PTH_MUTEX_INIT
+#  define glthread_recursive_lock_init(LOCK) \
+     (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0)
+#  define glthread_recursive_lock_lock(LOCK) \
+     (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0)
+#  define glthread_recursive_lock_unlock(LOCK) \
+     (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0)
+#  define glthread_recursive_lock_destroy(LOCK) \
+     ((void)(LOCK), 0)
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef pth_once_t gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+    STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT;
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+    (pth_in_use ()                                                             \
+     ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION)                \
+     : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+extern int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void));
+extern int glthread_once_singlethreaded (pth_once_t *once_control);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_SOLARIS_THREADS
+
+/* Use the old Solaris threads library.  */
+
+# include <thread.h>
+# include <synch.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if USE_SOLARIS_THREADS_WEAK
+
+/* Use weak references to the old Solaris threads library.  */
+
+#  pragma weak mutex_init
+#  pragma weak mutex_lock
+#  pragma weak mutex_unlock
+#  pragma weak mutex_destroy
+#  pragma weak rwlock_init
+#  pragma weak rw_rdlock
+#  pragma weak rw_wrlock
+#  pragma weak rw_unlock
+#  pragma weak rwlock_destroy
+#  pragma weak thr_self
+
+#  pragma weak thr_suspend
+#  define thread_in_use() (thr_suspend != NULL)
+
+# else
+
+#  define thread_in_use() 1
+
+# endif
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef mutex_t gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS mutex_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS mutex_t NAME = gl_lock_initializer;
+# define gl_lock_initializer \
+    DEFAULTMUTEX
+# define glthread_lock_init(LOCK) \
+    (thread_in_use () ? mutex_init (LOCK, USYNC_THREAD, NULL) : 0)
+# define glthread_lock_lock(LOCK) \
+    (thread_in_use () ? mutex_lock (LOCK) : 0)
+# define glthread_lock_unlock(LOCK) \
+    (thread_in_use () ? mutex_unlock (LOCK) : 0)
+# define glthread_lock_destroy(LOCK) \
+    (thread_in_use () ? mutex_destroy (LOCK) : 0)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+typedef rwlock_t gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+    STORAGECLASS rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+    DEFAULTRWLOCK
+# define glthread_rwlock_init(LOCK) \
+    (thread_in_use () ? rwlock_init (LOCK, USYNC_THREAD, NULL) : 0)
+# define glthread_rwlock_rdlock(LOCK) \
+    (thread_in_use () ? rw_rdlock (LOCK) : 0)
+# define glthread_rwlock_wrlock(LOCK) \
+    (thread_in_use () ? rw_wrlock (LOCK) : 0)
+# define glthread_rwlock_unlock(LOCK) \
+    (thread_in_use () ? rw_unlock (LOCK) : 0)
+# define glthread_rwlock_destroy(LOCK) \
+    (thread_in_use () ? rwlock_destroy (LOCK) : 0)
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+/* Old Solaris threads did not have recursive locks.
+   We have to implement them ourselves.  */
+
+typedef struct
+        {
+          mutex_t mutex;
+          thread_t owner;
+          unsigned long depth;
+        }
+        gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_recursive_lock_t NAME;
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+# define gl_recursive_lock_initializer \
+    { DEFAULTMUTEX, (thread_t) 0, 0 }
+# define glthread_recursive_lock_init(LOCK) \
+    (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_lock(LOCK) \
+    (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_unlock(LOCK) \
+    (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_destroy(LOCK) \
+    (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock);
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef struct
+        {
+          volatile int inited;
+          mutex_t mutex;
+        }
+        gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX };
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+    (thread_in_use ()                                                          \
+     ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION)                \
+     : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+extern int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void));
+extern int glthread_once_singlethreaded (gl_once_t *once_control);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_WIN32_THREADS
+
+# include <windows.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex,
+   Semaphore types, because
+     - we need only to synchronize inside a single process (address space),
+       not inter-process locking,
+     - we don't need to support trylock operations.  (TryEnterCriticalSection
+       does not work on Windows 95/98/ME.  Packages that need trylock usually
+       define their own mutex type.)  */
+
+/* There is no way to statically initialize a CRITICAL_SECTION.  It needs
+   to be done lazily, once only.  For this we need spinlocks.  */
+
+typedef struct { volatile int done; volatile long started; } gl_spinlock_t;
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef struct
+        {
+          gl_spinlock_t guard; /* protects the initialization */
+          CRITICAL_SECTION lock;
+        }
+        gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_lock_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS gl_lock_t NAME = gl_lock_initializer;
+# define gl_lock_initializer \
+    { { 0, -1 } }
+# define glthread_lock_init(LOCK) \
+    (glthread_lock_init_func (LOCK), 0)
+# define glthread_lock_lock(LOCK) \
+    glthread_lock_lock_func (LOCK)
+# define glthread_lock_unlock(LOCK) \
+    glthread_lock_unlock_func (LOCK)
+# define glthread_lock_destroy(LOCK) \
+    glthread_lock_destroy_func (LOCK)
+extern void glthread_lock_init_func (gl_lock_t *lock);
+extern int glthread_lock_lock_func (gl_lock_t *lock);
+extern int glthread_lock_unlock_func (gl_lock_t *lock);
+extern int glthread_lock_destroy_func (gl_lock_t *lock);
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+/* It is impossible to implement read-write locks using plain locks, without
+   introducing an extra thread dedicated to managing read-write locks.
+   Therefore here we need to use the low-level Event type.  */
+
+typedef struct
+        {
+          HANDLE *array; /* array of waiting threads, each represented by an event */
+          unsigned int count; /* number of waiting threads */
+          unsigned int alloc; /* length of allocated array */
+          unsigned int offset; /* index of first waiting thread in array */
+        }
+        gl_carray_waitqueue_t;
+typedef struct
+        {
+          gl_spinlock_t guard; /* protects the initialization */
+          CRITICAL_SECTION lock; /* protects the remaining fields */
+          gl_carray_waitqueue_t waiting_readers; /* waiting readers */
+          gl_carray_waitqueue_t waiting_writers; /* waiting writers */
+          int runcount; /* number of readers running, or -1 when a writer runs */
+        }
+        gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+    { { 0, -1 } }
+# define glthread_rwlock_init(LOCK) \
+    (glthread_rwlock_init_func (LOCK), 0)
+# define glthread_rwlock_rdlock(LOCK) \
+    glthread_rwlock_rdlock_func (LOCK)
+# define glthread_rwlock_wrlock(LOCK) \
+    glthread_rwlock_wrlock_func (LOCK)
+# define glthread_rwlock_unlock(LOCK) \
+    glthread_rwlock_unlock_func (LOCK)
+# define glthread_rwlock_destroy(LOCK) \
+    glthread_rwlock_destroy_func (LOCK)
+extern void glthread_rwlock_init_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock);
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+/* The Win32 documentation says that CRITICAL_SECTION already implements a
+   recursive lock.  But we need not rely on it: It's easy to implement a
+   recursive lock without this assumption.  */
+
+typedef struct
+        {
+          gl_spinlock_t guard; /* protects the initialization */
+          DWORD owner;
+          unsigned long depth;
+          CRITICAL_SECTION lock;
+        }
+        gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_recursive_lock_t NAME;
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+# define gl_recursive_lock_initializer \
+    { { 0, -1 }, 0, 0 }
+# define glthread_recursive_lock_init(LOCK) \
+    (glthread_recursive_lock_init_func (LOCK), 0)
+# define glthread_recursive_lock_lock(LOCK) \
+    glthread_recursive_lock_lock_func (LOCK)
+# define glthread_recursive_lock_unlock(LOCK) \
+    glthread_recursive_lock_unlock_func (LOCK)
+# define glthread_recursive_lock_destroy(LOCK) \
+    glthread_recursive_lock_destroy_func (LOCK)
+extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock);
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef struct
+        {
+          volatile int inited;
+          volatile long started;
+          CRITICAL_SECTION lock;
+        }
+        gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_once_t NAME = { -1, -1 };
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+    (glthread_once_func (ONCE_CONTROL, INITFUNCTION), 0)
+extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void));
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS)
+
+/* Provide dummy implementation if threads are not supported.  */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef int gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME)
+# define gl_lock_define_initialized(STORAGECLASS, NAME)
+# define glthread_lock_init(NAME) 0
+# define glthread_lock_lock(NAME) 0
+# define glthread_lock_unlock(NAME) 0
+# define glthread_lock_destroy(NAME) 0
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+typedef int gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME)
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME)
+# define glthread_rwlock_init(NAME) 0
+# define glthread_rwlock_rdlock(NAME) 0
+# define glthread_rwlock_wrlock(NAME) 0
+# define glthread_rwlock_unlock(NAME) 0
+# define glthread_rwlock_destroy(NAME) 0
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+typedef int gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME)
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME)
+# define glthread_recursive_lock_init(NAME) 0
+# define glthread_recursive_lock_lock(NAME) 0
+# define glthread_recursive_lock_unlock(NAME) 0
+# define glthread_recursive_lock_destroy(NAME) 0
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef int gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_once_t NAME = 0;
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+    (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0)
+
+#endif
+
+/* ========================================================================= */
+
+/* Macros with built-in error handling.  */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+#define gl_lock_init(NAME) \
+   do                                  \
+     {                                 \
+       if (glthread_lock_init (&NAME)) \
+         abort ();                     \
+     }                                 \
+   while (0)
+#define gl_lock_lock(NAME) \
+   do                                  \
+     {                                 \
+       if (glthread_lock_lock (&NAME)) \
+         abort ();                     \
+     }                                 \
+   while (0)
+#define gl_lock_unlock(NAME) \
+   do                                    \
+     {                                   \
+       if (glthread_lock_unlock (&NAME)) \
+         abort ();                       \
+     }                                   \
+   while (0)
+#define gl_lock_destroy(NAME) \
+   do                                     \
+     {                                    \
+       if (glthread_lock_destroy (&NAME)) \
+         abort ();                        \
+     }                                    \
+   while (0)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+#define gl_rwlock_init(NAME) \
+   do                                    \
+     {                                   \
+       if (glthread_rwlock_init (&NAME)) \
+         abort ();                       \
+     }                                   \
+   while (0)
+#define gl_rwlock_rdlock(NAME) \
+   do                                      \
+     {                                     \
+       if (glthread_rwlock_rdlock (&NAME)) \
+         abort ();                         \
+     }                                     \
+   while (0)
+#define gl_rwlock_wrlock(NAME) \
+   do                                      \
+     {                                     \
+       if (glthread_rwlock_wrlock (&NAME)) \
+         abort ();                         \
+     }                                     \
+   while (0)
+#define gl_rwlock_unlock(NAME) \
+   do                                      \
+     {                                     \
+       if (glthread_rwlock_unlock (&NAME)) \
+         abort ();                         \
+     }                                     \
+   while (0)
+#define gl_rwlock_destroy(NAME) \
+   do                                       \
+     {                                      \
+       if (glthread_rwlock_destroy (&NAME)) \
+         abort ();                          \
+     }                                      \
+   while (0)
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+#define gl_recursive_lock_init(NAME) \
+   do                                            \
+     {                                           \
+       if (glthread_recursive_lock_init (&NAME)) \
+         abort ();                               \
+     }                                           \
+   while (0)
+#define gl_recursive_lock_lock(NAME) \
+   do                                            \
+     {                                           \
+       if (glthread_recursive_lock_lock (&NAME)) \
+         abort ();                               \
+     }                                           \
+   while (0)
+#define gl_recursive_lock_unlock(NAME) \
+   do                                              \
+     {                                             \
+       if (glthread_recursive_lock_unlock (&NAME)) \
+         abort ();                                 \
+     }                                             \
+   while (0)
+#define gl_recursive_lock_destroy(NAME) \
+   do                                               \
+     {                                              \
+       if (glthread_recursive_lock_destroy (&NAME)) \
+         abort ();                                  \
+     }                                              \
+   while (0)
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+#define gl_once(NAME, INITFUNCTION) \
+   do                                           \
+     {                                          \
+       if (glthread_once (&NAME, INITFUNCTION)) \
+         abort ();                              \
+     }                                          \
+   while (0)
+
+/* ========================================================================= */
+
+#endif /* _LOCK_H */
diff --git a/tests/glthread/thread.c b/tests/glthread/thread.c
new file mode 100644 (file)
index 0000000..bb40092
--- /dev/null
@@ -0,0 +1,218 @@
+/* Creating and controlling threads.
+   Copyright (C) 2005-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
+   gthr-win32.h.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "glthread/thread.h"
+
+#include <stdlib.h>
+#include "glthread/lock.h"
+
+/* ========================================================================= */
+
+#if USE_WIN32_THREADS
+
+#include <process.h>
+
+/* -------------------------- gl_thread_t datatype -------------------------- */
+
+/* The Thread-Local Storage (TLS) key that allows to access each thread's
+   'struct gl_thread_struct *' pointer.  */
+static DWORD self_key = (DWORD)-1;
+
+/* Initializes self_key.  This function must only be called once.  */
+static void
+do_init_self_key (void)
+{
+  self_key = TlsAlloc ();
+  /* If this fails, we're hosed.  */
+  if (self_key == (DWORD)-1)
+    abort ();
+}
+
+/* Initializes self_key.  */
+static void
+init_self_key (void)
+{
+  gl_once_define(static, once)
+  gl_once (once, do_init_self_key);
+}
+
+/* This structure contains information about a thread.
+   It is stored in TLS under key self_key.  */
+struct gl_thread_struct
+{
+  /* Fields for managing the handle.  */
+  HANDLE volatile handle;
+  CRITICAL_SECTION handle_lock;
+  /* Fields for managing the exit value.  */
+  void * volatile result;
+  /* Fields for managing the thread start.  */
+  void * (*func) (void *);
+  void *arg;
+};
+
+/* Return a real HANDLE object for the current thread.  */
+static inline HANDLE
+get_current_thread_handle (void)
+{
+  HANDLE this_handle;
+
+  /* GetCurrentThread() returns a pseudo-handle, i.e. only a symbolic
+     identifier, not a real handle.  */
+  if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (),
+                        GetCurrentProcess (), &this_handle,
+                        0, FALSE, DUPLICATE_SAME_ACCESS))
+    abort ();
+  return this_handle;
+}
+
+gl_thread_t
+gl_thread_self_func (void)
+{
+  gl_thread_t thread;
+
+  if (self_key == (DWORD)-1)
+    init_self_key ();
+  thread = TlsGetValue (self_key);
+  if (thread == NULL)
+    {
+      /* This happens only in threads that have not been created through
+         glthread_create(), such as the main thread.  */
+      for (;;)
+        {
+          thread =
+            (struct gl_thread_struct *)
+            malloc (sizeof (struct gl_thread_struct));
+          if (thread != NULL)
+            break;
+          /* Memory allocation failed.  There is not much we can do.  Have to
+             busy-loop, waiting for the availability of memory.  */
+          Sleep (1);
+        }
+
+      thread->handle = get_current_thread_handle ();
+      InitializeCriticalSection (&thread->handle_lock);
+      thread->result = NULL; /* just to be deterministic */
+      TlsSetValue (self_key, thread);
+    }
+  return thread;
+}
+
+/* The main function of a freshly creating thread.  It's a wrapper around
+   the FUNC and ARG arguments passed to glthread_create_func.  */
+static unsigned int WINAPI
+wrapper_func (void *varg)
+{
+  struct gl_thread_struct *thread = (struct gl_thread_struct *)varg;
+
+  EnterCriticalSection (&thread->handle_lock);
+  /* Create a new handle for the thread only if the parent thread did not yet
+     fill in the handle.  */
+  if (thread->handle == NULL)
+    thread->handle = get_current_thread_handle ();
+  LeaveCriticalSection (&thread->handle_lock);
+
+  if (self_key == (DWORD)-1)
+    init_self_key ();
+  TlsSetValue (self_key, thread);
+
+  /* Run the thread.  Store the exit value if the thread was not terminated
+     otherwise.  */
+  thread->result = thread->func (thread->arg);
+  return 0;
+}
+
+int
+glthread_create_func (gl_thread_t *threadp, void * (*func) (void *), void *arg)
+{
+  struct gl_thread_struct *thread =
+    (struct gl_thread_struct *) malloc (sizeof (struct gl_thread_struct));
+  if (thread == NULL)
+    return ENOMEM;
+  thread->handle = NULL;
+  InitializeCriticalSection (&thread->handle_lock);
+  thread->result = NULL; /* just to be deterministic */
+  thread->func = func;
+  thread->arg = arg;
+
+  {
+    unsigned int thread_id;
+    HANDLE thread_handle;
+
+    thread_handle = (HANDLE)
+      _beginthreadex (NULL, 100000, wrapper_func, thread, 0, &thread_id);
+      /* calls CreateThread with the same arguments */
+    if (thread_handle == NULL)
+      {
+        DeleteCriticalSection (&thread->handle_lock);
+        free (thread);
+        return EAGAIN;
+      }
+
+    EnterCriticalSection (&thread->handle_lock);
+    if (thread->handle == NULL)
+      thread->handle = thread_handle;
+    else
+      /* thread->handle was already set by the thread itself.  */
+      CloseHandle (thread_handle);
+    LeaveCriticalSection (&thread->handle_lock);
+
+    *threadp = thread;
+    return 0;
+  }
+}
+
+int
+glthread_join_func (gl_thread_t thread, void **retvalp)
+{
+  if (thread == NULL)
+    return EINVAL;
+
+  if (thread == gl_thread_self ())
+    return EDEADLK;
+
+  if (WaitForSingleObject (thread->handle, INFINITE) == WAIT_FAILED)
+    return EINVAL;
+
+  if (retvalp != NULL)
+    *retvalp = thread->result;
+
+  DeleteCriticalSection (&thread->handle_lock);
+  CloseHandle (thread->handle);
+  free (thread);
+
+  return 0;
+}
+
+int
+gl_thread_exit_func (void *retval)
+{
+  gl_thread_t thread = gl_thread_self ();
+  thread->result = retval;
+  _endthreadex (0); /* calls ExitThread (0) */
+  abort ();
+}
+
+#endif
+
+/* ========================================================================= */
diff --git a/tests/glthread/thread.h b/tests/glthread/thread.h
new file mode 100644 (file)
index 0000000..370f09a
--- /dev/null
@@ -0,0 +1,376 @@
+/* Creating and controlling threads.
+   Copyright (C) 2005-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
+   gthr-win32.h.  */
+
+/* This file contains primitives for creating and controlling threads.
+
+   Thread data type: gl_thread_t.
+
+   Creating a thread:
+       thread = gl_thread_create (func, arg);
+   Or with control of error handling:
+       err = glthread_create (&thread, func, arg);
+       extern int glthread_create (gl_thread_t *result,
+                                   void *(*func) (void *), void *arg);
+
+   Querying and changing the signal mask of a thread (not supported on all
+   platforms):
+       gl_thread_sigmask (how, newmask, oldmask);
+   Or with control of error handling:
+       err = glthread_sigmask (how, newmask, oldmask);
+       extern int glthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask);
+
+   Waiting for termination of another thread:
+       gl_thread_join (thread, &return_value);
+   Or with control of error handling:
+       err = glthread_join (thread, &return_value);
+       extern int glthread_join (gl_thread_t thread, void **return_value_ptr);
+
+   Getting a reference to the current thread:
+       current = gl_thread_self ();
+       extern gl_thread_t gl_thread_self (void);
+
+   Terminating the current thread:
+       gl_thread_exit (return_value);
+       extern void gl_thread_exit (void *return_value) __attribute__ ((noreturn));
+
+   Requesting custom code to be executed at fork() time(not supported on all
+   platforms):
+       gl_thread_atfork (prepare_func, parent_func, child_func);
+   Or with control of error handling:
+       err = glthread_atfork (prepare_func, parent_func, child_func);
+       extern int glthread_atfork (void (*prepare_func) (void),
+                                   void (*parent_func) (void),
+                                   void (*child_func) (void));
+   Note that even on platforms where this is supported, use of fork() and
+   threads together is problematic, see
+     <http://lists.gnu.org/archive/html/bug-gnulib/2008-08/msg00062.html>
+ */
+
+
+#ifndef _GLTHREAD_THREAD_H
+#define _GLTHREAD_THREAD_H
+
+#include <errno.h>
+#include <stdlib.h>
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS
+
+/* Use the POSIX threads library.  */
+
+# include <pthread.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if PTHREAD_IN_USE_DETECTION_HARD
+
+/* The pthread_in_use() detection needs to be done at runtime.  */
+#  define pthread_in_use() \
+     glthread_in_use ()
+extern int glthread_in_use (void);
+
+# endif
+
+# if USE_POSIX_THREADS_WEAK
+
+/* Use weak references to the POSIX threads library.  */
+
+/* Weak references avoid dragging in external libraries if the other parts
+   of the program don't use them.  Here we use them, because we don't want
+   every program that uses libintl to depend on libpthread.  This assumes
+   that libpthread would not be loaded after libintl; i.e. if libintl is
+   loaded first, by an executable that does not depend on libpthread, and
+   then a module is dynamically loaded that depends on libpthread, libintl
+   will not be multithread-safe.  */
+
+/* The way to test at runtime whether libpthread is present is to test
+   whether a function pointer's value, such as &pthread_mutex_init, is
+   non-NULL.  However, some versions of GCC have a bug through which, in
+   PIC mode, &foo != NULL always evaluates to true if there is a direct
+   call to foo(...) in the same function.  To avoid this, we test the
+   address of a function in libpthread that we don't use.  */
+
+#  pragma weak pthread_create
+#  pragma weak pthread_sigmask
+#  pragma weak pthread_join
+#  ifndef pthread_self
+#   pragma weak pthread_self
+#  endif
+#  pragma weak pthread_exit
+#  if HAVE_PTHREAD_ATFORK
+#   pragma weak pthread_atfork
+#  endif
+
+#  if !PTHREAD_IN_USE_DETECTION_HARD
+#   pragma weak pthread_cancel
+#   define pthread_in_use() (pthread_cancel != NULL)
+#  endif
+
+# else
+
+#  if !PTHREAD_IN_USE_DETECTION_HARD
+#   define pthread_in_use() 1
+#  endif
+
+# endif
+
+/* -------------------------- gl_thread_t datatype -------------------------- */
+
+/* This choice of gl_thread_t assumes that
+     pthread_equal (a, b)  is equivalent to  ((a) == (b)).
+   This is the case on all platforms in use in 2008.  */
+typedef pthread_t gl_thread_t;
+# define glthread_create(THREADP, FUNC, ARG) \
+    (pthread_in_use () ? pthread_create (THREADP, NULL, FUNC, ARG) : ENOSYS)
+# define glthread_sigmask(HOW, SET, OSET) \
+    (pthread_in_use () ? pthread_sigmask (HOW, SET, OSET) : 0)
+# define glthread_join(THREAD, RETVALP) \
+    (pthread_in_use () ? pthread_join (THREAD, RETVALP) : 0)
+# define gl_thread_self() \
+    (pthread_in_use () ? (void *) pthread_self () : NULL)
+# define gl_thread_exit(RETVAL) \
+    (pthread_in_use () ? pthread_exit (RETVAL) : 0)
+
+# if HAVE_PTHREAD_ATFORK
+#  define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) \
+     (pthread_in_use () ? pthread_atfork (PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) : 0)
+# else
+#  define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
+# endif
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_PTH_THREADS
+
+/* Use the GNU Pth threads library.  */
+
+# include <pth.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if USE_PTH_THREADS_WEAK
+
+/* Use weak references to the GNU Pth threads library.  */
+
+#  pragma weak pth_spawn
+#  pragma weak pth_sigmask
+#  pragma weak pth_join
+#  pragma weak pth_self
+#  pragma weak pth_exit
+
+#  pragma weak pth_cancel
+#  define pth_in_use() (pth_cancel != NULL)
+
+# else
+
+#  define pth_in_use() 1
+
+# endif
+/* -------------------------- gl_thread_t datatype -------------------------- */
+
+typedef pth_t gl_thread_t;
+# define glthread_create(THREADP, FUNC, ARG) \
+    (pth_in_use () ? ((*(THREADP) = pth_spawn (NULL, FUNC, ARG)) ? 0 : errno) : 0)
+# define glthread_sigmask(HOW, SET, OSET) \
+    (pth_in_use () && !pth_sigmask (HOW, SET, OSET) ? errno : 0)
+# define glthread_join(THREAD, RETVALP) \
+    (pth_in_use () && !pth_join (THREAD, RETVALP) ? errno : 0)
+# define gl_thread_self() \
+    (pth_in_use () ? (void *) pth_self () : 0)
+# define gl_thread_exit(RETVAL) \
+    (pth_in_use () ? pth_exit (RETVAL) : 0)
+# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_SOLARIS_THREADS
+
+/* Use the old Solaris threads library.  */
+
+# include <thread.h>
+# include <synch.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if USE_SOLARIS_THREADS_WEAK
+
+/* Use weak references to the old Solaris threads library.  */
+
+#  pragma weak thr_create
+#  pragma weak thr_join
+#  pragma weak thr_self
+#  pragma weak thr_exit
+
+#  pragma weak thr_suspend
+#  define thread_in_use() (thr_suspend != NULL)
+
+# else
+
+#  define thread_in_use() 1
+
+# endif
+
+/* -------------------------- gl_thread_t datatype -------------------------- */
+
+typedef thread_t gl_thread_t;
+# define glthread_create(THREADP, FUNC, ARG) \
+    (thread_in_use () ? thr_create (NULL, 0, FUNC, ARG, 0, THREADP) : 0)
+# define glthread_sigmask(HOW, SET, OSET) \
+    (thread_in_use () ? sigprocmask (HOW, SET, OSET) : 0)
+# define glthread_join(THREAD, RETVALP) \
+    (thread_in_use () ? thr_join (THREAD, NULL, RETVALP) : 0)
+# define gl_thread_self() \
+    (thread_in_use () ? (void *) thr_self () : 0)
+# define gl_thread_exit(RETVAL) \
+    (thread_in_use () ? thr_exit (RETVAL) : 0)
+# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_WIN32_THREADS
+
+# include <windows.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* -------------------------- gl_thread_t datatype -------------------------- */
+
+/* The gl_thread_t is a pointer to a structure in memory.
+   Why not the thread handle?  If it were the thread handle, it would be hard
+   to implement gl_thread_self() (since GetCurrentThread () returns a pseudo-
+   handle, DuplicateHandle (GetCurrentThread ()) returns a handle that must be
+   closed afterwards, and there is no function for quickly retrieving a thread
+   handle from its id).
+   Why not the thread id?  I tried it.  It did not work: Sometimes ids appeared
+   that did not belong to running threads, and glthread_join failed with ESRCH.
+ */
+typedef struct gl_thread_struct *gl_thread_t;
+# define glthread_create(THREADP, FUNC, ARG) \
+    glthread_create_func (THREADP, FUNC, ARG)
+# define glthread_sigmask(HOW, SET, OSET) \
+    /* unsupported */ 0
+# define glthread_join(THREAD, RETVALP) \
+    glthread_join_func (THREAD, RETVALP)
+# define gl_thread_self() \
+    gl_thread_self_func ()
+# define gl_thread_exit(RETVAL) \
+    gl_thread_exit_func (RETVAL)
+# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
+extern int glthread_create_func (gl_thread_t *threadp, void * (*func) (void *), void *arg);
+extern int glthread_join_func (gl_thread_t thread, void **retvalp);
+extern gl_thread_t gl_thread_self_func (void);
+extern int gl_thread_exit_func (void *retval);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS)
+
+/* Provide dummy implementation if threads are not supported.  */
+
+typedef int gl_thread_t;
+# define glthread_create(THREADP, FUNC, ARG) ENOSYS
+# define glthread_sigmask(HOW, SET, OSET) 0
+# define glthread_join(THREAD, RETVALP) 0
+# define gl_thread_self() NULL
+# define gl_thread_exit(RETVAL) 0
+# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
+
+#endif
+
+/* ========================================================================= */
+
+/* Macros with built-in error handling.  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static inline gl_thread_t
+gl_thread_create (void *(*func) (void *arg), void *arg)
+{
+  gl_thread_t thread;
+  int ret;
+
+  ret = glthread_create (&thread, func, arg);
+  if (ret != 0)
+    abort ();
+  return thread;
+}
+#define gl_thread_sigmask(HOW, SET, OSET)     \
+   do                                         \
+     {                                        \
+       if (glthread_sigmask (HOW, SET, OSET)) \
+         abort ();                            \
+     }                                        \
+   while (0)
+#define gl_thread_join(THREAD, RETVAL)     \
+   do                                      \
+     {                                     \
+       if (glthread_join (THREAD, RETVAL)) \
+         abort ();                         \
+     }                                     \
+   while (0)
+#define gl_thread_atfork(PREPARE, PARENT, CHILD)     \
+   do                                                \
+     {                                               \
+       if (glthread_atfork (PREPARE, PARENT, CHILD)) \
+         abort ();                                   \
+     }                                               \
+   while (0)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GLTHREAD_THREAD_H */
diff --git a/tests/glthread/threadlib.c b/tests/glthread/threadlib.c
new file mode 100644 (file)
index 0000000..646defa
--- /dev/null
@@ -0,0 +1,74 @@
+/* Multithreading primitives.
+   Copyright (C) 2005-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.  */
+
+#include <config.h>
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS
+
+/* Use the POSIX threads library.  */
+
+# include <pthread.h>
+# include <stdlib.h>
+
+# if PTHREAD_IN_USE_DETECTION_HARD
+
+/* The function to be executed by a dummy thread.  */
+static void *
+dummy_thread_func (void *arg)
+{
+  return arg;
+}
+
+int
+glthread_in_use (void)
+{
+  static int tested;
+  static int result; /* 1: linked with -lpthread, 0: only with libc */
+
+  if (!tested)
+    {
+      pthread_t thread;
+
+      if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0)
+        /* Thread creation failed.  */
+        result = 0;
+      else
+        {
+          /* Thread creation works.  */
+          void *retval;
+          if (pthread_join (thread, &retval) != 0)
+            abort ();
+          result = 1;
+        }
+      tested = 1;
+    }
+  return result;
+}
+
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int dummy;
diff --git a/tests/glthread/yield.h b/tests/glthread/yield.h
new file mode 100644 (file)
index 0000000..4eb1cb8
--- /dev/null
@@ -0,0 +1,121 @@
+/* Yielding the processor to other threads and processes.
+   Copyright (C) 2005-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* This file contains a primitive for yielding the processor to other threads.
+     extern void gl_thread_yield (void);
+ */
+
+#ifndef _GLTHREAD_YIELD_H
+#define _GLTHREAD_YIELD_H
+
+#include <errno.h>
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS
+
+/* Use the POSIX threads library.  */
+
+# include <sched.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# define gl_thread_yield() \
+    sched_yield ()
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_PTH_THREADS
+
+/* Use the GNU Pth threads library.  */
+
+# include <pth.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# define gl_thread_yield() \
+    pth_yield (NULL)
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_SOLARIS_THREADS
+
+/* Use the old Solaris threads library.  */
+
+# include <thread.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# define gl_thread_yield() \
+    thr_yield ()
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_WIN32_THREADS
+
+# include <windows.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# define gl_thread_yield() \
+    Sleep (0)
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS)
+
+/* Provide dummy implementation if threads are not supported.  */
+
+# define gl_thread_yield() 0
+
+#endif
+
+/* ========================================================================= */
+
+#endif /* _GLTHREAD_YIELD_H */
diff --git a/tests/ignore-value.h b/tests/ignore-value.h
new file mode 100644 (file)
index 0000000..f021a1a
--- /dev/null
@@ -0,0 +1,62 @@
+/* ignore a function return without a compiler warning
+
+   Copyright (C) 2008-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 Jim Meyering, Eric Blake and Pádraig Brady.  */
+
+/* Use "ignore_value" to avoid a warning when using a function declared with
+   gcc's warn_unused_result attribute, but for which you really do want to
+   ignore the result.  Traditionally, people have used a "(void)" cast to
+   indicate that a function's return value is deliberately unused.  However,
+   if the function is declared with __attribute__((warn_unused_result)),
+   gcc issues a warning even with the cast.
+
+   Caution: most of the time, you really should heed gcc's warning, and
+   check the return value.  However, in those exceptional cases in which
+   you're sure you know what you're doing, use this function.
+
+   For the record, here's one of the ignorable warnings:
+   "copy.c:233: warning: ignoring return value of 'fchown',
+   declared with attribute warn_unused_result".  */
+
+#ifndef _GL_IGNORE_VALUE_H
+# define _GL_IGNORE_VALUE_H
+
+# ifndef _GL_ATTRIBUTE_DEPRECATED
+/* The __attribute__((__deprecated__)) feature
+   is available in gcc versions 3.1 and newer.  */
+#  if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1)
+#   define _GL_ATTRIBUTE_DEPRECATED /* empty */
+#  else
+#   define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+#  endif
+# endif
+
+/* The __attribute__((__warn_unused_result__)) feature
+   is available in gcc versions 3.4 and newer,
+   while the typeof feature has been available since 2.7 at least.  */
+# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
+#  define ignore_value(x) ((void) (x))
+# else
+#  define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; }))
+# endif
+
+/* ignore_value works for scalars, pointers and aggregates;
+   deprecate ignore_ptr.  */
+static inline void _GL_ATTRIBUTE_DEPRECATED
+ignore_ptr (void *p) { (void) p; } /* deprecated: use ignore_value */
+
+#endif
diff --git a/tests/imaxtostr.c b/tests/imaxtostr.c
new file mode 100644 (file)
index 0000000..b91ac98
--- /dev/null
@@ -0,0 +1,3 @@
+#define anytostr imaxtostr
+#define inttype intmax_t
+#include "anytostr.c"
diff --git a/tests/init.sh b/tests/init.sh
new file mode 100644 (file)
index 0000000..71c6516
--- /dev/null
@@ -0,0 +1,474 @@
+# source this file; set up for tests
+
+# Copyright (C) 2009-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/>.
+
+# Using this file in a test
+# =========================
+#
+# The typical skeleton of a test looks like this:
+#
+#   #!/bin/sh
+#   . "${srcdir=.}/init.sh"; path_prepend_ .
+#   Execute some commands.
+#   Note that these commands are executed in a subdirectory, therefore you
+#   need to prepend "../" to relative filenames in the build directory.
+#   Note that the "path_prepend_ ." is useful only if the body of your
+#   test invokes programs residing in the initial directory.
+#   For example, if the programs you want to test are in src/, and this test
+#   script is named tests/test-1, then you would use "path_prepend_ ../src",
+#   or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH"
+#   to all tests via automake's TESTS_ENVIRONMENT.
+#   Set the exit code 0 for success, 77 for skipped, or 1 or other for failure.
+#   Use the skip_ and fail_ functions to print a diagnostic and then exit
+#   with the corresponding exit code.
+#   Exit $?
+
+# Executing a test that uses this file
+# ====================================
+#
+# Running a single test:
+#   $ make check TESTS=test-foo.sh
+#
+# Running a single test, with verbose output:
+#   $ make check TESTS=test-foo.sh VERBOSE=yes
+#
+# Running a single test, with single-stepping:
+#   1. Go into a sub-shell:
+#   $ bash
+#   2. Set relevant environment variables from TESTS_ENVIRONMENT in the
+#      Makefile:
+#   $ export srcdir=../../tests # this is an example
+#   3. Execute the commands from the test, copy&pasting them one by one:
+#   $ . "$srcdir/init.sh"; path_prepend_ .
+#   ...
+#   4. Finally
+#   $ exit
+
+ME_=`expr "./$0" : '.*/\(.*\)$'`
+
+# We use a trap below for cleanup.  This requires us to go through
+# hoops to get the right exit status transported through the handler.
+# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function.
+Exit () { set +e; (exit $1); exit $1; }
+
+# Print warnings (e.g., about skipped and failed tests) to this file number.
+# Override by defining to say, 9, in init.cfg, and putting say,
+# "export ...ENVVAR_SETTINGS...; exec 9>&2; $(SHELL)" in the definition
+# of TESTS_ENVIRONMENT in your tests/Makefile.am file.
+# This is useful when using automake's parallel tests mode, to print
+# the reason for skip/failure to console, rather than to the .log files.
+: ${stderr_fileno_=2}
+
+warn_ () { echo "$@" 1>&$stderr_fileno_; }
+fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; }
+skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
+framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
+
+# Sanitize this shell to POSIX mode, if possible.
+DUALCASE=1; export DUALCASE
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+    *posix*) set -o posix ;;
+  esac
+fi
+
+# We require $(...) support unconditionally.
+# We require a few additional shell features only when $EXEEXT is nonempty,
+# in order to support automatic $EXEEXT emulation:
+# - hyphen-containing alias names
+# - we prefer to use ${var#...} substitution, rather than having
+#   to work around lack of support for that feature.
+# The following code attempts to find a shell with support for these features.
+# If the current shell passes the test, we're done.  Otherwise, test other
+# shells until we find one that passes.  If one is found, re-exec it.
+# If no acceptable shell is found, skip the current test.
+#
+# The "...set -x; P=1 true 2>err..." test is to disqualify any shell that
+# emits "P=1" into err, as /bin/sh from SunOS 5.11 and OpenBSD 4.7 do.
+#
+# Use "9" to indicate success (rather than 0), in case some shell acts
+# like Solaris 10's /bin/sh but exits successfully instead of with status 2.
+
+# Eval this code in a subshell to determine a shell's suitability.
+# 10 - passes all tests; ok to use
+#  9 - ok, but enabling "set -x" corrupts app stderr; prefer higher score
+#  ? - not ok
+gl_shell_test_script_='
+test $(echo y) = y || exit 1
+score_=10
+if test "$VERBOSE" = yes; then
+  test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9
+fi
+test -z "$EXEEXT" && exit $score_
+shopt -s expand_aliases
+alias a-b="echo zoo"
+v=abx
+     test ${v%x} = ab \
+  && test ${v#a} = bx \
+  && test $(a-b) = zoo \
+  && exit $score_
+'
+
+if test "x$1" = "x--no-reexec"; then
+  shift
+else
+  # Assume a working shell.  Export to subshells (setup_ needs this).
+  gl_set_x_corrupts_stderr_=false
+  export gl_set_x_corrupts_stderr_
+
+  # Record the first marginally acceptable shell.
+  marginal_=
+
+  # Search for a shell that meets our requirements.
+  for re_shell_ in __current__ "${CONFIG_SHELL:-no_shell}" \
+      /bin/sh bash dash zsh pdksh fail
+  do
+    test "$re_shell_" = no_shell && continue
+
+    # If we've made it all the way to the sentinel, "fail" without
+    # finding even a marginal shell, skip this test.
+    if test "$re_shell_" = fail; then
+      test -z "$marginal_" && skip_ failed to find an adequate shell
+      re_shell_=$marginal_
+      break
+    fi
+
+    # When testing the current shell, simply "eval" the test code.
+    # Otherwise, run it via $re_shell_ -c ...
+    if test "$re_shell_" = __current__; then
+      # 'eval'ing this code makes Solaris 10's /bin/sh exit with
+      # $? set to 2.  It does not evaluate any of the code after the
+      # "unexpected" first `('.  Thus, we must run it in a subshell.
+      ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
+    else
+      "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
+    fi
+
+    st_=$?
+
+    # $re_shell_ works just fine.  Use it.
+    test $st_ = 10 && break
+
+    # If this is our first marginally acceptable shell, remember it.
+    if test "$st_:$marginal_" = 9: ; then
+      marginal_="$re_shell_"
+      gl_set_x_corrupts_stderr_=true
+    fi
+  done
+
+  if test "$re_shell_" != __current__; then
+    # Found a usable shell.  Preserve -v and -x.
+    case $- in
+      *v*x* | *x*v*) opts_=-vx ;;
+      *v*) opts_=-v ;;
+      *x*) opts_=-x ;;
+      *) opts_= ;;
+    esac
+    exec "$re_shell_" $opts_ "$0" --no-reexec "$@"
+    echo "$ME_: exec failed" 1>&2
+    exit 127
+  fi
+fi
+
+test -n "$EXEEXT" && shopt -s expand_aliases
+
+# Enable glibc's malloc-perturbing option.
+# This is useful for exposing code that depends on the fact that
+# malloc-related functions often return memory that is mostly zeroed.
+# If you have the time and cycles, use valgrind to do an even better job.
+: ${MALLOC_PERTURB_=87}
+export MALLOC_PERTURB_
+
+# This is a stub function that is run upon trap (upon regular exit and
+# interrupt).  Override it with a per-test function, e.g., to unmount
+# a partition, or to undo any other global state changes.
+cleanup_ () { :; }
+
+if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
+  compare () { diff -u "$@"; }
+elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
+  compare () { cmp -s "$@"; }
+else
+  compare () { cmp "$@"; }
+fi
+
+# An arbitrary prefix to help distinguish test directories.
+testdir_prefix_ () { printf gt; }
+
+# Run the user-overridable cleanup_ function, remove the temporary
+# directory and exit with the incoming value of $?.
+remove_tmp_ ()
+{
+  __st=$?
+  cleanup_
+  # cd out of the directory we're about to remove
+  cd "$initial_cwd_" || cd / || cd /tmp
+  chmod -R u+rwx "$test_dir_"
+  # If removal fails and exit status was to be 0, then change it to 1.
+  rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
+  exit $__st
+}
+
+# Given a directory name, DIR, if every entry in it that matches *.exe
+# contains only the specified bytes (see the case stmt below), then print
+# a space-separated list of those names and return 0.  Otherwise, don't
+# print anything and return 1.  Naming constraints apply also to DIR.
+find_exe_basenames_ ()
+{
+  feb_dir_=$1
+  feb_fail_=0
+  feb_result_=
+  feb_sp_=
+  for feb_file_ in $feb_dir_/*.exe; do
+    # If there was no *.exe file, or there existed a file named "*.exe" that
+    # was deleted between the above glob expansion and the existence test
+    # below, just skip it.
+    test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_" \
+      && continue
+    # Exempt [.exe, since we can't create a function by that name, yet
+    # we can't invoke [ by PATH search anyways due to shell builtins.
+    test "x$feb_file_" = "x$feb_dir_/[.exe" && continue
+    case $feb_file_ in
+      *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;;
+      *) # Remove leading file name components as well as the .exe suffix.
+         feb_file_=${feb_file_##*/}
+         feb_file_=${feb_file_%.exe}
+         feb_result_="$feb_result_$feb_sp_$feb_file_";;
+    esac
+    feb_sp_=' '
+  done
+  test $feb_fail_ = 0 && printf %s "$feb_result_"
+  return $feb_fail_
+}
+
+# Consider the files in directory, $1.
+# For each file name of the form PROG.exe, create an alias named
+# PROG that simply invokes PROG.exe, then return 0.  If any selected
+# file name or the directory name, $1, contains an unexpected character,
+# define no alias and return 1.
+create_exe_shims_ ()
+{
+  case $EXEEXT in
+    '') return 0 ;;
+    .exe) ;;
+    *) echo "$0: unexpected \$EXEEXT value: $EXEEXT" 1>&2; return 1 ;;
+  esac
+
+  base_names_=`find_exe_basenames_ $1` \
+    || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 0; }
+
+  if test -n "$base_names_"; then
+    for base_ in $base_names_; do
+      alias "$base_"="$base_$EXEEXT"
+    done
+  fi
+
+  return 0
+}
+
+# Use this function to prepend to PATH an absolute name for each
+# specified, possibly-$initial_cwd_-relative, directory.
+path_prepend_ ()
+{
+  while test $# != 0; do
+    path_dir_=$1
+    case $path_dir_ in
+      '') fail_ "invalid path dir: '$1'";;
+      /*) abs_path_dir_=$path_dir_;;
+      *) abs_path_dir_=`cd "$initial_cwd_/$path_dir_" && echo "$PWD"` \
+           || fail_ "invalid path dir: $path_dir_";;
+    esac
+    case $abs_path_dir_ in
+      *:*) fail_ "invalid path dir: '$abs_path_dir_'";;
+    esac
+    PATH="$abs_path_dir_:$PATH"
+
+    # Create an alias, FOO, for each FOO.exe in this directory.
+    create_exe_shims_ "$abs_path_dir_" \
+      || fail_ "something failed (above): $abs_path_dir_"
+    shift
+  done
+  export PATH
+}
+
+setup_ ()
+{
+  if test "$VERBOSE" = yes; then
+    # Test whether set -x may cause the selected shell to corrupt an
+    # application's stderr.  Many do, including zsh-4.3.10 and the /bin/sh
+    # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5.
+    # If enabling verbose output this way would cause trouble, simply
+    # issue a warning and refrain.
+    if $gl_set_x_corrupts_stderr_; then
+      warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
+    else
+      set -x
+    fi
+  fi
+
+  initial_cwd_=$PWD
+  fail=0
+
+  pfx_=`testdir_prefix_`
+  test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
+    || fail_ "failed to create temporary directory in $initial_cwd_"
+  cd "$test_dir_"
+
+  # As autoconf-generated configure scripts do, ensure that IFS
+  # is defined initially, so that saving and restoring $IFS works.
+  gl_init_sh_nl_='
+'
+  IFS=" ""     $gl_init_sh_nl_"
+
+  # This trap statement, along with a trap on 0 below, ensure that the
+  # temporary directory, $test_dir_, is removed upon exit as well as
+  # upon receipt of any of the listed signals.
+  for sig_ in 1 2 3 13 15; do
+    eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
+  done
+}
+
+# Create a temporary directory, much like mktemp -d does.
+# Written by Jim Meyering.
+#
+# Usage: mktempd_ /tmp phoey.XXXXXXXXXX
+#
+# First, try to use the mktemp program.
+# Failing that, we'll roll our own mktemp-like function:
+#  - try to get random bytes from /dev/urandom
+#  - failing that, generate output from a combination of quickly-varying
+#      sources and gzip.  Ignore non-varying gzip header, and extract
+#      "random" bits from there.
+#  - given those bits, map to file-name bytes using tr, and try to create
+#      the desired directory.
+#  - make only $MAX_TRIES_ attempts
+
+# Helper function.  Print $N pseudo-random bytes from a-zA-Z0-9.
+rand_bytes_ ()
+{
+  n_=$1
+
+  # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
+  # But if they have openssl, they probably have mktemp, too.
+
+  chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+  dev_rand_=/dev/urandom
+  if test -r "$dev_rand_"; then
+    # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
+    dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
+      | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+    return
+  fi
+
+  n_plus_50_=`expr $n_ + 50`
+  cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
+  data_=` (eval "$cmds_") 2>&1 | gzip `
+
+  # Ensure that $data_ has length at least 50+$n_
+  while :; do
+    len_=`echo "$data_"|wc -c`
+    test $n_plus_50_ -le $len_ && break;
+    data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
+  done
+
+  echo "$data_" \
+    | dd bs=1 skip=50 count=$n_ 2>/dev/null \
+    | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+}
+
+mktempd_ ()
+{
+  case $# in
+  2);;
+  *) fail_ "Usage: $ME DIR TEMPLATE";;
+  esac
+
+  destdir_=$1
+  template_=$2
+
+  MAX_TRIES_=4
+
+  # Disallow any trailing slash on specified destdir:
+  # it would subvert the post-mktemp "case"-based destdir test.
+  case $destdir_ in
+  /) ;;
+  */) fail_ "invalid destination dir: remove trailing slash(es)";;
+  esac
+
+  case $template_ in
+  *XXXX) ;;
+  *) fail_ \
+       "invalid template: $template_ (must have a suffix of at least 4 X's)";;
+  esac
+
+  # First, try to use mktemp.
+  d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
+    || fail=1
+
+  # The resulting name must be in the specified directory.
+  case $d in "$destdir_"*);; *) fail=1;; esac
+
+  # It must have created the directory.
+  test -d "$d" || fail=1
+
+  # It must have 0700 permissions.  Handle sticky "S" bits.
+  perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1
+  case $perms in drwx------*) ;; *) fail=1;; esac
+
+  test $fail = 0 && {
+    echo "$d"
+    return
+  }
+
+  # If we reach this point, we'll have to create a directory manually.
+
+  # Get a copy of the template without its suffix of X's.
+  base_template_=`echo "$template_"|sed 's/XX*$//'`
+
+  # Calculate how many X's we've just removed.
+  template_length_=`echo "$template_" | wc -c`
+  nx_=`echo "$base_template_" | wc -c`
+  nx_=`expr $template_length_ - $nx_`
+
+  err_=
+  i_=1
+  while :; do
+    X_=`rand_bytes_ $nx_`
+    candidate_dir_="$destdir_/$base_template_$X_"
+    err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
+      && { echo "$candidate_dir_"; return; }
+    test $MAX_TRIES_ -le $i_ && break;
+    i_=`expr $i_ + 1`
+  done
+  fail_ "$err_"
+}
+
+# If you want to override the testdir_prefix_ function,
+# or to add more utility functions, use this file.
+test -f "$srcdir/init.cfg" \
+  && . "$srcdir/init.cfg"
+
+setup_ "$@"
+# This trap is here, rather than in the setup_ function, because some
+# shells run the exit trap at shell function exit, rather than script exit.
+trap remove_tmp_ 0
diff --git a/tests/inttostr.c b/tests/inttostr.c
new file mode 100644 (file)
index 0000000..c96b5ca
--- /dev/null
@@ -0,0 +1,3 @@
+#define anytostr inttostr
+#define inttype int
+#include "anytostr.c"
diff --git a/tests/inttostr.h b/tests/inttostr.h
new file mode 100644 (file)
index 0000000..1825f56
--- /dev/null
@@ -0,0 +1,46 @@
+/* inttostr.h -- convert integers to printable strings
+
+   Copyright (C) 2001-2006, 2009-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 Paul Eggert */
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "intprops.h"
+
+#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
+
+char *imaxtostr (intmax_t, char *) __attribute_warn_unused_result__;
+char *inttostr (int, char *) __attribute_warn_unused_result__;
+char *offtostr (off_t, char *) __attribute_warn_unused_result__;
+char *uinttostr (unsigned int, char *) __attribute_warn_unused_result__;
+char *umaxtostr (uintmax_t, char *) __attribute_warn_unused_result__;
diff --git a/tests/localename.c b/tests/localename.c
new file mode 100644 (file)
index 0000000..a5bfea7
--- /dev/null
@@ -0,0 +1,2959 @@
+/* Determine name of the currently selected locale.
+   Copyright (C) 1995-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, 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, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+   USA.  */
+
+/* Written by Ulrich Drepper <drepper@gnu.org>, 1995.  */
+/* Win32 code written by Tor Lillqvist <tml@iki.fi>.  */
+/* MacOS X code written by Bruno Haible <bruno@clisp.org>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#ifdef IN_LIBINTL
+# include "gettextP.h"
+#else
+# include "localename.h"
+#endif
+
+#include <limits.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <locale.h>
+#include <string.h>
+
+#if HAVE_USELOCALE
+/* MacOS X 10.5 defines the locale_t type in <xlocale.h>.  */
+# if defined __APPLE__ && defined __MACH__
+#  include <xlocale.h>
+# endif
+# include <langinfo.h>
+# if !defined IN_LIBINTL
+#  include "glthread/lock.h"
+# endif
+#endif
+
+#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+# include <CoreFoundation/CFString.h>
+# if HAVE_CFLOCALECOPYCURRENT
+#  include <CoreFoundation/CFLocale.h>
+# elif HAVE_CFPREFERENCESCOPYAPPVALUE
+#  include <CoreFoundation/CFPreferences.h>
+# endif
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# define WIN32_NATIVE
+#endif
+
+#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+/* List of language codes, sorted by value:
+   0x01 LANG_ARABIC
+   0x02 LANG_BULGARIAN
+   0x03 LANG_CATALAN
+   0x04 LANG_CHINESE
+   0x05 LANG_CZECH
+   0x06 LANG_DANISH
+   0x07 LANG_GERMAN
+   0x08 LANG_GREEK
+   0x09 LANG_ENGLISH
+   0x0a LANG_SPANISH
+   0x0b LANG_FINNISH
+   0x0c LANG_FRENCH
+   0x0d LANG_HEBREW
+   0x0e LANG_HUNGARIAN
+   0x0f LANG_ICELANDIC
+   0x10 LANG_ITALIAN
+   0x11 LANG_JAPANESE
+   0x12 LANG_KOREAN
+   0x13 LANG_DUTCH
+   0x14 LANG_NORWEGIAN
+   0x15 LANG_POLISH
+   0x16 LANG_PORTUGUESE
+   0x17 LANG_ROMANSH
+   0x18 LANG_ROMANIAN
+   0x19 LANG_RUSSIAN
+   0x1a LANG_CROATIAN == LANG_SERBIAN
+   0x1b LANG_SLOVAK
+   0x1c LANG_ALBANIAN
+   0x1d LANG_SWEDISH
+   0x1e LANG_THAI
+   0x1f LANG_TURKISH
+   0x20 LANG_URDU
+   0x21 LANG_INDONESIAN
+   0x22 LANG_UKRAINIAN
+   0x23 LANG_BELARUSIAN
+   0x24 LANG_SLOVENIAN
+   0x25 LANG_ESTONIAN
+   0x26 LANG_LATVIAN
+   0x27 LANG_LITHUANIAN
+   0x28 LANG_TAJIK
+   0x29 LANG_FARSI
+   0x2a LANG_VIETNAMESE
+   0x2b LANG_ARMENIAN
+   0x2c LANG_AZERI
+   0x2d LANG_BASQUE
+   0x2e LANG_SORBIAN
+   0x2f LANG_MACEDONIAN
+   0x30 LANG_SUTU
+   0x31 LANG_TSONGA
+   0x32 LANG_TSWANA
+   0x33 LANG_VENDA
+   0x34 LANG_XHOSA
+   0x35 LANG_ZULU
+   0x36 LANG_AFRIKAANS
+   0x37 LANG_GEORGIAN
+   0x38 LANG_FAEROESE
+   0x39 LANG_HINDI
+   0x3a LANG_MALTESE
+   0x3b LANG_SAMI
+   0x3c LANG_GAELIC
+   0x3d LANG_YIDDISH
+   0x3e LANG_MALAY
+   0x3f LANG_KAZAK
+   0x40 LANG_KYRGYZ
+   0x41 LANG_SWAHILI
+   0x42 LANG_TURKMEN
+   0x43 LANG_UZBEK
+   0x44 LANG_TATAR
+   0x45 LANG_BENGALI
+   0x46 LANG_PUNJABI
+   0x47 LANG_GUJARATI
+   0x48 LANG_ORIYA
+   0x49 LANG_TAMIL
+   0x4a LANG_TELUGU
+   0x4b LANG_KANNADA
+   0x4c LANG_MALAYALAM
+   0x4d LANG_ASSAMESE
+   0x4e LANG_MARATHI
+   0x4f LANG_SANSKRIT
+   0x50 LANG_MONGOLIAN
+   0x51 LANG_TIBETAN
+   0x52 LANG_WELSH
+   0x53 LANG_CAMBODIAN
+   0x54 LANG_LAO
+   0x55 LANG_BURMESE
+   0x56 LANG_GALICIAN
+   0x57 LANG_KONKANI
+   0x58 LANG_MANIPURI
+   0x59 LANG_SINDHI
+   0x5a LANG_SYRIAC
+   0x5b LANG_SINHALESE
+   0x5c LANG_CHEROKEE
+   0x5d LANG_INUKTITUT
+   0x5e LANG_AMHARIC
+   0x5f LANG_TAMAZIGHT
+   0x60 LANG_KASHMIRI
+   0x61 LANG_NEPALI
+   0x62 LANG_FRISIAN
+   0x63 LANG_PASHTO
+   0x64 LANG_TAGALOG
+   0x65 LANG_DIVEHI
+   0x66 LANG_EDO
+   0x67 LANG_FULFULDE
+   0x68 LANG_HAUSA
+   0x69 LANG_IBIBIO
+   0x6a LANG_YORUBA
+   0x6d LANG_BASHKIR
+   0x6e LANG_LUXEMBOURGISH
+   0x6f LANG_GREENLANDIC
+   0x70 LANG_IGBO
+   0x71 LANG_KANURI
+   0x72 LANG_OROMO
+   0x73 LANG_TIGRINYA
+   0x74 LANG_GUARANI
+   0x75 LANG_HAWAIIAN
+   0x76 LANG_LATIN
+   0x77 LANG_SOMALI
+   0x78 LANG_YI
+   0x79 LANG_PAPIAMENTU
+   0x7a LANG_MAPUDUNGUN
+   0x7c LANG_MOHAWK
+   0x7e LANG_BRETON
+   0x82 LANG_OCCITAN
+   0x83 LANG_CORSICAN
+   0x84 LANG_ALSATIAN
+   0x85 LANG_YAKUT
+   0x86 LANG_KICHE
+   0x87 LANG_KINYARWANDA
+   0x88 LANG_WOLOF
+   0x8c LANG_DARI
+   0x91 LANG_SCOTTISH_GAELIC
+*/
+/* Mingw headers don't have latest language and sublanguage codes.  */
+# ifndef LANG_AFRIKAANS
+# define LANG_AFRIKAANS 0x36
+# endif
+# ifndef LANG_ALBANIAN
+# define LANG_ALBANIAN 0x1c
+# endif
+# ifndef LANG_ALSATIAN
+# define LANG_ALSATIAN 0x84
+# endif
+# ifndef LANG_AMHARIC
+# define LANG_AMHARIC 0x5e
+# endif
+# ifndef LANG_ARABIC
+# define LANG_ARABIC 0x01
+# endif
+# ifndef LANG_ARMENIAN
+# define LANG_ARMENIAN 0x2b
+# endif
+# ifndef LANG_ASSAMESE
+# define LANG_ASSAMESE 0x4d
+# endif
+# ifndef LANG_AZERI
+# define LANG_AZERI 0x2c
+# endif
+# ifndef LANG_BASHKIR
+# define LANG_BASHKIR 0x6d
+# endif
+# ifndef LANG_BASQUE
+# define LANG_BASQUE 0x2d
+# endif
+# ifndef LANG_BELARUSIAN
+# define LANG_BELARUSIAN 0x23
+# endif
+# ifndef LANG_BENGALI
+# define LANG_BENGALI 0x45
+# endif
+# ifndef LANG_BRETON
+# define LANG_BRETON 0x7e
+# endif
+# ifndef LANG_BURMESE
+# define LANG_BURMESE 0x55
+# endif
+# ifndef LANG_CAMBODIAN
+# define LANG_CAMBODIAN 0x53
+# endif
+# ifndef LANG_CATALAN
+# define LANG_CATALAN 0x03
+# endif
+# ifndef LANG_CHEROKEE
+# define LANG_CHEROKEE 0x5c
+# endif
+# ifndef LANG_CORSICAN
+# define LANG_CORSICAN 0x83
+# endif
+# ifndef LANG_DARI
+# define LANG_DARI 0x8c
+# endif
+# ifndef LANG_DIVEHI
+# define LANG_DIVEHI 0x65
+# endif
+# ifndef LANG_EDO
+# define LANG_EDO 0x66
+# endif
+# ifndef LANG_ESTONIAN
+# define LANG_ESTONIAN 0x25
+# endif
+# ifndef LANG_FAEROESE
+# define LANG_FAEROESE 0x38
+# endif
+# ifndef LANG_FARSI
+# define LANG_FARSI 0x29
+# endif
+# ifndef LANG_FRISIAN
+# define LANG_FRISIAN 0x62
+# endif
+# ifndef LANG_FULFULDE
+# define LANG_FULFULDE 0x67
+# endif
+# ifndef LANG_GAELIC
+# define LANG_GAELIC 0x3c
+# endif
+# ifndef LANG_GALICIAN
+# define LANG_GALICIAN 0x56
+# endif
+# ifndef LANG_GEORGIAN
+# define LANG_GEORGIAN 0x37
+# endif
+# ifndef LANG_GREENLANDIC
+# define LANG_GREENLANDIC 0x6f
+# endif
+# ifndef LANG_GUARANI
+# define LANG_GUARANI 0x74
+# endif
+# ifndef LANG_GUJARATI
+# define LANG_GUJARATI 0x47
+# endif
+# ifndef LANG_HAUSA
+# define LANG_HAUSA 0x68
+# endif
+# ifndef LANG_HAWAIIAN
+# define LANG_HAWAIIAN 0x75
+# endif
+# ifndef LANG_HEBREW
+# define LANG_HEBREW 0x0d
+# endif
+# ifndef LANG_HINDI
+# define LANG_HINDI 0x39
+# endif
+# ifndef LANG_IBIBIO
+# define LANG_IBIBIO 0x69
+# endif
+# ifndef LANG_IGBO
+# define LANG_IGBO 0x70
+# endif
+# ifndef LANG_INDONESIAN
+# define LANG_INDONESIAN 0x21
+# endif
+# ifndef LANG_INUKTITUT
+# define LANG_INUKTITUT 0x5d
+# endif
+# ifndef LANG_KANNADA
+# define LANG_KANNADA 0x4b
+# endif
+# ifndef LANG_KANURI
+# define LANG_KANURI 0x71
+# endif
+# ifndef LANG_KASHMIRI
+# define LANG_KASHMIRI 0x60
+# endif
+# ifndef LANG_KAZAK
+# define LANG_KAZAK 0x3f
+# endif
+# ifndef LANG_KICHE
+# define LANG_KICHE 0x86
+# endif
+# ifndef LANG_KINYARWANDA
+# define LANG_KINYARWANDA 0x87
+# endif
+# ifndef LANG_KONKANI
+# define LANG_KONKANI 0x57
+# endif
+# ifndef LANG_KYRGYZ
+# define LANG_KYRGYZ 0x40
+# endif
+# ifndef LANG_LAO
+# define LANG_LAO 0x54
+# endif
+# ifndef LANG_LATIN
+# define LANG_LATIN 0x76
+# endif
+# ifndef LANG_LATVIAN
+# define LANG_LATVIAN 0x26
+# endif
+# ifndef LANG_LITHUANIAN
+# define LANG_LITHUANIAN 0x27
+# endif
+# ifndef LANG_LUXEMBOURGISH
+# define LANG_LUXEMBOURGISH 0x6e
+# endif
+# ifndef LANG_MACEDONIAN
+# define LANG_MACEDONIAN 0x2f
+# endif
+# ifndef LANG_MALAY
+# define LANG_MALAY 0x3e
+# endif
+# ifndef LANG_MALAYALAM
+# define LANG_MALAYALAM 0x4c
+# endif
+# ifndef LANG_MALTESE
+# define LANG_MALTESE 0x3a
+# endif
+# ifndef LANG_MANIPURI
+# define LANG_MANIPURI 0x58
+# endif
+# ifndef LANG_MAORI
+# define LANG_MAORI 0x81
+# endif
+# ifndef LANG_MAPUDUNGUN
+# define LANG_MAPUDUNGUN 0x7a
+# endif
+# ifndef LANG_MARATHI
+# define LANG_MARATHI 0x4e
+# endif
+# ifndef LANG_MOHAWK
+# define LANG_MOHAWK 0x7c
+# endif
+# ifndef LANG_MONGOLIAN
+# define LANG_MONGOLIAN 0x50
+# endif
+# ifndef LANG_NEPALI
+# define LANG_NEPALI 0x61
+# endif
+# ifndef LANG_OCCITAN
+# define LANG_OCCITAN 0x82
+# endif
+# ifndef LANG_ORIYA
+# define LANG_ORIYA 0x48
+# endif
+# ifndef LANG_OROMO
+# define LANG_OROMO 0x72
+# endif
+# ifndef LANG_PAPIAMENTU
+# define LANG_PAPIAMENTU 0x79
+# endif
+# ifndef LANG_PASHTO
+# define LANG_PASHTO 0x63
+# endif
+# ifndef LANG_PUNJABI
+# define LANG_PUNJABI 0x46
+# endif
+# ifndef LANG_QUECHUA
+# define LANG_QUECHUA 0x6b
+# endif
+# ifndef LANG_ROMANSH
+# define LANG_ROMANSH 0x17
+# endif
+# ifndef LANG_SAMI
+# define LANG_SAMI 0x3b
+# endif
+# ifndef LANG_SANSKRIT
+# define LANG_SANSKRIT 0x4f
+# endif
+# ifndef LANG_SCOTTISH_GAELIC
+# define LANG_SCOTTISH_GAELIC 0x91
+# endif
+# ifndef LANG_SERBIAN
+# define LANG_SERBIAN 0x1a
+# endif
+# ifndef LANG_SINDHI
+# define LANG_SINDHI 0x59
+# endif
+# ifndef LANG_SINHALESE
+# define LANG_SINHALESE 0x5b
+# endif
+# ifndef LANG_SLOVAK
+# define LANG_SLOVAK 0x1b
+# endif
+# ifndef LANG_SOMALI
+# define LANG_SOMALI 0x77
+# endif
+# ifndef LANG_SORBIAN
+# define LANG_SORBIAN 0x2e
+# endif
+# ifndef LANG_SOTHO
+# define LANG_SOTHO 0x6c
+# endif
+# ifndef LANG_SUTU
+# define LANG_SUTU 0x30
+# endif
+# ifndef LANG_SWAHILI
+# define LANG_SWAHILI 0x41
+# endif
+# ifndef LANG_SYRIAC
+# define LANG_SYRIAC 0x5a
+# endif
+# ifndef LANG_TAGALOG
+# define LANG_TAGALOG 0x64
+# endif
+# ifndef LANG_TAJIK
+# define LANG_TAJIK 0x28
+# endif
+# ifndef LANG_TAMAZIGHT
+# define LANG_TAMAZIGHT 0x5f
+# endif
+# ifndef LANG_TAMIL
+# define LANG_TAMIL 0x49
+# endif
+# ifndef LANG_TATAR
+# define LANG_TATAR 0x44
+# endif
+# ifndef LANG_TELUGU
+# define LANG_TELUGU 0x4a
+# endif
+# ifndef LANG_THAI
+# define LANG_THAI 0x1e
+# endif
+# ifndef LANG_TIBETAN
+# define LANG_TIBETAN 0x51
+# endif
+# ifndef LANG_TIGRINYA
+# define LANG_TIGRINYA 0x73
+# endif
+# ifndef LANG_TSONGA
+# define LANG_TSONGA 0x31
+# endif
+# ifndef LANG_TSWANA
+# define LANG_TSWANA 0x32
+# endif
+# ifndef LANG_TURKMEN
+# define LANG_TURKMEN 0x42
+# endif
+# ifndef LANG_UIGHUR
+# define LANG_UIGHUR 0x80
+# endif
+# ifndef LANG_UKRAINIAN
+# define LANG_UKRAINIAN 0x22
+# endif
+# ifndef LANG_URDU
+# define LANG_URDU 0x20
+# endif
+# ifndef LANG_UZBEK
+# define LANG_UZBEK 0x43
+# endif
+# ifndef LANG_VENDA
+# define LANG_VENDA 0x33
+# endif
+# ifndef LANG_VIETNAMESE
+# define LANG_VIETNAMESE 0x2a
+# endif
+# ifndef LANG_WELSH
+# define LANG_WELSH 0x52
+# endif
+# ifndef LANG_WOLOF
+# define LANG_WOLOF 0x88
+# endif
+# ifndef LANG_XHOSA
+# define LANG_XHOSA 0x34
+# endif
+# ifndef LANG_YAKUT
+# define LANG_YAKUT 0x85
+# endif
+# ifndef LANG_YI
+# define LANG_YI 0x78
+# endif
+# ifndef LANG_YIDDISH
+# define LANG_YIDDISH 0x3d
+# endif
+# ifndef LANG_YORUBA
+# define LANG_YORUBA 0x6a
+# endif
+# ifndef LANG_ZULU
+# define LANG_ZULU 0x35
+# endif
+# ifndef SUBLANG_AFRIKAANS_SOUTH_AFRICA
+# define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_ALBANIAN_ALBANIA
+# define SUBLANG_ALBANIAN_ALBANIA 0x01
+# endif
+# ifndef SUBLANG_ALSATIAN_FRANCE
+# define SUBLANG_ALSATIAN_FRANCE 0x01
+# endif
+# ifndef SUBLANG_AMHARIC_ETHIOPIA
+# define SUBLANG_AMHARIC_ETHIOPIA 0x01
+# endif
+# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
+# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
+# endif
+# ifndef SUBLANG_ARABIC_IRAQ
+# define SUBLANG_ARABIC_IRAQ 0x02
+# endif
+# ifndef SUBLANG_ARABIC_EGYPT
+# define SUBLANG_ARABIC_EGYPT 0x03
+# endif
+# ifndef SUBLANG_ARABIC_LIBYA
+# define SUBLANG_ARABIC_LIBYA 0x04
+# endif
+# ifndef SUBLANG_ARABIC_ALGERIA
+# define SUBLANG_ARABIC_ALGERIA 0x05
+# endif
+# ifndef SUBLANG_ARABIC_MOROCCO
+# define SUBLANG_ARABIC_MOROCCO 0x06
+# endif
+# ifndef SUBLANG_ARABIC_TUNISIA
+# define SUBLANG_ARABIC_TUNISIA 0x07
+# endif
+# ifndef SUBLANG_ARABIC_OMAN
+# define SUBLANG_ARABIC_OMAN 0x08
+# endif
+# ifndef SUBLANG_ARABIC_YEMEN
+# define SUBLANG_ARABIC_YEMEN 0x09
+# endif
+# ifndef SUBLANG_ARABIC_SYRIA
+# define SUBLANG_ARABIC_SYRIA 0x0a
+# endif
+# ifndef SUBLANG_ARABIC_JORDAN
+# define SUBLANG_ARABIC_JORDAN 0x0b
+# endif
+# ifndef SUBLANG_ARABIC_LEBANON
+# define SUBLANG_ARABIC_LEBANON 0x0c
+# endif
+# ifndef SUBLANG_ARABIC_KUWAIT
+# define SUBLANG_ARABIC_KUWAIT 0x0d
+# endif
+# ifndef SUBLANG_ARABIC_UAE
+# define SUBLANG_ARABIC_UAE 0x0e
+# endif
+# ifndef SUBLANG_ARABIC_BAHRAIN
+# define SUBLANG_ARABIC_BAHRAIN 0x0f
+# endif
+# ifndef SUBLANG_ARABIC_QATAR
+# define SUBLANG_ARABIC_QATAR 0x10
+# endif
+# ifndef SUBLANG_ARMENIAN_ARMENIA
+# define SUBLANG_ARMENIAN_ARMENIA 0x01
+# endif
+# ifndef SUBLANG_ASSAMESE_INDIA
+# define SUBLANG_ASSAMESE_INDIA 0x01
+# endif
+# ifndef SUBLANG_AZERI_LATIN
+# define SUBLANG_AZERI_LATIN 0x01
+# endif
+# ifndef SUBLANG_AZERI_CYRILLIC
+# define SUBLANG_AZERI_CYRILLIC 0x02
+# endif
+# ifndef SUBLANG_BASHKIR_RUSSIA
+# define SUBLANG_BASHKIR_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_BASQUE_BASQUE
+# define SUBLANG_BASQUE_BASQUE 0x01
+# endif
+# ifndef SUBLANG_BELARUSIAN_BELARUS
+# define SUBLANG_BELARUSIAN_BELARUS 0x01
+# endif
+# ifndef SUBLANG_BENGALI_INDIA
+# define SUBLANG_BENGALI_INDIA 0x01
+# endif
+# ifndef SUBLANG_BENGALI_BANGLADESH
+# define SUBLANG_BENGALI_BANGLADESH 0x02
+# endif
+# ifndef SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN
+# define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05
+# endif
+# ifndef SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC
+# define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08
+# endif
+# ifndef SUBLANG_BRETON_FRANCE
+# define SUBLANG_BRETON_FRANCE 0x01
+# endif
+# ifndef SUBLANG_BULGARIAN_BULGARIA
+# define SUBLANG_BULGARIAN_BULGARIA 0x01
+# endif
+# ifndef SUBLANG_CAMBODIAN_CAMBODIA
+# define SUBLANG_CAMBODIAN_CAMBODIA 0x01
+# endif
+# ifndef SUBLANG_CATALAN_SPAIN
+# define SUBLANG_CATALAN_SPAIN 0x01
+# endif
+# ifndef SUBLANG_CORSICAN_FRANCE
+# define SUBLANG_CORSICAN_FRANCE 0x01
+# endif
+# ifndef SUBLANG_CROATIAN_CROATIA
+# define SUBLANG_CROATIAN_CROATIA 0x01
+# endif
+# ifndef SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN
+# define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04
+# endif
+# ifndef SUBLANG_CHINESE_MACAU
+# define SUBLANG_CHINESE_MACAU 0x05
+# endif
+# ifndef SUBLANG_CZECH_CZECH_REPUBLIC
+# define SUBLANG_CZECH_CZECH_REPUBLIC 0x01
+# endif
+# ifndef SUBLANG_DANISH_DENMARK
+# define SUBLANG_DANISH_DENMARK 0x01
+# endif
+# ifndef SUBLANG_DARI_AFGHANISTAN
+# define SUBLANG_DARI_AFGHANISTAN 0x01
+# endif
+# ifndef SUBLANG_DIVEHI_MALDIVES
+# define SUBLANG_DIVEHI_MALDIVES 0x01
+# endif
+# ifndef SUBLANG_DUTCH_SURINAM
+# define SUBLANG_DUTCH_SURINAM 0x03
+# endif
+# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
+# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
+# endif
+# ifndef SUBLANG_ENGLISH_JAMAICA
+# define SUBLANG_ENGLISH_JAMAICA 0x08
+# endif
+# ifndef SUBLANG_ENGLISH_CARIBBEAN
+# define SUBLANG_ENGLISH_CARIBBEAN 0x09
+# endif
+# ifndef SUBLANG_ENGLISH_BELIZE
+# define SUBLANG_ENGLISH_BELIZE 0x0a
+# endif
+# ifndef SUBLANG_ENGLISH_TRINIDAD
+# define SUBLANG_ENGLISH_TRINIDAD 0x0b
+# endif
+# ifndef SUBLANG_ENGLISH_ZIMBABWE
+# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
+# endif
+# ifndef SUBLANG_ENGLISH_PHILIPPINES
+# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
+# endif
+# ifndef SUBLANG_ENGLISH_INDONESIA
+# define SUBLANG_ENGLISH_INDONESIA 0x0e
+# endif
+# ifndef SUBLANG_ENGLISH_HONGKONG
+# define SUBLANG_ENGLISH_HONGKONG 0x0f
+# endif
+# ifndef SUBLANG_ENGLISH_INDIA
+# define SUBLANG_ENGLISH_INDIA 0x10
+# endif
+# ifndef SUBLANG_ENGLISH_MALAYSIA
+# define SUBLANG_ENGLISH_MALAYSIA 0x11
+# endif
+# ifndef SUBLANG_ENGLISH_SINGAPORE
+# define SUBLANG_ENGLISH_SINGAPORE 0x12
+# endif
+# ifndef SUBLANG_ESTONIAN_ESTONIA
+# define SUBLANG_ESTONIAN_ESTONIA 0x01
+# endif
+# ifndef SUBLANG_FAEROESE_FAROE_ISLANDS
+# define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01
+# endif
+# ifndef SUBLANG_FARSI_IRAN
+# define SUBLANG_FARSI_IRAN 0x01
+# endif
+# ifndef SUBLANG_FINNISH_FINLAND
+# define SUBLANG_FINNISH_FINLAND 0x01
+# endif
+# ifndef SUBLANG_FRENCH_LUXEMBOURG
+# define SUBLANG_FRENCH_LUXEMBOURG 0x05
+# endif
+# ifndef SUBLANG_FRENCH_MONACO
+# define SUBLANG_FRENCH_MONACO 0x06
+# endif
+# ifndef SUBLANG_FRENCH_WESTINDIES
+# define SUBLANG_FRENCH_WESTINDIES 0x07
+# endif
+# ifndef SUBLANG_FRENCH_REUNION
+# define SUBLANG_FRENCH_REUNION 0x08
+# endif
+# ifndef SUBLANG_FRENCH_CONGO
+# define SUBLANG_FRENCH_CONGO 0x09
+# endif
+# ifndef SUBLANG_FRENCH_SENEGAL
+# define SUBLANG_FRENCH_SENEGAL 0x0a
+# endif
+# ifndef SUBLANG_FRENCH_CAMEROON
+# define SUBLANG_FRENCH_CAMEROON 0x0b
+# endif
+# ifndef SUBLANG_FRENCH_COTEDIVOIRE
+# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
+# endif
+# ifndef SUBLANG_FRENCH_MALI
+# define SUBLANG_FRENCH_MALI 0x0d
+# endif
+# ifndef SUBLANG_FRENCH_MOROCCO
+# define SUBLANG_FRENCH_MOROCCO 0x0e
+# endif
+# ifndef SUBLANG_FRENCH_HAITI
+# define SUBLANG_FRENCH_HAITI 0x0f
+# endif
+# ifndef SUBLANG_FRISIAN_NETHERLANDS
+# define SUBLANG_FRISIAN_NETHERLANDS 0x01
+# endif
+# ifndef SUBLANG_GALICIAN_SPAIN
+# define SUBLANG_GALICIAN_SPAIN 0x01
+# endif
+# ifndef SUBLANG_GEORGIAN_GEORGIA
+# define SUBLANG_GEORGIAN_GEORGIA 0x01
+# endif
+# ifndef SUBLANG_GERMAN_LUXEMBOURG
+# define SUBLANG_GERMAN_LUXEMBOURG 0x04
+# endif
+# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
+# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
+# endif
+# ifndef SUBLANG_GREEK_GREECE
+# define SUBLANG_GREEK_GREECE 0x01
+# endif
+# ifndef SUBLANG_GREENLANDIC_GREENLAND
+# define SUBLANG_GREENLANDIC_GREENLAND 0x01
+# endif
+# ifndef SUBLANG_GUJARATI_INDIA
+# define SUBLANG_GUJARATI_INDIA 0x01
+# endif
+# ifndef SUBLANG_HAUSA_NIGERIA_LATIN
+# define SUBLANG_HAUSA_NIGERIA_LATIN 0x01
+# endif
+# ifndef SUBLANG_HEBREW_ISRAEL
+# define SUBLANG_HEBREW_ISRAEL 0x01
+# endif
+# ifndef SUBLANG_HINDI_INDIA
+# define SUBLANG_HINDI_INDIA 0x01
+# endif
+# ifndef SUBLANG_HUNGARIAN_HUNGARY
+# define SUBLANG_HUNGARIAN_HUNGARY 0x01
+# endif
+# ifndef SUBLANG_ICELANDIC_ICELAND
+# define SUBLANG_ICELANDIC_ICELAND 0x01
+# endif
+# ifndef SUBLANG_IGBO_NIGERIA
+# define SUBLANG_IGBO_NIGERIA 0x01
+# endif
+# ifndef SUBLANG_INDONESIAN_INDONESIA
+# define SUBLANG_INDONESIAN_INDONESIA 0x01
+# endif
+# ifndef SUBLANG_INUKTITUT_CANADA
+# define SUBLANG_INUKTITUT_CANADA 0x01
+# endif
+# undef SUBLANG_INUKTITUT_CANADA_LATIN
+# define SUBLANG_INUKTITUT_CANADA_LATIN 0x02
+# undef SUBLANG_IRISH_IRELAND
+# define SUBLANG_IRISH_IRELAND 0x02
+# ifndef SUBLANG_JAPANESE_JAPAN
+# define SUBLANG_JAPANESE_JAPAN 0x01
+# endif
+# ifndef SUBLANG_KANNADA_INDIA
+# define SUBLANG_KANNADA_INDIA 0x01
+# endif
+# ifndef SUBLANG_KASHMIRI_INDIA
+# define SUBLANG_KASHMIRI_INDIA 0x02
+# endif
+# ifndef SUBLANG_KAZAK_KAZAKHSTAN
+# define SUBLANG_KAZAK_KAZAKHSTAN 0x01
+# endif
+# ifndef SUBLANG_KICHE_GUATEMALA
+# define SUBLANG_KICHE_GUATEMALA 0x01
+# endif
+# ifndef SUBLANG_KINYARWANDA_RWANDA
+# define SUBLANG_KINYARWANDA_RWANDA 0x01
+# endif
+# ifndef SUBLANG_KONKANI_INDIA
+# define SUBLANG_KONKANI_INDIA 0x01
+# endif
+# ifndef SUBLANG_KYRGYZ_KYRGYZSTAN
+# define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01
+# endif
+# ifndef SUBLANG_LAO_LAOS
+# define SUBLANG_LAO_LAOS 0x01
+# endif
+# ifndef SUBLANG_LATVIAN_LATVIA
+# define SUBLANG_LATVIAN_LATVIA 0x01
+# endif
+# ifndef SUBLANG_LITHUANIAN_LITHUANIA
+# define SUBLANG_LITHUANIAN_LITHUANIA 0x01
+# endif
+# undef SUBLANG_LOWER_SORBIAN_GERMANY
+# define SUBLANG_LOWER_SORBIAN_GERMANY 0x02
+# ifndef SUBLANG_LUXEMBOURGISH_LUXEMBOURG
+# define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01
+# endif
+# ifndef SUBLANG_MACEDONIAN_MACEDONIA
+# define SUBLANG_MACEDONIAN_MACEDONIA 0x01
+# endif
+# ifndef SUBLANG_MALAY_MALAYSIA
+# define SUBLANG_MALAY_MALAYSIA 0x01
+# endif
+# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
+# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
+# endif
+# ifndef SUBLANG_MALAYALAM_INDIA
+# define SUBLANG_MALAYALAM_INDIA 0x01
+# endif
+# ifndef SUBLANG_MALTESE_MALTA
+# define SUBLANG_MALTESE_MALTA 0x01
+# endif
+# ifndef SUBLANG_MAORI_NEW_ZEALAND
+# define SUBLANG_MAORI_NEW_ZEALAND 0x01
+# endif
+# ifndef SUBLANG_MAPUDUNGUN_CHILE
+# define SUBLANG_MAPUDUNGUN_CHILE 0x01
+# endif
+# ifndef SUBLANG_MARATHI_INDIA
+# define SUBLANG_MARATHI_INDIA 0x01
+# endif
+# ifndef SUBLANG_MOHAWK_CANADA
+# define SUBLANG_MOHAWK_CANADA 0x01
+# endif
+# ifndef SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA
+# define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01
+# endif
+# ifndef SUBLANG_MONGOLIAN_PRC
+# define SUBLANG_MONGOLIAN_PRC 0x02
+# endif
+# ifndef SUBLANG_NEPALI_NEPAL
+# define SUBLANG_NEPALI_NEPAL 0x01
+# endif
+# ifndef SUBLANG_NEPALI_INDIA
+# define SUBLANG_NEPALI_INDIA 0x02
+# endif
+# ifndef SUBLANG_OCCITAN_FRANCE
+# define SUBLANG_OCCITAN_FRANCE 0x01
+# endif
+# ifndef SUBLANG_ORIYA_INDIA
+# define SUBLANG_ORIYA_INDIA 0x01
+# endif
+# ifndef SUBLANG_PASHTO_AFGHANISTAN
+# define SUBLANG_PASHTO_AFGHANISTAN 0x01
+# endif
+# ifndef SUBLANG_POLISH_POLAND
+# define SUBLANG_POLISH_POLAND 0x01
+# endif
+# ifndef SUBLANG_PUNJABI_INDIA
+# define SUBLANG_PUNJABI_INDIA 0x01
+# endif
+# ifndef SUBLANG_PUNJABI_PAKISTAN
+# define SUBLANG_PUNJABI_PAKISTAN 0x02
+# endif
+# ifndef SUBLANG_QUECHUA_BOLIVIA
+# define SUBLANG_QUECHUA_BOLIVIA 0x01
+# endif
+# ifndef SUBLANG_QUECHUA_ECUADOR
+# define SUBLANG_QUECHUA_ECUADOR 0x02
+# endif
+# ifndef SUBLANG_QUECHUA_PERU
+# define SUBLANG_QUECHUA_PERU 0x03
+# endif
+# ifndef SUBLANG_ROMANIAN_ROMANIA
+# define SUBLANG_ROMANIAN_ROMANIA 0x01
+# endif
+# ifndef SUBLANG_ROMANIAN_MOLDOVA
+# define SUBLANG_ROMANIAN_MOLDOVA 0x02
+# endif
+# ifndef SUBLANG_ROMANSH_SWITZERLAND
+# define SUBLANG_ROMANSH_SWITZERLAND 0x01
+# endif
+# ifndef SUBLANG_RUSSIAN_RUSSIA
+# define SUBLANG_RUSSIAN_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_RUSSIAN_MOLDAVIA
+# define SUBLANG_RUSSIAN_MOLDAVIA 0x02
+# endif
+# ifndef SUBLANG_SAMI_NORTHERN_NORWAY
+# define SUBLANG_SAMI_NORTHERN_NORWAY 0x01
+# endif
+# ifndef SUBLANG_SAMI_NORTHERN_SWEDEN
+# define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02
+# endif
+# ifndef SUBLANG_SAMI_NORTHERN_FINLAND
+# define SUBLANG_SAMI_NORTHERN_FINLAND 0x03
+# endif
+# ifndef SUBLANG_SAMI_LULE_NORWAY
+# define SUBLANG_SAMI_LULE_NORWAY 0x04
+# endif
+# ifndef SUBLANG_SAMI_LULE_SWEDEN
+# define SUBLANG_SAMI_LULE_SWEDEN 0x05
+# endif
+# ifndef SUBLANG_SAMI_SOUTHERN_NORWAY
+# define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06
+# endif
+# ifndef SUBLANG_SAMI_SOUTHERN_SWEDEN
+# define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07
+# endif
+# undef SUBLANG_SAMI_SKOLT_FINLAND
+# define SUBLANG_SAMI_SKOLT_FINLAND 0x08
+# undef SUBLANG_SAMI_INARI_FINLAND
+# define SUBLANG_SAMI_INARI_FINLAND 0x09
+# ifndef SUBLANG_SANSKRIT_INDIA
+# define SUBLANG_SANSKRIT_INDIA 0x01
+# endif
+# ifndef SUBLANG_SERBIAN_LATIN
+# define SUBLANG_SERBIAN_LATIN 0x02
+# endif
+# ifndef SUBLANG_SERBIAN_CYRILLIC
+# define SUBLANG_SERBIAN_CYRILLIC 0x03
+# endif
+# ifndef SUBLANG_SINDHI_INDIA
+# define SUBLANG_SINDHI_INDIA 0x01
+# endif
+# undef SUBLANG_SINDHI_PAKISTAN
+# define SUBLANG_SINDHI_PAKISTAN 0x02
+# ifndef SUBLANG_SINDHI_AFGHANISTAN
+# define SUBLANG_SINDHI_AFGHANISTAN 0x02
+# endif
+# ifndef SUBLANG_SINHALESE_SRI_LANKA
+# define SUBLANG_SINHALESE_SRI_LANKA 0x01
+# endif
+# ifndef SUBLANG_SLOVAK_SLOVAKIA
+# define SUBLANG_SLOVAK_SLOVAKIA 0x01
+# endif
+# ifndef SUBLANG_SLOVENIAN_SLOVENIA
+# define SUBLANG_SLOVENIAN_SLOVENIA 0x01
+# endif
+# ifndef SUBLANG_SOTHO_SOUTH_AFRICA
+# define SUBLANG_SOTHO_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_SPANISH_GUATEMALA
+# define SUBLANG_SPANISH_GUATEMALA 0x04
+# endif
+# ifndef SUBLANG_SPANISH_COSTA_RICA
+# define SUBLANG_SPANISH_COSTA_RICA 0x05
+# endif
+# ifndef SUBLANG_SPANISH_PANAMA
+# define SUBLANG_SPANISH_PANAMA 0x06
+# endif
+# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
+# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
+# endif
+# ifndef SUBLANG_SPANISH_VENEZUELA
+# define SUBLANG_SPANISH_VENEZUELA 0x08
+# endif
+# ifndef SUBLANG_SPANISH_COLOMBIA
+# define SUBLANG_SPANISH_COLOMBIA 0x09
+# endif
+# ifndef SUBLANG_SPANISH_PERU
+# define SUBLANG_SPANISH_PERU 0x0a
+# endif
+# ifndef SUBLANG_SPANISH_ARGENTINA
+# define SUBLANG_SPANISH_ARGENTINA 0x0b
+# endif
+# ifndef SUBLANG_SPANISH_ECUADOR
+# define SUBLANG_SPANISH_ECUADOR 0x0c
+# endif
+# ifndef SUBLANG_SPANISH_CHILE
+# define SUBLANG_SPANISH_CHILE 0x0d
+# endif
+# ifndef SUBLANG_SPANISH_URUGUAY
+# define SUBLANG_SPANISH_URUGUAY 0x0e
+# endif
+# ifndef SUBLANG_SPANISH_PARAGUAY
+# define SUBLANG_SPANISH_PARAGUAY 0x0f
+# endif
+# ifndef SUBLANG_SPANISH_BOLIVIA
+# define SUBLANG_SPANISH_BOLIVIA 0x10
+# endif
+# ifndef SUBLANG_SPANISH_EL_SALVADOR
+# define SUBLANG_SPANISH_EL_SALVADOR 0x11
+# endif
+# ifndef SUBLANG_SPANISH_HONDURAS
+# define SUBLANG_SPANISH_HONDURAS 0x12
+# endif
+# ifndef SUBLANG_SPANISH_NICARAGUA
+# define SUBLANG_SPANISH_NICARAGUA 0x13
+# endif
+# ifndef SUBLANG_SPANISH_PUERTO_RICO
+# define SUBLANG_SPANISH_PUERTO_RICO 0x14
+# endif
+# ifndef SUBLANG_SPANISH_US
+# define SUBLANG_SPANISH_US 0x15
+# endif
+# ifndef SUBLANG_SWAHILI_KENYA
+# define SUBLANG_SWAHILI_KENYA 0x01
+# endif
+# ifndef SUBLANG_SWEDISH_SWEDEN
+# define SUBLANG_SWEDISH_SWEDEN 0x01
+# endif
+# ifndef SUBLANG_SWEDISH_FINLAND
+# define SUBLANG_SWEDISH_FINLAND 0x02
+# endif
+# ifndef SUBLANG_SYRIAC_SYRIA
+# define SUBLANG_SYRIAC_SYRIA 0x01
+# endif
+# ifndef SUBLANG_TAGALOG_PHILIPPINES
+# define SUBLANG_TAGALOG_PHILIPPINES 0x01
+# endif
+# ifndef SUBLANG_TAJIK_TAJIKISTAN
+# define SUBLANG_TAJIK_TAJIKISTAN 0x01
+# endif
+# ifndef SUBLANG_TAMAZIGHT_ARABIC
+# define SUBLANG_TAMAZIGHT_ARABIC 0x01
+# endif
+# ifndef SUBLANG_TAMAZIGHT_ALGERIA_LATIN
+# define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02
+# endif
+# ifndef SUBLANG_TAMIL_INDIA
+# define SUBLANG_TAMIL_INDIA 0x01
+# endif
+# ifndef SUBLANG_TATAR_RUSSIA
+# define SUBLANG_TATAR_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_TELUGU_INDIA
+# define SUBLANG_TELUGU_INDIA 0x01
+# endif
+# ifndef SUBLANG_THAI_THAILAND
+# define SUBLANG_THAI_THAILAND 0x01
+# endif
+# ifndef SUBLANG_TIBETAN_PRC
+# define SUBLANG_TIBETAN_PRC 0x01
+# endif
+# undef SUBLANG_TIBETAN_BHUTAN
+# define SUBLANG_TIBETAN_BHUTAN 0x02
+# ifndef SUBLANG_TIGRINYA_ETHIOPIA
+# define SUBLANG_TIGRINYA_ETHIOPIA 0x01
+# endif
+# ifndef SUBLANG_TIGRINYA_ERITREA
+# define SUBLANG_TIGRINYA_ERITREA 0x02
+# endif
+# ifndef SUBLANG_TSWANA_SOUTH_AFRICA
+# define SUBLANG_TSWANA_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_TURKISH_TURKEY
+# define SUBLANG_TURKISH_TURKEY 0x01
+# endif
+# ifndef SUBLANG_TURKMEN_TURKMENISTAN
+# define SUBLANG_TURKMEN_TURKMENISTAN 0x01
+# endif
+# ifndef SUBLANG_UIGHUR_PRC
+# define SUBLANG_UIGHUR_PRC 0x01
+# endif
+# ifndef SUBLANG_UKRAINIAN_UKRAINE
+# define SUBLANG_UKRAINIAN_UKRAINE 0x01
+# endif
+# ifndef SUBLANG_UPPER_SORBIAN_GERMANY
+# define SUBLANG_UPPER_SORBIAN_GERMANY 0x01
+# endif
+# ifndef SUBLANG_URDU_PAKISTAN
+# define SUBLANG_URDU_PAKISTAN 0x01
+# endif
+# ifndef SUBLANG_URDU_INDIA
+# define SUBLANG_URDU_INDIA 0x02
+# endif
+# ifndef SUBLANG_UZBEK_LATIN
+# define SUBLANG_UZBEK_LATIN 0x01
+# endif
+# ifndef SUBLANG_UZBEK_CYRILLIC
+# define SUBLANG_UZBEK_CYRILLIC 0x02
+# endif
+# ifndef SUBLANG_VIETNAMESE_VIETNAM
+# define SUBLANG_VIETNAMESE_VIETNAM 0x01
+# endif
+# ifndef SUBLANG_WELSH_UNITED_KINGDOM
+# define SUBLANG_WELSH_UNITED_KINGDOM 0x01
+# endif
+# ifndef SUBLANG_WOLOF_SENEGAL
+# define SUBLANG_WOLOF_SENEGAL 0x01
+# endif
+# ifndef SUBLANG_XHOSA_SOUTH_AFRICA
+# define SUBLANG_XHOSA_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_YAKUT_RUSSIA
+# define SUBLANG_YAKUT_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_YI_PRC
+# define SUBLANG_YI_PRC 0x01
+# endif
+# ifndef SUBLANG_YORUBA_NIGERIA
+# define SUBLANG_YORUBA_NIGERIA 0x01
+# endif
+# ifndef SUBLANG_ZULU_SOUTH_AFRICA
+# define SUBLANG_ZULU_SOUTH_AFRICA 0x01
+# endif
+/* GetLocaleInfoA operations.  */
+# ifndef LOCALE_SNAME
+# define LOCALE_SNAME 0x5c
+# endif
+#endif
+
+
+#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+/* MacOS X 10.2 or newer */
+
+/* Canonicalize a MacOS X locale name to a Unix locale name.
+   NAME is a sufficiently large buffer.
+   On input, it contains the MacOS X locale name.
+   On output, it contains the Unix locale name.  */
+# if !defined IN_LIBINTL
+static
+# endif
+void
+gl_locale_name_canonicalize (char *name)
+{
+  /* This conversion is based on a posting by
+     Deborah GoldSmith <goldsmit@apple.com> on 2005-03-08,
+     http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */
+
+  /* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and
+     ISO 3166) names.  Prior to MacOS X 10.3, there is no API for doing this.
+     Therefore we do it ourselves, using a table based on the results of the
+     MacOS X 10.3.8 function
+     CFLocaleCreateCanonicalLocaleIdentifierFromString().  */
+  typedef struct { const char legacy[21+1]; const char unixy[5+1]; }
+          legacy_entry;
+  static const legacy_entry legacy_table[] = {
+    { "Afrikaans",             "af" },
+    { "Albanian",              "sq" },
+    { "Amharic",               "am" },
+    { "Arabic",                "ar" },
+    { "Armenian",              "hy" },
+    { "Assamese",              "as" },
+    { "Aymara",                "ay" },
+    { "Azerbaijani",           "az" },
+    { "Basque",                "eu" },
+    { "Belarusian",            "be" },
+    { "Belorussian",           "be" },
+    { "Bengali",               "bn" },
+    { "Brazilian Portugese",   "pt_BR" },
+    { "Brazilian Portuguese",  "pt_BR" },
+    { "Breton",                "br" },
+    { "Bulgarian",             "bg" },
+    { "Burmese",               "my" },
+    { "Byelorussian",          "be" },
+    { "Catalan",               "ca" },
+    { "Chewa",                 "ny" },
+    { "Chichewa",              "ny" },
+    { "Chinese",               "zh" },
+    { "Chinese, Simplified",   "zh_CN" },
+    { "Chinese, Traditional",  "zh_TW" },
+    { "Chinese, Tradtional",   "zh_TW" },
+    { "Croatian",              "hr" },
+    { "Czech",                 "cs" },
+    { "Danish",                "da" },
+    { "Dutch",                 "nl" },
+    { "Dzongkha",              "dz" },
+    { "English",               "en" },
+    { "Esperanto",             "eo" },
+    { "Estonian",              "et" },
+    { "Faroese",               "fo" },
+    { "Farsi",                 "fa" },
+    { "Finnish",               "fi" },
+    { "Flemish",               "nl_BE" },
+    { "French",                "fr" },
+    { "Galician",              "gl" },
+    { "Gallegan",              "gl" },
+    { "Georgian",              "ka" },
+    { "German",                "de" },
+    { "Greek",                 "el" },
+    { "Greenlandic",           "kl" },
+    { "Guarani",               "gn" },
+    { "Gujarati",              "gu" },
+    { "Hawaiian",              "haw" }, /* Yes, "haw", not "cpe".  */
+    { "Hebrew",                "he" },
+    { "Hindi",                 "hi" },
+    { "Hungarian",             "hu" },
+    { "Icelandic",             "is" },
+    { "Indonesian",            "id" },
+    { "Inuktitut",             "iu" },
+    { "Irish",                 "ga" },
+    { "Italian",               "it" },
+    { "Japanese",              "ja" },
+    { "Javanese",              "jv" },
+    { "Kalaallisut",           "kl" },
+    { "Kannada",               "kn" },
+    { "Kashmiri",              "ks" },
+    { "Kazakh",                "kk" },
+    { "Khmer",                 "km" },
+    { "Kinyarwanda",           "rw" },
+    { "Kirghiz",               "ky" },
+    { "Korean",                "ko" },
+    { "Kurdish",               "ku" },
+    { "Latin",                 "la" },
+    { "Latvian",               "lv" },
+    { "Lithuanian",            "lt" },
+    { "Macedonian",            "mk" },
+    { "Malagasy",              "mg" },
+    { "Malay",                 "ms" },
+    { "Malayalam",             "ml" },
+    { "Maltese",               "mt" },
+    { "Manx",                  "gv" },
+    { "Marathi",               "mr" },
+    { "Moldavian",             "mo" },
+    { "Mongolian",             "mn" },
+    { "Nepali",                "ne" },
+    { "Norwegian",             "nb" }, /* Yes, "nb", not the obsolete "no".  */
+    { "Nyanja",                "ny" },
+    { "Nynorsk",               "nn" },
+    { "Oriya",                 "or" },
+    { "Oromo",                 "om" },
+    { "Panjabi",               "pa" },
+    { "Pashto",                "ps" },
+    { "Persian",               "fa" },
+    { "Polish",                "pl" },
+    { "Portuguese",            "pt" },
+    { "Portuguese, Brazilian", "pt_BR" },
+    { "Punjabi",               "pa" },
+    { "Pushto",                "ps" },
+    { "Quechua",               "qu" },
+    { "Romanian",              "ro" },
+    { "Ruanda",                "rw" },
+    { "Rundi",                 "rn" },
+    { "Russian",               "ru" },
+    { "Sami",                  "se_NO" }, /* Not just "se".  */
+    { "Sanskrit",              "sa" },
+    { "Scottish",              "gd" },
+    { "Serbian",               "sr" },
+    { "Simplified Chinese",    "zh_CN" },
+    { "Sindhi",                "sd" },
+    { "Sinhalese",             "si" },
+    { "Slovak",                "sk" },
+    { "Slovenian",             "sl" },
+    { "Somali",                "so" },
+    { "Spanish",               "es" },
+    { "Sundanese",             "su" },
+    { "Swahili",               "sw" },
+    { "Swedish",               "sv" },
+    { "Tagalog",               "tl" },
+    { "Tajik",                 "tg" },
+    { "Tajiki",                "tg" },
+    { "Tamil",                 "ta" },
+    { "Tatar",                 "tt" },
+    { "Telugu",                "te" },
+    { "Thai",                  "th" },
+    { "Tibetan",               "bo" },
+    { "Tigrinya",              "ti" },
+    { "Tongan",                "to" },
+    { "Traditional Chinese",   "zh_TW" },
+    { "Turkish",               "tr" },
+    { "Turkmen",               "tk" },
+    { "Uighur",                "ug" },
+    { "Ukrainian",             "uk" },
+    { "Urdu",                  "ur" },
+    { "Uzbek",                 "uz" },
+    { "Vietnamese",            "vi" },
+    { "Welsh",                 "cy" },
+    { "Yiddish",               "yi" }
+  };
+
+  /* Convert new-style locale names with language tags (ISO 639 and ISO 15924)
+     to Unix (ISO 639 and ISO 3166) names.  */
+  typedef struct { const char langtag[7+1]; const char unixy[12+1]; }
+          langtag_entry;
+  static const langtag_entry langtag_table[] = {
+    /* MacOS X has "az-Arab", "az-Cyrl", "az-Latn".
+       The default script for az on Unix is Latin.  */
+    { "az-Latn", "az" },
+    /* MacOS X has "ga-dots".  Does not yet exist on Unix.  */
+    { "ga-dots", "ga" },
+    /* MacOS X has "kk-Cyrl".  Does not yet exist on Unix.  */
+    /* MacOS X has "mn-Cyrl", "mn-Mong".
+       The default script for mn on Unix is Cyrillic.  */
+    { "mn-Cyrl", "mn" },
+    /* MacOS X has "ms-Arab", "ms-Latn".
+       The default script for ms on Unix is Latin.  */
+    { "ms-Latn", "ms" },
+    /* MacOS X has "tg-Cyrl".
+       The default script for tg on Unix is Cyrillic.  */
+    { "tg-Cyrl", "tg" },
+    /* MacOS X has "tk-Cyrl".  Does not yet exist on Unix.  */
+    /* MacOS X has "tt-Cyrl".
+       The default script for tt on Unix is Cyrillic.  */
+    { "tt-Cyrl", "tt" },
+    /* MacOS X has "zh-Hans", "zh-Hant".
+       Country codes are used to distinguish these on Unix.  */
+    { "zh-Hans", "zh_CN" },
+    { "zh-Hant", "zh_TW" }
+  };
+
+  /* Convert script names (ISO 15924) to Unix conventions.
+     See http://www.unicode.org/iso15924/iso15924-codes.html  */
+  typedef struct { const char script[4+1]; const char unixy[9+1]; }
+          script_entry;
+  static const script_entry script_table[] = {
+    { "Arab", "arabic" },
+    { "Cyrl", "cyrillic" },
+    { "Mong", "mongolian" }
+  };
+
+  /* Step 1: Convert using legacy_table.  */
+  if (name[0] >= 'A' && name[0] <= 'Z')
+    {
+      unsigned int i1, i2;
+      i1 = 0;
+      i2 = sizeof (legacy_table) / sizeof (legacy_entry);
+      while (i2 - i1 > 1)
+        {
+          /* At this point we know that if name occurs in legacy_table,
+             its index must be >= i1 and < i2.  */
+          unsigned int i = (i1 + i2) >> 1;
+          const legacy_entry *p = &legacy_table[i];
+          if (strcmp (name, p->legacy) < 0)
+            i2 = i;
+          else
+            i1 = i;
+        }
+      if (strcmp (name, legacy_table[i1].legacy) == 0)
+        {
+          strcpy (name, legacy_table[i1].unixy);
+          return;
+        }
+    }
+
+  /* Step 2: Convert using langtag_table and script_table.  */
+  if (strlen (name) == 7 && name[2] == '-')
+    {
+      unsigned int i1, i2;
+      i1 = 0;
+      i2 = sizeof (langtag_table) / sizeof (langtag_entry);
+      while (i2 - i1 > 1)
+        {
+          /* At this point we know that if name occurs in langtag_table,
+             its index must be >= i1 and < i2.  */
+          unsigned int i = (i1 + i2) >> 1;
+          const langtag_entry *p = &langtag_table[i];
+          if (strcmp (name, p->langtag) < 0)
+            i2 = i;
+          else
+            i1 = i;
+        }
+      if (strcmp (name, langtag_table[i1].langtag) == 0)
+        {
+          strcpy (name, langtag_table[i1].unixy);
+          return;
+        }
+
+      i1 = 0;
+      i2 = sizeof (script_table) / sizeof (script_entry);
+      while (i2 - i1 > 1)
+        {
+          /* At this point we know that if (name + 3) occurs in script_table,
+             its index must be >= i1 and < i2.  */
+          unsigned int i = (i1 + i2) >> 1;
+          const script_entry *p = &script_table[i];
+          if (strcmp (name + 3, p->script) < 0)
+            i2 = i;
+          else
+            i1 = i;
+        }
+      if (strcmp (name + 3, script_table[i1].script) == 0)
+        {
+          name[2] = '@';
+          strcpy (name + 3, script_table[i1].unixy);
+          return;
+        }
+    }
+
+  /* Step 3: Convert new-style dash to Unix underscore. */
+  {
+    char *p;
+    for (p = name; *p != '\0'; p++)
+      if (*p == '-')
+        *p = '_';
+  }
+}
+
+#endif
+
+
+#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
+
+/* Canonicalize a Win32 native locale name to a Unix locale name.
+   NAME is a sufficiently large buffer.
+   On input, it contains the Win32 locale name.
+   On output, it contains the Unix locale name.  */
+# if !defined IN_LIBINTL
+static
+# endif
+void
+gl_locale_name_canonicalize (char *name)
+{
+  /* FIXME: This is probably incomplete: it does not handle "zh-Hans" and
+     "zh-Hant".  */
+  char *p;
+
+  for (p = name; *p != '\0'; p++)
+    if (*p == '-')
+      {
+        *p = '_';
+        p++;
+        for (; *p != '\0'; p++)
+          {
+            if (*p >= 'a' && *p <= 'z')
+              *p += 'A' - 'a';
+            if (*p == '-')
+              {
+                *p = '\0';
+                return;
+              }
+          }
+        return;
+      }
+}
+
+# if !defined IN_LIBINTL
+static
+# endif
+const char *
+gl_locale_name_from_win32_LANGID (LANGID langid)
+{
+  /* Activate the new code only when the GETTEXT_MUI environment variable is
+     set, for the time being, since the new code is not well tested.  */
+  if (getenv ("GETTEXT_MUI") != NULL)
+    {
+      static char namebuf[256];
+
+      /* Query the system's notion of locale name.
+         On Windows95/98/ME, GetLocaleInfoA returns some incorrect results.
+         But we don't need to support systems that are so old.  */
+      if (GetLocaleInfoA (MAKELCID (langid, SORT_DEFAULT), LOCALE_SNAME,
+                          namebuf, sizeof (namebuf) - 1))
+        {
+          /* Convert it to a Unix locale name.  */
+          gl_locale_name_canonicalize (namebuf);
+          return namebuf;
+        }
+    }
+  /* Internet Explorer has an LCID to RFC3066 name mapping stored in
+     HKEY_CLASSES_ROOT\Mime\Database\Rfc1766.  But we better don't use that
+     since IE's i18n subsystem is known to be inconsistent with the Win32 base
+     (e.g. they have different character conversion facilities that produce
+     different results).  */
+  /* Use our own table.  */
+  {
+    int primary, sub;
+
+    /* Split into language and territory part.  */
+    primary = PRIMARYLANGID (langid);
+    sub = SUBLANGID (langid);
+
+    /* Dispatch on language.
+       See also http://www.unicode.org/unicode/onlinedat/languages.html .
+       For details about languages, see http://www.ethnologue.com/ .  */
+    switch (primary)
+      {
+      case LANG_AFRIKAANS:
+        switch (sub)
+          {
+          case SUBLANG_AFRIKAANS_SOUTH_AFRICA: return "af_ZA";
+          }
+        return "af";
+      case LANG_ALBANIAN:
+        switch (sub)
+          {
+          case SUBLANG_ALBANIAN_ALBANIA: return "sq_AL";
+          }
+        return "sq";
+      case LANG_ALSATIAN:
+        switch (sub)
+          {
+          case SUBLANG_ALSATIAN_FRANCE: return "gsw_FR";
+          }
+        return "gsw";
+      case LANG_AMHARIC:
+        switch (sub)
+          {
+          case SUBLANG_AMHARIC_ETHIOPIA: return "am_ET";
+          }
+        return "am";
+      case LANG_ARABIC:
+        switch (sub)
+          {
+          case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
+          case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
+          case SUBLANG_ARABIC_EGYPT: return "ar_EG";
+          case SUBLANG_ARABIC_LIBYA: return "ar_LY";
+          case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
+          case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
+          case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
+          case SUBLANG_ARABIC_OMAN: return "ar_OM";
+          case SUBLANG_ARABIC_YEMEN: return "ar_YE";
+          case SUBLANG_ARABIC_SYRIA: return "ar_SY";
+          case SUBLANG_ARABIC_JORDAN: return "ar_JO";
+          case SUBLANG_ARABIC_LEBANON: return "ar_LB";
+          case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
+          case SUBLANG_ARABIC_UAE: return "ar_AE";
+          case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
+          case SUBLANG_ARABIC_QATAR: return "ar_QA";
+          }
+        return "ar";
+      case LANG_ARMENIAN:
+        switch (sub)
+          {
+          case SUBLANG_ARMENIAN_ARMENIA: return "hy_AM";
+          }
+        return "hy";
+      case LANG_ASSAMESE:
+        switch (sub)
+          {
+          case SUBLANG_ASSAMESE_INDIA: return "as_IN";
+          }
+        return "as";
+      case LANG_AZERI:
+        switch (sub)
+          {
+          /* FIXME: Adjust this when Azerbaijani locales appear on Unix.  */
+          case 0x1e: return "az@latin";
+          case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
+          case 0x1d: return "az@cyrillic";
+          case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
+          }
+        return "az";
+      case LANG_BASHKIR:
+        switch (sub)
+          {
+          case SUBLANG_BASHKIR_RUSSIA: return "ba_RU";
+          }
+        return "ba";
+      case LANG_BASQUE:
+        switch (sub)
+          {
+          case SUBLANG_BASQUE_BASQUE: return "eu_ES";
+          }
+        return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR".  */
+      case LANG_BELARUSIAN:
+        switch (sub)
+          {
+          case SUBLANG_BELARUSIAN_BELARUS: return "be_BY";
+          }
+        return "be";
+      case LANG_BENGALI:
+        switch (sub)
+          {
+          case SUBLANG_BENGALI_INDIA: return "bn_IN";
+          case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
+          }
+        return "bn";
+      case LANG_BRETON:
+        switch (sub)
+          {
+          case SUBLANG_BRETON_FRANCE: return "br_FR";
+          }
+        return "br";
+      case LANG_BULGARIAN:
+        switch (sub)
+          {
+          case SUBLANG_BULGARIAN_BULGARIA: return "bg_BG";
+          }
+        return "bg";
+      case LANG_BURMESE:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "my_MM";
+          }
+        return "my";
+      case LANG_CAMBODIAN:
+        switch (sub)
+          {
+          case SUBLANG_CAMBODIAN_CAMBODIA: return "km_KH";
+          }
+        return "km";
+      case LANG_CATALAN:
+        switch (sub)
+          {
+          case SUBLANG_CATALAN_SPAIN: return "ca_ES";
+          }
+        return "ca";
+      case LANG_CHEROKEE:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "chr_US";
+          }
+        return "chr";
+      case LANG_CHINESE:
+        switch (sub)
+          {
+          case SUBLANG_CHINESE_TRADITIONAL: case 0x1f: return "zh_TW";
+          case SUBLANG_CHINESE_SIMPLIFIED: case 0x00: return "zh_CN";
+          case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; /* traditional */
+          case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; /* simplified */
+          case SUBLANG_CHINESE_MACAU: return "zh_MO"; /* traditional */
+          }
+        return "zh";
+      case LANG_CORSICAN:
+        switch (sub)
+          {
+          case SUBLANG_CORSICAN_FRANCE: return "co_FR";
+          }
+        return "co";
+      case LANG_CROATIAN:      /* LANG_CROATIAN == LANG_SERBIAN == LANG_BOSNIAN
+                                * What used to be called Serbo-Croatian
+                                * should really now be two separate
+                                * languages because of political reasons.
+                                * (Says tml, who knows nothing about Serbian
+                                * or Croatian.)
+                                * (I can feel those flames coming already.)
+                                */
+        switch (sub)
+          {
+          /* Croatian */
+          case 0x00: return "hr";
+          case SUBLANG_CROATIAN_CROATIA: return "hr_HR";
+          case SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN: return "hr_BA";
+          /* Serbian */
+          case 0x1f: return "sr";
+          case 0x1c: return "sr"; /* latin */
+          case SUBLANG_SERBIAN_LATIN: return "sr_CS"; /* latin */
+          case 0x09: return "sr_RS"; /* latin */
+          case 0x0b: return "sr_ME"; /* latin */
+          case 0x06: return "sr_BA"; /* latin */
+          case 0x1b: return "sr@cyrillic";
+          case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
+          case 0x0a: return "sr_RS@cyrillic";
+          case 0x0c: return "sr_ME@cyrillic";
+          case 0x07: return "sr_BA@cyrillic";
+          /* Bosnian */
+          case 0x1e: return "bs";
+          case 0x1a: return "bs"; /* latin */
+          case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN: return "bs_BA"; /* latin */
+          case 0x19: return "bs@cyrillic";
+          case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC: return "bs_BA@cyrillic";
+          }
+        return "hr";
+      case LANG_CZECH:
+        switch (sub)
+          {
+          case SUBLANG_CZECH_CZECH_REPUBLIC: return "cs_CZ";
+          }
+        return "cs";
+      case LANG_DANISH:
+        switch (sub)
+          {
+          case SUBLANG_DANISH_DENMARK: return "da_DK";
+          }
+        return "da";
+      case LANG_DARI:
+        /* FIXME: Adjust this when such locales appear on Unix.  */
+        switch (sub)
+          {
+          case SUBLANG_DARI_AFGHANISTAN: return "prs_AF";
+          }
+        return "prs";
+      case LANG_DIVEHI:
+        switch (sub)
+          {
+          case SUBLANG_DIVEHI_MALDIVES: return "dv_MV";
+          }
+        return "dv";
+      case LANG_DUTCH:
+        switch (sub)
+          {
+          case SUBLANG_DUTCH: return "nl_NL";
+          case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
+          case SUBLANG_DUTCH_SURINAM: return "nl_SR";
+          }
+        return "nl";
+      case LANG_EDO:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "bin_NG";
+          }
+        return "bin";
+      case LANG_ENGLISH:
+        switch (sub)
+          {
+          /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
+           * English was the language spoken in England.
+           * Oh well.
+           */
+          case SUBLANG_ENGLISH_US: return "en_US";
+          case SUBLANG_ENGLISH_UK: return "en_GB";
+          case SUBLANG_ENGLISH_AUS: return "en_AU";
+          case SUBLANG_ENGLISH_CAN: return "en_CA";
+          case SUBLANG_ENGLISH_NZ: return "en_NZ";
+          case SUBLANG_ENGLISH_EIRE: return "en_IE";
+          case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
+          case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
+          case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
+          case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
+          case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
+          case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
+          case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
+          case SUBLANG_ENGLISH_INDONESIA: return "en_ID";
+          case SUBLANG_ENGLISH_HONGKONG: return "en_HK";
+          case SUBLANG_ENGLISH_INDIA: return "en_IN";
+          case SUBLANG_ENGLISH_MALAYSIA: return "en_MY";
+          case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
+          }
+        return "en";
+      case LANG_ESTONIAN:
+        switch (sub)
+          {
+          case SUBLANG_ESTONIAN_ESTONIA: return "et_EE";
+          }
+        return "et";
+      case LANG_FAEROESE:
+        switch (sub)
+          {
+          case SUBLANG_FAEROESE_FAROE_ISLANDS: return "fo_FO";
+          }
+        return "fo";
+      case LANG_FARSI:
+        switch (sub)
+          {
+          case SUBLANG_FARSI_IRAN: return "fa_IR";
+          }
+        return "fa";
+      case LANG_FINNISH:
+        switch (sub)
+          {
+          case SUBLANG_FINNISH_FINLAND: return "fi_FI";
+          }
+        return "fi";
+      case LANG_FRENCH:
+        switch (sub)
+          {
+          case SUBLANG_FRENCH: return "fr_FR";
+          case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
+          case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
+          case SUBLANG_FRENCH_SWISS: return "fr_CH";
+          case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
+          case SUBLANG_FRENCH_MONACO: return "fr_MC";
+          case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */
+          case SUBLANG_FRENCH_REUNION: return "fr_RE";
+          case SUBLANG_FRENCH_CONGO: return "fr_CG";
+          case SUBLANG_FRENCH_SENEGAL: return "fr_SN";
+          case SUBLANG_FRENCH_CAMEROON: return "fr_CM";
+          case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI";
+          case SUBLANG_FRENCH_MALI: return "fr_ML";
+          case SUBLANG_FRENCH_MOROCCO: return "fr_MA";
+          case SUBLANG_FRENCH_HAITI: return "fr_HT";
+          }
+        return "fr";
+      case LANG_FRISIAN:
+        switch (sub)
+          {
+          case SUBLANG_FRISIAN_NETHERLANDS: return "fy_NL";
+          }
+        return "fy";
+      case LANG_FULFULDE:
+        /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin.  */
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "ff_NG";
+          }
+        return "ff";
+      case LANG_GAELIC:
+        switch (sub)
+          {
+          case 0x01: /* SCOTTISH */
+            /* old, superseded by LANG_SCOTTISH_GAELIC */
+            return "gd_GB";
+          case SUBLANG_IRISH_IRELAND: return "ga_IE";
+          }
+        return "ga";
+      case LANG_GALICIAN:
+        switch (sub)
+          {
+          case SUBLANG_GALICIAN_SPAIN: return "gl_ES";
+          }
+        return "gl";
+      case LANG_GEORGIAN:
+        switch (sub)
+          {
+          case SUBLANG_GEORGIAN_GEORGIA: return "ka_GE";
+          }
+        return "ka";
+      case LANG_GERMAN:
+        switch (sub)
+          {
+          case SUBLANG_GERMAN: return "de_DE";
+          case SUBLANG_GERMAN_SWISS: return "de_CH";
+          case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
+          case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
+          case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
+          }
+        return "de";
+      case LANG_GREEK:
+        switch (sub)
+          {
+          case SUBLANG_GREEK_GREECE: return "el_GR";
+          }
+        return "el";
+      case LANG_GREENLANDIC:
+        switch (sub)
+          {
+          case SUBLANG_GREENLANDIC_GREENLAND: return "kl_GL";
+          }
+        return "kl";
+      case LANG_GUARANI:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "gn_PY";
+          }
+        return "gn";
+      case LANG_GUJARATI:
+        switch (sub)
+          {
+          case SUBLANG_GUJARATI_INDIA: return "gu_IN";
+          }
+        return "gu";
+      case LANG_HAUSA:
+        switch (sub)
+          {
+          case 0x1f: return "ha";
+          case SUBLANG_HAUSA_NIGERIA_LATIN: return "ha_NG";
+          }
+        return "ha";
+      case LANG_HAWAIIAN:
+        /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
+           or Hawaii Creole English ("cpe_US", 600000 speakers)?  */
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "cpe_US";
+          }
+        return "cpe";
+      case LANG_HEBREW:
+        switch (sub)
+          {
+          case SUBLANG_HEBREW_ISRAEL: return "he_IL";
+          }
+        return "he";
+      case LANG_HINDI:
+        switch (sub)
+          {
+          case SUBLANG_HINDI_INDIA: return "hi_IN";
+          }
+        return "hi";
+      case LANG_HUNGARIAN:
+        switch (sub)
+          {
+          case SUBLANG_HUNGARIAN_HUNGARY: return "hu_HU";
+          }
+        return "hu";
+      case LANG_IBIBIO:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "nic_NG";
+          }
+        return "nic";
+      case LANG_ICELANDIC:
+        switch (sub)
+          {
+          case SUBLANG_ICELANDIC_ICELAND: return "is_IS";
+          }
+        return "is";
+      case LANG_IGBO:
+        switch (sub)
+          {
+          case SUBLANG_IGBO_NIGERIA: return "ig_NG";
+          }
+        return "ig";
+      case LANG_INDONESIAN:
+        switch (sub)
+          {
+          case SUBLANG_INDONESIAN_INDONESIA: return "id_ID";
+          }
+        return "id";
+      case LANG_INUKTITUT:
+        switch (sub)
+          {
+          case 0x1e: return "iu"; /* syllabic */
+          case SUBLANG_INUKTITUT_CANADA: return "iu_CA"; /* syllabic */
+          case 0x1f: return "iu@latin";
+          case SUBLANG_INUKTITUT_CANADA_LATIN: return "iu_CA@latin";
+          }
+        return "iu";
+      case LANG_ITALIAN:
+        switch (sub)
+          {
+          case SUBLANG_ITALIAN: return "it_IT";
+          case SUBLANG_ITALIAN_SWISS: return "it_CH";
+          }
+        return "it";
+      case LANG_JAPANESE:
+        switch (sub)
+          {
+          case SUBLANG_JAPANESE_JAPAN: return "ja_JP";
+          }
+        return "ja";
+      case LANG_KANNADA:
+        switch (sub)
+          {
+          case SUBLANG_KANNADA_INDIA: return "kn_IN";
+          }
+        return "kn";
+      case LANG_KANURI:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "kr_NG";
+          }
+        return "kr";
+      case LANG_KASHMIRI:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "ks_PK";
+          case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
+          }
+        return "ks";
+      case LANG_KAZAK:
+        switch (sub)
+          {
+          case SUBLANG_KAZAK_KAZAKHSTAN: return "kk_KZ";
+          }
+        return "kk";
+      case LANG_KICHE:
+        /* FIXME: Adjust this when such locales appear on Unix.  */
+        switch (sub)
+          {
+          case SUBLANG_KICHE_GUATEMALA: return "qut_GT";
+          }
+        return "qut";
+      case LANG_KINYARWANDA:
+        switch (sub)
+          {
+          case SUBLANG_KINYARWANDA_RWANDA: return "rw_RW";
+          }
+        return "rw";
+      case LANG_KONKANI:
+        /* FIXME: Adjust this when such locales appear on Unix.  */
+        switch (sub)
+          {
+          case SUBLANG_KONKANI_INDIA: return "kok_IN";
+          }
+        return "kok";
+      case LANG_KOREAN:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "ko_KR";
+          }
+        return "ko";
+      case LANG_KYRGYZ:
+        switch (sub)
+          {
+          case SUBLANG_KYRGYZ_KYRGYZSTAN: return "ky_KG";
+          }
+        return "ky";
+      case LANG_LAO:
+        switch (sub)
+          {
+          case SUBLANG_LAO_LAOS: return "lo_LA";
+          }
+        return "lo";
+      case LANG_LATIN:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "la_VA";
+          }
+        return "la";
+      case LANG_LATVIAN:
+        switch (sub)
+          {
+          case SUBLANG_LATVIAN_LATVIA: return "lv_LV";
+          }
+        return "lv";
+      case LANG_LITHUANIAN:
+        switch (sub)
+          {
+          case SUBLANG_LITHUANIAN_LITHUANIA: return "lt_LT";
+          }
+        return "lt";
+      case LANG_LUXEMBOURGISH:
+        switch (sub)
+          {
+          case SUBLANG_LUXEMBOURGISH_LUXEMBOURG: return "lb_LU";
+          }
+        return "lb";
+      case LANG_MACEDONIAN:
+        switch (sub)
+          {
+          case SUBLANG_MACEDONIAN_MACEDONIA: return "mk_MK";
+          }
+        return "mk";
+      case LANG_MALAY:
+        switch (sub)
+          {
+          case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
+          case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
+          }
+        return "ms";
+      case LANG_MALAYALAM:
+        switch (sub)
+          {
+          case SUBLANG_MALAYALAM_INDIA: return "ml_IN";
+          }
+        return "ml";
+      case LANG_MALTESE:
+        switch (sub)
+          {
+          case SUBLANG_MALTESE_MALTA: return "mt_MT";
+          }
+        return "mt";
+      case LANG_MANIPURI:
+        /* FIXME: Adjust this when such locales appear on Unix.  */
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "mni_IN";
+          }
+        return "mni";
+      case LANG_MAORI:
+        switch (sub)
+          {
+          case SUBLANG_MAORI_NEW_ZEALAND: return "mi_NZ";
+          }
+        return "mi";
+      case LANG_MAPUDUNGUN:
+        switch (sub)
+          {
+          case SUBLANG_MAPUDUNGUN_CHILE: return "arn_CL";
+          }
+        return "arn";
+      case LANG_MARATHI:
+        switch (sub)
+          {
+          case SUBLANG_MARATHI_INDIA: return "mr_IN";
+          }
+        return "mr";
+      case LANG_MOHAWK:
+        switch (sub)
+          {
+          case SUBLANG_MOHAWK_CANADA: return "moh_CA";
+          }
+        return "moh";
+      case LANG_MONGOLIAN:
+        switch (sub)
+          {
+          case SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA: case 0x1e: return "mn_MN";
+          case SUBLANG_MONGOLIAN_PRC: case 0x1f: return "mn_CN";
+          }
+        return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN".  */
+      case LANG_NEPALI:
+        switch (sub)
+          {
+          case SUBLANG_NEPALI_NEPAL: return "ne_NP";
+          case SUBLANG_NEPALI_INDIA: return "ne_IN";
+          }
+        return "ne";
+      case LANG_NORWEGIAN:
+        switch (sub)
+          {
+          case 0x1f: return "nb";
+          case SUBLANG_NORWEGIAN_BOKMAL: return "nb_NO";
+          case 0x1e: return "nn";
+          case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
+          }
+        return "no";
+      case LANG_OCCITAN:
+        switch (sub)
+          {
+          case SUBLANG_OCCITAN_FRANCE: return "oc_FR";
+          }
+        return "oc";
+      case LANG_ORIYA:
+        switch (sub)
+          {
+          case SUBLANG_ORIYA_INDIA: return "or_IN";
+          }
+        return "or";
+      case LANG_OROMO:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "om_ET";
+          }
+        return "om";
+      case LANG_PAPIAMENTU:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "pap_AN";
+          }
+        return "pap";
+      case LANG_PASHTO:
+        switch (sub)
+          {
+          case SUBLANG_PASHTO_AFGHANISTAN: return "ps_AF";
+          }
+        return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF".  */
+      case LANG_POLISH:
+        switch (sub)
+          {
+          case SUBLANG_POLISH_POLAND: return "pl_PL";
+          }
+        return "pl";
+      case LANG_PORTUGUESE:
+        switch (sub)
+          {
+          /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
+             Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
+          case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
+          case SUBLANG_PORTUGUESE: return "pt_PT";
+          }
+        return "pt";
+      case LANG_PUNJABI:
+        switch (sub)
+          {
+          case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
+          case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
+          }
+        return "pa";
+      case LANG_QUECHUA:
+        /* Note: Microsoft uses the non-ISO language code "quz".  */
+        switch (sub)
+          {
+          case SUBLANG_QUECHUA_BOLIVIA: return "qu_BO";
+          case SUBLANG_QUECHUA_ECUADOR: return "qu_EC";
+          case SUBLANG_QUECHUA_PERU: return "qu_PE";
+          }
+        return "qu";
+      case LANG_ROMANIAN:
+        switch (sub)
+          {
+          case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
+          case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
+          }
+        return "ro";
+      case LANG_ROMANSH:
+        switch (sub)
+          {
+          case SUBLANG_ROMANSH_SWITZERLAND: return "rm_CH";
+          }
+        return "rm";
+      case LANG_RUSSIAN:
+        switch (sub)
+          {
+          case SUBLANG_RUSSIAN_RUSSIA: return "ru_RU";
+          case SUBLANG_RUSSIAN_MOLDAVIA: return "ru_MD";
+          }
+        return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD".  */
+      case LANG_SAMI:
+        switch (sub)
+          {
+          /* Northern Sami */
+          case 0x00: return "se";
+          case SUBLANG_SAMI_NORTHERN_NORWAY: return "se_NO";
+          case SUBLANG_SAMI_NORTHERN_SWEDEN: return "se_SE";
+          case SUBLANG_SAMI_NORTHERN_FINLAND: return "se_FI";
+          /* Lule Sami */
+          case 0x1f: return "smj";
+          case SUBLANG_SAMI_LULE_NORWAY: return "smj_NO";
+          case SUBLANG_SAMI_LULE_SWEDEN: return "smj_SE";
+          /* Southern Sami */
+          case 0x1e: return "sma";
+          case SUBLANG_SAMI_SOUTHERN_NORWAY: return "sma_NO";
+          case SUBLANG_SAMI_SOUTHERN_SWEDEN: return "sma_SE";
+          /* Skolt Sami */
+          case 0x1d: return "sms";
+          case SUBLANG_SAMI_SKOLT_FINLAND: return "sms_FI";
+          /* Inari Sami */
+          case 0x1c: return "smn";
+          case SUBLANG_SAMI_INARI_FINLAND: return "smn_FI";
+          }
+        return "se"; /* or "smi"? */
+      case LANG_SANSKRIT:
+        switch (sub)
+          {
+          case SUBLANG_SANSKRIT_INDIA: return "sa_IN";
+          }
+        return "sa";
+      case LANG_SCOTTISH_GAELIC:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "gd_GB";
+          }
+        return "gd";
+      case LANG_SINDHI:
+        switch (sub)
+          {
+          case SUBLANG_SINDHI_INDIA: return "sd_IN";
+          case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
+          /*case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF";*/
+          }
+        return "sd";
+      case LANG_SINHALESE:
+        switch (sub)
+          {
+          case SUBLANG_SINHALESE_SRI_LANKA: return "si_LK";
+          }
+        return "si";
+      case LANG_SLOVAK:
+        switch (sub)
+          {
+          case SUBLANG_SLOVAK_SLOVAKIA: return "sk_SK";
+          }
+        return "sk";
+      case LANG_SLOVENIAN:
+        switch (sub)
+          {
+          case SUBLANG_SLOVENIAN_SLOVENIA: return "sl_SI";
+          }
+        return "sl";
+      case LANG_SOMALI:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "so_SO";
+          }
+        return "so";
+      case LANG_SORBIAN:
+        /* FIXME: Adjust this when such locales appear on Unix.  */
+        switch (sub)
+          {
+          /* Upper Sorbian */
+          case 0x00: return "hsb";
+          case SUBLANG_UPPER_SORBIAN_GERMANY: return "hsb_DE";
+          /* Lower Sorbian */
+          case 0x1f: return "dsb";
+          case SUBLANG_LOWER_SORBIAN_GERMANY: return "dsb_DE";
+          }
+        return "wen";
+      case LANG_SOTHO:
+        /* <http://www.microsoft.com/globaldev/reference/lcid-all.mspx> calls
+           it "Sepedi"; according to
+           <http://www.ethnologue.com/show_language.asp?code=nso>
+           <http://www.ethnologue.com/show_language.asp?code=sot>
+           it's the same as Northern Sotho.  */
+        switch (sub)
+          {
+          case SUBLANG_SOTHO_SOUTH_AFRICA: return "nso_ZA";
+          }
+        return "nso";
+      case LANG_SPANISH:
+        switch (sub)
+          {
+          case SUBLANG_SPANISH: return "es_ES";
+          case SUBLANG_SPANISH_MEXICAN: return "es_MX";
+          case SUBLANG_SPANISH_MODERN:
+            return "es_ES@modern";      /* not seen on Unix */
+          case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
+          case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
+          case SUBLANG_SPANISH_PANAMA: return "es_PA";
+          case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
+          case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
+          case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
+          case SUBLANG_SPANISH_PERU: return "es_PE";
+          case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
+          case SUBLANG_SPANISH_ECUADOR: return "es_EC";
+          case SUBLANG_SPANISH_CHILE: return "es_CL";
+          case SUBLANG_SPANISH_URUGUAY: return "es_UY";
+          case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
+          case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
+          case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
+          case SUBLANG_SPANISH_HONDURAS: return "es_HN";
+          case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
+          case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
+          case SUBLANG_SPANISH_US: return "es_US";
+          }
+        return "es";
+      case LANG_SUTU:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
+          }
+        return "bnt";
+      case LANG_SWAHILI:
+        switch (sub)
+          {
+          case SUBLANG_SWAHILI_KENYA: return "sw_KE";
+          }
+        return "sw";
+      case LANG_SWEDISH:
+        switch (sub)
+          {
+          case SUBLANG_SWEDISH_SWEDEN: return "sv_SE";
+          case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
+          }
+        return "sv";
+      case LANG_SYRIAC:
+        switch (sub)
+          {
+          case SUBLANG_SYRIAC_SYRIA: return "syr_SY"; /* An extinct language.  */
+          }
+        return "syr";
+      case LANG_TAGALOG:
+        switch (sub)
+          {
+          case SUBLANG_TAGALOG_PHILIPPINES: return "tl_PH"; /* or "fil_PH"? */
+          }
+        return "tl"; /* or "fil"? */
+      case LANG_TAJIK:
+        switch (sub)
+          {
+          case 0x1f: return "tg";
+          case SUBLANG_TAJIK_TAJIKISTAN: return "tg_TJ";
+          }
+        return "tg";
+      case LANG_TAMAZIGHT:
+        /* Note: Microsoft uses the non-ISO language code "tmz".  */
+        switch (sub)
+          {
+          /* FIXME: Adjust this when Tamazight locales appear on Unix.  */
+          case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
+          case 0x1f: return "ber@latin";
+          case SUBLANG_TAMAZIGHT_ALGERIA_LATIN: return "ber_DZ@latin";
+          }
+        return "ber";
+      case LANG_TAMIL:
+        switch (sub)
+          {
+          case SUBLANG_TAMIL_INDIA: return "ta_IN";
+          }
+        return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG".  */
+      case LANG_TATAR:
+        switch (sub)
+          {
+          case SUBLANG_TATAR_RUSSIA: return "tt_RU";
+          }
+        return "tt";
+      case LANG_TELUGU:
+        switch (sub)
+          {
+          case SUBLANG_TELUGU_INDIA: return "te_IN";
+          }
+        return "te";
+      case LANG_THAI:
+        switch (sub)
+          {
+          case SUBLANG_THAI_THAILAND: return "th_TH";
+          }
+        return "th";
+      case LANG_TIBETAN:
+        switch (sub)
+          {
+          case SUBLANG_TIBETAN_PRC:
+            /* Most Tibetans would not like "bo_CN".  But Tibet does not yet
+               have a country code of its own.  */
+            return "bo";
+          case SUBLANG_TIBETAN_BHUTAN: return "bo_BT";
+          }
+        return "bo";
+      case LANG_TIGRINYA:
+        switch (sub)
+          {
+          case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET";
+          case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
+          }
+        return "ti";
+      case LANG_TSONGA:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "ts_ZA";
+          }
+        return "ts";
+      case LANG_TSWANA:
+        /* Spoken in South Africa, Botswana.  */
+        switch (sub)
+          {
+          case SUBLANG_TSWANA_SOUTH_AFRICA: return "tn_ZA";
+          }
+        return "tn";
+      case LANG_TURKISH:
+        switch (sub)
+          {
+          case SUBLANG_TURKISH_TURKEY: return "tr_TR";
+          }
+        return "tr";
+      case LANG_TURKMEN:
+        switch (sub)
+          {
+          case SUBLANG_TURKMEN_TURKMENISTAN: return "tk_TM";
+          }
+        return "tk";
+      case LANG_UIGHUR:
+        switch (sub)
+          {
+          case SUBLANG_UIGHUR_PRC: return "ug_CN";
+          }
+        return "ug";
+      case LANG_UKRAINIAN:
+        switch (sub)
+          {
+          case SUBLANG_UKRAINIAN_UKRAINE: return "uk_UA";
+          }
+        return "uk";
+      case LANG_URDU:
+        switch (sub)
+          {
+          case SUBLANG_URDU_PAKISTAN: return "ur_PK";
+          case SUBLANG_URDU_INDIA: return "ur_IN";
+          }
+        return "ur";
+      case LANG_UZBEK:
+        switch (sub)
+          {
+          case 0x1f: return "uz";
+          case SUBLANG_UZBEK_LATIN: return "uz_UZ";
+          case 0x1e: return "uz@cyrillic";
+          case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
+          }
+        return "uz";
+      case LANG_VENDA:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "ve_ZA";
+          }
+        return "ve";
+      case LANG_VIETNAMESE:
+        switch (sub)
+          {
+          case SUBLANG_VIETNAMESE_VIETNAM: return "vi_VN";
+          }
+        return "vi";
+      case LANG_WELSH:
+        switch (sub)
+          {
+          case SUBLANG_WELSH_UNITED_KINGDOM: return "cy_GB";
+          }
+        return "cy";
+      case LANG_WOLOF:
+        switch (sub)
+          {
+          case SUBLANG_WOLOF_SENEGAL: return "wo_SN";
+          }
+        return "wo";
+      case LANG_XHOSA:
+        switch (sub)
+          {
+          case SUBLANG_XHOSA_SOUTH_AFRICA: return "xh_ZA";
+          }
+        return "xh";
+      case LANG_YAKUT:
+        switch (sub)
+          {
+          case SUBLANG_YAKUT_RUSSIA: return "sah_RU";
+          }
+        return "sah";
+      case LANG_YI:
+        switch (sub)
+          {
+          case SUBLANG_YI_PRC: return "ii_CN";
+          }
+        return "ii";
+      case LANG_YIDDISH:
+        switch (sub)
+          {
+          case SUBLANG_DEFAULT: return "yi_IL";
+          }
+        return "yi";
+      case LANG_YORUBA:
+        switch (sub)
+          {
+          case SUBLANG_YORUBA_NIGERIA: return "yo_NG";
+          }
+        return "yo";
+      case LANG_ZULU:
+        switch (sub)
+          {
+          case SUBLANG_ZULU_SOUTH_AFRICA: return "zu_ZA";
+          }
+        return "zu";
+      default: return "C";
+      }
+  }
+}
+
+# if !defined IN_LIBINTL
+static
+# endif
+const char *
+gl_locale_name_from_win32_LCID (LCID lcid)
+{
+  LANGID langid;
+
+  /* Strip off the sorting rules, keep only the language part.  */
+  langid = LANGIDFROMLCID (lcid);
+
+  return gl_locale_name_from_win32_LANGID (langid);
+}
+
+#endif
+
+
+#if HAVE_USELOCALE /* glibc or MacOS X */
+
+/* Simple hash set of strings.  We don't want to drag in lots of hash table
+   code here.  */
+
+# define SIZE_BITS (sizeof (size_t) * CHAR_BIT)
+
+/* A hash function for NUL-terminated char* strings using
+   the method described by Bruno Haible.
+   See http://www.haible.de/bruno/hashfunc.html.  */
+static size_t
+string_hash (const void *x)
+{
+  const char *s = (const char *) x;
+  size_t h = 0;
+
+  for (; *s; s++)
+    h = *s + ((h << 9) | (h >> (SIZE_BITS - 9)));
+
+  return h;
+}
+
+/* A hash table of fixed size.  Multiple threads can access it read-only
+   simultaneously, but only one thread can insert into it at the same time.  */
+
+/* A node in a hash bucket collision list.  */
+struct hash_node
+  {
+    struct hash_node * volatile next;
+    char contents[100]; /* has variable size */
+  };
+
+# define HASH_TABLE_SIZE 257
+static struct hash_node * volatile struniq_hash_table[HASH_TABLE_SIZE]
+  /* = { NULL, ..., NULL } */;
+
+/* This lock protects the struniq_hash_table against multiple simultaneous
+   insertions.  */
+gl_lock_define_initialized(static, struniq_lock)
+
+/* Store a copy of the given string in a string pool with indefinite extent.
+   Return a pointer to this copy.  */
+static const char *
+struniq (const char *string)
+{
+  size_t hashcode = string_hash (string);
+  size_t slot = hashcode % HASH_TABLE_SIZE;
+  size_t size;
+  struct hash_node *new_node;
+  struct hash_node *p;
+  for (p = struniq_hash_table[slot]; p != NULL; p = p->next)
+    if (strcmp (p->contents, string) == 0)
+      return p->contents;
+  size = strlen (string) + 1;
+  new_node =
+    (struct hash_node *)
+    malloc (offsetof (struct hash_node, contents[0]) + size);
+  if (new_node == NULL)
+    /* Out of memory.  Return a statically allocated string.  */
+    return "C";
+  memcpy (new_node->contents, string, size);
+  /* Lock while inserting new_node.  */
+  gl_lock_lock (struniq_lock);
+  /* Check whether another thread already added the string while we were
+     waiting on the lock.  */
+  for (p = struniq_hash_table[slot]; p != NULL; p = p->next)
+    if (strcmp (p->contents, string) == 0)
+      {
+        free (new_node);
+        new_node = p;
+        goto done;
+      }
+  /* Really insert new_node into the hash table.  Fill new_node entirely first,
+     because other threads may be iterating over the linked list.  */
+  new_node->next = struniq_hash_table[slot];
+  struniq_hash_table[slot] = new_node;
+ done:
+  /* Unlock after new_node is inserted.  */
+  gl_lock_unlock (struniq_lock);
+  return new_node->contents;
+}
+
+#endif
+
+
+#if defined IN_LIBINTL || HAVE_USELOCALE
+
+/* Like gl_locale_name_thread, except that the result is not in storage of
+   indefinite extent.  */
+# if !defined IN_LIBINTL
+static
+# endif
+const char *
+gl_locale_name_thread_unsafe (int category, const char *categoryname)
+{
+# if HAVE_USELOCALE
+  {
+    locale_t thread_locale = uselocale (NULL);
+    if (thread_locale != LC_GLOBAL_LOCALE)
+      {
+#  if __GLIBC__ >= 2 && !defined __UCLIBC__
+        /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
+           glibc < 2.12.
+           See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>.  */
+        const char *name =
+          nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1)));
+        if (name[0] == '\0')
+          /* Fallback code for glibc < 2.4, which did not implement
+             nl_langinfo (_NL_LOCALE_NAME (category)).  */
+          name = thread_locale->__names[category];
+        return name;
+#  endif
+#  if defined __APPLE__ && defined __MACH__ /* MacOS X */
+        /* The locale name is found deep in an undocumented data structure.
+           Since it's stored in a buffer of size 32 and newlocale() rejects
+           locale names of length > 31, we can assume that it is NUL terminated
+           in this buffer. But we need to make a copy of the locale name, of
+           indefinite extent.  */
+        struct _xlocale_part1_v0 /* used in MacOS X 10.5 */
+          {
+            int32_t __refcount;
+            void (*__free_extra)(void *);
+            __darwin_mbstate_t __mbs[10];
+            int64_t __magic;
+          };
+        struct _xlocale_part1_v1 /* used in MacOS X >= 10.6.0 */
+          {
+            int32_t __refcount;
+            void (*__free_extra)(void *);
+            __darwin_mbstate_t __mbs[10];
+            /*pthread_lock_t*/ int __lock;
+            int64_t __magic;
+          };
+        struct _xlocale_part2
+          {
+            int64_t __magic;
+            unsigned char __collate_load_error;
+            unsigned char __collate_substitute_nontrivial;
+            unsigned char _messages_using_locale;
+            unsigned char _monetary_using_locale;
+            unsigned char _numeric_using_locale;
+            unsigned char _time_using_locale;
+            unsigned char __mlocale_changed;
+            unsigned char __nlocale_changed;
+            unsigned char __numeric_fp_cvt;
+            struct __xlocale_st_collate *__lc_collate;
+            struct __xlocale_st_runelocale *__lc_ctype;
+            struct __xlocale_st_messages *__lc_messages;
+            struct __xlocale_st_monetary *__lc_monetary;
+            struct __xlocale_st_numeric *__lc_numeric;
+            struct _xlocale *__lc_numeric_loc;
+            struct __xlocale_st_time *__lc_time;
+            /* more */
+          };
+        struct __xlocale_st_collate
+          {
+            int32_t __refcount;
+            void (*__free_extra)(void *);
+            char __encoding[32];
+            /* more */
+          };
+        struct __xlocale_st_runelocale
+          {
+            int32_t __refcount;
+            void (*__free_extra)(void *);
+            char __ctype_encoding[32];
+            /* more */
+          };
+        struct __xlocale_st_messages
+          {
+            int32_t __refcount;
+            void (*__free_extra)(void *);
+            char *_messages_locale_buf;
+            /* more */
+          };
+        struct __xlocale_st_monetary
+          {
+            int32_t __refcount;
+            void (*__free_extra)(void *);
+            char *_monetary_locale_buf;
+            /* more */
+          };
+        struct __xlocale_st_numeric {
+            int32_t __refcount;
+            void (*__free_extra)(void *);
+            char *_numeric_locale_buf;
+            /* more */
+          };
+        struct __xlocale_st_time {
+            int32_t __refcount;
+            void (*__free_extra)(void *);
+            char *_time_locale_buf;
+            /* more */
+          };
+        struct _xlocale_part2 *tlp;
+        if (((struct _xlocale_part1_v0 *) thread_locale)->__magic
+            == 0x786C6F63616C6530LL)
+          /* MacOS X 10.5 */
+          tlp =
+            (struct _xlocale_part2 *)
+            &((struct _xlocale_part1_v0 *) thread_locale)->__magic;
+        else if (((struct _xlocale_part1_v1 *) thread_locale)->__magic
+                 == 0x786C6F63616C6530LL)
+          /* MacOS X >= 10.6.0 */
+          tlp =
+            (struct _xlocale_part2 *)
+            &((struct _xlocale_part1_v1 *) thread_locale)->__magic;
+        else
+          /* Unsupported version of MacOS X: The internals of 'struct _xlocale'
+             have changed again.  */
+          return "";
+        switch (category)
+          {
+          case LC_CTYPE:
+            return tlp->__lc_ctype->__ctype_encoding;
+          case LC_NUMERIC:
+            return tlp->_numeric_using_locale
+                   ? tlp->__lc_numeric->_numeric_locale_buf
+                   : "C";
+          case LC_TIME:
+            return tlp->_time_using_locale
+                   ? tlp->__lc_time->_time_locale_buf
+                   : "C";
+          case LC_COLLATE:
+            return !tlp->__collate_load_error
+                   ? tlp->__lc_collate->__encoding
+                   : "C";
+          case LC_MONETARY:
+            return tlp->_monetary_using_locale
+                   ? tlp->__lc_monetary->_monetary_locale_buf
+                   : "C";
+          case LC_MESSAGES:
+            return tlp->_messages_using_locale
+                   ? tlp->__lc_messages->_messages_locale_buf
+                   : "C";
+          default: /* We shouldn't get here.  */
+            return "";
+          }
+#  endif
+      }
+  }
+# endif
+  return NULL;
+}
+
+#endif
+
+const char *
+gl_locale_name_thread (int category, const char *categoryname)
+{
+#if HAVE_USELOCALE
+  const char *name = gl_locale_name_thread_unsafe (category, categoryname);
+  if (name != NULL)
+    return struniq (name);
+#endif
+  return NULL;
+}
+
+/* XPG3 defines the result of 'setlocale (category, NULL)' as:
+   "Directs 'setlocale()' to query 'category' and return the current
+    setting of 'local'."
+   However it does not specify the exact format.  Neither do SUSV2 and
+   ISO C 99.  So we can use this feature only on selected systems (e.g.
+   those using GNU C Library).  */
+#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__)
+# define HAVE_LOCALE_NULL
+#endif
+
+const char *
+gl_locale_name_posix (int category, const char *categoryname)
+{
+  /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
+     On some systems this can be done by the 'setlocale' function itself.  */
+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+  return setlocale (category, NULL);
+#else
+  /* On other systems we ignore what setlocale reports and instead look at the
+     environment variables directly.  This is necessary
+       1. on systems which have a facility for customizing the default locale
+          (MacOS X, native Windows, Cygwin) and where the system's setlocale()
+          function ignores this default locale (MacOS X, Cygwin), in two cases:
+          a. when the user missed to use the setlocale() override from libintl
+             (for example by not including <libintl.h>),
+          b. when setlocale supports only the "C" locale, such as on Cygwin
+             1.5.x.  In this case even the override from libintl cannot help.
+       2. on all systems where setlocale supports only the "C" locale.  */
+  /* Strictly speaking, it is a POSIX violation to look at the environment
+     variables regardless whether setlocale has been called or not.  POSIX
+     says:
+         "For C-language programs, the POSIX locale shall be the
+          default locale when the setlocale() function is not called."
+     But we assume that all programs that use internationalized APIs call
+     setlocale (LC_ALL, "").  */
+  return gl_locale_name_environ (category, categoryname);
+#endif
+}
+
+const char *
+gl_locale_name_environ (int category, const char *categoryname)
+{
+  const char *retval;
+
+  /* Setting of LC_ALL overrides all other.  */
+  retval = getenv ("LC_ALL");
+  if (retval != NULL && retval[0] != '\0')
+    return retval;
+  /* Next comes the name of the desired category.  */
+  retval = getenv (categoryname);
+  if (retval != NULL && retval[0] != '\0')
+    return retval;
+  /* Last possibility is the LANG environment variable.  */
+  retval = getenv ("LANG");
+  if (retval != NULL && retval[0] != '\0')
+    {
+#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+      /* MacOS X 10.2 or newer.
+         Ignore invalid LANG value set by the Terminal application.  */
+      if (strcmp (retval, "UTF-8") != 0)
+#endif
+#if defined __CYGWIN__
+      /* Cygwin.
+         Ignore dummy LANG value set by ~/.profile.  */
+      if (strcmp (retval, "C.UTF-8") != 0)
+#endif
+        return retval;
+    }
+
+  return NULL;
+}
+
+const char *
+gl_locale_name_default (void)
+{
+  /* POSIX:2001 says:
+     "All implementations shall define a locale as the default locale, to be
+      invoked when no environment variables are set, or set to the empty
+      string.  This default locale can be the POSIX locale or any other
+      implementation-defined locale.  Some implementations may provide
+      facilities for local installation administrators to set the default
+      locale, customizing it for each location.  POSIX:2001 does not require
+      such a facility.
+
+     The systems with such a facility are MacOS X and Windows: They provide a
+     GUI that allows the user to choose a locale.
+       - On MacOS X, by default, none of LC_* or LANG are set.  Starting with
+         MacOS X 10.4 or 10.5, LANG is set for processes launched by the
+         'Terminal' application (but sometimes to an incorrect value "UTF-8").
+         When no environment variable is set, setlocale (LC_ALL, "") uses the
+         "C" locale.
+       - On native Windows, by default, none of LC_* or LANG are set.
+         When no environment variable is set, setlocale (LC_ALL, "") uses the
+         locale chosen by the user.
+       - On Cygwin 1.5.x, by default, none of LC_* or LANG are set.
+         When no environment variable is set, setlocale (LC_ALL, "") uses the
+         "C" locale.
+       - On Cygwin 1.7, by default, LANG is set to "C.UTF-8" when the default
+         ~/.profile is executed.
+         When no environment variable is set, setlocale (LC_ALL, "") uses the
+         "C.UTF-8" locale, which operates in the same way as the "C" locale.
+  */
+
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WIN32_NATIVE || defined __CYGWIN__)
+
+  /* The system does not have a way of setting the locale, other than the
+     POSIX specified environment variables.  We use C as default locale.  */
+  return "C";
+
+#else
+
+  /* Return an XPG style locale name language[_territory][@modifier].
+     Don't even bother determining the codeset; it's not useful in this
+     context, because message catalogs are not specific to a single
+     codeset.  */
+
+# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+  /* MacOS X 10.2 or newer */
+  {
+    /* Cache the locale name, since CoreFoundation calls are expensive.  */
+    static const char *cached_localename;
+
+    if (cached_localename == NULL)
+      {
+        char namebuf[256];
+#  if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */
+        CFLocaleRef locale = CFLocaleCopyCurrent ();
+        CFStringRef name = CFLocaleGetIdentifier (locale);
+
+        if (CFStringGetCString (name, namebuf, sizeof (namebuf),
+                                kCFStringEncodingASCII))
+          {
+            gl_locale_name_canonicalize (namebuf);
+            cached_localename = strdup (namebuf);
+          }
+        CFRelease (locale);
+#  elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */
+        CFTypeRef value =
+          CFPreferencesCopyAppValue (CFSTR ("AppleLocale"),
+                                     kCFPreferencesCurrentApplication);
+        if (value != NULL
+            && CFGetTypeID (value) == CFStringGetTypeID ()
+            && CFStringGetCString ((CFStringRef)value,
+                                   namebuf, sizeof (namebuf),
+                                   kCFStringEncodingASCII))
+          {
+            gl_locale_name_canonicalize (namebuf);
+            cached_localename = strdup (namebuf);
+          }
+#  endif
+        if (cached_localename == NULL)
+          cached_localename = "C";
+      }
+    return cached_localename;
+  }
+
+# endif
+
+# if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
+  {
+    LCID lcid;
+
+    /* Use native Win32 API locale ID.  */
+    lcid = GetThreadLocale ();
+
+    return gl_locale_name_from_win32_LCID (lcid);
+  }
+# endif
+#endif
+}
+
+/* Determine the current locale's name, and canonicalize it into XPG syntax
+     language[_territory][.codeset][@modifier]
+   The codeset part in the result is not reliable; the locale_charset()
+   should be used for codeset information instead.
+   The result must not be freed; it is statically allocated.  */
+
+const char *
+gl_locale_name (int category, const char *categoryname)
+{
+  const char *retval;
+
+  retval = gl_locale_name_thread (category, categoryname);
+  if (retval != NULL)
+    return retval;
+
+  retval = gl_locale_name_posix (category, categoryname);
+  if (retval != NULL)
+    return retval;
+
+  return gl_locale_name_default ();
+}
diff --git a/tests/localename.h b/tests/localename.h
new file mode 100644 (file)
index 0000000..e754853
--- /dev/null
@@ -0,0 +1,97 @@
+/* Determine name of the currently selected locale.
+   Copyright (C) 2007, 2009-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, 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, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+   USA.  */
+
+#ifndef _GL_LOCALENAME_H
+#define _GL_LOCALENAME_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Determine the current locale's name.
+   It considers both the POSIX notion of locale name (see functions
+   gl_locale_name_thread and gl_locale_name_posix) and the system notion
+   of locale name (see function gl_locale_name_default).
+   CATEGORY is a locale category abbreviation, as defined in <locale.h>,
+   but not LC_ALL. E.g. LC_MESSAGES.
+   CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES".
+   Return the locale category's name, canonicalized into XPG syntax
+     language[_territory][.codeset][@modifier]
+   The codeset part in the result is not reliable; the locale_charset()
+   should be used for codeset information instead.
+   The result must not be freed; it is statically allocated.  */
+extern const char * gl_locale_name (int category, const char *categoryname);
+
+/* Determine the current per-thread locale's name, as specified by uselocale()
+   calls.
+   CATEGORY is a locale category abbreviation, as defined in <locale.h>,
+   but not LC_ALL. E.g. LC_MESSAGES.
+   CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES".
+   Return the locale category's name, canonicalized into XPG syntax
+     language[_territory][.codeset][@modifier]
+   or NULL if no locale has been specified for the current thread.
+   The codeset part in the result is not reliable; the locale_charset()
+   should be used for codeset information instead.
+   The result must not be freed; it is statically allocated.  */
+extern const char * gl_locale_name_thread (int category, const char *categoryname);
+
+/* Determine the thread-independent current locale's name, as specified by
+   setlocale() calls or by environment variables.
+   CATEGORY is a locale category abbreviation, as defined in <locale.h>,
+   but not LC_ALL. E.g. LC_MESSAGES.
+   CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES".
+   Return the locale category's name, canonicalized into XPG syntax
+     language[_territory][.codeset][@modifier]
+   or NULL if no locale has been specified to setlocale() or by environment
+   variables.
+   The codeset part in the result is not reliable; the locale_charset()
+   should be used for codeset information instead.
+   The result must not be freed; it is statically allocated.  */
+extern const char * gl_locale_name_posix (int category, const char *categoryname);
+
+/* Determine the default locale's name, as specified by environment
+   variables.
+   Return the locale category's name, or NULL if no locale has been specified
+   by environment variables.
+   The result must not be freed; it is statically allocated.  */
+extern const char * gl_locale_name_environ (int category, const char *categoryname);
+
+/* Determine the default locale's name.  This is the current locale's name,
+   if not specified by uselocale() calls, by setlocale() calls, or by
+   environment variables.  This locale name is usually determined by systems
+   settings that the user can manipulate through a GUI.
+
+   Quoting POSIX:2001:
+     "All implementations shall define a locale as the default locale,
+      to be invoked when no environment variables are set, or set to the
+      empty string.  This default locale can be the C locale or any other
+      implementation-defined locale.  Some implementations may provide
+      facilities for local installation administrators to set the default
+      locale, customizing it for each location.  IEEE Std 1003.1-2001 does
+      not require such a facility."
+
+   The result must not be freed; it is statically allocated.  */
+extern const char * gl_locale_name_default (void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_LOCALENAME_H */
diff --git a/tests/macros.h b/tests/macros.h
new file mode 100644 (file)
index 0000000..8922675
--- /dev/null
@@ -0,0 +1,64 @@
+/* Common macros used by gnulib tests.
+   Copyright (C) 2006-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 contains macros that are used by many gnulib tests.
+   Put here only frequently used macros, say, used by 10 tests or more.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Define ASSERT_STREAM before including this file if ASSERT must
+   target a stream other than stderr.  */
+#ifndef ASSERT_STREAM
+# define ASSERT_STREAM stderr
+#endif
+
+/* ASSERT (condition);
+   verifies that the specified condition is fulfilled.  If not, a message
+   is printed to ASSERT_STREAM if defined (defaulting to stderr if
+   undefined) and the program is terminated with an error code.
+
+   This macro has the following properties:
+     - The programmer specifies the expected condition, not the failure
+       condition.  This simplifies thinking.
+     - The condition is tested always, regardless of compilation flags.
+       (Unlike the macro from <assert.h>.)
+     - On Unix platforms, the tester can debug the test program with a
+       debugger (provided core dumps are enabled: "ulimit -c unlimited").
+     - For the sake of platforms where no debugger is available (such as
+       some mingw systems), an error message is printed on the error
+       stream that includes the source location of the ASSERT invocation.
+ */
+#define ASSERT(expr) \
+  do                                                                         \
+    {                                                                        \
+      if (!(expr))                                                           \
+        {                                                                    \
+          fprintf (ASSERT_STREAM, "%s:%d: assertion failed\n",               \
+                   __FILE__, __LINE__);                                      \
+          fflush (ASSERT_STREAM);                                            \
+          abort ();                                                          \
+        }                                                                    \
+    }                                                                        \
+  while (0)
+
+/* SIZEOF (array)
+   returns the number of elements of an array.  It works for arrays that are
+   declared outside functions and for local variables of array type.  It does
+   *not* work for function parameters of array type, because they are actually
+   parameters of pointer type.  */
+#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
diff --git a/tests/mgetgroups.c b/tests/mgetgroups.c
new file mode 100644 (file)
index 0000000..5c79915
--- /dev/null
@@ -0,0 +1,206 @@
+/* mgetgroups.c -- return a list of the groups a user or current process is in
+
+   Copyright (C) 2007-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/>.  */
+
+/* Extracted from coreutils' src/id.c. */
+
+#include <config.h>
+
+#include "mgetgroups.h"
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdint.h>
+#include <string.h>
+#include <errno.h>
+#if HAVE_GETGROUPLIST
+# include <grp.h>
+#endif
+
+#include "getugroups.h"
+#include "xalloc.h"
+
+static gid_t *
+realloc_groupbuf (gid_t *g, size_t num)
+{
+  if (xalloc_oversized (num, sizeof *g))
+    {
+      errno = ENOMEM;
+      return NULL;
+    }
+
+  return realloc (g, num * sizeof *g);
+}
+
+/* Like getugroups, but store the result in malloc'd storage.
+   Set *GROUPS to the malloc'd list of all group IDs of which USERNAME
+   is a member.  If GID is not -1, store it first.  GID should be the
+   group ID (pw_gid) obtained from getpwuid, in case USERNAME is not
+   listed in the groups database (e.g., /etc/groups).  If USERNAME is
+   NULL, store the supplementary groups of the current process, and GID
+   should be -1 or the effective group ID (getegid).  Upon failure,
+   don't modify *GROUPS, set errno, and return -1.  Otherwise, return
+   the number of groups.  The resulting list may contain duplicates,
+   but adjacent members will be distinct.  */
+
+int
+mgetgroups (char const *username, gid_t gid, gid_t **groups)
+{
+  int max_n_groups;
+  int ng;
+  gid_t *g;
+
+#if HAVE_GETGROUPLIST
+  /* We prefer to use getgrouplist if available, because it has better
+     performance characteristics.
+
+     In glibc 2.3.2, getgrouplist is buggy.  If you pass a zero as the
+     length of the output buffer, getgrouplist will still write to the
+     buffer.  Contrary to what some versions of the getgrouplist
+     manpage say, this doesn't happen with nonzero buffer sizes.
+     Therefore our usage here just avoids a zero sized buffer.  */
+  if (username)
+    {
+      enum { N_GROUPS_INIT = 10 };
+      max_n_groups = N_GROUPS_INIT;
+
+      g = realloc_groupbuf (NULL, max_n_groups);
+      if (g == NULL)
+        return -1;
+
+      while (1)
+        {
+          gid_t *h;
+          int last_n_groups = max_n_groups;
+
+          /* getgrouplist updates max_n_groups to num required.  */
+          ng = getgrouplist (username, gid, g, &max_n_groups);
+
+          /* Some systems (like Darwin) have a bug where they
+             never increase max_n_groups.  */
+          if (ng < 0 && last_n_groups == max_n_groups)
+            max_n_groups *= 2;
+
+          if ((h = realloc_groupbuf (g, max_n_groups)) == NULL)
+            {
+              int saved_errno = errno;
+              free (g);
+              errno = saved_errno;
+              return -1;
+            }
+          g = h;
+
+          if (0 <= ng)
+            {
+              *groups = g;
+              /* On success some systems just return 0 from getgrouplist,
+                 so return max_n_groups rather than ng.  */
+              return max_n_groups;
+            }
+        }
+    }
+  /* else no username, so fall through and use getgroups. */
+#endif
+
+  max_n_groups = (username
+                  ? getugroups (0, NULL, username, gid)
+                  : getgroups (0, NULL));
+
+  /* If we failed to count groups because there is no supplemental
+     group support, then return an array containing just GID.
+     Otherwise, we fail for the same reason.  */
+  if (max_n_groups < 0)
+    {
+      if (errno == ENOSYS && (g = realloc_groupbuf (NULL, 1)))
+        {
+          *groups = g;
+          *g = gid;
+          return gid != (gid_t) -1;
+        }
+      return -1;
+    }
+
+  if (!username && gid != (gid_t) -1)
+    max_n_groups++;
+  g = realloc_groupbuf (NULL, max_n_groups);
+  if (g == NULL)
+    return -1;
+
+  ng = (username
+        ? getugroups (max_n_groups, g, username, gid)
+        : getgroups (max_n_groups - (gid != (gid_t) -1),
+                                g + (gid != (gid_t) -1)));
+
+  if (ng < 0)
+    {
+      /* Failure is unexpected, but handle it anyway.  */
+      int saved_errno = errno;
+      free (g);
+      errno = saved_errno;
+      return -1;
+    }
+
+  if (!username && gid != (gid_t) -1)
+    {
+      *g = gid;
+      ng++;
+    }
+  *groups = g;
+
+  /* Reduce the number of duplicates.  On some systems, getgroups
+     returns the effective gid twice: once as the first element, and
+     once in its position within the supplementary groups.  On other
+     systems, getgroups does not return the effective gid at all,
+     which is why we provide a GID argument.  Meanwhile, the GID
+     argument, if provided, is typically any member of the
+     supplementary groups, and not necessarily the effective gid.  So,
+     the most likely duplicates are the first element with an
+     arbitrary other element, or pair-wise duplication between the
+     first and second elements returned by getgroups.  It is possible
+     that this O(n) pass will not remove all duplicates, but it is not
+     worth the effort to slow down to an O(n log n) algorithm that
+     sorts the array in place, nor the extra memory needed for
+     duplicate removal via an O(n) hash-table.  Hence, this function
+     is only documented as guaranteeing no pair-wise duplicates,
+     rather than returning the minimal set.  */
+  if (1 < ng)
+    {
+      gid_t first = *g;
+      gid_t *next;
+      gid_t *groups_end = g + ng;
+
+      for (next = g + 1; next < groups_end; next++)
+        {
+          if (*next == first || *next == *g)
+            ng--;
+          else
+            *++g = *next;
+        }
+    }
+
+  return ng;
+}
+
+/* Like mgetgroups, but call xalloc_die on allocation failure.  */
+
+int
+xgetgroups (char const *username, gid_t gid, gid_t **groups)
+{
+  int result = mgetgroups (username, gid, groups);
+  if (result == -1 && errno == ENOMEM)
+    xalloc_die ();
+  return result;
+}
diff --git a/tests/mgetgroups.h b/tests/mgetgroups.h
new file mode 100644 (file)
index 0000000..a1fd040
--- /dev/null
@@ -0,0 +1,20 @@
+/* Get a list of all group IDs associated with a specified user ID.
+   Copyright (C) 2007, 2009-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/>.  */
+
+#include <sys/types.h>
+
+int mgetgroups (const char *username, gid_t gid, gid_t **groups);
+int xgetgroups (const char *username, gid_t gid, gid_t **groups);
diff --git a/tests/nap.h b/tests/nap.h
new file mode 100644 (file)
index 0000000..40c1744
--- /dev/null
@@ -0,0 +1,67 @@
+/* Assist in file system timestamp tests.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#ifndef GLTEST_NAP_H
+# define GLTEST_NAP_H
+
+/* Sleep long enough to notice a timestamp difference on the file
+   system in the current directory.  Assumes that BASE is defined,
+   and requires that the test module depends on usleep.  */
+static void
+nap (void)
+{
+  static long delay;
+  if (!delay)
+    {
+      /* Initialize only once, by sleeping for 20 milliseconds (needed
+         since xfs has a quantization of about 10 milliseconds, even
+         though it has a granularity of 1 nanosecond, and since NTFS
+         has a default quantization of 15.25 milliseconds, even though
+         it has a granularity of 100 nanoseconds).  If the seconds
+         differ, repeat the test one more time (in case we crossed a
+         quantization boundary on a file system with 1 second
+         resolution).  If we can't observe a difference in only the
+         nanoseconds, then fall back to 1 second if the time is odd,
+         and 2 seconds (needed for FAT) if time is even.  */
+      struct stat st1;
+      struct stat st2;
+      ASSERT (close (creat (BASE "tmp", 0600)) == 0);
+      ASSERT (stat (BASE "tmp", &st1) == 0);
+      ASSERT (unlink (BASE "tmp") == 0);
+      delay = 20000;
+      usleep (delay);
+      ASSERT (close (creat (BASE "tmp", 0600)) == 0);
+      ASSERT (stat (BASE "tmp", &st2) == 0);
+      ASSERT (unlink (BASE "tmp") == 0);
+      if (st1.st_mtime != st2.st_mtime)
+        {
+          /* Seconds differ, give it one more shot.  */
+          st1 = st2;
+          usleep (delay);
+          ASSERT (close (creat (BASE "tmp", 0600)) == 0);
+          ASSERT (stat (BASE "tmp", &st2) == 0);
+          ASSERT (unlink (BASE "tmp") == 0);
+        }
+      if (! (st1.st_mtime == st2.st_mtime
+             && get_stat_mtime_ns (&st1) < get_stat_mtime_ns (&st2)))
+        delay = (st1.st_mtime & 1) ? 1000000 : 2000000;
+    }
+  usleep (delay);
+}
+
+#endif /* GLTEST_NAP_H */
diff --git a/tests/offtostr.c b/tests/offtostr.c
new file mode 100644 (file)
index 0000000..96082aa
--- /dev/null
@@ -0,0 +1,3 @@
+#define anytostr offtostr
+#define inttype off_t
+#include "anytostr.c"
diff --git a/tests/priv-set.c b/tests/priv-set.c
new file mode 100644 (file)
index 0000000..1b5429e
--- /dev/null
@@ -0,0 +1,142 @@
+/* Query, remove, or restore a Solaris privilege.
+
+   Copyright (C) 2009-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 David Bartley.  */
+
+#include <config.h>
+#include "priv-set.h"
+
+#if HAVE_GETPPRIV && HAVE_PRIV_H
+
+# include <errno.h>
+# include <stdbool.h>
+# include <priv.h>
+
+/* Holds a (cached) copy of the effective set.  */
+static priv_set_t *eff_set;
+
+/* Holds a set of privileges that we have removed.  */
+static priv_set_t *rem_set;
+
+static bool initialized;
+
+static int
+priv_set_initialize (void)
+{
+  if (! initialized)
+    {
+      eff_set = priv_allocset ();
+      if (!eff_set)
+        {
+          return -1;
+        }
+      rem_set = priv_allocset ();
+      if (!rem_set)
+        {
+          priv_freeset (eff_set);
+          return -1;
+        }
+      if (getppriv (PRIV_EFFECTIVE, eff_set) != 0)
+        {
+          priv_freeset (eff_set);
+          priv_freeset (rem_set);
+          return -1;
+        }
+      priv_emptyset (rem_set);
+      initialized = true;
+    }
+
+  return 0;
+}
+
+
+/* Check if priv is in the effective set.
+   Returns 1 if priv is a member and 0 if not.
+   Returns -1 on error with errno set appropriately.  */
+int
+priv_set_ismember (const char *priv)
+{
+  if (! initialized && priv_set_initialize () != 0)
+    return -1;
+
+  return priv_ismember (eff_set, priv);
+}
+
+
+/* Try to remove priv from the effective set.
+   Returns 0 if priv was removed.
+   Returns -1 on error with errno set appropriately.  */
+int
+priv_set_remove (const char *priv)
+{
+  if (! initialized && priv_set_initialize () != 0)
+    return -1;
+
+  if (priv_ismember (eff_set, priv))
+    {
+      /* priv_addset/priv_delset can only fail if priv is invalid, which is
+         checked above by the priv_ismember call.  */
+      priv_delset (eff_set, priv);
+      if (setppriv (PRIV_SET, PRIV_EFFECTIVE, eff_set) != 0)
+        {
+          priv_addset (eff_set, priv);
+          return -1;
+        }
+      priv_addset (rem_set, priv);
+    }
+  else
+    {
+      errno = EINVAL;
+      return -1;
+    }
+
+  return 0;
+}
+
+
+/* Try to restore priv to the effective set.
+   Returns 0 if priv was re-added to the effective set (after being previously
+   removed by a call to priv_set_remove).
+   Returns -1 on error with errno set appropriately.  */
+int
+priv_set_restore (const char *priv)
+{
+  if (! initialized && priv_set_initialize () != 0)
+    return -1;
+
+  if (priv_ismember (rem_set, priv))
+    {
+      /* priv_addset/priv_delset can only fail if priv is invalid, which is
+         checked above by the priv_ismember call.  */
+      priv_addset (eff_set, priv);
+      if (setppriv (PRIV_SET, PRIV_EFFECTIVE, eff_set) != 0)
+        {
+          priv_delset (eff_set, priv);
+          return -1;
+        }
+      priv_delset (rem_set, priv);
+    }
+  else
+    {
+      errno = EINVAL;
+      return -1;
+    }
+
+  return 0;
+}
+
+#endif
diff --git a/tests/priv-set.h b/tests/priv-set.h
new file mode 100644 (file)
index 0000000..dfdb2ca
--- /dev/null
@@ -0,0 +1,50 @@
+/* Query, remove, or restore a Solaris privilege.
+
+   Copyright (C) 2009-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 David Bartley.  */
+
+#if HAVE_GETPPRIV && HAVE_PRIV_H
+
+# include <priv.h>
+
+int priv_set_ismember (const char *priv);
+int priv_set_remove (const char *priv);
+int priv_set_restore (const char *priv);
+
+static inline int priv_set_remove_linkdir (void)
+{
+  return priv_set_remove (PRIV_SYS_LINKDIR);
+}
+
+static inline int priv_set_restore_linkdir (void)
+{
+  return priv_set_restore (PRIV_SYS_LINKDIR);
+}
+
+#else
+
+static inline int priv_set_remove_linkdir (void)
+{
+  return -1;
+}
+
+static inline int priv_set_restore_linkdir (void)
+{
+  return -1;
+}
+
+#endif
diff --git a/tests/putenv.c b/tests/putenv.c
new file mode 100644 (file)
index 0000000..68e5fec
--- /dev/null
@@ -0,0 +1,132 @@
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2011 Free Software
+   Foundation, Inc.
+
+   NOTE: The canonical source of this file is maintained with the GNU C
+   Library.  Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+   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 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <stddef.h>
+
+/* Include errno.h *after* sys/types.h to work around header problems
+   on AIX 3.2.5.  */
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(ev) ((errno) = (ev))
+#endif
+
+#include <string.h>
+#include <unistd.h>
+
+#if HAVE_GNU_LD
+# define environ __environ
+#else
+extern char **environ;
+#endif
+
+#if _LIBC
+/* This lock protects against simultaneous modifications of `environ'.  */
+# include <bits/libc-lock.h>
+__libc_lock_define_initialized (static, envlock)
+# define LOCK   __libc_lock_lock (envlock)
+# define UNLOCK __libc_lock_unlock (envlock)
+#else
+# define LOCK
+# define UNLOCK
+#endif
+
+static int
+_unsetenv (const char *name)
+{
+  size_t len;
+  char **ep;
+
+  if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  len = strlen (name);
+
+  LOCK;
+
+  ep = environ;
+  while (*ep != NULL)
+    if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+      {
+        /* Found it.  Remove this pointer by moving later ones back.  */
+        char **dp = ep;
+
+        do
+          dp[0] = dp[1];
+        while (*dp++);
+        /* Continue the loop in case NAME appears again.  */
+      }
+    else
+      ++ep;
+
+  UNLOCK;
+
+  return 0;
+}
+
+
+/* Put STRING, which is of the form "NAME=VALUE", in the environment.
+   If STRING contains no `=', then remove STRING from the environment.  */
+int
+putenv (char *string)
+{
+  const char *const name_end = strchr (string, '=');
+  register size_t size;
+  register char **ep;
+
+  if (name_end == NULL)
+    {
+      /* Remove the variable from the environment.  */
+      return _unsetenv (string);
+    }
+
+  size = 0;
+  for (ep = environ; *ep != NULL; ++ep)
+    if (!strncmp (*ep, string, name_end - string) &&
+        (*ep)[name_end - string] == '=')
+      break;
+    else
+      ++size;
+
+  if (*ep == NULL)
+    {
+      static char **last_environ = NULL;
+      char **new_environ = (char **) malloc ((size + 2) * sizeof (char *));
+      if (new_environ == NULL)
+        return -1;
+      (void) memcpy ((void *) new_environ, (void *) environ,
+                     size * sizeof (char *));
+      new_environ[size] = (char *) string;
+      new_environ[size + 1] = NULL;
+      free (last_environ);
+      last_environ = new_environ;
+      environ = new_environ;
+    }
+  else
+    *ep = string;
+
+  return 0;
+}
diff --git a/tests/setlocale.c b/tests/setlocale.c
new file mode 100644 (file)
index 0000000..0cef00f
--- /dev/null
@@ -0,0 +1,938 @@
+/* Set the current locale.
+   Copyright (C) 2009, 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 Bruno Haible <bruno@clisp.org>, 2009.  */
+
+#include <config.h>
+
+/* Override setlocale() so that when the default locale is requested
+   (locale = ""), the environment variables LC_ALL, LC_*, and LANG are
+   considered.
+   Also include all the functionality from libintl's setlocale() override.  */
+
+/* Please keep this file in sync with
+   gettext/gettext-runtime/intl/setlocale.c !  */
+
+/* Specification.  */
+#include <locale.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "localename.h"
+
+#if 1
+
+# undef setlocale
+
+/* Return string representation of locale category CATEGORY.  */
+static const char *
+category_to_name (int category)
+{
+  const char *retval;
+
+  switch (category)
+  {
+  case LC_COLLATE:
+    retval = "LC_COLLATE";
+    break;
+  case LC_CTYPE:
+    retval = "LC_CTYPE";
+    break;
+  case LC_MONETARY:
+    retval = "LC_MONETARY";
+    break;
+  case LC_NUMERIC:
+    retval = "LC_NUMERIC";
+    break;
+  case LC_TIME:
+    retval = "LC_TIME";
+    break;
+  case LC_MESSAGES:
+    retval = "LC_MESSAGES";
+    break;
+  default:
+    /* If you have a better idea for a default value let me know.  */
+    retval = "LC_XXX";
+  }
+
+  return retval;
+}
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* The native Win32 setlocale() function expects locale names of the form
+   "German" or "German_Germany" or "DEU", but not "de" or "de_DE".  We need
+   to convert the names from the form with ISO 639 language code and ISO 3166
+   country code to the form with English names or with three-letter identifier.
+   The three-letter identifiers known by a Windows XP SP2 or SP3 are:
+     AFK  Afrikaans_South Africa.1252
+     ARA  Arabic_Saudi Arabia.1256
+     ARB  Arabic_Lebanon.1256
+     ARE  Arabic_Egypt.1256
+     ARG  Arabic_Algeria.1256
+     ARH  Arabic_Bahrain.1256
+     ARI  Arabic_Iraq.1256
+     ARJ  Arabic_Jordan.1256
+     ARK  Arabic_Kuwait.1256
+     ARL  Arabic_Libya.1256
+     ARM  Arabic_Morocco.1256
+     ARO  Arabic_Oman.1256
+     ARQ  Arabic_Qatar.1256
+     ARS  Arabic_Syria.1256
+     ART  Arabic_Tunisia.1256
+     ARU  Arabic_U.A.E..1256
+     ARY  Arabic_Yemen.1256
+     AZE  Azeri (Latin)_Azerbaijan.1254
+     BEL  Belarusian_Belarus.1251
+     BGR  Bulgarian_Bulgaria.1251
+     BSB  Bosnian_Bosnia and Herzegovina.1250
+     BSC  Bosnian (Cyrillic)_Bosnia and Herzegovina.1250  (wrong encoding!)
+     CAT  Catalan_Spain.1252
+     CHH  Chinese_Hong Kong S.A.R..950
+     CHI  Chinese_Singapore.936
+     CHS  Chinese_People's Republic of China.936
+     CHT  Chinese_Taiwan.950
+     CSY  Czech_Czech Republic.1250
+     CYM  Welsh_United Kingdom.1252
+     DAN  Danish_Denmark.1252
+     DEA  German_Austria.1252
+     DEC  German_Liechtenstein.1252
+     DEL  German_Luxembourg.1252
+     DES  German_Switzerland.1252
+     DEU  German_Germany.1252
+     ELL  Greek_Greece.1253
+     ENA  English_Australia.1252
+     ENB  English_Caribbean.1252
+     ENC  English_Canada.1252
+     ENG  English_United Kingdom.1252
+     ENI  English_Ireland.1252
+     ENJ  English_Jamaica.1252
+     ENL  English_Belize.1252
+     ENP  English_Republic of the Philippines.1252
+     ENS  English_South Africa.1252
+     ENT  English_Trinidad and Tobago.1252
+     ENU  English_United States.1252
+     ENW  English_Zimbabwe.1252
+     ENZ  English_New Zealand.1252
+     ESA  Spanish_Panama.1252
+     ESB  Spanish_Bolivia.1252
+     ESC  Spanish_Costa Rica.1252
+     ESD  Spanish_Dominican Republic.1252
+     ESE  Spanish_El Salvador.1252
+     ESF  Spanish_Ecuador.1252
+     ESG  Spanish_Guatemala.1252
+     ESH  Spanish_Honduras.1252
+     ESI  Spanish_Nicaragua.1252
+     ESL  Spanish_Chile.1252
+     ESM  Spanish_Mexico.1252
+     ESN  Spanish_Spain.1252
+     ESO  Spanish_Colombia.1252
+     ESP  Spanish_Spain.1252
+     ESR  Spanish_Peru.1252
+     ESS  Spanish_Argentina.1252
+     ESU  Spanish_Puerto Rico.1252
+     ESV  Spanish_Venezuela.1252
+     ESY  Spanish_Uruguay.1252
+     ESZ  Spanish_Paraguay.1252
+     ETI  Estonian_Estonia.1257
+     EUQ  Basque_Spain.1252
+     FAR  Farsi_Iran.1256
+     FIN  Finnish_Finland.1252
+     FOS  Faroese_Faroe Islands.1252
+     FPO  Filipino_Philippines.1252
+     FRA  French_France.1252
+     FRB  French_Belgium.1252
+     FRC  French_Canada.1252
+     FRL  French_Luxembourg.1252
+     FRM  French_Principality of Monaco.1252
+     FRS  French_Switzerland.1252
+     FYN  Frisian_Netherlands.1252
+     GLC  Galician_Spain.1252
+     HEB  Hebrew_Israel.1255
+     HRB  Croatian_Bosnia and Herzegovina.1250
+     HRV  Croatian_Croatia.1250
+     HUN  Hungarian_Hungary.1250
+     IND  Indonesian_Indonesia.1252
+     IRE  Irish_Ireland.1252
+     ISL  Icelandic_Iceland.1252
+     ITA  Italian_Italy.1252
+     ITS  Italian_Switzerland.1252
+     IUK  Inuktitut (Latin)_Canada.1252
+     JPN  Japanese_Japan.932
+     KKZ  Kazakh_Kazakhstan.1251
+     KOR  Korean_Korea.949
+     KYR  Kyrgyz_Kyrgyzstan.1251
+     LBX  Luxembourgish_Luxembourg.1252
+     LTH  Lithuanian_Lithuania.1257
+     LVI  Latvian_Latvia.1257
+     MKI  FYRO Macedonian_Former Yugoslav Republic of Macedonia.1251
+     MON  Mongolian_Mongolia.1251
+     MPD  Mapudungun_Chile.1252
+     MSB  Malay_Brunei Darussalam.1252
+     MSL  Malay_Malaysia.1252
+     MWK  Mohawk_Canada.1252
+     NLB  Dutch_Belgium.1252
+     NLD  Dutch_Netherlands.1252
+     NON  Norwegian-Nynorsk_Norway.1252
+     NOR  Norwegian (Bokmål)_Norway.1252
+     NSO  Northern Sotho_South Africa.1252
+     PLK  Polish_Poland.1250
+     PTB  Portuguese_Brazil.1252
+     PTG  Portuguese_Portugal.1252
+     QUB  Quechua_Bolivia.1252
+     QUE  Quechua_Ecuador.1252
+     QUP  Quechua_Peru.1252
+     RMC  Romansh_Switzerland.1252
+     ROM  Romanian_Romania.1250
+     RUS  Russian_Russia.1251
+     SKY  Slovak_Slovakia.1250
+     SLV  Slovenian_Slovenia.1250
+     SMA  Sami (Southern)_Norway.1252
+     SMB  Sami (Southern)_Sweden.1252
+     SME  Sami (Northern)_Norway.1252
+     SMF  Sami (Northern)_Sweden.1252
+     SMG  Sami (Northern)_Finland.1252
+     SMJ  Sami (Lule)_Norway.1252
+     SMK  Sami (Lule)_Sweden.1252
+     SMN  Sami (Inari)_Finland.1252
+     SMS  Sami (Skolt)_Finland.1252
+     SQI  Albanian_Albania.1250
+     SRB  Serbian (Cyrillic)_Serbia and Montenegro.1251
+     SRL  Serbian (Latin)_Serbia and Montenegro.1250
+     SRN  Serbian (Cyrillic)_Bosnia and Herzegovina.1251
+     SRS  Serbian (Latin)_Bosnia and Herzegovina.1250
+     SVE  Swedish_Sweden.1252
+     SVF  Swedish_Finland.1252
+     SWK  Swahili_Kenya.1252
+     THA  Thai_Thailand.874
+     TRK  Turkish_Turkey.1254
+     TSN  Tswana_South Africa.1252
+     TTT  Tatar_Russia.1251
+     UKR  Ukrainian_Ukraine.1251
+     URD  Urdu_Islamic Republic of Pakistan.1256
+     USA  English_United States.1252
+     UZB  Uzbek (Latin)_Uzbekistan.1254
+     VIT  Vietnamese_Viet Nam.1258
+     XHO  Xhosa_South Africa.1252
+     ZHH  Chinese_Hong Kong S.A.R..950
+     ZHI  Chinese_Singapore.936
+     ZHM  Chinese_Macau S.A.R..950
+     ZUL  Zulu_South Africa.1252
+ */
+
+/* Table from ISO 639 language code, optionally with country or script suffix,
+   to English name.
+   Keep in sync with the gl_locale_name_from_win32_LANGID function in
+   localename.c!  */
+struct table_entry
+{
+  const char *code;
+  const char *english;
+};
+static const struct table_entry language_table[] =
+  {
+    { "af", "Afrikaans" },
+    { "am", "Amharic" },
+    { "ar", "Arabic" },
+    { "arn", "Mapudungun" },
+    { "as", "Assamese" },
+    { "az@cyrillic", "Azeri (Cyrillic)" },
+    { "az@latin", "Azeri (Latin)" },
+    { "ba", "Bashkir" },
+    { "be", "Belarusian" },
+    { "ber", "Tamazight" },
+    { "ber@arabic", "Tamazight (Arabic)" },
+    { "ber@latin", "Tamazight (Latin)" },
+    { "bg", "Bulgarian" },
+    { "bin", "Edo" },
+    { "bn", "Bengali" },
+    { "bn_BD", "Bengali (Bangladesh)" },
+    { "bn_IN", "Bengali (India)" },
+    { "bnt", "Sutu" },
+    { "bo", "Tibetan" },
+    { "br", "Breton" },
+    { "bs", "BSB" }, /* "Bosnian (Latin)" */
+    { "bs@cyrillic", "BSC" }, /* Bosnian (Cyrillic) */
+    { "ca", "Catalan" },
+    { "chr", "Cherokee" },
+    { "co", "Corsican" },
+    { "cpe", "Hawaiian" },
+    { "cs", "Czech" },
+    { "cy", "Welsh" },
+    { "da", "Danish" },
+    { "de", "German" },
+    { "dsb", "Lower Sorbian" },
+    { "dv", "Divehi" },
+    { "el", "Greek" },
+    { "en", "English" },
+    { "es", "Spanish" },
+    { "et", "Estonian" },
+    { "eu", "Basque" },
+    { "fa", "Farsi" },
+    { "ff", "Fulfulde" },
+    { "fi", "Finnish" },
+    { "fo", "Faroese" }, /* "Faeroese" does not work */
+    { "fr", "French" },
+    { "fy", "Frisian" },
+    { "ga", "IRE" }, /* Gaelic (Ireland) */
+    { "gd", "Gaelic (Scotland)" },
+    { "gd", "Scottish Gaelic" },
+    { "gl", "Galician" },
+    { "gn", "Guarani" },
+    { "gsw", "Alsatian" },
+    { "gu", "Gujarati" },
+    { "ha", "Hausa" },
+    { "he", "Hebrew" },
+    { "hi", "Hindi" },
+    { "hr", "Croatian" },
+    { "hsb", "Upper Sorbian" },
+    { "hu", "Hungarian" },
+    { "hy", "Armenian" },
+    { "id", "Indonesian" },
+    { "ig", "Igbo" },
+    { "ii", "Yi" },
+    { "is", "Icelandic" },
+    { "it", "Italian" },
+    { "iu", "IUK" }, /* Inuktitut */
+    { "ja", "Japanese" },
+    { "ka", "Georgian" },
+    { "kk", "Kazakh" },
+    { "kl", "Greenlandic" },
+    { "km", "Cambodian" },
+    { "km", "Khmer" },
+    { "kn", "Kannada" },
+    { "ko", "Korean" },
+    { "kok", "Konkani" },
+    { "kr", "Kanuri" },
+    { "ks", "Kashmiri" },
+    { "ks_IN", "Kashmiri_India" },
+    { "ks_PK", "Kashmiri (Arabic)_Pakistan" },
+    { "ky", "Kyrgyz" },
+    { "la", "Latin" },
+    { "lb", "Luxembourgish" },
+    { "lo", "Lao" },
+    { "lt", "Lithuanian" },
+    { "lv", "Latvian" },
+    { "mi", "Maori" },
+    { "mk", "FYRO Macedonian" },
+    { "mk", "Macedonian" },
+    { "ml", "Malayalam" },
+    { "mn", "Mongolian" },
+    { "mni", "Manipuri" },
+    { "moh", "Mohawk" },
+    { "mr", "Marathi" },
+    { "ms", "Malay" },
+    { "mt", "Maltese" },
+    { "my", "Burmese" },
+    { "nb", "NOR" }, /* Norwegian Bokmål */
+    { "ne", "Nepali" },
+    { "nic", "Ibibio" },
+    { "nl", "Dutch" },
+    { "nn", "NON" }, /* Norwegian Nynorsk */
+    { "no", "Norwegian" },
+    { "nso", "Northern Sotho" },
+    { "nso", "Sepedi" },
+    { "oc", "Occitan" },
+    { "om", "Oromo" },
+    { "or", "Oriya" },
+    { "pa", "Punjabi" },
+    { "pap", "Papiamentu" },
+    { "pl", "Polish" },
+    { "prs", "Dari" },
+    { "ps", "Pashto" },
+    { "pt", "Portuguese" },
+    { "qu", "Quechua" },
+    { "qut", "K'iche'" },
+    { "rm", "Romansh" },
+    { "ro", "Romanian" },
+    { "ru", "Russian" },
+    { "rw", "Kinyarwanda" },
+    { "sa", "Sanskrit" },
+    { "sah", "Yakut" },
+    { "sd", "Sindhi" },
+    { "se", "Sami (Northern)" },
+    { "se", "Northern Sami" },
+    { "si", "Sinhalese" },
+    { "sk", "Slovak" },
+    { "sl", "Slovenian" },
+    { "sma", "Sami (Southern)" },
+    { "sma", "Southern Sami" },
+    { "smj", "Sami (Lule)" },
+    { "smj", "Lule Sami" },
+    { "smn", "Sami (Inari)" },
+    { "smn", "Inari Sami" },
+    { "sms", "Sami (Skolt)" },
+    { "sms", "Skolt Sami" },
+    { "so", "Somali" },
+    { "sq", "Albanian" },
+    { "sr", "Serbian (Latin)" },
+    { "sr@cyrillic", "SRB" }, /* Serbian (Cyrillic) */
+    { "sw", "Swahili" },
+    { "syr", "Syriac" },
+    { "ta", "Tamil" },
+    { "te", "Telugu" },
+    { "tg", "Tajik" },
+    { "th", "Thai" },
+    { "ti", "Tigrinya" },
+    { "tk", "Turkmen" },
+    { "tl", "Filipino" },
+    { "tn", "Tswana" },
+    { "tr", "Turkish" },
+    { "ts", "Tsonga" },
+    { "tt", "Tatar" },
+    { "ug", "Uighur" },
+    { "uk", "Ukrainian" },
+    { "ur", "Urdu" },
+    { "uz", "Uzbek" },
+    { "uz", "Uzbek (Latin)" },
+    { "uz@cyrillic", "Uzbek (Cyrillic)" },
+    { "ve", "Venda" },
+    { "vi", "Vietnamese" },
+    { "wen", "Sorbian" },
+    { "wo", "Wolof" },
+    { "xh", "Xhosa" },
+    { "yi", "Yiddish" },
+    { "yo", "Yoruba" },
+    { "zh", "Chinese" },
+    { "zu", "Zulu" }
+  };
+
+/* Table from ISO 3166 country code to English name.
+   Keep in sync with the gl_locale_name_from_win32_LANGID function in
+   localename.c!  */
+static const struct table_entry country_table[] =
+  {
+    { "AE", "U.A.E." },
+    { "AF", "Afghanistan" },
+    { "AL", "Albania" },
+    { "AM", "Armenia" },
+    { "AN", "Netherlands Antilles" },
+    { "AR", "Argentina" },
+    { "AT", "Austria" },
+    { "AU", "Australia" },
+    { "AZ", "Azerbaijan" },
+    { "BA", "Bosnia and Herzegovina" },
+    { "BD", "Bangladesh" },
+    { "BE", "Belgium" },
+    { "BG", "Bulgaria" },
+    { "BH", "Bahrain" },
+    { "BN", "Brunei Darussalam" },
+    { "BO", "Bolivia" },
+    { "BR", "Brazil" },
+    { "BT", "Bhutan" },
+    { "BY", "Belarus" },
+    { "BZ", "Belize" },
+    { "CA", "Canada" },
+    { "CG", "Congo" },
+    { "CH", "Switzerland" },
+    { "CI", "Cote d'Ivoire" },
+    { "CL", "Chile" },
+    { "CM", "Cameroon" },
+    { "CN", "People's Republic of China" },
+    { "CO", "Colombia" },
+    { "CR", "Costa Rica" },
+    { "CS", "Serbia and Montenegro" },
+    { "CZ", "Czech Republic" },
+    { "DE", "Germany" },
+    { "DK", "Denmark" },
+    { "DO", "Dominican Republic" },
+    { "DZ", "Algeria" },
+    { "EC", "Ecuador" },
+    { "EE", "Estonia" },
+    { "EG", "Egypt" },
+    { "ER", "Eritrea" },
+    { "ES", "Spain" },
+    { "ET", "Ethiopia" },
+    { "FI", "Finland" },
+    { "FO", "Faroe Islands" },
+    { "FR", "France" },
+    { "GB", "United Kingdom" },
+    { "GD", "Caribbean" },
+    { "GE", "Georgia" },
+    { "GL", "Greenland" },
+    { "GR", "Greece" },
+    { "GT", "Guatemala" },
+    { "HK", "Hong Kong" },
+    { "HK", "Hong Kong S.A.R." },
+    { "HN", "Honduras" },
+    { "HR", "Croatia" },
+    { "HT", "Haiti" },
+    { "HU", "Hungary" },
+    { "ID", "Indonesia" },
+    { "IE", "Ireland" },
+    { "IL", "Israel" },
+    { "IN", "India" },
+    { "IQ", "Iraq" },
+    { "IR", "Iran" },
+    { "IS", "Iceland" },
+    { "IT", "Italy" },
+    { "JM", "Jamaica" },
+    { "JO", "Jordan" },
+    { "JP", "Japan" },
+    { "KE", "Kenya" },
+    { "KG", "Kyrgyzstan" },
+    { "KH", "Cambodia" },
+    { "KR", "South Korea" },
+    { "KW", "Kuwait" },
+    { "KZ", "Kazakhstan" },
+    { "LA", "Laos" },
+    { "LB", "Lebanon" },
+    { "LI", "Liechtenstein" },
+    { "LK", "Sri Lanka" },
+    { "LT", "Lithuania" },
+    { "LU", "Luxembourg" },
+    { "LV", "Latvia" },
+    { "LY", "Libya" },
+    { "MA", "Morocco" },
+    { "MC", "Principality of Monaco" },
+    { "MD", "Moldava" },
+    { "MD", "Moldova" },
+    { "ME", "Montenegro" },
+    { "MK", "Former Yugoslav Republic of Macedonia" },
+    { "ML", "Mali" },
+    { "MM", "Myanmar" },
+    { "MN", "Mongolia" },
+    { "MO", "Macau S.A.R." },
+    { "MT", "Malta" },
+    { "MV", "Maldives" },
+    { "MX", "Mexico" },
+    { "MY", "Malaysia" },
+    { "NG", "Nigeria" },
+    { "NI", "Nicaragua" },
+    { "NL", "Netherlands" },
+    { "NO", "Norway" },
+    { "NP", "Nepal" },
+    { "NZ", "New Zealand" },
+    { "OM", "Oman" },
+    { "PA", "Panama" },
+    { "PE", "Peru" },
+    { "PH", "Philippines" },
+    { "PK", "Islamic Republic of Pakistan" },
+    { "PL", "Poland" },
+    { "PR", "Puerto Rico" },
+    { "PT", "Portugal" },
+    { "PY", "Paraguay" },
+    { "QA", "Qatar" },
+    { "RE", "Reunion" },
+    { "RO", "Romania" },
+    { "RS", "Serbia" },
+    { "RU", "Russia" },
+    { "RW", "Rwanda" },
+    { "SA", "Saudi Arabia" },
+    { "SE", "Sweden" },
+    { "SG", "Singapore" },
+    { "SI", "Slovenia" },
+    { "SK", "Slovak" },
+    { "SN", "Senegal" },
+    { "SO", "Somalia" },
+    { "SR", "Suriname" },
+    { "SV", "El Salvador" },
+    { "SY", "Syria" },
+    { "TH", "Thailand" },
+    { "TJ", "Tajikistan" },
+    { "TM", "Turkmenistan" },
+    { "TN", "Tunisia" },
+    { "TR", "Turkey" },
+    { "TT", "Trinidad and Tobago" },
+    { "TW", "Taiwan" },
+    { "TZ", "Tanzania" },
+    { "UA", "Ukraine" },
+    { "US", "United States" },
+    { "UY", "Uruguay" },
+    { "VA", "Vatican" },
+    { "VE", "Venezuela" },
+    { "VN", "Viet Nam" },
+    { "YE", "Yemen" },
+    { "ZA", "South Africa" },
+    { "ZW", "Zimbabwe" }
+  };
+
+/* Given a string STRING, find the set of indices i such that TABLE[i].code is
+   the given STRING.  It is a range [lo,hi-1].  */
+typedef struct { size_t lo; size_t hi; } range_t;
+static void
+search (const struct table_entry *table, size_t table_size, const char *string,
+        range_t *result)
+{
+  /* The table is sorted.  Perform a binary search.  */
+  size_t hi = table_size;
+  size_t lo = 0;
+  while (lo < hi)
+    {
+      /* Invariant:
+         for i < lo, strcmp (table[i].code, string) < 0,
+         for i >= hi, strcmp (table[i].code, string) > 0.  */
+      size_t mid = (hi + lo) >> 1; /* >= lo, < hi */
+      int cmp = strcmp (table[mid].code, string);
+      if (cmp < 0)
+        lo = mid + 1;
+      else if (cmp > 0)
+        hi = mid;
+      else
+        {
+          /* Found an i with
+               strcmp (language_table[i].code, string) == 0.
+             Find the entire interval of such i.  */
+          {
+            size_t i;
+
+            for (i = mid; i > lo; )
+              {
+                i--;
+                if (strcmp (table[i].code, string) < 0)
+                  {
+                    lo = i + 1;
+                    break;
+                  }
+              }
+          }
+          {
+            size_t i;
+
+            for (i = mid; i < hi; i++)
+              {
+                if (strcmp (table[i].code, string) > 0)
+                  {
+                    hi = i;
+                    break;
+                  }
+              }
+          }
+          /* The set of i with
+               strcmp (language_table[i].code, string) == 0
+             is the interval [lo, hi-1].  */
+          break;
+        }
+    }
+  result->lo = lo;
+  result->hi = hi;
+}
+
+/* Like setlocale, but accept also locale names in the form ll or ll_CC,
+   where ll is an ISO 639 language code and CC is an ISO 3166 country code.  */
+static char *
+setlocale_unixlike (int category, const char *locale)
+{
+  char *result;
+  char llCC_buf[64];
+  char ll_buf[64];
+  char CC_buf[64];
+
+  /* First, try setlocale with the original argument unchanged.  */
+  result = setlocale (category, locale);
+  if (result != NULL)
+    return result;
+
+  /* Otherwise, assume the argument is in the form
+       language[_territory][.codeset][@modifier]
+     and try to map it using the tables.  */
+  if (strlen (locale) < sizeof (llCC_buf))
+    {
+      /* Second try: Remove the codeset part.  */
+      {
+        const char *p = locale;
+        char *q = llCC_buf;
+
+        /* Copy the part before the dot.  */
+        for (; *p != '\0' && *p != '.'; p++, q++)
+          *q = *p;
+        if (*p == '.')
+          /* Skip the part up to the '@', if any.  */
+          for (; *p != '\0' && *p != '@'; p++)
+            ;
+        /* Copy the part starting with '@', if any.  */
+        for (; *p != '\0'; p++, q++)
+          *q = *p;
+        *q = '\0';
+      }
+      /* llCC_buf now contains
+           language[_territory][@modifier]
+       */
+      if (strcmp (llCC_buf, locale) != 0)
+        {
+          result = setlocale (category, llCC_buf);
+          if (result != NULL)
+            return result;
+        }
+      /* Look it up in language_table.  */
+      {
+        range_t range;
+        size_t i;
+
+        search (language_table,
+                sizeof (language_table) / sizeof (language_table[0]),
+                llCC_buf,
+                &range);
+
+        for (i = range.lo; i < range.hi; i++)
+          {
+            /* Try the replacement in language_table[i].  */
+            result = setlocale (category, language_table[i].english);
+            if (result != NULL)
+              return result;
+          }
+      }
+      /* Split language[_territory][@modifier]
+         into  ll_buf = language[@modifier]
+         and   CC_buf = territory
+       */
+      {
+        const char *underscore = strchr (llCC_buf, '_');
+        if (underscore != NULL)
+          {
+            const char *territory_start = underscore + 1;
+            const char *territory_end = strchr (territory_start, '@');
+            if (territory_end == NULL)
+              territory_end = territory_start + strlen (territory_start);
+
+            memcpy (ll_buf, llCC_buf, underscore - llCC_buf);
+            strcpy (ll_buf + (underscore - llCC_buf), territory_end);
+
+            memcpy (CC_buf, territory_start, territory_end - territory_start);
+            CC_buf[territory_end - territory_start] = '\0';
+
+            {
+              /* Look up ll_buf in language_table
+                 and CC_buf in country_table.  */
+              range_t language_range;
+
+              search (language_table,
+                      sizeof (language_table) / sizeof (language_table[0]),
+                      ll_buf,
+                      &language_range);
+              if (language_range.lo < language_range.hi)
+                {
+                  range_t country_range;
+
+                  search (country_table,
+                          sizeof (country_table) / sizeof (country_table[0]),
+                          CC_buf,
+                          &country_range);
+                  if (country_range.lo < country_range.hi)
+                    {
+                      size_t i;
+                      size_t j;
+
+                      for (i = language_range.lo; i < language_range.hi; i++)
+                        for (j = country_range.lo; j < country_range.hi; j++)
+                          {
+                            /* Concatenate the replacements.  */
+                            const char *part1 = language_table[i].english;
+                            size_t part1_len = strlen (part1);
+                            const char *part2 = country_table[j].english;
+                            size_t part2_len = strlen (part2) + 1;
+                            char buf[64+64];
+
+                            if (!(part1_len + 1 + part2_len <= sizeof (buf)))
+                              abort ();
+                            memcpy (buf, part1, part1_len);
+                            buf[part1_len] = '_';
+                            memcpy (buf + part1_len + 1, part2, part2_len);
+
+                            /* Try the concatenated replacements.  */
+                            result = setlocale (category, buf);
+                            if (result != NULL)
+                              return result;
+                          }
+                    }
+
+                  /* Try omitting the country entirely.  This may set a locale
+                     corresponding to the wrong country, but is better than
+                     failing entirely.  */
+                  {
+                    size_t i;
+
+                    for (i = language_range.lo; i < language_range.hi; i++)
+                      {
+                        /* Try only the language replacement.  */
+                        result =
+                          setlocale (category, language_table[i].english);
+                        if (result != NULL)
+                          return result;
+                      }
+                  }
+                }
+            }
+          }
+      }
+    }
+
+  /* Failed.  */
+  return NULL;
+}
+
+# else
+#  define setlocale_unixlike setlocale
+# endif
+
+# if LC_MESSAGES == 1729
+
+/* The system does not store an LC_MESSAGES locale category.  Do it here.  */
+static char lc_messages_name[64] = "C";
+
+/* Like setlocale, but support also LC_MESSAGES.  */
+static char *
+setlocale_single (int category, const char *locale)
+{
+  if (category == LC_MESSAGES)
+    {
+      if (locale != NULL)
+        {
+          lc_messages_name[sizeof (lc_messages_name) - 1] = '\0';
+          strncpy (lc_messages_name, locale, sizeof (lc_messages_name) - 1);
+        }
+      return lc_messages_name;
+    }
+  else
+    return setlocale_unixlike (category, locale);
+}
+
+# else
+#  define setlocale_single setlocale_unixlike
+# endif
+
+char *
+rpl_setlocale (int category, const char *locale)
+{
+  if (locale != NULL && locale[0] == '\0')
+    {
+      /* A request to the set the current locale to the default locale.  */
+      if (category == LC_ALL)
+        {
+          /* Set LC_CTYPE first.  Then the other categories.  */
+          static int const categories[] =
+            {
+              LC_NUMERIC,
+              LC_TIME,
+              LC_COLLATE,
+              LC_MONETARY,
+              LC_MESSAGES
+            };
+          char *saved_locale;
+          const char *base_name;
+          unsigned int i;
+
+          /* Back up the old locale, in case one of the steps fails.  */
+          saved_locale = setlocale (LC_ALL, NULL);
+          if (saved_locale == NULL)
+            return NULL;
+          saved_locale = strdup (saved_locale);
+          if (saved_locale == NULL)
+            return NULL;
+
+          /* Set LC_CTYPE category.  Set all other categories (except possibly
+             LC_MESSAGES) to the same value in the same call; this is likely to
+             save calls.  */
+          base_name =
+            gl_locale_name_environ (LC_CTYPE, category_to_name (LC_CTYPE));
+          if (base_name == NULL)
+            base_name = gl_locale_name_default ();
+
+          if (setlocale_unixlike (LC_ALL, base_name) == NULL)
+            goto fail;
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+          /* On native Windows, setlocale(LC_ALL,...) may succeed but set the
+             LC_CTYPE category to an invalid value ("C") when it does not
+             support the specified encoding.  Report a failure instead.  */
+          if (strchr (base_name, '.') != NULL
+              && strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+            goto fail;
+# endif
+
+          for (i = 0; i < sizeof (categories) / sizeof (categories[0]); i++)
+            {
+              int cat = categories[i];
+              const char *name;
+
+              name = gl_locale_name_environ (cat, category_to_name (cat));
+              if (name == NULL)
+                name = gl_locale_name_default ();
+
+              /* If name is the same as base_name, it has already been set
+                 through the setlocale call before the loop.  */
+              if (strcmp (name, base_name) != 0
+# if LC_MESSAGES == 1729
+                  || cat == LC_MESSAGES
+# endif
+                 )
+                if (setlocale_single (cat, name) == NULL)
+                  goto fail;
+            }
+
+          /* All steps were successful.  */
+          free (saved_locale);
+          return setlocale (LC_ALL, NULL);
+
+        fail:
+          if (saved_locale[0] != '\0') /* don't risk an endless recursion */
+            setlocale (LC_ALL, saved_locale);
+          free (saved_locale);
+          return NULL;
+        }
+      else
+        {
+          const char *name =
+            gl_locale_name_environ (category, category_to_name (category));
+          if (name == NULL)
+            name = gl_locale_name_default ();
+
+          return setlocale_single (category, name);
+        }
+    }
+  else
+    {
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+      if (category == LC_ALL && locale != NULL && strchr (locale, '.') != NULL)
+        {
+          char *saved_locale;
+
+          /* Back up the old locale.  */
+          saved_locale = setlocale (LC_ALL, NULL);
+          if (saved_locale == NULL)
+            return NULL;
+          saved_locale = strdup (saved_locale);
+          if (saved_locale == NULL)
+            return NULL;
+
+          if (setlocale_unixlike (LC_ALL, locale) == NULL)
+            {
+              free (saved_locale);
+              return NULL;
+            }
+
+          /* On native Windows, setlocale(LC_ALL,...) may succeed but set the
+             LC_CTYPE category to an invalid value ("C") when it does not
+             support the specified encoding.  Report a failure instead.  */
+          if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+            {
+              if (saved_locale[0] != '\0') /* don't risk an endless recursion */
+                setlocale (LC_ALL, saved_locale);
+              free (saved_locale);
+              return NULL;
+            }
+
+          /* It was really successful.  */
+          free (saved_locale);
+          return setlocale (LC_ALL, NULL);
+        }
+      else
+# endif
+        return setlocale_single (category, locale);
+    }
+}
+
+#endif
diff --git a/tests/signature.h b/tests/signature.h
new file mode 100644 (file)
index 0000000..8256989
--- /dev/null
@@ -0,0 +1,48 @@
+/* Macro for checking that a function declaration is compliant.
+   Copyright (C) 2009-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 SIGNATURE_CHECK
+
+/* Check that the function FN takes the specified arguments ARGS with
+   a return type of RET.  This header is designed to be included after
+   <config.h> and the one system header that is supposed to contain
+   the function being checked, but prior to any other system headers
+   that are necessary for the unit test.  Therefore, this file does
+   not include any system headers, nor reference anything outside of
+   the macro arguments.  For an example, if foo.h should provide:
+
+   extern int foo (char, float);
+
+   then the unit test named test-foo.c would start out with:
+
+   #include <config.h>
+   #include <foo.h>
+   #include "signature.h"
+   SIGNATURE_CHECK (foo, int, (char, float));
+   #include <other.h>
+   ...
+*/
+# define SIGNATURE_CHECK(fn, ret, args) \
+  SIGNATURE_CHECK1 (fn, ret, args, __LINE__)
+
+/* Necessary to allow multiple SIGNATURE_CHECK lines in a unit test.
+   Note that the checks must not occupy the same line.  */
+# define SIGNATURE_CHECK1(fn, ret, args, id) \
+  SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */
+# define SIGNATURE_CHECK2(fn, ret, args, id) \
+  static ret (* _GL_UNUSED signature_check ## id) args = fn
+
+#endif /* SIGNATURE_CHECK */
diff --git a/tests/sleep.c b/tests/sleep.c
new file mode 100644 (file)
index 0000000..45b9d80
--- /dev/null
@@ -0,0 +1,76 @@
+/* Pausing execution of the current thread.
+   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#include <limits.h>
+
+#include "verify.h"
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+# include <windows.h>
+
+unsigned int
+sleep (unsigned int seconds)
+{
+  unsigned int remaining;
+
+  /* Sleep for 1 second many times, because
+       1. Sleep is not interruptiple by Ctrl-C,
+       2. we want to avoid arithmetic overflow while multiplying with 1000.  */
+  for (remaining = seconds; remaining > 0; remaining--)
+    Sleep (1000);
+
+  return remaining;
+}
+
+#elif HAVE_SLEEP
+
+# undef sleep
+
+/* Guarantee unlimited sleep and a reasonable return value.  Cygwin
+   1.5.x rejects attempts to sleep more than 49.7 days (2**32
+   milliseconds), but uses uninitialized memory which results in a
+   garbage answer.  Similarly, Linux 2.6.9 with glibc 2.3.4 has a too
+   small return value when asked to sleep more than 24.85 days.  */
+unsigned int
+rpl_sleep (unsigned int seconds)
+{
+  /* This requires int larger than 16 bits.  */
+  verify (UINT_MAX / 24 / 24 / 60 / 60);
+  const unsigned int limit = 24 * 24 * 60 * 60;
+  while (limit < seconds)
+    {
+      unsigned int result;
+      seconds -= limit;
+      result = sleep (limit);
+      if (result)
+        return seconds + result;
+    }
+  return sleep (seconds);
+}
+
+#else /* !HAVE_SLEEP */
+
+ #error "Please port gnulib sleep.c to your platform, possibly using usleep() or select(), then report this to bug-gnulib."
+
+#endif
diff --git a/tests/symlink.c b/tests/symlink.c
new file mode 100644 (file)
index 0000000..2896cc9
--- /dev/null
@@ -0,0 +1,57 @@
+/* Stub for symlink().
+   Copyright (C) 2009-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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
+
+
+#if HAVE_SYMLINK
+
+# undef symlink
+
+/* Create a symlink, but reject trailing slash.  */
+int
+rpl_symlink (char const *contents, char const *name)
+{
+  size_t len = strlen (name);
+  if (len && name[len - 1] == '/')
+    {
+      struct stat st;
+      if (lstat (name, &st) == 0)
+        errno = EEXIST;
+      return -1;
+    }
+  return symlink (contents, name);
+}
+
+#else /* !HAVE_SYMLINK */
+
+/* The system does not support symlinks.  */
+int
+symlink (char const *contents _GL_UNUSED,
+         char const *name _GL_UNUSED)
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+#endif /* !HAVE_SYMLINK */
diff --git a/tests/symlinkat.c b/tests/symlinkat.c
new file mode 100644 (file)
index 0000000..fc5bb52
--- /dev/null
@@ -0,0 +1,76 @@
+/* Create a symlink relative to an open directory.
+   Copyright (C) 2009-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 Eric Blake */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#if !HAVE_SYMLINK
+/* Mingw lacks symlink, and it is more efficient to provide a trivial
+   wrapper than to go through at-func.c to call rpl_symlink.  */
+
+# include <errno.h>
+
+int
+symlinkat (char const *path1 _GL_UNUSED, int fd _GL_UNUSED,
+           char const *path2 _GL_UNUSED)
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+#else /* HAVE_SYMLINK */
+
+/* Our openat helper functions expect the directory parameter first,
+   not second.  These shims make life easier.  */
+
+/* Like symlink, but with arguments reversed.  */
+static int
+symlink_reversed (char const *file, char const *contents)
+{
+  return symlink (contents, file);
+}
+
+/* Like symlinkat, but with arguments reversed.  */
+
+static int
+symlinkat_reversed (int fd, char const *file, char const *contents);
+
+# define AT_FUNC_NAME symlinkat_reversed
+# define AT_FUNC_F1 symlink_reversed
+# define AT_FUNC_POST_FILE_PARAM_DECLS , char const *contents
+# define AT_FUNC_POST_FILE_ARGS        , contents
+# include "at-func.c"
+# undef AT_FUNC_NAME
+# undef AT_FUNC_F1
+# undef AT_FUNC_POST_FILE_PARAM_DECLS
+# undef AT_FUNC_POST_FILE_ARGS
+
+/* Create a symlink FILE, in the directory open on descriptor FD,
+   holding CONTENTS.  If possible, do it without changing the
+   working directory.  Otherwise, resort to using save_cwd/fchdir,
+   then symlink/restore_cwd.  If either the save_cwd or the restore_cwd
+   fails, then give a diagnostic and exit nonzero.  */
+
+int
+symlinkat (char const *contents, int fd, char const *file)
+{
+  return symlinkat_reversed (fd, file, contents);
+}
+
+#endif /* HAVE_SYMLINK */
diff --git a/tests/test-alloca-opt.c b/tests/test-alloca-opt.c
new file mode 100644 (file)
index 0000000..5aa1645
--- /dev/null
@@ -0,0 +1,62 @@
+/* Test of optional automatic memory allocation.
+   Copyright (C) 2005, 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <alloca.h>
+
+#if HAVE_ALLOCA
+
+static void
+do_allocation (int n)
+{
+  void *ptr = alloca (n);
+  (void) ptr;
+}
+
+void (*func) (int) = do_allocation;
+
+#endif
+
+int
+main ()
+{
+#if HAVE_ALLOCA
+  int i;
+
+  /* Repeat a lot of times, to make sure there's no memory leak.  */
+  for (i = 0; i < 100000; i++)
+    {
+      /* Try various values.
+         n = 0 gave a crash on Alpha with gcc-2.5.8.
+         Some versions of MacOS X have a stack size limit of 512 KB.  */
+      func (34);
+      func (134);
+      func (399);
+      func (510823);
+      func (129321);
+      func (0);
+      func (4070);
+      func (4095);
+      func (1);
+      func (16582);
+    }
+#endif
+
+  return 0;
+}
diff --git a/tests/test-areadlink-with-size.c b/tests/test-areadlink-with-size.c
new file mode 100644 (file)
index 0000000..92e456a
--- /dev/null
@@ -0,0 +1,46 @@
+/* Tests of areadlink_with_size.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include "areadlink.h"
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-areadlink-with-size.t"
+
+#include "test-areadlink.h"
+
+int
+main (void)
+{
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  return test_areadlink (areadlink_with_size, true);
+}
diff --git a/tests/test-areadlink.c b/tests/test-areadlink.c
new file mode 100644 (file)
index 0000000..8e950b1
--- /dev/null
@@ -0,0 +1,53 @@
+/* Tests of areadlink.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include "areadlink.h"
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-areadlink.t"
+
+#include "test-areadlink.h"
+
+/* Wrapper for testing areadlink.  */
+static char *
+do_areadlink (char const *name, size_t ignored _GL_UNUSED)
+{
+  return areadlink (name);
+}
+
+int
+main (void)
+{
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  return test_areadlink (do_areadlink, true);
+}
diff --git a/tests/test-areadlink.h b/tests/test-areadlink.h
new file mode 100644 (file)
index 0000000..55b41c0
--- /dev/null
@@ -0,0 +1,83 @@
+/* Tests of areadlink and friends.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+/* This file is designed to test areadlink(a),
+   areadlink_with_size(a,b), and areadlinkat(AT_FDCWD,a).  FUNC is the
+   function to test; a length is always supplied, but may be ignored.
+   Assumes that BASE and ASSERT are already defined, and that
+   appropriate headers are already included.  If PRINT, warn before
+   skipping symlink tests with status 77.  */
+
+static int
+test_areadlink (char * (*func) (char const *, size_t), bool print)
+{
+  /* Sanity checks of failures.  Mingw lacks symlink, but areadlink can
+     still distinguish between various errors.  */
+  errno = 0;
+  ASSERT (func ("no_such", 1) == NULL);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("no_such/", 1) == NULL);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("", 1) == NULL);
+  ASSERT (errno == ENOENT || errno == EINVAL);
+  errno = 0;
+  ASSERT (func (".", 1) == NULL);
+  ASSERT (errno == EINVAL);
+  errno = 0;
+  ASSERT (func ("./", 1) == NULL);
+  ASSERT (errno == EINVAL);
+  ASSERT (close (creat (BASE "file", 0600)) == 0);
+  errno = 0;
+  ASSERT (func (BASE "file", 1) == NULL);
+  ASSERT (errno == EINVAL);
+  errno = 0;
+  ASSERT (func (BASE "file/", 1) == NULL);
+  ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
+  ASSERT (unlink (BASE "file") == 0);
+
+  /* Now test actual symlinks.  */
+  if (symlink (BASE "dir", BASE "link"))
+    {
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+  ASSERT (mkdir (BASE "dir", 0700) == 0);
+  errno = 0;
+  ASSERT (func (BASE "link/", 1) == NULL);
+  ASSERT (errno == EINVAL);
+  {
+    /* Too small a guess is okay.  */
+    char *buf = func (BASE "link", 1);
+    ASSERT (buf);
+    ASSERT (strcmp (buf, BASE "dir") == 0);
+    free (buf);
+    /* Too large a guess is okay.  */
+    buf = func (BASE "link", 10000000);
+    ASSERT (buf);
+    ASSERT (strcmp (buf, BASE "dir") == 0);
+    free (buf);
+  }
+  ASSERT (rmdir (BASE "dir") == 0);
+  ASSERT (unlink (BASE "link") == 0);
+
+  return 0;
+}
diff --git a/tests/test-areadlinkat.c b/tests/test-areadlinkat.c
new file mode 100644 (file)
index 0000000..97a6215
--- /dev/null
@@ -0,0 +1,89 @@
+/* Tests of areadlinkat.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include "areadlink.h"
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-areadlinkat.t"
+
+#include "test-areadlink.h"
+
+static int dfd = AT_FDCWD;
+
+/* Wrapper for testing areadlinkat.  */
+static char *
+do_areadlinkat (char const *name, size_t ignored _GL_UNUSED)
+{
+  return areadlinkat (dfd, name);
+}
+
+int
+main (void)
+{
+  int result;
+
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  /* Basic tests.  */
+  result = test_areadlink (do_areadlinkat, false);
+  dfd = open (".", O_RDONLY);
+  ASSERT (0 <= dfd);
+  ASSERT (test_areadlink (do_areadlinkat, false) == result);
+
+  /* Relative tests.  */
+  if (result == 77)
+    fputs ("skipping test: symlinks not supported on this file system\n",
+           stderr);
+  else
+    {
+      char *buf;
+      ASSERT (symlink ("nowhere", BASE "link") == 0);
+      ASSERT (mkdir (BASE "dir", 0700) == 0);
+      ASSERT (chdir (BASE "dir") == 0);
+      buf = areadlinkat (dfd, BASE "link");
+      ASSERT (buf);
+      ASSERT (strcmp (buf, "nowhere") == 0);
+      free (buf);
+      errno = 0;
+      ASSERT (areadlinkat (-1, BASE "link") == NULL);
+      ASSERT (errno == EBADF);
+      errno = 0;
+      ASSERT (areadlinkat (AT_FDCWD, BASE "link") == NULL);
+      ASSERT (errno == ENOENT);
+      ASSERT (chdir ("..") == 0);
+      ASSERT (rmdir (BASE "dir") == 0);
+      ASSERT (unlink (BASE "link") == 0);
+    }
+
+  ASSERT (close (dfd) == 0);
+  return result;
+}
diff --git a/tests/test-argmatch.c b/tests/test-argmatch.c
new file mode 100644 (file)
index 0000000..fa25a7c
--- /dev/null
@@ -0,0 +1,107 @@
+/* Test of exact or abbreviated match search.
+   Copyright (C) 1990, 1998-1999, 2001-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 Bruno Haible <bruno@clisp.org>, 2007, based on test code
+   by David MacKenzie <djm@gnu.ai.mit.edu>.  */
+
+#include <config.h>
+
+#include "argmatch.h"
+
+#include <stdlib.h>
+
+#include "progname.h"
+#include "macros.h"
+
+/* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and
+   thus must link with a definition of that function.  Provide it here.  */
+#ifdef ARGMATCH_DIE_DECL
+
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+#  define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+# else
+#  define _GL_ATTRIBUTE_NORETURN /* empty */
+# endif
+
+ARGMATCH_DIE_DECL _GL_ATTRIBUTE_NORETURN;
+ARGMATCH_DIE_DECL { exit (1); }
+
+#endif
+
+enum backup_type
+{
+  no_backups,
+  simple_backups,
+  numbered_existing_backups,
+  numbered_backups
+};
+
+static const char *const backup_args[] =
+{
+  "no", "none", "off",
+  "simple", "never", "single",
+  "existing", "nil", "numbered-existing",
+  "numbered", "t", "newstyle",
+  NULL
+};
+
+static const enum backup_type backup_vals[] =
+{
+  no_backups, no_backups, no_backups,
+  simple_backups, simple_backups, simple_backups,
+  numbered_existing_backups, numbered_existing_backups, numbered_existing_backups,
+  numbered_backups, numbered_backups, numbered_backups
+};
+
+int
+main (int argc, char *argv[])
+{
+  set_program_name (argv[0]);
+
+  /* Not found.  */
+  ASSERT (ARGMATCH ("klingon", backup_args, backup_vals) == -1);
+
+  /* Exact match.  */
+  ASSERT (ARGMATCH ("none", backup_args, backup_vals) == 1);
+  ASSERT (ARGMATCH ("nil", backup_args, backup_vals) == 7);
+
+  /* Too long.  */
+  ASSERT (ARGMATCH ("nilpotent", backup_args, backup_vals) == -1);
+
+  /* Abbreviated.  */
+  ASSERT (ARGMATCH ("simpl", backup_args, backup_vals) == 3);
+  ASSERT (ARGMATCH ("simp", backup_args, backup_vals) == 3);
+  ASSERT (ARGMATCH ("sim", backup_args, backup_vals) == 3);
+
+  /* Exact match and abbreviated.  */
+  ASSERT (ARGMATCH ("numbered", backup_args, backup_vals) == 9);
+  ASSERT (ARGMATCH ("numbere", backup_args, backup_vals) == -2);
+  ASSERT (ARGMATCH ("number", backup_args, backup_vals) == -2);
+  ASSERT (ARGMATCH ("numbe", backup_args, backup_vals) == -2);
+  ASSERT (ARGMATCH ("numb", backup_args, backup_vals) == -2);
+  ASSERT (ARGMATCH ("num", backup_args, backup_vals) == -2);
+  ASSERT (ARGMATCH ("nu", backup_args, backup_vals) == -2);
+  ASSERT (ARGMATCH ("n", backup_args, backup_vals) == -2);
+
+  /* Ambiguous abbreviated.  */
+  ASSERT (ARGMATCH ("ne", backup_args, backup_vals) == -2);
+
+  /* Ambiguous abbreviated, but same value.  */
+  ASSERT (ARGMATCH ("si", backup_args, backup_vals) == 3);
+  ASSERT (ARGMATCH ("s", backup_args, backup_vals) == 3);
+
+  return 0;
+}
diff --git a/tests/test-binary-io.c b/tests/test-binary-io.c
new file mode 100644 (file)
index 0000000..8e5d193
--- /dev/null
@@ -0,0 +1,64 @@
+/* Test of binary mode I/O.
+   Copyright (C) 2005, 2007-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 Bruno Haible <bruno@clisp.org>, 2005.  */
+
+#include <config.h>
+
+#include "binary-io.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  /* Test the O_BINARY macro.  */
+  {
+    int fd =
+      open ("t-bin-out2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600);
+    if (write (fd, "Hello\n", 6) < 0)
+      exit (1);
+    close (fd);
+  }
+  {
+    struct stat statbuf;
+    if (stat ("t-bin-out2.tmp", &statbuf) < 0)
+      exit (1);
+    ASSERT (statbuf.st_size == 6);
+  }
+  unlink ("t-bin-out2.tmp");
+
+  /* Test the SET_BINARY macro.  */
+  SET_BINARY (1);
+  fputs ("Hello\n", stdout);
+  fclose (stdout);
+  fclose (stderr);
+  {
+    struct stat statbuf;
+    if (stat ("t-bin-out1.tmp", &statbuf) < 0)
+      exit (1);
+    ASSERT (statbuf.st_size == 6);
+  }
+
+  return 0;
+}
diff --git a/tests/test-binary-io.sh b/tests/test-binary-io.sh
new file mode 100755 (executable)
index 0000000..33e128c
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp"
+./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1
+
+rm -fr $tmpfiles
+
+exit 0
diff --git a/tests/test-bitrotate.c b/tests/test-bitrotate.c
new file mode 100644 (file)
index 0000000..16fbbbb
--- /dev/null
@@ -0,0 +1,279 @@
+/* Test of <bitrotate.h> substitute.
+   Copyright (C) 2007-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 Simon Josefsson <simon@josefsson.org>, 2008.  */
+
+#include <config.h>
+
+#include "bitrotate.h"
+
+#include "macros.h"
+
+int
+main (void)
+{
+  ASSERT (rotl8 (42, 0) == 42);
+  ASSERT (rotl8 (42, 1) == 84);
+  ASSERT (rotl8 (42, 2) == 168);
+  ASSERT (rotl8 (42, 3) == 81);
+  ASSERT (rotl8 (42, 4) == 162);
+  ASSERT (rotl8 (42, 5) == 69);
+  ASSERT (rotl8 (42, 6) == 138);
+  ASSERT (rotl8 (42, 7) == 21);
+  ASSERT (rotl8 (42, 8) == 42);
+
+  ASSERT (rotr8 (42, 0) == 42);
+  ASSERT (rotr8 (42, 1) == 21);
+  ASSERT (rotr8 (42, 2) == 138);
+  ASSERT (rotr8 (42, 3) == 69);
+  ASSERT (rotr8 (42, 4) == 162);
+  ASSERT (rotr8 (42, 5) == 81);
+  ASSERT (rotr8 (42, 6) == 168);
+  ASSERT (rotr8 (42, 7) == 84);
+  ASSERT (rotr8 (42, 8) == 42);
+
+  ASSERT (rotl16 (43981, 0) == 43981);
+  ASSERT (rotl16 (43981, 1) == 22427);
+  ASSERT (rotl16 (43981, 2) == 44854);
+  ASSERT (rotl16 (43981, 3) == 24173);
+  ASSERT (rotl16 (43981, 4) == 48346);
+  ASSERT (rotl16 (43981, 5) == 31157);
+  ASSERT (rotl16 (43981, 6) == 62314);
+  ASSERT (rotl16 (43981, 7) == 59093);
+  ASSERT (rotl16 (43981, 8) == 52651);
+  ASSERT (rotl16 (43981, 9) == 39767);
+  ASSERT (rotl16 (43981, 10) == 13999);
+  ASSERT (rotl16 (43981, 11) == 27998);
+  ASSERT (rotl16 (43981, 12) == 55996);
+  ASSERT (rotl16 (43981, 13) == 46457);
+  ASSERT (rotl16 (43981, 14) == 27379);
+  ASSERT (rotl16 (43981, 15) == 54758);
+  ASSERT (rotl16 (43981, 16) == 43981);
+
+  ASSERT (rotr16 (43981, 0) == 43981);
+  ASSERT (rotr16 (43981, 1) == 54758);
+  ASSERT (rotr16 (43981, 2) == 27379);
+  ASSERT (rotr16 (43981, 3) == 46457);
+  ASSERT (rotr16 (43981, 4) == 55996);
+  ASSERT (rotr16 (43981, 5) == 27998);
+  ASSERT (rotr16 (43981, 6) == 13999);
+  ASSERT (rotr16 (43981, 7) == 39767);
+  ASSERT (rotr16 (43981, 8) == 52651);
+  ASSERT (rotr16 (43981, 9) == 59093);
+  ASSERT (rotr16 (43981, 10) == 62314);
+  ASSERT (rotr16 (43981, 11) == 31157);
+  ASSERT (rotr16 (43981, 12) == 48346);
+  ASSERT (rotr16 (43981, 13) == 24173);
+  ASSERT (rotr16 (43981, 14) == 44854);
+  ASSERT (rotr16 (43981, 15) == 22427);
+  ASSERT (rotr16 (43981, 16) == 43981);
+
+  ASSERT (rotl32 (2309737967U, 1) == 324508639U);
+  ASSERT (rotl32 (2309737967U, 2) == 649017278U);
+  ASSERT (rotl32 (2309737967U, 3) == 1298034556U);
+  ASSERT (rotl32 (2309737967U, 4) == 2596069112U);
+  ASSERT (rotl32 (2309737967U, 5) == 897170929U);
+  ASSERT (rotl32 (2309737967U, 6) == 1794341858U);
+  ASSERT (rotl32 (2309737967U, 7) == 3588683716U);
+  ASSERT (rotl32 (2309737967U, 8) == 2882400137U);
+  ASSERT (rotl32 (2309737967U, 9) == 1469832979U);
+  ASSERT (rotl32 (2309737967U, 10) == 2939665958U);
+  ASSERT (rotl32 (2309737967U, 11) == 1584364621U);
+  ASSERT (rotl32 (2309737967U, 12) == 3168729242U);
+  ASSERT (rotl32 (2309737967U, 13) == 2042491189U);
+  ASSERT (rotl32 (2309737967U, 14) == 4084982378U);
+  ASSERT (rotl32 (2309737967U, 15) == 3874997461U);
+  ASSERT (rotl32 (2309737967U, 16) == 3455027627U);
+  ASSERT (rotl32 (2309737967U, 17) == 2615087959U);
+  ASSERT (rotl32 (2309737967U, 18) == 935208623U);
+  ASSERT (rotl32 (2309737967U, 19) == 1870417246U);
+  ASSERT (rotl32 (2309737967U, 20) == 3740834492U);
+  ASSERT (rotl32 (2309737967U, 21) == 3186701689U);
+  ASSERT (rotl32 (2309737967U, 22) == 2078436083U);
+  ASSERT (rotl32 (2309737967U, 23) == 4156872166U);
+  ASSERT (rotl32 (2309737967U, 24) == 4018777037U);
+  ASSERT (rotl32 (2309737967U, 25) == 3742586779U);
+  ASSERT (rotl32 (2309737967U, 26) == 3190206263U);
+  ASSERT (rotl32 (2309737967U, 27) == 2085445231U);
+  ASSERT (rotl32 (2309737967U, 28) == 4170890462U);
+  ASSERT (rotl32 (2309737967U, 29) == 4046813629U);
+  ASSERT (rotl32 (2309737967U, 30) == 3798659963U);
+  ASSERT (rotl32 (2309737967U, 31) == 3302352631U);
+
+  ASSERT (rotr32 (2309737967U, 1) == 3302352631lU);
+  ASSERT (rotr32 (2309737967U, 2) == 3798659963lU);
+  ASSERT (rotr32 (2309737967U, 3) == 4046813629lU);
+  ASSERT (rotr32 (2309737967U, 4) == 4170890462lU);
+  ASSERT (rotr32 (2309737967U, 5) == 2085445231lU);
+  ASSERT (rotr32 (2309737967U, 6) == 3190206263lU);
+  ASSERT (rotr32 (2309737967U, 7) == 3742586779lU);
+  ASSERT (rotr32 (2309737967U, 8) == 4018777037lU);
+  ASSERT (rotr32 (2309737967U, 9) == 4156872166lU);
+  ASSERT (rotr32 (2309737967U, 10) == 2078436083lU);
+  ASSERT (rotr32 (2309737967U, 11) == 3186701689lU);
+  ASSERT (rotr32 (2309737967U, 12) == 3740834492lU);
+  ASSERT (rotr32 (2309737967U, 13) == 1870417246lU);
+  ASSERT (rotr32 (2309737967U, 14) == 935208623lU);
+  ASSERT (rotr32 (2309737967U, 15) == 2615087959lU);
+  ASSERT (rotr32 (2309737967U, 16) == 3455027627lU);
+  ASSERT (rotr32 (2309737967U, 17) == 3874997461lU);
+  ASSERT (rotr32 (2309737967U, 18) == 4084982378lU);
+  ASSERT (rotr32 (2309737967U, 19) == 2042491189lU);
+  ASSERT (rotr32 (2309737967U, 20) == 3168729242lU);
+  ASSERT (rotr32 (2309737967U, 21) == 1584364621lU);
+  ASSERT (rotr32 (2309737967U, 22) == 2939665958lU);
+  ASSERT (rotr32 (2309737967U, 23) == 1469832979lU);
+  ASSERT (rotr32 (2309737967U, 24) == 2882400137lU);
+  ASSERT (rotr32 (2309737967U, 25) == 3588683716lU);
+  ASSERT (rotr32 (2309737967U, 26) == 1794341858lU);
+  ASSERT (rotr32 (2309737967U, 27) == 897170929lU);
+  ASSERT (rotr32 (2309737967U, 28) == 2596069112lU);
+  ASSERT (rotr32 (2309737967U, 29) == 1298034556lU);
+  ASSERT (rotr32 (2309737967U, 30) == 649017278lU);
+  ASSERT (rotr32 (2309737967U, 31) == 324508639lU);
+
+#ifdef UINT64_MAX
+  ASSERT (rotl64 (16045690984503098046ULL, 1) == 13644637895296644477ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 2) == 8842531716883737339ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 3) == 17685063433767474678ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 4) == 16923382793825397741ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 5) == 15400021513941243867ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 6) == 12353298954172936119ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 7) == 6259853834636320623ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 8) == 12519707669272641246ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 9) == 6592671264835730877ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 10) == 13185342529671461754ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 11) == 7923940985633371893ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 12) == 15847881971266743786ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 13) == 13249019868823935957ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 14) == 8051295663938320299ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 15) == 16102591327876640598ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 16) == 13758438582043729581ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 17) == 9070133090377907547ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 18) == 18140266180755815094ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 19) == 17833788287802078573ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 20) == 17220832501894605531ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 21) == 15994920930079659447ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 22) == 13543097786449767279ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 23) == 8639451499189982943ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 24) == 17278902998379965886ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 25) == 16111061923050380157ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 26) == 13775379772391208699ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 27) == 9104015471072865783ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 28) == 18208030942145731566ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 29) == 17969317810581911517ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 30) == 17491891547454271419ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 31) == 16537039021198991223ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 32) == 14627333968688430831ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 33) == 10807923863667310047ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 34) == 3169103653625068479ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 35) == 6338207307250136958ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 36) == 12676414614500273916ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 37) == 6906085155290996217ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 38) == 13812170310581992434ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 39) == 9177596547454433253ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 40) == 18355193094908866506ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 41) == 18263642116108181397ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 42) == 18080540158506811179ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 43) == 17714336243304070743ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 44) == 16981928412898589871ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 45) == 15517112752087628127ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 46) == 12587481430465704639ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 47) == 6728218787221857663ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 48) == 13456437574443715326ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 49) == 8466131075177879037ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 50) == 16932262150355758074ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 51) == 15417780227001964533ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 52) == 12388816380294377451ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 53) == 6330888686879203287ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 54) == 12661777373758406574ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 55) == 6876810673807261533ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 56) == 13753621347614523066ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 57) == 9060498621519494517ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 58) == 18120997243038989034ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 59) == 17795250412368426453ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 60) == 17143756751027301291ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 61) == 15840769428345050967ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 62) == 13234794782980550319ULL);
+  ASSERT (rotl64 (16045690984503098046ULL, 63) == 8022845492251549023ULL);
+
+  ASSERT (rotr64 (16045690984503098046ULL, 1) == 8022845492251549023ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 2) == 13234794782980550319ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 3) == 15840769428345050967ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 4) == 17143756751027301291ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 5) == 17795250412368426453ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 6) == 18120997243038989034ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 7) == 9060498621519494517ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 8) == 13753621347614523066ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 9) == 6876810673807261533ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 10) == 12661777373758406574ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 11) == 6330888686879203287ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 12) == 12388816380294377451ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 13) == 15417780227001964533ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 14) == 16932262150355758074ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 15) == 8466131075177879037ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 16) == 13456437574443715326ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 17) == 6728218787221857663ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 18) == 12587481430465704639ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 19) == 15517112752087628127ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 20) == 16981928412898589871ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 21) == 17714336243304070743ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 22) == 18080540158506811179ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 23) == 18263642116108181397ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 24) == 18355193094908866506ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 25) == 9177596547454433253ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 26) == 13812170310581992434ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 27) == 6906085155290996217ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 28) == 12676414614500273916ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 29) == 6338207307250136958ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 30) == 3169103653625068479ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 31) == 10807923863667310047ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 32) == 14627333968688430831ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 33) == 16537039021198991223ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 34) == 17491891547454271419ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 35) == 17969317810581911517ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 36) == 18208030942145731566ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 37) == 9104015471072865783ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 38) == 13775379772391208699ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 39) == 16111061923050380157ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 40) == 17278902998379965886ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 41) == 8639451499189982943ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 42) == 13543097786449767279ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 43) == 15994920930079659447ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 44) == 17220832501894605531ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 45) == 17833788287802078573ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 46) == 18140266180755815094ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 47) == 9070133090377907547ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 48) == 13758438582043729581ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 49) == 16102591327876640598ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 50) == 8051295663938320299ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 51) == 13249019868823935957ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 52) == 15847881971266743786ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 53) == 7923940985633371893ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 54) == 13185342529671461754ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 55) == 6592671264835730877ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 56) == 12519707669272641246ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 57) == 6259853834636320623ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 58) == 12353298954172936119ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 59) == 15400021513941243867ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 60) == 16923382793825397741ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 61) == 17685063433767474678ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 62) == 8842531716883737339ULL);
+  ASSERT (rotr64 (16045690984503098046ULL, 63) == 13644637895296644477ULL);
+#endif /* UINT64_MAX */
+
+  return 0;
+}
diff --git a/tests/test-btowc.c b/tests/test-btowc.c
new file mode 100644 (file)
index 0000000..7907cbe
--- /dev/null
@@ -0,0 +1,63 @@
+/* Test of conversion of unibyte character to wide character.
+   Copyright (C) 2008-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 Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (btowc, wint_t, (int));
+
+#include <locale.h>
+#include <stdio.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  int c;
+
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  ASSERT (btowc (EOF) == WEOF);
+
+  if (argc > 1)
+    switch (argv[1][0])
+      {
+      case '1':
+        /* Locale encoding is ISO-8859-1 or ISO-8859-15.  */
+        for (c = 0; c < 0x80; c++)
+          ASSERT (btowc (c) == c);
+        for (c = 0xA0; c < 0x100; c++)
+          ASSERT (btowc (c) != WEOF);
+        return 0;
+
+      case '2':
+        /* Locale encoding is UTF-8.  */
+        for (c = 0; c < 0x80; c++)
+          ASSERT (btowc (c) == c);
+        for (c = 0x80; c < 0x100; c++)
+          ASSERT (btowc (c) == WEOF);
+        return 0;
+      }
+
+  return 1;
+}
diff --git a/tests/test-btowc1.sh b/tests/test-btowc1.sh
new file mode 100755 (executable)
index 0000000..aaef48d
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no traditional french locale is installed"
+  else
+    echo "Skipping test: no traditional french locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR \
+./test-btowc${EXEEXT} 1
diff --git a/tests/test-btowc2.sh b/tests/test-btowc2.sh
new file mode 100755 (executable)
index 0000000..2e06038
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no french Unicode locale is installed"
+  else
+    echo "Skipping test: no french Unicode locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-btowc${EXEEXT} 2
diff --git a/tests/test-c-ctype.c b/tests/test-c-ctype.c
new file mode 100644 (file)
index 0000000..9d748ff
--- /dev/null
@@ -0,0 +1,386 @@
+/* Test of character handling in C locale.
+   Copyright (C) 2005, 2007-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 Bruno Haible <bruno@clisp.org>, 2005.  */
+
+#include <config.h>
+
+#include "c-ctype.h"
+
+#include <locale.h>
+
+#include "macros.h"
+
+static void
+test_all (void)
+{
+  int c;
+
+  for (c = -0x80; c < 0x100; c++)
+    {
+      ASSERT (c_isascii (c) == (c >= 0 && c < 0x80));
+
+      switch (c)
+        {
+        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 '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 '0': case '1': case '2': case '3': case '4': case '5':
+        case '6': case '7': case '8': case '9':
+          ASSERT (c_isalnum (c) == 1);
+          break;
+        default:
+          ASSERT (c_isalnum (c) == 0);
+          break;
+        }
+
+      switch (c)
+        {
+        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 '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':
+          ASSERT (c_isalpha (c) == 1);
+          break;
+        default:
+          ASSERT (c_isalpha (c) == 0);
+          break;
+        }
+
+      switch (c)
+        {
+        case '\t': case ' ':
+          ASSERT (c_isblank (c) == 1);
+          break;
+        default:
+          ASSERT (c_isblank (c) == 0);
+          break;
+        }
+
+      ASSERT (c_iscntrl (c) == ((c >= 0 && c < 0x20) || c == 0x7f));
+
+      switch (c)
+        {
+        case '0': case '1': case '2': case '3': case '4': case '5':
+        case '6': case '7': case '8': case '9':
+          ASSERT (c_isdigit (c) == 1);
+          break;
+        default:
+          ASSERT (c_isdigit (c) == 0);
+          break;
+        }
+
+      switch (c)
+        {
+        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':
+          ASSERT (c_islower (c) == 1);
+          break;
+        default:
+          ASSERT (c_islower (c) == 0);
+          break;
+        }
+
+      ASSERT (c_isgraph (c) == ((c >= 0x20 && c < 0x7f) && c != ' '));
+
+      ASSERT (c_isprint (c) == (c >= 0x20 && c < 0x7f));
+
+      ASSERT (c_ispunct (c) == (c_isgraph (c) && !c_isalnum (c)));
+
+      switch (c)
+        {
+        case ' ': case '\t': case '\n': case '\v': case '\f': case '\r':
+          ASSERT (c_isspace (c) == 1);
+          break;
+        default:
+          ASSERT (c_isspace (c) == 0);
+          break;
+        }
+
+      switch (c)
+        {
+        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':
+          ASSERT (c_isupper (c) == 1);
+          break;
+        default:
+          ASSERT (c_isupper (c) == 0);
+          break;
+        }
+
+      switch (c)
+        {
+        case '0': case '1': case '2': case '3': case '4': case '5':
+        case '6': case '7': case '8': case '9':
+        case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+        case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+          ASSERT (c_isxdigit (c) == 1);
+          break;
+        default:
+          ASSERT (c_isxdigit (c) == 0);
+          break;
+        }
+
+      switch (c)
+        {
+        case 'A':
+          ASSERT (c_tolower (c) == 'a');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'B':
+          ASSERT (c_tolower (c) == 'b');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'C':
+          ASSERT (c_tolower (c) == 'c');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'D':
+          ASSERT (c_tolower (c) == 'd');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'E':
+          ASSERT (c_tolower (c) == 'e');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'F':
+          ASSERT (c_tolower (c) == 'f');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'G':
+          ASSERT (c_tolower (c) == 'g');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'H':
+          ASSERT (c_tolower (c) == 'h');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'I':
+          ASSERT (c_tolower (c) == 'i');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'J':
+          ASSERT (c_tolower (c) == 'j');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'K':
+          ASSERT (c_tolower (c) == 'k');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'L':
+          ASSERT (c_tolower (c) == 'l');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'M':
+          ASSERT (c_tolower (c) == 'm');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'N':
+          ASSERT (c_tolower (c) == 'n');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'O':
+          ASSERT (c_tolower (c) == 'o');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'P':
+          ASSERT (c_tolower (c) == 'p');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'Q':
+          ASSERT (c_tolower (c) == 'q');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'R':
+          ASSERT (c_tolower (c) == 'r');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'S':
+          ASSERT (c_tolower (c) == 's');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'T':
+          ASSERT (c_tolower (c) == 't');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'U':
+          ASSERT (c_tolower (c) == 'u');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'V':
+          ASSERT (c_tolower (c) == 'v');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'W':
+          ASSERT (c_tolower (c) == 'w');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'X':
+          ASSERT (c_tolower (c) == 'x');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'Y':
+          ASSERT (c_tolower (c) == 'y');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'Z':
+          ASSERT (c_tolower (c) == 'z');
+          ASSERT (c_toupper (c) == c);
+          break;
+        case 'a':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'A');
+          break;
+        case 'b':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'B');
+          break;
+        case 'c':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'C');
+          break;
+        case 'd':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'D');
+          break;
+        case 'e':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'E');
+          break;
+        case 'f':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'F');
+          break;
+        case 'g':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'G');
+          break;
+        case 'h':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'H');
+          break;
+        case 'i':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'I');
+          break;
+        case 'j':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'J');
+          break;
+        case 'k':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'K');
+          break;
+        case 'l':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'L');
+          break;
+        case 'm':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'M');
+          break;
+        case 'n':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'N');
+          break;
+        case 'o':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'O');
+          break;
+        case 'p':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'P');
+          break;
+        case 'q':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'Q');
+          break;
+        case 'r':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'R');
+          break;
+        case 's':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'S');
+          break;
+        case 't':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'T');
+          break;
+        case 'u':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'U');
+          break;
+        case 'v':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'V');
+          break;
+        case 'w':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'W');
+          break;
+        case 'x':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'X');
+          break;
+        case 'y':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'Y');
+          break;
+        case 'z':
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == 'Z');
+          break;
+        default:
+          ASSERT (c_tolower (c) == c);
+          ASSERT (c_toupper (c) == c);
+          break;
+        }
+    }
+}
+
+int
+main ()
+{
+  test_all ();
+
+  setlocale (LC_ALL, "de_DE");
+  test_all ();
+
+  setlocale (LC_ALL, "ja_JP.EUC-JP");
+  test_all ();
+
+  return 0;
+}
diff --git a/tests/test-c-strcase.sh b/tests/test-c-strcase.sh
new file mode 100755 (executable)
index 0000000..5fcf906
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Test in the C locale.
+./test-c-strcasecmp${EXEEXT} || exit 1
+./test-c-strncasecmp${EXEEXT} || exit 1
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+  LC_ALL=$LOCALE_FR ./test-c-strcasecmp${EXEEXT} locale || exit 1
+  LC_ALL=$LOCALE_FR ./test-c-strncasecmp${EXEEXT} locale || exit 1
+fi
+
+# Test in a Turkish UTF-8 locale.
+: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+if test $LOCALE_TR_UTF8 != none; then
+  LC_ALL=$LOCALE_TR_UTF8 ./test-c-strcasecmp${EXEEXT} locale || exit 1
+  LC_ALL=$LOCALE_TR_UTF8 ./test-c-strncasecmp${EXEEXT} locale || exit 1
+fi
+
+exit 0
diff --git a/tests/test-c-strcasecmp.c b/tests/test-c-strcasecmp.c
new file mode 100644 (file)
index 0000000..faa3001
--- /dev/null
@@ -0,0 +1,65 @@
+/* Test of case-insensitive string comparison function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "c-strcase.h"
+
+#include <locale.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  if (argc > 1)
+    {
+      /* configure should already have checked that the locale is supported.  */
+      if (setlocale (LC_ALL, "") == NULL)
+        return 1;
+    }
+
+  ASSERT (c_strcasecmp ("paragraph", "Paragraph") == 0);
+
+  ASSERT (c_strcasecmp ("paragrapH", "parAgRaph") == 0);
+
+  ASSERT (c_strcasecmp ("paragraph", "paraLyzed") < 0);
+  ASSERT (c_strcasecmp ("paraLyzed", "paragraph") > 0);
+
+  ASSERT (c_strcasecmp ("para", "paragraph") < 0);
+  ASSERT (c_strcasecmp ("paragraph", "para") > 0);
+
+  /* The following tests shows how c_strcasecmp() is different from
+     strcasecmp().  */
+
+  ASSERT (c_strcasecmp ("\311mile", "\351mile") < 0);
+  ASSERT (c_strcasecmp ("\351mile", "\311mile") > 0);
+
+  /* The following tests shows how c_strcasecmp() is different from
+     mbscasecmp().  */
+
+  ASSERT (c_strcasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") > 0); /* özgür */
+  ASSERT (c_strcasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") < 0); /* özgür */
+
+  /* This test shows how strings of different size cannot compare equal.  */
+  ASSERT (c_strcasecmp ("turkish", "TURK\304\260SH") < 0);
+  ASSERT (c_strcasecmp ("TURK\304\260SH", "turkish") > 0);
+
+  return 0;
+}
diff --git a/tests/test-c-strcasestr.c b/tests/test-c-strcasestr.c
new file mode 100644 (file)
index 0000000..7d0d635
--- /dev/null
@@ -0,0 +1,241 @@
+/* Test of case-insensitive searching in a string.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "c-strcasestr.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  {
+    const char input[] = "foo";
+    const char *result = c_strcasestr (input, "");
+    ASSERT (result == input);
+  }
+
+  {
+    const char input[] = "foo";
+    const char *result = c_strcasestr (input, "O");
+    ASSERT (result == input + 1);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = c_strcasestr (input, "ABCDaBD");
+    ASSERT (result == input + 15);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = c_strcasestr (input, "ABCDaBE");
+    ASSERT (result == NULL);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = c_strcasestr (input, "ABCDaBCD");
+    ASSERT (result == input + 11);
+  }
+
+  /* Check that a long periodic needle does not cause false positives.  */
+  {
+    const char input[] = ("F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                          "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                          "_C3_A7_20_EF_BF_BD");
+    const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+    const char *result = c_strcasestr (input, need);
+    ASSERT (result == NULL);
+  }
+  {
+    const char input[] = ("F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                          "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                          "_C3_A7_20_EF_BF_BD_DA_B5_C2_A6_20"
+                          "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD");
+    const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+    const char *result = c_strcasestr (input, need);
+    ASSERT (result == input + 115);
+  }
+
+  /* Check that a very long haystack is handled quickly if the needle is
+     short and occurs near the beginning.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *needle =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaAaaaaaaAAAAaaaaaaa"
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+    char *haystack = (char *) malloc (m + 1);
+    if (haystack != NULL)
+      {
+        memset (haystack, 'A', m);
+        haystack[0] = 'B';
+        haystack[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (c_strcasestr (haystack, needle) == haystack + 1);
+          }
+
+        free (haystack);
+      }
+  }
+
+  /* Check that a very long needle is discarded quickly if the haystack is
+     short.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *haystack =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
+    char *needle = (char *) malloc (m + 1);
+    if (needle != NULL)
+      {
+        memset (needle, 'A', m);
+        needle[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (c_strcasestr (haystack, needle) == NULL);
+          }
+
+        free (needle);
+      }
+  }
+
+  /* Check that the asymptotic worst-case complexity is not quadratic.  */
+  {
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    if (haystack != NULL && needle != NULL)
+      {
+        const char *result;
+
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = '\0';
+
+        memset (needle, 'a', m);
+        needle[m] = 'B';
+        needle[m + 1] = '\0';
+
+        result = c_strcasestr (haystack, needle);
+        ASSERT (result == haystack + m);
+      }
+    free (needle);
+    free (haystack);
+  }
+
+  {
+    /* Ensure that with a barely periodic "short" needle, c_strcasestr's
+       search does not mistakenly skip just past the match point.
+       This use of c_strcasestr would mistakenly return NULL before
+       gnulib v0.0-4927.  */
+    const char *haystack =
+      "\n"
+      "with_build_libsubdir\n"
+      "with_local_prefix\n"
+      "with_gxx_include_dir\n"
+      "with_cpp_install_dir\n"
+      "enable_generated_files_in_srcdir\n"
+      "with_gnu_ld\n"
+      "with_ld\n"
+      "with_demangler_in_ld\n"
+      "with_gnu_as\n"
+      "with_as\n"
+      "enable_largefile\n"
+      "enable_werror_always\n"
+      "enable_checking\n"
+      "enable_coverage\n"
+      "enable_gather_detailed_mem_stats\n"
+      "enable_build_with_cxx\n"
+      "with_stabs\n"
+      "enable_multilib\n"
+      "enable___cxa_atexit\n"
+      "enable_decimal_float\n"
+      "enable_fixed_point\n"
+      "enable_threads\n"
+      "enable_tls\n"
+      "enable_objc_gc\n"
+      "with_dwarf2\n"
+      "enable_shared\n"
+      "with_build_sysroot\n"
+      "with_sysroot\n"
+      "with_specs\n"
+      "with_pkgversion\n"
+      "with_bugurl\n"
+      "enable_languages\n"
+      "with_multilib_list\n";
+    const char *needle = "\n"
+      "with_GNU_ld\n";
+    const char* p = c_strcasestr (haystack, needle);
+    ASSERT (p - haystack == 114);
+  }
+
+  {
+    /* Same bug, shorter trigger.  */
+    const char *haystack = "..wi.D.";
+    const char *needle = ".d.";
+    const char* p = c_strcasestr (haystack, needle);
+    ASSERT (p - haystack == 4);
+  }
+
+  {
+    /* Like the above, but trigger the flaw in two_way_long_needle
+       by using a needle of length LONG_NEEDLE_THRESHOLD (32) or greater.
+       Rather than trying to find the right alignment manually, I've
+       arbitrarily chosen the following needle and template for the
+       haystack, and ensure that for each placement of the needle in
+       that haystack, c_strcasestr finds it.  */
+    const char *needle = "\nwith_gnu_ld-extend-to-len-32-b\n";
+    const char *h =
+      "\n"
+      "with_build_libsubdir\n"
+      "with_local_prefix\n"
+      "with_gxx_include_dir\n"
+      "with_cpp_install_dir\n"
+      "with_e_\n"
+      "..............................\n"
+      "with_FGHIJKLMNOPQRSTUVWXYZ\n"
+      "with_567890123456789\n"
+      "with_multilib_list\n";
+    size_t h_len = strlen (h);
+    char *haystack = malloc (h_len + 1);
+    size_t i;
+    ASSERT (haystack);
+    for (i = 0; i < h_len - strlen (needle); i++)
+      {
+        const char *p;
+        memcpy (haystack, h, h_len + 1);
+        memcpy (haystack + i, needle, strlen (needle) + 1);
+        p = c_strcasestr (haystack, needle);
+        ASSERT (p);
+        ASSERT (p - haystack == i);
+      }
+  }
+
+  return 0;
+}
diff --git a/tests/test-c-strncasecmp.c b/tests/test-c-strncasecmp.c
new file mode 100644 (file)
index 0000000..6a225c7
--- /dev/null
@@ -0,0 +1,79 @@
+/* Test of case-insensitive string comparison function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "c-strcase.h"
+
+#include <locale.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  if (argc > 1)
+    {
+      /* configure should already have checked that the locale is supported.  */
+      if (setlocale (LC_ALL, "") == NULL)
+        return 1;
+    }
+
+  ASSERT (c_strncasecmp ("paragraph", "Paragraph", 1000000) == 0);
+  ASSERT (c_strncasecmp ("paragraph", "Paragraph", 9) == 0);
+
+  ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 1000000) == 0);
+  ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 9) == 0);
+
+  ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 10) < 0);
+  ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 9) < 0);
+  ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 5) < 0);
+  ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 4) == 0);
+  ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 10) > 0);
+  ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 9) > 0);
+  ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 5) > 0);
+  ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 4) == 0);
+
+  ASSERT (c_strncasecmp ("para", "paragraph", 10) < 0);
+  ASSERT (c_strncasecmp ("para", "paragraph", 9) < 0);
+  ASSERT (c_strncasecmp ("para", "paragraph", 5) < 0);
+  ASSERT (c_strncasecmp ("para", "paragraph", 4) == 0);
+  ASSERT (c_strncasecmp ("paragraph", "para", 10) > 0);
+  ASSERT (c_strncasecmp ("paragraph", "para", 9) > 0);
+  ASSERT (c_strncasecmp ("paragraph", "para", 5) > 0);
+  ASSERT (c_strncasecmp ("paragraph", "para", 4) == 0);
+
+  /* The following tests shows how c_strncasecmp() is different from
+     strncasecmp().  */
+
+  ASSERT (c_strncasecmp ("\311mily", "\351mile", 4) < 0);
+  ASSERT (c_strncasecmp ("\351mile", "\311mily", 4) > 0);
+
+  /* The following tests shows how c_strncasecmp() is different from
+     mbsncasecmp().  */
+
+  ASSERT (c_strncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) > 0); /* özgür */
+  ASSERT (c_strncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) < 0); /* özgür */
+
+  /* This test shows how strings of different size cannot compare equal.  */
+  ASSERT (c_strncasecmp ("turkish", "TURK\304\260SH", 7) < 0);
+  ASSERT (c_strncasecmp ("TURK\304\260SH", "turkish", 7) > 0);
+
+  return 0;
+}
diff --git a/tests/test-c-strstr.c b/tests/test-c-strstr.c
new file mode 100644 (file)
index 0000000..8ec90ae
--- /dev/null
@@ -0,0 +1,127 @@
+/* Test of searching in a string.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "c-strstr.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  {
+    const char input[] = "foo";
+    const char *result = c_strstr (input, "");
+    ASSERT (result == input);
+  }
+
+  {
+    const char input[] = "foo";
+    const char *result = c_strstr (input, "o");
+    ASSERT (result == input + 1);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = c_strstr (input, "ABCDABD");
+    ASSERT (result == input + 15);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = c_strstr (input, "ABCDABE");
+    ASSERT (result == NULL);
+  }
+
+  /* Check that a very long haystack is handled quickly if the needle is
+     short and occurs near the beginning.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *needle =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+    char *haystack = (char *) malloc (m + 1);
+    if (haystack != NULL)
+      {
+        memset (haystack, 'A', m);
+        haystack[0] = 'B';
+        haystack[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (c_strstr (haystack, needle) == haystack + 1);
+          }
+
+        free (haystack);
+      }
+  }
+
+  /* Check that a very long needle is discarded quickly if the haystack is
+     short.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *haystack =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
+    char *needle = (char *) malloc (m + 1);
+    if (needle != NULL)
+      {
+        memset (needle, 'A', m);
+        needle[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (c_strstr (haystack, needle) == NULL);
+          }
+
+        free (needle);
+      }
+  }
+
+  /* Check that the asymptotic worst-case complexity is not quadratic.  */
+  {
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    if (haystack != NULL && needle != NULL)
+      {
+        const char *result;
+
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = '\0';
+
+        memset (needle, 'A', m);
+        needle[m] = 'B';
+        needle[m + 1] = '\0';
+
+        result = c_strstr (haystack, needle);
+        ASSERT (result == haystack + m);
+      }
+    free (needle);
+    free (haystack);
+  }
+
+  return 0;
+}
diff --git a/tests/test-canonicalize.c b/tests/test-canonicalize.c
new file mode 100644 (file)
index 0000000..a095e0e
--- /dev/null
@@ -0,0 +1,347 @@
+/* Test of execution of file name canonicalization.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "canonicalize.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "same-inode.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "t-can.tmp"
+
+static void *
+null_ptr (void)
+{
+  return NULL;
+}
+
+int
+main (void)
+{
+  /* Setup some hierarchy to be used by this test.  Start by removing
+     any leftovers from a previous partial run.  */
+  {
+    int fd;
+    ignore_value (system ("rm -rf " BASE " ise"));
+    ASSERT (mkdir (BASE, 0700) == 0);
+    fd = creat (BASE "/tra", 0600);
+    ASSERT (0 <= fd);
+    ASSERT (close (fd) == 0);
+  }
+
+  /* Check for ., .., intermediate // handling, and for error cases.  */
+  {
+    char *result1 = canonicalize_file_name (BASE "//./..//" BASE "/tra");
+    char *result2 = canonicalize_filename_mode (BASE "//./..//" BASE "/tra",
+                                                CAN_EXISTING);
+    ASSERT (result1 != NULL);
+    ASSERT (result2 != NULL);
+    ASSERT (strcmp (result1, result2) == 0);
+    ASSERT (strstr (result1, "/" BASE "/tra")
+            == result1 + strlen (result1) - strlen ("/" BASE "/tra"));
+    free (result1);
+    free (result2);
+    errno = 0;
+    result1 = canonicalize_file_name ("");
+    ASSERT (result1 == NULL);
+    ASSERT (errno == ENOENT);
+    errno = 0;
+    result2 = canonicalize_filename_mode ("", CAN_EXISTING);
+    ASSERT (result2 == NULL);
+    ASSERT (errno == ENOENT);
+    errno = 0;
+    result1 = canonicalize_file_name (null_ptr ());
+    ASSERT (result1 == NULL);
+    ASSERT (errno == EINVAL);
+    errno = 0;
+    result2 = canonicalize_filename_mode (NULL, CAN_EXISTING);
+    ASSERT (result2 == NULL);
+    ASSERT (errno == EINVAL);
+  }
+
+  /* Check that a non-directory with trailing slash yields NULL.  */
+  {
+    char *result1;
+    char *result2;
+    errno = 0;
+    result1 = canonicalize_file_name (BASE "/tra/");
+    ASSERT (result1 == NULL);
+    ASSERT (errno == ENOTDIR);
+    errno = 0;
+    result2 = canonicalize_filename_mode (BASE "/tra/", CAN_EXISTING);
+    ASSERT (result2 == NULL);
+    ASSERT (errno == ENOTDIR);
+  }
+
+  /* Check that a missing directory yields NULL.  */
+  {
+    char *result1;
+    char *result2;
+    errno = 0;
+    result1 = canonicalize_file_name (BASE "/zzz/..");
+    ASSERT (result1 == NULL);
+    ASSERT (errno == ENOENT);
+    errno = 0;
+    result2 = canonicalize_filename_mode (BASE "/zzz/..", CAN_EXISTING);
+    ASSERT (result2 == NULL);
+    ASSERT (errno == ENOENT);
+  }
+
+  /* From here on out, tests involve symlinks.  */
+  if (symlink (BASE "/ket", "ise") != 0)
+    {
+      ASSERT (remove (BASE "/tra") == 0);
+      ASSERT (rmdir (BASE) == 0);
+      fputs ("skipping test: symlinks not supported on this file system\n",
+             stderr);
+      return 77;
+    }
+  ASSERT (symlink ("bef", BASE "/plo") == 0);
+  ASSERT (symlink ("tra", BASE "/huk") == 0);
+  ASSERT (symlink ("lum", BASE "/bef") == 0);
+  ASSERT (symlink ("wum", BASE "/ouk") == 0);
+  ASSERT (symlink ("../ise", BASE "/ket") == 0);
+  ASSERT (mkdir (BASE "/lum", 0700) == 0);
+  ASSERT (symlink ("s", BASE "/p") == 0);
+  ASSERT (symlink ("d", BASE "/s") == 0);
+  ASSERT (mkdir (BASE "/d", 0700) == 0);
+  ASSERT (close (creat (BASE "/d/2", 0600)) == 0);
+  ASSERT (symlink ("../s/2", BASE "/d/1") == 0);
+  ASSERT (symlink ("//.//../..", BASE "/droot") == 0);
+
+  /* Check that the symbolic link to a file can be resolved.  */
+  {
+    char *result1 = canonicalize_file_name (BASE "/huk");
+    char *result2 = canonicalize_file_name (BASE "/tra");
+    char *result3 = canonicalize_filename_mode (BASE "/huk", CAN_EXISTING);
+    ASSERT (result1 != NULL);
+    ASSERT (result2 != NULL);
+    ASSERT (result3 != NULL);
+    ASSERT (strcmp (result1, result2) == 0);
+    ASSERT (strcmp (result2, result3) == 0);
+    ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/tra"),
+                    "/" BASE "/tra") == 0);
+    free (result1);
+    free (result2);
+    free (result3);
+  }
+
+  /* Check that the symbolic link to a directory can be resolved.  */
+  {
+    char *result1 = canonicalize_file_name (BASE "/plo");
+    char *result2 = canonicalize_file_name (BASE "/bef");
+    char *result3 = canonicalize_file_name (BASE "/lum");
+    char *result4 = canonicalize_filename_mode (BASE "/plo", CAN_EXISTING);
+    ASSERT (result1 != NULL);
+    ASSERT (result2 != NULL);
+    ASSERT (result3 != NULL);
+    ASSERT (result4 != NULL);
+    ASSERT (strcmp (result1, result2) == 0);
+    ASSERT (strcmp (result2, result3) == 0);
+    ASSERT (strcmp (result3, result4) == 0);
+    ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/lum"),
+                    "/" BASE "/lum") == 0);
+    free (result1);
+    free (result2);
+    free (result3);
+    free (result4);
+  }
+
+  /* Check that a symbolic link to a nonexistent file yields NULL.  */
+  {
+    char *result1;
+    char *result2;
+    errno = 0;
+    result1 = canonicalize_file_name (BASE "/ouk");
+    ASSERT (result1 == NULL);
+    ASSERT (errno == ENOENT);
+    errno = 0;
+    result2 = canonicalize_filename_mode (BASE "/ouk", CAN_EXISTING);
+    ASSERT (result2 == NULL);
+    ASSERT (errno == ENOENT);
+  }
+
+  /* Check that a non-directory symlink with trailing slash yields NULL.  */
+  {
+    char *result1;
+    char *result2;
+    errno = 0;
+    result1 = canonicalize_file_name (BASE "/huk/");
+    ASSERT (result1 == NULL);
+    ASSERT (errno == ENOTDIR);
+    errno = 0;
+    result2 = canonicalize_filename_mode (BASE "/huk/", CAN_EXISTING);
+    ASSERT (result2 == NULL);
+    ASSERT (errno == ENOTDIR);
+  }
+
+  /* Check that a missing directory via symlink yields NULL.  */
+  {
+    char *result1;
+    char *result2;
+    errno = 0;
+    result1 = canonicalize_file_name (BASE "/ouk/..");
+    ASSERT (result1 == NULL);
+    ASSERT (errno == ENOENT);
+    errno = 0;
+    result2 = canonicalize_filename_mode (BASE "/ouk/..", CAN_EXISTING);
+    ASSERT (result2 == NULL);
+    ASSERT (errno == ENOENT);
+  }
+
+  /* Check that a loop of symbolic links is detected.  */
+  {
+    char *result1;
+    char *result2;
+    errno = 0;
+    result1 = canonicalize_file_name ("ise");
+    ASSERT (result1 == NULL);
+    ASSERT (errno == ELOOP);
+    errno = 0;
+    result2 = canonicalize_filename_mode ("ise", CAN_EXISTING);
+    ASSERT (result2 == NULL);
+    ASSERT (errno == ELOOP);
+  }
+
+  /* Check that alternate modes can resolve missing basenames.  */
+  {
+    char *result1 = canonicalize_filename_mode (BASE "/zzz", CAN_ALL_BUT_LAST);
+    char *result2 = canonicalize_filename_mode (BASE "/zzz", CAN_MISSING);
+    char *result3 = canonicalize_filename_mode (BASE "/zzz/", CAN_ALL_BUT_LAST);
+    char *result4 = canonicalize_filename_mode (BASE "/zzz/", CAN_MISSING);
+    ASSERT (result1 != NULL);
+    ASSERT (result2 != NULL);
+    ASSERT (result3 != NULL);
+    ASSERT (result4 != NULL);
+    ASSERT (strcmp (result1, result2) == 0);
+    ASSERT (strcmp (result2, result3) == 0);
+    ASSERT (strcmp (result3, result4) == 0);
+    ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/zzz"),
+                    "/" BASE "/zzz") == 0);
+    free (result1);
+    free (result2);
+    free (result3);
+    free (result4);
+  }
+
+  /* Check that alternate modes can resolve broken symlink basenames.  */
+  {
+    char *result1 = canonicalize_filename_mode (BASE "/ouk", CAN_ALL_BUT_LAST);
+    char *result2 = canonicalize_filename_mode (BASE "/ouk", CAN_MISSING);
+    char *result3 = canonicalize_filename_mode (BASE "/ouk/", CAN_ALL_BUT_LAST);
+    char *result4 = canonicalize_filename_mode (BASE "/ouk/", CAN_MISSING);
+    ASSERT (result1 != NULL);
+    ASSERT (result2 != NULL);
+    ASSERT (result3 != NULL);
+    ASSERT (result4 != NULL);
+    ASSERT (strcmp (result1, result2) == 0);
+    ASSERT (strcmp (result2, result3) == 0);
+    ASSERT (strcmp (result3, result4) == 0);
+    ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/wum"),
+                    "/" BASE "/wum") == 0);
+    free (result1);
+    free (result2);
+    free (result3);
+    free (result4);
+  }
+
+  /* Check that alternate modes can handle missing dirnames.  */
+  {
+    char *result1 = canonicalize_filename_mode ("t-can.zzz/zzz", CAN_ALL_BUT_LAST);
+    char *result2 = canonicalize_filename_mode ("t-can.zzz/zzz", CAN_MISSING);
+    ASSERT (result1 == NULL);
+    ASSERT (result2 != NULL);
+    ASSERT (strcmp (result2 + strlen (result2) - 14, "/t-can.zzz/zzz") == 0);
+    free (result2);
+  }
+
+  /* Ensure that the following is resolved properly.
+     Before 2007-09-27, it would mistakenly report a loop.  */
+  {
+    char *result1 = canonicalize_filename_mode (BASE, CAN_EXISTING);
+    char *result2 = canonicalize_filename_mode (BASE "/p/1", CAN_EXISTING);
+    ASSERT (result1 != NULL);
+    ASSERT (result2 != NULL);
+    ASSERT (strcmp (result2 + strlen (result1), "/d/2") == 0);
+    free (result1);
+    free (result2);
+  }
+
+  /* Check that leading // is honored correctly.  */
+  {
+    struct stat st1;
+    struct stat st2;
+    char *result1 = canonicalize_file_name ("//.");
+    char *result2 = canonicalize_filename_mode ("//.", CAN_EXISTING);
+    char *result3 = canonicalize_file_name (BASE "/droot");
+    char *result4 = canonicalize_filename_mode (BASE "/droot", CAN_EXISTING);
+    ASSERT (result1);
+    ASSERT (result2);
+    ASSERT (result3);
+    ASSERT (result4);
+    ASSERT (stat ("/", &st1) == 0);
+    ASSERT (stat ("//", &st2) == 0);
+    if (SAME_INODE (st1, st2))
+      {
+        ASSERT (strcmp (result1, "/") == 0);
+        ASSERT (strcmp (result2, "/") == 0);
+        ASSERT (strcmp (result3, "/") == 0);
+        ASSERT (strcmp (result4, "/") == 0);
+      }
+    else
+      {
+        ASSERT (strcmp (result1, "//") == 0);
+        ASSERT (strcmp (result2, "//") == 0);
+        ASSERT (strcmp (result3, "//") == 0);
+        ASSERT (strcmp (result4, "//") == 0);
+      }
+    free (result1);
+    free (result2);
+    free (result3);
+    free (result4);
+  }
+
+  /* Cleanup.  */
+  ASSERT (remove (BASE "/droot") == 0);
+  ASSERT (remove (BASE "/d/1") == 0);
+  ASSERT (remove (BASE "/d/2") == 0);
+  ASSERT (remove (BASE "/d") == 0);
+  ASSERT (remove (BASE "/s") == 0);
+  ASSERT (remove (BASE "/p") == 0);
+  ASSERT (remove (BASE "/plo") == 0);
+  ASSERT (remove (BASE "/huk") == 0);
+  ASSERT (remove (BASE "/bef") == 0);
+  ASSERT (remove (BASE "/ouk") == 0);
+  ASSERT (remove (BASE "/ket") == 0);
+  ASSERT (remove (BASE "/lum") == 0);
+  ASSERT (remove (BASE "/tra") == 0);
+  ASSERT (remove (BASE) == 0);
+  ASSERT (remove ("ise") == 0);
+
+  return 0;
+}
diff --git a/tests/test-chown.c b/tests/test-chown.c
new file mode 100644 (file)
index 0000000..b2b68c8
--- /dev/null
@@ -0,0 +1,49 @@
+/* Tests of chown.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (chown, int, (char const *, uid_t, gid_t));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "mgetgroups.h"
+#include "stat-time.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-chown.t"
+
+#include "test-chown.h"
+
+int
+main (void)
+{
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  return test_chown (chown, true);
+}
diff --git a/tests/test-chown.h b/tests/test-chown.h
new file mode 100644 (file)
index 0000000..7630de4
--- /dev/null
@@ -0,0 +1,209 @@
+/* Tests of chown.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include "nap.h"
+
+#if !HAVE_GETEGID
+# define getegid() ((gid_t) -1)
+#endif
+
+/* This file is designed to test chown(n,o,g) and
+   chownat(AT_FDCWD,n,o,g,0).  FUNC is the function to test.  Assumes
+   that BASE and ASSERT are already defined, and that appropriate
+   headers are already included.  If PRINT, warn before skipping
+   symlink tests with status 77.  */
+
+static int
+test_chown (int (*func) (char const *, uid_t, gid_t), bool print)
+{
+  struct stat st1;
+  struct stat st2;
+  gid_t *gids = NULL;
+  int gids_count;
+  int result;
+
+  /* Solaris 8 is interesting - if the current process belongs to
+     multiple groups, the current directory is owned by a a group that
+     the current process belongs to but different than getegid(), and
+     the current directory does not have the S_ISGID bit, then regular
+     files created in the directory belong to the directory's group,
+     but symlinks belong to the current effective group id.  If
+     S_ISGID is set, then both files and symlinks belong to the
+     directory's group.  However, it is possible to run the testsuite
+     from within a directory owned by a group we don't belong to, in
+     which case all things that we create belong to the current
+     effective gid.  So, work around the issues by creating a
+     subdirectory (we are guaranteed that the subdirectory will be
+     owned by one of our current groups), change ownership of that
+     directory to the current effective gid (which will thus succeed),
+     then create all other files within that directory (eliminating
+     questions on whether inheritance or current id triumphs, since
+     the two methods resolve to the same gid).  */
+  ASSERT (mkdir (BASE "dir", 0700) == 0);
+  ASSERT (stat (BASE "dir", &st1) == 0);
+
+  /* Filter out mingw, which has no concept of groups.  */
+  result = func (BASE "dir", st1.st_uid, getegid ());
+  if (result == -1 && errno == ENOSYS)
+    {
+      ASSERT (rmdir (BASE "dir") == 0);
+      if (print)
+        fputs ("skipping test: no support for ownership\n", stderr);
+      return 77;
+    }
+  ASSERT (result == 0);
+
+  ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
+  ASSERT (stat (BASE "dir/file", &st1) == 0);
+  ASSERT (st1.st_uid != (uid_t) -1);
+  ASSERT (st1.st_gid != (uid_t) -1);
+  ASSERT (st1.st_gid == getegid ());
+
+  /* Sanity check of error cases.  */
+  errno = 0;
+  ASSERT (func ("", -1, -1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("no_such", -1, -1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("no_such/", -1, -1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (BASE "dir/file/", -1, -1) == -1);
+  ASSERT (errno == ENOTDIR);
+
+  /* Check that -1 does not alter ownership.  */
+  ASSERT (func (BASE "dir/file", -1, st1.st_gid) == 0);
+  ASSERT (func (BASE "dir/file", st1.st_uid, -1) == 0);
+  ASSERT (func (BASE "dir/file", (uid_t) -1, (gid_t) -1) == 0);
+  ASSERT (stat (BASE "dir/file", &st2) == 0);
+  ASSERT (st1.st_uid == st2.st_uid);
+  ASSERT (st1.st_gid == st2.st_gid);
+
+  /* Even if the values aren't changing, ctime is required to change
+     if at least one argument is not -1.  */
+  nap ();
+  ASSERT (func (BASE "dir/file", st1.st_uid, st1.st_gid) == 0);
+  ASSERT (stat (BASE "dir/file", &st2) == 0);
+  ASSERT (st1.st_ctime < st2.st_ctime
+          || (st1.st_ctime == st2.st_ctime
+              && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2)));
+
+  /* Test symlink behavior.  */
+  if (symlink ("link", BASE "dir/link2"))
+    {
+      ASSERT (unlink (BASE "dir/file") == 0);
+      ASSERT (rmdir (BASE "dir") == 0);
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+  errno = 0;
+  ASSERT (func (BASE "dir/link2", -1, -1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (BASE "dir/link2/", st1.st_uid, st1.st_gid) == -1);
+  ASSERT (errno == ENOENT);
+  ASSERT (symlink ("file", BASE "dir/link") == 0);
+
+  /* For non-privileged users, chown can only portably succeed at
+     changing group ownership of a file we own.  If we belong to at
+     least two groups, then verifying the correct change is simple.
+     But if we belong to only one group, then we fall back on the
+     other observable effect of chown: the ctime must be updated.  */
+  gids_count = mgetgroups (NULL, st1.st_gid, &gids);
+  if (1 < gids_count)
+    {
+      ASSERT (gids[1] != st1.st_gid);
+      ASSERT (gids[1] != (gid_t) -1);
+      ASSERT (lstat (BASE "dir/link", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/link2", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+
+      errno = 0;
+      ASSERT (func (BASE "dir/link2/", -1, gids[1]) == -1);
+      ASSERT (errno == ENOTDIR);
+      ASSERT (stat (BASE "dir/file", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/link", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/link2", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+
+      ASSERT (func (BASE "dir/link2", -1, gids[1]) == 0);
+      ASSERT (stat (BASE "dir/file", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (gids[1] == st2.st_gid);
+      ASSERT (lstat (BASE "dir/link", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/link2", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+    }
+  else
+    {
+      struct stat l1;
+      struct stat l2;
+      ASSERT (stat (BASE "dir/file", &st1) == 0);
+      ASSERT (lstat (BASE "dir/link", &l1) == 0);
+      ASSERT (lstat (BASE "dir/link2", &l2) == 0);
+
+      nap ();
+      errno = 0;
+      ASSERT (func (BASE "dir/link2/", -1, st1.st_gid) == -1);
+      ASSERT (errno == ENOTDIR);
+      ASSERT (stat (BASE "dir/file", &st2) == 0);
+      ASSERT (st1.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&st1) == get_stat_ctime_ns (&st2));
+      ASSERT (lstat (BASE "dir/link", &st2) == 0);
+      ASSERT (l1.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&l1) == get_stat_ctime_ns (&st2));
+      ASSERT (lstat (BASE "dir/link2", &st2) == 0);
+      ASSERT (l2.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&l2) == get_stat_ctime_ns (&st2));
+
+      ASSERT (func (BASE "dir/link2", -1, st1.st_gid) == 0);
+      ASSERT (stat (BASE "dir/file", &st2) == 0);
+      ASSERT (st1.st_ctime < st2.st_ctime
+              || (st1.st_ctime == st2.st_ctime
+                  && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2)));
+      ASSERT (lstat (BASE "dir/link", &st2) == 0);
+      ASSERT (l1.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&l1) == get_stat_ctime_ns (&st2));
+      ASSERT (lstat (BASE "dir/link2", &st2) == 0);
+      ASSERT (l2.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&l2) == get_stat_ctime_ns (&st2));
+    }
+
+  /* Cleanup.  */
+  free (gids);
+  ASSERT (unlink (BASE "dir/file") == 0);
+  ASSERT (unlink (BASE "dir/link") == 0);
+  ASSERT (unlink (BASE "dir/link2") == 0);
+  ASSERT (rmdir (BASE "dir") == 0);
+  return 0;
+}
diff --git a/tests/test-cloexec.c b/tests/test-cloexec.c
new file mode 100644 (file)
index 0000000..374de30
--- /dev/null
@@ -0,0 +1,141 @@
+/* Test duplicating non-inheritable file descriptors.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include "cloexec.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions.  */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#include "binary-io.h"
+#include "macros.h"
+
+/* Return non-zero if FD is open and inheritable across exec/spawn.  */
+static int
+is_inheritable (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* On Win32, the initial state of unassigned standard file
+     descriptors is that they are open but point to an
+     INVALID_HANDLE_VALUE, and there is no fcntl.  */
+  HANDLE h = (HANDLE) _get_osfhandle (fd);
+  DWORD flags;
+  if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+    return 0;
+  return (flags & HANDLE_FLAG_INHERIT) != 0;
+#else
+# ifndef F_GETFD
+#  error Please port fcntl to your platform
+# endif
+  int i = fcntl (fd, F_GETFD);
+  return 0 <= i && (i & FD_CLOEXEC) == 0;
+#endif
+}
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+
+/* Return non-zero if FD is open in the given MODE, which is either
+   O_TEXT or O_BINARY.  */
+static int
+is_mode (int fd, int mode)
+{
+  int value = setmode (fd, O_BINARY);
+  setmode (fd, value);
+  return mode == value;
+}
+
+int
+main (void)
+{
+  const char *file = "test-cloexec.tmp";
+  int fd = creat (file, 0600);
+  int fd2;
+
+  /* Assume std descriptors were provided by invoker.  */
+  ASSERT (STDERR_FILENO < fd);
+  ASSERT (is_inheritable (fd));
+
+  /* Normal use of set_cloexec_flag.  */
+  ASSERT (set_cloexec_flag (fd, true) == 0);
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+  ASSERT (!is_inheritable (fd));
+#endif
+  ASSERT (set_cloexec_flag (fd, false) == 0);
+  ASSERT (is_inheritable (fd));
+
+  /* Normal use of dup_cloexec.  */
+  fd2 = dup_cloexec (fd);
+  ASSERT (fd < fd2);
+  ASSERT (!is_inheritable (fd2));
+  ASSERT (close (fd) == 0);
+  ASSERT (dup_cloexec (fd2) == fd);
+  ASSERT (!is_inheritable (fd));
+  ASSERT (close (fd2) == 0);
+
+  /* On systems that distinguish between text and binary mode,
+     dup_cloexec reuses the mode of the source.  */
+  setmode (fd, O_BINARY);
+  ASSERT (is_mode (fd, O_BINARY));
+  fd2 = dup_cloexec (fd);
+  ASSERT (fd < fd2);
+  ASSERT (is_mode (fd2, O_BINARY));
+  ASSERT (close (fd2) == 0);
+  setmode (fd, O_TEXT);
+  ASSERT (is_mode (fd, O_TEXT));
+  fd2 = dup_cloexec (fd);
+  ASSERT (fd < fd2);
+  ASSERT (is_mode (fd2, O_TEXT));
+  ASSERT (close (fd2) == 0);
+
+  /* Test error handling.  */
+  errno = 0;
+  ASSERT (set_cloexec_flag (-1, false) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (set_cloexec_flag (10000000, false) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (set_cloexec_flag (fd2, false) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (dup_cloexec (-1) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (dup_cloexec (10000000) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (dup_cloexec (fd2) == -1);
+  ASSERT (errno == EBADF);
+
+  /* Clean up.  */
+  ASSERT (close (fd) == 0);
+  ASSERT (unlink (file) == 0);
+
+  return 0;
+}
diff --git a/tests/test-closein.c b/tests/test-closein.c
new file mode 100644 (file)
index 0000000..0c29a6b
--- /dev/null
@@ -0,0 +1,53 @@
+/* Test of closein module.
+   Copyright (C) 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Eric Blake.  */
+
+#include <config.h>
+
+#include "closein.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "binary-io.h"
+#include "ignore-value.h"
+
+char *program_name;
+
+/* With no arguments, do nothing.  With arguments, attempt to consume
+   first 6 bytes of stdin.  In either case, let exit() take care of
+   closing std streams and changing exit status if ferror(stdin).  */
+int
+main (int argc, char **argv)
+{
+  char buf[7];
+  atexit (close_stdin);
+  program_name = argv[0];
+
+  /* close_stdin currently relies on ftell, but mingw ftell is
+     unreliable on text mode input.  */
+  SET_BINARY (0);
+
+  if (argc > 2)
+    close (0);
+
+  if (argc > 1)
+    ignore_value (fread (buf, 1, 6, stdin));
+  return 0;
+}
diff --git a/tests/test-closein.sh b/tests/test-closein.sh
new file mode 100755 (executable)
index 0000000..a75929a
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+tmpfiles=
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+p=t-closein-
+tmpfiles="${p}in.tmp ${p}xout.tmp ${p}out1.tmp ${p}out2.tmp"
+
+echo Hello world > ${p}in.tmp
+echo world > ${p}xout.tmp
+
+# Test with seekable stdin; followon process must see remaining data
+(./test-closein${EXEEXT}; cat) < ${p}in.tmp > ${p}out1.tmp || exit 1
+cmp ${p}out1.tmp ${p}in.tmp || exit 1
+
+(./test-closein${EXEEXT} consume; cat) < ${p}in.tmp > ${p}out2.tmp || exit 1
+cmp ${p}out2.tmp ${p}xout.tmp || exit 1
+
+# Test for lack of error on pipe.  Ignore any EPIPE failures from cat.
+cat ${p}in.tmp 2>/dev/null | ./test-closein${EXEEXT} || exit 1
+
+cat ${p}in.tmp 2>/dev/null | ./test-closein${EXEEXT} consume || exit 1
+
+# Test for lack of error when nothing is read
+./test-closein${EXEEXT} </dev/null || exit 1
+
+./test-closein${EXEEXT} <&- || exit 1
+
+# Test for no error when EOF is read early
+./test-closein${EXEEXT} consume </dev/null || exit 1
+
+# Test for error when read fails because no file available
+./test-closein${EXEEXT} consume close <&- 2>/dev/null && exit 1
+
+# Cleanup
+rm -fr $tmpfiles
+
+exit 0
diff --git a/tests/test-ctype.c b/tests/test-ctype.c
new file mode 100644 (file)
index 0000000..0a5cb19
--- /dev/null
@@ -0,0 +1,27 @@
+/* Test of <ctype.h> substitute.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <ctype.h>
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-dirent-safer.c b/tests/test-dirent-safer.c
new file mode 100644 (file)
index 0000000..13bf02e
--- /dev/null
@@ -0,0 +1,96 @@
+/* Test that directory streams leave standard fds alone.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include "dirent--.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "unistd-safer.h"
+
+/* This test intentionally closes stderr.  So, we arrange to have fd 10
+   (outside the range of interesting fd's during the test) set up to
+   duplicate the original stderr.  */
+
+#define BACKUP_STDERR_FILENO 10
+#define ASSERT_STREAM myerr
+#include "macros.h"
+
+static FILE *myerr;
+
+int
+main (void)
+{
+  int i;
+  DIR *dp;
+  /* The dirent-safer module works without the use of fdopendir (which
+     would also pull in fchdir and openat); but if those modules were
+     also used, we ensure that they are safe.  In particular, the
+     gnulib version of fdopendir is unable to guarantee that
+     dirfd(fdopendir(fd))==fd, but we can at least guarantee that if
+     they are not equal, the fd returned by dirfd is safe.  */
+#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR
+  int dfd;
+#endif
+
+  /* We close fd 2 later, so save it in fd 10.  */
+  if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+      || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+    return 2;
+
+#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR
+  dfd = open (".", O_RDONLY);
+  ASSERT (STDERR_FILENO < dfd);
+#endif
+
+  /* Four iterations, with progressively more standard descriptors
+     closed.  */
+  for (i = -1; i <= STDERR_FILENO; i++)
+    {
+      if (0 <= i)
+        ASSERT (close (i) == 0);
+      dp = opendir (".");
+      ASSERT (dp);
+      ASSERT (dirfd (dp) == -1 || STDERR_FILENO < dirfd (dp));
+      ASSERT (closedir (dp) == 0);
+
+#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR
+      {
+        int fd = dup_safer (dfd);
+        ASSERT (STDERR_FILENO < fd);
+        dp = fdopendir (fd);
+        ASSERT (dp);
+        ASSERT (dirfd (dp) == -1 || STDERR_FILENO < dirfd (dp));
+        ASSERT (closedir (dp) == 0);
+        errno = 0;
+        ASSERT (close (fd) == -1);
+        ASSERT (errno == EBADF);
+      }
+#endif
+    }
+
+#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR
+  ASSERT (close (dfd) == 0);
+#endif
+
+  return 0;
+}
diff --git a/tests/test-dirent.c b/tests/test-dirent.c
new file mode 100644 (file)
index 0000000..212644a
--- /dev/null
@@ -0,0 +1,32 @@
+/* Test of <dirent.h> substitute.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <dirent.h>
+
+/* Check for existence of required types.  */
+static DIR *dir _GL_UNUSED;
+static struct dirent d;
+static ino_t i;
+
+int
+main (void)
+{
+  return d.d_name[0] + i;
+}
diff --git a/tests/test-dirname.c b/tests/test-dirname.c
new file mode 100644 (file)
index 0000000..1ddf229
--- /dev/null
@@ -0,0 +1,191 @@
+/* Test the gnulib dirname module.
+   Copyright (C) 2005-2007, 2009-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/>.  */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct test {
+  const char *name;     /* Name under test.  */
+  const char *dir;      /* dir_name (name).  */
+  const char *last;     /* last_component (name).  */
+  const char *base;     /* base_name (name).  */
+  const char *stripped; /* name after strip_trailing_slashes (name).  */
+  bool modified;        /* result of strip_trailing_slashes (name).  */
+  bool absolute;        /* IS_ABSOLUTE_FILE_NAME (name).  */
+};
+
+static struct test tests[] = {
+  {"d/f",       "d",    "f",    "f",    "d/f",  false,  false},
+  {"/d/f",      "/d",   "f",    "f",    "/d/f", false,  true},
+  {"d/f/",      "d",    "f/",   "f/",   "d/f",  true,   false},
+  {"d/f//",     "d",    "f//",  "f/",   "d/f",  true,   false},
+  {"f",         ".",    "f",    "f",    "f",    false,  false},
+  {"/",         "/",    "",     "/",    "/",    false,  true},
+#if DOUBLE_SLASH_IS_DISTINCT_ROOT
+  {"//",        "//",   "",     "//",   "//",   false,  true},
+  {"//d",       "//",   "d",    "d",    "//d",  false,  true},
+#else
+  {"//",        "/",    "",     "/",    "/",    true,   true},
+  {"//d",       "/",    "d",    "d",    "//d",  false,  true},
+#endif
+  {"///",       "/",    "",     "/",    "/",    true,   true},
+  {"///a///",   "/",    "a///", "a/",   "///a", true,   true},
+  /* POSIX requires dirname("") and basename("") to both return ".",
+     but dir_name and base_name are defined differently.  */
+  {"",          ".",    "",     "",     "",     false,  false},
+  {".",         ".",    ".",    ".",    ".",    false,  false},
+  {"..",        ".",    "..",   "..",   "..",   false,  false},
+#if ISSLASH ('\\')
+  {"a\\",       ".",    "a\\",  "a\\",  "a",    true,   false},
+  {"a\\b",      "a",    "b",    "b",    "a\\b", false,  false},
+  {"\\",        "\\",   "",     "\\",   "\\",   false,  true},
+  {"\\/\\",     "\\",   "",     "\\",   "\\",   true,   true},
+  {"\\\\/",     "\\",   "",     "\\",   "\\",   true,   true},
+  {"\\//",      "\\",   "",     "\\",   "\\",   true,   true},
+  {"//\\",      "/",    "",     "/",    "/",    true,   true},
+#else
+  {"a\\",       ".",    "a\\",  "a\\",  "a\\",  false,  false},
+  {"a\\b",      ".",    "a\\b", "a\\b", "a\\b", false,  false},
+  {"\\",        ".",    "\\",   "\\",   "\\",   false,  false},
+  {"\\/\\",     "\\",   "\\",   "\\",   "\\/\\",false,  false},
+  {"\\\\/",     ".",    "\\\\/","\\\\/","\\\\", true,   false},
+  {"\\//",      ".",    "\\//", "\\/",  "\\",   true,   false},
+# if DOUBLE_SLASH_IS_DISTINCT_ROOT
+  {"//\\",      "//",   "\\",   "\\",   "//\\", false,  true},
+# else
+  {"//\\",      "/",    "\\",   "\\",   "//\\", false,  true},
+# endif
+#endif
+#if ISSLASH ('\\')
+# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+  {"c:",        "c:",   "",     "c:",   "c:",   false,  false},
+  {"c:/",       "c:/",  "",     "c:/",  "c:/",  false,  true},
+  {"c://",      "c:/",  "",     "c:/",  "c:/",  true,   true},
+  {"c:/d",      "c:/",  "d",    "d",    "c:/d", false,  true},
+  {"c://d",     "c:/",  "d",    "d",    "c://d",false,  true},
+  {"c:/d/",     "c:/",  "d/",   "d/",   "c:/d", true,   true},
+  {"c:/d/f",    "c:/d", "f",    "f",    "c:/d/f",false, true},
+  {"c:d",       "c:.",  "d",    "d",    "c:d",  false,  false},
+  {"c:d/",      "c:.",  "d/",   "d/",   "c:d",  true,   false},
+  {"c:d/f",     "c:d",  "f",    "f",    "c:d/f",false,  false},
+  {"a:b:c",     "a:.",  "b:c",  "./b:c","a:b:c",false,  false},
+  {"a/b:c",     "a",    "b:c",  "./b:c","a/b:c",false,  false},
+  {"a/b:c/",    "a",    "b:c/", "./b:c/","a/b:c",true,  false},
+# else /* ! FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE */
+  {"c:",        "c:",   "",     "c:",   "c:",   false,  true},
+  {"c:/",       "c:",   "",     "c:",   "c:",   true,   true},
+  {"c://",      "c:",   "",     "c:",   "c:",   true,   true},
+  {"c:/d",      "c:",   "d",    "d",    "c:/d", false,  true},
+  {"c://d",     "c:",   "d",    "d",    "c://d",false,  true},
+  {"c:/d/",     "c:",   "d/",   "d/",   "c:/d", true,   true},
+  {"c:/d/f",    "c:/d", "f",    "f",    "c:/d/f",false, true},
+  {"c:d",       "c:",   "d",    "d",    "c:d",  false,  true},
+  {"c:d/",      "c:",   "d/",   "d/",   "c:d",  true,   true},
+  {"c:d/f",     "c:d",  "f",    "f",    "c:d/f",false,  true},
+  {"a:b:c",     "a:",   "b:c",  "./b:c","a:b:c",false,  true},
+  {"a/b:c",     "a",    "b:c",  "./b:c","a/b:c",false,  false},
+  {"a/b:c/",    "a",    "b:c/", "./b:c/","a/b:c",true,  false},
+# endif
+#else /* ! ISSLASH ('\\') */
+  {"c:",        ".",    "c:",   "c:",   "c:",   false,  false},
+  {"c:/",       ".",    "c:/",  "c:/",  "c:",   true,   false},
+  {"c://",      ".",    "c://", "c:/",  "c:",   true,   false},
+  {"c:/d",      "c:",   "d",    "d",    "c:/d", false,  false},
+  {"c://d",     "c:",   "d",    "d",    "c://d",false,  false},
+  {"c:/d/",     "c:",   "d/",   "d/",   "c:/d", true,   false},
+  {"c:/d/f",    "c:/d", "f",    "f",    "c:/d/f",false, false},
+  {"c:d",       ".",    "c:d",  "c:d",  "c:d",  false,  false},
+  {"c:d/",      ".",    "c:d/", "c:d/", "c:d",  true,   false},
+  {"c:d/f",     "c:d",  "f",    "f",    "c:d/f",false,  false},
+  {"a:b:c",     ".",    "a:b:c","a:b:c","a:b:c",false,  false},
+  {"a/b:c",     "a",    "b:c",  "b:c",  "a/b:c",false,  false},
+  {"a/b:c/",    "a",    "b:c/", "b:c/", "a/b:c",true,   false},
+#endif
+  {"1:",        ".",    "1:",   "1:",   "1:",   false,  false},
+  {"1:/",       ".",    "1:/",  "1:/",  "1:",   true,   false},
+  {"/:",        "/",    ":",    ":",    "/:",   false,  true},
+  {"/:/",       "/",    ":/",   ":/",   "/:",   true,   true},
+  /* End sentinel.  */
+  {NULL,        NULL,   NULL,   NULL,   NULL,   false,  false}
+};
+
+int
+main (void)
+{
+  struct test *t;
+  bool ok = true;
+
+  for (t = tests; t->name; t++)
+    {
+      char *dir = dir_name (t->name);
+      int dirlen = dir_len (t->name);
+      char *last = last_component (t->name);
+      char *base = base_name (t->name);
+      int baselen = base_len (base);
+      char *stripped = strdup (t->name);
+      bool modified = strip_trailing_slashes (stripped);
+      bool absolute = IS_ABSOLUTE_FILE_NAME (t->name);
+      if (! (strcmp (dir, t->dir) == 0
+             && (dirlen == strlen (dir)
+                 || (dirlen + 1 == strlen (dir) && dir[dirlen] == '.'))))
+        {
+          ok = false;
+          printf ("dir_name `%s': got `%s' len %d, expected `%s' len %ld\n",
+                  t->name, dir, dirlen,
+                  t->dir, (unsigned long) strlen (t->dir));
+        }
+      if (strcmp (last, t->last))
+        {
+          ok = false;
+          printf ("last_component `%s': got `%s', expected `%s'\n",
+                  t->name, last, t->last);
+        }
+      if (! (strcmp (base, t->base) == 0
+             && (baselen == strlen (base)
+                 || (baselen + 1 == strlen (base)
+                     && ISSLASH (base[baselen])))))
+        {
+          ok = false;
+          printf ("base_name `%s': got `%s' len %d, expected `%s' len %ld\n",
+                  t->name, base, baselen,
+                  t->base, (unsigned long) strlen (t->base));
+        }
+      if (strcmp (stripped, t->stripped) || modified != t->modified)
+        {
+          ok = false;
+          printf ("strip_trailing_slashes `%s': got %s %s, expected %s %s\n",
+                  t->name, stripped, modified ? "changed" : "unchanged",
+                  t->stripped, t->modified ? "changed" : "unchanged");
+        }
+      if (t->absolute != absolute)
+        {
+          ok = false;
+          printf ("`%s': got %s, expected %s\n", t->name,
+                  absolute ? "absolute" : "relative",
+                  t->absolute ? "absolute" : "relative");
+        }
+      free (dir);
+      free (base);
+      free (stripped);
+    }
+  return ok ? 0 : 1;
+}
diff --git a/tests/test-dup-safer.c b/tests/test-dup-safer.c
new file mode 100644 (file)
index 0000000..14cfaff
--- /dev/null
@@ -0,0 +1,172 @@
+/* Test that dup_safer leaves standard fds alone.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include "unistd--.h"
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+#include "binary-io.h"
+#include "cloexec.h"
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions.  */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+
+/* This test intentionally closes stderr.  So, we arrange to have fd 10
+   (outside the range of interesting fd's during the test) set up to
+   duplicate the original stderr.  */
+
+#define BACKUP_STDERR_FILENO 10
+#define ASSERT_STREAM myerr
+#include "macros.h"
+
+static FILE *myerr;
+
+/* Return true if FD is open.  */
+static bool
+is_open (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* On Win32, the initial state of unassigned standard file
+     descriptors is that they are open but point to an
+     INVALID_HANDLE_VALUE, and there is no fcntl.  */
+  return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+#else
+# ifndef F_GETFL
+#  error Please port fcntl to your platform
+# endif
+  return 0 <= fcntl (fd, F_GETFL);
+#endif
+}
+
+/* Return true if FD is open and inheritable across exec/spawn.  */
+static bool
+is_inheritable (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* On Win32, the initial state of unassigned standard file
+     descriptors is that they are open but point to an
+     INVALID_HANDLE_VALUE, and there is no fcntl.  */
+  HANDLE h = (HANDLE) _get_osfhandle (fd);
+  DWORD flags;
+  if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+    return 0;
+  return (flags & HANDLE_FLAG_INHERIT) != 0;
+#else
+# ifndef F_GETFD
+#  error Please port fcntl to your platform
+# endif
+  int i = fcntl (fd, F_GETFD);
+  return 0 <= i && (i & FD_CLOEXEC) == 0;
+#endif
+}
+
+/* Return true if FD is open in the given MODE, which is either
+   O_TEXT or O_BINARY.  */
+static bool
+is_mode (int fd, int mode)
+{
+  int value = setmode (fd, O_BINARY);
+  setmode (fd, value);
+  return mode == value;
+}
+
+#define witness "test-dup-safer.txt"
+
+int
+main (void)
+{
+  int i;
+  int fd;
+
+  /* We close fd 2 later, so save it in fd 10.  */
+  if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+      || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+    return 2;
+
+  /* Create file for later checks.  */
+  fd = creat (witness, 0600);
+  ASSERT (STDERR_FILENO < fd);
+
+  /* Four iterations, with progressively more standard descriptors
+     closed.  */
+  for (i = -1; i <= STDERR_FILENO; i++)
+    {
+      if (0 <= i)
+        ASSERT (close (i) == 0);
+
+      /* Detect errors.  */
+      errno = 0;
+      ASSERT (dup (-1) == -1);
+      ASSERT (errno == EBADF);
+      errno = 0;
+      ASSERT (dup (10000000) == -1);
+      ASSERT (errno == EBADF);
+      close (fd + 1);
+      errno = 0;
+      ASSERT (dup (fd + 1) == -1);
+      ASSERT (errno == EBADF);
+
+      /* Preserve text vs. binary.  */
+      setmode (fd, O_BINARY);
+      ASSERT (dup (fd) == fd + 1);
+      ASSERT (is_open (fd + 1));
+      ASSERT (is_inheritable (fd + 1));
+      ASSERT (is_mode (fd + 1, O_BINARY));
+
+      ASSERT (close (fd + 1) == 0);
+      setmode (fd, O_TEXT);
+      ASSERT (dup (fd) == fd + 1);
+      ASSERT (is_open (fd + 1));
+      ASSERT (is_inheritable (fd + 1));
+      ASSERT (is_mode (fd + 1, O_TEXT));
+
+      /* Create cloexec copy.  */
+      ASSERT (close (fd + 1) == 0);
+      ASSERT (fd_safer_flag (dup_cloexec (fd), O_CLOEXEC) == fd + 1);
+      ASSERT (set_cloexec_flag (fd + 1, true) == 0);
+      ASSERT (is_open (fd + 1));
+      ASSERT (!is_inheritable (fd + 1));
+      ASSERT (close (fd) == 0);
+
+      /* dup always creates inheritable copies.  Also, check that
+         earliest slot past std fds is used.  */
+      ASSERT (dup (fd + 1) == fd);
+      ASSERT (is_open (fd));
+      ASSERT (is_inheritable (fd));
+      ASSERT (close (fd + 1) == 0);
+    }
+
+  /* Cleanup.  */
+  ASSERT (close (fd) == 0);
+  ASSERT (unlink (witness) == 0);
+
+  return 0;
+}
diff --git a/tests/test-dup2.c b/tests/test-dup2.c
new file mode 100644 (file)
index 0000000..e2ad88b
--- /dev/null
@@ -0,0 +1,198 @@
+/* Test duplicating file descriptors.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (dup2, int, (int, int));
+
+#include <errno.h>
+#include <fcntl.h>
+
+#include "binary-io.h"
+
+#if GNULIB_TEST_CLOEXEC
+# include "cloexec.h"
+#endif
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions.  */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#include "macros.h"
+
+/* Return non-zero if FD is open.  */
+static int
+is_open (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* On Win32, the initial state of unassigned standard file
+     descriptors is that they are open but point to an
+     INVALID_HANDLE_VALUE, and there is no fcntl.  */
+  return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+#else
+# ifndef F_GETFL
+#  error Please port fcntl to your platform
+# endif
+  return 0 <= fcntl (fd, F_GETFL);
+#endif
+}
+
+#if GNULIB_TEST_CLOEXEC
+/* Return non-zero if FD is open and inheritable across exec/spawn.  */
+static int
+is_inheritable (int fd)
+{
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* On Win32, the initial state of unassigned standard file
+     descriptors is that they are open but point to an
+     INVALID_HANDLE_VALUE, and there is no fcntl.  */
+  HANDLE h = (HANDLE) _get_osfhandle (fd);
+  DWORD flags;
+  if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+    return 0;
+  return (flags & HANDLE_FLAG_INHERIT) != 0;
+# else
+#  ifndef F_GETFD
+#   error Please port fcntl to your platform
+#  endif
+  int i = fcntl (fd, F_GETFD);
+  return 0 <= i && (i & FD_CLOEXEC) == 0;
+# endif
+}
+#endif /* GNULIB_TEST_CLOEXEC */
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+
+/* Return non-zero if FD is open in the given MODE, which is either
+   O_TEXT or O_BINARY.  */
+static int
+is_mode (int fd, int mode)
+{
+  int value = setmode (fd, O_BINARY);
+  setmode (fd, value);
+  return mode == value;
+}
+
+int
+main (void)
+{
+  const char *file = "test-dup2.tmp";
+  char buffer[1];
+  int fd = open (file, O_CREAT | O_TRUNC | O_RDWR, 0600);
+
+  /* Assume std descriptors were provided by invoker.  */
+  ASSERT (STDERR_FILENO < fd);
+  ASSERT (is_open (fd));
+  /* Ignore any other fd's leaked into this process.  */
+  close (fd + 1);
+  close (fd + 2);
+  ASSERT (!is_open (fd + 1));
+  ASSERT (!is_open (fd + 2));
+
+  /* Assigning to self must be a no-op.  */
+  ASSERT (dup2 (fd, fd) == fd);
+  ASSERT (is_open (fd));
+
+  /* The source must be valid.  */
+  errno = 0;
+  ASSERT (dup2 (-1, fd) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (dup2 (AT_FDCWD, fd) == -1);
+  ASSERT (errno == EBADF);
+  ASSERT (is_open (fd));
+
+  /* If the source is not open, then the destination is unaffected.  */
+  errno = 0;
+  ASSERT (dup2 (fd + 1, fd + 1) == -1);
+  ASSERT (errno == EBADF);
+  ASSERT (!is_open (fd + 1));
+  errno = 0;
+  ASSERT (dup2 (fd + 1, fd) == -1);
+  ASSERT (errno == EBADF);
+  ASSERT (is_open (fd));
+
+  /* The destination must be valid.  */
+  errno = 0;
+  ASSERT (dup2 (fd, -2) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (dup2 (fd, 10000000) == -1);
+  ASSERT (errno == EBADF);
+
+  /* Using dup2 can skip fds.  */
+  ASSERT (dup2 (fd, fd + 2) == fd + 2);
+  ASSERT (is_open (fd));
+  ASSERT (!is_open (fd + 1));
+  ASSERT (is_open (fd + 2));
+
+  /* Verify that dup2 closes the previous occupant of a fd.  */
+  ASSERT (open ("/dev/null", O_WRONLY, 0600) == fd + 1);
+  ASSERT (dup2 (fd + 1, fd) == fd);
+  ASSERT (close (fd + 1) == 0);
+  ASSERT (write (fd, "1", 1) == 1);
+  ASSERT (dup2 (fd + 2, fd) == fd);
+  ASSERT (lseek (fd, 0, SEEK_END) == 0);
+  ASSERT (write (fd + 2, "2", 1) == 1);
+  ASSERT (lseek (fd, 0, SEEK_SET) == 0);
+  ASSERT (read (fd, buffer, 1) == 1);
+  ASSERT (*buffer == '2');
+
+#if GNULIB_TEST_CLOEXEC
+  /* Any new fd created by dup2 must not be cloexec.  */
+  ASSERT (close (fd + 2) == 0);
+  ASSERT (dup_cloexec (fd) == fd + 1);
+  ASSERT (!is_inheritable (fd + 1));
+  ASSERT (dup2 (fd + 1, fd + 1) == fd + 1);
+  ASSERT (!is_inheritable (fd + 1));
+  ASSERT (dup2 (fd + 1, fd + 2) == fd + 2);
+  ASSERT (!is_inheritable (fd + 1));
+  ASSERT (is_inheritable (fd + 2));
+  errno = 0;
+  ASSERT (dup2 (fd + 1, -1) == -1);
+  ASSERT (errno == EBADF);
+  ASSERT (!is_inheritable (fd + 1));
+#endif
+
+  /* On systems that distinguish between text and binary mode, dup2
+     reuses the mode of the source.  */
+  setmode (fd, O_BINARY);
+  ASSERT (is_mode (fd, O_BINARY));
+  ASSERT (dup2 (fd, fd + 1) == fd + 1);
+  ASSERT (is_mode (fd + 1, O_BINARY));
+  setmode (fd, O_TEXT);
+  ASSERT (is_mode (fd, O_TEXT));
+  ASSERT (dup2 (fd, fd + 1) == fd + 1);
+  ASSERT (is_mode (fd + 1, O_TEXT));
+
+  /* Clean up.  */
+  ASSERT (close (fd + 2) == 0);
+  ASSERT (close (fd + 1) == 0);
+  ASSERT (close (fd) == 0);
+  ASSERT (unlink (file) == 0);
+
+  return 0;
+}
diff --git a/tests/test-environ.c b/tests/test-environ.c
new file mode 100644 (file)
index 0000000..11df789
--- /dev/null
@@ -0,0 +1,44 @@
+/* Test of environ variable.
+   Copyright (C) 2008-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 Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <string.h>
+
+int
+main ()
+{
+  /* The environment variables that are set even in the weirdest situations
+     are HOME and PATH.
+     POSIX says that HOME is initialized by the system, and that PATH may be
+     unset.  But in practice it's more frequent to see HOME unset and PATH
+     set.  So we test the presence of PATH.  */
+  char **remaining_variables = environ;
+  char *string;
+
+  for (; (string = *remaining_variables) != NULL; remaining_variables++)
+    {
+      if (strncmp (string, "PATH=", 5) == 0)
+        /* Found the PATH environment variable.  */
+        return 0;
+    }
+  /* Failed to find the PATH environment variable.  */
+  return 1;
+}
diff --git a/tests/test-errno.c b/tests/test-errno.c
new file mode 100644 (file)
index 0000000..7851c22
--- /dev/null
@@ -0,0 +1,117 @@
+/* Test of <errno.h> substitute.
+   Copyright (C) 2008-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 Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include <errno.h>
+
+/* Verify that the POSIX mandated errno values exist and can be used as
+   initializers outside of a function.
+   The variable names happen to match the Linux/x86 error numbers.  */
+int e1 = EPERM;
+int e2 = ENOENT;
+int e3 = ESRCH;
+int e4 = EINTR;
+int e5 = EIO;
+int e6 = ENXIO;
+int e7 = E2BIG;
+int e8 = ENOEXEC;
+int e9 = EBADF;
+int e10 = ECHILD;
+int e11 = EAGAIN;
+int e11a = EWOULDBLOCK;
+int e12 = ENOMEM;
+int e13 = EACCES;
+int e14 = EFAULT;
+int e16 = EBUSY;
+int e17 = EEXIST;
+int e18 = EXDEV;
+int e19 = ENODEV;
+int e20 = ENOTDIR;
+int e21 = EISDIR;
+int e22 = EINVAL;
+int e23 = ENFILE;
+int e24 = EMFILE;
+int e25 = ENOTTY;
+int e26 = ETXTBSY;
+int e27 = EFBIG;
+int e28 = ENOSPC;
+int e29 = ESPIPE;
+int e30 = EROFS;
+int e31 = EMLINK;
+int e32 = EPIPE;
+int e33 = EDOM;
+int e34 = ERANGE;
+int e35 = EDEADLK;
+int e36 = ENAMETOOLONG;
+int e37 = ENOLCK;
+int e38 = ENOSYS;
+int e39 = ENOTEMPTY;
+int e40 = ELOOP;
+int e42 = ENOMSG;
+int e43 = EIDRM;
+int e67 = ENOLINK;
+int e71 = EPROTO;
+int e72 = EMULTIHOP;
+int e74 = EBADMSG;
+int e75 = EOVERFLOW;
+int e84 = EILSEQ;
+int e88 = ENOTSOCK;
+int e89 = EDESTADDRREQ;
+int e90 = EMSGSIZE;
+int e91 = EPROTOTYPE;
+int e92 = ENOPROTOOPT;
+int e93 = EPROTONOSUPPORT;
+int e95 = EOPNOTSUPP;
+int e95a = ENOTSUP;
+int e97 = EAFNOSUPPORT;
+int e98 = EADDRINUSE;
+int e99 = EADDRNOTAVAIL;
+int e100 = ENETDOWN;
+int e101 = ENETUNREACH;
+int e102 = ENETRESET;
+int e103 = ECONNABORTED;
+int e104 = ECONNRESET;
+int e105 = ENOBUFS;
+int e106 = EISCONN;
+int e107 = ENOTCONN;
+int e110 = ETIMEDOUT;
+int e111 = ECONNREFUSED;
+int e113 = EHOSTUNREACH;
+int e114 = EALREADY;
+int e115 = EINPROGRESS;
+int e116 = ESTALE;
+int e122 = EDQUOT;
+int e125 = ECANCELED;
+
+/* Don't verify that these errno values are all different, except for possibly
+   EWOULDBLOCK == EAGAIN.  Even Linux/x86 does not pass this check: it has
+   ENOTSUP == EOPNOTSUPP.  */
+
+int
+main ()
+{
+  /* Verify that errno can be assigned.  */
+  errno = EOVERFLOW;
+
+  /* snprintf() callers want to distinguish EINVAL and EOVERFLOW.  */
+  if (errno == EINVAL)
+    return 1;
+
+  return 0;
+}
diff --git a/tests/test-fchdir.c b/tests/test-fchdir.c
new file mode 100644 (file)
index 0000000..0375c31
--- /dev/null
@@ -0,0 +1,97 @@
+/* Test changing to a directory named by a file descriptor.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fchdir, int, (int));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "cloexec.h"
+#include "macros.h"
+
+int
+main (void)
+{
+  char *cwd = getcwd (NULL, 0);
+  int fd = open (".", O_RDONLY);
+  int i;
+
+  ASSERT (cwd);
+  ASSERT (0 <= fd);
+
+  /* Check for failure cases.  */
+  {
+    int bad_fd = open ("/dev/null", O_RDONLY);
+    ASSERT (0 <= bad_fd);
+    errno = 0;
+    ASSERT (fchdir (bad_fd) == -1);
+    ASSERT (errno == ENOTDIR);
+    ASSERT (close (bad_fd) == 0);
+    errno = 0;
+    ASSERT (fchdir (-1) == -1);
+    ASSERT (errno == EBADF);
+  }
+
+  /* Repeat test twice, once in '.' and once in '..'.  */
+  for (i = 0; i < 2; i++)
+    {
+      ASSERT (chdir (".." + 1 - i) == 0);
+      ASSERT (fchdir (fd) == 0);
+      {
+        size_t len = strlen (cwd) + 1;
+        char *new_dir = malloc (len);
+        ASSERT (new_dir);
+        ASSERT (getcwd (new_dir, len) == new_dir);
+        ASSERT (strcmp (cwd, new_dir) == 0);
+        free (new_dir);
+      }
+
+      /* For second iteration, use a cloned fd, to ensure that dup
+         remembers whether an fd was associated with a directory.  */
+      if (!i)
+        {
+          int new_fd = dup (fd);
+          ASSERT (0 <= new_fd);
+          ASSERT (close (fd) == 0);
+          ASSERT (dup2 (new_fd, fd) == fd);
+          ASSERT (close (new_fd) == 0);
+          ASSERT (dup_cloexec (fd) == new_fd);
+          ASSERT (dup2 (new_fd, fd) == fd);
+          ASSERT (close (new_fd) == 0);
+          ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, new_fd) == new_fd);
+          ASSERT (close (fd) == 0);
+          ASSERT (fcntl (new_fd, F_DUPFD, fd) == fd);
+          ASSERT (close (new_fd) == 0);
+#if GNULIB_TEST_DUP3
+          ASSERT (dup3 (fd, new_fd, 0) == new_fd);
+          ASSERT (dup3 (new_fd, fd, 0) == fd);
+          ASSERT (close (new_fd) == 0);
+#endif
+        }
+    }
+
+  free (cwd);
+  return 0;
+}
diff --git a/tests/test-fchownat.c b/tests/test-fchownat.c
new file mode 100644 (file)
index 0000000..c09694c
--- /dev/null
@@ -0,0 +1,82 @@
+/* Tests of fchownat.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fchownat, int, (int, char const *, uid_t, gid_t, int));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "mgetgroups.h"
+#include "openat.h"
+#include "stat-time.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-fchownat.t"
+
+#include "test-chown.h"
+#include "test-lchown.h"
+
+static int dfd = AT_FDCWD;
+
+/* Wrapper around fchownat to test chown behavior.  */
+static int
+do_chown (char const *name, uid_t user, gid_t group)
+{
+  return chownat (dfd, name, user, group);
+}
+
+/* Wrapper around fchownat to test lchown behavior.  */
+static int
+do_lchown (char const *name, uid_t user, gid_t group)
+{
+  return lchownat (dfd, name, user, group);
+}
+
+int
+main (void)
+{
+  int result1; /* Skip because of no chown/symlink support.  */
+  int result2; /* Skip because of no lchown support.  */
+
+  /* Clean up any trash from prior testsuite runs.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  /* Basic tests.  */
+  result1 = test_chown (do_chown, true);
+  result2 = test_lchown (do_lchown, result1 == 0);
+  dfd = open (".", O_RDONLY);
+  ASSERT (0 <= dfd);
+  ASSERT (test_chown (do_chown, false) == result1);
+  ASSERT (test_lchown (do_lchown, false) == result2);
+  /* We expect 0/0, 0/77, or 77/77, but not 77/0.  */
+  ASSERT (result1 <= result2);
+  ASSERT (close (dfd) == 0);
+
+  /* FIXME - add additional tests of dfd not at current directory.  */
+  return result1 | result2;
+}
diff --git a/tests/test-fcntl-h.c b/tests/test-fcntl-h.c
new file mode 100644 (file)
index 0000000..dd20fbb
--- /dev/null
@@ -0,0 +1,38 @@
+/* Test of <fcntl.h> substitute.
+   Copyright (C) 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <fcntl.h>
+
+/* Check that the various O_* macros are defined.  */
+int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK
+        | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_TTY_INIT
+        | O_BINARY | O_TEXT;
+
+/* Check that the various SEEK_* macros are defined.  */
+int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
+
+/* Check that the FD_* macros are defined.  */
+int fd = FD_CLOEXEC;
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-fcntl-safer.c b/tests/test-fcntl-safer.c
new file mode 100644 (file)
index 0000000..70a9f51
--- /dev/null
@@ -0,0 +1,38 @@
+/* Test of opening a file descriptor.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "fcntl--.h"
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#define BASE "test-fcntl-safer.t"
+
+#include "test-open.h"
+
+int
+main (void)
+{
+  return test_open (open, true);
+}
diff --git a/tests/test-fcntl.c b/tests/test-fcntl.c
new file mode 100644 (file)
index 0000000..23a0dba
--- /dev/null
@@ -0,0 +1,341 @@
+/* Test of fcntl(2).
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <fcntl.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fcntl, int, (int, int, ...));
+
+/* Helpers.  */
+#include <errno.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions.  */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#include "binary-io.h"
+#include "macros.h"
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+
+/* Return true if FD is open.  */
+static bool
+is_open (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* On Win32, the initial state of unassigned standard file
+     descriptors is that they are open but point to an
+     INVALID_HANDLE_VALUE, and there is no fcntl.  */
+  return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+#else
+# ifndef F_GETFL
+#  error Please port fcntl to your platform
+# endif
+  return 0 <= fcntl (fd, F_GETFL);
+#endif
+}
+
+/* Return true if FD is open and inheritable across exec/spawn.  */
+static bool
+is_inheritable (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* On Win32, the initial state of unassigned standard file
+     descriptors is that they are open but point to an
+     INVALID_HANDLE_VALUE, and there is no fcntl.  */
+  HANDLE h = (HANDLE) _get_osfhandle (fd);
+  DWORD flags;
+  if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+    return false;
+  return (flags & HANDLE_FLAG_INHERIT) != 0;
+#else
+# ifndef F_GETFD
+#  error Please port fcntl to your platform
+# endif
+  int i = fcntl (fd, F_GETFD);
+  return 0 <= i && (i & FD_CLOEXEC) == 0;
+#endif
+}
+
+/* Return non-zero if FD is open in the given MODE, which is either
+   O_TEXT or O_BINARY.  */
+static bool
+is_mode (int fd, int mode)
+{
+  int value = setmode (fd, O_BINARY);
+  setmode (fd, value);
+  return mode == value;
+}
+
+/* Since native fcntl can have more supported operations than our
+   replacement is aware of, and since various operations assign
+   different types to the vararg argument, a wrapper around fcntl must
+   be able to pass a vararg of unknown type on through to the original
+   fcntl.  Make sure that this works properly: func1 behaves like the
+   original fcntl interpreting the vararg as an int or a pointer to a
+   struct, and func2 behaves like rpl_fcntl that doesn't know what
+   type to forward.  */
+struct dummy_struct
+{
+  long filler;
+  int value;
+};
+static int
+func1 (int a, ...)
+{
+  va_list arg;
+  int i;
+  va_start (arg, a);
+  if (a < 4)
+    i = va_arg (arg, int);
+  else
+    {
+      struct dummy_struct *s = va_arg (arg, struct dummy_struct *);
+      i = s->value;
+    }
+  va_end (arg);
+  return i;
+}
+static int
+func2 (int a, ...)
+{
+  va_list arg;
+  void *p;
+  va_start (arg, a);
+  p = va_arg (arg, void *);
+  va_end (arg);
+  return func1 (a, p);
+}
+
+/* Ensure that all supported fcntl actions are distinct, and
+   usable in preprocessor expressions.  */
+static void
+check_flags (void)
+{
+  switch (0)
+    {
+    case F_DUPFD:
+#if F_DUPFD
+#endif
+
+    case F_DUPFD_CLOEXEC:
+#if F_DUPFD_CLOEXEC
+#endif
+
+    case F_GETFD:
+#if F_GETFD
+#endif
+
+#ifdef F_SETFD
+    case F_SETFD:
+# if F_SETFD
+# endif
+#endif
+
+#ifdef F_GETFL
+    case F_GETFL:
+# if F_GETFL
+# endif
+#endif
+
+#ifdef F_SETFL
+    case F_SETFL:
+# if F_SETFL
+# endif
+#endif
+
+#ifdef F_GETOWN
+    case F_GETOWN:
+# if F_GETOWN
+# endif
+#endif
+
+#ifdef F_SETOWN
+    case F_SETOWN:
+# if F_SETOWN
+# endif
+#endif
+
+#ifdef F_GETLK
+    case F_GETLK:
+# if F_GETLK
+# endif
+#endif
+
+#ifdef F_SETLK
+    case F_SETLK:
+# if F_SETLK
+# endif
+#endif
+
+#ifdef F_SETLKW
+    case F_SETLKW:
+# if F_SETLKW
+# endif
+#endif
+
+      ;
+    }
+}
+
+int
+main (void)
+{
+  const char *file = "test-fcntl.tmp";
+  int fd;
+
+  /* Sanity check that rpl_fcntl is likely to work.  */
+  ASSERT (func2 (1, 2) == 2);
+  ASSERT (func2 (2, -2) == -2);
+  ASSERT (func2 (3, 0x80000000) == 0x80000000);
+  {
+    struct dummy_struct s = { 0L, 4 };
+    ASSERT (func2 (4, &s) == 4);
+  }
+  check_flags ();
+
+  /* Assume std descriptors were provided by invoker, and ignore fds
+     that might have been inherited.  */
+  fd = creat (file, 0600);
+  ASSERT (STDERR_FILENO < fd);
+  close (fd + 1);
+  close (fd + 2);
+
+  /* For F_DUPFD*, the source must be valid.  */
+  errno = 0;
+  ASSERT (fcntl (-1, F_DUPFD, 0) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (fcntl (fd + 1, F_DUPFD, 0) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (fcntl (10000000, F_DUPFD, 0) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (fcntl (-1, F_DUPFD_CLOEXEC, 0) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (fcntl (fd + 1, F_DUPFD_CLOEXEC, 0) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (fcntl (10000000, F_DUPFD_CLOEXEC, 0) == -1);
+  ASSERT (errno == EBADF);
+
+  /* For F_DUPFD*, the destination must be valid.  */
+  ASSERT (getdtablesize () < 10000000);
+  errno = 0;
+  ASSERT (fcntl (fd, F_DUPFD, -1) == -1);
+  ASSERT (errno == EINVAL);
+  errno = 0;
+  ASSERT (fcntl (fd, F_DUPFD, 10000000) == -1);
+  ASSERT (errno == EINVAL);
+  ASSERT (getdtablesize () < 10000000);
+  errno = 0;
+  ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, -1) == -1);
+  ASSERT (errno == EINVAL);
+  errno = 0;
+  ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, 10000000) == -1);
+  ASSERT (errno == EINVAL);
+
+  /* For F_DUPFD*, check for correct inheritance, as well as
+     preservation of text vs. binary.  */
+  setmode (fd, O_BINARY);
+  ASSERT (is_open (fd));
+  ASSERT (!is_open (fd + 1));
+  ASSERT (!is_open (fd + 2));
+  ASSERT (is_inheritable (fd));
+  ASSERT (is_mode (fd, O_BINARY));
+
+  ASSERT (fcntl (fd, F_DUPFD, fd) == fd + 1);
+  ASSERT (is_open (fd));
+  ASSERT (is_open (fd + 1));
+  ASSERT (!is_open (fd + 2));
+  ASSERT (is_inheritable (fd + 1));
+  ASSERT (is_mode (fd, O_BINARY));
+  ASSERT (is_mode (fd + 1, O_BINARY));
+  ASSERT (close (fd + 1) == 0);
+
+  ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, fd + 2) == fd + 2);
+  ASSERT (is_open (fd));
+  ASSERT (!is_open (fd + 1));
+  ASSERT (is_open (fd + 2));
+  ASSERT (is_inheritable (fd));
+  ASSERT (!is_inheritable (fd + 2));
+  ASSERT (is_mode (fd, O_BINARY));
+  ASSERT (is_mode (fd + 2, O_BINARY));
+  ASSERT (close (fd) == 0);
+
+  setmode (fd + 2, O_TEXT);
+  ASSERT (fcntl (fd + 2, F_DUPFD, fd + 1) == fd + 1);
+  ASSERT (!is_open (fd));
+  ASSERT (is_open (fd + 1));
+  ASSERT (is_open (fd + 2));
+  ASSERT (is_inheritable (fd + 1));
+  ASSERT (!is_inheritable (fd + 2));
+  ASSERT (is_mode (fd + 1, O_TEXT));
+  ASSERT (is_mode (fd + 2, O_TEXT));
+  ASSERT (close (fd + 1) == 0);
+
+  ASSERT (fcntl (fd + 2, F_DUPFD_CLOEXEC, 0) == fd);
+  ASSERT (is_open (fd));
+  ASSERT (!is_open (fd + 1));
+  ASSERT (is_open (fd + 2));
+  ASSERT (!is_inheritable (fd));
+  ASSERT (!is_inheritable (fd + 2));
+  ASSERT (is_mode (fd, O_TEXT));
+  ASSERT (is_mode (fd + 2, O_TEXT));
+  ASSERT (close (fd + 2) == 0);
+
+  /* Test F_GETFD.  */
+  errno = 0;
+  ASSERT (fcntl (-1, F_GETFD) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (fcntl (fd + 1, F_GETFD) == -1);
+  ASSERT (errno == EBADF);
+  errno = 0;
+  ASSERT (fcntl (10000000, F_GETFD) == -1);
+  ASSERT (errno == EBADF);
+  {
+    int result = fcntl (fd, F_GETFD);
+    ASSERT (0 <= result);
+    ASSERT ((result & FD_CLOEXEC) == FD_CLOEXEC);
+    ASSERT (dup (fd) == fd + 1);
+    result = fcntl (fd + 1, F_GETFD);
+    ASSERT (0 <= result);
+    ASSERT ((result & FD_CLOEXEC) == 0);
+    ASSERT (close (fd + 1) == 0);
+  }
+
+  /* Cleanup.  */
+  ASSERT (close (fd) == 0);
+  ASSERT (unlink (file) == 0);
+
+  return 0;
+}
diff --git a/tests/test-fdopendir.c b/tests/test-fdopendir.c
new file mode 100644 (file)
index 0000000..81e44a1
--- /dev/null
@@ -0,0 +1,68 @@
+/* Test opening a directory stream from a file descriptor.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <dirent.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fdopendir, DIR *, (int));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  DIR *d;
+  int fd;
+
+  /* A non-directory cannot be turned into a directory stream.  */
+  fd = open ("test-fdopendir.tmp", O_RDONLY | O_CREAT, 0600);
+  ASSERT (0 <= fd);
+  errno = 0;
+  ASSERT (fdopendir (fd) == NULL);
+  ASSERT (errno == ENOTDIR);
+  ASSERT (close (fd) == 0);
+  ASSERT (unlink ("test-fdopendir.tmp") == 0);
+
+  /* A bad fd cannot be turned into a stream.  */
+  errno = 0;
+  ASSERT (fdopendir (-1) == NULL);
+  ASSERT (errno == EBADF);
+
+  /* This should work.  */
+  fd = open (".", O_RDONLY);
+  ASSERT (0 <= fd);
+  d = fdopendir (fd);
+  /* We know that fd is now out of our reach, but it is not specified
+     whether it is closed now or at the closedir.  We also can't
+     guarantee whether dirfd returns fd, some other descriptor, or
+     -1.  */
+  ASSERT (d);
+  ASSERT (closedir (d) == 0);
+  /* Now we can guarantee that fd must be closed.  */
+  errno = 0;
+  ASSERT (dup2 (fd, fd) == -1);
+  ASSERT (errno == EBADF);
+
+  return 0;
+}
diff --git a/tests/test-fflush.c b/tests/test-fflush.c
new file mode 100644 (file)
index 0000000..3c36ed9
--- /dev/null
@@ -0,0 +1,145 @@
+/* Test of POSIX compatible fflush() function.
+   Copyright (C) 2007, 2009-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 Eric Blake, 2007.  */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+   ftell link warning if we are not using the gnulib ftell module.  */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fflush, int, (FILE *));
+
+#include <unistd.h>
+
+int
+main (void)
+{
+  FILE *f;
+  char buffer[10];
+  int fd;
+
+  /* Create test file.  */
+  f = fopen ("test-fflush.txt", "w");
+  if (!f || fwrite ("1234567890ABCDEFG", 1, 17, f) != 17 || fclose (f) != 0)
+    {
+      fputs ("Failed to create sample file.\n", stderr);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+
+  /* Test fflush.  */
+  f = fopen ("test-fflush.txt", "r");
+  fd = fileno (f);
+  if (!f || 0 > fd || fread (buffer, 1, 5, f) != 5)
+    {
+      fputs ("Failed initial read of sample file.\n", stderr);
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+  /* For deterministic results, ensure f read a bigger buffer.
+     This is not the case on BeOS, nor on uClibc.  */
+#if !(defined __BEOS__ || defined __UCLIBC__)
+  if (lseek (fd, 0, SEEK_CUR) == 5)
+    {
+      fputs ("Sample file was not buffered after fread.\n", stderr);
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+#endif
+  /* POSIX requires fflush-fseek to set file offset of fd.  */
+  if (fflush (f) != 0 || fseeko (f, 0, SEEK_CUR) != 0)
+    {
+      fputs ("Failed to flush-fseek sample file.\n", stderr);
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+  /* Check that offset is correct.  */
+  if (lseek (fd, 0, SEEK_CUR) != 5)
+    {
+      fprintf (stderr, "File offset is wrong after fseek: %ld.\n",
+               (long) lseek (fd, 0, SEEK_CUR));
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+  if (ftell (f) != 5)
+    {
+      fprintf (stderr, "ftell result is wrong after fseek: %ld.\n",
+               (long) ftell (f));
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+  /* Check that file reading resumes at correct location.  */
+  if (fgetc (f) != '6')
+    {
+      fputs ("Failed to read next byte after fseek.\n", stderr);
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+  /* For deterministic results, ensure f read a bigger buffer.  */
+  if (lseek (fd, 0, SEEK_CUR) == 6)
+    {
+      fputs ("Sample file was not buffered after fgetc.\n", stderr);
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+  /* POSIX requires fflush-fseeko to set file offset of fd.  */
+  if (fflush (f) != 0 || fseeko (f, 0, SEEK_CUR) != 0)
+    {
+      fputs ("Failed to flush-fseeko sample file.\n", stderr);
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+  /* Check that offset is correct.  */
+  if (lseek (fd, 0, SEEK_CUR) != 6)
+    {
+      fprintf (stderr, "File offset is wrong after fseeko: %ld.\n",
+               (long) lseek (fd, 0, SEEK_CUR));
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+  if (ftell (f) != 6)
+    {
+      fprintf (stderr, "ftell result is wrong after fseeko: %ld.\n",
+               (long) ftell (f));
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+  /* Check that file reading resumes at correct location.  */
+  if (fgetc (f) != '7')
+    {
+      fputs ("Failed to read next byte after fseeko.\n", stderr);
+      fclose (f);
+      unlink ("test-fflush.txt");
+      return 1;
+    }
+  fclose (f);
+  unlink ("test-fflush.txt");
+  return 0;
+}
diff --git a/tests/test-fflush2.c b/tests/test-fflush2.c
new file mode 100644 (file)
index 0000000..ac2217d
--- /dev/null
@@ -0,0 +1,108 @@
+/* Test of POSIX compatible fflush() function.
+   Copyright (C) 2008-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/>.  */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "binary-io.h"
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+  int c;
+
+  /* Avoid the well-known bugs of fflush() on streams in O_TEXT mode
+     on native Windows platforms.  */
+  SET_BINARY (0);
+
+  if (argc > 1)
+    switch (argv[1][0])
+      {
+      case '1':
+        /* Check fflush after a backup ungetc() call.  This is case 1a in
+           terms of
+           <http://lists.gnu.org/archive/html/bug-gnulib/2008-03/msg00131.html>,
+           according to the Austin Group's resolution on 2009-01-08.  */
+
+        c = fgetc (stdin);
+        ASSERT (c == '#');
+
+        c = fgetc (stdin);
+        ASSERT (c == '!');
+
+        /* Here the file-position indicator must be 2.  */
+
+        c = ungetc ('!', stdin);
+        ASSERT (c == '!');
+
+        fflush (stdin);
+
+        /* Here the file-position indicator must be 1.  */
+
+        c = fgetc (stdin);
+        ASSERT (c == '!');
+
+        c = fgetc (stdin);
+        ASSERT (c == '/');
+
+        return 0;
+
+      case '2':
+        /* Check fflush after a non-backup ungetc() call.  This is case 2a in
+           terms of
+           <http://lists.gnu.org/archive/html/bug-gnulib/2008-03/msg00131.html>,
+           according to the Austin Group's resolution on 2009-01-08.  */
+        /* Check that fflush after a non-backup ungetc() call discards the
+           ungetc buffer.  This is mandated by POSIX
+           <http://www.opengroup.org/susv3/functions/ungetc.html>:
+             "The value of the file-position indicator for the stream after
+              reading or discarding all pushed-back bytes shall be the same
+              as it was before the bytes were pushed back."
+           <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>
+             "[After fflush(),] the file offset of the underlying open file
+              description shall be set to the file position of the stream, and
+              any characters pushed back onto the stream by ungetc() or
+              ungetwc() that have not subsequently been read from the stream
+              shall be discarded."  */
+
+        c = fgetc (stdin);
+        ASSERT (c == '#');
+
+        c = fgetc (stdin);
+        ASSERT (c == '!');
+
+        /* Here the file-position indicator must be 2.  */
+
+        c = ungetc ('@', stdin);
+        ASSERT (c == '@');
+
+        fflush (stdin);
+
+        /* Here the file-position indicator must be 1.  */
+
+        c = fgetc (stdin);
+        ASSERT (c == '!');
+
+        c = fgetc (stdin);
+        ASSERT (c == '/');
+
+        return 0;
+      }
+
+  return 1;
+}
diff --git a/tests/test-fflush2.sh b/tests/test-fflush2.sh
new file mode 100755 (executable)
index 0000000..ef77fa4
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Execute the test only with seekable input stream.
+# The behaviour of fflush() on a non-seekable input stream is undefined.
+./test-fflush2${EXEEXT} 1 < "$srcdir/test-fflush2.sh" || exit $?
+./test-fflush2${EXEEXT} 2 < "$srcdir/test-fflush2.sh" || exit $?
+#cat "$srcdir/test-fflush2.sh" | ./test-fflush2${EXEEXT} || exit $?
+
+exit 0
diff --git a/tests/test-fnmatch.c b/tests/test-fnmatch.c
new file mode 100644 (file)
index 0000000..66f9b1c
--- /dev/null
@@ -0,0 +1,50 @@
+/* Test of fnmatch string matching function.
+   Copyright (C) 2009-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 Simon Josefsson <simon@josefsson.org>, 2009.  */
+
+#include <config.h>
+
+#include <fnmatch.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fnmatch, int, (char const *, char const *, int));
+
+#include "macros.h"
+
+int
+main ()
+{
+  int res;
+
+  ASSERT (res = fnmatch ("", "", 0) == 0);
+
+  ASSERT (res = fnmatch ("*", "", 0) == 0);
+  ASSERT (res = fnmatch ("*", "foo", 0) == 0);
+  ASSERT (res = fnmatch ("*", "bar", 0) == 0);
+  ASSERT (res = fnmatch ("*", "*", 0) == 0);
+  ASSERT (res = fnmatch ("**", "f", 0) == 0);
+  ASSERT (res = fnmatch ("**", "foo.txt", 0) == 0);
+  ASSERT (res = fnmatch ("*.*", "foo.txt", 0) == 0);
+
+  ASSERT (res = fnmatch ("foo*.txt", "foobar.txt", 0) == 0);
+
+  ASSERT (res = fnmatch ("foo.txt", "foo.txt", 0) == 0);
+  ASSERT (res = fnmatch ("foo\\.txt", "foo.txt", 0) == 0);
+  ASSERT (res = fnmatch ("foo\\.txt", "foo.txt", FNM_NOESCAPE) == FNM_NOMATCH);
+
+  return 0;
+}
diff --git a/tests/test-fopen-safer.c b/tests/test-fopen-safer.c
new file mode 100644 (file)
index 0000000..20a0c13
--- /dev/null
@@ -0,0 +1,31 @@
+/* Test of opening a file stream.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "stdio--.h"
+
+#define BASE "test-fopen-safer.t"
+
+#include "test-fopen.h"
+
+int
+main (void)
+{
+  return test_fopen ();
+}
diff --git a/tests/test-fopen.c b/tests/test-fopen.c
new file mode 100644 (file)
index 0000000..c36006a
--- /dev/null
@@ -0,0 +1,34 @@
+/* Test of opening a file stream.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *));
+
+#define BASE "test-fopen.t"
+
+#include "test-fopen.h"
+
+int
+main (void)
+{
+  return test_fopen ();
+}
diff --git a/tests/test-fopen.h b/tests/test-fopen.h
new file mode 100644 (file)
index 0000000..49cbac1
--- /dev/null
@@ -0,0 +1,73 @@
+/* Test of opening a file stream.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+/* Include <config.h> and a form of <stdio.h> first.  */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+/* Test fopen.  Assumes BASE is defined.  */
+
+static int
+test_fopen (void)
+{
+  FILE *f;
+  /* Remove anything from prior partial run.  */
+  unlink (BASE "file");
+
+  /* Read requires existing file.  */
+  errno = 0;
+  ASSERT (fopen (BASE "file", "r") == NULL);
+  ASSERT (errno == ENOENT);
+
+  /* Write can create a file.  */
+  f = fopen (BASE "file", "w");
+  ASSERT (f);
+  ASSERT (fclose (f) == 0);
+
+  /* Trailing slash is invalid on non-directory.  */
+  errno = 0;
+  ASSERT (fopen (BASE "file/", "r") == NULL);
+  ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL);
+
+  /* Cannot create a directory.  */
+  errno = 0;
+  ASSERT (fopen ("nonexist.ent/", "w") == NULL);
+  ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT
+          || errno == EINVAL);
+
+  /* Directories cannot be opened for writing.  */
+  errno = 0;
+  ASSERT (fopen (".", "w") == NULL);
+  ASSERT (errno == EISDIR || errno == EINVAL || errno == EACCES);
+
+  /* /dev/null must exist, and be writable.  */
+  f = fopen ("/dev/null", "r");
+  ASSERT (f);
+  ASSERT (fclose (f) == 0);
+  f = fopen ("/dev/null", "w");
+  ASSERT (f);
+  ASSERT (fclose (f) == 0);
+
+  /* Cleanup.  */
+  ASSERT (unlink (BASE "file") == 0);
+
+  return 0;
+}
diff --git a/tests/test-fpending.c b/tests/test-fpending.c
new file mode 100644 (file)
index 0000000..edf1aa2
--- /dev/null
@@ -0,0 +1,41 @@
+/* Ensure that __fpending works.
+
+   Copyright (C) 2004, 2007-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 Jim Meyering.  */
+
+#include <config.h>
+
+#include "fpending.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  ASSERT (__fpending (stdout) == 0);
+
+  fputs ("foo", stdout);
+  ASSERT (__fpending (stdout) == 3);
+
+  fflush (stdout);
+  ASSERT (__fpending (stdout) == 0);
+
+  exit (0);
+}
diff --git a/tests/test-fpending.sh b/tests/test-fpending.sh
new file mode 100755 (executable)
index 0000000..636af25
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+tmpfile=
+trap 'rm -fr $tmpfile' 1 2 3 15
+
+tmpfile=test-fpending.t
+
+./test-fpending${EXEEXT} > $tmpfile || exit 1
+
+rm -fr $tmpfile
+
+exit 0
diff --git a/tests/test-fpurge.c b/tests/test-fpurge.c
new file mode 100644 (file)
index 0000000..0f36221
--- /dev/null
@@ -0,0 +1,134 @@
+/* Test of fpurge() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+   fseek link warning if we are not using the gnulib fseek module.  */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include <string.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-fpurge.tmp"
+
+int
+main (void)
+{
+  int check_filepos;
+
+  for (check_filepos = 0; check_filepos <= 1; check_filepos++)
+    {
+      FILE *fp;
+
+      /* Create a file with some contents.  */
+      fp = fopen (TESTFILE, "w");
+      if (fp == NULL)
+        goto skip;
+      if (fwrite ("foobarsh", 1, 8, fp) < 8)
+        goto skip;
+      if (fclose (fp))
+        goto skip;
+
+      /* The file's contents is now "foobarsh".  */
+
+      /* Open it in read-write mode.  */
+      fp = fopen (TESTFILE, "r+");
+      if (fp == NULL)
+        goto skip;
+      if (fseek (fp, 3, SEEK_CUR))
+        goto skip;
+      if (fwrite ("g", 1, 1, fp) < 1)
+        goto skip;
+      if (fflush (fp))
+        goto skip;
+      if (fwrite ("bz", 1, 2, fp) < 2)
+        goto skip;
+      /* Discard pending write.  */
+      ASSERT (fpurge (fp) == 0);
+      /* Verify that when discarding pending output, the file position is set
+         back to where it was before the write calls.  */
+      if (check_filepos)
+        ASSERT (ftell (fp) == 4);
+      ASSERT (fclose (fp) == 0);
+
+      /* Open it in read-only mode.  */
+      fp = fopen (TESTFILE, "r");
+      if (fp == NULL)
+        goto skip;
+      /* Verify that the pending writes before the fpurge were really
+         discarded.  */
+      {
+        char buf[8];
+        if (fread (buf, 1, 7, fp) < 7)
+          goto skip;
+        ASSERT (memcmp (buf, "foogars", 7) == 0);
+      }
+      /* Discard the buffered 'h'.  */
+      if (check_filepos)
+        ASSERT (ftell (fp) == 7);
+      ASSERT (fpurge (fp) == 0);
+      /* Verify that when discarding pending input, the file position is
+         advanced to match the end of the previously read input.  */
+      if (check_filepos)
+        ASSERT (ftell (fp) == 8);
+      ASSERT (getc (fp) == EOF);
+      ASSERT (fclose (fp) == 0);
+
+      /* The file's contents is now "foogarsh".  */
+
+      /* Ensure that purging a read does not corrupt subsequent writes.  */
+      fp = fopen (TESTFILE, "r+");
+      if (fp == NULL)
+        goto skip;
+      if (fseek (fp, -1, SEEK_END))
+        goto skip;
+      ASSERT (getc (fp) == 'h');
+      ASSERT (getc (fp) == EOF);
+      if (check_filepos)
+        ASSERT (ftell (fp) == 8);
+      ASSERT (fpurge (fp) == 0);
+      if (check_filepos)
+        ASSERT (ftell (fp) == 8);
+      ASSERT (putc ('!', fp) == '!');
+      if (check_filepos)
+        ASSERT (ftell (fp) == 9);
+      ASSERT (fclose (fp) == 0);
+      fp = fopen (TESTFILE, "r");
+      if (fp == NULL)
+        goto skip;
+      {
+        char buf[10];
+        ASSERT (fread (buf, 1, 10, fp) == 9);
+        ASSERT (memcmp (buf, "foogarsh!", 9) == 0);
+      }
+      ASSERT (fclose (fp) == 0);
+
+      /* The file's contents is now "foogarsh!".  */
+    }
+
+  remove (TESTFILE);
+  return 0;
+
+ skip:
+  fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
+  remove (TESTFILE);
+  return 77;
+}
diff --git a/tests/test-freadahead.c b/tests/test-freadahead.c
new file mode 100644 (file)
index 0000000..23dd21c
--- /dev/null
@@ -0,0 +1,73 @@
+/* Test of freadahead() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "freadahead.h"
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+  int nbytes = atoi (argv[1]);
+  if (nbytes > 0)
+    {
+      void *buf = malloc (nbytes);
+      ASSERT (fread (buf, 1, nbytes, stdin) == nbytes);
+    }
+
+  if (nbytes == 0)
+    ASSERT (freadahead (stdin) == 0);
+  else
+    {
+      if (lseek (0, 0, SEEK_CUR) == nbytes)
+        /* An unbuffered stdio, such as BeOS or on uClibc compiled without
+           __STDIO_BUFFERS.  */
+        ASSERT (freadahead (stdin) == 0);
+      else
+        {
+          /* Normal buffered stdio.  */
+          size_t buffered;
+          int c, c2;
+
+          ASSERT (freadahead (stdin) != 0);
+          buffered = freadahead (stdin);
+
+          c = fgetc (stdin);
+          ASSERT (freadahead (stdin) == buffered - 1);
+          ungetc (c, stdin);
+          ASSERT (freadahead (stdin) == buffered);
+          c2 = fgetc (stdin);
+          ASSERT (c2 == c);
+          ASSERT (freadahead (stdin) == buffered - 1);
+
+          c = '@';
+          ungetc (c, stdin);
+          ASSERT (freadahead (stdin) == buffered);
+          c2 = fgetc (stdin);
+          ASSERT (c2 == c);
+          ASSERT (freadahead (stdin) == buffered - 1);
+        }
+    }
+
+  return 0;
+}
diff --git a/tests/test-freadahead.sh b/tests/test-freadahead.sh
new file mode 100755 (executable)
index 0000000..27cf550
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-freadahead${EXEEXT} 0 < "$srcdir/test-freadahead.sh" || exit 1
+./test-freadahead${EXEEXT} 5 < "$srcdir/test-freadahead.sh" || exit 1
+exit 0
diff --git a/tests/test-freading.c b/tests/test-freading.c
new file mode 100644 (file)
index 0000000..723de4d
--- /dev/null
@@ -0,0 +1,130 @@
+/* Test of freading() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+   fseek link warning if we are not using the gnulib fseek module.  */
+#define _GL_NO_LARGE_FILES
+#include "freading.h"
+
+#include <stdio.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-freading.tmp"
+
+int
+main (void)
+{
+  FILE *fp;
+
+  /* Create a file with some contents.  Write-only file is never reading.  */
+  fp = fopen (TESTFILE, "w");
+  ASSERT (fp);
+  ASSERT (!freading (fp));
+  ASSERT (fwrite ("foobarsh", 1, 8, fp) == 8);
+  ASSERT (!freading (fp));
+  ASSERT (fclose (fp) == 0);
+
+  /* Open it in read-only mode.  Read-only file is always reading.  */
+  fp = fopen (TESTFILE, "r");
+  ASSERT (fp);
+  ASSERT (freading (fp));
+  ASSERT (fgetc (fp) == 'f');
+  ASSERT (freading (fp));
+  ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
+  ASSERT (freading (fp));
+  ASSERT (fgetc (fp) == 'b');
+  ASSERT (freading (fp));
+  fflush (fp);
+  ASSERT (freading (fp));
+  ASSERT (fgetc (fp) == 'a');
+  ASSERT (freading (fp));
+  ASSERT (fseek (fp, 0, SEEK_END) == 0);
+  ASSERT (freading (fp));
+  ASSERT (fclose (fp) == 0);
+
+  /* Open it in read-write mode.  POSIX requires a reposition (fseek,
+     fsetpos, rewind) or EOF when transitioning from read to write;
+     freading is only deterministic after input or output, but this
+     test case should be portable even on open, after reposition, and
+     at EOF.  */
+  /* First a scenario with only fgetc, fseek, fputc.  */
+  fp = fopen (TESTFILE, "r+");
+  ASSERT (fp);
+  ASSERT (!freading (fp));
+  ASSERT (fgetc (fp) == 'f');
+  ASSERT (freading (fp));
+  ASSERT (fseek (fp, 2, SEEK_CUR) ==  0);
+  /* freading (fp) is undefined here, but fwriting (fp) is false.  */
+  ASSERT (fgetc (fp) == 'b');
+  ASSERT (freading (fp));
+  /* This fseek call is necessary when switching from reading to writing.
+     See the description of fopen(), ISO C 99 7.19.5.3.(6).  */
+  ASSERT (fseek (fp, 0, SEEK_CUR) == 0);
+  /* freading (fp) is undefined here, but fwriting (fp) is false.  */
+  ASSERT (fputc ('x', fp) == 'x');
+  ASSERT (!freading (fp));
+  ASSERT (fseek (fp, 0, SEEK_END) == 0);
+  /* freading (fp) is undefined here, because on some implementations (e.g.
+     glibc) fseek causes a buffer to be read.
+     fwriting (fp) is undefined as well.  */
+  ASSERT (fclose (fp) == 0);
+
+  /* Open it in read-write mode.  POSIX requires a reposition (fseek,
+     fsetpos, rewind) or EOF when transitioning from read to write;
+     freading is only deterministic after input or output, but this
+     test case should be portable even on open, after reposition, and
+     at EOF.  */
+  /* Here a scenario that includes fflush.  */
+  fp = fopen (TESTFILE, "r+");
+  ASSERT (fp);
+  ASSERT (!freading (fp));
+  ASSERT (fgetc (fp) == 'f');
+  ASSERT (freading (fp));
+  ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
+  /* freading (fp) is undefined here, but fwriting (fp) is false.  */
+  ASSERT (fgetc (fp) == 'b');
+  ASSERT (freading (fp));
+  fflush (fp);
+  /* freading (fp) is undefined here, but fwriting (fp) is false.  */
+  ASSERT (fgetc (fp) == 'x');
+  ASSERT (freading (fp));
+  /* This fseek call is necessary when switching from reading to writing.
+     See the description of fopen(), ISO C 99 7.19.5.3.(6).  */
+  ASSERT (fseek (fp, 0, SEEK_CUR) == 0);
+  /* freading (fp) is undefined here, but fwriting (fp) is false.  */
+  ASSERT (fputc ('z', fp) == 'z');
+  ASSERT (!freading (fp));
+  ASSERT (fseek (fp, 0, SEEK_END) == 0);
+  /* freading (fp) is undefined here, because on some implementations (e.g.
+     glibc) fseek causes a buffer to be read.
+     fwriting (fp) is undefined as well.  */
+  ASSERT (fclose (fp) == 0);
+
+  /* Open it in append mode.  Write-only file is never reading.  */
+  fp = fopen (TESTFILE, "a");
+  ASSERT (fp);
+  ASSERT (!freading (fp));
+  ASSERT (fwrite ("bla", 1, 3, fp) == 3);
+  ASSERT (!freading (fp));
+  ASSERT (fclose (fp) == 0);
+  ASSERT (remove (TESTFILE) == 0);
+  return 0;
+}
diff --git a/tests/test-fseeko.c b/tests/test-fseeko.c
new file mode 100644 (file)
index 0000000..ad5eec8
--- /dev/null
@@ -0,0 +1,74 @@
+/* Test of fseeko() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+   fseek link warning if we are not using the gnulib fseek module.  */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fseeko, int, (FILE *, off_t, int));
+
+
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv _GL_UNUSED)
+{
+  /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh'
+     iff argc > 1.  */
+  int expected = argc > 1 ? 0 : -1;
+  /* Exit with success only if fseek/fseeko agree.  */
+  int r1 = fseeko (stdin, 0, SEEK_CUR);
+  int r2 = fseek (stdin, 0, SEEK_CUR);
+  ASSERT (r1 == r2 && r1 == expected);
+  if (argc > 1)
+    {
+      /* Test that fseek discards previously read ungetc data.  */
+      int ch = fgetc (stdin);
+      ASSERT (ch == '#');
+      ASSERT (ungetc (ch, stdin) == ch);
+      ASSERT (fseeko (stdin, 2, SEEK_SET) == 0);
+      ch = fgetc (stdin);
+      ASSERT (ch == '/');
+      if (2 < argc)
+        {
+          if (FUNC_UNGETC_BROKEN)
+            {
+              fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+                     stderr);
+              return 77;
+            }
+          /* Test that fseek discards random ungetc data.  */
+          ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff));
+        }
+      ASSERT (fseeko (stdin, 0, SEEK_END) == 0);
+      ASSERT (fgetc (stdin) == EOF);
+      /* Test that fseek resets end-of-file marker.  */
+      ASSERT (feof (stdin));
+      ASSERT (fseeko (stdin, 0, SEEK_END) == 0);
+      ASSERT (!feof (stdin));
+    }
+  return 0;
+}
diff --git a/tests/test-fseeko.sh b/tests/test-fseeko.sh
new file mode 100755 (executable)
index 0000000..5c55827
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-fseeko${EXEEXT} 1 < "$srcdir/test-fseeko.sh" || exit 1
+echo hi | ./test-fseeko${EXEEXT} || exit 1
+exit 0
diff --git a/tests/test-fseeko2.sh b/tests/test-fseeko2.sh
new file mode 100755 (executable)
index 0000000..6e1130c
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-fseeko${EXEEXT} 1 2 < "$srcdir/test-fseeko2.sh"
diff --git a/tests/test-fstatat.c b/tests/test-fstatat.c
new file mode 100644 (file)
index 0000000..839dad6
--- /dev/null
@@ -0,0 +1,82 @@
+/* Tests of fstatat.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fstatat, int, (int, char const *, struct stat *, int));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "openat.h"
+#include "pathmax.h"
+#include "same-inode.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-fstatat.t"
+
+#include "test-lstat.h"
+#include "test-stat.h"
+
+static int dfd = AT_FDCWD;
+
+/* Wrapper around fstatat to test stat behavior.  */
+static int
+do_stat (char const *name, struct stat *st)
+{
+  return statat (dfd, name, st);
+}
+
+/* Wrapper around fstatat to test lstat behavior.  */
+static int
+do_lstat (char const *name, struct stat *st)
+{
+  return lstatat (dfd, name, st);
+}
+
+int
+main (void)
+{
+  int result;
+
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  result = test_stat_func (do_stat, false);
+  ASSERT (test_lstat_func (do_lstat, false) == result);
+  dfd = open (".", O_RDONLY);
+  ASSERT (0 <= dfd);
+  ASSERT (test_stat_func (do_stat, false) == result);
+  ASSERT (test_lstat_func (do_lstat, false) == result);
+  ASSERT (close (dfd) == 0);
+
+  /* FIXME - add additional tests of dfd not at current directory.  */
+
+  if (result == 77)
+    fputs ("skipping test: symlinks not supported on this file system\n",
+           stderr);
+  return result;
+}
diff --git a/tests/test-ftell.c b/tests/test-ftell.c
new file mode 100644 (file)
index 0000000..54ede05
--- /dev/null
@@ -0,0 +1,107 @@
+/* Test of ftell() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+   fseek link warning if we are not using the gnulib fseek module.  */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ftell, long, (FILE *));
+
+#include "binary-io.h"
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv)
+{
+  int ch;
+  /* Assume stdin is seekable iff argc > 1.  */
+  if (argc == 1)
+    {
+      ASSERT (ftell (stdin) == -1);
+      return 0;
+    }
+
+  /* mingw ftell is unreliable on text mode input.  */
+  SET_BINARY (0);
+
+  /* Simple tests.  */
+  ASSERT (ftell (stdin) == 0);
+
+  ch = fgetc (stdin);
+  ASSERT (ch == '#');
+  ASSERT (ftell (stdin) == 1);
+
+  /* Test ftell after ungetc of read input.  */
+  ch = ungetc ('#', stdin);
+  ASSERT (ch == '#');
+  ASSERT (ftell (stdin) == 0);
+
+  ch = fgetc (stdin);
+  ASSERT (ch == '#');
+  ASSERT (ftell (stdin) == 1);
+
+  /* Test ftell after fseek.  */
+  ASSERT (fseek (stdin, 2, SEEK_SET) == 0);
+  ASSERT (ftell (stdin) == 2);
+
+  /* Test ftell after random ungetc.  */
+  ch = fgetc (stdin);
+  ASSERT (ch == '/');
+  ch = ungetc ('@', stdin);
+  ASSERT (ch == '@');
+  ASSERT (ftell (stdin) == 2);
+
+  ch = fgetc (stdin);
+  ASSERT (ch == '@');
+  ASSERT (ftell (stdin) == 3);
+
+  if (2 < argc)
+    {
+      if (FUNC_UNGETC_BROKEN)
+        {
+          fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+                 stderr);
+          return 77;
+        }
+      /* Test ftell after ungetc without read.  */
+      ASSERT (fseek (stdin, 0, SEEK_CUR) == 0);
+      ASSERT (ftell (stdin) == 3);
+
+      ch = ungetc ('~', stdin);
+      ASSERT (ch == '~');
+      ASSERT (ftell (stdin) == 2);
+    }
+
+#if !defined __MINT__ /* FreeMiNT has problems seeking past end of file */
+  /* Test ftell beyond end of file.  */
+  ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+  ch = ftell (stdin);
+  ASSERT (fseek (stdin, 10, SEEK_END) == 0);
+  ASSERT (ftell (stdin) == ch + 10);
+#endif
+
+  return 0;
+}
diff --git a/tests/test-ftell.sh b/tests/test-ftell.sh
new file mode 100755 (executable)
index 0000000..bf55d2e
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-ftell${EXEEXT} 1 < "$srcdir/test-ftell.sh" || exit 1
+echo hi | ./test-ftell${EXEEXT} || exit 1
+exit 0
diff --git a/tests/test-ftell2.sh b/tests/test-ftell2.sh
new file mode 100755 (executable)
index 0000000..3b645b8
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-ftell${EXEEXT} 1 2 < "$srcdir/test-ftell2.sh"
diff --git a/tests/test-ftell3.c b/tests/test-ftell3.c
new file mode 100644 (file)
index 0000000..a5167ef
--- /dev/null
@@ -0,0 +1,78 @@
+/* Test of ftell() function.
+   Copyright (C) 2007-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/>.  */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+   fseek link warning if we are not using the gnulib fseek module.  */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include <string.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-ftell3.tmp"
+
+int
+main (void)
+{
+  FILE *fp;
+
+  /* Create a file with some contents.  */
+  fp = fopen (TESTFILE, "w");
+  if (fp == NULL)
+    goto skip;
+  if (fwrite ("foogarsh", 1, 8, fp) < 8)
+    goto skip;
+  if (fclose (fp))
+    goto skip;
+
+  /* The file's contents is now "foogarsh".  */
+
+  /* Try writing after reading to EOF.  */
+  fp = fopen (TESTFILE, "r+");
+  if (fp == NULL)
+    goto skip;
+  if (fseek (fp, -1, SEEK_END))
+    goto skip;
+  ASSERT (getc (fp) == 'h');
+  ASSERT (getc (fp) == EOF);
+  ASSERT (ftell (fp) == 8);
+  ASSERT (ftell (fp) == 8);
+  ASSERT (putc ('!', fp) == '!');
+  ASSERT (ftell (fp) == 9);
+  ASSERT (fclose (fp) == 0);
+  fp = fopen (TESTFILE, "r");
+  if (fp == NULL)
+    goto skip;
+  {
+    char buf[10];
+    ASSERT (fread (buf, 1, 10, fp) == 9);
+    ASSERT (memcmp (buf, "foogarsh!", 9) == 0);
+  }
+  ASSERT (fclose (fp) == 0);
+
+  /* The file's contents is now "foogarsh!".  */
+
+  remove (TESTFILE);
+  return 0;
+
+ skip:
+  fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
+  remove (TESTFILE);
+  return 77;
+}
diff --git a/tests/test-ftello.c b/tests/test-ftello.c
new file mode 100644 (file)
index 0000000..636da81
--- /dev/null
@@ -0,0 +1,118 @@
+/* Test of ftello() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+   fseek link warning if we are not using the gnulib fseek module.  */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ftello, off_t, (FILE *));
+
+#include "binary-io.h"
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv _GL_UNUSED)
+{
+  int ch;
+  /* Assume stdin is seekable iff argc > 1.  */
+  if (argc == 1)
+    {
+      ASSERT (ftell (stdin) == -1);
+      ASSERT (ftello (stdin) == -1);
+      return 0;
+    }
+
+  /* mingw ftell is unreliable on text mode input.  */
+  SET_BINARY (0);
+
+  /* Simple tests.  For each test, make sure ftell and ftello agree.  */
+  ASSERT (ftell (stdin) == 0);
+  ASSERT (ftello (stdin) == 0);
+
+  ch = fgetc (stdin);
+  ASSERT (ch == '#');
+  ASSERT (ftell (stdin) == 1);
+  ASSERT (ftello (stdin) == 1);
+
+  /* Test ftell after ungetc of read input.  */
+  ch = ungetc ('#', stdin);
+  ASSERT (ch == '#');
+  ASSERT (ftell (stdin) == 0);
+  ASSERT (ftello (stdin) == 0);
+
+  ch = fgetc (stdin);
+  ASSERT (ch == '#');
+  ASSERT (ftell (stdin) == 1);
+  ASSERT (ftello (stdin) == 1);
+
+  /* Test ftell after fseek.  */
+  ASSERT (fseek (stdin, 2, SEEK_SET) == 0);
+  ASSERT (ftell (stdin) == 2);
+  ASSERT (ftello (stdin) == 2);
+
+  /* Test ftell after random ungetc.  */
+  ch = fgetc (stdin);
+  ASSERT (ch == '/');
+  ch = ungetc ('@', stdin);
+  ASSERT (ch == '@');
+  ASSERT (ftell (stdin) == 2);
+  ASSERT (ftello (stdin) == 2);
+
+  ch = fgetc (stdin);
+  ASSERT (ch == '@');
+  ASSERT (ftell (stdin) == 3);
+  ASSERT (ftello (stdin) == 3);
+
+  if (2 < argc)
+    {
+      if (FUNC_UNGETC_BROKEN)
+        {
+          fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+                 stderr);
+          return 77;
+        }
+      /* Test ftell after ungetc without read.  */
+      ASSERT (fseek (stdin, 0, SEEK_CUR) == 0);
+      ASSERT (ftell (stdin) == 3);
+      ASSERT (ftello (stdin) == 3);
+
+      ch = ungetc ('~', stdin);
+      ASSERT (ch == '~');
+      ASSERT (ftell (stdin) == 2);
+      ASSERT (ftello (stdin) == 2);
+    }
+
+#if !defined __MINT__ /* FreeMiNT has problems seeking past end of file */
+  /* Test ftell beyond end of file.  */
+  ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+  ch = ftello (stdin);
+  ASSERT (fseek (stdin, 10, SEEK_END) == 0);
+  ASSERT (ftell (stdin) == ch + 10);
+  ASSERT (ftello (stdin) == ch + 10);
+#endif
+
+  return 0;
+}
diff --git a/tests/test-ftello.sh b/tests/test-ftello.sh
new file mode 100755 (executable)
index 0000000..33d2e83
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-ftello${EXEEXT} 1 < "$srcdir/test-ftello.sh" || exit 1
+echo hi | ./test-ftello${EXEEXT} || exit 1
+exit 0
diff --git a/tests/test-ftello2.sh b/tests/test-ftello2.sh
new file mode 100755 (executable)
index 0000000..ba750b0
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-ftello${EXEEXT} 1 2 < "$srcdir/test-ftello2.sh"
diff --git a/tests/test-ftello3.c b/tests/test-ftello3.c
new file mode 100644 (file)
index 0000000..50d4b88
--- /dev/null
@@ -0,0 +1,78 @@
+/* Test of ftello() function.
+   Copyright (C) 2007-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/>.  */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+   fseek link warning if we are not using the gnulib fseek module.  */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include <string.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-ftello3.tmp"
+
+int
+main (void)
+{
+  FILE *fp;
+
+  /* Create a file with some contents.  */
+  fp = fopen (TESTFILE, "w");
+  if (fp == NULL)
+    goto skip;
+  if (fwrite ("foogarsh", 1, 8, fp) < 8)
+    goto skip;
+  if (fclose (fp))
+    goto skip;
+
+  /* The file's contents is now "foogarsh".  */
+
+  /* Try writing after reading to EOF.  */
+  fp = fopen (TESTFILE, "r+");
+  if (fp == NULL)
+    goto skip;
+  if (fseek (fp, -1, SEEK_END))
+    goto skip;
+  ASSERT (getc (fp) == 'h');
+  ASSERT (getc (fp) == EOF);
+  ASSERT (ftello (fp) == 8);
+  ASSERT (ftello (fp) == 8);
+  ASSERT (putc ('!', fp) == '!');
+  ASSERT (ftello (fp) == 9);
+  ASSERT (fclose (fp) == 0);
+  fp = fopen (TESTFILE, "r");
+  if (fp == NULL)
+    goto skip;
+  {
+    char buf[10];
+    ASSERT (fread (buf, 1, 10, fp) == 9);
+    ASSERT (memcmp (buf, "foogarsh!", 9) == 0);
+  }
+  ASSERT (fclose (fp) == 0);
+
+  /* The file's contents is now "foogarsh!".  */
+
+  remove (TESTFILE);
+  return 0;
+
+ skip:
+  fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
+  remove (TESTFILE);
+  return 77;
+}
diff --git a/tests/test-getcwd.c b/tests/test-getcwd.c
new file mode 100644 (file)
index 0000000..18fc74f
--- /dev/null
@@ -0,0 +1,76 @@
+/* Test of getcwd() function.
+   Copyright (C) 2009-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/>.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getcwd, char *, (char *, size_t));
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+  char *pwd1;
+  char *pwd2;
+  /* If the user provides an argument, attempt to chdir there first.  */
+  if (1 < argc)
+    {
+      if (chdir (argv[1]) == 0)
+        printf ("changed to directory %s\n", argv[1]);
+    }
+
+  pwd1 = getcwd (NULL, 0);
+  ASSERT (pwd1 && *pwd1);
+  if (1 < argc)
+    printf ("cwd=%s\n", pwd1);
+
+  /* Make sure the result is usable.  */
+  ASSERT (chdir (pwd1) == 0);
+  ASSERT (chdir ("././.") == 0);
+
+  /* Make sure that result is normalized.  */
+  pwd2 = getcwd (NULL, 0);
+  ASSERT (pwd2);
+  ASSERT (strcmp (pwd1, pwd2) == 0);
+  free (pwd2);
+  {
+    size_t len = strlen (pwd1);
+    ssize_t i = len - 10;
+    if (i < 0)
+      i = 0;
+    pwd2 = malloc (len + 2);
+    for ( ; i < len; i++)
+      ASSERT (getcwd (pwd2, i) == NULL);
+    pwd2 = getcwd (pwd2, len + 1);
+    ASSERT (pwd2);
+    pwd2[len] = '/';
+    pwd2[len + 1] = '\0';
+  }
+  ASSERT (strstr (pwd2, "/./") == NULL);
+  ASSERT (strstr (pwd2, "/../") == NULL);
+
+  free (pwd1);
+  free (pwd2);
+
+  return 0;
+}
diff --git a/tests/test-getdelim.c b/tests/test-getdelim.c
new file mode 100644 (file)
index 0000000..f4d1c9d
--- /dev/null
@@ -0,0 +1,95 @@
+/* Test of getdelim() function.
+   Copyright (C) 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2007.  */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getdelim, ssize_t, (char **, size_t *, int, FILE *));
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  FILE *f;
+  char *line;
+  size_t len;
+  ssize_t result;
+
+  /* Create test file.  */
+  f = fopen ("test-getdelim.txt", "wb");
+  if (!f || fwrite ("anAnbcnd\0f", 1, 10, f) != 10 || fclose (f) != 0)
+    {
+      fputs ("Failed to create sample file.\n", stderr);
+      remove ("test-getdelim.txt");
+      return 1;
+    }
+  f = fopen ("test-getdelim.txt", "rb");
+  if (!f)
+    {
+      fputs ("Failed to reopen sample file.\n", stderr);
+      remove ("test-getdelim.txt");
+      return 1;
+    }
+
+  /* Test initial allocation, which must include trailing NUL.  */
+  line = NULL;
+  len = 0;
+  result = getdelim (&line, &len, 'n', f);
+  ASSERT (result == 2);
+  ASSERT (strcmp (line, "an") == 0);
+  ASSERT (2 < len);
+  free (line);
+
+  /* Test initial allocation again, with line = NULL and len != 0.  */
+  line = NULL;
+  len = (size_t)(~0) / 4;
+  result = getdelim (&line, &len, 'n', f);
+  ASSERT (result == 2);
+  ASSERT (strcmp (line, "An") == 0);
+  ASSERT (2 < len);
+  free (line);
+
+  /* Test growth of buffer.  */
+  line = malloc (1);
+  len = 1;
+  result = getdelim (&line, &len, 'n', f);
+  ASSERT (result == 3);
+  ASSERT (strcmp (line, "bcn") == 0);
+  ASSERT (3 < len);
+
+  /* Test embedded NULs and EOF behavior.  */
+  result = getdelim (&line, &len, 'n', f);
+  ASSERT (result == 3);
+  ASSERT (memcmp (line, "d\0f", 4) == 0);
+  ASSERT (3 < len);
+
+  result = getdelim (&line, &len, 'n', f);
+  ASSERT (result == -1);
+
+  free (line);
+  fclose (f);
+  remove ("test-getdelim.txt");
+  return 0;
+}
diff --git a/tests/test-getdtablesize.c b/tests/test-getdtablesize.c
new file mode 100644 (file)
index 0000000..ae969a1
--- /dev/null
@@ -0,0 +1,34 @@
+/* Test of getdtablesize() function.
+   Copyright (C) 2008-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 Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getdtablesize, int, (void));
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  ASSERT (getdtablesize () >= 3);
+
+  return 0;
+}
diff --git a/tests/test-getgroups.c b/tests/test-getgroups.c
new file mode 100644 (file)
index 0000000..98f3dd5
--- /dev/null
@@ -0,0 +1,78 @@
+/* Tests of getgroups.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getgroups, int, (int, gid_t[]));
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv _GL_UNUSED)
+{
+  int result;
+  gid_t *groups;
+
+  errno = 0;
+  result = getgroups (0, NULL);
+  if (result == -1 && errno == ENOSYS)
+    {
+      fputs ("skipping test: no support for groups\n", stderr);
+      return 77;
+    }
+  ASSERT (0 <= result);
+  ASSERT (result + 1 < SIZE_MAX / sizeof *groups);
+  groups = malloc ((result + 1) * sizeof *groups);
+  ASSERT (groups);
+  groups[result] = -1;
+  /* Check for EINVAL handling.  Not all processes have supplemental
+     groups, and getgroups does not have to return the effective gid,
+     so a result of 0 is reasonable.  Also, we can't test for EINVAL
+     if result is 1, because of how getgroups treats 0.  */
+  if (1 < result)
+    {
+      errno = 0;
+      ASSERT (getgroups (result - 1, groups) == -1);
+      ASSERT (errno == EINVAL);
+    }
+  ASSERT (getgroups (result, groups) == result);
+  ASSERT (getgroups (result + 1, groups) == result);
+  ASSERT (groups[result] == -1);
+  errno = 0;
+  ASSERT (getgroups (-1, NULL) == -1);
+  ASSERT (errno == EINVAL);
+
+  /* The automated unit test, with no arguments, ends here.  However,
+     for debugging purposes, you can pass a command-line argument to
+     list the returned groups.  */
+  if (1 < argc)
+    {
+      int i;
+      for (i = 0; i < result; i++)
+        printf ("%d\n", (int) groups[i]);
+    }
+  return 0;
+}
diff --git a/tests/test-getline.c b/tests/test-getline.c
new file mode 100644 (file)
index 0000000..bead4b6
--- /dev/null
@@ -0,0 +1,95 @@
+/* Test of getline() function.
+   Copyright (C) 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2007.  */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getline, ssize_t, (char **, size_t *, FILE *));
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  FILE *f;
+  char *line;
+  size_t len;
+  ssize_t result;
+
+  /* Create test file.  */
+  f = fopen ("test-getline.txt", "wb");
+  if (!f || fwrite ("a\nA\nbc\nd\0f", 1, 10, f) != 10 || fclose (f) != 0)
+    {
+      fputs ("Failed to create sample file.\n", stderr);
+      remove ("test-getline.txt");
+      return 1;
+    }
+  f = fopen ("test-getline.txt", "rb");
+  if (!f)
+    {
+      fputs ("Failed to reopen sample file.\n", stderr);
+      remove ("test-getline.txt");
+      return 1;
+    }
+
+  /* Test initial allocation, which must include trailing NUL.  */
+  line = NULL;
+  len = 0;
+  result = getline (&line, &len, f);
+  ASSERT (result == 2);
+  ASSERT (strcmp (line, "a\n") == 0);
+  ASSERT (2 < len);
+  free (line);
+
+  /* Test initial allocation again, with line = NULL and len != 0.  */
+  line = NULL;
+  len = (size_t)(~0) / 4;
+  result = getline (&line, &len, f);
+  ASSERT (result == 2);
+  ASSERT (strcmp (line, "A\n") == 0);
+  ASSERT (2 < len);
+  free (line);
+
+  /* Test growth of buffer, must not leak.  */
+  line = malloc (1);
+  len = 0;
+  result = getline (&line, &len, f);
+  ASSERT (result == 3);
+  ASSERT (strcmp (line, "bc\n") == 0);
+  ASSERT (3 < len);
+
+  /* Test embedded NULs and EOF behavior.  */
+  result = getline (&line, &len, f);
+  ASSERT (result == 3);
+  ASSERT (memcmp (line, "d\0f", 4) == 0);
+  ASSERT (3 < len);
+
+  result = getline (&line, &len, f);
+  ASSERT (result == -1);
+
+  free (line);
+  fclose (f);
+  remove ("test-getline.txt");
+  return 0;
+}
diff --git a/tests/test-getopt.c b/tests/test-getopt.c
new file mode 100644 (file)
index 0000000..69f2cfa
--- /dev/null
@@ -0,0 +1,99 @@
+/* Test of command line argument processing.
+   Copyright (C) 2009-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 Bruno Haible <bruno@clisp.org>, 2009.  */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+   ftell link warning if we are not using the gnulib ftell module.  */
+#define _GL_NO_LARGE_FILES
+
+#if GNULIB_TEST_GETOPT_GNU
+# include <getopt.h>
+
+# ifndef __getopt_argv_const
+#  define __getopt_argv_const const
+# endif
+# include "signature.h"
+SIGNATURE_CHECK (getopt_long, int, (int, char *__getopt_argv_const *,
+                                    char const *, struct option const *,
+                                    int *));
+SIGNATURE_CHECK (getopt_long_only, int, (int, char *__getopt_argv_const *,
+                                         char const *, struct option const *,
+                                         int *));
+
+#endif
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getopt, int, (int, char * const[], char const *));
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* This test intentionally remaps stderr.  So, we arrange to have fd 10
+   (outside the range of interesting fd's during the test) set up to
+   duplicate the original stderr.  */
+
+#define BACKUP_STDERR_FILENO 10
+#define ASSERT_STREAM myerr
+#include "macros.h"
+
+static FILE *myerr;
+
+#include "test-getopt.h"
+#if GNULIB_TEST_GETOPT_GNU
+# include "test-getopt_long.h"
+#endif
+
+int
+main (void)
+{
+   /* This test validates that stderr is used correctly, so move the
+      original into fd 10.  */
+  if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+      || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+    return 2;
+
+  ASSERT (freopen ("test-getopt.tmp", "w", stderr) == stderr);
+
+  /* These default values are required by POSIX.  */
+  ASSERT (optind == 1);
+  ASSERT (opterr != 0);
+
+  setenv ("POSIXLY_CORRECT", "1", 1);
+  test_getopt ();
+
+#if GNULIB_TEST_GETOPT_GNU
+  test_getopt_long_posix ();
+#endif
+
+  unsetenv ("POSIXLY_CORRECT");
+  test_getopt ();
+
+#if GNULIB_TEST_GETOPT_GNU
+  test_getopt_long ();
+  test_getopt_long_only ();
+#endif
+
+  ASSERT (fclose (stderr) == 0);
+  ASSERT (remove ("test-getopt.tmp") == 0);
+
+  return 0;
+}
diff --git a/tests/test-getopt.h b/tests/test-getopt.h
new file mode 100644 (file)
index 0000000..9c877b3
--- /dev/null
@@ -0,0 +1,1369 @@
+/* Test of command line argument processing.
+   Copyright (C) 2009-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 Bruno Haible <bruno@clisp.org>, 2009.  */
+
+#include <stdbool.h>
+
+/* The glibc/gnulib implementation of getopt supports setting optind =
+   0, but not all other implementations do.  This matters for getopt.
+   But for getopt_long, we require GNU compatibility.  */
+#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2 && !defined __UCLIBC__)
+# define OPTIND_MIN 0
+#elif HAVE_DECL_OPTRESET
+# define OPTIND_MIN (optreset = 1)
+#else
+# define OPTIND_MIN 1
+#endif
+
+static void
+getopt_loop (int argc, const char **argv,
+             const char *options,
+             int *a_seen, int *b_seen,
+             const char **p_value, const char **q_value,
+             int *non_options_count, const char **non_options,
+             int *unrecognized, bool *message_issued)
+{
+  int c;
+  int pos = ftell (stderr);
+
+  while ((c = getopt (argc, (char **) argv, options)) != -1)
+    {
+      switch (c)
+        {
+        case 'a':
+          (*a_seen)++;
+          break;
+        case 'b':
+          (*b_seen)++;
+          break;
+        case 'p':
+          *p_value = optarg;
+          break;
+        case 'q':
+          *q_value = optarg;
+          break;
+        case '\1':
+          /* Must only happen with option '-' at the beginning.  */
+          ASSERT (options[0] == '-');
+          non_options[(*non_options_count)++] = optarg;
+          break;
+        case ':':
+          /* Must only happen with option ':' at the beginning.  */
+          ASSERT (options[0] == ':'
+                  || ((options[0] == '-' || options[0] == '+')
+                      && options[1] == ':'));
+          /* fall through */
+        case '?':
+          *unrecognized = optopt;
+          break;
+        default:
+          *unrecognized = c;
+          break;
+        }
+    }
+
+  *message_issued = pos < ftell (stderr);
+}
+
+static void
+test_getopt (void)
+{
+  int start;
+  bool posixly = !!getenv ("POSIXLY_CORRECT");
+  /* See comment in getopt.c:
+     glibc gets a LSB-compliant getopt.
+     Standalone applications get a POSIX-compliant getopt.  */
+#if defined __GETOPT_PREFIX || !(__GLIBC__ >= 2 || defined __MINGW32__)
+  /* Using getopt from gnulib or from a non-glibc system.  */
+  posixly = true;
+#endif
+
+  /* Test processing of boolean options.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-a";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "ab",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-b";
+      argv[argc++] = "-a";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "ab",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ba";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "ab",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ab";
+      argv[argc++] = "-a";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "ab",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 2);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+      ASSERT (!output);
+    }
+
+  /* Test processing of options with arguments.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-pfoo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "p:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "p:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ab";
+      argv[argc++] = "-q";
+      argv[argc++] = "baz";
+      argv[argc++] = "-pfoo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 5);
+      ASSERT (!output);
+    }
+
+#if GNULIB_TEST_GETOPT_GNU
+  /* Test processing of options with optional arguments.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-pfoo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "p::q::",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "p::q::",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "abp::q::",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+      ASSERT (!output);
+    }
+#endif /* GNULIB_TEST_GETOPT_GNU */
+
+  /* Check that invalid options are recognized; and that both opterr
+     and leading ':' can silence output.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "-x";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 42;
+      getopt_loop (argc, argv, "abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 'x');
+      ASSERT (optind == 5);
+      ASSERT (output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "-x";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 0;
+      getopt_loop (argc, argv, "abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 'x');
+      ASSERT (optind == 5);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "-x";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, ":abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 'x');
+      ASSERT (optind == 5);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "-:";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 42;
+      getopt_loop (argc, argv, "abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == ':');
+      ASSERT (optind == 5);
+      ASSERT (output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "-:";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 0;
+      getopt_loop (argc, argv, "abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == ':');
+      ASSERT (optind == 5);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "-:";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, ":abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == ':');
+      ASSERT (optind == 5);
+      ASSERT (!output);
+    }
+
+  /* Check for missing argument behavior.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ap";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 'p');
+      ASSERT (optind == 2);
+      ASSERT (output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ap";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 0;
+      getopt_loop (argc, argv, "abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 'p');
+      ASSERT (optind == 2);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ap";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, ":abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 'p');
+      ASSERT (optind == 2);
+      ASSERT (!output);
+    }
+
+  /* Check that by default, non-options arguments are moved to the end.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      if (posixly)
+        {
+          ASSERT (strcmp (argv[0], "program") == 0);
+          ASSERT (strcmp (argv[1], "donald") == 0);
+          ASSERT (strcmp (argv[2], "-p") == 0);
+          ASSERT (strcmp (argv[3], "billy") == 0);
+          ASSERT (strcmp (argv[4], "duck") == 0);
+          ASSERT (strcmp (argv[5], "-a") == 0);
+          ASSERT (strcmp (argv[6], "bar") == 0);
+          ASSERT (argv[7] == NULL);
+          ASSERT (a_seen == 0);
+          ASSERT (b_seen == 0);
+          ASSERT (p_value == NULL);
+          ASSERT (q_value == NULL);
+          ASSERT (non_options_count == 0);
+          ASSERT (unrecognized == 0);
+          ASSERT (optind == 1);
+          ASSERT (!output);
+        }
+      else
+        {
+          ASSERT (strcmp (argv[0], "program") == 0);
+          ASSERT (strcmp (argv[1], "-p") == 0);
+          ASSERT (strcmp (argv[2], "billy") == 0);
+          ASSERT (strcmp (argv[3], "-a") == 0);
+          ASSERT (strcmp (argv[4], "donald") == 0);
+          ASSERT (strcmp (argv[5], "duck") == 0);
+          ASSERT (strcmp (argv[6], "bar") == 0);
+          ASSERT (argv[7] == NULL);
+          ASSERT (a_seen == 1);
+          ASSERT (b_seen == 0);
+          ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+          ASSERT (q_value == NULL);
+          ASSERT (non_options_count == 0);
+          ASSERT (unrecognized == 0);
+          ASSERT (optind == 4);
+          ASSERT (!output);
+        }
+    }
+
+  /* Check that '--' ends the argument processing.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[20];
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "--";
+      argv[argc++] = "-b";
+      argv[argc++] = "foo";
+      argv[argc++] = "-q";
+      argv[argc++] = "johnny";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      if (posixly)
+        {
+          ASSERT (strcmp (argv[0], "program") == 0);
+          ASSERT (strcmp (argv[1], "donald") == 0);
+          ASSERT (strcmp (argv[2], "-p") == 0);
+          ASSERT (strcmp (argv[3], "billy") == 0);
+          ASSERT (strcmp (argv[4], "duck") == 0);
+          ASSERT (strcmp (argv[5], "-a") == 0);
+          ASSERT (strcmp (argv[6], "--") == 0);
+          ASSERT (strcmp (argv[7], "-b") == 0);
+          ASSERT (strcmp (argv[8], "foo") == 0);
+          ASSERT (strcmp (argv[9], "-q") == 0);
+          ASSERT (strcmp (argv[10], "johnny") == 0);
+          ASSERT (strcmp (argv[11], "bar") == 0);
+          ASSERT (argv[12] == NULL);
+          ASSERT (a_seen == 0);
+          ASSERT (b_seen == 0);
+          ASSERT (p_value == NULL);
+          ASSERT (q_value == NULL);
+          ASSERT (non_options_count == 0);
+          ASSERT (unrecognized == 0);
+          ASSERT (optind == 1);
+          ASSERT (!output);
+        }
+      else
+        {
+          ASSERT (strcmp (argv[0], "program") == 0);
+          ASSERT (strcmp (argv[1], "-p") == 0);
+          ASSERT (strcmp (argv[2], "billy") == 0);
+          ASSERT (strcmp (argv[3], "-a") == 0);
+          ASSERT (strcmp (argv[4], "--") == 0);
+          ASSERT (strcmp (argv[5], "donald") == 0);
+          ASSERT (strcmp (argv[6], "duck") == 0);
+          ASSERT (strcmp (argv[7], "-b") == 0);
+          ASSERT (strcmp (argv[8], "foo") == 0);
+          ASSERT (strcmp (argv[9], "-q") == 0);
+          ASSERT (strcmp (argv[10], "johnny") == 0);
+          ASSERT (strcmp (argv[11], "bar") == 0);
+          ASSERT (argv[12] == NULL);
+          ASSERT (a_seen == 1);
+          ASSERT (b_seen == 0);
+          ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+          ASSERT (q_value == NULL);
+          ASSERT (non_options_count == 0);
+          ASSERT (unrecognized == 0);
+          ASSERT (optind == 5);
+          ASSERT (!output);
+        }
+    }
+
+#if GNULIB_TEST_GETOPT_GNU
+  /* Check that the '-' flag causes non-options to be returned in order.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "-abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "donald") == 0);
+      ASSERT (strcmp (argv[2], "-p") == 0);
+      ASSERT (strcmp (argv[3], "billy") == 0);
+      ASSERT (strcmp (argv[4], "duck") == 0);
+      ASSERT (strcmp (argv[5], "-a") == 0);
+      ASSERT (strcmp (argv[6], "bar") == 0);
+      ASSERT (argv[7] == NULL);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 3);
+      ASSERT (strcmp (non_options[0], "donald") == 0);
+      ASSERT (strcmp (non_options[1], "duck") == 0);
+      ASSERT (strcmp (non_options[2], "bar") == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 7);
+      ASSERT (!output);
+    }
+
+  /* Check that '--' ends the argument processing.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[20];
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "--";
+      argv[argc++] = "-b";
+      argv[argc++] = "foo";
+      argv[argc++] = "-q";
+      argv[argc++] = "johnny";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "-abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "donald") == 0);
+      ASSERT (strcmp (argv[2], "-p") == 0);
+      ASSERT (strcmp (argv[3], "billy") == 0);
+      ASSERT (strcmp (argv[4], "duck") == 0);
+      ASSERT (strcmp (argv[5], "-a") == 0);
+      ASSERT (strcmp (argv[6], "--") == 0);
+      ASSERT (strcmp (argv[7], "-b") == 0);
+      ASSERT (strcmp (argv[8], "foo") == 0);
+      ASSERT (strcmp (argv[9], "-q") == 0);
+      ASSERT (strcmp (argv[10], "johnny") == 0);
+      ASSERT (strcmp (argv[11], "bar") == 0);
+      ASSERT (argv[12] == NULL);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (!output);
+      if (non_options_count == 2)
+        {
+          /* glibc behaviour.  */
+          ASSERT (non_options_count == 2);
+          ASSERT (strcmp (non_options[0], "donald") == 0);
+          ASSERT (strcmp (non_options[1], "duck") == 0);
+          ASSERT (unrecognized == 0);
+          ASSERT (optind == 7);
+        }
+      else
+        {
+          /* Another valid behaviour.  */
+          ASSERT (non_options_count == 7);
+          ASSERT (strcmp (non_options[0], "donald") == 0);
+          ASSERT (strcmp (non_options[1], "duck") == 0);
+          ASSERT (strcmp (non_options[2], "-b") == 0);
+          ASSERT (strcmp (non_options[3], "foo") == 0);
+          ASSERT (strcmp (non_options[4], "-q") == 0);
+          ASSERT (strcmp (non_options[5], "johnny") == 0);
+          ASSERT (strcmp (non_options[6], "bar") == 0);
+          ASSERT (unrecognized == 0);
+          ASSERT (optind == 12);
+        }
+    }
+
+  /* Check that the '-' flag has to come first.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "abp:q:-",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      if (posixly)
+        {
+          ASSERT (strcmp (argv[0], "program") == 0);
+          ASSERT (strcmp (argv[1], "donald") == 0);
+          ASSERT (strcmp (argv[2], "-p") == 0);
+          ASSERT (strcmp (argv[3], "billy") == 0);
+          ASSERT (strcmp (argv[4], "duck") == 0);
+          ASSERT (strcmp (argv[5], "-a") == 0);
+          ASSERT (strcmp (argv[6], "bar") == 0);
+          ASSERT (argv[7] == NULL);
+          ASSERT (a_seen == 0);
+          ASSERT (b_seen == 0);
+          ASSERT (p_value == NULL);
+          ASSERT (q_value == NULL);
+          ASSERT (non_options_count == 0);
+          ASSERT (unrecognized == 0);
+          ASSERT (optind == 1);
+          ASSERT (!output);
+        }
+      else
+        {
+          ASSERT (strcmp (argv[0], "program") == 0);
+          ASSERT (strcmp (argv[1], "-p") == 0);
+          ASSERT (strcmp (argv[2], "billy") == 0);
+          ASSERT (strcmp (argv[3], "-a") == 0);
+          ASSERT (strcmp (argv[4], "donald") == 0);
+          ASSERT (strcmp (argv[5], "duck") == 0);
+          ASSERT (strcmp (argv[6], "bar") == 0);
+          ASSERT (argv[7] == NULL);
+          ASSERT (a_seen == 1);
+          ASSERT (b_seen == 0);
+          ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+          ASSERT (q_value == NULL);
+          ASSERT (non_options_count == 0);
+          ASSERT (unrecognized == 0);
+          ASSERT (optind == 4);
+          ASSERT (!output);
+        }
+    }
+
+  /* Check that the '+' flag causes the first non-option to terminate the
+     loop.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "+abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "donald") == 0);
+      ASSERT (strcmp (argv[2], "-p") == 0);
+      ASSERT (strcmp (argv[3], "billy") == 0);
+      ASSERT (strcmp (argv[4], "duck") == 0);
+      ASSERT (strcmp (argv[5], "-a") == 0);
+      ASSERT (strcmp (argv[6], "bar") == 0);
+      ASSERT (argv[7] == NULL);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 1);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-+";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_loop (argc, argv, "+abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == '+');
+      ASSERT (optind == 2);
+      ASSERT (output);
+    }
+
+  /* Check that '--' ends the argument processing.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[20];
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "--";
+      argv[argc++] = "-b";
+      argv[argc++] = "foo";
+      argv[argc++] = "-q";
+      argv[argc++] = "johnny";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "+abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "donald") == 0);
+      ASSERT (strcmp (argv[2], "-p") == 0);
+      ASSERT (strcmp (argv[3], "billy") == 0);
+      ASSERT (strcmp (argv[4], "duck") == 0);
+      ASSERT (strcmp (argv[5], "-a") == 0);
+      ASSERT (strcmp (argv[6], "--") == 0);
+      ASSERT (strcmp (argv[7], "-b") == 0);
+      ASSERT (strcmp (argv[8], "foo") == 0);
+      ASSERT (strcmp (argv[9], "-q") == 0);
+      ASSERT (strcmp (argv[10], "johnny") == 0);
+      ASSERT (strcmp (argv[11], "bar") == 0);
+      ASSERT (argv[12] == NULL);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 1);
+      ASSERT (!output);
+    }
+#endif /* GNULIB_TEST_GETOPT_GNU */
+
+  /* Check that the '+' flag has to come first.  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "abp:q:+",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      if (posixly)
+        {
+          ASSERT (strcmp (argv[0], "program") == 0);
+          ASSERT (strcmp (argv[1], "donald") == 0);
+          ASSERT (strcmp (argv[2], "-p") == 0);
+          ASSERT (strcmp (argv[3], "billy") == 0);
+          ASSERT (strcmp (argv[4], "duck") == 0);
+          ASSERT (strcmp (argv[5], "-a") == 0);
+          ASSERT (strcmp (argv[6], "bar") == 0);
+          ASSERT (argv[7] == NULL);
+          ASSERT (a_seen == 0);
+          ASSERT (b_seen == 0);
+          ASSERT (p_value == NULL);
+          ASSERT (q_value == NULL);
+          ASSERT (non_options_count == 0);
+          ASSERT (unrecognized == 0);
+          ASSERT (optind == 1);
+          ASSERT (!output);
+        }
+      else
+        {
+          ASSERT (strcmp (argv[0], "program") == 0);
+          ASSERT (strcmp (argv[1], "-p") == 0);
+          ASSERT (strcmp (argv[2], "billy") == 0);
+          ASSERT (strcmp (argv[3], "-a") == 0);
+          ASSERT (strcmp (argv[4], "donald") == 0);
+          ASSERT (strcmp (argv[5], "duck") == 0);
+          ASSERT (strcmp (argv[6], "bar") == 0);
+          ASSERT (argv[7] == NULL);
+          ASSERT (a_seen == 1);
+          ASSERT (b_seen == 0);
+          ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+          ASSERT (q_value == NULL);
+          ASSERT (non_options_count == 0);
+          ASSERT (unrecognized == 0);
+          ASSERT (optind == 4);
+          ASSERT (!output);
+        }
+    }
+
+#if GNULIB_TEST_GETOPT_GNU
+  /* If GNU extensions are supported, require compliance with POSIX
+     interpretation on leading '+' behavior.
+     http://austingroupbugs.net/view.php?id=191  */
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      opterr = 1;
+      getopt_loop (argc, argv, "+:abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "donald") == 0);
+      ASSERT (strcmp (argv[2], "-p") == 0);
+      ASSERT (strcmp (argv[3], "billy") == 0);
+      ASSERT (strcmp (argv[4], "duck") == 0);
+      ASSERT (strcmp (argv[5], "-a") == 0);
+      ASSERT (strcmp (argv[6], "bar") == 0);
+      ASSERT (argv[7] == NULL);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 1);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_loop (argc, argv, "+:abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 'p');
+      ASSERT (optind == 2);
+      ASSERT (!output);
+    }
+  for (start = OPTIND_MIN; start <= 1; start++)
+    {
+      int a_seen = 0;
+      int b_seen = 0;
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      bool output;
+      int argc = 0;
+      const char *argv[10];
+
+      argv[argc++] = "program";
+      argv[argc++] = "-b";
+      argv[argc++] = "-p";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_loop (argc, argv, "+:abp:q:",
+                   &a_seen, &b_seen, &p_value, &q_value,
+                   &non_options_count, non_options, &unrecognized, &output);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 'p');
+      ASSERT (optind == 3);
+      ASSERT (!output);
+    }
+#endif /* GNULIB_TEST_GETOPT_GNU */
+}
diff --git a/tests/test-getopt_long.h b/tests/test-getopt_long.h
new file mode 100644 (file)
index 0000000..7a74867
--- /dev/null
@@ -0,0 +1,2125 @@
+/* Test of command line argument processing.
+   Copyright (C) 2009-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 Bruno Haible <bruno@clisp.org>, 2009.  */
+
+static int a_seen;
+static int b_seen;
+static int q_seen;
+
+static const struct option long_options_required[] =
+  {
+    { "alpha",    no_argument,       NULL, 'a' },
+    { "beta",     no_argument,       &b_seen, 1 },
+    { "prune",    required_argument, NULL, 'p' },
+    { "quetsche", required_argument, &q_seen, 1 },
+    { "xtremely-",no_argument,       NULL, 1003 },
+    { "xtra",     no_argument,       NULL, 1001 },
+    { "xtreme",   no_argument,       NULL, 1002 },
+    { "xtremely", no_argument,       NULL, 1003 },
+    { NULL,       0,                 NULL, 0 }
+  };
+
+static const struct option long_options_optional[] =
+  {
+    { "alpha",    no_argument,       NULL, 'a' },
+    { "beta",     no_argument,       &b_seen, 1 },
+    { "prune",    optional_argument, NULL, 'p' },
+    { "quetsche", optional_argument, &q_seen, 1 },
+    { NULL,       0,                 NULL, 0 }
+  };
+
+static void
+getopt_long_loop (int argc, const char **argv,
+                  const char *options, const struct option *long_options,
+                  const char **p_value, const char **q_value,
+                  int *non_options_count, const char **non_options,
+                  int *unrecognized)
+{
+  int option_index = -1;
+  int c;
+
+  opterr = 0;
+  q_seen = 0;
+  while ((c = getopt_long (argc, (char **) argv, options, long_options,
+                           &option_index))
+         != -1)
+    {
+      switch (c)
+        {
+        case 0:
+          /* An option with a non-NULL flag pointer was processed.  */
+          if (q_seen)
+            *q_value = optarg;
+          break;
+        case 'a':
+          a_seen++;
+          break;
+        case 'b':
+          b_seen = 1;
+          break;
+        case 'p':
+          *p_value = optarg;
+          break;
+        case 'q':
+          *q_value = optarg;
+          break;
+        case '\1':
+          /* Must only happen with option '-' at the beginning.  */
+          ASSERT (options[0] == '-');
+          non_options[(*non_options_count)++] = optarg;
+          break;
+        case ':':
+          /* Must only happen with option ':' at the beginning.  */
+          ASSERT (options[0] == ':'
+                  || ((options[0] == '-' || options[0] == '+')
+                      && options[1] == ':'));
+          /* fall through */
+        case '?':
+          *unrecognized = optopt;
+          break;
+        default:
+          *unrecognized = c;
+          break;
+        }
+    }
+}
+
+/* Reduce casting, so we can use string literals elsewhere.
+   getopt_long takes an array of char*, but luckily does not modify
+   those elements, so we can pass const char*.  */
+static int
+do_getopt_long (int argc, const char **argv, const char *shortopts,
+                const struct option *longopts, int *longind)
+{
+  return getopt_long (argc, (char **) argv, shortopts, longopts, longind);
+}
+
+static void
+test_getopt_long (void)
+{
+  int start;
+
+  /* Test disambiguation of options.  */
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--x";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    ASSERT (c == '?');
+    ASSERT (optopt == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--xt";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    ASSERT (c == '?');
+    ASSERT (optopt == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--xtr";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    ASSERT (c == '?');
+    ASSERT (optopt == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--xtra";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    ASSERT (c == 1001);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--xtre";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    ASSERT (c == '?');
+    ASSERT (optopt == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--xtrem";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    ASSERT (c == '?');
+    ASSERT (optopt == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--xtreme";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    ASSERT (c == 1002);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--xtremel";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    ASSERT (c == 1003);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--xtremely";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    ASSERT (c == 1003);
+  }
+
+  /* Check that -W handles unknown options.  */
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-W";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index);
+    ASSERT (c == '?');
+    ASSERT (optopt == 'W');
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-Wunknown";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index);
+    /* glibc and BSD behave differently here, but for now, we allow
+       both behaviors since W support is not frequently used.  */
+    if (c == '?')
+      {
+        ASSERT (optopt == 0);
+        ASSERT (optarg == NULL);
+      }
+    else
+      {
+        ASSERT (c == 'W');
+        ASSERT (strcmp (optarg, "unknown") == 0);
+      }
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-W";
+    argv[argc++] = "unknown";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index);
+    /* glibc and BSD behave differently here, but for now, we allow
+       both behaviors since W support is not frequently used.  */
+    if (c == '?')
+      {
+        ASSERT (optopt == 0);
+        ASSERT (optarg == NULL);
+      }
+    else
+      {
+        ASSERT (c == 'W');
+        ASSERT (strcmp (optarg, "unknown") == 0);
+      }
+  }
+
+  /* Test processing of boolean short options.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-a";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "ab", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-b";
+      argv[argc++] = "-a";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "ab", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ba";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "ab", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ab";
+      argv[argc++] = "-a";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "ab", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 2);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+    }
+
+  /* Test processing of boolean long options.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "--alpha";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "ab", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "--beta";
+      argv[argc++] = "--alpha";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "ab", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "--alpha";
+      argv[argc++] = "--beta";
+      argv[argc++] = "--alpha";
+      argv[argc++] = "--beta";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "ab", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 2);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 5);
+    }
+
+  /* Test processing of boolean long options via -W.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-Walpha";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abW;", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-W";
+      argv[argc++] = "beta";
+      argv[argc++] = "-W";
+      argv[argc++] = "alpha";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "aW;b", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 5);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-Walpha";
+      argv[argc++] = "-Wbeta";
+      argv[argc++] = "-Walpha";
+      argv[argc++] = "-Wbeta";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "W;ab", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 2);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 5);
+    }
+
+  /* Test processing of short options with arguments.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-pfoo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ab";
+      argv[argc++] = "-q";
+      argv[argc++] = "baz";
+      argv[argc++] = "-pfoo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 5);
+    }
+
+  /* Test processing of long options with arguments.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "--p=foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "--p";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ab";
+      argv[argc++] = "--q";
+      argv[argc++] = "baz";
+      argv[argc++] = "--p=foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 5);
+    }
+
+  /* Test processing of long options with arguments via -W.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-Wp=foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p:q:W;", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-W";
+      argv[argc++] = "p";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p:W;q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 4);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-ab";
+      argv[argc++] = "-Wq";
+      argv[argc++] = "baz";
+      argv[argc++] = "-W";
+      argv[argc++] = "p=foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "W;abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 6);
+    }
+
+  /* Test processing of short options with optional arguments.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-pfoo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp::q::", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+    }
+
+  /* Test processing of long options with optional arguments.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "--p=foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "--p";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "--p=";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && *p_value == '\0');
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "--p";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp::q::", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+    }
+
+  /* Test processing of long options with optional arguments via -W.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-Wp=foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p::q::W;", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-Wp";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p::q::W;", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-Wp=";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "W;p::q::", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && *p_value == '\0');
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-W";
+      argv[argc++] = "p=";
+      argv[argc++] = "foo";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "W;p::q::", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && *p_value == '\0');
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 3);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-W";
+      argv[argc++] = "p";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "W;abp::q::", long_options_optional,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      /* ASSERT (p_value == NULL); */
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 4);
+    }
+
+  /* Check that invalid options are recognized.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "-x";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 'x');
+      ASSERT (optind == 5);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "-:";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == ':');
+      ASSERT (optind == 5);
+    }
+
+  /* Check that unexpected arguments are recognized.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "--a=";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 'a');
+      ASSERT (optind == 4);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "foo";
+      argv[argc++] = "--b=";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      /* When flag is non-zero, glibc sets optopt anyway, but BSD
+         leaves optopt unchanged.  */
+      ASSERT (unrecognized == 1 || unrecognized == 0);
+      ASSERT (optind == 4);
+    }
+
+  /* Check that by default, non-options arguments are moved to the end.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "-p") == 0);
+      ASSERT (strcmp (argv[2], "billy") == 0);
+      ASSERT (strcmp (argv[3], "-a") == 0);
+      ASSERT (strcmp (argv[4], "donald") == 0);
+      ASSERT (strcmp (argv[5], "duck") == 0);
+      ASSERT (strcmp (argv[6], "bar") == 0);
+      ASSERT (argv[7] == NULL);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 4);
+    }
+
+  /* Check that '--' ends the argument processing.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[20];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "--";
+      argv[argc++] = "-b";
+      argv[argc++] = "foo";
+      argv[argc++] = "-q";
+      argv[argc++] = "johnny";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "-p") == 0);
+      ASSERT (strcmp (argv[2], "billy") == 0);
+      ASSERT (strcmp (argv[3], "-a") == 0);
+      ASSERT (strcmp (argv[4], "--") == 0);
+      ASSERT (strcmp (argv[5], "donald") == 0);
+      ASSERT (strcmp (argv[6], "duck") == 0);
+      ASSERT (strcmp (argv[7], "-b") == 0);
+      ASSERT (strcmp (argv[8], "foo") == 0);
+      ASSERT (strcmp (argv[9], "-q") == 0);
+      ASSERT (strcmp (argv[10], "johnny") == 0);
+      ASSERT (strcmp (argv[11], "bar") == 0);
+      ASSERT (argv[12] == NULL);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 5);
+    }
+
+  /* Check that the '-' flag causes non-options to be returned in order.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "-abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "donald") == 0);
+      ASSERT (strcmp (argv[2], "-p") == 0);
+      ASSERT (strcmp (argv[3], "billy") == 0);
+      ASSERT (strcmp (argv[4], "duck") == 0);
+      ASSERT (strcmp (argv[5], "-a") == 0);
+      ASSERT (strcmp (argv[6], "bar") == 0);
+      ASSERT (argv[7] == NULL);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 3);
+      ASSERT (strcmp (non_options[0], "donald") == 0);
+      ASSERT (strcmp (non_options[1], "duck") == 0);
+      ASSERT (strcmp (non_options[2], "bar") == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 7);
+    }
+
+  /* Check that '--' ends the argument processing.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[20];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "--";
+      argv[argc++] = "-b";
+      argv[argc++] = "foo";
+      argv[argc++] = "-q";
+      argv[argc++] = "johnny";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "-abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "donald") == 0);
+      ASSERT (strcmp (argv[2], "-p") == 0);
+      ASSERT (strcmp (argv[3], "billy") == 0);
+      ASSERT (strcmp (argv[4], "duck") == 0);
+      ASSERT (strcmp (argv[5], "-a") == 0);
+      ASSERT (strcmp (argv[6], "--") == 0);
+      ASSERT (strcmp (argv[7], "-b") == 0);
+      ASSERT (strcmp (argv[8], "foo") == 0);
+      ASSERT (strcmp (argv[9], "-q") == 0);
+      ASSERT (strcmp (argv[10], "johnny") == 0);
+      ASSERT (strcmp (argv[11], "bar") == 0);
+      ASSERT (argv[12] == NULL);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+      ASSERT (q_value == NULL);
+      if (non_options_count == 2)
+      {
+        /* glibc behaviour.  */
+        ASSERT (non_options_count == 2);
+        ASSERT (strcmp (non_options[0], "donald") == 0);
+        ASSERT (strcmp (non_options[1], "duck") == 0);
+        ASSERT (unrecognized == 0);
+        ASSERT (optind == 7);
+      }
+      else
+      {
+        /* Another valid behaviour.  */
+        ASSERT (non_options_count == 7);
+        ASSERT (strcmp (non_options[0], "donald") == 0);
+        ASSERT (strcmp (non_options[1], "duck") == 0);
+        ASSERT (strcmp (non_options[2], "-b") == 0);
+        ASSERT (strcmp (non_options[3], "foo") == 0);
+        ASSERT (strcmp (non_options[4], "-q") == 0);
+        ASSERT (strcmp (non_options[5], "johnny") == 0);
+        ASSERT (strcmp (non_options[6], "bar") == 0);
+        ASSERT (unrecognized == 0);
+        ASSERT (optind == 12);
+      }
+    }
+
+  /* Check that the '-' flag has to come first.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:-", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "-p") == 0);
+      ASSERT (strcmp (argv[2], "billy") == 0);
+      ASSERT (strcmp (argv[3], "-a") == 0);
+      ASSERT (strcmp (argv[4], "donald") == 0);
+      ASSERT (strcmp (argv[5], "duck") == 0);
+      ASSERT (strcmp (argv[6], "bar") == 0);
+      ASSERT (argv[7] == NULL);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 4);
+    }
+
+  /* Check that the '+' flag causes the first non-option to terminate the
+     loop.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "+abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "donald") == 0);
+      ASSERT (strcmp (argv[2], "-p") == 0);
+      ASSERT (strcmp (argv[3], "billy") == 0);
+      ASSERT (strcmp (argv[4], "duck") == 0);
+      ASSERT (strcmp (argv[5], "-a") == 0);
+      ASSERT (strcmp (argv[6], "bar") == 0);
+      ASSERT (argv[7] == NULL);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 1);
+    }
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-+";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "+abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == '+');
+      ASSERT (optind == 2);
+    }
+
+  /* Check that '--' ends the argument processing.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[20];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "--";
+      argv[argc++] = "-b";
+      argv[argc++] = "foo";
+      argv[argc++] = "-q";
+      argv[argc++] = "johnny";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "+abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "donald") == 0);
+      ASSERT (strcmp (argv[2], "-p") == 0);
+      ASSERT (strcmp (argv[3], "billy") == 0);
+      ASSERT (strcmp (argv[4], "duck") == 0);
+      ASSERT (strcmp (argv[5], "-a") == 0);
+      ASSERT (strcmp (argv[6], "--") == 0);
+      ASSERT (strcmp (argv[7], "-b") == 0);
+      ASSERT (strcmp (argv[8], "foo") == 0);
+      ASSERT (strcmp (argv[9], "-q") == 0);
+      ASSERT (strcmp (argv[10], "johnny") == 0);
+      ASSERT (strcmp (argv[11], "bar") == 0);
+      ASSERT (argv[12] == NULL);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 1);
+    }
+
+  /* Check that the '+' flag has to come first.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:+", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "-p") == 0);
+      ASSERT (strcmp (argv[2], "billy") == 0);
+      ASSERT (strcmp (argv[3], "-a") == 0);
+      ASSERT (strcmp (argv[4], "donald") == 0);
+      ASSERT (strcmp (argv[5], "duck") == 0);
+      ASSERT (strcmp (argv[6], "bar") == 0);
+      ASSERT (argv[7] == NULL);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 4);
+    }
+}
+
+/* Test behavior of getopt_long when POSIXLY_CORRECT is set in the
+   environment.  Options with optional arguments should not change
+   behavior just because of an environment variable.
+   http://lists.gnu.org/archive/html/bug-m4/2006-09/msg00028.html  */
+static void
+test_getopt_long_posix (void)
+{
+  int start;
+
+  /* Check that POSIXLY_CORRECT stops parsing the same as leading '+'.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "donald";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc++] = "duck";
+      argv[argc++] = "-a";
+      argv[argc++] = "bar";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (strcmp (argv[0], "program") == 0);
+      ASSERT (strcmp (argv[1], "donald") == 0);
+      ASSERT (strcmp (argv[2], "-p") == 0);
+      ASSERT (strcmp (argv[3], "billy") == 0);
+      ASSERT (strcmp (argv[4], "duck") == 0);
+      ASSERT (strcmp (argv[5], "-a") == 0);
+      ASSERT (strcmp (argv[6], "bar") == 0);
+      ASSERT (argv[7] == NULL);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 1);
+    }
+
+  /* Check that POSIXLY_CORRECT doesn't change optional arguments.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-p";
+      argv[argc++] = "billy";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "p::", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 0);
+      ASSERT (b_seen == 0);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 2);
+    }
+
+  /* Check that leading - still sees options after non-options.  */
+  for (start = 0; start <= 1; start++)
+    {
+      const char *p_value = NULL;
+      const char *q_value = NULL;
+      int non_options_count = 0;
+      const char *non_options[10];
+      int unrecognized = 0;
+      int argc = 0;
+      const char *argv[10];
+      a_seen = 0;
+      b_seen = 0;
+
+      argv[argc++] = "program";
+      argv[argc++] = "-a";
+      argv[argc++] = "billy";
+      argv[argc++] = "-b";
+      argv[argc] = NULL;
+      optind = start;
+      getopt_long_loop (argc, argv, "-ab", long_options_required,
+                        &p_value, &q_value,
+                        &non_options_count, non_options, &unrecognized);
+      ASSERT (a_seen == 1);
+      ASSERT (b_seen == 1);
+      ASSERT (p_value == NULL);
+      ASSERT (q_value == NULL);
+      ASSERT (non_options_count == 1);
+      ASSERT (strcmp (non_options[0], "billy") == 0);
+      ASSERT (unrecognized == 0);
+      ASSERT (optind == 4);
+    }
+}
+
+/* Reduce casting, so we can use string literals elsewhere.
+   getopt_long_only takes an array of char*, but luckily does not
+   modify those elements, so we can pass const char*.  */
+static int
+do_getopt_long_only (int argc, const char **argv, const char *shortopts,
+                     const struct option *longopts, int *longind)
+{
+  return getopt_long_only (argc, (char **) argv, shortopts, longopts, longind);
+}
+
+static void
+test_getopt_long_only (void)
+{
+  /* Test disambiguation of options.  */
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-x";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+                             &option_index);
+    ASSERT (c == '?');
+    ASSERT (optopt == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-x";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+                             &option_index);
+    ASSERT (c == 'x');
+    ASSERT (optopt == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--x";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+                             &option_index);
+    ASSERT (c == '?');
+    ASSERT (optopt == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-b";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    b_seen = 0;
+    c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+                             &option_index);
+    ASSERT (c == 'b');
+    ASSERT (b_seen == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "--b";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    b_seen = 0;
+    c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+                             &option_index);
+    ASSERT (c == 0);
+    ASSERT (b_seen == 1);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-xt";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+                             &option_index);
+    ASSERT (c == '?');
+    ASSERT (optopt == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-xt";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+                             &option_index);
+    ASSERT (c == '?');
+    ASSERT (optopt == 0);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-xtra";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+                             &option_index);
+    ASSERT (c == 1001);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-xtreme";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long_only (argc, argv, "abx:", long_options_required,
+                             &option_index);
+    ASSERT (c == 1002);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-xtremel";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+                             &option_index);
+    /* glibc getopt_long_only is intentionally different from
+       getopt_long when handling a prefix that is common to two
+       spellings, when both spellings have the same option directives.
+       BSD getopt_long_only treats both cases the same.  */
+    ASSERT (c == 1003 || c == '?');
+    ASSERT (optind == 2);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-xtremel";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long_only (argc, argv, "abx::", long_options_required,
+                             &option_index);
+    /* glibc getopt_long_only is intentionally different from
+       getopt_long when handling a prefix that is common to two
+       spellings, when both spellings have the same option directives.
+       BSD getopt_long_only treats both cases the same.  */
+    ASSERT (c == 1003 || c == '?');
+    ASSERT (optind == 2);
+    ASSERT (optarg == NULL);
+  }
+  {
+    int argc = 0;
+    const char *argv[10];
+    int option_index;
+    int c;
+
+    argv[argc++] = "program";
+    argv[argc++] = "-xtras";
+    argv[argc] = NULL;
+    optind = 1;
+    opterr = 0;
+    c = do_getopt_long_only (argc, argv, "abx::", long_options_required,
+                             &option_index);
+    ASSERT (c == 'x');
+    ASSERT (strcmp (optarg, "tras") == 0);
+  }
+}
diff --git a/tests/test-gettimeofday.c b/tests/test-gettimeofday.c
new file mode 100644 (file)
index 0000000..7d09fc3
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+ * Written by Jim Meyering.
+ *
+ * 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/>.  */
+
+#include <config.h>
+
+#include <sys/time.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (gettimeofday, int,
+                 (struct timeval *, GETTIMEOFDAY_TIMEZONE *));
+
+#include <time.h>
+
+#include <stdio.h>
+#include <string.h>
+
+int
+main (void)
+{
+  time_t t = 0;
+  struct tm *lt;
+  struct tm saved_lt;
+  struct timeval tv;
+  lt = localtime (&t);
+  saved_lt = *lt;
+  gettimeofday (&tv, NULL);
+  if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0)
+    {
+      fprintf (stderr, "gettimeofday still clobbers the localtime buffer!\n");
+      return 1;
+    }
+  return 0;
+}
diff --git a/tests/test-hash.c b/tests/test-hash.c
new file mode 100644 (file)
index 0000000..108daef
--- /dev/null
@@ -0,0 +1,259 @@
+/*
+ * Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ * Written by Jim Meyering
+ *
+ * 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/>.  */
+
+#include <config.h>
+
+#include "hash.h"
+#include "hash-pjw.h"
+#include "inttostr.h"
+#include "xalloc.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#define STREQ(a, b) (strcmp (a, b) == 0)
+#define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
+
+static bool
+hash_compare_strings (void const *x, void const *y)
+{
+  ASSERT (x != y);
+  return STREQ (x, y) ? true : false;
+}
+
+static void
+hash_freer (void *x)
+{
+  free (x);
+}
+
+static void
+insert_new (Hash_table *ht, const void *ent)
+{
+  void *e = hash_insert (ht, ent);
+  ASSERT (e == ent);
+}
+
+static bool
+walk (void *ent, void *data)
+{
+  char *str = ent;
+  unsigned int *map = data;
+  switch (*str)
+    {
+    case 'a': *map |= 1; return true;
+    case 'b': *map |= 2; return true;
+    case 'c': *map |= 4; return true;
+    }
+  *map |= 8;
+  return false;
+}
+
+static int
+get_seed (char const *str, unsigned int *seed)
+{
+  size_t len = strlen (str);
+  if (len == 0 || strspn (str, "0123456789") != len || 10 < len)
+    return 1;
+
+  *seed = atoi (str);
+  return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+  unsigned int i;
+  unsigned int k;
+  unsigned int table_size[] = {1, 2, 3, 4, 5, 23, 53};
+  Hash_table *ht;
+  Hash_tuning tuning;
+
+  hash_reset_tuning (&tuning);
+  tuning.shrink_threshold = 0.3;
+  tuning.shrink_factor = 0.707;
+  tuning.growth_threshold = 1.5;
+  tuning.growth_factor = 2.0;
+  tuning.is_n_buckets = true;
+
+  if (1 < argc)
+    {
+      unsigned int seed;
+      if (get_seed (argv[1], &seed) != 0)
+        {
+          fprintf (stderr, "invalid seed: %s\n", argv[1]);
+          exit (EXIT_FAILURE);
+        }
+
+      srand (seed);
+    }
+
+  for (i = 0; i < ARRAY_CARDINALITY (table_size); i++)
+    {
+      size_t sz = table_size[i];
+      ht = hash_initialize (sz, NULL, hash_pjw, hash_compare_strings, NULL);
+      ASSERT (ht);
+      insert_new (ht, "a");
+      {
+        char *str1 = xstrdup ("a");
+        char *str2 = hash_insert (ht, str1);
+        ASSERT (str1 != str2);
+        ASSERT (STREQ (str1, str2));
+        free (str1);
+      }
+      insert_new (ht, "b");
+      insert_new (ht, "c");
+      i = 0;
+      ASSERT (hash_do_for_each (ht, walk, &i) == 3);
+      ASSERT (i == 7);
+      {
+        void *buf[5] = { NULL };
+        ASSERT (hash_get_entries (ht, NULL, 0) == 0);
+        ASSERT (hash_get_entries (ht, buf, 5) == 3);
+        ASSERT (STREQ (buf[0], "a") || STREQ (buf[0], "b") || STREQ (buf[0], "c"));
+      }
+      ASSERT (hash_delete (ht, "a"));
+      ASSERT (hash_delete (ht, "a") == NULL);
+      ASSERT (hash_delete (ht, "b"));
+      ASSERT (hash_delete (ht, "c"));
+
+      ASSERT (hash_rehash (ht, 47));
+      ASSERT (hash_rehash (ht, 467));
+
+      /* Free an empty table. */
+      hash_clear (ht);
+      hash_free (ht);
+
+      ht = hash_initialize (sz, NULL, hash_pjw, hash_compare_strings, NULL);
+      ASSERT (ht);
+
+      insert_new (ht, "z");
+      insert_new (ht, "y");
+      insert_new (ht, "x");
+      insert_new (ht, "w");
+      insert_new (ht, "v");
+      insert_new (ht, "u");
+
+      hash_clear (ht);
+      ASSERT (hash_get_n_entries (ht) == 0);
+      hash_free (ht);
+
+      /* Test pointer hashing.  */
+      ht = hash_initialize (sz, NULL, NULL, NULL, NULL);
+      ASSERT (ht);
+      {
+        char *str = xstrdup ("a");
+        insert_new (ht, "a");
+        insert_new (ht, str);
+        ASSERT (hash_lookup (ht, str) == str);
+        free (str);
+      }
+      hash_free (ht);
+    }
+
+  hash_reset_tuning (&tuning);
+  tuning.shrink_threshold = 0.3;
+  tuning.shrink_factor = 0.707;
+  tuning.growth_threshold = 1.5;
+  tuning.growth_factor = 2.0;
+  tuning.is_n_buckets = true;
+  /* Invalid tuning.  */
+  ht = hash_initialize (4651, &tuning, hash_pjw, hash_compare_strings,
+                        hash_freer);
+  ASSERT (!ht);
+
+  /* Alternate tuning.  */
+  tuning.growth_threshold = 0.89;
+
+  /* Run with default tuning, then with custom tuning settings.  */
+  for (k = 0; k < 2; k++)
+    {
+      Hash_tuning const *tune = (k == 0 ? NULL : &tuning);
+      /* Now, each entry is malloc'd.  */
+      ht = hash_initialize (4651, tune, hash_pjw,
+                            hash_compare_strings, hash_freer);
+      ASSERT (ht);
+      for (i = 0; i < 10000; i++)
+        {
+          unsigned int op = rand () % 10;
+          switch (op)
+            {
+            case 0:
+            case 1:
+            case 2:
+            case 3:
+            case 4:
+            case 5:
+              {
+                char buf[50];
+                char const *p = uinttostr (i, buf);
+                insert_new (ht, xstrdup (p));
+              }
+              break;
+
+            case 6:
+              {
+                size_t n = hash_get_n_entries (ht);
+                ASSERT (hash_rehash (ht, n + rand () % 20));
+              }
+              break;
+
+            case 7:
+              {
+                size_t n = hash_get_n_entries (ht);
+                size_t delta = rand () % 20;
+                if (delta < n)
+                  ASSERT (hash_rehash (ht, n - delta));
+              }
+              break;
+
+            case 8:
+            case 9:
+              {
+                /* Delete a random entry.  */
+                size_t n = hash_get_n_entries (ht);
+                if (n)
+                  {
+                    size_t kk = rand () % n;
+                    void const *p;
+                    void *v;
+                    for (p = hash_get_first (ht); kk;
+                         --kk, p = hash_get_next (ht, p))
+                      {
+                        /* empty */
+                      }
+                    ASSERT (p);
+                    v = hash_delete (ht, p);
+                    ASSERT (v);
+                    free (v);
+                  }
+                break;
+              }
+            }
+          ASSERT (hash_table_ok (ht));
+        }
+
+      hash_free (ht);
+    }
+
+  return 0;
+}
diff --git a/tests/test-i-ring.c b/tests/test-i-ring.c
new file mode 100644 (file)
index 0000000..94f642b
--- /dev/null
@@ -0,0 +1,63 @@
+/* Test the simple ring buffer.
+   Copyright (C) 2006-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 Jim Meyering */
+
+#include <config.h>
+
+#include "i-ring.h"
+
+#include "macros.h"
+
+int
+main (void)
+{
+  int o;
+  I_ring ir;
+  i_ring_init (&ir, -1);
+  o = i_ring_push (&ir, 1);
+  ASSERT (o == -1);
+  o = i_ring_push (&ir, 2);
+  ASSERT (o == -1);
+  o = i_ring_push (&ir, 3);
+  ASSERT (o == -1);
+  o = i_ring_push (&ir, 4);
+  ASSERT (o == -1);
+  o = i_ring_push (&ir, 5);
+  ASSERT (o == 1);
+  o = i_ring_push (&ir, 6);
+  ASSERT (o == 2);
+  o = i_ring_push (&ir, 7);
+  ASSERT (o == 3);
+
+  o = i_ring_pop (&ir);
+  ASSERT (o == 7);
+  o = i_ring_pop (&ir);
+  ASSERT (o == 6);
+  o = i_ring_pop (&ir);
+  ASSERT (o == 5);
+  o = i_ring_pop (&ir);
+  ASSERT (o == 4);
+  ASSERT (i_ring_empty (&ir));
+
+  o = i_ring_push (&ir, 8);
+  ASSERT (o == -1);
+  o = i_ring_pop (&ir);
+  ASSERT (o == 8);
+  ASSERT (i_ring_empty (&ir));
+
+  return 0;
+}
diff --git a/tests/test-ignore-value.c b/tests/test-ignore-value.c
new file mode 100644 (file)
index 0000000..6953f4c
--- /dev/null
@@ -0,0 +1,84 @@
+/* Test the "ignore-value" module.
+
+   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 Eric Blake.  */
+
+#include <config.h>
+
+#include "ignore-value.h"
+
+#include <stdio.h>
+
+#ifndef _GL_ATTRIBUTE_RETURN_CHECK
+# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
+#  define _GL_ATTRIBUTE_RETURN_CHECK
+# else
+#  define _GL_ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__))
+# endif
+#endif
+
+struct s { int i; };
+static char doChar (void) _GL_ATTRIBUTE_RETURN_CHECK;
+static int doInt (void) _GL_ATTRIBUTE_RETURN_CHECK;
+static off_t doOff (void) _GL_ATTRIBUTE_RETURN_CHECK;
+static void *doPtr (void) _GL_ATTRIBUTE_RETURN_CHECK;
+static struct s doStruct (void) _GL_ATTRIBUTE_RETURN_CHECK;
+
+static char
+doChar (void)
+{
+  return 0;
+}
+
+static int
+doInt (void)
+{
+  return 0;
+}
+
+static off_t
+doOff (void)
+{
+  return 0;
+}
+
+static void *
+doPtr (void)
+{
+  return NULL;
+}
+
+static struct s
+doStruct (void)
+{
+  static struct s s1;
+  return s1;
+}
+
+int
+main (void)
+{
+  /* If this test can compile with -Werror and the same warnings as
+     the rest of the project, then we are properly silencing warnings
+     about ignored return values.  */
+  ignore_value (doChar ());
+  ignore_value (doInt ());
+  ignore_value (doOff ());
+  ignore_value (doPtr ());
+  ignore_value (doStruct ());
+  return 0;
+}
diff --git a/tests/test-inttostr.c b/tests/test-inttostr.c
new file mode 100644 (file)
index 0000000..9bed25e
--- /dev/null
@@ -0,0 +1,88 @@
+/* Test inttostr functions, and incidentally, INT_BUFSIZE_BOUND
+   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/>.  */
+
+/* Written by Jim Meyering.  */
+
+#include <config.h>
+
+#include "inttostr.h"
+#include "intprops.h"
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+#define STREQ(a, b) (strcmp (a, b) == 0)
+#define FMT(T) (TYPE_SIGNED (T) ? "%jd" : "%ju")
+#define CAST_VAL(T,V) (TYPE_SIGNED (T) ? (intmax_t) (V) : (uintmax_t) (V))
+#define V_min(T) (CAST_VAL (T, TYPE_MINIMUM (T)))
+#define V_max(T) (CAST_VAL (T, TYPE_MAXIMUM (T)))
+#define IS_TIGHT(T) (signed_type_or_expr__(T) == TYPE_SIGNED (T))
+#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
+
+/* Verify that an inttostr function works as advertised.
+   Convert maximum and minimum (per-type, T) values using both snprintf --
+   with a cast to intmax_t or uintmax_t -- and FN, and compare the
+   resulting strings.  Use malloc for the inttostr buffer, so that if
+   we ever exceed the usually-tight INT_BUFSIZE_BOUND, tools like
+   valgrind will detect the failure. */
+#define CK(T, Fn)                                                       \
+  do                                                                    \
+    {                                                                   \
+      char ref[100];                                                    \
+      char *buf = malloc (INT_BUFSIZE_BOUND (T));                       \
+      char const *p;                                                    \
+      ASSERT (buf);                                                     \
+      *buf = '\0';                                                      \
+      ASSERT (snprintf (ref, sizeof ref, FMT (T), V_min (T)) < sizeof ref); \
+      ASSERT (STREQ ((p = Fn (TYPE_MINIMUM (T), buf)), ref));           \
+      /* Ensure that INT_BUFSIZE_BOUND is tight for signed types.  */   \
+      ASSERT (! TYPE_SIGNED (T) || (p == buf && *p == '-'));            \
+      ASSERT (snprintf (ref, sizeof ref, FMT (T), V_max (T)) < sizeof ref); \
+      ASSERT (STREQ ((p = Fn (TYPE_MAXIMUM (T), buf)), ref));           \
+      /* For unsigned types, the bound is not always tight.  */         \
+      ASSERT (! IS_TIGHT (T) || TYPE_SIGNED (T)                         \
+              || (p == buf && ISDIGIT (*p)));                           \
+      free (buf);                                                       \
+    }                                                                   \
+  while (0)
+
+int
+main (void)
+{
+  size_t b_size = 2;
+  char *b = malloc (b_size);
+  ASSERT (b);
+
+  /* Ideally we would rely on the snprintf-posix module, in which case
+     this guard would not be required, but due to limitations in gnulib's
+     implementation (see modules/snprintf-posix), we cannot.  */
+  if (snprintf (b, b_size, "%ju", (uintmax_t) 3) == 1
+      && b[0] == '3' && b[1] == '\0')
+    {
+      CK (int,          inttostr);
+      CK (unsigned int, uinttostr);
+      CK (off_t,        offtostr);
+      CK (uintmax_t,    umaxtostr);
+      CK (intmax_t,     imaxtostr);
+      return 0;
+    }
+
+  /* snprintf doesn't accept %ju; skip this test.  */
+  return 77;
+}
diff --git a/tests/test-inttypes.c b/tests/test-inttypes.c
new file mode 100644 (file)
index 0000000..5bf952c
--- /dev/null
@@ -0,0 +1,121 @@
+/* Test of <inttypes.h> substitute.
+   Copyright (C) 2006-2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#include <inttypes.h>
+
+#include <stddef.h>
+
+/* Tests for macros supposed to be defined in inttypes.h.  */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+  PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+  PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+  PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+  PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+  PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+  PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+  PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+  PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+  PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+  PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+  PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+  PRIdLEAST64 PRIiLEAST64
+  PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+  PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+  PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+  PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+  PRIdFAST64 PRIiFAST64
+  PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+  PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+  PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+  PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+  ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+  SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+  SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+  SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+  SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+  SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+  SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+  SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+  SCNo64 SCNu64 SCNx64
+#endif
+  SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+  SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+  SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+  SCNdLEAST64 SCNiLEAST64
+  SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+  SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+  SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+  SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+  SCNdFAST64 SCNiFAST64
+  SCNoFAST64 SCNuFAST64 SCNxFAST64
+  SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+  SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+  SCNoPTR SCNuPTR SCNxPTR
+#endif
+  ;
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-isblank.c b/tests/test-isblank.c
new file mode 100644 (file)
index 0000000..229d8d6
--- /dev/null
@@ -0,0 +1,50 @@
+/* Test of isblank() function.
+   Copyright (C) 2009-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 Bruno Haible <bruno@clisp.org>, 2009.  */
+
+#include <config.h>
+
+#include <ctype.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (isblank, int, (int));
+
+#include <limits.h>
+#include <stdio.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  unsigned int c;
+
+  /* Verify the property in the "C" locale.
+     POSIX specifies in
+       <http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html>
+     that
+       - in all locales, the blank characters include the <space> and <tab>
+         characters,
+       - in the "POSIX" locale (which is usually the same as the "C" locale),
+         the blank characters include only the ASCII <space> and <tab>
+         characters.  */
+  for (c = 0; c <= UCHAR_MAX; c++)
+    ASSERT (!isblank (c) == !(c == ' ' || c == '\t'));
+  ASSERT (!isblank (EOF));
+
+  return 0;
+}
diff --git a/tests/test-iswblank.c b/tests/test-iswblank.c
new file mode 100644 (file)
index 0000000..5ed4f89
--- /dev/null
@@ -0,0 +1,35 @@
+/* Test of iswblank() function.
+   Copyright (C) 2007-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/>.  */
+
+#include <config.h>
+
+#include <wctype.h>
+
+#include "macros.h"
+
+/* Check that WEOF is defined.  */
+wint_t e = WEOF;
+
+int
+main (void)
+{
+  /* Check that the function exist as a function or as a macro.  */
+  (void) iswblank (0);
+  /* Check that the isw* functions map WEOF to 0.  */
+  ASSERT (!iswblank (e));
+
+  return 0;
+}
diff --git a/tests/test-langinfo.c b/tests/test-langinfo.c
new file mode 100644 (file)
index 0000000..ade807c
--- /dev/null
@@ -0,0 +1,92 @@
+/* Test of <langinfo.h> substitute.
+   Copyright (C) 2009-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 Bruno Haible <bruno@clisp.org>, 2009.  */
+
+#include <config.h>
+
+#include <langinfo.h>
+
+/* Check that all the nl_item values are defined.  */
+int items[] =
+  {
+    /* nl_langinfo items of the LC_CTYPE category */
+    CODESET,
+    /* nl_langinfo items of the LC_NUMERIC category */
+    RADIXCHAR,
+    THOUSEP,
+    /* nl_langinfo items of the LC_TIME category */
+    D_T_FMT,
+    D_FMT,
+    T_FMT,
+    T_FMT_AMPM,
+    AM_STR,
+    PM_STR,
+    DAY_1,
+    DAY_2,
+    DAY_3,
+    DAY_4,
+    DAY_5,
+    DAY_6,
+    DAY_7,
+    ABDAY_1,
+    ABDAY_2,
+    ABDAY_3,
+    ABDAY_4,
+    ABDAY_5,
+    ABDAY_6,
+    ABDAY_7,
+    MON_1,
+    MON_2,
+    MON_3,
+    MON_4,
+    MON_5,
+    MON_6,
+    MON_7,
+    MON_8,
+    MON_9,
+    MON_10,
+    MON_11,
+    MON_12,
+    ABMON_1,
+    ABMON_2,
+    ABMON_3,
+    ABMON_4,
+    ABMON_5,
+    ABMON_6,
+    ABMON_7,
+    ABMON_8,
+    ABMON_9,
+    ABMON_10,
+    ABMON_11,
+    ABMON_12,
+    ERA,
+    ERA_D_FMT,
+    ERA_D_T_FMT,
+    ERA_T_FMT,
+    ALT_DIGITS,
+    /* nl_langinfo items of the LC_MONETARY category */
+    CRNCYSTR,
+    /* nl_langinfo items of the LC_MESSAGES category */
+    YESEXPR,
+    NOEXPR
+  };
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-lchown.c b/tests/test-lchown.c
new file mode 100644 (file)
index 0000000..f39fa10
--- /dev/null
@@ -0,0 +1,49 @@
+/* Tests of lchown.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (lchown, int, (char const *, uid_t, gid_t));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "mgetgroups.h"
+#include "stat-time.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-lchown.t"
+
+#include "test-lchown.h"
+
+int
+main (void)
+{
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  return test_lchown (lchown, true);
+}
diff --git a/tests/test-lchown.h b/tests/test-lchown.h
new file mode 100644 (file)
index 0000000..aa10674
--- /dev/null
@@ -0,0 +1,260 @@
+/* Tests of lchown.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include "nap.h"
+
+#if !HAVE_GETEGID
+# define getegid() ((gid_t) -1)
+#endif
+
+#ifndef HAVE_LCHMOD
+# define HAVE_LCHMOD 0
+#endif
+
+#ifndef CHOWN_CHANGE_TIME_BUG
+# define CHOWN_CHANGE_TIME_BUG 0
+#endif
+
+/* This file is designed to test lchown(n,o,g) and
+   chownat(AT_FDCWD,n,o,g,AT_SYMLINK_NOFOLLOW).  FUNC is the function
+   to test.  Assumes that BASE and ASSERT are already defined, and
+   that appropriate headers are already included.  If PRINT, warn
+   before skipping symlink tests with status 77.  */
+
+static int
+test_lchown (int (*func) (char const *, uid_t, gid_t), bool print)
+{
+  struct stat st1;
+  struct stat st2;
+  gid_t *gids = NULL;
+  int gids_count;
+  int result;
+
+  /* Solaris 8 is interesting - if the current process belongs to
+     multiple groups, the current directory is owned by a a group that
+     the current process belongs to but different than getegid(), and
+     the current directory does not have the S_ISGID bit, then regular
+     files created in the directory belong to the directory's group,
+     but symlinks belong to the current effective group id.  If
+     S_ISGID is set, then both files and symlinks belong to the
+     directory's group.  However, it is possible to run the testsuite
+     from within a directory owned by a group we don't belong to, in
+     which case all things that we create belong to the current
+     effective gid.  So, work around the issues by creating a
+     subdirectory (we are guaranteed that the subdirectory will be
+     owned by one of our current groups), change ownership of that
+     directory to the current effective gid (which will thus succeed),
+     then create all other files within that directory (eliminating
+     questions on whether inheritance or current id triumphs, since
+     the two methods resolve to the same gid).  */
+  ASSERT (mkdir (BASE "dir", 0700) == 0);
+  ASSERT (stat (BASE "dir", &st1) == 0);
+
+  /* Filter out mingw, which has no concept of groups.  */
+  result = func (BASE "dir", st1.st_uid, getegid ());
+  if (result == -1 && errno == ENOSYS)
+    {
+      ASSERT (rmdir (BASE "dir") == 0);
+      if (print)
+        fputs ("skipping test: no support for ownership\n", stderr);
+      return 77;
+    }
+  ASSERT (result == 0);
+
+  ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
+  ASSERT (stat (BASE "dir/file", &st1) == 0);
+  ASSERT (st1.st_uid != (uid_t) -1);
+  ASSERT (st1.st_gid != (gid_t) -1);
+  ASSERT (st1.st_gid == getegid ());
+
+  /* Sanity check of error cases.  */
+  errno = 0;
+  ASSERT (func ("", -1, -1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("no_such", -1, -1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("no_such/", -1, -1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (BASE "dir/file/", -1, -1) == -1);
+  ASSERT (errno == ENOTDIR);
+
+  /* Check that -1 does not alter ownership.  */
+  ASSERT (func (BASE "dir/file", -1, st1.st_gid) == 0);
+  ASSERT (func (BASE "dir/file", st1.st_uid, -1) == 0);
+  ASSERT (func (BASE "dir/file", (uid_t) -1, (gid_t) -1) == 0);
+  ASSERT (stat (BASE "dir/file", &st2) == 0);
+  ASSERT (st1.st_uid == st2.st_uid);
+  ASSERT (st1.st_gid == st2.st_gid);
+
+  /* Even if the values aren't changing, ctime is required to change
+     if at least one argument is not -1.  */
+  nap ();
+  ASSERT (func (BASE "dir/file", st1.st_uid, st1.st_gid) == 0);
+  ASSERT (stat (BASE "dir/file", &st2) == 0);
+  ASSERT (st1.st_ctime < st2.st_ctime
+          || (st1.st_ctime == st2.st_ctime
+              && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2)));
+
+  /* Test symlink behavior.  */
+  if (symlink ("link", BASE "dir/link2"))
+    {
+      ASSERT (unlink (BASE "dir/file") == 0);
+      ASSERT (rmdir (BASE "dir") == 0);
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+  result = func (BASE "dir/link2", -1, -1);
+  if (result == -1 && errno == ENOSYS)
+    {
+      ASSERT (unlink (BASE "dir/file") == 0);
+      ASSERT (unlink (BASE "dir/link2") == 0);
+      ASSERT (rmdir (BASE "dir") == 0);
+      if (print)
+        fputs ("skipping test: symlink ownership not supported\n", stderr);
+      return 77;
+    }
+  ASSERT (result == 0);
+  errno = 0;
+  ASSERT (func (BASE "dir/link2/", st1.st_uid, st1.st_gid) == -1);
+  ASSERT (errno == ENOENT);
+  ASSERT (symlink ("file", BASE "dir/link") == 0);
+  ASSERT (mkdir (BASE "dir/sub", 0700) == 0);
+  ASSERT (symlink ("sub", BASE "dir/link3") == 0);
+
+  /* For non-privileged users, lchown can only portably succeed at
+     changing group ownership of a file we own.  If we belong to at
+     least two groups, then verifying the correct change is simple.
+     But if we belong to only one group, then we fall back on the
+     other observable effect of lchown: the ctime must be updated.  */
+  gids_count = mgetgroups (NULL, st1.st_gid, &gids);
+  if (1 < gids_count)
+    {
+      ASSERT (gids[1] != st1.st_gid);
+      ASSERT (gids[1] != (gid_t) -1);
+      ASSERT (lstat (BASE "dir/link", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/link2", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+
+      errno = 0;
+      ASSERT (func (BASE "dir/link2/", -1, gids[1]) == -1);
+      ASSERT (errno == ENOTDIR);
+      ASSERT (stat (BASE "dir/file", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/link", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/link2", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+
+      ASSERT (func (BASE "dir/link2", -1, gids[1]) == 0);
+      ASSERT (stat (BASE "dir/file", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/link", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/link2", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (gids[1] == st2.st_gid);
+
+      /* Trailing slash follows through to directory.  */
+      ASSERT (lstat (BASE "dir/link3", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/sub", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+
+      ASSERT (func (BASE "dir/link3/", -1, gids[1]) == 0);
+      ASSERT (lstat (BASE "dir/link3", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (st1.st_gid == st2.st_gid);
+      ASSERT (lstat (BASE "dir/sub", &st2) == 0);
+      ASSERT (st1.st_uid == st2.st_uid);
+      ASSERT (gids[1] == st2.st_gid);
+    }
+  else if (!CHOWN_CHANGE_TIME_BUG || HAVE_LCHMOD)
+    {
+      /* If we don't have lchmod, and lchown fails to change ctime,
+         then we can't test this part of lchown.  */
+      struct stat l1;
+      struct stat l2;
+      ASSERT (stat (BASE "dir/file", &st1) == 0);
+      ASSERT (lstat (BASE "dir/link", &l1) == 0);
+      ASSERT (lstat (BASE "dir/link2", &l2) == 0);
+
+      nap ();
+      errno = 0;
+      ASSERT (func (BASE "dir/link2/", -1, st1.st_gid) == -1);
+      ASSERT (errno == ENOTDIR);
+      ASSERT (stat (BASE "dir/file", &st2) == 0);
+      ASSERT (st1.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&st1) == get_stat_ctime_ns (&st2));
+      ASSERT (lstat (BASE "dir/link", &st2) == 0);
+      ASSERT (l1.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&l1) == get_stat_ctime_ns (&st2));
+      ASSERT (lstat (BASE "dir/link2", &st2) == 0);
+      ASSERT (l2.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&l2) == get_stat_ctime_ns (&st2));
+
+      ASSERT (func (BASE "dir/link2", -1, st1.st_gid) == 0);
+      ASSERT (stat (BASE "dir/file", &st2) == 0);
+      ASSERT (st1.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&st1) == get_stat_ctime_ns (&st2));
+      ASSERT (lstat (BASE "dir/link", &st2) == 0);
+      ASSERT (l1.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&l1) == get_stat_ctime_ns (&st2));
+      ASSERT (lstat (BASE "dir/link2", &st2) == 0);
+      ASSERT (l2.st_ctime < st2.st_ctime
+              || (l2.st_ctime == st2.st_ctime
+                  && get_stat_ctime_ns (&l2) < get_stat_ctime_ns (&st2)));
+
+      /* Trailing slash follows through to directory.  */
+      ASSERT (lstat (BASE "dir/sub", &st1) == 0);
+      ASSERT (lstat (BASE "dir/link3", &l1) == 0);
+      nap ();
+      ASSERT (func (BASE "dir/link3/", -1, st1.st_gid) == 0);
+      ASSERT (lstat (BASE "dir/link3", &st2) == 0);
+      ASSERT (l1.st_ctime == st2.st_ctime);
+      ASSERT (get_stat_ctime_ns (&l1) == get_stat_ctime_ns (&st2));
+      ASSERT (lstat (BASE "dir/sub", &st2) == 0);
+      ASSERT (st1.st_ctime < st2.st_ctime
+              || (st1.st_ctime == st2.st_ctime
+                  && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2)));
+    }
+
+  /* Cleanup.  */
+  free (gids);
+  ASSERT (unlink (BASE "dir/file") == 0);
+  ASSERT (unlink (BASE "dir/link") == 0);
+  ASSERT (unlink (BASE "dir/link2") == 0);
+  ASSERT (unlink (BASE "dir/link3") == 0);
+  ASSERT (rmdir (BASE "dir/sub") == 0);
+  ASSERT (rmdir (BASE "dir") == 0);
+  return 0;
+}
diff --git a/tests/test-locale.c b/tests/test-locale.c
new file mode 100644 (file)
index 0000000..9b55e37
--- /dev/null
@@ -0,0 +1,49 @@
+/* Test of <locale.h> substitute.
+   Copyright (C) 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <locale.h>
+
+#include "verify.h"
+
+int a[] =
+  {
+    LC_ALL,
+    LC_COLLATE,
+    LC_CTYPE,
+    LC_MESSAGES,
+    LC_MONETARY,
+    LC_NUMERIC,
+    LC_TIME
+  };
+
+#if HAVE_NEWLOCALE
+/* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined.  */
+locale_t b = LC_GLOBAL_LOCALE;
+#endif
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main ()
+{
+  return 0;
+}
diff --git a/tests/test-localename.c b/tests/test-localename.c
new file mode 100644 (file)
index 0000000..09f002c
--- /dev/null
@@ -0,0 +1,747 @@
+/* Test of gl_locale_name function and its variants.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "localename.h"
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+
+#if HAVE_NEWLOCALE
+
+static struct { int cat; int mask; const char *string; } const categories[] =
+  {
+      { LC_CTYPE,          LC_CTYPE_MASK,          "LC_CTYPE" },
+      { LC_NUMERIC,        LC_NUMERIC_MASK,        "LC_NUMERIC" },
+      { LC_TIME,           LC_TIME_MASK,           "LC_TIME" },
+      { LC_COLLATE,        LC_COLLATE_MASK,        "LC_COLLATE" },
+      { LC_MONETARY,       LC_MONETARY_MASK,       "LC_MONETARY" },
+      { LC_MESSAGES,       LC_MESSAGES_MASK,       "LC_MESSAGES" }
+# ifdef LC_PAPER
+    , { LC_PAPER,          LC_PAPER_MASK,          "LC_PAPER" }
+# endif
+# ifdef LC_NAME
+    , { LC_NAME,           LC_NAME_MASK,           "LC_NAME" }
+# endif
+# ifdef LC_ADDRESS
+    , { LC_ADDRESS,        LC_ADDRESS_MASK,        "LC_ADDRESS" }
+# endif
+# ifdef LC_TELEPHONE
+    , { LC_TELEPHONE,      LC_TELEPHONE_MASK,      "LC_TELEPHONE" }
+# endif
+# ifdef LC_MEASUREMENT
+    , { LC_MEASUREMENT,    LC_MEASUREMENT_MASK,    "LC_MEASUREMENT" }
+# endif
+# ifdef LC_IDENTIFICATION
+    , { LC_IDENTIFICATION, LC_IDENTIFICATION_MASK, "LC_IDENTIFICATION" }
+# endif
+  };
+
+#endif
+
+/* Test the gl_locale_name() function.  */
+static void
+test_locale_name (void)
+{
+  const char *name;
+
+  /* Check that gl_locale_name returns non-NULL.  */
+  ASSERT (gl_locale_name (LC_MESSAGES, "LC_MESSAGES") != NULL);
+
+  /* Get into a defined state,  */
+  setlocale (LC_ALL, "en_US.UTF-8");
+#if HAVE_NEWLOCALE
+  uselocale (LC_GLOBAL_LOCALE);
+#endif
+
+  /* Check that when all environment variables are unset,
+     gl_locale_name returns the default locale.  */
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LC_NUMERIC");
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
+                  gl_locale_name_default ()) == 0);
+  ASSERT (strcmp (gl_locale_name (LC_NUMERIC, "LC_NUMERIC"),
+                  gl_locale_name_default ()) == 0);
+
+  /* Check that an empty environment variable is treated like an unset
+     environment variable.  */
+
+  setenv ("LC_ALL", "", 1);
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
+                  gl_locale_name_default ()) == 0);
+
+  unsetenv ("LC_ALL");
+  setenv ("LC_CTYPE", "", 1);
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
+                  gl_locale_name_default ()) == 0);
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  setenv ("LC_MESSAGES", "", 1);
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
+                  gl_locale_name_default ()) == 0);
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  setenv ("LANG", "", 1);
+  setlocale (LC_ALL, "");
+  ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
+                  gl_locale_name_default ()) == 0);
+
+  /* Check that LC_ALL overrides the others, and LANG is overridden by the
+     others.  */
+
+  setenv ("LC_ALL", "C", 1);
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
+
+  unsetenv ("LC_ALL");
+  setenv ("LC_CTYPE", "C", 1);
+  setenv ("LC_MESSAGES", "C", 1);
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  setenv ("LANG", "C", 1);
+  setlocale (LC_ALL, "");
+  ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
+
+  /* Check mixed situations.  */
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+  setenv ("LANG", "de_DE.UTF-8", 1);
+  if (setlocale (LC_ALL, "") != NULL)
+    {
+      name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
+      ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+      name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
+      ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+    }
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+  unsetenv ("LANG");
+  if (setlocale (LC_ALL, "") != NULL)
+    {
+      name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
+      ASSERT (strcmp (name, gl_locale_name_default ()) == 0);
+      name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
+      ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+    }
+
+#if HAVE_NEWLOCALE
+  /* Check that gl_locale_name considers the thread locale.  */
+  {
+    locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+    if (locale != NULL)
+      {
+        uselocale (locale);
+        name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
+        ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+        name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
+        ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+      }
+  }
+
+  /* Check that gl_locale_name distinguishes different categories of the
+     thread locale, and that the name is the right one for each.  */
+  {
+    unsigned int i;
+
+    for (i = 0; i < SIZEOF (categories); i++)
+      {
+        int category_mask = categories[i].mask;
+        locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+        if (locale != NULL)
+          {
+            locale = newlocale (category_mask, "de_DE.UTF-8", locale);
+            if (locale != NULL)
+              {
+                unsigned int j;
+
+                uselocale (locale);
+                for (j = 0; j < SIZEOF (categories); j++)
+                  {
+                    const char *name_j =
+                      gl_locale_name (categories[j].cat, categories[j].string);
+                    if (j == i)
+                      ASSERT (strcmp (name_j, "de_DE.UTF-8") == 0);
+                    else
+                      ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0);
+                  }
+              }
+          }
+      }
+  }
+#endif
+}
+
+/* Test the gl_locale_name_thread() function.  */
+static void
+test_locale_name_thread (void)
+{
+  /* Get into a defined state,  */
+  setlocale (LC_ALL, "en_US.UTF-8");
+
+#if HAVE_NEWLOCALE
+  /* Check that gl_locale_name_thread returns NULL when no thread locale is
+     set.  */
+  uselocale (LC_GLOBAL_LOCALE);
+  ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL);
+  ASSERT (gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+  /* Check that gl_locale_name_thread considers the thread locale.  */
+  {
+    locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+    if (locale != NULL)
+      {
+        const char *name;
+
+        uselocale (locale);
+        name = gl_locale_name_thread (LC_CTYPE, "LC_CTYPE");
+        ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+        name = gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES");
+        ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+      }
+  }
+
+  /* Check that gl_locale_name_thread distinguishes different categories of the
+     thread locale, and that the name is the right one for each.  */
+  {
+    unsigned int i;
+
+    for (i = 0; i < SIZEOF (categories); i++)
+      {
+        int category_mask = categories[i].mask;
+        locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+        if (locale != NULL)
+          {
+            locale = newlocale (category_mask, "de_DE.UTF-8", locale);
+            if (locale != NULL)
+              {
+                unsigned int j;
+
+                uselocale (locale);
+                for (j = 0; j < SIZEOF (categories); j++)
+                  {
+                    const char *name_j =
+                      gl_locale_name_thread (categories[j].cat,
+                                             categories[j].string);
+                    if (j == i)
+                      ASSERT (strcmp (name_j, "de_DE.UTF-8") == 0);
+                    else
+                      ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0);
+                  }
+              }
+          }
+      }
+  }
+
+  /* Check that gl_locale_name_thread returns a string that is allocated with
+     indefinite extent.  */
+  {
+    /* Try many locale names in turn, in order to defeat possible caches.  */
+    static const char * const choices[] =
+      {
+        "C",
+        "POSIX",
+        "af_ZA",
+        "af_ZA.UTF-8",
+        "am_ET",
+        "am_ET.UTF-8",
+        "be_BY",
+        "be_BY.UTF-8",
+        "bg_BG",
+        "bg_BG.UTF-8",
+        "ca_ES",
+        "ca_ES.UTF-8",
+        "cs_CZ",
+        "cs_CZ.UTF-8",
+        "da_DK",
+        "da_DK.UTF-8",
+        "de_AT",
+        "de_AT.UTF-8",
+        "de_CH",
+        "de_CH.UTF-8",
+        "de_DE",
+        "de_DE.UTF-8",
+        "el_GR",
+        "el_GR.UTF-8",
+        "en_AU",
+        "en_AU.UTF-8",
+        "en_CA",
+        "en_CA.UTF-8",
+        "en_GB",
+        "en_GB.UTF-8",
+        "en_IE",
+        "en_IE.UTF-8",
+        "en_NZ",
+        "en_NZ.UTF-8",
+        "en_US",
+        "en_US.UTF-8",
+        "es_ES",
+        "es_ES.UTF-8",
+        "et_EE",
+        "et_EE.UTF-8",
+        "eu_ES",
+        "eu_ES.UTF-8",
+        "fi_FI",
+        "fi_FI.UTF-8",
+        "fr_BE",
+        "fr_BE.UTF-8",
+        "fr_CA",
+        "fr_CA.UTF-8",
+        "fr_CH",
+        "fr_CH.UTF-8",
+        "fr_FR",
+        "fr_FR.UTF-8",
+        "he_IL",
+        "he_IL.UTF-8",
+        "hr_HR",
+        "hr_HR.UTF-8",
+        "hu_HU",
+        "hu_HU.UTF-8",
+        "hy_AM",
+        "is_IS",
+        "is_IS.UTF-8",
+        "it_CH",
+        "it_CH.UTF-8",
+        "it_IT",
+        "it_IT.UTF-8",
+        "ja_JP.UTF-8",
+        "kk_KZ",
+        "kk_KZ.UTF-8",
+        "ko_KR.UTF-8",
+        "lt_LT",
+        "lt_LT.UTF-8",
+        "nl_BE",
+        "nl_BE.UTF-8",
+        "nl_NL",
+        "nl_NL.UTF-8",
+        "no_NO",
+        "no_NO.UTF-8",
+        "pl_PL",
+        "pl_PL.UTF-8",
+        "pt_BR",
+        "pt_BR.UTF-8",
+        "pt_PT",
+        "pt_PT.UTF-8",
+        "ro_RO",
+        "ro_RO.UTF-8",
+        "ru_RU",
+        "ru_RU.UTF-8",
+        "sk_SK",
+        "sk_SK.UTF-8",
+        "sl_SI",
+        "sl_SI.UTF-8",
+        "sv_SE",
+        "sv_SE.UTF-8",
+        "tr_TR",
+        "tr_TR.UTF-8",
+        "uk_UA",
+        "uk_UA.UTF-8",
+        "zh_CN",
+        "zh_CN.UTF-8",
+        "zh_HK",
+        "zh_HK.UTF-8",
+        "zh_TW",
+        "zh_TW.UTF-8"
+      };
+    /* Remember which locales are available.  */
+    unsigned char /* bool */ available[SIZEOF (choices)];
+    /* Array of remembered results of gl_locale_name_thread.  */
+    const char *unsaved_names[SIZEOF (choices)][SIZEOF (categories)];
+    /* Array of remembered results of gl_locale_name_thread, stored in safe
+       memory.  */
+    char *saved_names[SIZEOF (choices)][SIZEOF (categories)];
+    unsigned int j;
+
+    for (j = 0; j < SIZEOF (choices); j++)
+      {
+        locale_t locale = newlocale (LC_ALL_MASK, choices[j], NULL);
+        available[j] = (locale != NULL);
+        if (locale != NULL)
+          {
+            unsigned int i;
+
+            uselocale (locale);
+            for (i = 0; i < SIZEOF (categories); i++)
+              {
+                unsaved_names[j][i] = gl_locale_name_thread (categories[i].cat, categories[i].string);
+                saved_names[j][i] = strdup (unsaved_names[j][i]);
+              }
+            uselocale (LC_GLOBAL_LOCALE);
+            freelocale (locale);
+          }
+      }
+    /* Verify the unsaved_names are still valid.  */
+    for (j = 0; j < SIZEOF (choices); j++)
+      if (available[j])
+        {
+          unsigned int i;
+
+          for (i = 0; i < SIZEOF (categories); i++)
+            ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
+        }
+    /* Allocate many locales, without freeing them.  This is an attempt at
+       overwriting as much of the previously allocated memory as possible.  */
+    for (j = SIZEOF (choices); j > 0; )
+      {
+        j--;
+        if (available[j])
+          {
+            locale_t locale = newlocale (LC_ALL_MASK, choices[j], NULL);
+            unsigned int i;
+
+            ASSERT (locale != NULL);
+            uselocale (locale);
+            for (i = 0; i < SIZEOF (categories); i++)
+              {
+                const char *name = gl_locale_name_thread (categories[i].cat, categories[i].string);
+                ASSERT (strcmp (unsaved_names[j][i], name) == 0);
+              }
+            uselocale (LC_GLOBAL_LOCALE);
+          }
+      }
+    /* Verify the unsaved_names are still valid.  */
+    for (j = 0; j < SIZEOF (choices); j++)
+      if (available[j])
+        {
+          unsigned int i;
+
+          for (i = 0; i < SIZEOF (categories); i++)
+            ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
+        }
+  }
+#else
+  /* Check that gl_locale_name_thread always returns NULL.  */
+  ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL);
+  ASSERT (gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES") == NULL);
+#endif
+}
+
+/* Test the gl_locale_name_posix() function.  */
+static void
+test_locale_name_posix (void)
+{
+  const char *name;
+
+  /* Get into a defined state,  */
+  setlocale (LC_ALL, "en_US.UTF-8");
+#if HAVE_NEWLOCALE
+  uselocale (LC_GLOBAL_LOCALE);
+#endif
+
+  /* Check that when all environment variables are unset,
+     gl_locale_name_posix returns either NULL or the default locale.  */
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LC_NUMERIC");
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+  name = gl_locale_name_posix (LC_NUMERIC, "LC_NUMERIC");
+  ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+  /* Check that an empty environment variable is treated like an unset
+     environment variable.  */
+
+  setenv ("LC_ALL", "", 1);
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+  unsetenv ("LC_ALL");
+  setenv ("LC_CTYPE", "", 1);
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  setenv ("LC_MESSAGES", "", 1);
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  setenv ("LANG", "", 1);
+  setlocale (LC_ALL, "");
+  name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+  /* Check that LC_ALL overrides the others, and LANG is overridden by the
+     others.  */
+
+  setenv ("LC_ALL", "C", 1);
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (strcmp (name, "C") == 0);
+
+  unsetenv ("LC_ALL");
+  setenv ("LC_CTYPE", "C", 1);
+  setenv ("LC_MESSAGES", "C", 1);
+  unsetenv ("LANG");
+  setlocale (LC_ALL, "");
+  name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (strcmp (name, "C") == 0);
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  setenv ("LANG", "C", 1);
+  setlocale (LC_ALL, "");
+  name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (strcmp (name, "C") == 0);
+
+  /* Check mixed situations.  */
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+  setenv ("LANG", "de_DE.UTF-8", 1);
+  if (setlocale (LC_ALL, "") != NULL)
+    {
+      name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE");
+      ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+      name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+      ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+    }
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+  unsetenv ("LANG");
+  if (setlocale (LC_ALL, "") != NULL)
+    {
+      name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE");
+      ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+      name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+      ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+    }
+
+#if HAVE_NEWLOCALE
+  /* Check that gl_locale_name_posix ignores the thread locale.  */
+  {
+    locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+    if (locale != NULL)
+      {
+        unsetenv ("LC_ALL");
+        unsetenv ("LC_CTYPE");
+        unsetenv ("LC_MESSAGES");
+        setenv ("LANG", "C", 1);
+        setlocale (LC_ALL, "");
+        uselocale (locale);
+        name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+        ASSERT (strcmp (name, "C") == 0);
+      }
+  }
+#endif
+}
+
+/* Test the gl_locale_name_environ() function.  */
+static void
+test_locale_name_environ (void)
+{
+  const char *name;
+
+  /* Get into a defined state,  */
+  setlocale (LC_ALL, "en_US.UTF-8");
+#if HAVE_NEWLOCALE
+  uselocale (LC_GLOBAL_LOCALE);
+#endif
+
+  /* Check that when all environment variables are unset,
+     gl_locale_name_environ returns NULL.  */
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LC_NUMERIC");
+  unsetenv ("LANG");
+  ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+  ASSERT (gl_locale_name_environ (LC_NUMERIC, "LC_NUMERIC") == NULL);
+
+  /* Check that an empty environment variable is treated like an unset
+     environment variable.  */
+
+  setenv ("LC_ALL", "", 1);
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LANG");
+  ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+  unsetenv ("LC_ALL");
+  setenv ("LC_CTYPE", "", 1);
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LANG");
+  ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  setenv ("LC_MESSAGES", "", 1);
+  unsetenv ("LANG");
+  ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  setenv ("LANG", "", 1);
+  ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+  /* Check that LC_ALL overrides the others, and LANG is overridden by the
+     others.  */
+
+  setenv ("LC_ALL", "C", 1);
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  unsetenv ("LANG");
+  name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (strcmp (name, "C") == 0);
+
+  unsetenv ("LC_ALL");
+  setenv ("LC_CTYPE", "C", 1);
+  setenv ("LC_MESSAGES", "C", 1);
+  unsetenv ("LANG");
+  name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (strcmp (name, "C") == 0);
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  unsetenv ("LC_MESSAGES");
+  setenv ("LANG", "C", 1);
+  name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (strcmp (name, "C") == 0);
+
+  /* Check mixed situations.  */
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+  setenv ("LANG", "de_DE.UTF-8", 1);
+  name = gl_locale_name_environ (LC_CTYPE, "LC_CTYPE");
+  ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+  name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+
+  unsetenv ("LC_ALL");
+  unsetenv ("LC_CTYPE");
+  setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+  unsetenv ("LANG");
+  name = gl_locale_name_environ (LC_CTYPE, "LC_CTYPE");
+  ASSERT (name == NULL);
+  name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+  ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+
+#if HAVE_NEWLOCALE
+  /* Check that gl_locale_name_environ ignores the thread locale.  */
+  {
+    locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+    if (locale != NULL)
+      {
+        unsetenv ("LC_ALL");
+        unsetenv ("LC_CTYPE");
+        unsetenv ("LC_MESSAGES");
+        setenv ("LANG", "C", 1);
+        setlocale (LC_ALL, "");
+        uselocale (locale);
+        name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+        ASSERT (strcmp (name, "C") == 0);
+      }
+  }
+#endif
+}
+
+/* Test the gl_locale_name_default() function.  */
+static void
+test_locale_name_default (void)
+{
+  const char *name = gl_locale_name_default ();
+
+  ASSERT (name != NULL);
+
+  /* Only MacOS X and Windows have a facility for the user to set the default
+     locale.  */
+#if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__ || defined __CYGWIN__))
+  ASSERT (strcmp (name, "C") == 0);
+#endif
+
+#if HAVE_NEWLOCALE
+  /* Check that gl_locale_name_default ignores the thread locale.  */
+  {
+    locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+    if (locale != NULL)
+      {
+        uselocale (locale);
+        ASSERT (strcmp (gl_locale_name_default (), name) == 0);
+      }
+  }
+#endif
+}
+
+int
+main ()
+{
+  test_locale_name ();
+  test_locale_name_thread ();
+  test_locale_name_posix ();
+  test_locale_name_environ ();
+  test_locale_name_default ();
+
+  return 0;
+}
diff --git a/tests/test-lock.c b/tests/test-lock.c
new file mode 100644 (file)
index 0000000..04ce076
--- /dev/null
@@ -0,0 +1,601 @@
+/* Test of locking in multithreaded situations.
+   Copyright (C) 2005, 2008-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 Bruno Haible <bruno@clisp.org>, 2005.  */
+
+#include <config.h>
+
+#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS
+
+#if USE_POSIX_THREADS
+# define TEST_POSIX_THREADS 1
+#endif
+#if USE_SOLARIS_THREADS
+# define TEST_SOLARIS_THREADS 1
+#endif
+#if USE_PTH_THREADS
+# define TEST_PTH_THREADS 1
+#endif
+#if USE_WIN32_THREADS
+# define TEST_WIN32_THREADS 1
+#endif
+
+/* Whether to enable locking.
+   Uncomment this to get a test program without locking, to verify that
+   it crashes.  */
+#define ENABLE_LOCKING 1
+
+/* Which tests to perform.
+   Uncomment some of these, to verify that all tests crash if no locking
+   is enabled.  */
+#define DO_TEST_LOCK 1
+#define DO_TEST_RWLOCK 1
+#define DO_TEST_RECURSIVE_LOCK 1
+#define DO_TEST_ONCE 1
+
+/* Whether to help the scheduler through explicit yield().
+   Uncomment this to see if the operating system has a fair scheduler.  */
+#define EXPLICIT_YIELD 1
+
+/* Whether to print debugging messages.  */
+#define ENABLE_DEBUGGING 0
+
+/* Number of simultaneous threads.  */
+#define THREAD_COUNT 10
+
+/* Number of operations performed in each thread.
+   This is quite high, because with a smaller count, say 5000, we often get
+   an "OK" result even without ENABLE_LOCKING (on Linux/x86).  */
+#define REPEAT_COUNT 50000
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !ENABLE_LOCKING
+# undef USE_POSIX_THREADS
+# undef USE_SOLARIS_THREADS
+# undef USE_PTH_THREADS
+# undef USE_WIN32_THREADS
+#endif
+#include "glthread/lock.h"
+
+#if !ENABLE_LOCKING
+# if TEST_POSIX_THREADS
+#  define USE_POSIX_THREADS 1
+# endif
+# if TEST_SOLARIS_THREADS
+#  define USE_SOLARIS_THREADS 1
+# endif
+# if TEST_PTH_THREADS
+#  define USE_PTH_THREADS 1
+# endif
+# if TEST_WIN32_THREADS
+#  define USE_WIN32_THREADS 1
+# endif
+#endif
+
+#include "glthread/thread.h"
+#include "glthread/yield.h"
+
+#if ENABLE_DEBUGGING
+# define dbgprintf printf
+#else
+# define dbgprintf if (0) printf
+#endif
+
+#if EXPLICIT_YIELD
+# define yield() gl_thread_yield ()
+#else
+# define yield()
+#endif
+
+#define ACCOUNT_COUNT 4
+
+static int account[ACCOUNT_COUNT];
+
+static int
+random_account (void)
+{
+  return ((unsigned int) rand () >> 3) % ACCOUNT_COUNT;
+}
+
+static void
+check_accounts (void)
+{
+  int i, sum;
+
+  sum = 0;
+  for (i = 0; i < ACCOUNT_COUNT; i++)
+    sum += account[i];
+  if (sum != ACCOUNT_COUNT * 1000)
+    abort ();
+}
+
+
+/* ------------------- Test normal (non-recursive) locks ------------------- */
+
+/* Test normal locks by having several bank accounts and several threads
+   which shuffle around money between the accounts and another thread
+   checking that all the money is still there.  */
+
+gl_lock_define_initialized(static, my_lock)
+
+static void *
+lock_mutator_thread (void *arg)
+{
+  int repeat;
+
+  for (repeat = REPEAT_COUNT; repeat > 0; repeat--)
+    {
+      int i1, i2, value;
+
+      dbgprintf ("Mutator %p before lock\n", gl_thread_self ());
+      gl_lock_lock (my_lock);
+      dbgprintf ("Mutator %p after  lock\n", gl_thread_self ());
+
+      i1 = random_account ();
+      i2 = random_account ();
+      value = ((unsigned int) rand () >> 3) % 10;
+      account[i1] += value;
+      account[i2] -= value;
+
+      dbgprintf ("Mutator %p before unlock\n", gl_thread_self ());
+      gl_lock_unlock (my_lock);
+      dbgprintf ("Mutator %p after  unlock\n", gl_thread_self ());
+
+      dbgprintf ("Mutator %p before check lock\n", gl_thread_self ());
+      gl_lock_lock (my_lock);
+      check_accounts ();
+      gl_lock_unlock (my_lock);
+      dbgprintf ("Mutator %p after  check unlock\n", gl_thread_self ());
+
+      yield ();
+    }
+
+  dbgprintf ("Mutator %p dying.\n", gl_thread_self ());
+  return NULL;
+}
+
+static volatile int lock_checker_done;
+
+static void *
+lock_checker_thread (void *arg)
+{
+  while (!lock_checker_done)
+    {
+      dbgprintf ("Checker %p before check lock\n", gl_thread_self ());
+      gl_lock_lock (my_lock);
+      check_accounts ();
+      gl_lock_unlock (my_lock);
+      dbgprintf ("Checker %p after  check unlock\n", gl_thread_self ());
+
+      yield ();
+    }
+
+  dbgprintf ("Checker %p dying.\n", gl_thread_self ());
+  return NULL;
+}
+
+static void
+test_lock (void)
+{
+  int i;
+  gl_thread_t checkerthread;
+  gl_thread_t threads[THREAD_COUNT];
+
+  /* Initialization.  */
+  for (i = 0; i < ACCOUNT_COUNT; i++)
+    account[i] = 1000;
+  lock_checker_done = 0;
+
+  /* Spawn the threads.  */
+  checkerthread = gl_thread_create (lock_checker_thread, NULL);
+  for (i = 0; i < THREAD_COUNT; i++)
+    threads[i] = gl_thread_create (lock_mutator_thread, NULL);
+
+  /* Wait for the threads to terminate.  */
+  for (i = 0; i < THREAD_COUNT; i++)
+    gl_thread_join (threads[i], NULL);
+  lock_checker_done = 1;
+  gl_thread_join (checkerthread, NULL);
+  check_accounts ();
+}
+
+
+/* ----------------- Test read-write (non-recursive) locks ----------------- */
+
+/* Test read-write locks by having several bank accounts and several threads
+   which shuffle around money between the accounts and several other threads
+   that check that all the money is still there.  */
+
+gl_rwlock_define_initialized(static, my_rwlock)
+
+static void *
+rwlock_mutator_thread (void *arg)
+{
+  int repeat;
+
+  for (repeat = REPEAT_COUNT; repeat > 0; repeat--)
+    {
+      int i1, i2, value;
+
+      dbgprintf ("Mutator %p before wrlock\n", gl_thread_self ());
+      gl_rwlock_wrlock (my_rwlock);
+      dbgprintf ("Mutator %p after  wrlock\n", gl_thread_self ());
+
+      i1 = random_account ();
+      i2 = random_account ();
+      value = ((unsigned int) rand () >> 3) % 10;
+      account[i1] += value;
+      account[i2] -= value;
+
+      dbgprintf ("Mutator %p before unlock\n", gl_thread_self ());
+      gl_rwlock_unlock (my_rwlock);
+      dbgprintf ("Mutator %p after  unlock\n", gl_thread_self ());
+
+      yield ();
+    }
+
+  dbgprintf ("Mutator %p dying.\n", gl_thread_self ());
+  return NULL;
+}
+
+static volatile int rwlock_checker_done;
+
+static void *
+rwlock_checker_thread (void *arg)
+{
+  while (!rwlock_checker_done)
+    {
+      dbgprintf ("Checker %p before check rdlock\n", gl_thread_self ());
+      gl_rwlock_rdlock (my_rwlock);
+      check_accounts ();
+      gl_rwlock_unlock (my_rwlock);
+      dbgprintf ("Checker %p after  check unlock\n", gl_thread_self ());
+
+      yield ();
+    }
+
+  dbgprintf ("Checker %p dying.\n", gl_thread_self ());
+  return NULL;
+}
+
+static void
+test_rwlock (void)
+{
+  int i;
+  gl_thread_t checkerthreads[THREAD_COUNT];
+  gl_thread_t threads[THREAD_COUNT];
+
+  /* Initialization.  */
+  for (i = 0; i < ACCOUNT_COUNT; i++)
+    account[i] = 1000;
+  rwlock_checker_done = 0;
+
+  /* Spawn the threads.  */
+  for (i = 0; i < THREAD_COUNT; i++)
+    checkerthreads[i] = gl_thread_create (rwlock_checker_thread, NULL);
+  for (i = 0; i < THREAD_COUNT; i++)
+    threads[i] = gl_thread_create (rwlock_mutator_thread, NULL);
+
+  /* Wait for the threads to terminate.  */
+  for (i = 0; i < THREAD_COUNT; i++)
+    gl_thread_join (threads[i], NULL);
+  rwlock_checker_done = 1;
+  for (i = 0; i < THREAD_COUNT; i++)
+    gl_thread_join (checkerthreads[i], NULL);
+  check_accounts ();
+}
+
+
+/* -------------------------- Test recursive locks -------------------------- */
+
+/* Test recursive locks by having several bank accounts and several threads
+   which shuffle around money between the accounts (recursively) and another
+   thread checking that all the money is still there.  */
+
+gl_recursive_lock_define_initialized(static, my_reclock)
+
+static void
+recshuffle (void)
+{
+  int i1, i2, value;
+
+  dbgprintf ("Mutator %p before lock\n", gl_thread_self ());
+  gl_recursive_lock_lock (my_reclock);
+  dbgprintf ("Mutator %p after  lock\n", gl_thread_self ());
+
+  i1 = random_account ();
+  i2 = random_account ();
+  value = ((unsigned int) rand () >> 3) % 10;
+  account[i1] += value;
+  account[i2] -= value;
+
+  /* Recursive with probability 0.5.  */
+  if (((unsigned int) rand () >> 3) % 2)
+    recshuffle ();
+
+  dbgprintf ("Mutator %p before unlock\n", gl_thread_self ());
+  gl_recursive_lock_unlock (my_reclock);
+  dbgprintf ("Mutator %p after  unlock\n", gl_thread_self ());
+}
+
+static void *
+reclock_mutator_thread (void *arg)
+{
+  int repeat;
+
+  for (repeat = REPEAT_COUNT; repeat > 0; repeat--)
+    {
+      recshuffle ();
+
+      dbgprintf ("Mutator %p before check lock\n", gl_thread_self ());
+      gl_recursive_lock_lock (my_reclock);
+      check_accounts ();
+      gl_recursive_lock_unlock (my_reclock);
+      dbgprintf ("Mutator %p after  check unlock\n", gl_thread_self ());
+
+      yield ();
+    }
+
+  dbgprintf ("Mutator %p dying.\n", gl_thread_self ());
+  return NULL;
+}
+
+static volatile int reclock_checker_done;
+
+static void *
+reclock_checker_thread (void *arg)
+{
+  while (!reclock_checker_done)
+    {
+      dbgprintf ("Checker %p before check lock\n", gl_thread_self ());
+      gl_recursive_lock_lock (my_reclock);
+      check_accounts ();
+      gl_recursive_lock_unlock (my_reclock);
+      dbgprintf ("Checker %p after  check unlock\n", gl_thread_self ());
+
+      yield ();
+    }
+
+  dbgprintf ("Checker %p dying.\n", gl_thread_self ());
+  return NULL;
+}
+
+static void
+test_recursive_lock (void)
+{
+  int i;
+  gl_thread_t checkerthread;
+  gl_thread_t threads[THREAD_COUNT];
+
+  /* Initialization.  */
+  for (i = 0; i < ACCOUNT_COUNT; i++)
+    account[i] = 1000;
+  reclock_checker_done = 0;
+
+  /* Spawn the threads.  */
+  checkerthread = gl_thread_create (reclock_checker_thread, NULL);
+  for (i = 0; i < THREAD_COUNT; i++)
+    threads[i] = gl_thread_create (reclock_mutator_thread, NULL);
+
+  /* Wait for the threads to terminate.  */
+  for (i = 0; i < THREAD_COUNT; i++)
+    gl_thread_join (threads[i], NULL);
+  reclock_checker_done = 1;
+  gl_thread_join (checkerthread, NULL);
+  check_accounts ();
+}
+
+
+/* ------------------------ Test once-only execution ------------------------ */
+
+/* Test once-only execution by having several threads attempt to grab a
+   once-only task simultaneously (triggered by releasing a read-write lock).  */
+
+gl_once_define(static, fresh_once)
+static int ready[THREAD_COUNT];
+static gl_lock_t ready_lock[THREAD_COUNT];
+#if ENABLE_LOCKING
+static gl_rwlock_t fire_signal[REPEAT_COUNT];
+#else
+static volatile int fire_signal_state;
+#endif
+static gl_once_t once_control;
+static int performed;
+gl_lock_define_initialized(static, performed_lock)
+
+static void
+once_execute (void)
+{
+  gl_lock_lock (performed_lock);
+  performed++;
+  gl_lock_unlock (performed_lock);
+}
+
+static void *
+once_contender_thread (void *arg)
+{
+  int id = (int) (long) arg;
+  int repeat;
+
+  for (repeat = 0; repeat <= REPEAT_COUNT; repeat++)
+    {
+      /* Tell the main thread that we're ready.  */
+      gl_lock_lock (ready_lock[id]);
+      ready[id] = 1;
+      gl_lock_unlock (ready_lock[id]);
+
+      if (repeat == REPEAT_COUNT)
+        break;
+
+      dbgprintf ("Contender %p waiting for signal for round %d\n",
+                 gl_thread_self (), repeat);
+#if ENABLE_LOCKING
+      /* Wait for the signal to go.  */
+      gl_rwlock_rdlock (fire_signal[repeat]);
+      /* And don't hinder the others (if the scheduler is unfair).  */
+      gl_rwlock_unlock (fire_signal[repeat]);
+#else
+      /* Wait for the signal to go.  */
+      while (fire_signal_state <= repeat)
+        yield ();
+#endif
+      dbgprintf ("Contender %p got the     signal for round %d\n",
+                 gl_thread_self (), repeat);
+
+      /* Contend for execution.  */
+      gl_once (once_control, once_execute);
+    }
+
+  return NULL;
+}
+
+static void
+test_once (void)
+{
+  int i, repeat;
+  gl_thread_t threads[THREAD_COUNT];
+
+  /* Initialize all variables.  */
+  for (i = 0; i < THREAD_COUNT; i++)
+    {
+      ready[i] = 0;
+      gl_lock_init (ready_lock[i]);
+    }
+#if ENABLE_LOCKING
+  for (i = 0; i < REPEAT_COUNT; i++)
+    gl_rwlock_init (fire_signal[i]);
+#else
+  fire_signal_state = 0;
+#endif
+
+  /* Block all fire_signals.  */
+  for (i = REPEAT_COUNT-1; i >= 0; i--)
+    gl_rwlock_wrlock (fire_signal[i]);
+
+  /* Spawn the threads.  */
+  for (i = 0; i < THREAD_COUNT; i++)
+    threads[i] = gl_thread_create (once_contender_thread, (void *) (long) i);
+
+  for (repeat = 0; repeat <= REPEAT_COUNT; repeat++)
+    {
+      /* Wait until every thread is ready.  */
+      dbgprintf ("Main thread before synchonizing for round %d\n", repeat);
+      for (;;)
+        {
+          int ready_count = 0;
+          for (i = 0; i < THREAD_COUNT; i++)
+            {
+              gl_lock_lock (ready_lock[i]);
+              ready_count += ready[i];
+              gl_lock_unlock (ready_lock[i]);
+            }
+          if (ready_count == THREAD_COUNT)
+            break;
+          yield ();
+        }
+      dbgprintf ("Main thread after  synchonizing for round %d\n", repeat);
+
+      if (repeat > 0)
+        {
+          /* Check that exactly one thread executed the once_execute()
+             function.  */
+          if (performed != 1)
+            abort ();
+        }
+
+      if (repeat == REPEAT_COUNT)
+        break;
+
+      /* Preparation for the next round: Initialize once_control.  */
+      memcpy (&once_control, &fresh_once, sizeof (gl_once_t));
+
+      /* Preparation for the next round: Reset the performed counter.  */
+      performed = 0;
+
+      /* Preparation for the next round: Reset the ready flags.  */
+      for (i = 0; i < THREAD_COUNT; i++)
+        {
+          gl_lock_lock (ready_lock[i]);
+          ready[i] = 0;
+          gl_lock_unlock (ready_lock[i]);
+        }
+
+      /* Signal all threads simultaneously.  */
+      dbgprintf ("Main thread giving signal for round %d\n", repeat);
+#if ENABLE_LOCKING
+      gl_rwlock_unlock (fire_signal[repeat]);
+#else
+      fire_signal_state = repeat + 1;
+#endif
+    }
+
+  /* Wait for the threads to terminate.  */
+  for (i = 0; i < THREAD_COUNT; i++)
+    gl_thread_join (threads[i], NULL);
+}
+
+
+/* -------------------------------------------------------------------------- */
+
+int
+main ()
+{
+#if TEST_PTH_THREADS
+  if (!pth_init ())
+    abort ();
+#endif
+
+#if DO_TEST_LOCK
+  printf ("Starting test_lock ..."); fflush (stdout);
+  test_lock ();
+  printf (" OK\n"); fflush (stdout);
+#endif
+#if DO_TEST_RWLOCK
+  printf ("Starting test_rwlock ..."); fflush (stdout);
+  test_rwlock ();
+  printf (" OK\n"); fflush (stdout);
+#endif
+#if DO_TEST_RECURSIVE_LOCK
+  printf ("Starting test_recursive_lock ..."); fflush (stdout);
+  test_recursive_lock ();
+  printf (" OK\n"); fflush (stdout);
+#endif
+#if DO_TEST_ONCE
+  printf ("Starting test_once ..."); fflush (stdout);
+  test_once ();
+  printf (" OK\n"); fflush (stdout);
+#endif
+
+  return 0;
+}
+
+#else
+
+/* No multithreading available.  */
+
+#include <stdio.h>
+
+int
+main ()
+{
+  fputs ("Skipping test: multithreading not enabled\n", stderr);
+  return 77;
+}
+
+#endif
diff --git a/tests/test-lseek.c b/tests/test-lseek.c
new file mode 100644 (file)
index 0000000..ce2263c
--- /dev/null
@@ -0,0 +1,96 @@
+/* Test of lseek() function.
+   Copyright (C) 2007-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 Eric Blake, 2007.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (lseek, off_t, (int, off_t, int));
+
+#include <errno.h>
+
+#include "macros.h"
+
+/* ARGC must be 2; *ARGV[1] is '0' if stdin and stdout are files, '1'
+   if they are pipes, and '2' if they are closed.  Check for proper
+   semantics of lseek.  */
+int
+main (int argc, char **argv)
+{
+  if (argc != 2)
+    return 2;
+  switch (*argv[1])
+    {
+    case '0': /* regular files */
+      ASSERT (lseek (0, (off_t)2, SEEK_SET) == 2);
+      ASSERT (lseek (0, (off_t)-4, SEEK_CUR) == -1);
+      ASSERT (errno == EINVAL);
+      errno = 0;
+#if ! defined __BEOS__
+      /* POSIX says that the last lseek call, when failing, does not change
+         the current offset.  But BeOS sets it to 0.  */
+      ASSERT (lseek (0, (off_t)0, SEEK_CUR) == 2);
+#endif
+#if 0 /* leads to SIGSYS on IRIX 6.5 */
+      ASSERT (lseek (0, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1);
+      ASSERT (errno == EINVAL);
+#endif
+      ASSERT (lseek (1, (off_t)2, SEEK_SET) == 2);
+      errno = 0;
+      ASSERT (lseek (1, (off_t)-4, SEEK_CUR) == -1);
+      ASSERT (errno == EINVAL);
+      errno = 0;
+#if ! defined __BEOS__
+      /* POSIX says that the last lseek call, when failing, does not change
+         the current offset.  But BeOS sets it to 0.  */
+      ASSERT (lseek (1, (off_t)0, SEEK_CUR) == 2);
+#endif
+#if 0 /* leads to SIGSYS on IRIX 6.5 */
+      ASSERT (lseek (1, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1);
+      ASSERT (errno == EINVAL);
+#endif
+      break;
+
+    case '1': /* pipes */
+      errno = 0;
+      ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
+      ASSERT (errno == ESPIPE);
+      errno = 0;
+      ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1);
+      ASSERT (errno == ESPIPE);
+      break;
+
+    case '2': /* closed */
+      /* Explicitly close file descriptors 0 and 1.  The <&- and >&- in the
+         invoking shell are not enough on HP-UX.  */
+      close (0);
+      close (1);
+      errno = 0;
+      ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
+      ASSERT (errno == EBADF);
+      errno = 0;
+      ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1);
+      ASSERT (errno == EBADF);
+      break;
+
+    default:
+      return 1;
+    }
+  return 0;
+}
diff --git a/tests/test-lseek.sh b/tests/test-lseek.sh
new file mode 100755 (executable)
index 0000000..47237b5
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+tmpfiles=
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles=t-lseek.tmp
+# seekable files
+./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1
+
+# pipes
+echo hi | { ./test-lseek${EXEEXT} 1; echo $? > t-lseek.tmp; cat > /dev/null; } | cat
+test "`cat t-lseek.tmp`" = "0" || exit 1
+
+# closed descriptors
+./test-lseek${EXEEXT} 2 <&- >&- || exit 1
+
+rm -rf $tmpfiles
+exit 0
diff --git a/tests/test-lstat.c b/tests/test-lstat.c
new file mode 100644 (file)
index 0000000..372e056
--- /dev/null
@@ -0,0 +1,60 @@
+/* Test of lstat() function.
+   Copyright (C) 2008-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 Simon Josefsson, 2008; and Eric Blake, 2009.  */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+/* Caution: lstat may be a function-like macro.  Although this
+   signature check must pass, it may be the signature of the real (and
+   broken) lstat rather than rpl_lstat.  Most code should not use the
+   address of lstat.  */
+#include "signature.h"
+SIGNATURE_CHECK (lstat, int, (char const *, struct stat *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "same-inode.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-lstat.t"
+
+#include "test-lstat.h"
+
+/* Wrapper around lstat, which works even if lstat is a function-like
+   macro, where test_lstat_func(lstat) would do the wrong thing.  */
+static int
+do_lstat (char const *name, struct stat *st)
+{
+  return lstat (name, st);
+}
+
+int
+main (void)
+{
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  return test_lstat_func (do_lstat, true);
+}
diff --git a/tests/test-lstat.h b/tests/test-lstat.h
new file mode 100644 (file)
index 0000000..883c4e8
--- /dev/null
@@ -0,0 +1,116 @@
+/* Test of lstat() function.
+   Copyright (C) 2008-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 Simon Josefsson, 2008; and Eric Blake, 2009.  */
+
+/* This file is designed to test both lstat(n,buf) and
+   fstatat(AT_FDCWD,n,buf,AT_SYMLINK_NOFOLLOW).  FUNC is the function
+   to test.  Assumes that BASE and ASSERT are already defined, and
+   that appropriate headers are already included.  If PRINT, warn
+   before skipping symlink tests with status 77.  */
+
+static int
+test_lstat_func (int (*func) (char const *, struct stat *), bool print)
+{
+  struct stat st1;
+  struct stat st2;
+
+  /* Test for common directories.  */
+  ASSERT (func (".", &st1) == 0);
+  ASSERT (func ("./", &st2) == 0);
+  ASSERT (SAME_INODE (st1, st2));
+  ASSERT (S_ISDIR (st1.st_mode));
+  ASSERT (S_ISDIR (st2.st_mode));
+  ASSERT (func ("/", &st1) == 0);
+  ASSERT (func ("///", &st2) == 0);
+  ASSERT (SAME_INODE (st1, st2));
+  ASSERT (S_ISDIR (st1.st_mode));
+  ASSERT (S_ISDIR (st2.st_mode));
+  ASSERT (func ("..", &st1) == 0);
+  ASSERT (S_ISDIR (st1.st_mode));
+
+  /* Test for error conditions.  */
+  errno = 0;
+  ASSERT (func ("", &st1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("nosuch", &st1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("nosuch/", &st1) == -1);
+  ASSERT (errno == ENOENT);
+
+  ASSERT (close (creat (BASE "file", 0600)) == 0);
+  ASSERT (func (BASE "file", &st1) == 0);
+  ASSERT (S_ISREG (st1.st_mode));
+  errno = 0;
+  ASSERT (func (BASE "file/", &st1) == -1);
+  ASSERT (errno == ENOTDIR);
+
+  /* Now for some symlink tests, where supported.  We set up:
+     link1 -> directory
+     link2 -> file
+     link3 -> dangling
+     link4 -> loop
+     then test behavior both with and without trailing slash.
+  */
+  if (symlink (".", BASE "link1") != 0)
+    {
+      ASSERT (unlink (BASE "file") == 0);
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+  ASSERT (symlink (BASE "file", BASE "link2") == 0);
+  ASSERT (symlink (BASE "nosuch", BASE "link3") == 0);
+  ASSERT (symlink (BASE "link4", BASE "link4") == 0);
+
+  ASSERT (func (BASE "link1", &st1) == 0);
+  ASSERT (S_ISLNK (st1.st_mode));
+  ASSERT (func (BASE "link1/", &st1) == 0);
+  ASSERT (stat (BASE "link1", &st2) == 0);
+  ASSERT (S_ISDIR (st1.st_mode));
+  ASSERT (S_ISDIR (st2.st_mode));
+  ASSERT (SAME_INODE (st1, st2));
+
+  ASSERT (func (BASE "link2", &st1) == 0);
+  ASSERT (S_ISLNK (st1.st_mode));
+  errno = 0;
+  ASSERT (func (BASE "link2/", &st1) == -1);
+  ASSERT (errno == ENOTDIR);
+
+  ASSERT (func (BASE "link3", &st1) == 0);
+  ASSERT (S_ISLNK (st1.st_mode));
+  errno = 0;
+  ASSERT (func (BASE "link3/", &st1) == -1);
+  ASSERT (errno == ENOENT);
+
+  ASSERT (func (BASE "link4", &st1) == 0);
+  ASSERT (S_ISLNK (st1.st_mode));
+  errno = 0;
+  ASSERT (func (BASE "link4/", &st1) == -1);
+  ASSERT (errno == ELOOP);
+
+  /* Cleanup.  */
+  ASSERT (unlink (BASE "file") == 0);
+  ASSERT (unlink (BASE "link1") == 0);
+  ASSERT (unlink (BASE "link2") == 0);
+  ASSERT (unlink (BASE "link3") == 0);
+  ASSERT (unlink (BASE "link4") == 0);
+
+  return 0;
+}
diff --git a/tests/test-malloc-gnu.c b/tests/test-malloc-gnu.c
new file mode 100644 (file)
index 0000000..c2a3d6b
--- /dev/null
@@ -0,0 +1,29 @@
+/* Test of malloc function.
+   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/>.  */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+int
+main ()
+{
+  /* Check that malloc (0) is not a NULL pointer.  */
+  if (malloc (0) == NULL)
+    return 1;
+
+  return 0;
+}
diff --git a/tests/test-malloca.c b/tests/test-malloca.c
new file mode 100644 (file)
index 0000000..92c86f2
--- /dev/null
@@ -0,0 +1,62 @@
+/* Test of safe automatic memory allocation.
+   Copyright (C) 2005, 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2005.  */
+
+#include <config.h>
+
+#include "malloca.h"
+
+#include <stdlib.h>
+
+static void
+do_allocation (int n)
+{
+  void *ptr = malloca (n);
+  freea (ptr);
+  safe_alloca (n);
+}
+
+void (*func) (int) = do_allocation;
+
+int
+main ()
+{
+  int i;
+
+  /* This slows down malloc a lot.  */
+  unsetenv ("MALLOC_PERTURB_");
+
+  /* Repeat a lot of times, to make sure there's no memory leak.  */
+  for (i = 0; i < 50000; i++)
+    {
+      /* Try various values.
+         n = 0 gave a crash on Alpha with gcc-2.5.8.
+         Some versions of MacOS X have a stack size limit of 512 KB.  */
+      func (34);
+      func (134);
+      func (399);
+      func (510823);
+      func (129321);
+      func (0);
+      func (4070);
+      func (4095);
+      func (1);
+      func (16582);
+    }
+
+  return 0;
+}
diff --git a/tests/test-math.c b/tests/test-math.c
new file mode 100644 (file)
index 0000000..8565925
--- /dev/null
@@ -0,0 +1,53 @@
+/* Test of <math.h> substitute.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#ifndef NAN
+# error NAN should be defined
+choke me
+#endif
+
+#if 0
+/* Check that NAN expands into a constant expression.  */
+static float n = NAN;
+#endif
+
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (double x, double y)
+{
+  return x == y;
+}
+
+int
+main (void)
+{
+  double d = NAN;
+  double zero = 0.0;
+  if (numeric_equal (d, d))
+    return 1;
+  d = HUGE_VAL;
+  if (!numeric_equal (d, 1.0 / zero))
+    return 1;
+  return 0;
+}
diff --git a/tests/test-mbrtowc-w32-1.sh b/tests/test-mbrtowc-w32-1.sh
new file mode 100755 (executable)
index 0000000..3f12e44
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP1252 locale.
+./test-mbrtowc-w32${EXEEXT} French_France 1252
diff --git a/tests/test-mbrtowc-w32-2.sh b/tests/test-mbrtowc-w32-2.sh
new file mode 100755 (executable)
index 0000000..9e1a765
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP1256 locale.
+./test-mbrtowc-w32${EXEEXT} "Arabic_Saudi Arabia" 1256
diff --git a/tests/test-mbrtowc-w32-3.sh b/tests/test-mbrtowc-w32-3.sh
new file mode 100755 (executable)
index 0000000..782c2d0
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP932 locale.
+./test-mbrtowc-w32${EXEEXT} Japanese_Japan 932
diff --git a/tests/test-mbrtowc-w32-4.sh b/tests/test-mbrtowc-w32-4.sh
new file mode 100755 (executable)
index 0000000..0630f30
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP950 locale.
+./test-mbrtowc-w32${EXEEXT} Chinese_Taiwan 950
diff --git a/tests/test-mbrtowc-w32-5.sh b/tests/test-mbrtowc-w32-5.sh
new file mode 100755 (executable)
index 0000000..7d7faa9
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP936 locale.
+./test-mbrtowc-w32${EXEEXT} Chinese_China 936
diff --git a/tests/test-mbrtowc-w32.c b/tests/test-mbrtowc-w32.c
new file mode 100644 (file)
index 0000000..ee8caf9
--- /dev/null
@@ -0,0 +1,735 @@
+/* Test of conversion of multibyte character to wide character.
+   Copyright (C) 2008-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/>.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include <errno.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+
+static int
+test_one_locale (const char *name, int codepage)
+{
+  mbstate_t state;
+  wchar_t wc;
+  size_t ret;
+
+# if 1
+  /* Portable code to set the locale.  */
+  {
+    char name_with_codepage[1024];
+
+    sprintf (name_with_codepage, "%s.%d", name, codepage);
+
+    /* Set the locale.  */
+    if (setlocale (LC_ALL, name_with_codepage) == NULL)
+      return 77;
+  }
+# else
+  /* Hacky way to set a locale.codepage combination that setlocale() refuses
+     to set.  */
+  {
+    /* Codepage of the current locale, set with setlocale().
+       Not necessarily the same as GetACP().  */
+    extern __declspec(dllimport) unsigned int __lc_codepage;
+
+    /* Set the locale.  */
+    if (setlocale (LC_ALL, name) == NULL)
+      return 77;
+
+    /* Clobber the codepage and MB_CUR_MAX, both set by setlocale().  */
+    __lc_codepage = codepage;
+    switch (codepage)
+      {
+      case 1252:
+      case 1256:
+        MB_CUR_MAX = 1;
+        break;
+      case 932:
+      case 950:
+      case 936:
+        MB_CUR_MAX = 2;
+        break;
+      case 54936:
+      case 65001:
+        MB_CUR_MAX = 4;
+        break;
+      }
+
+    /* Test whether the codepage is really available.  */
+    memset (&state, '\0', sizeof (mbstate_t));
+    if (mbrtowc (&wc, " ", 1, &state) == (size_t)(-1))
+      return 77;
+  }
+# endif
+
+  /* Test zero-length input.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    wc = (wchar_t) 0xBADFACE;
+    ret = mbrtowc (&wc, "x", 0, &state);
+    /* gnulib's implementation returns (size_t)(-2).
+       The AIX 5.1 implementation returns (size_t)(-1).
+       glibc's implementation returns 0.  */
+    ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0);
+    ASSERT (mbsinit (&state));
+  }
+
+  /* Test NUL byte input.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    wc = (wchar_t) 0xBADFACE;
+    ret = mbrtowc (&wc, "", 1, &state);
+    ASSERT (ret == 0);
+    ASSERT (wc == 0);
+    ASSERT (mbsinit (&state));
+    ret = mbrtowc (NULL, "", 1, &state);
+    ASSERT (ret == 0);
+    ASSERT (mbsinit (&state));
+  }
+
+  /* Test single-byte input.  */
+  {
+    int c;
+    char buf[1];
+
+    memset (&state, '\0', sizeof (mbstate_t));
+    for (c = 0; c < 0x100; c++)
+      switch (c)
+        {
+        case '\t': case '\v': case '\f':
+        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 '~':
+          /* c is in the ISO C "basic character set".  */
+          buf[0] = c;
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, buf, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == c);
+          ASSERT (mbsinit (&state));
+          ret = mbrtowc (NULL, buf, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          break;
+        }
+  }
+
+  /* Test special calling convention, passing a NULL pointer.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    wc = (wchar_t) 0xBADFACE;
+    ret = mbrtowc (&wc, NULL, 5, &state);
+    ASSERT (ret == 0);
+    ASSERT (wc == (wchar_t) 0xBADFACE);
+    ASSERT (mbsinit (&state));
+  }
+
+  switch (codepage)
+    {
+    case 1252:
+      /* Locale encoding is CP1252, an extension of ISO-8859-1.  */
+      {
+        char input[] = "B\374\337er"; /* "Büßer" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'B');
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 1, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wctob (wc) == (unsigned char) '\374');
+        ASSERT (wc == 0x00FC);
+        ASSERT (mbsinit (&state));
+        input[1] = '\0';
+
+        /* Test support of NULL first argument.  */
+        ret = mbrtowc (NULL, input + 2, 3, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 2, 3, &state);
+        ASSERT (ret == 1);
+        ASSERT (wctob (wc) == (unsigned char) '\337');
+        ASSERT (wc == 0x00DF);
+        ASSERT (mbsinit (&state));
+        input[2] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 3, 2, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'e');
+        ASSERT (mbsinit (&state));
+        input[3] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 4, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'r');
+        ASSERT (mbsinit (&state));
+      }
+      return 0;
+
+    case 1256:
+      /* Locale encoding is CP1256, not the same as ISO-8859-6.  */
+      {
+        char input[] = "x\302\341\346y"; /* "xآلوy" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'x');
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 1, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wctob (wc) == (unsigned char) '\302');
+        ASSERT (wc == 0x0622);
+        ASSERT (mbsinit (&state));
+        input[1] = '\0';
+
+        /* Test support of NULL first argument.  */
+        ret = mbrtowc (NULL, input + 2, 3, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 2, 3, &state);
+        ASSERT (ret == 1);
+        ASSERT (wctob (wc) == (unsigned char) '\341');
+        ASSERT (wc == 0x0644);
+        ASSERT (mbsinit (&state));
+        input[2] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 3, 2, &state);
+        ASSERT (ret == 1);
+        ASSERT (wctob (wc) == (unsigned char) '\346');
+        ASSERT (wc == 0x0648);
+        ASSERT (mbsinit (&state));
+        input[3] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 4, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'y');
+        ASSERT (mbsinit (&state));
+      }
+      return 0;
+
+    case 932:
+      /* Locale encoding is CP932, similar to Shift_JIS.  */
+      {
+        char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == '<');
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 1, 2, &state);
+        ASSERT (ret == 2);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x65E5);
+        ASSERT (mbsinit (&state));
+        input[1] = '\0';
+        input[2] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 3, 1, &state);
+        ASSERT (ret == (size_t)(-2));
+        ASSERT (wc == (wchar_t) 0xBADFACE);
+        ASSERT (!mbsinit (&state));
+        input[3] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 4, 4, &state);
+        ASSERT (ret == 1);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x672C);
+        ASSERT (mbsinit (&state));
+        input[4] = '\0';
+
+        /* Test support of NULL first argument.  */
+        ret = mbrtowc (NULL, input + 5, 3, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 5, 3, &state);
+        ASSERT (ret == 2);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x8A9E);
+        ASSERT (mbsinit (&state));
+        input[5] = '\0';
+        input[6] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 7, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == '>');
+        ASSERT (mbsinit (&state));
+
+        /* Test some invalid input.  */
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+      }
+      return 0;
+
+    case 950:
+      /* Locale encoding is CP950, similar to Big5.  */
+      {
+        char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == '<');
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 1, 2, &state);
+        ASSERT (ret == 2);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x65E5);
+        ASSERT (mbsinit (&state));
+        input[1] = '\0';
+        input[2] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 3, 1, &state);
+        ASSERT (ret == (size_t)(-2));
+        ASSERT (wc == (wchar_t) 0xBADFACE);
+        ASSERT (!mbsinit (&state));
+        input[3] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 4, 4, &state);
+        ASSERT (ret == 1);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x672C);
+        ASSERT (mbsinit (&state));
+        input[4] = '\0';
+
+        /* Test support of NULL first argument.  */
+        ret = mbrtowc (NULL, input + 5, 3, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 5, 3, &state);
+        ASSERT (ret == 2);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x8A9E);
+        ASSERT (mbsinit (&state));
+        input[5] = '\0';
+        input[6] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 7, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == '>');
+        ASSERT (mbsinit (&state));
+
+        /* Test some invalid input.  */
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+      }
+      return 0;
+
+    case 936:
+      /* Locale encoding is CP936 = GBK, an extension of GB2312.  */
+      {
+        char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == '<');
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 1, 2, &state);
+        ASSERT (ret == 2);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x65E5);
+        ASSERT (mbsinit (&state));
+        input[1] = '\0';
+        input[2] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 3, 1, &state);
+        ASSERT (ret == (size_t)(-2));
+        ASSERT (wc == (wchar_t) 0xBADFACE);
+        ASSERT (!mbsinit (&state));
+        input[3] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 4, 4, &state);
+        ASSERT (ret == 1);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x672C);
+        ASSERT (mbsinit (&state));
+        input[4] = '\0';
+
+        /* Test support of NULL first argument.  */
+        ret = mbrtowc (NULL, input + 5, 3, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 5, 3, &state);
+        ASSERT (ret == 2);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x8A9E);
+        ASSERT (mbsinit (&state));
+        input[5] = '\0';
+        input[6] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 7, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == '>');
+        ASSERT (mbsinit (&state));
+
+        /* Test some invalid input.  */
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+      }
+      return 0;
+
+    case 54936:
+      /* Locale encoding is CP54936 = GB18030.  */
+      {
+        char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'B');
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 1, 1, &state);
+        ASSERT (ret == (size_t)(-2));
+        ASSERT (wc == (wchar_t) 0xBADFACE);
+        ASSERT (!mbsinit (&state));
+        input[1] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 2, 7, &state);
+        ASSERT (ret == 1);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x00FC);
+        ASSERT (mbsinit (&state));
+        input[2] = '\0';
+
+        /* Test support of NULL first argument.  */
+        ret = mbrtowc (NULL, input + 3, 6, &state);
+        ASSERT (ret == 4);
+        ASSERT (mbsinit (&state));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 3, 6, &state);
+        ASSERT (ret == 4);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x00DF);
+        ASSERT (mbsinit (&state));
+        input[3] = '\0';
+        input[4] = '\0';
+        input[5] = '\0';
+        input[6] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 7, 2, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'e');
+        ASSERT (mbsinit (&state));
+        input[5] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 8, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'r');
+        ASSERT (mbsinit (&state));
+
+        /* Test some invalid input.  */
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\201\045", 2, &state); /* 0x81 0x25 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\201\060\377", 3, &state); /* 0x81 0x30 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\201\060\377\064", 4, &state); /* 0x81 0x30 0xFF 0x34 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\201\060\211\072", 4, &state); /* 0x81 0x30 0x89 0x3A */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+      }
+      return 0;
+
+    case 65001:
+      /* Locale encoding is CP65001 = UTF-8.  */
+      {
+        char input[] = "B\303\274\303\237er"; /* "Büßer" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'B');
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 1, 1, &state);
+        ASSERT (ret == (size_t)(-2));
+        ASSERT (wc == (wchar_t) 0xBADFACE);
+        ASSERT (!mbsinit (&state));
+        input[1] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 2, 5, &state);
+        ASSERT (ret == 1);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x00FC);
+        ASSERT (mbsinit (&state));
+        input[2] = '\0';
+
+        /* Test support of NULL first argument.  */
+        ret = mbrtowc (NULL, input + 3, 4, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 3, 4, &state);
+        ASSERT (ret == 2);
+        ASSERT (wctob (wc) == EOF);
+        ASSERT (wc == 0x00DF);
+        ASSERT (mbsinit (&state));
+        input[3] = '\0';
+        input[4] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 5, 2, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'e');
+        ASSERT (mbsinit (&state));
+        input[5] = '\0';
+
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, input + 6, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (wc == 'r');
+        ASSERT (mbsinit (&state));
+
+        /* Test some invalid input.  */
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\303\300", 2, &state); /* 0xC3 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\343\300", 2, &state); /* 0xE3 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\343\300\200", 3, &state); /* 0xE3 0xC0 0x80 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\343\200\300", 3, &state); /* 0xE3 0x80 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\363\300", 2, &state); /* 0xF3 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\363\300\200\200", 4, &state); /* 0xF3 0xC0 0x80 0x80 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\363\200\300", 3, &state); /* 0xF3 0x80 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\363\200\300\200", 4, &state); /* 0xF3 0x80 0xC0 0x80 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        wc = (wchar_t) 0xBADFACE;
+        ret = mbrtowc (&wc, "\363\200\200\300", 4, &state); /* 0xF3 0x80 0x80 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+      }
+      return 0;
+
+    default:
+      return 1;
+    }
+}
+
+int
+main (int argc, char *argv[])
+{
+  int codepage = atoi (argv[argc - 1]);
+  int result;
+  int i;
+
+  result = 77;
+  for (i = 1; i < argc - 1; i++)
+    {
+      int ret = test_one_locale (argv[i], codepage);
+
+      if (ret != 77)
+        result = ret;
+    }
+
+  if (result == 77)
+    {
+      fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+               codepage);
+    }
+  return result;
+}
+
+#else
+
+int
+main (int argc, char *argv[])
+{
+  fputs ("Skipping test: not a native Windows system\n", stderr);
+  return 77;
+}
+
+#endif
diff --git a/tests/test-mbrtowc.c b/tests/test-mbrtowc.c
new file mode 100644 (file)
index 0000000..727016a
--- /dev/null
@@ -0,0 +1,343 @@
+/* Test of conversion of multibyte character to wide character.
+   Copyright (C) 2008-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 Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mbrtowc, size_t, (wchar_t *, char const *, size_t,
+                                   mbstate_t *));
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  mbstate_t state;
+  wchar_t wc;
+  size_t ret;
+
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  /* Test zero-length input.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    wc = (wchar_t) 0xBADFACE;
+    ret = mbrtowc (&wc, "x", 0, &state);
+    /* gnulib's implementation returns (size_t)(-2).
+       The AIX 5.1 implementation returns (size_t)(-1).
+       glibc's implementation returns 0.  */
+    ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0);
+    ASSERT (mbsinit (&state));
+  }
+
+  /* Test NUL byte input.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    wc = (wchar_t) 0xBADFACE;
+    ret = mbrtowc (&wc, "", 1, &state);
+    ASSERT (ret == 0);
+    ASSERT (wc == 0);
+    ASSERT (mbsinit (&state));
+    ret = mbrtowc (NULL, "", 1, &state);
+    ASSERT (ret == 0);
+    ASSERT (mbsinit (&state));
+  }
+
+  /* Test single-byte input.  */
+  {
+    int c;
+    char buf[1];
+
+    memset (&state, '\0', sizeof (mbstate_t));
+    for (c = 0; c < 0x100; c++)
+      switch (c)
+        {
+        case '\t': case '\v': case '\f':
+        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 '~':
+          /* c is in the ISO C "basic character set".  */
+          buf[0] = c;
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, buf, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == c);
+          ASSERT (mbsinit (&state));
+          ret = mbrtowc (NULL, buf, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          break;
+        }
+  }
+
+  /* Test special calling convention, passing a NULL pointer.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    wc = (wchar_t) 0xBADFACE;
+    ret = mbrtowc (&wc, NULL, 5, &state);
+    ASSERT (ret == 0);
+    ASSERT (wc == (wchar_t) 0xBADFACE);
+    ASSERT (mbsinit (&state));
+  }
+
+  if (argc > 1)
+    switch (argv[1][0])
+      {
+      case '1':
+        /* Locale encoding is ISO-8859-1 or ISO-8859-15.  */
+        {
+          char input[] = "B\374\337er"; /* "Büßer" */
+          memset (&state, '\0', sizeof (mbstate_t));
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == 'B');
+          ASSERT (mbsinit (&state));
+          input[0] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 1, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wctob (wc) == (unsigned char) '\374');
+          ASSERT (mbsinit (&state));
+          input[1] = '\0';
+
+          /* Test support of NULL first argument.  */
+          ret = mbrtowc (NULL, input + 2, 3, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 2, 3, &state);
+          ASSERT (ret == 1);
+          ASSERT (wctob (wc) == (unsigned char) '\337');
+          ASSERT (mbsinit (&state));
+          input[2] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 3, 2, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == 'e');
+          ASSERT (mbsinit (&state));
+          input[3] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 4, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == 'r');
+          ASSERT (mbsinit (&state));
+        }
+        return 0;
+
+      case '2':
+        /* Locale encoding is UTF-8.  */
+        {
+          char input[] = "B\303\274\303\237er"; /* "Büßer" */
+          memset (&state, '\0', sizeof (mbstate_t));
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == 'B');
+          ASSERT (mbsinit (&state));
+          input[0] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 1, 1, &state);
+          ASSERT (ret == (size_t)(-2));
+          ASSERT (wc == (wchar_t) 0xBADFACE);
+          ASSERT (!mbsinit (&state));
+          input[1] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 2, 5, &state);
+          ASSERT (ret == 1);
+          ASSERT (wctob (wc) == EOF);
+          ASSERT (mbsinit (&state));
+          input[2] = '\0';
+
+          /* Test support of NULL first argument.  */
+          ret = mbrtowc (NULL, input + 3, 4, &state);
+          ASSERT (ret == 2);
+          ASSERT (mbsinit (&state));
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 3, 4, &state);
+          ASSERT (ret == 2);
+          ASSERT (wctob (wc) == EOF);
+          ASSERT (mbsinit (&state));
+          input[3] = '\0';
+          input[4] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 5, 2, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == 'e');
+          ASSERT (mbsinit (&state));
+          input[5] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 6, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == 'r');
+          ASSERT (mbsinit (&state));
+        }
+        return 0;
+
+      case '3':
+        /* Locale encoding is EUC-JP.  */
+        {
+          char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */
+          memset (&state, '\0', sizeof (mbstate_t));
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == '<');
+          ASSERT (mbsinit (&state));
+          input[0] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 1, 2, &state);
+          ASSERT (ret == 2);
+          ASSERT (wctob (wc) == EOF);
+          ASSERT (mbsinit (&state));
+          input[1] = '\0';
+          input[2] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 3, 1, &state);
+          ASSERT (ret == (size_t)(-2));
+          ASSERT (wc == (wchar_t) 0xBADFACE);
+          ASSERT (!mbsinit (&state));
+          input[3] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 4, 4, &state);
+          ASSERT (ret == 1);
+          ASSERT (wctob (wc) == EOF);
+          ASSERT (mbsinit (&state));
+          input[4] = '\0';
+
+          /* Test support of NULL first argument.  */
+          ret = mbrtowc (NULL, input + 5, 3, &state);
+          ASSERT (ret == 2);
+          ASSERT (mbsinit (&state));
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 5, 3, &state);
+          ASSERT (ret == 2);
+          ASSERT (wctob (wc) == EOF);
+          ASSERT (mbsinit (&state));
+          input[5] = '\0';
+          input[6] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 7, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == '>');
+          ASSERT (mbsinit (&state));
+        }
+        return 0;
+
+      case '4':
+        /* Locale encoding is GB18030.  */
+        {
+          char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+          memset (&state, '\0', sizeof (mbstate_t));
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == 'B');
+          ASSERT (mbsinit (&state));
+          input[0] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 1, 1, &state);
+          ASSERT (ret == (size_t)(-2));
+          ASSERT (wc == (wchar_t) 0xBADFACE);
+          ASSERT (!mbsinit (&state));
+          input[1] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 2, 7, &state);
+          ASSERT (ret == 1);
+          ASSERT (wctob (wc) == EOF);
+          ASSERT (mbsinit (&state));
+          input[2] = '\0';
+
+          /* Test support of NULL first argument.  */
+          ret = mbrtowc (NULL, input + 3, 6, &state);
+          ASSERT (ret == 4);
+          ASSERT (mbsinit (&state));
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 3, 6, &state);
+          ASSERT (ret == 4);
+          ASSERT (wctob (wc) == EOF);
+          ASSERT (mbsinit (&state));
+          input[3] = '\0';
+          input[4] = '\0';
+          input[5] = '\0';
+          input[6] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 7, 2, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == 'e');
+          ASSERT (mbsinit (&state));
+          input[5] = '\0';
+
+          wc = (wchar_t) 0xBADFACE;
+          ret = mbrtowc (&wc, input + 8, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (wc == 'r');
+          ASSERT (mbsinit (&state));
+        }
+        return 0;
+      }
+
+  return 1;
+}
diff --git a/tests/test-mbrtowc1.sh b/tests/test-mbrtowc1.sh
new file mode 100755 (executable)
index 0000000..3becba3
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no traditional french locale is installed"
+  else
+    echo "Skipping test: no traditional french locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR \
+./test-mbrtowc${EXEEXT} 1
diff --git a/tests/test-mbrtowc2.sh b/tests/test-mbrtowc2.sh
new file mode 100755 (executable)
index 0000000..0405aba
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no french Unicode locale is installed"
+  else
+    echo "Skipping test: no french Unicode locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-mbrtowc${EXEEXT} 2
diff --git a/tests/test-mbrtowc3.sh b/tests/test-mbrtowc3.sh
new file mode 100755 (executable)
index 0000000..63a89a2
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific EUC-JP locale is installed.
+: ${LOCALE_JA=ja_JP}
+if test $LOCALE_JA = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no traditional japanese locale is installed"
+  else
+    echo "Skipping test: no traditional japanese locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_JA \
+./test-mbrtowc${EXEEXT} 3
diff --git a/tests/test-mbrtowc4.sh b/tests/test-mbrtowc4.sh
new file mode 100755 (executable)
index 0000000..b299a2c
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no transitional chinese locale is installed"
+  else
+    echo "Skipping test: no transitional chinese locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_ZH_CN \
+./test-mbrtowc${EXEEXT} 4
diff --git a/tests/test-mbscasestr1.c b/tests/test-mbscasestr1.c
new file mode 100644 (file)
index 0000000..a1c476f
--- /dev/null
@@ -0,0 +1,129 @@
+/* Test of case-insensitive searching in a string.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  /* This test is executed in the C locale.  */
+
+  {
+    const char input[] = "foo";
+    const char *result = mbscasestr (input, "");
+    ASSERT (result == input);
+  }
+
+  {
+    const char input[] = "foo";
+    const char *result = mbscasestr (input, "O");
+    ASSERT (result == input + 1);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = mbscasestr (input, "ABCDaBD");
+    ASSERT (result == input + 15);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = mbscasestr (input, "ABCDaBE");
+    ASSERT (result == NULL);
+  }
+
+  /* Check that a very long haystack is handled quickly if the needle is
+     short and occurs near the beginning.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *needle =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaAaaaaaaAAAAaaaaaaa"
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+    char *haystack = (char *) malloc (m + 1);
+    if (haystack != NULL)
+      {
+        memset (haystack, 'A', m);
+        haystack[0] = 'B';
+        haystack[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (mbscasestr (haystack, needle) == haystack + 1);
+          }
+
+        free (haystack);
+      }
+  }
+
+  /* Check that a very long needle is discarded quickly if the haystack is
+     short.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *haystack =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
+    char *needle = (char *) malloc (m + 1);
+    if (needle != NULL)
+      {
+        memset (needle, 'A', m);
+        needle[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (mbscasestr (haystack, needle) == NULL);
+          }
+
+        free (needle);
+      }
+  }
+
+  /* Check that the asymptotic worst-case complexity is not quadratic.  */
+  {
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    if (haystack != NULL && needle != NULL)
+      {
+        const char *result;
+
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = '\0';
+
+        memset (needle, 'a', m);
+        needle[m] = 'B';
+        needle[m + 1] = '\0';
+
+        result = mbscasestr (haystack, needle);
+        ASSERT (result == haystack + m);
+      }
+    free (needle);
+    free (haystack);
+  }
+
+  return 0;
+}
diff --git a/tests/test-mbscasestr2.c b/tests/test-mbscasestr2.c
new file mode 100644 (file)
index 0000000..f9e120c
--- /dev/null
@@ -0,0 +1,141 @@
+/* Test of searching in a string.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <locale.h>
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  {
+    const char input[] = "f\303\266\303\266";
+    const char *result = mbscasestr (input, "");
+    ASSERT (result == input);
+  }
+
+  {
+    const char input[] = "f\303\266\303\266";
+    const char *result = mbscasestr (input, "\303\266");
+    ASSERT (result == input + 1);
+  }
+
+  {
+    const char input[] = "f\303\266\303\266";
+    const char *result = mbscasestr (input, "\266\303");
+    ASSERT (result == NULL);
+  }
+
+  {
+    const char input[] = "\303\204BC \303\204BCD\303\204B \303\204BCD\303\204BCD\303\204BDE"; /* "ÄBC ÄBCDÄB ÄBCDÄBCDÄBDE" */
+    const char *result = mbscasestr (input, "\303\244BCD\303\204BD"); /* "äBCDÄBD" */
+    ASSERT (result == input + 19);
+  }
+
+  {
+    const char input[] = "\303\204BC \303\204BCD\303\204B \303\204BCD\303\204BCD\303\204BDE"; /* "ÄBC ÄBCDÄB ÄBCDÄBCDÄBDE" */
+    const char *result = mbscasestr (input, "\303\204BCD\303\204BE"); /* "ÄBCDÄBE" */
+    ASSERT (result == NULL);
+  }
+
+  /* Check that a very long haystack is handled quickly if the needle is
+     short and occurs near the beginning.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *needle =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+    char *haystack = (char *) malloc (m + 1);
+    if (haystack != NULL)
+      {
+        memset (haystack, 'a', m);
+        haystack[0] = '\303'; haystack[1] = '\204';
+        haystack[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (mbscasestr (haystack, needle) == haystack + 2);
+          }
+
+        free (haystack);
+      }
+  }
+
+  /* Check that a very long needle is discarded quickly if the haystack is
+     short.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *haystack =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+      "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+      "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+      "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+      "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207";
+    char *needle = (char *) malloc (m + 1);
+    if (needle != NULL)
+      {
+        memset (needle, 'A', m);
+        needle[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (mbscasestr (haystack, needle) == NULL);
+          }
+
+        free (needle);
+      }
+  }
+
+  /* Check that the asymptotic worst-case complexity is not quadratic.  */
+  {
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 3);
+    char *needle = (char *) malloc (m + 3);
+    if (haystack != NULL && needle != NULL)
+      {
+        const char *result;
+
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = '\303'; haystack[2 * m + 1] = '\247';
+        haystack[2 * m + 2] = '\0';
+
+        memset (needle, 'a', m);
+        needle[m] = '\303'; needle[m + 1] = '\207';
+        needle[m + 2] = '\0';
+
+        result = mbscasestr (haystack, needle);
+        ASSERT (result == haystack + m);
+      }
+    free (needle);
+    free (haystack);
+  }
+
+  return 0;
+}
diff --git a/tests/test-mbscasestr2.sh b/tests/test-mbscasestr2.sh
new file mode 100755 (executable)
index 0000000..bcb3ecd
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no french Unicode locale is installed"
+  else
+    echo "Skipping test: no french Unicode locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-mbscasestr2${EXEEXT}
diff --git a/tests/test-mbscasestr3.c b/tests/test-mbscasestr3.c
new file mode 100644 (file)
index 0000000..2585269
--- /dev/null
@@ -0,0 +1,82 @@
+/* Test of case-insensitive searching in a string.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <locale.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  /* Tests with a character < 0x30.  */
+  {
+    const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */
+    const char *result = mbscasestr (input, " ");
+    ASSERT (result == input + 4);
+  }
+
+  {
+    const char input[] = "\312\276\300\375"; /* "示例" */
+    const char *result = mbscasestr (input, " ");
+    ASSERT (result == NULL);
+  }
+
+  /* Tests with a character >= 0x30.  */
+  {
+    const char input[] = "\272\305123\324\313\320\320\241\243"; /* "号123运行。" */
+    const char *result = mbscasestr (input, "2");
+    ASSERT (result == input + 3);
+  }
+
+  /* The following tests show how mbscasestr() is different from
+     strcasestr().  */
+
+  {
+    const char input[] = "\313\320\320\320"; /* "诵行" */
+    const char *result = mbscasestr (input, "\320\320"); /* "行" */
+    ASSERT (result == input + 2);
+  }
+
+  {
+    const char input[] = "\203\062\332\066123\324\313\320\320\241\243"; /* "씋123运行。" */
+    const char *result = mbscasestr (input, "2");
+    ASSERT (result == input + 5);
+  }
+
+  {
+    const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */
+    const char *result = mbscasestr (input, "\276\300"); /* "纠" */
+    ASSERT (result == NULL);
+  }
+
+  {
+    const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */
+    const char *result = mbscasestr (input, "\375 "); /* invalid multibyte sequence */
+    ASSERT (result == NULL);
+  }
+
+  return 0;
+}
diff --git a/tests/test-mbscasestr3.sh b/tests/test-mbscasestr3.sh
new file mode 100755 (executable)
index 0000000..6e45a7e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no chinese GB18030 locale is installed"
+  else
+    echo "Skipping test: no chinese GB18030 locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_ZH_CN \
+./test-mbscasestr3${EXEEXT}
diff --git a/tests/test-mbscasestr4.c b/tests/test-mbscasestr4.c
new file mode 100644 (file)
index 0000000..5cfaaa6
--- /dev/null
@@ -0,0 +1,56 @@
+/* Test of case-insensitive searching in a string.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <locale.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  {
+    const char input[] = "GOLD NEEDLE BEATS TIN NEEDLE";
+    ASSERT (mbscasestr (input, "Needle") == input + 5);
+  }
+
+  /* The following tests show how mbscasestr() is different from
+     strcasestr().  */
+
+  {
+    const char input[] = "s\303\266zc\303\274k"; /* sözcük */
+    ASSERT (mbscasestr (input, "\303\266z") == input + 1);
+    ASSERT (mbscasestr (input, "\303\266c") == NULL);
+  }
+
+  /* This test shows how a string of larger size can be found in a string of
+     smaller size.  */
+  {
+    const char input[] = "*Tbilisi imini*";
+    ASSERT (mbscasestr (input, "TB\304\260L\304\260S\304\260 \304\260m\304\260n\304\260") == input + 1); /* TBİLİSİ İmİnİ */
+  }
+
+  return 0;
+}
diff --git a/tests/test-mbscasestr4.sh b/tests/test-mbscasestr4.sh
new file mode 100755 (executable)
index 0000000..6c37280
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific Turkish locale is installed.
+: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+if test $LOCALE_TR_UTF8 = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no turkish Unicode locale is installed"
+  else
+    echo "Skipping test: no turkish Unicode locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_TR_UTF8 \
+./test-mbscasestr4${EXEEXT}
diff --git a/tests/test-mbsinit.c b/tests/test-mbsinit.c
new file mode 100644 (file)
index 0000000..2cc2924
--- /dev/null
@@ -0,0 +1,55 @@
+/* Test of test for initial conversion state.
+   Copyright (C) 2008-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 Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mbsinit, int, (const mbstate_t *));
+
+#include <locale.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  static mbstate_t state;
+
+  ASSERT (mbsinit (NULL));
+
+  ASSERT (mbsinit (&state));
+
+  if (argc > 1)
+    {
+      static const char input[1] = "\303";
+      wchar_t wc;
+      size_t ret;
+
+      /* configure should already have checked that the locale is supported.  */
+      if (setlocale (LC_ALL, "") == NULL)
+        return 1;
+
+      ret = mbrtowc (&wc, input, 1, &state);
+      ASSERT (ret == (size_t)(-2));
+      ASSERT (!mbsinit (&state));
+    }
+
+  return 0;
+}
diff --git a/tests/test-mbsinit.sh b/tests/test-mbsinit.sh
new file mode 100755 (executable)
index 0000000..bbda48d
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no french Unicode locale is installed"
+  else
+    echo "Skipping test: no french Unicode locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-mbsinit${EXEEXT}
diff --git a/tests/test-mbsrtowcs.c b/tests/test-mbsrtowcs.c
new file mode 100644 (file)
index 0000000..9a63ed9
--- /dev/null
@@ -0,0 +1,293 @@
+/* Test of conversion of string to wide string.
+   Copyright (C) 2008-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 Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mbsrtowcs, size_t, (wchar_t *, char const **, size_t,
+                                     mbstate_t *));
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  mbstate_t state;
+  wchar_t wc;
+  size_t ret;
+
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  /* Test NUL byte input.  */
+  {
+    const char *src;
+
+    memset (&state, '\0', sizeof (mbstate_t));
+
+    src = "";
+    ret = mbsrtowcs (NULL, &src, 0, &state);
+    ASSERT (ret == 0);
+    ASSERT (mbsinit (&state));
+
+    src = "";
+    ret = mbsrtowcs (NULL, &src, 1, &state);
+    ASSERT (ret == 0);
+    ASSERT (mbsinit (&state));
+
+    wc = (wchar_t) 0xBADFACE;
+    src = "";
+    ret = mbsrtowcs (&wc, &src, 0, &state);
+    ASSERT (ret == 0);
+    ASSERT (wc == (wchar_t) 0xBADFACE);
+    ASSERT (mbsinit (&state));
+
+    wc = (wchar_t) 0xBADFACE;
+    src = "";
+    ret = mbsrtowcs (&wc, &src, 1, &state);
+    ASSERT (ret == 0);
+    ASSERT (wc == 0);
+    ASSERT (mbsinit (&state));
+  }
+
+  if (argc > 1)
+    {
+      int unlimited;
+
+      for (unlimited = 0; unlimited < 2; unlimited++)
+        {
+          #define BUFSIZE 10
+          wchar_t buf[BUFSIZE];
+          const char *src;
+          mbstate_t temp_state;
+
+          {
+            size_t i;
+            for (i = 0; i < BUFSIZE; i++)
+              buf[i] = (wchar_t) 0xBADFACE;
+          }
+
+          switch (argv[1][0])
+            {
+            case '1':
+              /* Locale encoding is ISO-8859-1 or ISO-8859-15.  */
+              {
+                char input[] = "B\374\337er"; /* "Büßer" */
+                memset (&state, '\0', sizeof (mbstate_t));
+
+                wc = (wchar_t) 0xBADFACE;
+                ret = mbrtowc (&wc, input, 1, &state);
+                ASSERT (ret == 1);
+                ASSERT (wc == 'B');
+                ASSERT (mbsinit (&state));
+                input[0] = '\0';
+
+                wc = (wchar_t) 0xBADFACE;
+                ret = mbrtowc (&wc, input + 1, 1, &state);
+                ASSERT (ret == 1);
+                ASSERT (wctob (wc) == (unsigned char) '\374');
+                ASSERT (mbsinit (&state));
+                input[1] = '\0';
+
+                src = input + 2;
+                temp_state = state;
+                ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 1, &temp_state);
+                ASSERT (ret == 3);
+                ASSERT (src == input + 2);
+                ASSERT (mbsinit (&state));
+
+                src = input + 2;
+                ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 1, &state);
+                ASSERT (ret == (unlimited ? 3 : 1));
+                ASSERT (src == (unlimited ? NULL : input + 3));
+                ASSERT (wctob (buf[0]) == (unsigned char) '\337');
+                if (unlimited)
+                  {
+                    ASSERT (buf[1] == 'e');
+                    ASSERT (buf[2] == 'r');
+                    ASSERT (buf[3] == 0);
+                    ASSERT (buf[4] == (wchar_t) 0xBADFACE);
+                  }
+                else
+                  ASSERT (buf[1] == (wchar_t) 0xBADFACE);
+                ASSERT (mbsinit (&state));
+              }
+              break;
+
+            case '2':
+              /* Locale encoding is UTF-8.  */
+              {
+                char input[] = "B\303\274\303\237er"; /* "Büßer" */
+                memset (&state, '\0', sizeof (mbstate_t));
+
+                wc = (wchar_t) 0xBADFACE;
+                ret = mbrtowc (&wc, input, 1, &state);
+                ASSERT (ret == 1);
+                ASSERT (wc == 'B');
+                ASSERT (mbsinit (&state));
+                input[0] = '\0';
+
+                wc = (wchar_t) 0xBADFACE;
+                ret = mbrtowc (&wc, input + 1, 1, &state);
+                ASSERT (ret == (size_t)(-2));
+                ASSERT (wc == (wchar_t) 0xBADFACE);
+                ASSERT (!mbsinit (&state));
+                input[1] = '\0';
+
+                src = input + 2;
+                temp_state = state;
+                ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 2, &temp_state);
+                ASSERT (ret == 4);
+                ASSERT (src == input + 2);
+                ASSERT (!mbsinit (&state));
+
+                src = input + 2;
+                ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 2, &state);
+                ASSERT (ret == (unlimited ? 4 : 2));
+                ASSERT (src == (unlimited ? NULL : input + 5));
+                ASSERT (wctob (buf[0]) == EOF);
+                ASSERT (wctob (buf[1]) == EOF);
+                if (unlimited)
+                  {
+                    ASSERT (buf[2] == 'e');
+                    ASSERT (buf[3] == 'r');
+                    ASSERT (buf[4] == 0);
+                    ASSERT (buf[5] == (wchar_t) 0xBADFACE);
+                  }
+                else
+                  ASSERT (buf[2] == (wchar_t) 0xBADFACE);
+                ASSERT (mbsinit (&state));
+              }
+              break;
+
+            case '3':
+              /* Locale encoding is EUC-JP.  */
+              {
+                char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */
+                memset (&state, '\0', sizeof (mbstate_t));
+
+                wc = (wchar_t) 0xBADFACE;
+                ret = mbrtowc (&wc, input, 1, &state);
+                ASSERT (ret == 1);
+                ASSERT (wc == '<');
+                ASSERT (mbsinit (&state));
+                input[0] = '\0';
+
+                wc = (wchar_t) 0xBADFACE;
+                ret = mbrtowc (&wc, input + 1, 2, &state);
+                ASSERT (ret == 2);
+                ASSERT (wctob (wc) == EOF);
+                ASSERT (mbsinit (&state));
+                input[1] = '\0';
+                input[2] = '\0';
+
+                wc = (wchar_t) 0xBADFACE;
+                ret = mbrtowc (&wc, input + 3, 1, &state);
+                ASSERT (ret == (size_t)(-2));
+                ASSERT (wc == (wchar_t) 0xBADFACE);
+                ASSERT (!mbsinit (&state));
+                input[3] = '\0';
+
+                src = input + 4;
+                temp_state = state;
+                ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 2, &temp_state);
+                ASSERT (ret == 3);
+                ASSERT (src == input + 4);
+                ASSERT (!mbsinit (&state));
+
+                src = input + 4;
+                ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 2, &state);
+                ASSERT (ret == (unlimited ? 3 : 2));
+                ASSERT (src == (unlimited ? NULL : input + 7));
+                ASSERT (wctob (buf[0]) == EOF);
+                ASSERT (wctob (buf[1]) == EOF);
+                if (unlimited)
+                  {
+                    ASSERT (buf[2] == '>');
+                    ASSERT (buf[3] == 0);
+                    ASSERT (buf[4] == (wchar_t) 0xBADFACE);
+                  }
+                else
+                  ASSERT (buf[2] == (wchar_t) 0xBADFACE);
+                ASSERT (mbsinit (&state));
+              }
+              break;
+
+            case '4':
+              /* Locale encoding is GB18030.  */
+              {
+                char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+                memset (&state, '\0', sizeof (mbstate_t));
+
+                wc = (wchar_t) 0xBADFACE;
+                ret = mbrtowc (&wc, input, 1, &state);
+                ASSERT (ret == 1);
+                ASSERT (wc == 'B');
+                ASSERT (mbsinit (&state));
+                input[0] = '\0';
+
+                wc = (wchar_t) 0xBADFACE;
+                ret = mbrtowc (&wc, input + 1, 1, &state);
+                ASSERT (ret == (size_t)(-2));
+                ASSERT (wc == (wchar_t) 0xBADFACE);
+                ASSERT (!mbsinit (&state));
+                input[1] = '\0';
+
+                src = input + 2;
+                temp_state = state;
+                ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 2, &temp_state);
+                ASSERT (ret == 4);
+                ASSERT (src == input + 2);
+                ASSERT (!mbsinit (&state));
+
+                src = input + 2;
+                ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 2, &state);
+                ASSERT (ret == (unlimited ? 4 : 2));
+                ASSERT (src == (unlimited ? NULL : input + 7));
+                ASSERT (wctob (buf[0]) == EOF);
+                ASSERT (wctob (buf[1]) == EOF);
+                if (unlimited)
+                  {
+                    ASSERT (buf[2] == 'e');
+                    ASSERT (buf[3] == 'r');
+                    ASSERT (buf[4] == 0);
+                    ASSERT (buf[5] == (wchar_t) 0xBADFACE);
+                  }
+                else
+                  ASSERT (buf[2] == (wchar_t) 0xBADFACE);
+                ASSERT (mbsinit (&state));
+              }
+              break;
+
+            default:
+              return 1;
+            }
+        }
+
+      return 0;
+    }
+
+  return 1;
+}
diff --git a/tests/test-mbsrtowcs1.sh b/tests/test-mbsrtowcs1.sh
new file mode 100755 (executable)
index 0000000..01916e7
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no traditional french locale is installed"
+  else
+    echo "Skipping test: no traditional french locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR \
+./test-mbsrtowcs${EXEEXT} 1
diff --git a/tests/test-mbsrtowcs2.sh b/tests/test-mbsrtowcs2.sh
new file mode 100755 (executable)
index 0000000..f72ceb6
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no french Unicode locale is installed"
+  else
+    echo "Skipping test: no french Unicode locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-mbsrtowcs${EXEEXT} 2
diff --git a/tests/test-mbsrtowcs3.sh b/tests/test-mbsrtowcs3.sh
new file mode 100755 (executable)
index 0000000..b3c01d4
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific EUC-JP locale is installed.
+: ${LOCALE_JA=ja_JP}
+if test $LOCALE_JA = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no traditional japanese locale is installed"
+  else
+    echo "Skipping test: no traditional japanese locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_JA \
+./test-mbsrtowcs${EXEEXT} 3
diff --git a/tests/test-mbsrtowcs4.sh b/tests/test-mbsrtowcs4.sh
new file mode 100755 (executable)
index 0000000..226d6ff
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no transitional chinese locale is installed"
+  else
+    echo "Skipping test: no transitional chinese locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_ZH_CN \
+./test-mbsrtowcs${EXEEXT} 4
diff --git a/tests/test-mbsstr1.c b/tests/test-mbsstr1.c
new file mode 100644 (file)
index 0000000..8701d81
--- /dev/null
@@ -0,0 +1,128 @@
+/* Test of searching in a string.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  /* This test is executed in the C locale.  */
+
+  {
+    const char input[] = "foo";
+    const char *result = mbsstr (input, "");
+    ASSERT (result == input);
+  }
+
+  {
+    const char input[] = "foo";
+    const char *result = mbsstr (input, "o");
+    ASSERT (result == input + 1);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = mbsstr (input, "ABCDABD");
+    ASSERT (result == input + 15);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = mbsstr (input, "ABCDABE");
+    ASSERT (result == NULL);
+  }
+
+  /* Check that a very long haystack is handled quickly if the needle is
+     short and occurs near the beginning.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *needle =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+    char *haystack = (char *) malloc (m + 1);
+    if (haystack != NULL)
+      {
+        memset (haystack, 'A', m);
+        haystack[0] = 'B';
+        haystack[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (mbsstr (haystack, needle) == haystack + 1);
+          }
+
+        free (haystack);
+      }
+  }
+
+  /* Check that a very long needle is discarded quickly if the haystack is
+     short.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *haystack =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
+    char *needle = (char *) malloc (m + 1);
+    if (needle != NULL)
+      {
+        memset (needle, 'A', m);
+        needle[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (mbsstr (haystack, needle) == NULL);
+          }
+
+        free (needle);
+      }
+  }
+
+  /* Check that the asymptotic worst-case complexity is not quadratic.  */
+  {
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    if (haystack != NULL && needle != NULL)
+      {
+        const char *result;
+
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = '\0';
+
+        memset (needle, 'A', m);
+        needle[m] = 'B';
+        needle[m + 1] = '\0';
+
+        result = mbsstr (haystack, needle);
+        ASSERT (result == haystack + m);
+      }
+    free (needle);
+    free (haystack);
+  }
+
+  return 0;
+}
diff --git a/tests/test-mbsstr2.c b/tests/test-mbsstr2.c
new file mode 100644 (file)
index 0000000..7eedc7e
--- /dev/null
@@ -0,0 +1,141 @@
+/* Test of searching in a string.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <locale.h>
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  {
+    const char input[] = "f\303\266\303\266";
+    const char *result = mbsstr (input, "");
+    ASSERT (result == input);
+  }
+
+  {
+    const char input[] = "f\303\266\303\266";
+    const char *result = mbsstr (input, "\303\266");
+    ASSERT (result == input + 1);
+  }
+
+  {
+    const char input[] = "f\303\266\303\266";
+    const char *result = mbsstr (input, "\266\303");
+    ASSERT (result == NULL);
+  }
+
+  {
+    const char input[] = "\303\204BC \303\204BCD\303\204B \303\204BCD\303\204BCD\303\204BDE"; /* "ÄBC ÄBCDÄB ÄBCDÄBCDÄBDE" */
+    const char *result = mbsstr (input, "\303\204BCD\303\204BD"); /* "ÄBCDÄBD" */
+    ASSERT (result == input + 19);
+  }
+
+  {
+    const char input[] = "\303\204BC \303\204BCD\303\204B \303\204BCD\303\204BCD\303\204BDE"; /* "ÄBC ÄBCDÄB ÄBCDÄBCDÄBDE" */
+    const char *result = mbsstr (input, "\303\204BCD\303\204BE"); /* "ÄBCDÄBE" */
+    ASSERT (result == NULL);
+  }
+
+  /* Check that a very long haystack is handled quickly if the needle is
+     short and occurs near the beginning.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *needle =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+    char *haystack = (char *) malloc (m + 1);
+    if (haystack != NULL)
+      {
+        memset (haystack, 'A', m);
+        haystack[0] = '\303'; haystack[1] = '\204';
+        haystack[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (mbsstr (haystack, needle) == haystack + 2);
+          }
+
+        free (haystack);
+      }
+  }
+
+  /* Check that a very long needle is discarded quickly if the haystack is
+     short.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *haystack =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+      "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+      "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+      "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+      "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207";
+    char *needle = (char *) malloc (m + 1);
+    if (needle != NULL)
+      {
+        memset (needle, 'A', m);
+        needle[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (mbsstr (haystack, needle) == NULL);
+          }
+
+        free (needle);
+      }
+  }
+
+  /* Check that the asymptotic worst-case complexity is not quadratic.  */
+  {
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 3);
+    char *needle = (char *) malloc (m + 3);
+    if (haystack != NULL && needle != NULL)
+      {
+        const char *result;
+
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = '\303'; haystack[2 * m + 1] = '\207';
+        haystack[2 * m + 2] = '\0';
+
+        memset (needle, 'A', m);
+        needle[m] = '\303'; needle[m + 1] = '\207';
+        needle[m + 2] = '\0';
+
+        result = mbsstr (haystack, needle);
+        ASSERT (result == haystack + m);
+      }
+    free (needle);
+    free (haystack);
+  }
+
+  return 0;
+}
diff --git a/tests/test-mbsstr2.sh b/tests/test-mbsstr2.sh
new file mode 100755 (executable)
index 0000000..79d06df
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no french Unicode locale is installed"
+  else
+    echo "Skipping test: no french Unicode locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-mbsstr2${EXEEXT}
diff --git a/tests/test-mbsstr3.c b/tests/test-mbsstr3.c
new file mode 100644 (file)
index 0000000..c7fa18b
--- /dev/null
@@ -0,0 +1,81 @@
+/* Test of searching in a string.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <locale.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  /* Tests with a character < 0x30.  */
+  {
+    const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */
+    const char *result = mbsstr (input, " ");
+    ASSERT (result == input + 4);
+  }
+
+  {
+    const char input[] = "\312\276\300\375"; /* "示例" */
+    const char *result = mbsstr (input, " ");
+    ASSERT (result == NULL);
+  }
+
+  /* Tests with a character >= 0x30.  */
+  {
+    const char input[] = "\272\305123\324\313\320\320\241\243"; /* "号123运行。" */
+    const char *result = mbsstr (input, "2");
+    ASSERT (result == input + 3);
+  }
+
+  /* The following tests show how mbsstr() is different from strstr().  */
+
+  {
+    const char input[] = "\313\320\320\320"; /* "诵行" */
+    const char *result = mbsstr (input, "\320\320"); /* "行" */
+    ASSERT (result == input + 2);
+  }
+
+  {
+    const char input[] = "\203\062\332\066123\324\313\320\320\241\243"; /* "씋123运行。" */
+    const char *result = mbsstr (input, "2");
+    ASSERT (result == input + 5);
+  }
+
+  {
+    const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */
+    const char *result = mbsstr (input, "\276\300"); /* "纠" */
+    ASSERT (result == NULL);
+  }
+
+  {
+    const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */
+    const char *result = mbsstr (input, "\375 "); /* invalid multibyte sequence */
+    ASSERT (result == NULL);
+  }
+
+  return 0;
+}
diff --git a/tests/test-mbsstr3.sh b/tests/test-mbsstr3.sh
new file mode 100755 (executable)
index 0000000..732c01f
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no chinese GB18030 locale is installed"
+  else
+    echo "Skipping test: no chinese GB18030 locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_ZH_CN \
+./test-mbsstr3${EXEEXT}
diff --git a/tests/test-memchr.c b/tests/test-memchr.c
new file mode 100644 (file)
index 0000000..a11f6cd
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Written by Eric Blake and Bruno Haible
+ *
+ * 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/>.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t));
+
+#include <stdlib.h>
+
+#include "zerosize-ptr.h"
+#include "macros.h"
+
+/* Calculating void * + int is not portable, so this wrapper converts
+   to char * to make the tests easier to write.  */
+#define MEMCHR (char *) memchr
+
+int
+main (void)
+{
+  size_t n = 0x100000;
+  char *input = malloc (n);
+  ASSERT (input);
+
+  input[0] = 'a';
+  input[1] = 'b';
+  memset (input + 2, 'c', 1024);
+  memset (input + 1026, 'd', n - 1028);
+  input[n - 2] = 'e';
+  input[n - 1] = 'a';
+
+  /* Basic behavior tests.  */
+  ASSERT (MEMCHR (input, 'a', n) == input);
+
+  ASSERT (MEMCHR (input, 'a', 0) == NULL);
+  ASSERT (MEMCHR (zerosize_ptr (), 'a', 0) == NULL);
+
+  ASSERT (MEMCHR (input, 'b', n) == input + 1);
+  ASSERT (MEMCHR (input, 'c', n) == input + 2);
+  ASSERT (MEMCHR (input, 'd', n) == input + 1026);
+
+  ASSERT (MEMCHR (input + 1, 'a', n - 1) == input + n - 1);
+  ASSERT (MEMCHR (input + 1, 'e', n - 1) == input + n - 2);
+  ASSERT (MEMCHR (input + 1, 0x789abc00 | 'e', n - 1) == input + n - 2);
+
+  ASSERT (MEMCHR (input, 'f', n) == NULL);
+  ASSERT (MEMCHR (input, '\0', n) == NULL);
+
+  /* Check that a very long haystack is handled quickly if the byte is
+     found near the beginning.  */
+  {
+    size_t repeat = 10000;
+    for (; repeat > 0; repeat--)
+      {
+        ASSERT (MEMCHR (input, 'c', n) == input + 2);
+      }
+  }
+
+  /* Alignment tests.  */
+  {
+    int i, j;
+    for (i = 0; i < 32; i++)
+      {
+        for (j = 0; j < 256; j++)
+          input[i + j] = j;
+        for (j = 0; j < 256; j++)
+          {
+            ASSERT (MEMCHR (input + i, j, 256) == input + i + j);
+          }
+      }
+  }
+
+  /* Check that memchr() does not read past the first occurrence of the
+     byte being searched.  See the Austin Group's clarification
+     <http://www.opengroup.org/austin/docs/austin_454.txt>.
+     Test both '\0' and something else, since some implementations
+     special-case searching for NUL.
+  */
+  {
+    char *page_boundary = (char *) zerosize_ptr ();
+    /* Too small, and we miss cache line boundary tests; too large,
+       and the test takes cubically longer to complete.  */
+    int limit = 257;
+
+    if (page_boundary != NULL)
+      {
+        for (n = 1; n <= limit; n++)
+          {
+            char *mem = page_boundary - n;
+            memset (mem, 'X', n);
+            ASSERT (MEMCHR (mem, 'U', n) == NULL);
+            ASSERT (MEMCHR (mem, 0, n) == NULL);
+
+            {
+              size_t i;
+              size_t k;
+
+              for (i = 0; i < n; i++)
+                {
+                  mem[i] = 'U';
+                  for (k = i + 1; k < n + limit; k++)
+                    ASSERT (MEMCHR (mem, 'U', k) == mem + i);
+                  mem[i] = 0;
+                  for (k = i + 1; k < n + limit; k++)
+                    ASSERT (MEMCHR (mem, 0, k) == mem + i);
+                  mem[i] = 'X';
+                }
+            }
+          }
+      }
+  }
+
+  free (input);
+
+  return 0;
+}
diff --git a/tests/test-memrchr.c b/tests/test-memrchr.c
new file mode 100644 (file)
index 0000000..d6d36c0
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Written by Eric Blake and Bruno Haible
+ *
+ * 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/>.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (memrchr, void *, (void const *, int, size_t));
+
+#include <stdlib.h>
+
+#include "zerosize-ptr.h"
+#include "macros.h"
+
+/* Calculating void * + int is not portable, so this wrapper converts
+   to char * to make the tests easier to write.  */
+#define MEMRCHR (char *) memrchr
+
+int
+main (void)
+{
+  size_t n = 0x100000;
+  char *input = malloc (n);
+  ASSERT (input);
+
+  input[n - 1] = 'a';
+  input[n - 2] = 'b';
+  memset (input + n - 1026, 'c', 1024);
+  memset (input + 2, 'd', n - 1028);
+  input[1] = 'e';
+  input[0] = 'a';
+
+  /* Basic behavior tests.  */
+  ASSERT (MEMRCHR (input, 'a', n) == input + n - 1);
+
+  ASSERT (MEMRCHR (input, 'a', 0) == NULL);
+  ASSERT (MEMRCHR (zerosize_ptr (), 'a', 0) == NULL);
+
+  ASSERT (MEMRCHR (input, 'b', n) == input + n - 2);
+  ASSERT (MEMRCHR (input, 'c', n) == input + n - 3);
+  ASSERT (MEMRCHR (input, 'd', n) == input + n - 1027);
+
+  ASSERT (MEMRCHR (input, 'a', n - 1) == input);
+  ASSERT (MEMRCHR (input, 'e', n - 1) == input + 1);
+
+  ASSERT (MEMRCHR (input, 'f', n) == NULL);
+  ASSERT (MEMRCHR (input, '\0', n) == NULL);
+
+  /* Check that a very long haystack is handled quickly if the byte is
+     found near the end.  */
+  {
+    size_t repeat = 10000;
+    for (; repeat > 0; repeat--)
+      {
+        ASSERT (MEMRCHR (input, 'c', n) == input + n - 3);
+      }
+  }
+
+  /* Alignment tests.  */
+  {
+    int i, j;
+    for (i = 0; i < 32; i++)
+      {
+        for (j = 0; j < 256; j++)
+          input[i + j] = j;
+        for (j = 0; j < 256; j++)
+          {
+            ASSERT (MEMRCHR (input + i, j, 256) == input + i + j);
+          }
+      }
+  }
+
+  free (input);
+
+  return 0;
+}
diff --git a/tests/test-mkdir.c b/tests/test-mkdir.c
new file mode 100644 (file)
index 0000000..86e6f8b
--- /dev/null
@@ -0,0 +1,47 @@
+/* Tests of mkdir.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mkdir, int, (char const *, mode_t));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-mkdir.t"
+
+#include "test-mkdir.h"
+
+int
+main (void)
+{
+  /* Clean up any trash from prior testsuite runs.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  return test_mkdir (mkdir, true);
+}
diff --git a/tests/test-mkdir.h b/tests/test-mkdir.h
new file mode 100644 (file)
index 0000000..62e8ec4
--- /dev/null
@@ -0,0 +1,98 @@
+/* Test of mkdir() function.
+   Copyright (C) 2009-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 is designed to test both mkdir(a,b) and
+   mkdirat(AT_FDCWD,a,b).  FUNC is the function to test.  Assumes that
+   BASE and ASSERT are already defined, and that appropriate headers
+   are already included.  If PRINT, warn before skipping tests with
+   status 77 when symlinks are unsupported.  */
+
+static int
+test_mkdir (int (*func) (char const *, mode_t), bool print)
+{
+  /* Test basic error handling.  */
+  ASSERT (close (creat (BASE "file", 0600)) == 0);
+  errno = 0;
+  ASSERT (func (BASE "file", 0700) == -1);
+  ASSERT (errno == EEXIST);
+  errno = 0;
+  ASSERT (func (BASE "file/", 0700) == -1);
+  ASSERT (errno == ENOTDIR || errno == EEXIST);
+  errno = 0;
+  ASSERT (func (BASE "file/dir", 0700) == -1);
+  ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EOPNOTSUPP);
+  ASSERT (unlink (BASE "file") == 0);
+  errno = 0;
+  ASSERT (func ("", 0700) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (BASE "dir/sub", 0700) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (BASE "dir/.", 0700) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (BASE "dir/.//", 0700) == -1);
+  ASSERT (errno == ENOENT);
+
+  /* Test trailing slash handling.  */
+  ASSERT (func (BASE "dir", 0700) == 0);
+  errno = 0;
+  ASSERT (func (BASE "dir", 0700) == -1);
+  ASSERT (errno == EEXIST);
+  ASSERT (rmdir (BASE "dir") == 0);
+  ASSERT (func (BASE "dir/", 0700) == 0);
+  errno = 0;
+  ASSERT (func (BASE "dir/", 0700) == -1);
+  ASSERT (errno == EEXIST);
+  ASSERT (rmdir (BASE "dir") == 0);
+
+  /* Test symlink behavior.  POSIX requires the creation of
+     directories through a dangling symlink with trailing slash, but
+     GNU does not yet implement that, so we support either behavior
+     for now.  */
+  if (symlink (BASE "dir", BASE "link"))
+    {
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+  errno = 0;
+  ASSERT (func (BASE "link", 0700) == -1);
+  ASSERT (errno == EEXIST);
+  {
+    int result;
+    errno = 0;
+    result = func (BASE "link/", 0700);
+    if (!result)
+      ASSERT (rmdir (BASE "dir") == 0);
+    else
+      {
+        ASSERT (result == -1);
+        ASSERT (errno == EEXIST);
+        errno = 0;
+        ASSERT (rmdir (BASE "dir") == -1);
+        ASSERT (errno == ENOENT);
+      }
+  }
+  errno = 0;
+  ASSERT (func (BASE "link/.", 0700) == -1);
+  ASSERT (errno == ENOENT);
+  ASSERT (unlink (BASE "link") == 0);
+
+  return 0;
+}
diff --git a/tests/test-mkdirat.c b/tests/test-mkdirat.c
new file mode 100644 (file)
index 0000000..89dfafc
--- /dev/null
@@ -0,0 +1,85 @@
+/* Tests of mkdirat.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mkdirat, int, (int, char const *, mode_t));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-mkdirat.t"
+
+#include "test-mkdir.h"
+
+static int dfd = AT_FDCWD;
+
+/* Wrapper to test mkdirat like mkdir.  */
+static int
+do_mkdir (char const *name, mode_t mode)
+{
+  return mkdirat (dfd, name, mode);
+}
+
+int
+main (void)
+{
+  int result;
+
+  /* Clean up any trash from prior testsuite runs.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  /* Test basic mkdir functionality.  */
+  result = test_mkdir (do_mkdir, false);
+  dfd = open (".", O_RDONLY);
+  ASSERT (0 <= dfd);
+  ASSERT (test_mkdir (do_mkdir, false) == result);
+
+  /* Tests specific to mkdirat.  */
+  ASSERT (mkdirat (dfd, BASE "dir1", 0700) == 0);
+  ASSERT (chdir (BASE "dir1") == 0);
+  ASSERT (close (dfd) == 0);
+  dfd = open ("..", O_RDONLY);
+  ASSERT (0 <= dfd);
+  ASSERT (mkdirat (dfd, BASE "dir2", 0700) == 0);
+  ASSERT (close (dfd) == 0);
+  errno = 0;
+  ASSERT (mkdirat (dfd, BASE "dir3", 0700) == -1);
+  ASSERT (errno == EBADF);
+  dfd = open ("/dev/null", O_RDONLY);
+  ASSERT (0 <= dfd);
+  errno = 0;
+  ASSERT (mkdirat (dfd, "dir3", 0700) == -1);
+  ASSERT (errno == ENOTDIR);
+  ASSERT (close (dfd) == 0);
+  ASSERT (chdir ("..") == 0);
+  ASSERT (rmdir (BASE "dir1") == 0);
+  ASSERT (rmdir (BASE "dir2") == 0);
+
+  return result;
+}
diff --git a/tests/test-modf.c b/tests/test-modf.c
new file mode 100644 (file)
index 0000000..c1b3cc1
--- /dev/null
@@ -0,0 +1,48 @@
+/* Test of modf() function.
+   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/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (modf, double, (double, double *));
+
+#include "macros.h"
+
+volatile double x;
+double y;
+double z;
+
+int
+main ()
+{
+  /* A particular positive value.  */
+  x = 5.972406760;
+  y = modf (x, &z);
+  ASSERT (y >= 0.972406759 && y <= 0.972406761);
+  ASSERT (z == 5.0);
+
+  /* A particular negative value.  */
+  x = -5.972406760;
+  y = modf (x, &z);
+  ASSERT (y >= -0.972406761 && y <= 0.972406759);
+  ASSERT (z == -5.0);
+
+  return 0;
+}
diff --git a/tests/test-nl_langinfo.c b/tests/test-nl_langinfo.c
new file mode 100644 (file)
index 0000000..964ea8d
--- /dev/null
@@ -0,0 +1,126 @@
+/* Test of nl_langinfo replacement.
+   Copyright (C) 2009-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 Bruno Haible <bruno@clisp.org>, 2009.  */
+
+#include <config.h>
+
+#include <langinfo.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (nl_langinfo, char *, (nl_item));
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "c-strcase.h"
+#include "macros.h"
+
+/* For GCC >= 4.3, silence the warnings
+     "comparison of unsigned expression >= 0 is always true"
+   in this file.  */
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+# pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
+
+int
+main (int argc, char *argv[])
+{
+  int pass = atoi (argv[1]);
+  /* pass    locale
+      0        C
+      1        traditional French locale
+      2        French UTF-8 locale
+   */
+
+  setlocale (LC_ALL, "");
+
+  /* nl_langinfo items of the LC_CTYPE category */
+  ASSERT (strlen (nl_langinfo (CODESET)) > 0);
+  if (pass == 2)
+    {
+      const char *codeset = nl_langinfo (CODESET);
+      ASSERT (c_strcasecmp (codeset, "UTF-8") == 0 || c_strcasecmp (codeset, "UTF8") == 0);
+    }
+  /* nl_langinfo items of the LC_NUMERIC category */
+  ASSERT (strlen (nl_langinfo (RADIXCHAR)) > 0);
+  ASSERT (strlen (nl_langinfo (THOUSEP)) >= 0);
+  /* nl_langinfo items of the LC_TIME category */
+  ASSERT (strlen (nl_langinfo (D_T_FMT)) > 0);
+  ASSERT (strlen (nl_langinfo (D_FMT)) > 0);
+  ASSERT (strlen (nl_langinfo (T_FMT)) > 0);
+  ASSERT (strlen (nl_langinfo (T_FMT_AMPM)) >= (pass == 0 ? 1 : 0));
+  ASSERT (strlen (nl_langinfo (AM_STR)) >= (pass == 0 ? 1 : 0));
+  ASSERT (strlen (nl_langinfo (PM_STR)) >= (pass == 0 ? 1 : 0));
+  ASSERT (strlen (nl_langinfo (DAY_1)) > 0);
+  ASSERT (strlen (nl_langinfo (DAY_2)) > 0);
+  ASSERT (strlen (nl_langinfo (DAY_3)) > 0);
+  ASSERT (strlen (nl_langinfo (DAY_4)) > 0);
+  ASSERT (strlen (nl_langinfo (DAY_5)) > 0);
+  ASSERT (strlen (nl_langinfo (DAY_6)) > 0);
+  ASSERT (strlen (nl_langinfo (DAY_7)) > 0);
+  ASSERT (strlen (nl_langinfo (ABDAY_1)) > 0);
+  ASSERT (strlen (nl_langinfo (ABDAY_2)) > 0);
+  ASSERT (strlen (nl_langinfo (ABDAY_3)) > 0);
+  ASSERT (strlen (nl_langinfo (ABDAY_4)) > 0);
+  ASSERT (strlen (nl_langinfo (ABDAY_5)) > 0);
+  ASSERT (strlen (nl_langinfo (ABDAY_6)) > 0);
+  ASSERT (strlen (nl_langinfo (ABDAY_7)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_1)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_2)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_3)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_4)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_5)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_6)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_7)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_8)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_9)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_10)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_11)) > 0);
+  ASSERT (strlen (nl_langinfo (MON_12)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_1)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_2)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_3)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_4)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_5)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_6)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_7)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_8)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_9)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_10)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_11)) > 0);
+  ASSERT (strlen (nl_langinfo (ABMON_12)) > 0);
+  ASSERT (strlen (nl_langinfo (ERA)) >= 0);
+  ASSERT (strlen (nl_langinfo (ERA_D_FMT)) >= 0);
+  ASSERT (strlen (nl_langinfo (ERA_D_T_FMT)) >= 0);
+  ASSERT (strlen (nl_langinfo (ERA_T_FMT)) >= 0);
+  ASSERT (nl_langinfo (ALT_DIGITS) != NULL);
+  /* nl_langinfo items of the LC_MONETARY category */
+  {
+    const char *currency = nl_langinfo (CRNCYSTR);
+    ASSERT (strlen (currency) >= 0);
+#if !defined __NetBSD__
+    if (pass > 0)
+      ASSERT (strlen (currency) >= 1);
+#endif
+  }
+  /* nl_langinfo items of the LC_MESSAGES category */
+  ASSERT (strlen (nl_langinfo (YESEXPR)) > 0);
+  ASSERT (strlen (nl_langinfo (NOEXPR)) > 0);
+
+  return 0;
+}
diff --git a/tests/test-nl_langinfo.sh b/tests/test-nl_langinfo.sh
new file mode 100755 (executable)
index 0000000..3168f42
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+LC_ALL=C ./test-nl_langinfo${EXEEXT} 0 || exit 1
+
+# Test whether a specific traditional locale is installed.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+  LC_ALL=$LOCALE_FR ./test-nl_langinfo${EXEEXT} 1 || exit 1
+fi
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 != none; then
+  LC_ALL=$LOCALE_FR_UTF8 ./test-nl_langinfo${EXEEXT} 2 || exit 1
+fi
+
+exit 0
diff --git a/tests/test-open.c b/tests/test-open.c
new file mode 100644 (file)
index 0000000..3c5b2ab
--- /dev/null
@@ -0,0 +1,41 @@
+/* Test of opening a file descriptor.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <fcntl.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (open, int, (char const *, int, ...));
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#define BASE "test-open.t"
+
+#include "test-open.h"
+
+int
+main (void)
+{
+  return test_open (open, true);
+}
diff --git a/tests/test-open.h b/tests/test-open.h
new file mode 100644 (file)
index 0000000..3e5c5e1
--- /dev/null
@@ -0,0 +1,87 @@
+/* Test of opening a file descriptor.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+/* This file is designed to test both open(n,buf[,mode]) and
+   openat(AT_FDCWD,n,buf[,mode]).  FUNC is the function to test.
+   Assumes that BASE and ASSERT are already defined, and that
+   appropriate headers are already included.  If PRINT, warn before
+   skipping symlink tests with status 77.  */
+
+static int
+test_open (int (*func) (char const *, int, ...), bool print)
+{
+  int fd;
+  /* Remove anything from prior partial run.  */
+  unlink (BASE "file");
+
+  /* Cannot create directory.  */
+  errno = 0;
+  ASSERT (func ("nonexist.ent/", O_CREAT | O_RDONLY, 0600) == -1);
+  ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT
+          || errno == EINVAL);
+
+  /* Create a regular file.  */
+  fd = func (BASE "file", O_CREAT | O_RDONLY, 0600);
+  ASSERT (0 <= fd);
+  ASSERT (close (fd) == 0);
+
+  /* Trailing slash handling.  */
+  errno = 0;
+  ASSERT (func (BASE "file/", O_RDONLY) == -1);
+  ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL);
+
+  /* Directories cannot be opened for writing.  */
+  errno = 0;
+  ASSERT (func (".", O_WRONLY) == -1);
+  ASSERT (errno == EISDIR || errno == EACCES);
+
+  /* /dev/null must exist, and be writable.  */
+  fd = func ("/dev/null", O_RDONLY);
+  ASSERT (0 <= fd);
+  {
+    char c;
+    ASSERT (read (fd, &c, 1) == 0);
+  }
+  ASSERT (close (fd) == 0);
+  fd = func ("/dev/null", O_WRONLY);
+  ASSERT (0 <= fd);
+  ASSERT (write (fd, "c", 1) == 1);
+  ASSERT (close (fd) == 0);
+
+  /* Symlink handling, where supported.  */
+  if (symlink (BASE "file", BASE "link") != 0)
+    {
+      ASSERT (unlink (BASE "file") == 0);
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+  errno = 0;
+  ASSERT (func (BASE "link/", O_RDONLY) == -1);
+  ASSERT (errno == ENOTDIR);
+  fd = func (BASE "link", O_RDONLY);
+  ASSERT (0 <= fd);
+  ASSERT (close (fd) == 0);
+
+  /* Cleanup.  */
+  ASSERT (unlink (BASE "file") == 0);
+  ASSERT (unlink (BASE "link") == 0);
+
+  return 0;
+}
diff --git a/tests/test-openat-safer.c b/tests/test-openat-safer.c
new file mode 100644 (file)
index 0000000..1c6774f
--- /dev/null
@@ -0,0 +1,121 @@
+/* Test that openat_safer leave standard fds alone.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include "fcntl--.h"
+
+#include <errno.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+/* This test intentionally closes stderr.  So, we arrange to have fd 10
+   (outside the range of interesting fd's during the test) set up to
+   duplicate the original stderr.  */
+
+#define BACKUP_STDERR_FILENO 10
+#define ASSERT_STREAM myerr
+#include "macros.h"
+
+static FILE *myerr;
+
+#define witness "test-openat-safer.txt"
+
+int
+main (void)
+{
+  int i;
+  int j;
+  int dfd;
+  int fd;
+  char buf[2];
+
+  /* We close fd 2 later, so save it in fd 10.  */
+  if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+      || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+    return 2;
+
+  /* Create handle for future use.  */
+  dfd = openat (AT_FDCWD, ".", O_RDONLY);
+  ASSERT (STDERR_FILENO < dfd);
+
+  /* Create file for later checks.  */
+  remove (witness);
+  fd = openat (dfd, witness, O_WRONLY | O_CREAT | O_EXCL, 0600);
+  ASSERT (STDERR_FILENO < fd);
+  ASSERT (write (fd, "hi", 2) == 2);
+  ASSERT (close (fd) == 0);
+
+  /* Four iterations, with progressively more standard descriptors
+     closed.  */
+  for (i = -1; i <= STDERR_FILENO; i++)
+    {
+      ASSERT (fchdir (dfd) == 0);
+      if (0 <= i)
+        ASSERT (close (i) == 0);
+
+      /* Execute once in ".", once in "..".  */
+      for (j = 0; j <= 1; j++)
+        {
+          if (j)
+            ASSERT (chdir ("..") == 0);
+
+          /* Check for error detection.  */
+          errno = 0;
+          ASSERT (openat (AT_FDCWD, "", O_RDONLY) == -1);
+          ASSERT (errno == ENOENT);
+          errno = 0;
+          ASSERT (openat (dfd, "", O_RDONLY) == -1);
+          ASSERT (errno == ENOENT);
+          errno = 0;
+          ASSERT (openat (-1, ".", O_RDONLY) == -1);
+          ASSERT (errno == EBADF);
+
+          /* Check for trailing slash and /dev/null handling.  */
+          errno = 0;
+          ASSERT (openat (dfd, "nonexist.ent/", O_CREAT | O_RDONLY,
+                          S_IRUSR | S_IWUSR) == -1);
+          ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT
+                  || errno == EINVAL);
+          errno = 0;
+          ASSERT (openat (dfd, witness "/", O_RDONLY) == -1);
+          ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL);
+          /* Using a bad directory is okay for absolute paths.  */
+          fd = openat (-1, "/dev/null", O_WRONLY);
+          ASSERT (STDERR_FILENO < fd);
+          /* Using a non-directory is wrong for relative paths.  */
+          errno = 0;
+          ASSERT (openat (fd, ".", O_RDONLY) == -1);
+          ASSERT (errno == EBADF || errno == ENOTDIR);
+          ASSERT (close (fd) == 0);
+
+          /* Check for our witness file.  */
+          fd = openat (dfd, witness, O_RDONLY | O_NOFOLLOW);
+          ASSERT (STDERR_FILENO < fd);
+          ASSERT (read (fd, buf, 2) == 2);
+          ASSERT (buf[0] == 'h' && buf[1] == 'i');
+          ASSERT (close (fd) == 0);
+        }
+    }
+  ASSERT (fchdir (dfd) == 0);
+  ASSERT (unlink (witness) == 0);
+  ASSERT (close (dfd) == 0);
+
+  return 0;
+}
diff --git a/tests/test-openat.c b/tests/test-openat.c
new file mode 100644 (file)
index 0000000..fd34638
--- /dev/null
@@ -0,0 +1,86 @@
+/* Test that openat works.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <fcntl.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (openat, int, (int, char const *, int, ...));
+
+#include <errno.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#define BASE "test-openat.t"
+
+#include "test-open.h"
+
+static int dfd = AT_FDCWD;
+
+/* Wrapper around openat to test open behavior.  */
+static int
+do_open (char const *name, int flags, ...)
+{
+  if (flags & O_CREAT)
+    {
+      mode_t mode = 0;
+      va_list arg;
+      va_start (arg, 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 (arg, PROMOTED_MODE_T);
+
+      va_end (arg);
+      return openat (dfd, name, flags, mode);
+    }
+  return openat (dfd, name, flags);
+}
+
+int
+main (void)
+{
+  int result;
+
+  /* Basic checks.  */
+  result = test_open (do_open, false);
+  dfd = open (".", O_RDONLY);
+  ASSERT (0 <= dfd);
+  ASSERT (test_open (do_open, false) == result);
+  ASSERT (close (dfd) == 0);
+
+  /* Check that even when *-safer modules are in use, plain openat can
+     land in fd 0.  Do this test last, since it is destructive to
+     stdin.  */
+  ASSERT (close (STDIN_FILENO) == 0);
+  ASSERT (openat (AT_FDCWD, ".", O_RDONLY) == STDIN_FILENO);
+  {
+    dfd = open (".", O_RDONLY);
+    ASSERT (STDIN_FILENO < dfd);
+    ASSERT (chdir ("..") == 0);
+    ASSERT (close (STDIN_FILENO) == 0);
+    ASSERT (openat (dfd, ".", O_RDONLY) == STDIN_FILENO);
+    ASSERT (close (dfd) == 0);
+  }
+  return result;
+}
diff --git a/tests/test-parse-datetime.c b/tests/test-parse-datetime.c
new file mode 100644 (file)
index 0000000..45dbae6
--- /dev/null
@@ -0,0 +1,255 @@
+/* Test of parse_datetime() function.
+   Copyright (C) 2008-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Simon Josefsson <simon@josefsson.org>, 2008.  */
+
+#include <config.h>
+
+#include "parse-datetime.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "progname.h"
+#include "macros.h"
+
+#ifdef DEBUG
+#define LOG(str, now, res)                                              \
+  printf ("string `%s' diff %d %d\n",                   \
+          str, res.tv_sec - now.tv_sec, res.tv_nsec - now.tv_nsec);
+#else
+#define LOG(str, now, res) (void) 0
+#endif
+
+static const char* const day_table[] =
+{
+  "SUNDAY",
+  "MONDAY",
+  "TUESDAY",
+  "WEDNESDAY",
+  "THURSDAY",
+  "FRIDAY",
+  "SATURDAY",
+  NULL
+};
+
+int
+main (int argc _GL_UNUSED, char **argv)
+{
+  struct timespec result;
+  struct timespec result2;
+  struct timespec now;
+  const char *p;
+  int i;
+
+  set_program_name (argv[0]);
+
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "now";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  ASSERT (now.tv_sec == result.tv_sec && now.tv_nsec == result.tv_nsec);
+
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "tomorrow";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  ASSERT (now.tv_sec + 24 * 60 * 60 == result.tv_sec
+          && now.tv_nsec == result.tv_nsec);
+
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "yesterday";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  ASSERT (now.tv_sec - 24 * 60 * 60 == result.tv_sec
+          && now.tv_nsec == result.tv_nsec);
+
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "4 hours";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  ASSERT (now.tv_sec + 4 * 60 * 60 == result.tv_sec
+          && now.tv_nsec == result.tv_nsec);
+
+  /* test if timezone is not being ignored for day offset */
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "UTC+400 +24 hours";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  p = "UTC+400 +1 day";
+  ASSERT (parse_datetime (&result2, p, &now));
+  LOG (p, now, result2);
+  ASSERT (result.tv_sec == result2.tv_sec
+          && result.tv_nsec == result2.tv_nsec);
+
+  /* test if several time zones formats are handled same way */
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "UTC+14:00";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  p = "UTC+14";
+  ASSERT (parse_datetime (&result2, p, &now));
+  LOG (p, now, result2);
+  ASSERT (result.tv_sec == result2.tv_sec
+          && result.tv_nsec == result2.tv_nsec);
+  p = "UTC+1400";
+  ASSERT (parse_datetime (&result2, p, &now));
+  LOG (p, now, result2);
+  ASSERT (result.tv_sec == result2.tv_sec
+          && result.tv_nsec == result2.tv_nsec);
+
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "UTC-14:00";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  p = "UTC-14";
+  ASSERT (parse_datetime (&result2, p, &now));
+  LOG (p, now, result2);
+  ASSERT (result.tv_sec == result2.tv_sec
+          && result.tv_nsec == result2.tv_nsec);
+  p = "UTC-1400";
+  ASSERT (parse_datetime (&result2, p, &now));
+  LOG (p, now, result2);
+  ASSERT (result.tv_sec == result2.tv_sec
+          && result.tv_nsec == result2.tv_nsec);
+
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "UTC+0:15";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  p = "UTC+0015";
+  ASSERT (parse_datetime (&result2, p, &now));
+  LOG (p, now, result2);
+  ASSERT (result.tv_sec == result2.tv_sec
+          && result.tv_nsec == result2.tv_nsec);
+
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "UTC-1:30";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  p = "UTC-130";
+  ASSERT (parse_datetime (&result2, p, &now));
+  LOG (p, now, result2);
+  ASSERT (result.tv_sec == result2.tv_sec
+          && result.tv_nsec == result2.tv_nsec);
+
+
+  /* TZ out of range should cause parse_datetime failure */
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "UTC+25:00";
+  ASSERT (!parse_datetime (&result, p, &now));
+
+        /* Check for several invalid countable dayshifts */
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "UTC+4:00 +40 yesterday";
+  ASSERT (!parse_datetime (&result, p, &now));
+  p = "UTC+4:00 next yesterday";
+  ASSERT (!parse_datetime (&result, p, &now));
+  p = "UTC+4:00 tomorrow ago";
+  ASSERT (!parse_datetime (&result, p, &now));
+  p = "UTC+4:00 40 now ago";
+  ASSERT (!parse_datetime (&result, p, &now));
+  p = "UTC+4:00 last tomorrow";
+  ASSERT (!parse_datetime (&result, p, &now));
+  p = "UTC+4:00 -4 today";
+  ASSERT (!parse_datetime (&result, p, &now));
+
+  /* And check correct usage of dayshifts */
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "UTC+400 tomorrow";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  p = "UTC+400 +1 day";
+  ASSERT (parse_datetime (&result2, p, &now));
+  LOG (p, now, result2);
+  ASSERT (result.tv_sec == result2.tv_sec
+          && result.tv_nsec == result2.tv_nsec);
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "UTC+400 yesterday";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  p = "UTC+400 1 day ago";
+  ASSERT (parse_datetime (&result2, p, &now));
+  LOG (p, now, result2);
+  ASSERT (result.tv_sec == result2.tv_sec
+          && result.tv_nsec == result2.tv_nsec);
+  now.tv_sec = 4711;
+  now.tv_nsec = 1267;
+  p = "UTC+400 now";
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  p = "UTC+400 +0 minutes"; /* silly, but simple "UTC+400" is different*/
+  ASSERT (parse_datetime (&result2, p, &now));
+  LOG (p, now, result2);
+  ASSERT (result.tv_sec == result2.tv_sec
+          && result.tv_nsec == result2.tv_nsec);
+
+  /* Check that some "next Monday", "last Wednesday", etc. are correct.  */
+  setenv ("TZ", "UTC0", 1);
+  for (i = 0; day_table[i]; i++)
+    {
+      unsigned int thur2 = 7 * 24 * 3600; /* 2nd thursday */
+      char tmp[32];
+      sprintf (tmp, "NEXT %s", day_table[i]);
+      now.tv_sec = thur2 + 4711;
+      now.tv_nsec = 1267;
+      ASSERT (parse_datetime (&result, tmp, &now));
+      LOG (tmp, now, result);
+      ASSERT (result.tv_nsec == 0);
+      ASSERT (result.tv_sec == thur2 + (i == 4 ? 7 : (i + 3) % 7) * 24 * 3600);
+
+      sprintf (tmp, "LAST %s", day_table[i]);
+      now.tv_sec = thur2 + 4711;
+      now.tv_nsec = 1267;
+      ASSERT (parse_datetime (&result, tmp, &now));
+      LOG (tmp, now, result);
+      ASSERT (result.tv_nsec == 0);
+      ASSERT (result.tv_sec == thur2 + ((i + 3) % 7 - 7) * 24 * 3600);
+    }
+
+  p = "THURSDAY UTC+00";  /* The epoch was on Thursday.  */
+  now.tv_sec = 0;
+  now.tv_nsec = 0;
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  ASSERT (result.tv_sec == now.tv_sec
+          && result.tv_nsec == now.tv_nsec);
+
+  p = "FRIDAY UTC+00";
+  now.tv_sec = 0;
+  now.tv_nsec = 0;
+  ASSERT (parse_datetime (&result, p, &now));
+  LOG (p, now, result);
+  ASSERT (result.tv_sec == 24 * 3600
+          && result.tv_nsec == now.tv_nsec);
+
+  return 0;
+}
diff --git a/tests/test-perror.c b/tests/test-perror.c
new file mode 100644 (file)
index 0000000..d3751d8
--- /dev/null
@@ -0,0 +1,37 @@
+/* Test of perror() function.
+   Copyright (C) 2008-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (perror, void, (char const *));
+
+#include <errno.h>
+
+int
+main (int argc, char **argv)
+{
+  const char *prefix = (argc > 1 ? argv[1] : NULL);
+
+  errno = EACCES;    perror (prefix);
+  errno = ETIMEDOUT; perror (prefix);
+  errno = EOVERFLOW; perror (prefix);
+
+  return 0;
+}
diff --git a/tests/test-perror.sh b/tests/test-perror.sh
new file mode 100755 (executable)
index 0000000..f2c8fdc
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# Test NULL prefix. Result should not contain a number.
+tmpfiles="$tmpfiles t-perror.tmp"
+./test-perror${EXEEXT} 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp
+if grep '[0-9]' t-perror.tmp > /dev/null; then
+  rm -fr $tmpfiles; exit 1
+fi
+
+# Test empty prefix. Result should be the same.
+tmpfiles="$tmpfiles t-perror1.tmp"
+./test-perror${EXEEXT} '' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror1.tmp
+diff t-perror.tmp t-perror1.tmp
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+# Test non-empty prefix.
+tmpfiles="$tmpfiles t-perror2.tmp t-perror3.tmp"
+./test-perror${EXEEXT} 'foo' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror3.tmp
+sed -e 's/^/foo: /' < t-perror.tmp > t-perror2.tmp
+diff t-perror2.tmp t-perror3.tmp
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+rm -fr $tmpfiles
+exit 0
diff --git a/tests/test-priv-set.c b/tests/test-priv-set.c
new file mode 100644 (file)
index 0000000..f1d5f01
--- /dev/null
@@ -0,0 +1,88 @@
+/* Test the priv-set module.
+   Copyright (C) 2009-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 David Bartley <dtbartle@csclub.uwaterloo.ca>, 2007.  */
+
+#include <config.h>
+
+#include "priv-set.h"
+
+#if HAVE_GETPPRIV && HAVE_PRIV_H
+# include <priv.h>
+#endif
+#include <unistd.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+#if HAVE_GETPPRIV && HAVE_PRIV_H
+    priv_set_t *set;
+
+    ASSERT (set = priv_allocset ());
+    ASSERT (getppriv (PRIV_EFFECTIVE, set) == 0);
+    ASSERT (priv_ismember (set, PRIV_PROC_EXEC) == 1);
+
+    /* Do a series of removes and restores making sure that the results are
+       consistent with our ismember function and solaris' priv_ismember.  */
+    ASSERT (priv_set_ismember (PRIV_PROC_EXEC) == 1);
+        ASSERT (getppriv (PRIV_EFFECTIVE, set) == 0);
+        ASSERT (priv_ismember (set, PRIV_PROC_EXEC) == 1);
+    ASSERT (priv_set_restore (PRIV_PROC_EXEC) == -1);
+        ASSERT (errno == EINVAL);
+    ASSERT (priv_set_ismember (PRIV_PROC_EXEC) == 1);
+        ASSERT (getppriv (PRIV_EFFECTIVE, set) == 0);
+        ASSERT (priv_ismember (set, PRIV_PROC_EXEC) == 1);
+    ASSERT (priv_set_remove (PRIV_PROC_EXEC) == 0);
+    ASSERT (priv_set_ismember (PRIV_PROC_EXEC) == 0);
+        ASSERT (getppriv (PRIV_EFFECTIVE, set) == 0);
+        ASSERT (priv_ismember (set, PRIV_PROC_EXEC) == 0);
+    ASSERT (priv_set_remove (PRIV_PROC_EXEC) == -1);
+        ASSERT (errno == EINVAL);
+    ASSERT (priv_set_ismember (PRIV_PROC_EXEC) == 0);
+        ASSERT (getppriv (PRIV_EFFECTIVE, set) == 0);
+        ASSERT (priv_ismember (set, PRIV_PROC_EXEC) == 0);
+    ASSERT (priv_set_restore (PRIV_PROC_EXEC) == 0);
+    ASSERT (priv_set_ismember (PRIV_PROC_EXEC) == 1);
+        ASSERT (getppriv (PRIV_EFFECTIVE, set) == 0);
+        ASSERT (priv_ismember (set, PRIV_PROC_EXEC) == 1);
+    ASSERT (priv_set_restore (PRIV_PROC_EXEC) == -1);
+        ASSERT (errno == EINVAL);
+    ASSERT (priv_set_ismember (PRIV_PROC_EXEC) == 1);
+        ASSERT (getppriv (PRIV_EFFECTIVE, set) == 0);
+        ASSERT (priv_ismember (set, PRIV_PROC_EXEC) == 1);
+
+    /* Test the priv_set_linkdir wrappers.  */
+    ASSERT (getppriv (PRIV_EFFECTIVE, set) == 0);
+    if (priv_ismember (set, PRIV_SYS_LINKDIR))
+      {
+        ASSERT (priv_set_restore_linkdir () == -1);
+            ASSERT (errno == EINVAL);
+        ASSERT (priv_set_remove_linkdir () == 0);
+        ASSERT (priv_set_remove_linkdir () == -1);
+            ASSERT (errno == EINVAL);
+        ASSERT (priv_set_restore_linkdir () == 0);
+      }
+#else
+    ASSERT (priv_set_restore_linkdir () == -1);
+    ASSERT (priv_set_remove_linkdir () == -1);
+#endif
+
+    return 0;
+}
diff --git a/tests/test-quotearg-simple.c b/tests/test-quotearg-simple.c
new file mode 100644 (file)
index 0000000..4d9c87c
--- /dev/null
@@ -0,0 +1,294 @@
+/* Test of quotearg family of functions.
+   Copyright (C) 2008-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2008.  */
+
+#include <config.h>
+
+#include "quotearg.h"
+
+#include <ctype.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "progname.h"
+#include "macros.h"
+
+#include "test-quotearg.h"
+
+static struct result_groups results_g[] = {
+  /* literal_quoting_style */
+  { { "", "\0""1\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+      LQ RQ, LQ RQ },
+    { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+      LQ RQ, LQ RQ },
+    { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+      LQ RQ, LQ RQ } },
+
+  /* shell_quoting_style */
+  { { "''", "\0""1\0", 3, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
+      "'a\\b'", LQ RQ, LQ RQ },
+    { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
+      "'a\\b'", LQ RQ, LQ RQ },
+    { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+      "'a\\b'", LQ RQ, LQ RQ } },
+
+  /* shell_always_quoting_style */
+  { { "''", "'\0""1\0'", 5, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+      "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
+    { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+      "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
+    { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+      "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" } },
+
+  /* c_quoting_style */
+  { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+      "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+      "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+    { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+      "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+      "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+    { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+      "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
+      "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } },
+
+  /* c_maybe_quoting_style */
+  { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+      "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+    { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+      "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+    { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+      "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
+
+  /* escape_quoting_style */
+  { { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
+      "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
+    { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
+      "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
+    { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a\\:b",
+      "a\\\\b", LQ_ENC RQ_ENC, LQ RQ } },
+
+  /* locale_quoting_style */
+  { { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
+      "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" },
+    { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
+      "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" },
+    { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
+      "`a\\:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" } },
+
+  /* clocale_quoting_style */
+  { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+      "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+      "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+    { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+      "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+      "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+    { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+      "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
+      "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
+};
+
+static struct result_groups flag_results[] = {
+  /* literal_quoting_style and QA_ELIDE_NULL_BYTES */
+  { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
+      LQ RQ },
+    { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
+      LQ RQ },
+    { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
+      LQ RQ } },
+
+  /* c_quoting_style and QA_ELIDE_OUTER_QUOTES */
+  { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+      "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+    { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+      "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+    { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+      "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
+
+  /* c_quoting_style and QA_SPLIT_TRIGRAPHS */
+  { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+      "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+      "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+    { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+      "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+      "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+    { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+      "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
+      "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
+};
+
+static char const *custom_quotes[][2] = {
+  { "", ""  },
+  { "'", "'"  },
+  { "(", ")"  },
+  { ":", " "  },
+  { " ", ":"  },
+  { "# ", "\n" },
+  { "\"'", "'\"" }
+};
+
+static struct result_groups custom_results[] = {
+  /* left_quote = right_quote = "" */
+  { { "", "\\0001\\0", 7, "simple",
+      " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
+      LQ_ENC RQ_ENC, LQ RQ },
+    { "", "\\0001\\0", 7, "simple",
+      " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
+      LQ_ENC RQ_ENC, LQ RQ },
+    { "", "\\0001\\0", 7, "simple",
+      " \\t\\n'\"\\033?""?/\\\\", "a\\:b", "a\\\\b",
+      LQ_ENC RQ_ENC, LQ RQ } },
+
+  /* left_quote = right_quote = "'" */
+  { { "''", "'\\0001\\0'", 9, "'simple'",
+      "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
+      "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+    { "''", "'\\0001\\0'", 9, "'simple'",
+      "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
+      "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+    { "''", "'\\0001\\0'", 9, "'simple'",
+      "' \\t\\n\\'\"\\033?""?/\\\\'", "'a\\:b'", "'a\\\\b'",
+      "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
+
+  /* left_quote = "(" and right_quote = ")" */
+  { { "()", "(\\0001\\0)", 9, "(simple)",
+      "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
+      "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
+    { "()", "(\\0001\\0)", 9, "(simple)",
+      "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
+      "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
+    { "()", "(\\0001\\0)", 9, "(simple)",
+      "( \\t\\n'\"\\033?""?/\\\\)", "(a\\:b)", "(a\\\\b)",
+      "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" } },
+
+  /* left_quote = ":" and right_quote = " " */
+  { { ": ", ":\\0001\\0 ", 9, ":simple ",
+      ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
+      ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
+    { ": ", ":\\0001\\0 ", 9, ":simple ",
+      ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
+      ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
+    { ": ", ":\\0001\\0 ", 9, ":simple ",
+      ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a\\:b ", ":a\\\\b ",
+      ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " } },
+
+  /* left_quote = " " and right_quote = ":" */
+  { { " :", " \\0001\\0:", 9, " simple:",
+      "  \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
+      " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
+    { " :", " \\0001\\0:", 9, " simple:",
+      "  \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
+      " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
+    { " :", " \\0001\\0:", 9, " simple:",
+      "  \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
+      " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" } },
+
+  /* left_quote = "# " and right_quote = "\n" */
+  { { "# \n", "# \\0001\\0\n", 10, "# simple\n",
+      "#  \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
+      "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
+    { "# \n", "# \\0001\\0\n", 10, "# simple\n",
+      "#  \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
+      "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
+    { "# \n", "# \\0001\\0\n", 10, "# simple\n",
+      "#  \\t\\n'\"\\033?""?/\\\\\n", "# a\\:b\n", "# a\\\\b\n",
+      "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" } },
+
+  /* left_quote = "\"'" and right_quote = "'\"" */
+  { { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
+      "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
+      "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
+    { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
+      "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
+      "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
+    { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
+      "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a\\:b'\"", "\"'a\\\\b'\"",
+      "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } }
+};
+
+int
+main (int argc _GL_UNUSED, char *argv[])
+{
+  int i;
+  bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
+
+  set_program_name (argv[0]);
+
+  /* This part of the program is hard-wired to the C locale since it
+     does not call setlocale.  However, according to POSIX, the use of
+     8-bit bytes in a character context in the C locale gives
+     unspecified results (that is, the C locale charset is allowed to
+     be unibyte with 8-bit bytes rejected [ASCII], unibyte with 8-bit
+     bytes being characters [often ISO-8859-1], or multibyte [often
+     UTF-8]).  We assume that the latter two cases will be
+     indistinguishable in this test - that is, the LQ and RQ sequences
+     will pass through unchanged in either type of charset.  So when
+     testing for quoting of str7, use the ascii_only flag to decide
+     what to expect for the 8-bit data being quoted.  */
+  ASSERT (!isprint ('\033'));
+  for (i = literal_quoting_style; i <= clocale_quoting_style; i++)
+    {
+      set_quoting_style (NULL, (enum quoting_style) i);
+      compare_strings (use_quotearg_buffer, &results_g[i].group1, ascii_only);
+      compare_strings (use_quotearg, &results_g[i].group2, ascii_only);
+      if (i == c_quoting_style)
+        compare_strings (use_quote_double_quotes, &results_g[i].group2,
+                         ascii_only);
+      compare_strings (use_quotearg_colon, &results_g[i].group3, ascii_only);
+    }
+
+  set_quoting_style (NULL, literal_quoting_style);
+  ASSERT (set_quoting_flags (NULL, QA_ELIDE_NULL_BYTES) == 0);
+  compare_strings (use_quotearg_buffer, &flag_results[0].group1, ascii_only);
+  compare_strings (use_quotearg, &flag_results[0].group2, ascii_only);
+  compare_strings (use_quotearg_colon, &flag_results[0].group3, ascii_only);
+
+  set_quoting_style (NULL, c_quoting_style);
+  ASSERT (set_quoting_flags (NULL, QA_ELIDE_OUTER_QUOTES)
+          == QA_ELIDE_NULL_BYTES);
+  compare_strings (use_quotearg_buffer, &flag_results[1].group1, ascii_only);
+  compare_strings (use_quotearg, &flag_results[1].group2, ascii_only);
+  compare_strings (use_quote_double_quotes, &flag_results[1].group2,
+                   ascii_only);
+  compare_strings (use_quotearg_colon, &flag_results[1].group3, ascii_only);
+
+  ASSERT (set_quoting_flags (NULL, QA_SPLIT_TRIGRAPHS)
+          == QA_ELIDE_OUTER_QUOTES);
+  compare_strings (use_quotearg_buffer, &flag_results[2].group1, ascii_only);
+  compare_strings (use_quotearg, &flag_results[2].group2, ascii_only);
+  compare_strings (use_quote_double_quotes, &flag_results[2].group2,
+                   ascii_only);
+  compare_strings (use_quotearg_colon, &flag_results[2].group3, ascii_only);
+
+  ASSERT (set_quoting_flags (NULL, 0) == QA_SPLIT_TRIGRAPHS);
+
+  for (i = 0; i < sizeof custom_quotes / sizeof *custom_quotes; ++i)
+    {
+      set_custom_quoting (NULL,
+                          custom_quotes[i][0], custom_quotes[i][1]);
+      compare_strings (use_quotearg_buffer, &custom_results[i].group1,
+                       ascii_only);
+      compare_strings (use_quotearg, &custom_results[i].group2, ascii_only);
+      compare_strings (use_quotearg_colon, &custom_results[i].group3,
+                       ascii_only);
+    }
+
+  quotearg_free ();
+  return 0;
+}
diff --git a/tests/test-quotearg.h b/tests/test-quotearg.h
new file mode 100644 (file)
index 0000000..f2e9558
--- /dev/null
@@ -0,0 +1,133 @@
+/* Test of quotearg family of functions.
+   Copyright (C) 2008-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2008.  */
+
+struct result_strings {
+  char const *str1; /* Translation of "".  */
+  char const *str2; /* Translation of "\0""1\0".  */
+  size_t len2; /* Length of str2.  */
+  char const *str3; /* Translation of "simple".  */
+  char const *str4; /* Translation of " \t\n'\"\033?""?/\\".  */
+  char const *str5; /* Translation of "a:b".  */
+  char const *str6; /* Translation of "a\\b".  */
+  char const *str7a; /* Translation of LQ RQ, in ASCII charset.  */
+  char const *str7b; /* Translation of LQ RQ, in Latin1 or UTF-8 charset.  */
+};
+
+struct result_groups {
+  struct result_strings group1; /* Via quotearg_buffer.  */
+  struct result_strings group2; /* Via quotearg{,_mem}.  */
+  struct result_strings group3; /* Via quotearg_colon{,_mem}.  */
+};
+
+/* These quotes are borrowed from a pt_PT.utf8 translation.  */
+# define LQ "\302\253"
+# define RQ "\302\273"
+# define LQ_ENC "\\302\\253"
+# define RQ_ENC "\\302\\273"
+# define RQ_ESC "\\\302\273"
+
+static struct result_strings inputs = {
+  "", "\0001\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+  LQ RQ, NULL
+};
+
+static void
+compare (char const *a, size_t la, char const *b, size_t lb)
+{
+  ASSERT (la == lb);
+  ASSERT (memcmp (a, b, la) == 0);
+  ASSERT (b[lb] == '\0');
+}
+
+static void
+compare_strings (char *(func) (char const *, size_t *),
+                 struct result_strings *results, bool ascii_only)
+{
+  size_t len;
+  char *p;
+
+  len = 0;
+  p = func (inputs.str1, &len);
+  compare (results->str1, strlen (results->str1), p, len);
+
+  len = inputs.len2;
+  p = func (inputs.str2, &len);
+  compare (results->str2, results->len2, p, len);
+
+  len = SIZE_MAX;
+  p = func (inputs.str3, &len);
+  compare (results->str3, strlen (results->str3), p, len);
+
+  len = strlen (inputs.str4);
+  p = func (inputs.str4, &len);
+  compare (results->str4, strlen (results->str4), p, len);
+
+  len = SIZE_MAX;
+  p = func (inputs.str5, &len);
+  compare (results->str5, strlen (results->str5), p, len);
+
+  len = strlen (inputs.str6);
+  p = func (inputs.str6, &len);
+  compare (results->str6, strlen (results->str6), p, len);
+
+  len = strlen (inputs.str7a);
+  p = func (inputs.str7a, &len);
+  if (ascii_only)
+    compare (results->str7a, strlen (results->str7a), p, len);
+  else
+    compare (results->str7b, strlen (results->str7b), p, len);
+}
+
+static char *
+use_quotearg_buffer (const char *str, size_t *len)
+{
+  static char buf[100];
+  size_t size;
+  memset (buf, 0xa5, 100);
+  size = quotearg_buffer (buf, 100, str, *len, NULL);
+  *len = size;
+  ASSERT ((unsigned char) buf[size + 1] == 0xa5);
+  return buf;
+}
+
+static char *
+use_quotearg (const char *str, size_t *len)
+{
+  char *p = *len == SIZE_MAX ? quotearg (str) : quotearg_mem (str, *len);
+  *len = strlen (p);
+  return p;
+}
+
+static char *
+use_quote_double_quotes (const char *str, size_t *len)
+{
+  char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
+                               : quotearg_char_mem (str, *len, '"');
+  *len = strlen (p);
+  return p;
+}
+
+static char *
+use_quotearg_colon (const char *str, size_t *len)
+{
+  char *p = (*len == SIZE_MAX ? quotearg_colon (str)
+             : quotearg_colon_mem (str, *len));
+  *len = strlen (p);
+  return p;
+}
diff --git a/tests/test-readlink.c b/tests/test-readlink.c
new file mode 100644 (file)
index 0000000..3da5fbf
--- /dev/null
@@ -0,0 +1,48 @@
+/* Tests of readlink.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (readlink, ssize_t, (char const *, char *, size_t));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-readlink.t"
+
+#include "test-readlink.h"
+
+int
+main (void)
+{
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  return test_readlink (readlink, true);
+}
diff --git a/tests/test-readlink.h b/tests/test-readlink.h
new file mode 100644 (file)
index 0000000..7247fc4
--- /dev/null
@@ -0,0 +1,119 @@
+/* Tests of readlink.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+/* This file is designed to test both readlink(a,b,c) and
+   readlinkat(AT_FDCWD,a,b,c).  FUNC is the function to test.  Assumes
+   that BASE and ASSERT are already defined, and that appropriate
+   headers are already included.  If PRINT, warn before skipping
+   symlink tests with status 77.  */
+
+static int
+test_readlink (ssize_t (*func) (char const *, char *, size_t), bool print)
+{
+  char buf[80];
+
+  /* Sanity checks of failures.  Mingw lacks symlink, but readlink can
+     still distinguish between various errors.  */
+  memset (buf, 0xff, sizeof buf);
+  errno = 0;
+  ASSERT (func ("no_such", buf, sizeof buf) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("no_such/", buf, sizeof buf) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("", buf, sizeof buf) == -1);
+  ASSERT (errno == ENOENT || errno == EINVAL);
+  errno = 0;
+  ASSERT (func (".", buf, sizeof buf) == -1);
+  ASSERT (errno == EINVAL);
+  errno = 0;
+  ASSERT (func ("./", buf, sizeof buf) == -1);
+  ASSERT (errno == EINVAL);
+  ASSERT (close (creat (BASE "file", 0600)) == 0);
+  errno = 0;
+  ASSERT (func (BASE "file", buf, sizeof buf) == -1);
+  ASSERT (errno == EINVAL);
+  errno = 0;
+  ASSERT (func (BASE "file/", buf, sizeof buf) == -1);
+  ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
+
+  /* Now test actual symlinks.  */
+  if (symlink (BASE "dir", BASE "link"))
+    {
+      ASSERT (unlink (BASE "file") == 0);
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+  ASSERT (mkdir (BASE "dir", 0700) == 0);
+  errno = 0;
+  ASSERT (func (BASE "link/", buf, sizeof buf) == -1);
+  ASSERT (errno == EINVAL);
+  ASSERT (symlink (BASE "link", BASE "link2") == 0);
+  errno = 0;
+  ASSERT (func (BASE "link2/", buf, sizeof buf) == -1);
+  ASSERT (errno == EINVAL);
+  ASSERT (unlink (BASE "link2") == 0);
+  ASSERT (symlink (BASE "file", BASE "link2") == 0);
+  errno = 0;
+  ASSERT (func (BASE "link2/", buf, sizeof buf) == -1);
+  ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
+  ASSERT (unlink (BASE "file") == 0);
+  ASSERT (unlink (BASE "link2") == 0);
+  {
+    /* Up till now, no readlink has been successful, so buf should be
+       unchanged.  */
+    int i;
+    for (i = 0; i < sizeof buf; i++)
+      ASSERT (buf[i] == (char) 0xff);
+  }
+  {
+    size_t len = strlen (BASE "dir");
+    /* When passing too small of a buffer, expect the truncated
+       length, or an ERANGE failure.  However, a size of 0 is not
+       portable enough to test.  */
+    ssize_t result;
+    errno = 0;
+    result = readlink (BASE "link", buf, 1);
+    if (result == -1)
+      {
+        ASSERT (errno == ERANGE);
+        ASSERT (buf[0] == (char) 0xff);
+      }
+    else
+      {
+        ASSERT (result == 1);
+        ASSERT (buf[0] == BASE[0]);
+      }
+    ASSERT (buf[1] == (char) 0xff);
+    ASSERT (func (BASE "link", buf, len) == len);
+    ASSERT (strncmp (buf, BASE "dir", len) == 0);
+    ASSERT (buf[len] == (char) 0xff);
+    ASSERT (func (BASE "link", buf, sizeof buf) == len);
+    ASSERT (strncmp (buf, BASE "dir", len) == 0);
+    /* POSIX says rest of buf is unspecified; but in practice, it is
+       either left alone, or NUL-terminated.  */
+    ASSERT (buf[len] == '\0' || buf[len] == (char) 0xff);
+  }
+  ASSERT (rmdir (BASE "dir") == 0);
+  ASSERT (unlink (BASE "link") == 0);
+
+  return 0;
+}
diff --git a/tests/test-readlinkat.c b/tests/test-readlinkat.c
new file mode 100644 (file)
index 0000000..1d588ac
--- /dev/null
@@ -0,0 +1,108 @@
+/* Tests of readlinkat.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (readlinkat, ssize_t, (int, char const *, char *, size_t));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#ifndef HAVE_SYMLINK
+# define HAVE_SYMLINK 0
+#endif
+
+#define BASE "test-readlinkat.t"
+
+#include "test-readlink.h"
+
+static int dfd = AT_FDCWD;
+
+static ssize_t
+do_readlink (char const *name, char *buf, size_t len)
+{
+  return readlinkat (dfd, name, buf, len);
+}
+
+int
+main (void)
+{
+  char buf[80];
+  int result;
+
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  /* Perform same checks as counterpart functions.  */
+  result = test_readlink (do_readlink, false);
+  dfd = openat (AT_FDCWD, ".", O_RDONLY);
+  ASSERT (0 <= dfd);
+  ASSERT (test_readlink (do_readlink, false) == result);
+
+  /* Now perform some cross-directory checks.  Skip everything else on
+     mingw.  */
+  if (HAVE_SYMLINK)
+    {
+      const char *contents = "don't matter!";
+      ssize_t exp = strlen (contents);
+
+      /* Create link while cwd is '.', then read it in '..'.  */
+      ASSERT (symlinkat (contents, AT_FDCWD, BASE "link") == 0);
+      errno = 0;
+      ASSERT (symlinkat (contents, dfd, BASE "link") == -1);
+      ASSERT (errno == EEXIST);
+      ASSERT (chdir ("..") == 0);
+      errno = 0;
+      ASSERT (readlinkat (AT_FDCWD, BASE "link", buf, sizeof buf) == -1);
+      ASSERT (errno == ENOENT);
+      ASSERT (readlinkat (dfd, BASE "link", buf, sizeof buf) == exp);
+      ASSERT (strncmp (contents, buf, exp) == 0);
+      ASSERT (unlinkat (dfd, BASE "link", 0) == 0);
+
+      /* Create link while cwd is '..', then read it in '.'.  */
+      ASSERT (symlinkat (contents, dfd, BASE "link") == 0);
+      ASSERT (fchdir (dfd) == 0);
+      errno = 0;
+      ASSERT (symlinkat (contents, AT_FDCWD, BASE "link") == -1);
+      ASSERT (errno == EEXIST);
+      buf[0] = '\0';
+      ASSERT (readlinkat (AT_FDCWD, BASE "link", buf, sizeof buf) == exp);
+      ASSERT (strncmp (contents, buf, exp) == 0);
+      buf[0] = '\0';
+      ASSERT (readlinkat (dfd, BASE "link", buf, sizeof buf) == exp);
+      ASSERT (strncmp (contents, buf, exp) == 0);
+      ASSERT (unlink (BASE "link") == 0);
+    }
+
+  ASSERT (close (dfd) == 0);
+  if (result == 77)
+    fputs ("skipping test: symlinks not supported on this file system\n",
+           stderr);
+  return result;
+}
diff --git a/tests/test-realloc-gnu.c b/tests/test-realloc-gnu.c
new file mode 100644 (file)
index 0000000..0d8e5c1
--- /dev/null
@@ -0,0 +1,29 @@
+/* Test of realloc function.
+   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/>.  */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+int
+main ()
+{
+  /* Check that realloc (NULL, 0) is not a NULL pointer.  */
+  if (realloc (NULL, 0) == NULL)
+    return 1;
+
+  return 0;
+}
diff --git a/tests/test-rmdir.c b/tests/test-rmdir.c
new file mode 100644 (file)
index 0000000..6957efe
--- /dev/null
@@ -0,0 +1,47 @@
+/* Tests of rmdir.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (rmdir, int, (char const *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-rmdir.t"
+
+#include "test-rmdir.h"
+
+int
+main (void)
+{
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  return test_rmdir_func (rmdir, true);
+}
diff --git a/tests/test-rmdir.h b/tests/test-rmdir.h
new file mode 100644 (file)
index 0000000..757d030
--- /dev/null
@@ -0,0 +1,101 @@
+/* Tests of rmdir.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+/* This file is designed to test both rmdir(n) and
+   unlinkat(AT_FDCWD,n,AT_REMOVEDIR).  FUNC is the function to test.
+   Assumes that BASE and ASSERT are already defined, and that
+   appropriate headers are already included.  If PRINT, then warn
+   before returning status 77 when symlinks are unsupported.  */
+
+static int
+test_rmdir_func (int (*func) (char const *name), bool print)
+{
+  /* Setup.  */
+  ASSERT (mkdir (BASE "dir", 0700) == 0);
+  ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
+
+  /* Basic error conditions.  */
+  errno = 0;
+  ASSERT (func ("") == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (BASE "nosuch") == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (BASE "nosuch/") == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (".") == -1);
+  ASSERT (errno == EINVAL || errno == EBUSY);
+  /* Resulting errno after ".." or "/" is too varied to test; it is
+     reasonable to see any of EINVAL, EBUSY, EEXIST, ENOTEMPTY,
+     EACCES, EPERM.  */
+  ASSERT (func ("..") == -1);
+  ASSERT (func ("/") == -1);
+  ASSERT (func ("///") == -1);
+  errno = 0;
+  ASSERT (func (BASE "dir/file/") == -1);
+  ASSERT (errno == ENOTDIR);
+
+  /* Non-empty directory.  */
+  errno = 0;
+  ASSERT (func (BASE "dir") == -1);
+  ASSERT (errno == EEXIST || errno == ENOTEMPTY);
+
+  /* Non-directory.  */
+  errno = 0;
+  ASSERT (func (BASE "dir/file") == -1);
+  ASSERT (errno == ENOTDIR);
+
+  /* Empty directory.  */
+  ASSERT (unlink (BASE "dir/file") == 0);
+  errno = 0;
+  ASSERT (func (BASE "dir/.//") == -1);
+  ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST);
+  ASSERT (func (BASE "dir") == 0);
+
+  /* Test symlink behavior.  Specifying trailing slash should remove
+     referent directory (POSIX), or cause ENOTDIR failure (Linux), but
+     not touch symlink.  We prefer the Linux behavior for its
+     intuitiveness (especially compared to rmdir("symlink-to-file/")),
+     but not enough to penalize POSIX systems with an rpl_rmdir.  */
+  if (symlink (BASE "dir", BASE "link") != 0)
+    {
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+  ASSERT (mkdir (BASE "dir", 0700) == 0);
+  errno = 0;
+  if (func (BASE "link/") == 0)
+    {
+      struct stat st;
+      errno = 0;
+      ASSERT (stat (BASE "link", &st) == -1);
+      ASSERT (errno == ENOENT);
+    }
+  else
+    {
+      ASSERT (errno == ENOTDIR);
+      ASSERT (func (BASE "dir") == 0);
+    }
+  ASSERT (unlink (BASE "link") == 0);
+
+  return 0;
+}
diff --git a/tests/test-setenv.c b/tests/test-setenv.c
new file mode 100644 (file)
index 0000000..50eb71b
--- /dev/null
@@ -0,0 +1,56 @@
+/* Tests of setenv.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (setenv, int, (char const *, char const *, int));
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  /* Test overwriting.  */
+  ASSERT (setenv ("a", "==", -1) == 0);
+  ASSERT (setenv ("a", "2", 0) == 0);
+  ASSERT (strcmp (getenv ("a"), "==") == 0);
+
+  /* Required to fail with EINVAL.  */
+  errno = 0;
+  ASSERT (setenv ("", "", 1) == -1);
+  ASSERT (errno == EINVAL);
+  errno = 0;
+  ASSERT (setenv ("a=b", "", 0) == -1);
+  ASSERT (errno == EINVAL);
+#if 0
+  /* glibc and gnulib's implementation guarantee this, but POSIX no
+     longer requires it: http://austingroupbugs.net/view.php?id=185  */
+  errno = 0;
+  ASSERT (setenv (NULL, "", 0) == -1);
+  ASSERT (errno == EINVAL);
+#endif
+
+  return 0;
+}
diff --git a/tests/test-setlocale1.c b/tests/test-setlocale1.c
new file mode 100644 (file)
index 0000000..ea7945c
--- /dev/null
@@ -0,0 +1,59 @@
+/* Test of setting the current locale.
+   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/>.  */
+
+#include <config.h>
+
+#include <locale.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (setlocale, char *, (int, const char *));
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  char *name1;
+  char *name2;
+
+  /* Try to set the locale by implicitly looking at the LC_ALL environment
+     variable.
+     configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  name1 = strdup (setlocale (LC_ALL, NULL));
+
+  /* Reset the locale.  */
+  if (setlocale (LC_ALL, "C") == NULL)
+    return 1;
+
+  /* Try to set the locale by explicitly looking at the LC_ALL environment
+     variable.
+     configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL)
+    return 1;
+
+  name2 = strdup (setlocale (LC_ALL, NULL));
+
+  /* Test that the two results are the same.  */
+  ASSERT (strcmp (name1, name2) == 0);
+
+  return 0;
+}
diff --git a/tests/test-setlocale1.sh b/tests/test-setlocale1.sh
new file mode 100755 (executable)
index 0000000..59a0532
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+: ${LOCALE_FR=fr_FR}
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: ${LOCALE_JA=ja_JP}
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none \
+   && test $LOCALE_JA = none && test $LOCALE_ZH_CN = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no locale for testing is installed"
+  else
+    echo "Skipping test: no locale for testing is supported"
+  fi
+  exit 77
+fi
+
+if test $LOCALE_FR != none; then
+  LC_ALL=$LOCALE_FR      ./test-setlocale1${EXEEXT} || exit 1
+fi
+
+if test $LOCALE_FR_UTF8 != none; then
+  LC_ALL=$LOCALE_FR_UTF8 ./test-setlocale1${EXEEXT} || exit 1
+fi
+
+if test $LOCALE_JA != none; then
+  LC_ALL=$LOCALE_JA      ./test-setlocale1${EXEEXT} || exit 1
+fi
+
+if test $LOCALE_ZH_CN != none; then
+  LC_ALL=$LOCALE_ZH_CN   ./test-setlocale1${EXEEXT} || exit 1
+fi
+
+exit 0
diff --git a/tests/test-setlocale2.c b/tests/test-setlocale2.c
new file mode 100644 (file)
index 0000000..7bfc42a
--- /dev/null
@@ -0,0 +1,55 @@
+/* Test of setting the current locale.
+   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/>.  */
+
+#include <config.h>
+
+#include <locale.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+main ()
+{
+  /* Try to set the locale by implicitly looking at the LC_ALL environment
+     variable.  */
+  if (setlocale (LC_ALL, "") != NULL)
+    /* It was successful.  Check whether LC_CTYPE is non-trivial.  */
+    if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+      {
+        fprintf (stderr, "setlocale did not fail for implicit %s\n",
+                 getenv ("LC_ALL"));
+        return 1;
+      }
+
+  /* Reset the locale.  */
+  if (setlocale (LC_ALL, "C") == NULL)
+    return 1;
+
+  /* Try to set the locale by explicitly looking at the LC_ALL environment
+     variable.  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) != NULL)
+    /* It was successful.  Check whether LC_CTYPE is non-trivial.  */
+    if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+      {
+        fprintf (stderr, "setlocale did not fail for explicit %s\n",
+                 getenv ("LC_ALL"));
+        return 1;
+      }
+
+  return 0;
+}
diff --git a/tests/test-setlocale2.sh b/tests/test-setlocale2.sh
new file mode 100755 (executable)
index 0000000..723e74e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test locale names with likely unsupported encoding in Unix syntax.
+for name in ar_SA.ISO-8859-1 fr_FR.CP1251 zh_TW.GB18030 zh_CN.BIG5; do
+  LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1
+done
+
+# Test locale names with likely unsupported encoding in native Windows syntax.
+for name in "Arabic_Saudi Arabia.1252" "Arabic_Saudi Arabia.65001" \
+            French_France.65001 Japanese_Japan.65001 Turkish_Turkey.65001 \
+            Chinese_Taiwan.65001 Chinese_China.54936 Chinese_China.65001; do
+  LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1
+done
+
+exit 0
diff --git a/tests/test-sleep.c b/tests/test-sleep.c
new file mode 100644 (file)
index 0000000..3550e2b
--- /dev/null
@@ -0,0 +1,58 @@
+/* Test of sleep() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (sleep, unsigned int, (unsigned int));
+
+#include <signal.h>
+
+#include "macros.h"
+
+#if HAVE_DECL_ALARM
+static void
+handle_alarm (int sig)
+{
+  if (sig != SIGALRM)
+    _exit (1);
+}
+#endif
+
+int
+main (void)
+{
+  ASSERT (sleep (1) <= 1);
+
+  ASSERT (sleep (0) == 0);
+
+#if HAVE_DECL_ALARM
+  {
+    const unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
+    unsigned int remaining;
+    signal (SIGALRM, handle_alarm);
+    alarm (1);
+    remaining = sleep (pentecost);
+    ASSERT (pentecost - 10 < remaining && remaining <= pentecost);
+  }
+#endif
+
+  return 0;
+}
diff --git a/tests/test-snprintf.c b/tests/test-snprintf.c
new file mode 100644 (file)
index 0000000..95a352d
--- /dev/null
@@ -0,0 +1,64 @@
+/* Test of snprintf() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (snprintf, int, (char *, size_t, char const *, ...));
+
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  char buf[8];
+  int size;
+  int retval;
+
+  retval = snprintf (NULL, 0, "%d", 12345);
+  ASSERT (retval == 5);
+
+  for (size = 0; size <= 8; size++)
+    {
+      memcpy (buf, "DEADBEEF", 8);
+      retval = snprintf (buf, size, "%d", 12345);
+      ASSERT (retval == 5);
+      if (size < 6)
+        {
+          if (size > 0)
+            {
+              ASSERT (memcmp (buf, "12345", size - 1) == 0);
+              ASSERT (buf[size - 1] == '\0' || buf[size - 1] == '0' + size);
+            }
+#if !CHECK_SNPRINTF_POSIX
+          if (size > 0)
+#endif
+            ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+        }
+      else
+        {
+          ASSERT (memcmp (buf, "12345\0EF", 8) == 0);
+        }
+    }
+
+  return 0;
+}
diff --git a/tests/test-stat-time.c b/tests/test-stat-time.c
new file mode 100644 (file)
index 0000000..a3706e2
--- /dev/null
@@ -0,0 +1,263 @@
+/* Test of <stat-time.h>.
+   Copyright (C) 2007-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>, 2007.  */
+
+#include <config.h>
+
+#include "stat-time.h"
+
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+enum { NFILES = 4 };
+
+static int
+force_unlink (const char *filename)
+{
+  /* This chmod is necessary on mingw, where unlink() of a read-only file
+     fails with EPERM.  */
+  chmod (filename, 0600);
+  return unlink (filename);
+}
+
+static void
+cleanup (int sig)
+{
+  /* Remove temporary files.  */
+  force_unlink ("t-stt-stamp1");
+  force_unlink ("t-stt-testfile");
+  force_unlink ("t-stt-stamp2");
+  force_unlink ("t-stt-renamed");
+  force_unlink ("t-stt-stamp3");
+
+  if (sig != 0)
+    _exit (1);
+}
+
+static int
+open_file (const char *filename, int flags)
+{
+  int fd = open (filename, flags | O_WRONLY, 0500);
+  if (fd >= 0)
+    {
+      close (fd);
+      return 1;
+    }
+  else
+    {
+      return 0;
+    }
+}
+
+static void
+create_file (const char *filename)
+{
+  ASSERT (open_file (filename, O_CREAT | O_EXCL));
+}
+
+static void
+do_stat (const char *filename, struct stat *p)
+{
+  ASSERT (stat (filename, p) == 0);
+}
+
+/* Sleep long enough to notice a timestamp difference on the file
+   system in the current directory.  */
+static void
+nap (void)
+{
+  static long delay;
+  if (!delay)
+    {
+      /* Initialize only once, by sleeping for 20 milliseconds (needed
+         since xfs has a quantization of about 10 milliseconds, even
+         though it has a granularity of 1 nanosecond, and since NTFS
+         has a default quantization of 15.25 milliseconds, even though
+         it has a granularity of 100 nanoseconds).  If the seconds
+         differ, repeat the test one more time (in case we crossed a
+         quantization boundary on a file system with 1 second
+         resolution).  If we can't observe a difference in only the
+         nanoseconds, then fall back to 1 second if the time is odd,
+         and 2 seconds (needed for FAT) if time is even.  */
+      struct stat st1;
+      struct stat st2;
+      ASSERT (stat ("t-stt-stamp1", &st1) == 0);
+      ASSERT (force_unlink ("t-stt-stamp1") == 0);
+      delay = 20000;
+      usleep (delay);
+      create_file ("t-stt-stamp1");
+      ASSERT (stat ("t-stt-stamp1", &st2) == 0);
+      if (st1.st_mtime != st2.st_mtime)
+        {
+          /* Seconds differ, give it one more shot.  */
+          st1 = st2;
+          ASSERT (force_unlink ("t-stt-stamp1") == 0);
+          usleep (delay);
+          create_file ("t-stt-stamp1");
+          ASSERT (stat ("t-stt-stamp1", &st2) == 0);
+        }
+      if (! (st1.st_mtime == st2.st_mtime
+             && get_stat_mtime_ns (&st1) < get_stat_mtime_ns (&st2)))
+        delay = (st1.st_mtime & 1) ? 1000000 : 2000000;
+    }
+  usleep (delay);
+}
+
+static void
+prepare_test (struct stat *statinfo, struct timespec *modtimes)
+{
+  int i;
+
+  create_file ("t-stt-stamp1");
+  nap ();
+  create_file ("t-stt-testfile");
+  nap ();
+  create_file ("t-stt-stamp2");
+  nap ();
+  ASSERT (chmod ("t-stt-testfile", 0400) == 0);
+  nap ();
+  create_file ("t-stt-stamp3");
+
+  do_stat ("t-stt-stamp1",  &statinfo[0]);
+  do_stat ("t-stt-testfile", &statinfo[1]);
+  do_stat ("t-stt-stamp2",  &statinfo[2]);
+  do_stat ("t-stt-stamp3",  &statinfo[3]);
+
+  /* Now use our access functions. */
+  for (i = 0; i < NFILES; ++i)
+    {
+      modtimes[i] = get_stat_mtime (&statinfo[i]);
+    }
+}
+
+static void
+test_mtime (const struct stat *statinfo, struct timespec *modtimes)
+{
+  int i;
+
+  /* Use the struct stat fields directly. */
+  /* mtime(stamp1) < mtime(stamp2) */
+  ASSERT (statinfo[0].st_mtime < statinfo[2].st_mtime
+          || (statinfo[0].st_mtime == statinfo[2].st_mtime
+              && (get_stat_mtime_ns (&statinfo[0])
+                  < get_stat_mtime_ns (&statinfo[2]))));
+  /* mtime(stamp2) < mtime(stamp3) */
+  ASSERT (statinfo[2].st_mtime < statinfo[3].st_mtime
+          || (statinfo[2].st_mtime == statinfo[3].st_mtime
+              && (get_stat_mtime_ns (&statinfo[2])
+                  < get_stat_mtime_ns (&statinfo[3]))));
+
+  /* Now check the result of the access functions. */
+  /* mtime(stamp1) < mtime(stamp2) */
+  ASSERT (modtimes[0].tv_sec < modtimes[2].tv_sec
+          || (modtimes[0].tv_sec == modtimes[2].tv_sec
+              && modtimes[0].tv_nsec < modtimes[2].tv_nsec));
+  /* mtime(stamp2) < mtime(stamp3) */
+  ASSERT (modtimes[2].tv_sec < modtimes[3].tv_sec
+          || (modtimes[2].tv_sec == modtimes[3].tv_sec
+              && modtimes[2].tv_nsec < modtimes[3].tv_nsec));
+
+  /* verify equivalence */
+  for (i = 0; i < NFILES; ++i)
+    {
+      struct timespec ts;
+      ts = get_stat_mtime (&statinfo[i]);
+      ASSERT (ts.tv_sec == statinfo[i].st_mtime);
+    }
+}
+
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+/* Skip the ctime tests on native Windows platforms, because their
+   st_ctime is either the same as st_mtime (plus or minus an offset)
+   or set to the file _creation_ time, and is not influenced by rename
+   or chmod.  */
+# define test_ctime(ignored) ((void) 0)
+#else
+static void
+test_ctime (const struct stat *statinfo)
+{
+  /* On some buggy NFS clients, mtime and ctime are disproportionately
+     skewed from one another.  Skip this test in that case.  */
+  if (statinfo[0].st_mtime != statinfo[0].st_ctime)
+    return;
+
+  /* mtime(stamp2) < ctime(renamed) */
+  ASSERT (statinfo[2].st_mtime < statinfo[1].st_ctime
+          || (statinfo[2].st_mtime == statinfo[1].st_ctime
+              && (get_stat_mtime_ns (&statinfo[2])
+                  < get_stat_ctime_ns (&statinfo[1]))));
+}
+#endif
+
+static void
+test_birthtime (const struct stat *statinfo,
+                const struct timespec *modtimes,
+                struct timespec *birthtimes)
+{
+  int i;
+
+  /* Collect the birth times.  */
+  for (i = 0; i < NFILES; ++i)
+    {
+      birthtimes[i] = get_stat_birthtime (&statinfo[i]);
+      if (birthtimes[i].tv_nsec < 0)
+        return;
+    }
+
+  /* mtime(stamp1) < birthtime(renamed) */
+  ASSERT (modtimes[0].tv_sec < birthtimes[1].tv_sec
+          || (modtimes[0].tv_sec == birthtimes[1].tv_sec
+              && modtimes[0].tv_nsec < birthtimes[1].tv_nsec));
+  /* birthtime(renamed) < mtime(stamp2) */
+  ASSERT (birthtimes[1].tv_sec < modtimes[2].tv_sec
+          || (birthtimes[1].tv_sec == modtimes[2].tv_sec
+              && birthtimes[1].tv_nsec < modtimes[2].tv_nsec));
+}
+
+int
+main (void)
+{
+  struct stat statinfo[NFILES];
+  struct timespec modtimes[NFILES];
+  struct timespec birthtimes[NFILES];
+
+#ifdef SIGHUP
+  signal (SIGHUP, cleanup);
+#endif
+#ifdef SIGINT
+  signal (SIGINT, cleanup);
+#endif
+#ifdef SIGQUIT
+  signal (SIGQUIT, cleanup);
+#endif
+#ifdef SIGTERM
+  signal (SIGTERM, cleanup);
+#endif
+
+  cleanup (0);
+  prepare_test (statinfo, modtimes);
+  test_mtime (statinfo, modtimes);
+  test_ctime (statinfo);
+  test_birthtime (statinfo, modtimes, birthtimes);
+
+  cleanup (0);
+  return 0;
+}
diff --git a/tests/test-stat.c b/tests/test-stat.c
new file mode 100644 (file)
index 0000000..4cda089
--- /dev/null
@@ -0,0 +1,56 @@
+/* Tests of stat.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+/* Caution: stat may be a function-like macro.  Although this
+   signature check must pass, it may be the signature of the real (and
+   broken) stat rather than rpl_stat.  Most code should not use the
+   address of stat.  */
+#include "signature.h"
+SIGNATURE_CHECK (stat, int, (char const *, struct stat *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "pathmax.h"
+#include "same-inode.h"
+#include "macros.h"
+
+#define BASE "test-stat.t"
+
+#include "test-stat.h"
+
+/* Wrapper around stat, which works even if stat is a function-like
+   macro, where test_stat_func(stat) would do the wrong thing.  */
+static int
+do_stat (char const *name, struct stat *st)
+{
+  return stat (name, st);
+}
+
+int
+main (void)
+{
+  return test_stat_func (do_stat, true);
+}
diff --git a/tests/test-stat.h b/tests/test-stat.h
new file mode 100644 (file)
index 0000000..22552dc
--- /dev/null
@@ -0,0 +1,100 @@
+/* Tests of stat.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+/* This file is designed to test both stat(n,buf) and
+   fstatat(AT_FDCWD,n,buf,0).  FUNC is the function to test.  Assumes
+   that BASE and ASSERT are already defined, and that appropriate
+   headers are already included.  If PRINT, warn before skipping
+   symlink tests with status 77.  */
+
+static int
+test_stat_func (int (*func) (char const *, struct stat *), bool print)
+{
+  struct stat st1;
+  struct stat st2;
+  char cwd[PATH_MAX];
+
+  ASSERT (getcwd (cwd, PATH_MAX) == cwd);
+  ASSERT (func (".", &st1) == 0);
+  ASSERT (func ("./", &st2) == 0);
+  ASSERT (SAME_INODE (st1, st2));
+  ASSERT (func (cwd, &st2) == 0);
+  ASSERT (SAME_INODE (st1, st2));
+  ASSERT (func ("/", &st1) == 0);
+  ASSERT (func ("///", &st2) == 0);
+  ASSERT (SAME_INODE (st1, st2));
+
+  errno = 0;
+  ASSERT (func ("", &st1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("nosuch", &st1) == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("nosuch/", &st1) == -1);
+  ASSERT (errno == ENOENT);
+
+  ASSERT (close (creat (BASE "file", 0600)) == 0);
+  ASSERT (func (BASE "file", &st1) == 0);
+  errno = 0;
+  ASSERT (func (BASE "file/", &st1) == -1);
+  ASSERT (errno == ENOTDIR);
+
+  /* Now for some symlink tests, where supported.  We set up:
+     link1 -> directory
+     link2 -> file
+     link3 -> dangling
+     link4 -> loop
+     then test behavior with trailing slash.
+  */
+  if (symlink (".", BASE "link1") != 0)
+    {
+      ASSERT (unlink (BASE "file") == 0);
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+  ASSERT (symlink (BASE "file", BASE "link2") == 0);
+  ASSERT (symlink (BASE "nosuch", BASE "link3") == 0);
+  ASSERT (symlink (BASE "link4", BASE "link4") == 0);
+
+  ASSERT (func (BASE "link1/", &st1) == 0);
+  ASSERT (S_ISDIR (st1.st_mode));
+
+  errno = 0;
+  ASSERT (func (BASE "link2/", &st1) == -1);
+  ASSERT (errno == ENOTDIR);
+
+  errno = 0;
+  ASSERT (func (BASE "link3/", &st1) == -1);
+  ASSERT (errno == ENOENT);
+
+  errno = 0;
+  ASSERT (func (BASE "link4/", &st1) == -1);
+  ASSERT (errno == ELOOP);
+
+  /* Cleanup.  */
+  ASSERT (unlink (BASE "file") == 0);
+  ASSERT (unlink (BASE "link1") == 0);
+  ASSERT (unlink (BASE "link2") == 0);
+  ASSERT (unlink (BASE "link3") == 0);
+  ASSERT (unlink (BASE "link4") == 0);
+
+  return 0;
+}
diff --git a/tests/test-stdbool.c b/tests/test-stdbool.c
new file mode 100644 (file)
index 0000000..e115ba2
--- /dev/null
@@ -0,0 +1,118 @@
+/* Test of <stdbool.h> substitute.
+   Copyright (C) 2002-2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+/* We want this test to succeed even when using gcc's -Werror; but to
+   do that requires a pragma that didn't exist before 4.3.0.  */
+#ifndef __GNUC__
+# define ADDRESS_CHECK_OKAY
+#elif __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+/* No way to silence -Waddress.  */
+#else
+# pragma GCC diagnostic ignored "-Waddress"
+# define ADDRESS_CHECK_OKAY
+#endif
+
+#include <config.h>
+
+#include <stdbool.h>
+
+#ifndef bool
+ "error: bool is not defined"
+#endif
+#ifndef false
+ "error: false is not defined"
+#endif
+#if false
+ "error: false is not 0"
+#endif
+#ifndef true
+ "error: true is not defined"
+#endif
+#if true != 1
+ "error: true is not 1"
+#endif
+#ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+#endif
+
+/* Several tests cannot be guaranteed with gnulib's <stdbool.h>, at
+   least, not for all compilers and compiler options.  */
+#if HAVE_STDBOOL_H || 3 <= __GNUC__
+struct s { _Bool s: 1; _Bool t; } s;
+#endif
+
+char a[true == 1 ? 1 : -1];
+char b[false == 0 ? 1 : -1];
+char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above.  */
+char d[(bool) 0.5 == true ? 1 : -1];
+# ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning.  */
+/* C99 may plausibly be interpreted as not requiring support for a cast from
+   a variable's address to bool in a static initializer.  So treat it like a
+   GCC extension.  */
+#  ifdef __GNUC__
+bool e = &s;
+#  endif
+# endif
+char f[(_Bool) 0.0 == false ? 1 : -1];
+#endif
+char g[true];
+char h[sizeof (_Bool)];
+#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above.  */
+char i[sizeof s.t];
+#endif
+enum { j = false, k = true, l = false * true, m = true * 256 };
+_Bool n[m];
+char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+/* Catch a bug in an HP-UX C compiler.  See
+   http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+   http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+_Bool q = true;
+_Bool *pq = &q;
+
+int
+main ()
+{
+  int error = 0;
+
+#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above.  */
+# ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning.  */
+  /* A cast from a variable's address to bool is valid in expressions.  */
+  {
+    bool e1 = &s;
+    if (!e1)
+      error = 1;
+  }
+# endif
+#endif
+
+  /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+     reported by James Lemley on 2005-10-05; see
+     http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+     This is a runtime test, since a corresponding compile-time
+     test would rely on initializer extensions.  */
+  {
+    char digs[] = "0123456789";
+    if (&(digs + 5)[-2 + (bool) 1] != &digs[4])
+      error = 1;
+  }
+
+  return error;
+}
diff --git a/tests/test-stddef.c b/tests/test-stddef.c
new file mode 100644 (file)
index 0000000..c929af8
--- /dev/null
@@ -0,0 +1,52 @@
+/* Test of <stddef.h> substitute.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <stddef.h>
+
+#include "verify.h"
+
+/* Check that appropriate types are defined.  */
+wchar_t a = 'c';
+ptrdiff_t b = 1;
+size_t c = 2;
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
+/* Check that offsetof produces integer constants with correct type.  */
+struct d
+{
+  char e;
+  char f;
+};
+/* Solaris 10 has a bug where offsetof is under-parenthesized, and
+   cannot be used as an arbitrary expression.  However, since it is
+   unlikely to bite real code, we ignore that short-coming.  */
+/* verify (sizeof offsetof (struct d, e) == sizeof (size_t)); */
+verify (sizeof (offsetof (struct d, e)) == sizeof (size_t));
+verify (offsetof (struct d, e) < -1); /* Must be unsigned.  */
+verify (offsetof (struct d, f) == 1);
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-stdint.c b/tests/test-stdint.c
new file mode 100644 (file)
index 0000000..f606cc3
--- /dev/null
@@ -0,0 +1,361 @@
+/* Test of <stdint.h> substitute.
+   Copyright (C) 2006-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 Bruno Haible <bruno@clisp.org>, 2006.  */
+
+#include <config.h>
+
+/* Whether to enable pedantic checks. */
+#define DO_PEDANTIC 0
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* likewise */
+#include <stdint.h>
+
+#include "verify.h"
+#include "intprops.h"
+
+#if __GNUC__ >= 2 && DO_PEDANTIC
+# define verify_same_types(expr1,expr2)  \
+    extern void _verify_func(__LINE__) (__typeof__ (expr1) *); \
+    extern void _verify_func(__LINE__) (__typeof__ (expr2) *);
+# define _verify_func(line) _verify_func2(line)
+# define _verify_func2(line) verify_func_ ## line
+#else
+# define verify_same_types(expr1,expr2) extern void verify_func (int)
+#endif
+
+/* 7.18.1.1. Exact-width integer types */
+/* 7.18.2.1. Limits of exact-width integer types */
+
+int8_t a1[3] = { INT8_C (17), INT8_MIN, INT8_MAX };
+verify (TYPE_MINIMUM (int8_t) == INT8_MIN);
+verify (TYPE_MAXIMUM (int8_t) == INT8_MAX);
+verify_same_types (INT8_MIN, (int8_t) 0 + 0);
+verify_same_types (INT8_MAX, (int8_t) 0 + 0);
+
+int16_t a2[3] = { INT16_C (17), INT16_MIN, INT16_MAX };
+verify (TYPE_MINIMUM (int16_t) == INT16_MIN);
+verify (TYPE_MAXIMUM (int16_t) == INT16_MAX);
+verify_same_types (INT16_MIN, (int16_t) 0 + 0);
+verify_same_types (INT16_MAX, (int16_t) 0 + 0);
+
+int32_t a3[3] = { INT32_C (17), INT32_MIN, INT32_MAX };
+verify (TYPE_MINIMUM (int32_t) == INT32_MIN);
+verify (TYPE_MAXIMUM (int32_t) == INT32_MAX);
+verify_same_types (INT32_MIN, (int32_t) 0 + 0);
+verify_same_types (INT32_MAX, (int32_t) 0 + 0);
+
+#ifdef INT64_MAX
+int64_t a4[3] = { INT64_C (17), INT64_MIN, INT64_MAX };
+verify (TYPE_MINIMUM (int64_t) == INT64_MIN);
+verify (TYPE_MAXIMUM (int64_t) == INT64_MAX);
+verify_same_types (INT64_MIN, (int64_t) 0 + 0);
+verify_same_types (INT64_MAX, (int64_t) 0 + 0);
+#endif
+
+uint8_t b1[2] = { UINT8_C (17), UINT8_MAX };
+verify (TYPE_MAXIMUM (uint8_t) == UINT8_MAX);
+verify_same_types (UINT8_MAX, (uint8_t) 0 + 0);
+
+uint16_t b2[2] = { UINT16_C (17), UINT16_MAX };
+verify (TYPE_MAXIMUM (uint16_t) == UINT16_MAX);
+verify_same_types (UINT16_MAX, (uint16_t) 0 + 0);
+
+uint32_t b3[2] = { UINT32_C (17), UINT32_MAX };
+verify (TYPE_MAXIMUM (uint32_t) == UINT32_MAX);
+verify_same_types (UINT32_MAX, (uint32_t) 0 + 0);
+
+#ifdef UINT64_MAX
+uint64_t b4[2] = { UINT64_C (17), UINT64_MAX };
+verify (TYPE_MAXIMUM (uint64_t) == UINT64_MAX);
+verify_same_types (UINT64_MAX, (uint64_t) 0 + 0);
+#endif
+
+#if INT8_MIN && INT8_MAX && INT16_MIN && INT16_MAX && INT32_MIN && INT32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if UINT8_MAX && UINT16_MAX && UINT32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.2. Minimum-width integer types */
+/* 7.18.2.2. Limits of minimum-width integer types */
+
+int_least8_t c1[3] = { 17, INT_LEAST8_MIN, INT_LEAST8_MAX };
+verify (TYPE_MINIMUM (int_least8_t) == INT_LEAST8_MIN);
+verify (TYPE_MAXIMUM (int_least8_t) == INT_LEAST8_MAX);
+verify_same_types (INT_LEAST8_MIN, (int_least8_t) 0 + 0);
+verify_same_types (INT_LEAST8_MAX, (int_least8_t) 0 + 0);
+
+int_least16_t c2[3] = { 17, INT_LEAST16_MIN, INT_LEAST16_MAX };
+verify (TYPE_MINIMUM (int_least16_t) == INT_LEAST16_MIN);
+verify (TYPE_MAXIMUM (int_least16_t) == INT_LEAST16_MAX);
+verify_same_types (INT_LEAST16_MIN, (int_least16_t) 0 + 0);
+verify_same_types (INT_LEAST16_MAX, (int_least16_t) 0 + 0);
+
+int_least32_t c3[3] = { 17, INT_LEAST32_MIN, INT_LEAST32_MAX };
+verify (TYPE_MINIMUM (int_least32_t) == INT_LEAST32_MIN);
+verify (TYPE_MAXIMUM (int_least32_t) == INT_LEAST32_MAX);
+verify_same_types (INT_LEAST32_MIN, (int_least32_t) 0 + 0);
+verify_same_types (INT_LEAST32_MAX, (int_least32_t) 0 + 0);
+
+#ifdef INT_LEAST64_MAX
+int_least64_t c4[3] = { 17, INT_LEAST64_MIN, INT_LEAST64_MAX };
+verify (TYPE_MINIMUM (int_least64_t) == INT_LEAST64_MIN);
+verify (TYPE_MAXIMUM (int_least64_t) == INT_LEAST64_MAX);
+verify_same_types (INT_LEAST64_MIN, (int_least64_t) 0 + 0);
+verify_same_types (INT_LEAST64_MAX, (int_least64_t) 0 + 0);
+#endif
+
+uint_least8_t d1[2] = { 17, UINT_LEAST8_MAX };
+verify (TYPE_MAXIMUM (uint_least8_t) == UINT_LEAST8_MAX);
+verify_same_types (UINT_LEAST8_MAX, (uint_least8_t) 0 + 0);
+
+uint_least16_t d2[2] = { 17, UINT_LEAST16_MAX };
+verify (TYPE_MAXIMUM (uint_least16_t) == UINT_LEAST16_MAX);
+verify_same_types (UINT_LEAST16_MAX, (uint_least16_t) 0 + 0);
+
+uint_least32_t d3[2] = { 17, UINT_LEAST32_MAX };
+verify (TYPE_MAXIMUM (uint_least32_t) == UINT_LEAST32_MAX);
+verify_same_types (UINT_LEAST32_MAX, (uint_least32_t) 0 + 0);
+
+#ifdef UINT_LEAST64_MAX
+uint_least64_t d4[2] = { 17, UINT_LEAST64_MAX };
+verify (TYPE_MAXIMUM (uint_least64_t) == UINT_LEAST64_MAX);
+verify_same_types (UINT_LEAST64_MAX, (uint_least64_t) 0 + 0);
+#endif
+
+#if INT_LEAST8_MIN && INT_LEAST8_MAX && INT_LEAST16_MIN && INT_LEAST16_MAX && INT_LEAST32_MIN && INT_LEAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if UINT_LEAST8_MAX && UINT_LEAST16_MAX && UINT_LEAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.3. Fastest minimum-width integer types */
+/* 7.18.2.3. Limits of fastest minimum-width integer types */
+
+int_fast8_t e1[3] = { 17, INT_FAST8_MIN, INT_FAST8_MAX };
+verify (TYPE_MINIMUM (int_fast8_t) == INT_FAST8_MIN);
+verify (TYPE_MAXIMUM (int_fast8_t) == INT_FAST8_MAX);
+verify_same_types (INT_FAST8_MIN, (int_fast8_t) 0 + 0);
+verify_same_types (INT_FAST8_MAX, (int_fast8_t) 0 + 0);
+
+int_fast16_t e2[3] = { 17, INT_FAST16_MIN, INT_FAST16_MAX };
+verify (TYPE_MINIMUM (int_fast16_t) == INT_FAST16_MIN);
+verify (TYPE_MAXIMUM (int_fast16_t) == INT_FAST16_MAX);
+verify_same_types (INT_FAST16_MIN, (int_fast16_t) 0 + 0);
+verify_same_types (INT_FAST16_MAX, (int_fast16_t) 0 + 0);
+
+int_fast32_t e3[3] = { 17, INT_FAST32_MIN, INT_FAST32_MAX };
+verify (TYPE_MINIMUM (int_fast32_t) == INT_FAST32_MIN);
+verify (TYPE_MAXIMUM (int_fast32_t) == INT_FAST32_MAX);
+verify_same_types (INT_FAST32_MIN, (int_fast32_t) 0 + 0);
+verify_same_types (INT_FAST32_MAX, (int_fast32_t) 0 + 0);
+
+#ifdef INT_FAST64_MAX
+int_fast64_t e4[3] = { 17, INT_FAST64_MIN, INT_FAST64_MAX };
+verify (TYPE_MINIMUM (int_fast64_t) == INT_FAST64_MIN);
+verify (TYPE_MAXIMUM (int_fast64_t) == INT_FAST64_MAX);
+verify_same_types (INT_FAST64_MIN, (int_fast64_t) 0 + 0);
+verify_same_types (INT_FAST64_MAX, (int_fast64_t) 0 + 0);
+#endif
+
+uint_fast8_t f1[2] = { 17, UINT_FAST8_MAX };
+verify (TYPE_MAXIMUM (uint_fast8_t) == UINT_FAST8_MAX);
+verify_same_types (UINT_FAST8_MAX, (uint_fast8_t) 0 + 0);
+
+uint_fast16_t f2[2] = { 17, UINT_FAST16_MAX };
+verify (TYPE_MAXIMUM (uint_fast16_t) == UINT_FAST16_MAX);
+verify_same_types (UINT_FAST16_MAX, (uint_fast16_t) 0 + 0);
+
+uint_fast32_t f3[2] = { 17, UINT_FAST32_MAX };
+verify (TYPE_MAXIMUM (uint_fast32_t) == UINT_FAST32_MAX);
+verify_same_types (UINT_FAST32_MAX, (uint_fast32_t) 0 + 0);
+
+#ifdef UINT_FAST64_MAX
+uint_fast64_t f4[2] = { 17, UINT_FAST64_MAX };
+verify (TYPE_MAXIMUM (uint_fast64_t) == UINT_FAST64_MAX);
+verify_same_types (UINT_FAST64_MAX, (uint_fast64_t) 0 + 0);
+#endif
+
+#if INT_FAST8_MIN && INT_FAST8_MAX && INT_FAST16_MIN && INT_FAST16_MAX && INT_FAST32_MIN && INT_FAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if UINT_FAST8_MAX && UINT_FAST16_MAX && UINT_FAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.4. Integer types capable of holding object pointers */
+/* 7.18.2.4. Limits of integer types capable of holding object pointers */
+
+intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX };
+verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN);
+verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX);
+verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0);
+verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0);
+
+uintptr_t h[2] = { 17, UINTPTR_MAX };
+verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX);
+verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0);
+
+#if INTPTR_MIN && INTPTR_MAX && UINTPTR_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.5. Greatest-width integer types */
+/* 7.18.2.5. Limits of greatest-width integer types */
+
+intmax_t i[3] = { INTMAX_C (17), INTMAX_MIN, INTMAX_MAX };
+verify (TYPE_MINIMUM (intmax_t) == INTMAX_MIN);
+verify (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX);
+verify_same_types (INTMAX_MIN, (intmax_t) 0 + 0);
+verify_same_types (INTMAX_MAX, (intmax_t) 0 + 0);
+
+uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX };
+verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX);
+verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0);
+
+/* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in
+   the preprocessor.  */
+#if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__))
+#if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX
+/* ok */
+#else
+err or;
+#endif
+#endif
+
+/* 7.18.3. Limits of other integer types */
+
+#include <stddef.h>
+
+verify (TYPE_MINIMUM (ptrdiff_t) == PTRDIFF_MIN);
+verify (TYPE_MAXIMUM (ptrdiff_t) == PTRDIFF_MAX);
+verify_same_types (PTRDIFF_MIN, (ptrdiff_t) 0 + 0);
+verify_same_types (PTRDIFF_MAX, (ptrdiff_t) 0 + 0);
+
+#if PTRDIFF_MIN && PTRDIFF_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#include <signal.h>
+
+verify (TYPE_MINIMUM (sig_atomic_t) == SIG_ATOMIC_MIN);
+verify (TYPE_MAXIMUM (sig_atomic_t) == SIG_ATOMIC_MAX);
+verify_same_types (SIG_ATOMIC_MIN, (sig_atomic_t) 0 + 0);
+verify_same_types (SIG_ATOMIC_MAX, (sig_atomic_t) 0 + 0);
+
+#if SIG_ATOMIC_MIN != 17 && SIG_ATOMIC_MAX
+/* ok */
+#else
+err or;
+#endif
+
+verify (TYPE_MAXIMUM (size_t) == SIZE_MAX);
+verify_same_types (SIZE_MAX, (size_t) 0 + 0);
+
+#if SIZE_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if HAVE_WCHAR_T
+verify (TYPE_MINIMUM (wchar_t) == WCHAR_MIN);
+verify (TYPE_MAXIMUM (wchar_t) == WCHAR_MAX);
+verify_same_types (WCHAR_MIN, (wchar_t) 0 + 0);
+verify_same_types (WCHAR_MAX, (wchar_t) 0 + 0);
+
+# if WCHAR_MIN != 17 && WCHAR_MAX
+/* ok */
+# else
+err or;
+# endif
+#endif
+
+#if HAVE_WINT_T
+# include <wchar.h>
+
+verify (TYPE_MINIMUM (wint_t) == WINT_MIN);
+verify (TYPE_MAXIMUM (wint_t) == WINT_MAX);
+verify_same_types (WINT_MIN, (wint_t) 0 + 0);
+verify_same_types (WINT_MAX, (wint_t) 0 + 0);
+
+# if WINT_MIN != 17 && WINT_MAX
+/* ok */
+# else
+err or;
+# endif
+#endif
+
+/* 7.18.4. Macros for integer constants */
+
+verify (INT8_C (17) == 17);
+verify_same_types (INT8_C (17), (int_least8_t)0 + 0);
+verify (UINT8_C (17) == 17);
+verify_same_types (UINT8_C (17), (uint_least8_t)0 + 0);
+
+verify (INT16_C (17) == 17);
+verify_same_types (INT16_C (17), (int_least16_t)0 + 0);
+verify (UINT16_C (17) == 17);
+verify_same_types (UINT16_C (17), (uint_least16_t)0 + 0);
+
+verify (INT32_C (17) == 17);
+verify_same_types (INT32_C (17), (int_least32_t)0 + 0);
+verify (UINT32_C (17) == 17);
+verify_same_types (UINT32_C (17), (uint_least32_t)0 + 0);
+
+#ifdef INT64_C
+verify (INT64_C (17) == 17);
+verify_same_types (INT64_C (17), (int_least64_t)0 + 0);
+#endif
+#ifdef UINT64_C
+verify (UINT64_C (17) == 17);
+verify_same_types (UINT64_C (17), (uint_least64_t)0 + 0);
+#endif
+
+verify (INTMAX_C (17) == 17);
+verify_same_types (INTMAX_C (17), (intmax_t)0 + 0);
+verify (UINTMAX_C (17) == 17);
+verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0);
+
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-stdio.c b/tests/test-stdio.c
new file mode 100644 (file)
index 0000000..7e7a206
--- /dev/null
@@ -0,0 +1,43 @@
+/* Test of <stdio.h> substitute.
+   Copyright (C) 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "verify.h"
+
+/* Check that the various SEEK_* macros are defined.  */
+int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
+/* Check that the types are all defined.  */
+fpos_t t1;
+off_t t2;
+size_t t3;
+ssize_t t4;
+va_list t5;
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-stdlib.c b/tests/test-stdlib.c
new file mode 100644 (file)
index 0000000..210aab4
--- /dev/null
@@ -0,0 +1,54 @@
+/* Test of <stdlib.h> substitute.
+   Copyright (C) 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "verify.h"
+
+/* Check that EXIT_SUCCESS is 0, per POSIX.  */
+static int exitcode = EXIT_SUCCESS;
+#if EXIT_SUCCESS
+"oops"
+#endif
+
+/* Check for GNU value (not guaranteed by POSIX, but is guaranteed by
+   gnulib).  */
+#if EXIT_FAILURE != 1
+"oops"
+#endif
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
+#if GNULIB_TEST_SYSTEM_POSIX
+# include "test-sys_wait.h"
+#else
+# define test_sys_wait_macros() 0
+#endif
+
+int
+main (void)
+{
+  if (test_sys_wait_macros ())
+    return 1;
+
+  return exitcode;
+}
diff --git a/tests/test-strcasestr.c b/tests/test-strcasestr.c
new file mode 100644 (file)
index 0000000..fb1314b
--- /dev/null
@@ -0,0 +1,254 @@
+/* Test of case-insensitive searching in a string.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strcasestr, char *, (char const *, char const *));
+
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+#if HAVE_DECL_ALARM
+  /* Declare failure if test takes too long, by using default abort
+     caused by SIGALRM.  All known platforms that lack alarm also lack
+     strcasestr, and the replacement strcasestr is known to not take too
+     long.  */
+  signal (SIGALRM, SIG_DFL);
+  alarm (50);
+#endif
+
+  {
+    const char input[] = "foo";
+    const char *result = strcasestr (input, "");
+    ASSERT (result == input);
+  }
+
+  {
+    const char input[] = "foo";
+    const char *result = strcasestr (input, "O");
+    ASSERT (result == input + 1);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = strcasestr (input, "ABCDaBD");
+    ASSERT (result == input + 15);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = strcasestr (input, "ABCDaBE");
+    ASSERT (result == NULL);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = strcasestr (input, "ABCDaBCD");
+    ASSERT (result == input + 11);
+  }
+
+  /* Check that a long periodic needle does not cause false positives.  */
+  {
+    const char input[] = ("F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                          "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                          "_C3_A7_20_EF_BF_BD");
+    const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+    const char *result = strcasestr (input, need);
+    ASSERT (result == NULL);
+  }
+  {
+    const char input[] = ("F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                          "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                          "_C3_A7_20_EF_BF_BD_DA_B5_C2_A6_20"
+                          "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD");
+    const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+    const char *result = strcasestr (input, need);
+    ASSERT (result == input + 115);
+  }
+
+  /* Check that a very long haystack is handled quickly if the needle is
+     short and occurs near the beginning.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *needle =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaAaaaaaaAAAAaaaaaaa"
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+    char *haystack = (char *) malloc (m + 1);
+    if (haystack != NULL)
+      {
+        memset (haystack, 'A', m);
+        haystack[0] = 'B';
+        haystack[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (strcasestr (haystack, needle) == haystack + 1);
+          }
+
+        free (haystack);
+      }
+  }
+
+  /* Check that a very long needle is discarded quickly if the haystack is
+     short.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *haystack =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
+    char *needle = (char *) malloc (m + 1);
+    if (needle != NULL)
+      {
+        memset (needle, 'A', m);
+        needle[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (strcasestr (haystack, needle) == NULL);
+          }
+
+        free (needle);
+      }
+  }
+
+  /* Check that the asymptotic worst-case complexity is not quadratic.  */
+  {
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    if (haystack != NULL && needle != NULL)
+      {
+        const char *result;
+
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = '\0';
+
+        memset (needle, 'a', m);
+        needle[m] = 'B';
+        needle[m + 1] = '\0';
+
+        result = strcasestr (haystack, needle);
+        ASSERT (result == haystack + m);
+      }
+    free (needle);
+    free (haystack);
+  }
+
+  {
+    /* Ensure that with a barely periodic "short" needle, strcasestr's
+       search does not mistakenly skip just past the match point.
+       This use of strcasestr would mistakenly return NULL before
+       gnulib v0.0-4927.  */
+    const char *haystack =
+      "\n"
+      "with_build_libsubdir\n"
+      "with_local_prefix\n"
+      "with_gxx_include_dir\n"
+      "with_cpp_install_dir\n"
+      "enable_generated_files_in_srcdir\n"
+      "with_gnu_ld\n"
+      "with_ld\n"
+      "with_demangler_in_ld\n"
+      "with_gnu_as\n"
+      "with_as\n"
+      "enable_largefile\n"
+      "enable_werror_always\n"
+      "enable_checking\n"
+      "enable_coverage\n"
+      "enable_gather_detailed_mem_stats\n"
+      "enable_build_with_cxx\n"
+      "with_stabs\n"
+      "enable_multilib\n"
+      "enable___cxa_atexit\n"
+      "enable_decimal_float\n"
+      "enable_fixed_point\n"
+      "enable_threads\n"
+      "enable_tls\n"
+      "enable_objc_gc\n"
+      "with_dwarf2\n"
+      "enable_shared\n"
+      "with_build_sysroot\n"
+      "with_sysroot\n"
+      "with_specs\n"
+      "with_pkgversion\n"
+      "with_bugurl\n"
+      "enable_languages\n"
+      "with_multilib_list\n";
+    const char *needle = "\n"
+      "with_GNU_ld\n";
+    const char* p = strcasestr (haystack, needle);
+    ASSERT (p - haystack == 114);
+  }
+
+  {
+    /* Same bug, shorter trigger.  */
+    const char *haystack = "..wi.D.";
+    const char *needle = ".d.";
+    const char* p = strcasestr (haystack, needle);
+    ASSERT (p - haystack == 4);
+  }
+
+  {
+    /* Like the above, but trigger the flaw in two_way_long_needle
+       by using a needle of length LONG_NEEDLE_THRESHOLD (32) or greater.
+       Rather than trying to find the right alignment manually, I've
+       arbitrarily chosen the following needle and template for the
+       haystack, and ensure that for each placement of the needle in
+       that haystack, strcasestr finds it.  */
+    const char *needle = "\nwith_gnu_ld-extend-to-len-32-b\n";
+    const char *h =
+      "\n"
+      "with_build_libsubdir\n"
+      "with_local_prefix\n"
+      "with_gxx_include_dir\n"
+      "with_cpp_install_dir\n"
+      "with_e_\n"
+      "..............................\n"
+      "with_FGHIJKLMNOPQRSTUVWXYZ\n"
+      "with_567890123456789\n"
+      "with_multilib_list\n";
+    size_t h_len = strlen (h);
+    char *haystack = malloc (h_len + 1);
+    size_t i;
+    ASSERT (haystack);
+    for (i = 0; i < h_len - strlen (needle); i++)
+      {
+        const char *p;
+        memcpy (haystack, h, h_len + 1);
+        memcpy (haystack + i, needle, strlen (needle) + 1);
+        p = strcasestr (haystack, needle);
+        ASSERT (p);
+        ASSERT (p - haystack == i);
+      }
+  }
+
+  return 0;
+}
diff --git a/tests/test-strerror.c b/tests/test-strerror.c
new file mode 100644 (file)
index 0000000..66dbe82
--- /dev/null
@@ -0,0 +1,57 @@
+/* Test of strerror() function.
+   Copyright (C) 2007-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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2007.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strerror, char *, (int));
+
+#include <errno.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  char *str;
+
+  str = strerror (EACCES);
+  ASSERT (str);
+  ASSERT (*str);
+
+  str = strerror (ETIMEDOUT);
+  ASSERT (str);
+  ASSERT (*str);
+
+  str = strerror (EOVERFLOW);
+  ASSERT (str);
+  ASSERT (*str);
+
+  str = strerror (0);
+  ASSERT (str);
+  ASSERT (*str);
+
+  str = strerror (-3);
+  ASSERT (str);
+  ASSERT (*str);
+
+  return 0;
+}
diff --git a/tests/test-strftime.c b/tests/test-strftime.c
new file mode 100644 (file)
index 0000000..2578550
--- /dev/null
@@ -0,0 +1,82 @@
+/* Test that posixtime works as required.
+   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 Jim Meyering.  */
+
+#include <config.h>
+
+#include "strftime.h"
+
+#include <stdio.h>
+#include <time.h>
+#include <string.h>
+
+#include "macros.h"
+#define STREQ(a, b) (strcmp (a, b) == 0)
+
+struct posixtm_test
+{
+  time_t in;
+  int in_ns;
+  char const *fmt;
+  char const *exp;
+};
+
+static struct posixtm_test const T[] =
+  {
+    { 1300000000, 0,            "%F", "2011-03-13" },
+    { 0,          0,            NULL, NULL }
+  };
+
+int
+main (void)
+{
+  int fail = 0;
+  unsigned int i;
+
+  for (i = 0; T[i].fmt; i++)
+    {
+      char buf[1000];
+      time_t t = T[i].in;
+      struct tm *tm = gmtime (&t);
+      size_t n;
+      int utc = 1;
+
+      ASSERT (tm);
+
+      n = nstrftime (buf, sizeof buf, T[i].fmt, tm, utc, T[i].in_ns);
+      if (n == 0)
+        {
+          fail = 1;
+          printf ("nstrftime failed with format %s\n", T[i].fmt);
+        }
+
+      if (! STREQ (buf, T[i].exp))
+        {
+          fail = 1;
+          printf ("%s: result mismatch: got %s, expected %s\n",
+                  T[i].fmt, buf, T[i].exp);
+        }
+    }
+
+  return fail;
+}
+
+/*
+Local Variables:
+indent-tabs-mode: nil
+End:
+*/
diff --git a/tests/test-string.c b/tests/test-string.c
new file mode 100644 (file)
index 0000000..54c49a9
--- /dev/null
@@ -0,0 +1,33 @@
+/* Test of <string.h> substitute.
+   Copyright (C) 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "verify.h"
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-strings.c b/tests/test-strings.c
new file mode 100644 (file)
index 0000000..ee2ad62
--- /dev/null
@@ -0,0 +1,27 @@
+/* Test of <strings.h> substitute.
+   Copyright (C) 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <strings.h>
+
+int
+main ()
+{
+  return 0;
+}
diff --git a/tests/test-strnlen.c b/tests/test-strnlen.c
new file mode 100644 (file)
index 0000000..18d6fcd
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ * Written by Eric Blake
+ *
+ * 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/>.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strnlen, size_t, (char const *, size_t));
+
+#include <stdlib.h>
+
+#include "zerosize-ptr.h"
+#include "macros.h"
+
+int
+main (void)
+{
+  size_t i;
+  char *page_boundary = (char *) zerosize_ptr ();
+  if (!page_boundary)
+    {
+      page_boundary = malloc (0x1000);
+      ASSERT (page_boundary);
+      page_boundary += 0x1000;
+    }
+
+  /* Basic behavior tests.  */
+  ASSERT (strnlen ("a", 0) == 0);
+  ASSERT (strnlen ("a", 1) == 1);
+  ASSERT (strnlen ("a", 2) == 1);
+  ASSERT (strnlen ("", 0x100000) == 0);
+
+  /* Memory fence and alignment testing.  */
+  for (i = 0; i < 512; i++)
+    {
+      char *start = page_boundary - i;
+      size_t j = i;
+      memset (start, 'x', i);
+      do
+        {
+          if (i != j)
+            {
+              start[j] = 0;
+              ASSERT (strnlen (start, i + j) == j);
+            }
+          ASSERT (strnlen (start, i) == j);
+          ASSERT (strnlen (start, j) == j);
+        }
+      while (j--);
+    }
+
+  return 0;
+}
diff --git a/tests/test-strstr.c b/tests/test-strstr.c
new file mode 100644 (file)
index 0000000..d6d6639
--- /dev/null
@@ -0,0 +1,277 @@
+/*
+ * Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc.
+ * Written by Bruno Haible and Eric Blake
+ *
+ * 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/>.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strstr, char *, (char const *, char const *));
+
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "zerosize-ptr.h"
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+#if HAVE_DECL_ALARM
+  /* Declare failure if test takes too long, by using default abort
+     caused by SIGALRM.  All known platforms that lack alarm also have
+     a quadratic strstr, and the replacement strstr is known to not
+     take too long.  */
+  signal (SIGALRM, SIG_DFL);
+  alarm (50);
+#endif
+
+  {
+    const char input[] = "foo";
+    const char *result = strstr (input, "");
+    ASSERT (result == input);
+  }
+
+  {
+    const char input[] = "foo";
+    const char *result = strstr (input, "o");
+    ASSERT (result == input + 1);
+  }
+
+  {
+    /* On some platforms, the memchr() functions reads past the first
+       occurrence of the byte to be searched, leading to an out-of-bounds
+       read access for strstr().
+       See <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737>.
+       This is a bug in memchr(), see the Austin Group's clarification
+       <http://www.opengroup.org/austin/docs/austin_454.txt>.  */
+    const char *fix = "aBaaaaaaaaaaax";
+    char *page_boundary = (char *) zerosize_ptr ();
+    size_t len = strlen (fix) + 1;
+    char *input = page_boundary ? page_boundary - len : malloc (len);
+    const char *result;
+
+    strcpy (input, fix);
+    result = strstr (input, "B1x");
+    ASSERT (result == NULL);
+    if (!page_boundary)
+      free (input);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = strstr (input, "ABCDABD");
+    ASSERT (result == input + 15);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = strstr (input, "ABCDABE");
+    ASSERT (result == NULL);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = strstr (input, "ABCDABCD");
+    ASSERT (result == input + 11);
+  }
+
+  /* Check that a long periodic needle does not cause false positives.  */
+  {
+    const char input[] = "F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                         "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                         "_C3_A7_20_EF_BF_BD";
+    const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+    const char *result = strstr (input, need);
+    ASSERT (result == NULL);
+  }
+  {
+    const char input[] = "F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                         "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                         "_C3_A7_20_EF_BF_BD_DA_B5_C2_A6_20"
+                         "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+    const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+    const char *result = strstr (input, need);
+    ASSERT (result == input + 115);
+  }
+
+  /* Check that a very long haystack is handled quickly if the needle is
+     short and occurs near the beginning.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *needle =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+    char *haystack = (char *) malloc (m + 1);
+    if (haystack != NULL)
+      {
+        memset (haystack, 'A', m);
+        haystack[0] = 'B';
+        haystack[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (strstr (haystack, needle) == haystack + 1);
+          }
+
+        free (haystack);
+      }
+  }
+
+  /* Check that a very long needle is discarded quickly if the haystack is
+     short.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *haystack =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
+    char *needle = (char *) malloc (m + 1);
+    if (needle != NULL)
+      {
+        memset (needle, 'A', m);
+        needle[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (strstr (haystack, needle) == NULL);
+          }
+
+        free (needle);
+      }
+  }
+
+  /* Check that the asymptotic worst-case complexity is not quadratic.  */
+  {
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    if (haystack != NULL && needle != NULL)
+      {
+        const char *result;
+
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = '\0';
+
+        memset (needle, 'A', m);
+        needle[m] = 'B';
+        needle[m + 1] = '\0';
+
+        result = strstr (haystack, needle);
+        ASSERT (result == haystack + m);
+      }
+    free (needle);
+    free (haystack);
+  }
+
+  /* Sublinear speed is only possible in memmem; strstr must examine
+     every character of haystack to find its length.  */
+
+
+  {
+    /* Ensure that with a barely periodic "short" needle, strstr's
+       search does not mistakenly skip just past the match point.
+       This use of strstr would mistakenly return NULL before
+       gnulib v0.0-4927.  */
+    const char *haystack =
+      "\n"
+      "with_build_libsubdir\n"
+      "with_local_prefix\n"
+      "with_gxx_include_dir\n"
+      "with_cpp_install_dir\n"
+      "enable_generated_files_in_srcdir\n"
+      "with_gnu_ld\n"
+      "with_ld\n"
+      "with_demangler_in_ld\n"
+      "with_gnu_as\n"
+      "with_as\n"
+      "enable_largefile\n"
+      "enable_werror_always\n"
+      "enable_checking\n"
+      "enable_coverage\n"
+      "enable_gather_detailed_mem_stats\n"
+      "enable_build_with_cxx\n"
+      "with_stabs\n"
+      "enable_multilib\n"
+      "enable___cxa_atexit\n"
+      "enable_decimal_float\n"
+      "enable_fixed_point\n"
+      "enable_threads\n"
+      "enable_tls\n"
+      "enable_objc_gc\n"
+      "with_dwarf2\n"
+      "enable_shared\n"
+      "with_build_sysroot\n"
+      "with_sysroot\n"
+      "with_specs\n"
+      "with_pkgversion\n"
+      "with_bugurl\n"
+      "enable_languages\n"
+      "with_multilib_list\n";
+    const char *needle = "\n"
+      "with_gnu_ld\n";
+    const char* p = strstr (haystack, needle);
+    ASSERT (p - haystack == 114);
+  }
+
+  {
+    /* Same bug, shorter trigger.  */
+    const char *haystack = "..wi.d.";
+    const char *needle = ".d.";
+    const char* p = strstr (haystack, needle);
+    ASSERT (p - haystack == 4);
+  }
+
+  {
+    /* Like the above, but trigger the flaw in two_way_long_needle
+       by using a needle of length LONG_NEEDLE_THRESHOLD (32) or greater.
+       Rather than trying to find the right alignment manually, I've
+       arbitrarily chosen the following needle and template for the
+       haystack, and ensure that for each placement of the needle in
+       that haystack, strstr finds it.  */
+    const char *needle = "\nwith_gnu_ld-extend-to-len-32-b\n";
+    const char *h =
+      "\n"
+      "with_build_libsubdir\n"
+      "with_local_prefix\n"
+      "with_gxx_include_dir\n"
+      "with_cpp_install_dir\n"
+      "with_e_\n"
+      "..............................\n"
+      "with_FGHIJKLMNOPQRSTUVWXYZ\n"
+      "with_567890123456789\n"
+      "with_multilib_list\n";
+    size_t h_len = strlen (h);
+    char *haystack = malloc (h_len + 1);
+    size_t i;
+    ASSERT (haystack);
+    for (i = 0; i < h_len - strlen (needle); i++)
+      {
+        const char *p;
+        memcpy (haystack, h, h_len + 1);
+        memcpy (haystack + i, needle, strlen (needle) + 1);
+        p = strstr (haystack, needle);
+        ASSERT (p);
+        ASSERT (p - haystack == i);
+      }
+  }
+
+  return 0;
+}
diff --git a/tests/test-symlink.c b/tests/test-symlink.c
new file mode 100644 (file)
index 0000000..367e045
--- /dev/null
@@ -0,0 +1,47 @@
+/* Tests of symlink.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (symlink, int, (char const *, char const *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-symlink.t"
+
+#include "test-symlink.h"
+
+int
+main (void)
+{
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  return test_symlink (symlink, true);
+}
diff --git a/tests/test-symlink.h b/tests/test-symlink.h
new file mode 100644 (file)
index 0000000..4d93929
--- /dev/null
@@ -0,0 +1,95 @@
+/* Tests of symlink.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+/* This file is designed to test both symlink(a,b) and
+   symlinkat(a,AT_FDCWD,b).  FUNC is the function to test.  Assumes
+   that BASE and ASSERT are already defined, and that appropriate
+   headers are already included.  If PRINT, warn before skipping
+   symlink tests with status 77.  */
+
+static int
+test_symlink (int (*func) (char const *, char const *), bool print)
+{
+  if (func ("nowhere", BASE "link1"))
+    {
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+
+  /* Some systems allow the creation of 0-length symlinks as a synonym
+     for "."; but most reject it.  */
+  {
+    int status;
+    errno = 0;
+    status = func ("", BASE "link2");
+    if (status == -1)
+      ASSERT (errno == ENOENT || errno == EINVAL);
+    else
+      {
+        ASSERT (status == 0);
+        ASSERT (unlink (BASE "link2") == 0);
+      }
+  }
+
+  /* Sanity checks of failures.  */
+  errno = 0;
+  ASSERT (func ("nowhere", "") == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func ("nowhere", ".") == -1);
+  ASSERT (errno == EEXIST || errno == EINVAL);
+  errno = 0;
+  ASSERT (func ("somewhere", BASE "link1") == -1);
+  ASSERT (errno == EEXIST);
+  errno = 0;
+  ASSERT (func ("nowhere", BASE "link2/") == -1);
+  ASSERT (errno == ENOTDIR || errno == ENOENT);
+  ASSERT (mkdir (BASE "dir", 0700) == 0);
+  errno = 0;
+  ASSERT (func ("nowhere", BASE "dir") == -1);
+  ASSERT (errno == EEXIST);
+  errno = 0;
+  ASSERT (func ("nowhere", BASE "dir/") == -1);
+  ASSERT (errno == EEXIST || errno == EINVAL);
+  ASSERT (close (creat (BASE "file", 0600)) == 0);
+  errno = 0;
+  ASSERT (func ("nowhere", BASE "file") == -1);
+  ASSERT (errno == EEXIST);
+  errno = 0;
+  ASSERT (func ("nowhere", BASE "file/") == -1);
+  ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT);
+
+  /* Trailing slash must always be rejected.  */
+  ASSERT (unlink (BASE "link1") == 0);
+  ASSERT (func (BASE "link2", BASE "link1") == 0);
+  errno = 0;
+  ASSERT (func (BASE "nowhere", BASE "link1/") == -1);
+  ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT);
+  errno = 0;
+  ASSERT (unlink (BASE "link2") == -1);
+  ASSERT (errno == ENOENT);
+
+  /* Cleanup.  */
+  ASSERT (rmdir (BASE "dir") == 0);
+  ASSERT (unlink (BASE "file") == 0);
+  ASSERT (unlink (BASE "link1") == 0);
+
+  return 0;
+}
diff --git a/tests/test-symlinkat.c b/tests/test-symlinkat.c
new file mode 100644 (file)
index 0000000..1795c0e
--- /dev/null
@@ -0,0 +1,72 @@
+/* Tests of symlinkat.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (symlinkat, int, (char const *, int, char const *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#ifndef HAVE_SYMLINK
+# define HAVE_SYMLINK 0
+#endif
+
+#define BASE "test-symlinkat.t"
+
+#include "test-symlink.h"
+
+static int dfd = AT_FDCWD;
+
+static int
+do_symlink (char const *contents, char const *name)
+{
+  return symlinkat (contents, dfd, name);
+}
+
+int
+main (void)
+{
+  int result;
+
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  /* Perform same checks as counterpart functions.  */
+  result = test_symlink (do_symlink, false);
+  dfd = openat (AT_FDCWD, ".", O_RDONLY);
+  ASSERT (0 <= dfd);
+  ASSERT (test_symlink (do_symlink, false) == result);
+
+  ASSERT (close (dfd) == 0);
+  if (result == 77)
+    fputs ("skipping test: symlinks not supported on this file system\n",
+           stderr);
+  return result;
+}
diff --git a/tests/test-sys_stat.c b/tests/test-sys_stat.c
new file mode 100644 (file)
index 0000000..cd07d86
--- /dev/null
@@ -0,0 +1,288 @@
+/* Test of <sys/stat.h> substitute.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include "verify.h"
+
+/* Check the existence of some macros.  */
+int a[] =
+  {
+    S_IFMT,
+    S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG,
+#ifdef S_IFLNK /* missing on mingw and djgpp */
+    S_IFLNK,
+#endif
+#ifdef S_IFSOCK /* missing on mingw and djgpp */
+    S_IFSOCK,
+#endif
+    S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR,
+    S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP,
+    S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH,
+    S_ISUID, S_ISGID, S_ISVTX,
+    S_ISBLK (S_IFREG),
+    S_ISCHR (S_IFREG),
+    S_ISDIR (S_IFREG),
+    S_ISFIFO (S_IFREG),
+    S_ISREG (S_IFREG),
+    S_ISLNK (S_IFREG),
+    S_ISSOCK (S_IFREG),
+    S_ISDOOR (S_IFREG),
+    S_ISMPB (S_IFREG),
+    S_ISNAM (S_IFREG),
+    S_ISNWK (S_IFREG),
+    S_ISPORT (S_IFREG),
+    S_ISCTG (S_IFREG),
+    S_ISOFD (S_IFREG),
+    S_ISOFL (S_IFREG),
+    S_ISWHT (S_IFREG)
+  };
+
+/* Sanity checks.  */
+
+verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR));
+verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP));
+verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH));
+
+verify (S_ISBLK (S_IFBLK));
+verify (!S_ISBLK (S_IFCHR));
+verify (!S_ISBLK (S_IFDIR));
+verify (!S_ISBLK (S_IFIFO));
+verify (!S_ISBLK (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISBLK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISBLK (S_IFSOCK));
+#endif
+
+verify (!S_ISCHR (S_IFBLK));
+verify (S_ISCHR (S_IFCHR));
+verify (!S_ISCHR (S_IFDIR));
+verify (!S_ISCHR (S_IFIFO));
+verify (!S_ISCHR (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISCHR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISCHR (S_IFSOCK));
+#endif
+
+verify (!S_ISDIR (S_IFBLK));
+verify (!S_ISDIR (S_IFCHR));
+verify (S_ISDIR (S_IFDIR));
+verify (!S_ISDIR (S_IFIFO));
+verify (!S_ISDIR (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISDIR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISDIR (S_IFSOCK));
+#endif
+
+verify (!S_ISFIFO (S_IFBLK));
+verify (!S_ISFIFO (S_IFCHR));
+verify (!S_ISFIFO (S_IFDIR));
+verify (S_ISFIFO (S_IFIFO));
+verify (!S_ISFIFO (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISFIFO (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISFIFO (S_IFSOCK));
+#endif
+
+verify (!S_ISREG (S_IFBLK));
+verify (!S_ISREG (S_IFCHR));
+verify (!S_ISREG (S_IFDIR));
+verify (!S_ISREG (S_IFIFO));
+verify (S_ISREG (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISREG (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISREG (S_IFSOCK));
+#endif
+
+verify (!S_ISLNK (S_IFBLK));
+verify (!S_ISLNK (S_IFCHR));
+verify (!S_ISLNK (S_IFDIR));
+verify (!S_ISLNK (S_IFIFO));
+verify (!S_ISLNK (S_IFREG));
+#ifdef S_IFLNK
+verify (S_ISLNK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISLNK (S_IFSOCK));
+#endif
+
+verify (!S_ISSOCK (S_IFBLK));
+verify (!S_ISSOCK (S_IFCHR));
+verify (!S_ISSOCK (S_IFDIR));
+verify (!S_ISSOCK (S_IFIFO));
+verify (!S_ISSOCK (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISSOCK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (S_ISSOCK (S_IFSOCK));
+#endif
+
+verify (!S_ISDOOR (S_IFBLK));
+verify (!S_ISDOOR (S_IFCHR));
+verify (!S_ISDOOR (S_IFDIR));
+verify (!S_ISDOOR (S_IFIFO));
+verify (!S_ISDOOR (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISDOOR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISDOOR (S_IFSOCK));
+#endif
+
+verify (!S_ISMPB (S_IFBLK));
+verify (!S_ISMPB (S_IFCHR));
+verify (!S_ISMPB (S_IFDIR));
+verify (!S_ISMPB (S_IFIFO));
+verify (!S_ISMPB (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISMPB (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISMPB (S_IFSOCK));
+#endif
+
+verify (!S_ISNAM (S_IFBLK));
+verify (!S_ISNAM (S_IFCHR));
+verify (!S_ISNAM (S_IFDIR));
+verify (!S_ISNAM (S_IFIFO));
+verify (!S_ISNAM (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISNAM (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISNAM (S_IFSOCK));
+#endif
+
+verify (!S_ISNWK (S_IFBLK));
+verify (!S_ISNWK (S_IFCHR));
+verify (!S_ISNWK (S_IFDIR));
+verify (!S_ISNWK (S_IFIFO));
+verify (!S_ISNWK (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISNWK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISNWK (S_IFSOCK));
+#endif
+
+verify (!S_ISPORT (S_IFBLK));
+verify (!S_ISPORT (S_IFCHR));
+verify (!S_ISPORT (S_IFDIR));
+verify (!S_ISPORT (S_IFIFO));
+verify (!S_ISPORT (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISPORT (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISPORT (S_IFSOCK));
+#endif
+
+verify (!S_ISCTG (S_IFBLK));
+verify (!S_ISCTG (S_IFCHR));
+verify (!S_ISCTG (S_IFDIR));
+verify (!S_ISCTG (S_IFIFO));
+verify (!S_ISCTG (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISCTG (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISCTG (S_IFSOCK));
+#endif
+
+verify (!S_ISOFD (S_IFBLK));
+verify (!S_ISOFD (S_IFCHR));
+verify (!S_ISOFD (S_IFDIR));
+verify (!S_ISOFD (S_IFIFO));
+verify (!S_ISOFD (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISOFD (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISOFD (S_IFSOCK));
+#endif
+
+verify (!S_ISOFL (S_IFBLK));
+verify (!S_ISOFL (S_IFCHR));
+verify (!S_ISOFL (S_IFDIR));
+verify (!S_ISOFL (S_IFIFO));
+verify (!S_ISOFL (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISOFL (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISOFL (S_IFSOCK));
+#endif
+
+verify (!S_ISWHT (S_IFBLK));
+verify (!S_ISWHT (S_IFCHR));
+verify (!S_ISWHT (S_IFDIR));
+verify (!S_ISWHT (S_IFIFO));
+verify (!S_ISWHT (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISWHT (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISWHT (S_IFSOCK));
+#endif
+
+/* POSIX 2008 requires traditional encoding of permission constants.  */
+verify (S_IRWXU == 00700);
+verify (S_IRUSR == 00400);
+verify (S_IWUSR == 00200);
+verify (S_IXUSR == 00100);
+verify (S_IRWXG == 00070);
+verify (S_IRGRP == 00040);
+verify (S_IWGRP == 00020);
+verify (S_IXGRP == 00010);
+verify (S_IRWXO == 00007);
+verify (S_IROTH == 00004);
+verify (S_IWOTH == 00002);
+verify (S_IXOTH == 00001);
+verify (S_ISUID == 04000);
+verify (S_ISGID == 02000);
+verify (S_ISVTX == 01000);
+
+#if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000)           \
+     || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000)      \
+     || UTIME_NOW == UTIME_OMIT)
+invalid UTIME macros
+#endif
+
+/* Check the existence of some types.  */
+nlink_t t1;
+
+struct timespec t2;
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-sys_time.c b/tests/test-sys_time.c
new file mode 100644 (file)
index 0000000..da64b85
--- /dev/null
@@ -0,0 +1,29 @@
+/* Test of <sys/time.h> substitute.
+   Copyright (C) 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <sys/time.h>
+
+struct timeval a;
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-sys_wait.c b/tests/test-sys_wait.c
new file mode 100644 (file)
index 0000000..dce89c6
--- /dev/null
@@ -0,0 +1,47 @@
+/* Test of <sys/wait.h> substitute.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <sys/wait.h>
+
+/* Check for existence of required types.  */
+static pid_t a;
+
+#include "test-sys_wait.h"
+
+int
+main (void)
+{
+  if (test_sys_wait_macros ())
+    return 1;
+
+  switch (0)
+    {
+#if 0
+  /* Gnulib doesn't guarantee these, yet.  */
+    case WCONTINUED:
+    case WEXITED:
+    case WNOWAIT:
+    case WSTOPPED:
+#endif
+      break;
+    }
+
+  return a ? 1 : 0;
+}
diff --git a/tests/test-sys_wait.h b/tests/test-sys_wait.h
new file mode 100644 (file)
index 0000000..3c9b322
--- /dev/null
@@ -0,0 +1,53 @@
+/* Test of macros shared between <sys/wait.h> and <stdlib.h>.
+   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/>.  */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2010.  */
+
+static int
+test_sys_wait_macros (void)
+{
+  /* Check subset of <sys/wait.h> macros that must be visible here.
+     Note that some of these macros are only portable when operating
+     on an lvalue.  */
+  int i;
+  for (i = 0; i < 0x8000; i = (i ? i << 1 : 1))
+    {
+      /* POSIX requires that for all valid process statuses, that
+         exactly one of these three macros is true.  But not all
+         possible 16-bit values map to valid process status.
+         Traditionally, 8 of the bits are for WIFEXITED, 7 of the bits
+         to tell between WIFSIGNALED and WIFSTOPPED, and either 0x80
+         or 0x8000 to flag that core was also dumped.  Since we don't
+         know which byte is WIFEXITED, we skip the both possible bits
+         that can signal core dump.  */
+      if (i == 0x80)
+        continue;
+      if (!!WIFSIGNALED (i) + !!WIFEXITED (i) + !!WIFSTOPPED (i) != 1)
+        return 1;
+    }
+  i = WEXITSTATUS (i) + WSTOPSIG (i) + WTERMSIG (i);
+
+  switch (i)
+    {
+#if 0
+  /* Gnulib doesn't guarantee these, yet.  */
+    case WNOHANG:
+    case WUNTRACED:
+#endif
+      break;
+    }
+  return 0;
+}
diff --git a/tests/test-time.c b/tests/test-time.c
new file mode 100644 (file)
index 0000000..0c78f36
--- /dev/null
@@ -0,0 +1,35 @@
+/* Test of <time.h> substitute.
+   Copyright (C) 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <time.h>
+
+#include "verify.h"
+
+struct timespec a;
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-unistd.c b/tests/test-unistd.c
new file mode 100644 (file)
index 0000000..be1ae06
--- /dev/null
@@ -0,0 +1,56 @@
+/* Test of <unistd.h> substitute.
+   Copyright (C) 2007, 2009-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "verify.h"
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
+/* Check that the various SEEK_* macros are defined.  */
+int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
+
+/* Check that the various *_FILENO macros are defined.  */
+#if ! (defined STDIN_FILENO                                     \
+       && (STDIN_FILENO + STDOUT_FILENO + STDERR_FILENO == 3))
+missing or broken *_FILENO macros
+#endif
+
+/* Check that the types are all defined.  */
+size_t t1;
+ssize_t t2;
+#ifdef TODO /* Not implemented in gnulib yet */
+uid_t t3;
+gid_t t4;
+#endif
+off_t t5;
+pid_t t6;
+#ifdef TODO
+useconds_t t7;
+intptr_t t8;
+#endif
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-unlink.c b/tests/test-unlink.c
new file mode 100644 (file)
index 0000000..ce340f2
--- /dev/null
@@ -0,0 +1,49 @@
+/* Tests of unlink.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (unlink, int, (char const *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "unlinkdir.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-unlink.t"
+
+#include "test-unlink.h"
+
+int
+main (void)
+{
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  return test_unlink_func (unlink, true);
+}
diff --git a/tests/test-unlink.h b/tests/test-unlink.h
new file mode 100644 (file)
index 0000000..13f6c9b
--- /dev/null
@@ -0,0 +1,86 @@
+/* Tests of unlink.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+/* This file is designed to test both unlink(n) and
+   unlinkat(AT_FDCWD,n,0).  FUNC is the function to test.  Assumes
+   that BASE and ASSERT are already defined, and that appropriate
+   headers are already included.  If PRINT, then warn before returning
+   status 77 when symlinks are unsupported.  */
+
+static int
+test_unlink_func (int (*func) (char const *name), bool print)
+{
+  /* Setup.  */
+  ASSERT (mkdir (BASE "dir", 0700) == 0);
+  ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
+
+  /* Basic error conditions.  */
+  errno = 0;
+  ASSERT (func ("") == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (BASE "nosuch") == -1);
+  ASSERT (errno == ENOENT);
+  errno = 0;
+  ASSERT (func (BASE "nosuch/") == -1);
+  ASSERT (errno == ENOENT);
+  /* Resulting errno after directories is rather varied across
+     implementations (EPERM, EINVAL, EACCES, EBUSY, EISDIR, ENOTSUP);
+     however, we must be careful to not attempt unlink on a directory
+     unless we know it must fail.  */
+  if (cannot_unlink_dir ())
+    {
+      ASSERT (func (".") == -1);
+      ASSERT (func ("..") == -1);
+      ASSERT (func ("/") == -1);
+      ASSERT (func (BASE "dir") == -1);
+      ASSERT (mkdir (BASE "dir1", 0700) == 0);
+      ASSERT (func (BASE "dir1") == -1);
+      ASSERT (rmdir (BASE "dir1") == 0);
+    }
+  errno = 0;
+  ASSERT (func (BASE "dir/file/") == -1);
+  ASSERT (errno == ENOTDIR);
+
+  /* Test symlink behavior.  Specifying trailing slash will attempt
+     unlink of a directory, so only attempt it if we know it must
+     fail.  */
+  if (symlink (BASE "dir", BASE "link") != 0)
+    {
+      ASSERT (func (BASE "dir/file") == 0);
+      ASSERT (rmdir (BASE "dir") == 0);
+      if (print)
+        fputs ("skipping test: symlinks not supported on this file system\n",
+               stderr);
+      return 77;
+    }
+  if (cannot_unlink_dir ())
+    ASSERT (func (BASE "link/") == -1);
+  ASSERT (func (BASE "link") == 0);
+  ASSERT (symlink (BASE "dir/file", BASE "link") == 0);
+  errno = 0;
+  ASSERT (func (BASE "link/") == -1);
+  ASSERT (errno == ENOTDIR);
+  /* Order here proves unlink of a symlink does not follow through to
+     the file.  */
+  ASSERT (func (BASE "link") == 0);
+  ASSERT (func (BASE "dir/file") == 0);
+  ASSERT (rmdir (BASE "dir") == 0);
+
+  return 0;
+}
diff --git a/tests/test-unlinkat.c b/tests/test-unlinkat.c
new file mode 100644 (file)
index 0000000..f9ed249
--- /dev/null
@@ -0,0 +1,82 @@
+/* Tests of unlinkat.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (unlinkat, int, (int, char const *, int));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "unlinkdir.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-unlinkat.t"
+
+#include "test-rmdir.h"
+#include "test-unlink.h"
+
+static int dfd = AT_FDCWD;
+
+/* Wrapper around unlinkat to test rmdir behavior.  */
+static int
+rmdirat (char const *name)
+{
+  return unlinkat (dfd, name, AT_REMOVEDIR);
+}
+
+/* Wrapper around unlinkat to test unlink behavior.  */
+static int
+unlinker (char const *name)
+{
+  return unlinkat (dfd, name, 0);
+}
+
+int
+main (void)
+{
+  /* FIXME: Add tests of fd other than ".".  */
+  int result1;
+  int result2;
+
+  /* Remove any leftovers from a previous partial run.  */
+  ignore_value (system ("rm -rf " BASE "*"));
+
+  result1 = test_rmdir_func (rmdirat, false);
+  result2 = test_unlink_func (unlinker, false);
+  ASSERT (result1 == result2);
+  dfd = open (".", O_RDONLY);
+  ASSERT (0 <= dfd);
+  result2 = test_rmdir_func (rmdirat, false);
+  ASSERT (result1 == result2);
+  result2 = test_unlink_func (unlinker, false);
+  ASSERT (result1 == result2);
+  ASSERT (close (dfd) == 0);
+  if (result1 == 77)
+    fputs ("skipping test: symlinks not supported on this file system\n",
+           stderr);
+  return result1;
+}
diff --git a/tests/test-unsetenv.c b/tests/test-unsetenv.c
new file mode 100644 (file)
index 0000000..9c9443b
--- /dev/null
@@ -0,0 +1,61 @@
+/* Tests of unsetenv.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (unsetenv, int, (char const *));
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  char entry[] = "b=2";
+
+  /* Test removal when multiple entries present.  */
+  ASSERT (putenv ((char *) "a=1") == 0);
+  ASSERT (putenv (entry) == 0);
+  entry[0] = 'a'; /* Unspecified what getenv("a") would be at this point.  */
+  ASSERT (unsetenv ("a") == 0); /* Both entries will be removed.  */
+  ASSERT (getenv ("a") == NULL);
+  ASSERT (unsetenv ("a") == 0);
+
+  /* Required to fail with EINVAL.  */
+  errno = 0;
+  ASSERT (unsetenv ("") == -1);
+  ASSERT (errno == EINVAL);
+  errno = 0;
+  ASSERT (unsetenv ("a=b") == -1);
+  ASSERT (errno == EINVAL);
+#if 0
+  /* glibc and gnulib's implementation guarantee this, but POSIX no
+     longer requires it: http://austingroupbugs.net/view.php?id=185  */
+  errno = 0;
+  ASSERT (unsetenv (NULL) == -1);
+  ASSERT (errno == EINVAL);
+#endif
+
+  return 0;
+}
diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh
new file mode 100755 (executable)
index 0000000..83275ad
--- /dev/null
@@ -0,0 +1,537 @@
+#!/bin/sh
+# Test suite for update-copyright.
+# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# 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/>.
+
+diffout=`diff -u /dev/null /dev/null 2>&1`
+if test x"$diffout" = x"" && test $? -eq 0; then
+  compare() { diff -u "$@"; }
+else
+  compare() { cmp "$@"; }
+fi
+
+# Ensure the update-copyright program gets found.
+PATH=$abs_aux_dir:$PATH
+export PATH
+
+TMP_BASE=update-copyright.test
+trap 'rm -f $TMP_BASE*' 0 1 2 3 15
+
+## --------------------------------- ##
+## Skip if user does not have perl.  ##
+## --------------------------------- ##
+
+TMP=$TMP_BASE
+s=$TMP-script
+cat <<\EOF > $s
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+  & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
+    if 0;
+s/a/b/
+EOF
+chmod a+x $s
+echo a > $TMP-in
+./$s $TMP-in 2>/dev/null && test b = "`cat $TMP-in 2>/dev/null`" ||
+  {
+    printf '%s\n' "$0: skipping this test;" \
+      'your system has insufficient support for Perl' 1>&2
+    exit 77
+  }
+
+# Skip this test if Perl is too old.  FIXME: 5.8.0 is just a guess.
+# We have a report that 5.6.1 is inadequate and that 5.8.0 works.
+perl -e 'require 5.8.0' || {
+  echo '$0: skipping this test; Perl version is too old' 1>&2
+  exit 77
+}
+
+# Do not let a different envvar setting perturb results.
+UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72
+export UPDATE_COPYRIGHT_MAX_LINE_LENGTH
+
+## ----------------------------- ##
+## Examples from documentation.  ##
+## ----------------------------- ##
+
+TMP=$TMP_BASE-ex
+cat > $TMP.1 <<EOF
+Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+Foundation, Inc.
+EOF
+cat > $TMP.2 <<EOF
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+cat > $TMP.3 <<EOF
+/*
+ * Copyright &copy; 90,2005,2007-2009
+ * Free Software Foundation, Inc.
+ */
+EOF
+cat > $TMP.4 <<EOF
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+#  Foundation, Inc.
+EOF
+cat > $TMP.5 <<EOF
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+cat > $TMP.6 <<EOF
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+#  Foundation, Inc.
+
+Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
+Inc.
+EOF
+cat > $TMP.7 <<EOF
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+
+rm -f $TMP.*.bak
+UPDATE_COPYRIGHT_YEAR=2009 \
+  update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP.4: warning: copyright statement not found
+$TMP.5: warning: copyright statement not found
+EOF
+compare - $TMP.1 <<EOF || exit 1
+Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+Foundation, Inc.
+EOF
+compare - $TMP.2 <<EOF || exit 1
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+compare - $TMP.3 <<EOF || exit 1
+/*
+ * Copyright &copy; 90,2005,2007-2009
+ * Free Software Foundation, Inc.
+ */
+EOF
+compare - $TMP.4 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+#  Foundation, Inc.
+EOF
+compare - $TMP.5 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+compare - $TMP.6 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+#  Foundation, Inc.
+
+Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
+Inc.
+EOF
+compare - $TMP.7 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+
+rm -f $TMP.*.bak
+UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+  update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP.4: warning: copyright statement not found
+$TMP.5: warning: copyright statement not found
+EOF
+compare - $TMP.1 <<EOF || exit 1
+Copyright @copyright{} 1990-2005, 2007-2010 Free Software Foundation,
+Inc.
+EOF
+compare - $TMP.2 <<EOF || exit 1
+# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+EOF
+compare - $TMP.3 <<EOF || exit 1
+/*
+ * Copyright &copy; 1990, 2005, 2007-2010 Free Software Foundation, Inc.
+ */
+EOF
+compare - $TMP.4 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+#  Foundation, Inc.
+EOF
+compare - $TMP.5 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+compare - $TMP.6 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+#  Foundation, Inc.
+
+Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+EOF
+compare - $TMP.7 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+EOF
+
+rm -f $TMP.*.bak
+UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \
+  update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP.4: warning: copyright statement not found
+$TMP.5: warning: copyright statement not found
+EOF
+compare - $TMP.1 <<EOF || exit 1
+Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
+Free Software Foundation, Inc.
+EOF
+compare - $TMP.2 <<EOF || exit 1
+# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
+# Software Foundation, Inc.
+EOF
+compare - $TMP.3 <<EOF || exit 1
+/*
+ * Copyright &copy; 1990, 2005, 2007, 2008, 2009, 2010 Free Software
+ * Foundation, Inc.
+ */
+EOF
+compare - $TMP.4 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+#  Foundation, Inc.
+EOF
+compare - $TMP.5 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+compare - $TMP.6 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+#  Foundation, Inc.
+
+Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
+EOF
+compare - $TMP.7 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
+# Software Foundation, Inc.
+EOF
+
+rm $TMP*
+
+## -------------- ##
+## Current year.  ##
+## -------------- ##
+
+TMP=$TMP_BASE-current-year
+YEAR=`date +%Y`
+cat > $TMP <<EOF
+'\" Copyright (C) 2006
+'\" Free Software Foundation,
+'\" Inc.
+EOF
+update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+'\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+'\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------------ ##
+## Surrounding text.  ##
+## ------------------ ##
+
+TMP=$TMP_BASE-surrounding-text
+cat > $TMP <<EOF
+    Undisturbed text.
+dnl Undisturbed text.
+dnl Copyright (C) 89
+dnl Free Software Foundation, Inc.
+dnl   Undisturbed text.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+    Undisturbed text.
+dnl Undisturbed text.
+dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc.
+dnl   Undisturbed text.
+EOF
+rm $TMP*
+
+## --------------- ##
+## Widest prefix.  ##
+## --------------- ##
+
+TMP=$TMP_BASE-widest-prefix
+cat > $TMP <<EOF
+#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#### 2008 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984,
+#### 1985, 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+#### 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+#### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software
+#### Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------------- ##
+## Prefix too large.  ##
+## ------------------- ##
+
+TMP=$TMP_BASE-prefix-too-large
+cat > $TMP <<EOF
+####  Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+####  1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+####  2008 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP: warning: copyright statement not found
+EOF
+compare - $TMP <<EOF || exit 1
+####  Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+####  1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+####  2008 Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------- ##
+## Blank lines.  ##
+## ------------- ##
+
+TMP=$TMP_BASE-blank-lines
+cat > $TMP <<EOF
+#Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#
+#1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#2008 Free Software Foundation, Inc.
+
+Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+
+1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+2008 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP: warning: copyright statement not found
+EOF
+compare - $TMP <<EOF || exit 1
+#Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#
+#1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#2008 Free Software Foundation, Inc.
+
+Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+
+1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+2008 Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## -------------- ##
+## Leading tabs.  ##
+## -------------- ##
+
+TMP=$TMP_BASE-leading-tabs
+cat > $TMP <<EOF
+       Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 98,
+        1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
+       Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+       Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
+       1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+       2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+       Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
+       Inc.
+EOF
+rm $TMP*
+
+## -------------------- ##
+## Unusual whitespace.  ##
+## -------------------- ##
+
+TMP=$TMP_BASE-unusual-ws
+cat > $TMP <<EOF
+               # Copyright (C) 87-88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+               # 98, 1999, 2000, 2001, 2002, 2003,             \f         2004, 2005, 2006, 2007, 2008,
+               # 2009 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+               # Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994,
+               # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+               # 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+               # Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+               # Copyright (C) 1987-1988, 1991-2011 Free Software
+               # Foundation, Inc.
+EOF
+rm $TMP*
+
+## --------- ##
+## DOS EOL.  ##
+## --------- ##
+
+TMP=$TMP_BASE-dos-eol
+tr @ '\015' > $TMP <<\EOF
+Rem Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@
+Rem 98, 1999, 2000, 2001, 2002, 2003,  2004, 2005, 2006, 2007, 2008,@
+Rem 2009 Free Software Foundation, Inc.@
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+tr @ '\015' > $TMP-exp <<\EOF
+Rem Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@
+Rem 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@
+Rem 2009, 2010 Free Software Foundation, Inc.@
+EOF
+compare $TMP-exp $TMP || exit 1
+rm $TMP*
+
+## --------------- ##
+## Omitted "(C)".  ##
+## --------------- ##
+
+TMP=$TMP_BASE-omitted-circle-c
+cat > $TMP <<EOF
+  Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+  98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+  2009 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+  update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+  Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+  1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+  Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------------ ##
+## C-style comments.  ##
+## ------------------ ##
+
+TMP=$TMP_BASE-c-style-comments
+cat > $TMP.star <<EOF
+/*  Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ *  98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ *  2009 Free Software Foundation, Inc.  */
+EOF
+cat > $TMP.space <<EOF
+  /*Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+    98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+    2009 Free Software Foundation, Inc.  */
+EOF
+cat > $TMP.single-line <<EOF
+/*   Copyright 87, 1991, 1992 Free Software Foundation, Inc.  */
+EOF
+cat > $TMP.single-line-wrapped <<EOF
+ /* Copyright 1988, 1991, 1992, 1993 Free Software Foundation, Inc.  */
+EOF
+cat > $TMP.extra-text-star <<EOF
+ /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc.  End
+  * More comments.  */
+EOF
+cat > $TMP.extra-text-space <<EOF
+ /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. ***
+    * End of comments. */
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+  update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP.star <<EOF || exit 1
+/*  Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ *  1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ *  2009, 2010 Free Software Foundation, Inc.  */
+EOF
+compare - $TMP.space <<EOF || exit 1
+  /*Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+    1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+    2009, 2010 Free Software Foundation, Inc.  */
+EOF
+compare - $TMP.single-line <<EOF || exit 1
+/*   Copyright 1987, 1991, 1992, 2010 Free Software Foundation, Inc.  */
+EOF
+compare - $TMP.single-line-wrapped <<EOF || exit 1
+ /* Copyright 1988, 1991, 1992, 1993, 2010 Free Software Foundation,
+  * Inc.  */
+EOF
+compare - $TMP.extra-text-star <<EOF || exit 1
+ /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation,
+  * Inc.  End
+  * More comments.  */
+EOF
+compare - $TMP.extra-text-space <<EOF || exit 1
+ /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation,
+    Inc. ***
+    * End of comments. */
+EOF
+rm $TMP*
+
+exit 0
diff --git a/tests/test-usleep.c b/tests/test-usleep.c
new file mode 100644 (file)
index 0000000..48c7234
--- /dev/null
@@ -0,0 +1,40 @@
+/* Test of usleep() function.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (usleep, int, (useconds_t));
+
+#include <time.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  time_t start = time (NULL);
+  ASSERT (usleep (1000000) == 0);
+  ASSERT (start < time (NULL));
+
+  ASSERT (usleep (0) == 0);
+
+  return 0;
+}
diff --git a/tests/test-vasnprintf.c b/tests/test-vasnprintf.c
new file mode 100644 (file)
index 0000000..6b2a0ff
--- /dev/null
@@ -0,0 +1,94 @@
+/* Test of vasnprintf() and asnprintf() functions.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "vasnprintf.h"
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+static void
+test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
+{
+  char buf[8];
+  int size;
+
+  for (size = 0; size <= 8; size++)
+    {
+      size_t length = size;
+      char *result = my_asnprintf (NULL, &length, "%d", 12345);
+      ASSERT (result != NULL);
+      ASSERT (strcmp (result, "12345") == 0);
+      ASSERT (length == 5);
+      free (result);
+    }
+
+  for (size = 0; size <= 8; size++)
+    {
+      size_t length;
+      char *result;
+
+      memcpy (buf, "DEADBEEF", 8);
+      length = size;
+      result = my_asnprintf (buf, &length, "%d", 12345);
+      ASSERT (result != NULL);
+      ASSERT (strcmp (result, "12345") == 0);
+      ASSERT (length == 5);
+      if (size < 6)
+        ASSERT (result != buf);
+      ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+      if (result != buf)
+        free (result);
+    }
+}
+
+static char *
+my_asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+{
+  va_list args;
+  char *ret;
+
+  va_start (args, format);
+  ret = vasnprintf (resultbuf, lengthp, format, args);
+  va_end (args);
+  return ret;
+}
+
+static void
+test_vasnprintf ()
+{
+  test_function (my_asnprintf);
+}
+
+static void
+test_asnprintf ()
+{
+  test_function (asnprintf);
+}
+
+int
+main (int argc, char *argv[])
+{
+  test_vasnprintf ();
+  test_asnprintf ();
+  return 0;
+}
diff --git a/tests/test-vc-list-files-cvs.sh b/tests/test-vc-list-files-cvs.sh
new file mode 100755 (executable)
index 0000000..531b269
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/sh
+# Unit tests for vc-list-files
+# Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# 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/>.  */
+
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" .
+
+tmpdir=vc-cvs
+repo=`pwd`/$tmpdir/repo
+
+fail=0
+for i in with-cvsu without; do
+  # On the first iteration, test using cvsu, if it's in your path.
+  # On the second iteration, ensure that cvsu fails, so we'll
+  # exercise the awk-using code.
+  if test $i = without; then
+    printf '%s\n' '#!/bin/sh' 'exit 1' > cvsu
+    chmod a+x cvsu
+    PATH=`pwd`:$PATH
+    export PATH
+  fi
+  ok=0
+  mkdir $tmpdir && cd $tmpdir &&
+    # without cvs, skip the test
+    # The double use of 'exit' is needed for the reference to $? inside the trap.
+    { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \
+      || skip_ "cvs not found in PATH"; } &&
+    mkdir w && cd w &&
+    mkdir d &&
+    touch d/a b c &&
+    cvs -Q -d "$repo" import -m imp m M M0 &&
+    cvs -Q -d "$repo" co m && cd m &&
+    printf '%s\n' b c d/a > expected &&
+    vc-list-files | sort > actual &&
+    compare expected actual &&
+    ok=1
+  test $ok = 0 && fail=1
+done
+
+Exit $fail
diff --git a/tests/test-vc-list-files-git.sh b/tests/test-vc-list-files-git.sh
new file mode 100755 (executable)
index 0000000..523b2a9
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Unit tests for vc-list-files
+# Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# 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/>.  */
+
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" .
+
+tmpdir=vc-git-$$
+GIT_DIR= GIT_WORK_TREE=; unset GIT_DIR GIT_WORK_TREE
+
+fail=1
+mkdir $tmpdir && cd $tmpdir &&
+  # without git, skip the test
+  # The double use of 'exit' is needed for the reference to $? inside the trap.
+  { ( git init -q ) > /dev/null 2>&1 \
+    || skip_ "git not found in PATH"; } &&
+  mkdir d &&
+  touch d/a b c &&
+  git config user.email "you@example.com" &&
+  git config user.name "Your Name" &&
+  git add . > /dev/null &&
+  git commit -q -a -m log &&
+  printf '%s\n' b c d/a > expected &&
+  vc-list-files > actual &&
+  compare expected actual &&
+  fail=0
+
+Exit $fail
diff --git a/tests/test-verify.c b/tests/test-verify.c
new file mode 100644 (file)
index 0000000..512c021
--- /dev/null
@@ -0,0 +1,69 @@
+/* Test the "verify" module.
+
+   Copyright (C) 2005, 2009-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 Bruno Haible.  */
+
+#include <config.h>
+
+#include "verify.h"
+
+#ifndef EXP_FAIL
+# define EXP_FAIL 0
+#endif
+
+int x;
+enum { a, b, c };
+
+#if EXP_FAIL == 1
+verify (x >= 0);                  /* should give ERROR: non-constant expression */
+#endif
+verify (c == 2);                  /* should be ok */
+#if EXP_FAIL == 2
+verify (1 + 1 == 3);              /* should give ERROR */
+#endif
+verify (1 == 1); verify (1 == 1); /* should be ok */
+
+enum
+{
+  item = verify_true (1 == 1) * 0 + 17 /* should be ok */
+};
+
+static int
+function (int n)
+{
+#if EXP_FAIL == 3
+  verify (n >= 0);                  /* should give ERROR: non-constant expression */
+#endif
+  verify (c == 2);                  /* should be ok */
+#if EXP_FAIL == 4
+  verify (1 + 1 == 3);              /* should give ERROR */
+#endif
+  verify (1 == 1); verify (1 == 1); /* should be ok */
+
+  if (n)
+    return ((void) verify_true (1 == 1), verify_true (1 == 1) + 7); /* should be ok */
+#if EXP_FAIL == 5
+  return (verify_true (1 == 2), 5); /* should give ERROR */
+#endif
+  return 0;
+}
+
+int
+main (void)
+{
+  return !(function (0) == 0 && function (1) == 8);
+}
diff --git a/tests/test-verify.sh b/tests/test-verify.sh
new file mode 100755 (executable)
index 0000000..3e76761
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+. "${srcdir=.}/init.sh"
+
+# We are not interested in triggering bugs in the compilers and tools
+# (such as gcc 4.3.1 on openSUSE 11.0).
+unset MALLOC_PERTURB_
+
+# Rather than figure out how to invoke the compiler with the right
+# include path ourselves, we let make do it:
+(cd "$initial_cwd_" && rm -f test-verify.o \
+    && $MAKE test-verify.o >/dev/null 2>&1) \
+  || skip_ "cannot compile error-free"
+
+# Now, prove that we encounter all expected compilation failures:
+: >out
+: >err
+for i in 1 2 3 4 5; do
+  (cd "$initial_cwd_"
+   rm -f test-verify.o
+   $MAKE CFLAGS=-DEXP_FAIL=$i test-verify.o) >>out 2>>err \
+  && { warn_ "compiler didn't detect verification failure $i"; fail=1; }
+done
+
+Exit $fail
diff --git a/tests/test-version-etc.c b/tests/test-version-etc.c
new file mode 100644 (file)
index 0000000..00a5d7c
--- /dev/null
@@ -0,0 +1,33 @@
+/* Test suite for version-etc.
+   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   This file is part of the GNUlib Library.
+
+   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/>.  */
+
+#include <config.h>
+
+#include "version-etc.h"
+
+#include "progname.h"
+
+#define AUTHORS "Sergey Poznyakoff", "Eric Blake"
+
+int
+main (int argc _GL_UNUSED, char **argv)
+{
+  set_program_name (argv[0]);
+  version_etc (stdout, "test-version-etc", "dummy", "0", AUTHORS,
+               (const char *) NULL);
+  return 0;
+}
diff --git a/tests/test-version-etc.sh b/tests/test-version-etc.sh
new file mode 100755 (executable)
index 0000000..c1ed827
--- /dev/null
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Test suite for version-etc.
+# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# 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/>.
+
+TMP=ve-expected.tmp
+LC_ALL=C
+export LC_ALL
+ERR=0
+
+cat > $TMP <<EOT
+test-version-etc (PROJECT) VERSION
+COPYRIGHT Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by Sergey Poznyakoff and Eric Blake.
+EOT
+
+./test-version-etc${EXEEXT} --version |
+ sed '1s/test-version-etc (.*) .*/test-version-etc (PROJECT) VERSION/
+      /^Packaged by/d
+      2,3 s/Copyright (C) [0-9]\{4,4\}/COPYRIGHT/' |
+ tr -d '\015' |
+ diff -c $TMP - || ERR=1
+
+rm $TMP
+
+exit $ERR
diff --git a/tests/test-wchar.c b/tests/test-wchar.c
new file mode 100644 (file)
index 0000000..2d3bad7
--- /dev/null
@@ -0,0 +1,37 @@
+/* Test of <wchar.h> substitute.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "verify.h"
+
+/* Check that the types wchar_t and wint_t are defined.  */
+wchar_t a = 'c';
+wint_t b = 'x';
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-wcrtomb-w32-1.sh b/tests/test-wcrtomb-w32-1.sh
new file mode 100755 (executable)
index 0000000..50c82f5
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP1252 locale.
+./test-wcrtomb-w32${EXEEXT} French_France 1252
diff --git a/tests/test-wcrtomb-w32-2.sh b/tests/test-wcrtomb-w32-2.sh
new file mode 100755 (executable)
index 0000000..783c70c
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP1256 locale.
+./test-wcrtomb-w32${EXEEXT} "Arabic_Saudi Arabia" 1256
diff --git a/tests/test-wcrtomb-w32-3.sh b/tests/test-wcrtomb-w32-3.sh
new file mode 100755 (executable)
index 0000000..619ea64
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP932 locale.
+./test-wcrtomb-w32${EXEEXT} Japanese_Japan 932
diff --git a/tests/test-wcrtomb-w32-4.sh b/tests/test-wcrtomb-w32-4.sh
new file mode 100755 (executable)
index 0000000..67b6803
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP950 locale.
+./test-wcrtomb-w32${EXEEXT} Chinese_Taiwan 950
diff --git a/tests/test-wcrtomb-w32-5.sh b/tests/test-wcrtomb-w32-5.sh
new file mode 100755 (executable)
index 0000000..9841fa9
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP936 locale.
+./test-wcrtomb-w32${EXEEXT} Chinese_China 936
diff --git a/tests/test-wcrtomb-w32.c b/tests/test-wcrtomb-w32.c
new file mode 100644 (file)
index 0000000..0b09498
--- /dev/null
@@ -0,0 +1,332 @@
+/* Test of conversion of wide character to multibyte character.
+   Copyright (C) 2008-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/>.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+
+static int
+test_one_locale (const char *name, int codepage)
+{
+  char buf[64];
+  size_t ret;
+
+# if 1
+  /* Portable code to set the locale.  */
+  {
+    char name_with_codepage[1024];
+
+    sprintf (name_with_codepage, "%s.%d", name, codepage);
+
+    /* Set the locale.  */
+    if (setlocale (LC_ALL, name_with_codepage) == NULL)
+      return 77;
+  }
+# else
+  /* Hacky way to set a locale.codepage combination that setlocale() refuses
+     to set.  */
+  {
+    /* Codepage of the current locale, set with setlocale().
+       Not necessarily the same as GetACP().  */
+    extern __declspec(dllimport) unsigned int __lc_codepage;
+
+    /* Set the locale.  */
+    if (setlocale (LC_ALL, name) == NULL)
+      return 77;
+
+    /* Clobber the codepage and MB_CUR_MAX, both set by setlocale().  */
+    __lc_codepage = codepage;
+    switch (codepage)
+      {
+      case 1252:
+      case 1256:
+        MB_CUR_MAX = 1;
+        break;
+      case 932:
+      case 950:
+      case 936:
+        MB_CUR_MAX = 2;
+        break;
+      case 54936:
+      case 65001:
+        MB_CUR_MAX = 4;
+        break;
+      }
+
+    /* Test whether the codepage is really available.  */
+    {
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, " ", 1, &state) == (size_t)(-1))
+        return 77;
+    }
+  }
+# endif
+
+  /* Test NUL character.  */
+  {
+    buf[0] = 'x';
+    ret = wcrtomb (buf, 0, NULL);
+    ASSERT (ret == 1);
+    ASSERT (buf[0] == '\0');
+  }
+
+  /* Test single bytes.  */
+  {
+    int c;
+
+    for (c = 0; c < 0x100; c++)
+      switch (c)
+        {
+        case '\t': case '\v': case '\f':
+        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 '~':
+          /* c is in the ISO C "basic character set".  */
+          ret = wcrtomb (buf, btowc (c), NULL);
+          ASSERT (ret == 1);
+          ASSERT (buf[0] == (char) c);
+          break;
+        }
+  }
+
+  /* Test special calling convention, passing a NULL pointer.  */
+  {
+    ret = wcrtomb (NULL, '\0', NULL);
+    ASSERT (ret == 1);
+    ret = wcrtomb (NULL, btowc ('x'), NULL);
+    ASSERT (ret == 1);
+  }
+
+  switch (codepage)
+    {
+    case 1252:
+      /* Locale encoding is CP1252, an extension of ISO-8859-1.  */
+      {
+        /* Convert "B\374\337er": "Büßer" */
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x00FC, NULL);
+        ASSERT (ret == 1);
+        ASSERT (memcmp (buf, "\374", 1) == 0);
+        ASSERT (buf[1] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x00DF, NULL);
+        ASSERT (ret == 1);
+        ASSERT (memcmp (buf, "\337", 1) == 0);
+        ASSERT (buf[1] == 'x');
+      }
+      return 0;
+
+    case 1256:
+      /* Locale encoding is CP1256, not the same as ISO-8859-6.  */
+      {
+        /* Convert "x\302\341\346y": "xآلوy" */
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x0622, NULL);
+        ASSERT (ret == 1);
+        ASSERT (memcmp (buf, "\302", 1) == 0);
+        ASSERT (buf[1] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x0644, NULL);
+        ASSERT (ret == 1);
+        ASSERT (memcmp (buf, "\341", 1) == 0);
+        ASSERT (buf[1] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x0648, NULL);
+        ASSERT (ret == 1);
+        ASSERT (memcmp (buf, "\346", 1) == 0);
+        ASSERT (buf[1] == 'x');
+      }
+      return 0;
+
+    case 932:
+      /* Locale encoding is CP932, similar to Shift_JIS.  */
+      {
+        /* Convert "<\223\372\226\173\214\352>": "<日本語>" */
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x65E5, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\223\372", 2) == 0);
+        ASSERT (buf[2] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x672C, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\226\173", 2) == 0);
+        ASSERT (buf[2] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x8A9E, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\214\352", 2) == 0);
+        ASSERT (buf[2] == 'x');
+      }
+      return 0;
+
+    case 950:
+      /* Locale encoding is CP950, similar to Big5.  */
+      {
+        /* Convert "<\244\351\245\273\273\171>": "<日本語>" */
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x65E5, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\244\351", 2) == 0);
+        ASSERT (buf[2] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x672C, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\245\273", 2) == 0);
+        ASSERT (buf[2] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x8A9E, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\273\171", 2) == 0);
+        ASSERT (buf[2] == 'x');
+      }
+      return 0;
+
+    case 936:
+      /* Locale encoding is CP936 = GBK, an extension of GB2312.  */
+      {
+        /* Convert "<\310\325\261\276\325\132>": "<日本語>" */
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x65E5, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\310\325", 2) == 0);
+        ASSERT (buf[2] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x672C, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\261\276", 2) == 0);
+        ASSERT (buf[2] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x8A9E, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\325\132", 2) == 0);
+        ASSERT (buf[2] == 'x');
+      }
+      return 0;
+
+    case 54936:
+      /* Locale encoding is CP54936 = GB18030.  */
+      {
+        /* Convert "B\250\271\201\060\211\070er": "Büßer" */
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x00FC, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\250\271", 2) == 0);
+        ASSERT (buf[2] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x00DF, NULL);
+        ASSERT (ret == 4);
+        ASSERT (memcmp (buf, "\201\060\211\070", 4) == 0);
+        ASSERT (buf[4] == 'x');
+      }
+      return 0;
+
+    case 65001:
+      /* Locale encoding is CP65001 = UTF-8.  */
+      {
+        /* Convert "B\303\274\303\237er": "Büßer" */
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x00FC, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\303\274", 2) == 0);
+        ASSERT (buf[2] == 'x');
+
+        memset (buf, 'x', 8);
+        ret = wcrtomb (buf, 0x00DF, NULL);
+        ASSERT (ret == 2);
+        ASSERT (memcmp (buf, "\303\237", 2) == 0);
+        ASSERT (buf[2] == 'x');
+      }
+      return 0;
+
+    default:
+      return 1;
+    }
+}
+
+int
+main (int argc, char *argv[])
+{
+  int codepage = atoi (argv[argc - 1]);
+  int result;
+  int i;
+
+  result = 77;
+  for (i = 1; i < argc - 1; i++)
+    {
+      int ret = test_one_locale (argv[i], codepage);
+
+      if (ret != 77)
+        result = ret;
+    }
+
+  if (result == 77)
+    {
+      fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+               codepage);
+    }
+  return result;
+}
+
+#else
+
+int
+main (int argc, char *argv[])
+{
+  fputs ("Skipping test: not a native Windows system\n", stderr);
+  return 77;
+}
+
+#endif
diff --git a/tests/test-wcrtomb.c b/tests/test-wcrtomb.c
new file mode 100644 (file)
index 0000000..a50817f
--- /dev/null
@@ -0,0 +1,162 @@
+/* Test of conversion of wide character to multibyte character.
+   Copyright (C) 2008-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 Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (wcrtomb, size_t, (char *, wchar_t, mbstate_t *));
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+/* Check the multibyte character s[0..n-1].  */
+static void
+check_character (const char *s, size_t n)
+{
+  wchar_t wc;
+  char buf[64];
+  int iret;
+  size_t ret;
+
+  wc = (wchar_t) 0xBADFACE;
+  iret = mbtowc (&wc, s, n);
+  ASSERT (iret == n);
+
+  ret = wcrtomb (buf, wc, NULL);
+  ASSERT (ret == n);
+  ASSERT (memcmp (buf, s, n) == 0);
+
+  /* Test special calling convention, passing a NULL pointer.  */
+  ret = wcrtomb (NULL, wc, NULL);
+  ASSERT (ret == 1);
+}
+
+int
+main (int argc, char *argv[])
+{
+  char buf[64];
+  size_t ret;
+
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  /* Test NUL character.  */
+  {
+    buf[0] = 'x';
+    ret = wcrtomb (buf, 0, NULL);
+    ASSERT (ret == 1);
+    ASSERT (buf[0] == '\0');
+  }
+
+  /* Test single bytes.  */
+  {
+    int c;
+
+    for (c = 0; c < 0x100; c++)
+      switch (c)
+        {
+        case '\t': case '\v': case '\f':
+        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 '~':
+          /* c is in the ISO C "basic character set".  */
+          ret = wcrtomb (buf, btowc (c), NULL);
+          ASSERT (ret == 1);
+          ASSERT (buf[0] == (char) c);
+          break;
+        }
+  }
+
+  /* Test special calling convention, passing a NULL pointer.  */
+  {
+    ret = wcrtomb (NULL, '\0', NULL);
+    ASSERT (ret == 1);
+    ret = wcrtomb (NULL, btowc ('x'), NULL);
+    ASSERT (ret == 1);
+  }
+
+  if (argc > 1)
+    switch (argv[1][0])
+      {
+      case '1':
+        /* Locale encoding is ISO-8859-1 or ISO-8859-15.  */
+        {
+          const char input[] = "B\374\337er"; /* "Büßer" */
+
+          check_character (input + 1, 1);
+          check_character (input + 2, 1);
+        }
+        return 0;
+
+      case '2':
+        /* Locale encoding is UTF-8.  */
+        {
+          const char input[] = "B\303\274\303\237er"; /* "Büßer" */
+
+          check_character (input + 1, 2);
+          check_character (input + 3, 2);
+        }
+        return 0;
+
+      case '3':
+        /* Locale encoding is EUC-JP.  */
+        {
+          const char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */
+
+          check_character (input + 1, 2);
+          check_character (input + 3, 2);
+          check_character (input + 5, 2);
+        }
+        return 0;
+
+      case '4':
+        /* Locale encoding is GB18030.  */
+        {
+          const char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+
+          check_character (input + 1, 2);
+          check_character (input + 3, 4);
+        }
+        return 0;
+      }
+
+  return 1;
+}
diff --git a/tests/test-wcrtomb.sh b/tests/test-wcrtomb.sh
new file mode 100755 (executable)
index 0000000..3eda8f3
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+  LC_ALL=$LOCALE_FR \
+  ./test-wcrtomb${EXEEXT} 1 \
+  || exit 1
+fi
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 != none; then
+  LC_ALL=$LOCALE_FR_UTF8 \
+  ./test-wcrtomb${EXEEXT} 2 \
+  || exit 1
+fi
+
+# Test whether a specific EUC-JP locale is installed.
+: ${LOCALE_JA=ja_JP}
+if test $LOCALE_JA != none; then
+  LC_ALL=$LOCALE_JA \
+  ./test-wcrtomb${EXEEXT} 3 \
+  || exit 1
+fi
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN != none; then
+  LC_ALL=$LOCALE_ZH_CN \
+  ./test-wcrtomb${EXEEXT} 4 \
+  || exit 1
+fi
+
+exit 0
diff --git a/tests/test-wctype-h.c b/tests/test-wctype-h.c
new file mode 100644 (file)
index 0000000..aed3b77
--- /dev/null
@@ -0,0 +1,74 @@
+/* Test of <wctype.h> substitute.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <wctype.h>
+
+#include "macros.h"
+
+/* Check that the type wint_t is defined.  */
+wint_t a = 'x';
+/* Check that WEOF is defined.  */
+wint_t e = WEOF;
+
+/* Check that the type wctype_t is defined.  */
+wctype_t p;
+
+/* Check that the type wctrans_t is defined.  */
+wctrans_t q;
+
+int
+main (void)
+{
+  /* Check that the isw* functions exist as functions or as macros.  */
+  (void) iswalnum (0);
+  (void) iswalpha (0);
+  (void) iswcntrl (0);
+  (void) iswdigit (0);
+  (void) iswgraph (0);
+  (void) iswlower (0);
+  (void) iswprint (0);
+  (void) iswpunct (0);
+  (void) iswspace (0);
+  (void) iswupper (0);
+  (void) iswxdigit (0);
+
+  /* Check that the isw* functions map WEOF to 0.  */
+  ASSERT (!iswalnum (e));
+  ASSERT (!iswalpha (e));
+  ASSERT (!iswcntrl (e));
+  ASSERT (!iswdigit (e));
+  ASSERT (!iswgraph (e));
+  ASSERT (!iswlower (e));
+  ASSERT (!iswprint (e));
+  ASSERT (!iswpunct (e));
+  ASSERT (!iswspace (e));
+  ASSERT (!iswupper (e));
+  ASSERT (!iswxdigit (e));
+
+  /* Check that the tow* functions exist as functions or as macros.  */
+  (void) towlower (0);
+  (void) towupper (0);
+
+  /* Check that the tow* functions map WEOF to WEOF.  */
+  ASSERT (towlower (e) == e);
+  ASSERT (towupper (e) == e);
+
+  return 0;
+}
diff --git a/tests/test-wcwidth.c b/tests/test-wcwidth.c
new file mode 100644 (file)
index 0000000..8856c0a
--- /dev/null
@@ -0,0 +1,81 @@
+/* Test of wcwidth() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (wcwidth, int, (wchar_t));
+
+#include <locale.h>
+#include <string.h>
+
+#include "localcharset.h"
+#include "macros.h"
+
+int
+main ()
+{
+  wchar_t wc;
+
+  /* Test width of ASCII characters.  */
+  for (wc = 0x20; wc < 0x7F; wc++)
+    ASSERT (wcwidth (wc) == 1);
+
+  /* Switch to an UTF-8 locale.  */
+  if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL
+      /* Check whether it's really an UTF-8 locale.
+         On OpenBSD 4.0, the setlocale call succeeds only for the LC_CTYPE
+         category and therefore returns "C/fr_FR.UTF-8/C/C/C/C", but the
+         LC_CTYPE category is effectively set to an ASCII LC_CTYPE category;
+         in particular, locale_charset() returns "ASCII".  */
+      && strcmp (locale_charset (), "UTF-8") == 0)
+    {
+      /* Test width of ASCII characters.  */
+      for (wc = 0x20; wc < 0x7F; wc++)
+        ASSERT (wcwidth (wc) == 1);
+
+      /* Test width of some non-spacing characters.  */
+      ASSERT (wcwidth (0x0301) == 0);
+      ASSERT (wcwidth (0x05B0) == 0);
+
+      /* Test width of some format control characters.  */
+      ASSERT (wcwidth (0x200E) <= 0);
+      ASSERT (wcwidth (0x2060) <= 0);
+#if 0  /* wchar_t may be only 16 bits.  */
+      ASSERT (wcwidth (0xE0001) <= 0);
+      ASSERT (wcwidth (0xE0044) <= 0);
+#endif
+
+      /* Test width of some zero width characters.  */
+      ASSERT (wcwidth (0x200B) == 0);
+      ASSERT (wcwidth (0xFEFF) <= 0);
+
+      /* Test width of some CJK characters.  */
+      ASSERT (wcwidth (0x3000) == 2);
+      ASSERT (wcwidth (0xB250) == 2);
+      ASSERT (wcwidth (0xFF1A) == 2);
+#if 0  /* wchar_t may be only 16 bits.  */
+      ASSERT (wcwidth (0x20369) == 2);
+      ASSERT (wcwidth (0x2F876) == 2);
+#endif
+    }
+
+  return 0;
+}
diff --git a/tests/test-xalloc-die.c b/tests/test-xalloc-die.c
new file mode 100644 (file)
index 0000000..d33e671
--- /dev/null
@@ -0,0 +1,30 @@
+/* Test of xalloc_die() function.
+   Copyright (C) 2009-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 Simon Josefsson <simon@josefsson.org>, 2009.  */
+
+#include <config.h>
+
+#include "xalloc.h"
+#include "progname.h"
+
+int
+main (int argc _GL_UNUSED, char **argv)
+{
+  set_program_name (argv[0]);
+  xalloc_die ();
+  return 0;
+}
diff --git a/tests/test-xalloc-die.sh b/tests/test-xalloc-die.sh
new file mode 100755 (executable)
index 0000000..399d249
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Test suite for xalloc_die.
+# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# 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/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ .
+
+test-xalloc-die${EXEEXT} > out 2> err
+case $? in
+  1) ;;
+  *) Exit 1;;
+esac
+
+tr -d '\015' < err \
+  | sed 's,.*test-xalloc-die[.ex]*:,test-xalloc-die:,' > err2 || Exit 1
+
+compare - err2 <<\EOF || Exit 1
+test-xalloc-die: memory exhausted
+EOF
+
+test -s out && Exit 1
+
+Exit $fail
diff --git a/tests/test-xstrtol.c b/tests/test-xstrtol.c
new file mode 100644 (file)
index 0000000..9346892
--- /dev/null
@@ -0,0 +1,65 @@
+/* Test of xstrtol module.
+   Copyright (C) 1995-1996, 1998-2001, 2003-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/>.  */
+
+#include <config.h>
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "xstrtol.h"
+#include "error.h"
+
+#ifndef __xstrtol
+# define __xstrtol xstrtol
+# define __strtol_t long int
+# define __spec "ld"
+#endif
+
+char *program_name;
+
+/* Don't show the program name in error messages.  */
+static void
+print_no_progname (void)
+{
+}
+
+int
+main (int argc, char **argv)
+{
+  strtol_error s_err;
+  int i;
+
+  program_name = argv[0];
+  error_print_progname = print_no_progname;
+
+  for (i = 1; i < argc; i++)
+    {
+      char *p;
+      __strtol_t val;
+
+      s_err = __xstrtol (argv[i], &p, 0, &val, "bckMw0");
+      if (s_err == LONGINT_OK)
+        {
+          printf ("%s->%" __spec " (%s)\n", argv[i], val, p);
+        }
+      else
+        {
+          xstrtol_fatal (s_err, -2, 'X', NULL, argv[i]);
+        }
+    }
+  exit (0);
+}
diff --git a/tests/test-xstrtol.sh b/tests/test-xstrtol.sh
new file mode 100755 (executable)
index 0000000..1a2f7ca
--- /dev/null
@@ -0,0 +1,67 @@
+#!/bin/sh
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ .
+
+too_big=99999999999999999999999999999999999999999999999999999999999999999999
+result=0
+
+# test xstrtol
+test-xstrtol 1 >> out 2>&1 || result=1
+test-xstrtol -1 >> out 2>&1 || result=1
+test-xstrtol 1k >> out 2>&1 || result=1
+test-xstrtol ${too_big}h >> out 2>&1 && result=1
+test-xstrtol $too_big >> out 2>&1 && result=1
+test-xstrtol x >> out 2>&1 && result=1
+test-xstrtol 9x >> out 2>&1 && result=1
+test-xstrtol 010 >> out 2>&1 || result=1
+# suffix without integer is valid
+test-xstrtol MiB >> out 2>&1 || result=1
+
+# test xstrtoul
+test-xstrtoul 1 >> out 2>&1 || result=1
+test-xstrtoul -1 >> out 2>&1 && result=1
+test-xstrtoul 1k >> out 2>&1 || result=1
+test-xstrtoul ${too_big}h >> out 2>&1 && result=1
+test-xstrtoul $too_big >> out 2>&1 && result=1
+test-xstrtoul x >> out 2>&1 && result=1
+test-xstrtoul 9x >> out 2>&1 && result=1
+test-xstrtoul 010 >> out 2>&1 || result=1
+test-xstrtoul MiB >> out 2>&1 || result=1
+
+# Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
+# does not understand '\r'.
+if echo solaris | tr -d '\r' | grep solais > /dev/null; then
+  cr='\015'
+else
+  cr='\r'
+fi
+
+# normalize output
+LC_ALL=C tr -d "$cr" < out > k
+mv k out
+
+# compare expected output
+cat > expected <<EOF
+1->1 ()
+-1->-1 ()
+1k->1024 ()
+invalid suffix in X argument \`${too_big}h'
+X argument \`$too_big' too large
+invalid X argument \`x'
+invalid suffix in X argument \`9x'
+010->8 ()
+MiB->1048576 ()
+1->1 ()
+invalid X argument \`-1'
+1k->1024 ()
+invalid suffix in X argument \`${too_big}h'
+X argument \`$too_big' too large
+invalid X argument \`x'
+invalid suffix in X argument \`9x'
+010->8 ()
+MiB->1048576 ()
+EOF
+
+compare expected out || result=1
+
+Exit $result
diff --git a/tests/test-xstrtoul.c b/tests/test-xstrtoul.c
new file mode 100644 (file)
index 0000000..9dda9ee
--- /dev/null
@@ -0,0 +1,4 @@
+#define __xstrtol xstrtoul
+#define __strtol_t unsigned long int
+#define __spec "lu"
+#include "test-xstrtol.c"
diff --git a/tests/test-xstrtoumax.c b/tests/test-xstrtoumax.c
new file mode 100644 (file)
index 0000000..2e68c2e
--- /dev/null
@@ -0,0 +1,4 @@
+#define __xstrtol xstrtoumax
+#define __strtol_t uintmax_t
+#define __spec PRIuMAX
+#include "test-xstrtol.c"
diff --git a/tests/test-xstrtoumax.sh b/tests/test-xstrtoumax.sh
new file mode 100755 (executable)
index 0000000..68abb93
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ .
+
+too_big=99999999999999999999999999999999999999999999999999999999999999999999
+result=0
+
+# test xstrtoumax
+test-xstrtoumax 1 >> out 2>&1 || result=1
+test-xstrtoumax -1 >> out 2>&1 && result=1
+test-xstrtoumax 1k >> out 2>&1 || result=1
+test-xstrtoumax ${too_big}h >> out 2>&1 && result=1
+test-xstrtoumax $too_big >> out 2>&1 && result=1
+test-xstrtoumax x >> out 2>&1 && result=1
+test-xstrtoumax 9x >> out 2>&1 && result=1
+test-xstrtoumax 010 >> out 2>&1 || result=1
+test-xstrtoumax MiB >> out 2>&1 || result=1
+
+# Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
+# does not understand '\r'.
+if echo solaris | tr -d '\r' | grep solais > /dev/null; then
+  cr='\015'
+else
+  cr='\r'
+fi
+
+# normalize output
+LC_ALL=C tr -d "$cr" < out > k
+mv k out
+
+# compare expected output
+cat > exp <<EOF
+1->1 ()
+invalid X argument \`-1'
+1k->1024 ()
+invalid suffix in X argument \`${too_big}h'
+X argument \`$too_big' too large
+invalid X argument \`x'
+invalid suffix in X argument \`9x'
+010->8 ()
+MiB->1048576 ()
+EOF
+
+compare exp out || result=1
+
+Exit $result
diff --git a/tests/test-yesno.c b/tests/test-yesno.c
new file mode 100644 (file)
index 0000000..975cf57
--- /dev/null
@@ -0,0 +1,65 @@
+/* Test of yesno module.
+   Copyright (C) 2007-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, 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/>.
+*/
+
+#include <config.h>
+
+/* Specification.  */
+#include "yesno.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "closein.h"
+#include "binary-io.h"
+
+char *program_name;
+
+/* Test yesno.  Without arguments, read one line.  If first argument
+   is zero, close stdin before attempting to read one line.
+   Otherwise, read the number of lines specified by first
+   argument.  */
+int
+main (int argc, char **argv)
+{
+  int i = 1;
+  program_name = argv[0];
+
+  /* yesno recommends that all clients use close_stdin in main.  */
+  atexit (close_stdin);
+  /* But on mingw, close_stdin leaves stdin's file descriptor at the expected
+     position (i.e. where this program left off reading) only if its mode has
+     been set to O_BINARY.  If it has been set to O_TEXT, and the file
+     descriptor is seekable, and stdin is buffered, the MSVCRT runtime ends up
+     setting the file descriptor's position to the expected position _minus_
+     the number of LFs not preceded by CR that were read between the expected
+     position and the last filled buffer end position.  (I.e. the repositioning
+     from the end-of-buffer to the expected position does not work if the input
+     file contains end-of-line markers in Unix convention.)  */
+  SET_BINARY (0);
+
+  if (1 < argc)
+    i = atoi (argv[1]);
+  if (!i)
+    {
+      i = 1;
+      close (0);
+    }
+  while (i--)
+    puts (yesno () ? "Y" : "N");
+  return 0;
+}
diff --git a/tests/test-yesno.sh b/tests/test-yesno.sh
new file mode 100755 (executable)
index 0000000..b1a5b65
--- /dev/null
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+tmpfiles=
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+p=t-yesno-
+tmpfiles="${p}in.tmp ${p}xout.tmp ${p}out1.tmp ${p}out.tmp ${p}err.tmp"
+
+# For now, only test with C locale
+LC_ALL=C
+export LC_ALL
+
+# Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
+# does not understand '\r'.
+if echo solaris | tr -d '\r' | grep solais > /dev/null; then
+  cr='\015'
+else
+  cr='\r'
+fi
+
+# Test with seekable stdin; the followon process must see remaining data.
+tr @ '\177' <<EOF > ${p}in.tmp
+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn - entire line consumed
+y@n - backspace does not change result
+y
+does not match either yesexpr or noexpr
+n
+EOF
+
+cat <<EOF > ${p}xout.tmp
+N
+Y
+Y
+N
+n
+EOF
+
+(./test-yesno${EXEEXT}; ./test-yesno${EXEEXT} 3; cat) \
+  < ${p}in.tmp > ${p}out1.tmp || exit 1
+LC_ALL=C tr -d "$cr" < ${p}out1.tmp > ${p}out.tmp || exit 1
+cmp ${p}xout.tmp ${p}out.tmp || exit 1
+
+(./test-yesno${EXEEXT} 3; ./test-yesno${EXEEXT}; cat) \
+  < ${p}in.tmp > ${p}out1.tmp || exit 1
+LC_ALL=C tr -d "$cr" < ${p}out1.tmp > ${p}out.tmp || exit 1
+cmp ${p}xout.tmp ${p}out.tmp || exit 1
+
+# Test for behavior on pipe
+cat <<EOF > ${p}xout.tmp
+Y
+N
+EOF
+echo yes | ./test-yesno${EXEEXT} 2 > ${p}out1.tmp || exit 1
+LC_ALL=C tr -d "$cr" < ${p}out1.tmp > ${p}out.tmp || exit 1
+cmp ${p}xout.tmp ${p}out.tmp || exit 1
+
+# Test for behavior on EOF
+cat <<EOF > ${p}xout.tmp
+N
+EOF
+./test-yesno${EXEEXT} </dev/null > ${p}out1.tmp || exit 1
+LC_ALL=C tr -d "$cr" < ${p}out1.tmp > ${p}out.tmp || exit 1
+cmp ${p}xout.tmp ${p}out.tmp || exit 1
+
+# Test for behavior when stdin is closed
+./test-yesno${EXEEXT} 0 <&- > ${p}out1.tmp 2> ${p}err.tmp && exit 1
+LC_ALL=C tr -d "$cr" < ${p}out1.tmp > ${p}out.tmp || exit 1
+cmp ${p}xout.tmp ${p}out.tmp || exit 1
+test -s ${p}err.tmp || exit 1
+
+# Cleanup
+rm -fr $tmpfiles
+
+exit 0
diff --git a/tests/uinttostr.c b/tests/uinttostr.c
new file mode 100644 (file)
index 0000000..48fd98f
--- /dev/null
@@ -0,0 +1,3 @@
+#define anytostr uinttostr
+#define inttype unsigned int
+#include "anytostr.c"
diff --git a/tests/umaxtostr.c b/tests/umaxtostr.c
new file mode 100644 (file)
index 0000000..f95bfc3
--- /dev/null
@@ -0,0 +1,3 @@
+#define anytostr umaxtostr
+#define inttype uintmax_t
+#include "anytostr.c"
diff --git a/tests/uniwidth/test-uc_width.c b/tests/uniwidth/test-uc_width.c
new file mode 100644 (file)
index 0000000..d89383d
--- /dev/null
@@ -0,0 +1,56 @@
+/* Test of uc_width() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "uniwidth.h"
+
+#include "macros.h"
+
+int
+main ()
+{
+  ucs4_t uc;
+
+  /* Test width of ASCII characters.  */
+  for (uc = 0x0020; uc < 0x007F; uc++)
+    ASSERT (uc_width (uc, "ISO-8859-2") == 1);
+
+  /* Test width of some non-spacing characters.  */
+  ASSERT (uc_width (0x0301, "UTF-8") == 0);
+  ASSERT (uc_width (0x05B0, "UTF-8") == 0);
+
+  /* Test width of some format control characters.  */
+  ASSERT (uc_width (0x200E, "UTF-8") == 0);
+  ASSERT (uc_width (0x2060, "UTF-8") == 0);
+  ASSERT (uc_width (0xE0001, "UTF-8") == 0);
+  ASSERT (uc_width (0xE0044, "UTF-8") == 0);
+
+  /* Test width of some zero width characters.  */
+  ASSERT (uc_width (0x200B, "UTF-8") == 0);
+  ASSERT (uc_width (0xFEFF, "UTF-8") == 0);
+
+  /* Test width of some CJK characters.  */
+  ASSERT (uc_width (0x3000, "UTF-8") == 2);
+  ASSERT (uc_width (0xB250, "UTF-8") == 2);
+  ASSERT (uc_width (0xFF1A, "UTF-8") == 2);
+  ASSERT (uc_width (0x20369, "UTF-8") == 2);
+  ASSERT (uc_width (0x2F876, "UTF-8") == 2);
+
+  return 0;
+}
diff --git a/tests/uniwidth/test-uc_width2.c b/tests/uniwidth/test-uc_width2.c
new file mode 100644 (file)
index 0000000..1dfe23c
--- /dev/null
@@ -0,0 +1,86 @@
+/* Test of uc_width() function.
+   Copyright (C) 2007-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 Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include "uniwidth.h"
+
+#include <stdio.h>
+
+#include "macros.h"
+
+/* One of 0, '0', '1', 'A', '2'.  */
+static char current_width;
+/* The interval for which the current_width holds.  */
+static ucs4_t current_start;
+static ucs4_t current_end;
+
+static void
+finish_interval (void)
+{
+  if (current_width != 0)
+    {
+      if (current_start == current_end)
+        printf ("%04X\t\t%c\n", (unsigned) current_start, current_width);
+      else
+        printf ("%04X..%04X\t%c\n", (unsigned) current_start,
+                (unsigned) current_end, current_width);
+      current_width = 0;
+    }
+}
+
+static void
+add_to_interval (ucs4_t uc, char width)
+{
+  if (current_width == width && uc == current_end + 1)
+    current_end = uc;
+  else
+    {
+      finish_interval ();
+      current_width = width;
+      current_start = current_end = uc;
+    }
+}
+
+int
+main ()
+{
+  ucs4_t uc;
+
+  for (uc = 0; uc < 0x110000; uc++)
+    {
+      int w1 = uc_width (uc, "UTF-8");
+      int w2 = uc_width (uc, "GBK");
+      char width =
+        (w1 == 0 && w2 == 0 ? '0' :
+         w1 == 1 && w2 == 1 ? '1' :
+         w1 == 1 && w2 == 2 ? 'A' :
+         w1 == 2 && w2 == 2 ? '2' :
+         0);
+      if (width == 0)
+        {
+          /* uc must be a control character.  */
+          ASSERT (w1 < 0 && w2 < 0);
+        }
+      else
+        add_to_interval (uc, width);
+    }
+  finish_interval ();
+
+  return 0;
+}
diff --git a/tests/uniwidth/test-uc_width2.sh b/tests/uniwidth/test-uc_width2.sh
new file mode 100755 (executable)
index 0000000..9307f33
--- /dev/null
@@ -0,0 +1,470 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles uc_width.out"
+./test-uc_width2${EXEEXT} | LC_ALL=C tr -d '\r' > uc_width.out
+
+tmpfiles="$tmpfiles uc_width.ok"
+cat > uc_width.ok <<\EOF
+0000           0
+0020..007E     1
+00A0           1
+00A1..00AC     A
+00AD           0
+00AE..02FF     A
+0300..036F     0
+0370..0482     A
+0483..0489     0
+048A..0590     A
+0591..05BD     0
+05BE           A
+05BF           0
+05C0           A
+05C1..05C2     0
+05C3           A
+05C4..05C5     0
+05C6           A
+05C7           0
+05C8..05FF     A
+0600..0603     0
+0604..060F     A
+0610..061A     0
+061B..064A     A
+064B..065F     0
+0660..066F     A
+0670           0
+0671..06D5     A
+06D6..06DD     0
+06DE           A
+06DF..06E4     0
+06E5..06E6     A
+06E7..06E8     0
+06E9           A
+06EA..06ED     0
+06EE..070E     A
+070F           0
+0710           A
+0711           0
+0712..072F     A
+0730..074A     0
+074B..07A5     A
+07A6..07B0     0
+07B1..07EA     A
+07EB..07F3     0
+07F4..0815     A
+0816..0819     0
+081A           A
+081B..0823     0
+0824           A
+0825..0827     0
+0828           A
+0829..082D     0
+082E..0858     A
+0859..085B     0
+085C..08FF     A
+0900..0902     0
+0903..0939     A
+093A           0
+093B           A
+093C           0
+093D..0940     A
+0941..0948     0
+0949..094C     A
+094D           0
+094E..0950     A
+0951..0957     0
+0958..0961     A
+0962..0963     0
+0964..0980     A
+0981           0
+0982..09BB     A
+09BC           0
+09BD..09C0     A
+09C1..09C4     0
+09C5..09CC     A
+09CD           0
+09CE..09E1     A
+09E2..09E3     0
+09E4..0A00     A
+0A01..0A02     0
+0A03..0A3B     A
+0A3C           0
+0A3D..0A40     A
+0A41..0A42     0
+0A43..0A46     A
+0A47..0A48     0
+0A49..0A4A     A
+0A4B..0A4D     0
+0A4E..0A50     A
+0A51           0
+0A52..0A6F     A
+0A70..0A71     0
+0A72..0A74     A
+0A75           0
+0A76..0A80     A
+0A81..0A82     0
+0A83..0ABB     A
+0ABC           0
+0ABD..0AC0     A
+0AC1..0AC5     0
+0AC6           A
+0AC7..0AC8     0
+0AC9..0ACC     A
+0ACD           0
+0ACE..0AE1     A
+0AE2..0AE3     0
+0AE4..0B00     A
+0B01           0
+0B02..0B3B     A
+0B3C           0
+0B3D..0B3E     A
+0B3F           0
+0B40           A
+0B41..0B44     0
+0B45..0B4C     A
+0B4D           0
+0B4E..0B55     A
+0B56           0
+0B57..0B61     A
+0B62..0B63     0
+0B64..0B81     A
+0B82           0
+0B83..0BBF     A
+0BC0           0
+0BC1..0BCC     A
+0BCD           0
+0BCE..0C3D     A
+0C3E..0C40     0
+0C41..0C45     A
+0C46..0C48     0
+0C49           A
+0C4A..0C4D     0
+0C4E..0C54     A
+0C55..0C56     0
+0C57..0C61     A
+0C62..0C63     0
+0C64..0CBB     A
+0CBC           0
+0CBD..0CCB     A
+0CCC..0CCD     0
+0CCE..0CE1     A
+0CE2..0CE3     0
+0CE4..0D40     A
+0D41..0D44     0
+0D45..0D4C     A
+0D4D           0
+0D4E..0D61     A
+0D62..0D63     0
+0D64..0DC9     A
+0DCA           0
+0DCB..0DD1     A
+0DD2..0DD4     0
+0DD5           A
+0DD6           0
+0DD7..0E30     A
+0E31           0
+0E32..0E33     A
+0E34..0E3A     0
+0E3B..0E46     A
+0E47..0E4E     0
+0E4F..0EB0     A
+0EB1           0
+0EB2..0EB3     A
+0EB4..0EB9     0
+0EBA           A
+0EBB..0EBC     0
+0EBD..0EC7     A
+0EC8..0ECD     0
+0ECE..0F17     A
+0F18..0F19     0
+0F1A..0F34     A
+0F35           0
+0F36           A
+0F37           0
+0F38           A
+0F39           0
+0F3A..0F70     A
+0F71..0F7E     0
+0F7F           A
+0F80..0F84     0
+0F85           A
+0F86..0F87     0
+0F88..0F8C     A
+0F8D..0F97     0
+0F98           A
+0F99..0FBC     0
+0FBD..0FC5     A
+0FC6           0
+0FC7..102C     A
+102D..1030     0
+1031           A
+1032..1037     0
+1038           A
+1039..103A     0
+103B..103C     A
+103D..103E     0
+103F..1057     A
+1058..1059     0
+105A..105D     A
+105E..1060     0
+1061..1070     A
+1071..1074     0
+1075..1081     A
+1082           0
+1083..1084     A
+1085..1086     0
+1087..108C     A
+108D           0
+108E..109C     A
+109D           0
+109E..10FF     A
+1100..115F     2
+1160..135C     A
+135D..135F     0
+1360..1711     A
+1712..1714     0
+1715..1731     A
+1732..1734     0
+1735..1751     A
+1752..1753     0
+1754..1771     A
+1772..1773     0
+1774..17B3     A
+17B4..17B5     0
+17B6           A
+17B7..17BD     0
+17BE..17C5     A
+17C6           0
+17C7..17C8     A
+17C9..17D3     0
+17D4..17DC     A
+17DD           0
+17DE..180A     A
+180B..180D     0
+180E..18A8     A
+18A9           0
+18AA..191F     A
+1920..1922     0
+1923..1926     A
+1927..1928     0
+1929..1931     A
+1932           0
+1933..1938     A
+1939..193B     0
+193C..1A16     A
+1A17..1A18     0
+1A19..1A55     A
+1A56           0
+1A57           A
+1A58..1A5E     0
+1A5F           A
+1A60           0
+1A61           A
+1A62           0
+1A63..1A64     A
+1A65..1A6C     0
+1A6D..1A72     A
+1A73..1A7C     0
+1A7D..1A7E     A
+1A7F           0
+1A80..1AFF     A
+1B00..1B03     0
+1B04..1B33     A
+1B34           0
+1B35           A
+1B36..1B3A     0
+1B3B           A
+1B3C           0
+1B3D..1B41     A
+1B42           0
+1B43..1B6A     A
+1B6B..1B73     0
+1B74..1B7F     A
+1B80..1B81     0
+1B82..1BA1     A
+1BA2..1BA5     0
+1BA6..1BA7     A
+1BA8..1BA9     0
+1BAA..1BE5     A
+1BE6           0
+1BE7           A
+1BE8..1BE9     0
+1BEA..1BEC     A
+1BED           0
+1BEE           A
+1BEF..1BF1     0
+1BF2..1C2B     A
+1C2C..1C33     0
+1C34..1C35     A
+1C36..1C37     0
+1C38..1CCF     A
+1CD0..1CD2     0
+1CD3           A
+1CD4..1CE0     0
+1CE1           A
+1CE2..1CE8     0
+1CE9..1CEC     A
+1CED           0
+1CEE..1DBF     A
+1DC0..1DE6     0
+1DE7..1DFB     A
+1DFC..1DFF     0
+1E00..200A     A
+200B..200F     0
+2010..2029     A
+202A..202E     0
+202F..205F     A
+2060..2064     0
+2065..2069     A
+206A..206F     0
+2070..20A8     A
+20A9           1
+20AA..20CF     A
+20D0..20F0     0
+20F1..2328     A
+2329..232A     2
+232B..2CEE     A
+2CEF..2CF1     0
+2CF2..2D7E     A
+2D7F           0
+2D80..2DDF     A
+2DE0..2DFF     0
+2E00..2E7F     A
+2E80..3029     2
+302A..302F     0
+3030..303E     2
+303F           A
+3040..3098     2
+3099..309A     0
+309B..4DBF     2
+4DC0..4DFF     A
+4E00..A4CF     2
+A4D0..A66E     A
+A66F..A672     0
+A673..A67B     A
+A67C..A67D     0
+A67E..A6EF     A
+A6F0..A6F1     0
+A6F2..A801     A
+A802           0
+A803..A805     A
+A806           0
+A807..A80A     A
+A80B           0
+A80C..A824     A
+A825..A826     0
+A827..A8C3     A
+A8C4           0
+A8C5..A8DF     A
+A8E0..A8F1     0
+A8F2..A925     A
+A926..A92D     0
+A92E..A946     A
+A947..A951     0
+A952..A97F     A
+A980..A982     0
+A983..A9B2     A
+A9B3           0
+A9B4..A9B5     A
+A9B6..A9B9     0
+A9BA..A9BB     A
+A9BC           0
+A9BD..AA28     A
+AA29..AA2E     0
+AA2F..AA30     A
+AA31..AA32     0
+AA33..AA34     A
+AA35..AA36     0
+AA37..AA42     A
+AA43           0
+AA44..AA4B     A
+AA4C           0
+AA4D..AAAF     A
+AAB0           0
+AAB1           A
+AAB2..AAB4     0
+AAB5..AAB6     A
+AAB7..AAB8     0
+AAB9..AABD     A
+AABE..AABF     0
+AAC0           A
+AAC1           0
+AAC2..ABE4     A
+ABE5           0
+ABE6..ABE7     A
+ABE8           0
+ABE9..ABEC     A
+ABED           0
+ABEE..ABFF     A
+AC00..D7A3     2
+D7A4..F8FF     A
+F900..FAFF     2
+FB00..FB1D     A
+FB1E           0
+FB1F..FDFF     A
+FE00..FE0F     0
+FE10..FE1F     2
+FE20..FE26     0
+FE27..FE2F     A
+FE30..FE6F     2
+FE70..FEFE     A
+FEFF           0
+FF00..FF60     2
+FF61..FFDF     1
+FFE0..FFE6     2
+FFE7..FFF8     1
+FFF9..FFFB     0
+FFFC..101FC    1
+101FD          0
+101FE..10A00   1
+10A01..10A03   0
+10A04          1
+10A05..10A06   0
+10A07..10A0B   1
+10A0C..10A0F   0
+10A10..10A37   1
+10A38..10A3A   0
+10A3B..10A3E   1
+10A3F          0
+10A40..11000   1
+11001          0
+11002..11037   1
+11038..11046   0
+11047..1107F   1
+11080..11081   0
+11082..110B2   1
+110B3..110B6   0
+110B7..110B8   1
+110B9..110BA   0
+110BB..110BC   1
+110BD          0
+110BE..1D166   1
+1D167..1D169   0
+1D16A..1D172   1
+1D173..1D182   0
+1D183..1D184   1
+1D185..1D18B   0
+1D18C..1D1A9   1
+1D1AA..1D1AD   0
+1D1AE..1D241   1
+1D242..1D244   0
+1D245..1FFFF   1
+20000..3FFFF   2
+40000..E0000   1
+E0001          0
+E0002..E001F   1
+E0020..E007F   0
+E0080..E00FF   1
+E0100..E01EF   0
+E01F0..10FFFF  1
+EOF
+
+: ${DIFF=diff}
+${DIFF} uc_width.ok uc_width.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/unlinkdir.c b/tests/unlinkdir.c
new file mode 100644 (file)
index 0000000..b3f6285
--- /dev/null
@@ -0,0 +1,54 @@
+/* unlinkdir.c - determine whether we can unlink directories
+
+   Copyright (C) 2005-2006, 2009-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 Paul Eggert, Jim Meyering, and David Bartley.  */
+
+#include <config.h>
+
+#include "unlinkdir.h"
+#include "priv-set.h"
+#include <unistd.h>
+
+#if ! UNLINK_CANNOT_UNLINK_DIR
+
+/* Return true if we cannot unlink directories, false if we might be
+   able to unlink directories.  */
+
+bool
+cannot_unlink_dir (void)
+{
+  static bool initialized;
+  static bool cannot;
+
+  if (! initialized)
+    {
+# if defined PRIV_SYS_LINKDIR
+      /* We might be able to unlink directories if we cannot
+         determine our privileges, or if we have the
+         PRIV_SYS_LINKDIR privilege.  */
+      cannot = (priv_set_ismember (PRIV_SYS_LINKDIR) == 0);
+# else
+      /* In traditional Unix, only root can unlink directories.  */
+      cannot = (geteuid () != 0);
+# endif
+      initialized = true;
+    }
+
+  return cannot;
+}
+
+#endif
diff --git a/tests/unlinkdir.h b/tests/unlinkdir.h
new file mode 100644 (file)
index 0000000..0df9140
--- /dev/null
@@ -0,0 +1,26 @@
+/* unlinkdir.h - determine (and maybe change) whether we can unlink directories
+
+   Copyright (C) 2005, 2009-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 Paul Eggert and Jim Meyering.  */
+
+#include <stdbool.h>
+
+#if UNLINK_CANNOT_UNLINK_DIR
+# define cannot_unlink_dir() true
+#else
+bool cannot_unlink_dir (void);
+#endif
diff --git a/tests/usleep.c b/tests/usleep.c
new file mode 100644 (file)
index 0000000..4ebefe0
--- /dev/null
@@ -0,0 +1,58 @@
+/* Pausing execution of the current thread.
+   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Written by Eric Blake <ebb9@byu.net>, 2009.
+
+   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 is _intentionally_ light-weight.  Rather than using
+   select or nanosleep, both of which drag in external libraries on
+   some platforms, this merely rounds up to the nearest second if
+   usleep() does not exist.  If sub-second resolution is important,
+   then use a more powerful interface to begin with.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#include <errno.h>
+
+#ifndef HAVE_USLEEP
+# define HAVE_USLEEP 0
+#endif
+
+/* Sleep for MICRO microseconds, which can be greater than 1 second.
+   Return -1 and set errno to EINVAL on range error (about 4295
+   seconds), or 0 on success.  Interaction with SIGALARM is
+   unspecified.  */
+
+int
+usleep (useconds_t micro)
+{
+  unsigned int seconds = micro / 1000000;
+  if (sizeof seconds < sizeof micro && micro / 1000000 != seconds)
+    {
+      errno = EINVAL;
+      return -1;
+    }
+  if (!HAVE_USLEEP && micro % 1000000)
+    seconds++;
+  while ((seconds = sleep (seconds)) != 0);
+
+#undef usleep
+#if !HAVE_USLEEP
+# define usleep(x) 0
+#endif
+  return usleep (micro % 1000000);
+}
diff --git a/tests/wctob.c b/tests/wctob.c
new file mode 100644 (file)
index 0000000..cc26afc
--- /dev/null
@@ -0,0 +1,38 @@
+/* Convert wide character to unibyte character.
+   Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wchar.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+wctob (wint_t wc)
+{
+  char buf[64];
+
+  if (!(MB_CUR_MAX <= sizeof (buf)))
+    abort ();
+  /* Handle the case where WEOF is a value that does not fit in a wchar_t.  */
+  if (wc == (wchar_t)wc)
+    if (wctomb (buf, (wchar_t)wc) == 1)
+      return (unsigned char) buf[0];
+  return EOF;
+}
diff --git a/tests/wctomb-impl.h b/tests/wctomb-impl.h
new file mode 100644 (file)
index 0000000..4e95de6
--- /dev/null
@@ -0,0 +1,34 @@
+/* Convert wide character to multibyte character.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2011.
+
+   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/>.  */
+
+int
+wctomb (char *s, wchar_t wc)
+{
+  if (s == NULL)
+    return 0;
+  else
+    {
+      mbstate_t state;
+      size_t result;
+
+      memset (&state, 0, sizeof (mbstate_t));
+      result = wcrtomb (s, wc, &state);
+      if (result == (size_t)-1)
+        return -1;
+      return result;
+    }
+}
diff --git a/tests/wctomb.c b/tests/wctomb.c
new file mode 100644 (file)
index 0000000..889a3c6
--- /dev/null
@@ -0,0 +1,25 @@
+/* Convert wide character to multibyte character.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2011.
+
+   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/>.  */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include <string.h>
+#include <wchar.h>
+
+#include "wctomb-impl.h"
diff --git a/tests/zerosize-ptr.h b/tests/zerosize-ptr.h
new file mode 100644 (file)
index 0000000..beeb3da
--- /dev/null
@@ -0,0 +1,68 @@
+/* Return a pointer to a zero-size object in memory.
+   Copyright (C) 2009-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/>.  */
+
+/* ISO C 99 does not allow memcmp(), memchr() etc. to be invoked with a NULL
+   argument.  Therefore this file produces a non-NULL pointer which cannot
+   be dereferenced, if possible.  */
+
+#include <stdlib.h>
+
+/* Test whether mmap() and mprotect() are available.
+   We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX.
+   HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an
+   mprotect() function in libgcc.a.  */
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+/* Define MAP_FILE when it isn't otherwise.  */
+# ifndef MAP_FILE
+#  define MAP_FILE 0
+# endif
+#endif
+
+/* Return a pointer to a zero-size object in memory (that is, actually, a
+   pointer to a page boundary where the previous page is readable and writable
+   and the next page is neither readable not writable), if possible.
+   Return NULL otherwise.  */
+
+static void *
+zerosize_ptr (void)
+{
+/* Use mmap and mprotect when they exist.  Don't test HAVE_MMAP, because it is
+   not defined on HP-UX 11 (since it does not support MAP_FIXED).  */
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+  const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+  const int flags = MAP_FILE | MAP_PRIVATE;
+  int fd = open ("/dev/zero", O_RDONLY, 0666);
+  if (fd >= 0)
+# endif
+    {
+      int pagesize = getpagesize ();
+      char *two_pages =
+        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+                       flags, fd, 0);
+      if (two_pages != (char *)(-1)
+          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+        return two_pages + pagesize;
+    }
+#endif
+  return NULL;
+}
diff --git a/tool-versions.txt b/tool-versions.txt
new file mode 100644 (file)
index 0000000..3b185b2
--- /dev/null
@@ -0,0 +1,49 @@
+automake (GNU automake) 1.11.1
+Copyright (C) 2009 Free Software Foundation, Inc.
+License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by Tom Tromey <tromey@redhat.com>
+       and Alexandre Duret-Lutz <adl@gnu.org>.
+
+autoconf (GNU Autoconf) 2.67
+Copyright (C) 2010 Free Software Foundation, Inc.
+License GPLv3+/Autoconf: GNU GPL version 3 or later
+<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by David J. MacKenzie and Akim Demaille.
+
+gcc (Debian 4.4.5-8) 4.4.5
+Copyright (C) 2010 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+
+m4 (GNU M4) 1.4.14
+Copyright (C) 2010 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by Rene' Seindal.
+
+gettext (GNU gettext-runtime) 0.18.1
+Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+Written by Ulrich Drepper.
+
+Expect version is      5.44.1.15
+Tcl version is         8.5
+Framework version is   1.4.99
+
+makeinfo (GNU texinfo) 4.13
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
diff --git a/xargs/Makefile.am b/xargs/Makefile.am
new file mode 100644 (file)
index 0000000..87da63c
--- /dev/null
@@ -0,0 +1,16 @@
+AUTOMAKE_OPTIONS = std-options
+AM_CFLAGS = $(WARN_CFLAGS)
+localedir = $(datadir)/locale
+bin_PROGRAMS = xargs
+man_MANS = xargs.1
+INCLUDES = -I.. -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
+LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL)
+EXTRA_DIST = $(man_MANS)
+SUBDIRS = . testsuite
+
+$(PROGRAMS): ../lib/libfind.a ../gnulib/lib/libgnulib.a
+
+dist-hook: findutils-check-manpages
+
+findutils-check-manpages:
+       $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)
diff --git a/xargs/Makefile.in b/xargs/Makefile.in
new file mode 100644 (file)
index 0000000..896361c
--- /dev/null
@@ -0,0 +1,1737 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+bin_PROGRAMS = xargs$(EXEEXT)
+subdir = xargs
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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 =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS)
+xargs_SOURCES = xargs.c
+xargs_OBJECTS = xargs.$(OBJEXT)
+xargs_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+xargs_DEPENDENCIES = ../lib/libfind.a ../gnulib/lib/libgnulib.a \
+       $(am__DEPENDENCIES_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)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = xargs.c
+DIST_SOURCES = xargs.c
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+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'
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = -I.. -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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 = $(datadir)/locale
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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 = std-options
+AM_CFLAGS = $(WARN_CFLAGS)
+man_MANS = xargs.1
+LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL)
+EXTRA_DIST = $(man_MANS)
+SUBDIRS = . testsuite
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(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 xargs/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits xargs/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):
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+installcheck-binPROGRAMS: $(bin_PROGRAMS)
+       bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
+         case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+          *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+         esac; \
+         f=`echo "$$p" | \
+            sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         for opt in --help --version; do \
+           if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+                2>c$${pid}_.err </dev/null \
+                && test -n "`cat c$${pid}_.out`" \
+                && test -z "`cat c$${pid}_.err`"; then :; \
+           else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+         done; \
+       done; rm -f c$${pid}_.???; exit $$bad
+xargs$(EXEEXT): $(xargs_OBJECTS) $(xargs_DEPENDENCIES) 
+       @rm -f xargs$(EXEEXT)
+       $(LINK) $(xargs_OBJECTS) $(xargs_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xargs.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man1: $(man_MANS)
+       @$(NORMAL_INSTALL)
+       test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       { for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+         fi; \
+       done; \
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+       done; }
+
+uninstall-man1:
+       @$(NORMAL_UNINSTALL)
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       test -z "$$files" || { \
+         echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+         cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       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"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @list='$(MANS)'; if test -n "$$list"; then \
+         list=`for p in $$list; do \
+           if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+           if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+         if test -n "$$list" && \
+           grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+           echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+           grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+           echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+           echo "       typically \`make maintainer-clean' will remove them" >&2; \
+           exit 1; \
+         else :; fi; \
+       else :; fi
+       @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
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am: installcheck-binPROGRAMS
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+       install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-binPROGRAMS \
+       clean-generic ctags ctags-recursive dist-hook distclean \
+       distclean-compile distclean-generic distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-binPROGRAMS 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-man1 install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installcheck-binPROGRAMS installdirs installdirs-am \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+       tags tags-recursive uninstall uninstall-am \
+       uninstall-binPROGRAMS uninstall-man uninstall-man1
+
+
+$(PROGRAMS): ../lib/libfind.a ../gnulib/lib/libgnulib.a
+
+dist-hook: findutils-check-manpages
+
+findutils-check-manpages:
+       $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)
+
+# 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/xargs/testsuite/Makefile.am b/xargs/testsuite/Makefile.am
new file mode 100644 (file)
index 0000000..8637d93
--- /dev/null
@@ -0,0 +1,261 @@
+AUTOMAKE_OPTIONS=dejagnu
+XARGS = ../xargs
+XARGSFLAGS =
+DEJATOOL = xargs
+#EXTRA_DIST = config/*.exp inputs/*.xi xargs.*/*.exp xargs.*/*.xo
+
+EXTRA_DIST_EXP = \
+config/unix.exp \
+xargs.gnu/0n3.exp \
+xargs.gnu/delim-o.exp \
+xargs.gnu/E_-0.exp \
+xargs.gnu/empty_def-r.exp \
+xargs.gnu/empty-r.exp \
+xargs.gnu/idef-0.exp \
+xargs.gnu/idef-s26-0.exp \
+xargs.gnu/l1-0.exp \
+xargs.gnu/l1_2-0.exp \
+xargs.gnu/L2-0.exp \
+xargs.gnu/L2_2-0.exp \
+xargs.gnu/L3-0.exp \
+xargs.gnu/n1-0.exp \
+xargs.gnu/n2-0.exp \
+xargs.gnu/n2-s26-0.exp \
+xargs.gnu/n2-s26-x-0.exp \
+xargs.gnu/n3-0.exp \
+xargs.gnu/n3-s36-0.exp \
+xargs.gnu/noeof-0.exp \
+xargs.gnu/nothing.exp \
+xargs.gnu/P3-n1-IARG.exp \
+xargs.gnu/r.exp \
+xargs.gnu/s118-0.exp \
+xargs.gnu/s19-0.exp \
+xargs.gnu/s19_2-0.exp \
+xargs.gnu/s20-0.exp \
+xargs.gnu/s30-0.exp \
+xargs.gnu/space-0.exp \
+xargs.gnu/space-r.exp \
+xargs.gnu/space-t-0.exp \
+xargs.posix/EEOFb.exp \
+xargs.posix/EEOFe.exp \
+xargs.posix/EEOF.exp \
+xargs.posix/E_.exp \
+xargs.posix/E_-IARG.exp \
+xargs.posix/arg_max_32bit_linux_bug.exp \
+xargs.posix/arg_max_64bit_linux_bug.exp \
+xargs.posix/childfail.exp \
+xargs.posix/empty_def.exp \
+xargs.posix/empty.exp \
+xargs.posix/hithere.exp \
+xargs.posix/IARG-E_.exp \
+xargs.posix/IARG.exp \
+xargs.posix/IARG-s15.exp \
+xargs.posix/L2_2.exp \
+xargs.posix/uc_L2.exp \
+xargs.posix/L2-n2.exp \
+xargs.posix/L3.exp \
+xargs.posix/n1.exp \
+xargs.posix/n2.exp \
+xargs.posix/n2-s26.exp \
+xargs.posix/n2-s26-x.exp \
+xargs.posix/n3.exp \
+xargs.posix/n3-s36.exp \
+xargs.posix/noeof.exp \
+xargs.posix/quotes.exp \
+xargs.posix/rc-123.exp \
+xargs.posix/rc-124.exp \
+xargs.posix/rc-125.exp \
+xargs.posix/rc-126.exp \
+xargs.posix/rc-127.exp \
+xargs.posix/s118.exp \
+xargs.posix/s19_2.exp \
+xargs.posix/s19.exp \
+xargs.posix/s20.exp \
+xargs.posix/s30.exp \
+xargs.posix/s470.exp \
+xargs.posix/s47.exp \
+xargs.posix/s48.exp \
+xargs.posix/s6.exp \
+xargs.posix/savannah-11865.exp \
+xargs.posix/space.exp \
+xargs.posix/space-I.exp \
+xargs.posix/sv-bug-18714.exp \
+xargs.posix/sv-bug-18714b.exp \
+xargs.posix/sv-bug-20273.exp \
+xargs.posix/unmatched2.exp \
+xargs.posix/unmatched.exp \
+xargs.posix/unmatched-n2-x.exp \
+xargs.sysv/eEOF.exp \
+xargs.sysv/e.exp \
+xargs.sysv/empty_def-t.exp \
+xargs.sysv/empty-t.exp \
+xargs.sysv/eof1.exp \
+xargs.sysv/iARG.exp \
+xargs.sysv/idef.exp \
+xargs.sysv/idef-s26.exp \
+xargs.sysv/iquotes.exp \
+xargs.sysv/l1_2.exp \
+xargs.sysv/l1.exp \
+xargs.sysv/l1n4.exp \
+xargs.sysv/lc_l2.exp \
+xargs.sysv/s30-t.exp \
+xargs.sysv/sv-bug-18713.exp \
+xargs.sysv/space-t.exp \
+xargs.sysv/trace.exp
+
+
+
+EXTRA_DIST_XO = \
+xargs.gnu/0n3.xo \
+xargs.gnu/E_-0.xo \
+xargs.gnu/delim-o.xo \
+xargs.gnu/idef-0.xo \
+xargs.gnu/idef-s26-0.xo \
+xargs.gnu/l1-0.xo \
+xargs.gnu/l1_2-0.xo \
+xargs.gnu/L2-0.xo \
+xargs.gnu/L2_2-0.xo \
+xargs.gnu/L3-0.xo \
+xargs.gnu/n1-0.xo \
+xargs.gnu/n2-0.xo \
+xargs.gnu/n2-s26-0.xo \
+xargs.gnu/n2-s26-x-0.xo \
+xargs.gnu/n3-0.xo \
+xargs.gnu/n3-s36-0.xo \
+xargs.gnu/noeof-0.xo \
+xargs.gnu/nothing.xo \
+xargs.gnu/P3-n1-IARG.xo \
+xargs.gnu/r.xo \
+xargs.gnu/s118-0.xo \
+xargs.gnu/s19-0.xo \
+xargs.gnu/s20-0.xo \
+xargs.gnu/s30-0.xo \
+xargs.gnu/space-0.xo \
+xargs.gnu/space-t-0.xo \
+xargs.posix/EEOFb.xo \
+xargs.posix/EEOFe.xo \
+xargs.posix/EEOF.xo \
+xargs.posix/E_-IARG.xo \
+xargs.posix/empty_def.xo \
+xargs.posix/empty.xo \
+xargs.posix/E_.xo \
+xargs.posix/hithere.xo \
+xargs.posix/IARG-E_.xo \
+xargs.posix/IARG-s15.xo \
+xargs.posix/IARG.xo \
+xargs.posix/L2_2.xo \
+xargs.posix/L2-n2.xo \
+xargs.posix/uc_L2.xo \
+xargs.posix/L3.xo \
+xargs.posix/n1.xo \
+xargs.posix/n2-s26.xo \
+xargs.posix/n2-s26-x.xo \
+xargs.posix/n2.xo \
+xargs.posix/n3-s36.xo \
+xargs.posix/n3.xo \
+xargs.posix/noeof.xo \
+xargs.posix/quotes.xo \
+xargs.posix/rc-123.xo \
+xargs.posix/s118.xo \
+xargs.posix/s19.xo \
+xargs.posix/s20.xo \
+xargs.posix/s30.xo \
+xargs.posix/s470.xo \
+xargs.posix/s47.xo \
+xargs.posix/s48.xo \
+xargs.posix/savannah-11865.xo \
+xargs.posix/space.xo \
+xargs.posix/sv-bug-18714.xo \
+xargs.posix/sv-bug-18714b.xo \
+xargs.posix/sv-bug-20273.xo \
+xargs.posix/unmatched2.xo \
+xargs.posix/unmatched.xo \
+xargs.sysv/eEOF.xo \
+xargs.sysv/empty_def-t.xo \
+xargs.sysv/empty-t.xo \
+xargs.sysv/eof1.xo \
+xargs.sysv/e.xo \
+xargs.sysv/iARG.xo \
+xargs.sysv/idef-s26.xo \
+xargs.sysv/idef.xo \
+xargs.sysv/iquotes.xo \
+xargs.sysv/l1_2.xo \
+xargs.sysv/l1n4.xo \
+xargs.sysv/l1.xo \
+xargs.sysv/lc_l2.xo \
+xargs.sysv/s30-t.xo \
+xargs.sysv/sv-bug-18713.xo \
+xargs.sysv/space-t.xo \
+xargs.sysv/trace.xo
+
+
+
+EXTRA_DIST_XE = \
+xargs.gnu/space-t-0.xe \
+xargs.sysv/empty_def-t.xe \
+xargs.sysv/empty-t.xe \
+xargs.sysv/s30-t.xe \
+xargs.sysv/space-t.xe \
+xargs.sysv/trace.xe
+
+
+EXTRA_DIST_XI = \
+inputs/16383-ys.xi \
+inputs/32767-ys.xi \
+inputs/blank.xi \
+inputs/empty.xi \
+inputs/eof_-0.xi \
+inputs/EOFb.xi \
+inputs/EOFe.xi \
+inputs/eofstr.xi \
+inputs/eof_.xi \
+inputs/eof1.xi \
+inputs/EOF.xi \
+inputs/ett.xi \
+inputs/files0.xi \
+inputs/files.xi \
+inputs/foobar.xi \
+inputs/formfeeds.xi \
+inputs/ftt.xi \
+inputs/helloworld.xi \
+inputs/items-0.xi \
+inputs/items.xi \
+inputs/ldata-0.xi \
+inputs/ldatab-0.xi \
+inputs/ldatab.xi \
+inputs/ldata.xi \
+inputs/lines.xi \
+inputs/noeof-0.xi \
+inputs/noeof.xi \
+inputs/Pdata.xi \
+inputs/quotes.xi \
+inputs/space.xi \
+inputs/stairs-0.xi \
+inputs/stairs2-0.xi \
+inputs/stairs2.xi \
+inputs/stairs.xi \
+inputs/stt.xi \
+inputs/sv-bug-20273.xi \
+inputs/unmatched2.xi \
+inputs/unmatched.xi \
+inputs/verticaltabs.xi
+
+
+EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_XI) $(EXTRA_DIST_XE)
+
+
+
+# DIST_SUBDIRS = config inputs xargs.gnu xargs.posix xargs.sysv
+
+CLEANFILES = *.log *.sum site.exp site.bak
+
+FORCE:
+
+checklists:
+       cd $(srcdir) && \
+       ( find config inputs xargs.gnu xargs.posix xargs.sysv \( -name "*.exp" -o -name "*.xo" -o -name "*.xi" -o -name "*.xe" \) -print ; \
+         ls $(EXTRA_DIST_XI)  ; \
+         ls $(EXTRA_DIST_XE)  ; \
+         ls $(EXTRA_DIST_XO)  ; \
+         ls  $(EXTRA_DIST_EXP)  ; ) | \
+       sort | uniq -c | awk '$$1 != 2 { print; }'
diff --git a/xargs/testsuite/Makefile.in b/xargs/testsuite/Makefile.in
new file mode 100644 (file)
index 0000000..f99a579
--- /dev/null
@@ -0,0 +1,1629 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+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@
+subdir = xargs/testsuite
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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)/gnulib/m4/00gnulib.m4 \
+       $(top_srcdir)/gnulib/m4/alloca.m4 \
+       $(top_srcdir)/gnulib/m4/argmatch.m4 \
+       $(top_srcdir)/gnulib/m4/assert.m4 \
+       $(top_srcdir)/gnulib/m4/bison.m4 \
+       $(top_srcdir)/gnulib/m4/btowc.m4 \
+       $(top_srcdir)/gnulib/m4/canonicalize.m4 \
+       $(top_srcdir)/gnulib/m4/chdir-long.m4 \
+       $(top_srcdir)/gnulib/m4/chown.m4 \
+       $(top_srcdir)/gnulib/m4/clock_time.m4 \
+       $(top_srcdir)/gnulib/m4/cloexec.m4 \
+       $(top_srcdir)/gnulib/m4/close-stream.m4 \
+       $(top_srcdir)/gnulib/m4/close.m4 \
+       $(top_srcdir)/gnulib/m4/closein.m4 \
+       $(top_srcdir)/gnulib/m4/closeout.m4 \
+       $(top_srcdir)/gnulib/m4/codeset.m4 \
+       $(top_srcdir)/gnulib/m4/configmake.m4 \
+       $(top_srcdir)/gnulib/m4/ctype.m4 \
+       $(top_srcdir)/gnulib/m4/cycle-check.m4 \
+       $(top_srcdir)/gnulib/m4/d-ino.m4 \
+       $(top_srcdir)/gnulib/m4/d-type.m4 \
+       $(top_srcdir)/gnulib/m4/dirent-safer.m4 \
+       $(top_srcdir)/gnulib/m4/dirent_h.m4 \
+       $(top_srcdir)/gnulib/m4/dirfd.m4 \
+       $(top_srcdir)/gnulib/m4/dirname.m4 \
+       $(top_srcdir)/gnulib/m4/double-slash-root.m4 \
+       $(top_srcdir)/gnulib/m4/dup2.m4 \
+       $(top_srcdir)/gnulib/m4/eealloc.m4 \
+       $(top_srcdir)/gnulib/m4/environ.m4 \
+       $(top_srcdir)/gnulib/m4/errno_h.m4 \
+       $(top_srcdir)/gnulib/m4/error.m4 \
+       $(top_srcdir)/gnulib/m4/euidaccess.m4 \
+       $(top_srcdir)/gnulib/m4/extensions.m4 \
+       $(top_srcdir)/gnulib/m4/faccessat.m4 \
+       $(top_srcdir)/gnulib/m4/fchdir.m4 \
+       $(top_srcdir)/gnulib/m4/fclose.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl.m4 \
+       $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
+       $(top_srcdir)/gnulib/m4/fdopendir.m4 \
+       $(top_srcdir)/gnulib/m4/fflush.m4 \
+       $(top_srcdir)/gnulib/m4/fileblocks.m4 \
+       $(top_srcdir)/gnulib/m4/filemode.m4 \
+       $(top_srcdir)/gnulib/m4/flexmember.m4 \
+       $(top_srcdir)/gnulib/m4/float_h.m4 \
+       $(top_srcdir)/gnulib/m4/fnmatch.m4 \
+       $(top_srcdir)/gnulib/m4/fopen.m4 \
+       $(top_srcdir)/gnulib/m4/fpending.m4 \
+       $(top_srcdir)/gnulib/m4/fpurge.m4 \
+       $(top_srcdir)/gnulib/m4/freading.m4 \
+       $(top_srcdir)/gnulib/m4/fseeko.m4 \
+       $(top_srcdir)/gnulib/m4/fstypename.m4 \
+       $(top_srcdir)/gnulib/m4/ftell.m4 \
+       $(top_srcdir)/gnulib/m4/ftello.m4 \
+       $(top_srcdir)/gnulib/m4/fts.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/gnulib/m4/getcwd.m4 \
+       $(top_srcdir)/gnulib/m4/getdelim.m4 \
+       $(top_srcdir)/gnulib/m4/getdtablesize.m4 \
+       $(top_srcdir)/gnulib/m4/getgroups.m4 \
+       $(top_srcdir)/gnulib/m4/getline.m4 \
+       $(top_srcdir)/gnulib/m4/getopt.m4 \
+       $(top_srcdir)/gnulib/m4/getpagesize.m4 \
+       $(top_srcdir)/gnulib/m4/gettext.m4 \
+       $(top_srcdir)/gnulib/m4/gettime.m4 \
+       $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+       $(top_srcdir)/gnulib/m4/getugroups.m4 \
+       $(top_srcdir)/gnulib/m4/glibc21.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+       $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+       $(top_srcdir)/gnulib/m4/group-member.m4 \
+       $(top_srcdir)/gnulib/m4/hash.m4 \
+       $(top_srcdir)/gnulib/m4/human.m4 \
+       $(top_srcdir)/gnulib/m4/i-ring.m4 \
+       $(top_srcdir)/gnulib/m4/iconv.m4 \
+       $(top_srcdir)/gnulib/m4/idcache.m4 \
+       $(top_srcdir)/gnulib/m4/include_next.m4 \
+       $(top_srcdir)/gnulib/m4/inline.m4 \
+       $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+       $(top_srcdir)/gnulib/m4/intmax_t.m4 \
+       $(top_srcdir)/gnulib/m4/inttostr.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes.m4 \
+       $(top_srcdir)/gnulib/m4/inttypes_h.m4 \
+       $(top_srcdir)/gnulib/m4/isblank.m4 \
+       $(top_srcdir)/gnulib/m4/iswblank.m4 \
+       $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+       $(top_srcdir)/gnulib/m4/lchown.m4 \
+       $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+       $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+       $(top_srcdir)/gnulib/m4/lib-link.m4 \
+       $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+       $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
+       $(top_srcdir)/gnulib/m4/localcharset.m4 \
+       $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+       $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+       $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+       $(top_srcdir)/gnulib/m4/locale_h.m4 \
+       $(top_srcdir)/gnulib/m4/localename.m4 \
+       $(top_srcdir)/gnulib/m4/lock.m4 \
+       $(top_srcdir)/gnulib/m4/longlong.m4 \
+       $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \
+       $(top_srcdir)/gnulib/m4/lseek.m4 \
+       $(top_srcdir)/gnulib/m4/lstat.m4 \
+       $(top_srcdir)/gnulib/m4/malloc.m4 \
+       $(top_srcdir)/gnulib/m4/malloca.m4 \
+       $(top_srcdir)/gnulib/m4/math_h.m4 \
+       $(top_srcdir)/gnulib/m4/mathfunc.m4 \
+       $(top_srcdir)/gnulib/m4/mbchar.m4 \
+       $(top_srcdir)/gnulib/m4/mbiter.m4 \
+       $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+       $(top_srcdir)/gnulib/m4/mbsinit.m4 \
+       $(top_srcdir)/gnulib/m4/mbslen.m4 \
+       $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \
+       $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+       $(top_srcdir)/gnulib/m4/mbtowc.m4 \
+       $(top_srcdir)/gnulib/m4/memchr.m4 \
+       $(top_srcdir)/gnulib/m4/mempcpy.m4 \
+       $(top_srcdir)/gnulib/m4/memrchr.m4 \
+       $(top_srcdir)/gnulib/m4/mgetgroups.m4 \
+       $(top_srcdir)/gnulib/m4/mkdir.m4 \
+       $(top_srcdir)/gnulib/m4/mktime.m4 \
+       $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+       $(top_srcdir)/gnulib/m4/mode_t.m4 \
+       $(top_srcdir)/gnulib/m4/modechange.m4 \
+       $(top_srcdir)/gnulib/m4/mountlist.m4 \
+       $(top_srcdir)/gnulib/m4/multiarch.m4 \
+       $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
+       $(top_srcdir)/gnulib/m4/nls.m4 \
+       $(top_srcdir)/gnulib/m4/onceonly.m4 \
+       $(top_srcdir)/gnulib/m4/open.m4 \
+       $(top_srcdir)/gnulib/m4/openat.m4 \
+       $(top_srcdir)/gnulib/m4/parse-datetime.m4 \
+       $(top_srcdir)/gnulib/m4/pathmax.m4 \
+       $(top_srcdir)/gnulib/m4/perror.m4 \
+       $(top_srcdir)/gnulib/m4/po.m4 \
+       $(top_srcdir)/gnulib/m4/printf.m4 \
+       $(top_srcdir)/gnulib/m4/priv-set.m4 \
+       $(top_srcdir)/gnulib/m4/progtest.m4 \
+       $(top_srcdir)/gnulib/m4/putenv.m4 \
+       $(top_srcdir)/gnulib/m4/quote.m4 \
+       $(top_srcdir)/gnulib/m4/quotearg.m4 \
+       $(top_srcdir)/gnulib/m4/readlink.m4 \
+       $(top_srcdir)/gnulib/m4/readlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/realloc.m4 \
+       $(top_srcdir)/gnulib/m4/regex.m4 \
+       $(top_srcdir)/gnulib/m4/rmdir.m4 \
+       $(top_srcdir)/gnulib/m4/rpmatch.m4 \
+       $(top_srcdir)/gnulib/m4/same.m4 \
+       $(top_srcdir)/gnulib/m4/save-cwd.m4 \
+       $(top_srcdir)/gnulib/m4/savedir.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \
+       $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \
+       $(top_srcdir)/gnulib/m4/setenv.m4 \
+       $(top_srcdir)/gnulib/m4/setlocale.m4 \
+       $(top_srcdir)/gnulib/m4/size_max.m4 \
+       $(top_srcdir)/gnulib/m4/sleep.m4 \
+       $(top_srcdir)/gnulib/m4/snprintf.m4 \
+       $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+       $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \
+       $(top_srcdir)/gnulib/m4/stat-time.m4 \
+       $(top_srcdir)/gnulib/m4/stat.m4 \
+       $(top_srcdir)/gnulib/m4/stdarg.m4 \
+       $(top_srcdir)/gnulib/m4/stdbool.m4 \
+       $(top_srcdir)/gnulib/m4/stddef_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdint.m4 \
+       $(top_srcdir)/gnulib/m4/stdint_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdio-safer.m4 \
+       $(top_srcdir)/gnulib/m4/stdio_h.m4 \
+       $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+       $(top_srcdir)/gnulib/m4/stpcpy.m4 \
+       $(top_srcdir)/gnulib/m4/strcase.m4 \
+       $(top_srcdir)/gnulib/m4/strcasestr.m4 \
+       $(top_srcdir)/gnulib/m4/strdup.m4 \
+       $(top_srcdir)/gnulib/m4/strerror.m4 \
+       $(top_srcdir)/gnulib/m4/strftime.m4 \
+       $(top_srcdir)/gnulib/m4/string_h.m4 \
+       $(top_srcdir)/gnulib/m4/strings_h.m4 \
+       $(top_srcdir)/gnulib/m4/strndup.m4 \
+       $(top_srcdir)/gnulib/m4/strnlen.m4 \
+       $(top_srcdir)/gnulib/m4/strstr.m4 \
+       $(top_srcdir)/gnulib/m4/strtoimax.m4 \
+       $(top_srcdir)/gnulib/m4/strtol.m4 \
+       $(top_srcdir)/gnulib/m4/strtoll.m4 \
+       $(top_srcdir)/gnulib/m4/strtoul.m4 \
+       $(top_srcdir)/gnulib/m4/strtoull.m4 \
+       $(top_srcdir)/gnulib/m4/strtoumax.m4 \
+       $(top_srcdir)/gnulib/m4/symlink.m4 \
+       $(top_srcdir)/gnulib/m4/symlinkat.m4 \
+       $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+       $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \
+       $(top_srcdir)/gnulib/m4/thread.m4 \
+       $(top_srcdir)/gnulib/m4/threadlib.m4 \
+       $(top_srcdir)/gnulib/m4/time_h.m4 \
+       $(top_srcdir)/gnulib/m4/time_r.m4 \
+       $(top_srcdir)/gnulib/m4/timespec.m4 \
+       $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/gnulib/m4/ungetc.m4 \
+       $(top_srcdir)/gnulib/m4/unistd-safer.m4 \
+       $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+       $(top_srcdir)/gnulib/m4/unlink.m4 \
+       $(top_srcdir)/gnulib/m4/unlinkdir.m4 \
+       $(top_srcdir)/gnulib/m4/usleep.m4 \
+       $(top_srcdir)/gnulib/m4/vasnprintf.m4 \
+       $(top_srcdir)/gnulib/m4/version-etc.m4 \
+       $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+       $(top_srcdir)/gnulib/m4/warnings.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_h.m4 \
+       $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+       $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctob.m4 \
+       $(top_srcdir)/gnulib/m4/wctomb.m4 \
+       $(top_srcdir)/gnulib/m4/wctype_h.m4 \
+       $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+       $(top_srcdir)/gnulib/m4/wint_t.m4 \
+       $(top_srcdir)/gnulib/m4/xalloc.m4 \
+       $(top_srcdir)/gnulib/m4/xgetcwd.m4 \
+       $(top_srcdir)/gnulib/m4/xsize.m4 \
+       $(top_srcdir)/gnulib/m4/xstrndup.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtod.m4 \
+       $(top_srcdir)/gnulib/m4/xstrtol.m4 \
+       $(top_srcdir)/gnulib/m4/yesno.m4 \
+       $(top_srcdir)/gnulib/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 =
+SOURCES =
+DIST_SOURCES =
+RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+EXPECT = expect
+RUNTEST = runtest
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+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@
+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@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+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_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+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_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+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_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_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+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_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGB = @GNULIB_LOGB@
+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_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+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_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+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_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+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_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+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_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+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_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINL = @HAVE_ASINL@
+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_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+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_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+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_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+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_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+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_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_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+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_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SETENV = @HAVE_SETENV@
+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_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+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_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_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+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_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+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_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_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDES = @INCLUDES@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+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@
+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@
+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_SELINUX = @LIB_SELINUX@
+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@
+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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_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@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+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_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+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_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_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_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+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_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+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_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+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@
+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@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+U = @U@
+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_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@
+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_CC = @ac_ct_CC@
+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@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+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 = dejagnu
+XARGS = ../xargs
+XARGSFLAGS = 
+DEJATOOL = xargs
+#EXTRA_DIST = config/*.exp inputs/*.xi xargs.*/*.exp xargs.*/*.xo
+EXTRA_DIST_EXP = \
+config/unix.exp \
+xargs.gnu/0n3.exp \
+xargs.gnu/delim-o.exp \
+xargs.gnu/E_-0.exp \
+xargs.gnu/empty_def-r.exp \
+xargs.gnu/empty-r.exp \
+xargs.gnu/idef-0.exp \
+xargs.gnu/idef-s26-0.exp \
+xargs.gnu/l1-0.exp \
+xargs.gnu/l1_2-0.exp \
+xargs.gnu/L2-0.exp \
+xargs.gnu/L2_2-0.exp \
+xargs.gnu/L3-0.exp \
+xargs.gnu/n1-0.exp \
+xargs.gnu/n2-0.exp \
+xargs.gnu/n2-s26-0.exp \
+xargs.gnu/n2-s26-x-0.exp \
+xargs.gnu/n3-0.exp \
+xargs.gnu/n3-s36-0.exp \
+xargs.gnu/noeof-0.exp \
+xargs.gnu/nothing.exp \
+xargs.gnu/P3-n1-IARG.exp \
+xargs.gnu/r.exp \
+xargs.gnu/s118-0.exp \
+xargs.gnu/s19-0.exp \
+xargs.gnu/s19_2-0.exp \
+xargs.gnu/s20-0.exp \
+xargs.gnu/s30-0.exp \
+xargs.gnu/space-0.exp \
+xargs.gnu/space-r.exp \
+xargs.gnu/space-t-0.exp \
+xargs.posix/EEOFb.exp \
+xargs.posix/EEOFe.exp \
+xargs.posix/EEOF.exp \
+xargs.posix/E_.exp \
+xargs.posix/E_-IARG.exp \
+xargs.posix/arg_max_32bit_linux_bug.exp \
+xargs.posix/arg_max_64bit_linux_bug.exp \
+xargs.posix/childfail.exp \
+xargs.posix/empty_def.exp \
+xargs.posix/empty.exp \
+xargs.posix/hithere.exp \
+xargs.posix/IARG-E_.exp \
+xargs.posix/IARG.exp \
+xargs.posix/IARG-s15.exp \
+xargs.posix/L2_2.exp \
+xargs.posix/uc_L2.exp \
+xargs.posix/L2-n2.exp \
+xargs.posix/L3.exp \
+xargs.posix/n1.exp \
+xargs.posix/n2.exp \
+xargs.posix/n2-s26.exp \
+xargs.posix/n2-s26-x.exp \
+xargs.posix/n3.exp \
+xargs.posix/n3-s36.exp \
+xargs.posix/noeof.exp \
+xargs.posix/quotes.exp \
+xargs.posix/rc-123.exp \
+xargs.posix/rc-124.exp \
+xargs.posix/rc-125.exp \
+xargs.posix/rc-126.exp \
+xargs.posix/rc-127.exp \
+xargs.posix/s118.exp \
+xargs.posix/s19_2.exp \
+xargs.posix/s19.exp \
+xargs.posix/s20.exp \
+xargs.posix/s30.exp \
+xargs.posix/s470.exp \
+xargs.posix/s47.exp \
+xargs.posix/s48.exp \
+xargs.posix/s6.exp \
+xargs.posix/savannah-11865.exp \
+xargs.posix/space.exp \
+xargs.posix/space-I.exp \
+xargs.posix/sv-bug-18714.exp \
+xargs.posix/sv-bug-18714b.exp \
+xargs.posix/sv-bug-20273.exp \
+xargs.posix/unmatched2.exp \
+xargs.posix/unmatched.exp \
+xargs.posix/unmatched-n2-x.exp \
+xargs.sysv/eEOF.exp \
+xargs.sysv/e.exp \
+xargs.sysv/empty_def-t.exp \
+xargs.sysv/empty-t.exp \
+xargs.sysv/eof1.exp \
+xargs.sysv/iARG.exp \
+xargs.sysv/idef.exp \
+xargs.sysv/idef-s26.exp \
+xargs.sysv/iquotes.exp \
+xargs.sysv/l1_2.exp \
+xargs.sysv/l1.exp \
+xargs.sysv/l1n4.exp \
+xargs.sysv/lc_l2.exp \
+xargs.sysv/s30-t.exp \
+xargs.sysv/sv-bug-18713.exp \
+xargs.sysv/space-t.exp \
+xargs.sysv/trace.exp
+
+EXTRA_DIST_XO = \
+xargs.gnu/0n3.xo \
+xargs.gnu/E_-0.xo \
+xargs.gnu/delim-o.xo \
+xargs.gnu/idef-0.xo \
+xargs.gnu/idef-s26-0.xo \
+xargs.gnu/l1-0.xo \
+xargs.gnu/l1_2-0.xo \
+xargs.gnu/L2-0.xo \
+xargs.gnu/L2_2-0.xo \
+xargs.gnu/L3-0.xo \
+xargs.gnu/n1-0.xo \
+xargs.gnu/n2-0.xo \
+xargs.gnu/n2-s26-0.xo \
+xargs.gnu/n2-s26-x-0.xo \
+xargs.gnu/n3-0.xo \
+xargs.gnu/n3-s36-0.xo \
+xargs.gnu/noeof-0.xo \
+xargs.gnu/nothing.xo \
+xargs.gnu/P3-n1-IARG.xo \
+xargs.gnu/r.xo \
+xargs.gnu/s118-0.xo \
+xargs.gnu/s19-0.xo \
+xargs.gnu/s20-0.xo \
+xargs.gnu/s30-0.xo \
+xargs.gnu/space-0.xo \
+xargs.gnu/space-t-0.xo \
+xargs.posix/EEOFb.xo \
+xargs.posix/EEOFe.xo \
+xargs.posix/EEOF.xo \
+xargs.posix/E_-IARG.xo \
+xargs.posix/empty_def.xo \
+xargs.posix/empty.xo \
+xargs.posix/E_.xo \
+xargs.posix/hithere.xo \
+xargs.posix/IARG-E_.xo \
+xargs.posix/IARG-s15.xo \
+xargs.posix/IARG.xo \
+xargs.posix/L2_2.xo \
+xargs.posix/L2-n2.xo \
+xargs.posix/uc_L2.xo \
+xargs.posix/L3.xo \
+xargs.posix/n1.xo \
+xargs.posix/n2-s26.xo \
+xargs.posix/n2-s26-x.xo \
+xargs.posix/n2.xo \
+xargs.posix/n3-s36.xo \
+xargs.posix/n3.xo \
+xargs.posix/noeof.xo \
+xargs.posix/quotes.xo \
+xargs.posix/rc-123.xo \
+xargs.posix/s118.xo \
+xargs.posix/s19.xo \
+xargs.posix/s20.xo \
+xargs.posix/s30.xo \
+xargs.posix/s470.xo \
+xargs.posix/s47.xo \
+xargs.posix/s48.xo \
+xargs.posix/savannah-11865.xo \
+xargs.posix/space.xo \
+xargs.posix/sv-bug-18714.xo \
+xargs.posix/sv-bug-18714b.xo \
+xargs.posix/sv-bug-20273.xo \
+xargs.posix/unmatched2.xo \
+xargs.posix/unmatched.xo \
+xargs.sysv/eEOF.xo \
+xargs.sysv/empty_def-t.xo \
+xargs.sysv/empty-t.xo \
+xargs.sysv/eof1.xo \
+xargs.sysv/e.xo \
+xargs.sysv/iARG.xo \
+xargs.sysv/idef-s26.xo \
+xargs.sysv/idef.xo \
+xargs.sysv/iquotes.xo \
+xargs.sysv/l1_2.xo \
+xargs.sysv/l1n4.xo \
+xargs.sysv/l1.xo \
+xargs.sysv/lc_l2.xo \
+xargs.sysv/s30-t.xo \
+xargs.sysv/sv-bug-18713.xo \
+xargs.sysv/space-t.xo \
+xargs.sysv/trace.xo
+
+EXTRA_DIST_XE = \
+xargs.gnu/space-t-0.xe \
+xargs.sysv/empty_def-t.xe \
+xargs.sysv/empty-t.xe \
+xargs.sysv/s30-t.xe \
+xargs.sysv/space-t.xe \
+xargs.sysv/trace.xe
+
+EXTRA_DIST_XI = \
+inputs/16383-ys.xi \
+inputs/32767-ys.xi \
+inputs/blank.xi \
+inputs/empty.xi \
+inputs/eof_-0.xi \
+inputs/EOFb.xi \
+inputs/EOFe.xi \
+inputs/eofstr.xi \
+inputs/eof_.xi \
+inputs/eof1.xi \
+inputs/EOF.xi \
+inputs/ett.xi \
+inputs/files0.xi \
+inputs/files.xi \
+inputs/foobar.xi \
+inputs/formfeeds.xi \
+inputs/ftt.xi \
+inputs/helloworld.xi \
+inputs/items-0.xi \
+inputs/items.xi \
+inputs/ldata-0.xi \
+inputs/ldatab-0.xi \
+inputs/ldatab.xi \
+inputs/ldata.xi \
+inputs/lines.xi \
+inputs/noeof-0.xi \
+inputs/noeof.xi \
+inputs/Pdata.xi \
+inputs/quotes.xi \
+inputs/space.xi \
+inputs/stairs-0.xi \
+inputs/stairs2-0.xi \
+inputs/stairs2.xi \
+inputs/stairs.xi \
+inputs/stt.xi \
+inputs/sv-bug-20273.xi \
+inputs/unmatched2.xi \
+inputs/unmatched.xi \
+inputs/verticaltabs.xi
+
+EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_XI) $(EXTRA_DIST_XE)
+
+# DIST_SUBDIRS = config inputs xargs.gnu xargs.posix xargs.sysv
+CLEANFILES = *.log *.sum site.exp site.bak
+all: all-am
+
+.SUFFIXES:
+$(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 xargs/testsuite/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits xargs/testsuite/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):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+check-DEJAGNU: site.exp
+       srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
+       EXPECT=$(EXPECT); export EXPECT; \
+       runtest=$(RUNTEST); \
+       if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+         exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
+           if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+           then :; else exit_status=1; fi; \
+         done; \
+       else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+       fi; \
+       exit $$exit_status
+site.exp: Makefile
+       @echo 'Making a new site.exp file...'
+       @echo '## these variables are automatically generated by make ##' >site.tmp
+       @echo '# Do not edit here.  If you wish to override these values' >>site.tmp
+       @echo '# edit the last section' >>site.tmp
+       @echo 'set srcdir $(srcdir)' >>site.tmp
+       @echo "set objdir `pwd`" >>site.tmp
+       @echo 'set build_alias "$(build_alias)"' >>site.tmp
+       @echo 'set build_triplet $(build_triplet)' >>site.tmp
+       @echo 'set host_alias "$(host_alias)"' >>site.tmp
+       @echo 'set host_triplet $(host_triplet)' >>site.tmp
+       @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+       @test ! -f site.exp || \
+         sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+       @-rm -f site.bak
+       @test ! -f site.exp || mv site.exp site.bak
+       @mv site.tmp site.exp
+
+distclean-DEJAGNU:
+       -rm -f site.exp site.bak
+       -l='$(DEJATOOL)'; for tool in $$l; do \
+         rm -f $$tool.sum $$tool.log; \
+       done
+
+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-DEJAGNU
+check: check-am
+all-am: Makefile
+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:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+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)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-DEJAGNU distclean-generic
+
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
+       distclean distclean-DEJAGNU distclean-generic 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-generic pdf \
+       pdf-am ps ps-am uninstall uninstall-am
+
+
+FORCE:
+
+checklists:
+       cd $(srcdir) && \
+       ( find config inputs xargs.gnu xargs.posix xargs.sysv \( -name "*.exp" -o -name "*.xo" -o -name "*.xi" -o -name "*.xe" \) -print ; \
+         ls $(EXTRA_DIST_XI)  ; \
+         ls $(EXTRA_DIST_XE)  ; \
+         ls $(EXTRA_DIST_XO)  ; \
+         ls  $(EXTRA_DIST_EXP)  ; ) | \
+       sort | uniq -c | awk '$$1 != 2 { print; }'
+
+# 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/xargs/testsuite/config/unix.exp b/xargs/testsuite/config/unix.exp
new file mode 100644 (file)
index 0000000..f05c29b
--- /dev/null
@@ -0,0 +1,181 @@
+# -*- TCL -*-
+# Test-specific TCL procedures required by DejaGNU.
+# Copyright (C) 1994, 2005, 2007, 2010 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/>.
+
+# Modified by David MacKenzie <djm@gnu.ai.mit.edu> from the gcc files
+# written by Rob Savoye <rob@cygnus.com>.
+\f
+
+verbose "base_dir is $base_dir" 2
+
+set objfile "xargs.o"
+set dir "$base_dir/.."
+set path "$dir/$objfile"
+if ![file exists $path] then {
+    error "$path does not exist"
+} else {
+    set XARGS [findfile $base_dir/../xargs [transform xargs]]
+}
+
+global XARGS
+
+
+set XARGS [findfile $base_dir/../xargs $base_dir/../xargs [transform xargs]]
+if [ string match "/*" $XARGS ] {
+    verbose "XARGS is set to $XARGS" 1
+} else {
+    error "Failed to find a binary to test"
+}
+
+global XARGSFLAGS
+if ![info exists XARGSFLAGS] then {
+    set XARGSFLAGS ""
+}
+
+# Called by runtest.
+# Extract and print the version number of xargs.
+proc xargs_version {} {
+    global XARGS
+    global XARGSFLAGS
+
+    if {[which $XARGS] != 0} then {
+       set tmp [ eval exec $XARGS $XARGSFLAGS --version </dev/null | sed 1q ]
+       clone_output $tmp
+    } else {
+       warning "$XARGS, program does not exist"
+    }
+}
+
+# Run xargs and leave the output in $comp_output.
+# Called by individual test scripts.
+proc xargs_start { passfail options {infile ""} {errh ""} {command ""} } {
+    global verbose
+    global XARGS
+    global XARGSFLAGS
+    global comp_output
+
+    if {[which $XARGS] == 0} then {
+       error "$XARGS, program does not exist"
+       exit 1
+    }
+
+    set scriptname [uplevel {info script}]
+    set testbase [file rootname $scriptname]
+    set testname [file tail $testbase]
+
+    if {[string match "\[0-9\]*" $passfail]} then {
+       set execrc "$passfail"
+    } elseif {[string match "p*" $passfail]} then {
+       set execrc "0"
+    } elseif {[string match "f*" $passfail]} then {
+       set execrc "1"
+    } else {
+       fail "$testname, failure in testing framework: passfail=$passfail"
+       return
+    }
+
+    set outfile "$testbase.xo"
+    if {$infile != ""} then {
+       set infile "[file dirname [file dirname $testbase]]/inputs/$infile"
+    } else {
+       set infile /dev/null
+    }
+
+    if {[string match "s*" $errh]} then {
+       set errfile ""
+    } else {
+       set errfile "$testbase.xe"
+    }
+
+    catch "exec rm -f xargs.out xargs.err"
+
+    if {$command != ""} then {
+       set cmd "$command  < $infile > xargs.out 2> xargs.err"
+    } else {
+       set cmd "$XARGS $XARGSFLAGS $options < $infile > xargs.out 2> xargs.err"
+    }
+    send_log "$cmd\n"
+    if $verbose>1 then {
+       send_user "Spawning \"$cmd\"\n"
+    }
+
+    set status 0
+    if {[catch "exec $cmd" comp_output]} then {
+       if {[lindex $::errorCode 0] == "CHILDSTATUS"} then {
+           set status [lindex $::errorCode 2]
+       } else {
+           fail "$testname, failure in testing framework, $comp_output"
+           return
+       }
+    }
+
+    catch "exec cat xargs.err" comp_error
+
+    if {$execrc != $status} then {
+       if {$status == 0} then {
+           fail "$testname, unexpected success"
+       } elseif {$execrc == 0} then {
+           fail "$testname, unexpected failure, $comp_output, $comp_error"
+       } else {
+           fail "$testname, expected exit code $execrc, but got exit code $status"
+       }
+       return
+    }
+    # ok, at least exit code match.
+
+    if [file exists $outfile] then {
+       set cmp_cmd "cmp xargs.out $outfile"
+       send_log "$cmp_cmd\n"
+       catch "exec $cmp_cmd" cmpout
+       if {$cmpout != ""} then {
+           # stdout is wrong.
+           catch "exec diff -u xargs.out $outfile" diffs
+           send_log "stdout diffs: $diffs\n"
+           fail "$testname, wrong stdout output: $cmpout"
+           return
+       }
+    } elseif {[file size xargs.out] != 0} then {
+       fail "$testname, output on stdout should be empty"
+       return
+    }
+
+    # if stderr check is enabled,
+    if {$errfile != ""} then {
+       if {[file exists $errfile]} then {
+           set cmp_cmd "cmp xargs.err $errfile"
+           send_log "$cmp_cmd\n"
+           catch "exec $cmp_cmd" cmperr
+           if {$cmperr != ""} then {
+               # stderr is wrong
+               catch "exec diff -ua xargs.err $errfile" diffs
+               send_log "stderr diffs: $diffs\n"
+               fail "$testname, wrong stderr output: $cmperr"
+               return
+           }
+       } elseif {[file size xargs.err] != 0} then {
+           fail "$testname, output on stderr should be empty"
+           return
+       }
+    }
+
+    pass "$testname"
+}
+
+# Called by runtest.
+# Clean up (remove temporary files) before runtest exits.
+proc xargs_exit {} {
+    catch "exec rm -f xargs.out xargs.err"
+}
diff --git a/xargs/testsuite/inputs/16383-ys.xi b/xargs/testsuite/inputs/16383-ys.xi
new file mode 100644 (file)
index 0000000..9084d4c
--- /dev/null
@@ -0,0 +1 @@
+y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y 
\ No newline at end of file
diff --git a/xargs/testsuite/inputs/32767-ys.xi b/xargs/testsuite/inputs/32767-ys.xi
new file mode 100644 (file)
index 0000000..320ff33
--- /dev/null
@@ -0,0 +1 @@
+y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y 
\ No newline at end of file
diff --git a/xargs/testsuite/inputs/EOF.xi b/xargs/testsuite/inputs/EOF.xi
new file mode 100644 (file)
index 0000000..2a1c7a4
--- /dev/null
@@ -0,0 +1,5 @@
+one
+two
+ EOF   
+three
+four
diff --git a/xargs/testsuite/inputs/EOFb.xi b/xargs/testsuite/inputs/EOFb.xi
new file mode 100644 (file)
index 0000000..f302113
--- /dev/null
@@ -0,0 +1,5 @@
+one
+two
+ bEOF  
+three
+four
diff --git a/xargs/testsuite/inputs/EOFe.xi b/xargs/testsuite/inputs/EOFe.xi
new file mode 100644 (file)
index 0000000..f391070
--- /dev/null
@@ -0,0 +1,5 @@
+one
+two
+ EOFe  
+three
+four
diff --git a/xargs/testsuite/inputs/Pdata.xi b/xargs/testsuite/inputs/Pdata.xi
new file mode 100644 (file)
index 0000000..250f10d
--- /dev/null
@@ -0,0 +1,3 @@
+sleep 2 && echo one
+sleep 1 && echo two
+echo three
diff --git a/xargs/testsuite/inputs/blank.xi b/xargs/testsuite/inputs/blank.xi
new file mode 100644 (file)
index 0000000..b28b04f
--- /dev/null
@@ -0,0 +1,3 @@
+
+
+
diff --git a/xargs/testsuite/inputs/empty.xi b/xargs/testsuite/inputs/empty.xi
new file mode 100644 (file)
index 0000000..c7c1dc8
--- /dev/null
@@ -0,0 +1,3 @@
+foo '' bar
+baz ''
+'' fnord
diff --git a/xargs/testsuite/inputs/eof1.xi b/xargs/testsuite/inputs/eof1.xi
new file mode 100644 (file)
index 0000000..0a4baec
--- /dev/null
@@ -0,0 +1,5 @@
+firstline
+secondline
+  _
+thirdline
+fourthline
diff --git a/xargs/testsuite/inputs/eof_-0.xi b/xargs/testsuite/inputs/eof_-0.xi
new file mode 100644 (file)
index 0000000..6e6fa1a
Binary files /dev/null and b/xargs/testsuite/inputs/eof_-0.xi differ
diff --git a/xargs/testsuite/inputs/eof_.xi b/xargs/testsuite/inputs/eof_.xi
new file mode 100644 (file)
index 0000000..e6270a7
--- /dev/null
@@ -0,0 +1,5 @@
+one
+two
+_
+three
+four
\ No newline at end of file
diff --git a/xargs/testsuite/inputs/eofstr.xi b/xargs/testsuite/inputs/eofstr.xi
new file mode 100644 (file)
index 0000000..6e60cfd
--- /dev/null
@@ -0,0 +1,5 @@
+firstline
+secondline
+EOF
+thirdline
+fourthline
diff --git a/xargs/testsuite/inputs/ett.xi b/xargs/testsuite/inputs/ett.xi
new file mode 100644 (file)
index 0000000..ec54624
--- /dev/null
@@ -0,0 +1,3 @@
+exit 255
+echo 1
+echo 2
diff --git a/xargs/testsuite/inputs/files.xi b/xargs/testsuite/inputs/files.xi
new file mode 100644 (file)
index 0000000..5590252
--- /dev/null
@@ -0,0 +1,22 @@
+/src/gnu/autoconf-1.11
+/src/gnu/autoconf-1.11/README
+/src/gnu/autoconf-1.11/Makefile.in
+/src/gnu/autoconf-1.11/INSTALL
+/src/gnu/autoconf-1.11/NEWS
+/src/gnu/autoconf-1.11/COPYING
+/src/gnu/autoconf-1.11/ChangeLog
+/src/gnu/autoconf-1.11/autoconf.texi
+/src/gnu/autoconf-1.11/acconfig.h
+/src/gnu/autoconf-1.11/autoconf.sh
+/src/gnu/autoconf-1.11/acgeneral.m4
+/src/gnu/autoconf-1.11/acspecific.m4
+/src/gnu/autoconf-1.11/configure
+/src/gnu/autoconf-1.11/configure.in
+/src/gnu/autoconf-1.11/autoheader.sh
+/src/gnu/autoconf-1.11/mkinstalldirs
+/src/gnu/autoconf-1.11/install.sh
+/src/gnu/autoconf-1.11/autoconf.info
+/src/gnu/autoconf-1.11/standards.texi
+/src/gnu/autoconf-1.11/make-stds.texi
+/src/gnu/autoconf-1.11/standards.info
+/src/gnu/autoconf-1.11/texinfo.tex
diff --git a/xargs/testsuite/inputs/files0.xi b/xargs/testsuite/inputs/files0.xi
new file mode 100644 (file)
index 0000000..08ab0e2
Binary files /dev/null and b/xargs/testsuite/inputs/files0.xi differ
diff --git a/xargs/testsuite/inputs/foobar.xi b/xargs/testsuite/inputs/foobar.xi
new file mode 100644 (file)
index 0000000..e10988c
--- /dev/null
@@ -0,0 +1,3 @@
+foo bar
+baz 
+ugh
diff --git a/xargs/testsuite/inputs/formfeeds.xi b/xargs/testsuite/inputs/formfeeds.xi
new file mode 100644 (file)
index 0000000..ecb2715
--- /dev/null
@@ -0,0 +1,2 @@
+1\f2\f3\f4
+a\fb\fc\fd
diff --git a/xargs/testsuite/inputs/ftt.xi b/xargs/testsuite/inputs/ftt.xi
new file mode 100644 (file)
index 0000000..633a5d0
--- /dev/null
@@ -0,0 +1,3 @@
+false
+echo 1
+echo 2
diff --git a/xargs/testsuite/inputs/helloworld.xi b/xargs/testsuite/inputs/helloworld.xi
new file mode 100644 (file)
index 0000000..95d09f2
--- /dev/null
@@ -0,0 +1 @@
+hello world
\ No newline at end of file
diff --git a/xargs/testsuite/inputs/items-0.xi b/xargs/testsuite/inputs/items-0.xi
new file mode 100644 (file)
index 0000000..b217e3a
Binary files /dev/null and b/xargs/testsuite/inputs/items-0.xi differ
diff --git a/xargs/testsuite/inputs/items.xi b/xargs/testsuite/inputs/items.xi
new file mode 100644 (file)
index 0000000..163874e
--- /dev/null
@@ -0,0 +1,8 @@
\f\r    \v
+dumb
+ s  s 
+\ff\f\ff\f
+\rr\r\rr\r
+       t               t       
+\vv\v\vv\v
\f\r    \v
\ No newline at end of file
diff --git a/xargs/testsuite/inputs/ldata-0.xi b/xargs/testsuite/inputs/ldata-0.xi
new file mode 100644 (file)
index 0000000..eaee504
Binary files /dev/null and b/xargs/testsuite/inputs/ldata-0.xi differ
diff --git a/xargs/testsuite/inputs/ldata.xi b/xargs/testsuite/inputs/ldata.xi
new file mode 100644 (file)
index 0000000..b654880
--- /dev/null
@@ -0,0 +1,9 @@
+1 22 333 4444
+55555 666666
+7777777
+88888888
+999999999 1 22
+333 4444 55555
+666666 7777777
+88888888
+999999999
diff --git a/xargs/testsuite/inputs/ldatab-0.xi b/xargs/testsuite/inputs/ldatab-0.xi
new file mode 100644 (file)
index 0000000..dfd0de3
Binary files /dev/null and b/xargs/testsuite/inputs/ldatab-0.xi differ
diff --git a/xargs/testsuite/inputs/ldatab.xi b/xargs/testsuite/inputs/ldatab.xi
new file mode 100644 (file)
index 0000000..6b156d2
--- /dev/null
@@ -0,0 +1,10 @@
\f\r    \v
+1 22 333 4444 
+55555 666666
+7777777 
+88888888 
+999999999 1 22
+333 4444 55555
+666666 7777777
+88888888
+999999999 
diff --git a/xargs/testsuite/inputs/lines.xi b/xargs/testsuite/inputs/lines.xi
new file mode 100644 (file)
index 0000000..5d229f6
--- /dev/null
@@ -0,0 +1,6 @@
+first nonblank line
+second nonblank line
+
+third nonblank line
+
+fourth nonblank line
diff --git a/xargs/testsuite/inputs/noeof-0.xi b/xargs/testsuite/inputs/noeof-0.xi
new file mode 100644 (file)
index 0000000..cb2f8ff
Binary files /dev/null and b/xargs/testsuite/inputs/noeof-0.xi differ
diff --git a/xargs/testsuite/inputs/noeof.xi b/xargs/testsuite/inputs/noeof.xi
new file mode 100644 (file)
index 0000000..0bfc124
--- /dev/null
@@ -0,0 +1,2 @@
+first
+second
\ No newline at end of file
diff --git a/xargs/testsuite/inputs/quotes.xi b/xargs/testsuite/inputs/quotes.xi
new file mode 100644 (file)
index 0000000..031e84f
--- /dev/null
@@ -0,0 +1,5 @@
+   this is
+"quoted        stuff"  
+and \
+an embedded   newline
+with 'single   quotes' as well.
diff --git a/xargs/testsuite/inputs/space.xi b/xargs/testsuite/inputs/space.xi
new file mode 100644 (file)
index 0000000..2be76b2
--- /dev/null
@@ -0,0 +1,2 @@
+
\f\r    \v
diff --git a/xargs/testsuite/inputs/stairs-0.xi b/xargs/testsuite/inputs/stairs-0.xi
new file mode 100644 (file)
index 0000000..10d1ebd
Binary files /dev/null and b/xargs/testsuite/inputs/stairs-0.xi differ
diff --git a/xargs/testsuite/inputs/stairs.xi b/xargs/testsuite/inputs/stairs.xi
new file mode 100644 (file)
index 0000000..c2a8cce
--- /dev/null
@@ -0,0 +1,18 @@
+1
+22
+333
+4444
+55555
+666666
+7777777
+88888888
+999999999
+1
+22
+333
+4444
+55555
+666666
+7777777
+88888888
+999999999
diff --git a/xargs/testsuite/inputs/stairs2-0.xi b/xargs/testsuite/inputs/stairs2-0.xi
new file mode 100644 (file)
index 0000000..6445a5f
Binary files /dev/null and b/xargs/testsuite/inputs/stairs2-0.xi differ
diff --git a/xargs/testsuite/inputs/stairs2.xi b/xargs/testsuite/inputs/stairs2.xi
new file mode 100644 (file)
index 0000000..9f8a5fe
--- /dev/null
@@ -0,0 +1,18 @@
+999999999
+88888888
+7777777
+666666
+55555
+4444
+333
+22
+1
+999999999
+88888888
+7777777
+666666
+55555
+4444
+333
+22
+1
diff --git a/xargs/testsuite/inputs/stt.xi b/xargs/testsuite/inputs/stt.xi
new file mode 100644 (file)
index 0000000..22fb0d2
--- /dev/null
@@ -0,0 +1,3 @@
+kill $$
+echo 1
+echo 2
diff --git a/xargs/testsuite/inputs/sv-bug-20273.xi b/xargs/testsuite/inputs/sv-bug-20273.xi
new file mode 100644 (file)
index 0000000..01e79c3
--- /dev/null
@@ -0,0 +1,3 @@
+1
+2
+3
diff --git a/xargs/testsuite/inputs/unmatched.xi b/xargs/testsuite/inputs/unmatched.xi
new file mode 100644 (file)
index 0000000..bc9347a
--- /dev/null
@@ -0,0 +1,3 @@
+one
+"two
+three
\ No newline at end of file
diff --git a/xargs/testsuite/inputs/unmatched2.xi b/xargs/testsuite/inputs/unmatched2.xi
new file mode 100644 (file)
index 0000000..616a18e
--- /dev/null
@@ -0,0 +1,2 @@
+one
+"two
\ No newline at end of file
diff --git a/xargs/testsuite/inputs/verticaltabs.xi b/xargs/testsuite/inputs/verticaltabs.xi
new file mode 100644 (file)
index 0000000..06aad06
--- /dev/null
@@ -0,0 +1 @@
+q\vw\ve\vr 6\v7\v8\v9
diff --git a/xargs/testsuite/xargs.gnu/0n3.exp b/xargs/testsuite/xargs.gnu/0n3.exp
new file mode 100644 (file)
index 0000000..33e96a8
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-0 -n3} files0.xi
diff --git a/xargs/testsuite/xargs.gnu/0n3.xo b/xargs/testsuite/xargs.gnu/0n3.xo
new file mode 100644 (file)
index 0000000..e663e64
--- /dev/null
@@ -0,0 +1,8 @@
+/src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README /src/gnu/autoconf-1.11/Makefile.in
+/src/gnu/autoconf-1.11/INSTALL /src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING
+/src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi /src/gnu/autoconf-1.11/acconfig.h
+/src/gnu/autoconf-1.11/autoconf.sh /src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4
+/src/gnu/autoconf-1.11/configure /src/gnu/autoconf-1.11/configure.in /src/gnu/autoconf-1.11/autoheader.sh
+/src/gnu/autoconf-1.11/mkinstalldirs /src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info
+/src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi /src/gnu/autoconf-1.11/standards.info
+/src/gnu/autoconf-1.11/texinfo.tex
diff --git a/xargs/testsuite/xargs.gnu/E_-0.exp b/xargs/testsuite/xargs.gnu/E_-0.exp
new file mode 100644 (file)
index 0000000..3c8d7da
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-E_ -0} eof_-0.xi
diff --git a/xargs/testsuite/xargs.gnu/E_-0.xo b/xargs/testsuite/xargs.gnu/E_-0.xo
new file mode 100644 (file)
index 0000000..28a9314
--- /dev/null
@@ -0,0 +1 @@
+one two _ three four
diff --git a/xargs/testsuite/xargs.gnu/L2-0.exp b/xargs/testsuite/xargs.gnu/L2-0.exp
new file mode 100644 (file)
index 0000000..c7668ac
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-L2 -0} ldata-0.xi
diff --git a/xargs/testsuite/xargs.gnu/L2-0.xo b/xargs/testsuite/xargs.gnu/L2-0.xo
new file mode 100644 (file)
index 0000000..7234702
--- /dev/null
@@ -0,0 +1,5 @@
+1 22 333 4444 55555 666666
+7777777 88888888
+999999999 1 22 333 4444 55555
+666666 7777777 88888888
+999999999
diff --git a/xargs/testsuite/xargs.gnu/L2_2-0.exp b/xargs/testsuite/xargs.gnu/L2_2-0.exp
new file mode 100644 (file)
index 0000000..360c011
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-L2 -0} ldatab-0.xi
diff --git a/xargs/testsuite/xargs.gnu/L2_2-0.xo b/xargs/testsuite/xargs.gnu/L2_2-0.xo
new file mode 100644 (file)
index 0000000..24d97fe
--- /dev/null
@@ -0,0 +1,5 @@
\f\r    \v 1 22 333 4444 
+55555 666666 7777777 
+88888888  999999999 1 22
+333 4444 55555 666666 7777777
+88888888 999999999 
diff --git a/xargs/testsuite/xargs.gnu/L3-0.exp b/xargs/testsuite/xargs.gnu/L3-0.exp
new file mode 100644 (file)
index 0000000..8d857a4
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-L3 -0} ldata-0.xi
diff --git a/xargs/testsuite/xargs.gnu/L3-0.xo b/xargs/testsuite/xargs.gnu/L3-0.xo
new file mode 100644 (file)
index 0000000..2cb7fb3
--- /dev/null
@@ -0,0 +1,3 @@
+1 22 333 4444 55555 666666 7777777
+88888888 999999999 1 22 333 4444 55555
+666666 7777777 88888888 999999999
diff --git a/xargs/testsuite/xargs.gnu/P3-n1-IARG.exp b/xargs/testsuite/xargs.gnu/P3-n1-IARG.exp
new file mode 100644 (file)
index 0000000..7579589
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-P3 -n1 -IARG sh -c ARG} Pdata.xi
diff --git a/xargs/testsuite/xargs.gnu/P3-n1-IARG.xo b/xargs/testsuite/xargs.gnu/P3-n1-IARG.xo
new file mode 100644 (file)
index 0000000..f8eea9f
--- /dev/null
@@ -0,0 +1,3 @@
+three
+two
+one
diff --git a/xargs/testsuite/xargs.gnu/delim-o.exp b/xargs/testsuite/xargs.gnu/delim-o.exp
new file mode 100644 (file)
index 0000000..9c1643c
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-d o -n1} helloworld.xi
diff --git a/xargs/testsuite/xargs.gnu/delim-o.xo b/xargs/testsuite/xargs.gnu/delim-o.xo
new file mode 100644 (file)
index 0000000..6308eaf
--- /dev/null
@@ -0,0 +1,3 @@
+hell
+ w
+rld
diff --git a/xargs/testsuite/xargs.gnu/empty-r.exp b/xargs/testsuite/xargs.gnu/empty-r.exp
new file mode 100644 (file)
index 0000000..6290f72
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-r echo this plus that}
diff --git a/xargs/testsuite/xargs.gnu/empty_def-r.exp b/xargs/testsuite/xargs.gnu/empty_def-r.exp
new file mode 100644 (file)
index 0000000..858e327
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-r}
diff --git a/xargs/testsuite/xargs.gnu/idef-0.exp b/xargs/testsuite/xargs.gnu/idef-0.exp
new file mode 100644 (file)
index 0000000..8bd43ff
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-i -0 echo from \{\} to x{}y} items-0.xi
diff --git a/xargs/testsuite/xargs.gnu/idef-0.xo b/xargs/testsuite/xargs.gnu/idef-0.xo
new file mode 100644 (file)
index 0000000..d09d7ad
--- /dev/null
@@ -0,0 +1,20 @@
+from one to xoney
+from  \f\r       \v
+ to x \f\r       \v
+y
+from dumb to xdumby
+from  s  s  to x s  s y
+from \ff\f\ff\f to x\ff\f\ff\fy
+from \rr\r\rr\r to x\rr\r\rr\ry
+from   t               t        to x   t               t       y
+from \vv\v\vv\v to x\vv\v\vv\vy
+from  \f\r        to x \f\r        y
+from 
+n
+
+n
+ to x
+n
+
+n
+y
diff --git a/xargs/testsuite/xargs.gnu/idef-s26-0.exp b/xargs/testsuite/xargs.gnu/idef-s26-0.exp
new file mode 100644 (file)
index 0000000..8513059
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-i -s26 -0 echo from \{\} to x{}y} items-0.xi skip
diff --git a/xargs/testsuite/xargs.gnu/idef-s26-0.xo b/xargs/testsuite/xargs.gnu/idef-s26-0.xo
new file mode 100644 (file)
index 0000000..4659896
--- /dev/null
@@ -0,0 +1 @@
+from one to xoney
diff --git a/xargs/testsuite/xargs.gnu/l1-0.exp b/xargs/testsuite/xargs.gnu/l1-0.exp
new file mode 100644 (file)
index 0000000..87cf28c
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-l -0} ldata-0.xi
diff --git a/xargs/testsuite/xargs.gnu/l1-0.xo b/xargs/testsuite/xargs.gnu/l1-0.xo
new file mode 100644 (file)
index 0000000..b654880
--- /dev/null
@@ -0,0 +1,9 @@
+1 22 333 4444
+55555 666666
+7777777
+88888888
+999999999 1 22
+333 4444 55555
+666666 7777777
+88888888
+999999999
diff --git a/xargs/testsuite/xargs.gnu/l1_2-0.exp b/xargs/testsuite/xargs.gnu/l1_2-0.exp
new file mode 100644 (file)
index 0000000..506672d
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-l -0} ldatab-0.xi
diff --git a/xargs/testsuite/xargs.gnu/l1_2-0.xo b/xargs/testsuite/xargs.gnu/l1_2-0.xo
new file mode 100644 (file)
index 0000000..6b156d2
--- /dev/null
@@ -0,0 +1,10 @@
\f\r    \v
+1 22 333 4444 
+55555 666666
+7777777 
+88888888 
+999999999 1 22
+333 4444 55555
+666666 7777777
+88888888
+999999999 
diff --git a/xargs/testsuite/xargs.gnu/n1-0.exp b/xargs/testsuite/xargs.gnu/n1-0.exp
new file mode 100644 (file)
index 0000000..0c0564c
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n1 -0} stairs-0.xi
diff --git a/xargs/testsuite/xargs.gnu/n1-0.xo b/xargs/testsuite/xargs.gnu/n1-0.xo
new file mode 100644 (file)
index 0000000..c2a8cce
--- /dev/null
@@ -0,0 +1,18 @@
+1
+22
+333
+4444
+55555
+666666
+7777777
+88888888
+999999999
+1
+22
+333
+4444
+55555
+666666
+7777777
+88888888
+999999999
diff --git a/xargs/testsuite/xargs.gnu/n2-0.exp b/xargs/testsuite/xargs.gnu/n2-0.exp
new file mode 100644 (file)
index 0000000..8f8bf13
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n2 -0} stairs-0.xi
diff --git a/xargs/testsuite/xargs.gnu/n2-0.xo b/xargs/testsuite/xargs.gnu/n2-0.xo
new file mode 100644 (file)
index 0000000..33d8177
--- /dev/null
@@ -0,0 +1,9 @@
+1 22
+333 4444
+55555 666666
+7777777 88888888
+999999999 1
+22 333
+4444 55555
+666666 7777777
+88888888 999999999
diff --git a/xargs/testsuite/xargs.gnu/n2-s26-0.exp b/xargs/testsuite/xargs.gnu/n2-s26-0.exp
new file mode 100644 (file)
index 0000000..4494905
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n2 -s26 -0} stairs-0.xi
diff --git a/xargs/testsuite/xargs.gnu/n2-s26-0.xo b/xargs/testsuite/xargs.gnu/n2-s26-0.xo
new file mode 100644 (file)
index 0000000..a9e8dfa
--- /dev/null
@@ -0,0 +1,11 @@
+1 22
+333 4444
+55555 666666
+7777777
+88888888
+999999999 1
+22 333
+4444 55555
+666666 7777777
+88888888
+999999999
diff --git a/xargs/testsuite/xargs.gnu/n2-s26-x-0.exp b/xargs/testsuite/xargs.gnu/n2-s26-x-0.exp
new file mode 100644 (file)
index 0000000..f765bcd
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-n2 -s26 -x -0} stairs-0.xi skip
diff --git a/xargs/testsuite/xargs.gnu/n2-s26-x-0.xo b/xargs/testsuite/xargs.gnu/n2-s26-x-0.xo
new file mode 100644 (file)
index 0000000..7b6db82
--- /dev/null
@@ -0,0 +1,3 @@
+1 22
+333 4444
+55555 666666
diff --git a/xargs/testsuite/xargs.gnu/n3-0.exp b/xargs/testsuite/xargs.gnu/n3-0.exp
new file mode 100644 (file)
index 0000000..8fb187d
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n3 -0} stairs2-0.xi
diff --git a/xargs/testsuite/xargs.gnu/n3-0.xo b/xargs/testsuite/xargs.gnu/n3-0.xo
new file mode 100644 (file)
index 0000000..dfef033
--- /dev/null
@@ -0,0 +1,6 @@
+999999999 88888888 7777777
+666666 55555 4444
+333 22 1
+999999999 88888888 7777777
+666666 55555 4444
+333 22 1
diff --git a/xargs/testsuite/xargs.gnu/n3-s36-0.exp b/xargs/testsuite/xargs.gnu/n3-s36-0.exp
new file mode 100644 (file)
index 0000000..1d83e26
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n3 -s36 -0} stairs2-0.xi
diff --git a/xargs/testsuite/xargs.gnu/n3-s36-0.xo b/xargs/testsuite/xargs.gnu/n3-s36-0.xo
new file mode 100644 (file)
index 0000000..7484486
--- /dev/null
@@ -0,0 +1,7 @@
+999999999 88888888
+7777777 666666 55555
+4444 333 22
+1 999999999 88888888
+7777777 666666 55555
+4444 333 22
+1
diff --git a/xargs/testsuite/xargs.gnu/noeof-0.exp b/xargs/testsuite/xargs.gnu/noeof-0.exp
new file mode 100644 (file)
index 0000000..7e680da
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-0} noeof-0.xi
diff --git a/xargs/testsuite/xargs.gnu/noeof-0.xo b/xargs/testsuite/xargs.gnu/noeof-0.xo
new file mode 100644 (file)
index 0000000..45f9997
--- /dev/null
@@ -0,0 +1 @@
+first second
diff --git a/xargs/testsuite/xargs.gnu/nothing.exp b/xargs/testsuite/xargs.gnu/nothing.exp
new file mode 100644 (file)
index 0000000..20c03fd
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {echo this plus that} {}
diff --git a/xargs/testsuite/xargs.gnu/nothing.xo b/xargs/testsuite/xargs.gnu/nothing.xo
new file mode 100644 (file)
index 0000000..b8e9a02
--- /dev/null
@@ -0,0 +1 @@
+this plus that
diff --git a/xargs/testsuite/xargs.gnu/r.exp b/xargs/testsuite/xargs.gnu/r.exp
new file mode 100644 (file)
index 0000000..448055d
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-r echo this plus that} blank.xi
diff --git a/xargs/testsuite/xargs.gnu/r.xo b/xargs/testsuite/xargs.gnu/r.xo
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/xargs/testsuite/xargs.gnu/s118-0.exp b/xargs/testsuite/xargs.gnu/s118-0.exp
new file mode 100644 (file)
index 0000000..96634a4
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-0 -s118} stairs-0.xi
diff --git a/xargs/testsuite/xargs.gnu/s118-0.xo b/xargs/testsuite/xargs.gnu/s118-0.xo
new file mode 100644 (file)
index 0000000..06b617a
--- /dev/null
@@ -0,0 +1 @@
+1 22 333 4444 55555 666666 7777777 88888888 999999999 1 22 333 4444 55555 666666 7777777 88888888 999999999
diff --git a/xargs/testsuite/xargs.gnu/s19-0.exp b/xargs/testsuite/xargs.gnu/s19-0.exp
new file mode 100644 (file)
index 0000000..7f4f153
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-0 -s19} stairs-0.xi skip
diff --git a/xargs/testsuite/xargs.gnu/s19-0.xo b/xargs/testsuite/xargs.gnu/s19-0.xo
new file mode 100644 (file)
index 0000000..afb3bc3
--- /dev/null
@@ -0,0 +1,6 @@
+1 22 333
+4444
+55555
+666666
+7777777
+88888888
diff --git a/xargs/testsuite/xargs.gnu/s19_2-0.exp b/xargs/testsuite/xargs.gnu/s19_2-0.exp
new file mode 100644 (file)
index 0000000..78c460a
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-0 -s19} stairs2-0.xi skip
diff --git a/xargs/testsuite/xargs.gnu/s20-0.exp b/xargs/testsuite/xargs.gnu/s20-0.exp
new file mode 100644 (file)
index 0000000..899fd10
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-0 -s20} stairs-0.xi
diff --git a/xargs/testsuite/xargs.gnu/s20-0.xo b/xargs/testsuite/xargs.gnu/s20-0.xo
new file mode 100644 (file)
index 0000000..7f7032e
--- /dev/null
@@ -0,0 +1,14 @@
+1 22 333
+4444
+55555
+666666
+7777777
+88888888
+999999999
+1 22 333
+4444
+55555
+666666
+7777777
+88888888
+999999999
diff --git a/xargs/testsuite/xargs.gnu/s30-0.exp b/xargs/testsuite/xargs.gnu/s30-0.exp
new file mode 100644 (file)
index 0000000..5111b78
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-0 -s30} stairs-0.xi
diff --git a/xargs/testsuite/xargs.gnu/s30-0.xo b/xargs/testsuite/xargs.gnu/s30-0.xo
new file mode 100644 (file)
index 0000000..64ba7cb
--- /dev/null
@@ -0,0 +1,6 @@
+1 22 333 4444 55555
+666666 7777777
+88888888 999999999
+1 22 333 4444 55555
+666666 7777777
+88888888 999999999
diff --git a/xargs/testsuite/xargs.gnu/space-0.exp b/xargs/testsuite/xargs.gnu/space-0.exp
new file mode 100644 (file)
index 0000000..c44ff33
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-0 echo this plus that} space.xi
diff --git a/xargs/testsuite/xargs.gnu/space-0.xo b/xargs/testsuite/xargs.gnu/space-0.xo
new file mode 100644 (file)
index 0000000..7c4d562
--- /dev/null
@@ -0,0 +1,3 @@
+this plus that 
\f\r    \v
+
diff --git a/xargs/testsuite/xargs.gnu/space-r.exp b/xargs/testsuite/xargs.gnu/space-r.exp
new file mode 100644 (file)
index 0000000..9f66289
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-r echo this plus that} space.xi
diff --git a/xargs/testsuite/xargs.gnu/space-t-0.exp b/xargs/testsuite/xargs.gnu/space-t-0.exp
new file mode 100644 (file)
index 0000000..35e3860
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-t -0 echo this plus that} space.xi
diff --git a/xargs/testsuite/xargs.gnu/space-t-0.xe b/xargs/testsuite/xargs.gnu/space-t-0.xe
new file mode 100644 (file)
index 0000000..bfcf50b
--- /dev/null
@@ -0,0 +1,3 @@
+echo this plus that 
\f\r    \v
diff --git a/xargs/testsuite/xargs.gnu/space-t-0.xo b/xargs/testsuite/xargs.gnu/space-t-0.xo
new file mode 100644 (file)
index 0000000..7c4d562
--- /dev/null
@@ -0,0 +1,3 @@
+this plus that 
\f\r    \v
+
diff --git a/xargs/testsuite/xargs.posix/EEOF.exp b/xargs/testsuite/xargs.posix/EEOF.exp
new file mode 100644 (file)
index 0000000..4c976c4
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-E EOF} EOF.xi
diff --git a/xargs/testsuite/xargs.posix/EEOF.xo b/xargs/testsuite/xargs.posix/EEOF.xo
new file mode 100644 (file)
index 0000000..bd46cf2
--- /dev/null
@@ -0,0 +1 @@
+one two
diff --git a/xargs/testsuite/xargs.posix/EEOFb.exp b/xargs/testsuite/xargs.posix/EEOFb.exp
new file mode 100644 (file)
index 0000000..8c92c4d
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-E EOF} EOFb.xi
diff --git a/xargs/testsuite/xargs.posix/EEOFb.xo b/xargs/testsuite/xargs.posix/EEOFb.xo
new file mode 100644 (file)
index 0000000..1be0fd0
--- /dev/null
@@ -0,0 +1 @@
+one two bEOF three four
diff --git a/xargs/testsuite/xargs.posix/EEOFe.exp b/xargs/testsuite/xargs.posix/EEOFe.exp
new file mode 100644 (file)
index 0000000..33cb5bc
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-E EOF} EOFe.xi
diff --git a/xargs/testsuite/xargs.posix/EEOFe.xo b/xargs/testsuite/xargs.posix/EEOFe.xo
new file mode 100644 (file)
index 0000000..06fe033
--- /dev/null
@@ -0,0 +1 @@
+one two EOFe three four
diff --git a/xargs/testsuite/xargs.posix/E_-IARG.exp b/xargs/testsuite/xargs.posix/E_-IARG.exp
new file mode 100644 (file)
index 0000000..f56c565
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-E_ -IARG echo from ARG to xARGy} eof_.xi
diff --git a/xargs/testsuite/xargs.posix/E_-IARG.xo b/xargs/testsuite/xargs.posix/E_-IARG.xo
new file mode 100644 (file)
index 0000000..bb56ab0
--- /dev/null
@@ -0,0 +1,2 @@
+from one to xoney
+from two to xtwoy
diff --git a/xargs/testsuite/xargs.posix/E_.exp b/xargs/testsuite/xargs.posix/E_.exp
new file mode 100644 (file)
index 0000000..8edebbb
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-E_} eof_.xi
diff --git a/xargs/testsuite/xargs.posix/E_.xo b/xargs/testsuite/xargs.posix/E_.xo
new file mode 100644 (file)
index 0000000..bd46cf2
--- /dev/null
@@ -0,0 +1 @@
+one two
diff --git a/xargs/testsuite/xargs.posix/IARG-E_.exp b/xargs/testsuite/xargs.posix/IARG-E_.exp
new file mode 100644 (file)
index 0000000..3a01b2c
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-IARG echo from ARG to xARGy -E_} eof_.xi
diff --git a/xargs/testsuite/xargs.posix/IARG-E_.xo b/xargs/testsuite/xargs.posix/IARG-E_.xo
new file mode 100644 (file)
index 0000000..7452a65
--- /dev/null
@@ -0,0 +1,5 @@
+from one to xoney -E_
+from two to xtwoy -E_
+from _ to x_y -E_
+from three to xthreey -E_
+from four to xfoury -E_
diff --git a/xargs/testsuite/xargs.posix/IARG-s15.exp b/xargs/testsuite/xargs.posix/IARG-s15.exp
new file mode 100644 (file)
index 0000000..b237c0a
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-IARG -s15 echo ARG} stairs.xi
diff --git a/xargs/testsuite/xargs.posix/IARG-s15.xo b/xargs/testsuite/xargs.posix/IARG-s15.xo
new file mode 100644 (file)
index 0000000..c2a8cce
--- /dev/null
@@ -0,0 +1,18 @@
+1
+22
+333
+4444
+55555
+666666
+7777777
+88888888
+999999999
+1
+22
+333
+4444
+55555
+666666
+7777777
+88888888
+999999999
diff --git a/xargs/testsuite/xargs.posix/IARG.exp b/xargs/testsuite/xargs.posix/IARG.exp
new file mode 100644 (file)
index 0000000..4856221
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-IARG echo from ARG to xARGy} items.xi
diff --git a/xargs/testsuite/xargs.posix/IARG.xo b/xargs/testsuite/xargs.posix/IARG.xo
new file mode 100644 (file)
index 0000000..a78e799
--- /dev/null
@@ -0,0 +1,6 @@
+from dumb to xdumby
+from s  s  to xs  s y
+from f\f\ff\f to xf\f\ff\fy
+from r\r\rr\r to xr\r\rr\ry
+from t         t        to xt          t       y
+from v\v\vv\v to xv\v\vv\vy
diff --git a/xargs/testsuite/xargs.posix/L2-n2.exp b/xargs/testsuite/xargs.posix/L2-n2.exp
new file mode 100644 (file)
index 0000000..88a939f
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-L2 -n2} ldata.xi
diff --git a/xargs/testsuite/xargs.posix/L2-n2.xo b/xargs/testsuite/xargs.posix/L2-n2.xo
new file mode 100644 (file)
index 0000000..33d8177
--- /dev/null
@@ -0,0 +1,9 @@
+1 22
+333 4444
+55555 666666
+7777777 88888888
+999999999 1
+22 333
+4444 55555
+666666 7777777
+88888888 999999999
diff --git a/xargs/testsuite/xargs.posix/L2_2.exp b/xargs/testsuite/xargs.posix/L2_2.exp
new file mode 100644 (file)
index 0000000..7bc1153
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-L2} ldatab.xi
diff --git a/xargs/testsuite/xargs.posix/L2_2.xo b/xargs/testsuite/xargs.posix/L2_2.xo
new file mode 100644 (file)
index 0000000..f4e7123
--- /dev/null
@@ -0,0 +1,3 @@
+1 22 333 4444 55555 666666 7777777 88888888 999999999 1 22
+333 4444 55555 666666 7777777
+88888888 999999999
diff --git a/xargs/testsuite/xargs.posix/L3.exp b/xargs/testsuite/xargs.posix/L3.exp
new file mode 100644 (file)
index 0000000..b4d8762
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-L3} ldata.xi
diff --git a/xargs/testsuite/xargs.posix/L3.xo b/xargs/testsuite/xargs.posix/L3.xo
new file mode 100644 (file)
index 0000000..2cb7fb3
--- /dev/null
@@ -0,0 +1,3 @@
+1 22 333 4444 55555 666666 7777777
+88888888 999999999 1 22 333 4444 55555
+666666 7777777 88888888 999999999
diff --git a/xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp b/xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp
new file mode 100644 (file)
index 0000000..786ceb1
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# See message from Jim Meyering. <87hdaam57n.fsf_-_@rho.meyering.net>
+#
+# This is because Linux's execve implementation requires that the sum of
+# the sizes of all argument string pointers not exceed 128K (the actual
+# limit is ARG_MAX - sizeof (void*)).  The difference between 32- and
+# 64-bit systems is because sizeof (void*) differs (4 vs. 8).
+#
+# Tue Nov 22 19:36:49 2005: Use 'true' rather than 'echo', otherwise the 
+# differences in the value of ARG_MAX on various platforms will cause the 
+# test to fail.
+xargs_start p { true } 32767-ys.xi
diff --git a/xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp b/xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp
new file mode 100644 (file)
index 0000000..8a7be59
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# See message from Jim Meyering. <87hdaam57n.fsf_-_@rho.meyering.net>
+#
+# This is because Linux's execve implementation requires that the sum of
+# the sizes of all argument string pointers not exceed 128K (the actual
+# limit is ARG_MAX - sizeof (void*)).  The difference between 32- and
+# 64-bit systems is because sizeof (void*) differs (4 vs. 8).
+#
+# Tue Nov 22 19:36:49 2005: Use 'true' rather than 'echo', otherwise the 
+# differences in the value of ARG_MAX on various platforms will cause the 
+# test to fail.
+xargs_start p { true } 16383-ys.xi
diff --git a/xargs/testsuite/xargs.posix/childfail.exp b/xargs/testsuite/xargs.posix/childfail.exp
new file mode 100644 (file)
index 0000000..d5cdacb
--- /dev/null
@@ -0,0 +1 @@
+xargs_start 123 { false } files.xi
diff --git a/xargs/testsuite/xargs.posix/empty.exp b/xargs/testsuite/xargs.posix/empty.exp
new file mode 100644 (file)
index 0000000..cfab826
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {echo this plus that}
diff --git a/xargs/testsuite/xargs.posix/empty.xo b/xargs/testsuite/xargs.posix/empty.xo
new file mode 100644 (file)
index 0000000..b8e9a02
--- /dev/null
@@ -0,0 +1 @@
+this plus that
diff --git a/xargs/testsuite/xargs.posix/empty_def.exp b/xargs/testsuite/xargs.posix/empty_def.exp
new file mode 100644 (file)
index 0000000..765c4bb
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {}
diff --git a/xargs/testsuite/xargs.posix/empty_def.xo b/xargs/testsuite/xargs.posix/empty_def.xo
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/xargs/testsuite/xargs.posix/hithere.exp b/xargs/testsuite/xargs.posix/hithere.exp
new file mode 100644 (file)
index 0000000..0256d4b
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-s470 echo hi there} files.xi
diff --git a/xargs/testsuite/xargs.posix/hithere.xo b/xargs/testsuite/xargs.posix/hithere.xo
new file mode 100644 (file)
index 0000000..0c6845b
--- /dev/null
@@ -0,0 +1,2 @@
+hi there /src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README /src/gnu/autoconf-1.11/Makefile.in /src/gnu/autoconf-1.11/INSTALL /src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING /src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi /src/gnu/autoconf-1.11/acconfig.h /src/gnu/autoconf-1.11/autoconf.sh /src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4 /src/gnu/autoconf-1.11/configure
+hi there /src/gnu/autoconf-1.11/configure.in /src/gnu/autoconf-1.11/autoheader.sh /src/gnu/autoconf-1.11/mkinstalldirs /src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info /src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi /src/gnu/autoconf-1.11/standards.info /src/gnu/autoconf-1.11/texinfo.tex
diff --git a/xargs/testsuite/xargs.posix/n1.exp b/xargs/testsuite/xargs.posix/n1.exp
new file mode 100644 (file)
index 0000000..40ddc9e
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n1} stairs.xi
diff --git a/xargs/testsuite/xargs.posix/n1.xo b/xargs/testsuite/xargs.posix/n1.xo
new file mode 100644 (file)
index 0000000..c2a8cce
--- /dev/null
@@ -0,0 +1,18 @@
+1
+22
+333
+4444
+55555
+666666
+7777777
+88888888
+999999999
+1
+22
+333
+4444
+55555
+666666
+7777777
+88888888
+999999999
diff --git a/xargs/testsuite/xargs.posix/n2-s26-x.exp b/xargs/testsuite/xargs.posix/n2-s26-x.exp
new file mode 100644 (file)
index 0000000..fd59c05
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-n2 -s26 -x} stairs.xi skip
diff --git a/xargs/testsuite/xargs.posix/n2-s26-x.xo b/xargs/testsuite/xargs.posix/n2-s26-x.xo
new file mode 100644 (file)
index 0000000..7b6db82
--- /dev/null
@@ -0,0 +1,3 @@
+1 22
+333 4444
+55555 666666
diff --git a/xargs/testsuite/xargs.posix/n2-s26.exp b/xargs/testsuite/xargs.posix/n2-s26.exp
new file mode 100644 (file)
index 0000000..ba76660
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n2 -s26} stairs.xi
diff --git a/xargs/testsuite/xargs.posix/n2-s26.xo b/xargs/testsuite/xargs.posix/n2-s26.xo
new file mode 100644 (file)
index 0000000..a9e8dfa
--- /dev/null
@@ -0,0 +1,11 @@
+1 22
+333 4444
+55555 666666
+7777777
+88888888
+999999999 1
+22 333
+4444 55555
+666666 7777777
+88888888
+999999999
diff --git a/xargs/testsuite/xargs.posix/n2.exp b/xargs/testsuite/xargs.posix/n2.exp
new file mode 100644 (file)
index 0000000..6bcbad2
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n2} stairs.xi
diff --git a/xargs/testsuite/xargs.posix/n2.xo b/xargs/testsuite/xargs.posix/n2.xo
new file mode 100644 (file)
index 0000000..33d8177
--- /dev/null
@@ -0,0 +1,9 @@
+1 22
+333 4444
+55555 666666
+7777777 88888888
+999999999 1
+22 333
+4444 55555
+666666 7777777
+88888888 999999999
diff --git a/xargs/testsuite/xargs.posix/n3-s36.exp b/xargs/testsuite/xargs.posix/n3-s36.exp
new file mode 100644 (file)
index 0000000..00c80e9
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n3 -s36} stairs2.xi
diff --git a/xargs/testsuite/xargs.posix/n3-s36.xo b/xargs/testsuite/xargs.posix/n3-s36.xo
new file mode 100644 (file)
index 0000000..7484486
--- /dev/null
@@ -0,0 +1,7 @@
+999999999 88888888
+7777777 666666 55555
+4444 333 22
+1 999999999 88888888
+7777777 666666 55555
+4444 333 22
+1
diff --git a/xargs/testsuite/xargs.posix/n3.exp b/xargs/testsuite/xargs.posix/n3.exp
new file mode 100644 (file)
index 0000000..472b614
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n3} files.xi
diff --git a/xargs/testsuite/xargs.posix/n3.xo b/xargs/testsuite/xargs.posix/n3.xo
new file mode 100644 (file)
index 0000000..e663e64
--- /dev/null
@@ -0,0 +1,8 @@
+/src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README /src/gnu/autoconf-1.11/Makefile.in
+/src/gnu/autoconf-1.11/INSTALL /src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING
+/src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi /src/gnu/autoconf-1.11/acconfig.h
+/src/gnu/autoconf-1.11/autoconf.sh /src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4
+/src/gnu/autoconf-1.11/configure /src/gnu/autoconf-1.11/configure.in /src/gnu/autoconf-1.11/autoheader.sh
+/src/gnu/autoconf-1.11/mkinstalldirs /src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info
+/src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi /src/gnu/autoconf-1.11/standards.info
+/src/gnu/autoconf-1.11/texinfo.tex
diff --git a/xargs/testsuite/xargs.posix/noeof.exp b/xargs/testsuite/xargs.posix/noeof.exp
new file mode 100644 (file)
index 0000000..ad49437
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {} noeof.xi
diff --git a/xargs/testsuite/xargs.posix/noeof.xo b/xargs/testsuite/xargs.posix/noeof.xo
new file mode 100644 (file)
index 0000000..45f9997
--- /dev/null
@@ -0,0 +1 @@
+first second
diff --git a/xargs/testsuite/xargs.posix/quotes.exp b/xargs/testsuite/xargs.posix/quotes.exp
new file mode 100644 (file)
index 0000000..574e1ec
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {} quotes.xi
diff --git a/xargs/testsuite/xargs.posix/quotes.xo b/xargs/testsuite/xargs.posix/quotes.xo
new file mode 100644 (file)
index 0000000..9b6477f
--- /dev/null
@@ -0,0 +1,2 @@
+this is quoted         stuff and 
+an embedded newline with single        quotes as well.
diff --git a/xargs/testsuite/xargs.posix/rc-123.exp b/xargs/testsuite/xargs.posix/rc-123.exp
new file mode 100644 (file)
index 0000000..217de0f
--- /dev/null
@@ -0,0 +1 @@
+xargs_start 123 {-n1 -IARG sh -c ARG} ftt.xi
diff --git a/xargs/testsuite/xargs.posix/rc-123.xo b/xargs/testsuite/xargs.posix/rc-123.xo
new file mode 100644 (file)
index 0000000..1191247
--- /dev/null
@@ -0,0 +1,2 @@
+1
+2
diff --git a/xargs/testsuite/xargs.posix/rc-124.exp b/xargs/testsuite/xargs.posix/rc-124.exp
new file mode 100644 (file)
index 0000000..4fe3aba
--- /dev/null
@@ -0,0 +1 @@
+xargs_start 124 {-n1 -IARG sh -c ARG} ett.xi skip
diff --git a/xargs/testsuite/xargs.posix/rc-125.exp b/xargs/testsuite/xargs.posix/rc-125.exp
new file mode 100644 (file)
index 0000000..6624880
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# The technique of using "kill $$" is unreliable.  For example,
+# on MacOS X, the child just exits with a nonzero status.
+# This works better but is harder to use in a DejaGnu test:
+#   yes | xargs -I{} echo | true
+# Part of the problem here of course is that the exit status of the 
+# pipeline is the exit status of its last compinent.
+#
+# This problem is recorded as Savannah bug# 19969.
+# 
+xargs_start 125 {-n1 -IARG sh -c ARG} stt.xi skip
diff --git a/xargs/testsuite/xargs.posix/rc-126.exp b/xargs/testsuite/xargs.posix/rc-126.exp
new file mode 100644 (file)
index 0000000..17cb9f4
--- /dev/null
@@ -0,0 +1 @@
+xargs_start 126 {/} {} skip
diff --git a/xargs/testsuite/xargs.posix/rc-127.exp b/xargs/testsuite/xargs.posix/rc-127.exp
new file mode 100644 (file)
index 0000000..8e4278a
--- /dev/null
@@ -0,0 +1 @@
+xargs_start 127 {./missing} {} skip
diff --git a/xargs/testsuite/xargs.posix/s118.exp b/xargs/testsuite/xargs.posix/s118.exp
new file mode 100644 (file)
index 0000000..1f0fc9f
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-s118} stairs.xi
diff --git a/xargs/testsuite/xargs.posix/s118.xo b/xargs/testsuite/xargs.posix/s118.xo
new file mode 100644 (file)
index 0000000..06b617a
--- /dev/null
@@ -0,0 +1 @@
+1 22 333 4444 55555 666666 7777777 88888888 999999999 1 22 333 4444 55555 666666 7777777 88888888 999999999
diff --git a/xargs/testsuite/xargs.posix/s19.exp b/xargs/testsuite/xargs.posix/s19.exp
new file mode 100644 (file)
index 0000000..86f9337
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-s19} stairs.xi skip
diff --git a/xargs/testsuite/xargs.posix/s19.xo b/xargs/testsuite/xargs.posix/s19.xo
new file mode 100644 (file)
index 0000000..afb3bc3
--- /dev/null
@@ -0,0 +1,6 @@
+1 22 333
+4444
+55555
+666666
+7777777
+88888888
diff --git a/xargs/testsuite/xargs.posix/s19_2.exp b/xargs/testsuite/xargs.posix/s19_2.exp
new file mode 100644 (file)
index 0000000..be27aef
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-s19} stairs2.xi skip
diff --git a/xargs/testsuite/xargs.posix/s20.exp b/xargs/testsuite/xargs.posix/s20.exp
new file mode 100644 (file)
index 0000000..f87d441
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-s20} stairs.xi
diff --git a/xargs/testsuite/xargs.posix/s20.xo b/xargs/testsuite/xargs.posix/s20.xo
new file mode 100644 (file)
index 0000000..7f7032e
--- /dev/null
@@ -0,0 +1,14 @@
+1 22 333
+4444
+55555
+666666
+7777777
+88888888
+999999999
+1 22 333
+4444
+55555
+666666
+7777777
+88888888
+999999999
diff --git a/xargs/testsuite/xargs.posix/s30.exp b/xargs/testsuite/xargs.posix/s30.exp
new file mode 100644 (file)
index 0000000..9faa71b
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-s30} stairs.xi
diff --git a/xargs/testsuite/xargs.posix/s30.xo b/xargs/testsuite/xargs.posix/s30.xo
new file mode 100644 (file)
index 0000000..64ba7cb
--- /dev/null
@@ -0,0 +1,6 @@
+1 22 333 4444 55555
+666666 7777777
+88888888 999999999
+1 22 333 4444 55555
+666666 7777777
+88888888 999999999
diff --git a/xargs/testsuite/xargs.posix/s47.exp b/xargs/testsuite/xargs.posix/s47.exp
new file mode 100644 (file)
index 0000000..8f79b2a
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-s47} files.xi skip
diff --git a/xargs/testsuite/xargs.posix/s47.xo b/xargs/testsuite/xargs.posix/s47.xo
new file mode 100644 (file)
index 0000000..26eed8f
--- /dev/null
@@ -0,0 +1,18 @@
+/src/gnu/autoconf-1.11
+/src/gnu/autoconf-1.11/README
+/src/gnu/autoconf-1.11/Makefile.in
+/src/gnu/autoconf-1.11/INSTALL
+/src/gnu/autoconf-1.11/NEWS
+/src/gnu/autoconf-1.11/COPYING
+/src/gnu/autoconf-1.11/ChangeLog
+/src/gnu/autoconf-1.11/autoconf.texi
+/src/gnu/autoconf-1.11/acconfig.h
+/src/gnu/autoconf-1.11/autoconf.sh
+/src/gnu/autoconf-1.11/acgeneral.m4
+/src/gnu/autoconf-1.11/acspecific.m4
+/src/gnu/autoconf-1.11/configure
+/src/gnu/autoconf-1.11/configure.in
+/src/gnu/autoconf-1.11/autoheader.sh
+/src/gnu/autoconf-1.11/mkinstalldirs
+/src/gnu/autoconf-1.11/install.sh
+/src/gnu/autoconf-1.11/autoconf.info
diff --git a/xargs/testsuite/xargs.posix/s470.exp b/xargs/testsuite/xargs.posix/s470.exp
new file mode 100644 (file)
index 0000000..5828ce6
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-s470} files.xi skip
diff --git a/xargs/testsuite/xargs.posix/s470.xo b/xargs/testsuite/xargs.posix/s470.xo
new file mode 100644 (file)
index 0000000..8107725
--- /dev/null
@@ -0,0 +1,2 @@
+/src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README /src/gnu/autoconf-1.11/Makefile.in /src/gnu/autoconf-1.11/INSTALL /src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING /src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi /src/gnu/autoconf-1.11/acconfig.h /src/gnu/autoconf-1.11/autoconf.sh /src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4 /src/gnu/autoconf-1.11/configure /src/gnu/autoconf-1.11/configure.in
+/src/gnu/autoconf-1.11/autoheader.sh /src/gnu/autoconf-1.11/mkinstalldirs /src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info /src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi /src/gnu/autoconf-1.11/standards.info /src/gnu/autoconf-1.11/texinfo.tex
diff --git a/xargs/testsuite/xargs.posix/s48.exp b/xargs/testsuite/xargs.posix/s48.exp
new file mode 100644 (file)
index 0000000..506e77b
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-s48} files.xi
diff --git a/xargs/testsuite/xargs.posix/s48.xo b/xargs/testsuite/xargs.posix/s48.xo
new file mode 100644 (file)
index 0000000..5590252
--- /dev/null
@@ -0,0 +1,22 @@
+/src/gnu/autoconf-1.11
+/src/gnu/autoconf-1.11/README
+/src/gnu/autoconf-1.11/Makefile.in
+/src/gnu/autoconf-1.11/INSTALL
+/src/gnu/autoconf-1.11/NEWS
+/src/gnu/autoconf-1.11/COPYING
+/src/gnu/autoconf-1.11/ChangeLog
+/src/gnu/autoconf-1.11/autoconf.texi
+/src/gnu/autoconf-1.11/acconfig.h
+/src/gnu/autoconf-1.11/autoconf.sh
+/src/gnu/autoconf-1.11/acgeneral.m4
+/src/gnu/autoconf-1.11/acspecific.m4
+/src/gnu/autoconf-1.11/configure
+/src/gnu/autoconf-1.11/configure.in
+/src/gnu/autoconf-1.11/autoheader.sh
+/src/gnu/autoconf-1.11/mkinstalldirs
+/src/gnu/autoconf-1.11/install.sh
+/src/gnu/autoconf-1.11/autoconf.info
+/src/gnu/autoconf-1.11/standards.texi
+/src/gnu/autoconf-1.11/make-stds.texi
+/src/gnu/autoconf-1.11/standards.info
+/src/gnu/autoconf-1.11/texinfo.tex
diff --git a/xargs/testsuite/xargs.posix/s6.exp b/xargs/testsuite/xargs.posix/s6.exp
new file mode 100644 (file)
index 0000000..a5a714f
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-s6} files.xi skip
diff --git a/xargs/testsuite/xargs.posix/savannah-11865.exp b/xargs/testsuite/xargs.posix/savannah-11865.exp
new file mode 100644 (file)
index 0000000..fa7d41a
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-iARG -s86 echo ARG is xARGx} files.xi
diff --git a/xargs/testsuite/xargs.posix/savannah-11865.xo b/xargs/testsuite/xargs.posix/savannah-11865.xo
new file mode 100644 (file)
index 0000000..f28510b
--- /dev/null
@@ -0,0 +1,22 @@
+/src/gnu/autoconf-1.11 is x/src/gnu/autoconf-1.11x
+/src/gnu/autoconf-1.11/README is x/src/gnu/autoconf-1.11/READMEx
+/src/gnu/autoconf-1.11/Makefile.in is x/src/gnu/autoconf-1.11/Makefile.inx
+/src/gnu/autoconf-1.11/INSTALL is x/src/gnu/autoconf-1.11/INSTALLx
+/src/gnu/autoconf-1.11/NEWS is x/src/gnu/autoconf-1.11/NEWSx
+/src/gnu/autoconf-1.11/COPYING is x/src/gnu/autoconf-1.11/COPYINGx
+/src/gnu/autoconf-1.11/ChangeLog is x/src/gnu/autoconf-1.11/ChangeLogx
+/src/gnu/autoconf-1.11/autoconf.texi is x/src/gnu/autoconf-1.11/autoconf.texix
+/src/gnu/autoconf-1.11/acconfig.h is x/src/gnu/autoconf-1.11/acconfig.hx
+/src/gnu/autoconf-1.11/autoconf.sh is x/src/gnu/autoconf-1.11/autoconf.shx
+/src/gnu/autoconf-1.11/acgeneral.m4 is x/src/gnu/autoconf-1.11/acgeneral.m4x
+/src/gnu/autoconf-1.11/acspecific.m4 is x/src/gnu/autoconf-1.11/acspecific.m4x
+/src/gnu/autoconf-1.11/configure is x/src/gnu/autoconf-1.11/configurex
+/src/gnu/autoconf-1.11/configure.in is x/src/gnu/autoconf-1.11/configure.inx
+/src/gnu/autoconf-1.11/autoheader.sh is x/src/gnu/autoconf-1.11/autoheader.shx
+/src/gnu/autoconf-1.11/mkinstalldirs is x/src/gnu/autoconf-1.11/mkinstalldirsx
+/src/gnu/autoconf-1.11/install.sh is x/src/gnu/autoconf-1.11/install.shx
+/src/gnu/autoconf-1.11/autoconf.info is x/src/gnu/autoconf-1.11/autoconf.infox
+/src/gnu/autoconf-1.11/standards.texi is x/src/gnu/autoconf-1.11/standards.texix
+/src/gnu/autoconf-1.11/make-stds.texi is x/src/gnu/autoconf-1.11/make-stds.texix
+/src/gnu/autoconf-1.11/standards.info is x/src/gnu/autoconf-1.11/standards.infox
+/src/gnu/autoconf-1.11/texinfo.tex is x/src/gnu/autoconf-1.11/texinfo.texx
diff --git a/xargs/testsuite/xargs.posix/space-I.exp b/xargs/testsuite/xargs.posix/space-I.exp
new file mode 100644 (file)
index 0000000..69eb0b7
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-IARG echo from ARG to xARGy} space.xi
diff --git a/xargs/testsuite/xargs.posix/space.exp b/xargs/testsuite/xargs.posix/space.exp
new file mode 100644 (file)
index 0000000..3ba833b
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {echo this plus that} space.xi
diff --git a/xargs/testsuite/xargs.posix/space.xo b/xargs/testsuite/xargs.posix/space.xo
new file mode 100644 (file)
index 0000000..b8e9a02
--- /dev/null
@@ -0,0 +1 @@
+this plus that
diff --git a/xargs/testsuite/xargs.posix/sv-bug-18714.exp b/xargs/testsuite/xargs.posix/sv-bug-18714.exp
new file mode 100644 (file)
index 0000000..b40e105
--- /dev/null
@@ -0,0 +1,10 @@
+# Form feed is not a separator.
+#
+# POSIX specifies that <blank> is the serarator 
+# in the POSIX locale, and <blank> is defined
+# as <SPC> or <TAB>.    
+#
+# On the other hand, <space> includes Form Feed and 
+# Vertical Tab.  By default, those should not be
+# separators.
+xargs_start p {printf "\[%s\]\n"} formfeeds.xi
diff --git a/xargs/testsuite/xargs.posix/sv-bug-18714.xo b/xargs/testsuite/xargs.posix/sv-bug-18714.xo
new file mode 100644 (file)
index 0000000..5ec9a95
--- /dev/null
@@ -0,0 +1,2 @@
+[1\f2\f3\f4]
+[a\fb\fc\fd]
diff --git a/xargs/testsuite/xargs.posix/sv-bug-18714b.exp b/xargs/testsuite/xargs.posix/sv-bug-18714b.exp
new file mode 100644 (file)
index 0000000..f110daf
--- /dev/null
@@ -0,0 +1,10 @@
+# Vertical tab is not a separator.
+#
+# POSIX specifies that <blank> is the serarator 
+# in the POSIX locale, and <blank> is defined
+# as <SPC> or <TAB>.    
+#
+# On the other hand, <space> includes Form Feed and 
+# Vertical Tab.  By default, those should not be
+# separators.
+xargs_start p {printf "\[%s\]\n"} verticaltabs.xi
diff --git a/xargs/testsuite/xargs.posix/sv-bug-18714b.xo b/xargs/testsuite/xargs.posix/sv-bug-18714b.xo
new file mode 100644 (file)
index 0000000..ec33986
--- /dev/null
@@ -0,0 +1,2 @@
+[q\vw\ve\vr]
+[6\v7\v8\v9]
diff --git a/xargs/testsuite/xargs.posix/sv-bug-20273.exp b/xargs/testsuite/xargs.posix/sv-bug-20273.exp
new file mode 100644 (file)
index 0000000..6d069e2
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p "" sv-bug-20273.xi "" "sh -c \{$XARGS $XARGSFLAGS -E2; cat\}"
diff --git a/xargs/testsuite/xargs.posix/sv-bug-20273.xo b/xargs/testsuite/xargs.posix/sv-bug-20273.xo
new file mode 100644 (file)
index 0000000..2b2f2e1
--- /dev/null
@@ -0,0 +1,2 @@
+1
+3
diff --git a/xargs/testsuite/xargs.posix/uc_L2.exp b/xargs/testsuite/xargs.posix/uc_L2.exp
new file mode 100644 (file)
index 0000000..8ad3dd7
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-L2} ldata.xi
diff --git a/xargs/testsuite/xargs.posix/uc_L2.xo b/xargs/testsuite/xargs.posix/uc_L2.xo
new file mode 100644 (file)
index 0000000..7234702
--- /dev/null
@@ -0,0 +1,5 @@
+1 22 333 4444 55555 666666
+7777777 88888888
+999999999 1 22 333 4444 55555
+666666 7777777 88888888
+999999999
diff --git a/xargs/testsuite/xargs.posix/unmatched-n2-x.exp b/xargs/testsuite/xargs.posix/unmatched-n2-x.exp
new file mode 100644 (file)
index 0000000..720b48f
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-n2 -x} unmatched.xi skip
diff --git a/xargs/testsuite/xargs.posix/unmatched.exp b/xargs/testsuite/xargs.posix/unmatched.exp
new file mode 100644 (file)
index 0000000..a98c920
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {} unmatched.xi skip
diff --git a/xargs/testsuite/xargs.posix/unmatched.xo b/xargs/testsuite/xargs.posix/unmatched.xo
new file mode 100644 (file)
index 0000000..5626abf
--- /dev/null
@@ -0,0 +1 @@
+one
diff --git a/xargs/testsuite/xargs.posix/unmatched2.exp b/xargs/testsuite/xargs.posix/unmatched2.exp
new file mode 100644 (file)
index 0000000..12b17f3
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {} unmatched2.xi skip
diff --git a/xargs/testsuite/xargs.posix/unmatched2.xo b/xargs/testsuite/xargs.posix/unmatched2.xo
new file mode 100644 (file)
index 0000000..5626abf
--- /dev/null
@@ -0,0 +1 @@
+one
diff --git a/xargs/testsuite/xargs.sysv/e.exp b/xargs/testsuite/xargs.sysv/e.exp
new file mode 100644 (file)
index 0000000..86c3af1
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-e} eof_.xi
diff --git a/xargs/testsuite/xargs.sysv/e.xo b/xargs/testsuite/xargs.sysv/e.xo
new file mode 100644 (file)
index 0000000..28a9314
--- /dev/null
@@ -0,0 +1 @@
+one two _ three four
diff --git a/xargs/testsuite/xargs.sysv/eEOF.exp b/xargs/testsuite/xargs.sysv/eEOF.exp
new file mode 100644 (file)
index 0000000..8ac68aa
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-eEOF} eofstr.xi
diff --git a/xargs/testsuite/xargs.sysv/eEOF.xo b/xargs/testsuite/xargs.sysv/eEOF.xo
new file mode 100644 (file)
index 0000000..7f4c1cd
--- /dev/null
@@ -0,0 +1 @@
+firstline secondline
diff --git a/xargs/testsuite/xargs.sysv/empty-t.exp b/xargs/testsuite/xargs.sysv/empty-t.exp
new file mode 100644 (file)
index 0000000..8047015
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-t echo this plus that}
diff --git a/xargs/testsuite/xargs.sysv/empty-t.xe b/xargs/testsuite/xargs.sysv/empty-t.xe
new file mode 100644 (file)
index 0000000..ec9c43d
--- /dev/null
@@ -0,0 +1 @@
+echo this plus that 
diff --git a/xargs/testsuite/xargs.sysv/empty-t.xo b/xargs/testsuite/xargs.sysv/empty-t.xo
new file mode 100644 (file)
index 0000000..b8e9a02
--- /dev/null
@@ -0,0 +1 @@
+this plus that
diff --git a/xargs/testsuite/xargs.sysv/empty_def-t.exp b/xargs/testsuite/xargs.sysv/empty_def-t.exp
new file mode 100644 (file)
index 0000000..2f1e9b9
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-t}
diff --git a/xargs/testsuite/xargs.sysv/empty_def-t.xe b/xargs/testsuite/xargs.sysv/empty_def-t.xe
new file mode 100644 (file)
index 0000000..da4ae85
--- /dev/null
@@ -0,0 +1 @@
+/bin/echo 
diff --git a/xargs/testsuite/xargs.sysv/empty_def-t.xo b/xargs/testsuite/xargs.sysv/empty_def-t.xo
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/xargs/testsuite/xargs.sysv/eof1.exp b/xargs/testsuite/xargs.sysv/eof1.exp
new file mode 100644 (file)
index 0000000..ca178e8
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-E_} eof1.xi
diff --git a/xargs/testsuite/xargs.sysv/eof1.xo b/xargs/testsuite/xargs.sysv/eof1.xo
new file mode 100644 (file)
index 0000000..7f4c1cd
--- /dev/null
@@ -0,0 +1 @@
+firstline secondline
diff --git a/xargs/testsuite/xargs.sysv/iARG.exp b/xargs/testsuite/xargs.sysv/iARG.exp
new file mode 100644 (file)
index 0000000..2e2ec75
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-iARG echo ARG is xARGx} files.xi
diff --git a/xargs/testsuite/xargs.sysv/iARG.xo b/xargs/testsuite/xargs.sysv/iARG.xo
new file mode 100644 (file)
index 0000000..f28510b
--- /dev/null
@@ -0,0 +1,22 @@
+/src/gnu/autoconf-1.11 is x/src/gnu/autoconf-1.11x
+/src/gnu/autoconf-1.11/README is x/src/gnu/autoconf-1.11/READMEx
+/src/gnu/autoconf-1.11/Makefile.in is x/src/gnu/autoconf-1.11/Makefile.inx
+/src/gnu/autoconf-1.11/INSTALL is x/src/gnu/autoconf-1.11/INSTALLx
+/src/gnu/autoconf-1.11/NEWS is x/src/gnu/autoconf-1.11/NEWSx
+/src/gnu/autoconf-1.11/COPYING is x/src/gnu/autoconf-1.11/COPYINGx
+/src/gnu/autoconf-1.11/ChangeLog is x/src/gnu/autoconf-1.11/ChangeLogx
+/src/gnu/autoconf-1.11/autoconf.texi is x/src/gnu/autoconf-1.11/autoconf.texix
+/src/gnu/autoconf-1.11/acconfig.h is x/src/gnu/autoconf-1.11/acconfig.hx
+/src/gnu/autoconf-1.11/autoconf.sh is x/src/gnu/autoconf-1.11/autoconf.shx
+/src/gnu/autoconf-1.11/acgeneral.m4 is x/src/gnu/autoconf-1.11/acgeneral.m4x
+/src/gnu/autoconf-1.11/acspecific.m4 is x/src/gnu/autoconf-1.11/acspecific.m4x
+/src/gnu/autoconf-1.11/configure is x/src/gnu/autoconf-1.11/configurex
+/src/gnu/autoconf-1.11/configure.in is x/src/gnu/autoconf-1.11/configure.inx
+/src/gnu/autoconf-1.11/autoheader.sh is x/src/gnu/autoconf-1.11/autoheader.shx
+/src/gnu/autoconf-1.11/mkinstalldirs is x/src/gnu/autoconf-1.11/mkinstalldirsx
+/src/gnu/autoconf-1.11/install.sh is x/src/gnu/autoconf-1.11/install.shx
+/src/gnu/autoconf-1.11/autoconf.info is x/src/gnu/autoconf-1.11/autoconf.infox
+/src/gnu/autoconf-1.11/standards.texi is x/src/gnu/autoconf-1.11/standards.texix
+/src/gnu/autoconf-1.11/make-stds.texi is x/src/gnu/autoconf-1.11/make-stds.texix
+/src/gnu/autoconf-1.11/standards.info is x/src/gnu/autoconf-1.11/standards.infox
+/src/gnu/autoconf-1.11/texinfo.tex is x/src/gnu/autoconf-1.11/texinfo.texx
diff --git a/xargs/testsuite/xargs.sysv/idef-s26.exp b/xargs/testsuite/xargs.sysv/idef-s26.exp
new file mode 100644 (file)
index 0000000..348661b
--- /dev/null
@@ -0,0 +1 @@
+xargs_start f {-i -s26 echo from \{\} to x{}y} items.xi skip
diff --git a/xargs/testsuite/xargs.sysv/idef-s26.xo b/xargs/testsuite/xargs.sysv/idef-s26.xo
new file mode 100644 (file)
index 0000000..94f1e34
--- /dev/null
@@ -0,0 +1 @@
+from dumb to xdumby
diff --git a/xargs/testsuite/xargs.sysv/idef.exp b/xargs/testsuite/xargs.sysv/idef.exp
new file mode 100644 (file)
index 0000000..78049fa
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-i echo from \{\} to x{}y} items.xi
diff --git a/xargs/testsuite/xargs.sysv/idef.xo b/xargs/testsuite/xargs.sysv/idef.xo
new file mode 100644 (file)
index 0000000..a78e799
--- /dev/null
@@ -0,0 +1,6 @@
+from dumb to xdumby
+from s  s  to xs  s y
+from f\f\ff\f to xf\f\ff\fy
+from r\r\rr\r to xr\r\rr\ry
+from t         t        to xt          t       y
+from v\v\vv\v to xv\v\vv\vy
diff --git a/xargs/testsuite/xargs.sysv/iquotes.exp b/xargs/testsuite/xargs.sysv/iquotes.exp
new file mode 100644 (file)
index 0000000..43b8877
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-i__ echo FIRST __ IS OK} quotes.xi
diff --git a/xargs/testsuite/xargs.sysv/iquotes.xo b/xargs/testsuite/xargs.sysv/iquotes.xo
new file mode 100644 (file)
index 0000000..10ce85c
--- /dev/null
@@ -0,0 +1,5 @@
+FIRST this is IS OK
+FIRST quoted   stuff   IS OK
+FIRST and 
+an embedded   newline IS OK
+FIRST with single      quotes as well. IS OK
diff --git a/xargs/testsuite/xargs.sysv/l1.exp b/xargs/testsuite/xargs.sysv/l1.exp
new file mode 100644 (file)
index 0000000..5dbec2a
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-l} ldata.xi
diff --git a/xargs/testsuite/xargs.sysv/l1.xo b/xargs/testsuite/xargs.sysv/l1.xo
new file mode 100644 (file)
index 0000000..b654880
--- /dev/null
@@ -0,0 +1,9 @@
+1 22 333 4444
+55555 666666
+7777777
+88888888
+999999999 1 22
+333 4444 55555
+666666 7777777
+88888888
+999999999
diff --git a/xargs/testsuite/xargs.sysv/l1_2.exp b/xargs/testsuite/xargs.sysv/l1_2.exp
new file mode 100644 (file)
index 0000000..ffb6ad6
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-l} ldatab.xi
diff --git a/xargs/testsuite/xargs.sysv/l1_2.xo b/xargs/testsuite/xargs.sysv/l1_2.xo
new file mode 100644 (file)
index 0000000..f9dc665
--- /dev/null
@@ -0,0 +1,6 @@
+1 22 333 4444 55555 666666
+7777777 88888888 999999999 1 22
+333 4444 55555
+666666 7777777
+88888888
+999999999
diff --git a/xargs/testsuite/xargs.sysv/l1n4.exp b/xargs/testsuite/xargs.sysv/l1n4.exp
new file mode 100644 (file)
index 0000000..4eef466
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-l1 -n4} files.xi
diff --git a/xargs/testsuite/xargs.sysv/l1n4.xo b/xargs/testsuite/xargs.sysv/l1n4.xo
new file mode 100644 (file)
index 0000000..03f29b5
--- /dev/null
@@ -0,0 +1,6 @@
+/src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README /src/gnu/autoconf-1.11/Makefile.in /src/gnu/autoconf-1.11/INSTALL
+/src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING /src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi
+/src/gnu/autoconf-1.11/acconfig.h /src/gnu/autoconf-1.11/autoconf.sh /src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4
+/src/gnu/autoconf-1.11/configure /src/gnu/autoconf-1.11/configure.in /src/gnu/autoconf-1.11/autoheader.sh /src/gnu/autoconf-1.11/mkinstalldirs
+/src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info /src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi
+/src/gnu/autoconf-1.11/standards.info /src/gnu/autoconf-1.11/texinfo.tex
diff --git a/xargs/testsuite/xargs.sysv/lc_l2.exp b/xargs/testsuite/xargs.sysv/lc_l2.exp
new file mode 100644 (file)
index 0000000..c50b16c
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-l2} files.xi
diff --git a/xargs/testsuite/xargs.sysv/lc_l2.xo b/xargs/testsuite/xargs.sysv/lc_l2.xo
new file mode 100644 (file)
index 0000000..0fa9424
--- /dev/null
@@ -0,0 +1,11 @@
+/src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README
+/src/gnu/autoconf-1.11/Makefile.in /src/gnu/autoconf-1.11/INSTALL
+/src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING
+/src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi
+/src/gnu/autoconf-1.11/acconfig.h /src/gnu/autoconf-1.11/autoconf.sh
+/src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4
+/src/gnu/autoconf-1.11/configure /src/gnu/autoconf-1.11/configure.in
+/src/gnu/autoconf-1.11/autoheader.sh /src/gnu/autoconf-1.11/mkinstalldirs
+/src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info
+/src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi
+/src/gnu/autoconf-1.11/standards.info /src/gnu/autoconf-1.11/texinfo.tex
diff --git a/xargs/testsuite/xargs.sysv/s30-t.exp b/xargs/testsuite/xargs.sysv/s30-t.exp
new file mode 100644 (file)
index 0000000..4145c8d
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-s30 -t} stairs.xi
diff --git a/xargs/testsuite/xargs.sysv/s30-t.xe b/xargs/testsuite/xargs.sysv/s30-t.xe
new file mode 100644 (file)
index 0000000..f91bf78
--- /dev/null
@@ -0,0 +1,6 @@
+/bin/echo 1 22 333 4444 55555 
+/bin/echo 666666 7777777 
+/bin/echo 88888888 999999999 
+/bin/echo 1 22 333 4444 55555 
+/bin/echo 666666 7777777 
+/bin/echo 88888888 999999999 
diff --git a/xargs/testsuite/xargs.sysv/s30-t.xo b/xargs/testsuite/xargs.sysv/s30-t.xo
new file mode 100644 (file)
index 0000000..64ba7cb
--- /dev/null
@@ -0,0 +1,6 @@
+1 22 333 4444 55555
+666666 7777777
+88888888 999999999
+1 22 333 4444 55555
+666666 7777777
+88888888 999999999
diff --git a/xargs/testsuite/xargs.sysv/space-t.exp b/xargs/testsuite/xargs.sysv/space-t.exp
new file mode 100644 (file)
index 0000000..1d9c857
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-t echo this plus that} space.xi
diff --git a/xargs/testsuite/xargs.sysv/space-t.xe b/xargs/testsuite/xargs.sysv/space-t.xe
new file mode 100644 (file)
index 0000000..ec9c43d
--- /dev/null
@@ -0,0 +1 @@
+echo this plus that 
diff --git a/xargs/testsuite/xargs.sysv/space-t.xo b/xargs/testsuite/xargs.sysv/space-t.xo
new file mode 100644 (file)
index 0000000..b8e9a02
--- /dev/null
@@ -0,0 +1 @@
+this plus that
diff --git a/xargs/testsuite/xargs.sysv/sv-bug-18713.exp b/xargs/testsuite/xargs.sysv/sv-bug-18713.exp
new file mode 100644 (file)
index 0000000..036d092
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n1 printf "@%s@\n"} empty.xi
diff --git a/xargs/testsuite/xargs.sysv/sv-bug-18713.xo b/xargs/testsuite/xargs.sysv/sv-bug-18713.xo
new file mode 100644 (file)
index 0000000..9225e36
--- /dev/null
@@ -0,0 +1,7 @@
+@foo@
+@@
+@bar@
+@baz@
+@@
+@@
+@fnord@
diff --git a/xargs/testsuite/xargs.sysv/trace.exp b/xargs/testsuite/xargs.sysv/trace.exp
new file mode 100644 (file)
index 0000000..c8364ff
--- /dev/null
@@ -0,0 +1 @@
+xargs_start p {-n2 -t echo } foobar.xi
diff --git a/xargs/testsuite/xargs.sysv/trace.xe b/xargs/testsuite/xargs.sysv/trace.xe
new file mode 100644 (file)
index 0000000..dfbe22e
--- /dev/null
@@ -0,0 +1,2 @@
+echo foo bar 
+echo baz ugh 
diff --git a/xargs/testsuite/xargs.sysv/trace.xo b/xargs/testsuite/xargs.sysv/trace.xo
new file mode 100644 (file)
index 0000000..171b5a3
--- /dev/null
@@ -0,0 +1,2 @@
+foo bar
+baz ugh
diff --git a/xargs/xargs.1 b/xargs/xargs.1
new file mode 100644 (file)
index 0000000..f490b79
--- /dev/null
@@ -0,0 +1,511 @@
+.TH XARGS 1 \" -*- nroff -*-
+.SH NAME
+xargs \- build and execute command lines from standard input
+.SH SYNOPSIS
+.B xargs
+.nh
+[\fB\-0prtx\fR]
+[\fB\-E \fIeof-str\fR]
+[\fB\-e\fR[\fIeof-str\fR]]
+[\fB\-\-eof\fR[=\fIeof-str\fR]]
+[\fB\-\-null\fR]
+[\fB\-d \fIdelimiter\fR]
+[\fB\-\-delimiter \fIdelimiter\fR]
+[\fB\-I \fIreplace-str\fR]
+[\fB\-i\fR[\fIreplace-str\fR]]
+[\fB\-\-replace\fR[=\fIreplace-str\fR]]
+[\fB\-l\fR[\fImax-lines\fR]]
+[\fB\-L \fImax-lines\fR]
+[\fB\-\-max\-lines\fR[=\fImax-lines\fR]]
+[\fB\-n \fImax-args\fR]
+[\fB\-\-max\-args\fR=\fImax-args\fR]
+[\fB\-s \fImax-chars\fR]
+[\fB\-\-max\-chars\fR=\fImax-chars\fR]
+[\fB\-P \fImax-procs\fR]
+[\fB\-\-max\-procs\fR=\fImax-procs\fR]
+[\fB\-\-interactive\fR]
+[\fB\-\-verbose\fR]
+[\fB\-\-exit\fR]
+[\fB\-\-no\-run\-if\-empty\fR]
+[\fB\-\-arg\-file\fR=\fIfile\fR]
+[\fB\-\-show\-limits\fR]
+[\fB\-\-version\fR]
+[\fB\-\-help\fR]
+[\fIcommand\fR [\fIinitial-arguments\fR]]
+.hy
+.SH DESCRIPTION
+This manual page
+documents the GNU version of
+.BR xargs .
+.B xargs
+reads items from the standard input, delimited by blanks (which can be
+protected with double or single quotes or a backslash) or newlines,
+and executes the
+.I command
+(default is
+.IR /bin/echo )
+one or more times with any
+.I initial-arguments
+followed by items read from standard input.  Blank lines on the
+standard input are ignored.
+.P
+The command line for
+.I command
+is built up until it reaches a system-defined limit (unless the
+.B \-n
+and
+.B \-L
+options are used).  The specified
+.I command
+will be invoked as many times as necessary to use up the list of input
+items.  In general, there will be many fewer invocations of
+.I command
+than there were items in the input.  This will normally have
+significant performance benefits.  Some commands can usefully be
+executed in parallel too; see the
+.B \-P
+option.
+.P
+Because Unix filenames can contain blanks and newlines, this default
+behaviour is often problematic; filenames containing blanks
+and/or newlines are incorrectly processed by
+.BR xargs .
+In these situations it is better to use the
+.B \-0
+option, which
+prevents such problems.   When using this option you will need to
+ensure that the program which produces the input for
+.B xargs
+also uses a null character as a separator.  If that program is
+GNU
+.B find
+for example, the
+.B \-print0
+option does this for you.
+.P
+If any invocation of the command exits with a status of 255,
+.B xargs
+will stop immediately without reading any further input.  An error
+message is issued on stderr when this happens.
+.SH OPTIONS
+.TP
+.PD 0
+.BI "\-\-arg\-file=" file
+.TP
+.PD 0
+.BI "\-a " file
+Read items from
+.I file
+instead of standard input.  If you use this option, stdin remains
+unchanged when commands are run.  Otherwise, stdin is redirected
+from
+.IR /dev/null .
+
+.TP
+.PD 0
+.B \-\-null
+.TP
+.PD
+.B \-0
+Input items are terminated by a null character instead of by
+whitespace, and the quotes and backslash are not special (every
+character is taken literally).  Disables the end of file string, which
+is treated like any other argument.  Useful when input items might
+contain white space, quote marks, or backslashes.  The GNU find
+\-print0 option produces input suitable for this mode.
+
+.TP
+.PD 0
+.BI "\-\-delimiter=" delim
+.TP
+.PD
+.BI \-d " delim"
+Input items are terminated by the specified character.  Quotes and
+backslash are not special; every character in the input is taken
+literally.  Disables the end-of-file string, which is treated like any
+other argument.  This can be used when the input consists of simply
+newline-separated items, although it is almost always better to design
+your program to use
+.B \-\-null
+where this is possible.  The specified
+delimiter may be a single character, a C-style character escape such
+as
+.BR \en ,
+or an octal or hexadecimal escape code.  Octal and hexadecimal
+escape codes are understood as for the
+.B printf
+command.   Multibyte characters are not supported.
+
+.TP
+.BI \-E " eof-str"
+Set the end of file string to \fIeof-str\fR.  If the end of file
+string occurs as a line of input, the rest of the input is ignored.
+If neither
+.B \-E
+nor
+.B \-e
+is used, no end of file string is used.
+.TP
+.PD 0
+.BR "\-\-eof" [\fI=eof-str\fR]
+.TP
+.PD
+.BR \-e [ \fIeof-str\fR]
+This option is a synonym for the
+.B \-E
+option.  Use
+.B \-E
+instead,
+because it is POSIX compliant while this option is not.  If
+\fIeof-str\fR is omitted, there is no end of file string.  If neither
+.B \-E
+nor
+.B \-e
+is used, no end of file string is used.
+.TP
+.B "\-\-help"
+Print a summary of the options to
+.B xargs
+and exit.
+.TP
+.BI \-I " replace-str"
+Replace occurrences of \fIreplace-str\fR in the initial-arguments with
+names read from standard input.  Also, unquoted blanks do not
+terminate input items; instead the separator is the newline character.
+Implies
+.B \-x
+and
+.B \-L
+1.
+.TP
+.PD 0
+.BR "\-\-replace" [\fI=replace-str\fR]
+.TP
+.PD
+.BR  \-i "[\fIreplace-str\fR]"
+This option is a synonym for
+.BI \-I replace-str
+if
+.I replace-str
+is specified.  If the
+.I replace-str
+argument is missing, the effect is the same as
+.BR \-I {}.
+This option is deprecated; use
+.B \-I
+instead.
+.TP
+.BI \-L " max-lines"
+Use at most \fImax-lines\fR nonblank input lines per command line.
+Trailing blanks cause an input line to be logically continued on the
+next input line.  Implies
+.BR \-x .
+.TP
+.PD 0
+.BR \-\-max-lines "[=\fImax-lines\fR]"
+.TP
+.PD
+.BR \-l "[\fImax-lines\fR]"
+Synonym for the
+.B \-L
+option.  Unlike
+.BR \-L ,
+the
+.I max-lines
+argument is optional.  If
+.I max-lines
+is not specified, it defaults to one.  The
+.B \-l
+option is deprecated since the POSIX standard specifies
+.B \-L
+instead.
+.TP
+.PD 0
+.BR "\-\-max\-args" =\fImax-args\fR
+.TP
+.PD
+.BI \-n " max-args"
+Use at most \fImax-args\fR arguments per command line.  Fewer than
+.I max-args
+arguments will be used if the size (see the
+.B \-s
+option) is exceeded, unless the
+.B \-x
+option is given, in which case
+.B xargs will exit.
+.TP
+.PD 0
+.B \-\-interactive
+.TP
+.PD
+.B \-p
+Prompt the user about whether to run each command line and read a line
+from the terminal.  Only run the command line if the response starts
+with `y' or `Y'.  Implies
+.BR -t .
+.TP
+.PD 0
+.B \-\-no\-run\-if\-empty
+.TP
+.PD
+.B \-r
+If the standard input does not contain any nonblanks, do not run the
+command.  Normally, the command is run once even if there is no input.
+This option is a GNU extension.
+.TP
+.PD 0
+.BR \-\-max\-chars "=\fImax-chars\fR"
+.TP
+.PD
+.BI \-s " max-chars"
+Use at most \fImax-chars\fR characters per command line, including the
+command and initial-arguments and the terminating nulls at the ends of
+the argument strings.  The largest allowed value is system-dependent,
+and is calculated as the argument length limit for exec, less the size
+of your environment, less 2048 bytes of headroom.  If this value is
+more than 128KiB, 128Kib is used as the default value; otherwise, the
+default value is the maximum.  1KiB is 1024 bytes.
+.B xargs
+automatically adapts to tighter constraints.
+.TP
+.PD 0
+.B \-\-verbose
+.TP
+.PD
+.B \-t
+Print the command line on the standard error output before executing
+it.
+.TP
+.B "\-\-version"
+Print the version number of
+.B xargs
+and exit.
+.TP
+.B "\-\-show\\-limits"
+Display the limits on the command-line length which are imposed by the
+operating system,
+.BR xargs '
+choice of buffer size and the
+.B \-s
+option.  Pipe the input from
+.I /dev/null
+(and perhaps specify
+.BR --no-run-if-empty )
+if you don't want
+.B xargs
+to do anything.
+.TP
+.PD 0
+.B \-\-exit
+.TP
+.PD
+.B \-x
+Exit if the size (see the
+.B \-s
+option) is exceeded.
+.TP
+.PD 0
+.BR \-\-max\-procs "=\fImax-procs\fR"
+.TP
+.PD
+.BI \-P " max-procs"
+Run up to
+.I max-procs
+processes at a time; the default is 1.  If
+.I max-procs
+is 0,
+.B xargs
+will run as many processes as
+possible at a time.  Use the
+.B \-n
+option or the
+.B \-L
+option with
+.BR \-P ;
+otherwise chances are that only one exec will be done.
+While
+.B xargs
+is running, you can
+send its process
+a SIGUSR1 signal to increase the number of commands to run simultaneously,
+or a SIGUSR2 to decrease the number.  You cannot decrease it below 1.
+.B xargs
+never terminates its commands; when asked to decrease, it merely
+waits for more than one existing command to terminate before starting
+another.
+.SH "EXAMPLES"
+.nf
+.B find /tmp \-name core \-type f \-print | xargs /bin/rm \-f
+
+.fi
+Find files named
+.B core
+in or below the directory
+.B /tmp
+and delete them.  Note that this will work incorrectly if there are
+any filenames containing newlines or spaces.
+.P
+.B find /tmp \-name core \-type f \-print0 | xargs \-0 /bin/rm \-f
+
+.fi
+Find files named
+.B core
+in or below the directory
+.B /tmp
+and delete them, processing filenames in such a way that file or
+directory names containing spaces or newlines are correctly handled.
+
+.P
+.B find /tmp \-depth \-name core \-type f \-delete
+
+.fi
+Find files named
+.B core
+in or below the directory
+.B /tmp
+and delete them, but more efficiently than in the previous example
+(because we avoid the need to use
+.BR fork (2)
+and
+.BR exec (2)
+to launch
+.B rm
+and we don't need the extra
+.B xargs
+process).
+
+.P
+.nf
+.B cut \-d: \-f1 < /etc/passwd | sort | xargs echo
+
+.fi
+Generates a compact listing of all the users on the system.
+
+.P
+.nf
+.B xargs sh -c 'emacs \(dq$@\(dq < /dev/tty' emacs
+
+.fi
+Launches the minimum number of copies of Emacs needed, one after the
+other, to edit the files listed on
+.BR xargs '
+standard input.  This example achieves the same effect as BSD's
+.B -o
+option, but in a more flexible and portable way.
+
+
+
+.SH "EXIT STATUS"
+.B xargs
+exits with the following status:
+.nf
+0 if it succeeds
+123 if any invocation of the command exited with status 1-125
+124 if the command exited with status 255
+125 if the command is killed by a signal
+126 if the command cannot be run
+127 if the command is not found
+1 if some other error occurred.
+.fi
+.P
+Exit codes greater than 128 are used by the shell to indicate that
+a program died due to a fatal signal.
+.SH "STANDARDS CONFORMANCE"
+As of GNU xargs version 4.2.9, the default behaviour of
+.B xargs
+is not to have a logical end-of-file marker.  POSIX (IEEE Std 1003.1,
+2004 Edition) allows this.
+.P
+The \-l and \-i options appear in the 1997 version of the POSIX
+standard, but do not appear in the 2004 version of the standard.
+Therefore you should use \-L and \-I instead, respectively.
+.P
+The POSIX standard allows implementations to have a limit on the size
+of arguments to the
+.B exec
+functions.  This limit could be as low as 4096 bytes including the size of the
+environment.  For scripts to be portable, they must not rely on a
+larger value.  However, I know of no implementation whose actual limit
+is that small.  The
+.B \-\-show\-limits
+option can be used to discover the actual limits in force on the
+current system.
+
+
+.SH "SEE ALSO"
+\fBfind\fP(1), \fBlocate\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1),
+\fBfork\fP(2), \fBexecvp\fP(3), 
+\fBkill\fP(1), \fBsignal\fP(7),
+\fBFinding Files\fP (on-line in Info, or printed)
+.SH "BUGS"
+The
+.B \-L
+option is incompatible with the
+.B \-I
+option, but perhaps should not be.
+.P
+It is not possible for
+.B xargs
+to be used securely, since there will always be a time gap between the
+production of the list of input files and their use in the commands
+that
+.B xargs
+issues.  If other users have access to the system, they can manipulate
+the filesystem during this time window to force the action of the
+commands
+.B xargs
+runs to apply to files that you didn't intend.  For a more detailed
+discussion of this and related problems, please refer to the
+``Security Considerations'' chapter in the findutils Texinfo
+documentation.  The
+.B \-execdir
+option of
+.B find
+can often be used as a more secure alternative.
+
+When you use the
+.B \-I
+option, each line read from the input is buffered
+internally.   This means that there is an upper limit on the length
+of input line that
+.B xargs
+will accept when used with the
+.B \-I
+option.  To work around this
+limitation, you can use the
+.B \-s
+option to increase the amount of
+buffer space that
+.B xargs
+uses, and you can also use an extra invocation of
+.B xargs
+to ensure that very long lines do not occur.
+For example:
+.P
+.B somecommand | xargs \-s 50000 echo | xargs \-I '{}' \-s 100000 rm '{}'
+.P
+Here, the first invocation of
+.B xargs
+has no input line length limit
+because it doesn't use the
+.B \-i
+option.  The second invocation of
+.B xargs
+does have such a limit, but we have ensured that the it never encounters
+a line which is longer than it can handle.   This is not an ideal
+solution.  Instead, the
+.B \-i
+option should not impose a line length
+limit, which is why this discussion appears in the BUGS section.
+The problem doesn't occur with the output of
+.BR find (1)
+because it emits just one filename per line.
+.P
+The best way to report a bug is to use the form at
+http://savannah.gnu.org/bugs/?group=findutils.
+The reason for this is that you will then be able to track progress in
+fixing the problem.   Other comments about \fBxargs\fP(1) and about
+the findutils package in general can be sent to the
+.I bug\-findutils
+mailing list.  To join the list, send email to
+.IR bug\-findutils\-request@gnu.org .
diff --git a/xargs/xargs.c b/xargs/xargs.c
new file mode 100644 (file)
index 0000000..3cc1832
--- /dev/null
@@ -0,0 +1,1520 @@
+/* xargs -- build and execute command lines from standard input
+   Copyright (C) 1990, 91, 92, 93, 94, 2000, 2003, 2004, 2005, 2006,
+   2007, 2008, 2009, 2010 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 Mike Rendell <michael@cs.mun.ca>
+   and David MacKenzie <djm@gnu.org>.
+   Modifications by
+        James Youngman
+       Dmitry V. Levin
+*/
+
+#include <config.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdint.h>
+#include <inttypes.h>
+
+#include <sys/types.h>
+#include <getopt.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <string.h>
+#include <sys/param.h>
+
+#ifndef LONG_MAX
+#define LONG_MAX (~(1 << (sizeof (long) * 8 - 1)))
+#endif
+
+#define ISBLANK(c) (isascii (c) && isblank (c))
+#define ISSPACE(c) (ISBLANK (c) || (c) == '\n' || (c) == '\r' \
+                   || (c) == '\f' || (c) == '\v')
+
+/* The presence of unistd.h is assumed by gnulib these days, so we
+ * might as well assume it too.
+ */
+#include <unistd.h>
+#include <signal.h>
+#include <sys/wait.h>
+#include <stdlib.h>
+#include <locale.h>
+#include <wchar.h>
+#include <stdint.h>
+
+#if !defined(SIGCHLD) && defined(SIGCLD)
+#define SIGCHLD SIGCLD
+#endif
+
+#include "verify.h"
+
+#include "progname.h"
+#include "quotearg.h"
+#include "findutils-version.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
+
+#include "buildcmd.h"
+#include "arg-max.h"           /* must include after unistd.h. */
+
+
+/* Return nonzero if S is the EOF string.  */
+#define EOF_STR(s) (eof_str && *eof_str == *s && !strcmp (eof_str, s))
+
+#if __STDC__
+#define VOID void
+#else
+#define VOID char
+#endif
+
+#include <xalloc.h>
+#include "closein.h"
+#include "gnulib-version.h"
+
+void error (int status, int errnum, char *message,...);
+
+extern char *version_string;
+
+static FILE *input_stream;
+
+/* Buffer for reading arguments from input.  */
+static char *linebuf;
+
+static int keep_stdin = 0;
+
+/* Line number in stdin since the last command was executed.  */
+static int lineno = 0;
+
+static struct buildcmd_state bc_state;
+static struct buildcmd_control bc_ctl;
+
+/* Did we already complain about NUL characters in the input? */
+static int nullwarning_given = 0;
+
+
+/* If nonzero, when this string is read on stdin it is treated as
+   end of file.
+   IEEE Std 1003.1, 2004 Edition allows this to be NULL.
+   In findutils releases up to and including 4.2.8, this was "_".
+*/
+static char *eof_str = NULL;
+
+/* Number of chars in the initial args.  */
+/* static int initial_argv_chars = 0; */
+
+/* true when building up initial arguments in `cmd_argv'.  */
+static bool initial_args = true;
+
+/* If nonzero, the maximum number of child processes that can be running
+   at once.  */
+/* TODO: check conversion safety (i.e. range) for -P option. */
+static volatile sig_atomic_t proc_max = 1;
+
+/* Did we fork a child yet? */
+static bool procs_executed = false;
+
+/* The number of elements in `pids'.  */
+static unsigned long int procs_executing = 0uL;
+
+/* List of child processes currently executing.  */
+static pid_t *pids = NULL;
+
+/* The number of allocated elements in `pids'. */
+static size_t pids_alloc = 0u;
+
+/* Process ID of the parent xargs process. */
+static pid_t parent;
+
+/* If nonzero, we've been signaled that we can start more child processes. */
+static volatile sig_atomic_t stop_waiting = 0;
+
+/* Exit status; nonzero if any child process exited with a
+   status of 1-125.  */
+static volatile int child_error = EXIT_SUCCESS;
+
+static volatile int original_exit_value;
+
+/* If true, print each command on stderr before executing it.  */
+static bool print_command = false; /* Option -t */
+
+/* If true, query the user before executing each command, and only
+   execute the command if the user responds affirmatively.  */
+static bool query_before_executing = false;
+
+/* The delimiter for input arguments.   This is only consulted if the
+ * -0 or -d option had been given.
+ */
+static char input_delimiter = '\0';
+
+
+static struct option const longopts[] =
+{
+  {"null", no_argument, NULL, '0'},
+  {"arg-file", required_argument, NULL, 'a'},
+  {"delimiter", required_argument, NULL, 'd'},
+  {"eof", optional_argument, NULL, 'e'},
+  {"replace", optional_argument, NULL, 'I'},
+  {"max-lines", optional_argument, NULL, 'l'},
+  {"max-args", required_argument, NULL, 'n'},
+  {"interactive", no_argument, NULL, 'p'},
+  {"no-run-if-empty", no_argument, NULL, 'r'},
+  {"max-chars", required_argument, NULL, 's'},
+  {"verbose", no_argument, NULL, 't'},
+  {"show-limits", no_argument, NULL, 'S'},
+  {"exit", no_argument, NULL, 'x'},
+  {"max-procs", required_argument, NULL, 'P'},
+  {"version", no_argument, NULL, 'v'},
+  {"help", no_argument, NULL, 'h'},
+  {NULL, no_argument, NULL, 0}
+};
+
+/* xargs exits with status values with specific meanings (this is a POSIX requirement).
+   These are the values.
+*/
+enum XargsStatusValues {
+  XARGS_EXIT_CLIENT_EXIT_NONZERO = 123, /* utility exited with nonzero status */
+  XARGS_EXIT_CLIENT_EXIT_255 = 124,     /* utility exites with status 255 */
+  XARGS_EXIT_CLIENT_FATAL_SIG = 125,    /* utility died from a fatal signal */
+  XARGS_EXIT_COMMAND_CANNOT_BE_RUN = 126, /* canot run the command */
+  XARGS_EXIT_COMMAND_NOT_FOUND = 127,    /* cannot find the command */
+};
+/* Exit status values the child might use. */
+enum  ClientStatusValues {
+  CHILD_EXIT_PLEASE_STOP_IMMEDIATELY = 255
+};
+
+static int read_line (void);
+static int read_string (void);
+static bool print_args (bool ask);
+/* static void do_exec (void); */
+static int xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv);
+static void exec_if_possible (void);
+static void add_proc (pid_t pid);
+static void wait_for_proc (bool all, unsigned int minreap);
+static void wait_for_proc_all (void);
+static void increment_proc_max (int);
+static void decrement_proc_max (int);
+static long parse_num (char *str, int option, long min, long max, int fatal);
+static void usage (FILE * stream);
+
+
+
+static char
+get_char_oct_or_hex_escape (const char *s)
+{
+  const char * p;
+  int base = 8;
+  unsigned long val;
+  char *endp;
+
+  assert ('\\' == s[0]);
+
+  if ('x' == s[1])
+    {
+      /* hex */
+      p = s+2;
+      base = 16;
+    }
+  else if (isdigit ((unsigned char) s[1]))
+    {
+      /* octal */
+      p = s+1;
+      base = 8;
+    }
+  else
+    {
+      p = NULL;                        /* Silence compiler warning. */
+      error (EXIT_FAILURE, 0,
+            _("Invalid escape sequence %s in input delimiter specification."),
+            s);
+    }
+  errno = 0;
+  endp = (char*)p;
+  val = strtoul (p, &endp, base);
+
+  /* This if condition is carefully constructed to do
+   * the right thing if UCHAR_MAX has the same
+   * value as ULONG_MAX.   IF UCHAR_MAX==ULONG_MAX,
+   * then val can never be greater than UCHAR_MAX.
+   */
+  if ((ULONG_MAX == val && ERANGE == errno)
+      || (val > UCHAR_MAX))
+    {
+      if (16 == base)
+       {
+         error (EXIT_FAILURE, 0,
+                _("Invalid escape sequence %s in input delimiter specification; character values must not exceed %lx."),
+                s, (unsigned long)UCHAR_MAX);
+       }
+      else
+       {
+         error (EXIT_FAILURE, 0,
+                _("Invalid escape sequence %s in input delimiter specification; character values must not exceed %lo."),
+                s, (unsigned long)UCHAR_MAX);
+       }
+    }
+
+  /* check for trailing garbage */
+  if (0 != *endp)
+    {
+      error (EXIT_FAILURE, 0,
+            _("Invalid escape sequence %s in input delimiter specification; trailing characters %s not recognised."),
+            s, endp);
+    }
+
+  return (char) val;
+}
+
+
+static char
+get_input_delimiter (const char *s)
+{
+  if (1 == strlen (s))
+    {
+      return s[0];
+    }
+  else
+    {
+      if ('\\' == s[0])
+       {
+         /* an escape code */
+         switch (s[1])
+           {
+           case 'a':
+             return '\a';
+           case 'b':
+             return '\b';
+           case 'f':
+             return '\f';
+           case 'n':
+             return '\n';
+           case 'r':
+             return '\r';
+           case 't':
+             return'\t';
+           case 'v':
+             return '\v';
+           case '\\':
+             return '\\';
+           default:
+             return get_char_oct_or_hex_escape (s);
+           }
+       }
+      else
+       {
+         error (EXIT_FAILURE, 0,
+                _("Invalid input delimiter specification %s: the delimiter must be either a single character or an escape sequence starting with \\."),
+                s);
+         /*NOTREACHED*/
+         return 0;
+       }
+    }
+}
+
+static void
+noop (void)
+{
+  /* does nothing. */
+}
+
+static void
+fail_due_to_env_size (void)
+{
+  error (EXIT_FAILURE, 0, _("environment is too large for exec"));
+}
+
+static size_t
+smaller_of (size_t a, size_t b)
+{
+  if (a < b)
+    return a;
+  else
+    return b;
+}
+
+
+
+int
+main (int argc, char **argv)
+{
+  int optc;
+  int show_limits = 0;                 /* --show-limits */
+  int always_run_command = 1;
+  char *input_file = "-"; /* "-" is stdin */
+  char *default_cmd = "/bin/echo";
+  int (*read_args) (void) = read_line;
+  void (*act_on_init_result)(void) = noop;
+  enum BC_INIT_STATUS bcstatus;
+  enum { XARGS_POSIX_HEADROOM = 2048u };
+  struct sigaction sigact;
+
+  if (argv[0])
+    set_program_name (argv[0]);
+  else
+    set_program_name ("xargs");
+
+  parent = getpid ();
+  original_exit_value = EXIT_SUCCESS;
+
+#ifdef HAVE_SETLOCALE
+  setlocale (LC_ALL, "");
+#endif
+  bindtextdomain (PACKAGE, LOCALEDIR);
+  textdomain (PACKAGE);
+  atexit (close_stdin);
+  atexit (wait_for_proc_all);
+
+  /* xargs is required by POSIX to allow 2048 bytes of headroom
+   * for extra environment variables (that perhaps the utliity might
+   * want to set before execing something else).
+   */
+  bcstatus = bc_init_controlinfo (&bc_ctl, XARGS_POSIX_HEADROOM);
+
+  /* The bc_init_controlinfo call may have determined that the
+   * environment is too big.  In that case, we will fail with
+   * an error message after processing the command-line options,
+   * as "xargs --help" should still work even if the environment is
+   * too big.
+   *
+   * Some of the argument processing depends on the contents of
+   * bc_ctl, which will be in an undefined state if bc_init_controlinfo ()
+   * failed.
+   */
+  if (BC_INIT_ENV_TOO_BIG == bcstatus)
+    {
+      act_on_init_result = fail_due_to_env_size;
+    }
+  else if (BC_INIT_CANNOT_ACCOMODATE_HEADROOM == bcstatus)
+    {
+      /* All POSIX systems are required to support ARG_MAX of at least
+       * 4096.  For everything to work the total of (command line +
+       * headroom + environment) must fit into this.  POSIX requires
+       * that we use a headroom of 2048 bytes.  The user is in control
+       * of the size of the environment.
+       *
+       * In general if bc_init_controlinfo () returns
+       * BC_INIT_CANNOT_ACCOMODATE_HEADROOM, its caller can try again
+       * with a smaller headroom.  However, in the case of xargs, this
+       * would not be POSIX-compliant.
+       */
+      act_on_init_result = fail_due_to_env_size;
+    }
+  else
+    {
+      /* IEEE Std 1003.1, 2003 specifies that the combined argument and
+       * environment list shall not exceed {ARG_MAX}-2048 bytes.  It also
+       * specifies that it shall be at least LINE_MAX.
+       */
+      long val;
+#ifdef _SC_ARG_MAX
+      val = sysconf (_SC_ARG_MAX);
+      if (val > 0)
+       {
+         assert (val > XARGS_POSIX_HEADROOM);
+         /* Note that val can in fact be greater than ARG_MAX
+          * and bc_ctl.arg_max can also be greater than ARG_MAX.
+          */
+         bc_ctl.arg_max = smaller_of (bc_ctl.arg_max,
+                                      (size_t)val-XARGS_POSIX_HEADROOM);
+       }
+      else
+       {
+# if defined ARG_MAX
+         assert (ARG_MAX > XARGS_POSIX_HEADROOM);
+         bc_ctl.arg_max = smaller_of (bc_ctl.arg_max,
+                                      (ARG_MAX - XARGS_POSIX_HEADROOM));
+# endif
+       }
+#else
+      /* No _SC_ARG_MAX */
+      assert (ARG_MAX > XARGS_POSIX_HEADROOM);
+      bc_ctl.arg_max = smaller_of (bc_ctl.arg_max,
+                                  (ARG_MAX - XARGS_POSIX_HEADROOM));
+#endif
+
+
+#ifdef LINE_MAX
+      /* This assertion ensures that this xargs implementation
+       * conforms to the POSIX requirement that the default command
+       * line length shall be at least LINE_MAX.
+       */
+      assert (bc_ctl.arg_max >= LINE_MAX);
+#endif
+
+      bc_ctl.exec_callback = xargs_do_exec;
+
+      /* Start with a reasonable default size, though this can be
+       * adjusted via the -s option.
+       */
+      bc_use_sensible_arg_max (&bc_ctl);
+    }
+
+  while ((optc = getopt_long (argc, argv, "+0a:E:e::i::I:l::L:n:prs:txP:d:",
+                             longopts, (int *) 0)) != -1)
+    {
+      switch (optc)
+       {
+       case '0':
+         read_args = read_string;
+         input_delimiter = '\0';
+         break;
+
+       case 'd':
+         read_args = read_string;
+         input_delimiter = get_input_delimiter (optarg);
+         break;
+
+       case 'E':               /* POSIX */
+       case 'e':               /* deprecated */
+         if (optarg && (strlen (optarg) > 0))
+           eof_str = optarg;
+         else
+           eof_str = 0;
+         break;
+
+       case 'h':
+         usage (stdout);
+         return 0;
+
+       case 'I':               /* POSIX */
+       case 'i':               /* deprecated */
+         if (optarg)
+           bc_ctl.replace_pat = optarg;
+         else
+           bc_ctl.replace_pat = "{}";
+         /* -i excludes -n -l.  */
+         bc_ctl.args_per_exec = 0;
+         bc_ctl.lines_per_exec = 0;
+         break;
+
+       case 'L':               /* POSIX */
+         bc_ctl.lines_per_exec = parse_num (optarg, 'L', 1L, -1L, 1);
+         /* -L excludes -i -n.  */
+         bc_ctl.args_per_exec = 0;
+         bc_ctl.replace_pat = NULL;
+         break;
+
+       case 'l':               /* deprecated */
+         if (optarg)
+           bc_ctl.lines_per_exec = parse_num (optarg, 'l', 1L, -1L, 1);
+         else
+           bc_ctl.lines_per_exec = 1;
+         /* -l excludes -i -n.  */
+         bc_ctl.args_per_exec = 0;
+         bc_ctl.replace_pat = NULL;
+         break;
+
+       case 'n':
+         bc_ctl.args_per_exec = parse_num (optarg, 'n', 1L, -1L, 1);
+         /* -n excludes -i -l.  */
+         bc_ctl.lines_per_exec = 0;
+         if (bc_ctl.args_per_exec == 1 && bc_ctl.replace_pat)
+           /* ignore -n1 in '-i -n1' */
+           bc_ctl.args_per_exec = 0;
+         else
+           bc_ctl.replace_pat = NULL;
+         break;
+
+         /* The POSIX standard specifies that it is not an error
+          * for the -s option to specify a size that the implementation
+          * cannot support - in that case, the relevant limit is used.
+          */
+       case 's':
+         {
+           size_t arg_size;
+           act_on_init_result ();
+           arg_size = parse_num (optarg, 's', 1L,
+                                 bc_ctl.posix_arg_size_max, 0);
+           if (arg_size > bc_ctl.posix_arg_size_max)
+             {
+               error (0, 0,
+                      _("warning: value %ld for -s option is too large, "
+                        "using %ld instead"),
+                      arg_size, bc_ctl.posix_arg_size_max);
+               arg_size = bc_ctl.posix_arg_size_max;
+             }
+           bc_ctl.arg_max = arg_size;
+         }
+         break;
+
+       case 'S':
+         show_limits = true;
+         break;
+
+       case 't':
+         print_command = true;
+         break;
+
+       case 'x':
+         bc_ctl.exit_if_size_exceeded = true;
+         break;
+
+       case 'p':
+         query_before_executing = true;
+         print_command = true;
+         break;
+
+       case 'r':
+         always_run_command = 0;
+         break;
+
+       case 'P':
+         /* Allow only up to LONG_MAX child processes. */
+         proc_max = parse_num (optarg, 'P', 0L, LONG_MAX, 1);
+         break;
+
+        case 'a':
+          input_file = optarg;
+          break;
+
+       case 'v':
+         display_findutils_version ("xargs");
+         return 0;
+
+       default:
+         usage (stderr);
+         return 1;
+       }
+    }
+
+  /* If we had deferred failing due to problems in bc_init_controlinfo (),
+   * do it now.
+   *
+   * We issue this error message after processing command line
+   * arguments so that it is possible to use "xargs --help" even if
+   * the environment is too large.
+   */
+  act_on_init_result ();
+  assert (BC_INIT_OK == bcstatus);
+
+#ifdef SIGUSR1
+#ifdef SIGUSR2
+  /* Accept signals to increase or decrease the number of running
+     child processes.  Do this as early as possible after setting
+     proc_max.  */
+  sigact.sa_handler = increment_proc_max;
+  sigemptyset(&sigact.sa_mask);
+  sigact.sa_flags = 0;
+  if (0 != sigaction (SIGUSR1, &sigact, (struct sigaction *)NULL))
+         error (0, errno, _("Cannot set SIGUSR1 signal handler"));
+
+  sigact.sa_handler = decrement_proc_max;
+  sigemptyset(&sigact.sa_mask);
+  sigact.sa_flags = 0;
+  if (0 != sigaction (SIGUSR2, &sigact, (struct sigaction *)NULL))
+         error (0, errno, _("Cannot set SIGUSR2 signal handler"));
+#endif /* SIGUSR2 */
+#endif /* SIGUSR1 */
+
+
+  if (0 == strcmp (input_file, "-"))
+    {
+      input_stream = stdin;
+    }
+  else
+    {
+      keep_stdin = 1;          /* see prep_child_for_exec () */
+      input_stream = fopen (input_file, "r");
+      if (NULL == input_stream)
+       {
+         error (EXIT_FAILURE, errno,
+                _("Cannot open input file %s"),
+                quotearg_n_style (0, locale_quoting_style, input_file));
+       }
+    }
+
+  if (bc_ctl.replace_pat || bc_ctl.lines_per_exec)
+    bc_ctl.exit_if_size_exceeded = true;
+
+  if (optind == argc)
+    {
+      optind = 0;
+      argc = 1;
+      argv = &default_cmd;
+    }
+
+  if (show_limits)
+    {
+      fprintf (stderr,
+             _("Your environment variables take up %" PRIuMAX " bytes\n"),
+             (uintmax_t)bc_size_of_environment ());
+      fprintf (stderr,
+             _("POSIX upper limit on argument length (this system): %" PRIuMAX "\n"),
+             (uintmax_t)bc_ctl.posix_arg_size_max);
+      fprintf (stderr,
+             _("POSIX smallest allowable upper limit on argument length (all systems): %" PRIuMAX "\n"),
+             (uintmax_t)bc_ctl.posix_arg_size_min);
+      fprintf (stderr,
+             _("Maximum length of command we could actually use: %" PRIuMAX "\n"),
+             (uintmax_t)(bc_ctl.posix_arg_size_max - bc_size_of_environment ()));
+      fprintf (stderr,
+             _("Size of command buffer we are actually using: %" PRIuMAX "\n"),
+             (uintmax_t)bc_ctl.arg_max);
+
+      if (isatty (STDIN_FILENO))
+       {
+         fprintf (stderr,
+                 _("\n"
+                   "Execution of xargs will continue now, and it will "
+                   "try to read its input and run commands; if this is "
+                   "not what you wanted to happen, please type the "
+                   "end-of-file keystroke.\n"));
+         if (always_run_command)
+           {
+             fprintf (stderr,
+                     _("Warning: %s will be run at least once.  "
+                       "If you do not want that to happen, then press "
+                       "the interrupt keystroke.\n"),
+                     argv[optind]);
+           }
+       }
+    }
+
+  linebuf = xmalloc (bc_ctl.arg_max + 1);
+  bc_state.argbuf = xmalloc (bc_ctl.arg_max + 1);
+
+  /* Make sure to listen for the kids.  */
+  signal (SIGCHLD, SIG_DFL);
+
+  if (!bc_ctl.replace_pat)
+    {
+      for (; optind < argc; optind++)
+       bc_push_arg (&bc_ctl, &bc_state,
+                    argv[optind], strlen (argv[optind]) + 1,
+                    NULL, 0,
+                    initial_args);
+      initial_args = false;
+      bc_ctl.initial_argc = bc_state.cmd_argc;
+      bc_state.cmd_initial_argv_chars = bc_state.cmd_argv_chars;
+      bc_ctl.initial_argc = bc_state.cmd_argc;
+      /*fprintf (stderr, "setting initial_argc=%d\n", bc_state.cmd_initial_argc);*/
+
+      while ((*read_args) () != -1)
+       if (bc_ctl.lines_per_exec && lineno >= bc_ctl.lines_per_exec)
+         {
+           bc_do_exec (&bc_ctl, &bc_state);
+           lineno = 0;
+         }
+
+      /* SYSV xargs seems to do at least one exec, even if the
+         input is empty.  */
+      if (bc_state.cmd_argc != bc_ctl.initial_argc
+         || (always_run_command && procs_executed==0))
+       bc_do_exec (&bc_ctl, &bc_state);
+
+    }
+  else
+    {
+      int i;
+      size_t len;
+      size_t *arglen = xmalloc (sizeof (size_t) * argc);
+
+      for (i = optind; i < argc; i++)
+       arglen[i] = strlen (argv[i]);
+      bc_ctl.rplen = strlen (bc_ctl.replace_pat);
+      while ((len = (*read_args) ()) != -1)
+       {
+         /* Don't do insert on the command name.  */
+         bc_clear_args (&bc_ctl, &bc_state);
+         bc_state.cmd_argv_chars = 0; /* begin at start of buffer */
+
+         bc_push_arg (&bc_ctl, &bc_state,
+                      argv[optind], arglen[optind] + 1,
+                      NULL, 0,
+                      initial_args);
+         len--;
+         initial_args = false;
+
+         for (i = optind + 1; i < argc; i++)
+           bc_do_insert (&bc_ctl, &bc_state,
+                         argv[i], arglen[i],
+                         NULL, 0,
+                         linebuf, len,
+                         initial_args);
+         bc_do_exec (&bc_ctl, &bc_state);
+       }
+    }
+
+  original_exit_value = child_error;
+  return child_error;
+}
+
+
+/* Read a line of arguments from the input and add them to the list of
+   arguments to pass to the command.  Ignore blank lines and initial blanks.
+   Single and double quotes and backslashes quote metacharacters and blanks
+   as they do in the shell.
+   Return -1 if eof (either physical or logical) is reached,
+   otherwise the length of the last string read (including the null).  */
+
+static int
+read_line (void)
+{
+/* States for read_line. */
+  enum read_line_state
+    {
+      NORM = 0,
+      SPACE = 1,
+      QUOTE = 2,
+      BACKSLASH = 3
+    };
+  static bool eof = false;
+  /* Start out in mode SPACE to always strip leading spaces (even with -i).  */
+  enum read_line_state state = SPACE; /* The type of character we last read.  */
+  int prevc;                   /* The previous value of c.  */
+  int quotc = 0;               /* The last quote character read.  */
+  int c = EOF;
+  bool first = true;           /* true if reading first arg on line.  */
+  bool seen_arg = false;      /* true if we have seen any arg (or part of one) yet */
+  int len;
+  char *p = linebuf;
+  /* Including the NUL, the args must not grow past this point.  */
+  char *endbuf = linebuf + bc_ctl.arg_max - bc_state.cmd_initial_argv_chars - 1;
+
+  if (eof)
+    return -1;
+  while (1)
+    {
+      prevc = c;
+      c = getc (input_stream);
+
+      if (c == EOF)
+       {
+         /* COMPAT: SYSV seems to ignore stuff on a line that
+            ends without a \n; we don't.  */
+         eof = true;
+         if (p == linebuf)
+           return -1;
+         *p++ = '\0';
+         len = p - linebuf;
+         if (state == QUOTE)
+           {
+             exec_if_possible ();
+             error (EXIT_FAILURE, 0, _("unmatched %s quote; by default quotes are special to xargs unless you use the -0 option"),
+                    quotc == '"' ? _("double") : _("single"));
+           }
+         if (first && EOF_STR (linebuf))
+           return -1;
+         if (!bc_ctl.replace_pat)
+           bc_push_arg (&bc_ctl, &bc_state,
+                        linebuf, len,
+                        NULL, 0,
+                        initial_args);
+         return len;
+       }
+      switch (state)
+       {
+       case SPACE:
+         if (ISSPACE (c))
+           continue;
+         state = NORM;
+         /* aaahhhh....  */
+
+       case NORM:
+         if (c == '\n')
+           {
+             if (!ISBLANK (prevc))
+               lineno++;       /* For -l.  */
+             if (p == linebuf)
+               {
+                 if (seen_arg)
+                   {
+                     /* An empty argument, add it to the list as normal. */
+                   }
+                 else
+                   {
+                     /* Blank line.  */
+                     state = SPACE;
+                     continue;
+                   }
+               }
+             *p++ = '\0';
+             len = p - linebuf;
+             if (EOF_STR (linebuf))
+               {
+                 eof = true;
+                 return first ? -1 : len;
+               }
+             if (!bc_ctl.replace_pat)
+               bc_push_arg (&bc_ctl, &bc_state,
+                            linebuf, len,
+                            NULL, 0,
+                            initial_args);
+             return len;
+           }
+         seen_arg = true;
+
+         /* POSIX: In the POSIX locale, the separators are <SPC> and
+          * <TAB>, but not <FF> or <VT>.
+          */
+         if (!bc_ctl.replace_pat && ISBLANK (c))
+           {
+             *p++ = '\0';
+             len = p - linebuf;
+             if (EOF_STR (linebuf))
+               {
+                 eof = true;
+                 return first ? -1 : len;
+               }
+             bc_push_arg (&bc_ctl, &bc_state,
+                          linebuf, len,
+                          NULL, 0,
+                          initial_args);
+             p = linebuf;
+             state = SPACE;
+             first = false;
+             continue;
+           }
+         switch (c)
+           {
+           case '\\':
+             state = BACKSLASH;
+             continue;
+
+           case '\'':
+           case '"':
+             state = QUOTE;
+             quotc = c;
+             continue;
+           }
+         break;
+
+       case QUOTE:
+         if (c == '\n')
+           {
+             exec_if_possible ();
+             error (EXIT_FAILURE, 0, _("unmatched %s quote; by default quotes are special to xargs unless you use the -0 option"),
+                    quotc == '"' ? _("double") : _("single"));
+           }
+         if (c == quotc)
+           {
+             state = NORM;
+             seen_arg = true; /* Makes a difference for e.g. just '' or "" as the first arg on a line */
+             continue;
+           }
+         break;
+
+       case BACKSLASH:
+         state = NORM;
+         break;
+       }
+
+      if ( (0 == c) && !nullwarning_given )
+       {
+         /* This is just a warning message.  We only issue it once. */
+         error (0, 0,
+                _("WARNING: a NUL character occurred in the input.  "
+                  "It cannot be passed through in the argument list.  "
+                  "Did you mean to use the --null option?"));
+         nullwarning_given = 1;
+       }
+
+#if 1
+      if (p >= endbuf)
+        {
+         exec_if_possible ();
+         error (EXIT_FAILURE, 0, _("argument line too long"));
+       }
+      *p++ = c;
+#else
+      append_char_to_buf (&linebuf, &endbuf, &p, c);
+#endif
+    }
+}
+
+/* Read a null-terminated string from the input and add it to the list of
+   arguments to pass to the command.
+   Return -1 if eof (either physical or logical) is reached,
+   otherwise the length of the string read (including the null).  */
+
+static int
+read_string (void)
+{
+  static bool eof = false;
+  int len;
+  char *p = linebuf;
+  /* Including the NUL, the args must not grow past this point.  */
+  char *endbuf = linebuf + bc_ctl.arg_max - bc_state.cmd_initial_argv_chars - 1;
+
+  if (eof)
+    return -1;
+  while (1)
+    {
+      int c = getc (input_stream);
+      if (c == EOF)
+       {
+         eof = true;
+         if (p == linebuf)
+           return -1;
+         *p++ = '\0';
+         len = p - linebuf;
+         if (!bc_ctl.replace_pat)
+           bc_push_arg (&bc_ctl, &bc_state,
+                        linebuf, len,
+                        NULL, 0,
+                        initial_args);
+         return len;
+       }
+      if (c == input_delimiter)
+       {
+         lineno++;             /* For -l.  */
+         *p++ = '\0';
+         len = p - linebuf;
+         if (!bc_ctl.replace_pat)
+           bc_push_arg (&bc_ctl, &bc_state,
+                        linebuf, len,
+                        NULL, 0,
+                        initial_args);
+         return len;
+       }
+      if (p >= endbuf)
+        {
+         exec_if_possible ();
+         error (EXIT_FAILURE, 0, _("argument line too long"));
+       }
+      *p++ = c;
+    }
+}
+
+/* Print the arguments of the command to execute.
+   If ASK is nonzero, prompt the user for a response, and
+   if the user responds affirmatively, return true;
+   otherwise, return false.  */
+
+static bool
+print_args (bool ask)
+{
+  int i;
+
+  for (i = 0; i < bc_state.cmd_argc - 1; i++)
+    fprintf (stderr, "%s ", bc_state.cmd_argv[i]);
+  if (ask)
+    {
+      static FILE *tty_stream;
+      int c, savec;
+
+      if (!tty_stream)
+       {
+         tty_stream = fopen ("/dev/tty", "r");
+         if (!tty_stream)
+           error (EXIT_FAILURE, errno,
+                  _("failed to open /dev/tty for reading"));
+       }
+      fputs ("?...", stderr);
+      fflush (stderr);
+      c = savec = getc (tty_stream);
+      while (c != EOF && c != '\n')
+       c = getc (tty_stream);
+      if (savec == 'y' || savec == 'Y')
+       return true;
+    }
+  else
+    putc ('\n', stderr);
+
+  return false;
+}
+
+
+/* Close stdin and attach /dev/null to it.
+ * This resolves Savannah bug #3992.
+ */
+static void
+prep_child_for_exec (void)
+{
+  if (!keep_stdin)
+    {
+      const char inputfile[] = "/dev/null";
+      /* fprintf (stderr, "attaching stdin to /dev/null\n"); */
+
+      close (0);
+      if (open (inputfile, O_RDONLY) < 0)
+       {
+         /* This is not entirely fatal, since
+          * executing the child with a closed
+          * stdin is almost as good as executing it
+          * with its stdin attached to /dev/null.
+          */
+         error (0, errno, "%s", quotearg_n_style (0, locale_quoting_style, inputfile));
+       }
+    }
+}
+
+
+/* Execute the command that has been built in `cmd_argv'.  This may involve
+   waiting for processes that were previously executed.
+
+   There are a number of cases where we want to terminate the current (child)
+   process.  We do this by calling _exit () rather than exit () in order to
+   avoid the invocation of wait_for_proc_all (), which was registered by the parent
+   as an atexit () function.
+*/
+static int
+xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv)
+{
+  pid_t child;
+  int fd[2];
+  int buf;
+  int r;
+
+  (void) ctl;
+
+  if (!query_before_executing || print_args (true))
+    {
+      if (proc_max)
+       {
+         while (procs_executing >= proc_max)
+           {
+             wait_for_proc (false, 1u);
+           }
+       }
+      if (!query_before_executing && print_command)
+       print_args (false);
+
+      /* Before forking, reap any already-exited child. We do this so
+        that we don't leave unreaped children around while we build a
+        new command line.  For example this command will spend most
+        of its time waiting for sufficient arguments to launch
+        another command line:
+
+        seq 1 1000 | fmt | while read x ; do echo $x; sleep 1 ; done |
+        ./xargs -P 200 -n 20  sh -c 'echo "$@"; sleep $((1 + $RANDOM % 5))' sleeper
+      */
+      wait_for_proc (false, 0u);
+
+      if (pipe (fd))
+       error (EXIT_FAILURE, errno, _("could not create pipe before fork"));
+      fcntl (fd[1], F_SETFD, FD_CLOEXEC);
+
+      /* If we run out of processes, wait for a child to return and
+         try again.  */
+      while ((child = fork ()) < 0 && errno == EAGAIN && procs_executing)
+       wait_for_proc (false, 1u);
+
+      switch (child)
+       {
+       case -1:
+         error (EXIT_FAILURE, errno, _("cannot fork"));
+
+       case 0:         /* Child.  */
+         {
+           close (fd[0]);
+           child_error = EXIT_SUCCESS;
+
+           prep_child_for_exec ();
+
+           if (bc_args_exceed_testing_limit (argv))
+             errno = E2BIG;
+           else
+             execvp (argv[0], argv);
+           if (errno)
+             {
+               /* Write errno value to parent.  We do this even if
+                * the error was not E2BIG, because we need to
+                * distinguish successful execs from unsuccessful
+                * ones.  The reason we need to do this is to know
+                * whether to reap the child here (preventing the
+                * exit status processing in wait_for_proc () from
+                * changing the value of child_error) or leave it
+                * for wait_for_proc () to handle.  We need to have
+                * wait_for_proc () handle the exit values from the
+                * utility if we run it, for POSIX compliance on the
+                * handling of exit values.
+                */
+               write (fd[1], &errno, sizeof (int));
+             }
+
+           close (fd[1]);
+           if (E2BIG != errno)
+             {
+               error (0, errno, "%s", argv[0]);
+             }
+           /* The actual value returned here should be irrelevant,
+            * because the parent will test our value of errno.
+            */
+           _exit (errno == ENOENT ? XARGS_EXIT_COMMAND_NOT_FOUND : XARGS_EXIT_COMMAND_CANNOT_BE_RUN);
+
+         /*NOTREACHED*/
+         } /* child */
+
+       default:
+         {
+           /* Parent */
+           close (fd[1]);
+         }
+
+       } /* switch (child) */
+      /*fprintf (stderr, "forked child (bc_state.cmd_argc=%d) -> ", bc_state.cmd_argc);*/
+
+      switch (r = read (fd[0], &buf, sizeof (int)))
+       {
+       case -1:
+         {
+           close (fd[0]);
+           error (0, errno,
+                  _("errno-buffer read failed in xargs_do_exec "
+                    "(this is probably a bug, please report it)"));
+           break;
+         }
+
+       case sizeof (int):
+         {
+           /* Failure */
+           int childstatus;
+
+           close (fd[0]);
+
+           /* we know the child is about to exit, so wait for that.
+            * We have to do this so that wait_for_proc () does not
+            * change the value of child_error on the basis of the
+            * return value -- since in this case we did not launch
+            * the utility.
+            *
+            * We do the wait before deciding if we failed in order to
+            * avoid creating a zombie, even briefly.
+            */
+           waitpid (child, &childstatus, 0);
+
+
+           if (E2BIG == buf)
+             {
+               return 0; /* Failure; caller should pass fewer args */
+             }
+           else if (ENOENT == buf)
+             {
+               exit (XARGS_EXIT_COMMAND_NOT_FOUND); /* command cannot be found */
+             }
+           else
+             {
+               exit (XARGS_EXIT_COMMAND_CANNOT_BE_RUN); /* command cannot be run */
+             }
+           break;
+         }
+
+       case 0:
+         {
+           /* Failed to read data from pipe; the exec must have
+            * succeeded.  We call add_proc only in this case,
+            * because it increments procs_executing, and we only
+            * want to do that if we didn't already wait for the
+            * child.
+            */
+           add_proc (child);
+           break;
+         }
+       default:
+         {
+           error (EXIT_FAILURE, errno,
+                  _("read returned unexpected value %d; "
+                    "this is probably a bug, please report it"), r);
+         }
+       } /* switch on bytes read */
+      close (fd[0]);
+    }
+  return 1;                    /* Success */
+}
+
+/* Execute the command if possible.  */
+
+static void
+exec_if_possible (void)
+{
+  if (bc_ctl.replace_pat || initial_args ||
+      bc_state.cmd_argc == bc_ctl.initial_argc || bc_ctl.exit_if_size_exceeded)
+    return;
+  bc_do_exec (&bc_ctl, &bc_state);
+}
+
+/* Add the process with id PID to the list of processes that have
+   been executed.  */
+
+static void
+add_proc (pid_t pid)
+{
+  unsigned int i, j;
+
+  /* Find an empty slot.  */
+  for (i = 0; i < pids_alloc && pids[i]; i++)
+    ;
+
+  /* Extend the array if we failed. */
+  if (i == pids_alloc)
+    {
+      pids = x2nrealloc (pids, &pids_alloc, sizeof *pids);
+
+      /* Zero out the new slots. */
+      for (j=i; j<pids_alloc; ++j)
+       pids[j] = (pid_t)0;
+    }
+  /* Verify that we are not destroying the record of some existing child. */
+  assert (0 == pids[i]);
+
+  /* Remember the child. */
+  pids[i] = pid;
+  procs_executing++;
+  procs_executed = true;
+}
+
+
+/* If ALL is true, wait for all child processes to finish;
+   otherwise, wait for one child process to finish, or for another signal
+   that tells us that we can run more child processes.
+   Remove the processes that finish from the list of executing processes.  */
+
+static void
+wait_for_proc (bool all, unsigned int minreap)
+{
+  unsigned int reaped = 0;
+
+  while (procs_executing)
+    {
+      unsigned int i;
+      int status;
+      pid_t pid;
+      int wflags = 0;
+
+      if (!all)
+       {
+         if (reaped >= minreap)
+           {
+             /* We already reaped enough children.  To save system
+              * resources, reap any dead children anyway, but do not
+              * wait for any currently executing children to exit.
+
+              */
+             wflags = WNOHANG;
+           }
+       }
+
+      stop_waiting = 0;
+      do
+       {
+         /* Wait for any child.   We used to use wait () here, but it's
+          * unlikely that that offers any portability advantage over
+          * wait these days.
+          */
+         while ((pid = waitpid (-1, &status, wflags)) == (pid_t) -1)
+           {
+             if (errno != EINTR)
+               error (EXIT_FAILURE, errno,
+                      _("error waiting for child process"));
+
+             if (stop_waiting && !all)
+               {
+                 /* Receipt of SIGUSR1 gave us an extra slot and we
+                  * don't need to wait for all processes to finish.
+                  * We can stop reaping now, but in any case check for 
+                  * further dead children without waiting for another 
+                  * to exit.
+                  */
+                 wflags = WNOHANG;
+               }
+           }
+
+         /* Find the entry in `pids' for the child process
+            that exited.  */
+         if (pid)
+           {
+             for (i = 0; i < pids_alloc && pid != pids[i]; i++)
+               ;
+           }
+       }
+      while (pid && i == pids_alloc);  /* A child died that we didn't start? */
+
+      if (!pid)
+       {
+         if (!(wflags & WNOHANG))
+           {
+             /* Nothing remained to be reaped.  This should not
+              * happen, because procs_executing should contain the
+              * number of child processes still executing, so the
+              * loop should have terminated.
+              */
+             error (0, 0, _("WARNING: Lost track of %d child processes"),
+                    procs_executing);
+           }
+         else
+           {
+             /* Children are (probably) executing but are not ready
+              * to be reaped at the moment.
+              */
+           }
+         break;
+       }
+
+      /* Remove the child from the list.  */
+      pids[i] = 0;
+      procs_executing--;
+      reaped++;
+
+      if (WEXITSTATUS (status) == CHILD_EXIT_PLEASE_STOP_IMMEDIATELY)
+       error (XARGS_EXIT_CLIENT_EXIT_255, 0,
+              _("%s: exited with status 255; aborting"), bc_state.cmd_argv[0]);
+      if (WIFSTOPPED (status))
+       error (XARGS_EXIT_CLIENT_FATAL_SIG, 0,
+              _("%s: stopped by signal %d"), bc_state.cmd_argv[0], WSTOPSIG (status));
+      if (WIFSIGNALED (status))
+       error (XARGS_EXIT_CLIENT_FATAL_SIG, 0,
+              _("%s: terminated by signal %d"), bc_state.cmd_argv[0], WTERMSIG (status));
+      if (WEXITSTATUS (status) != 0)
+       child_error = XARGS_EXIT_CLIENT_EXIT_NONZERO;
+    }
+}
+
+/* Wait for all child processes to finish.  */
+
+static void
+wait_for_proc_all (void)
+{
+  static bool waiting = false;
+
+  /* This function was registered by the original, parent, process.
+   * The child processes must not call exit () to terminate, since this
+   * will mean that their exit status will be inappropriately changed.
+   * Instead the child processes should call _exit ().  If someone
+   * forgets this rule, you may see the following assert () fail.
+   */
+  assert (getpid () == parent);
+
+  if (waiting)
+    return;
+
+  waiting = true;
+  wait_for_proc (true, 0u);
+  waiting = false;
+
+  if (original_exit_value != child_error)
+    {
+      /* wait_for_proc () changed the value of child_error ().  This
+       * function is registered via atexit (), and so may have been
+       * called from exit ().  We now know that the original value
+       * passed to exit () is no longer the exit status we require.
+       * The POSIX standard states that the behaviour if exit () is
+       * called more than once is undefined.  Therefore we now have to
+       * exit with _exit () instead of exit ().
+       */
+      _exit (child_error);
+    }
+
+}
+
+
+/* Increment or decrement the number of processes we can start simultaneously,
+   when we receive a signal from the outside world.
+   
+   We must take special care around proc_max == 0 (unlimited children),
+   proc_max == 1 (don't decrement to zero).  */
+static void
+increment_proc_max (int ignore)
+{
+       /* If user increments from 0 to 1, we'll take it and serialize. */
+       proc_max++;
+       /* If we're waiting for a process to die before doing something,
+          no need to wait any more. */
+       stop_waiting = 1;
+}
+
+static void
+decrement_proc_max (int ignore)
+{
+       if (proc_max > 1)
+               proc_max--;
+}
+
+
+/* Return the value of the number represented in STR.
+   OPTION is the command line option to which STR is the argument.
+   If the value does not fall within the boundaries MIN and MAX,
+   Print an error message mentioning OPTION.  If FATAL is true,
+   we also exit. */
+
+static long
+parse_num (char *str, int option, long int min, long int max, int fatal)
+{
+  char *eptr;
+  long val;
+
+  val = strtol (str, &eptr, 10);
+  if (eptr == str || *eptr)
+    {
+      fprintf (stderr, _("%s: invalid number for -%c option\n"),
+              program_name, option);
+      usage (stderr);
+      exit (EXIT_FAILURE);
+    }
+  else if (val < min)
+    {
+      fprintf (stderr, _("%s: value for -%c option should be >= %ld\n"),
+              program_name, option, min);
+      if (fatal)
+       {
+         usage (stderr);
+         exit (EXIT_FAILURE);
+       }
+      else
+       {
+         val = min;
+       }
+    }
+  else if (max >= 0 && val > max)
+    {
+      fprintf (stderr, _("%s: value for -%c option should be < %ld\n"),
+              program_name, option, max);
+      if (fatal)
+       {
+         usage (stderr);
+         exit (EXIT_FAILURE);
+       }
+      else
+       {
+         val = max;
+       }
+    }
+  return val;
+}
+
+static void
+usage (FILE *stream)
+{
+  fprintf (stream, _("\
+Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n\
+       [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]\n\
+       [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n\
+       [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n\
+       [-n max-args] [--max-args=max-args]\n\
+       [-s max-chars] [--max-chars=max-chars]\n\
+       [-P max-procs]  [--max-procs=max-procs] [--show-limits]\n\
+       [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n\
+       [--version] [--help] [command [initial-arguments]]\n"),
+          program_name);
+  fputs (_("\nReport bugs to <bug-findutils@gnu.org>.\n"), stream);
+}